@nxgt/material-vue 0.22.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- package/dist/{Button-pivhf0dI.js → Button-DcFHQ3oH.js} +2 -2
- package/dist/{DropdownMenuTrigger-CN8_B7pW.js → DropdownMenuTrigger-BHAhXGUO.js} +1 -1
- package/dist/{HoverCardTrigger-yygLSc07.js → HoverCardTrigger-D99aHKDX.js} +56 -85
- package/dist/{_Uint8Array-DT-6Im9e.js → _Uint8Array-2hFHkjYD.js} +20 -20
- package/dist/{_baseIsEqual-DO9tjdtt.js → _baseIsEqual-BUD8VQJE.js} +22 -22
- package/dist/{_defineProperty-BlaaM_1a.js → _defineProperty-C606G0Re.js} +2 -2
- package/dist/{_initCloneObject-BSldCT0L.js → _initCloneObject-D3WSYU-D.js} +15 -15
- package/dist/{abnfDiagram-O67JEVCF-Cl_I9xuI.js → abnfDiagram-O67JEVCF-zi427H-1.js} +8 -8
- package/dist/{arc-DNNg1pxp.js → arc-BVFnqPx6.js} +3 -3
- package/dist/architecture-7GRP2DOG-CMg7-eYj.js +3 -0
- package/dist/{architectureDiagram-NJMV4G6O-CVS4UUCi.js → architectureDiagram-NJMV4G6O-HNmyjC6R.js} +11 -11
- package/dist/{blockDiagram-BEXU5L5S-BsSbtJ0q.js → blockDiagram-BEXU5L5S-TXcaNPiA.js} +18 -18
- package/dist/{c4Diagram-YGBWAQC7-B6jKsl3h.js → c4Diagram-YGBWAQC7-DB1KwkmW.js} +10 -10
- package/dist/{camera-DquOJeHc.js → camera-G80plUZO.js} +11 -11
- package/dist/channel-B8wKCSzH.js +5 -0
- package/dist/{chunk-2Q5K7J3B-kzxEEeTu.js → chunk-2Q5K7J3B-C1pX24ft.js} +2 -2
- package/dist/{chunk-3FUC2YCW-BjAQA8CW.js → chunk-3FUC2YCW-Bw4AJEzl.js} +11 -11
- package/dist/{chunk-5DYCD2WN-B9vjeX2u.js → chunk-5DYCD2WN-4BDKWc4g.js} +5 -5
- package/dist/{chunk-5VM5RSS4-Cr17nBXp.js → chunk-5VM5RSS4-BFskf6Qk.js} +2 -2
- package/dist/{chunk-6AEJRKK7-D9IaQdwq.js → chunk-6AEJRKK7-D1W4b1Ir.js} +4 -4
- package/dist/{chunk-742MDFTN-BIhVe9GR.js → chunk-742MDFTN-Bh_u1X2k.js} +14 -14
- package/dist/{chunk-7INBJB4K-CwPgdc2G.js → chunk-7INBJB4K-OheKRjIZ.js} +10 -10
- package/dist/{chunk-7M6MHVWA-B6VDnhvE.js → chunk-7M6MHVWA-wgE1MsQ9.js} +14 -14
- package/dist/{chunk-7PRAP22T-CofnNOEr.js → chunk-7PRAP22T-CZmOrCLD.js} +3 -3
- package/dist/{chunk-DUW6YSOI-BdOla2G8.js → chunk-DUW6YSOI-9R-v-IIp.js} +2 -2
- package/dist/{chunk-FOHPRMQF-Crq0JMf2.js → chunk-FOHPRMQF-DBc3Omt0.js} +1 -1
- package/dist/{chunk-GNY47TPC-c_sooZ3L.js → chunk-GNY47TPC-BByCj-tp.js} +14 -14
- package/dist/{chunk-GTNCS2PH-BR0O70z_.js → chunk-GTNCS2PH--PxF9Mrf.js} +5 -5
- package/dist/{chunk-GWA4HPMP-DU9lUCZD.js → chunk-GWA4HPMP-hjyItnXu.js} +5 -5
- package/dist/{chunk-J5ZVWO5B-CYzz6Pq8.js → chunk-J5ZVWO5B-DmRRmhon.js} +2 -2
- package/dist/{chunk-JWPE2WC7-Ccb0QaC8.js → chunk-JWPE2WC7-BGVSGRTC.js} +2 -2
- package/dist/{chunk-LNGE3PJU-CiGrDO_F.js → chunk-LNGE3PJU-DJjGTS7O.js} +2 -2
- package/dist/{chunk-MBY4JIJT-HYVRUG_P.js → chunk-MBY4JIJT-ODeZ1ugd.js} +8 -8
- package/dist/{chunk-NETBCI7D-C8amwD_P.js → chunk-NETBCI7D-B_M68PfO.js} +3 -3
- package/dist/{chunk-O7XYJQB3-WMQqqzRb.js → chunk-O7XYJQB3-BDucxjeL.js} +5 -5
- package/dist/{chunk-UA2S7LBM-DtBatid7.js → chunk-UA2S7LBM-DN55-gzN.js} +10 -10
- package/dist/{chunk-WEXAMYUT-Cc10h8ed.js → chunk-WEXAMYUT-DufdZ2tS.js} +4 -4
- package/dist/{chunk-XXDRQBXY-B2pGFcse.js → chunk-XXDRQBXY-B9ckANit.js} +3 -3
- package/dist/{chunk-Y2CYZVJY-i11wjrBe.js → chunk-Y2CYZVJY-BAad7w_K.js} +1 -1
- package/dist/{chunk-Z7XXMR3K-CJmsOGTV.js → chunk-Z7XXMR3K-DdnrI6vA.js} +11 -11
- package/dist/{chunk-ZIGJFQKS-DBdWb0bj.js → chunk-ZIGJFQKS-JoSqKBE3.js} +44 -44
- package/dist/{classDiagram-v2-NBCMYWYE-BTeb-Duf.js → classDiagram-v2-NBCMYWYE-LDc3yyTu.js} +18 -18
- package/dist/{cloneDeep-Gp-zHISG.js → cloneDeep-Cv9TF8j3.js} +20 -20
- package/dist/{components-Bwxq-DLd.js → components-D3nLHMxx.js} +9731 -9766
- package/dist/components.js +8 -11
- package/dist/composables.js +13 -13
- package/dist/{cose-bilkent-JH36ORCC-DStMi-eo.js → cose-bilkent-JH36ORCC-DMu3MtOq.js} +4 -4
- package/dist/cynefin-OW5HDTMX-BGe4AjUw.js +3 -0
- package/dist/{cynefinDiagram-VND7K2PF-0Mq0e5NQ.js → cynefinDiagram-VND7K2PF-D5sBaWLI.js} +8 -8
- package/dist/{cytoscape.esm-_jXi1N4y.js → cytoscape.esm-DXVRLXF3.js} +1 -1
- package/dist/{dagre-6A5THRUB-DjL-7QUw.js → dagre-6A5THRUB-CCigPI-W.js} +91 -91
- package/dist/{defaultLocale-DnzPsei5.js → defaultLocale-DQ8-aLi9.js} +12 -12
- package/dist/{diagram-22UHCM2B-BZRVXHfN.js → diagram-22UHCM2B-vav-BOss.js} +20 -20
- package/dist/{diagram-3UASUU5V-BznCZHss.js → diagram-3UASUU5V-CqXTP2Mz.js} +33 -33
- package/dist/{diagram-ATOU4E4O-DtIUxSAn.js → diagram-ATOU4E4O-Cgp2M2t6.js} +8 -8
- package/dist/{diagram-CDSNMT55-DOjN3BR2.js → diagram-CDSNMT55-Cn6ZdED_.js} +10 -10
- package/dist/{diagram-MLGK6HIB-Dx2UboD6.js → diagram-MLGK6HIB-BRXHWpn7.js} +8 -8
- package/dist/{diagram-MPIPVDR6-DnPL3RV0.js → diagram-MPIPVDR6-bi_zEJWx.js} +8 -8
- package/dist/{dist-D9zvfe2i.js → dist-Dt_YNX2O.js} +2 -2
- package/dist/dnd.js +1 -1
- package/dist/{ebnfDiagram-ZINNZB2B-BNbxCL0b.js → ebnfDiagram-ZINNZB2B-C5aSFX4G.js} +8 -8
- package/dist/{elk-276RUBZZ-Dk9afnNr.js → elk-276RUBZZ-BJJUfdzz.js} +14 -14
- package/dist/{erDiagram-OPXOYQCR-CbcJosNF.js → erDiagram-OPXOYQCR-BV3UGLoQ.js} +17 -17
- package/dist/{es-BuwtGDrj.js → es-DHDGcYW_.js} +8 -8
- package/dist/eventmodeling-NTZA5JFV-38h1xeNf.js +3 -0
- package/dist/flowDiagram-KWPJA3E3-B3AfwLQk.js +17 -0
- package/dist/{ganttDiagram-FUAMR5RP-64EZDDmC.js → ganttDiagram-FUAMR5RP-Vt6mFjaq.js} +28 -28
- package/dist/{get-Bo6bWpt-.js → get-CTzJAwfc.js} +47 -47
- package/dist/gitGraph-4MIJSDKK-C-5NH3Jx.js +3 -0
- package/dist/{gitGraphDiagram-X574FWY7-DmMMrp5A.js → gitGraphDiagram-X574FWY7-CE4Fp_CC.js} +8 -8
- package/dist/{graphlib-rFZlNaRl.js → graphlib-DQVPat8q.js} +42 -42
- package/dist/i18n.js +3 -3
- package/dist/{icon-button-BLvgnEFO.js → icon-button-DnjboAtZ.js} +2 -2
- package/dist/{image-cropper-canvas-BBPB5AKG.js → image-cropper-canvas-HzYWblQm.js} +436 -429
- package/dist/info-A6RAGUB7-DTwpNebQ.js +3 -0
- package/dist/{infoDiagram-VRGFBTTK-XlBUAu0t.js → infoDiagram-VRGFBTTK-Ct4AP_ux.js} +6 -6
- package/dist/{init-MwSGRDIl.js → init-O6p85zx5.js} +1 -1
- package/dist/{isArrayLikeObject-BEv42rW5.js → isArrayLikeObject-Bs4bzQBR.js} +12 -12
- package/dist/{isEmpty-B1knfyUj.js → isEmpty-Cx_InbyF.js} +5 -5
- package/dist/{ishikawaDiagram-OU5B5YK6-C9cMWMPO.js → ishikawaDiagram-OU5B5YK6-Dw6IQYtd.js} +7 -7
- package/dist/{journeyDiagram-ZHPQQLJL-DXdfP9BW.js → journeyDiagram-ZHPQQLJL-BGCDYlgK.js} +7 -7
- package/dist/{kanban-definition-PNTS6WVX-DhOBy3A0.js → kanban-definition-PNTS6WVX-BkzhtlFU.js} +14 -14
- package/dist/{katex-BMQ6LGsM.js → katex-BLTzjTha.js} +1 -1
- package/dist/lib/components/ui/media/pdf-viewer/index.d.ts +9 -9
- package/dist/lib/components/ui/media/pdf-viewer/partials/pdf-page-list.vue.d.ts +1 -1
- package/dist/lib/components/ui/media/pdf-viewer/partials/pdf-page.vue.d.ts +1 -1
- package/dist/lib/components/ui/media/pdf-viewer/partials/pdf-reader-body.vue.d.ts +2 -2
- package/dist/lib/components/ui/media/pdf-viewer/partials/pdf-sidebar.vue.d.ts +1 -1
- package/dist/lib/components/ui/media/pdf-viewer/partials/pdf-thumbnail-sidebar.vue.d.ts +1 -1
- package/dist/lib/components/ui/media/pdf-viewer/pdf-text-layer.d.ts +1 -1
- package/dist/lib/components/ui/media/pdf-viewer/types.d.ts +3 -3
- package/dist/lib/components/ui/media/pdf-viewer/use-pdf-document-search.d.ts +1 -1
- package/dist/lib/components/ui/media/pdf-viewer/use-pdf-document.d.ts +2 -2
- package/dist/lib/components/ui/media/pdf-viewer/use-pdf-file-actions.d.ts +1 -1
- package/dist/lib/components/ui/media/pdf-viewer/use-pdf-page-area.d.ts +1 -1
- package/dist/lib/components/ui/media/pdf-viewer/use-pdf-reader.d.ts +1 -1
- package/dist/lib/components/ui/media/pdf-viewer/use-pdf-search-hits.d.ts +1 -2
- package/dist/lib/composables/use-formatters.d.ts +1 -1
- package/dist/lib/lib/print-format.utils.d.ts +7 -57
- package/dist/lib/nuxt/module.d.ts +3 -1
- package/dist/lib/nuxt/pdf-fonts.d.ts +30 -1
- package/dist/lib/pdf/index.d.ts +7 -7
- package/dist/lib/pdf/output.d.ts +2 -2
- package/dist/lib/pdf/pdf-download-action.d.ts +1 -1
- package/dist/lib/pdf/renderer.d.ts +2 -2
- package/dist/lib/pdf/renderer.lazy.d.ts +1 -1
- package/dist/lib/pdf/use-pdf.d.ts +1 -1
- package/dist/lib/vite/index.d.ts +5 -64
- package/dist/lib.js +15 -16
- package/dist/{line-UP6dkL36.js → line-CAYWvrRN.js} +4 -4
- package/dist/{linear-bD_QoED_.js → linear-CobEklb6.js} +23 -23
- package/dist/main.js +15 -18
- package/dist/map.js +5 -5
- package/dist/{merge-Cdqy5M_E.js → merge-BzRhCAF6.js} +13 -13
- package/dist/{mermaid-parser.core-Cz-MfB4Z.js → mermaid-parser.core-BXD_TD1T.js} +32 -32
- package/dist/{mermaid.core-BJPK8qYI.js → mermaid.core-B2ydTQ4X.js} +59 -59
- package/dist/{mindmap-definition-NLK3R4M7-Dqo7INQ9.js → mindmap-definition-NLK3R4M7-DCb99I7s.js} +18 -18
- package/dist/{number.utils-B19BYzc_.js → number.utils-Cy1z6qI7.js} +47 -47
- package/dist/{ordinal-D_ZgubzR.js → ordinal-BCmOO3Sy.js} +3 -3
- package/dist/packet-AYTQ26CC-Cc2sGaDY.js +3 -0
- package/dist/{path-DGNPZRdx.js → path-3-p5y-N7.js} +3 -3
- package/dist/{pdf-D_G-uiri.js → pdf-MkmivNXn.js} +1 -1
- package/dist/{pdf-outline-sidebar-BVRKziX3.js → pdf-outline-sidebar-DycVwjfJ.js} +3 -3
- package/dist/pdf-page-CHfDMJ_4.js +255 -0
- package/dist/{pdf-page-list-Cy6S2VCO.js → pdf-page-list-Cy3Qgm2N.js} +2 -2
- package/dist/pdf-reader-D8CFeq1E.js +603 -0
- package/dist/{pdf-sidebar-DoGyXFtw.js → pdf-sidebar-D4BpuyNy.js} +4 -4
- package/dist/{pdf-thumbnail-sidebar-DmayzCN2.js → pdf-thumbnail-sidebar-Cl9o8zQp.js} +4 -4
- package/dist/{pdf-toolbar-CZqa7bbp.js → pdf-toolbar-Cj_fCmo3.js} +6 -6
- package/dist/pdf.js +72 -363
- package/dist/{pdf.worker.min-DRpqlnXj.js → pdf.worker.min-ByGJNiUH.js} +1 -1
- package/dist/{pegDiagram-GJSIUBJH-gvsGke9W.js → pegDiagram-GJSIUBJH-C27MdQV_.js} +8 -8
- package/dist/pie-WAS4IAKB-Qm7ZL20Y.js +3 -0
- package/dist/{pieDiagram-5QR66LMP-DLBcErnI.js → pieDiagram-5QR66LMP-B_7CzTL0.js} +15 -15
- package/dist/{client-only.utils-KvNbU5SA.js → print-format.utils-DwJfU1tK.js} +40 -39
- package/dist/{quadrantDiagram-O4NWA36T-Bn3CmGxM.js → quadrantDiagram-O4NWA36T-D84Ta5MW.js} +5 -5
- package/dist/radar-RG4KPBEZ-TQ0zaqCR.js +3 -0
- package/dist/railroad-74A4TZTK-bk-BYNub.js +3 -0
- package/dist/railroad-abnf-HS5TGJTU-Bdw25bd-.js +3 -0
- package/dist/railroad-ebnf-LZEXJU2U-DiFjNUyt.js +3 -0
- package/dist/railroad-peg-WCYAUIDC-xf3JLr_Y.js +3 -0
- package/dist/{railroadDiagram-XR7U4H2S-DLeBxWbV.js → railroadDiagram-XR7U4H2S-Cw5CuVpF.js} +8 -8
- package/dist/renderer.lazy-DCZLnjCM.js +10 -0
- package/dist/{requirementDiagram-PLB6GJNP-Kk5ubF7h.js → requirementDiagram-PLB6GJNP-DnkvMOW6.js} +16 -16
- package/dist/{rough.esm-rcMoXTJj.js → rough.esm-Cvc79rxE.js} +1 -1
- package/dist/{sankeyDiagram-IPEJSGJF-a4rFl5rR.js → sankeyDiagram-IPEJSGJF-jmnYqtty.js} +19 -19
- package/dist/{sequenceDiagram-PO4LG4MO-CjUigcL2.js → sequenceDiagram-PO4LG4MO-KN-jz2e0.js} +9 -9
- package/dist/{sizeCapture-INFHLROL-CHXIsPO_.js → sizeCapture-INFHLROL-C_032szM.js} +2 -2
- package/dist/{sortable-provider-DWSOOfI1.js → sortable-provider-CxI3cMbb.js} +3 -3
- package/dist/{src-CNRY2AUH.js → src-Pe71xVTz.js} +87 -87
- package/dist/{stateDiagram-v2-GCMORJYK-CrmN5l-3.js → stateDiagram-v2-GCMORJYK-BCh7NZQn.js} +17 -17
- package/dist/{stx-player-3Z0wuORy.js → stx-player-CpzcZSMq.js} +3 -3
- package/dist/{swimlanes-2SLR337P-BkQTH51J.js → swimlanes-2SLR337P-BKV0Xke-.js} +14 -14
- package/dist/swimlanesDiagram-TC7HE7FX-D4-k5-iq.js +28 -0
- package/dist/{timeline-definition-EJHVYXUP-C0aHlt9K.js → timeline-definition-EJHVYXUP-BSBcDEzP.js} +8 -8
- package/dist/{intl-messageformat-C5e1ivyL.js → translator-BJPRdlc8.js} +171 -137
- package/dist/treeView-Q6P3EWNA-Dyk8HSag.js +3 -0
- package/dist/treemap-WGGIJYW6-CHrhBv7m.js +3 -0
- package/dist/{use-heading-spy-ByCrZQBk.js → use-heading-spy-xe2FFmGU.js} +2 -2
- package/dist/{use-material-translation-ClPGTJaN.js → use-material-translation-gr5V24w5.js} +1 -1
- package/dist/{usecaseDiagram-POWQR4AR-B1FgJuU5.js → usecaseDiagram-POWQR4AR-Bi5we59l.js} +403 -403
- package/dist/{utils-Cy-ByIEo.js → utils-CykWQ0iJ.js} +2 -2
- package/dist/{vennDiagram-UO4OBE2U-B22Jhju8.js → vennDiagram-UO4OBE2U-DC4GDZLl.js} +8 -8
- package/dist/vite.js +1 -17
- package/dist/wardley-WFR3VGLG-DnLHjx6k.js +3 -0
- package/dist/{wardleyDiagram-VNRHLVJA-Dw4YgRiQ.js → wardleyDiagram-VNRHLVJA-CZHdSrpN.js} +8 -8
- package/dist/{xychartDiagram-PMCCYNJV-DtuDs9I7.js → xychartDiagram-PMCCYNJV-CYfbQA4q.js} +14 -14
- package/docs/getting-started.md +24 -1
- package/docs/guides/pdf.md +10 -3
- package/docs/guides/ssr.md +7 -1
- package/docs/roadmap.md +9 -0
- package/docs/troubleshooting.md +81 -3
- package/lib/nuxt/module.ts +23 -6
- package/lib/nuxt/pdf-fonts.ts +101 -1
- package/lib/vite/index.ts +5 -125
- package/package.json +7 -10
- package/dist/architecture-7GRP2DOG-DDr0RGVC.js +0 -3
- package/dist/channel-BA1GJyZ7.js +0 -5
- package/dist/cynefin-OW5HDTMX-B8HVdZhp.js +0 -3
- package/dist/eventmodeling-NTZA5JFV-C1CEo-26.js +0 -3
- package/dist/flowDiagram-KWPJA3E3-Da1NFRX5.js +0 -17
- package/dist/gitGraph-4MIJSDKK-BTeCS_5q.js +0 -3
- package/dist/info-A6RAGUB7-BvtuPd9C.js +0 -3
- package/dist/lib/components/ui/fields/currency-field/currency-digits.d.ts +0 -7
- package/dist/lib/components/ui/forms/field-blur-layers.d.ts +0 -34
- package/dist/lib/components/ui/media/pdf-viewer/pdf-document-search.d.ts +0 -44
- package/dist/lib/components/ui/media/pdf-viewer/pdf-escape.d.ts +0 -6
- package/dist/lib/components/ui/media/pdf-viewer/pdf-page-geometry.d.ts +0 -57
- package/dist/lib/components/ui/media/pdf-viewer/pdf-page-sizes.d.ts +0 -37
- package/dist/lib/components/ui/media/pdf-viewer/pdf-scroll-spy.d.ts +0 -42
- package/dist/lib/components/ui/media/pdf-viewer/pdf-text-search.d.ts +0 -25
- package/dist/lib/lib/pdf-download.d.ts +0 -35
- package/dist/lib/lib/pdf-file-name.d.ts +0 -9
- package/dist/lib/lib/pdf-source.d.ts +0 -57
- package/dist/lib/lib/print-fraction-digits.d.ts +0 -12
- package/dist/lib/lib/print-table.utils.d.ts +0 -60
- package/dist/lib/lib/print-value.utils.d.ts +0 -40
- package/dist/lib/pdf-core/file-loader.d.ts +0 -18
- package/dist/lib/pdf-core/http.d.ts +0 -22
- package/dist/lib/pdf-core/index.d.ts +0 -11
- package/dist/lib/pdf-core/model/builders.d.ts +0 -54
- package/dist/lib/pdf-core/model/data-table.d.ts +0 -24
- package/dist/lib/pdf-core/model/index.d.ts +0 -4
- package/dist/lib/pdf-core/model/nodes.d.ts +0 -133
- package/dist/lib/pdf-core/model/theme.d.ts +0 -16
- package/dist/lib/pdf-core/model/types.d.ts +0 -108
- package/dist/lib/pdf-core/render/context.d.ts +0 -50
- package/dist/lib/pdf-core/render/document.d.ts +0 -21
- package/dist/lib/pdf-core/render/index.d.ts +0 -5
- package/dist/lib/pdf-core/render/nodes/blocks.d.ts +0 -19
- package/dist/lib/pdf-core/render/nodes/header.d.ts +0 -14
- package/dist/lib/pdf-core/render/nodes/layout.d.ts +0 -44
- package/dist/lib/pdf-core/render/nodes/table.d.ts +0 -14
- package/dist/lib/pdf-core/render/page.d.ts +0 -30
- package/dist/lib/pdf-core/render/render-node.d.ts +0 -10
- package/dist/lib/pdf-core/render/styles.d.ts +0 -303
- package/dist/packet-AYTQ26CC-CshIswP8.js +0 -3
- package/dist/pdf-download-WnIo-5y5.js +0 -94
- package/dist/pdf-page-CIJOEX08.js +0 -317
- package/dist/pdf-page-geometry-DXA9Duo_.js +0 -61
- package/dist/pdf-reader-DDLWi_kg.js +0 -745
- package/dist/pdf-source-CLguNN1r.js +0 -61
- package/dist/pie-WAS4IAKB-CYs22y4X.js +0 -3
- package/dist/print-format.utils-Cvgc3Mov.js +0 -56
- package/dist/radar-RG4KPBEZ-BOJKjbGv.js +0 -3
- package/dist/railroad-74A4TZTK-Dt1BmUkI.js +0 -3
- package/dist/railroad-abnf-HS5TGJTU-Cs9GMUMY.js +0 -3
- package/dist/railroad-ebnf-LZEXJU2U-D4y0fXoW.js +0 -3
- package/dist/railroad-peg-WCYAUIDC-D2f_ZNR5.js +0 -3
- package/dist/renderer.lazy-CSZ6JIRd.js +0 -686
- package/dist/swimlanesDiagram-TC7HE7FX-BMfUzAWu.js +0 -28
- package/dist/translator-000Eza6E.js +0 -39
- package/dist/treeView-Q6P3EWNA-BrJylG9N.js +0 -3
- package/dist/treemap-WGGIJYW6-DpIZuqbj.js +0 -3
- package/dist/wardley-WFR3VGLG-CbwdAAbH.js +0 -3
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { PrintValue } from './print-value.utils';
|
|
2
|
-
export type PrintColumnFormat = 'amount' | 'date' | 'number' | 'percent';
|
|
3
|
-
/** How a column reads its value: a key of the row, or an accessor. */
|
|
4
|
-
export type PrintColumnSource<T> = {
|
|
5
|
-
key: keyof T & string;
|
|
6
|
-
id?: string;
|
|
7
|
-
} | {
|
|
8
|
-
id: string;
|
|
9
|
-
accessor: (row: T, index: number) => unknown;
|
|
10
|
-
};
|
|
11
|
-
export type PrintColumn<T> = PrintColumnSource<T> & {
|
|
12
|
-
label: string;
|
|
13
|
-
/** Points, or a percentage of the table (`'25%'`); otherwise it flexes. */
|
|
14
|
-
width?: number | `${number}%`;
|
|
15
|
-
/** Share of the remaining width; 1 by default. */
|
|
16
|
-
flex?: number;
|
|
17
|
-
/** `'right'` by default for amounts, numbers and percentages. */
|
|
18
|
-
align?: 'left' | 'center' | 'right';
|
|
19
|
-
/** How to print the value; a function returns the text itself. */
|
|
20
|
-
format?: PrintColumnFormat | ((value: unknown, row: T) => string);
|
|
21
|
-
/** ISO 4217 code for `format: 'amount'`, or one per row. */
|
|
22
|
-
currency?: string | ((row: T) => string | null | undefined);
|
|
23
|
-
/** A footer total: the sum of the column, or your own figure. */
|
|
24
|
-
total?: 'sum' | ((rows: T[]) => number | string | null);
|
|
25
|
-
};
|
|
26
|
-
export type PrintTableOptions = {
|
|
27
|
-
/** Currency of `amount` columns that name none. */
|
|
28
|
-
currency?: string;
|
|
29
|
-
/** Text in the first footer cell when that column has no total. */
|
|
30
|
-
totalLabel?: string;
|
|
31
|
-
};
|
|
32
|
-
export type ResolvedPrintColumn = {
|
|
33
|
-
id: string;
|
|
34
|
-
label: string;
|
|
35
|
-
align: 'left' | 'center' | 'right';
|
|
36
|
-
width?: number | `${number}%`;
|
|
37
|
-
flex?: number;
|
|
38
|
-
};
|
|
39
|
-
export type ResolvedPrintTable = {
|
|
40
|
-
columns: ResolvedPrintColumn[];
|
|
41
|
-
rows: PrintValue[][];
|
|
42
|
-
/** One totals row, or none when no column has a `total`. */
|
|
43
|
-
footer: PrintValue[][];
|
|
44
|
-
empty: boolean;
|
|
45
|
-
};
|
|
46
|
-
/** Types a column list, so `key` is checked against the row type. */
|
|
47
|
-
export declare function definePrintColumns<T>(columns: PrintColumn<T>[]): PrintColumn<T>[];
|
|
48
|
-
/** A column's value as a {@link PrintValue}, ready for the renderer. */
|
|
49
|
-
export declare function toPrintValue<T>(column: PrintColumn<T>, value: unknown, row: T | undefined, options?: PrintTableOptions): PrintValue;
|
|
50
|
-
/**
|
|
51
|
-
* Columns, cells and totals of a printed table. A footer row is added when a
|
|
52
|
-
* column has a `total`; its first cell, when that column has none, holds
|
|
53
|
-
* `totalLabel`.
|
|
54
|
-
*/
|
|
55
|
-
export declare function resolvePrintTable<T>(columns: PrintColumn<T>[], rows: T[], options?: PrintTableOptions): ResolvedPrintTable;
|
|
56
|
-
/** Label and value pairs for one row: a detail block from the same columns. */
|
|
57
|
-
export declare function resolvePrintFields<T>(fields: PrintColumn<T>[], row: T, options?: PrintTableOptions): {
|
|
58
|
-
label: string;
|
|
59
|
-
value: PrintValue;
|
|
60
|
-
}[];
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export type PrintAmountValue = {
|
|
2
|
-
amount: number | null;
|
|
3
|
-
/** ISO 4217 code, such as `'EUR'`. Without one, a plain decimal. */
|
|
4
|
-
currency?: string | null;
|
|
5
|
-
/** Decimals to show; defaults to the currency's own. */
|
|
6
|
-
fractionDigits?: number;
|
|
7
|
-
};
|
|
8
|
-
export type PrintDateValue = {
|
|
9
|
-
/** `'2026-03-01'`, an ISO date-time or epoch milliseconds. */
|
|
10
|
-
date: string | number | null;
|
|
11
|
-
dateStyle?: 'full' | 'long' | 'medium' | 'short';
|
|
12
|
-
timeStyle?: 'full' | 'long' | 'medium' | 'short';
|
|
13
|
-
};
|
|
14
|
-
export type PrintNumberValue = {
|
|
15
|
-
number: number | null;
|
|
16
|
-
/** `'percent'` shows `0.2` as `20%`. */
|
|
17
|
-
style?: 'decimal' | 'percent';
|
|
18
|
-
/** Maximum decimals; defaults to 3 (0 for a percentage). */
|
|
19
|
-
fractionDigits?: number;
|
|
20
|
-
};
|
|
21
|
-
/** Text, a number, or an amount, date or number formatted when rendered. */
|
|
22
|
-
export type PrintValue = string | number | null | undefined | PrintAmountValue | PrintDateValue | PrintNumberValue;
|
|
23
|
-
export type PrintValueOptions = {
|
|
24
|
-
/** BCP 47 locale, such as `'fr-FR'`. Defaults to the runtime's locale. */
|
|
25
|
-
locale?: string;
|
|
26
|
-
/** IANA time zone for dates with a time. */
|
|
27
|
-
timeZone?: string;
|
|
28
|
-
/** What an empty value shows; `'—'` by default. */
|
|
29
|
-
empty?: string;
|
|
30
|
-
};
|
|
31
|
-
/** Whether a value is empty: `null`, `undefined`, `''` or an empty wrapper. */
|
|
32
|
-
export declare function isEmptyPrintValue(value: PrintValue): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Formats a {@link PrintValue} as the text a document prints. An empty value
|
|
35
|
-
* gives `options.empty` (`'—'`).
|
|
36
|
-
*
|
|
37
|
-
* @example formatPrintValue({ amount: 1234.5, currency: 'EUR' }, { locale: 'fr-FR' }) // '1 234,50 €'
|
|
38
|
-
* @example formatPrintValue({ number: 0.2, style: 'percent' }, { locale: 'en-US' }) // '20%'
|
|
39
|
-
*/
|
|
40
|
-
export declare function formatPrintValue(value: PrintValue, options?: PrintValueOptions): string;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export type PdfFileSnapshot = {
|
|
2
|
-
blob: Blob | null;
|
|
3
|
-
/** An object URL of `blob`, for an `<iframe>`, a `PdfReader` or a link. */
|
|
4
|
-
url: string | null;
|
|
5
|
-
loading: boolean;
|
|
6
|
-
error: Error | null;
|
|
7
|
-
};
|
|
8
|
-
export declare const IDLE_PDF_FILE: PdfFileSnapshot;
|
|
9
|
-
/**
|
|
10
|
-
* What `usePdfFile` (React) and `usePdf` (Vue) run, framework-free: renders a
|
|
11
|
-
* document with `render`, keeps one object URL alive at a time and revokes it
|
|
12
|
-
* when replaced or disposed, and drops the result of a render that a newer
|
|
13
|
-
* `load` (or `dispose`) overtook.
|
|
14
|
-
*/
|
|
15
|
-
export declare function createPdfFileLoader<I, O = undefined>(onChange: (snapshot: PdfFileSnapshot) => void, render: (input: I, options?: O) => Promise<Blob>): {
|
|
16
|
-
load(input: I | null, options?: O): Promise<void>;
|
|
17
|
-
dispose(): void;
|
|
18
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Serving a rendered PDF, framework-free: the headers of a response and a
|
|
3
|
-
* Web stream over react-pdf's Node stream. No `node:*` import, so a browser
|
|
4
|
-
* bundle stays clean.
|
|
5
|
-
*/
|
|
6
|
-
export type PdfResponseOptions = {
|
|
7
|
-
/** Name of the file; `.pdf` is added when missing. `document.pdf` by default. */
|
|
8
|
-
fileName?: string;
|
|
9
|
-
/** `'inline'` shows it in the browser; `'attachment'` (default) saves it. */
|
|
10
|
-
disposition?: 'inline' | 'attachment';
|
|
11
|
-
/** More headers, such as `Cache-Control`. */
|
|
12
|
-
headers?: HeadersInit;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* `Content-Disposition` with an ASCII `filename` every client reads and a
|
|
16
|
-
* UTF-8 `filename*` for the rest (RFC 6266).
|
|
17
|
-
*/
|
|
18
|
-
export declare function contentDisposition(disposition: 'inline' | 'attachment', fileName: string): string;
|
|
19
|
-
/** A Web `Response` carrying PDF bytes, with type, length and file name. */
|
|
20
|
-
export declare function pdfBytesResponse(bytes: Uint8Array<ArrayBuffer>, options?: PdfResponseOptions): Response;
|
|
21
|
-
/** A Web `ReadableStream` over an async iterable of chunks (react-pdf's stream). */
|
|
22
|
-
export declare function toWebStream(source: AsyncIterable<Uint8Array | string>): ReadableStream<Uint8Array>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The document model and its react-pdf renderer, shared by
|
|
3
|
-
* `@nxgt/material/print` and `@nxgt/material-vue/pdf`.
|
|
4
|
-
*
|
|
5
|
-
* `model/` is plain data and imports nothing from React. `render/` imports
|
|
6
|
-
* `react` and `@react-pdf/renderer` — optional peers in both libraries — so
|
|
7
|
-
* it is reached from the print (React) and pdf (Vue) entries only, never from
|
|
8
|
-
* a barrel: `scripts/verify-ssr-safe.ts` fails the build otherwise.
|
|
9
|
-
*/
|
|
10
|
-
export * from './model';
|
|
11
|
-
export * from './render';
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { PdfDocument, PdfInline, PdfNode, PdfPage, PrintValue } from './types';
|
|
2
|
-
type NodeOf<T extends PdfNode['type']> = Extract<PdfNode, {
|
|
3
|
-
type: T;
|
|
4
|
-
}>;
|
|
5
|
-
type Options<T extends PdfNode['type'], K extends string = never> = Omit<NodeOf<T>, 'type' | K>;
|
|
6
|
-
export declare const text: (content: string | PdfInline[], options?: Omit<Options<"text">, "content">) => NodeOf<"text">;
|
|
7
|
-
export declare const heading: (text: string, level?: 1 | 2 | 3) => NodeOf<"heading">;
|
|
8
|
-
export declare const stack: (children: PdfNode[], options?: Omit<Options<"stack">, "children">) => NodeOf<"stack">;
|
|
9
|
-
export declare const row: (children: PdfNode[], options?: Omit<Options<"row">, "children">) => NodeOf<"row">;
|
|
10
|
-
export declare const section: (title: string, children: PdfNode[]) => NodeOf<"section">;
|
|
11
|
-
export declare const image: (src: string, options?: Omit<Options<"image">, "src">) => NodeOf<"image">;
|
|
12
|
-
export declare const link: (href: string, text: string) => NodeOf<"link">;
|
|
13
|
-
export declare const spacer: (size: number) => NodeOf<"spacer">;
|
|
14
|
-
export declare const divider: () => NodeOf<"divider">;
|
|
15
|
-
export declare const pageBreak: () => NodeOf<"pageBreak">;
|
|
16
|
-
export declare const table: (options: Options<"table">) => NodeOf<"table">;
|
|
17
|
-
export declare const keyValue: (items: {
|
|
18
|
-
label: string;
|
|
19
|
-
value: PrintValue;
|
|
20
|
-
}[], options?: Omit<Options<"keyValue">, "items">) => NodeOf<"keyValue">;
|
|
21
|
-
export declare const totals: (rows: NodeOf<"totals">["rows"]) => NodeOf<"totals">;
|
|
22
|
-
export declare const metric: (options: Options<"metric">) => NodeOf<"metric">;
|
|
23
|
-
export declare const badge: (text: string, color?: string) => NodeOf<"badge">;
|
|
24
|
-
export declare const header: (options: Options<"header">) => NodeOf<"header">;
|
|
25
|
-
export declare const pageNumber: (options?: Options<"pageNumber">) => NodeOf<"pageNumber">;
|
|
26
|
-
export declare const page: (options: PdfPage) => PdfPage;
|
|
27
|
-
/** A whole document; `version` is stamped for you. */
|
|
28
|
-
export declare const pdfDocument: (options: Omit<PdfDocument, "version">) => PdfDocument;
|
|
29
|
-
/**
|
|
30
|
-
* What `definePdfDocument` accepts: a function from your data (and more
|
|
31
|
-
* parameters, if you like) to a document without its `version`. A method
|
|
32
|
-
* signature, so that its parameters are checked both ways: an annotated
|
|
33
|
-
* `(inv: Invoice)` fits, while an unannotated first parameter is typed
|
|
34
|
-
* `unknown` (use it only after narrowing) and a later one with a default
|
|
35
|
-
* (`language = 'en'`) takes its type from the default.
|
|
36
|
-
*/
|
|
37
|
-
type PdfTemplate = {
|
|
38
|
-
build(data: unknown, ...rest: never[]): Omit<PdfDocument, 'version'>;
|
|
39
|
-
}['build'];
|
|
40
|
-
/**
|
|
41
|
-
* Types a template: a function from your data to a document. It returns the
|
|
42
|
-
* function unchanged, stamping `version` on what it builds. Annotate the
|
|
43
|
-
* data parameter; the others may have defaults (`language = 'en'`). Left
|
|
44
|
-
* unannotated, the data is `unknown`, so reading a property of it fails to
|
|
45
|
-
* compile in the template rather than where the template is called.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* const invoicePdf = definePdfDocument((inv: Invoice, language = 'en') => ({
|
|
49
|
-
* language,
|
|
50
|
-
* pages: [page({ pageNumbers: true, body: [heading(inv.number)] })],
|
|
51
|
-
* }));
|
|
52
|
-
*/
|
|
53
|
-
export declare function definePdfDocument<F extends PdfTemplate>(build: F): (...args: Parameters<F>) => PdfDocument;
|
|
54
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { PrintColumn, PrintTableOptions } from '../../lib/print-table.utils';
|
|
2
|
-
import { PdfNode } from './types';
|
|
3
|
-
type TableNode = Extract<PdfNode, {
|
|
4
|
-
type: 'table';
|
|
5
|
-
}>;
|
|
6
|
-
type KeyValueNode = Extract<PdfNode, {
|
|
7
|
-
type: 'keyValue';
|
|
8
|
-
}>;
|
|
9
|
-
export type DataTableOptions = PrintTableOptions & Pick<TableNode, 'striped' | 'repeatHeader' | 'keepRowsWhole' | 'emptyText' | 'hideWhenEmpty'>;
|
|
10
|
-
/**
|
|
11
|
-
* A `table` node from column definitions and plain rows — the model twin of
|
|
12
|
-
* `PrintDataTable`. Without `totalLabel`, the totals row reads "Total" in the
|
|
13
|
-
* document's language.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* dataTable(definePrintColumns<Line>([
|
|
17
|
-
* { key: 'item', label: 'Item', flex: 3 },
|
|
18
|
-
* { key: 'amount', label: 'Amount', format: 'amount', total: 'sum' },
|
|
19
|
-
* ]), invoice.lines, { currency: 'EUR' })
|
|
20
|
-
*/
|
|
21
|
-
export declare function dataTable<T>(columns: PrintColumn<T>[], rows: T[], options?: DataTableOptions): TableNode;
|
|
22
|
-
/** A `keyValue` node from one row, read through column definitions. */
|
|
23
|
-
export declare function keyValueOf<T>(fields: PrintColumn<T>[], data: T, options?: Pick<PrintTableOptions, 'currency'> & Pick<KeyValueNode, 'columns' | 'keepEmpty'>): KeyValueNode;
|
|
24
|
-
export {};
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { PdfAlign, PdfColor, PdfJsonValue, PdfStyle, PrintValue } from './types';
|
|
2
|
-
export type PdfInline = string | {
|
|
3
|
-
text: string;
|
|
4
|
-
bold?: boolean;
|
|
5
|
-
italic?: boolean;
|
|
6
|
-
color?: PdfColor;
|
|
7
|
-
href?: string;
|
|
8
|
-
};
|
|
9
|
-
export type PdfTableColumn = {
|
|
10
|
-
label: string;
|
|
11
|
-
align?: PdfAlign;
|
|
12
|
-
/** Points, or a percentage of the table (`'25%'`); otherwise it flexes. */
|
|
13
|
-
width?: number | `${number}%`;
|
|
14
|
-
/** Share of the remaining width; 1 by default. */
|
|
15
|
-
flex?: number;
|
|
16
|
-
};
|
|
17
|
-
export type PdfNode = {
|
|
18
|
-
type: 'stack';
|
|
19
|
-
children: PdfNode[];
|
|
20
|
-
gap?: number;
|
|
21
|
-
style?: PdfStyle;
|
|
22
|
-
} | {
|
|
23
|
-
type: 'row';
|
|
24
|
-
children: PdfNode[];
|
|
25
|
-
gap?: number;
|
|
26
|
-
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
27
|
-
justify?: 'start' | 'center' | 'end' | 'between';
|
|
28
|
-
style?: PdfStyle;
|
|
29
|
-
} | {
|
|
30
|
-
type: 'text';
|
|
31
|
-
content: string | PdfInline[];
|
|
32
|
-
variant?: 'body' | 'muted' | 'caption' | 'label';
|
|
33
|
-
style?: PdfStyle;
|
|
34
|
-
} | {
|
|
35
|
-
type: 'heading';
|
|
36
|
-
text: string;
|
|
37
|
-
level?: 1 | 2 | 3;
|
|
38
|
-
} | {
|
|
39
|
-
type: 'section';
|
|
40
|
-
title: string;
|
|
41
|
-
children: PdfNode[];
|
|
42
|
-
} | {
|
|
43
|
-
type: 'image';
|
|
44
|
-
/** A URL or a data URL; PNG or JPEG. */
|
|
45
|
-
src: string;
|
|
46
|
-
width?: number;
|
|
47
|
-
height?: number;
|
|
48
|
-
fit?: 'contain' | 'cover';
|
|
49
|
-
} | {
|
|
50
|
-
type: 'link';
|
|
51
|
-
href: string;
|
|
52
|
-
text: string;
|
|
53
|
-
} | {
|
|
54
|
-
type: 'spacer';
|
|
55
|
-
size: number;
|
|
56
|
-
} | {
|
|
57
|
-
type: 'divider';
|
|
58
|
-
} | {
|
|
59
|
-
type: 'pageBreak';
|
|
60
|
-
} | {
|
|
61
|
-
type: 'table';
|
|
62
|
-
columns: PdfTableColumn[];
|
|
63
|
-
rows: PrintValue[][];
|
|
64
|
-
/** Rows after the body, such as totals; kept together. */
|
|
65
|
-
footer?: PrintValue[][];
|
|
66
|
-
/** An empty first cell of a footer row reads "Total", translated. */
|
|
67
|
-
labelTotals?: boolean;
|
|
68
|
-
/** Zebra rows; `true` by default. */
|
|
69
|
-
striped?: boolean;
|
|
70
|
-
/** The header again at the top of each page; `true` by default. */
|
|
71
|
-
repeatHeader?: boolean;
|
|
72
|
-
/** A row never splits across pages; `true` by default. */
|
|
73
|
-
keepRowsWhole?: boolean;
|
|
74
|
-
/** Shown in one muted row when there are no rows. */
|
|
75
|
-
emptyText?: string;
|
|
76
|
-
/** Render nothing, not even the header, when there are no rows. */
|
|
77
|
-
hideWhenEmpty?: boolean;
|
|
78
|
-
} | {
|
|
79
|
-
type: 'keyValue';
|
|
80
|
-
items: {
|
|
81
|
-
label: string;
|
|
82
|
-
value: PrintValue;
|
|
83
|
-
}[];
|
|
84
|
-
/** 1 or 2 columns of pairs; 1 by default. */
|
|
85
|
-
columns?: 1 | 2;
|
|
86
|
-
/** Print a pair whose value is empty, as `'—'`. */
|
|
87
|
-
keepEmpty?: boolean;
|
|
88
|
-
} | {
|
|
89
|
-
type: 'totals';
|
|
90
|
-
rows: {
|
|
91
|
-
label: string;
|
|
92
|
-
value: PrintValue;
|
|
93
|
-
emphasis?: boolean;
|
|
94
|
-
}[];
|
|
95
|
-
} | {
|
|
96
|
-
type: 'metric';
|
|
97
|
-
label: string;
|
|
98
|
-
value: PrintValue;
|
|
99
|
-
hint?: string;
|
|
100
|
-
/** A change in percent, shown as `+4%` or `-2%`. */
|
|
101
|
-
delta?: number;
|
|
102
|
-
} | {
|
|
103
|
-
type: 'badge';
|
|
104
|
-
text: string;
|
|
105
|
-
color?: PdfColor;
|
|
106
|
-
} | {
|
|
107
|
-
type: 'header';
|
|
108
|
-
title: string;
|
|
109
|
-
subtitle?: string;
|
|
110
|
-
reference?: string;
|
|
111
|
-
/** Printed before `reference`; `'#'` by default. */
|
|
112
|
-
referencePrefix?: string;
|
|
113
|
-
/** A URL or a data URL, PNG or JPEG. */
|
|
114
|
-
logo?: string | {
|
|
115
|
-
src: string;
|
|
116
|
-
width?: number;
|
|
117
|
-
height?: number;
|
|
118
|
-
};
|
|
119
|
-
/** Shown in the logo box when there is no `logo`. */
|
|
120
|
-
logoText?: string;
|
|
121
|
-
/** A QR code already rendered as a PNG data URL. */
|
|
122
|
-
qrDataUrl?: string | null;
|
|
123
|
-
} | {
|
|
124
|
-
type: 'pageNumber';
|
|
125
|
-
format?: 'page-of' | 'page';
|
|
126
|
-
align?: PdfAlign;
|
|
127
|
-
} | {
|
|
128
|
-
type: 'custom';
|
|
129
|
-
/** The renderer's name in the `custom` option. */
|
|
130
|
-
name: string;
|
|
131
|
-
props?: Record<string, PdfJsonValue>;
|
|
132
|
-
};
|
|
133
|
-
export type PdfNodeType = PdfNode['type'];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PdfColor, PdfThemeColor, PdfThemeOverrides } from './types';
|
|
2
|
-
export type PdfTheme = {
|
|
3
|
-
colors: Record<PdfThemeColor, string>;
|
|
4
|
-
fonts: Record<'sans' | 'serif' | 'mono', string>;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* The light screen theme, in colours react-pdf reads (it takes no oklch):
|
|
8
|
-
* `primary`, `secondary`, `muted`, `border` and `qrBg` are the screen's
|
|
9
|
-
* `--primary`, `--secondary`, `--muted-foreground`, `--border` and `--muted`.
|
|
10
|
-
* Fonts are PDF standard fonts, so nothing has to be registered.
|
|
11
|
-
*/
|
|
12
|
-
export declare const defaultPdfTheme: PdfTheme;
|
|
13
|
-
/** The default theme with `overrides` applied. */
|
|
14
|
-
export declare function resolvePdfTheme(overrides?: PdfThemeOverrides): PdfTheme;
|
|
15
|
-
/** A theme colour name resolved to its value; any other colour as it is. */
|
|
16
|
-
export declare function resolvePdfColor(color: PdfColor | undefined, theme: PdfTheme): string | undefined;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { PrintValue } from '../../lib/print-value.utils';
|
|
2
|
-
import { PdfNode } from './nodes';
|
|
3
|
-
export type * from './nodes';
|
|
4
|
-
export type { PrintValue };
|
|
5
|
-
/** A theme colour name (`'primary'`, `'muted'`, …) or a CSS colour (`'#0b7a4b'`). */
|
|
6
|
-
export type PdfColor = PdfThemeColor | (string & {});
|
|
7
|
-
/** A JSON value: what a document may carry, so it survives `JSON.stringify`. */
|
|
8
|
-
export type PdfJsonValue = string | number | boolean | null | PdfJsonValue[] | {
|
|
9
|
-
[key: string]: PdfJsonValue;
|
|
10
|
-
};
|
|
11
|
-
/** A JSON-safe subset of react-pdf's style: numbers are points. */
|
|
12
|
-
export type PdfStyle = {
|
|
13
|
-
margin?: number;
|
|
14
|
-
marginTop?: number;
|
|
15
|
-
marginRight?: number;
|
|
16
|
-
marginBottom?: number;
|
|
17
|
-
marginLeft?: number;
|
|
18
|
-
padding?: number;
|
|
19
|
-
paddingTop?: number;
|
|
20
|
-
paddingRight?: number;
|
|
21
|
-
paddingBottom?: number;
|
|
22
|
-
paddingLeft?: number;
|
|
23
|
-
width?: number | string;
|
|
24
|
-
height?: number | string;
|
|
25
|
-
flex?: number;
|
|
26
|
-
gap?: number;
|
|
27
|
-
/** One of the theme's fonts; `'sans'` by default. */
|
|
28
|
-
fontFamily?: 'sans' | 'serif' | 'mono';
|
|
29
|
-
fontSize?: number;
|
|
30
|
-
fontWeight?: 'normal' | 'bold';
|
|
31
|
-
fontStyle?: 'normal' | 'italic';
|
|
32
|
-
textAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
33
|
-
color?: PdfColor;
|
|
34
|
-
backgroundColor?: PdfColor;
|
|
35
|
-
borderWidth?: number;
|
|
36
|
-
borderColor?: PdfColor;
|
|
37
|
-
borderRadius?: number;
|
|
38
|
-
};
|
|
39
|
-
/** Points on each side; `x` and `y` set both sides of an axis. */
|
|
40
|
-
export type PdfBox = {
|
|
41
|
-
top?: number;
|
|
42
|
-
right?: number;
|
|
43
|
-
bottom?: number;
|
|
44
|
-
left?: number;
|
|
45
|
-
x?: number;
|
|
46
|
-
y?: number;
|
|
47
|
-
};
|
|
48
|
-
export type PdfPageSize = 'A3' | 'A4' | 'A5' | 'LETTER' | 'LEGAL' | [number, number];
|
|
49
|
-
export type PdfAlign = 'left' | 'center' | 'right';
|
|
50
|
-
/** `true` prints "Page 2 of 5" centred at the bottom of every page. */
|
|
51
|
-
export type PdfPageNumbers = boolean | {
|
|
52
|
-
align?: PdfAlign;
|
|
53
|
-
format?: 'page-of' | 'page';
|
|
54
|
-
};
|
|
55
|
-
export type PdfWatermark = string | {
|
|
56
|
-
text: string;
|
|
57
|
-
/** 0 to 1; 0.08 by default. */
|
|
58
|
-
opacity?: number;
|
|
59
|
-
/** Degrees, counter-clockwise; 35 by default. */
|
|
60
|
-
angle?: number;
|
|
61
|
-
color?: PdfColor;
|
|
62
|
-
/** Points; 72 by default. */
|
|
63
|
-
fontSize?: number;
|
|
64
|
-
};
|
|
65
|
-
/** Document information, as PDF readers show it. */
|
|
66
|
-
export type PdfMeta = {
|
|
67
|
-
title?: string;
|
|
68
|
-
author?: string;
|
|
69
|
-
subject?: string;
|
|
70
|
-
keywords?: string;
|
|
71
|
-
creator?: string;
|
|
72
|
-
producer?: string;
|
|
73
|
-
};
|
|
74
|
-
/** Colours and fonts; every field is optional and falls back to the default. */
|
|
75
|
-
export type PdfThemeOverrides = {
|
|
76
|
-
colors?: Partial<Record<PdfThemeColor, string>>;
|
|
77
|
-
fonts?: Partial<Record<'sans' | 'serif' | 'mono', string>>;
|
|
78
|
-
};
|
|
79
|
-
export type PdfThemeColor = 'primary' | 'secondary' | 'text' | 'muted' | 'border' | 'headerBg' | 'headerText' | 'rowAlt' | 'logoBg' | 'qrBg' | 'success' | 'error';
|
|
80
|
-
/** The page shell: size, margins and what repeats on every page. */
|
|
81
|
-
export type PdfPageOptions = {
|
|
82
|
-
size?: PdfPageSize;
|
|
83
|
-
orientation?: 'portrait' | 'landscape';
|
|
84
|
-
/** Points; a number for every side. */
|
|
85
|
-
margins?: number | PdfBox;
|
|
86
|
-
/** Space kept at the bottom for the footer and page numbers; 24 by default. */
|
|
87
|
-
footerHeight?: number;
|
|
88
|
-
pageNumbers?: PdfPageNumbers;
|
|
89
|
-
watermark?: PdfWatermark;
|
|
90
|
-
};
|
|
91
|
-
export type PdfPage = PdfPageOptions & {
|
|
92
|
-
/** Repeated at the top of every page, in the flow. */
|
|
93
|
-
header?: PdfNode[];
|
|
94
|
-
/** Repeated at the bottom of every page. */
|
|
95
|
-
footer?: PdfNode[];
|
|
96
|
-
body: PdfNode[];
|
|
97
|
-
};
|
|
98
|
-
export type PdfDocument = {
|
|
99
|
-
version: 1;
|
|
100
|
-
meta?: PdfMeta;
|
|
101
|
-
/** Picks the built-in strings (`'en'`, `'fr'`) and the PDF's language. */
|
|
102
|
-
language?: string;
|
|
103
|
-
/** Formats amounts, dates and numbers; defaults to `language`. */
|
|
104
|
-
locale?: string;
|
|
105
|
-
timeZone?: string;
|
|
106
|
-
theme?: PdfThemeOverrides;
|
|
107
|
-
pages: PdfPage[];
|
|
108
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { PrintValue, PrintValueOptions } from '../../lib/print-value.utils';
|
|
3
|
-
import { PdfTheme } from '../model/theme';
|
|
4
|
-
import { PdfNode, PdfThemeOverrides } from '../model/types';
|
|
5
|
-
import { PdfStyles } from './styles';
|
|
6
|
-
/** Translates a built-in string: its key, English fallback and values. */
|
|
7
|
-
export type PdfTranslate = (key: string, fallback: string, values?: Record<string, string | number>) => string;
|
|
8
|
-
/** Renders a `{ type: 'custom' }` node registered under its `name`. */
|
|
9
|
-
export type PdfCustomRenderer = (props: Record<string, unknown>, context: PdfRenderContext) => ReactNode;
|
|
10
|
-
/**
|
|
11
|
-
* Everything a node renderer needs, resolved once per document. It is plain
|
|
12
|
-
* data and functions — never a hook — because react-pdf calls the `render`
|
|
13
|
-
* callbacks of page numbers and fixed elements at layout time, outside React,
|
|
14
|
-
* where a hook throws.
|
|
15
|
-
*/
|
|
16
|
-
export type PdfRenderContext = {
|
|
17
|
-
language: string;
|
|
18
|
-
locale?: string;
|
|
19
|
-
timeZone?: string;
|
|
20
|
-
theme: PdfTheme;
|
|
21
|
-
styles: PdfStyles;
|
|
22
|
-
t: PdfTranslate;
|
|
23
|
-
/**
|
|
24
|
-
* Formats a value with the document's locale and time zone, as text the
|
|
25
|
-
* standard fonts can print ({@link toPdfText}).
|
|
26
|
-
*/
|
|
27
|
-
format: (value: PrintValue, options?: Pick<PrintValueOptions, 'empty'>) => string;
|
|
28
|
-
/** Renders child nodes; set by `createPdfRenderContext`. */
|
|
29
|
-
renderNodes: (nodes: PdfNode[] | undefined) => ReactNode[];
|
|
30
|
-
custom: Record<string, PdfCustomRenderer>;
|
|
31
|
-
};
|
|
32
|
-
export type PdfRenderOptions = {
|
|
33
|
-
/** `'en'` or `'fr'` pick the built-in strings; `'en'` by default. */
|
|
34
|
-
language?: string;
|
|
35
|
-
/** Formats amounts and dates; defaults to `language`. */
|
|
36
|
-
locale?: string;
|
|
37
|
-
timeZone?: string;
|
|
38
|
-
theme?: PdfThemeOverrides;
|
|
39
|
-
/**
|
|
40
|
-
* Translates the built-in strings (`material.print.*` keys); without it,
|
|
41
|
-
* the English fallbacks are printed.
|
|
42
|
-
*/
|
|
43
|
-
translate?: PdfTranslate;
|
|
44
|
-
/** Renderers for `{ type: 'custom', name }` nodes. */
|
|
45
|
-
custom?: Record<string, PdfCustomRenderer>;
|
|
46
|
-
};
|
|
47
|
-
export declare const DEFAULT_PDF_LANGUAGE = "en";
|
|
48
|
-
/** Text with the characters the standard fonts lack replaced by ones they have. */
|
|
49
|
-
export declare function toPdfText(text: string): string;
|
|
50
|
-
export declare function createPdfRenderContext(options: PdfRenderOptions, renderNodes: (nodes: PdfNode[] | undefined, context: PdfRenderContext) => ReactNode[]): PdfRenderContext;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { DocumentProps } from '@react-pdf/renderer';
|
|
2
|
-
import { ReactElement, ReactNode } from 'react';
|
|
3
|
-
import { PdfDocument, PdfMeta } from '../model/types';
|
|
4
|
-
import { PdfRenderContext, PdfRenderOptions } from './context';
|
|
5
|
-
/** A render context for a document, or for blocks outside of one. */
|
|
6
|
-
export declare function createPdfContext(options?: PdfRenderOptions): PdfRenderContext;
|
|
7
|
-
export type PdfDocumentShellOptions = PdfMeta & {
|
|
8
|
-
/** Written to the PDF as its language, such as `'fr'`. */
|
|
9
|
-
language?: string;
|
|
10
|
-
};
|
|
11
|
-
/** The react-pdf `Document`: metadata and the pages. */
|
|
12
|
-
export declare function renderPdfDocumentShell(options: PdfDocumentShellOptions, pages: ReactNode[]): ReactElement<DocumentProps>;
|
|
13
|
-
export type RenderPdfElementOptions = Pick<PdfRenderOptions, 'translate' | 'custom'> & {
|
|
14
|
-
/** `creator` and `producer` when the document's `meta` names none. */
|
|
15
|
-
defaultCreator?: string;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Turns a model document into the react-pdf element tree that `pdf()`,
|
|
19
|
-
* `renderToBuffer()` or `PDFViewer` take.
|
|
20
|
-
*/
|
|
21
|
-
export declare function renderPdfElement(doc: PdfDocument, options?: RenderPdfElementOptions): ReactElement<DocumentProps>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Text, View } from '@react-pdf/renderer';
|
|
2
|
-
import { PdfNode } from '../../model/types';
|
|
3
|
-
import { PdfRenderContext } from '../context';
|
|
4
|
-
type NodeOf<T extends PdfNode['type']> = Extract<PdfNode, {
|
|
5
|
-
type: T;
|
|
6
|
-
}>;
|
|
7
|
-
/** Label and value pairs, in one or two columns; empty values are skipped. */
|
|
8
|
-
export declare function renderKeyValue(node: NodeOf<'keyValue'>, ctx: PdfRenderContext): import('react').CElement<import('react').PropsWithChildren<import('@react-pdf/renderer').ViewProps>, View> | null;
|
|
9
|
-
/** A right-aligned box of totals; an `emphasis` row is the dark last row. */
|
|
10
|
-
export declare function renderTotals(node: NodeOf<'totals'>, ctx: PdfRenderContext): import('react').CElement<import('react').PropsWithChildren<import('@react-pdf/renderer').ViewProps>, View>;
|
|
11
|
-
/** One figure with its label, an optional hint and change. */
|
|
12
|
-
export declare function renderMetric(node: NodeOf<'metric'>, ctx: PdfRenderContext): import('react').CElement<import('react').PropsWithChildren<import('@react-pdf/renderer').ViewProps>, View>;
|
|
13
|
-
export declare function renderBadge(node: NodeOf<'badge'>, ctx: PdfRenderContext): import('react').CElement<import('react').PropsWithChildren<import('@react-pdf/renderer').ViewProps>, View>;
|
|
14
|
-
/**
|
|
15
|
-
* "Page 2 of 5" (or "Page 2"), translated. react-pdf calls `render` at layout
|
|
16
|
-
* time, outside React, so it only uses what the context already resolved.
|
|
17
|
-
*/
|
|
18
|
-
export declare function renderPageNumber(node: NodeOf<'pageNumber'>, ctx: PdfRenderContext): import('react').CElement<import('react').PropsWithChildren<import('@react-pdf/renderer').TextProps> | import('@react-pdf/renderer').SVGTextProps, Text>;
|
|
19
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { View } from '@react-pdf/renderer';
|
|
2
|
-
import { PdfNode } from '../../model/types';
|
|
3
|
-
import { PdfRenderContext } from '../context';
|
|
4
|
-
type HeaderNode = Extract<PdfNode, {
|
|
5
|
-
type: 'header';
|
|
6
|
-
}>;
|
|
7
|
-
/**
|
|
8
|
-
* The title block: logo (an image, or `logoText` in a box) on the left, the
|
|
9
|
-
* title, subtitle and reference centred, a QR code on the right. A side with
|
|
10
|
-
* nothing to show keeps an empty box of the other side's width, so the title
|
|
11
|
-
* stays centred; with neither, the title is centred on the page.
|
|
12
|
-
*/
|
|
13
|
-
export declare function renderHeader(node: HeaderNode, ctx: PdfRenderContext): import('react').CElement<import('react').PropsWithChildren<import('@react-pdf/renderer').ViewProps>, View>;
|
|
14
|
-
export {};
|