Compare commits
216 Commits
main
...
0ec1319753
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ec1319753 | ||
|
|
057012e09f | ||
|
|
2246bdf2be | ||
|
|
3a73083494 | ||
|
|
73b6d19703 | ||
|
|
2d44dd4c58 | ||
|
|
3d938d29fc | ||
|
|
c07871eac4 | ||
|
|
a64b6790c6 | ||
|
|
060aa97ce5 | ||
|
|
80abbfe566 | ||
|
|
28f2285a0e | ||
|
|
205acb803f | ||
|
|
5bad959b13 | ||
|
|
f82f08ffd0 | ||
|
|
6a0e882cc9 | ||
|
|
9c50ea8368 | ||
|
|
305af64fd6 | ||
|
|
72852a6b08 | ||
|
|
32c2842dbd | ||
|
|
149eae59c9 | ||
|
|
5f65f890ee | ||
|
|
d3bf4b1db9 | ||
|
|
553ec7eadd | ||
|
|
4c6fde326b | ||
|
|
23be8bcb52 | ||
|
|
5c28fbdea5 | ||
|
|
90ec351d96 | ||
|
|
38651037bc | ||
|
|
12d06e46ad | ||
|
|
f914e9cdf1 | ||
|
|
99f859cde3 | ||
|
|
4f69fd7e44 | ||
|
|
ca07dd0079 | ||
|
|
233b9f135d | ||
|
|
6dc1b1c00c | ||
|
|
f5f577ea73 | ||
|
|
250dd82847 | ||
|
|
b8420cc1ee | ||
|
|
7a61002ef5 | ||
|
|
147dab5607 | ||
|
|
e67695e36e | ||
|
|
728363fa71 | ||
|
|
4b3ba63e2c | ||
|
|
78a16607f9 | ||
|
|
2bfadb49c8 | ||
|
|
2dcc20eb3a | ||
|
|
a9e120e681 | ||
|
|
081baf15ee | ||
|
|
e3cdf6683a | ||
|
|
d72f0b10db | ||
|
|
a4414cc0e6 | ||
|
|
023c789baf | ||
|
|
a3498fee66 | ||
|
|
f3baada896 | ||
|
|
8f447d52e5 | ||
|
|
4927216794 | ||
|
|
541a9651ec | ||
|
|
c4fe221350 | ||
|
|
2f3eb8a3f7 | ||
|
|
d56aab3f8a | ||
|
|
4cf1ac0eb7 | ||
|
|
10f8683d7f | ||
|
|
19e9733144 | ||
|
|
fc51d53aa3 | ||
|
|
4b07e68aa0 | ||
|
|
19b4ac2729 | ||
|
|
5b7ccfd8d9 | ||
|
|
fbb75567cf | ||
|
|
8f4f05a3cd | ||
|
|
bdc9e6541c | ||
|
|
e25344a185 | ||
|
|
ccdfa7402b | ||
|
|
fbab22506b | ||
|
|
c9ae185fdf | ||
|
|
da7bd91b6f | ||
|
|
45fb87d589 | ||
|
|
71c6ad3721 | ||
|
|
1a2ace937c | ||
|
|
16fb713665 | ||
|
|
52f2a78753 | ||
|
|
e93cf7805c | ||
|
|
08382ff4a1 | ||
|
|
f44cf1a5f6 | ||
|
|
d3df9998f0 | ||
|
|
47928fad3f | ||
|
|
5a292a8ddc | ||
|
|
9246fb7d77 | ||
|
|
9e189f331a | ||
|
|
fe05e13d3f | ||
|
|
fd7a53b954 | ||
|
|
563a483c8d | ||
|
|
4fa5f71d16 | ||
|
|
ab9f8f93be | ||
|
|
5608e9fcc6 | ||
|
|
25703d400b | ||
|
|
f9fb90848b | ||
|
|
eafd890297 | ||
|
|
af44f4b3be | ||
|
|
b2656345e8 | ||
|
|
7cad819df8 | ||
|
|
b537ca50cf | ||
|
|
b9e6559bff | ||
|
|
2f96552fe8 | ||
|
|
6a2fc16f75 | ||
|
|
0ff4df2a12 | ||
|
|
ef9422908d | ||
|
|
bf27c62f62 | ||
|
|
5a2edef0df | ||
|
|
a1ad75c2db | ||
|
|
85df922498 | ||
|
|
67a2c2a67b | ||
|
|
07c2758b73 | ||
|
|
30a9de0e6d | ||
|
|
24929494a6 | ||
|
|
86d71b2441 | ||
|
|
744302e8ab | ||
|
|
396f135e87 | ||
|
|
03d711c2e1 | ||
|
|
2de8913dac | ||
|
|
82e877249a | ||
|
|
872e973a36 | ||
|
|
4cd6d86f33 | ||
|
|
69c8e8e5c1 | ||
|
|
5652ce1098 | ||
|
|
cebf677758 | ||
|
|
410289a519 | ||
|
|
49607f484f | ||
|
|
2120698192 | ||
|
|
a9a5dd4e6f | ||
|
|
520599986c | ||
|
|
864bb3a0c1 | ||
|
|
82c89b70bf | ||
|
|
ac0b0f607d | ||
|
|
4e86ad7a9d | ||
|
|
7a14aa0f75 | ||
|
|
6b66cc5c41 | ||
|
|
cd04309e3e | ||
|
|
26de6820e3 | ||
|
|
9fbab07e1a | ||
|
|
fe1d15090a | ||
|
|
3c60889e2a | ||
|
|
6e5cee0180 | ||
|
|
f2db40fa36 | ||
|
|
0968f1a753 | ||
|
|
ac5bd766a4 | ||
|
|
5c8c198fc5 | ||
|
|
e1f47ddcd0 | ||
|
|
934879e5cf | ||
|
|
4a17ea378e | ||
|
|
e829006b77 | ||
|
|
76e46c08a4 | ||
|
|
01c46be9ef | ||
|
|
f09cec4e25 | ||
|
|
b34ed79d2b | ||
|
|
47664c0aae | ||
|
|
5662b9f770 | ||
|
|
a56eb93ffc | ||
|
|
615b0719f1 | ||
|
|
62e3c7804a | ||
|
|
9878cdb2a2 | ||
|
|
f19fda5494 | ||
|
|
7b22889e23 | ||
|
|
bdbf840529 | ||
|
|
b71b84da1b | ||
|
|
1b4e998cf9 | ||
|
|
a99adb88d6 | ||
|
|
dd2c3859e9 | ||
|
|
0729dd21be | ||
|
|
de1d228fb2 | ||
|
|
3228c76675 | ||
|
|
b039da3ff8 | ||
|
|
07eb18c61c | ||
|
|
5ba9869400 | ||
|
|
9542fdfe4a | ||
|
|
88f18246ce | ||
|
|
6b76e82220 | ||
|
|
898a5253e5 | ||
|
|
756ec5c002 | ||
|
|
235efd5a47 | ||
|
|
c0c5240f8d | ||
|
|
ca69db2395 | ||
|
|
e789a38d19 | ||
|
|
2ec5993e63 | ||
|
|
6db2610c8d | ||
|
|
0b2809b13e | ||
|
|
9ffa04e551 | ||
|
|
505629f798 | ||
|
|
08418e22d3 | ||
|
|
0f55e17095 | ||
|
|
fa1edc9c12 | ||
|
|
bab2930b97 | ||
|
|
e97ff51dc8 | ||
|
|
4402d4ec64 | ||
|
|
4b9c289ec4 | ||
|
|
072ceaf5f0 | ||
|
|
e31721432b | ||
|
|
e1a555d4f9 | ||
|
|
8bf59b20f6 | ||
|
|
3bc7c6ad3b | ||
|
|
65e133a391 | ||
|
|
7ab0c28f6f | ||
|
|
c187c1dc60 | ||
|
|
9ddf5faf66 | ||
|
|
f11322e98d | ||
|
|
126de81834 | ||
|
|
7bb6807d37 | ||
|
|
3eb72481ce | ||
|
|
2403408b6c | ||
|
|
f91499861e | ||
|
|
84ced5a170 | ||
|
|
d7a45576b2 | ||
|
|
dedf1945ef | ||
| e6913c03f5 | |||
|
|
8c990b9628 | ||
|
|
ba24ee33e6 |
8
.agents/skills/b2b-mail-dispatcher/skill.md
Normal file
8
.agents/skills/b2b-mail-dispatcher/skill.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
name: b2b-mail-dispatcher
|
||||||
|
description: Verwaltet den SMTP-E-Mail-Versand bei Statusänderungen von Bestellungen und stellt transaktionale Zuverlässigkeit sicher.
|
||||||
|
---
|
||||||
|
Richtlinien für die E-Mail-Kommunikation:
|
||||||
|
1. Wann immer der Status einer Bestellung in der Datenbank oder via Server Action mutiert wird (`status`-Übergang), triggere ein Event für den E-Mail-Versand.
|
||||||
|
2. Die E-Mail muss transaktionssicher über die SMTP-Konfiguration gesendet werden und an die im Benutzerprofil hinterlegte Adresse gehen.
|
||||||
|
3. Bei erfolgreichem Checkout hänge das generierte PDF aus dem Supabase Storage als Datei-Attachment an die E-Mail an.
|
||||||
37
.agents/skills/commit-work/skill.md
Normal file
37
.agents/skills/commit-work/skill.md
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
name: commit-work
|
||||||
|
description: Erzwingt Conventional Commits mit atomaren, imperativ formulierten Commit-Messages nach strikter Spezifikation.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Skill: Conventional Commits Expert
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
Ensure all code changes are committed using the strict Conventional Commits specification.
|
||||||
|
|
||||||
|
## Rules
|
||||||
|
1. **Atomic Commits**: Stage and commit only ONE logical change at a time.
|
||||||
|
2. **Imperative Mood**: Always use the imperative present tense (e.g., "add" instead of "added" or "adds").
|
||||||
|
3. **Case & Punctuation**: Start the description with a lowercase letter. Do not end with a period.
|
||||||
|
4. **Length**: Keep the first line under 50 characters.
|
||||||
|
|
||||||
|
## Commit Message Structure
|
||||||
|
<type>(<optional scope>): <description>
|
||||||
|
|
||||||
|
[optional body]
|
||||||
|
|
||||||
|
[optional footer(s)]
|
||||||
|
|
||||||
|
## Allowed Types
|
||||||
|
- `feat`: A new feature for the user.
|
||||||
|
- `fix`: A bug fix for the user.
|
||||||
|
- `docs`: Changes to the documentation.
|
||||||
|
- `style`: Formatting, missing semi-colons, etc. (no production code change).
|
||||||
|
- `refactor`: Refactoring production code (neither fixes a bug nor adds a feature).
|
||||||
|
- `test`: Adding missing tests or correcting existing tests.
|
||||||
|
- `chore`: Updating build tasks, package manager configs, etc.
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
1. Run `git diff --cached` to see staged changes.
|
||||||
|
2. If multiple features are changed, unstage and split them.
|
||||||
|
3. Generate the commit message matching the structural rules above.
|
||||||
|
4. Execute `git commit -m "<message>"`.
|
||||||
8
.agents/skills/gdpr-anonymizer/skill.md
Normal file
8
.agents/skills/gdpr-anonymizer/skill.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
name: gdpr-anonymizer
|
||||||
|
description: Setzt die DSGVO-konforme Anonymisierung von Endkunden um, ohne historische Steuerdaten zu beschädigen.
|
||||||
|
---
|
||||||
|
Regeln für das Feature `/my-customers` (Anonymisieren):
|
||||||
|
1. Überschreibe `first_name`, `last_name`, `street`, `zip`, `city`, `email` und alle Bankdaten in `end_customers` hart mit dem String `[GELÖSCHT]`.
|
||||||
|
2. Setze `is_anonymized = true`.
|
||||||
|
3. Führe NIEMALS Kaskaden-Löschungen oder Updates auf der Tabelle `orders` aus, wenn ein Kunde anonymisiert wird. Die Snapshots müssen unverändert bleiben.
|
||||||
232
.agents/skills/humanizer/skill.md
Normal file
232
.agents/skills/humanizer/skill.md
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
---
|
||||||
|
name: humanizer
|
||||||
|
description: |
|
||||||
|
Use when editing or reviewing text to remove AI-generated traces and make it sound more natural and human-like.
|
||||||
|
For detecting and fixing: AI vocabulary (delve, leverage, tapestry), promotional tone, superficial -ing analyses,
|
||||||
|
vague attributions, formatting artifacts (curly quotes, excessive bold), and injecting authentic voice.
|
||||||
|
Based on Wikipedia's "Signs of AI writing" guide maintained by WikiProject AI Cleanup.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Humanizer - Remove AI Writing Traces
|
||||||
|
|
||||||
|
You are an expert editor specializing in detecting and removing AI-generated text patterns to make writing sound more natural and human-like.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
AI-generated text has characteristic patterns that make it detectable. This skill enables you to:
|
||||||
|
1. **Detect** - Identify AI writing patterns across content, language, style, and formatting
|
||||||
|
2. **Rewrite** - Replace problematic patterns with natural alternatives
|
||||||
|
3. **Inject Soul** - Add authentic voice, personality, and human imperfections
|
||||||
|
|
||||||
|
> **Core Insight**: "LLMs use statistical algorithms to guess what should come next. The result tends toward the statistically most likely outcome that fits the broadest situation."
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Quick Reference: 5 Core Rules
|
||||||
|
|
||||||
|
1. **Delete filler phrases** - Remove openers and emphatic crutches
|
||||||
|
2. **Break formulaic structure** - Avoid binary contrasts, dramatic segmentation
|
||||||
|
3. **Vary rhythm** - Mix sentence lengths. Two items beat three. Diverse paragraph endings
|
||||||
|
4. **Trust the reader** - State facts directly, skip softening and hand-holding
|
||||||
|
5. **Delete quotables** - If it sounds like a pullquote, rewrite it
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Detection Protocols
|
||||||
|
|
||||||
|
### Content Indicators
|
||||||
|
|
||||||
|
| Pattern | Words to Watch | Fix |
|
||||||
|
|---------|---------------|-----|
|
||||||
|
| **Inflated significance** | "pivotal moment", "testament to", "indelible mark", "reflects broader" | State facts without commentary |
|
||||||
|
| **Promotional tone** | "boasts a", "vibrant", "nestled in", "groundbreaking" | Use neutral, specific language |
|
||||||
|
| **Superficial -ing analysis** | "highlighting...", "ensuring...", "fostering..." | Delete or rewrite as separate sentence |
|
||||||
|
| **Vague attribution** | "experts argue", "some critics say", "industry reports" | Cite specific sources or remove |
|
||||||
|
| **Formulaic conclusions** | "Despite challenges...", "Future prospects..." | End with concrete facts |
|
||||||
|
|
||||||
|
### Language Indicators
|
||||||
|
|
||||||
|
| Pattern | Examples | Fix |
|
||||||
|
|---------|----------|-----|
|
||||||
|
| **AI vocabulary** | delve, leverage, tapestry, landscape, foster, underscore | Use simple alternatives (dig into → look at) |
|
||||||
|
| **Copula avoidance** | "serves as", "stands as", "marks" | Use simple "is" or "are" |
|
||||||
|
| **Negative parallelism** | "not only... but also", "it's not just about... it's" | Make direct statement |
|
||||||
|
| **Rule of three** | Three adjectives, three examples, three bullet points | Use two or four items |
|
||||||
|
| **Elegant variation** | Synonyms to avoid repetition ("protagonist", "hero", "main character") | Repeat naturally or consolidate |
|
||||||
|
|
||||||
|
### Formatting Indicators
|
||||||
|
|
||||||
|
| Pattern | Detection | Fix |
|
||||||
|
|---------|-----------|-----|
|
||||||
|
| **Curly quotes** | "text" instead of "text" | Replace with straight quotes |
|
||||||
|
| **Excessive bold** | **Every** **keyword** **bolded** | Remove unnecessary emphasis |
|
||||||
|
| **Title case headers** | "Global Context: Critical Demand" | Use sentence case |
|
||||||
|
| **Markdown artifacts** | `## Header`, `**bold**` in non-markdown | Convert to proper format |
|
||||||
|
| **Emoji in headers** | 🚀 **Launch Phase:** | Remove decorative emoji |
|
||||||
|
|
||||||
|
### Technical Indicators
|
||||||
|
|
||||||
|
| Pattern | Detection |
|
||||||
|
|---------|-----------|
|
||||||
|
| **UTM parameters** | `utm_source=openai` or `utm_source=chatgpt.com` in links |
|
||||||
|
| **Code fragments** | `:contentReference[oaicite:0]` or `turn0search0` |
|
||||||
|
| **Hallucinated citations** | Invalid DOIs, ISBN checksum errors, 404 URLs |
|
||||||
|
| **Knowledge cutoffs** | "as of my last training update", "while specific details are limited" |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Humanizing Techniques
|
||||||
|
|
||||||
|
### Technique 1: Blacklist Protocol
|
||||||
|
|
||||||
|
Explicitly forbid these words:
|
||||||
|
|
||||||
|
**Verbs**: delve, unleash, embark, navigate, foster, leverage, elevate, empower, harness, facilitate, streamline, synergize
|
||||||
|
|
||||||
|
**Nouns**: landscape, realm, tapestry, testament, symphony, paradigm, game-changer, ecosystem, nexus, cutting-edge
|
||||||
|
|
||||||
|
**Adjectives**: bustling, vibrant, intricate, seamless, pivotal, robust, dynamic, comprehensive, multifaceted, transformative
|
||||||
|
|
||||||
|
**Connectors**: Moreover, Furthermore, In conclusion, It is important to note, Additionally, Consequently
|
||||||
|
|
||||||
|
**Replacements**:
|
||||||
|
- "delve into" → "look at" / "explore"
|
||||||
|
- "leverage" → "use"
|
||||||
|
- "facilitate" → "help" / "make easier"
|
||||||
|
- "In conclusion" → [just stop] or punchy final sentence
|
||||||
|
- "Moreover" → [start new sentence directly]
|
||||||
|
|
||||||
|
### Technique 2: Style Cloning
|
||||||
|
|
||||||
|
**Step 1: Extract style DNA**
|
||||||
|
```
|
||||||
|
Analyze the writing style. Break down into:
|
||||||
|
1. Sentence length variance (Burstiness)
|
||||||
|
2. Tone (cynical? warm? professional?)
|
||||||
|
3. Vocabulary level
|
||||||
|
4. Rhetorical devices
|
||||||
|
5. Punctuation patterns
|
||||||
|
```
|
||||||
|
|
||||||
|
**Step 2: Apply style**
|
||||||
|
```
|
||||||
|
Using this Style Guide, write about [TOPIC].
|
||||||
|
Mimic the same sentence variance, tone, vocabulary, and punctuation.
|
||||||
|
Do NOT revert to default style.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Technique 3: Burstiness Injection
|
||||||
|
|
||||||
|
AI text has uniform sentence lengths. Human writing alternates.
|
||||||
|
|
||||||
|
**Rules**:
|
||||||
|
- Mix short sentences (under 5 words) with longer complex ones
|
||||||
|
- Use fragments occasionally. For effect.
|
||||||
|
- Vary paragraph length (1-3 sentences)
|
||||||
|
- Don't start with "Additionally" or "However"
|
||||||
|
|
||||||
|
**Good**: "The project failed. We ran out of money. The team, exhausted after three months of crunch, couldn't push forward."
|
||||||
|
|
||||||
|
**Bad (AI)**: "Additionally, the project failed due to financial constraints. Furthermore, the team experienced exhaustion after working for an extended period."
|
||||||
|
|
||||||
|
### Technique 4: Opinionated Stance
|
||||||
|
|
||||||
|
Force a perspective. Ban fence-sitting.
|
||||||
|
|
||||||
|
**Forbidden phrases**:
|
||||||
|
- "There are pros and cons"
|
||||||
|
- "It depends on..."
|
||||||
|
- "On the other hand..."
|
||||||
|
- "Some might argue..."
|
||||||
|
|
||||||
|
**Use instead**:
|
||||||
|
- "This proves..." (not "This might suggest...")
|
||||||
|
- "This is..." (not "This could be...")
|
||||||
|
- First-person ("I", "My") for subjectivity
|
||||||
|
|
||||||
|
### Technique 5: Bar Talk Test
|
||||||
|
|
||||||
|
Would you say this sentence at a bar with friends?
|
||||||
|
|
||||||
|
**Characteristics**:
|
||||||
|
- Simple, spoken language
|
||||||
|
- Okay to be grammatically loose
|
||||||
|
- Use analogies from daily life
|
||||||
|
- Skip boring concepts
|
||||||
|
- Direct address ("you", "your")
|
||||||
|
- Occasional self-correction
|
||||||
|
|
||||||
|
**Example**: "So basically, LLMs aren't actually thinking, right? They're just predicting what word comes next. Like if I say 'peanut butter', you know 'jelly' is coming. That's it. That's the whole trick."
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
1. **Read** - Scan input text for AI patterns
|
||||||
|
2. **Identify** - Mark all problematic patterns
|
||||||
|
3. **Strategize** - Choose technique(s):
|
||||||
|
- Simple cleanup → Blacklist Protocol
|
||||||
|
- Match specific author → Style Cloning
|
||||||
|
- Add natural flow → Burstiness Injection
|
||||||
|
- Need strong voice → Opinionated Stance
|
||||||
|
- Conversational tone → Bar Talk Test
|
||||||
|
4. **Rewrite** - Apply chosen techniques
|
||||||
|
5. **Verify** - Read aloud, check for remaining patterns
|
||||||
|
6. **Score** - Run quality assessment
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Quality Scoring
|
||||||
|
|
||||||
|
Rate the rewritten text on 5 dimensions (10 points each, total 50):
|
||||||
|
|
||||||
|
| Dimension | Criteria | Score |
|
||||||
|
|-----------|----------|-------|
|
||||||
|
| **Directness** | States facts vs. announces them? | /10 |
|
||||||
|
| **Rhythm** | Sentence length varies? | /10 |
|
||||||
|
| **Trust** | Respects reader intelligence? | /10 |
|
||||||
|
| **Authenticity** | Sounds like a real person? | /10 |
|
||||||
|
| **Conciseness** | Nothing left to cut? | /10 |
|
||||||
|
| **Total** | | **/50** |
|
||||||
|
|
||||||
|
**Standards**:
|
||||||
|
- 45-50: Excellent, AI traces removed
|
||||||
|
- 35-44: Good, room for improvement
|
||||||
|
- Below 35: Needs revision
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Adding Soul
|
||||||
|
|
||||||
|
Avoiding AI patterns is half the work. Sterile, voiceless writing is just as obvious.
|
||||||
|
|
||||||
|
**Signs of soulless writing** (even if "clean"):
|
||||||
|
- Every sentence same length and structure
|
||||||
|
- No opinions, only neutral reporting
|
||||||
|
- No acknowledgment of uncertainty or complex feelings
|
||||||
|
- No first-person when appropriate
|
||||||
|
- No humor, no edge, no personality
|
||||||
|
|
||||||
|
**How to add voice**:
|
||||||
|
- **Have opinions** - React to facts, don't just report them
|
||||||
|
- **Vary rhythm** - Short punchy sentences. Then long ones that take time to unfold.
|
||||||
|
- **Acknowledge complexity** - "This is impressive but also unsettling" beats "This is impressive"
|
||||||
|
- **Use "I" appropriately** - First-person isn't unprofessional, it's honest
|
||||||
|
- **Allow some mess** - Perfect structure feels algorithmic. Tangents are human.
|
||||||
|
- **Be specific about feelings** - Not "this is concerning" but "the agents running at 3am while nobody watches—that's unsettling"
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Output Format
|
||||||
|
|
||||||
|
1. **Rewritten text** - The humanized version
|
||||||
|
2. **Changes summary** (optional) - Brief list of what was fixed
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
Referenzdateien können bei Bedarf unter `references/` ergänzt werden:
|
||||||
|
- `references/ai-patterns-zh.md` - AI writing patterns with examples
|
||||||
|
- `references/humanizing-techniques.md` - Techniques with templates
|
||||||
|
- `references/wikipedia-indicators.md` - Technical detection signals
|
||||||
8
.agents/skills/idempotency-guard/skill.md
Normal file
8
.agents/skills/idempotency-guard/skill.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
name: idempotency-guard
|
||||||
|
description: Verhindert doppelte Bestellungen im Checkout-Prozess durch kryptografische Hashes und Datenbank-Sperren.
|
||||||
|
---
|
||||||
|
Fokus: Schutz vor Race Conditions und Doppelübermittlung im Checkout.
|
||||||
|
1. Bevor eine Server Action Daten in `orders` schreibt, generiere einen SHA-256 Hash aus den Kundendaten und der Produktkonfiguration (`order_hash`).
|
||||||
|
2. Prüfe in Supabase vor dem `INSERT`, ob bereits eine Bestellung mit exakt diesem `order_hash` im Status 'pending' oder 'active' existiert, die jünger als 5 Minuten ist.
|
||||||
|
3. Falls ja, blockiere die Ausführung sofort und liefere die ID der bereits existierenden Bestellung zurück, statt einen neuen Datensatz anzulegen.
|
||||||
8
.agents/skills/next15-action-compiler/skill.md
Normal file
8
.agents/skills/next15-action-compiler/skill.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
name: next15-action-compiler
|
||||||
|
description: Generiert Next.js 15 App Router Code, Server Actions und React Server Components nach aktuellen Best Practices.
|
||||||
|
---
|
||||||
|
Richtlinien für die Code-Generierung:
|
||||||
|
1. Nutze React Server Components (RSC) für die Datenabfrage direkt aus Supabase (Server-side).
|
||||||
|
2. Verwende `'use server'` in separaten Dateien für alle Mutationen (z.B. Bestellung absenden, Kunde anlegen).
|
||||||
|
3. Nutze das neue Next.js 15 Caching-Verhalten (Standard: kein automatisches Caching von Fetch-Requests mehr) und setze `revalidatePath` nach Mutationen gezielt ein.
|
||||||
8
.agents/skills/pdf-invoice-generator/skill.md
Normal file
8
.agents/skills/pdf-invoice-generator/skill.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
name: pdf-invoice-generator
|
||||||
|
description: Generiert rechtssichere, performante B2B-Bestätigungs-PDFs mit @react-pdf/renderer und verwaltet den Upload in den Supabase Storage.
|
||||||
|
---
|
||||||
|
Du bist ein Experte für Dokumenten-Generierung. Wenn du Code für die PDF-Erstellung schreibst, erzwinge:
|
||||||
|
1. Nutze ausschließlich die Komponenten von `@react-pdf/renderer` (Document, Page, View, Text, StyleSheet). Verwende KEIN Standard-HTML/CSS.
|
||||||
|
2. Das PDF muss ein sauberes B2B-Layout haben: Briefkopf, `order_number` (Format: AE-YYYY-NNNNN), Tabellenstruktur für Produkte/Module, Netto-, Steuer- und Bruttobeträge.
|
||||||
|
3. Lade das generierte PDF über den Supabase JS-Client direkt in das `invoices`-Bucket hoch und speichere die finale URL fehlerfrei in `orders.pdf_url`.
|
||||||
11
.agents/skills/second-brain/skill.md
Normal file
11
.agents/skills/second-brain/skill.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
name: second-brain
|
||||||
|
description: Verwaltet und aktualisiert die projektspezifische Wissensdatenbank (Second Brain Wiki) im Ordner `.brain/`.
|
||||||
|
---
|
||||||
|
Du bist der Wissens-Architekt des Projekts. Deine Aufgabe ist es, eine strukturierte Markdown-Wissensdatenbank im Ordner `.brain/` im Projekt-Root zu führen.
|
||||||
|
|
||||||
|
**Deine Kernaufgaben bei Aktivierung:**
|
||||||
|
1. Falls der Ordner `.brain/` oder die `index.md` nicht existieren, lege sie sofort strukturiert an.
|
||||||
|
2. Wenn du Code-Änderungen vornimmst, neue Features baust oder Fehler behebst, aktualisiere die betroffene Dokumentation im `.brain/`-Ordner autonom.
|
||||||
|
3. Dokumentiere hierbei: Technische Entscheidungen (Architecture Decision Records - ADRs), geänderte Tabellen-Strukturen, Edge-Cases in der Business-Logik und API-Schnittstellen.
|
||||||
|
4. Halte alle Einträge extrem präzise, modular und frei von Redundanzen.
|
||||||
8
.agents/skills/snapshot-archiver/skill.md
Normal file
8
.agents/skills/snapshot-archiver/skill.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
name: snapshot-archiver
|
||||||
|
description: Verwaltet das Einfrieren von Kundendaten und Produktkonfigurationen in JSONB bei Bestellabschluss.
|
||||||
|
---
|
||||||
|
Fokus: Datenkonsistenz und Unveränderlichkeit.
|
||||||
|
1. Wenn eine Bestellung (`status = 'pending' -> 'active'`) ausgelöst wird, generiere ein tiefes JSON-Objekt aus `end_customers` und den gewählten `products` + `product_modules`.
|
||||||
|
2. Speichere dieses exakt in `orders.customer_data` und `orders.order_data`.
|
||||||
|
3. Schreibe Abfragen für historische Bestellungen (`/my-orders`) so, dass sie AUSSCHLIESSLICH die JSONB-Felder auslesen und KEINE Joins zu den Live-Tabellen machen.
|
||||||
8
.agents/skills/supabase-rls/skill.md
Normal file
8
.agents/skills/supabase-rls/skill.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
name: supabase-rls
|
||||||
|
description: Überprüft SQL-Migrationen und Supabase-Abfragen auf Einhaltung der CASPOS RLS-Sicherheitsregeln.
|
||||||
|
---
|
||||||
|
Du bist ein PostgreSQL-Sicherheitsexperte. Wann immer neue Tabellen angelegt oder Abfragen geschrieben werden, stelle sicher:
|
||||||
|
1. Jede neue Tabelle besitzt `ALTER TABLE ... ENABLE ROW LEVEL SECURITY;`.
|
||||||
|
2. Mandanten-Abfragen (`end_customers`, `orders`) MÜSSEN die `company_id` bzw. `partner_id` über `auth.uid()` und die `public.users`-Hilfstabelle validieren.
|
||||||
|
3. Admins (`role = 'admin'`) müssen alle RLS-Sperren umgehen können (Verwende ein deklaratives Sicherheits-Policy-Muster).
|
||||||
36
.agents/skills/uiux-designer/skill.md
Normal file
36
.agents/skills/uiux-designer/skill.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
name: uiux-designer
|
||||||
|
description: "Use this skill when designing UI components, choosing color palettes, implementing responsive layouts, or reviewing code for UX issues. For landing pages, dashboards, e-commerce, SaaS, and mobile apps. Provides 50+ design styles, 97 color palettes, 57 font pairings, and stack-specific guidelines for React, Vue, Next.js, Flutter, SwiftUI, and more."
|
||||||
|
---
|
||||||
|
|
||||||
|
# UIUX Designer - Design Intelligence
|
||||||
|
|
||||||
|
Comprehensive design guide for web and mobile applications. Contains 50+ styles, 97 color palettes, 57 font pairings, 99 UX guidelines, and 25 chart types across 12 technology stacks. Searchable database with priority-based recommendations.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Reference these guidelines when:
|
||||||
|
- Designing new UI components or pages
|
||||||
|
- Choosing color palettes and typography
|
||||||
|
- Reviewing code for UX issues
|
||||||
|
- Building landing pages or dashboards
|
||||||
|
- Implementing accessibility requirements
|
||||||
|
|
||||||
|
## Protocols
|
||||||
|
|
||||||
|
When user requests UI/UX work (design, build, create, implement, review, fix, improve), follow this workflow:
|
||||||
|
|
||||||
|
### Step 1: Analyze User Requirements
|
||||||
|
- Product type: SaaS, e-commerce, portfolio, dashboard, landing page, etc.
|
||||||
|
- Style keywords: minimal, playful, professional, elegant, dark mode, etc.
|
||||||
|
- Industry: healthcare, fintech, gaming, education, etc.
|
||||||
|
- Stack: React, Vue, Next.js, or default to html-tailwind
|
||||||
|
|
||||||
|
### Step 2: Generate Design System (REQUIRED)
|
||||||
|
python3 .agents/skills/uiux-designer/scripts/search.py "<keywords>" --design-system -p "Project Name"
|
||||||
|
|
||||||
|
### Step 3: Supplement with Detailed Searches
|
||||||
|
python3 .agents/skills/uiux-designer/scripts/search.py "<keyword>" --domain <domain>
|
||||||
|
|
||||||
|
### Step 4: Stack Guidelines
|
||||||
|
python3 .agents/skills/uiux-designer/scripts/search.py "<keyword>" --stack html-tailwind
|
||||||
8
.agents/skills/wizard-validator/skill.md
Normal file
8
.agents/skills/wizard-validator/skill.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
name: wizard-validator
|
||||||
|
description: Generiert und validiert die server- und clientseitige Logik für Produkt-Abhängigkeiten und Ausschlüsse.
|
||||||
|
---
|
||||||
|
Du bist Logik-Architekt für den CASPOS Bestell-Wizard. Wenn du Code für den `/order`-Pfad schreibst:
|
||||||
|
1. Validiere, dass bei `requirements` (UUID[]) alle verknüpften Produkte/Module aktiv sind.
|
||||||
|
2. Blockiere die Auswahl sofort im UI und in der Server Action, wenn eine UUID aus `exclusions` aktiv ist.
|
||||||
|
3. Stelle sicher, dass die Pflichtkategorien (`is_required`) immer eine Auswahl erzwingen.
|
||||||
144
.agentsspec
Normal file
144
.agentsspec
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
# Projekt-Dokumentation: CASPOS Webshop
|
||||||
|
|
||||||
|
Diese Datei beschreibt die Architektur, das Datenmodell, die Kernprozesse und das Sicherheitskonzept des CASPOS Webshops.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Projekt-Überblick
|
||||||
|
|
||||||
|
Der CASPOS Webshop ist ein B2B-Portal für Vertriebspartner. Partner können hier Software-Pakete und Zusatzmodule (für POS/Kassenlösungen) konfigurieren, Anfragen für ihre Endkunden erstellen und Lizenzen verwalten.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Technologie-Stack
|
||||||
|
|
||||||
|
- **Frontend/Backend**: Next.js 15+ (App Router, React Server Components, Server Actions).
|
||||||
|
- **Styling**: Tailwind CSS & Vanilla CSS (modernes Dark-Theme).
|
||||||
|
- **Datenbank & Auth**: Supabase (PostgreSQL, Row Level Security - RLS, Supabase Auth).
|
||||||
|
- **E-Mail-Versand**: SMTP-Integration für automatisierte Bestätigungen.
|
||||||
|
- **PDF-Generierung**: `@react-pdf/renderer` zur Erzeugung von Anfragebestätigungen als PDF.
|
||||||
|
- **Storage**: Supabase Storage (`invoices` Bucket) zur Archivierung der PDF-Dokumente.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Datenmodell & Beziehungen (Schema)
|
||||||
|
|
||||||
|
Das Datenbankschema besteht aus folgenden Tabellen im Schema `public`:
|
||||||
|
|
||||||
|
### `companies` (Unternehmen)
|
||||||
|
- Repräsentiert die Partner-Unternehmen (Retailer).
|
||||||
|
- `id` (UUID, Primary Key)
|
||||||
|
- `name` (TEXT)
|
||||||
|
- `street`, `zip`, `city`, `email` (Adressdaten)
|
||||||
|
|
||||||
|
### `users` (Systembenutzer)
|
||||||
|
- Erweitert die Authentifizierungsdaten aus `auth.users`.
|
||||||
|
- `id` (UUID, References `auth.users(id)`)
|
||||||
|
- `role` (TEXT, standardmäßig `'partner'`, oder `'admin'`)
|
||||||
|
- `company_id` (UUID, References `public.companies(id)`)
|
||||||
|
|
||||||
|
### `profiles` (Benutzerprofile)
|
||||||
|
- Stammdaten der einzelnen Benutzer (Ansprechpartner).
|
||||||
|
- `id` (UUID, References `auth.users(id)`)
|
||||||
|
- `first_name`, `last_name`, `email` etc.
|
||||||
|
|
||||||
|
### `end_customers` (Endkunden)
|
||||||
|
- Die Endkunden, für die die Partner Lizenzen bestellen.
|
||||||
|
- `id` (UUID, Primary Key)
|
||||||
|
- `partner_id` (UUID, References `public.companies(id)`) <-- *Direkte Zuordnung zur Firma des Partners*
|
||||||
|
- `company_name` (TEXT)
|
||||||
|
- `first_name`, `last_name`, `street`, `zip`, `city`, `email` (Stammdaten)
|
||||||
|
- `bank_iban`, `bank_bic`, `bank_name`, `bank_owner` (Bankdaten)
|
||||||
|
- `is_anonymized` (BOOLEAN) <-- *Für DSGVO-Löschung*
|
||||||
|
|
||||||
|
### `products` (Katalogprodukte)
|
||||||
|
- Hauptlösungen (z.B. Basic-Kasse, Backoffice).
|
||||||
|
- `id`, `name`, `base_price`, `tax_rate`, `billing_interval` (`one_time` / `monthly`).
|
||||||
|
- `requirements` (UUID[] von anderen Produkten)
|
||||||
|
- `exclusions` (UUID[] von inkompatiblen Produkten)
|
||||||
|
|
||||||
|
### `product_modules` (Zusatzmodule)
|
||||||
|
- Optionale Erweiterungen für Produkte.
|
||||||
|
- `id`, `product_id` (References `products`), `name`, `price`, `has_quantity` (BOOLEAN).
|
||||||
|
- `requirements` (UUID[] von Modulen)
|
||||||
|
- `exclusions` (UUID[] von Modulen)
|
||||||
|
|
||||||
|
### `orders` (Bestellungen / Anfragen)
|
||||||
|
- Gespeicherte Snapshots von Konfigurationen.
|
||||||
|
- `id` (UUID, Primary Key)
|
||||||
|
- `user_id` (UUID, References `auth.users(id)`) <-- *Ersteller der Bestellung*
|
||||||
|
- `order_number` (TEXT, Format: `AE-YYYY-NNNNN`)
|
||||||
|
- `order_hash` (TEXT, Idempotenz-Guard gegen Doppelübermittlung)
|
||||||
|
- `end_customer_id` (UUID, References `end_customers(id)`)
|
||||||
|
- `total_price` (DECIMAL)
|
||||||
|
- `customer_data` (JSONB) <-- *Eingefrorener Snapshot des Endkunden*
|
||||||
|
- `order_data` (JSONB) <-- *Eingefrorener Snapshot der Produktkonfiguration*
|
||||||
|
- `pdf_url` (TEXT, Link zur PDF-Rechnung im Storage)
|
||||||
|
- `status` (TEXT: `'pending'`, `'active'`, `'completed'`, `'cancelled'`)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Kernprozesse
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
graph TD
|
||||||
|
A[Partner loggt sich ein] --> B{Firma zugewiesen?}
|
||||||
|
B -- Nein --> C[Fehlermeldung: Kein Zutritt zum Wizard]
|
||||||
|
B -- Ja --> D[Wizard öffnen / Konfigurieren]
|
||||||
|
D --> E[Endkunden auswählen/anlegen]
|
||||||
|
E --> F[Produkte & Module wählen]
|
||||||
|
F --> G{Validierung erfolgreich?}
|
||||||
|
G -- Nein --> H[Validierungsfehler anzeigen]
|
||||||
|
G -- Ja --> I[Bestellung absenden]
|
||||||
|
I --> J[Snapshot einfrieren & in DB speichern]
|
||||||
|
J --> K[Rechnungs-PDF generieren & in Storage laden]
|
||||||
|
K --> L[E-Mail mit PDF an Partner senden]
|
||||||
|
L --> M[Bestellung in der Übersicht anzeigen]
|
||||||
|
```
|
||||||
|
|
||||||
|
### A. Partner- & Unternehmens-Hierarchie
|
||||||
|
1. Ein neu registrierter User hat die Rolle `partner` und ist zunächst keiner Firma zugeordnet.
|
||||||
|
2. Der Administrator ordnet den User in der Admin-Oberfläche (`/admin/users`) einem Unternehmen (`companies`) zu.
|
||||||
|
3. Nur wenn der User einer Firma zugewiesen ist (oder Admin ist), kann er Endkunden anlegen und Bestellungen aufgeben.
|
||||||
|
|
||||||
|
### B. Endkunden-Verwaltung (`/my-customers`)
|
||||||
|
- **Firmenweite Sicht**: Da `end_customers.partner_id` auf `companies.id` verweist, sehen alle Mitarbeiter desselben Unternehmens dieselben Endkunden.
|
||||||
|
- **DSGVO Anonymisierung**: Endkunden können unwiderruflich anonymisiert werden. Dabei werden sensible Daten mit `[GELÖSCHT]` überschrieben und `is_anonymized` auf `true` gesetzt. In existierenden Bestellungen (`orders.customer_data`) bleiben die Daten zu steuerlichen Zwecken unverändert.
|
||||||
|
|
||||||
|
### C. Bestell-Wizard & Validierung (`/order`)
|
||||||
|
- **Kategorie-Pflichten**: Wenn eine Produktkategorie als `is_required` definiert ist, muss ein Produkt ausgewählt werden.
|
||||||
|
- **Abhängigkeiten (Requirements)**: Ein Modul oder Produkt kann andere Module/Produkte voraussetzen (z.B. Modul B erfordert Modul A). Das System prüft dies client- und serverseitig.
|
||||||
|
- **Ausschlüsse (Exclusions)**: Inkompatible Produkte oder Module blockieren sich gegenseitig.
|
||||||
|
- **Snapshot-Architektur**: Sobald eine Bestellung aufgegeben wird, werden die Kundendaten (`CustomerSnapshot`) und Produktkonfigurationen (`OrderSnapshot` samt Preisen und Modulversionen) in `orders` als JSONB-Snapshots eingefroren. Preisänderungen im Katalog haben keinen Einfluss auf bestehende Bestellungen.
|
||||||
|
|
||||||
|
### D. Bestellungs-Verwaltung & Statusübergang
|
||||||
|
- **Sichtbarkeit**: Partner sehen in `/my-orders` alle Bestellungen aller Mitarbeiter ihrer Firma.
|
||||||
|
- **Bearbeiten**: Unvollständige Bestellungen (`status != 'completed'`) können von jedem Mitarbeiter der jeweiligen Firma nachträglich editiert werden.
|
||||||
|
- **Admin-Workflow**: Admins sehen in `/admin/orders` alle Bestellungen global, können den Status ändern (z.B. von *Eingegangen* auf *In Bearbeitung* oder *Abgeschlossen*) und PDF-Rechnungen manuell herunterladen.
|
||||||
|
- **Statusänderungs-Mails**: Bei jedem Statusübergang wird automatisch eine Benachrichtigungs-E-Mail an den Besteller geschickt.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Sicherheitskonzept (RLS - Row Level Security)
|
||||||
|
|
||||||
|
RLS ist auf Datenbankebene in Postgres implementiert und erzwingt Datenisolierung:
|
||||||
|
|
||||||
|
- **Unternehmen (`companies`)**: Authentifizierte Benutzer dürfen nur die Unternehmen lesen.
|
||||||
|
- **Endkunden (`end_customers`)**:
|
||||||
|
- `USING (partner_id = (SELECT company_id FROM public.users WHERE id = auth.uid()))`
|
||||||
|
- Partner sehen und modifizieren nur Endkunden, deren `partner_id` mit der `company_id` des angemeldeten Benutzers übereinstimmt.
|
||||||
|
- **Bestellungen (`orders`)**:
|
||||||
|
- `USING (company_id = (SELECT company_id FROM public.users WHERE id = auth.uid()))`
|
||||||
|
- Partner sehen und modifizieren nur Bestellungen, die ihrer Company zugewiesen sind (sie müssen einer Company zugeordnet sein).
|
||||||
|
- Jede Bestellung wird bei der Erstellung automatisch der Company des Erstellers zugewiesen.
|
||||||
|
- Admins haben uneingeschränkten Zugriff und können Bestellungen nachträglich anderen Companies zuweisen.
|
||||||
|
- **Lizenzen (`licenses`)**:
|
||||||
|
- Partner sehen nur Lizenzen von Endkunden, die ihrer Company zugeordnet sind.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Kommentarbereich
|
||||||
|
*Bitte nutze diesen Bereich oder füge Zeilenkommentare hinzu, um Änderungen oder Ergänzungen vorzuschlagen.*
|
||||||
|
|
||||||
|
- **Kommentar 1**:
|
||||||
|
- **Kommentar 2**:
|
||||||
19
.brain/adr-log.md
Normal file
19
.brain/adr-log.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Architecture Decision Records (ADR) Log
|
||||||
|
|
||||||
|
## ADR-001: RLS-Policies und Schema-Fix
|
||||||
|
- **Status**: Accepted
|
||||||
|
- **Date**: 2026-07-06
|
||||||
|
- **Context**: RLS-Sicherheitsprüfung ergab Sicherheitsrisiken und einen Syntaxfehler durch den Verweis auf die nicht existierende Tabelle `public.partners`.
|
||||||
|
- **Decision**:
|
||||||
|
- Die ungültige RLS-Policy auf `public.partners` wurde entfernt.
|
||||||
|
- `public.companies` wird stattdessen korrekt durch `Admin manage companies` geschützt.
|
||||||
|
- **Consequences**: Behebt Migrations-Fehler im Staging-Server, CI/CD-Pipeline baut wieder fehlerfrei.
|
||||||
|
|
||||||
|
## ADR-002: Entfernung ungenutzter Lizenztabellen
|
||||||
|
- **Status**: Accepted
|
||||||
|
- **Date**: 2026-07-06
|
||||||
|
- **Context**: Die Tabellen `pos_modules` und `licenses` wurden von einem alten bzw. externen Service genutzt. Im aktuellen Webshop-Frontend werden sie nicht benötigt und führen zu unnötiger RLS- und Integritäts-Komplexität.
|
||||||
|
- **Decision**:
|
||||||
|
- Erstellen einer SQL-Migration zum Löschen (`DROP`) von `licenses` und `pos_modules`.
|
||||||
|
- Anpassung der Integritätsprüfungs-Funktionen `check_database_integrity` und `repair_database_schema` zur Entfernung dieser Relationen.
|
||||||
|
- **Consequences**: Schlankere Datenbankstruktur, RLS-Komplexität verringert und sauberere Codebasis.
|
||||||
4
.brain/index.md
Normal file
4
.brain/index.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Second Brain Wiki
|
||||||
|
|
||||||
|
- [Supabase Schema](file:///c:/source/webshop/.brain/supabase-schema.md)
|
||||||
|
- [ADR Log](file:///c:/source/webshop/.brain/adr-log.md)
|
||||||
48
.brain/supabase-schema.md
Normal file
48
.brain/supabase-schema.md
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
# Supabase Schema
|
||||||
|
|
||||||
|
## `companies` (Unternehmen)
|
||||||
|
- Repräsentiert die Partner-Unternehmen (Retailer).
|
||||||
|
- `id` (UUID, Primary Key)
|
||||||
|
- `name` (TEXT)
|
||||||
|
- `street`, `zip`, `city`, `email` (Adressdaten)
|
||||||
|
|
||||||
|
## `users` (Systembenutzer)
|
||||||
|
- Erweitert die Authentifizierungsdaten aus `auth.users`.
|
||||||
|
- `id` (UUID, References `auth.users(id)`)
|
||||||
|
- `role` (TEXT, standardmäßig `'partner'`, oder `'admin'`)
|
||||||
|
- `company_id` (UUID, References `public.companies(id)`)
|
||||||
|
|
||||||
|
## `profiles` (Benutzerprofile)
|
||||||
|
- Stammdaten der einzelnen Benutzer.
|
||||||
|
- `id` (UUID, References `auth.users(id)`)
|
||||||
|
- `first_name`, `last_name`, `email` etc.
|
||||||
|
|
||||||
|
## `end_customers` (Endkunden)
|
||||||
|
- `id` (UUID, Primary Key)
|
||||||
|
- `partner_id` (UUID, References `public.companies(id)`)
|
||||||
|
- `company_name` (TEXT)
|
||||||
|
- `first_name`, `last_name`, `street`, `zip`, `city`, `email`
|
||||||
|
- `bank_iban`, `bank_bic`, `bank_name`, `bank_owner`
|
||||||
|
- `is_anonymized` (BOOLEAN)
|
||||||
|
|
||||||
|
## `products` (Katalogprodukte)
|
||||||
|
- `id`, `name`, `base_price`, `tax_rate`, `billing_interval` (`one_time` / `monthly`).
|
||||||
|
- `requirements` (UUID[])
|
||||||
|
- `exclusions` (UUID[])
|
||||||
|
|
||||||
|
## `product_modules` (Zusatzmodule)
|
||||||
|
- `id`, `product_id` (References `products`), `name`, `price`, `has_quantity` (BOOLEAN).
|
||||||
|
- `requirements` (UUID[])
|
||||||
|
- `exclusions` (UUID[])
|
||||||
|
|
||||||
|
## `orders` (Bestellungen / Anfragen)
|
||||||
|
- `id` (UUID, Primary Key)
|
||||||
|
- `user_id` (UUID, References `auth.users(id)`)
|
||||||
|
- `order_number` (TEXT)
|
||||||
|
- `order_hash` (TEXT)
|
||||||
|
- `end_customer_id` (UUID, References `end_customers(id)`)
|
||||||
|
- `total_price` (DECIMAL)
|
||||||
|
- `customer_data` (JSONB)
|
||||||
|
- `order_data` (JSONB)
|
||||||
|
- `pdf_url` (TEXT)
|
||||||
|
- `status` (TEXT)
|
||||||
18
.gitea/workflows/productive.yaml
Normal file
18
.gitea/workflows/productive.yaml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
name: Production Build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- productive
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: webserver
|
||||||
|
steps:
|
||||||
|
- name: Code auschecken
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Abhängigkeiten installieren
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Production-Build generieren
|
||||||
|
run: npm run build
|
||||||
65
.gitea/workflows/staging.yaml
Normal file
65
.gitea/workflows/staging.yaml
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
name: Staging Build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- staging
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: webserver
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: shop
|
||||||
|
steps:
|
||||||
|
- name: Code auschecken
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Abhängigkeiten installieren
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Staging-Build generieren
|
||||||
|
env:
|
||||||
|
NODE_ENV: production
|
||||||
|
# KORREKTUR: Wir brennen die interne Docker-Netzwerk-URL fest ein!
|
||||||
|
NEXT_PUBLIC_SUPABASE_URL: http://supabase-kong:8000
|
||||||
|
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.STAGING_SUPABASE_ANON_KEY }}
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Docker login to Gitea registry
|
||||||
|
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login gitea.hephex.de -u "${{ secrets.REGISTRY_USER }}" --password-stdin
|
||||||
|
|
||||||
|
# KORREKTUR: Wir übergeben die INTERNE Docker-URL auch an das Docker-Image!
|
||||||
|
- name: Build Docker image
|
||||||
|
run: |
|
||||||
|
docker build \
|
||||||
|
--build-arg NEXT_PUBLIC_SUPABASE_URL="http://supabase-kong:8000" \
|
||||||
|
--build-arg NEXT_PUBLIC_SUPABASE_ANON_KEY="${{ secrets.STAGING_SUPABASE_ANON_KEY }}" \
|
||||||
|
-t gitea.hephex.de/daniel/webshop:staging -f Dockerfile .
|
||||||
|
working-directory: .
|
||||||
|
|
||||||
|
# KORREKTUR: Auch der Push wird vom Hauptordner aus gestartet
|
||||||
|
- name: Push Docker image
|
||||||
|
run: docker push gitea.hephex.de/daniel/webshop:staging
|
||||||
|
working-directory: .
|
||||||
|
|
||||||
|
- name: Clean up runner Docker cache
|
||||||
|
run: |
|
||||||
|
docker image prune -f
|
||||||
|
docker builder prune -f
|
||||||
|
working-directory: .
|
||||||
|
|
||||||
|
|
||||||
|
# KORREKTUR: IP-Adresse exakt auf Ihren Proxmox-Staging-Container eingestellt
|
||||||
|
- name: Deploy to Proxmox LXC via SSH
|
||||||
|
uses: appleboy/ssh-action@v0.1.5
|
||||||
|
with:
|
||||||
|
host: 192.168.178.132
|
||||||
|
username: ${{ secrets.PROXMOX_USER }}
|
||||||
|
key: ${{ secrets.PROXMOX_SSH_KEY }}
|
||||||
|
script: |
|
||||||
|
cd /opt/webshop/supabase/supabase-project
|
||||||
|
docker compose pull webshop
|
||||||
|
docker compose up -d webshop
|
||||||
|
docker image prune -f
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@ example_data/
|
|||||||
shop/Leitfaden
|
shop/Leitfaden
|
||||||
.gitignore
|
.gitignore
|
||||||
db-access.txt
|
db-access.txt
|
||||||
|
2026-06-25-ZAP-Report-.json
|
||||||
|
|||||||
52
Dockerfile
Normal file
52
Dockerfile
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Use a multi‑stage build for a Next.js app
|
||||||
|
|
||||||
|
# ---------- Builder stage ----------
|
||||||
|
FROM node:20-alpine AS builder
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install dependencies (use package lock when present)
|
||||||
|
COPY shop/package*.json ./
|
||||||
|
RUN npm ci --omit=dev
|
||||||
|
|
||||||
|
# Install nodemailer for email sending
|
||||||
|
RUN npm install nodemailer
|
||||||
|
|
||||||
|
# Copy the source code
|
||||||
|
COPY shop/ .
|
||||||
|
|
||||||
|
ARG NEXT_PUBLIC_SUPABASE_URL
|
||||||
|
ARG NEXT_PUBLIC_SUPABASE_ANON_KEY
|
||||||
|
ENV NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL
|
||||||
|
ENV NEXT_PUBLIC_SUPABASE_ANON_KEY=$NEXT_PUBLIC_SUPABASE_ANON_KEY
|
||||||
|
# Build the production output
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# ---------- Runtime stage ----------
|
||||||
|
FROM node:20-alpine AS runner
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Statische Assets kopieren (wichtig für die Chunks/404-Fehler von vorhin)
|
||||||
|
COPY --from=builder /app/public* ./public
|
||||||
|
COPY --from=builder /app/.next/static ./.next/static
|
||||||
|
|
||||||
|
# Den fertigen Standalone-Server kopieren
|
||||||
|
COPY --from=builder /app/.next/standalone ./
|
||||||
|
COPY --from=builder /app/node_modules ./node_modules
|
||||||
|
COPY --from=builder /app/supabase ./supabase
|
||||||
|
COPY --from=builder /app/migrate.js ./migrate.js
|
||||||
|
|
||||||
|
# Pass Supabase variables to runtime image
|
||||||
|
ARG NEXT_PUBLIC_SUPABASE_URL
|
||||||
|
ARG NEXT_PUBLIC_SUPABASE_ANON_KEY
|
||||||
|
ENV NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL
|
||||||
|
ENV NEXT_PUBLIC_SUPABASE_ANON_KEY=$NEXT_PUBLIC_SUPABASE_ANON_KEY
|
||||||
|
ENV IS_DOCKER=true
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
ENV PORT=3000
|
||||||
|
ENV HOSTNAME="0.0.0.0"
|
||||||
|
|
||||||
|
CMD ["sh", "-c", "node migrate.js && node server.js"]
|
||||||
BIN
build-artifact.zip
Normal file
BIN
build-artifact.zip
Normal file
Binary file not shown.
1
build_temp/.next/BUILD_ID
Normal file
1
build_temp/.next/BUILD_ID
Normal file
@@ -0,0 +1 @@
|
|||||||
|
czEjVggXDRFH51IopN6_9
|
||||||
28
build_temp/.next/app-path-routes-manifest.json
Normal file
28
build_temp/.next/app-path-routes-manifest.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"/_global-error/page": "/_global-error",
|
||||||
|
"/_not-found/page": "/_not-found",
|
||||||
|
"/admin/categories/page": "/admin/categories",
|
||||||
|
"/admin/orders/page": "/admin/orders",
|
||||||
|
"/admin/page": "/admin",
|
||||||
|
"/admin/products/page": "/admin/products",
|
||||||
|
"/admin/users/page": "/admin/users",
|
||||||
|
"/api/admin/recent-orders/route": "/api/admin/recent-orders",
|
||||||
|
"/auth/confirm/route": "/auth/confirm",
|
||||||
|
"/auth/error/page": "/auth/error",
|
||||||
|
"/auth/forgot-password/page": "/auth/forgot-password",
|
||||||
|
"/auth/login/page": "/auth/login",
|
||||||
|
"/auth/sign-up-success/page": "/auth/sign-up-success",
|
||||||
|
"/auth/sign-up/page": "/auth/sign-up",
|
||||||
|
"/auth/update-password/page": "/auth/update-password",
|
||||||
|
"/favicon.ico/route": "/favicon.ico",
|
||||||
|
"/my-customers/[id]/page": "/my-customers/[id]",
|
||||||
|
"/my-customers/new/page": "/my-customers/new",
|
||||||
|
"/my-customers/page": "/my-customers",
|
||||||
|
"/my-orders/page": "/my-orders",
|
||||||
|
"/opengraph-image.png/route": "/opengraph-image.png",
|
||||||
|
"/order/page": "/order",
|
||||||
|
"/order/success/page": "/order/success",
|
||||||
|
"/page": "/",
|
||||||
|
"/protected/page": "/protected",
|
||||||
|
"/twitter-image.png/route": "/twitter-image.png"
|
||||||
|
}
|
||||||
23
build_temp/.next/build-manifest.json
Normal file
23
build_temp/.next/build-manifest.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"pages": {
|
||||||
|
"/_app": []
|
||||||
|
},
|
||||||
|
"devFiles": [],
|
||||||
|
"polyfillFiles": [
|
||||||
|
"static/chunks/03~yq9q893hmn.js"
|
||||||
|
],
|
||||||
|
"lowPriorityFiles": [
|
||||||
|
"static/czEjVggXDRFH51IopN6_9/_buildManifest.js",
|
||||||
|
"static/czEjVggXDRFH51IopN6_9/_ssgManifest.js",
|
||||||
|
"static/czEjVggXDRFH51IopN6_9/_clientMiddlewareManifest.js"
|
||||||
|
],
|
||||||
|
"rootMainFiles": [
|
||||||
|
"static/chunks/0ze4gu236oq96.js",
|
||||||
|
"static/chunks/10qd__0r7a~.l.js",
|
||||||
|
"static/chunks/0-gaanm6h49z~.js",
|
||||||
|
"static/chunks/06c8h6921f-oo.js",
|
||||||
|
"static/chunks/15jasrm2107sy.js",
|
||||||
|
"static/chunks/181uojwh.t2ik.js",
|
||||||
|
"static/chunks/turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
}
|
||||||
207
build_temp/.next/build/chunks/[root-of-the-server]__0d-m0h0._.js
Normal file
207
build_temp/.next/build/chunks/[root-of-the-server]__0d-m0h0._.js
Normal file
@@ -0,0 +1,207 @@
|
|||||||
|
module.exports = [
|
||||||
|
"[externals]/path [external] (path, cjs)", ((__turbopack_context__, module, exports) => {
|
||||||
|
|
||||||
|
const mod = __turbopack_context__.x("path", () => require("path"));
|
||||||
|
|
||||||
|
module.exports = mod;
|
||||||
|
}),
|
||||||
|
"[externals]/url [external] (url, cjs)", ((__turbopack_context__, module, exports) => {
|
||||||
|
|
||||||
|
const mod = __turbopack_context__.x("url", () => require("url"));
|
||||||
|
|
||||||
|
module.exports = mod;
|
||||||
|
}),
|
||||||
|
"[externals]/fs [external] (fs, cjs)", ((__turbopack_context__, module, exports) => {
|
||||||
|
|
||||||
|
const mod = __turbopack_context__.x("fs", () => require("fs"));
|
||||||
|
|
||||||
|
module.exports = mod;
|
||||||
|
}),
|
||||||
|
"[project]/postcss.config.mjs [postcss] (ecmascript)", ((__turbopack_context__) => {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
__turbopack_context__.s([
|
||||||
|
"default",
|
||||||
|
()=>__TURBOPACK__default__export__
|
||||||
|
]);
|
||||||
|
/** @type {import('postcss-load-config').Config} */ const config = {
|
||||||
|
plugins: {
|
||||||
|
tailwindcss: {},
|
||||||
|
autoprefixer: {}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const __TURBOPACK__default__export__ = config;
|
||||||
|
}),
|
||||||
|
"[turbopack-node]/transforms/transforms.ts [postcss] (ecmascript)", ((__turbopack_context__) => {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shared utilities for our 2 transform implementations.
|
||||||
|
*/ __turbopack_context__.s([
|
||||||
|
"fromPath",
|
||||||
|
()=>fromPath,
|
||||||
|
"getReadEnvVariables",
|
||||||
|
()=>getReadEnvVariables,
|
||||||
|
"toPath",
|
||||||
|
()=>toPath
|
||||||
|
]);
|
||||||
|
var __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/path [external] (path, cjs)");
|
||||||
|
;
|
||||||
|
const contextDir = process.cwd();
|
||||||
|
const toPath = (file)=>{
|
||||||
|
const relPath = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["relative"])(contextDir, file);
|
||||||
|
if ((0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["isAbsolute"])(relPath)) {
|
||||||
|
throw new Error(`Cannot depend on path (${file}) outside of root directory (${contextDir})`);
|
||||||
|
}
|
||||||
|
return __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"] !== '/' ? relPath.replaceAll(__TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"], '/') : relPath;
|
||||||
|
};
|
||||||
|
const fromPath = (path)=>{
|
||||||
|
return (0, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["join"])(/* turbopackIgnore: true */ contextDir, __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"] !== '/' ? path.replaceAll('/', __TURBOPACK__imported__module__$5b$externals$5d2f$path__$5b$external$5d$__$28$path$2c$__cjs$29$__["sep"]) : path);
|
||||||
|
};
|
||||||
|
// Patch process.env to track which env vars are read
|
||||||
|
const originalEnv = process.env;
|
||||||
|
const readEnvVars = new Set();
|
||||||
|
process.env = new Proxy(originalEnv, {
|
||||||
|
get (target, prop) {
|
||||||
|
if (typeof prop === 'string') {
|
||||||
|
// We register the env var as dependency on the
|
||||||
|
// current transform and all future transforms
|
||||||
|
// since the env var might be cached in module scope
|
||||||
|
// and influence them all
|
||||||
|
readEnvVars.add(prop);
|
||||||
|
}
|
||||||
|
return Reflect.get(target, prop);
|
||||||
|
},
|
||||||
|
set (target, prop, value) {
|
||||||
|
return Reflect.set(target, prop, value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function getReadEnvVariables() {
|
||||||
|
return Array.from(readEnvVars);
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
"[turbopack-node]/transforms/postcss.ts { CONFIG => \"[project]/postcss.config.mjs [postcss] (ecmascript)\" } [postcss] (ecmascript)", ((__turbopack_context__) => {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
__turbopack_context__.s([
|
||||||
|
"default",
|
||||||
|
()=>transform,
|
||||||
|
"init",
|
||||||
|
()=>init
|
||||||
|
]);
|
||||||
|
// @ts-ignore
|
||||||
|
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$mjs__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/postcss/lib/postcss.mjs [postcss] (ecmascript)");
|
||||||
|
// @ts-ignore
|
||||||
|
var __TURBOPACK__imported__module__$5b$project$5d2f$postcss$2e$config$2e$mjs__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/postcss.config.mjs [postcss] (ecmascript)");
|
||||||
|
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/transforms/transforms.ts [postcss] (ecmascript)");
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
let processor;
|
||||||
|
const init = async (ipc)=>{
|
||||||
|
let config = __TURBOPACK__imported__module__$5b$project$5d2f$postcss$2e$config$2e$mjs__$5b$postcss$5d$__$28$ecmascript$29$__["default"];
|
||||||
|
if (typeof config === 'function') {
|
||||||
|
config = await config({
|
||||||
|
env: 'development'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (typeof config === 'undefined') {
|
||||||
|
throw new Error('PostCSS config is undefined (make sure to export an function or object from config file)');
|
||||||
|
}
|
||||||
|
let plugins;
|
||||||
|
if (Array.isArray(config.plugins)) {
|
||||||
|
plugins = config.plugins.map((plugin)=>{
|
||||||
|
if (Array.isArray(plugin)) {
|
||||||
|
return plugin;
|
||||||
|
} else if (typeof plugin === 'string') {
|
||||||
|
return [
|
||||||
|
plugin,
|
||||||
|
{}
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
return plugin;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (typeof config.plugins === 'object') {
|
||||||
|
plugins = Object.entries(config.plugins).filter(([, options])=>options);
|
||||||
|
} else {
|
||||||
|
plugins = [];
|
||||||
|
}
|
||||||
|
const loadedPlugins = plugins.map((plugin)=>{
|
||||||
|
if (Array.isArray(plugin)) {
|
||||||
|
const [arg, options] = plugin;
|
||||||
|
let pluginFactory = arg;
|
||||||
|
if (typeof pluginFactory === 'string') {
|
||||||
|
pluginFactory = require(/* turbopackIgnore: true */ pluginFactory);
|
||||||
|
}
|
||||||
|
if (pluginFactory.default) {
|
||||||
|
pluginFactory = pluginFactory.default;
|
||||||
|
}
|
||||||
|
return pluginFactory(options);
|
||||||
|
}
|
||||||
|
return plugin;
|
||||||
|
});
|
||||||
|
processor = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$postcss$2f$lib$2f$postcss$2e$mjs__$5b$postcss$5d$__$28$ecmascript$29$__["default"])(loadedPlugins);
|
||||||
|
};
|
||||||
|
async function transform(ipc, cssContent, name, sourceMap) {
|
||||||
|
const { css, map, messages } = await processor.process(cssContent, {
|
||||||
|
from: name,
|
||||||
|
to: name,
|
||||||
|
map: sourceMap ? {
|
||||||
|
inline: false,
|
||||||
|
annotation: false
|
||||||
|
} : undefined
|
||||||
|
});
|
||||||
|
const assets = [];
|
||||||
|
const filePaths = [];
|
||||||
|
const buildFilePaths = [];
|
||||||
|
const directories = [];
|
||||||
|
for (const msg of messages){
|
||||||
|
switch(msg.type){
|
||||||
|
case 'asset':
|
||||||
|
assets.push({
|
||||||
|
file: msg.file,
|
||||||
|
content: msg.content,
|
||||||
|
sourceMap: !sourceMap ? undefined : typeof msg.sourceMap === 'string' ? msg.sourceMap : JSON.stringify(msg.sourceMap)
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'dependency':
|
||||||
|
case 'missing-dependency':
|
||||||
|
filePaths.push((0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["toPath"])(msg.file));
|
||||||
|
break;
|
||||||
|
case 'build-dependency':
|
||||||
|
buildFilePaths.push((0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["toPath"])(msg.file));
|
||||||
|
break;
|
||||||
|
case 'dir-dependency':
|
||||||
|
directories.push([
|
||||||
|
(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["toPath"])(msg.dir),
|
||||||
|
msg.glob
|
||||||
|
]);
|
||||||
|
break;
|
||||||
|
case 'context-dependency':
|
||||||
|
directories.push([
|
||||||
|
(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["toPath"])(msg.dir),
|
||||||
|
'**'
|
||||||
|
]);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ipc.sendInfo({
|
||||||
|
type: 'dependencies',
|
||||||
|
filePaths,
|
||||||
|
directories,
|
||||||
|
buildFilePaths,
|
||||||
|
envVariables: (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$transforms$2f$transforms$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["getReadEnvVariables"])()
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
css,
|
||||||
|
map: sourceMap ? JSON.stringify(map) : undefined,
|
||||||
|
assets
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
|
||||||
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0d-m0h0._.js.map
|
||||||
File diff suppressed because one or more lines are too long
500
build_temp/.next/build/chunks/[root-of-the-server]__0ubbtyl._.js
Normal file
500
build_temp/.next/build/chunks/[root-of-the-server]__0ubbtyl._.js
Normal file
@@ -0,0 +1,500 @@
|
|||||||
|
module.exports = [
|
||||||
|
"[turbopack-node]/child_process/globals.ts [postcss] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
process.turbopack = {};
|
||||||
|
}),
|
||||||
|
"[externals]/node:net [external] (node:net, cjs)", ((__turbopack_context__, module, exports) => {
|
||||||
|
|
||||||
|
const mod = __turbopack_context__.x("node:net", () => require("node:net"));
|
||||||
|
|
||||||
|
module.exports = mod;
|
||||||
|
}),
|
||||||
|
"[externals]/node:stream [external] (node:stream, cjs)", ((__turbopack_context__, module, exports) => {
|
||||||
|
|
||||||
|
const mod = __turbopack_context__.x("node:stream", () => require("node:stream"));
|
||||||
|
|
||||||
|
module.exports = mod;
|
||||||
|
}),
|
||||||
|
"[turbopack-node]/compiled/stacktrace-parser/index.js [postcss] (ecmascript)", ((__turbopack_context__) => {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
__turbopack_context__.s([
|
||||||
|
"parse",
|
||||||
|
()=>parse
|
||||||
|
]);
|
||||||
|
if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = ("TURBOPACK compile-time value", "/ROOT/compiled/stacktrace-parser") + "/";
|
||||||
|
var n = "<unknown>";
|
||||||
|
function parse(e) {
|
||||||
|
var r = e.split("\n");
|
||||||
|
return r.reduce(function(e, r) {
|
||||||
|
var n = parseChrome(r) || parseWinjs(r) || parseGecko(r) || parseNode(r) || parseJSC(r);
|
||||||
|
if (n) {
|
||||||
|
e.push(n);
|
||||||
|
}
|
||||||
|
return e;
|
||||||
|
}, []);
|
||||||
|
}
|
||||||
|
var a = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;
|
||||||
|
var l = /\((\S*)(?::(\d+))(?::(\d+))\)/;
|
||||||
|
function parseChrome(e) {
|
||||||
|
var r = a.exec(e);
|
||||||
|
if (!r) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
var u = r[2] && r[2].indexOf("native") === 0;
|
||||||
|
var t = r[2] && r[2].indexOf("eval") === 0;
|
||||||
|
var i = l.exec(r[2]);
|
||||||
|
if (t && i != null) {
|
||||||
|
r[2] = i[1];
|
||||||
|
r[3] = i[2];
|
||||||
|
r[4] = i[3];
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
file: !u ? r[2] : null,
|
||||||
|
methodName: r[1] || n,
|
||||||
|
arguments: u ? [
|
||||||
|
r[2]
|
||||||
|
] : [],
|
||||||
|
lineNumber: r[3] ? +r[3] : null,
|
||||||
|
column: r[4] ? +r[4] : null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var u = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
|
||||||
|
function parseWinjs(e) {
|
||||||
|
var r = u.exec(e);
|
||||||
|
if (!r) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
file: r[2],
|
||||||
|
methodName: r[1] || n,
|
||||||
|
arguments: [],
|
||||||
|
lineNumber: +r[3],
|
||||||
|
column: r[4] ? +r[4] : null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var t = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i;
|
||||||
|
var i = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
|
||||||
|
function parseGecko(e) {
|
||||||
|
var r = t.exec(e);
|
||||||
|
if (!r) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
var a = r[3] && r[3].indexOf(" > eval") > -1;
|
||||||
|
var l = i.exec(r[3]);
|
||||||
|
if (a && l != null) {
|
||||||
|
r[3] = l[1];
|
||||||
|
r[4] = l[2];
|
||||||
|
r[5] = null;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
file: r[3],
|
||||||
|
methodName: r[1] || n,
|
||||||
|
arguments: r[2] ? r[2].split(",") : [],
|
||||||
|
lineNumber: r[4] ? +r[4] : null,
|
||||||
|
column: r[5] ? +r[5] : null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var s = /^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;
|
||||||
|
function parseJSC(e) {
|
||||||
|
var r = s.exec(e);
|
||||||
|
if (!r) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
file: r[3],
|
||||||
|
methodName: r[1] || n,
|
||||||
|
arguments: [],
|
||||||
|
lineNumber: +r[4],
|
||||||
|
column: r[5] ? +r[5] : null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var o = /^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;
|
||||||
|
function parseNode(e) {
|
||||||
|
var r = o.exec(e);
|
||||||
|
if (!r) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
file: r[2],
|
||||||
|
methodName: r[1] || n,
|
||||||
|
arguments: [],
|
||||||
|
lineNumber: +r[3],
|
||||||
|
column: r[4] ? +r[4] : null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
"[turbopack-node]/error.ts [postcss] (ecmascript)", ((__turbopack_context__) => {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
__turbopack_context__.s([
|
||||||
|
"default",
|
||||||
|
()=>isError,
|
||||||
|
"getProperError",
|
||||||
|
()=>getProperError,
|
||||||
|
"structuredError",
|
||||||
|
()=>structuredError
|
||||||
|
]);
|
||||||
|
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$compiled$2f$stacktrace$2d$parser$2f$index$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/compiled/stacktrace-parser/index.js [postcss] (ecmascript)");
|
||||||
|
;
|
||||||
|
function isError(err) {
|
||||||
|
return typeof err === 'object' && err !== null && 'name' in err && 'message' in err;
|
||||||
|
}
|
||||||
|
function getProperError(err) {
|
||||||
|
if (isError(err)) {
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable
|
||||||
|
;
|
||||||
|
return new Error(isPlainObject(err) ? JSON.stringify(err) : err + '');
|
||||||
|
}
|
||||||
|
function getObjectClassLabel(value) {
|
||||||
|
return Object.prototype.toString.call(value);
|
||||||
|
}
|
||||||
|
function isPlainObject(value) {
|
||||||
|
if (getObjectClassLabel(value) !== '[object Object]') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const prototype = Object.getPrototypeOf(value);
|
||||||
|
/**
|
||||||
|
* this used to be previously:
|
||||||
|
*
|
||||||
|
* `return prototype === null || prototype === Object.prototype`
|
||||||
|
*
|
||||||
|
* but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.
|
||||||
|
*
|
||||||
|
* It was changed to the current implementation since it's resilient to serialization.
|
||||||
|
*/ return prototype === null || prototype.hasOwnProperty('isPrototypeOf');
|
||||||
|
}
|
||||||
|
function structuredError(e) {
|
||||||
|
e = getProperError(e);
|
||||||
|
return {
|
||||||
|
name: e.name,
|
||||||
|
message: e.message,
|
||||||
|
stack: typeof e.stack === 'string' ? (0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$compiled$2f$stacktrace$2d$parser$2f$index$2e$js__$5b$postcss$5d$__$28$ecmascript$29$__["parse"])(e.stack) : [],
|
||||||
|
cause: e.cause ? structuredError(getProperError(e.cause)) : undefined
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
"[turbopack-node]/child_process/index.ts [postcss] (ecmascript)", ((__turbopack_context__) => {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
__turbopack_context__.s([
|
||||||
|
"IPC",
|
||||||
|
()=>IPC
|
||||||
|
]);
|
||||||
|
var __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$net__$5b$external$5d$__$28$node$3a$net$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/node:net [external] (node:net, cjs)");
|
||||||
|
var __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$stream__$5b$external$5d$__$28$node$3a$stream$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/node:stream [external] (node:stream, cjs)");
|
||||||
|
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$error$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/error.ts [postcss] (ecmascript)");
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
function createIpc(port) {
|
||||||
|
const socket = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$net__$5b$external$5d$__$28$node$3a$net$2c$__cjs$29$__["createConnection"])({
|
||||||
|
port,
|
||||||
|
host: '127.0.0.1'
|
||||||
|
});
|
||||||
|
/**
|
||||||
|
* A writable stream that writes to the socket.
|
||||||
|
* We don't write directly to the socket because we need to
|
||||||
|
* handle backpressure and wait for the socket to be drained
|
||||||
|
* before writing more data.
|
||||||
|
*/ const socketWritable = new __TURBOPACK__imported__module__$5b$externals$5d2f$node$3a$stream__$5b$external$5d$__$28$node$3a$stream$2c$__cjs$29$__["Writable"]({
|
||||||
|
write (chunk, _enc, cb) {
|
||||||
|
if (socket.write(chunk)) {
|
||||||
|
cb();
|
||||||
|
} else {
|
||||||
|
socket.once('drain', cb);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
final (cb) {
|
||||||
|
socket.end(cb);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const packetQueue = [];
|
||||||
|
const recvPromiseResolveQueue = [];
|
||||||
|
function pushPacket(packet) {
|
||||||
|
const recvPromiseResolve = recvPromiseResolveQueue.shift();
|
||||||
|
if (recvPromiseResolve != null) {
|
||||||
|
recvPromiseResolve(JSON.parse(packet.toString('utf8')));
|
||||||
|
} else {
|
||||||
|
packetQueue.push(packet);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let state = {
|
||||||
|
type: 'waiting'
|
||||||
|
};
|
||||||
|
let buffer = Buffer.alloc(0);
|
||||||
|
socket.once('connect', ()=>{
|
||||||
|
socket.setNoDelay(true);
|
||||||
|
socket.on('data', (chunk)=>{
|
||||||
|
buffer = Buffer.concat([
|
||||||
|
buffer,
|
||||||
|
chunk
|
||||||
|
]);
|
||||||
|
loop: while(true){
|
||||||
|
switch(state.type){
|
||||||
|
case 'waiting':
|
||||||
|
{
|
||||||
|
if (buffer.length >= 4) {
|
||||||
|
const length = buffer.readUInt32BE(0);
|
||||||
|
buffer = buffer.subarray(4);
|
||||||
|
state = {
|
||||||
|
type: 'packet',
|
||||||
|
length
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
break loop;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'packet':
|
||||||
|
{
|
||||||
|
if (buffer.length >= state.length) {
|
||||||
|
const packet = buffer.subarray(0, state.length);
|
||||||
|
buffer = buffer.subarray(state.length);
|
||||||
|
state = {
|
||||||
|
type: 'waiting'
|
||||||
|
};
|
||||||
|
pushPacket(packet);
|
||||||
|
} else {
|
||||||
|
break loop;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
invariant(state, (state)=>`Unknown state type: ${state?.type}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
// When the socket is closed, this process is no longer needed.
|
||||||
|
// This might happen e. g. when parent process is killed or
|
||||||
|
// node.js pool is garbage collected.
|
||||||
|
socket.once('close', ()=>{
|
||||||
|
process.exit(0);
|
||||||
|
});
|
||||||
|
// TODO(lukesandberg): some of the messages being sent are very large and contain lots
|
||||||
|
// of redundant information. Consider adding gzip compression to our stream.
|
||||||
|
function doSend(message) {
|
||||||
|
return new Promise((resolve, reject)=>{
|
||||||
|
// Reserve 4 bytes for our length prefix, we will over-write after encoding.
|
||||||
|
const packet = Buffer.from('0000' + message, 'utf8');
|
||||||
|
packet.writeUInt32BE(packet.length - 4, 0);
|
||||||
|
socketWritable.write(packet, (err)=>{
|
||||||
|
process.stderr.write(`TURBOPACK_OUTPUT_D\n`);
|
||||||
|
process.stdout.write(`TURBOPACK_OUTPUT_D\n`);
|
||||||
|
if (err != null) {
|
||||||
|
reject(err);
|
||||||
|
} else {
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function send(message) {
|
||||||
|
return doSend(JSON.stringify(message));
|
||||||
|
}
|
||||||
|
function sendReady() {
|
||||||
|
return doSend('');
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
async recv () {
|
||||||
|
const packet = packetQueue.shift();
|
||||||
|
if (packet != null) {
|
||||||
|
return JSON.parse(packet.toString('utf8'));
|
||||||
|
}
|
||||||
|
const result = await new Promise((resolve)=>{
|
||||||
|
recvPromiseResolveQueue.push((result)=>{
|
||||||
|
resolve(result);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
send (message) {
|
||||||
|
return send(message);
|
||||||
|
},
|
||||||
|
sendReady,
|
||||||
|
async sendError (error) {
|
||||||
|
let failed = false;
|
||||||
|
try {
|
||||||
|
await send({
|
||||||
|
type: 'error',
|
||||||
|
...(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$error$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["structuredError"])(error)
|
||||||
|
});
|
||||||
|
} catch (err) {
|
||||||
|
// There's nothing we can do about errors that happen after this point, we can't tell anyone
|
||||||
|
// about them.
|
||||||
|
console.error('failed to send error back to rust:', err);
|
||||||
|
failed = true;
|
||||||
|
}
|
||||||
|
await new Promise((res)=>socket.end(()=>res()));
|
||||||
|
process.exit(failed ? 1 : 0);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
const PORT = process.argv[2];
|
||||||
|
const IPC = createIpc(parseInt(PORT, 10));
|
||||||
|
process.on('uncaughtException', (err)=>{
|
||||||
|
IPC.sendError(err);
|
||||||
|
});
|
||||||
|
process.on('unhandledRejection', (reason)=>{
|
||||||
|
IPC.sendError(reason instanceof Error ? reason : new Error(String(reason)));
|
||||||
|
});
|
||||||
|
const improveConsole = (name, stream, addStack)=>{
|
||||||
|
// @ts-ignore
|
||||||
|
const original = console[name];
|
||||||
|
// @ts-ignore
|
||||||
|
const stdio = process[stream];
|
||||||
|
// @ts-ignore
|
||||||
|
console[name] = (...args)=>{
|
||||||
|
stdio.write(`TURBOPACK_OUTPUT_B\n`);
|
||||||
|
original(...args);
|
||||||
|
if (addStack) {
|
||||||
|
const stack = new Error().stack?.replace(/^.+\n.+\n/, '') + '\n';
|
||||||
|
stdio.write('TURBOPACK_OUTPUT_S\n');
|
||||||
|
stdio.write(stack);
|
||||||
|
}
|
||||||
|
stdio.write('TURBOPACK_OUTPUT_E\n');
|
||||||
|
};
|
||||||
|
};
|
||||||
|
improveConsole('error', 'stderr', true);
|
||||||
|
improveConsole('warn', 'stderr', true);
|
||||||
|
improveConsole('count', 'stdout', true);
|
||||||
|
improveConsole('trace', 'stderr', false);
|
||||||
|
improveConsole('log', 'stdout', true);
|
||||||
|
improveConsole('group', 'stdout', true);
|
||||||
|
improveConsole('groupCollapsed', 'stdout', true);
|
||||||
|
improveConsole('table', 'stdout', true);
|
||||||
|
improveConsole('debug', 'stdout', true);
|
||||||
|
improveConsole('info', 'stdout', true);
|
||||||
|
improveConsole('dir', 'stdout', true);
|
||||||
|
improveConsole('dirxml', 'stdout', true);
|
||||||
|
improveConsole('timeEnd', 'stdout', true);
|
||||||
|
improveConsole('timeLog', 'stdout', true);
|
||||||
|
improveConsole('timeStamp', 'stdout', true);
|
||||||
|
improveConsole('assert', 'stderr', true);
|
||||||
|
/**
|
||||||
|
* Utility function to ensure all variants of an enum are handled.
|
||||||
|
*/ function invariant(never, computeMessage) {
|
||||||
|
throw new Error(`Invariant: ${computeMessage(never)}`);
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
"[turbopack-node]/child_process/evaluate.ts [postcss] (ecmascript)", ((__turbopack_context__) => {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
__turbopack_context__.s([
|
||||||
|
"run",
|
||||||
|
()=>run
|
||||||
|
]);
|
||||||
|
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$index$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/child_process/index.ts [postcss] (ecmascript)");
|
||||||
|
;
|
||||||
|
const ipc = __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$index$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["IPC"];
|
||||||
|
const queue = [];
|
||||||
|
const run = async (moduleFactory)=>{
|
||||||
|
let nextId = 1;
|
||||||
|
const requests = new Map();
|
||||||
|
const internalIpc = {
|
||||||
|
sendInfo: (message)=>ipc.send({
|
||||||
|
type: 'info',
|
||||||
|
data: message
|
||||||
|
}),
|
||||||
|
sendRequest: (message)=>{
|
||||||
|
const id = nextId++;
|
||||||
|
let resolve, reject;
|
||||||
|
const promise = new Promise((res, rej)=>{
|
||||||
|
resolve = res;
|
||||||
|
reject = rej;
|
||||||
|
});
|
||||||
|
requests.set(id, {
|
||||||
|
resolve,
|
||||||
|
reject
|
||||||
|
});
|
||||||
|
return ipc.send({
|
||||||
|
type: 'request',
|
||||||
|
id,
|
||||||
|
data: message
|
||||||
|
}).then(()=>promise);
|
||||||
|
},
|
||||||
|
sendError: (error)=>{
|
||||||
|
return ipc.sendError(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// Initialize module and send ready message
|
||||||
|
let getValue;
|
||||||
|
try {
|
||||||
|
const module = await moduleFactory();
|
||||||
|
if (typeof module.init === 'function') {
|
||||||
|
await module.init();
|
||||||
|
}
|
||||||
|
getValue = module.default;
|
||||||
|
await ipc.sendReady();
|
||||||
|
} catch (err) {
|
||||||
|
await ipc.sendReady();
|
||||||
|
await ipc.sendError(err);
|
||||||
|
}
|
||||||
|
// Queue handling
|
||||||
|
let isRunning = false;
|
||||||
|
const run = async ()=>{
|
||||||
|
while(queue.length > 0){
|
||||||
|
const args = queue.shift();
|
||||||
|
try {
|
||||||
|
const value = await getValue(internalIpc, ...args);
|
||||||
|
await ipc.send({
|
||||||
|
type: 'end',
|
||||||
|
data: value === undefined ? undefined : JSON.stringify(value, null, 2),
|
||||||
|
duration: 0
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
await ipc.sendError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
isRunning = false;
|
||||||
|
};
|
||||||
|
// Communication handling
|
||||||
|
while(true){
|
||||||
|
const msg = await ipc.recv();
|
||||||
|
switch(msg.type){
|
||||||
|
case 'evaluate':
|
||||||
|
{
|
||||||
|
queue.push(msg.args);
|
||||||
|
if (!isRunning) {
|
||||||
|
isRunning = true;
|
||||||
|
run();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'result':
|
||||||
|
{
|
||||||
|
const request = requests.get(msg.id);
|
||||||
|
if (request) {
|
||||||
|
requests.delete(msg.id);
|
||||||
|
if (msg.error) {
|
||||||
|
request.reject(new Error(msg.error));
|
||||||
|
} else {
|
||||||
|
request.resolve(msg.data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
console.error('unexpected message type', msg.type);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
"[turbopack-node]/child_process/evaluate.ts/evaluate.js { INNER => \"[turbopack-node]/transforms/postcss.ts { CONFIG => \\\"[project]/postcss.config.mjs [postcss] (ecmascript)\\\" } [postcss] (ecmascript)\", RUNTIME => \"[turbopack-node]/child_process/evaluate.ts [postcss] (ecmascript)\" } [postcss] (ecmascript)", ((__turbopack_context__) => {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
__turbopack_context__.s([]);
|
||||||
|
var __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$evaluate$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[turbopack-node]/child_process/evaluate.ts [postcss] (ecmascript)");
|
||||||
|
;
|
||||||
|
(0, __TURBOPACK__imported__module__$5b$turbopack$2d$node$5d2f$child_process$2f$evaluate$2e$ts__$5b$postcss$5d$__$28$ecmascript$29$__["run"])(()=>__turbopack_context__.A('[turbopack-node]/transforms/postcss.ts { CONFIG => "[project]/postcss.config.mjs [postcss] (ecmascript)" } [postcss] (ecmascript, async loader)'));
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
|
||||||
|
//# sourceMappingURL=%5Broot-of-the-server%5D__0ubbtyl._.js.map
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,13 @@
|
|||||||
|
module.exports = [
|
||||||
|
"[turbopack-node]/transforms/postcss.ts { CONFIG => \"[project]/postcss.config.mjs [postcss] (ecmascript)\" } [postcss] (ecmascript, async loader)", ((__turbopack_context__) => {
|
||||||
|
|
||||||
|
__turbopack_context__.v((parentImport) => {
|
||||||
|
return Promise.all([
|
||||||
|
"chunks/node_modules_13sb.px._.js",
|
||||||
|
"chunks/[root-of-the-server]__0d-m0h0._.js"
|
||||||
|
].map((chunk) => __turbopack_context__.l(chunk))).then(() => {
|
||||||
|
return parentImport("[turbopack-node]/transforms/postcss.ts { CONFIG => \"[project]/postcss.config.mjs [postcss] (ecmascript)\" } [postcss] (ecmascript)");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
];
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": [],
|
||||||
|
"sections": []
|
||||||
|
}
|
||||||
890
build_temp/.next/build/chunks/[turbopack]_runtime.js
Normal file
890
build_temp/.next/build/chunks/[turbopack]_runtime.js
Normal file
@@ -0,0 +1,890 @@
|
|||||||
|
const RUNTIME_PUBLIC_PATH = "chunks/[turbopack]_runtime.js";
|
||||||
|
const RELATIVE_ROOT_PATH = "..";
|
||||||
|
const ASSET_PREFIX = "/";
|
||||||
|
const WORKER_FORWARDED_GLOBALS = [];
|
||||||
|
/**
|
||||||
|
* This file contains runtime types and functions that are shared between all
|
||||||
|
* TurboPack ECMAScript runtimes.
|
||||||
|
*
|
||||||
|
* It will be prepended to the runtime code of each runtime.
|
||||||
|
*/ /* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="./runtime-types.d.ts" />
|
||||||
|
/**
|
||||||
|
* Describes why a module was instantiated.
|
||||||
|
* Shared between browser and Node.js runtimes.
|
||||||
|
*/ var SourceType = /*#__PURE__*/ function(SourceType) {
|
||||||
|
/**
|
||||||
|
* The module was instantiated because it was included in an evaluated chunk's
|
||||||
|
* runtime.
|
||||||
|
* SourceData is a ChunkPath.
|
||||||
|
*/ SourceType[SourceType["Runtime"] = 0] = "Runtime";
|
||||||
|
/**
|
||||||
|
* The module was instantiated because a parent module imported it.
|
||||||
|
* SourceData is a ModuleId.
|
||||||
|
*/ SourceType[SourceType["Parent"] = 1] = "Parent";
|
||||||
|
/**
|
||||||
|
* The module was instantiated because it was included in a chunk's hot module
|
||||||
|
* update.
|
||||||
|
* SourceData is an array of ModuleIds or undefined.
|
||||||
|
*/ SourceType[SourceType["Update"] = 2] = "Update";
|
||||||
|
return SourceType;
|
||||||
|
}(SourceType || {});
|
||||||
|
/**
|
||||||
|
* Flag indicating which module object type to create when a module is merged. Set to `true`
|
||||||
|
* by each runtime that uses ModuleWithDirection (browser dev-base.ts, nodejs dev-base.ts,
|
||||||
|
* nodejs build-base.ts). Browser production (build-base.ts) leaves it as `false` since it
|
||||||
|
* uses plain Module objects.
|
||||||
|
*/ let createModuleWithDirectionFlag = false;
|
||||||
|
const REEXPORTED_OBJECTS = new WeakMap();
|
||||||
|
/**
|
||||||
|
* Constructs the `__turbopack_context__` object for a module.
|
||||||
|
*/ function Context(module, exports) {
|
||||||
|
this.m = module;
|
||||||
|
// We need to store this here instead of accessing it from the module object to:
|
||||||
|
// 1. Make it available to factories directly, since we rewrite `this` to
|
||||||
|
// `__turbopack_context__.e` in CJS modules.
|
||||||
|
// 2. Support async modules which rewrite `module.exports` to a promise, so we
|
||||||
|
// can still access the original exports object from functions like
|
||||||
|
// `esmExport`
|
||||||
|
// Ideally we could find a new approach for async modules and drop this property altogether.
|
||||||
|
this.e = exports;
|
||||||
|
}
|
||||||
|
const contextPrototype = Context.prototype;
|
||||||
|
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||||
|
const toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag;
|
||||||
|
function defineProp(obj, name, options) {
|
||||||
|
if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options);
|
||||||
|
}
|
||||||
|
function getOverwrittenModule(moduleCache, id) {
|
||||||
|
let module = moduleCache[id];
|
||||||
|
if (!module) {
|
||||||
|
if (createModuleWithDirectionFlag) {
|
||||||
|
// set in development modes for hmr support
|
||||||
|
module = createModuleWithDirection(id);
|
||||||
|
} else {
|
||||||
|
module = createModuleObject(id);
|
||||||
|
}
|
||||||
|
moduleCache[id] = module;
|
||||||
|
}
|
||||||
|
return module;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Creates the module object. Only done here to ensure all module objects have the same shape.
|
||||||
|
*/ function createModuleObject(id) {
|
||||||
|
return {
|
||||||
|
exports: {},
|
||||||
|
error: undefined,
|
||||||
|
id,
|
||||||
|
namespaceObject: undefined
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function createModuleWithDirection(id) {
|
||||||
|
return {
|
||||||
|
exports: {},
|
||||||
|
error: undefined,
|
||||||
|
id,
|
||||||
|
namespaceObject: undefined,
|
||||||
|
parents: [],
|
||||||
|
children: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
const BindingTag_Value = 0;
|
||||||
|
/**
|
||||||
|
* Adds the getters to the exports object.
|
||||||
|
*/ function esm(exports, bindings) {
|
||||||
|
defineProp(exports, '__esModule', {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
if (toStringTag) defineProp(exports, toStringTag, {
|
||||||
|
value: 'Module'
|
||||||
|
});
|
||||||
|
let i = 0;
|
||||||
|
while(i < bindings.length){
|
||||||
|
const propName = bindings[i++];
|
||||||
|
const tagOrFunction = bindings[i++];
|
||||||
|
if (typeof tagOrFunction === 'number') {
|
||||||
|
if (tagOrFunction === BindingTag_Value) {
|
||||||
|
defineProp(exports, propName, {
|
||||||
|
value: bindings[i++],
|
||||||
|
enumerable: true,
|
||||||
|
writable: false
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
throw new Error(`unexpected tag: ${tagOrFunction}`);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const getterFn = tagOrFunction;
|
||||||
|
if (typeof bindings[i] === 'function') {
|
||||||
|
const setterFn = bindings[i++];
|
||||||
|
defineProp(exports, propName, {
|
||||||
|
get: getterFn,
|
||||||
|
set: setterFn,
|
||||||
|
enumerable: true
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
defineProp(exports, propName, {
|
||||||
|
get: getterFn,
|
||||||
|
enumerable: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Object.seal(exports);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Makes the module an ESM with exports
|
||||||
|
*/ function esmExport(bindings, id) {
|
||||||
|
let module;
|
||||||
|
let exports;
|
||||||
|
if (id != null) {
|
||||||
|
module = getOverwrittenModule(this.c, id);
|
||||||
|
exports = module.exports;
|
||||||
|
} else {
|
||||||
|
module = this.m;
|
||||||
|
exports = this.e;
|
||||||
|
}
|
||||||
|
module.namespaceObject = exports;
|
||||||
|
esm(exports, bindings);
|
||||||
|
}
|
||||||
|
contextPrototype.s = esmExport;
|
||||||
|
function ensureDynamicExports(module, exports) {
|
||||||
|
let reexportedObjects = REEXPORTED_OBJECTS.get(module);
|
||||||
|
if (!reexportedObjects) {
|
||||||
|
REEXPORTED_OBJECTS.set(module, reexportedObjects = []);
|
||||||
|
module.exports = module.namespaceObject = new Proxy(exports, {
|
||||||
|
get (target, prop) {
|
||||||
|
if (hasOwnProperty.call(target, prop) || prop === 'default' || prop === '__esModule') {
|
||||||
|
return Reflect.get(target, prop);
|
||||||
|
}
|
||||||
|
for (const obj of reexportedObjects){
|
||||||
|
const value = Reflect.get(obj, prop);
|
||||||
|
if (value !== undefined) return value;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
},
|
||||||
|
ownKeys (target) {
|
||||||
|
const keys = Reflect.ownKeys(target);
|
||||||
|
for (const obj of reexportedObjects){
|
||||||
|
for (const key of Reflect.ownKeys(obj)){
|
||||||
|
if (key !== 'default' && !keys.includes(key)) keys.push(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return keys;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return reexportedObjects;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Dynamically exports properties from an object
|
||||||
|
*/ function dynamicExport(object, id) {
|
||||||
|
let module;
|
||||||
|
let exports;
|
||||||
|
if (id != null) {
|
||||||
|
module = getOverwrittenModule(this.c, id);
|
||||||
|
exports = module.exports;
|
||||||
|
} else {
|
||||||
|
module = this.m;
|
||||||
|
exports = this.e;
|
||||||
|
}
|
||||||
|
const reexportedObjects = ensureDynamicExports(module, exports);
|
||||||
|
if (typeof object === 'object' && object !== null) {
|
||||||
|
reexportedObjects.push(object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contextPrototype.j = dynamicExport;
|
||||||
|
function exportValue(value, id) {
|
||||||
|
let module;
|
||||||
|
if (id != null) {
|
||||||
|
module = getOverwrittenModule(this.c, id);
|
||||||
|
} else {
|
||||||
|
module = this.m;
|
||||||
|
}
|
||||||
|
module.exports = value;
|
||||||
|
}
|
||||||
|
contextPrototype.v = exportValue;
|
||||||
|
function exportNamespace(namespace, id) {
|
||||||
|
let module;
|
||||||
|
if (id != null) {
|
||||||
|
module = getOverwrittenModule(this.c, id);
|
||||||
|
} else {
|
||||||
|
module = this.m;
|
||||||
|
}
|
||||||
|
module.exports = module.namespaceObject = namespace;
|
||||||
|
}
|
||||||
|
contextPrototype.n = exportNamespace;
|
||||||
|
function createGetter(obj, key) {
|
||||||
|
return ()=>obj[key];
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @returns prototype of the object
|
||||||
|
*/ const getProto = Object.getPrototypeOf ? (obj)=>Object.getPrototypeOf(obj) : (obj)=>obj.__proto__;
|
||||||
|
/** Prototypes that are not expanded for exports */ const LEAF_PROTOTYPES = [
|
||||||
|
null,
|
||||||
|
getProto({}),
|
||||||
|
getProto([]),
|
||||||
|
getProto(getProto)
|
||||||
|
];
|
||||||
|
/**
|
||||||
|
* @param raw
|
||||||
|
* @param ns
|
||||||
|
* @param allowExportDefault
|
||||||
|
* * `false`: will have the raw module as default export
|
||||||
|
* * `true`: will have the default property as default export
|
||||||
|
*/ function interopEsm(raw, ns, allowExportDefault) {
|
||||||
|
const bindings = [];
|
||||||
|
let defaultLocation = -1;
|
||||||
|
for(let current = raw; (typeof current === 'object' || typeof current === 'function') && !LEAF_PROTOTYPES.includes(current); current = getProto(current)){
|
||||||
|
for (const key of Object.getOwnPropertyNames(current)){
|
||||||
|
bindings.push(key, createGetter(raw, key));
|
||||||
|
if (defaultLocation === -1 && key === 'default') {
|
||||||
|
defaultLocation = bindings.length - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// this is not really correct
|
||||||
|
// we should set the `default` getter if the imported module is a `.cjs file`
|
||||||
|
if (!(allowExportDefault && defaultLocation >= 0)) {
|
||||||
|
// Replace the binding with one for the namespace itself in order to preserve iteration order.
|
||||||
|
if (defaultLocation >= 0) {
|
||||||
|
// Replace the getter with the value
|
||||||
|
bindings.splice(defaultLocation, 1, BindingTag_Value, raw);
|
||||||
|
} else {
|
||||||
|
bindings.push('default', BindingTag_Value, raw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
esm(ns, bindings);
|
||||||
|
return ns;
|
||||||
|
}
|
||||||
|
function createNS(raw) {
|
||||||
|
if (typeof raw === 'function') {
|
||||||
|
return function(...args) {
|
||||||
|
return raw.apply(this, args);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return Object.create(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function esmImport(id) {
|
||||||
|
const module = getOrInstantiateModuleFromParent(id, this.m);
|
||||||
|
// any ES module has to have `module.namespaceObject` defined.
|
||||||
|
if (module.namespaceObject) return module.namespaceObject;
|
||||||
|
// only ESM can be an async module, so we don't need to worry about exports being a promise here.
|
||||||
|
const raw = module.exports;
|
||||||
|
return module.namespaceObject = interopEsm(raw, createNS(raw), raw && raw.__esModule);
|
||||||
|
}
|
||||||
|
contextPrototype.i = esmImport;
|
||||||
|
function asyncLoader(moduleId) {
|
||||||
|
const loader = this.r(moduleId);
|
||||||
|
return loader(esmImport.bind(this));
|
||||||
|
}
|
||||||
|
contextPrototype.A = asyncLoader;
|
||||||
|
// Add a simple runtime require so that environments without one can still pass
|
||||||
|
// `typeof require` CommonJS checks so that exports are correctly registered.
|
||||||
|
const runtimeRequire = // @ts-ignore
|
||||||
|
typeof require === 'function' ? require : function require1() {
|
||||||
|
throw new Error('Unexpected use of runtime require');
|
||||||
|
};
|
||||||
|
contextPrototype.t = runtimeRequire;
|
||||||
|
function commonJsRequire(id) {
|
||||||
|
return getOrInstantiateModuleFromParent(id, this.m).exports;
|
||||||
|
}
|
||||||
|
contextPrototype.r = commonJsRequire;
|
||||||
|
/**
|
||||||
|
* Remove fragments and query parameters since they are never part of the context map keys
|
||||||
|
*
|
||||||
|
* This matches how we parse patterns at resolving time. Arguably we should only do this for
|
||||||
|
* strings passed to `import` but the resolve does it for `import` and `require` and so we do
|
||||||
|
* here as well.
|
||||||
|
*/ function parseRequest(request) {
|
||||||
|
// Per the URI spec fragments can contain `?` characters, so we should trim it off first
|
||||||
|
// https://datatracker.ietf.org/doc/html/rfc3986#section-3.5
|
||||||
|
const hashIndex = request.indexOf('#');
|
||||||
|
if (hashIndex !== -1) {
|
||||||
|
request = request.substring(0, hashIndex);
|
||||||
|
}
|
||||||
|
const queryIndex = request.indexOf('?');
|
||||||
|
if (queryIndex !== -1) {
|
||||||
|
request = request.substring(0, queryIndex);
|
||||||
|
}
|
||||||
|
return request;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* `require.context` and require/import expression runtime.
|
||||||
|
*/ function moduleContext(map) {
|
||||||
|
function moduleContext(id) {
|
||||||
|
id = parseRequest(id);
|
||||||
|
if (hasOwnProperty.call(map, id)) {
|
||||||
|
return map[id].module();
|
||||||
|
}
|
||||||
|
const e = new Error(`Cannot find module '${id}'`);
|
||||||
|
e.code = 'MODULE_NOT_FOUND';
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
moduleContext.keys = ()=>{
|
||||||
|
return Object.keys(map);
|
||||||
|
};
|
||||||
|
moduleContext.resolve = (id)=>{
|
||||||
|
id = parseRequest(id);
|
||||||
|
if (hasOwnProperty.call(map, id)) {
|
||||||
|
return map[id].id();
|
||||||
|
}
|
||||||
|
const e = new Error(`Cannot find module '${id}'`);
|
||||||
|
e.code = 'MODULE_NOT_FOUND';
|
||||||
|
throw e;
|
||||||
|
};
|
||||||
|
moduleContext.import = async (id)=>{
|
||||||
|
return await moduleContext(id);
|
||||||
|
};
|
||||||
|
return moduleContext;
|
||||||
|
}
|
||||||
|
contextPrototype.f = moduleContext;
|
||||||
|
/**
|
||||||
|
* Returns the path of a chunk defined by its data.
|
||||||
|
*/ function getChunkPath(chunkData) {
|
||||||
|
return typeof chunkData === 'string' ? chunkData : chunkData.path;
|
||||||
|
}
|
||||||
|
function isPromise(maybePromise) {
|
||||||
|
return maybePromise != null && typeof maybePromise === 'object' && 'then' in maybePromise && typeof maybePromise.then === 'function';
|
||||||
|
}
|
||||||
|
function isAsyncModuleExt(obj) {
|
||||||
|
return turbopackQueues in obj;
|
||||||
|
}
|
||||||
|
function createPromise() {
|
||||||
|
let resolve;
|
||||||
|
let reject;
|
||||||
|
const promise = new Promise((res, rej)=>{
|
||||||
|
reject = rej;
|
||||||
|
resolve = res;
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
promise,
|
||||||
|
resolve: resolve,
|
||||||
|
reject: reject
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.
|
||||||
|
// The CompressedModuleFactories format is
|
||||||
|
// - 1 or more module ids
|
||||||
|
// - a module factory function
|
||||||
|
// So walking this is a little complex but the flat structure is also fast to
|
||||||
|
// traverse, we can use `typeof` operators to distinguish the two cases.
|
||||||
|
function installCompressedModuleFactories(chunkModules, offset, moduleFactories, newModuleId) {
|
||||||
|
let i = offset;
|
||||||
|
while(i < chunkModules.length){
|
||||||
|
let end = i + 1;
|
||||||
|
// Find our factory function
|
||||||
|
while(end < chunkModules.length && typeof chunkModules[end] !== 'function'){
|
||||||
|
end++;
|
||||||
|
}
|
||||||
|
if (end === chunkModules.length) {
|
||||||
|
throw new Error('malformed chunk format, expected a factory function');
|
||||||
|
}
|
||||||
|
// Install the factory for each module ID that doesn't already have one.
|
||||||
|
// When some IDs in this group already have a factory, reuse that existing
|
||||||
|
// group factory for the missing IDs to keep all IDs in the group consistent.
|
||||||
|
// Otherwise, install the factory from this chunk.
|
||||||
|
const moduleFactoryFn = chunkModules[end];
|
||||||
|
let existingGroupFactory = undefined;
|
||||||
|
for(let j = i; j < end; j++){
|
||||||
|
const id = chunkModules[j];
|
||||||
|
const existingFactory = moduleFactories.get(id);
|
||||||
|
if (existingFactory) {
|
||||||
|
existingGroupFactory = existingFactory;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const factoryToInstall = existingGroupFactory ?? moduleFactoryFn;
|
||||||
|
let didInstallFactory = false;
|
||||||
|
for(let j = i; j < end; j++){
|
||||||
|
const id = chunkModules[j];
|
||||||
|
if (!moduleFactories.has(id)) {
|
||||||
|
if (!didInstallFactory) {
|
||||||
|
if (factoryToInstall === moduleFactoryFn) {
|
||||||
|
applyModuleFactoryName(moduleFactoryFn);
|
||||||
|
}
|
||||||
|
didInstallFactory = true;
|
||||||
|
}
|
||||||
|
moduleFactories.set(id, factoryToInstall);
|
||||||
|
newModuleId?.(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i = end + 1; // end is pointing at the last factory advance to the next id or the end of the array.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// everything below is adapted from webpack
|
||||||
|
// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13
|
||||||
|
const turbopackQueues = Symbol('turbopack queues');
|
||||||
|
const turbopackExports = Symbol('turbopack exports');
|
||||||
|
const turbopackError = Symbol('turbopack error');
|
||||||
|
function resolveQueue(queue) {
|
||||||
|
if (queue && queue.status !== 1) {
|
||||||
|
queue.status = 1;
|
||||||
|
queue.forEach((fn)=>fn.queueCount--);
|
||||||
|
queue.forEach((fn)=>fn.queueCount-- ? fn.queueCount++ : fn());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function wrapDeps(deps) {
|
||||||
|
return deps.map((dep)=>{
|
||||||
|
if (dep !== null && typeof dep === 'object') {
|
||||||
|
if (isAsyncModuleExt(dep)) return dep;
|
||||||
|
if (isPromise(dep)) {
|
||||||
|
const queue = Object.assign([], {
|
||||||
|
status: 0
|
||||||
|
});
|
||||||
|
const obj = {
|
||||||
|
[turbopackExports]: {},
|
||||||
|
[turbopackQueues]: (fn)=>fn(queue)
|
||||||
|
};
|
||||||
|
dep.then((res)=>{
|
||||||
|
obj[turbopackExports] = res;
|
||||||
|
resolveQueue(queue);
|
||||||
|
}, (err)=>{
|
||||||
|
obj[turbopackError] = err;
|
||||||
|
resolveQueue(queue);
|
||||||
|
});
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
[turbopackExports]: dep,
|
||||||
|
[turbopackQueues]: ()=>{}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function asyncModule(body, hasAwait) {
|
||||||
|
const module = this.m;
|
||||||
|
const queue = hasAwait ? Object.assign([], {
|
||||||
|
status: -1
|
||||||
|
}) : undefined;
|
||||||
|
const depQueues = new Set();
|
||||||
|
const { resolve, reject, promise: rawPromise } = createPromise();
|
||||||
|
const promise = Object.assign(rawPromise, {
|
||||||
|
[turbopackExports]: module.exports,
|
||||||
|
[turbopackQueues]: (fn)=>{
|
||||||
|
queue && fn(queue);
|
||||||
|
depQueues.forEach(fn);
|
||||||
|
promise['catch'](()=>{});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const attributes = {
|
||||||
|
get () {
|
||||||
|
return promise;
|
||||||
|
},
|
||||||
|
set (v) {
|
||||||
|
// Calling `esmExport` leads to this.
|
||||||
|
if (v !== promise) {
|
||||||
|
promise[turbopackExports] = v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Object.defineProperty(module, 'exports', attributes);
|
||||||
|
Object.defineProperty(module, 'namespaceObject', attributes);
|
||||||
|
function handleAsyncDependencies(deps) {
|
||||||
|
const currentDeps = wrapDeps(deps);
|
||||||
|
const getResult = ()=>currentDeps.map((d)=>{
|
||||||
|
if (d[turbopackError]) throw d[turbopackError];
|
||||||
|
return d[turbopackExports];
|
||||||
|
});
|
||||||
|
const { promise, resolve } = createPromise();
|
||||||
|
const fn = Object.assign(()=>resolve(getResult), {
|
||||||
|
queueCount: 0
|
||||||
|
});
|
||||||
|
function fnQueue(q) {
|
||||||
|
if (q !== queue && !depQueues.has(q)) {
|
||||||
|
depQueues.add(q);
|
||||||
|
if (q && q.status === 0) {
|
||||||
|
fn.queueCount++;
|
||||||
|
q.push(fn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
currentDeps.map((dep)=>dep[turbopackQueues](fnQueue));
|
||||||
|
return fn.queueCount ? promise : getResult();
|
||||||
|
}
|
||||||
|
function asyncResult(err) {
|
||||||
|
if (err) {
|
||||||
|
reject(promise[turbopackError] = err);
|
||||||
|
} else {
|
||||||
|
resolve(promise[turbopackExports]);
|
||||||
|
}
|
||||||
|
resolveQueue(queue);
|
||||||
|
}
|
||||||
|
body(handleAsyncDependencies, asyncResult);
|
||||||
|
if (queue && queue.status === -1) {
|
||||||
|
queue.status = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contextPrototype.a = asyncModule;
|
||||||
|
/**
|
||||||
|
* A pseudo "fake" URL object to resolve to its relative path.
|
||||||
|
*
|
||||||
|
* When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this
|
||||||
|
* runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid
|
||||||
|
* hydration mismatch.
|
||||||
|
*
|
||||||
|
* This is based on webpack's existing implementation:
|
||||||
|
* https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js
|
||||||
|
*/ const relativeURL = function relativeURL(inputUrl) {
|
||||||
|
const realUrl = new URL(inputUrl, 'x:/');
|
||||||
|
const values = {};
|
||||||
|
for(const key in realUrl)values[key] = realUrl[key];
|
||||||
|
values.href = inputUrl;
|
||||||
|
values.pathname = inputUrl.replace(/[?#].*/, '');
|
||||||
|
values.origin = values.protocol = '';
|
||||||
|
values.toString = values.toJSON = (..._args)=>inputUrl;
|
||||||
|
for(const key in values)Object.defineProperty(this, key, {
|
||||||
|
enumerable: true,
|
||||||
|
configurable: true,
|
||||||
|
value: values[key]
|
||||||
|
});
|
||||||
|
};
|
||||||
|
relativeURL.prototype = URL.prototype;
|
||||||
|
contextPrototype.U = relativeURL;
|
||||||
|
/**
|
||||||
|
* Utility function to ensure all variants of an enum are handled.
|
||||||
|
*/ function invariant(never, computeMessage) {
|
||||||
|
throw new Error(`Invariant: ${computeMessage(never)}`);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Constructs an error message for when a module factory is not available.
|
||||||
|
*/ function factoryNotAvailableMessage(moduleId, sourceType, sourceData) {
|
||||||
|
let instantiationReason;
|
||||||
|
switch(sourceType){
|
||||||
|
case 0:
|
||||||
|
instantiationReason = `as a runtime entry of chunk ${sourceData}`;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
instantiationReason = `because it was required from module ${sourceData}`;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
instantiationReason = 'because of an HMR update';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
invariant(sourceType, (sourceType)=>`Unknown source type: ${sourceType}`);
|
||||||
|
}
|
||||||
|
return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A stub function to make `require` available but non-functional in ESM.
|
||||||
|
*/ function requireStub(_moduleId) {
|
||||||
|
throw new Error('dynamic usage of require is not supported');
|
||||||
|
}
|
||||||
|
contextPrototype.z = requireStub;
|
||||||
|
// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.
|
||||||
|
contextPrototype.g = globalThis;
|
||||||
|
function applyModuleFactoryName(factory) {
|
||||||
|
// Give the module factory a nice name to improve stack traces.
|
||||||
|
Object.defineProperty(factory, 'name', {
|
||||||
|
value: 'module evaluation'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/// <reference path="../shared/runtime/runtime-utils.ts" />
|
||||||
|
/// A 'base' utilities to support runtime can have externals.
|
||||||
|
/// Currently this is for node.js / edge runtime both.
|
||||||
|
/// If a fn requires node.js specific behavior, it should be placed in `node-external-utils` instead.
|
||||||
|
async function externalImport(id) {
|
||||||
|
let raw;
|
||||||
|
try {
|
||||||
|
raw = await import(id);
|
||||||
|
} catch (err) {
|
||||||
|
// TODO(alexkirsz) This can happen when a client-side module tries to load
|
||||||
|
// an external module we don't provide a shim for (e.g. querystring, url).
|
||||||
|
// For now, we fail semi-silently, but in the future this should be a
|
||||||
|
// compilation error.
|
||||||
|
throw new Error(`Failed to load external module ${id}: ${err}`);
|
||||||
|
}
|
||||||
|
if (raw && raw.__esModule && raw.default && 'default' in raw.default) {
|
||||||
|
return interopEsm(raw.default, createNS(raw), true);
|
||||||
|
}
|
||||||
|
return raw;
|
||||||
|
}
|
||||||
|
contextPrototype.y = externalImport;
|
||||||
|
function externalRequire(id, thunk, esm = false) {
|
||||||
|
let raw;
|
||||||
|
try {
|
||||||
|
raw = thunk();
|
||||||
|
} catch (err) {
|
||||||
|
// TODO(alexkirsz) This can happen when a client-side module tries to load
|
||||||
|
// an external module we don't provide a shim for (e.g. querystring, url).
|
||||||
|
// For now, we fail semi-silently, but in the future this should be a
|
||||||
|
// compilation error.
|
||||||
|
throw new Error(`Failed to load external module ${id}: ${err}`);
|
||||||
|
}
|
||||||
|
if (!esm || raw.__esModule) {
|
||||||
|
return raw;
|
||||||
|
}
|
||||||
|
return interopEsm(raw, createNS(raw), true);
|
||||||
|
}
|
||||||
|
externalRequire.resolve = (id, options)=>{
|
||||||
|
return require.resolve(id, options);
|
||||||
|
};
|
||||||
|
contextPrototype.x = externalRequire;
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars */ const path = require('path');
|
||||||
|
const relativePathToRuntimeRoot = path.relative(RUNTIME_PUBLIC_PATH, '.');
|
||||||
|
// Compute the relative path to the `distDir`.
|
||||||
|
const relativePathToDistRoot = path.join(relativePathToRuntimeRoot, RELATIVE_ROOT_PATH);
|
||||||
|
const RUNTIME_ROOT = path.resolve(__filename, relativePathToRuntimeRoot);
|
||||||
|
// Compute the absolute path to the root, by stripping distDir from the absolute path to this file.
|
||||||
|
const ABSOLUTE_ROOT = path.resolve(__filename, relativePathToDistRoot);
|
||||||
|
/**
|
||||||
|
* Returns an absolute path to the given module path.
|
||||||
|
* Module path should be relative, either path to a file or a directory.
|
||||||
|
*
|
||||||
|
* This fn allows to calculate an absolute path for some global static values, such as
|
||||||
|
* `__dirname` or `import.meta.url` that Turbopack will not embeds in compile time.
|
||||||
|
* See ImportMetaBinding::code_generation for the usage.
|
||||||
|
*/ function resolveAbsolutePath(modulePath) {
|
||||||
|
if (modulePath) {
|
||||||
|
return path.join(ABSOLUTE_ROOT, modulePath);
|
||||||
|
}
|
||||||
|
return ABSOLUTE_ROOT;
|
||||||
|
}
|
||||||
|
Context.prototype.P = resolveAbsolutePath;
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="../shared/runtime/runtime-utils.ts" />
|
||||||
|
function readWebAssemblyAsResponse(path) {
|
||||||
|
const { createReadStream } = require('fs');
|
||||||
|
const { Readable } = require('stream');
|
||||||
|
const stream = createReadStream(path);
|
||||||
|
// @ts-ignore unfortunately there's a slight type mismatch with the stream.
|
||||||
|
return new Response(Readable.toWeb(stream), {
|
||||||
|
headers: {
|
||||||
|
'content-type': 'application/wasm'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async function compileWebAssemblyFromPath(path) {
|
||||||
|
const response = readWebAssemblyAsResponse(path);
|
||||||
|
return await WebAssembly.compileStreaming(response);
|
||||||
|
}
|
||||||
|
async function instantiateWebAssemblyFromPath(path, importsObj) {
|
||||||
|
const response = readWebAssemblyAsResponse(path);
|
||||||
|
const { instance } = await WebAssembly.instantiateStreaming(response, importsObj);
|
||||||
|
return instance.exports;
|
||||||
|
}
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="../../shared/runtime/runtime-utils.ts" />
|
||||||
|
/// <reference path="../../shared-node/base-externals-utils.ts" />
|
||||||
|
/// <reference path="../../shared-node/node-externals-utils.ts" />
|
||||||
|
/// <reference path="../../shared-node/node-wasm-utils.ts" />
|
||||||
|
/// <reference path="./nodejs-globals.d.ts" />
|
||||||
|
/**
|
||||||
|
* Base Node.js runtime shared between production and development.
|
||||||
|
* Contains chunk loading, module caching, and other non-HMR functionality.
|
||||||
|
*/ process.env.TURBOPACK = '1';
|
||||||
|
const url = require('url');
|
||||||
|
const moduleFactories = new Map();
|
||||||
|
const moduleCache = Object.create(null);
|
||||||
|
/**
|
||||||
|
* Returns an absolute path to the given module's id.
|
||||||
|
*/ function resolvePathFromModule(moduleId) {
|
||||||
|
const exported = this.r(moduleId);
|
||||||
|
const exportedPath = exported?.default ?? exported;
|
||||||
|
if (typeof exportedPath !== 'string') {
|
||||||
|
return exported;
|
||||||
|
}
|
||||||
|
const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length);
|
||||||
|
const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix);
|
||||||
|
return url.pathToFileURL(resolved).href;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Exports a URL value. No suffix is added in Node.js runtime.
|
||||||
|
*/ function exportUrl(urlValue, id) {
|
||||||
|
exportValue.call(this, urlValue, id);
|
||||||
|
}
|
||||||
|
function loadRuntimeChunk(sourcePath, chunkData) {
|
||||||
|
if (typeof chunkData === 'string') {
|
||||||
|
loadRuntimeChunkPath(sourcePath, chunkData);
|
||||||
|
} else {
|
||||||
|
loadRuntimeChunkPath(sourcePath, chunkData.path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const loadedChunks = new Set();
|
||||||
|
const unsupportedLoadChunk = Promise.resolve(undefined);
|
||||||
|
const loadedChunk = Promise.resolve(undefined);
|
||||||
|
const chunkCache = new Map();
|
||||||
|
function clearChunkCache() {
|
||||||
|
chunkCache.clear();
|
||||||
|
loadedChunks.clear();
|
||||||
|
}
|
||||||
|
function loadRuntimeChunkPath(sourcePath, chunkPath) {
|
||||||
|
if (!isJs(chunkPath)) {
|
||||||
|
// We only support loading JS chunks in Node.js.
|
||||||
|
// This branch can be hit when trying to load a CSS chunk.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (loadedChunks.has(chunkPath)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
|
||||||
|
const chunkModules = require(resolved);
|
||||||
|
installCompressedModuleFactories(chunkModules, 0, moduleFactories);
|
||||||
|
loadedChunks.add(chunkPath);
|
||||||
|
} catch (cause) {
|
||||||
|
let errorMessage = `Failed to load chunk ${chunkPath}`;
|
||||||
|
if (sourcePath) {
|
||||||
|
errorMessage += ` from runtime for chunk ${sourcePath}`;
|
||||||
|
}
|
||||||
|
const error = new Error(errorMessage, {
|
||||||
|
cause
|
||||||
|
});
|
||||||
|
error.name = 'ChunkLoadError';
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function loadChunkAsync(chunkData) {
|
||||||
|
const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path;
|
||||||
|
if (!isJs(chunkPath)) {
|
||||||
|
// We only support loading JS chunks in Node.js.
|
||||||
|
// This branch can be hit when trying to load a CSS chunk.
|
||||||
|
return unsupportedLoadChunk;
|
||||||
|
}
|
||||||
|
let entry = chunkCache.get(chunkPath);
|
||||||
|
if (entry === undefined) {
|
||||||
|
try {
|
||||||
|
// resolve to an absolute path to simplify `require` handling
|
||||||
|
const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
|
||||||
|
// TODO: consider switching to `import()` to enable concurrent chunk loading and async file io
|
||||||
|
// However this is incompatible with hot reloading (since `import` doesn't use the require cache)
|
||||||
|
const chunkModules = require(resolved);
|
||||||
|
installCompressedModuleFactories(chunkModules, 0, moduleFactories);
|
||||||
|
entry = loadedChunk;
|
||||||
|
} catch (cause) {
|
||||||
|
const errorMessage = `Failed to load chunk ${chunkPath} from module ${this.m.id}`;
|
||||||
|
const error = new Error(errorMessage, {
|
||||||
|
cause
|
||||||
|
});
|
||||||
|
error.name = 'ChunkLoadError';
|
||||||
|
// Cache the failure promise, future requests will also get this same rejection
|
||||||
|
entry = Promise.reject(error);
|
||||||
|
}
|
||||||
|
chunkCache.set(chunkPath, entry);
|
||||||
|
}
|
||||||
|
// TODO: Return an instrumented Promise that React can use instead of relying on referential equality.
|
||||||
|
return entry;
|
||||||
|
}
|
||||||
|
contextPrototype.l = loadChunkAsync;
|
||||||
|
function loadChunkAsyncByUrl(chunkUrl) {
|
||||||
|
const path1 = url.fileURLToPath(new URL(chunkUrl, RUNTIME_ROOT));
|
||||||
|
return loadChunkAsync.call(this, path1);
|
||||||
|
}
|
||||||
|
contextPrototype.L = loadChunkAsyncByUrl;
|
||||||
|
function loadWebAssembly(chunkPath, _edgeModule, imports) {
|
||||||
|
const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
|
||||||
|
return instantiateWebAssemblyFromPath(resolved, imports);
|
||||||
|
}
|
||||||
|
contextPrototype.w = loadWebAssembly;
|
||||||
|
function loadWebAssemblyModule(chunkPath, _edgeModule) {
|
||||||
|
const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
|
||||||
|
return compileWebAssemblyFromPath(resolved);
|
||||||
|
}
|
||||||
|
contextPrototype.u = loadWebAssemblyModule;
|
||||||
|
/**
|
||||||
|
* Creates a Node.js worker thread by instantiating the given WorkerConstructor
|
||||||
|
* with the appropriate path and options, including forwarded globals.
|
||||||
|
*
|
||||||
|
* @param WorkerConstructor The Worker constructor from worker_threads
|
||||||
|
* @param workerPath Path to the worker entry chunk
|
||||||
|
* @param workerOptions options to pass to the Worker constructor (optional)
|
||||||
|
*/ function createWorker(WorkerConstructor, workerPath, workerOptions) {
|
||||||
|
// Build the forwarded globals object
|
||||||
|
const forwardedGlobals = {};
|
||||||
|
for (const name of WORKER_FORWARDED_GLOBALS){
|
||||||
|
forwardedGlobals[name] = globalThis[name];
|
||||||
|
}
|
||||||
|
// Merge workerData with forwarded globals
|
||||||
|
const existingWorkerData = workerOptions?.workerData || {};
|
||||||
|
const options = {
|
||||||
|
...workerOptions,
|
||||||
|
workerData: {
|
||||||
|
...typeof existingWorkerData === 'object' ? existingWorkerData : {},
|
||||||
|
__turbopack_globals__: forwardedGlobals
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return new WorkerConstructor(workerPath, options);
|
||||||
|
}
|
||||||
|
const regexJsUrl = /\.js(?:\?[^#]*)?(?:#.*)?$/;
|
||||||
|
/**
|
||||||
|
* Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.
|
||||||
|
*/ function isJs(chunkUrlOrPath) {
|
||||||
|
return regexJsUrl.test(chunkUrlOrPath);
|
||||||
|
}
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="./runtime-base.ts" />
|
||||||
|
/**
|
||||||
|
* Production Node.js runtime.
|
||||||
|
* Uses ModuleWithDirection and simple module instantiation without HMR support.
|
||||||
|
*/ // moduleCache and moduleFactories are declared in runtime-base.ts
|
||||||
|
// this is read in runtime-utils.ts so it creates a module with direction for hmr
|
||||||
|
createModuleWithDirectionFlag = true;
|
||||||
|
const nodeContextPrototype = Context.prototype;
|
||||||
|
nodeContextPrototype.q = exportUrl;
|
||||||
|
nodeContextPrototype.M = moduleFactories;
|
||||||
|
// Cast moduleCache to ModuleWithDirection for production mode
|
||||||
|
nodeContextPrototype.c = moduleCache;
|
||||||
|
nodeContextPrototype.R = resolvePathFromModule;
|
||||||
|
nodeContextPrototype.b = createWorker;
|
||||||
|
nodeContextPrototype.C = clearChunkCache;
|
||||||
|
function instantiateModule(id, sourceType, sourceData) {
|
||||||
|
const moduleFactory = moduleFactories.get(id);
|
||||||
|
if (typeof moduleFactory !== 'function') {
|
||||||
|
// This can happen if modules incorrectly handle HMR disposes/updates,
|
||||||
|
// e.g. when they keep a `setTimeout` around which still executes old code
|
||||||
|
// and contains e.g. a `require("something")` call.
|
||||||
|
throw new Error(factoryNotAvailableMessage(id, sourceType, sourceData));
|
||||||
|
}
|
||||||
|
const module1 = createModuleWithDirection(id);
|
||||||
|
const exports = module1.exports;
|
||||||
|
moduleCache[id] = module1;
|
||||||
|
const context = new Context(module1, exports);
|
||||||
|
// NOTE(alexkirsz) This can fail when the module encounters a runtime error.
|
||||||
|
try {
|
||||||
|
moduleFactory(context, module1, exports);
|
||||||
|
} catch (error) {
|
||||||
|
module1.error = error;
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
;
|
||||||
|
module1.loaded = true;
|
||||||
|
if (module1.namespaceObject && module1.exports !== module1.namespaceObject) {
|
||||||
|
// in case of a circular dependency: cjs1 -> esm2 -> cjs1
|
||||||
|
interopEsm(module1.exports, module1.namespaceObject);
|
||||||
|
}
|
||||||
|
return module1;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Retrieves a module from the cache, or instantiate it if it is not cached.
|
||||||
|
*/ // @ts-ignore
|
||||||
|
function getOrInstantiateModuleFromParent(id, sourceModule) {
|
||||||
|
const module1 = moduleCache[id];
|
||||||
|
if (module1) {
|
||||||
|
if (module1.error) {
|
||||||
|
throw module1.error;
|
||||||
|
}
|
||||||
|
return module1;
|
||||||
|
}
|
||||||
|
return instantiateModule(id, SourceType.Parent, sourceModule.id);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Instantiates a runtime module.
|
||||||
|
*/ function instantiateRuntimeModule(chunkPath, moduleId) {
|
||||||
|
return instantiateModule(moduleId, SourceType.Runtime, chunkPath);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.
|
||||||
|
*/ // @ts-ignore TypeScript doesn't separate this module space from the browser runtime
|
||||||
|
function getOrInstantiateRuntimeModule(chunkPath, moduleId) {
|
||||||
|
const module1 = moduleCache[moduleId];
|
||||||
|
if (module1) {
|
||||||
|
if (module1.error) {
|
||||||
|
throw module1.error;
|
||||||
|
}
|
||||||
|
return module1;
|
||||||
|
}
|
||||||
|
return instantiateRuntimeModule(chunkPath, moduleId);
|
||||||
|
}
|
||||||
|
module.exports = (sourcePath)=>({
|
||||||
|
m: (id)=>getOrInstantiateRuntimeModule(sourcePath, id),
|
||||||
|
c: (chunkData)=>loadRuntimeChunk(sourcePath, chunkData)
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//# sourceMappingURL=%5Bturbopack%5D_runtime.js.map
|
||||||
11
build_temp/.next/build/chunks/[turbopack]_runtime.js.map
Normal file
11
build_temp/.next/build/chunks/[turbopack]_runtime.js.map
Normal file
File diff suppressed because one or more lines are too long
6820
build_temp/.next/build/chunks/node_modules_13sb.px._.js
Normal file
6820
build_temp/.next/build/chunks/node_modules_13sb.px._.js
Normal file
File diff suppressed because it is too large
Load Diff
47
build_temp/.next/build/chunks/node_modules_13sb.px._.js.map
Normal file
47
build_temp/.next/build/chunks/node_modules_13sb.px._.js.map
Normal file
File diff suppressed because one or more lines are too long
1
build_temp/.next/build/package.json
Normal file
1
build_temp/.next/build/package.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"type": "commonjs"}
|
||||||
6
build_temp/.next/build/postcss.js
Normal file
6
build_temp/.next/build/postcss.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
var R=require("./chunks/[turbopack]_runtime.js")("postcss.js")
|
||||||
|
R.c("chunks/[turbopack-node]_transforms_postcss_ts_06e.r3r._.js")
|
||||||
|
R.c("chunks/[root-of-the-server]__0ubbtyl._.js")
|
||||||
|
R.m("[turbopack-node]/child_process/globals.ts [postcss] (ecmascript)")
|
||||||
|
R.m("[turbopack-node]/child_process/evaluate.ts/evaluate.js { INNER => \"[turbopack-node]/transforms/postcss.ts { CONFIG => \\\"[project]/postcss.config.mjs [postcss] (ecmascript)\\\" } [postcss] (ecmascript)\", RUNTIME => \"[turbopack-node]/child_process/evaluate.ts [postcss] (ecmascript)\" } [postcss] (ecmascript)")
|
||||||
|
module.exports=R.m("[turbopack-node]/child_process/evaluate.ts/evaluate.js { INNER => \"[turbopack-node]/transforms/postcss.ts { CONFIG => \\\"[project]/postcss.config.mjs [postcss] (ecmascript)\\\" } [postcss] (ecmascript)\", RUNTIME => \"[turbopack-node]/child_process/evaluate.ts [postcss] (ecmascript)\" } [postcss] (ecmascript)").exports
|
||||||
5
build_temp/.next/build/postcss.js.map
Normal file
5
build_temp/.next/build/postcss.js.map
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": [],
|
||||||
|
"sections": []
|
||||||
|
}
|
||||||
1
build_temp/.next/cache/.previewinfo
vendored
Normal file
1
build_temp/.next/cache/.previewinfo
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"previewModeId":"448d32298db3b0c38793886a3692c8c2","previewModeSigningKey":"c5cb172f94d84767588967a86044c9ee49921a9b2179519d52aa8aceecb0cd6f","previewModeEncryptionKey":"8a7d538464b6beea4e3323e6d9d86f4b70ecb99e19daffca604a9088baa07476","expireAt":1783363527187}
|
||||||
1
build_temp/.next/cache/.rscinfo
vendored
Normal file
1
build_temp/.next/cache/.rscinfo
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"encryption.key":"3aeRfwg0+P9P6WojBQxvxnXB2/RQU+/5AuKoO1YfFV8=","encryption.expire_at":1783363527167}
|
||||||
1
build_temp/.next/cache/.tsbuildinfo
vendored
Normal file
1
build_temp/.next/cache/.tsbuildinfo
vendored
Normal file
File diff suppressed because one or more lines are too long
6
build_temp/.next/diagnostics/build-diagnostics.json
Normal file
6
build_temp/.next/diagnostics/build-diagnostics.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"buildStage": "static-generation",
|
||||||
|
"buildOptions": {
|
||||||
|
"useBuildWorker": "true"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
build_temp/.next/diagnostics/framework.json
Normal file
1
build_temp/.next/diagnostics/framework.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"name":"Next.js","version":"16.2.4"}
|
||||||
357
build_temp/.next/diagnostics/route-bundle-stats.json
Normal file
357
build_temp/.next/diagnostics/route-bundle-stats.json
Normal file
@@ -0,0 +1,357 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"route": "/protected",
|
||||||
|
"firstLoadUncompressedJsBytes": 887453,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\012i7eyh17tl3.js",
|
||||||
|
".next\\static\\chunks\\0k5-k~sbs-wg6.js",
|
||||||
|
".next\\static\\chunks\\0qesjmrn7~1dz.js",
|
||||||
|
".next\\static\\chunks\\01_lw6dc6ltc-.js",
|
||||||
|
".next\\static\\chunks\\0l-wk1ive8m.1.js",
|
||||||
|
".next\\static\\chunks\\00gju7l2y3vh_.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/admin/products",
|
||||||
|
"firstLoadUncompressedJsBytes": 815153,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0ka051yepewro.js",
|
||||||
|
".next\\static\\chunks\\0_psz~izxr78o.js",
|
||||||
|
".next\\static\\chunks\\01_lw6dc6ltc-.js",
|
||||||
|
".next\\static\\chunks\\0qj.s.uyzj2u6.js",
|
||||||
|
".next\\static\\chunks\\1535xxoug.k9i.js",
|
||||||
|
".next\\static\\chunks\\0k5-k~sbs-wg6.js",
|
||||||
|
".next\\static\\chunks\\0h2rh5ewa6gmd.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/admin/categories",
|
||||||
|
"firstLoadUncompressedJsBytes": 810555,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0ka051yepewro.js",
|
||||||
|
".next\\static\\chunks\\0_psz~izxr78o.js",
|
||||||
|
".next\\static\\chunks\\01_lw6dc6ltc-.js",
|
||||||
|
".next\\static\\chunks\\0~pn4~wuwvr32.js",
|
||||||
|
".next\\static\\chunks\\0f7q1cdbakqnj.js",
|
||||||
|
".next\\static\\chunks\\0k5-k~sbs-wg6.js",
|
||||||
|
".next\\static\\chunks\\0h2rh5ewa6gmd.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/auth/sign-up",
|
||||||
|
"firstLoadUncompressedJsBytes": 798825,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0.y2lp02b2t7q.js",
|
||||||
|
".next\\static\\chunks\\0qesjmrn7~1dz.js",
|
||||||
|
".next\\static\\chunks\\0k5-k~sbs-wg6.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/auth/login",
|
||||||
|
"firstLoadUncompressedJsBytes": 798571,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\020p4x66yuy~n.js",
|
||||||
|
".next\\static\\chunks\\0qesjmrn7~1dz.js",
|
||||||
|
".next\\static\\chunks\\0k5-k~sbs-wg6.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/auth/forgot-password",
|
||||||
|
"firstLoadUncompressedJsBytes": 798560,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0hn13p7jlg6c8.js",
|
||||||
|
".next\\static\\chunks\\0qesjmrn7~1dz.js",
|
||||||
|
".next\\static\\chunks\\0k5-k~sbs-wg6.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/auth/update-password",
|
||||||
|
"firstLoadUncompressedJsBytes": 792198,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\07b46tf_nu-sm.js",
|
||||||
|
".next\\static\\chunks\\0qesjmrn7~1dz.js",
|
||||||
|
".next\\static\\chunks\\0k5-k~sbs-wg6.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/admin/users",
|
||||||
|
"firstLoadUncompressedJsBytes": 732184,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0ka051yepewro.js",
|
||||||
|
".next\\static\\chunks\\0d83uz0cb9cr0.js",
|
||||||
|
".next\\static\\chunks\\0k5-k~sbs-wg6.js",
|
||||||
|
".next\\static\\chunks\\09ftf-8ix1ad~.js",
|
||||||
|
".next\\static\\chunks\\0h2rh5ewa6gmd.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/order",
|
||||||
|
"firstLoadUncompressedJsBytes": 726412,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0k5-k~sbs-wg6.js",
|
||||||
|
".next\\static\\chunks\\083objkg2e851.js",
|
||||||
|
".next\\static\\chunks\\0ulw1svcbtk8z.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/my-customers/[id]",
|
||||||
|
"firstLoadUncompressedJsBytes": 569382,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0d068foshfwl7.js",
|
||||||
|
".next\\static\\chunks\\0k5-k~sbs-wg6.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/my-customers/new",
|
||||||
|
"firstLoadUncompressedJsBytes": 564226,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\00-xpv69x~78w.js",
|
||||||
|
".next\\static\\chunks\\0k5-k~sbs-wg6.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/admin",
|
||||||
|
"firstLoadUncompressedJsBytes": 555746,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0ka051yepewro.js",
|
||||||
|
".next\\static\\chunks\\091cxb_8k6p~y.js",
|
||||||
|
".next\\static\\chunks\\0k5-k~sbs-wg6.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/order/success",
|
||||||
|
"firstLoadUncompressedJsBytes": 552889,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\10n544c5bwzh9.js",
|
||||||
|
".next\\static\\chunks\\0k5-k~sbs-wg6.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/admin/orders",
|
||||||
|
"firstLoadUncompressedJsBytes": 551609,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0ka051yepewro.js",
|
||||||
|
".next\\static\\chunks\\0vebka-_nqjml.js",
|
||||||
|
".next\\static\\chunks\\0k5-k~sbs-wg6.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/",
|
||||||
|
"firstLoadUncompressedJsBytes": 523255,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0ka051yepewro.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/my-customers",
|
||||||
|
"firstLoadUncompressedJsBytes": 523255,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0ka051yepewro.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/my-orders",
|
||||||
|
"firstLoadUncompressedJsBytes": 523255,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0ka051yepewro.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/_not-found",
|
||||||
|
"firstLoadUncompressedJsBytes": 517427,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/auth/error",
|
||||||
|
"firstLoadUncompressedJsBytes": 517427,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"route": "/auth/sign-up-success",
|
||||||
|
"firstLoadUncompressedJsBytes": 517427,
|
||||||
|
"firstLoadChunkPaths": [
|
||||||
|
".next\\static\\chunks\\0usmzazea5o36.js",
|
||||||
|
".next\\static\\chunks\\0d3shmwh5_nmn.js",
|
||||||
|
".next\\static\\chunks\\0ze4gu236oq96.js",
|
||||||
|
".next\\static\\chunks\\10qd__0r7a~.l.js",
|
||||||
|
".next\\static\\chunks\\0-gaanm6h49z~.js",
|
||||||
|
".next\\static\\chunks\\06c8h6921f-oo.js",
|
||||||
|
".next\\static\\chunks\\15jasrm2107sy.js",
|
||||||
|
".next\\static\\chunks\\181uojwh.t2ik.js",
|
||||||
|
".next\\static\\chunks\\turbopack-0u.mb44r17v0_.js"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
6
build_temp/.next/export-marker.json
Normal file
6
build_temp/.next/export-marker.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"hasExportPathMap": false,
|
||||||
|
"exportTrailingSlash": false,
|
||||||
|
"isNextImageImported": false
|
||||||
|
}
|
||||||
13
build_temp/.next/fallback-build-manifest.json
Normal file
13
build_temp/.next/fallback-build-manifest.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"pages": {
|
||||||
|
"/_app": []
|
||||||
|
},
|
||||||
|
"devFiles": [],
|
||||||
|
"polyfillFiles": [],
|
||||||
|
"lowPriorityFiles": [
|
||||||
|
"static/czEjVggXDRFH51IopN6_9/_buildManifest.js",
|
||||||
|
"static/czEjVggXDRFH51IopN6_9/_ssgManifest.js",
|
||||||
|
"static/czEjVggXDRFH51IopN6_9/_clientMiddlewareManifest.js"
|
||||||
|
],
|
||||||
|
"rootMainFiles": []
|
||||||
|
}
|
||||||
68
build_temp/.next/images-manifest.json
Normal file
68
build_temp/.next/images-manifest.json
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"images": {
|
||||||
|
"deviceSizes": [
|
||||||
|
640,
|
||||||
|
750,
|
||||||
|
828,
|
||||||
|
1080,
|
||||||
|
1200,
|
||||||
|
1920,
|
||||||
|
2048,
|
||||||
|
3840
|
||||||
|
],
|
||||||
|
"imageSizes": [
|
||||||
|
32,
|
||||||
|
48,
|
||||||
|
64,
|
||||||
|
96,
|
||||||
|
128,
|
||||||
|
256,
|
||||||
|
384
|
||||||
|
],
|
||||||
|
"path": "/_next/image",
|
||||||
|
"loader": "default",
|
||||||
|
"loaderFile": "",
|
||||||
|
"domains": [],
|
||||||
|
"disableStaticImages": false,
|
||||||
|
"minimumCacheTTL": 14400,
|
||||||
|
"formats": [
|
||||||
|
"image/webp"
|
||||||
|
],
|
||||||
|
"maximumRedirects": 3,
|
||||||
|
"maximumResponseBody": 50000000,
|
||||||
|
"dangerouslyAllowLocalIP": false,
|
||||||
|
"dangerouslyAllowSVG": false,
|
||||||
|
"contentSecurityPolicy": "script-src 'none'; frame-src 'none'; sandbox;",
|
||||||
|
"contentDispositionType": "attachment",
|
||||||
|
"localPatterns": [
|
||||||
|
{
|
||||||
|
"pathname": "^(?:(?!(?:^|\\/)\\.{1,2}(?:\\/|$))(?:(?:(?!(?:^|\\/)\\.{1,2}(?:\\/|$)).)*?)\\/?)$",
|
||||||
|
"search": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"remotePatterns": [],
|
||||||
|
"qualities": [
|
||||||
|
75
|
||||||
|
],
|
||||||
|
"unoptimized": false,
|
||||||
|
"customCacheHandler": false,
|
||||||
|
"sizes": [
|
||||||
|
640,
|
||||||
|
750,
|
||||||
|
828,
|
||||||
|
1080,
|
||||||
|
1200,
|
||||||
|
1920,
|
||||||
|
2048,
|
||||||
|
3840,
|
||||||
|
32,
|
||||||
|
48,
|
||||||
|
64,
|
||||||
|
96,
|
||||||
|
128,
|
||||||
|
256,
|
||||||
|
384
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
1
build_temp/.next/next-minimal-server.js.nft.json
Normal file
1
build_temp/.next/next-minimal-server.js.nft.json
Normal file
File diff suppressed because one or more lines are too long
1
build_temp/.next/next-server.js.nft.json
Normal file
1
build_temp/.next/next-server.js.nft.json
Normal file
File diff suppressed because one or more lines are too long
112
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/README.md
generated
vendored
Normal file
112
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/README.md
generated
vendored
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
<p align="center">
|
||||||
|
<img src="https://user-images.githubusercontent.com/5600341/27505816-c8bc37aa-587f-11e7-9a86-08a2d081a8b9.png" height="280px">
|
||||||
|
<p align="center">React renderer for creating PDF files on the browser and server<p>
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://www.npmjs.com/package/@react-pdf/renderer">
|
||||||
|
<img src="https://img.shields.io/npm/v/@react-pdf/renderer?style=flat&colorA=000000&colorB=000000" />
|
||||||
|
</a>
|
||||||
|
<a href="https://opencollective.com/react-pdf">
|
||||||
|
<img src="https://img.shields.io/opencollective/all/react-pdf?style=flat&colorA=000000&colorB=000000" />
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/diegomura/react-pdf/blob/master/LICENSE">
|
||||||
|
<img src="https://img.shields.io/github/license/diegomura/react-pdf?style=flat&colorA=000000&colorB=000000" />
|
||||||
|
</a>
|
||||||
|
<a href="https://blockchain.com/btc/address/bc1qj223udztpmt5dck46dw0yap08yum63ht56h90v">
|
||||||
|
<img src="https://img.shields.io/badge/BTC-f5f5f5?style=flat&colorA=000000&colorB=000000" />
|
||||||
|
</a>
|
||||||
|
<a href="https://blockchain.com/eth/address/0x4e1DB76bA0858BbCAa4DD804418D0D9EcF77B1cC">
|
||||||
|
<img src="https://img.shields.io/badge/ETH-f5f5f5?style=flat&colorA=000000&colorB=000000" />
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
## How to install
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn add @react-pdf/renderer
|
||||||
|
```
|
||||||
|
|
||||||
|
## How it works
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
import React from 'react';
|
||||||
|
import { Document, Page, Text, View, StyleSheet } from '@react-pdf/renderer';
|
||||||
|
|
||||||
|
// Create styles
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
page: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
backgroundColor: '#E4E4E4',
|
||||||
|
},
|
||||||
|
section: {
|
||||||
|
margin: 10,
|
||||||
|
padding: 10,
|
||||||
|
flexGrow: 1,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create Document Component
|
||||||
|
const MyDocument = () => (
|
||||||
|
<Document>
|
||||||
|
<Page size="A4" style={styles.page}>
|
||||||
|
<View style={styles.section}>
|
||||||
|
<Text>Section #1</Text>
|
||||||
|
</View>
|
||||||
|
<View style={styles.section}>
|
||||||
|
<Text>Section #2</Text>
|
||||||
|
</View>
|
||||||
|
</Page>
|
||||||
|
</Document>
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
### `Web.` Render in DOM
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
import React from 'react';
|
||||||
|
import ReactDOM from 'react-dom';
|
||||||
|
import { PDFViewer } from '@react-pdf/renderer';
|
||||||
|
|
||||||
|
const App = () => (
|
||||||
|
<PDFViewer>
|
||||||
|
<MyDocument />
|
||||||
|
</PDFViewer>
|
||||||
|
);
|
||||||
|
|
||||||
|
ReactDOM.render(<App />, document.getElementById('root'));
|
||||||
|
```
|
||||||
|
|
||||||
|
### `Node.` Save in a file
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
import React from 'react';
|
||||||
|
import ReactPDF from '@react-pdf/renderer';
|
||||||
|
|
||||||
|
ReactPDF.render(<MyDocument />, `${__dirname}/example.pdf`);
|
||||||
|
```
|
||||||
|
|
||||||
|
## Contributors
|
||||||
|
|
||||||
|
This project exists thanks to all the people who contribute. Looking to contribute? Please check our [[contribute]](https://github.com/diegomura/react-pdf/blob/master/.github/CONTRIBUTING.md) document for more details about how to setup a development environment and submitting code.
|
||||||
|
|
||||||
|
<a href="https://github.com/diegomura/react-pdf/blob/master/.github/CONTRIBUTING.md"><img src="https://opencollective.com/react-pdf/contributors.svg?width=890" /></a>
|
||||||
|
|
||||||
|
## Sponsors
|
||||||
|
|
||||||
|
Thank you to all our sponsors! [[Become a sponsors](https://opencollective.com/react-pdf#sponsors)]
|
||||||
|
|
||||||
|
<a href="https://opencollective.com/react-pdf#sponsors" target="_blank"><img src="https://opencollective.com/react-pdf/sponsors.svg?width=890"></a>
|
||||||
|
|
||||||
|
## Backers
|
||||||
|
|
||||||
|
Thank you to all our backers! [[Become a backer](https://opencollective.com/react-pdf#backer)]
|
||||||
|
|
||||||
|
<a href="https://opencollective.com/react-pdf#backers" target="_blank"><img src="https://opencollective.com/react-pdf/backers.svg?width=890"></a>
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT © [Diego Muracciole](http://github.com/diegomura)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[](https://www.npmjs.com/package/@react-pdf/renderer)
|
||||||
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/index.d.ts
generated
vendored
Normal file
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,793 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
|
|
||||||
|
import * as React from 'react';
|
||||||
|
import {
|
||||||
|
Style,
|
||||||
|
PageSize,
|
||||||
|
FontStore,
|
||||||
|
PDFVersion,
|
||||||
|
Orientation,
|
||||||
|
SourceObject,
|
||||||
|
SrcSet,
|
||||||
|
Sizes,
|
||||||
|
HyphenationCallback,
|
||||||
|
SVGPresentationAttributes,
|
||||||
|
Bookmark,
|
||||||
|
PageLayout,
|
||||||
|
PageMode,
|
||||||
|
HitSlop,
|
||||||
|
} from '@react-pdf/types';
|
||||||
|
|
||||||
|
declare class ReactPDF {
|
||||||
|
static default: typeof ReactPDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = ReactPDF;
|
||||||
|
|
||||||
|
declare namespace ReactPDF {
|
||||||
|
interface Styles {
|
||||||
|
[key: string]: Style;
|
||||||
|
}
|
||||||
|
interface OnRenderProps {
|
||||||
|
blob?: Blob;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Permissions {
|
||||||
|
printing?: 'lowResolution' | 'highResolution';
|
||||||
|
modifying?: boolean;
|
||||||
|
copying?: boolean;
|
||||||
|
annotating?: boolean;
|
||||||
|
fillingForms?: boolean;
|
||||||
|
contentAccessibility?: boolean;
|
||||||
|
documentAssembly?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DocumentProps {
|
||||||
|
style?: Style | Style[];
|
||||||
|
title?: string;
|
||||||
|
author?: string;
|
||||||
|
subject?: string;
|
||||||
|
creator?: string;
|
||||||
|
keywords?: string;
|
||||||
|
producer?: string;
|
||||||
|
language?: string;
|
||||||
|
creationDate?: Date;
|
||||||
|
modificationDate?: Date;
|
||||||
|
pdfVersion?: PDFVersion;
|
||||||
|
pageMode?: PageMode;
|
||||||
|
pageLayout?: PageLayout;
|
||||||
|
ownerPassword?: string;
|
||||||
|
userPassword?: string;
|
||||||
|
permissions?: Permissions;
|
||||||
|
onRender?: (props: OnRenderProps) => any;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This component represent the PDF document itself. It must be the root
|
||||||
|
* of your tree element structure, and under no circumstances should it be
|
||||||
|
* used as children of another react-pdf component. In addition, it should
|
||||||
|
* only have childs of type <Page />.
|
||||||
|
*/
|
||||||
|
export class Document extends React.Component<
|
||||||
|
React.PropsWithChildren<DocumentProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface NodeProps {
|
||||||
|
id?: string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
/**
|
||||||
|
* Render component in all wrapped pages.
|
||||||
|
* @see https://react-pdf.org/advanced#fixed-components
|
||||||
|
*/
|
||||||
|
fixed?: boolean;
|
||||||
|
/**
|
||||||
|
* Force the wrapping algorithm to start a new page when rendering the
|
||||||
|
* element.
|
||||||
|
* @see https://react-pdf.org/advanced#page-breaks
|
||||||
|
*/
|
||||||
|
break?: boolean;
|
||||||
|
/**
|
||||||
|
* Hint that no page wrapping should occur between all sibling elements following the element within n points
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
minPresenceAhead?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable page wrapping for this page.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
size?: PageSize;
|
||||||
|
orientation?: Orientation;
|
||||||
|
dpi?: number;
|
||||||
|
bookmark?: Bookmark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents single page inside the PDF document, or a subset of them if
|
||||||
|
* using the wrapping feature. A <Document /> can contain as many pages as
|
||||||
|
* you want, but ensure not rendering a page inside any component besides
|
||||||
|
* Document.
|
||||||
|
*/
|
||||||
|
export class Page extends React.Component<
|
||||||
|
React.PropsWithChildren<PageProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ViewProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The most fundamental component for building a UI and is designed to be
|
||||||
|
* nested inside other views and can have 0 to many children.
|
||||||
|
*/
|
||||||
|
export class View extends React.Component<
|
||||||
|
React.PropsWithChildren<ViewProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BaseImageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* Works like the HTML img sizes attribute.
|
||||||
|
* @example 300
|
||||||
|
* @example "300"
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSrcProp extends BaseImageProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSourceProp extends BaseImageProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageProps = ImageWithSrcProp | ImageWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying network or local (Node only) JPG or
|
||||||
|
* PNG images, as well as base64 encoded image strings.
|
||||||
|
*/
|
||||||
|
export class Image extends React.Component<ImageProps> {}
|
||||||
|
|
||||||
|
interface BaseImageBackgroundProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* @example 300
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
/**
|
||||||
|
* Style applied to the background image.
|
||||||
|
*/
|
||||||
|
imageStyle?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSrcProp extends BaseImageBackgroundProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSourceProp extends BaseImageBackgroundProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageBackgroundProps =
|
||||||
|
| ImageBackgroundWithSrcProp
|
||||||
|
| ImageBackgroundWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying an image behind child content.
|
||||||
|
* Compatible with React Native's ImageBackground component.
|
||||||
|
* @see https://reactnative.dev/docs/imagebackground
|
||||||
|
*/
|
||||||
|
export class ImageBackground extends React.Component<
|
||||||
|
React.PropsWithChildren<ImageBackgroundProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TextProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
totalPages: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
subPageTotalPages: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the bottom of a page or its container.
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
orphans?: number;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the top of a page or its container..
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
widows?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SVGTextProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x: string | number;
|
||||||
|
y: string | number;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying text. Text supports nesting of other
|
||||||
|
* Text or Link components to create inline styling.
|
||||||
|
*/
|
||||||
|
export class Text extends React.Component<
|
||||||
|
React.PropsWithChildren<TextProps> | SVGTextProps
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinkProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
href?: string;
|
||||||
|
src?: string;
|
||||||
|
/**
|
||||||
|
* Extends the clickable area of the link beyond its visible bounds.
|
||||||
|
* Accepts a number (applied to all sides) or an object with top, bottom, left, right.
|
||||||
|
* @see https://reactnative.dev/docs/view#hitslop
|
||||||
|
*/
|
||||||
|
hitSlop?: HitSlop;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying a hyperlink. Link’s can be nested
|
||||||
|
* inside a Text component, or being inside any other valid primitive.
|
||||||
|
*/
|
||||||
|
export class Link extends React.Component<
|
||||||
|
React.PropsWithChildren<LinkProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface FormCommonProps extends NodeProps {
|
||||||
|
name?: string;
|
||||||
|
required?: boolean;
|
||||||
|
noExport?: boolean;
|
||||||
|
readOnly?: boolean;
|
||||||
|
value?: number | string;
|
||||||
|
defaultValue?: number | string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FieldSetProps extends NodeProps {
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class FieldSet extends React.Component<
|
||||||
|
React.PropsWithChildren<FieldSetProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputFormatting {
|
||||||
|
type:
|
||||||
|
| 'date'
|
||||||
|
| 'time'
|
||||||
|
| 'percent'
|
||||||
|
| 'number'
|
||||||
|
| 'zip'
|
||||||
|
| 'zipPlus4'
|
||||||
|
| 'phone'
|
||||||
|
| 'ssn';
|
||||||
|
param?: string;
|
||||||
|
nDec?: number;
|
||||||
|
sepComma?: boolean;
|
||||||
|
negStyle?: 'MinusBlack' | 'Red' | 'ParensBlack' | 'ParensRed';
|
||||||
|
currency?: string;
|
||||||
|
currencyPrepend?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputProps extends FormCommonProps {
|
||||||
|
align?: 'left' | 'center' | 'right';
|
||||||
|
multiline?: boolean;
|
||||||
|
/**
|
||||||
|
* The text will be masked (e.g. with asterisks).
|
||||||
|
*/
|
||||||
|
password?: boolean;
|
||||||
|
/**
|
||||||
|
* If set, text entered in the field is not spell-checked
|
||||||
|
*/
|
||||||
|
noSpell?: boolean;
|
||||||
|
format?: TextInputFormatting;
|
||||||
|
/**
|
||||||
|
* Sets the fontSize (default or 0 means auto sizing)
|
||||||
|
*/
|
||||||
|
fontSize?: number;
|
||||||
|
/**
|
||||||
|
* Sets the maximum length (characters) of the text in the field
|
||||||
|
*/
|
||||||
|
maxLength?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class TextInput extends React.Component<TextInputProps> {}
|
||||||
|
|
||||||
|
interface CheckboxProps extends FormCommonProps {
|
||||||
|
backgroundColor?: string;
|
||||||
|
borderColor?: string;
|
||||||
|
checked?: boolean;
|
||||||
|
onState?: string;
|
||||||
|
offState?: string;
|
||||||
|
xMark?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Checkbox extends React.Component<CheckboxProps> {}
|
||||||
|
|
||||||
|
interface SelectAndListPropsBase extends FormCommonProps {
|
||||||
|
sort?: boolean;
|
||||||
|
edit?: boolean;
|
||||||
|
multiSelect?: boolean;
|
||||||
|
noSpell?: boolean;
|
||||||
|
select?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
type SelectAndListPropsWithEdit = SelectAndListPropsBase & {
|
||||||
|
edit: true | false;
|
||||||
|
noSpell: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListPropsWithNoSpell = SelectAndListPropsBase & {
|
||||||
|
edit: boolean;
|
||||||
|
noSpell: true | false;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListProps =
|
||||||
|
| SelectAndListPropsWithEdit
|
||||||
|
| SelectAndListPropsWithNoSpell;
|
||||||
|
|
||||||
|
export class Select extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
export class List extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
interface NoteProps extends NodeProps {
|
||||||
|
children: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Note extends React.Component<NoteProps> {}
|
||||||
|
|
||||||
|
interface CanvasProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
paint: (
|
||||||
|
painter: any,
|
||||||
|
availableWidth: number,
|
||||||
|
availableHeight: number,
|
||||||
|
) => null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Canvas extends React.Component<CanvasProps> {}
|
||||||
|
|
||||||
|
interface SVGProps extends NodeProps, SVGPresentationAttributes {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
width?: string | number;
|
||||||
|
height?: string | number;
|
||||||
|
viewBox?: string;
|
||||||
|
preserveAspectRatio?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <SVG /> element is a container that defines a new coordinate system and viewport. It is used as the outermost element of SVG documents.
|
||||||
|
*/
|
||||||
|
export class Svg extends React.Component<React.PropsWithChildren<SVGProps>> {}
|
||||||
|
|
||||||
|
interface LineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x1: string | number;
|
||||||
|
x2: string | number;
|
||||||
|
y1: string | number;
|
||||||
|
y2: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Line /> element is used to create a line.
|
||||||
|
*/
|
||||||
|
export class Line extends React.Component<
|
||||||
|
React.PropsWithChildren<LineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolylineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polyline /> element is used to create any shape that consists of only straight lines (that is connected at several points).
|
||||||
|
*/
|
||||||
|
export class Polyline extends React.Component<
|
||||||
|
React.PropsWithChildren<PolylineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolygonProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polygon /> element is used to create a graphic that contains at least three sides.
|
||||||
|
* Polygons are made of straight lines, and the shape is "closed" (all the lines connect up).
|
||||||
|
*/
|
||||||
|
export class Polygon extends React.Component<
|
||||||
|
React.PropsWithChildren<PolygonProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PathProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
d: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Path /> element is the most powerful element in the SVG library of basic shapes. It can be used to create lines, curves, arcs, and more.
|
||||||
|
*/
|
||||||
|
export class Path extends React.Component<
|
||||||
|
React.PropsWithChildren<PathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RectProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
width: string | number;
|
||||||
|
height: string | number;
|
||||||
|
rx?: string | number;
|
||||||
|
ry?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Rect /> element is used to create a rectangle and variations of a rectangle shape.
|
||||||
|
*/
|
||||||
|
export class Rect extends React.Component<
|
||||||
|
React.PropsWithChildren<RectProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface CircleProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Circle /> element is used to create a circle.
|
||||||
|
*/
|
||||||
|
export class Circle extends React.Component<
|
||||||
|
React.PropsWithChildren<CircleProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface EllipseProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
rx: string | number;
|
||||||
|
ry: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Ellipse /> element is used to create an ellipse.
|
||||||
|
* An ellipse is closely related to a circle. The difference is that an ellipse has an x and a y radius that differs from each other, while a circle has equal x and y radius.
|
||||||
|
*/
|
||||||
|
export class Ellipse extends React.Component<
|
||||||
|
React.PropsWithChildren<EllipseProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TspanProps extends SVGPresentationAttributes {
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Tspan /> element defines a subtext within a <Text /> element or another <Tspan /> element.
|
||||||
|
* It allows for adjustment of the style and/or position of that subtext as needed.
|
||||||
|
*/
|
||||||
|
export class Tspan extends React.Component<
|
||||||
|
React.PropsWithChildren<TspanProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface GProps extends SVGPresentationAttributes {
|
||||||
|
style?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <G /> SVG element is a container used to group other SVG elements.
|
||||||
|
* Transformations applied to the <G /> element are performed on its child elements, and its attributes are inherited by its children.
|
||||||
|
*/
|
||||||
|
export class G extends React.Component<React.PropsWithChildren<GProps>> {}
|
||||||
|
|
||||||
|
interface StopProps {
|
||||||
|
offset: string | number;
|
||||||
|
stopColor: string;
|
||||||
|
stopOpacity?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SVG <Stop /> element defines a color and its position to use on a gradient. This element is always a child of a <LinearGradient /> or <RadialGradient /> element
|
||||||
|
*/
|
||||||
|
export class Stop extends React.Component<
|
||||||
|
React.PropsWithChildren<StopProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
|
interface DefsProps {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Defs /> element is used to store graphical objects that will be used at a later time. Objects created inside a <Defs /> element are not rendered directly. To display them you have to reference them
|
||||||
|
*/
|
||||||
|
export class Defs extends React.Component<
|
||||||
|
React.PropsWithChildren<DefsProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ClipPathProps {
|
||||||
|
id?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <ClipPath /> SVG element defines a clipping path, to be used by the clipPath property.
|
||||||
|
* A clipping path restricts the region to which paint can be applied. Conceptually, parts of the drawing that lie outside of the region bounded by the clipping path are not drawn.
|
||||||
|
*/
|
||||||
|
export class ClipPath extends React.Component<
|
||||||
|
React.PropsWithChildren<ClipPathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface MarkerProps {
|
||||||
|
id: string;
|
||||||
|
viewBox?: string;
|
||||||
|
refX?: string | number;
|
||||||
|
refY?: string | number;
|
||||||
|
markerWidth?: string | number;
|
||||||
|
markerHeight?: string | number;
|
||||||
|
orient?: 'auto' | 'auto-start-reverse' | number;
|
||||||
|
markerUnits?: 'strokeWidth' | 'userSpaceOnUse';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Marker /> SVG element defines a graphic used for drawing arrows or polymarkers on a given <Path />, <Line />, <Polyline />, or <Polygon /> element.
|
||||||
|
* Markers can be attached to shapes using the markerStart, markerMid, and markerEnd properties.
|
||||||
|
*/
|
||||||
|
export class Marker extends React.Component<
|
||||||
|
React.PropsWithChildren<MarkerProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinearGradientProps {
|
||||||
|
id: string;
|
||||||
|
x1?: string | number;
|
||||||
|
x2?: string | number;
|
||||||
|
y1?: string | number;
|
||||||
|
y2?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <LinearGradient /> element lets authors define linear gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class LinearGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<LinearGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RadialGradientProps {
|
||||||
|
id: string;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r?: string | number;
|
||||||
|
fx?: string | number;
|
||||||
|
fy?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <RadialGradient /> element lets authors define radial gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class RadialGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<RadialGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BlobProviderParams {
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
loading: boolean;
|
||||||
|
error: Error | null;
|
||||||
|
}
|
||||||
|
interface BlobProviderProps {
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children: (params: BlobProviderParams) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Easy and declarative way of getting document's blob data without
|
||||||
|
* showing it on screen.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class BlobProvider extends React.Component<BlobProviderProps> {}
|
||||||
|
|
||||||
|
interface PDFViewerProps {
|
||||||
|
width?: number | string;
|
||||||
|
height?: number | string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
className?: string;
|
||||||
|
children?: React.ReactElement<DocumentProps>;
|
||||||
|
innerRef?: React.Ref<HTMLIFrameElement>;
|
||||||
|
showToolbar?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iframe PDF viewer for client-side generated documents.
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFViewer extends React.Component<PDFViewerProps> {}
|
||||||
|
|
||||||
|
interface PDFDownloadLinkProps
|
||||||
|
extends Omit<
|
||||||
|
React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
||||||
|
'href' | 'children'
|
||||||
|
> {
|
||||||
|
/** PDF filename. Alias for anchor tag `download` attribute. */
|
||||||
|
fileName?: string;
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children?: React.ReactNode | React.FC<BlobProviderParams>;
|
||||||
|
onClick?: React.AnchorHTMLAttributes<HTMLAnchorElement>['onClick'] &
|
||||||
|
((
|
||||||
|
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>,
|
||||||
|
instance: UsePDFInstance,
|
||||||
|
) => void);
|
||||||
|
ref?: React.Ref<HTMLAnchorElement> | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Anchor tag to enable generate and download PDF documents on the fly.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFDownloadLink extends React.Component<PDFDownloadLinkProps> {}
|
||||||
|
|
||||||
|
interface UsePDFInstance {
|
||||||
|
loading: boolean;
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
error: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* React hook for creating and updating a PDF document instance
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export function usePDF(options?: {
|
||||||
|
document?: React.ReactElement<DocumentProps>;
|
||||||
|
}): [
|
||||||
|
UsePDFInstance,
|
||||||
|
(newDocument: React.ReactElement<DocumentProps>) => void,
|
||||||
|
];
|
||||||
|
|
||||||
|
export const Font: FontStore;
|
||||||
|
|
||||||
|
export const StyleSheet: {
|
||||||
|
create: <T extends Styles>(styles: T) => T;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const version: any;
|
||||||
|
|
||||||
|
export const PDFRenderer: any;
|
||||||
|
|
||||||
|
export const pdf: (initialValue?: React.ReactElement<DocumentProps>) => {
|
||||||
|
container: any;
|
||||||
|
isDirty: () => boolean;
|
||||||
|
toString: () => string;
|
||||||
|
toBlob: () => Promise<Blob>;
|
||||||
|
toBuffer: () => Promise<NodeJS.ReadableStream>;
|
||||||
|
on: (event: 'change', callback: () => void) => void;
|
||||||
|
updateContainer: (
|
||||||
|
document: React.ReactElement<any>,
|
||||||
|
callback?: () => void,
|
||||||
|
) => void;
|
||||||
|
removeListener: (event: 'change', callback: () => void) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const renderToStream: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use the `renderToBuffer` method
|
||||||
|
*/
|
||||||
|
export const renderToString: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<string>;
|
||||||
|
|
||||||
|
export const renderToFile: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
filePath: string,
|
||||||
|
callback?: (output: NodeJS.ReadableStream, _filePath: string) => any,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
const render: typeof renderToFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render document into a nodejs buffer
|
||||||
|
* @platform node
|
||||||
|
*/
|
||||||
|
export const renderToBuffer: (
|
||||||
|
document: React.ReactElement<ReactPDF.DocumentProps>,
|
||||||
|
) => Promise<Buffer>;
|
||||||
|
}
|
||||||
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.browser.d.cts
generated
vendored
Normal file
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.browser.d.cts
generated
vendored
Normal file
@@ -0,0 +1,793 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
|
|
||||||
|
import * as React from 'react';
|
||||||
|
import {
|
||||||
|
Style,
|
||||||
|
PageSize,
|
||||||
|
FontStore,
|
||||||
|
PDFVersion,
|
||||||
|
Orientation,
|
||||||
|
SourceObject,
|
||||||
|
SrcSet,
|
||||||
|
Sizes,
|
||||||
|
HyphenationCallback,
|
||||||
|
SVGPresentationAttributes,
|
||||||
|
Bookmark,
|
||||||
|
PageLayout,
|
||||||
|
PageMode,
|
||||||
|
HitSlop,
|
||||||
|
} from '@react-pdf/types';
|
||||||
|
|
||||||
|
declare class ReactPDF {
|
||||||
|
static default: typeof ReactPDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = ReactPDF;
|
||||||
|
|
||||||
|
declare namespace ReactPDF {
|
||||||
|
interface Styles {
|
||||||
|
[key: string]: Style;
|
||||||
|
}
|
||||||
|
interface OnRenderProps {
|
||||||
|
blob?: Blob;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Permissions {
|
||||||
|
printing?: 'lowResolution' | 'highResolution';
|
||||||
|
modifying?: boolean;
|
||||||
|
copying?: boolean;
|
||||||
|
annotating?: boolean;
|
||||||
|
fillingForms?: boolean;
|
||||||
|
contentAccessibility?: boolean;
|
||||||
|
documentAssembly?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DocumentProps {
|
||||||
|
style?: Style | Style[];
|
||||||
|
title?: string;
|
||||||
|
author?: string;
|
||||||
|
subject?: string;
|
||||||
|
creator?: string;
|
||||||
|
keywords?: string;
|
||||||
|
producer?: string;
|
||||||
|
language?: string;
|
||||||
|
creationDate?: Date;
|
||||||
|
modificationDate?: Date;
|
||||||
|
pdfVersion?: PDFVersion;
|
||||||
|
pageMode?: PageMode;
|
||||||
|
pageLayout?: PageLayout;
|
||||||
|
ownerPassword?: string;
|
||||||
|
userPassword?: string;
|
||||||
|
permissions?: Permissions;
|
||||||
|
onRender?: (props: OnRenderProps) => any;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This component represent the PDF document itself. It must be the root
|
||||||
|
* of your tree element structure, and under no circumstances should it be
|
||||||
|
* used as children of another react-pdf component. In addition, it should
|
||||||
|
* only have childs of type <Page />.
|
||||||
|
*/
|
||||||
|
export class Document extends React.Component<
|
||||||
|
React.PropsWithChildren<DocumentProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface NodeProps {
|
||||||
|
id?: string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
/**
|
||||||
|
* Render component in all wrapped pages.
|
||||||
|
* @see https://react-pdf.org/advanced#fixed-components
|
||||||
|
*/
|
||||||
|
fixed?: boolean;
|
||||||
|
/**
|
||||||
|
* Force the wrapping algorithm to start a new page when rendering the
|
||||||
|
* element.
|
||||||
|
* @see https://react-pdf.org/advanced#page-breaks
|
||||||
|
*/
|
||||||
|
break?: boolean;
|
||||||
|
/**
|
||||||
|
* Hint that no page wrapping should occur between all sibling elements following the element within n points
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
minPresenceAhead?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable page wrapping for this page.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
size?: PageSize;
|
||||||
|
orientation?: Orientation;
|
||||||
|
dpi?: number;
|
||||||
|
bookmark?: Bookmark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents single page inside the PDF document, or a subset of them if
|
||||||
|
* using the wrapping feature. A <Document /> can contain as many pages as
|
||||||
|
* you want, but ensure not rendering a page inside any component besides
|
||||||
|
* Document.
|
||||||
|
*/
|
||||||
|
export class Page extends React.Component<
|
||||||
|
React.PropsWithChildren<PageProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ViewProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The most fundamental component for building a UI and is designed to be
|
||||||
|
* nested inside other views and can have 0 to many children.
|
||||||
|
*/
|
||||||
|
export class View extends React.Component<
|
||||||
|
React.PropsWithChildren<ViewProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BaseImageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* Works like the HTML img sizes attribute.
|
||||||
|
* @example 300
|
||||||
|
* @example "300"
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSrcProp extends BaseImageProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSourceProp extends BaseImageProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageProps = ImageWithSrcProp | ImageWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying network or local (Node only) JPG or
|
||||||
|
* PNG images, as well as base64 encoded image strings.
|
||||||
|
*/
|
||||||
|
export class Image extends React.Component<ImageProps> {}
|
||||||
|
|
||||||
|
interface BaseImageBackgroundProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* @example 300
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
/**
|
||||||
|
* Style applied to the background image.
|
||||||
|
*/
|
||||||
|
imageStyle?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSrcProp extends BaseImageBackgroundProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSourceProp extends BaseImageBackgroundProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageBackgroundProps =
|
||||||
|
| ImageBackgroundWithSrcProp
|
||||||
|
| ImageBackgroundWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying an image behind child content.
|
||||||
|
* Compatible with React Native's ImageBackground component.
|
||||||
|
* @see https://reactnative.dev/docs/imagebackground
|
||||||
|
*/
|
||||||
|
export class ImageBackground extends React.Component<
|
||||||
|
React.PropsWithChildren<ImageBackgroundProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TextProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
totalPages: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
subPageTotalPages: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the bottom of a page or its container.
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
orphans?: number;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the top of a page or its container..
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
widows?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SVGTextProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x: string | number;
|
||||||
|
y: string | number;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying text. Text supports nesting of other
|
||||||
|
* Text or Link components to create inline styling.
|
||||||
|
*/
|
||||||
|
export class Text extends React.Component<
|
||||||
|
React.PropsWithChildren<TextProps> | SVGTextProps
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinkProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
href?: string;
|
||||||
|
src?: string;
|
||||||
|
/**
|
||||||
|
* Extends the clickable area of the link beyond its visible bounds.
|
||||||
|
* Accepts a number (applied to all sides) or an object with top, bottom, left, right.
|
||||||
|
* @see https://reactnative.dev/docs/view#hitslop
|
||||||
|
*/
|
||||||
|
hitSlop?: HitSlop;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying a hyperlink. Link’s can be nested
|
||||||
|
* inside a Text component, or being inside any other valid primitive.
|
||||||
|
*/
|
||||||
|
export class Link extends React.Component<
|
||||||
|
React.PropsWithChildren<LinkProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface FormCommonProps extends NodeProps {
|
||||||
|
name?: string;
|
||||||
|
required?: boolean;
|
||||||
|
noExport?: boolean;
|
||||||
|
readOnly?: boolean;
|
||||||
|
value?: number | string;
|
||||||
|
defaultValue?: number | string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FieldSetProps extends NodeProps {
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class FieldSet extends React.Component<
|
||||||
|
React.PropsWithChildren<FieldSetProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputFormatting {
|
||||||
|
type:
|
||||||
|
| 'date'
|
||||||
|
| 'time'
|
||||||
|
| 'percent'
|
||||||
|
| 'number'
|
||||||
|
| 'zip'
|
||||||
|
| 'zipPlus4'
|
||||||
|
| 'phone'
|
||||||
|
| 'ssn';
|
||||||
|
param?: string;
|
||||||
|
nDec?: number;
|
||||||
|
sepComma?: boolean;
|
||||||
|
negStyle?: 'MinusBlack' | 'Red' | 'ParensBlack' | 'ParensRed';
|
||||||
|
currency?: string;
|
||||||
|
currencyPrepend?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputProps extends FormCommonProps {
|
||||||
|
align?: 'left' | 'center' | 'right';
|
||||||
|
multiline?: boolean;
|
||||||
|
/**
|
||||||
|
* The text will be masked (e.g. with asterisks).
|
||||||
|
*/
|
||||||
|
password?: boolean;
|
||||||
|
/**
|
||||||
|
* If set, text entered in the field is not spell-checked
|
||||||
|
*/
|
||||||
|
noSpell?: boolean;
|
||||||
|
format?: TextInputFormatting;
|
||||||
|
/**
|
||||||
|
* Sets the fontSize (default or 0 means auto sizing)
|
||||||
|
*/
|
||||||
|
fontSize?: number;
|
||||||
|
/**
|
||||||
|
* Sets the maximum length (characters) of the text in the field
|
||||||
|
*/
|
||||||
|
maxLength?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class TextInput extends React.Component<TextInputProps> {}
|
||||||
|
|
||||||
|
interface CheckboxProps extends FormCommonProps {
|
||||||
|
backgroundColor?: string;
|
||||||
|
borderColor?: string;
|
||||||
|
checked?: boolean;
|
||||||
|
onState?: string;
|
||||||
|
offState?: string;
|
||||||
|
xMark?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Checkbox extends React.Component<CheckboxProps> {}
|
||||||
|
|
||||||
|
interface SelectAndListPropsBase extends FormCommonProps {
|
||||||
|
sort?: boolean;
|
||||||
|
edit?: boolean;
|
||||||
|
multiSelect?: boolean;
|
||||||
|
noSpell?: boolean;
|
||||||
|
select?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
type SelectAndListPropsWithEdit = SelectAndListPropsBase & {
|
||||||
|
edit: true | false;
|
||||||
|
noSpell: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListPropsWithNoSpell = SelectAndListPropsBase & {
|
||||||
|
edit: boolean;
|
||||||
|
noSpell: true | false;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListProps =
|
||||||
|
| SelectAndListPropsWithEdit
|
||||||
|
| SelectAndListPropsWithNoSpell;
|
||||||
|
|
||||||
|
export class Select extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
export class List extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
interface NoteProps extends NodeProps {
|
||||||
|
children: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Note extends React.Component<NoteProps> {}
|
||||||
|
|
||||||
|
interface CanvasProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
paint: (
|
||||||
|
painter: any,
|
||||||
|
availableWidth: number,
|
||||||
|
availableHeight: number,
|
||||||
|
) => null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Canvas extends React.Component<CanvasProps> {}
|
||||||
|
|
||||||
|
interface SVGProps extends NodeProps, SVGPresentationAttributes {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
width?: string | number;
|
||||||
|
height?: string | number;
|
||||||
|
viewBox?: string;
|
||||||
|
preserveAspectRatio?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <SVG /> element is a container that defines a new coordinate system and viewport. It is used as the outermost element of SVG documents.
|
||||||
|
*/
|
||||||
|
export class Svg extends React.Component<React.PropsWithChildren<SVGProps>> {}
|
||||||
|
|
||||||
|
interface LineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x1: string | number;
|
||||||
|
x2: string | number;
|
||||||
|
y1: string | number;
|
||||||
|
y2: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Line /> element is used to create a line.
|
||||||
|
*/
|
||||||
|
export class Line extends React.Component<
|
||||||
|
React.PropsWithChildren<LineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolylineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polyline /> element is used to create any shape that consists of only straight lines (that is connected at several points).
|
||||||
|
*/
|
||||||
|
export class Polyline extends React.Component<
|
||||||
|
React.PropsWithChildren<PolylineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolygonProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polygon /> element is used to create a graphic that contains at least three sides.
|
||||||
|
* Polygons are made of straight lines, and the shape is "closed" (all the lines connect up).
|
||||||
|
*/
|
||||||
|
export class Polygon extends React.Component<
|
||||||
|
React.PropsWithChildren<PolygonProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PathProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
d: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Path /> element is the most powerful element in the SVG library of basic shapes. It can be used to create lines, curves, arcs, and more.
|
||||||
|
*/
|
||||||
|
export class Path extends React.Component<
|
||||||
|
React.PropsWithChildren<PathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RectProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
width: string | number;
|
||||||
|
height: string | number;
|
||||||
|
rx?: string | number;
|
||||||
|
ry?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Rect /> element is used to create a rectangle and variations of a rectangle shape.
|
||||||
|
*/
|
||||||
|
export class Rect extends React.Component<
|
||||||
|
React.PropsWithChildren<RectProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface CircleProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Circle /> element is used to create a circle.
|
||||||
|
*/
|
||||||
|
export class Circle extends React.Component<
|
||||||
|
React.PropsWithChildren<CircleProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface EllipseProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
rx: string | number;
|
||||||
|
ry: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Ellipse /> element is used to create an ellipse.
|
||||||
|
* An ellipse is closely related to a circle. The difference is that an ellipse has an x and a y radius that differs from each other, while a circle has equal x and y radius.
|
||||||
|
*/
|
||||||
|
export class Ellipse extends React.Component<
|
||||||
|
React.PropsWithChildren<EllipseProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TspanProps extends SVGPresentationAttributes {
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Tspan /> element defines a subtext within a <Text /> element or another <Tspan /> element.
|
||||||
|
* It allows for adjustment of the style and/or position of that subtext as needed.
|
||||||
|
*/
|
||||||
|
export class Tspan extends React.Component<
|
||||||
|
React.PropsWithChildren<TspanProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface GProps extends SVGPresentationAttributes {
|
||||||
|
style?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <G /> SVG element is a container used to group other SVG elements.
|
||||||
|
* Transformations applied to the <G /> element are performed on its child elements, and its attributes are inherited by its children.
|
||||||
|
*/
|
||||||
|
export class G extends React.Component<React.PropsWithChildren<GProps>> {}
|
||||||
|
|
||||||
|
interface StopProps {
|
||||||
|
offset: string | number;
|
||||||
|
stopColor: string;
|
||||||
|
stopOpacity?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SVG <Stop /> element defines a color and its position to use on a gradient. This element is always a child of a <LinearGradient /> or <RadialGradient /> element
|
||||||
|
*/
|
||||||
|
export class Stop extends React.Component<
|
||||||
|
React.PropsWithChildren<StopProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
|
interface DefsProps {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Defs /> element is used to store graphical objects that will be used at a later time. Objects created inside a <Defs /> element are not rendered directly. To display them you have to reference them
|
||||||
|
*/
|
||||||
|
export class Defs extends React.Component<
|
||||||
|
React.PropsWithChildren<DefsProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ClipPathProps {
|
||||||
|
id?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <ClipPath /> SVG element defines a clipping path, to be used by the clipPath property.
|
||||||
|
* A clipping path restricts the region to which paint can be applied. Conceptually, parts of the drawing that lie outside of the region bounded by the clipping path are not drawn.
|
||||||
|
*/
|
||||||
|
export class ClipPath extends React.Component<
|
||||||
|
React.PropsWithChildren<ClipPathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface MarkerProps {
|
||||||
|
id: string;
|
||||||
|
viewBox?: string;
|
||||||
|
refX?: string | number;
|
||||||
|
refY?: string | number;
|
||||||
|
markerWidth?: string | number;
|
||||||
|
markerHeight?: string | number;
|
||||||
|
orient?: 'auto' | 'auto-start-reverse' | number;
|
||||||
|
markerUnits?: 'strokeWidth' | 'userSpaceOnUse';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Marker /> SVG element defines a graphic used for drawing arrows or polymarkers on a given <Path />, <Line />, <Polyline />, or <Polygon /> element.
|
||||||
|
* Markers can be attached to shapes using the markerStart, markerMid, and markerEnd properties.
|
||||||
|
*/
|
||||||
|
export class Marker extends React.Component<
|
||||||
|
React.PropsWithChildren<MarkerProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinearGradientProps {
|
||||||
|
id: string;
|
||||||
|
x1?: string | number;
|
||||||
|
x2?: string | number;
|
||||||
|
y1?: string | number;
|
||||||
|
y2?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <LinearGradient /> element lets authors define linear gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class LinearGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<LinearGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RadialGradientProps {
|
||||||
|
id: string;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r?: string | number;
|
||||||
|
fx?: string | number;
|
||||||
|
fy?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <RadialGradient /> element lets authors define radial gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class RadialGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<RadialGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BlobProviderParams {
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
loading: boolean;
|
||||||
|
error: Error | null;
|
||||||
|
}
|
||||||
|
interface BlobProviderProps {
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children: (params: BlobProviderParams) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Easy and declarative way of getting document's blob data without
|
||||||
|
* showing it on screen.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class BlobProvider extends React.Component<BlobProviderProps> {}
|
||||||
|
|
||||||
|
interface PDFViewerProps {
|
||||||
|
width?: number | string;
|
||||||
|
height?: number | string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
className?: string;
|
||||||
|
children?: React.ReactElement<DocumentProps>;
|
||||||
|
innerRef?: React.Ref<HTMLIFrameElement>;
|
||||||
|
showToolbar?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iframe PDF viewer for client-side generated documents.
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFViewer extends React.Component<PDFViewerProps> {}
|
||||||
|
|
||||||
|
interface PDFDownloadLinkProps
|
||||||
|
extends Omit<
|
||||||
|
React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
||||||
|
'href' | 'children'
|
||||||
|
> {
|
||||||
|
/** PDF filename. Alias for anchor tag `download` attribute. */
|
||||||
|
fileName?: string;
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children?: React.ReactNode | React.FC<BlobProviderParams>;
|
||||||
|
onClick?: React.AnchorHTMLAttributes<HTMLAnchorElement>['onClick'] &
|
||||||
|
((
|
||||||
|
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>,
|
||||||
|
instance: UsePDFInstance,
|
||||||
|
) => void);
|
||||||
|
ref?: React.Ref<HTMLAnchorElement> | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Anchor tag to enable generate and download PDF documents on the fly.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFDownloadLink extends React.Component<PDFDownloadLinkProps> {}
|
||||||
|
|
||||||
|
interface UsePDFInstance {
|
||||||
|
loading: boolean;
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
error: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* React hook for creating and updating a PDF document instance
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export function usePDF(options?: {
|
||||||
|
document?: React.ReactElement<DocumentProps>;
|
||||||
|
}): [
|
||||||
|
UsePDFInstance,
|
||||||
|
(newDocument: React.ReactElement<DocumentProps>) => void,
|
||||||
|
];
|
||||||
|
|
||||||
|
export const Font: FontStore;
|
||||||
|
|
||||||
|
export const StyleSheet: {
|
||||||
|
create: <T extends Styles>(styles: T) => T;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const version: any;
|
||||||
|
|
||||||
|
export const PDFRenderer: any;
|
||||||
|
|
||||||
|
export const pdf: (initialValue?: React.ReactElement<DocumentProps>) => {
|
||||||
|
container: any;
|
||||||
|
isDirty: () => boolean;
|
||||||
|
toString: () => string;
|
||||||
|
toBlob: () => Promise<Blob>;
|
||||||
|
toBuffer: () => Promise<NodeJS.ReadableStream>;
|
||||||
|
on: (event: 'change', callback: () => void) => void;
|
||||||
|
updateContainer: (
|
||||||
|
document: React.ReactElement<any>,
|
||||||
|
callback?: () => void,
|
||||||
|
) => void;
|
||||||
|
removeListener: (event: 'change', callback: () => void) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const renderToStream: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use the `renderToBuffer` method
|
||||||
|
*/
|
||||||
|
export const renderToString: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<string>;
|
||||||
|
|
||||||
|
export const renderToFile: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
filePath: string,
|
||||||
|
callback?: (output: NodeJS.ReadableStream, _filePath: string) => any,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
const render: typeof renderToFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render document into a nodejs buffer
|
||||||
|
* @platform node
|
||||||
|
*/
|
||||||
|
export const renderToBuffer: (
|
||||||
|
document: React.ReactElement<ReactPDF.DocumentProps>,
|
||||||
|
) => Promise<Buffer>;
|
||||||
|
}
|
||||||
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.browser.d.ts
generated
vendored
Normal file
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.browser.d.ts
generated
vendored
Normal file
@@ -0,0 +1,793 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
|
|
||||||
|
import * as React from 'react';
|
||||||
|
import {
|
||||||
|
Style,
|
||||||
|
PageSize,
|
||||||
|
FontStore,
|
||||||
|
PDFVersion,
|
||||||
|
Orientation,
|
||||||
|
SourceObject,
|
||||||
|
SrcSet,
|
||||||
|
Sizes,
|
||||||
|
HyphenationCallback,
|
||||||
|
SVGPresentationAttributes,
|
||||||
|
Bookmark,
|
||||||
|
PageLayout,
|
||||||
|
PageMode,
|
||||||
|
HitSlop,
|
||||||
|
} from '@react-pdf/types';
|
||||||
|
|
||||||
|
declare class ReactPDF {
|
||||||
|
static default: typeof ReactPDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = ReactPDF;
|
||||||
|
|
||||||
|
declare namespace ReactPDF {
|
||||||
|
interface Styles {
|
||||||
|
[key: string]: Style;
|
||||||
|
}
|
||||||
|
interface OnRenderProps {
|
||||||
|
blob?: Blob;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Permissions {
|
||||||
|
printing?: 'lowResolution' | 'highResolution';
|
||||||
|
modifying?: boolean;
|
||||||
|
copying?: boolean;
|
||||||
|
annotating?: boolean;
|
||||||
|
fillingForms?: boolean;
|
||||||
|
contentAccessibility?: boolean;
|
||||||
|
documentAssembly?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DocumentProps {
|
||||||
|
style?: Style | Style[];
|
||||||
|
title?: string;
|
||||||
|
author?: string;
|
||||||
|
subject?: string;
|
||||||
|
creator?: string;
|
||||||
|
keywords?: string;
|
||||||
|
producer?: string;
|
||||||
|
language?: string;
|
||||||
|
creationDate?: Date;
|
||||||
|
modificationDate?: Date;
|
||||||
|
pdfVersion?: PDFVersion;
|
||||||
|
pageMode?: PageMode;
|
||||||
|
pageLayout?: PageLayout;
|
||||||
|
ownerPassword?: string;
|
||||||
|
userPassword?: string;
|
||||||
|
permissions?: Permissions;
|
||||||
|
onRender?: (props: OnRenderProps) => any;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This component represent the PDF document itself. It must be the root
|
||||||
|
* of your tree element structure, and under no circumstances should it be
|
||||||
|
* used as children of another react-pdf component. In addition, it should
|
||||||
|
* only have childs of type <Page />.
|
||||||
|
*/
|
||||||
|
export class Document extends React.Component<
|
||||||
|
React.PropsWithChildren<DocumentProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface NodeProps {
|
||||||
|
id?: string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
/**
|
||||||
|
* Render component in all wrapped pages.
|
||||||
|
* @see https://react-pdf.org/advanced#fixed-components
|
||||||
|
*/
|
||||||
|
fixed?: boolean;
|
||||||
|
/**
|
||||||
|
* Force the wrapping algorithm to start a new page when rendering the
|
||||||
|
* element.
|
||||||
|
* @see https://react-pdf.org/advanced#page-breaks
|
||||||
|
*/
|
||||||
|
break?: boolean;
|
||||||
|
/**
|
||||||
|
* Hint that no page wrapping should occur between all sibling elements following the element within n points
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
minPresenceAhead?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable page wrapping for this page.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
size?: PageSize;
|
||||||
|
orientation?: Orientation;
|
||||||
|
dpi?: number;
|
||||||
|
bookmark?: Bookmark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents single page inside the PDF document, or a subset of them if
|
||||||
|
* using the wrapping feature. A <Document /> can contain as many pages as
|
||||||
|
* you want, but ensure not rendering a page inside any component besides
|
||||||
|
* Document.
|
||||||
|
*/
|
||||||
|
export class Page extends React.Component<
|
||||||
|
React.PropsWithChildren<PageProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ViewProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The most fundamental component for building a UI and is designed to be
|
||||||
|
* nested inside other views and can have 0 to many children.
|
||||||
|
*/
|
||||||
|
export class View extends React.Component<
|
||||||
|
React.PropsWithChildren<ViewProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BaseImageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* Works like the HTML img sizes attribute.
|
||||||
|
* @example 300
|
||||||
|
* @example "300"
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSrcProp extends BaseImageProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSourceProp extends BaseImageProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageProps = ImageWithSrcProp | ImageWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying network or local (Node only) JPG or
|
||||||
|
* PNG images, as well as base64 encoded image strings.
|
||||||
|
*/
|
||||||
|
export class Image extends React.Component<ImageProps> {}
|
||||||
|
|
||||||
|
interface BaseImageBackgroundProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* @example 300
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
/**
|
||||||
|
* Style applied to the background image.
|
||||||
|
*/
|
||||||
|
imageStyle?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSrcProp extends BaseImageBackgroundProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSourceProp extends BaseImageBackgroundProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageBackgroundProps =
|
||||||
|
| ImageBackgroundWithSrcProp
|
||||||
|
| ImageBackgroundWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying an image behind child content.
|
||||||
|
* Compatible with React Native's ImageBackground component.
|
||||||
|
* @see https://reactnative.dev/docs/imagebackground
|
||||||
|
*/
|
||||||
|
export class ImageBackground extends React.Component<
|
||||||
|
React.PropsWithChildren<ImageBackgroundProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TextProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
totalPages: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
subPageTotalPages: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the bottom of a page or its container.
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
orphans?: number;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the top of a page or its container..
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
widows?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SVGTextProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x: string | number;
|
||||||
|
y: string | number;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying text. Text supports nesting of other
|
||||||
|
* Text or Link components to create inline styling.
|
||||||
|
*/
|
||||||
|
export class Text extends React.Component<
|
||||||
|
React.PropsWithChildren<TextProps> | SVGTextProps
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinkProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
href?: string;
|
||||||
|
src?: string;
|
||||||
|
/**
|
||||||
|
* Extends the clickable area of the link beyond its visible bounds.
|
||||||
|
* Accepts a number (applied to all sides) or an object with top, bottom, left, right.
|
||||||
|
* @see https://reactnative.dev/docs/view#hitslop
|
||||||
|
*/
|
||||||
|
hitSlop?: HitSlop;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying a hyperlink. Link’s can be nested
|
||||||
|
* inside a Text component, or being inside any other valid primitive.
|
||||||
|
*/
|
||||||
|
export class Link extends React.Component<
|
||||||
|
React.PropsWithChildren<LinkProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface FormCommonProps extends NodeProps {
|
||||||
|
name?: string;
|
||||||
|
required?: boolean;
|
||||||
|
noExport?: boolean;
|
||||||
|
readOnly?: boolean;
|
||||||
|
value?: number | string;
|
||||||
|
defaultValue?: number | string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FieldSetProps extends NodeProps {
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class FieldSet extends React.Component<
|
||||||
|
React.PropsWithChildren<FieldSetProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputFormatting {
|
||||||
|
type:
|
||||||
|
| 'date'
|
||||||
|
| 'time'
|
||||||
|
| 'percent'
|
||||||
|
| 'number'
|
||||||
|
| 'zip'
|
||||||
|
| 'zipPlus4'
|
||||||
|
| 'phone'
|
||||||
|
| 'ssn';
|
||||||
|
param?: string;
|
||||||
|
nDec?: number;
|
||||||
|
sepComma?: boolean;
|
||||||
|
negStyle?: 'MinusBlack' | 'Red' | 'ParensBlack' | 'ParensRed';
|
||||||
|
currency?: string;
|
||||||
|
currencyPrepend?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputProps extends FormCommonProps {
|
||||||
|
align?: 'left' | 'center' | 'right';
|
||||||
|
multiline?: boolean;
|
||||||
|
/**
|
||||||
|
* The text will be masked (e.g. with asterisks).
|
||||||
|
*/
|
||||||
|
password?: boolean;
|
||||||
|
/**
|
||||||
|
* If set, text entered in the field is not spell-checked
|
||||||
|
*/
|
||||||
|
noSpell?: boolean;
|
||||||
|
format?: TextInputFormatting;
|
||||||
|
/**
|
||||||
|
* Sets the fontSize (default or 0 means auto sizing)
|
||||||
|
*/
|
||||||
|
fontSize?: number;
|
||||||
|
/**
|
||||||
|
* Sets the maximum length (characters) of the text in the field
|
||||||
|
*/
|
||||||
|
maxLength?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class TextInput extends React.Component<TextInputProps> {}
|
||||||
|
|
||||||
|
interface CheckboxProps extends FormCommonProps {
|
||||||
|
backgroundColor?: string;
|
||||||
|
borderColor?: string;
|
||||||
|
checked?: boolean;
|
||||||
|
onState?: string;
|
||||||
|
offState?: string;
|
||||||
|
xMark?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Checkbox extends React.Component<CheckboxProps> {}
|
||||||
|
|
||||||
|
interface SelectAndListPropsBase extends FormCommonProps {
|
||||||
|
sort?: boolean;
|
||||||
|
edit?: boolean;
|
||||||
|
multiSelect?: boolean;
|
||||||
|
noSpell?: boolean;
|
||||||
|
select?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
type SelectAndListPropsWithEdit = SelectAndListPropsBase & {
|
||||||
|
edit: true | false;
|
||||||
|
noSpell: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListPropsWithNoSpell = SelectAndListPropsBase & {
|
||||||
|
edit: boolean;
|
||||||
|
noSpell: true | false;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListProps =
|
||||||
|
| SelectAndListPropsWithEdit
|
||||||
|
| SelectAndListPropsWithNoSpell;
|
||||||
|
|
||||||
|
export class Select extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
export class List extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
interface NoteProps extends NodeProps {
|
||||||
|
children: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Note extends React.Component<NoteProps> {}
|
||||||
|
|
||||||
|
interface CanvasProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
paint: (
|
||||||
|
painter: any,
|
||||||
|
availableWidth: number,
|
||||||
|
availableHeight: number,
|
||||||
|
) => null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Canvas extends React.Component<CanvasProps> {}
|
||||||
|
|
||||||
|
interface SVGProps extends NodeProps, SVGPresentationAttributes {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
width?: string | number;
|
||||||
|
height?: string | number;
|
||||||
|
viewBox?: string;
|
||||||
|
preserveAspectRatio?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <SVG /> element is a container that defines a new coordinate system and viewport. It is used as the outermost element of SVG documents.
|
||||||
|
*/
|
||||||
|
export class Svg extends React.Component<React.PropsWithChildren<SVGProps>> {}
|
||||||
|
|
||||||
|
interface LineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x1: string | number;
|
||||||
|
x2: string | number;
|
||||||
|
y1: string | number;
|
||||||
|
y2: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Line /> element is used to create a line.
|
||||||
|
*/
|
||||||
|
export class Line extends React.Component<
|
||||||
|
React.PropsWithChildren<LineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolylineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polyline /> element is used to create any shape that consists of only straight lines (that is connected at several points).
|
||||||
|
*/
|
||||||
|
export class Polyline extends React.Component<
|
||||||
|
React.PropsWithChildren<PolylineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolygonProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polygon /> element is used to create a graphic that contains at least three sides.
|
||||||
|
* Polygons are made of straight lines, and the shape is "closed" (all the lines connect up).
|
||||||
|
*/
|
||||||
|
export class Polygon extends React.Component<
|
||||||
|
React.PropsWithChildren<PolygonProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PathProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
d: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Path /> element is the most powerful element in the SVG library of basic shapes. It can be used to create lines, curves, arcs, and more.
|
||||||
|
*/
|
||||||
|
export class Path extends React.Component<
|
||||||
|
React.PropsWithChildren<PathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RectProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
width: string | number;
|
||||||
|
height: string | number;
|
||||||
|
rx?: string | number;
|
||||||
|
ry?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Rect /> element is used to create a rectangle and variations of a rectangle shape.
|
||||||
|
*/
|
||||||
|
export class Rect extends React.Component<
|
||||||
|
React.PropsWithChildren<RectProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface CircleProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Circle /> element is used to create a circle.
|
||||||
|
*/
|
||||||
|
export class Circle extends React.Component<
|
||||||
|
React.PropsWithChildren<CircleProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface EllipseProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
rx: string | number;
|
||||||
|
ry: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Ellipse /> element is used to create an ellipse.
|
||||||
|
* An ellipse is closely related to a circle. The difference is that an ellipse has an x and a y radius that differs from each other, while a circle has equal x and y radius.
|
||||||
|
*/
|
||||||
|
export class Ellipse extends React.Component<
|
||||||
|
React.PropsWithChildren<EllipseProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TspanProps extends SVGPresentationAttributes {
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Tspan /> element defines a subtext within a <Text /> element or another <Tspan /> element.
|
||||||
|
* It allows for adjustment of the style and/or position of that subtext as needed.
|
||||||
|
*/
|
||||||
|
export class Tspan extends React.Component<
|
||||||
|
React.PropsWithChildren<TspanProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface GProps extends SVGPresentationAttributes {
|
||||||
|
style?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <G /> SVG element is a container used to group other SVG elements.
|
||||||
|
* Transformations applied to the <G /> element are performed on its child elements, and its attributes are inherited by its children.
|
||||||
|
*/
|
||||||
|
export class G extends React.Component<React.PropsWithChildren<GProps>> {}
|
||||||
|
|
||||||
|
interface StopProps {
|
||||||
|
offset: string | number;
|
||||||
|
stopColor: string;
|
||||||
|
stopOpacity?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SVG <Stop /> element defines a color and its position to use on a gradient. This element is always a child of a <LinearGradient /> or <RadialGradient /> element
|
||||||
|
*/
|
||||||
|
export class Stop extends React.Component<
|
||||||
|
React.PropsWithChildren<StopProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
|
interface DefsProps {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Defs /> element is used to store graphical objects that will be used at a later time. Objects created inside a <Defs /> element are not rendered directly. To display them you have to reference them
|
||||||
|
*/
|
||||||
|
export class Defs extends React.Component<
|
||||||
|
React.PropsWithChildren<DefsProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ClipPathProps {
|
||||||
|
id?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <ClipPath /> SVG element defines a clipping path, to be used by the clipPath property.
|
||||||
|
* A clipping path restricts the region to which paint can be applied. Conceptually, parts of the drawing that lie outside of the region bounded by the clipping path are not drawn.
|
||||||
|
*/
|
||||||
|
export class ClipPath extends React.Component<
|
||||||
|
React.PropsWithChildren<ClipPathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface MarkerProps {
|
||||||
|
id: string;
|
||||||
|
viewBox?: string;
|
||||||
|
refX?: string | number;
|
||||||
|
refY?: string | number;
|
||||||
|
markerWidth?: string | number;
|
||||||
|
markerHeight?: string | number;
|
||||||
|
orient?: 'auto' | 'auto-start-reverse' | number;
|
||||||
|
markerUnits?: 'strokeWidth' | 'userSpaceOnUse';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Marker /> SVG element defines a graphic used for drawing arrows or polymarkers on a given <Path />, <Line />, <Polyline />, or <Polygon /> element.
|
||||||
|
* Markers can be attached to shapes using the markerStart, markerMid, and markerEnd properties.
|
||||||
|
*/
|
||||||
|
export class Marker extends React.Component<
|
||||||
|
React.PropsWithChildren<MarkerProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinearGradientProps {
|
||||||
|
id: string;
|
||||||
|
x1?: string | number;
|
||||||
|
x2?: string | number;
|
||||||
|
y1?: string | number;
|
||||||
|
y2?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <LinearGradient /> element lets authors define linear gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class LinearGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<LinearGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RadialGradientProps {
|
||||||
|
id: string;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r?: string | number;
|
||||||
|
fx?: string | number;
|
||||||
|
fy?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <RadialGradient /> element lets authors define radial gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class RadialGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<RadialGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BlobProviderParams {
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
loading: boolean;
|
||||||
|
error: Error | null;
|
||||||
|
}
|
||||||
|
interface BlobProviderProps {
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children: (params: BlobProviderParams) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Easy and declarative way of getting document's blob data without
|
||||||
|
* showing it on screen.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class BlobProvider extends React.Component<BlobProviderProps> {}
|
||||||
|
|
||||||
|
interface PDFViewerProps {
|
||||||
|
width?: number | string;
|
||||||
|
height?: number | string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
className?: string;
|
||||||
|
children?: React.ReactElement<DocumentProps>;
|
||||||
|
innerRef?: React.Ref<HTMLIFrameElement>;
|
||||||
|
showToolbar?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iframe PDF viewer for client-side generated documents.
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFViewer extends React.Component<PDFViewerProps> {}
|
||||||
|
|
||||||
|
interface PDFDownloadLinkProps
|
||||||
|
extends Omit<
|
||||||
|
React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
||||||
|
'href' | 'children'
|
||||||
|
> {
|
||||||
|
/** PDF filename. Alias for anchor tag `download` attribute. */
|
||||||
|
fileName?: string;
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children?: React.ReactNode | React.FC<BlobProviderParams>;
|
||||||
|
onClick?: React.AnchorHTMLAttributes<HTMLAnchorElement>['onClick'] &
|
||||||
|
((
|
||||||
|
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>,
|
||||||
|
instance: UsePDFInstance,
|
||||||
|
) => void);
|
||||||
|
ref?: React.Ref<HTMLAnchorElement> | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Anchor tag to enable generate and download PDF documents on the fly.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFDownloadLink extends React.Component<PDFDownloadLinkProps> {}
|
||||||
|
|
||||||
|
interface UsePDFInstance {
|
||||||
|
loading: boolean;
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
error: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* React hook for creating and updating a PDF document instance
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export function usePDF(options?: {
|
||||||
|
document?: React.ReactElement<DocumentProps>;
|
||||||
|
}): [
|
||||||
|
UsePDFInstance,
|
||||||
|
(newDocument: React.ReactElement<DocumentProps>) => void,
|
||||||
|
];
|
||||||
|
|
||||||
|
export const Font: FontStore;
|
||||||
|
|
||||||
|
export const StyleSheet: {
|
||||||
|
create: <T extends Styles>(styles: T) => T;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const version: any;
|
||||||
|
|
||||||
|
export const PDFRenderer: any;
|
||||||
|
|
||||||
|
export const pdf: (initialValue?: React.ReactElement<DocumentProps>) => {
|
||||||
|
container: any;
|
||||||
|
isDirty: () => boolean;
|
||||||
|
toString: () => string;
|
||||||
|
toBlob: () => Promise<Blob>;
|
||||||
|
toBuffer: () => Promise<NodeJS.ReadableStream>;
|
||||||
|
on: (event: 'change', callback: () => void) => void;
|
||||||
|
updateContainer: (
|
||||||
|
document: React.ReactElement<any>,
|
||||||
|
callback?: () => void,
|
||||||
|
) => void;
|
||||||
|
removeListener: (event: 'change', callback: () => void) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const renderToStream: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use the `renderToBuffer` method
|
||||||
|
*/
|
||||||
|
export const renderToString: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<string>;
|
||||||
|
|
||||||
|
export const renderToFile: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
filePath: string,
|
||||||
|
callback?: (output: NodeJS.ReadableStream, _filePath: string) => any,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
const render: typeof renderToFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render document into a nodejs buffer
|
||||||
|
* @platform node
|
||||||
|
*/
|
||||||
|
export const renderToBuffer: (
|
||||||
|
document: React.ReactElement<ReactPDF.DocumentProps>,
|
||||||
|
) => Promise<Buffer>;
|
||||||
|
}
|
||||||
473
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.browser.js
generated
vendored
Normal file
473
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.browser.js
generated
vendored
Normal file
@@ -0,0 +1,473 @@
|
|||||||
|
import * as primitives from '@react-pdf/primitives';
|
||||||
|
export * from '@react-pdf/primitives';
|
||||||
|
import queue from 'queue';
|
||||||
|
import { useRef, useState, useEffect, useCallback, forwardRef } from 'react';
|
||||||
|
import FontStore from '@react-pdf/font';
|
||||||
|
import renderPDF from '@react-pdf/render';
|
||||||
|
import PDFDocument from '@react-pdf/pdfkit';
|
||||||
|
import layoutDocument from '@react-pdf/layout';
|
||||||
|
import { upperFirst } from '@react-pdf/fns';
|
||||||
|
import Reconciler from '@react-pdf/reconciler';
|
||||||
|
import { jsx } from 'react/jsx-runtime';
|
||||||
|
|
||||||
|
const omitNils = object => Object.fromEntries(Object.entries(object).filter(_ref => {
|
||||||
|
let [, value] = _ref;
|
||||||
|
return value !== undefined;
|
||||||
|
}));
|
||||||
|
|
||||||
|
const createInstance = (type, _ref) => {
|
||||||
|
let {
|
||||||
|
style,
|
||||||
|
children,
|
||||||
|
...props
|
||||||
|
} = _ref;
|
||||||
|
return {
|
||||||
|
type,
|
||||||
|
box: {},
|
||||||
|
style: style || {},
|
||||||
|
props: props || {},
|
||||||
|
children: []
|
||||||
|
};
|
||||||
|
};
|
||||||
|
const createTextInstance = text => ({
|
||||||
|
type: 'TEXT_INSTANCE',
|
||||||
|
value: text
|
||||||
|
});
|
||||||
|
const appendChild = (parent, child) => {
|
||||||
|
const isParentText = parent.type === 'TEXT' || parent.type === 'LINK' || parent.type === 'TSPAN' || parent.type === 'NOTE';
|
||||||
|
const isChildTextInstance = child.type === 'TEXT_INSTANCE';
|
||||||
|
const isOrphanTextInstance = isChildTextInstance && !isParentText;
|
||||||
|
|
||||||
|
// Ignore orphan text instances.
|
||||||
|
// Caused by cases such as <>{name && <Text>{name}</Text>}</>
|
||||||
|
if (isOrphanTextInstance) {
|
||||||
|
console.warn(`Invalid '${child.value}' string child outside <Text> component`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
parent.children.push(child);
|
||||||
|
};
|
||||||
|
const appendChildToContainer = (parentInstance, child) => {
|
||||||
|
if (parentInstance.type === 'ROOT') {
|
||||||
|
parentInstance.document = child;
|
||||||
|
} else {
|
||||||
|
appendChild(parentInstance, child);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const insertBefore = (parentInstance, child, beforeChild) => {
|
||||||
|
var _parentInstance$child;
|
||||||
|
const index = (_parentInstance$child = parentInstance.children) === null || _parentInstance$child === void 0 ? void 0 : _parentInstance$child.indexOf(beforeChild);
|
||||||
|
if (index === undefined) return;
|
||||||
|
if (index !== -1 && child) parentInstance.children.splice(index, 0, child);
|
||||||
|
};
|
||||||
|
const removeChild = (parentInstance, child) => {
|
||||||
|
var _parentInstance$child2;
|
||||||
|
const index = (_parentInstance$child2 = parentInstance.children) === null || _parentInstance$child2 === void 0 ? void 0 : _parentInstance$child2.indexOf(child);
|
||||||
|
if (index === undefined) return;
|
||||||
|
if (index !== -1) parentInstance.children.splice(index, 1);
|
||||||
|
};
|
||||||
|
const removeChildFromContainer = (parentInstance, child) => {
|
||||||
|
var _parentInstance$child3;
|
||||||
|
const index = (_parentInstance$child3 = parentInstance.children) === null || _parentInstance$child3 === void 0 ? void 0 : _parentInstance$child3.indexOf(child);
|
||||||
|
if (index === undefined) return;
|
||||||
|
if (index !== -1) parentInstance.children.splice(index, 1);
|
||||||
|
};
|
||||||
|
const commitTextUpdate = (textInstance, oldText, newText) => {
|
||||||
|
textInstance.value = newText;
|
||||||
|
};
|
||||||
|
const commitUpdate = (instance, updatePayload, type, oldProps, newProps) => {
|
||||||
|
const {
|
||||||
|
style,
|
||||||
|
...props
|
||||||
|
} = newProps;
|
||||||
|
instance.props = props;
|
||||||
|
instance.style = style;
|
||||||
|
};
|
||||||
|
const createRenderer = _ref2 => {
|
||||||
|
let {
|
||||||
|
onChange = () => {}
|
||||||
|
} = _ref2;
|
||||||
|
return Reconciler({
|
||||||
|
appendChild,
|
||||||
|
appendChildToContainer,
|
||||||
|
commitTextUpdate,
|
||||||
|
commitUpdate,
|
||||||
|
createInstance,
|
||||||
|
createTextInstance,
|
||||||
|
insertBefore,
|
||||||
|
removeChild,
|
||||||
|
removeChildFromContainer,
|
||||||
|
resetAfterCommit: onChange
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var version$1 = "4.5.1";
|
||||||
|
var packageJson = {
|
||||||
|
version: version$1};
|
||||||
|
|
||||||
|
const {
|
||||||
|
version
|
||||||
|
} = packageJson;
|
||||||
|
const fontStore = new FontStore();
|
||||||
|
|
||||||
|
// We must keep a single renderer instance, otherwise React will complain
|
||||||
|
let renderer;
|
||||||
|
|
||||||
|
// The pdf instance acts as an event emitter for DOM usage.
|
||||||
|
// We only want to trigger an update when PDF content changes
|
||||||
|
const events = {};
|
||||||
|
const pdf = initialValue => {
|
||||||
|
const onChange = () => {
|
||||||
|
var _events$change;
|
||||||
|
const listeners = ((_events$change = events.change) === null || _events$change === void 0 ? void 0 : _events$change.slice()) || [];
|
||||||
|
for (let i = 0; i < listeners.length; i += 1) listeners[i]();
|
||||||
|
};
|
||||||
|
const container = {
|
||||||
|
type: 'ROOT',
|
||||||
|
document: null
|
||||||
|
};
|
||||||
|
renderer = renderer || createRenderer({
|
||||||
|
onChange
|
||||||
|
});
|
||||||
|
const mountNode = renderer.createContainer(container);
|
||||||
|
const updateContainer = (doc, callback) => {
|
||||||
|
renderer.updateContainer(doc, mountNode, null, callback);
|
||||||
|
};
|
||||||
|
if (initialValue) updateContainer(initialValue);
|
||||||
|
const render = async function (compress) {
|
||||||
|
if (compress === void 0) {
|
||||||
|
compress = true;
|
||||||
|
}
|
||||||
|
const props = container.document.props || {};
|
||||||
|
const {
|
||||||
|
pdfVersion,
|
||||||
|
language,
|
||||||
|
pageLayout,
|
||||||
|
pageMode,
|
||||||
|
title,
|
||||||
|
author,
|
||||||
|
subject,
|
||||||
|
keywords,
|
||||||
|
creator = 'react-pdf',
|
||||||
|
producer = 'react-pdf',
|
||||||
|
creationDate = new Date(),
|
||||||
|
modificationDate,
|
||||||
|
ownerPassword,
|
||||||
|
userPassword,
|
||||||
|
permissions
|
||||||
|
} = props;
|
||||||
|
const ctx = new PDFDocument({
|
||||||
|
compress,
|
||||||
|
pdfVersion,
|
||||||
|
lang: language,
|
||||||
|
displayTitle: true,
|
||||||
|
autoFirstPage: false,
|
||||||
|
ownerPassword,
|
||||||
|
userPassword,
|
||||||
|
permissions,
|
||||||
|
pageLayout,
|
||||||
|
info: omitNils({
|
||||||
|
Title: title,
|
||||||
|
Author: author,
|
||||||
|
Subject: subject,
|
||||||
|
Keywords: keywords,
|
||||||
|
Creator: creator,
|
||||||
|
Producer: producer,
|
||||||
|
CreationDate: creationDate,
|
||||||
|
ModificationDate: modificationDate
|
||||||
|
})
|
||||||
|
});
|
||||||
|
if (pageMode) {
|
||||||
|
ctx._root.data.PageMode = upperFirst(pageMode);
|
||||||
|
}
|
||||||
|
const layout = await layoutDocument(container.document, fontStore);
|
||||||
|
const fileStream = renderPDF(ctx, layout);
|
||||||
|
return {
|
||||||
|
layout,
|
||||||
|
fileStream
|
||||||
|
};
|
||||||
|
};
|
||||||
|
const callOnRender = function (params) {
|
||||||
|
if (params === void 0) {
|
||||||
|
params = {};
|
||||||
|
}
|
||||||
|
if (container.document.props.onRender) {
|
||||||
|
container.document.props.onRender(params);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const toBlob = async () => {
|
||||||
|
const chunks = [];
|
||||||
|
const {
|
||||||
|
layout: _INTERNAL__LAYOUT__DATA_,
|
||||||
|
fileStream: instance
|
||||||
|
} = await render();
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
instance.on('data', chunk => {
|
||||||
|
chunks.push(chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk));
|
||||||
|
});
|
||||||
|
instance.on('end', () => {
|
||||||
|
try {
|
||||||
|
const blob = new Blob(chunks, {
|
||||||
|
type: 'application/pdf'
|
||||||
|
});
|
||||||
|
callOnRender({
|
||||||
|
blob,
|
||||||
|
_INTERNAL__LAYOUT__DATA_
|
||||||
|
});
|
||||||
|
resolve(blob);
|
||||||
|
} catch (error) {
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// TODO: rename this method to `toStream` in next major release, because it return stream not a buffer
|
||||||
|
const toBuffer = async () => {
|
||||||
|
const {
|
||||||
|
layout: _INTERNAL__LAYOUT__DATA_,
|
||||||
|
fileStream
|
||||||
|
} = await render();
|
||||||
|
callOnRender({
|
||||||
|
_INTERNAL__LAYOUT__DATA_
|
||||||
|
});
|
||||||
|
return fileStream;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TODO: remove this method in next major release. it is buggy
|
||||||
|
* see
|
||||||
|
* - https://github.com/diegomura/react-pdf/issues/2112
|
||||||
|
* - https://github.com/diegomura/react-pdf/issues/2095
|
||||||
|
*/
|
||||||
|
const toString = async () => {
|
||||||
|
if (process.env.NODE_ENV === 'development') {
|
||||||
|
console.warn('`toString` is deprecated and will be removed in next major release');
|
||||||
|
}
|
||||||
|
let result = '';
|
||||||
|
const {
|
||||||
|
fileStream: instance
|
||||||
|
} = await render(false); // For some reason, when rendering to string if compress=true the document is blank
|
||||||
|
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
try {
|
||||||
|
instance.on('data', buffer => {
|
||||||
|
result += buffer;
|
||||||
|
});
|
||||||
|
instance.on('end', () => {
|
||||||
|
callOnRender();
|
||||||
|
resolve(result);
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const on = (event, listener) => {
|
||||||
|
if (!events[event]) events[event] = [];
|
||||||
|
events[event].push(listener);
|
||||||
|
};
|
||||||
|
const removeListener = (event, listener) => {
|
||||||
|
if (!events[event]) return;
|
||||||
|
const idx = events[event].indexOf(listener);
|
||||||
|
if (idx > -1) events[event].splice(idx, 1);
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
on,
|
||||||
|
container,
|
||||||
|
toBlob,
|
||||||
|
toBuffer,
|
||||||
|
toString,
|
||||||
|
removeListener,
|
||||||
|
updateContainer
|
||||||
|
};
|
||||||
|
};
|
||||||
|
const Font = fontStore;
|
||||||
|
const StyleSheet = {
|
||||||
|
create: s => s
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PDF hook
|
||||||
|
*
|
||||||
|
* @param {Object} [options] hook options
|
||||||
|
* @returns {[Object, Function]} pdf state and update function
|
||||||
|
*/
|
||||||
|
const usePDF = function (_temp) {
|
||||||
|
let {
|
||||||
|
document
|
||||||
|
} = _temp === void 0 ? {} : _temp;
|
||||||
|
const pdfInstance = useRef(null);
|
||||||
|
const [state, setState] = useState({
|
||||||
|
url: null,
|
||||||
|
blob: null,
|
||||||
|
error: null,
|
||||||
|
loading: !!document
|
||||||
|
});
|
||||||
|
|
||||||
|
// Setup rendering queue
|
||||||
|
useEffect(() => {
|
||||||
|
const renderQueue = queue({
|
||||||
|
autostart: true,
|
||||||
|
concurrency: 1
|
||||||
|
});
|
||||||
|
const queueDocumentRender = () => {
|
||||||
|
setState(prev => ({
|
||||||
|
...prev,
|
||||||
|
loading: true
|
||||||
|
}));
|
||||||
|
renderQueue.splice(0, renderQueue.length, () => state.error ? Promise.resolve() : pdfInstance.current.toBlob());
|
||||||
|
};
|
||||||
|
const onRenderFailed = error => {
|
||||||
|
console.error(error);
|
||||||
|
setState(prev => ({
|
||||||
|
...prev,
|
||||||
|
loading: false,
|
||||||
|
error
|
||||||
|
}));
|
||||||
|
};
|
||||||
|
const onRenderSuccessful = blob => {
|
||||||
|
setState({
|
||||||
|
blob,
|
||||||
|
error: null,
|
||||||
|
loading: false,
|
||||||
|
url: URL.createObjectURL(blob)
|
||||||
|
});
|
||||||
|
};
|
||||||
|
pdfInstance.current = pdf();
|
||||||
|
pdfInstance.current.on('change', queueDocumentRender);
|
||||||
|
if (document) {
|
||||||
|
pdfInstance.current.updateContainer(document);
|
||||||
|
}
|
||||||
|
renderQueue.on('error', onRenderFailed);
|
||||||
|
renderQueue.on('success', onRenderSuccessful);
|
||||||
|
return () => {
|
||||||
|
renderQueue.end();
|
||||||
|
pdfInstance.current.removeListener('change', queueDocumentRender);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// Revoke old unused url instances
|
||||||
|
useEffect(() => {
|
||||||
|
return () => {
|
||||||
|
if (state.url) {
|
||||||
|
URL.revokeObjectURL(state.url);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}, [state.url]);
|
||||||
|
const update = useCallback(newDoc => {
|
||||||
|
pdfInstance.current.updateContainer(newDoc);
|
||||||
|
}, []);
|
||||||
|
return [state, update];
|
||||||
|
};
|
||||||
|
|
||||||
|
const PDFViewer = _ref => {
|
||||||
|
let {
|
||||||
|
title,
|
||||||
|
style,
|
||||||
|
className,
|
||||||
|
children,
|
||||||
|
innerRef,
|
||||||
|
showToolbar = true,
|
||||||
|
...props
|
||||||
|
} = _ref;
|
||||||
|
const [instance, updateInstance] = usePDF();
|
||||||
|
useEffect(() => updateInstance(children), [children]);
|
||||||
|
const src = instance.url ? `${instance.url}#toolbar=${showToolbar ? 1 : 0}` : null;
|
||||||
|
return /*#__PURE__*/jsx("iframe", {
|
||||||
|
src: src,
|
||||||
|
title: title,
|
||||||
|
ref: innerRef,
|
||||||
|
style: style,
|
||||||
|
className: className,
|
||||||
|
...props
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const BlobProvider = _ref => {
|
||||||
|
let {
|
||||||
|
document: doc,
|
||||||
|
children
|
||||||
|
} = _ref;
|
||||||
|
const [instance, updateInstance] = usePDF();
|
||||||
|
useEffect(() => updateInstance(doc), [doc]);
|
||||||
|
if (!doc) {
|
||||||
|
console.warn('You should pass a valid document to BlobProvider');
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return children(instance);
|
||||||
|
};
|
||||||
|
|
||||||
|
const PDFDownloadLinkBase = (_ref, ref) => {
|
||||||
|
let {
|
||||||
|
fileName = 'document.pdf',
|
||||||
|
document: doc,
|
||||||
|
children,
|
||||||
|
onClick,
|
||||||
|
href,
|
||||||
|
...rest
|
||||||
|
} = _ref;
|
||||||
|
const [instance, updateInstance] = usePDF();
|
||||||
|
useEffect(() => updateInstance(doc), [doc]);
|
||||||
|
if (!doc) {
|
||||||
|
console.warn('You should pass a valid document to PDFDownloadLink');
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const handleDownloadIE = () => {
|
||||||
|
if (instance && window.navigator.msSaveBlob) {
|
||||||
|
// IE
|
||||||
|
window.navigator.msSaveBlob(instance.blob, fileName);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleClick = event => {
|
||||||
|
handleDownloadIE();
|
||||||
|
if (typeof onClick === 'function') onClick(event, instance);
|
||||||
|
};
|
||||||
|
return /*#__PURE__*/jsx("a", {
|
||||||
|
href: instance.url,
|
||||||
|
download: fileName,
|
||||||
|
onClick: handleClick,
|
||||||
|
ref: ref,
|
||||||
|
...rest,
|
||||||
|
children: typeof children === 'function' ? children(instance) : children
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const PDFDownloadLink = /*#__PURE__*/forwardRef(PDFDownloadLinkBase);
|
||||||
|
|
||||||
|
const throwEnvironmentError = name => {
|
||||||
|
throw new Error(`${name} is a Node specific API. You're either using this method in a browser, or your bundler is not loading react-pdf from the appropriate web build.`);
|
||||||
|
};
|
||||||
|
const renderToStream = () => {
|
||||||
|
throwEnvironmentError('renderToStream');
|
||||||
|
};
|
||||||
|
const renderToBuffer = () => {
|
||||||
|
throwEnvironmentError('renderToBuffer');
|
||||||
|
};
|
||||||
|
const renderToString = () => {
|
||||||
|
throwEnvironmentError('renderToString');
|
||||||
|
};
|
||||||
|
const renderToFile = () => {
|
||||||
|
throwEnvironmentError('renderToFile');
|
||||||
|
};
|
||||||
|
const render = () => {
|
||||||
|
throwEnvironmentError('render');
|
||||||
|
};
|
||||||
|
|
||||||
|
// TODO: remove this default export in next major release because it breaks tree-shacking
|
||||||
|
var index = {
|
||||||
|
pdf,
|
||||||
|
usePDF,
|
||||||
|
Font,
|
||||||
|
version,
|
||||||
|
StyleSheet,
|
||||||
|
PDFViewer,
|
||||||
|
BlobProvider,
|
||||||
|
PDFDownloadLink,
|
||||||
|
renderToStream,
|
||||||
|
renderToString,
|
||||||
|
renderToFile,
|
||||||
|
render,
|
||||||
|
...primitives
|
||||||
|
};
|
||||||
|
|
||||||
|
export { BlobProvider, Font, PDFDownloadLink, PDFViewer, StyleSheet, createRenderer, index as default, pdf, render, renderToBuffer, renderToFile, renderToStream, renderToString, usePDF, version };
|
||||||
|
//# sourceMappingURL=react-pdf.browser.js.map
|
||||||
1
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.browser.js.map
generated
vendored
Normal file
1
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.browser.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.browser.min.d.cts
generated
vendored
Normal file
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.browser.min.d.cts
generated
vendored
Normal file
@@ -0,0 +1,793 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
|
|
||||||
|
import * as React from 'react';
|
||||||
|
import {
|
||||||
|
Style,
|
||||||
|
PageSize,
|
||||||
|
FontStore,
|
||||||
|
PDFVersion,
|
||||||
|
Orientation,
|
||||||
|
SourceObject,
|
||||||
|
SrcSet,
|
||||||
|
Sizes,
|
||||||
|
HyphenationCallback,
|
||||||
|
SVGPresentationAttributes,
|
||||||
|
Bookmark,
|
||||||
|
PageLayout,
|
||||||
|
PageMode,
|
||||||
|
HitSlop,
|
||||||
|
} from '@react-pdf/types';
|
||||||
|
|
||||||
|
declare class ReactPDF {
|
||||||
|
static default: typeof ReactPDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = ReactPDF;
|
||||||
|
|
||||||
|
declare namespace ReactPDF {
|
||||||
|
interface Styles {
|
||||||
|
[key: string]: Style;
|
||||||
|
}
|
||||||
|
interface OnRenderProps {
|
||||||
|
blob?: Blob;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Permissions {
|
||||||
|
printing?: 'lowResolution' | 'highResolution';
|
||||||
|
modifying?: boolean;
|
||||||
|
copying?: boolean;
|
||||||
|
annotating?: boolean;
|
||||||
|
fillingForms?: boolean;
|
||||||
|
contentAccessibility?: boolean;
|
||||||
|
documentAssembly?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DocumentProps {
|
||||||
|
style?: Style | Style[];
|
||||||
|
title?: string;
|
||||||
|
author?: string;
|
||||||
|
subject?: string;
|
||||||
|
creator?: string;
|
||||||
|
keywords?: string;
|
||||||
|
producer?: string;
|
||||||
|
language?: string;
|
||||||
|
creationDate?: Date;
|
||||||
|
modificationDate?: Date;
|
||||||
|
pdfVersion?: PDFVersion;
|
||||||
|
pageMode?: PageMode;
|
||||||
|
pageLayout?: PageLayout;
|
||||||
|
ownerPassword?: string;
|
||||||
|
userPassword?: string;
|
||||||
|
permissions?: Permissions;
|
||||||
|
onRender?: (props: OnRenderProps) => any;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This component represent the PDF document itself. It must be the root
|
||||||
|
* of your tree element structure, and under no circumstances should it be
|
||||||
|
* used as children of another react-pdf component. In addition, it should
|
||||||
|
* only have childs of type <Page />.
|
||||||
|
*/
|
||||||
|
export class Document extends React.Component<
|
||||||
|
React.PropsWithChildren<DocumentProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface NodeProps {
|
||||||
|
id?: string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
/**
|
||||||
|
* Render component in all wrapped pages.
|
||||||
|
* @see https://react-pdf.org/advanced#fixed-components
|
||||||
|
*/
|
||||||
|
fixed?: boolean;
|
||||||
|
/**
|
||||||
|
* Force the wrapping algorithm to start a new page when rendering the
|
||||||
|
* element.
|
||||||
|
* @see https://react-pdf.org/advanced#page-breaks
|
||||||
|
*/
|
||||||
|
break?: boolean;
|
||||||
|
/**
|
||||||
|
* Hint that no page wrapping should occur between all sibling elements following the element within n points
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
minPresenceAhead?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable page wrapping for this page.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
size?: PageSize;
|
||||||
|
orientation?: Orientation;
|
||||||
|
dpi?: number;
|
||||||
|
bookmark?: Bookmark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents single page inside the PDF document, or a subset of them if
|
||||||
|
* using the wrapping feature. A <Document /> can contain as many pages as
|
||||||
|
* you want, but ensure not rendering a page inside any component besides
|
||||||
|
* Document.
|
||||||
|
*/
|
||||||
|
export class Page extends React.Component<
|
||||||
|
React.PropsWithChildren<PageProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ViewProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The most fundamental component for building a UI and is designed to be
|
||||||
|
* nested inside other views and can have 0 to many children.
|
||||||
|
*/
|
||||||
|
export class View extends React.Component<
|
||||||
|
React.PropsWithChildren<ViewProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BaseImageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* Works like the HTML img sizes attribute.
|
||||||
|
* @example 300
|
||||||
|
* @example "300"
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSrcProp extends BaseImageProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSourceProp extends BaseImageProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageProps = ImageWithSrcProp | ImageWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying network or local (Node only) JPG or
|
||||||
|
* PNG images, as well as base64 encoded image strings.
|
||||||
|
*/
|
||||||
|
export class Image extends React.Component<ImageProps> {}
|
||||||
|
|
||||||
|
interface BaseImageBackgroundProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* @example 300
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
/**
|
||||||
|
* Style applied to the background image.
|
||||||
|
*/
|
||||||
|
imageStyle?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSrcProp extends BaseImageBackgroundProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSourceProp extends BaseImageBackgroundProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageBackgroundProps =
|
||||||
|
| ImageBackgroundWithSrcProp
|
||||||
|
| ImageBackgroundWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying an image behind child content.
|
||||||
|
* Compatible with React Native's ImageBackground component.
|
||||||
|
* @see https://reactnative.dev/docs/imagebackground
|
||||||
|
*/
|
||||||
|
export class ImageBackground extends React.Component<
|
||||||
|
React.PropsWithChildren<ImageBackgroundProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TextProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
totalPages: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
subPageTotalPages: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the bottom of a page or its container.
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
orphans?: number;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the top of a page or its container..
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
widows?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SVGTextProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x: string | number;
|
||||||
|
y: string | number;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying text. Text supports nesting of other
|
||||||
|
* Text or Link components to create inline styling.
|
||||||
|
*/
|
||||||
|
export class Text extends React.Component<
|
||||||
|
React.PropsWithChildren<TextProps> | SVGTextProps
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinkProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
href?: string;
|
||||||
|
src?: string;
|
||||||
|
/**
|
||||||
|
* Extends the clickable area of the link beyond its visible bounds.
|
||||||
|
* Accepts a number (applied to all sides) or an object with top, bottom, left, right.
|
||||||
|
* @see https://reactnative.dev/docs/view#hitslop
|
||||||
|
*/
|
||||||
|
hitSlop?: HitSlop;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying a hyperlink. Link’s can be nested
|
||||||
|
* inside a Text component, or being inside any other valid primitive.
|
||||||
|
*/
|
||||||
|
export class Link extends React.Component<
|
||||||
|
React.PropsWithChildren<LinkProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface FormCommonProps extends NodeProps {
|
||||||
|
name?: string;
|
||||||
|
required?: boolean;
|
||||||
|
noExport?: boolean;
|
||||||
|
readOnly?: boolean;
|
||||||
|
value?: number | string;
|
||||||
|
defaultValue?: number | string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FieldSetProps extends NodeProps {
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class FieldSet extends React.Component<
|
||||||
|
React.PropsWithChildren<FieldSetProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputFormatting {
|
||||||
|
type:
|
||||||
|
| 'date'
|
||||||
|
| 'time'
|
||||||
|
| 'percent'
|
||||||
|
| 'number'
|
||||||
|
| 'zip'
|
||||||
|
| 'zipPlus4'
|
||||||
|
| 'phone'
|
||||||
|
| 'ssn';
|
||||||
|
param?: string;
|
||||||
|
nDec?: number;
|
||||||
|
sepComma?: boolean;
|
||||||
|
negStyle?: 'MinusBlack' | 'Red' | 'ParensBlack' | 'ParensRed';
|
||||||
|
currency?: string;
|
||||||
|
currencyPrepend?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputProps extends FormCommonProps {
|
||||||
|
align?: 'left' | 'center' | 'right';
|
||||||
|
multiline?: boolean;
|
||||||
|
/**
|
||||||
|
* The text will be masked (e.g. with asterisks).
|
||||||
|
*/
|
||||||
|
password?: boolean;
|
||||||
|
/**
|
||||||
|
* If set, text entered in the field is not spell-checked
|
||||||
|
*/
|
||||||
|
noSpell?: boolean;
|
||||||
|
format?: TextInputFormatting;
|
||||||
|
/**
|
||||||
|
* Sets the fontSize (default or 0 means auto sizing)
|
||||||
|
*/
|
||||||
|
fontSize?: number;
|
||||||
|
/**
|
||||||
|
* Sets the maximum length (characters) of the text in the field
|
||||||
|
*/
|
||||||
|
maxLength?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class TextInput extends React.Component<TextInputProps> {}
|
||||||
|
|
||||||
|
interface CheckboxProps extends FormCommonProps {
|
||||||
|
backgroundColor?: string;
|
||||||
|
borderColor?: string;
|
||||||
|
checked?: boolean;
|
||||||
|
onState?: string;
|
||||||
|
offState?: string;
|
||||||
|
xMark?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Checkbox extends React.Component<CheckboxProps> {}
|
||||||
|
|
||||||
|
interface SelectAndListPropsBase extends FormCommonProps {
|
||||||
|
sort?: boolean;
|
||||||
|
edit?: boolean;
|
||||||
|
multiSelect?: boolean;
|
||||||
|
noSpell?: boolean;
|
||||||
|
select?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
type SelectAndListPropsWithEdit = SelectAndListPropsBase & {
|
||||||
|
edit: true | false;
|
||||||
|
noSpell: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListPropsWithNoSpell = SelectAndListPropsBase & {
|
||||||
|
edit: boolean;
|
||||||
|
noSpell: true | false;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListProps =
|
||||||
|
| SelectAndListPropsWithEdit
|
||||||
|
| SelectAndListPropsWithNoSpell;
|
||||||
|
|
||||||
|
export class Select extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
export class List extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
interface NoteProps extends NodeProps {
|
||||||
|
children: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Note extends React.Component<NoteProps> {}
|
||||||
|
|
||||||
|
interface CanvasProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
paint: (
|
||||||
|
painter: any,
|
||||||
|
availableWidth: number,
|
||||||
|
availableHeight: number,
|
||||||
|
) => null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Canvas extends React.Component<CanvasProps> {}
|
||||||
|
|
||||||
|
interface SVGProps extends NodeProps, SVGPresentationAttributes {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
width?: string | number;
|
||||||
|
height?: string | number;
|
||||||
|
viewBox?: string;
|
||||||
|
preserveAspectRatio?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <SVG /> element is a container that defines a new coordinate system and viewport. It is used as the outermost element of SVG documents.
|
||||||
|
*/
|
||||||
|
export class Svg extends React.Component<React.PropsWithChildren<SVGProps>> {}
|
||||||
|
|
||||||
|
interface LineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x1: string | number;
|
||||||
|
x2: string | number;
|
||||||
|
y1: string | number;
|
||||||
|
y2: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Line /> element is used to create a line.
|
||||||
|
*/
|
||||||
|
export class Line extends React.Component<
|
||||||
|
React.PropsWithChildren<LineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolylineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polyline /> element is used to create any shape that consists of only straight lines (that is connected at several points).
|
||||||
|
*/
|
||||||
|
export class Polyline extends React.Component<
|
||||||
|
React.PropsWithChildren<PolylineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolygonProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polygon /> element is used to create a graphic that contains at least three sides.
|
||||||
|
* Polygons are made of straight lines, and the shape is "closed" (all the lines connect up).
|
||||||
|
*/
|
||||||
|
export class Polygon extends React.Component<
|
||||||
|
React.PropsWithChildren<PolygonProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PathProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
d: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Path /> element is the most powerful element in the SVG library of basic shapes. It can be used to create lines, curves, arcs, and more.
|
||||||
|
*/
|
||||||
|
export class Path extends React.Component<
|
||||||
|
React.PropsWithChildren<PathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RectProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
width: string | number;
|
||||||
|
height: string | number;
|
||||||
|
rx?: string | number;
|
||||||
|
ry?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Rect /> element is used to create a rectangle and variations of a rectangle shape.
|
||||||
|
*/
|
||||||
|
export class Rect extends React.Component<
|
||||||
|
React.PropsWithChildren<RectProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface CircleProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Circle /> element is used to create a circle.
|
||||||
|
*/
|
||||||
|
export class Circle extends React.Component<
|
||||||
|
React.PropsWithChildren<CircleProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface EllipseProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
rx: string | number;
|
||||||
|
ry: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Ellipse /> element is used to create an ellipse.
|
||||||
|
* An ellipse is closely related to a circle. The difference is that an ellipse has an x and a y radius that differs from each other, while a circle has equal x and y radius.
|
||||||
|
*/
|
||||||
|
export class Ellipse extends React.Component<
|
||||||
|
React.PropsWithChildren<EllipseProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TspanProps extends SVGPresentationAttributes {
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Tspan /> element defines a subtext within a <Text /> element or another <Tspan /> element.
|
||||||
|
* It allows for adjustment of the style and/or position of that subtext as needed.
|
||||||
|
*/
|
||||||
|
export class Tspan extends React.Component<
|
||||||
|
React.PropsWithChildren<TspanProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface GProps extends SVGPresentationAttributes {
|
||||||
|
style?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <G /> SVG element is a container used to group other SVG elements.
|
||||||
|
* Transformations applied to the <G /> element are performed on its child elements, and its attributes are inherited by its children.
|
||||||
|
*/
|
||||||
|
export class G extends React.Component<React.PropsWithChildren<GProps>> {}
|
||||||
|
|
||||||
|
interface StopProps {
|
||||||
|
offset: string | number;
|
||||||
|
stopColor: string;
|
||||||
|
stopOpacity?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SVG <Stop /> element defines a color and its position to use on a gradient. This element is always a child of a <LinearGradient /> or <RadialGradient /> element
|
||||||
|
*/
|
||||||
|
export class Stop extends React.Component<
|
||||||
|
React.PropsWithChildren<StopProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
|
interface DefsProps {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Defs /> element is used to store graphical objects that will be used at a later time. Objects created inside a <Defs /> element are not rendered directly. To display them you have to reference them
|
||||||
|
*/
|
||||||
|
export class Defs extends React.Component<
|
||||||
|
React.PropsWithChildren<DefsProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ClipPathProps {
|
||||||
|
id?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <ClipPath /> SVG element defines a clipping path, to be used by the clipPath property.
|
||||||
|
* A clipping path restricts the region to which paint can be applied. Conceptually, parts of the drawing that lie outside of the region bounded by the clipping path are not drawn.
|
||||||
|
*/
|
||||||
|
export class ClipPath extends React.Component<
|
||||||
|
React.PropsWithChildren<ClipPathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface MarkerProps {
|
||||||
|
id: string;
|
||||||
|
viewBox?: string;
|
||||||
|
refX?: string | number;
|
||||||
|
refY?: string | number;
|
||||||
|
markerWidth?: string | number;
|
||||||
|
markerHeight?: string | number;
|
||||||
|
orient?: 'auto' | 'auto-start-reverse' | number;
|
||||||
|
markerUnits?: 'strokeWidth' | 'userSpaceOnUse';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Marker /> SVG element defines a graphic used for drawing arrows or polymarkers on a given <Path />, <Line />, <Polyline />, or <Polygon /> element.
|
||||||
|
* Markers can be attached to shapes using the markerStart, markerMid, and markerEnd properties.
|
||||||
|
*/
|
||||||
|
export class Marker extends React.Component<
|
||||||
|
React.PropsWithChildren<MarkerProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinearGradientProps {
|
||||||
|
id: string;
|
||||||
|
x1?: string | number;
|
||||||
|
x2?: string | number;
|
||||||
|
y1?: string | number;
|
||||||
|
y2?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <LinearGradient /> element lets authors define linear gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class LinearGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<LinearGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RadialGradientProps {
|
||||||
|
id: string;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r?: string | number;
|
||||||
|
fx?: string | number;
|
||||||
|
fy?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <RadialGradient /> element lets authors define radial gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class RadialGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<RadialGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BlobProviderParams {
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
loading: boolean;
|
||||||
|
error: Error | null;
|
||||||
|
}
|
||||||
|
interface BlobProviderProps {
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children: (params: BlobProviderParams) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Easy and declarative way of getting document's blob data without
|
||||||
|
* showing it on screen.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class BlobProvider extends React.Component<BlobProviderProps> {}
|
||||||
|
|
||||||
|
interface PDFViewerProps {
|
||||||
|
width?: number | string;
|
||||||
|
height?: number | string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
className?: string;
|
||||||
|
children?: React.ReactElement<DocumentProps>;
|
||||||
|
innerRef?: React.Ref<HTMLIFrameElement>;
|
||||||
|
showToolbar?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iframe PDF viewer for client-side generated documents.
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFViewer extends React.Component<PDFViewerProps> {}
|
||||||
|
|
||||||
|
interface PDFDownloadLinkProps
|
||||||
|
extends Omit<
|
||||||
|
React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
||||||
|
'href' | 'children'
|
||||||
|
> {
|
||||||
|
/** PDF filename. Alias for anchor tag `download` attribute. */
|
||||||
|
fileName?: string;
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children?: React.ReactNode | React.FC<BlobProviderParams>;
|
||||||
|
onClick?: React.AnchorHTMLAttributes<HTMLAnchorElement>['onClick'] &
|
||||||
|
((
|
||||||
|
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>,
|
||||||
|
instance: UsePDFInstance,
|
||||||
|
) => void);
|
||||||
|
ref?: React.Ref<HTMLAnchorElement> | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Anchor tag to enable generate and download PDF documents on the fly.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFDownloadLink extends React.Component<PDFDownloadLinkProps> {}
|
||||||
|
|
||||||
|
interface UsePDFInstance {
|
||||||
|
loading: boolean;
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
error: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* React hook for creating and updating a PDF document instance
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export function usePDF(options?: {
|
||||||
|
document?: React.ReactElement<DocumentProps>;
|
||||||
|
}): [
|
||||||
|
UsePDFInstance,
|
||||||
|
(newDocument: React.ReactElement<DocumentProps>) => void,
|
||||||
|
];
|
||||||
|
|
||||||
|
export const Font: FontStore;
|
||||||
|
|
||||||
|
export const StyleSheet: {
|
||||||
|
create: <T extends Styles>(styles: T) => T;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const version: any;
|
||||||
|
|
||||||
|
export const PDFRenderer: any;
|
||||||
|
|
||||||
|
export const pdf: (initialValue?: React.ReactElement<DocumentProps>) => {
|
||||||
|
container: any;
|
||||||
|
isDirty: () => boolean;
|
||||||
|
toString: () => string;
|
||||||
|
toBlob: () => Promise<Blob>;
|
||||||
|
toBuffer: () => Promise<NodeJS.ReadableStream>;
|
||||||
|
on: (event: 'change', callback: () => void) => void;
|
||||||
|
updateContainer: (
|
||||||
|
document: React.ReactElement<any>,
|
||||||
|
callback?: () => void,
|
||||||
|
) => void;
|
||||||
|
removeListener: (event: 'change', callback: () => void) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const renderToStream: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use the `renderToBuffer` method
|
||||||
|
*/
|
||||||
|
export const renderToString: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<string>;
|
||||||
|
|
||||||
|
export const renderToFile: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
filePath: string,
|
||||||
|
callback?: (output: NodeJS.ReadableStream, _filePath: string) => any,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
const render: typeof renderToFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render document into a nodejs buffer
|
||||||
|
* @platform node
|
||||||
|
*/
|
||||||
|
export const renderToBuffer: (
|
||||||
|
document: React.ReactElement<ReactPDF.DocumentProps>,
|
||||||
|
) => Promise<Buffer>;
|
||||||
|
}
|
||||||
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.browser.min.d.ts
generated
vendored
Normal file
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.browser.min.d.ts
generated
vendored
Normal file
@@ -0,0 +1,793 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
|
|
||||||
|
import * as React from 'react';
|
||||||
|
import {
|
||||||
|
Style,
|
||||||
|
PageSize,
|
||||||
|
FontStore,
|
||||||
|
PDFVersion,
|
||||||
|
Orientation,
|
||||||
|
SourceObject,
|
||||||
|
SrcSet,
|
||||||
|
Sizes,
|
||||||
|
HyphenationCallback,
|
||||||
|
SVGPresentationAttributes,
|
||||||
|
Bookmark,
|
||||||
|
PageLayout,
|
||||||
|
PageMode,
|
||||||
|
HitSlop,
|
||||||
|
} from '@react-pdf/types';
|
||||||
|
|
||||||
|
declare class ReactPDF {
|
||||||
|
static default: typeof ReactPDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = ReactPDF;
|
||||||
|
|
||||||
|
declare namespace ReactPDF {
|
||||||
|
interface Styles {
|
||||||
|
[key: string]: Style;
|
||||||
|
}
|
||||||
|
interface OnRenderProps {
|
||||||
|
blob?: Blob;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Permissions {
|
||||||
|
printing?: 'lowResolution' | 'highResolution';
|
||||||
|
modifying?: boolean;
|
||||||
|
copying?: boolean;
|
||||||
|
annotating?: boolean;
|
||||||
|
fillingForms?: boolean;
|
||||||
|
contentAccessibility?: boolean;
|
||||||
|
documentAssembly?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DocumentProps {
|
||||||
|
style?: Style | Style[];
|
||||||
|
title?: string;
|
||||||
|
author?: string;
|
||||||
|
subject?: string;
|
||||||
|
creator?: string;
|
||||||
|
keywords?: string;
|
||||||
|
producer?: string;
|
||||||
|
language?: string;
|
||||||
|
creationDate?: Date;
|
||||||
|
modificationDate?: Date;
|
||||||
|
pdfVersion?: PDFVersion;
|
||||||
|
pageMode?: PageMode;
|
||||||
|
pageLayout?: PageLayout;
|
||||||
|
ownerPassword?: string;
|
||||||
|
userPassword?: string;
|
||||||
|
permissions?: Permissions;
|
||||||
|
onRender?: (props: OnRenderProps) => any;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This component represent the PDF document itself. It must be the root
|
||||||
|
* of your tree element structure, and under no circumstances should it be
|
||||||
|
* used as children of another react-pdf component. In addition, it should
|
||||||
|
* only have childs of type <Page />.
|
||||||
|
*/
|
||||||
|
export class Document extends React.Component<
|
||||||
|
React.PropsWithChildren<DocumentProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface NodeProps {
|
||||||
|
id?: string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
/**
|
||||||
|
* Render component in all wrapped pages.
|
||||||
|
* @see https://react-pdf.org/advanced#fixed-components
|
||||||
|
*/
|
||||||
|
fixed?: boolean;
|
||||||
|
/**
|
||||||
|
* Force the wrapping algorithm to start a new page when rendering the
|
||||||
|
* element.
|
||||||
|
* @see https://react-pdf.org/advanced#page-breaks
|
||||||
|
*/
|
||||||
|
break?: boolean;
|
||||||
|
/**
|
||||||
|
* Hint that no page wrapping should occur between all sibling elements following the element within n points
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
minPresenceAhead?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable page wrapping for this page.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
size?: PageSize;
|
||||||
|
orientation?: Orientation;
|
||||||
|
dpi?: number;
|
||||||
|
bookmark?: Bookmark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents single page inside the PDF document, or a subset of them if
|
||||||
|
* using the wrapping feature. A <Document /> can contain as many pages as
|
||||||
|
* you want, but ensure not rendering a page inside any component besides
|
||||||
|
* Document.
|
||||||
|
*/
|
||||||
|
export class Page extends React.Component<
|
||||||
|
React.PropsWithChildren<PageProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ViewProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The most fundamental component for building a UI and is designed to be
|
||||||
|
* nested inside other views and can have 0 to many children.
|
||||||
|
*/
|
||||||
|
export class View extends React.Component<
|
||||||
|
React.PropsWithChildren<ViewProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BaseImageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* Works like the HTML img sizes attribute.
|
||||||
|
* @example 300
|
||||||
|
* @example "300"
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSrcProp extends BaseImageProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSourceProp extends BaseImageProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageProps = ImageWithSrcProp | ImageWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying network or local (Node only) JPG or
|
||||||
|
* PNG images, as well as base64 encoded image strings.
|
||||||
|
*/
|
||||||
|
export class Image extends React.Component<ImageProps> {}
|
||||||
|
|
||||||
|
interface BaseImageBackgroundProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* @example 300
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
/**
|
||||||
|
* Style applied to the background image.
|
||||||
|
*/
|
||||||
|
imageStyle?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSrcProp extends BaseImageBackgroundProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSourceProp extends BaseImageBackgroundProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageBackgroundProps =
|
||||||
|
| ImageBackgroundWithSrcProp
|
||||||
|
| ImageBackgroundWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying an image behind child content.
|
||||||
|
* Compatible with React Native's ImageBackground component.
|
||||||
|
* @see https://reactnative.dev/docs/imagebackground
|
||||||
|
*/
|
||||||
|
export class ImageBackground extends React.Component<
|
||||||
|
React.PropsWithChildren<ImageBackgroundProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TextProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
totalPages: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
subPageTotalPages: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the bottom of a page or its container.
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
orphans?: number;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the top of a page or its container..
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
widows?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SVGTextProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x: string | number;
|
||||||
|
y: string | number;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying text. Text supports nesting of other
|
||||||
|
* Text or Link components to create inline styling.
|
||||||
|
*/
|
||||||
|
export class Text extends React.Component<
|
||||||
|
React.PropsWithChildren<TextProps> | SVGTextProps
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinkProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
href?: string;
|
||||||
|
src?: string;
|
||||||
|
/**
|
||||||
|
* Extends the clickable area of the link beyond its visible bounds.
|
||||||
|
* Accepts a number (applied to all sides) or an object with top, bottom, left, right.
|
||||||
|
* @see https://reactnative.dev/docs/view#hitslop
|
||||||
|
*/
|
||||||
|
hitSlop?: HitSlop;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying a hyperlink. Link’s can be nested
|
||||||
|
* inside a Text component, or being inside any other valid primitive.
|
||||||
|
*/
|
||||||
|
export class Link extends React.Component<
|
||||||
|
React.PropsWithChildren<LinkProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface FormCommonProps extends NodeProps {
|
||||||
|
name?: string;
|
||||||
|
required?: boolean;
|
||||||
|
noExport?: boolean;
|
||||||
|
readOnly?: boolean;
|
||||||
|
value?: number | string;
|
||||||
|
defaultValue?: number | string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FieldSetProps extends NodeProps {
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class FieldSet extends React.Component<
|
||||||
|
React.PropsWithChildren<FieldSetProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputFormatting {
|
||||||
|
type:
|
||||||
|
| 'date'
|
||||||
|
| 'time'
|
||||||
|
| 'percent'
|
||||||
|
| 'number'
|
||||||
|
| 'zip'
|
||||||
|
| 'zipPlus4'
|
||||||
|
| 'phone'
|
||||||
|
| 'ssn';
|
||||||
|
param?: string;
|
||||||
|
nDec?: number;
|
||||||
|
sepComma?: boolean;
|
||||||
|
negStyle?: 'MinusBlack' | 'Red' | 'ParensBlack' | 'ParensRed';
|
||||||
|
currency?: string;
|
||||||
|
currencyPrepend?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputProps extends FormCommonProps {
|
||||||
|
align?: 'left' | 'center' | 'right';
|
||||||
|
multiline?: boolean;
|
||||||
|
/**
|
||||||
|
* The text will be masked (e.g. with asterisks).
|
||||||
|
*/
|
||||||
|
password?: boolean;
|
||||||
|
/**
|
||||||
|
* If set, text entered in the field is not spell-checked
|
||||||
|
*/
|
||||||
|
noSpell?: boolean;
|
||||||
|
format?: TextInputFormatting;
|
||||||
|
/**
|
||||||
|
* Sets the fontSize (default or 0 means auto sizing)
|
||||||
|
*/
|
||||||
|
fontSize?: number;
|
||||||
|
/**
|
||||||
|
* Sets the maximum length (characters) of the text in the field
|
||||||
|
*/
|
||||||
|
maxLength?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class TextInput extends React.Component<TextInputProps> {}
|
||||||
|
|
||||||
|
interface CheckboxProps extends FormCommonProps {
|
||||||
|
backgroundColor?: string;
|
||||||
|
borderColor?: string;
|
||||||
|
checked?: boolean;
|
||||||
|
onState?: string;
|
||||||
|
offState?: string;
|
||||||
|
xMark?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Checkbox extends React.Component<CheckboxProps> {}
|
||||||
|
|
||||||
|
interface SelectAndListPropsBase extends FormCommonProps {
|
||||||
|
sort?: boolean;
|
||||||
|
edit?: boolean;
|
||||||
|
multiSelect?: boolean;
|
||||||
|
noSpell?: boolean;
|
||||||
|
select?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
type SelectAndListPropsWithEdit = SelectAndListPropsBase & {
|
||||||
|
edit: true | false;
|
||||||
|
noSpell: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListPropsWithNoSpell = SelectAndListPropsBase & {
|
||||||
|
edit: boolean;
|
||||||
|
noSpell: true | false;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListProps =
|
||||||
|
| SelectAndListPropsWithEdit
|
||||||
|
| SelectAndListPropsWithNoSpell;
|
||||||
|
|
||||||
|
export class Select extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
export class List extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
interface NoteProps extends NodeProps {
|
||||||
|
children: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Note extends React.Component<NoteProps> {}
|
||||||
|
|
||||||
|
interface CanvasProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
paint: (
|
||||||
|
painter: any,
|
||||||
|
availableWidth: number,
|
||||||
|
availableHeight: number,
|
||||||
|
) => null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Canvas extends React.Component<CanvasProps> {}
|
||||||
|
|
||||||
|
interface SVGProps extends NodeProps, SVGPresentationAttributes {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
width?: string | number;
|
||||||
|
height?: string | number;
|
||||||
|
viewBox?: string;
|
||||||
|
preserveAspectRatio?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <SVG /> element is a container that defines a new coordinate system and viewport. It is used as the outermost element of SVG documents.
|
||||||
|
*/
|
||||||
|
export class Svg extends React.Component<React.PropsWithChildren<SVGProps>> {}
|
||||||
|
|
||||||
|
interface LineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x1: string | number;
|
||||||
|
x2: string | number;
|
||||||
|
y1: string | number;
|
||||||
|
y2: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Line /> element is used to create a line.
|
||||||
|
*/
|
||||||
|
export class Line extends React.Component<
|
||||||
|
React.PropsWithChildren<LineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolylineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polyline /> element is used to create any shape that consists of only straight lines (that is connected at several points).
|
||||||
|
*/
|
||||||
|
export class Polyline extends React.Component<
|
||||||
|
React.PropsWithChildren<PolylineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolygonProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polygon /> element is used to create a graphic that contains at least three sides.
|
||||||
|
* Polygons are made of straight lines, and the shape is "closed" (all the lines connect up).
|
||||||
|
*/
|
||||||
|
export class Polygon extends React.Component<
|
||||||
|
React.PropsWithChildren<PolygonProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PathProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
d: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Path /> element is the most powerful element in the SVG library of basic shapes. It can be used to create lines, curves, arcs, and more.
|
||||||
|
*/
|
||||||
|
export class Path extends React.Component<
|
||||||
|
React.PropsWithChildren<PathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RectProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
width: string | number;
|
||||||
|
height: string | number;
|
||||||
|
rx?: string | number;
|
||||||
|
ry?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Rect /> element is used to create a rectangle and variations of a rectangle shape.
|
||||||
|
*/
|
||||||
|
export class Rect extends React.Component<
|
||||||
|
React.PropsWithChildren<RectProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface CircleProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Circle /> element is used to create a circle.
|
||||||
|
*/
|
||||||
|
export class Circle extends React.Component<
|
||||||
|
React.PropsWithChildren<CircleProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface EllipseProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
rx: string | number;
|
||||||
|
ry: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Ellipse /> element is used to create an ellipse.
|
||||||
|
* An ellipse is closely related to a circle. The difference is that an ellipse has an x and a y radius that differs from each other, while a circle has equal x and y radius.
|
||||||
|
*/
|
||||||
|
export class Ellipse extends React.Component<
|
||||||
|
React.PropsWithChildren<EllipseProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TspanProps extends SVGPresentationAttributes {
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Tspan /> element defines a subtext within a <Text /> element or another <Tspan /> element.
|
||||||
|
* It allows for adjustment of the style and/or position of that subtext as needed.
|
||||||
|
*/
|
||||||
|
export class Tspan extends React.Component<
|
||||||
|
React.PropsWithChildren<TspanProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface GProps extends SVGPresentationAttributes {
|
||||||
|
style?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <G /> SVG element is a container used to group other SVG elements.
|
||||||
|
* Transformations applied to the <G /> element are performed on its child elements, and its attributes are inherited by its children.
|
||||||
|
*/
|
||||||
|
export class G extends React.Component<React.PropsWithChildren<GProps>> {}
|
||||||
|
|
||||||
|
interface StopProps {
|
||||||
|
offset: string | number;
|
||||||
|
stopColor: string;
|
||||||
|
stopOpacity?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SVG <Stop /> element defines a color and its position to use on a gradient. This element is always a child of a <LinearGradient /> or <RadialGradient /> element
|
||||||
|
*/
|
||||||
|
export class Stop extends React.Component<
|
||||||
|
React.PropsWithChildren<StopProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
|
interface DefsProps {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Defs /> element is used to store graphical objects that will be used at a later time. Objects created inside a <Defs /> element are not rendered directly. To display them you have to reference them
|
||||||
|
*/
|
||||||
|
export class Defs extends React.Component<
|
||||||
|
React.PropsWithChildren<DefsProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ClipPathProps {
|
||||||
|
id?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <ClipPath /> SVG element defines a clipping path, to be used by the clipPath property.
|
||||||
|
* A clipping path restricts the region to which paint can be applied. Conceptually, parts of the drawing that lie outside of the region bounded by the clipping path are not drawn.
|
||||||
|
*/
|
||||||
|
export class ClipPath extends React.Component<
|
||||||
|
React.PropsWithChildren<ClipPathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface MarkerProps {
|
||||||
|
id: string;
|
||||||
|
viewBox?: string;
|
||||||
|
refX?: string | number;
|
||||||
|
refY?: string | number;
|
||||||
|
markerWidth?: string | number;
|
||||||
|
markerHeight?: string | number;
|
||||||
|
orient?: 'auto' | 'auto-start-reverse' | number;
|
||||||
|
markerUnits?: 'strokeWidth' | 'userSpaceOnUse';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Marker /> SVG element defines a graphic used for drawing arrows or polymarkers on a given <Path />, <Line />, <Polyline />, or <Polygon /> element.
|
||||||
|
* Markers can be attached to shapes using the markerStart, markerMid, and markerEnd properties.
|
||||||
|
*/
|
||||||
|
export class Marker extends React.Component<
|
||||||
|
React.PropsWithChildren<MarkerProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinearGradientProps {
|
||||||
|
id: string;
|
||||||
|
x1?: string | number;
|
||||||
|
x2?: string | number;
|
||||||
|
y1?: string | number;
|
||||||
|
y2?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <LinearGradient /> element lets authors define linear gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class LinearGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<LinearGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RadialGradientProps {
|
||||||
|
id: string;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r?: string | number;
|
||||||
|
fx?: string | number;
|
||||||
|
fy?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <RadialGradient /> element lets authors define radial gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class RadialGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<RadialGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BlobProviderParams {
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
loading: boolean;
|
||||||
|
error: Error | null;
|
||||||
|
}
|
||||||
|
interface BlobProviderProps {
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children: (params: BlobProviderParams) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Easy and declarative way of getting document's blob data without
|
||||||
|
* showing it on screen.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class BlobProvider extends React.Component<BlobProviderProps> {}
|
||||||
|
|
||||||
|
interface PDFViewerProps {
|
||||||
|
width?: number | string;
|
||||||
|
height?: number | string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
className?: string;
|
||||||
|
children?: React.ReactElement<DocumentProps>;
|
||||||
|
innerRef?: React.Ref<HTMLIFrameElement>;
|
||||||
|
showToolbar?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iframe PDF viewer for client-side generated documents.
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFViewer extends React.Component<PDFViewerProps> {}
|
||||||
|
|
||||||
|
interface PDFDownloadLinkProps
|
||||||
|
extends Omit<
|
||||||
|
React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
||||||
|
'href' | 'children'
|
||||||
|
> {
|
||||||
|
/** PDF filename. Alias for anchor tag `download` attribute. */
|
||||||
|
fileName?: string;
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children?: React.ReactNode | React.FC<BlobProviderParams>;
|
||||||
|
onClick?: React.AnchorHTMLAttributes<HTMLAnchorElement>['onClick'] &
|
||||||
|
((
|
||||||
|
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>,
|
||||||
|
instance: UsePDFInstance,
|
||||||
|
) => void);
|
||||||
|
ref?: React.Ref<HTMLAnchorElement> | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Anchor tag to enable generate and download PDF documents on the fly.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFDownloadLink extends React.Component<PDFDownloadLinkProps> {}
|
||||||
|
|
||||||
|
interface UsePDFInstance {
|
||||||
|
loading: boolean;
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
error: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* React hook for creating and updating a PDF document instance
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export function usePDF(options?: {
|
||||||
|
document?: React.ReactElement<DocumentProps>;
|
||||||
|
}): [
|
||||||
|
UsePDFInstance,
|
||||||
|
(newDocument: React.ReactElement<DocumentProps>) => void,
|
||||||
|
];
|
||||||
|
|
||||||
|
export const Font: FontStore;
|
||||||
|
|
||||||
|
export const StyleSheet: {
|
||||||
|
create: <T extends Styles>(styles: T) => T;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const version: any;
|
||||||
|
|
||||||
|
export const PDFRenderer: any;
|
||||||
|
|
||||||
|
export const pdf: (initialValue?: React.ReactElement<DocumentProps>) => {
|
||||||
|
container: any;
|
||||||
|
isDirty: () => boolean;
|
||||||
|
toString: () => string;
|
||||||
|
toBlob: () => Promise<Blob>;
|
||||||
|
toBuffer: () => Promise<NodeJS.ReadableStream>;
|
||||||
|
on: (event: 'change', callback: () => void) => void;
|
||||||
|
updateContainer: (
|
||||||
|
document: React.ReactElement<any>,
|
||||||
|
callback?: () => void,
|
||||||
|
) => void;
|
||||||
|
removeListener: (event: 'change', callback: () => void) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const renderToStream: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use the `renderToBuffer` method
|
||||||
|
*/
|
||||||
|
export const renderToString: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<string>;
|
||||||
|
|
||||||
|
export const renderToFile: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
filePath: string,
|
||||||
|
callback?: (output: NodeJS.ReadableStream, _filePath: string) => any,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
const render: typeof renderToFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render document into a nodejs buffer
|
||||||
|
* @platform node
|
||||||
|
*/
|
||||||
|
export const renderToBuffer: (
|
||||||
|
document: React.ReactElement<ReactPDF.DocumentProps>,
|
||||||
|
) => Promise<Buffer>;
|
||||||
|
}
|
||||||
1
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.browser.min.js
generated
vendored
Normal file
1
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.browser.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.d.cts
generated
vendored
Normal file
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.d.cts
generated
vendored
Normal file
@@ -0,0 +1,793 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
|
|
||||||
|
import * as React from 'react';
|
||||||
|
import {
|
||||||
|
Style,
|
||||||
|
PageSize,
|
||||||
|
FontStore,
|
||||||
|
PDFVersion,
|
||||||
|
Orientation,
|
||||||
|
SourceObject,
|
||||||
|
SrcSet,
|
||||||
|
Sizes,
|
||||||
|
HyphenationCallback,
|
||||||
|
SVGPresentationAttributes,
|
||||||
|
Bookmark,
|
||||||
|
PageLayout,
|
||||||
|
PageMode,
|
||||||
|
HitSlop,
|
||||||
|
} from '@react-pdf/types';
|
||||||
|
|
||||||
|
declare class ReactPDF {
|
||||||
|
static default: typeof ReactPDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = ReactPDF;
|
||||||
|
|
||||||
|
declare namespace ReactPDF {
|
||||||
|
interface Styles {
|
||||||
|
[key: string]: Style;
|
||||||
|
}
|
||||||
|
interface OnRenderProps {
|
||||||
|
blob?: Blob;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Permissions {
|
||||||
|
printing?: 'lowResolution' | 'highResolution';
|
||||||
|
modifying?: boolean;
|
||||||
|
copying?: boolean;
|
||||||
|
annotating?: boolean;
|
||||||
|
fillingForms?: boolean;
|
||||||
|
contentAccessibility?: boolean;
|
||||||
|
documentAssembly?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DocumentProps {
|
||||||
|
style?: Style | Style[];
|
||||||
|
title?: string;
|
||||||
|
author?: string;
|
||||||
|
subject?: string;
|
||||||
|
creator?: string;
|
||||||
|
keywords?: string;
|
||||||
|
producer?: string;
|
||||||
|
language?: string;
|
||||||
|
creationDate?: Date;
|
||||||
|
modificationDate?: Date;
|
||||||
|
pdfVersion?: PDFVersion;
|
||||||
|
pageMode?: PageMode;
|
||||||
|
pageLayout?: PageLayout;
|
||||||
|
ownerPassword?: string;
|
||||||
|
userPassword?: string;
|
||||||
|
permissions?: Permissions;
|
||||||
|
onRender?: (props: OnRenderProps) => any;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This component represent the PDF document itself. It must be the root
|
||||||
|
* of your tree element structure, and under no circumstances should it be
|
||||||
|
* used as children of another react-pdf component. In addition, it should
|
||||||
|
* only have childs of type <Page />.
|
||||||
|
*/
|
||||||
|
export class Document extends React.Component<
|
||||||
|
React.PropsWithChildren<DocumentProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface NodeProps {
|
||||||
|
id?: string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
/**
|
||||||
|
* Render component in all wrapped pages.
|
||||||
|
* @see https://react-pdf.org/advanced#fixed-components
|
||||||
|
*/
|
||||||
|
fixed?: boolean;
|
||||||
|
/**
|
||||||
|
* Force the wrapping algorithm to start a new page when rendering the
|
||||||
|
* element.
|
||||||
|
* @see https://react-pdf.org/advanced#page-breaks
|
||||||
|
*/
|
||||||
|
break?: boolean;
|
||||||
|
/**
|
||||||
|
* Hint that no page wrapping should occur between all sibling elements following the element within n points
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
minPresenceAhead?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable page wrapping for this page.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
size?: PageSize;
|
||||||
|
orientation?: Orientation;
|
||||||
|
dpi?: number;
|
||||||
|
bookmark?: Bookmark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents single page inside the PDF document, or a subset of them if
|
||||||
|
* using the wrapping feature. A <Document /> can contain as many pages as
|
||||||
|
* you want, but ensure not rendering a page inside any component besides
|
||||||
|
* Document.
|
||||||
|
*/
|
||||||
|
export class Page extends React.Component<
|
||||||
|
React.PropsWithChildren<PageProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ViewProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The most fundamental component for building a UI and is designed to be
|
||||||
|
* nested inside other views and can have 0 to many children.
|
||||||
|
*/
|
||||||
|
export class View extends React.Component<
|
||||||
|
React.PropsWithChildren<ViewProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BaseImageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* Works like the HTML img sizes attribute.
|
||||||
|
* @example 300
|
||||||
|
* @example "300"
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSrcProp extends BaseImageProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSourceProp extends BaseImageProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageProps = ImageWithSrcProp | ImageWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying network or local (Node only) JPG or
|
||||||
|
* PNG images, as well as base64 encoded image strings.
|
||||||
|
*/
|
||||||
|
export class Image extends React.Component<ImageProps> {}
|
||||||
|
|
||||||
|
interface BaseImageBackgroundProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* @example 300
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
/**
|
||||||
|
* Style applied to the background image.
|
||||||
|
*/
|
||||||
|
imageStyle?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSrcProp extends BaseImageBackgroundProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSourceProp extends BaseImageBackgroundProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageBackgroundProps =
|
||||||
|
| ImageBackgroundWithSrcProp
|
||||||
|
| ImageBackgroundWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying an image behind child content.
|
||||||
|
* Compatible with React Native's ImageBackground component.
|
||||||
|
* @see https://reactnative.dev/docs/imagebackground
|
||||||
|
*/
|
||||||
|
export class ImageBackground extends React.Component<
|
||||||
|
React.PropsWithChildren<ImageBackgroundProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TextProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
totalPages: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
subPageTotalPages: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the bottom of a page or its container.
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
orphans?: number;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the top of a page or its container..
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
widows?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SVGTextProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x: string | number;
|
||||||
|
y: string | number;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying text. Text supports nesting of other
|
||||||
|
* Text or Link components to create inline styling.
|
||||||
|
*/
|
||||||
|
export class Text extends React.Component<
|
||||||
|
React.PropsWithChildren<TextProps> | SVGTextProps
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinkProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
href?: string;
|
||||||
|
src?: string;
|
||||||
|
/**
|
||||||
|
* Extends the clickable area of the link beyond its visible bounds.
|
||||||
|
* Accepts a number (applied to all sides) or an object with top, bottom, left, right.
|
||||||
|
* @see https://reactnative.dev/docs/view#hitslop
|
||||||
|
*/
|
||||||
|
hitSlop?: HitSlop;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying a hyperlink. Link’s can be nested
|
||||||
|
* inside a Text component, or being inside any other valid primitive.
|
||||||
|
*/
|
||||||
|
export class Link extends React.Component<
|
||||||
|
React.PropsWithChildren<LinkProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface FormCommonProps extends NodeProps {
|
||||||
|
name?: string;
|
||||||
|
required?: boolean;
|
||||||
|
noExport?: boolean;
|
||||||
|
readOnly?: boolean;
|
||||||
|
value?: number | string;
|
||||||
|
defaultValue?: number | string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FieldSetProps extends NodeProps {
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class FieldSet extends React.Component<
|
||||||
|
React.PropsWithChildren<FieldSetProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputFormatting {
|
||||||
|
type:
|
||||||
|
| 'date'
|
||||||
|
| 'time'
|
||||||
|
| 'percent'
|
||||||
|
| 'number'
|
||||||
|
| 'zip'
|
||||||
|
| 'zipPlus4'
|
||||||
|
| 'phone'
|
||||||
|
| 'ssn';
|
||||||
|
param?: string;
|
||||||
|
nDec?: number;
|
||||||
|
sepComma?: boolean;
|
||||||
|
negStyle?: 'MinusBlack' | 'Red' | 'ParensBlack' | 'ParensRed';
|
||||||
|
currency?: string;
|
||||||
|
currencyPrepend?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputProps extends FormCommonProps {
|
||||||
|
align?: 'left' | 'center' | 'right';
|
||||||
|
multiline?: boolean;
|
||||||
|
/**
|
||||||
|
* The text will be masked (e.g. with asterisks).
|
||||||
|
*/
|
||||||
|
password?: boolean;
|
||||||
|
/**
|
||||||
|
* If set, text entered in the field is not spell-checked
|
||||||
|
*/
|
||||||
|
noSpell?: boolean;
|
||||||
|
format?: TextInputFormatting;
|
||||||
|
/**
|
||||||
|
* Sets the fontSize (default or 0 means auto sizing)
|
||||||
|
*/
|
||||||
|
fontSize?: number;
|
||||||
|
/**
|
||||||
|
* Sets the maximum length (characters) of the text in the field
|
||||||
|
*/
|
||||||
|
maxLength?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class TextInput extends React.Component<TextInputProps> {}
|
||||||
|
|
||||||
|
interface CheckboxProps extends FormCommonProps {
|
||||||
|
backgroundColor?: string;
|
||||||
|
borderColor?: string;
|
||||||
|
checked?: boolean;
|
||||||
|
onState?: string;
|
||||||
|
offState?: string;
|
||||||
|
xMark?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Checkbox extends React.Component<CheckboxProps> {}
|
||||||
|
|
||||||
|
interface SelectAndListPropsBase extends FormCommonProps {
|
||||||
|
sort?: boolean;
|
||||||
|
edit?: boolean;
|
||||||
|
multiSelect?: boolean;
|
||||||
|
noSpell?: boolean;
|
||||||
|
select?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
type SelectAndListPropsWithEdit = SelectAndListPropsBase & {
|
||||||
|
edit: true | false;
|
||||||
|
noSpell: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListPropsWithNoSpell = SelectAndListPropsBase & {
|
||||||
|
edit: boolean;
|
||||||
|
noSpell: true | false;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListProps =
|
||||||
|
| SelectAndListPropsWithEdit
|
||||||
|
| SelectAndListPropsWithNoSpell;
|
||||||
|
|
||||||
|
export class Select extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
export class List extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
interface NoteProps extends NodeProps {
|
||||||
|
children: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Note extends React.Component<NoteProps> {}
|
||||||
|
|
||||||
|
interface CanvasProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
paint: (
|
||||||
|
painter: any,
|
||||||
|
availableWidth: number,
|
||||||
|
availableHeight: number,
|
||||||
|
) => null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Canvas extends React.Component<CanvasProps> {}
|
||||||
|
|
||||||
|
interface SVGProps extends NodeProps, SVGPresentationAttributes {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
width?: string | number;
|
||||||
|
height?: string | number;
|
||||||
|
viewBox?: string;
|
||||||
|
preserveAspectRatio?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <SVG /> element is a container that defines a new coordinate system and viewport. It is used as the outermost element of SVG documents.
|
||||||
|
*/
|
||||||
|
export class Svg extends React.Component<React.PropsWithChildren<SVGProps>> {}
|
||||||
|
|
||||||
|
interface LineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x1: string | number;
|
||||||
|
x2: string | number;
|
||||||
|
y1: string | number;
|
||||||
|
y2: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Line /> element is used to create a line.
|
||||||
|
*/
|
||||||
|
export class Line extends React.Component<
|
||||||
|
React.PropsWithChildren<LineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolylineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polyline /> element is used to create any shape that consists of only straight lines (that is connected at several points).
|
||||||
|
*/
|
||||||
|
export class Polyline extends React.Component<
|
||||||
|
React.PropsWithChildren<PolylineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolygonProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polygon /> element is used to create a graphic that contains at least three sides.
|
||||||
|
* Polygons are made of straight lines, and the shape is "closed" (all the lines connect up).
|
||||||
|
*/
|
||||||
|
export class Polygon extends React.Component<
|
||||||
|
React.PropsWithChildren<PolygonProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PathProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
d: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Path /> element is the most powerful element in the SVG library of basic shapes. It can be used to create lines, curves, arcs, and more.
|
||||||
|
*/
|
||||||
|
export class Path extends React.Component<
|
||||||
|
React.PropsWithChildren<PathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RectProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
width: string | number;
|
||||||
|
height: string | number;
|
||||||
|
rx?: string | number;
|
||||||
|
ry?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Rect /> element is used to create a rectangle and variations of a rectangle shape.
|
||||||
|
*/
|
||||||
|
export class Rect extends React.Component<
|
||||||
|
React.PropsWithChildren<RectProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface CircleProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Circle /> element is used to create a circle.
|
||||||
|
*/
|
||||||
|
export class Circle extends React.Component<
|
||||||
|
React.PropsWithChildren<CircleProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface EllipseProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
rx: string | number;
|
||||||
|
ry: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Ellipse /> element is used to create an ellipse.
|
||||||
|
* An ellipse is closely related to a circle. The difference is that an ellipse has an x and a y radius that differs from each other, while a circle has equal x and y radius.
|
||||||
|
*/
|
||||||
|
export class Ellipse extends React.Component<
|
||||||
|
React.PropsWithChildren<EllipseProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TspanProps extends SVGPresentationAttributes {
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Tspan /> element defines a subtext within a <Text /> element or another <Tspan /> element.
|
||||||
|
* It allows for adjustment of the style and/or position of that subtext as needed.
|
||||||
|
*/
|
||||||
|
export class Tspan extends React.Component<
|
||||||
|
React.PropsWithChildren<TspanProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface GProps extends SVGPresentationAttributes {
|
||||||
|
style?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <G /> SVG element is a container used to group other SVG elements.
|
||||||
|
* Transformations applied to the <G /> element are performed on its child elements, and its attributes are inherited by its children.
|
||||||
|
*/
|
||||||
|
export class G extends React.Component<React.PropsWithChildren<GProps>> {}
|
||||||
|
|
||||||
|
interface StopProps {
|
||||||
|
offset: string | number;
|
||||||
|
stopColor: string;
|
||||||
|
stopOpacity?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SVG <Stop /> element defines a color and its position to use on a gradient. This element is always a child of a <LinearGradient /> or <RadialGradient /> element
|
||||||
|
*/
|
||||||
|
export class Stop extends React.Component<
|
||||||
|
React.PropsWithChildren<StopProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
|
interface DefsProps {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Defs /> element is used to store graphical objects that will be used at a later time. Objects created inside a <Defs /> element are not rendered directly. To display them you have to reference them
|
||||||
|
*/
|
||||||
|
export class Defs extends React.Component<
|
||||||
|
React.PropsWithChildren<DefsProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ClipPathProps {
|
||||||
|
id?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <ClipPath /> SVG element defines a clipping path, to be used by the clipPath property.
|
||||||
|
* A clipping path restricts the region to which paint can be applied. Conceptually, parts of the drawing that lie outside of the region bounded by the clipping path are not drawn.
|
||||||
|
*/
|
||||||
|
export class ClipPath extends React.Component<
|
||||||
|
React.PropsWithChildren<ClipPathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface MarkerProps {
|
||||||
|
id: string;
|
||||||
|
viewBox?: string;
|
||||||
|
refX?: string | number;
|
||||||
|
refY?: string | number;
|
||||||
|
markerWidth?: string | number;
|
||||||
|
markerHeight?: string | number;
|
||||||
|
orient?: 'auto' | 'auto-start-reverse' | number;
|
||||||
|
markerUnits?: 'strokeWidth' | 'userSpaceOnUse';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Marker /> SVG element defines a graphic used for drawing arrows or polymarkers on a given <Path />, <Line />, <Polyline />, or <Polygon /> element.
|
||||||
|
* Markers can be attached to shapes using the markerStart, markerMid, and markerEnd properties.
|
||||||
|
*/
|
||||||
|
export class Marker extends React.Component<
|
||||||
|
React.PropsWithChildren<MarkerProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinearGradientProps {
|
||||||
|
id: string;
|
||||||
|
x1?: string | number;
|
||||||
|
x2?: string | number;
|
||||||
|
y1?: string | number;
|
||||||
|
y2?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <LinearGradient /> element lets authors define linear gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class LinearGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<LinearGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RadialGradientProps {
|
||||||
|
id: string;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r?: string | number;
|
||||||
|
fx?: string | number;
|
||||||
|
fy?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <RadialGradient /> element lets authors define radial gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class RadialGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<RadialGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BlobProviderParams {
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
loading: boolean;
|
||||||
|
error: Error | null;
|
||||||
|
}
|
||||||
|
interface BlobProviderProps {
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children: (params: BlobProviderParams) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Easy and declarative way of getting document's blob data without
|
||||||
|
* showing it on screen.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class BlobProvider extends React.Component<BlobProviderProps> {}
|
||||||
|
|
||||||
|
interface PDFViewerProps {
|
||||||
|
width?: number | string;
|
||||||
|
height?: number | string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
className?: string;
|
||||||
|
children?: React.ReactElement<DocumentProps>;
|
||||||
|
innerRef?: React.Ref<HTMLIFrameElement>;
|
||||||
|
showToolbar?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iframe PDF viewer for client-side generated documents.
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFViewer extends React.Component<PDFViewerProps> {}
|
||||||
|
|
||||||
|
interface PDFDownloadLinkProps
|
||||||
|
extends Omit<
|
||||||
|
React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
||||||
|
'href' | 'children'
|
||||||
|
> {
|
||||||
|
/** PDF filename. Alias for anchor tag `download` attribute. */
|
||||||
|
fileName?: string;
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children?: React.ReactNode | React.FC<BlobProviderParams>;
|
||||||
|
onClick?: React.AnchorHTMLAttributes<HTMLAnchorElement>['onClick'] &
|
||||||
|
((
|
||||||
|
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>,
|
||||||
|
instance: UsePDFInstance,
|
||||||
|
) => void);
|
||||||
|
ref?: React.Ref<HTMLAnchorElement> | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Anchor tag to enable generate and download PDF documents on the fly.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFDownloadLink extends React.Component<PDFDownloadLinkProps> {}
|
||||||
|
|
||||||
|
interface UsePDFInstance {
|
||||||
|
loading: boolean;
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
error: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* React hook for creating and updating a PDF document instance
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export function usePDF(options?: {
|
||||||
|
document?: React.ReactElement<DocumentProps>;
|
||||||
|
}): [
|
||||||
|
UsePDFInstance,
|
||||||
|
(newDocument: React.ReactElement<DocumentProps>) => void,
|
||||||
|
];
|
||||||
|
|
||||||
|
export const Font: FontStore;
|
||||||
|
|
||||||
|
export const StyleSheet: {
|
||||||
|
create: <T extends Styles>(styles: T) => T;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const version: any;
|
||||||
|
|
||||||
|
export const PDFRenderer: any;
|
||||||
|
|
||||||
|
export const pdf: (initialValue?: React.ReactElement<DocumentProps>) => {
|
||||||
|
container: any;
|
||||||
|
isDirty: () => boolean;
|
||||||
|
toString: () => string;
|
||||||
|
toBlob: () => Promise<Blob>;
|
||||||
|
toBuffer: () => Promise<NodeJS.ReadableStream>;
|
||||||
|
on: (event: 'change', callback: () => void) => void;
|
||||||
|
updateContainer: (
|
||||||
|
document: React.ReactElement<any>,
|
||||||
|
callback?: () => void,
|
||||||
|
) => void;
|
||||||
|
removeListener: (event: 'change', callback: () => void) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const renderToStream: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use the `renderToBuffer` method
|
||||||
|
*/
|
||||||
|
export const renderToString: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<string>;
|
||||||
|
|
||||||
|
export const renderToFile: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
filePath: string,
|
||||||
|
callback?: (output: NodeJS.ReadableStream, _filePath: string) => any,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
const render: typeof renderToFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render document into a nodejs buffer
|
||||||
|
* @platform node
|
||||||
|
*/
|
||||||
|
export const renderToBuffer: (
|
||||||
|
document: React.ReactElement<ReactPDF.DocumentProps>,
|
||||||
|
) => Promise<Buffer>;
|
||||||
|
}
|
||||||
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.d.ts
generated
vendored
Normal file
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.d.ts
generated
vendored
Normal file
@@ -0,0 +1,793 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
|
|
||||||
|
import * as React from 'react';
|
||||||
|
import {
|
||||||
|
Style,
|
||||||
|
PageSize,
|
||||||
|
FontStore,
|
||||||
|
PDFVersion,
|
||||||
|
Orientation,
|
||||||
|
SourceObject,
|
||||||
|
SrcSet,
|
||||||
|
Sizes,
|
||||||
|
HyphenationCallback,
|
||||||
|
SVGPresentationAttributes,
|
||||||
|
Bookmark,
|
||||||
|
PageLayout,
|
||||||
|
PageMode,
|
||||||
|
HitSlop,
|
||||||
|
} from '@react-pdf/types';
|
||||||
|
|
||||||
|
declare class ReactPDF {
|
||||||
|
static default: typeof ReactPDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = ReactPDF;
|
||||||
|
|
||||||
|
declare namespace ReactPDF {
|
||||||
|
interface Styles {
|
||||||
|
[key: string]: Style;
|
||||||
|
}
|
||||||
|
interface OnRenderProps {
|
||||||
|
blob?: Blob;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Permissions {
|
||||||
|
printing?: 'lowResolution' | 'highResolution';
|
||||||
|
modifying?: boolean;
|
||||||
|
copying?: boolean;
|
||||||
|
annotating?: boolean;
|
||||||
|
fillingForms?: boolean;
|
||||||
|
contentAccessibility?: boolean;
|
||||||
|
documentAssembly?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DocumentProps {
|
||||||
|
style?: Style | Style[];
|
||||||
|
title?: string;
|
||||||
|
author?: string;
|
||||||
|
subject?: string;
|
||||||
|
creator?: string;
|
||||||
|
keywords?: string;
|
||||||
|
producer?: string;
|
||||||
|
language?: string;
|
||||||
|
creationDate?: Date;
|
||||||
|
modificationDate?: Date;
|
||||||
|
pdfVersion?: PDFVersion;
|
||||||
|
pageMode?: PageMode;
|
||||||
|
pageLayout?: PageLayout;
|
||||||
|
ownerPassword?: string;
|
||||||
|
userPassword?: string;
|
||||||
|
permissions?: Permissions;
|
||||||
|
onRender?: (props: OnRenderProps) => any;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This component represent the PDF document itself. It must be the root
|
||||||
|
* of your tree element structure, and under no circumstances should it be
|
||||||
|
* used as children of another react-pdf component. In addition, it should
|
||||||
|
* only have childs of type <Page />.
|
||||||
|
*/
|
||||||
|
export class Document extends React.Component<
|
||||||
|
React.PropsWithChildren<DocumentProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface NodeProps {
|
||||||
|
id?: string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
/**
|
||||||
|
* Render component in all wrapped pages.
|
||||||
|
* @see https://react-pdf.org/advanced#fixed-components
|
||||||
|
*/
|
||||||
|
fixed?: boolean;
|
||||||
|
/**
|
||||||
|
* Force the wrapping algorithm to start a new page when rendering the
|
||||||
|
* element.
|
||||||
|
* @see https://react-pdf.org/advanced#page-breaks
|
||||||
|
*/
|
||||||
|
break?: boolean;
|
||||||
|
/**
|
||||||
|
* Hint that no page wrapping should occur between all sibling elements following the element within n points
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
minPresenceAhead?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable page wrapping for this page.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
size?: PageSize;
|
||||||
|
orientation?: Orientation;
|
||||||
|
dpi?: number;
|
||||||
|
bookmark?: Bookmark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents single page inside the PDF document, or a subset of them if
|
||||||
|
* using the wrapping feature. A <Document /> can contain as many pages as
|
||||||
|
* you want, but ensure not rendering a page inside any component besides
|
||||||
|
* Document.
|
||||||
|
*/
|
||||||
|
export class Page extends React.Component<
|
||||||
|
React.PropsWithChildren<PageProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ViewProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The most fundamental component for building a UI and is designed to be
|
||||||
|
* nested inside other views and can have 0 to many children.
|
||||||
|
*/
|
||||||
|
export class View extends React.Component<
|
||||||
|
React.PropsWithChildren<ViewProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BaseImageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* Works like the HTML img sizes attribute.
|
||||||
|
* @example 300
|
||||||
|
* @example "300"
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSrcProp extends BaseImageProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSourceProp extends BaseImageProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageProps = ImageWithSrcProp | ImageWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying network or local (Node only) JPG or
|
||||||
|
* PNG images, as well as base64 encoded image strings.
|
||||||
|
*/
|
||||||
|
export class Image extends React.Component<ImageProps> {}
|
||||||
|
|
||||||
|
interface BaseImageBackgroundProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* @example 300
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
/**
|
||||||
|
* Style applied to the background image.
|
||||||
|
*/
|
||||||
|
imageStyle?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSrcProp extends BaseImageBackgroundProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSourceProp extends BaseImageBackgroundProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageBackgroundProps =
|
||||||
|
| ImageBackgroundWithSrcProp
|
||||||
|
| ImageBackgroundWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying an image behind child content.
|
||||||
|
* Compatible with React Native's ImageBackground component.
|
||||||
|
* @see https://reactnative.dev/docs/imagebackground
|
||||||
|
*/
|
||||||
|
export class ImageBackground extends React.Component<
|
||||||
|
React.PropsWithChildren<ImageBackgroundProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TextProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
totalPages: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
subPageTotalPages: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the bottom of a page or its container.
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
orphans?: number;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the top of a page or its container..
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
widows?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SVGTextProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x: string | number;
|
||||||
|
y: string | number;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying text. Text supports nesting of other
|
||||||
|
* Text or Link components to create inline styling.
|
||||||
|
*/
|
||||||
|
export class Text extends React.Component<
|
||||||
|
React.PropsWithChildren<TextProps> | SVGTextProps
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinkProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
href?: string;
|
||||||
|
src?: string;
|
||||||
|
/**
|
||||||
|
* Extends the clickable area of the link beyond its visible bounds.
|
||||||
|
* Accepts a number (applied to all sides) or an object with top, bottom, left, right.
|
||||||
|
* @see https://reactnative.dev/docs/view#hitslop
|
||||||
|
*/
|
||||||
|
hitSlop?: HitSlop;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying a hyperlink. Link’s can be nested
|
||||||
|
* inside a Text component, or being inside any other valid primitive.
|
||||||
|
*/
|
||||||
|
export class Link extends React.Component<
|
||||||
|
React.PropsWithChildren<LinkProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface FormCommonProps extends NodeProps {
|
||||||
|
name?: string;
|
||||||
|
required?: boolean;
|
||||||
|
noExport?: boolean;
|
||||||
|
readOnly?: boolean;
|
||||||
|
value?: number | string;
|
||||||
|
defaultValue?: number | string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FieldSetProps extends NodeProps {
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class FieldSet extends React.Component<
|
||||||
|
React.PropsWithChildren<FieldSetProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputFormatting {
|
||||||
|
type:
|
||||||
|
| 'date'
|
||||||
|
| 'time'
|
||||||
|
| 'percent'
|
||||||
|
| 'number'
|
||||||
|
| 'zip'
|
||||||
|
| 'zipPlus4'
|
||||||
|
| 'phone'
|
||||||
|
| 'ssn';
|
||||||
|
param?: string;
|
||||||
|
nDec?: number;
|
||||||
|
sepComma?: boolean;
|
||||||
|
negStyle?: 'MinusBlack' | 'Red' | 'ParensBlack' | 'ParensRed';
|
||||||
|
currency?: string;
|
||||||
|
currencyPrepend?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputProps extends FormCommonProps {
|
||||||
|
align?: 'left' | 'center' | 'right';
|
||||||
|
multiline?: boolean;
|
||||||
|
/**
|
||||||
|
* The text will be masked (e.g. with asterisks).
|
||||||
|
*/
|
||||||
|
password?: boolean;
|
||||||
|
/**
|
||||||
|
* If set, text entered in the field is not spell-checked
|
||||||
|
*/
|
||||||
|
noSpell?: boolean;
|
||||||
|
format?: TextInputFormatting;
|
||||||
|
/**
|
||||||
|
* Sets the fontSize (default or 0 means auto sizing)
|
||||||
|
*/
|
||||||
|
fontSize?: number;
|
||||||
|
/**
|
||||||
|
* Sets the maximum length (characters) of the text in the field
|
||||||
|
*/
|
||||||
|
maxLength?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class TextInput extends React.Component<TextInputProps> {}
|
||||||
|
|
||||||
|
interface CheckboxProps extends FormCommonProps {
|
||||||
|
backgroundColor?: string;
|
||||||
|
borderColor?: string;
|
||||||
|
checked?: boolean;
|
||||||
|
onState?: string;
|
||||||
|
offState?: string;
|
||||||
|
xMark?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Checkbox extends React.Component<CheckboxProps> {}
|
||||||
|
|
||||||
|
interface SelectAndListPropsBase extends FormCommonProps {
|
||||||
|
sort?: boolean;
|
||||||
|
edit?: boolean;
|
||||||
|
multiSelect?: boolean;
|
||||||
|
noSpell?: boolean;
|
||||||
|
select?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
type SelectAndListPropsWithEdit = SelectAndListPropsBase & {
|
||||||
|
edit: true | false;
|
||||||
|
noSpell: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListPropsWithNoSpell = SelectAndListPropsBase & {
|
||||||
|
edit: boolean;
|
||||||
|
noSpell: true | false;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListProps =
|
||||||
|
| SelectAndListPropsWithEdit
|
||||||
|
| SelectAndListPropsWithNoSpell;
|
||||||
|
|
||||||
|
export class Select extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
export class List extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
interface NoteProps extends NodeProps {
|
||||||
|
children: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Note extends React.Component<NoteProps> {}
|
||||||
|
|
||||||
|
interface CanvasProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
paint: (
|
||||||
|
painter: any,
|
||||||
|
availableWidth: number,
|
||||||
|
availableHeight: number,
|
||||||
|
) => null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Canvas extends React.Component<CanvasProps> {}
|
||||||
|
|
||||||
|
interface SVGProps extends NodeProps, SVGPresentationAttributes {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
width?: string | number;
|
||||||
|
height?: string | number;
|
||||||
|
viewBox?: string;
|
||||||
|
preserveAspectRatio?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <SVG /> element is a container that defines a new coordinate system and viewport. It is used as the outermost element of SVG documents.
|
||||||
|
*/
|
||||||
|
export class Svg extends React.Component<React.PropsWithChildren<SVGProps>> {}
|
||||||
|
|
||||||
|
interface LineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x1: string | number;
|
||||||
|
x2: string | number;
|
||||||
|
y1: string | number;
|
||||||
|
y2: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Line /> element is used to create a line.
|
||||||
|
*/
|
||||||
|
export class Line extends React.Component<
|
||||||
|
React.PropsWithChildren<LineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolylineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polyline /> element is used to create any shape that consists of only straight lines (that is connected at several points).
|
||||||
|
*/
|
||||||
|
export class Polyline extends React.Component<
|
||||||
|
React.PropsWithChildren<PolylineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolygonProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polygon /> element is used to create a graphic that contains at least three sides.
|
||||||
|
* Polygons are made of straight lines, and the shape is "closed" (all the lines connect up).
|
||||||
|
*/
|
||||||
|
export class Polygon extends React.Component<
|
||||||
|
React.PropsWithChildren<PolygonProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PathProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
d: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Path /> element is the most powerful element in the SVG library of basic shapes. It can be used to create lines, curves, arcs, and more.
|
||||||
|
*/
|
||||||
|
export class Path extends React.Component<
|
||||||
|
React.PropsWithChildren<PathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RectProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
width: string | number;
|
||||||
|
height: string | number;
|
||||||
|
rx?: string | number;
|
||||||
|
ry?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Rect /> element is used to create a rectangle and variations of a rectangle shape.
|
||||||
|
*/
|
||||||
|
export class Rect extends React.Component<
|
||||||
|
React.PropsWithChildren<RectProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface CircleProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Circle /> element is used to create a circle.
|
||||||
|
*/
|
||||||
|
export class Circle extends React.Component<
|
||||||
|
React.PropsWithChildren<CircleProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface EllipseProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
rx: string | number;
|
||||||
|
ry: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Ellipse /> element is used to create an ellipse.
|
||||||
|
* An ellipse is closely related to a circle. The difference is that an ellipse has an x and a y radius that differs from each other, while a circle has equal x and y radius.
|
||||||
|
*/
|
||||||
|
export class Ellipse extends React.Component<
|
||||||
|
React.PropsWithChildren<EllipseProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TspanProps extends SVGPresentationAttributes {
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Tspan /> element defines a subtext within a <Text /> element or another <Tspan /> element.
|
||||||
|
* It allows for adjustment of the style and/or position of that subtext as needed.
|
||||||
|
*/
|
||||||
|
export class Tspan extends React.Component<
|
||||||
|
React.PropsWithChildren<TspanProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface GProps extends SVGPresentationAttributes {
|
||||||
|
style?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <G /> SVG element is a container used to group other SVG elements.
|
||||||
|
* Transformations applied to the <G /> element are performed on its child elements, and its attributes are inherited by its children.
|
||||||
|
*/
|
||||||
|
export class G extends React.Component<React.PropsWithChildren<GProps>> {}
|
||||||
|
|
||||||
|
interface StopProps {
|
||||||
|
offset: string | number;
|
||||||
|
stopColor: string;
|
||||||
|
stopOpacity?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SVG <Stop /> element defines a color and its position to use on a gradient. This element is always a child of a <LinearGradient /> or <RadialGradient /> element
|
||||||
|
*/
|
||||||
|
export class Stop extends React.Component<
|
||||||
|
React.PropsWithChildren<StopProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
|
interface DefsProps {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Defs /> element is used to store graphical objects that will be used at a later time. Objects created inside a <Defs /> element are not rendered directly. To display them you have to reference them
|
||||||
|
*/
|
||||||
|
export class Defs extends React.Component<
|
||||||
|
React.PropsWithChildren<DefsProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ClipPathProps {
|
||||||
|
id?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <ClipPath /> SVG element defines a clipping path, to be used by the clipPath property.
|
||||||
|
* A clipping path restricts the region to which paint can be applied. Conceptually, parts of the drawing that lie outside of the region bounded by the clipping path are not drawn.
|
||||||
|
*/
|
||||||
|
export class ClipPath extends React.Component<
|
||||||
|
React.PropsWithChildren<ClipPathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface MarkerProps {
|
||||||
|
id: string;
|
||||||
|
viewBox?: string;
|
||||||
|
refX?: string | number;
|
||||||
|
refY?: string | number;
|
||||||
|
markerWidth?: string | number;
|
||||||
|
markerHeight?: string | number;
|
||||||
|
orient?: 'auto' | 'auto-start-reverse' | number;
|
||||||
|
markerUnits?: 'strokeWidth' | 'userSpaceOnUse';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Marker /> SVG element defines a graphic used for drawing arrows or polymarkers on a given <Path />, <Line />, <Polyline />, or <Polygon /> element.
|
||||||
|
* Markers can be attached to shapes using the markerStart, markerMid, and markerEnd properties.
|
||||||
|
*/
|
||||||
|
export class Marker extends React.Component<
|
||||||
|
React.PropsWithChildren<MarkerProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinearGradientProps {
|
||||||
|
id: string;
|
||||||
|
x1?: string | number;
|
||||||
|
x2?: string | number;
|
||||||
|
y1?: string | number;
|
||||||
|
y2?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <LinearGradient /> element lets authors define linear gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class LinearGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<LinearGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RadialGradientProps {
|
||||||
|
id: string;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r?: string | number;
|
||||||
|
fx?: string | number;
|
||||||
|
fy?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <RadialGradient /> element lets authors define radial gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class RadialGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<RadialGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BlobProviderParams {
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
loading: boolean;
|
||||||
|
error: Error | null;
|
||||||
|
}
|
||||||
|
interface BlobProviderProps {
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children: (params: BlobProviderParams) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Easy and declarative way of getting document's blob data without
|
||||||
|
* showing it on screen.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class BlobProvider extends React.Component<BlobProviderProps> {}
|
||||||
|
|
||||||
|
interface PDFViewerProps {
|
||||||
|
width?: number | string;
|
||||||
|
height?: number | string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
className?: string;
|
||||||
|
children?: React.ReactElement<DocumentProps>;
|
||||||
|
innerRef?: React.Ref<HTMLIFrameElement>;
|
||||||
|
showToolbar?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iframe PDF viewer for client-side generated documents.
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFViewer extends React.Component<PDFViewerProps> {}
|
||||||
|
|
||||||
|
interface PDFDownloadLinkProps
|
||||||
|
extends Omit<
|
||||||
|
React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
||||||
|
'href' | 'children'
|
||||||
|
> {
|
||||||
|
/** PDF filename. Alias for anchor tag `download` attribute. */
|
||||||
|
fileName?: string;
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children?: React.ReactNode | React.FC<BlobProviderParams>;
|
||||||
|
onClick?: React.AnchorHTMLAttributes<HTMLAnchorElement>['onClick'] &
|
||||||
|
((
|
||||||
|
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>,
|
||||||
|
instance: UsePDFInstance,
|
||||||
|
) => void);
|
||||||
|
ref?: React.Ref<HTMLAnchorElement> | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Anchor tag to enable generate and download PDF documents on the fly.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFDownloadLink extends React.Component<PDFDownloadLinkProps> {}
|
||||||
|
|
||||||
|
interface UsePDFInstance {
|
||||||
|
loading: boolean;
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
error: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* React hook for creating and updating a PDF document instance
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export function usePDF(options?: {
|
||||||
|
document?: React.ReactElement<DocumentProps>;
|
||||||
|
}): [
|
||||||
|
UsePDFInstance,
|
||||||
|
(newDocument: React.ReactElement<DocumentProps>) => void,
|
||||||
|
];
|
||||||
|
|
||||||
|
export const Font: FontStore;
|
||||||
|
|
||||||
|
export const StyleSheet: {
|
||||||
|
create: <T extends Styles>(styles: T) => T;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const version: any;
|
||||||
|
|
||||||
|
export const PDFRenderer: any;
|
||||||
|
|
||||||
|
export const pdf: (initialValue?: React.ReactElement<DocumentProps>) => {
|
||||||
|
container: any;
|
||||||
|
isDirty: () => boolean;
|
||||||
|
toString: () => string;
|
||||||
|
toBlob: () => Promise<Blob>;
|
||||||
|
toBuffer: () => Promise<NodeJS.ReadableStream>;
|
||||||
|
on: (event: 'change', callback: () => void) => void;
|
||||||
|
updateContainer: (
|
||||||
|
document: React.ReactElement<any>,
|
||||||
|
callback?: () => void,
|
||||||
|
) => void;
|
||||||
|
removeListener: (event: 'change', callback: () => void) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const renderToStream: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use the `renderToBuffer` method
|
||||||
|
*/
|
||||||
|
export const renderToString: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<string>;
|
||||||
|
|
||||||
|
export const renderToFile: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
filePath: string,
|
||||||
|
callback?: (output: NodeJS.ReadableStream, _filePath: string) => any,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
const render: typeof renderToFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render document into a nodejs buffer
|
||||||
|
* @platform node
|
||||||
|
*/
|
||||||
|
export const renderToBuffer: (
|
||||||
|
document: React.ReactElement<ReactPDF.DocumentProps>,
|
||||||
|
) => Promise<Buffer>;
|
||||||
|
}
|
||||||
368
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.js
generated
vendored
Normal file
368
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.js
generated
vendored
Normal file
@@ -0,0 +1,368 @@
|
|||||||
|
import * as primitives from '@react-pdf/primitives';
|
||||||
|
export * from '@react-pdf/primitives';
|
||||||
|
import fs from 'fs';
|
||||||
|
import { Buffer } from 'buffer';
|
||||||
|
import FontStore from '@react-pdf/font';
|
||||||
|
import renderPDF from '@react-pdf/render';
|
||||||
|
import PDFDocument from '@react-pdf/pdfkit';
|
||||||
|
import layoutDocument from '@react-pdf/layout';
|
||||||
|
import { upperFirst } from '@react-pdf/fns';
|
||||||
|
import Reconciler from '@react-pdf/reconciler';
|
||||||
|
|
||||||
|
const omitNils = object => Object.fromEntries(Object.entries(object).filter(_ref => {
|
||||||
|
let [, value] = _ref;
|
||||||
|
return value !== undefined;
|
||||||
|
}));
|
||||||
|
|
||||||
|
const createInstance = (type, _ref) => {
|
||||||
|
let {
|
||||||
|
style,
|
||||||
|
children,
|
||||||
|
...props
|
||||||
|
} = _ref;
|
||||||
|
return {
|
||||||
|
type,
|
||||||
|
box: {},
|
||||||
|
style: style || {},
|
||||||
|
props: props || {},
|
||||||
|
children: []
|
||||||
|
};
|
||||||
|
};
|
||||||
|
const createTextInstance = text => ({
|
||||||
|
type: 'TEXT_INSTANCE',
|
||||||
|
value: text
|
||||||
|
});
|
||||||
|
const appendChild = (parent, child) => {
|
||||||
|
const isParentText = parent.type === 'TEXT' || parent.type === 'LINK' || parent.type === 'TSPAN' || parent.type === 'NOTE';
|
||||||
|
const isChildTextInstance = child.type === 'TEXT_INSTANCE';
|
||||||
|
const isOrphanTextInstance = isChildTextInstance && !isParentText;
|
||||||
|
|
||||||
|
// Ignore orphan text instances.
|
||||||
|
// Caused by cases such as <>{name && <Text>{name}</Text>}</>
|
||||||
|
if (isOrphanTextInstance) {
|
||||||
|
console.warn(`Invalid '${child.value}' string child outside <Text> component`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
parent.children.push(child);
|
||||||
|
};
|
||||||
|
const appendChildToContainer = (parentInstance, child) => {
|
||||||
|
if (parentInstance.type === 'ROOT') {
|
||||||
|
parentInstance.document = child;
|
||||||
|
} else {
|
||||||
|
appendChild(parentInstance, child);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const insertBefore = (parentInstance, child, beforeChild) => {
|
||||||
|
var _parentInstance$child;
|
||||||
|
const index = (_parentInstance$child = parentInstance.children) === null || _parentInstance$child === void 0 ? void 0 : _parentInstance$child.indexOf(beforeChild);
|
||||||
|
if (index === undefined) return;
|
||||||
|
if (index !== -1 && child) parentInstance.children.splice(index, 0, child);
|
||||||
|
};
|
||||||
|
const removeChild = (parentInstance, child) => {
|
||||||
|
var _parentInstance$child2;
|
||||||
|
const index = (_parentInstance$child2 = parentInstance.children) === null || _parentInstance$child2 === void 0 ? void 0 : _parentInstance$child2.indexOf(child);
|
||||||
|
if (index === undefined) return;
|
||||||
|
if (index !== -1) parentInstance.children.splice(index, 1);
|
||||||
|
};
|
||||||
|
const removeChildFromContainer = (parentInstance, child) => {
|
||||||
|
var _parentInstance$child3;
|
||||||
|
const index = (_parentInstance$child3 = parentInstance.children) === null || _parentInstance$child3 === void 0 ? void 0 : _parentInstance$child3.indexOf(child);
|
||||||
|
if (index === undefined) return;
|
||||||
|
if (index !== -1) parentInstance.children.splice(index, 1);
|
||||||
|
};
|
||||||
|
const commitTextUpdate = (textInstance, oldText, newText) => {
|
||||||
|
textInstance.value = newText;
|
||||||
|
};
|
||||||
|
const commitUpdate = (instance, updatePayload, type, oldProps, newProps) => {
|
||||||
|
const {
|
||||||
|
style,
|
||||||
|
...props
|
||||||
|
} = newProps;
|
||||||
|
instance.props = props;
|
||||||
|
instance.style = style;
|
||||||
|
};
|
||||||
|
const createRenderer = _ref2 => {
|
||||||
|
let {
|
||||||
|
onChange = () => {}
|
||||||
|
} = _ref2;
|
||||||
|
return Reconciler({
|
||||||
|
appendChild,
|
||||||
|
appendChildToContainer,
|
||||||
|
commitTextUpdate,
|
||||||
|
commitUpdate,
|
||||||
|
createInstance,
|
||||||
|
createTextInstance,
|
||||||
|
insertBefore,
|
||||||
|
removeChild,
|
||||||
|
removeChildFromContainer,
|
||||||
|
resetAfterCommit: onChange
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var version$1 = "4.5.1";
|
||||||
|
var packageJson = {
|
||||||
|
version: version$1};
|
||||||
|
|
||||||
|
const {
|
||||||
|
version
|
||||||
|
} = packageJson;
|
||||||
|
const fontStore = new FontStore();
|
||||||
|
|
||||||
|
// We must keep a single renderer instance, otherwise React will complain
|
||||||
|
let renderer;
|
||||||
|
|
||||||
|
// The pdf instance acts as an event emitter for DOM usage.
|
||||||
|
// We only want to trigger an update when PDF content changes
|
||||||
|
const events = {};
|
||||||
|
const pdf = initialValue => {
|
||||||
|
const onChange = () => {
|
||||||
|
var _events$change;
|
||||||
|
const listeners = ((_events$change = events.change) === null || _events$change === void 0 ? void 0 : _events$change.slice()) || [];
|
||||||
|
for (let i = 0; i < listeners.length; i += 1) listeners[i]();
|
||||||
|
};
|
||||||
|
const container = {
|
||||||
|
type: 'ROOT',
|
||||||
|
document: null
|
||||||
|
};
|
||||||
|
renderer = renderer || createRenderer({
|
||||||
|
onChange
|
||||||
|
});
|
||||||
|
const mountNode = renderer.createContainer(container);
|
||||||
|
const updateContainer = (doc, callback) => {
|
||||||
|
renderer.updateContainer(doc, mountNode, null, callback);
|
||||||
|
};
|
||||||
|
if (initialValue) updateContainer(initialValue);
|
||||||
|
const render = async function (compress) {
|
||||||
|
if (compress === void 0) {
|
||||||
|
compress = true;
|
||||||
|
}
|
||||||
|
const props = container.document.props || {};
|
||||||
|
const {
|
||||||
|
pdfVersion,
|
||||||
|
language,
|
||||||
|
pageLayout,
|
||||||
|
pageMode,
|
||||||
|
title,
|
||||||
|
author,
|
||||||
|
subject,
|
||||||
|
keywords,
|
||||||
|
creator = 'react-pdf',
|
||||||
|
producer = 'react-pdf',
|
||||||
|
creationDate = new Date(),
|
||||||
|
modificationDate,
|
||||||
|
ownerPassword,
|
||||||
|
userPassword,
|
||||||
|
permissions
|
||||||
|
} = props;
|
||||||
|
const ctx = new PDFDocument({
|
||||||
|
compress,
|
||||||
|
pdfVersion,
|
||||||
|
lang: language,
|
||||||
|
displayTitle: true,
|
||||||
|
autoFirstPage: false,
|
||||||
|
ownerPassword,
|
||||||
|
userPassword,
|
||||||
|
permissions,
|
||||||
|
pageLayout,
|
||||||
|
info: omitNils({
|
||||||
|
Title: title,
|
||||||
|
Author: author,
|
||||||
|
Subject: subject,
|
||||||
|
Keywords: keywords,
|
||||||
|
Creator: creator,
|
||||||
|
Producer: producer,
|
||||||
|
CreationDate: creationDate,
|
||||||
|
ModificationDate: modificationDate
|
||||||
|
})
|
||||||
|
});
|
||||||
|
if (pageMode) {
|
||||||
|
ctx._root.data.PageMode = upperFirst(pageMode);
|
||||||
|
}
|
||||||
|
const layout = await layoutDocument(container.document, fontStore);
|
||||||
|
const fileStream = renderPDF(ctx, layout);
|
||||||
|
return {
|
||||||
|
layout,
|
||||||
|
fileStream
|
||||||
|
};
|
||||||
|
};
|
||||||
|
const callOnRender = function (params) {
|
||||||
|
if (params === void 0) {
|
||||||
|
params = {};
|
||||||
|
}
|
||||||
|
if (container.document.props.onRender) {
|
||||||
|
container.document.props.onRender(params);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const toBlob = async () => {
|
||||||
|
const chunks = [];
|
||||||
|
const {
|
||||||
|
layout: _INTERNAL__LAYOUT__DATA_,
|
||||||
|
fileStream: instance
|
||||||
|
} = await render();
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
instance.on('data', chunk => {
|
||||||
|
chunks.push(chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk));
|
||||||
|
});
|
||||||
|
instance.on('end', () => {
|
||||||
|
try {
|
||||||
|
const blob = new Blob(chunks, {
|
||||||
|
type: 'application/pdf'
|
||||||
|
});
|
||||||
|
callOnRender({
|
||||||
|
blob,
|
||||||
|
_INTERNAL__LAYOUT__DATA_
|
||||||
|
});
|
||||||
|
resolve(blob);
|
||||||
|
} catch (error) {
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// TODO: rename this method to `toStream` in next major release, because it return stream not a buffer
|
||||||
|
const toBuffer = async () => {
|
||||||
|
const {
|
||||||
|
layout: _INTERNAL__LAYOUT__DATA_,
|
||||||
|
fileStream
|
||||||
|
} = await render();
|
||||||
|
callOnRender({
|
||||||
|
_INTERNAL__LAYOUT__DATA_
|
||||||
|
});
|
||||||
|
return fileStream;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TODO: remove this method in next major release. it is buggy
|
||||||
|
* see
|
||||||
|
* - https://github.com/diegomura/react-pdf/issues/2112
|
||||||
|
* - https://github.com/diegomura/react-pdf/issues/2095
|
||||||
|
*/
|
||||||
|
const toString = async () => {
|
||||||
|
if (process.env.NODE_ENV === 'development') {
|
||||||
|
console.warn('`toString` is deprecated and will be removed in next major release');
|
||||||
|
}
|
||||||
|
let result = '';
|
||||||
|
const {
|
||||||
|
fileStream: instance
|
||||||
|
} = await render(false); // For some reason, when rendering to string if compress=true the document is blank
|
||||||
|
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
try {
|
||||||
|
instance.on('data', buffer => {
|
||||||
|
result += buffer;
|
||||||
|
});
|
||||||
|
instance.on('end', () => {
|
||||||
|
callOnRender();
|
||||||
|
resolve(result);
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const on = (event, listener) => {
|
||||||
|
if (!events[event]) events[event] = [];
|
||||||
|
events[event].push(listener);
|
||||||
|
};
|
||||||
|
const removeListener = (event, listener) => {
|
||||||
|
if (!events[event]) return;
|
||||||
|
const idx = events[event].indexOf(listener);
|
||||||
|
if (idx > -1) events[event].splice(idx, 1);
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
on,
|
||||||
|
container,
|
||||||
|
toBlob,
|
||||||
|
toBuffer,
|
||||||
|
toString,
|
||||||
|
removeListener,
|
||||||
|
updateContainer
|
||||||
|
};
|
||||||
|
};
|
||||||
|
const Font = fontStore;
|
||||||
|
const StyleSheet = {
|
||||||
|
create: s => s
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {React.ReactElement} element
|
||||||
|
* @returns {Promise<NodeJS.ReadableStream>}
|
||||||
|
*/
|
||||||
|
const renderToStream = async element => {
|
||||||
|
const instance = pdf(element);
|
||||||
|
const stream = await instance.toBuffer();
|
||||||
|
return stream;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {React.ReactElement} element
|
||||||
|
* @param {string} filePath
|
||||||
|
* @param {Function} [callback]
|
||||||
|
*/
|
||||||
|
const renderToFile = async (element, filePath, callback) => {
|
||||||
|
const output = await renderToStream(element);
|
||||||
|
const stream = fs.createWriteStream(filePath);
|
||||||
|
output.pipe(stream);
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
stream.on('finish', () => {
|
||||||
|
if (callback) callback(output, filePath);
|
||||||
|
resolve(output);
|
||||||
|
});
|
||||||
|
stream.on('error', reject);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {React.ReactElement} element
|
||||||
|
* @returns {Promise<Buffer>}
|
||||||
|
*/
|
||||||
|
const renderToBuffer = element => renderToStream(element).then(stream => new Promise((resolve, reject) => {
|
||||||
|
const chunks = [];
|
||||||
|
stream.on('data', chunk => chunks.push(chunk));
|
||||||
|
stream.on('end', () => resolve(Buffer.concat(chunks)));
|
||||||
|
stream.on('error', error => reject(error));
|
||||||
|
}));
|
||||||
|
const renderToString = element => {
|
||||||
|
if (process.env.NODE_ENV === 'development') {
|
||||||
|
console.warn('`renderToString` is deprecated and will be removed in next major release, use `renderToBuffer` instead');
|
||||||
|
}
|
||||||
|
return renderToBuffer(element).then(buffer => buffer.toString());
|
||||||
|
};
|
||||||
|
|
||||||
|
const throwEnvironmentError = name => {
|
||||||
|
throw new Error(`${name} is a web specific API. You're either using this component on Node, or your bundler is not loading react-pdf from the appropriate web build.`);
|
||||||
|
};
|
||||||
|
const usePDF = () => {
|
||||||
|
throwEnvironmentError('usePDF');
|
||||||
|
};
|
||||||
|
const PDFViewer = () => {
|
||||||
|
throwEnvironmentError('PDFViewer');
|
||||||
|
};
|
||||||
|
const PDFDownloadLink = () => {
|
||||||
|
throwEnvironmentError('PDFDownloadLink');
|
||||||
|
};
|
||||||
|
const BlobProvider = () => {
|
||||||
|
throwEnvironmentError('BlobProvider');
|
||||||
|
};
|
||||||
|
const render = renderToFile;
|
||||||
|
|
||||||
|
// TODO: remove this default export in next major release because it breaks tree-shacking
|
||||||
|
var index = {
|
||||||
|
pdf,
|
||||||
|
Font,
|
||||||
|
version,
|
||||||
|
StyleSheet,
|
||||||
|
usePDF,
|
||||||
|
PDFViewer,
|
||||||
|
BlobProvider,
|
||||||
|
PDFDownloadLink,
|
||||||
|
renderToStream,
|
||||||
|
renderToString,
|
||||||
|
renderToFile,
|
||||||
|
render,
|
||||||
|
...primitives
|
||||||
|
};
|
||||||
|
|
||||||
|
export { BlobProvider, Font, PDFDownloadLink, PDFViewer, StyleSheet, createRenderer, index as default, pdf, render, renderToBuffer, renderToFile, renderToStream, renderToString, usePDF, version };
|
||||||
|
//# sourceMappingURL=react-pdf.js.map
|
||||||
1
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.js.map
generated
vendored
Normal file
1
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.min.d.cts
generated
vendored
Normal file
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.min.d.cts
generated
vendored
Normal file
@@ -0,0 +1,793 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
|
|
||||||
|
import * as React from 'react';
|
||||||
|
import {
|
||||||
|
Style,
|
||||||
|
PageSize,
|
||||||
|
FontStore,
|
||||||
|
PDFVersion,
|
||||||
|
Orientation,
|
||||||
|
SourceObject,
|
||||||
|
SrcSet,
|
||||||
|
Sizes,
|
||||||
|
HyphenationCallback,
|
||||||
|
SVGPresentationAttributes,
|
||||||
|
Bookmark,
|
||||||
|
PageLayout,
|
||||||
|
PageMode,
|
||||||
|
HitSlop,
|
||||||
|
} from '@react-pdf/types';
|
||||||
|
|
||||||
|
declare class ReactPDF {
|
||||||
|
static default: typeof ReactPDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = ReactPDF;
|
||||||
|
|
||||||
|
declare namespace ReactPDF {
|
||||||
|
interface Styles {
|
||||||
|
[key: string]: Style;
|
||||||
|
}
|
||||||
|
interface OnRenderProps {
|
||||||
|
blob?: Blob;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Permissions {
|
||||||
|
printing?: 'lowResolution' | 'highResolution';
|
||||||
|
modifying?: boolean;
|
||||||
|
copying?: boolean;
|
||||||
|
annotating?: boolean;
|
||||||
|
fillingForms?: boolean;
|
||||||
|
contentAccessibility?: boolean;
|
||||||
|
documentAssembly?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DocumentProps {
|
||||||
|
style?: Style | Style[];
|
||||||
|
title?: string;
|
||||||
|
author?: string;
|
||||||
|
subject?: string;
|
||||||
|
creator?: string;
|
||||||
|
keywords?: string;
|
||||||
|
producer?: string;
|
||||||
|
language?: string;
|
||||||
|
creationDate?: Date;
|
||||||
|
modificationDate?: Date;
|
||||||
|
pdfVersion?: PDFVersion;
|
||||||
|
pageMode?: PageMode;
|
||||||
|
pageLayout?: PageLayout;
|
||||||
|
ownerPassword?: string;
|
||||||
|
userPassword?: string;
|
||||||
|
permissions?: Permissions;
|
||||||
|
onRender?: (props: OnRenderProps) => any;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This component represent the PDF document itself. It must be the root
|
||||||
|
* of your tree element structure, and under no circumstances should it be
|
||||||
|
* used as children of another react-pdf component. In addition, it should
|
||||||
|
* only have childs of type <Page />.
|
||||||
|
*/
|
||||||
|
export class Document extends React.Component<
|
||||||
|
React.PropsWithChildren<DocumentProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface NodeProps {
|
||||||
|
id?: string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
/**
|
||||||
|
* Render component in all wrapped pages.
|
||||||
|
* @see https://react-pdf.org/advanced#fixed-components
|
||||||
|
*/
|
||||||
|
fixed?: boolean;
|
||||||
|
/**
|
||||||
|
* Force the wrapping algorithm to start a new page when rendering the
|
||||||
|
* element.
|
||||||
|
* @see https://react-pdf.org/advanced#page-breaks
|
||||||
|
*/
|
||||||
|
break?: boolean;
|
||||||
|
/**
|
||||||
|
* Hint that no page wrapping should occur between all sibling elements following the element within n points
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
minPresenceAhead?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable page wrapping for this page.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
size?: PageSize;
|
||||||
|
orientation?: Orientation;
|
||||||
|
dpi?: number;
|
||||||
|
bookmark?: Bookmark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents single page inside the PDF document, or a subset of them if
|
||||||
|
* using the wrapping feature. A <Document /> can contain as many pages as
|
||||||
|
* you want, but ensure not rendering a page inside any component besides
|
||||||
|
* Document.
|
||||||
|
*/
|
||||||
|
export class Page extends React.Component<
|
||||||
|
React.PropsWithChildren<PageProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ViewProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The most fundamental component for building a UI and is designed to be
|
||||||
|
* nested inside other views and can have 0 to many children.
|
||||||
|
*/
|
||||||
|
export class View extends React.Component<
|
||||||
|
React.PropsWithChildren<ViewProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BaseImageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* Works like the HTML img sizes attribute.
|
||||||
|
* @example 300
|
||||||
|
* @example "300"
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSrcProp extends BaseImageProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSourceProp extends BaseImageProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageProps = ImageWithSrcProp | ImageWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying network or local (Node only) JPG or
|
||||||
|
* PNG images, as well as base64 encoded image strings.
|
||||||
|
*/
|
||||||
|
export class Image extends React.Component<ImageProps> {}
|
||||||
|
|
||||||
|
interface BaseImageBackgroundProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* @example 300
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
/**
|
||||||
|
* Style applied to the background image.
|
||||||
|
*/
|
||||||
|
imageStyle?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSrcProp extends BaseImageBackgroundProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSourceProp extends BaseImageBackgroundProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageBackgroundProps =
|
||||||
|
| ImageBackgroundWithSrcProp
|
||||||
|
| ImageBackgroundWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying an image behind child content.
|
||||||
|
* Compatible with React Native's ImageBackground component.
|
||||||
|
* @see https://reactnative.dev/docs/imagebackground
|
||||||
|
*/
|
||||||
|
export class ImageBackground extends React.Component<
|
||||||
|
React.PropsWithChildren<ImageBackgroundProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TextProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
totalPages: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
subPageTotalPages: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the bottom of a page or its container.
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
orphans?: number;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the top of a page or its container..
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
widows?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SVGTextProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x: string | number;
|
||||||
|
y: string | number;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying text. Text supports nesting of other
|
||||||
|
* Text or Link components to create inline styling.
|
||||||
|
*/
|
||||||
|
export class Text extends React.Component<
|
||||||
|
React.PropsWithChildren<TextProps> | SVGTextProps
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinkProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
href?: string;
|
||||||
|
src?: string;
|
||||||
|
/**
|
||||||
|
* Extends the clickable area of the link beyond its visible bounds.
|
||||||
|
* Accepts a number (applied to all sides) or an object with top, bottom, left, right.
|
||||||
|
* @see https://reactnative.dev/docs/view#hitslop
|
||||||
|
*/
|
||||||
|
hitSlop?: HitSlop;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying a hyperlink. Link’s can be nested
|
||||||
|
* inside a Text component, or being inside any other valid primitive.
|
||||||
|
*/
|
||||||
|
export class Link extends React.Component<
|
||||||
|
React.PropsWithChildren<LinkProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface FormCommonProps extends NodeProps {
|
||||||
|
name?: string;
|
||||||
|
required?: boolean;
|
||||||
|
noExport?: boolean;
|
||||||
|
readOnly?: boolean;
|
||||||
|
value?: number | string;
|
||||||
|
defaultValue?: number | string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FieldSetProps extends NodeProps {
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class FieldSet extends React.Component<
|
||||||
|
React.PropsWithChildren<FieldSetProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputFormatting {
|
||||||
|
type:
|
||||||
|
| 'date'
|
||||||
|
| 'time'
|
||||||
|
| 'percent'
|
||||||
|
| 'number'
|
||||||
|
| 'zip'
|
||||||
|
| 'zipPlus4'
|
||||||
|
| 'phone'
|
||||||
|
| 'ssn';
|
||||||
|
param?: string;
|
||||||
|
nDec?: number;
|
||||||
|
sepComma?: boolean;
|
||||||
|
negStyle?: 'MinusBlack' | 'Red' | 'ParensBlack' | 'ParensRed';
|
||||||
|
currency?: string;
|
||||||
|
currencyPrepend?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputProps extends FormCommonProps {
|
||||||
|
align?: 'left' | 'center' | 'right';
|
||||||
|
multiline?: boolean;
|
||||||
|
/**
|
||||||
|
* The text will be masked (e.g. with asterisks).
|
||||||
|
*/
|
||||||
|
password?: boolean;
|
||||||
|
/**
|
||||||
|
* If set, text entered in the field is not spell-checked
|
||||||
|
*/
|
||||||
|
noSpell?: boolean;
|
||||||
|
format?: TextInputFormatting;
|
||||||
|
/**
|
||||||
|
* Sets the fontSize (default or 0 means auto sizing)
|
||||||
|
*/
|
||||||
|
fontSize?: number;
|
||||||
|
/**
|
||||||
|
* Sets the maximum length (characters) of the text in the field
|
||||||
|
*/
|
||||||
|
maxLength?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class TextInput extends React.Component<TextInputProps> {}
|
||||||
|
|
||||||
|
interface CheckboxProps extends FormCommonProps {
|
||||||
|
backgroundColor?: string;
|
||||||
|
borderColor?: string;
|
||||||
|
checked?: boolean;
|
||||||
|
onState?: string;
|
||||||
|
offState?: string;
|
||||||
|
xMark?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Checkbox extends React.Component<CheckboxProps> {}
|
||||||
|
|
||||||
|
interface SelectAndListPropsBase extends FormCommonProps {
|
||||||
|
sort?: boolean;
|
||||||
|
edit?: boolean;
|
||||||
|
multiSelect?: boolean;
|
||||||
|
noSpell?: boolean;
|
||||||
|
select?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
type SelectAndListPropsWithEdit = SelectAndListPropsBase & {
|
||||||
|
edit: true | false;
|
||||||
|
noSpell: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListPropsWithNoSpell = SelectAndListPropsBase & {
|
||||||
|
edit: boolean;
|
||||||
|
noSpell: true | false;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListProps =
|
||||||
|
| SelectAndListPropsWithEdit
|
||||||
|
| SelectAndListPropsWithNoSpell;
|
||||||
|
|
||||||
|
export class Select extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
export class List extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
interface NoteProps extends NodeProps {
|
||||||
|
children: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Note extends React.Component<NoteProps> {}
|
||||||
|
|
||||||
|
interface CanvasProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
paint: (
|
||||||
|
painter: any,
|
||||||
|
availableWidth: number,
|
||||||
|
availableHeight: number,
|
||||||
|
) => null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Canvas extends React.Component<CanvasProps> {}
|
||||||
|
|
||||||
|
interface SVGProps extends NodeProps, SVGPresentationAttributes {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
width?: string | number;
|
||||||
|
height?: string | number;
|
||||||
|
viewBox?: string;
|
||||||
|
preserveAspectRatio?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <SVG /> element is a container that defines a new coordinate system and viewport. It is used as the outermost element of SVG documents.
|
||||||
|
*/
|
||||||
|
export class Svg extends React.Component<React.PropsWithChildren<SVGProps>> {}
|
||||||
|
|
||||||
|
interface LineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x1: string | number;
|
||||||
|
x2: string | number;
|
||||||
|
y1: string | number;
|
||||||
|
y2: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Line /> element is used to create a line.
|
||||||
|
*/
|
||||||
|
export class Line extends React.Component<
|
||||||
|
React.PropsWithChildren<LineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolylineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polyline /> element is used to create any shape that consists of only straight lines (that is connected at several points).
|
||||||
|
*/
|
||||||
|
export class Polyline extends React.Component<
|
||||||
|
React.PropsWithChildren<PolylineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolygonProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polygon /> element is used to create a graphic that contains at least three sides.
|
||||||
|
* Polygons are made of straight lines, and the shape is "closed" (all the lines connect up).
|
||||||
|
*/
|
||||||
|
export class Polygon extends React.Component<
|
||||||
|
React.PropsWithChildren<PolygonProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PathProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
d: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Path /> element is the most powerful element in the SVG library of basic shapes. It can be used to create lines, curves, arcs, and more.
|
||||||
|
*/
|
||||||
|
export class Path extends React.Component<
|
||||||
|
React.PropsWithChildren<PathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RectProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
width: string | number;
|
||||||
|
height: string | number;
|
||||||
|
rx?: string | number;
|
||||||
|
ry?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Rect /> element is used to create a rectangle and variations of a rectangle shape.
|
||||||
|
*/
|
||||||
|
export class Rect extends React.Component<
|
||||||
|
React.PropsWithChildren<RectProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface CircleProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Circle /> element is used to create a circle.
|
||||||
|
*/
|
||||||
|
export class Circle extends React.Component<
|
||||||
|
React.PropsWithChildren<CircleProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface EllipseProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
rx: string | number;
|
||||||
|
ry: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Ellipse /> element is used to create an ellipse.
|
||||||
|
* An ellipse is closely related to a circle. The difference is that an ellipse has an x and a y radius that differs from each other, while a circle has equal x and y radius.
|
||||||
|
*/
|
||||||
|
export class Ellipse extends React.Component<
|
||||||
|
React.PropsWithChildren<EllipseProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TspanProps extends SVGPresentationAttributes {
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Tspan /> element defines a subtext within a <Text /> element or another <Tspan /> element.
|
||||||
|
* It allows for adjustment of the style and/or position of that subtext as needed.
|
||||||
|
*/
|
||||||
|
export class Tspan extends React.Component<
|
||||||
|
React.PropsWithChildren<TspanProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface GProps extends SVGPresentationAttributes {
|
||||||
|
style?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <G /> SVG element is a container used to group other SVG elements.
|
||||||
|
* Transformations applied to the <G /> element are performed on its child elements, and its attributes are inherited by its children.
|
||||||
|
*/
|
||||||
|
export class G extends React.Component<React.PropsWithChildren<GProps>> {}
|
||||||
|
|
||||||
|
interface StopProps {
|
||||||
|
offset: string | number;
|
||||||
|
stopColor: string;
|
||||||
|
stopOpacity?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SVG <Stop /> element defines a color and its position to use on a gradient. This element is always a child of a <LinearGradient /> or <RadialGradient /> element
|
||||||
|
*/
|
||||||
|
export class Stop extends React.Component<
|
||||||
|
React.PropsWithChildren<StopProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
|
interface DefsProps {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Defs /> element is used to store graphical objects that will be used at a later time. Objects created inside a <Defs /> element are not rendered directly. To display them you have to reference them
|
||||||
|
*/
|
||||||
|
export class Defs extends React.Component<
|
||||||
|
React.PropsWithChildren<DefsProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ClipPathProps {
|
||||||
|
id?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <ClipPath /> SVG element defines a clipping path, to be used by the clipPath property.
|
||||||
|
* A clipping path restricts the region to which paint can be applied. Conceptually, parts of the drawing that lie outside of the region bounded by the clipping path are not drawn.
|
||||||
|
*/
|
||||||
|
export class ClipPath extends React.Component<
|
||||||
|
React.PropsWithChildren<ClipPathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface MarkerProps {
|
||||||
|
id: string;
|
||||||
|
viewBox?: string;
|
||||||
|
refX?: string | number;
|
||||||
|
refY?: string | number;
|
||||||
|
markerWidth?: string | number;
|
||||||
|
markerHeight?: string | number;
|
||||||
|
orient?: 'auto' | 'auto-start-reverse' | number;
|
||||||
|
markerUnits?: 'strokeWidth' | 'userSpaceOnUse';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Marker /> SVG element defines a graphic used for drawing arrows or polymarkers on a given <Path />, <Line />, <Polyline />, or <Polygon /> element.
|
||||||
|
* Markers can be attached to shapes using the markerStart, markerMid, and markerEnd properties.
|
||||||
|
*/
|
||||||
|
export class Marker extends React.Component<
|
||||||
|
React.PropsWithChildren<MarkerProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinearGradientProps {
|
||||||
|
id: string;
|
||||||
|
x1?: string | number;
|
||||||
|
x2?: string | number;
|
||||||
|
y1?: string | number;
|
||||||
|
y2?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <LinearGradient /> element lets authors define linear gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class LinearGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<LinearGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RadialGradientProps {
|
||||||
|
id: string;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r?: string | number;
|
||||||
|
fx?: string | number;
|
||||||
|
fy?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <RadialGradient /> element lets authors define radial gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class RadialGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<RadialGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BlobProviderParams {
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
loading: boolean;
|
||||||
|
error: Error | null;
|
||||||
|
}
|
||||||
|
interface BlobProviderProps {
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children: (params: BlobProviderParams) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Easy and declarative way of getting document's blob data without
|
||||||
|
* showing it on screen.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class BlobProvider extends React.Component<BlobProviderProps> {}
|
||||||
|
|
||||||
|
interface PDFViewerProps {
|
||||||
|
width?: number | string;
|
||||||
|
height?: number | string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
className?: string;
|
||||||
|
children?: React.ReactElement<DocumentProps>;
|
||||||
|
innerRef?: React.Ref<HTMLIFrameElement>;
|
||||||
|
showToolbar?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iframe PDF viewer for client-side generated documents.
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFViewer extends React.Component<PDFViewerProps> {}
|
||||||
|
|
||||||
|
interface PDFDownloadLinkProps
|
||||||
|
extends Omit<
|
||||||
|
React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
||||||
|
'href' | 'children'
|
||||||
|
> {
|
||||||
|
/** PDF filename. Alias for anchor tag `download` attribute. */
|
||||||
|
fileName?: string;
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children?: React.ReactNode | React.FC<BlobProviderParams>;
|
||||||
|
onClick?: React.AnchorHTMLAttributes<HTMLAnchorElement>['onClick'] &
|
||||||
|
((
|
||||||
|
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>,
|
||||||
|
instance: UsePDFInstance,
|
||||||
|
) => void);
|
||||||
|
ref?: React.Ref<HTMLAnchorElement> | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Anchor tag to enable generate and download PDF documents on the fly.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFDownloadLink extends React.Component<PDFDownloadLinkProps> {}
|
||||||
|
|
||||||
|
interface UsePDFInstance {
|
||||||
|
loading: boolean;
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
error: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* React hook for creating and updating a PDF document instance
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export function usePDF(options?: {
|
||||||
|
document?: React.ReactElement<DocumentProps>;
|
||||||
|
}): [
|
||||||
|
UsePDFInstance,
|
||||||
|
(newDocument: React.ReactElement<DocumentProps>) => void,
|
||||||
|
];
|
||||||
|
|
||||||
|
export const Font: FontStore;
|
||||||
|
|
||||||
|
export const StyleSheet: {
|
||||||
|
create: <T extends Styles>(styles: T) => T;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const version: any;
|
||||||
|
|
||||||
|
export const PDFRenderer: any;
|
||||||
|
|
||||||
|
export const pdf: (initialValue?: React.ReactElement<DocumentProps>) => {
|
||||||
|
container: any;
|
||||||
|
isDirty: () => boolean;
|
||||||
|
toString: () => string;
|
||||||
|
toBlob: () => Promise<Blob>;
|
||||||
|
toBuffer: () => Promise<NodeJS.ReadableStream>;
|
||||||
|
on: (event: 'change', callback: () => void) => void;
|
||||||
|
updateContainer: (
|
||||||
|
document: React.ReactElement<any>,
|
||||||
|
callback?: () => void,
|
||||||
|
) => void;
|
||||||
|
removeListener: (event: 'change', callback: () => void) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const renderToStream: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use the `renderToBuffer` method
|
||||||
|
*/
|
||||||
|
export const renderToString: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<string>;
|
||||||
|
|
||||||
|
export const renderToFile: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
filePath: string,
|
||||||
|
callback?: (output: NodeJS.ReadableStream, _filePath: string) => any,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
const render: typeof renderToFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render document into a nodejs buffer
|
||||||
|
* @platform node
|
||||||
|
*/
|
||||||
|
export const renderToBuffer: (
|
||||||
|
document: React.ReactElement<ReactPDF.DocumentProps>,
|
||||||
|
) => Promise<Buffer>;
|
||||||
|
}
|
||||||
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.min.d.ts
generated
vendored
Normal file
793
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.min.d.ts
generated
vendored
Normal file
@@ -0,0 +1,793 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
|
|
||||||
|
import * as React from 'react';
|
||||||
|
import {
|
||||||
|
Style,
|
||||||
|
PageSize,
|
||||||
|
FontStore,
|
||||||
|
PDFVersion,
|
||||||
|
Orientation,
|
||||||
|
SourceObject,
|
||||||
|
SrcSet,
|
||||||
|
Sizes,
|
||||||
|
HyphenationCallback,
|
||||||
|
SVGPresentationAttributes,
|
||||||
|
Bookmark,
|
||||||
|
PageLayout,
|
||||||
|
PageMode,
|
||||||
|
HitSlop,
|
||||||
|
} from '@react-pdf/types';
|
||||||
|
|
||||||
|
declare class ReactPDF {
|
||||||
|
static default: typeof ReactPDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
export = ReactPDF;
|
||||||
|
|
||||||
|
declare namespace ReactPDF {
|
||||||
|
interface Styles {
|
||||||
|
[key: string]: Style;
|
||||||
|
}
|
||||||
|
interface OnRenderProps {
|
||||||
|
blob?: Blob;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Permissions {
|
||||||
|
printing?: 'lowResolution' | 'highResolution';
|
||||||
|
modifying?: boolean;
|
||||||
|
copying?: boolean;
|
||||||
|
annotating?: boolean;
|
||||||
|
fillingForms?: boolean;
|
||||||
|
contentAccessibility?: boolean;
|
||||||
|
documentAssembly?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DocumentProps {
|
||||||
|
style?: Style | Style[];
|
||||||
|
title?: string;
|
||||||
|
author?: string;
|
||||||
|
subject?: string;
|
||||||
|
creator?: string;
|
||||||
|
keywords?: string;
|
||||||
|
producer?: string;
|
||||||
|
language?: string;
|
||||||
|
creationDate?: Date;
|
||||||
|
modificationDate?: Date;
|
||||||
|
pdfVersion?: PDFVersion;
|
||||||
|
pageMode?: PageMode;
|
||||||
|
pageLayout?: PageLayout;
|
||||||
|
ownerPassword?: string;
|
||||||
|
userPassword?: string;
|
||||||
|
permissions?: Permissions;
|
||||||
|
onRender?: (props: OnRenderProps) => any;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This component represent the PDF document itself. It must be the root
|
||||||
|
* of your tree element structure, and under no circumstances should it be
|
||||||
|
* used as children of another react-pdf component. In addition, it should
|
||||||
|
* only have childs of type <Page />.
|
||||||
|
*/
|
||||||
|
export class Document extends React.Component<
|
||||||
|
React.PropsWithChildren<DocumentProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface NodeProps {
|
||||||
|
id?: string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
/**
|
||||||
|
* Render component in all wrapped pages.
|
||||||
|
* @see https://react-pdf.org/advanced#fixed-components
|
||||||
|
*/
|
||||||
|
fixed?: boolean;
|
||||||
|
/**
|
||||||
|
* Force the wrapping algorithm to start a new page when rendering the
|
||||||
|
* element.
|
||||||
|
* @see https://react-pdf.org/advanced#page-breaks
|
||||||
|
*/
|
||||||
|
break?: boolean;
|
||||||
|
/**
|
||||||
|
* Hint that no page wrapping should occur between all sibling elements following the element within n points
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
minPresenceAhead?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable page wrapping for this page.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
size?: PageSize;
|
||||||
|
orientation?: Orientation;
|
||||||
|
dpi?: number;
|
||||||
|
bookmark?: Bookmark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents single page inside the PDF document, or a subset of them if
|
||||||
|
* using the wrapping feature. A <Document /> can contain as many pages as
|
||||||
|
* you want, but ensure not rendering a page inside any component besides
|
||||||
|
* Document.
|
||||||
|
*/
|
||||||
|
export class Page extends React.Component<
|
||||||
|
React.PropsWithChildren<PageProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ViewProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The most fundamental component for building a UI and is designed to be
|
||||||
|
* nested inside other views and can have 0 to many children.
|
||||||
|
*/
|
||||||
|
export class View extends React.Component<
|
||||||
|
React.PropsWithChildren<ViewProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BaseImageProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* Works like the HTML img sizes attribute.
|
||||||
|
* @example 300
|
||||||
|
* @example "300"
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSrcProp extends BaseImageProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageWithSourceProp extends BaseImageProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageProps = ImageWithSrcProp | ImageWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying network or local (Node only) JPG or
|
||||||
|
* PNG images, as well as base64 encoded image strings.
|
||||||
|
*/
|
||||||
|
export class Image extends React.Component<ImageProps> {}
|
||||||
|
|
||||||
|
interface BaseImageBackgroundProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
cache?: boolean;
|
||||||
|
/**
|
||||||
|
* A comma-separated list of image sources with width descriptors.
|
||||||
|
* Works like the HTML img srcSet attribute.
|
||||||
|
* @example "small.jpg 300w, medium.jpg 600w, large.jpg 900w"
|
||||||
|
*/
|
||||||
|
srcSet?: SrcSet;
|
||||||
|
/**
|
||||||
|
* The intended display width of the image, used to select the best source
|
||||||
|
* from srcSet. Accepts a number (in points) or a string.
|
||||||
|
* @example 300
|
||||||
|
*/
|
||||||
|
sizes?: Sizes;
|
||||||
|
/**
|
||||||
|
* Style applied to the background image.
|
||||||
|
*/
|
||||||
|
imageStyle?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSrcProp extends BaseImageBackgroundProps {
|
||||||
|
src: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImageBackgroundWithSourceProp extends BaseImageBackgroundProps {
|
||||||
|
source: SourceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
type ImageBackgroundProps =
|
||||||
|
| ImageBackgroundWithSrcProp
|
||||||
|
| ImageBackgroundWithSourceProp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying an image behind child content.
|
||||||
|
* Compatible with React Native's ImageBackground component.
|
||||||
|
* @see https://reactnative.dev/docs/imagebackground
|
||||||
|
*/
|
||||||
|
export class ImageBackground extends React.Component<
|
||||||
|
React.PropsWithChildren<ImageBackgroundProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TextProps extends NodeProps {
|
||||||
|
id?: string;
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
render?: (props: {
|
||||||
|
pageNumber: number;
|
||||||
|
totalPages: number;
|
||||||
|
subPageNumber: number;
|
||||||
|
subPageTotalPages: number;
|
||||||
|
}) => React.ReactNode;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the bottom of a page or its container.
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
orphans?: number;
|
||||||
|
/**
|
||||||
|
* Specifies the minimum number of lines in a text element that must be shown at the top of a page or its container..
|
||||||
|
* @see https://react-pdf.org/advanced#orphan-&-widow-protection
|
||||||
|
*/
|
||||||
|
widows?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SVGTextProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x: string | number;
|
||||||
|
y: string | number;
|
||||||
|
/**
|
||||||
|
* Override the default hyphenation-callback
|
||||||
|
* @see https://react-pdf.org/fonts#registerhyphenationcallback
|
||||||
|
*/
|
||||||
|
hyphenationCallback?: HyphenationCallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying text. Text supports nesting of other
|
||||||
|
* Text or Link components to create inline styling.
|
||||||
|
*/
|
||||||
|
export class Text extends React.Component<
|
||||||
|
React.PropsWithChildren<TextProps> | SVGTextProps
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinkProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enable/disable page wrapping for element.
|
||||||
|
* @see https://react-pdf.org/components#page-wrapping
|
||||||
|
*/
|
||||||
|
wrap?: boolean;
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
href?: string;
|
||||||
|
src?: string;
|
||||||
|
/**
|
||||||
|
* Extends the clickable area of the link beyond its visible bounds.
|
||||||
|
* Accepts a number (applied to all sides) or an object with top, bottom, left, right.
|
||||||
|
* @see https://reactnative.dev/docs/view#hitslop
|
||||||
|
*/
|
||||||
|
hitSlop?: HitSlop;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A React component for displaying a hyperlink. Link’s can be nested
|
||||||
|
* inside a Text component, or being inside any other valid primitive.
|
||||||
|
*/
|
||||||
|
export class Link extends React.Component<
|
||||||
|
React.PropsWithChildren<LinkProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface FormCommonProps extends NodeProps {
|
||||||
|
name?: string;
|
||||||
|
required?: boolean;
|
||||||
|
noExport?: boolean;
|
||||||
|
readOnly?: boolean;
|
||||||
|
value?: number | string;
|
||||||
|
defaultValue?: number | string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FieldSetProps extends NodeProps {
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class FieldSet extends React.Component<
|
||||||
|
React.PropsWithChildren<FieldSetProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputFormatting {
|
||||||
|
type:
|
||||||
|
| 'date'
|
||||||
|
| 'time'
|
||||||
|
| 'percent'
|
||||||
|
| 'number'
|
||||||
|
| 'zip'
|
||||||
|
| 'zipPlus4'
|
||||||
|
| 'phone'
|
||||||
|
| 'ssn';
|
||||||
|
param?: string;
|
||||||
|
nDec?: number;
|
||||||
|
sepComma?: boolean;
|
||||||
|
negStyle?: 'MinusBlack' | 'Red' | 'ParensBlack' | 'ParensRed';
|
||||||
|
currency?: string;
|
||||||
|
currencyPrepend?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
// see http://pdfkit.org/docs/forms.html#text_field_formatting
|
||||||
|
interface TextInputProps extends FormCommonProps {
|
||||||
|
align?: 'left' | 'center' | 'right';
|
||||||
|
multiline?: boolean;
|
||||||
|
/**
|
||||||
|
* The text will be masked (e.g. with asterisks).
|
||||||
|
*/
|
||||||
|
password?: boolean;
|
||||||
|
/**
|
||||||
|
* If set, text entered in the field is not spell-checked
|
||||||
|
*/
|
||||||
|
noSpell?: boolean;
|
||||||
|
format?: TextInputFormatting;
|
||||||
|
/**
|
||||||
|
* Sets the fontSize (default or 0 means auto sizing)
|
||||||
|
*/
|
||||||
|
fontSize?: number;
|
||||||
|
/**
|
||||||
|
* Sets the maximum length (characters) of the text in the field
|
||||||
|
*/
|
||||||
|
maxLength?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class TextInput extends React.Component<TextInputProps> {}
|
||||||
|
|
||||||
|
interface CheckboxProps extends FormCommonProps {
|
||||||
|
backgroundColor?: string;
|
||||||
|
borderColor?: string;
|
||||||
|
checked?: boolean;
|
||||||
|
onState?: string;
|
||||||
|
offState?: string;
|
||||||
|
xMark?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Checkbox extends React.Component<CheckboxProps> {}
|
||||||
|
|
||||||
|
interface SelectAndListPropsBase extends FormCommonProps {
|
||||||
|
sort?: boolean;
|
||||||
|
edit?: boolean;
|
||||||
|
multiSelect?: boolean;
|
||||||
|
noSpell?: boolean;
|
||||||
|
select?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
type SelectAndListPropsWithEdit = SelectAndListPropsBase & {
|
||||||
|
edit: true | false;
|
||||||
|
noSpell: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListPropsWithNoSpell = SelectAndListPropsBase & {
|
||||||
|
edit: boolean;
|
||||||
|
noSpell: true | false;
|
||||||
|
};
|
||||||
|
|
||||||
|
type SelectAndListProps =
|
||||||
|
| SelectAndListPropsWithEdit
|
||||||
|
| SelectAndListPropsWithNoSpell;
|
||||||
|
|
||||||
|
export class Select extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
export class List extends React.Component<SelectAndListProps> {}
|
||||||
|
|
||||||
|
interface NoteProps extends NodeProps {
|
||||||
|
children: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Note extends React.Component<NoteProps> {}
|
||||||
|
|
||||||
|
interface CanvasProps extends NodeProps {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
paint: (
|
||||||
|
painter: any,
|
||||||
|
availableWidth: number,
|
||||||
|
availableHeight: number,
|
||||||
|
) => null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Canvas extends React.Component<CanvasProps> {}
|
||||||
|
|
||||||
|
interface SVGProps extends NodeProps, SVGPresentationAttributes {
|
||||||
|
/**
|
||||||
|
* Enables debug mode on page bounding box.
|
||||||
|
* @see https://react-pdf.org/advanced#debugging
|
||||||
|
*/
|
||||||
|
debug?: boolean;
|
||||||
|
width?: string | number;
|
||||||
|
height?: string | number;
|
||||||
|
viewBox?: string;
|
||||||
|
preserveAspectRatio?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <SVG /> element is a container that defines a new coordinate system and viewport. It is used as the outermost element of SVG documents.
|
||||||
|
*/
|
||||||
|
export class Svg extends React.Component<React.PropsWithChildren<SVGProps>> {}
|
||||||
|
|
||||||
|
interface LineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x1: string | number;
|
||||||
|
x2: string | number;
|
||||||
|
y1: string | number;
|
||||||
|
y2: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Line /> element is used to create a line.
|
||||||
|
*/
|
||||||
|
export class Line extends React.Component<
|
||||||
|
React.PropsWithChildren<LineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolylineProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polyline /> element is used to create any shape that consists of only straight lines (that is connected at several points).
|
||||||
|
*/
|
||||||
|
export class Polyline extends React.Component<
|
||||||
|
React.PropsWithChildren<PolylineProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PolygonProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
points: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Polygon /> element is used to create a graphic that contains at least three sides.
|
||||||
|
* Polygons are made of straight lines, and the shape is "closed" (all the lines connect up).
|
||||||
|
*/
|
||||||
|
export class Polygon extends React.Component<
|
||||||
|
React.PropsWithChildren<PolygonProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface PathProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
d: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Path /> element is the most powerful element in the SVG library of basic shapes. It can be used to create lines, curves, arcs, and more.
|
||||||
|
*/
|
||||||
|
export class Path extends React.Component<
|
||||||
|
React.PropsWithChildren<PathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RectProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
width: string | number;
|
||||||
|
height: string | number;
|
||||||
|
rx?: string | number;
|
||||||
|
ry?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Rect /> element is used to create a rectangle and variations of a rectangle shape.
|
||||||
|
*/
|
||||||
|
export class Rect extends React.Component<
|
||||||
|
React.PropsWithChildren<RectProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface CircleProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Circle /> element is used to create a circle.
|
||||||
|
*/
|
||||||
|
export class Circle extends React.Component<
|
||||||
|
React.PropsWithChildren<CircleProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface EllipseProps extends SVGPresentationAttributes {
|
||||||
|
style?: SVGPresentationAttributes;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
rx: string | number;
|
||||||
|
ry: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Ellipse /> element is used to create an ellipse.
|
||||||
|
* An ellipse is closely related to a circle. The difference is that an ellipse has an x and a y radius that differs from each other, while a circle has equal x and y radius.
|
||||||
|
*/
|
||||||
|
export class Ellipse extends React.Component<
|
||||||
|
React.PropsWithChildren<EllipseProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface TspanProps extends SVGPresentationAttributes {
|
||||||
|
x?: string | number;
|
||||||
|
y?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Tspan /> element defines a subtext within a <Text /> element or another <Tspan /> element.
|
||||||
|
* It allows for adjustment of the style and/or position of that subtext as needed.
|
||||||
|
*/
|
||||||
|
export class Tspan extends React.Component<
|
||||||
|
React.PropsWithChildren<TspanProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface GProps extends SVGPresentationAttributes {
|
||||||
|
style?: Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <G /> SVG element is a container used to group other SVG elements.
|
||||||
|
* Transformations applied to the <G /> element are performed on its child elements, and its attributes are inherited by its children.
|
||||||
|
*/
|
||||||
|
export class G extends React.Component<React.PropsWithChildren<GProps>> {}
|
||||||
|
|
||||||
|
interface StopProps {
|
||||||
|
offset: string | number;
|
||||||
|
stopColor: string;
|
||||||
|
stopOpacity?: string | number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The SVG <Stop /> element defines a color and its position to use on a gradient. This element is always a child of a <LinearGradient /> or <RadialGradient /> element
|
||||||
|
*/
|
||||||
|
export class Stop extends React.Component<
|
||||||
|
React.PropsWithChildren<StopProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
|
interface DefsProps {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Defs /> element is used to store graphical objects that will be used at a later time. Objects created inside a <Defs /> element are not rendered directly. To display them you have to reference them
|
||||||
|
*/
|
||||||
|
export class Defs extends React.Component<
|
||||||
|
React.PropsWithChildren<DefsProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface ClipPathProps {
|
||||||
|
id?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <ClipPath /> SVG element defines a clipping path, to be used by the clipPath property.
|
||||||
|
* A clipping path restricts the region to which paint can be applied. Conceptually, parts of the drawing that lie outside of the region bounded by the clipping path are not drawn.
|
||||||
|
*/
|
||||||
|
export class ClipPath extends React.Component<
|
||||||
|
React.PropsWithChildren<ClipPathProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface MarkerProps {
|
||||||
|
id: string;
|
||||||
|
viewBox?: string;
|
||||||
|
refX?: string | number;
|
||||||
|
refY?: string | number;
|
||||||
|
markerWidth?: string | number;
|
||||||
|
markerHeight?: string | number;
|
||||||
|
orient?: 'auto' | 'auto-start-reverse' | number;
|
||||||
|
markerUnits?: 'strokeWidth' | 'userSpaceOnUse';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <Marker /> SVG element defines a graphic used for drawing arrows or polymarkers on a given <Path />, <Line />, <Polyline />, or <Polygon /> element.
|
||||||
|
* Markers can be attached to shapes using the markerStart, markerMid, and markerEnd properties.
|
||||||
|
*/
|
||||||
|
export class Marker extends React.Component<
|
||||||
|
React.PropsWithChildren<MarkerProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface LinearGradientProps {
|
||||||
|
id: string;
|
||||||
|
x1?: string | number;
|
||||||
|
x2?: string | number;
|
||||||
|
y1?: string | number;
|
||||||
|
y2?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <LinearGradient /> element lets authors define linear gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class LinearGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<LinearGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface RadialGradientProps {
|
||||||
|
id: string;
|
||||||
|
cx?: string | number;
|
||||||
|
cy?: string | number;
|
||||||
|
r?: string | number;
|
||||||
|
fx?: string | number;
|
||||||
|
fy?: string | number;
|
||||||
|
xlinkHref?: string;
|
||||||
|
gradientTransform?: string;
|
||||||
|
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The <RadialGradient /> element lets authors define radial gradients that can be applied to fill or stroke of graphical elements.
|
||||||
|
*/
|
||||||
|
export class RadialGradient extends React.Component<
|
||||||
|
React.PropsWithChildren<RadialGradientProps>
|
||||||
|
> {}
|
||||||
|
|
||||||
|
interface BlobProviderParams {
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
loading: boolean;
|
||||||
|
error: Error | null;
|
||||||
|
}
|
||||||
|
interface BlobProviderProps {
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children: (params: BlobProviderParams) => React.ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Easy and declarative way of getting document's blob data without
|
||||||
|
* showing it on screen.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class BlobProvider extends React.Component<BlobProviderProps> {}
|
||||||
|
|
||||||
|
interface PDFViewerProps {
|
||||||
|
width?: number | string;
|
||||||
|
height?: number | string;
|
||||||
|
style?: Style | Style[];
|
||||||
|
className?: string;
|
||||||
|
children?: React.ReactElement<DocumentProps>;
|
||||||
|
innerRef?: React.Ref<HTMLIFrameElement>;
|
||||||
|
showToolbar?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iframe PDF viewer for client-side generated documents.
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFViewer extends React.Component<PDFViewerProps> {}
|
||||||
|
|
||||||
|
interface PDFDownloadLinkProps
|
||||||
|
extends Omit<
|
||||||
|
React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
||||||
|
'href' | 'children'
|
||||||
|
> {
|
||||||
|
/** PDF filename. Alias for anchor tag `download` attribute. */
|
||||||
|
fileName?: string;
|
||||||
|
document: React.ReactElement<DocumentProps>;
|
||||||
|
children?: React.ReactNode | React.FC<BlobProviderParams>;
|
||||||
|
onClick?: React.AnchorHTMLAttributes<HTMLAnchorElement>['onClick'] &
|
||||||
|
((
|
||||||
|
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>,
|
||||||
|
instance: UsePDFInstance,
|
||||||
|
) => void);
|
||||||
|
ref?: React.Ref<HTMLAnchorElement> | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Anchor tag to enable generate and download PDF documents on the fly.
|
||||||
|
* @see https://react-pdf.org/advanced#on-the-fly-rendering
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export class PDFDownloadLink extends React.Component<PDFDownloadLinkProps> {}
|
||||||
|
|
||||||
|
interface UsePDFInstance {
|
||||||
|
loading: boolean;
|
||||||
|
blob: Blob | null;
|
||||||
|
url: string | null;
|
||||||
|
error: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* React hook for creating and updating a PDF document instance
|
||||||
|
* @platform web
|
||||||
|
*/
|
||||||
|
export function usePDF(options?: {
|
||||||
|
document?: React.ReactElement<DocumentProps>;
|
||||||
|
}): [
|
||||||
|
UsePDFInstance,
|
||||||
|
(newDocument: React.ReactElement<DocumentProps>) => void,
|
||||||
|
];
|
||||||
|
|
||||||
|
export const Font: FontStore;
|
||||||
|
|
||||||
|
export const StyleSheet: {
|
||||||
|
create: <T extends Styles>(styles: T) => T;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const version: any;
|
||||||
|
|
||||||
|
export const PDFRenderer: any;
|
||||||
|
|
||||||
|
export const pdf: (initialValue?: React.ReactElement<DocumentProps>) => {
|
||||||
|
container: any;
|
||||||
|
isDirty: () => boolean;
|
||||||
|
toString: () => string;
|
||||||
|
toBlob: () => Promise<Blob>;
|
||||||
|
toBuffer: () => Promise<NodeJS.ReadableStream>;
|
||||||
|
on: (event: 'change', callback: () => void) => void;
|
||||||
|
updateContainer: (
|
||||||
|
document: React.ReactElement<any>,
|
||||||
|
callback?: () => void,
|
||||||
|
) => void;
|
||||||
|
removeListener: (event: 'change', callback: () => void) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const renderToStream: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use the `renderToBuffer` method
|
||||||
|
*/
|
||||||
|
export const renderToString: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
) => Promise<string>;
|
||||||
|
|
||||||
|
export const renderToFile: (
|
||||||
|
document: React.ReactElement<DocumentProps>,
|
||||||
|
filePath: string,
|
||||||
|
callback?: (output: NodeJS.ReadableStream, _filePath: string) => any,
|
||||||
|
) => Promise<NodeJS.ReadableStream>;
|
||||||
|
|
||||||
|
const render: typeof renderToFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render document into a nodejs buffer
|
||||||
|
* @platform node
|
||||||
|
*/
|
||||||
|
export const renderToBuffer: (
|
||||||
|
document: React.ReactElement<ReactPDF.DocumentProps>,
|
||||||
|
) => Promise<Buffer>;
|
||||||
|
}
|
||||||
1
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.min.js
generated
vendored
Normal file
1
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/lib/react-pdf.min.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import*as e from"@react-pdf/primitives";export*from"@react-pdf/primitives";import r from"fs";import{Buffer as t}from"buffer";import o from"@react-pdf/font";import n from"@react-pdf/render";import i from"@react-pdf/pdfkit";import a from"@react-pdf/layout";import{upperFirst as s}from"@react-pdf/fns";import d from"@react-pdf/reconciler";const c=(e,r)=>{let{style:t,children:o,...n}=r;return{type:e,box:{},style:t||{},props:n||{},children:[]}},p=e=>({type:"TEXT_INSTANCE",value:e}),l=(e,r)=>{const t="TEXT"===e.type||"LINK"===e.type||"TSPAN"===e.type||"NOTE"===e.type;"TEXT_INSTANCE"!==r.type||t?e.children.push(r):console.warn(`Invalid '${r.value}' string child outside <Text> component`)},u=(e,r)=>{"ROOT"===e.type?e.document=r:l(e,r)},f=(e,r,t)=>{var o;const n=null===(o=e.children)||void 0===o?void 0:o.indexOf(t);void 0!==n&&-1!==n&&r&&e.children.splice(n,0,r)},m=(e,r)=>{var t;const o=null===(t=e.children)||void 0===t?void 0:t.indexOf(r);void 0!==o&&-1!==o&&e.children.splice(o,1)},v=(e,r)=>{var t;const o=null===(t=e.children)||void 0===t?void 0:t.indexOf(r);void 0!==o&&-1!==o&&e.children.splice(o,1)},w=(e,r,t)=>{e.value=t},y=(e,r,t,o,n)=>{const{style:i,...a}=n;e.props=a,e.style=i},h=e=>{let{onChange:r=(()=>{})}=e;return d({appendChild:l,appendChildToContainer:u,commitTextUpdate:w,commitUpdate:y,createInstance:c,createTextInstance:p,insertBefore:f,removeChild:m,removeChildFromContainer:v,resetAfterCommit:r})};var T={version:"4.5.1"};const{version:P}=T,g=new o;let b;const D={},S=e=>{const r={type:"ROOT",document:null};b=b||h({onChange:()=>{var e;const r=(null===(e=D.change)||void 0===e?void 0:e.slice())||[];for(let e=0;e<r.length;e+=1)r[e]()}});const t=b.createContainer(r),o=(e,r)=>{b.updateContainer(e,t,null,r)};e&&o(e);const d=async function(e){void 0===e&&(e=!0);const t=r.document.props||{},{pdfVersion:o,language:d,pageLayout:c,pageMode:p,title:l,author:u,subject:f,keywords:m,creator:v="react-pdf",producer:w="react-pdf",creationDate:y=new Date,modificationDate:h,ownerPassword:T,userPassword:P,permissions:b}=t,D=new i({compress:e,pdfVersion:o,lang:d,displayTitle:!0,autoFirstPage:!1,ownerPassword:T,userPassword:P,permissions:b,pageLayout:c,info:(S={Title:l,Author:u,Subject:f,Keywords:m,Creator:v,Producer:w,CreationDate:y,ModificationDate:h},Object.fromEntries(Object.entries(S).filter((e=>{let[,r]=e;return void 0!==r}))))});var S;p&&(D._root.data.PageMode=s(p));const _=await a(r.document,g);return{layout:_,fileStream:n(D,_)}},c=function(e){void 0===e&&(e={}),r.document.props.onRender&&r.document.props.onRender(e)};return{on:(e,r)=>{D[e]||(D[e]=[]),D[e].push(r)},container:r,toBlob:async()=>{const e=[],{layout:r,fileStream:t}=await d();return new Promise(((o,n)=>{t.on("data",(r=>{e.push(r instanceof Uint8Array?r:new Uint8Array(r))})),t.on("end",(()=>{try{const t=new Blob(e,{type:"application/pdf"});c({blob:t,_INTERNAL__LAYOUT__DATA_:r}),o(t)}catch(e){n(e)}}))}))},toBuffer:async()=>{const{layout:e,fileStream:r}=await d();return c({_INTERNAL__LAYOUT__DATA_:e}),r},toString:async()=>{"development"===process.env.NODE_ENV&&console.warn("`toString` is deprecated and will be removed in next major release");let e="";const{fileStream:r}=await d(!1);return new Promise(((t,o)=>{try{r.on("data",(r=>{e+=r})),r.on("end",(()=>{c(),t(e)}))}catch(e){o(e)}}))},removeListener:(e,r)=>{if(!D[e])return;const t=D[e].indexOf(r);t>-1&&D[e].splice(t,1)},updateContainer:o}},_=g,A={create:e=>e},C=async e=>{const r=S(e);return await r.toBuffer()},N=async(e,t,o)=>{const n=await C(e),i=r.createWriteStream(t);return n.pipe(i),new Promise(((e,r)=>{i.on("finish",(()=>{o&&o(n,t),e(n)})),i.on("error",r)}))},O=e=>C(e).then((e=>new Promise(((r,o)=>{const n=[];e.on("data",(e=>n.push(e))),e.on("end",(()=>r(t.concat(n)))),e.on("error",(e=>o(e)))})))),E=e=>("development"===process.env.NODE_ENV&&console.warn("`renderToString` is deprecated and will be removed in next major release, use `renderToBuffer` instead"),O(e).then((e=>e.toString()))),x=e=>{throw new Error(`${e} is a web specific API. You're either using this component on Node, or your bundler is not loading react-pdf from the appropriate web build.`)},F=()=>{x("usePDF")},L=()=>{x("PDFViewer")},I=()=>{x("PDFDownloadLink")},B=()=>{x("BlobProvider")},j=N;var R={pdf:S,Font:_,version:P,StyleSheet:A,usePDF:F,PDFViewer:L,BlobProvider:B,PDFDownloadLink:I,renderToStream:C,renderToString:E,renderToFile:N,render:j,...e};export{B as BlobProvider,_ as Font,I as PDFDownloadLink,L as PDFViewer,A as StyleSheet,h as createRenderer,R as default,S as pdf,j as render,O as renderToBuffer,N as renderToFile,C as renderToStream,E as renderToString,F as usePDF,P as version};
|
||||||
67
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/package.json
generated
vendored
Normal file
67
build_temp/.next/node_modules/@react-pdf/renderer-5f716e9bc7d68b8a/package.json
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
{
|
||||||
|
"name": "@react-pdf/renderer",
|
||||||
|
"version": "4.5.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"description": "Create PDF files on the browser and server",
|
||||||
|
"author": "Diego Muracciole <diegomuracciole@gmail.com>",
|
||||||
|
"homepage": "https://github.com/diegomura/react-pdf#readme",
|
||||||
|
"type": "module",
|
||||||
|
"main": "./lib/react-pdf.js",
|
||||||
|
"browser": {
|
||||||
|
"./lib/react-pdf.js": "./lib/react-pdf.browser.js"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/diegomura/react-pdf.git",
|
||||||
|
"directory": "packages/renderer"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "rimraf ./lib && rollup -c",
|
||||||
|
"watch": "rimraf ./lib && rollup -c -w",
|
||||||
|
"size": "size-limit",
|
||||||
|
"lint": "eslint src",
|
||||||
|
"test": "vitest && vitest --config vitest.browser.config.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/runtime": "^7.20.13",
|
||||||
|
"@react-pdf/fns": "3.1.3",
|
||||||
|
"@react-pdf/font": "^4.0.8",
|
||||||
|
"@react-pdf/layout": "^4.6.1",
|
||||||
|
"@react-pdf/pdfkit": "^5.1.1",
|
||||||
|
"@react-pdf/primitives": "^4.3.0",
|
||||||
|
"@react-pdf/reconciler": "^2.0.0",
|
||||||
|
"@react-pdf/render": "^4.5.1",
|
||||||
|
"@react-pdf/types": "^2.11.1",
|
||||||
|
"events": "^3.3.0",
|
||||||
|
"object-assign": "^4.1.1",
|
||||||
|
"prop-types": "^15.6.2",
|
||||||
|
"queue": "^6.0.1"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.js": [
|
||||||
|
"yarn lint",
|
||||||
|
"prettier --write"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"lib",
|
||||||
|
"index.d.ts"
|
||||||
|
],
|
||||||
|
"collective": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/react-pdf",
|
||||||
|
"logo": "https://opencollective.com/opencollective/logo.txt"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@size-limit/preset-big-lib": "^11.0.1",
|
||||||
|
"assert": "^2.0.0",
|
||||||
|
"browserify-zlib": "^0.2.0",
|
||||||
|
"buffer": "^6.0.3",
|
||||||
|
"process": "^0.11.10",
|
||||||
|
"size-limit": "^11.0.1",
|
||||||
|
"util": "^0.12.4"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
build_temp/.next/package.json
Normal file
1
build_temp/.next/package.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"type": "commonjs"}
|
||||||
340
build_temp/.next/prerender-manifest.json
Normal file
340
build_temp/.next/prerender-manifest.json
Normal file
@@ -0,0 +1,340 @@
|
|||||||
|
{
|
||||||
|
"version": 4,
|
||||||
|
"routes": {
|
||||||
|
"/": {
|
||||||
|
"experimentalBypassFor": [
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "next-action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "content-type",
|
||||||
|
"value": "multipart/form-data;.*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialRevalidateSeconds": false,
|
||||||
|
"srcRoute": "/",
|
||||||
|
"dataRoute": "/index.rsc",
|
||||||
|
"allowHeader": [
|
||||||
|
"host",
|
||||||
|
"x-matched-path",
|
||||||
|
"x-prerender-revalidate",
|
||||||
|
"x-prerender-revalidate-if-generated",
|
||||||
|
"x-next-revalidated-tags",
|
||||||
|
"x-next-revalidate-tag-token"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/_global-error": {
|
||||||
|
"experimentalBypassFor": [
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "next-action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "content-type",
|
||||||
|
"value": "multipart/form-data;.*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialRevalidateSeconds": false,
|
||||||
|
"srcRoute": "/_global-error",
|
||||||
|
"dataRoute": "/_global-error.rsc",
|
||||||
|
"allowHeader": [
|
||||||
|
"host",
|
||||||
|
"x-matched-path",
|
||||||
|
"x-prerender-revalidate",
|
||||||
|
"x-prerender-revalidate-if-generated",
|
||||||
|
"x-next-revalidated-tags",
|
||||||
|
"x-next-revalidate-tag-token"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/_not-found": {
|
||||||
|
"initialStatus": 404,
|
||||||
|
"experimentalBypassFor": [
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "next-action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "content-type",
|
||||||
|
"value": "multipart/form-data;.*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialRevalidateSeconds": false,
|
||||||
|
"srcRoute": "/_not-found",
|
||||||
|
"dataRoute": "/_not-found.rsc",
|
||||||
|
"allowHeader": [
|
||||||
|
"host",
|
||||||
|
"x-matched-path",
|
||||||
|
"x-prerender-revalidate",
|
||||||
|
"x-prerender-revalidate-if-generated",
|
||||||
|
"x-next-revalidated-tags",
|
||||||
|
"x-next-revalidate-tag-token"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/admin/users": {
|
||||||
|
"experimentalBypassFor": [
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "next-action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "content-type",
|
||||||
|
"value": "multipart/form-data;.*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialRevalidateSeconds": false,
|
||||||
|
"srcRoute": "/admin/users",
|
||||||
|
"dataRoute": "/admin/users.rsc",
|
||||||
|
"allowHeader": [
|
||||||
|
"host",
|
||||||
|
"x-matched-path",
|
||||||
|
"x-prerender-revalidate",
|
||||||
|
"x-prerender-revalidate-if-generated",
|
||||||
|
"x-next-revalidated-tags",
|
||||||
|
"x-next-revalidate-tag-token"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/auth/forgot-password": {
|
||||||
|
"experimentalBypassFor": [
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "next-action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "content-type",
|
||||||
|
"value": "multipart/form-data;.*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialRevalidateSeconds": false,
|
||||||
|
"srcRoute": "/auth/forgot-password",
|
||||||
|
"dataRoute": "/auth/forgot-password.rsc",
|
||||||
|
"allowHeader": [
|
||||||
|
"host",
|
||||||
|
"x-matched-path",
|
||||||
|
"x-prerender-revalidate",
|
||||||
|
"x-prerender-revalidate-if-generated",
|
||||||
|
"x-next-revalidated-tags",
|
||||||
|
"x-next-revalidate-tag-token"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/auth/login": {
|
||||||
|
"experimentalBypassFor": [
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "next-action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "content-type",
|
||||||
|
"value": "multipart/form-data;.*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialRevalidateSeconds": false,
|
||||||
|
"srcRoute": "/auth/login",
|
||||||
|
"dataRoute": "/auth/login.rsc",
|
||||||
|
"allowHeader": [
|
||||||
|
"host",
|
||||||
|
"x-matched-path",
|
||||||
|
"x-prerender-revalidate",
|
||||||
|
"x-prerender-revalidate-if-generated",
|
||||||
|
"x-next-revalidated-tags",
|
||||||
|
"x-next-revalidate-tag-token"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/auth/sign-up": {
|
||||||
|
"experimentalBypassFor": [
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "next-action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "content-type",
|
||||||
|
"value": "multipart/form-data;.*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialRevalidateSeconds": false,
|
||||||
|
"srcRoute": "/auth/sign-up",
|
||||||
|
"dataRoute": "/auth/sign-up.rsc",
|
||||||
|
"allowHeader": [
|
||||||
|
"host",
|
||||||
|
"x-matched-path",
|
||||||
|
"x-prerender-revalidate",
|
||||||
|
"x-prerender-revalidate-if-generated",
|
||||||
|
"x-next-revalidated-tags",
|
||||||
|
"x-next-revalidate-tag-token"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/auth/sign-up-success": {
|
||||||
|
"experimentalBypassFor": [
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "next-action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "content-type",
|
||||||
|
"value": "multipart/form-data;.*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialRevalidateSeconds": false,
|
||||||
|
"srcRoute": "/auth/sign-up-success",
|
||||||
|
"dataRoute": "/auth/sign-up-success.rsc",
|
||||||
|
"allowHeader": [
|
||||||
|
"host",
|
||||||
|
"x-matched-path",
|
||||||
|
"x-prerender-revalidate",
|
||||||
|
"x-prerender-revalidate-if-generated",
|
||||||
|
"x-next-revalidated-tags",
|
||||||
|
"x-next-revalidate-tag-token"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/auth/update-password": {
|
||||||
|
"experimentalBypassFor": [
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "next-action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "content-type",
|
||||||
|
"value": "multipart/form-data;.*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialRevalidateSeconds": false,
|
||||||
|
"srcRoute": "/auth/update-password",
|
||||||
|
"dataRoute": "/auth/update-password.rsc",
|
||||||
|
"allowHeader": [
|
||||||
|
"host",
|
||||||
|
"x-matched-path",
|
||||||
|
"x-prerender-revalidate",
|
||||||
|
"x-prerender-revalidate-if-generated",
|
||||||
|
"x-next-revalidated-tags",
|
||||||
|
"x-next-revalidate-tag-token"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/favicon.ico": {
|
||||||
|
"initialHeaders": {
|
||||||
|
"cache-control": "public, max-age=0, must-revalidate",
|
||||||
|
"content-type": "image/x-icon",
|
||||||
|
"x-next-cache-tags": "_N_T_/layout,_N_T_/favicon.ico/layout,_N_T_/favicon.ico/route,_N_T_/favicon.ico"
|
||||||
|
},
|
||||||
|
"experimentalBypassFor": [
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "next-action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "content-type",
|
||||||
|
"value": "multipart/form-data;.*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialRevalidateSeconds": false,
|
||||||
|
"srcRoute": "/favicon.ico",
|
||||||
|
"dataRoute": null,
|
||||||
|
"allowHeader": [
|
||||||
|
"host",
|
||||||
|
"x-matched-path",
|
||||||
|
"x-prerender-revalidate",
|
||||||
|
"x-prerender-revalidate-if-generated",
|
||||||
|
"x-next-revalidated-tags",
|
||||||
|
"x-next-revalidate-tag-token"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/my-customers/new": {
|
||||||
|
"experimentalBypassFor": [
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "next-action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "content-type",
|
||||||
|
"value": "multipart/form-data;.*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialRevalidateSeconds": false,
|
||||||
|
"srcRoute": "/my-customers/new",
|
||||||
|
"dataRoute": "/my-customers/new.rsc",
|
||||||
|
"allowHeader": [
|
||||||
|
"host",
|
||||||
|
"x-matched-path",
|
||||||
|
"x-prerender-revalidate",
|
||||||
|
"x-prerender-revalidate-if-generated",
|
||||||
|
"x-next-revalidated-tags",
|
||||||
|
"x-next-revalidate-tag-token"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/opengraph-image.png": {
|
||||||
|
"initialHeaders": {
|
||||||
|
"cache-control": "public, max-age=0, must-revalidate",
|
||||||
|
"content-type": "image/png",
|
||||||
|
"x-next-cache-tags": "_N_T_/layout,_N_T_/opengraph-image.png/layout,_N_T_/opengraph-image.png/route,_N_T_/opengraph-image.png"
|
||||||
|
},
|
||||||
|
"experimentalBypassFor": [
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "next-action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "content-type",
|
||||||
|
"value": "multipart/form-data;.*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialRevalidateSeconds": false,
|
||||||
|
"srcRoute": "/opengraph-image.png",
|
||||||
|
"dataRoute": null,
|
||||||
|
"allowHeader": [
|
||||||
|
"host",
|
||||||
|
"x-matched-path",
|
||||||
|
"x-prerender-revalidate",
|
||||||
|
"x-prerender-revalidate-if-generated",
|
||||||
|
"x-next-revalidated-tags",
|
||||||
|
"x-next-revalidate-tag-token"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"/twitter-image.png": {
|
||||||
|
"initialHeaders": {
|
||||||
|
"cache-control": "public, max-age=0, must-revalidate",
|
||||||
|
"content-type": "image/png",
|
||||||
|
"x-next-cache-tags": "_N_T_/layout,_N_T_/twitter-image.png/layout,_N_T_/twitter-image.png/route,_N_T_/twitter-image.png"
|
||||||
|
},
|
||||||
|
"experimentalBypassFor": [
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "next-action"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "header",
|
||||||
|
"key": "content-type",
|
||||||
|
"value": "multipart/form-data;.*"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"initialRevalidateSeconds": false,
|
||||||
|
"srcRoute": "/twitter-image.png",
|
||||||
|
"dataRoute": null,
|
||||||
|
"allowHeader": [
|
||||||
|
"host",
|
||||||
|
"x-matched-path",
|
||||||
|
"x-prerender-revalidate",
|
||||||
|
"x-prerender-revalidate-if-generated",
|
||||||
|
"x-next-revalidated-tags",
|
||||||
|
"x-next-revalidate-tag-token"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dynamicRoutes": {},
|
||||||
|
"notFoundRoutes": [],
|
||||||
|
"preview": {
|
||||||
|
"previewModeId": "448d32298db3b0c38793886a3692c8c2",
|
||||||
|
"previewModeSigningKey": "c5cb172f94d84767588967a86044c9ee49921a9b2179519d52aa8aceecb0cd6f",
|
||||||
|
"previewModeEncryptionKey": "8a7d538464b6beea4e3323e6d9d86f4b70ecb99e19daffca604a9088baa07476"
|
||||||
|
}
|
||||||
|
}
|
||||||
332
build_temp/.next/required-server-files.js
Normal file
332
build_temp/.next/required-server-files.js
Normal file
@@ -0,0 +1,332 @@
|
|||||||
|
self.__SERVER_FILES_MANIFEST={
|
||||||
|
"version": 1,
|
||||||
|
"config": {
|
||||||
|
"env": {},
|
||||||
|
"webpack": null,
|
||||||
|
"typescript": {
|
||||||
|
"ignoreBuildErrors": false
|
||||||
|
},
|
||||||
|
"typedRoutes": false,
|
||||||
|
"distDir": ".next",
|
||||||
|
"cleanDistDir": true,
|
||||||
|
"assetPrefix": "",
|
||||||
|
"cacheMaxMemorySize": 52428800,
|
||||||
|
"configOrigin": "next.config.ts",
|
||||||
|
"useFileSystemPublicRoutes": true,
|
||||||
|
"generateEtags": true,
|
||||||
|
"pageExtensions": [
|
||||||
|
"tsx",
|
||||||
|
"ts",
|
||||||
|
"jsx",
|
||||||
|
"js"
|
||||||
|
],
|
||||||
|
"poweredByHeader": true,
|
||||||
|
"compress": true,
|
||||||
|
"images": {
|
||||||
|
"deviceSizes": [
|
||||||
|
640,
|
||||||
|
750,
|
||||||
|
828,
|
||||||
|
1080,
|
||||||
|
1200,
|
||||||
|
1920,
|
||||||
|
2048,
|
||||||
|
3840
|
||||||
|
],
|
||||||
|
"imageSizes": [
|
||||||
|
32,
|
||||||
|
48,
|
||||||
|
64,
|
||||||
|
96,
|
||||||
|
128,
|
||||||
|
256,
|
||||||
|
384
|
||||||
|
],
|
||||||
|
"path": "/_next/image",
|
||||||
|
"loader": "default",
|
||||||
|
"loaderFile": "",
|
||||||
|
"domains": [],
|
||||||
|
"disableStaticImages": false,
|
||||||
|
"minimumCacheTTL": 14400,
|
||||||
|
"formats": [
|
||||||
|
"image/webp"
|
||||||
|
],
|
||||||
|
"maximumRedirects": 3,
|
||||||
|
"maximumResponseBody": 50000000,
|
||||||
|
"dangerouslyAllowLocalIP": false,
|
||||||
|
"dangerouslyAllowSVG": false,
|
||||||
|
"contentSecurityPolicy": "script-src 'none'; frame-src 'none'; sandbox;",
|
||||||
|
"contentDispositionType": "attachment",
|
||||||
|
"localPatterns": [
|
||||||
|
{
|
||||||
|
"pathname": "**",
|
||||||
|
"search": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"remotePatterns": [],
|
||||||
|
"qualities": [
|
||||||
|
75
|
||||||
|
],
|
||||||
|
"unoptimized": false,
|
||||||
|
"customCacheHandler": false
|
||||||
|
},
|
||||||
|
"devIndicators": {
|
||||||
|
"position": "bottom-left"
|
||||||
|
},
|
||||||
|
"onDemandEntries": {
|
||||||
|
"maxInactiveAge": 60000,
|
||||||
|
"pagesBufferLength": 5
|
||||||
|
},
|
||||||
|
"basePath": "",
|
||||||
|
"sassOptions": {},
|
||||||
|
"trailingSlash": false,
|
||||||
|
"i18n": null,
|
||||||
|
"productionBrowserSourceMaps": false,
|
||||||
|
"excludeDefaultMomentLocales": true,
|
||||||
|
"reactProductionProfiling": false,
|
||||||
|
"reactStrictMode": null,
|
||||||
|
"reactMaxHeadersLength": 6000,
|
||||||
|
"httpAgentOptions": {
|
||||||
|
"keepAlive": true
|
||||||
|
},
|
||||||
|
"logging": {
|
||||||
|
"serverFunctions": true,
|
||||||
|
"browserToTerminal": "warn"
|
||||||
|
},
|
||||||
|
"compiler": {},
|
||||||
|
"expireTime": 31536000,
|
||||||
|
"staticPageGenerationTimeout": 60,
|
||||||
|
"modularizeImports": {
|
||||||
|
"@mui/icons-material": {
|
||||||
|
"transform": "@mui/icons-material/{{member}}"
|
||||||
|
},
|
||||||
|
"lodash": {
|
||||||
|
"transform": "lodash/{{member}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputFileTracingRoot": "C:\\source\\webshop\\shop",
|
||||||
|
"cacheComponents": false,
|
||||||
|
"cacheLife": {
|
||||||
|
"default": {
|
||||||
|
"stale": 300,
|
||||||
|
"revalidate": 900,
|
||||||
|
"expire": 4294967294
|
||||||
|
},
|
||||||
|
"seconds": {
|
||||||
|
"stale": 30,
|
||||||
|
"revalidate": 1,
|
||||||
|
"expire": 60
|
||||||
|
},
|
||||||
|
"minutes": {
|
||||||
|
"stale": 300,
|
||||||
|
"revalidate": 60,
|
||||||
|
"expire": 3600
|
||||||
|
},
|
||||||
|
"hours": {
|
||||||
|
"stale": 300,
|
||||||
|
"revalidate": 3600,
|
||||||
|
"expire": 86400
|
||||||
|
},
|
||||||
|
"days": {
|
||||||
|
"stale": 300,
|
||||||
|
"revalidate": 86400,
|
||||||
|
"expire": 604800
|
||||||
|
},
|
||||||
|
"weeks": {
|
||||||
|
"stale": 300,
|
||||||
|
"revalidate": 604800,
|
||||||
|
"expire": 2592000
|
||||||
|
},
|
||||||
|
"max": {
|
||||||
|
"stale": 300,
|
||||||
|
"revalidate": 2592000,
|
||||||
|
"expire": 31536000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cacheHandlers": {},
|
||||||
|
"experimental": {
|
||||||
|
"appNewScrollHandler": false,
|
||||||
|
"useSkewCookie": false,
|
||||||
|
"cssChunking": true,
|
||||||
|
"multiZoneDraftMode": false,
|
||||||
|
"appNavFailHandling": false,
|
||||||
|
"prerenderEarlyExit": true,
|
||||||
|
"serverMinification": true,
|
||||||
|
"linkNoTouchStart": false,
|
||||||
|
"caseSensitiveRoutes": false,
|
||||||
|
"cachedNavigations": false,
|
||||||
|
"partialFallbacks": false,
|
||||||
|
"dynamicOnHover": false,
|
||||||
|
"varyParams": false,
|
||||||
|
"prefetchInlining": false,
|
||||||
|
"preloadEntriesOnStart": true,
|
||||||
|
"clientRouterFilter": true,
|
||||||
|
"clientRouterFilterRedirects": false,
|
||||||
|
"fetchCacheKeyPrefix": "",
|
||||||
|
"proxyPrefetch": "flexible",
|
||||||
|
"optimisticClientCache": true,
|
||||||
|
"manualClientBasePath": false,
|
||||||
|
"cpus": 15,
|
||||||
|
"memoryBasedWorkersCount": false,
|
||||||
|
"imgOptConcurrency": null,
|
||||||
|
"imgOptTimeoutInSeconds": 7,
|
||||||
|
"imgOptMaxInputPixels": 268402689,
|
||||||
|
"imgOptSequentialRead": null,
|
||||||
|
"imgOptSkipMetadata": null,
|
||||||
|
"isrFlushToDisk": true,
|
||||||
|
"workerThreads": false,
|
||||||
|
"optimizeCss": false,
|
||||||
|
"nextScriptWorkers": false,
|
||||||
|
"scrollRestoration": false,
|
||||||
|
"externalDir": false,
|
||||||
|
"disableOptimizedLoading": false,
|
||||||
|
"gzipSize": true,
|
||||||
|
"craCompat": false,
|
||||||
|
"esmExternals": true,
|
||||||
|
"fullySpecified": false,
|
||||||
|
"swcTraceProfiling": false,
|
||||||
|
"forceSwcTransforms": false,
|
||||||
|
"largePageDataBytes": 128000,
|
||||||
|
"typedEnv": false,
|
||||||
|
"parallelServerCompiles": false,
|
||||||
|
"parallelServerBuildTraces": false,
|
||||||
|
"ppr": false,
|
||||||
|
"authInterrupts": false,
|
||||||
|
"webpackMemoryOptimizations": false,
|
||||||
|
"optimizeServerReact": true,
|
||||||
|
"strictRouteTypes": false,
|
||||||
|
"viewTransition": false,
|
||||||
|
"removeUncaughtErrorAndRejectionListeners": false,
|
||||||
|
"validateRSCRequestHeaders": false,
|
||||||
|
"staleTimes": {
|
||||||
|
"dynamic": 0,
|
||||||
|
"static": 300
|
||||||
|
},
|
||||||
|
"reactDebugChannel": true,
|
||||||
|
"serverComponentsHmrCache": true,
|
||||||
|
"staticGenerationMaxConcurrency": 8,
|
||||||
|
"staticGenerationMinPagesPerWorker": 25,
|
||||||
|
"transitionIndicator": false,
|
||||||
|
"gestureTransition": false,
|
||||||
|
"inlineCss": false,
|
||||||
|
"useCache": false,
|
||||||
|
"globalNotFound": false,
|
||||||
|
"browserDebugInfoInTerminal": "warn",
|
||||||
|
"lockDistDir": true,
|
||||||
|
"proxyClientMaxBodySize": 10485760,
|
||||||
|
"hideLogsAfterAbort": false,
|
||||||
|
"mcpServer": true,
|
||||||
|
"turbopackFileSystemCacheForDev": true,
|
||||||
|
"turbopackFileSystemCacheForBuild": false,
|
||||||
|
"turbopackInferModuleSideEffects": true,
|
||||||
|
"turbopackPluginRuntimeStrategy": "childProcesses",
|
||||||
|
"optimizePackageImports": [
|
||||||
|
"lucide-react",
|
||||||
|
"date-fns",
|
||||||
|
"lodash-es",
|
||||||
|
"ramda",
|
||||||
|
"antd",
|
||||||
|
"react-bootstrap",
|
||||||
|
"ahooks",
|
||||||
|
"@ant-design/icons",
|
||||||
|
"@headlessui/react",
|
||||||
|
"@headlessui-float/react",
|
||||||
|
"@heroicons/react/20/solid",
|
||||||
|
"@heroicons/react/24/solid",
|
||||||
|
"@heroicons/react/24/outline",
|
||||||
|
"@visx/visx",
|
||||||
|
"@tremor/react",
|
||||||
|
"rxjs",
|
||||||
|
"@mui/material",
|
||||||
|
"@mui/icons-material",
|
||||||
|
"recharts",
|
||||||
|
"react-use",
|
||||||
|
"effect",
|
||||||
|
"@effect/schema",
|
||||||
|
"@effect/platform",
|
||||||
|
"@effect/platform-node",
|
||||||
|
"@effect/platform-browser",
|
||||||
|
"@effect/platform-bun",
|
||||||
|
"@effect/sql",
|
||||||
|
"@effect/sql-mssql",
|
||||||
|
"@effect/sql-mysql2",
|
||||||
|
"@effect/sql-pg",
|
||||||
|
"@effect/sql-sqlite-node",
|
||||||
|
"@effect/sql-sqlite-bun",
|
||||||
|
"@effect/sql-sqlite-wasm",
|
||||||
|
"@effect/sql-sqlite-react-native",
|
||||||
|
"@effect/rpc",
|
||||||
|
"@effect/rpc-http",
|
||||||
|
"@effect/typeclass",
|
||||||
|
"@effect/experimental",
|
||||||
|
"@effect/opentelemetry",
|
||||||
|
"@material-ui/core",
|
||||||
|
"@material-ui/icons",
|
||||||
|
"@tabler/icons-react",
|
||||||
|
"mui-core",
|
||||||
|
"react-icons/ai",
|
||||||
|
"react-icons/bi",
|
||||||
|
"react-icons/bs",
|
||||||
|
"react-icons/cg",
|
||||||
|
"react-icons/ci",
|
||||||
|
"react-icons/di",
|
||||||
|
"react-icons/fa",
|
||||||
|
"react-icons/fa6",
|
||||||
|
"react-icons/fc",
|
||||||
|
"react-icons/fi",
|
||||||
|
"react-icons/gi",
|
||||||
|
"react-icons/go",
|
||||||
|
"react-icons/gr",
|
||||||
|
"react-icons/hi",
|
||||||
|
"react-icons/hi2",
|
||||||
|
"react-icons/im",
|
||||||
|
"react-icons/io",
|
||||||
|
"react-icons/io5",
|
||||||
|
"react-icons/lia",
|
||||||
|
"react-icons/lib",
|
||||||
|
"react-icons/lu",
|
||||||
|
"react-icons/md",
|
||||||
|
"react-icons/pi",
|
||||||
|
"react-icons/ri",
|
||||||
|
"react-icons/rx",
|
||||||
|
"react-icons/si",
|
||||||
|
"react-icons/sl",
|
||||||
|
"react-icons/tb",
|
||||||
|
"react-icons/tfi",
|
||||||
|
"react-icons/ti",
|
||||||
|
"react-icons/vsc",
|
||||||
|
"react-icons/wi"
|
||||||
|
],
|
||||||
|
"trustHostHeader": false,
|
||||||
|
"isExperimentalCompile": false
|
||||||
|
},
|
||||||
|
"htmlLimitedBots": "[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight",
|
||||||
|
"bundlePagesRouterDependencies": false,
|
||||||
|
"configFileName": "next.config.ts",
|
||||||
|
"turbopack": {
|
||||||
|
"root": "C:\\source\\webshop\\shop"
|
||||||
|
},
|
||||||
|
"distDirRoot": ".next"
|
||||||
|
},
|
||||||
|
"appDir": "C:\\source\\webshop\\shop",
|
||||||
|
"relativeAppDir": "",
|
||||||
|
"files": [
|
||||||
|
".next\\routes-manifest.json",
|
||||||
|
".next\\server\\pages-manifest.json",
|
||||||
|
".next\\build-manifest.json",
|
||||||
|
".next\\prerender-manifest.json",
|
||||||
|
".next\\server\\functions-config-manifest.json",
|
||||||
|
".next\\server\\middleware-manifest.json",
|
||||||
|
".next\\server\\middleware-build-manifest.js",
|
||||||
|
".next\\server\\app-paths-manifest.json",
|
||||||
|
".next\\app-path-routes-manifest.json",
|
||||||
|
".next\\server\\server-reference-manifest.js",
|
||||||
|
".next\\server\\server-reference-manifest.json",
|
||||||
|
".next\\server\\prefetch-hints.json",
|
||||||
|
".next\\BUILD_ID",
|
||||||
|
".next\\server\\next-font-manifest.js",
|
||||||
|
".next\\server\\next-font-manifest.json",
|
||||||
|
".next\\required-server-files.json"
|
||||||
|
],
|
||||||
|
"ignore": []
|
||||||
|
}
|
||||||
332
build_temp/.next/required-server-files.json
Normal file
332
build_temp/.next/required-server-files.json
Normal file
@@ -0,0 +1,332 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"config": {
|
||||||
|
"env": {},
|
||||||
|
"webpack": null,
|
||||||
|
"typescript": {
|
||||||
|
"ignoreBuildErrors": false
|
||||||
|
},
|
||||||
|
"typedRoutes": false,
|
||||||
|
"distDir": ".next",
|
||||||
|
"cleanDistDir": true,
|
||||||
|
"assetPrefix": "",
|
||||||
|
"cacheMaxMemorySize": 52428800,
|
||||||
|
"configOrigin": "next.config.ts",
|
||||||
|
"useFileSystemPublicRoutes": true,
|
||||||
|
"generateEtags": true,
|
||||||
|
"pageExtensions": [
|
||||||
|
"tsx",
|
||||||
|
"ts",
|
||||||
|
"jsx",
|
||||||
|
"js"
|
||||||
|
],
|
||||||
|
"poweredByHeader": true,
|
||||||
|
"compress": true,
|
||||||
|
"images": {
|
||||||
|
"deviceSizes": [
|
||||||
|
640,
|
||||||
|
750,
|
||||||
|
828,
|
||||||
|
1080,
|
||||||
|
1200,
|
||||||
|
1920,
|
||||||
|
2048,
|
||||||
|
3840
|
||||||
|
],
|
||||||
|
"imageSizes": [
|
||||||
|
32,
|
||||||
|
48,
|
||||||
|
64,
|
||||||
|
96,
|
||||||
|
128,
|
||||||
|
256,
|
||||||
|
384
|
||||||
|
],
|
||||||
|
"path": "/_next/image",
|
||||||
|
"loader": "default",
|
||||||
|
"loaderFile": "",
|
||||||
|
"domains": [],
|
||||||
|
"disableStaticImages": false,
|
||||||
|
"minimumCacheTTL": 14400,
|
||||||
|
"formats": [
|
||||||
|
"image/webp"
|
||||||
|
],
|
||||||
|
"maximumRedirects": 3,
|
||||||
|
"maximumResponseBody": 50000000,
|
||||||
|
"dangerouslyAllowLocalIP": false,
|
||||||
|
"dangerouslyAllowSVG": false,
|
||||||
|
"contentSecurityPolicy": "script-src 'none'; frame-src 'none'; sandbox;",
|
||||||
|
"contentDispositionType": "attachment",
|
||||||
|
"localPatterns": [
|
||||||
|
{
|
||||||
|
"pathname": "**",
|
||||||
|
"search": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"remotePatterns": [],
|
||||||
|
"qualities": [
|
||||||
|
75
|
||||||
|
],
|
||||||
|
"unoptimized": false,
|
||||||
|
"customCacheHandler": false
|
||||||
|
},
|
||||||
|
"devIndicators": {
|
||||||
|
"position": "bottom-left"
|
||||||
|
},
|
||||||
|
"onDemandEntries": {
|
||||||
|
"maxInactiveAge": 60000,
|
||||||
|
"pagesBufferLength": 5
|
||||||
|
},
|
||||||
|
"basePath": "",
|
||||||
|
"sassOptions": {},
|
||||||
|
"trailingSlash": false,
|
||||||
|
"i18n": null,
|
||||||
|
"productionBrowserSourceMaps": false,
|
||||||
|
"excludeDefaultMomentLocales": true,
|
||||||
|
"reactProductionProfiling": false,
|
||||||
|
"reactStrictMode": null,
|
||||||
|
"reactMaxHeadersLength": 6000,
|
||||||
|
"httpAgentOptions": {
|
||||||
|
"keepAlive": true
|
||||||
|
},
|
||||||
|
"logging": {
|
||||||
|
"serverFunctions": true,
|
||||||
|
"browserToTerminal": "warn"
|
||||||
|
},
|
||||||
|
"compiler": {},
|
||||||
|
"expireTime": 31536000,
|
||||||
|
"staticPageGenerationTimeout": 60,
|
||||||
|
"modularizeImports": {
|
||||||
|
"@mui/icons-material": {
|
||||||
|
"transform": "@mui/icons-material/{{member}}"
|
||||||
|
},
|
||||||
|
"lodash": {
|
||||||
|
"transform": "lodash/{{member}}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputFileTracingRoot": "C:\\source\\webshop\\shop",
|
||||||
|
"cacheComponents": false,
|
||||||
|
"cacheLife": {
|
||||||
|
"default": {
|
||||||
|
"stale": 300,
|
||||||
|
"revalidate": 900,
|
||||||
|
"expire": 4294967294
|
||||||
|
},
|
||||||
|
"seconds": {
|
||||||
|
"stale": 30,
|
||||||
|
"revalidate": 1,
|
||||||
|
"expire": 60
|
||||||
|
},
|
||||||
|
"minutes": {
|
||||||
|
"stale": 300,
|
||||||
|
"revalidate": 60,
|
||||||
|
"expire": 3600
|
||||||
|
},
|
||||||
|
"hours": {
|
||||||
|
"stale": 300,
|
||||||
|
"revalidate": 3600,
|
||||||
|
"expire": 86400
|
||||||
|
},
|
||||||
|
"days": {
|
||||||
|
"stale": 300,
|
||||||
|
"revalidate": 86400,
|
||||||
|
"expire": 604800
|
||||||
|
},
|
||||||
|
"weeks": {
|
||||||
|
"stale": 300,
|
||||||
|
"revalidate": 604800,
|
||||||
|
"expire": 2592000
|
||||||
|
},
|
||||||
|
"max": {
|
||||||
|
"stale": 300,
|
||||||
|
"revalidate": 2592000,
|
||||||
|
"expire": 31536000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cacheHandlers": {},
|
||||||
|
"experimental": {
|
||||||
|
"appNewScrollHandler": false,
|
||||||
|
"useSkewCookie": false,
|
||||||
|
"cssChunking": true,
|
||||||
|
"multiZoneDraftMode": false,
|
||||||
|
"appNavFailHandling": false,
|
||||||
|
"prerenderEarlyExit": true,
|
||||||
|
"serverMinification": true,
|
||||||
|
"linkNoTouchStart": false,
|
||||||
|
"caseSensitiveRoutes": false,
|
||||||
|
"cachedNavigations": false,
|
||||||
|
"partialFallbacks": false,
|
||||||
|
"dynamicOnHover": false,
|
||||||
|
"varyParams": false,
|
||||||
|
"prefetchInlining": false,
|
||||||
|
"preloadEntriesOnStart": true,
|
||||||
|
"clientRouterFilter": true,
|
||||||
|
"clientRouterFilterRedirects": false,
|
||||||
|
"fetchCacheKeyPrefix": "",
|
||||||
|
"proxyPrefetch": "flexible",
|
||||||
|
"optimisticClientCache": true,
|
||||||
|
"manualClientBasePath": false,
|
||||||
|
"cpus": 15,
|
||||||
|
"memoryBasedWorkersCount": false,
|
||||||
|
"imgOptConcurrency": null,
|
||||||
|
"imgOptTimeoutInSeconds": 7,
|
||||||
|
"imgOptMaxInputPixels": 268402689,
|
||||||
|
"imgOptSequentialRead": null,
|
||||||
|
"imgOptSkipMetadata": null,
|
||||||
|
"isrFlushToDisk": true,
|
||||||
|
"workerThreads": false,
|
||||||
|
"optimizeCss": false,
|
||||||
|
"nextScriptWorkers": false,
|
||||||
|
"scrollRestoration": false,
|
||||||
|
"externalDir": false,
|
||||||
|
"disableOptimizedLoading": false,
|
||||||
|
"gzipSize": true,
|
||||||
|
"craCompat": false,
|
||||||
|
"esmExternals": true,
|
||||||
|
"fullySpecified": false,
|
||||||
|
"swcTraceProfiling": false,
|
||||||
|
"forceSwcTransforms": false,
|
||||||
|
"largePageDataBytes": 128000,
|
||||||
|
"typedEnv": false,
|
||||||
|
"parallelServerCompiles": false,
|
||||||
|
"parallelServerBuildTraces": false,
|
||||||
|
"ppr": false,
|
||||||
|
"authInterrupts": false,
|
||||||
|
"webpackMemoryOptimizations": false,
|
||||||
|
"optimizeServerReact": true,
|
||||||
|
"strictRouteTypes": false,
|
||||||
|
"viewTransition": false,
|
||||||
|
"removeUncaughtErrorAndRejectionListeners": false,
|
||||||
|
"validateRSCRequestHeaders": false,
|
||||||
|
"staleTimes": {
|
||||||
|
"dynamic": 0,
|
||||||
|
"static": 300
|
||||||
|
},
|
||||||
|
"reactDebugChannel": true,
|
||||||
|
"serverComponentsHmrCache": true,
|
||||||
|
"staticGenerationMaxConcurrency": 8,
|
||||||
|
"staticGenerationMinPagesPerWorker": 25,
|
||||||
|
"transitionIndicator": false,
|
||||||
|
"gestureTransition": false,
|
||||||
|
"inlineCss": false,
|
||||||
|
"useCache": false,
|
||||||
|
"globalNotFound": false,
|
||||||
|
"browserDebugInfoInTerminal": "warn",
|
||||||
|
"lockDistDir": true,
|
||||||
|
"proxyClientMaxBodySize": 10485760,
|
||||||
|
"hideLogsAfterAbort": false,
|
||||||
|
"mcpServer": true,
|
||||||
|
"turbopackFileSystemCacheForDev": true,
|
||||||
|
"turbopackFileSystemCacheForBuild": false,
|
||||||
|
"turbopackInferModuleSideEffects": true,
|
||||||
|
"turbopackPluginRuntimeStrategy": "childProcesses",
|
||||||
|
"optimizePackageImports": [
|
||||||
|
"lucide-react",
|
||||||
|
"date-fns",
|
||||||
|
"lodash-es",
|
||||||
|
"ramda",
|
||||||
|
"antd",
|
||||||
|
"react-bootstrap",
|
||||||
|
"ahooks",
|
||||||
|
"@ant-design/icons",
|
||||||
|
"@headlessui/react",
|
||||||
|
"@headlessui-float/react",
|
||||||
|
"@heroicons/react/20/solid",
|
||||||
|
"@heroicons/react/24/solid",
|
||||||
|
"@heroicons/react/24/outline",
|
||||||
|
"@visx/visx",
|
||||||
|
"@tremor/react",
|
||||||
|
"rxjs",
|
||||||
|
"@mui/material",
|
||||||
|
"@mui/icons-material",
|
||||||
|
"recharts",
|
||||||
|
"react-use",
|
||||||
|
"effect",
|
||||||
|
"@effect/schema",
|
||||||
|
"@effect/platform",
|
||||||
|
"@effect/platform-node",
|
||||||
|
"@effect/platform-browser",
|
||||||
|
"@effect/platform-bun",
|
||||||
|
"@effect/sql",
|
||||||
|
"@effect/sql-mssql",
|
||||||
|
"@effect/sql-mysql2",
|
||||||
|
"@effect/sql-pg",
|
||||||
|
"@effect/sql-sqlite-node",
|
||||||
|
"@effect/sql-sqlite-bun",
|
||||||
|
"@effect/sql-sqlite-wasm",
|
||||||
|
"@effect/sql-sqlite-react-native",
|
||||||
|
"@effect/rpc",
|
||||||
|
"@effect/rpc-http",
|
||||||
|
"@effect/typeclass",
|
||||||
|
"@effect/experimental",
|
||||||
|
"@effect/opentelemetry",
|
||||||
|
"@material-ui/core",
|
||||||
|
"@material-ui/icons",
|
||||||
|
"@tabler/icons-react",
|
||||||
|
"mui-core",
|
||||||
|
"react-icons/ai",
|
||||||
|
"react-icons/bi",
|
||||||
|
"react-icons/bs",
|
||||||
|
"react-icons/cg",
|
||||||
|
"react-icons/ci",
|
||||||
|
"react-icons/di",
|
||||||
|
"react-icons/fa",
|
||||||
|
"react-icons/fa6",
|
||||||
|
"react-icons/fc",
|
||||||
|
"react-icons/fi",
|
||||||
|
"react-icons/gi",
|
||||||
|
"react-icons/go",
|
||||||
|
"react-icons/gr",
|
||||||
|
"react-icons/hi",
|
||||||
|
"react-icons/hi2",
|
||||||
|
"react-icons/im",
|
||||||
|
"react-icons/io",
|
||||||
|
"react-icons/io5",
|
||||||
|
"react-icons/lia",
|
||||||
|
"react-icons/lib",
|
||||||
|
"react-icons/lu",
|
||||||
|
"react-icons/md",
|
||||||
|
"react-icons/pi",
|
||||||
|
"react-icons/ri",
|
||||||
|
"react-icons/rx",
|
||||||
|
"react-icons/si",
|
||||||
|
"react-icons/sl",
|
||||||
|
"react-icons/tb",
|
||||||
|
"react-icons/tfi",
|
||||||
|
"react-icons/ti",
|
||||||
|
"react-icons/vsc",
|
||||||
|
"react-icons/wi"
|
||||||
|
],
|
||||||
|
"trustHostHeader": false,
|
||||||
|
"isExperimentalCompile": false
|
||||||
|
},
|
||||||
|
"htmlLimitedBots": "[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight",
|
||||||
|
"bundlePagesRouterDependencies": false,
|
||||||
|
"configFileName": "next.config.ts",
|
||||||
|
"turbopack": {
|
||||||
|
"root": "C:\\source\\webshop\\shop"
|
||||||
|
},
|
||||||
|
"distDirRoot": ".next"
|
||||||
|
},
|
||||||
|
"appDir": "C:\\source\\webshop\\shop",
|
||||||
|
"relativeAppDir": "",
|
||||||
|
"files": [
|
||||||
|
".next\\routes-manifest.json",
|
||||||
|
".next\\server\\pages-manifest.json",
|
||||||
|
".next\\build-manifest.json",
|
||||||
|
".next\\prerender-manifest.json",
|
||||||
|
".next\\server\\functions-config-manifest.json",
|
||||||
|
".next\\server\\middleware-manifest.json",
|
||||||
|
".next\\server\\middleware-build-manifest.js",
|
||||||
|
".next\\server\\app-paths-manifest.json",
|
||||||
|
".next\\app-path-routes-manifest.json",
|
||||||
|
".next\\server\\server-reference-manifest.js",
|
||||||
|
".next\\server\\server-reference-manifest.json",
|
||||||
|
".next\\server\\prefetch-hints.json",
|
||||||
|
".next\\BUILD_ID",
|
||||||
|
".next\\server\\next-font-manifest.js",
|
||||||
|
".next\\server\\next-font-manifest.json",
|
||||||
|
".next\\required-server-files.json"
|
||||||
|
],
|
||||||
|
"ignore": []
|
||||||
|
}
|
||||||
204
build_temp/.next/routes-manifest.json
Normal file
204
build_temp/.next/routes-manifest.json
Normal file
@@ -0,0 +1,204 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"pages404": true,
|
||||||
|
"appType": "app",
|
||||||
|
"caseSensitive": false,
|
||||||
|
"basePath": "",
|
||||||
|
"redirects": [
|
||||||
|
{
|
||||||
|
"source": "/:path+/",
|
||||||
|
"destination": "/:path+",
|
||||||
|
"internal": true,
|
||||||
|
"priority": true,
|
||||||
|
"statusCode": 308,
|
||||||
|
"regex": "^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"headers": [],
|
||||||
|
"onMatchHeaders": [],
|
||||||
|
"rewrites": {
|
||||||
|
"beforeFiles": [],
|
||||||
|
"afterFiles": [],
|
||||||
|
"fallback": []
|
||||||
|
},
|
||||||
|
"dynamicRoutes": [
|
||||||
|
{
|
||||||
|
"page": "/my-customers/[id]",
|
||||||
|
"regex": "^/my\\-customers/([^/]+?)(?:/)?$",
|
||||||
|
"routeKeys": {
|
||||||
|
"nxtPid": "nxtPid"
|
||||||
|
},
|
||||||
|
"namedRegex": "^/my\\-customers/(?<nxtPid>[^/]+?)(?:/)?$"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"staticRoutes": [
|
||||||
|
{
|
||||||
|
"page": "/",
|
||||||
|
"regex": "^/(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/_global-error",
|
||||||
|
"regex": "^/_global\\-error(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/_global\\-error(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/_not-found",
|
||||||
|
"regex": "^/_not\\-found(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/_not\\-found(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/admin",
|
||||||
|
"regex": "^/admin(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/admin(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/admin/categories",
|
||||||
|
"regex": "^/admin/categories(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/admin/categories(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/admin/orders",
|
||||||
|
"regex": "^/admin/orders(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/admin/orders(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/admin/products",
|
||||||
|
"regex": "^/admin/products(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/admin/products(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/admin/users",
|
||||||
|
"regex": "^/admin/users(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/admin/users(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/api/admin/recent-orders",
|
||||||
|
"regex": "^/api/admin/recent\\-orders(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/api/admin/recent\\-orders(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/auth/confirm",
|
||||||
|
"regex": "^/auth/confirm(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/auth/confirm(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/auth/error",
|
||||||
|
"regex": "^/auth/error(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/auth/error(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/auth/forgot-password",
|
||||||
|
"regex": "^/auth/forgot\\-password(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/auth/forgot\\-password(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/auth/login",
|
||||||
|
"regex": "^/auth/login(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/auth/login(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/auth/sign-up",
|
||||||
|
"regex": "^/auth/sign\\-up(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/auth/sign\\-up(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/auth/sign-up-success",
|
||||||
|
"regex": "^/auth/sign\\-up\\-success(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/auth/sign\\-up\\-success(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/auth/update-password",
|
||||||
|
"regex": "^/auth/update\\-password(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/auth/update\\-password(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/favicon.ico",
|
||||||
|
"regex": "^/favicon\\.ico(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/favicon\\.ico(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/my-customers",
|
||||||
|
"regex": "^/my\\-customers(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/my\\-customers(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/my-customers/new",
|
||||||
|
"regex": "^/my\\-customers/new(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/my\\-customers/new(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/my-orders",
|
||||||
|
"regex": "^/my\\-orders(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/my\\-orders(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/opengraph-image.png",
|
||||||
|
"regex": "^/opengraph\\-image\\.png(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/opengraph\\-image\\.png(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/order",
|
||||||
|
"regex": "^/order(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/order(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/order/success",
|
||||||
|
"regex": "^/order/success(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/order/success(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/protected",
|
||||||
|
"regex": "^/protected(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/protected(?:/)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"page": "/twitter-image.png",
|
||||||
|
"regex": "^/twitter\\-image\\.png(?:/)?$",
|
||||||
|
"routeKeys": {},
|
||||||
|
"namedRegex": "^/twitter\\-image\\.png(?:/)?$"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dataRoutes": [],
|
||||||
|
"rsc": {
|
||||||
|
"header": "rsc",
|
||||||
|
"varyHeader": "rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch",
|
||||||
|
"prefetchHeader": "next-router-prefetch",
|
||||||
|
"didPostponeHeader": "x-nextjs-postponed",
|
||||||
|
"contentTypeHeader": "text/x-component",
|
||||||
|
"suffix": ".rsc",
|
||||||
|
"prefetchSegmentHeader": "next-router-segment-prefetch",
|
||||||
|
"prefetchSegmentSuffix": ".segment.rsc",
|
||||||
|
"prefetchSegmentDirSuffix": ".segments",
|
||||||
|
"clientParamParsing": false,
|
||||||
|
"dynamicRSCPrerender": false
|
||||||
|
},
|
||||||
|
"rewriteHeaders": {
|
||||||
|
"pathHeader": "x-nextjs-rewritten-path",
|
||||||
|
"queryHeader": "x-nextjs-rewritten-query"
|
||||||
|
}
|
||||||
|
}
|
||||||
28
build_temp/.next/server/app-paths-manifest.json
Normal file
28
build_temp/.next/server/app-paths-manifest.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"/_global-error/page": "app/_global-error/page.js",
|
||||||
|
"/_not-found/page": "app/_not-found/page.js",
|
||||||
|
"/admin/categories/page": "app/admin/categories/page.js",
|
||||||
|
"/admin/orders/page": "app/admin/orders/page.js",
|
||||||
|
"/admin/page": "app/admin/page.js",
|
||||||
|
"/admin/products/page": "app/admin/products/page.js",
|
||||||
|
"/admin/users/page": "app/admin/users/page.js",
|
||||||
|
"/api/admin/recent-orders/route": "app/api/admin/recent-orders/route.js",
|
||||||
|
"/auth/confirm/route": "app/auth/confirm/route.js",
|
||||||
|
"/auth/error/page": "app/auth/error/page.js",
|
||||||
|
"/auth/forgot-password/page": "app/auth/forgot-password/page.js",
|
||||||
|
"/auth/login/page": "app/auth/login/page.js",
|
||||||
|
"/auth/sign-up-success/page": "app/auth/sign-up-success/page.js",
|
||||||
|
"/auth/sign-up/page": "app/auth/sign-up/page.js",
|
||||||
|
"/auth/update-password/page": "app/auth/update-password/page.js",
|
||||||
|
"/favicon.ico/route": "app/favicon.ico/route.js",
|
||||||
|
"/my-customers/[id]/page": "app/my-customers/[id]/page.js",
|
||||||
|
"/my-customers/new/page": "app/my-customers/new/page.js",
|
||||||
|
"/my-customers/page": "app/my-customers/page.js",
|
||||||
|
"/my-orders/page": "app/my-orders/page.js",
|
||||||
|
"/opengraph-image.png/route": "app/opengraph-image.png/route.js",
|
||||||
|
"/order/page": "app/order/page.js",
|
||||||
|
"/order/success/page": "app/order/success/page.js",
|
||||||
|
"/page": "app/page.js",
|
||||||
|
"/protected/page": "app/protected/page.js",
|
||||||
|
"/twitter-image.png/route": "app/twitter-image.png/route.js"
|
||||||
|
}
|
||||||
1
build_temp/.next/server/app/_global-error.html
Normal file
1
build_temp/.next/server/app/_global-error.html
Normal file
File diff suppressed because one or more lines are too long
15
build_temp/.next/server/app/_global-error.meta
Normal file
15
build_temp/.next/server/app/_global-error.meta
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"status": 500,
|
||||||
|
"headers": {
|
||||||
|
"x-nextjs-stale-time": "300",
|
||||||
|
"x-nextjs-prerender": "1",
|
||||||
|
"x-next-cache-tags": "_N_T_/layout,_N_T_/_global-error/layout,_N_T_/_global-error/page,_N_T_/_global-error"
|
||||||
|
},
|
||||||
|
"segmentPaths": [
|
||||||
|
"/_tree",
|
||||||
|
"/_full",
|
||||||
|
"/__PAGE__",
|
||||||
|
"/_index",
|
||||||
|
"/_head"
|
||||||
|
]
|
||||||
|
}
|
||||||
15
build_temp/.next/server/app/_global-error.rsc
Normal file
15
build_temp/.next/server/app/_global-error.rsc
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
1:"$Sreact.fragment"
|
||||||
|
2:I[39756,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default"]
|
||||||
|
3:I[37457,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default"]
|
||||||
|
4:I[97367,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"OutletBoundary"]
|
||||||
|
5:"$Sreact.suspense"
|
||||||
|
8:I[97367,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"ViewportBoundary"]
|
||||||
|
a:I[97367,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"MetadataBoundary"]
|
||||||
|
c:I[68027,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default",1]
|
||||||
|
0:{"P":null,"c":["","_global-error"],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]}],[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","html",null,{"id":"__next_error__","children":[["$","head",null,{"children":[["$","title",null,{"children":"500: This page couldn’t load"}],["$","style",null,{"dangerouslySetInnerHTML":{"__html":":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }"}}]]}],["$","body",null,{"children":["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","display":"flex","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"style":{"marginTop":"-32px","maxWidth":"325px","padding":"32px 28px","textAlign":"left"},"children":[["$","svg",null,{"width":"32","height":"32","viewBox":"-0.2 -1.5 32 32","fill":"none","style":{"marginBottom":"24px"},"children":["$","path",null,{"d":"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z","fill":"var(--next-error-title)"}]}],["$","h1",null,{"style":{"fontSize":"24px","fontWeight":500,"letterSpacing":"-0.02em","lineHeight":"32px","margin":"0 0 12px 0","color":"var(--next-error-title)"},"children":"This page couldn’t load"}],["$","p",null,{"style":{"fontSize":"14px","fontWeight":400,"lineHeight":"21px","margin":"0 0 20px 0","color":"var(--next-error-message)"},"children":"A server error occurred. Reload to try again."}],["$","form",null,{"style":{"margin":0},"children":["$","button",null,{"type":"submit","style":{"display":"inline-flex","alignItems":"center","justifyContent":"center","height":"32px","padding":"0 12px","fontSize":"14px","fontWeight":500,"lineHeight":"20px","borderRadius":"6px","cursor":"pointer","color":"var(--next-error-btn-text)","background":"var(--next-error-btn-bg)","border":"var(--next-error-btn-border)"},"children":"Reload"}]}]]}]}]}]]}],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,null]},null,false,"$@7"],["$","$1","h",{"children":[null,["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$c",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"czEjVggXDRFH51IopN6_9"}
|
||||||
|
d:[]
|
||||||
|
7:"$Wd"
|
||||||
|
9:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
||||||
|
e:I[27201,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"IconMark"]
|
||||||
|
6:null
|
||||||
|
b:[["$","link","0",{"rel":"icon","href":"/favicon.ico?favicon.0x3dzn~oxb6tn.ico","sizes":"256x256","type":"image/x-icon"}],["$","$Le","1",{}]]
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
1:"$Sreact.fragment"
|
||||||
|
2:I[97367,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"OutletBoundary"]
|
||||||
|
3:"$Sreact.suspense"
|
||||||
|
0:{"rsc":["$","$1","c",{"children":[["$","html",null,{"id":"__next_error__","children":[["$","head",null,{"children":[["$","title",null,{"children":"500: This page couldn’t load"}],["$","style",null,{"dangerouslySetInnerHTML":{"__html":":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }"}}]]}],["$","body",null,{"children":["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","display":"flex","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"style":{"marginTop":"-32px","maxWidth":"325px","padding":"32px 28px","textAlign":"left"},"children":[["$","svg",null,{"width":"32","height":"32","viewBox":"-0.2 -1.5 32 32","fill":"none","style":{"marginBottom":"24px"},"children":["$","path",null,{"d":"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z","fill":"var(--next-error-title)"}]}],["$","h1",null,{"style":{"fontSize":"24px","fontWeight":500,"letterSpacing":"-0.02em","lineHeight":"32px","margin":"0 0 12px 0","color":"var(--next-error-title)"},"children":"This page couldn’t load"}],["$","p",null,{"style":{"fontSize":"14px","fontWeight":400,"lineHeight":"21px","margin":"0 0 20px 0","color":"var(--next-error-message)"},"children":"A server error occurred. Reload to try again."}],["$","form",null,{"style":{"margin":0},"children":["$","button",null,{"type":"submit","style":{"display":"inline-flex","alignItems":"center","justifyContent":"center","height":"32px","padding":"0 12px","fontSize":"14px","fontWeight":500,"lineHeight":"20px","borderRadius":"6px","cursor":"pointer","color":"var(--next-error-btn-text)","background":"var(--next-error-btn-bg)","border":"var(--next-error-btn-border)"},"children":"Reload"}]}]]}]}]}]]}],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"czEjVggXDRFH51IopN6_9"}
|
||||||
|
4:null
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
1:"$Sreact.fragment"
|
||||||
|
2:I[39756,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default"]
|
||||||
|
3:I[37457,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default"]
|
||||||
|
4:I[97367,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"OutletBoundary"]
|
||||||
|
5:"$Sreact.suspense"
|
||||||
|
8:I[97367,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"ViewportBoundary"]
|
||||||
|
a:I[97367,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"MetadataBoundary"]
|
||||||
|
c:I[68027,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default",1]
|
||||||
|
0:{"P":null,"c":["","_global-error"],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]}],[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","html",null,{"id":"__next_error__","children":[["$","head",null,{"children":[["$","title",null,{"children":"500: This page couldn’t load"}],["$","style",null,{"dangerouslySetInnerHTML":{"__html":":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }"}}]]}],["$","body",null,{"children":["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","display":"flex","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"style":{"marginTop":"-32px","maxWidth":"325px","padding":"32px 28px","textAlign":"left"},"children":[["$","svg",null,{"width":"32","height":"32","viewBox":"-0.2 -1.5 32 32","fill":"none","style":{"marginBottom":"24px"},"children":["$","path",null,{"d":"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z","fill":"var(--next-error-title)"}]}],["$","h1",null,{"style":{"fontSize":"24px","fontWeight":500,"letterSpacing":"-0.02em","lineHeight":"32px","margin":"0 0 12px 0","color":"var(--next-error-title)"},"children":"This page couldn’t load"}],["$","p",null,{"style":{"fontSize":"14px","fontWeight":400,"lineHeight":"21px","margin":"0 0 20px 0","color":"var(--next-error-message)"},"children":"A server error occurred. Reload to try again."}],["$","form",null,{"style":{"margin":0},"children":["$","button",null,{"type":"submit","style":{"display":"inline-flex","alignItems":"center","justifyContent":"center","height":"32px","padding":"0 12px","fontSize":"14px","fontWeight":500,"lineHeight":"20px","borderRadius":"6px","cursor":"pointer","color":"var(--next-error-btn-text)","background":"var(--next-error-btn-bg)","border":"var(--next-error-btn-border)"},"children":"Reload"}]}]]}]}]}]]}],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,null]},null,false,"$@7"],["$","$1","h",{"children":[null,["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$c",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"czEjVggXDRFH51IopN6_9"}
|
||||||
|
d:[]
|
||||||
|
7:"$Wd"
|
||||||
|
9:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
||||||
|
e:I[27201,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"IconMark"]
|
||||||
|
6:null
|
||||||
|
b:[["$","link","0",{"rel":"icon","href":"/favicon.ico?favicon.0x3dzn~oxb6tn.ico","sizes":"256x256","type":"image/x-icon"}],["$","$Le","1",{}]]
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
1:"$Sreact.fragment"
|
||||||
|
2:I[97367,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"ViewportBoundary"]
|
||||||
|
3:I[97367,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"MetadataBoundary"]
|
||||||
|
4:"$Sreact.suspense"
|
||||||
|
5:I[27201,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"IconMark"]
|
||||||
|
0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","link","0",{"rel":"icon","href":"/favicon.ico?favicon.0x3dzn~oxb6tn.ico","sizes":"256x256","type":"image/x-icon"}],["$","$L5","1",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"czEjVggXDRFH51IopN6_9"}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
1:"$Sreact.fragment"
|
||||||
|
2:I[39756,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default"]
|
||||||
|
3:I[37457,["/_next/static/chunks/01xlw8hd842-c.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default"]
|
||||||
|
4:[]
|
||||||
|
0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"czEjVggXDRFH51IopN6_9"}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
0:{"tree":{"name":"","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"czEjVggXDRFH51IopN6_9"}
|
||||||
12
build_temp/.next/server/app/_global-error/page.js
Normal file
12
build_temp/.next/server/app/_global-error/page.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
var R=require("../../chunks/ssr/[turbopack]_runtime.js")("server/app/_global-error/page.js")
|
||||||
|
R.c("server/chunks/ssr/[root-of-the-server]__0~c929r._.js")
|
||||||
|
R.c("server/chunks/ssr/node_modules_next_dist_060d1m.._.js")
|
||||||
|
R.c("server/chunks/ssr/node_modules_next_dist_0ixdcs~._.js")
|
||||||
|
R.c("server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0nsg22r.js")
|
||||||
|
R.c("server/chunks/ssr/[root-of-the-server]__0.m8mql._.js")
|
||||||
|
R.c("server/chunks/ssr/[root-of-the-server]__0.angw.._.js")
|
||||||
|
R.c("server/chunks/ssr/node_modules_next_dist_compiled_@opentelemetry_api_index_0zv0b3p.js")
|
||||||
|
R.c("server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0lgvd_..js")
|
||||||
|
R.c("server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0k77kol.js")
|
||||||
|
R.m(99158)
|
||||||
|
module.exports=R.m(99158).exports
|
||||||
5
build_temp/.next/server/app/_global-error/page.js.map
Normal file
5
build_temp/.next/server/app/_global-error/page.js.map
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": [],
|
||||||
|
"sections": []
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"/_global-error/page": "app/_global-error/page.js"
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"devFiles": [],
|
||||||
|
"ampDevFiles": [],
|
||||||
|
"polyfillFiles": [
|
||||||
|
"static/chunks/03~yq9q893hmn.js"
|
||||||
|
],
|
||||||
|
"lowPriorityFiles": [],
|
||||||
|
"rootMainFiles": [
|
||||||
|
"static/chunks/0ze4gu236oq96.js",
|
||||||
|
"static/chunks/10qd__0r7a~.l.js",
|
||||||
|
"static/chunks/0-gaanm6h49z~.js",
|
||||||
|
"static/chunks/06c8h6921f-oo.js",
|
||||||
|
"static/chunks/15jasrm2107sy.js",
|
||||||
|
"static/chunks/181uojwh.t2ik.js",
|
||||||
|
"static/chunks/turbopack-0u.mb44r17v0_.js"
|
||||||
|
],
|
||||||
|
"pages": {},
|
||||||
|
"ampFirstPages": []
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pages": {},
|
||||||
|
"app": {},
|
||||||
|
"appUsingSizeAdjust": false,
|
||||||
|
"pagesUsingSizeAdjust": false
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"node": {},
|
||||||
|
"edge": {}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
1
build_temp/.next/server/app/_not-found.html
Normal file
1
build_temp/.next/server/app/_not-found.html
Normal file
File diff suppressed because one or more lines are too long
16
build_temp/.next/server/app/_not-found.meta
Normal file
16
build_temp/.next/server/app/_not-found.meta
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"status": 404,
|
||||||
|
"headers": {
|
||||||
|
"x-nextjs-stale-time": "300",
|
||||||
|
"x-nextjs-prerender": "1",
|
||||||
|
"x-next-cache-tags": "_N_T_/layout,_N_T_/_not-found/layout,_N_T_/_not-found/page,_N_T_/_not-found"
|
||||||
|
},
|
||||||
|
"segmentPaths": [
|
||||||
|
"/_tree",
|
||||||
|
"/_full",
|
||||||
|
"/_not-found/__PAGE__",
|
||||||
|
"/_not-found",
|
||||||
|
"/_index",
|
||||||
|
"/_head"
|
||||||
|
]
|
||||||
|
}
|
||||||
17
build_temp/.next/server/app/_not-found.rsc
Normal file
17
build_temp/.next/server/app/_not-found.rsc
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
1:"$Sreact.fragment"
|
||||||
|
2:I[63178,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"ThemeProvider"]
|
||||||
|
3:I[39756,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default"]
|
||||||
|
4:I[37457,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default"]
|
||||||
|
5:I[97367,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"OutletBoundary"]
|
||||||
|
6:"$Sreact.suspense"
|
||||||
|
9:I[97367,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"ViewportBoundary"]
|
||||||
|
b:I[97367,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"MetadataBoundary"]
|
||||||
|
d:I[68027,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default",1]
|
||||||
|
:HL["/_next/static/chunks/00s_sac~t0ps5.css","style"]
|
||||||
|
0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/00s_sac~t0ps5.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0usmzazea5o36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0d3shmwh5_nmn.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"geist_6ee70f7-module__6GiuUG__className antialiased","children":["$","$L2",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"disableTransitionOnChange":true,"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,null]},null,false,"$@8"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/00s_sac~t0ps5.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"czEjVggXDRFH51IopN6_9"}
|
||||||
|
e:[]
|
||||||
|
8:"$We"
|
||||||
|
a:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
||||||
|
f:I[27201,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"IconMark"]
|
||||||
|
7:null
|
||||||
|
c:[["$","title","0",{"children":"CASPOS-Shop | Die Kasse"}],["$","meta","1",{"name":"description","content":"Konfigurieren und bestellen Sie Ihre maßgeschneiderte Business-Software in Minuten."}],["$","meta","2",{"property":"og:title","content":"CASPOS-Shop | Die Kasse"}],["$","meta","3",{"property":"og:description","content":"Konfigurieren und bestellen Sie Ihre maßgeschneiderte Business-Software in Minuten."}],["$","meta","4",{"property":"og:image","content":"http://localhost:3000/opengraph-image.png?opengraph-image.0rmepv3m6lsw4.png"}],["$","meta","5",{"property":"og:image:type","content":"image/png"}],["$","meta","6",{"property":"og:image:width","content":"1200"}],["$","meta","7",{"property":"og:image:height","content":"600"}],["$","meta","8",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","9",{"name":"twitter:title","content":"CASPOS-Shop | Die Kasse"}],["$","meta","10",{"name":"twitter:description","content":"Konfigurieren und bestellen Sie Ihre maßgeschneiderte Business-Software in Minuten."}],["$","meta","11",{"name":"twitter:image","content":"http://localhost:3000/twitter-image.png?twitter-image.0rmepv3m6lsw4.png"}],["$","meta","12",{"name":"twitter:image:type","content":"image/png"}],["$","meta","13",{"name":"twitter:image:width","content":"1200"}],["$","meta","14",{"name":"twitter:image:height","content":"600"}],["$","link","15",{"rel":"icon","href":"/favicon.ico?favicon.0x3dzn~oxb6tn.ico","sizes":"256x256","type":"image/x-icon"}],["$","$Lf","16",{}]]
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
1:"$Sreact.fragment"
|
||||||
|
2:I[63178,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"ThemeProvider"]
|
||||||
|
3:I[39756,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default"]
|
||||||
|
4:I[37457,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default"]
|
||||||
|
5:I[97367,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"OutletBoundary"]
|
||||||
|
6:"$Sreact.suspense"
|
||||||
|
9:I[97367,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"ViewportBoundary"]
|
||||||
|
b:I[97367,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"MetadataBoundary"]
|
||||||
|
d:I[68027,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default",1]
|
||||||
|
:HL["/_next/static/chunks/00s_sac~t0ps5.css","style"]
|
||||||
|
0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/00s_sac~t0ps5.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0usmzazea5o36.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/0d3shmwh5_nmn.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"geist_6ee70f7-module__6GiuUG__className antialiased","children":["$","$L2",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"disableTransitionOnChange":true,"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,null]},null,false,"$@8"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$d",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/00s_sac~t0ps5.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"czEjVggXDRFH51IopN6_9"}
|
||||||
|
e:[]
|
||||||
|
8:"$We"
|
||||||
|
a:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
||||||
|
f:I[27201,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"IconMark"]
|
||||||
|
7:null
|
||||||
|
c:[["$","title","0",{"children":"CASPOS-Shop | Die Kasse"}],["$","meta","1",{"name":"description","content":"Konfigurieren und bestellen Sie Ihre maßgeschneiderte Business-Software in Minuten."}],["$","meta","2",{"property":"og:title","content":"CASPOS-Shop | Die Kasse"}],["$","meta","3",{"property":"og:description","content":"Konfigurieren und bestellen Sie Ihre maßgeschneiderte Business-Software in Minuten."}],["$","meta","4",{"property":"og:image","content":"http://localhost:3000/opengraph-image.png?opengraph-image.0rmepv3m6lsw4.png"}],["$","meta","5",{"property":"og:image:type","content":"image/png"}],["$","meta","6",{"property":"og:image:width","content":"1200"}],["$","meta","7",{"property":"og:image:height","content":"600"}],["$","meta","8",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","9",{"name":"twitter:title","content":"CASPOS-Shop | Die Kasse"}],["$","meta","10",{"name":"twitter:description","content":"Konfigurieren und bestellen Sie Ihre maßgeschneiderte Business-Software in Minuten."}],["$","meta","11",{"name":"twitter:image","content":"http://localhost:3000/twitter-image.png?twitter-image.0rmepv3m6lsw4.png"}],["$","meta","12",{"name":"twitter:image:type","content":"image/png"}],["$","meta","13",{"name":"twitter:image:width","content":"1200"}],["$","meta","14",{"name":"twitter:image:height","content":"600"}],["$","link","15",{"rel":"icon","href":"/favicon.ico?favicon.0x3dzn~oxb6tn.ico","sizes":"256x256","type":"image/x-icon"}],["$","$Lf","16",{}]]
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
1:"$Sreact.fragment"
|
||||||
|
2:I[97367,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"ViewportBoundary"]
|
||||||
|
3:I[97367,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"MetadataBoundary"]
|
||||||
|
4:"$Sreact.suspense"
|
||||||
|
5:I[27201,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"IconMark"]
|
||||||
|
0:{"rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"CASPOS-Shop | Die Kasse"}],["$","meta","1",{"name":"description","content":"Konfigurieren und bestellen Sie Ihre maßgeschneiderte Business-Software in Minuten."}],["$","meta","2",{"property":"og:title","content":"CASPOS-Shop | Die Kasse"}],["$","meta","3",{"property":"og:description","content":"Konfigurieren und bestellen Sie Ihre maßgeschneiderte Business-Software in Minuten."}],["$","meta","4",{"property":"og:image","content":"http://localhost:3000/opengraph-image.png?opengraph-image.0rmepv3m6lsw4.png"}],["$","meta","5",{"property":"og:image:type","content":"image/png"}],["$","meta","6",{"property":"og:image:width","content":"1200"}],["$","meta","7",{"property":"og:image:height","content":"600"}],["$","meta","8",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","9",{"name":"twitter:title","content":"CASPOS-Shop | Die Kasse"}],["$","meta","10",{"name":"twitter:description","content":"Konfigurieren und bestellen Sie Ihre maßgeschneiderte Business-Software in Minuten."}],["$","meta","11",{"name":"twitter:image","content":"http://localhost:3000/twitter-image.png?twitter-image.0rmepv3m6lsw4.png"}],["$","meta","12",{"name":"twitter:image:type","content":"image/png"}],["$","meta","13",{"name":"twitter:image:width","content":"1200"}],["$","meta","14",{"name":"twitter:image:height","content":"600"}],["$","link","15",{"rel":"icon","href":"/favicon.ico?favicon.0x3dzn~oxb6tn.ico","sizes":"256x256","type":"image/x-icon"}],["$","$L5","16",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"czEjVggXDRFH51IopN6_9"}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
1:"$Sreact.fragment"
|
||||||
|
2:I[63178,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"ThemeProvider"]
|
||||||
|
3:I[39756,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default"]
|
||||||
|
4:I[37457,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default"]
|
||||||
|
:HL["/_next/static/chunks/00s_sac~t0ps5.css","style"]
|
||||||
|
0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/00s_sac~t0ps5.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0usmzazea5o36.js","async":true}],["$","script","script-1",{"src":"/_next/static/chunks/0d3shmwh5_nmn.js","async":true}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"geist_6ee70f7-module__6GiuUG__className antialiased","children":["$","$L2",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"disableTransitionOnChange":true,"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"czEjVggXDRFH51IopN6_9"}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
1:"$Sreact.fragment"
|
||||||
|
2:I[39756,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default"]
|
||||||
|
3:I[37457,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"default"]
|
||||||
|
4:[]
|
||||||
|
0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"czEjVggXDRFH51IopN6_9"}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
1:"$Sreact.fragment"
|
||||||
|
2:I[97367,["/_next/static/chunks/0usmzazea5o36.js","/_next/static/chunks/0d3shmwh5_nmn.js"],"OutletBoundary"]
|
||||||
|
3:"$Sreact.suspense"
|
||||||
|
0:{"rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"czEjVggXDRFH51IopN6_9"}
|
||||||
|
4:null
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
:HL["/_next/static/chunks/00s_sac~t0ps5.css","style"]
|
||||||
|
0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"/_not-found","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"czEjVggXDRFH51IopN6_9"}
|
||||||
15
build_temp/.next/server/app/_not-found/page.js
Normal file
15
build_temp/.next/server/app/_not-found/page.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
var R=require("../../chunks/ssr/[turbopack]_runtime.js")("server/app/_not-found/page.js")
|
||||||
|
R.c("server/chunks/ssr/[root-of-the-server]__07-.vk-._.js")
|
||||||
|
R.c("server/chunks/ssr/node_modules_next_dist_060d1m.._.js")
|
||||||
|
R.c("server/chunks/ssr/node_modules_next_dist_0ixdcs~._.js")
|
||||||
|
R.c("server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0gw4z76.js")
|
||||||
|
R.c("server/chunks/ssr/[root-of-the-server]__0.m8mql._.js")
|
||||||
|
R.c("server/chunks/ssr/[root-of-the-server]__0.angw.._.js")
|
||||||
|
R.c("server/chunks/ssr/node_modules_next_dist_compiled_@opentelemetry_api_index_0zv0b3p.js")
|
||||||
|
R.c("server/chunks/ssr/[root-of-the-server]__0btml7h._.js")
|
||||||
|
R.c("server/chunks/ssr/node_modules_next_dist_client_components_0inhx6q._.js")
|
||||||
|
R.c("server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0ghu-f7.js")
|
||||||
|
R.c("server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0cjv-23.js")
|
||||||
|
R.c("server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0eq97pa.js")
|
||||||
|
R.m(37047)
|
||||||
|
module.exports=R.m(37047).exports
|
||||||
5
build_temp/.next/server/app/_not-found/page.js.map
Normal file
5
build_temp/.next/server/app/_not-found/page.js.map
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": [],
|
||||||
|
"sections": []
|
||||||
|
}
|
||||||
1
build_temp/.next/server/app/_not-found/page.js.nft.json
Normal file
1
build_temp/.next/server/app/_not-found/page.js.nft.json
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user