@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.
Files changed (236) hide show
  1. package/README.md +15 -1
  2. package/dist/{Button-pivhf0dI.js → Button-DcFHQ3oH.js} +2 -2
  3. package/dist/{DropdownMenuTrigger-CN8_B7pW.js → DropdownMenuTrigger-BHAhXGUO.js} +1 -1
  4. package/dist/{HoverCardTrigger-yygLSc07.js → HoverCardTrigger-D99aHKDX.js} +56 -85
  5. package/dist/{_Uint8Array-DT-6Im9e.js → _Uint8Array-2hFHkjYD.js} +20 -20
  6. package/dist/{_baseIsEqual-DO9tjdtt.js → _baseIsEqual-BUD8VQJE.js} +22 -22
  7. package/dist/{_defineProperty-BlaaM_1a.js → _defineProperty-C606G0Re.js} +2 -2
  8. package/dist/{_initCloneObject-BSldCT0L.js → _initCloneObject-D3WSYU-D.js} +15 -15
  9. package/dist/{abnfDiagram-O67JEVCF-Cl_I9xuI.js → abnfDiagram-O67JEVCF-zi427H-1.js} +8 -8
  10. package/dist/{arc-DNNg1pxp.js → arc-BVFnqPx6.js} +3 -3
  11. package/dist/architecture-7GRP2DOG-CMg7-eYj.js +3 -0
  12. package/dist/{architectureDiagram-NJMV4G6O-CVS4UUCi.js → architectureDiagram-NJMV4G6O-HNmyjC6R.js} +11 -11
  13. package/dist/{blockDiagram-BEXU5L5S-BsSbtJ0q.js → blockDiagram-BEXU5L5S-TXcaNPiA.js} +18 -18
  14. package/dist/{c4Diagram-YGBWAQC7-B6jKsl3h.js → c4Diagram-YGBWAQC7-DB1KwkmW.js} +10 -10
  15. package/dist/{camera-DquOJeHc.js → camera-G80plUZO.js} +11 -11
  16. package/dist/channel-B8wKCSzH.js +5 -0
  17. package/dist/{chunk-2Q5K7J3B-kzxEEeTu.js → chunk-2Q5K7J3B-C1pX24ft.js} +2 -2
  18. package/dist/{chunk-3FUC2YCW-BjAQA8CW.js → chunk-3FUC2YCW-Bw4AJEzl.js} +11 -11
  19. package/dist/{chunk-5DYCD2WN-B9vjeX2u.js → chunk-5DYCD2WN-4BDKWc4g.js} +5 -5
  20. package/dist/{chunk-5VM5RSS4-Cr17nBXp.js → chunk-5VM5RSS4-BFskf6Qk.js} +2 -2
  21. package/dist/{chunk-6AEJRKK7-D9IaQdwq.js → chunk-6AEJRKK7-D1W4b1Ir.js} +4 -4
  22. package/dist/{chunk-742MDFTN-BIhVe9GR.js → chunk-742MDFTN-Bh_u1X2k.js} +14 -14
  23. package/dist/{chunk-7INBJB4K-CwPgdc2G.js → chunk-7INBJB4K-OheKRjIZ.js} +10 -10
  24. package/dist/{chunk-7M6MHVWA-B6VDnhvE.js → chunk-7M6MHVWA-wgE1MsQ9.js} +14 -14
  25. package/dist/{chunk-7PRAP22T-CofnNOEr.js → chunk-7PRAP22T-CZmOrCLD.js} +3 -3
  26. package/dist/{chunk-DUW6YSOI-BdOla2G8.js → chunk-DUW6YSOI-9R-v-IIp.js} +2 -2
  27. package/dist/{chunk-FOHPRMQF-Crq0JMf2.js → chunk-FOHPRMQF-DBc3Omt0.js} +1 -1
  28. package/dist/{chunk-GNY47TPC-c_sooZ3L.js → chunk-GNY47TPC-BByCj-tp.js} +14 -14
  29. package/dist/{chunk-GTNCS2PH-BR0O70z_.js → chunk-GTNCS2PH--PxF9Mrf.js} +5 -5
  30. package/dist/{chunk-GWA4HPMP-DU9lUCZD.js → chunk-GWA4HPMP-hjyItnXu.js} +5 -5
  31. package/dist/{chunk-J5ZVWO5B-CYzz6Pq8.js → chunk-J5ZVWO5B-DmRRmhon.js} +2 -2
  32. package/dist/{chunk-JWPE2WC7-Ccb0QaC8.js → chunk-JWPE2WC7-BGVSGRTC.js} +2 -2
  33. package/dist/{chunk-LNGE3PJU-CiGrDO_F.js → chunk-LNGE3PJU-DJjGTS7O.js} +2 -2
  34. package/dist/{chunk-MBY4JIJT-HYVRUG_P.js → chunk-MBY4JIJT-ODeZ1ugd.js} +8 -8
  35. package/dist/{chunk-NETBCI7D-C8amwD_P.js → chunk-NETBCI7D-B_M68PfO.js} +3 -3
  36. package/dist/{chunk-O7XYJQB3-WMQqqzRb.js → chunk-O7XYJQB3-BDucxjeL.js} +5 -5
  37. package/dist/{chunk-UA2S7LBM-DtBatid7.js → chunk-UA2S7LBM-DN55-gzN.js} +10 -10
  38. package/dist/{chunk-WEXAMYUT-Cc10h8ed.js → chunk-WEXAMYUT-DufdZ2tS.js} +4 -4
  39. package/dist/{chunk-XXDRQBXY-B2pGFcse.js → chunk-XXDRQBXY-B9ckANit.js} +3 -3
  40. package/dist/{chunk-Y2CYZVJY-i11wjrBe.js → chunk-Y2CYZVJY-BAad7w_K.js} +1 -1
  41. package/dist/{chunk-Z7XXMR3K-CJmsOGTV.js → chunk-Z7XXMR3K-DdnrI6vA.js} +11 -11
  42. package/dist/{chunk-ZIGJFQKS-DBdWb0bj.js → chunk-ZIGJFQKS-JoSqKBE3.js} +44 -44
  43. package/dist/{classDiagram-v2-NBCMYWYE-BTeb-Duf.js → classDiagram-v2-NBCMYWYE-LDc3yyTu.js} +18 -18
  44. package/dist/{cloneDeep-Gp-zHISG.js → cloneDeep-Cv9TF8j3.js} +20 -20
  45. package/dist/{components-Bwxq-DLd.js → components-D3nLHMxx.js} +9731 -9766
  46. package/dist/components.js +8 -11
  47. package/dist/composables.js +13 -13
  48. package/dist/{cose-bilkent-JH36ORCC-DStMi-eo.js → cose-bilkent-JH36ORCC-DMu3MtOq.js} +4 -4
  49. package/dist/cynefin-OW5HDTMX-BGe4AjUw.js +3 -0
  50. package/dist/{cynefinDiagram-VND7K2PF-0Mq0e5NQ.js → cynefinDiagram-VND7K2PF-D5sBaWLI.js} +8 -8
  51. package/dist/{cytoscape.esm-_jXi1N4y.js → cytoscape.esm-DXVRLXF3.js} +1 -1
  52. package/dist/{dagre-6A5THRUB-DjL-7QUw.js → dagre-6A5THRUB-CCigPI-W.js} +91 -91
  53. package/dist/{defaultLocale-DnzPsei5.js → defaultLocale-DQ8-aLi9.js} +12 -12
  54. package/dist/{diagram-22UHCM2B-BZRVXHfN.js → diagram-22UHCM2B-vav-BOss.js} +20 -20
  55. package/dist/{diagram-3UASUU5V-BznCZHss.js → diagram-3UASUU5V-CqXTP2Mz.js} +33 -33
  56. package/dist/{diagram-ATOU4E4O-DtIUxSAn.js → diagram-ATOU4E4O-Cgp2M2t6.js} +8 -8
  57. package/dist/{diagram-CDSNMT55-DOjN3BR2.js → diagram-CDSNMT55-Cn6ZdED_.js} +10 -10
  58. package/dist/{diagram-MLGK6HIB-Dx2UboD6.js → diagram-MLGK6HIB-BRXHWpn7.js} +8 -8
  59. package/dist/{diagram-MPIPVDR6-DnPL3RV0.js → diagram-MPIPVDR6-bi_zEJWx.js} +8 -8
  60. package/dist/{dist-D9zvfe2i.js → dist-Dt_YNX2O.js} +2 -2
  61. package/dist/dnd.js +1 -1
  62. package/dist/{ebnfDiagram-ZINNZB2B-BNbxCL0b.js → ebnfDiagram-ZINNZB2B-C5aSFX4G.js} +8 -8
  63. package/dist/{elk-276RUBZZ-Dk9afnNr.js → elk-276RUBZZ-BJJUfdzz.js} +14 -14
  64. package/dist/{erDiagram-OPXOYQCR-CbcJosNF.js → erDiagram-OPXOYQCR-BV3UGLoQ.js} +17 -17
  65. package/dist/{es-BuwtGDrj.js → es-DHDGcYW_.js} +8 -8
  66. package/dist/eventmodeling-NTZA5JFV-38h1xeNf.js +3 -0
  67. package/dist/flowDiagram-KWPJA3E3-B3AfwLQk.js +17 -0
  68. package/dist/{ganttDiagram-FUAMR5RP-64EZDDmC.js → ganttDiagram-FUAMR5RP-Vt6mFjaq.js} +28 -28
  69. package/dist/{get-Bo6bWpt-.js → get-CTzJAwfc.js} +47 -47
  70. package/dist/gitGraph-4MIJSDKK-C-5NH3Jx.js +3 -0
  71. package/dist/{gitGraphDiagram-X574FWY7-DmMMrp5A.js → gitGraphDiagram-X574FWY7-CE4Fp_CC.js} +8 -8
  72. package/dist/{graphlib-rFZlNaRl.js → graphlib-DQVPat8q.js} +42 -42
  73. package/dist/i18n.js +3 -3
  74. package/dist/{icon-button-BLvgnEFO.js → icon-button-DnjboAtZ.js} +2 -2
  75. package/dist/{image-cropper-canvas-BBPB5AKG.js → image-cropper-canvas-HzYWblQm.js} +436 -429
  76. package/dist/info-A6RAGUB7-DTwpNebQ.js +3 -0
  77. package/dist/{infoDiagram-VRGFBTTK-XlBUAu0t.js → infoDiagram-VRGFBTTK-Ct4AP_ux.js} +6 -6
  78. package/dist/{init-MwSGRDIl.js → init-O6p85zx5.js} +1 -1
  79. package/dist/{isArrayLikeObject-BEv42rW5.js → isArrayLikeObject-Bs4bzQBR.js} +12 -12
  80. package/dist/{isEmpty-B1knfyUj.js → isEmpty-Cx_InbyF.js} +5 -5
  81. package/dist/{ishikawaDiagram-OU5B5YK6-C9cMWMPO.js → ishikawaDiagram-OU5B5YK6-Dw6IQYtd.js} +7 -7
  82. package/dist/{journeyDiagram-ZHPQQLJL-DXdfP9BW.js → journeyDiagram-ZHPQQLJL-BGCDYlgK.js} +7 -7
  83. package/dist/{kanban-definition-PNTS6WVX-DhOBy3A0.js → kanban-definition-PNTS6WVX-BkzhtlFU.js} +14 -14
  84. package/dist/{katex-BMQ6LGsM.js → katex-BLTzjTha.js} +1 -1
  85. package/dist/lib/components/ui/media/pdf-viewer/index.d.ts +9 -9
  86. package/dist/lib/components/ui/media/pdf-viewer/partials/pdf-page-list.vue.d.ts +1 -1
  87. package/dist/lib/components/ui/media/pdf-viewer/partials/pdf-page.vue.d.ts +1 -1
  88. package/dist/lib/components/ui/media/pdf-viewer/partials/pdf-reader-body.vue.d.ts +2 -2
  89. package/dist/lib/components/ui/media/pdf-viewer/partials/pdf-sidebar.vue.d.ts +1 -1
  90. package/dist/lib/components/ui/media/pdf-viewer/partials/pdf-thumbnail-sidebar.vue.d.ts +1 -1
  91. package/dist/lib/components/ui/media/pdf-viewer/pdf-text-layer.d.ts +1 -1
  92. package/dist/lib/components/ui/media/pdf-viewer/types.d.ts +3 -3
  93. package/dist/lib/components/ui/media/pdf-viewer/use-pdf-document-search.d.ts +1 -1
  94. package/dist/lib/components/ui/media/pdf-viewer/use-pdf-document.d.ts +2 -2
  95. package/dist/lib/components/ui/media/pdf-viewer/use-pdf-file-actions.d.ts +1 -1
  96. package/dist/lib/components/ui/media/pdf-viewer/use-pdf-page-area.d.ts +1 -1
  97. package/dist/lib/components/ui/media/pdf-viewer/use-pdf-reader.d.ts +1 -1
  98. package/dist/lib/components/ui/media/pdf-viewer/use-pdf-search-hits.d.ts +1 -2
  99. package/dist/lib/composables/use-formatters.d.ts +1 -1
  100. package/dist/lib/lib/print-format.utils.d.ts +7 -57
  101. package/dist/lib/nuxt/module.d.ts +3 -1
  102. package/dist/lib/nuxt/pdf-fonts.d.ts +30 -1
  103. package/dist/lib/pdf/index.d.ts +7 -7
  104. package/dist/lib/pdf/output.d.ts +2 -2
  105. package/dist/lib/pdf/pdf-download-action.d.ts +1 -1
  106. package/dist/lib/pdf/renderer.d.ts +2 -2
  107. package/dist/lib/pdf/renderer.lazy.d.ts +1 -1
  108. package/dist/lib/pdf/use-pdf.d.ts +1 -1
  109. package/dist/lib/vite/index.d.ts +5 -64
  110. package/dist/lib.js +15 -16
  111. package/dist/{line-UP6dkL36.js → line-CAYWvrRN.js} +4 -4
  112. package/dist/{linear-bD_QoED_.js → linear-CobEklb6.js} +23 -23
  113. package/dist/main.js +15 -18
  114. package/dist/map.js +5 -5
  115. package/dist/{merge-Cdqy5M_E.js → merge-BzRhCAF6.js} +13 -13
  116. package/dist/{mermaid-parser.core-Cz-MfB4Z.js → mermaid-parser.core-BXD_TD1T.js} +32 -32
  117. package/dist/{mermaid.core-BJPK8qYI.js → mermaid.core-B2ydTQ4X.js} +59 -59
  118. package/dist/{mindmap-definition-NLK3R4M7-Dqo7INQ9.js → mindmap-definition-NLK3R4M7-DCb99I7s.js} +18 -18
  119. package/dist/{number.utils-B19BYzc_.js → number.utils-Cy1z6qI7.js} +47 -47
  120. package/dist/{ordinal-D_ZgubzR.js → ordinal-BCmOO3Sy.js} +3 -3
  121. package/dist/packet-AYTQ26CC-Cc2sGaDY.js +3 -0
  122. package/dist/{path-DGNPZRdx.js → path-3-p5y-N7.js} +3 -3
  123. package/dist/{pdf-D_G-uiri.js → pdf-MkmivNXn.js} +1 -1
  124. package/dist/{pdf-outline-sidebar-BVRKziX3.js → pdf-outline-sidebar-DycVwjfJ.js} +3 -3
  125. package/dist/pdf-page-CHfDMJ_4.js +255 -0
  126. package/dist/{pdf-page-list-Cy6S2VCO.js → pdf-page-list-Cy3Qgm2N.js} +2 -2
  127. package/dist/pdf-reader-D8CFeq1E.js +603 -0
  128. package/dist/{pdf-sidebar-DoGyXFtw.js → pdf-sidebar-D4BpuyNy.js} +4 -4
  129. package/dist/{pdf-thumbnail-sidebar-DmayzCN2.js → pdf-thumbnail-sidebar-Cl9o8zQp.js} +4 -4
  130. package/dist/{pdf-toolbar-CZqa7bbp.js → pdf-toolbar-Cj_fCmo3.js} +6 -6
  131. package/dist/pdf.js +72 -363
  132. package/dist/{pdf.worker.min-DRpqlnXj.js → pdf.worker.min-ByGJNiUH.js} +1 -1
  133. package/dist/{pegDiagram-GJSIUBJH-gvsGke9W.js → pegDiagram-GJSIUBJH-C27MdQV_.js} +8 -8
  134. package/dist/pie-WAS4IAKB-Qm7ZL20Y.js +3 -0
  135. package/dist/{pieDiagram-5QR66LMP-DLBcErnI.js → pieDiagram-5QR66LMP-B_7CzTL0.js} +15 -15
  136. package/dist/{client-only.utils-KvNbU5SA.js → print-format.utils-DwJfU1tK.js} +40 -39
  137. package/dist/{quadrantDiagram-O4NWA36T-Bn3CmGxM.js → quadrantDiagram-O4NWA36T-D84Ta5MW.js} +5 -5
  138. package/dist/radar-RG4KPBEZ-TQ0zaqCR.js +3 -0
  139. package/dist/railroad-74A4TZTK-bk-BYNub.js +3 -0
  140. package/dist/railroad-abnf-HS5TGJTU-Bdw25bd-.js +3 -0
  141. package/dist/railroad-ebnf-LZEXJU2U-DiFjNUyt.js +3 -0
  142. package/dist/railroad-peg-WCYAUIDC-xf3JLr_Y.js +3 -0
  143. package/dist/{railroadDiagram-XR7U4H2S-DLeBxWbV.js → railroadDiagram-XR7U4H2S-Cw5CuVpF.js} +8 -8
  144. package/dist/renderer.lazy-DCZLnjCM.js +10 -0
  145. package/dist/{requirementDiagram-PLB6GJNP-Kk5ubF7h.js → requirementDiagram-PLB6GJNP-DnkvMOW6.js} +16 -16
  146. package/dist/{rough.esm-rcMoXTJj.js → rough.esm-Cvc79rxE.js} +1 -1
  147. package/dist/{sankeyDiagram-IPEJSGJF-a4rFl5rR.js → sankeyDiagram-IPEJSGJF-jmnYqtty.js} +19 -19
  148. package/dist/{sequenceDiagram-PO4LG4MO-CjUigcL2.js → sequenceDiagram-PO4LG4MO-KN-jz2e0.js} +9 -9
  149. package/dist/{sizeCapture-INFHLROL-CHXIsPO_.js → sizeCapture-INFHLROL-C_032szM.js} +2 -2
  150. package/dist/{sortable-provider-DWSOOfI1.js → sortable-provider-CxI3cMbb.js} +3 -3
  151. package/dist/{src-CNRY2AUH.js → src-Pe71xVTz.js} +87 -87
  152. package/dist/{stateDiagram-v2-GCMORJYK-CrmN5l-3.js → stateDiagram-v2-GCMORJYK-BCh7NZQn.js} +17 -17
  153. package/dist/{stx-player-3Z0wuORy.js → stx-player-CpzcZSMq.js} +3 -3
  154. package/dist/{swimlanes-2SLR337P-BkQTH51J.js → swimlanes-2SLR337P-BKV0Xke-.js} +14 -14
  155. package/dist/swimlanesDiagram-TC7HE7FX-D4-k5-iq.js +28 -0
  156. package/dist/{timeline-definition-EJHVYXUP-C0aHlt9K.js → timeline-definition-EJHVYXUP-BSBcDEzP.js} +8 -8
  157. package/dist/{intl-messageformat-C5e1ivyL.js → translator-BJPRdlc8.js} +171 -137
  158. package/dist/treeView-Q6P3EWNA-Dyk8HSag.js +3 -0
  159. package/dist/treemap-WGGIJYW6-CHrhBv7m.js +3 -0
  160. package/dist/{use-heading-spy-ByCrZQBk.js → use-heading-spy-xe2FFmGU.js} +2 -2
  161. package/dist/{use-material-translation-ClPGTJaN.js → use-material-translation-gr5V24w5.js} +1 -1
  162. package/dist/{usecaseDiagram-POWQR4AR-B1FgJuU5.js → usecaseDiagram-POWQR4AR-Bi5we59l.js} +403 -403
  163. package/dist/{utils-Cy-ByIEo.js → utils-CykWQ0iJ.js} +2 -2
  164. package/dist/{vennDiagram-UO4OBE2U-B22Jhju8.js → vennDiagram-UO4OBE2U-DC4GDZLl.js} +8 -8
  165. package/dist/vite.js +1 -17
  166. package/dist/wardley-WFR3VGLG-DnLHjx6k.js +3 -0
  167. package/dist/{wardleyDiagram-VNRHLVJA-Dw4YgRiQ.js → wardleyDiagram-VNRHLVJA-CZHdSrpN.js} +8 -8
  168. package/dist/{xychartDiagram-PMCCYNJV-DtuDs9I7.js → xychartDiagram-PMCCYNJV-CYfbQA4q.js} +14 -14
  169. package/docs/getting-started.md +24 -1
  170. package/docs/guides/pdf.md +10 -3
  171. package/docs/guides/ssr.md +7 -1
  172. package/docs/roadmap.md +9 -0
  173. package/docs/troubleshooting.md +81 -3
  174. package/lib/nuxt/module.ts +23 -6
  175. package/lib/nuxt/pdf-fonts.ts +101 -1
  176. package/lib/vite/index.ts +5 -125
  177. package/package.json +7 -10
  178. package/dist/architecture-7GRP2DOG-DDr0RGVC.js +0 -3
  179. package/dist/channel-BA1GJyZ7.js +0 -5
  180. package/dist/cynefin-OW5HDTMX-B8HVdZhp.js +0 -3
  181. package/dist/eventmodeling-NTZA5JFV-C1CEo-26.js +0 -3
  182. package/dist/flowDiagram-KWPJA3E3-Da1NFRX5.js +0 -17
  183. package/dist/gitGraph-4MIJSDKK-BTeCS_5q.js +0 -3
  184. package/dist/info-A6RAGUB7-BvtuPd9C.js +0 -3
  185. package/dist/lib/components/ui/fields/currency-field/currency-digits.d.ts +0 -7
  186. package/dist/lib/components/ui/forms/field-blur-layers.d.ts +0 -34
  187. package/dist/lib/components/ui/media/pdf-viewer/pdf-document-search.d.ts +0 -44
  188. package/dist/lib/components/ui/media/pdf-viewer/pdf-escape.d.ts +0 -6
  189. package/dist/lib/components/ui/media/pdf-viewer/pdf-page-geometry.d.ts +0 -57
  190. package/dist/lib/components/ui/media/pdf-viewer/pdf-page-sizes.d.ts +0 -37
  191. package/dist/lib/components/ui/media/pdf-viewer/pdf-scroll-spy.d.ts +0 -42
  192. package/dist/lib/components/ui/media/pdf-viewer/pdf-text-search.d.ts +0 -25
  193. package/dist/lib/lib/pdf-download.d.ts +0 -35
  194. package/dist/lib/lib/pdf-file-name.d.ts +0 -9
  195. package/dist/lib/lib/pdf-source.d.ts +0 -57
  196. package/dist/lib/lib/print-fraction-digits.d.ts +0 -12
  197. package/dist/lib/lib/print-table.utils.d.ts +0 -60
  198. package/dist/lib/lib/print-value.utils.d.ts +0 -40
  199. package/dist/lib/pdf-core/file-loader.d.ts +0 -18
  200. package/dist/lib/pdf-core/http.d.ts +0 -22
  201. package/dist/lib/pdf-core/index.d.ts +0 -11
  202. package/dist/lib/pdf-core/model/builders.d.ts +0 -54
  203. package/dist/lib/pdf-core/model/data-table.d.ts +0 -24
  204. package/dist/lib/pdf-core/model/index.d.ts +0 -4
  205. package/dist/lib/pdf-core/model/nodes.d.ts +0 -133
  206. package/dist/lib/pdf-core/model/theme.d.ts +0 -16
  207. package/dist/lib/pdf-core/model/types.d.ts +0 -108
  208. package/dist/lib/pdf-core/render/context.d.ts +0 -50
  209. package/dist/lib/pdf-core/render/document.d.ts +0 -21
  210. package/dist/lib/pdf-core/render/index.d.ts +0 -5
  211. package/dist/lib/pdf-core/render/nodes/blocks.d.ts +0 -19
  212. package/dist/lib/pdf-core/render/nodes/header.d.ts +0 -14
  213. package/dist/lib/pdf-core/render/nodes/layout.d.ts +0 -44
  214. package/dist/lib/pdf-core/render/nodes/table.d.ts +0 -14
  215. package/dist/lib/pdf-core/render/page.d.ts +0 -30
  216. package/dist/lib/pdf-core/render/render-node.d.ts +0 -10
  217. package/dist/lib/pdf-core/render/styles.d.ts +0 -303
  218. package/dist/packet-AYTQ26CC-CshIswP8.js +0 -3
  219. package/dist/pdf-download-WnIo-5y5.js +0 -94
  220. package/dist/pdf-page-CIJOEX08.js +0 -317
  221. package/dist/pdf-page-geometry-DXA9Duo_.js +0 -61
  222. package/dist/pdf-reader-DDLWi_kg.js +0 -745
  223. package/dist/pdf-source-CLguNN1r.js +0 -61
  224. package/dist/pie-WAS4IAKB-CYs22y4X.js +0 -3
  225. package/dist/print-format.utils-Cvgc3Mov.js +0 -56
  226. package/dist/radar-RG4KPBEZ-BOJKjbGv.js +0 -3
  227. package/dist/railroad-74A4TZTK-Dt1BmUkI.js +0 -3
  228. package/dist/railroad-abnf-HS5TGJTU-Cs9GMUMY.js +0 -3
  229. package/dist/railroad-ebnf-LZEXJU2U-D4y0fXoW.js +0 -3
  230. package/dist/railroad-peg-WCYAUIDC-D2f_ZNR5.js +0 -3
  231. package/dist/renderer.lazy-CSZ6JIRd.js +0 -686
  232. package/dist/swimlanesDiagram-TC7HE7FX-BMfUzAWu.js +0 -28
  233. package/dist/translator-000Eza6E.js +0 -39
  234. package/dist/treeView-Q6P3EWNA-BrJylG9N.js +0 -3
  235. package/dist/treemap-WGGIJYW6-DpIZuqbj.js +0 -3
  236. package/dist/wardley-WFR3VGLG-CbwdAAbH.js +0 -3
package/lib/vite/index.ts CHANGED
@@ -1,127 +1,7 @@
1
- // Identical in @nxgt/material and @nxgt/material-vue: keep them in sync.
2
1
  /**
3
- * Build-time helpers for the apps that consume this library.
4
- *
5
- * This entry is the odd one out: everything else here runs in a browser or in
6
- * an SSR server, and the `/vite` entry is Node code that runs inside a
7
- * consumer's `vite.config.ts` (or a Nuxt app's Nitro build). It is here anyway
8
- * because the problem it solves is this package's to own — a consumer should
9
- * not have to rediscover it — and because there is exactly one copy of the fix
10
- * to maintain, shared by `@nxgt/material` and `@nxgt/material-vue`.
11
- *
12
- * It imports nothing at runtime: `Plugin` is a type, erased by the compiler, so
13
- * the built `dist/vite.js` has no dependency on `vite` at all.
2
+ * Build-time helpers for the apps that consume this library: Node code that
3
+ * runs inside a consumer's `vite.config.ts`. The one copy lives in
4
+ * `@nxgt/material-core/vite`, shared with the sister library; this entry keeps
5
+ * the subpath consumers already import. See `pdfkitStandardFonts` there.
14
6
  */
15
-
16
- import type { Plugin } from 'vite';
17
-
18
- /**
19
- * Bundles pdfkit's fourteen standard fonts instead of leaving them to a
20
- * `require` that cannot work in a bundle.
21
- *
22
- * **Only needed by an app that renders PDFs** (`@nxgt/material/print`, or
23
- * `@nxgt/material-vue/pdf`). No other entry reaches `@react-pdf/renderer`, so
24
- * an app that does not print never sees this at all.
25
- * If you do print, read on, because the failure is spectacular and silent until
26
- * production.
27
- *
28
- * Both are built on `@react-pdf/renderer`, which is built on
29
- * `pdfkit`, whose node build ends with:
30
- *
31
- * ```js
32
- * const require$1 = createRequire(import.meta.url);
33
- * registerStdFontLoaders({ Helvetica: () => require$1('#standard-fonts/Helvetica'), … });
34
- * ```
35
- *
36
- * `#standard-fonts/*` is a package-`imports` entry **private to pdfkit**, and
37
- * that is a RUNTIME call, not an import — so no bundler resolves it. Bundle
38
- * pdfkit into an SSR server (`ssr.noExternal`) and the literal survives into the
39
- * output, where `createRequire` is rooted at the build directory and the importer
40
- * is no longer inside pdfkit. The server then throws on **every request**,
41
- * `/health` included:
42
- *
43
- * ```
44
- * error: Cannot find module '#standard-fonts/Helvetica' from '…/build/app.js'
45
- * ```
46
- *
47
- * A compose healthcheck that fetches a route never goes healthy either, so the
48
- * container looks like it is failing to start rather than failing to serve.
49
- *
50
- * This plugin rewrites those calls into static imports of
51
- * `./standard-fonts/<name>.mjs`, so the font data lands in the bundle and the
52
- * server stays self-contained. Use it when the runtime image has **no
53
- * `node_modules`** — a single-file `bun build` artifact copied alone into the
54
- * image. When the image does keep `node_modules`, the lighter answer is to leave
55
- * the library external instead (`--external` it in the bundle step, and keep it
56
- * out of `ssr.noExternal`), which also keeps ~12 MB of
57
- * pdfkit out of the artifact. In Nuxt, `nxgtMaterial: { pdf: {
58
- * bundleStandardFonts: true } }` adds this plugin to the Nitro build.
59
- *
60
- * ```ts
61
- * // `@nxgt/material/vite` in a React app: the same function
62
- * import { pdfkitStandardFonts } from '@nxgt/material-vue/vite';
63
- *
64
- * export default defineConfig({
65
- * plugins: [pdfkitStandardFonts()],
66
- * ssr: { noExternal: ['@nxgt/material-vue'] },
67
- * });
68
- * ```
69
- *
70
- * Two things that look like fixes and are not:
71
- *
72
- * - **`resolve.alias`** mapping `#standard-fonts/` to `pdfkit/standard-fonts/`.
73
- * An alias rewrites specifiers the resolver is *asked* about; this one is a
74
- * string handed to `createRequire` at runtime, which the resolver never sees.
75
- * - **`--external pdfkit`**. It is a transitive dependency, so the runtime cannot
76
- * resolve it from the app's own directory: `Cannot find package 'pdfkit'`.
77
- *
78
- * The plugin throws if a `#standard-fonts/` reference survives the rewrite, so a
79
- * future pdfkit that changes the shape of those calls fails the build instead of
80
- * the first request.
81
- */
82
- export function pdfkitStandardFonts(): Plugin {
83
- /**
84
- * Any call whose only argument is that literal. Deliberately not pinned to
85
- * `require$1`, which is a name rollup generated for pdfkit's own build and is
86
- * free to change on any release — there is nothing else one can do with a
87
- * `#standard-fonts/*` specifier but require it.
88
- */
89
- const CALL = /[A-Za-z_$][\w$]*\(\s*(['"])#standard-fonts\/(\w+)\1\s*\)/g;
90
-
91
- return {
92
- name: 'nxgt-material:pdfkit-standard-fonts',
93
- enforce: 'pre',
94
- transform(code, id) {
95
- if (!id.includes('pdfkit') || !code.includes('#standard-fonts/')) {
96
- return null;
97
- }
98
-
99
- const fonts = new Set<string>();
100
- const out = code.replace(CALL, (_match, _quote, font: string) => {
101
- fonts.add(font);
102
- return `__stdFont_${font}`;
103
- });
104
-
105
- // Fail the build rather than ship a server that dies on its first
106
- // request: an unmatched occurrence means pdfkit changed the shape of
107
- // these calls, and the whole point of this plugin is that nothing
108
- // downstream notices the difference until runtime.
109
- if (out.includes('#standard-fonts/')) {
110
- this.error(
111
- `${id} still references '#standard-fonts/' after the transform — ` +
112
- 'pdfkit changed how it loads its standard fonts. See the doc ' +
113
- 'comment on pdfkitStandardFonts() in the /vite entry.',
114
- );
115
- }
116
-
117
- const imports = [...fonts]
118
- .map(
119
- (font) =>
120
- `import __stdFont_${font} from './standard-fonts/${font}.mjs';`,
121
- )
122
- .join('\n');
123
-
124
- return { code: `${imports}\n${out}`, map: null };
125
- },
126
- };
127
- }
7
+ export { pdfkitStandardFonts } from '@nxgt/material-core/vite';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material-vue",
3
- "version": "0.22.0",
3
+ "version": "0.23.1",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"
@@ -100,17 +100,15 @@
100
100
  "dev": "bun storybook",
101
101
  "generate:nuxt-names": "bun scripts/generate-nuxt-names.ts",
102
102
  "build": "bun run generate:nuxt-names && vue-tsc -b && vite build",
103
- "postbuild": "bun scripts/copy-styles.ts && bun run verify:ssr && bun run verify:dts",
103
+ "postbuild": "bun ../../scripts/copy-styles.ts && bun run verify:ssr && bun run verify:dts",
104
104
  "prepack": "bun run verify:dts",
105
105
  "storybook": "storybook dev -p 6006",
106
106
  "build-storybook": "storybook build",
107
107
  "test": "vitest run --project unit",
108
- "changeset": "changeset",
109
- "changeset:version": "changeset version",
110
- "changeset:publish": "bun run build && bun run scripts/publish.ts",
111
- "changeset:status": "changeset status --since=origin/develop",
108
+ "test:scripts": "bun test ./scripts/",
112
109
  "shadcn:add": "bunx --bun shadcn-vue@latest add",
113
110
  "tsc": "vue-tsc -b",
111
+ "typecheck": "vue-tsc -b",
114
112
  "check": "biome check --write",
115
113
  "format": "biome format --write",
116
114
  "lint": "biome lint --write",
@@ -120,6 +118,7 @@
120
118
  "docs:previews": "vitest run --project previews"
121
119
  },
122
120
  "dependencies": {
121
+ "@nxgt/material-core": "^0.1.1",
123
122
  "@floating-ui/dom": "^1.8.0",
124
123
  "@fortawesome/fontawesome-common-types": "7.3.1",
125
124
  "@lucide/vue": "^1.45.0",
@@ -177,10 +176,8 @@
177
176
  "zod": "^4.4.3"
178
177
  },
179
178
  "devDependencies": {
180
- "@biomejs/biome": "2.5.13",
181
- "@changesets/changelog-github": "^1.0.1",
182
- "@changesets/cli": "^3.0.1",
183
179
  "@chromatic-com/storybook": "^5.3.1",
180
+ "@nxgt/material-testing": "0.0.0",
184
181
  "@nxgt/playwright": "^0.1.0",
185
182
  "@react-pdf/renderer": "^4.9.0",
186
183
  "@storybook/addon-a11y": "10.6.0",
@@ -198,7 +195,7 @@
198
195
  "@types/qrcode": "^1.5.6",
199
196
  "@types/react": "^19.2.17",
200
197
  "@vitejs/plugin-vue": "^6.0.1",
201
- "@vitest/browser-playwright": "4.1.11",
198
+ "@vitest/browser-playwright": "4.1.10",
202
199
  "@vue-leaflet/vue-leaflet": "^0.10.1",
203
200
  "@vue/server-renderer": "^3.5.22",
204
201
  "ajv": "^8.20.0",
@@ -1,3 +0,0 @@
1
- import "./chunk-FOHPRMQF-Crq0JMf2.js";
2
- import { M as e } from "./mermaid-parser.core-Cz-MfB4Z.js";
3
- export { e as createArchitectureServices };
@@ -1,5 +0,0 @@
1
- import { ot as e, st as t } from "./chunk-O7XYJQB3-WMQqqzRb.js";
2
- //#region node_modules/khroma/dist/methods/channel.js
3
- var n = (n, r) => t.lang.round(e.parse(n)[r]);
4
- //#endregion
5
- export { n as t };
@@ -1,3 +0,0 @@
1
- import "./chunk-FOHPRMQF-Crq0JMf2.js";
2
- import { A as e } from "./mermaid-parser.core-Cz-MfB4Z.js";
3
- export { e as createCynefinServices };
@@ -1,3 +0,0 @@
1
- import "./chunk-FOHPRMQF-Crq0JMf2.js";
2
- import { O as e } from "./mermaid-parser.core-Cz-MfB4Z.js";
3
- export { e as createEventModelingServices };
@@ -1,17 +0,0 @@
1
- import "./src-CNRY2AUH.js";
2
- import "./chunk-O7XYJQB3-WMQqqzRb.js";
3
- import "./chunk-ZIGJFQKS-DBdWb0bj.js";
4
- import "./chunk-742MDFTN-BIhVe9GR.js";
5
- import "./chunk-MBY4JIJT-HYVRUG_P.js";
6
- import "./chunk-7PRAP22T-CofnNOEr.js";
7
- import "./chunk-7INBJB4K-CwPgdc2G.js";
8
- import "./chunk-5DYCD2WN-B9vjeX2u.js";
9
- import "./chunk-Z7XXMR3K-CJmsOGTV.js";
10
- import "./chunk-GWA4HPMP-DU9lUCZD.js";
11
- import "./chunk-XXDRQBXY-B2pGFcse.js";
12
- import "./chunk-WEXAMYUT-Cc10h8ed.js";
13
- import "./chunk-UA2S7LBM-DtBatid7.js";
14
- import "./chunk-GNY47TPC-c_sooZ3L.js";
15
- import "./chunk-LNGE3PJU-CiGrDO_F.js";
16
- import { n as e } from "./chunk-7M6MHVWA-B6VDnhvE.js";
17
- export { e as diagram };
@@ -1,3 +0,0 @@
1
- import "./chunk-FOHPRMQF-Crq0JMf2.js";
2
- import { E as e } from "./mermaid-parser.core-Cz-MfB4Z.js";
3
- export { e as createGitGraphServices };
@@ -1,3 +0,0 @@
1
- import "./chunk-FOHPRMQF-Crq0JMf2.js";
2
- import { w as e } from "./mermaid-parser.core-Cz-MfB4Z.js";
3
- export { e as createInfoServices };
@@ -1,7 +0,0 @@
1
- /**
2
- * The decimals `CurrencyField` shows: `fractionDigits` when given (0 to 20;
3
- * `NaN` or `Infinity` counts as not given), else the currency's own (ISO
4
- * 4217: JPY 0, EUR 2, KWD 3), else 2 for a code `Intl` does not know. The
5
- * same rule as `formatAmount` (`fractionDigitsOption`).
6
- */
7
- export declare function currencyFractionDigits(currency: string, fractionDigits?: number): number;
@@ -1,34 +0,0 @@
1
- /**
2
- * The top-level layer a node is in: its ancestor that is a child of `<body>`.
3
- * An overlay rendered into `<body>` (a popover, a listbox, a dialog) is a
4
- * layer of its own; the page is another. `null` for a node no longer in the
5
- * document.
6
- */
7
- export declare function layerOf(node: Node): Node | null;
8
- /** What a field knows about the layers of the page since focus entered it. */
9
- export type FieldLayers = {
10
- /** The layers of the page when focus entered the field. */
11
- before: Set<Node>;
12
- /** The layers the field itself is in (the page, or the sheet it is in). */
13
- home: Set<Node | null>;
14
- /** The layers focus reached since entering that are the field's overlays. */
15
- opened: Set<Node>;
16
- };
17
- /**
18
- * Who opened `layer`, going by the controls that name an element of it as
19
- * the popup they control (`aria-controls`, `aria-owns`), as a select, a
20
- * popover or a dialog trigger does:
21
- * - `'ours'`: a control of the field (inside `roots`), or a control inside
22
- * an overlay of the field — one focus already reached, or one mounted since
23
- * focus entered that nothing else opened (the field's dialog, which leaves
24
- * focus on the button that opened it, and the select inside it). Such a
25
- * layer is the field's even when it was mounted before focus entered the
26
- * field: a mouse-opened select mounts its list before its trigger has focus.
27
- * - `'theirs'`: only a control of something else — another field whose
28
- * overlay opened while focus was still here (a mouse-opened select, a
29
- * Safari button that takes no focus on click).
30
- * - `null`: nothing names it.
31
- * A control inside `layer` itself (a tab naming its panel) says nothing about
32
- * who opened it.
33
- */
34
- export declare function openerOf(roots: Element[], layers: FieldLayers, layer: Node, seen?: Set<Node>): 'ours' | 'theirs' | null;
@@ -1,44 +0,0 @@
1
- import { PdfPageText, PdfTextRange } from './pdf-text-search';
2
- /** Where a match sits: its page, and its rank among that page's matches. */
3
- export type PdfSearchHit = {
4
- page: number;
5
- hit: number;
6
- };
7
- type PdfTextSource = {
8
- numPages: number;
9
- getPage: (pageNumber: number) => Promise<{
10
- getTextContent: () => Promise<{
11
- items: readonly unknown[];
12
- }>;
13
- }>;
14
- };
15
- /** A page's text, read once per document. */
16
- export declare function loadPageText(pdf: PdfTextSource, pageNumber: number): Promise<PdfPageText>;
17
- /** A page the search has read: its text and the matches in it. */
18
- export type PdfPageMatches = {
19
- page: number;
20
- text: PdfPageText;
21
- matches: PdfTextRange[];
22
- };
23
- /**
24
- * Searches every page in order, drawn or not, and reports the pages read: the
25
- * first one at once, then `chunk` at a time. A report per page would have the
26
- * reader draw every page again after each one read, a quadratic first search.
27
- * Stops once `isCancelled` says so.
28
- */
29
- export declare function searchDocument(pdf: PdfTextSource, query: string, onPages: (pages: PdfPageMatches[]) => void, isCancelled?: () => boolean, chunk?: number): Promise<void>;
30
- /** Each page's text and matches, as far as the search has read. */
31
- export type PdfDocumentMatches = {
32
- texts: (PdfPageText | undefined)[];
33
- matches: PdfTextRange[][];
34
- };
35
- /** `found` with a batch of pages read, copied once for the whole batch. */
36
- export declare function withPageMatches(found: PdfDocumentMatches, pages: readonly PdfPageMatches[]): PdfDocumentMatches;
37
- /**
38
- * The rank `delta` away from `from`, wrapping; from none (-1), the first
39
- * match forward or the last one back.
40
- */
41
- export declare function stepHit(from: number, delta: number, count: number): number;
42
- /** The hit at a document-wide rank, from each page's match count. */
43
- export declare function hitAt(counts: readonly (number | undefined)[], index: number): PdfSearchHit | null;
44
- export {};
@@ -1,6 +0,0 @@
1
- export declare function escapeHtml(text: string): string;
2
- export declare function mapPdfOutline(items: unknown): {
3
- title: string;
4
- dest: unknown;
5
- items: ReturnType<typeof mapPdfOutline>;
6
- }[];
@@ -1,57 +0,0 @@
1
- import { FitMode } from './types';
2
- /**
3
- * A page's size in PDF points (1/72 inch), before any rotation, and the
4
- * rotation the page asks for itself (its `/Rotate`, in degrees clockwise).
5
- */
6
- export type PdfPageSize = {
7
- width: number;
8
- height: number;
9
- rotate?: number;
10
- };
11
- /** Used until a page's own size is known: US Letter. */
12
- export declare const DEFAULT_PAGE_SIZE: PdfPageSize;
13
- /**
14
- * The fit zoom fits the first pages only, the ones read when the document
15
- * opens: pages read later never move it. A wider page further on is shown at
16
- * that zoom (and scrolls sideways in fit width).
17
- */
18
- export declare const FIT_PAGES = 25;
19
- /** Room kept around the pages: the list's padding on each side. */
20
- export declare const PAGE_PADDING = 32;
21
- /**
22
- * The rotation a page is drawn at: its own `/Rotate` plus the reader's, from
23
- * 0 to 270. `undefined` while the page's own is not known and the reader adds
24
- * none, so the renderer keeps the page's. Once the reader turns the pages, a
25
- * page whose size is not read yet (past the first chunk) is drawn at the
26
- * reader's rotation alone until its size arrives, then drawn again.
27
- */
28
- export declare function pageRotation(size: PdfPageSize | undefined, rotation: number): number | undefined;
29
- /** The page's size on screen: turned by its own `/Rotate` and `rotation`. */
30
- export declare function rotatedSize(size: PdfPageSize, rotation: number): PdfPageSize;
31
- /**
32
- * The widest and the tallest of the known pages, rotated. Fitting on it keeps
33
- * every page inside the box with one scale, so the zoom does not jump while
34
- * scrolling from an A4 page to a landscape one.
35
- */
36
- export declare function largestPage(sizes: readonly (PdfPageSize | undefined)[], rotation: number): PdfPageSize;
37
- /**
38
- * The scale at which the largest page fits the box's width, or all of it,
39
- * within the reader's zoom range: a tiny page does not fit to 4000%.
40
- */
41
- export declare function fitScale(mode: Exclude<FitMode, 'custom'>, largest: PdfPageSize, box: {
42
- width: number;
43
- height: number;
44
- }, padding?: number): number;
45
- /**
46
- * The reader's zoom in fit width or fit page: the largest of the first
47
- * `FIT_PAGES` pages, rotated, fitted to the box.
48
- */
49
- export declare function readerFitScale(mode: Exclude<FitMode, 'custom'>, sizes: readonly (PdfPageSize | undefined)[], rotation: number, box: {
50
- width: number;
51
- height: number;
52
- }): number;
53
- /** Pixel size of a page's placeholder before it renders. */
54
- export declare function placeholderSize(size: PdfPageSize | undefined, scale: number, rotation: number): {
55
- width: number;
56
- height: number;
57
- };
@@ -1,37 +0,0 @@
1
- import { PdfPageSize } from './pdf-page-geometry';
2
- type SizedPage = {
3
- /** The page's own `/Rotate`, in degrees (pdf.js `PDFPageProxy.rotate`). */
4
- rotate?: number;
5
- getViewport: (options: {
6
- scale: number;
7
- rotation: number;
8
- }) => {
9
- width: number;
10
- height: number;
11
- };
12
- };
13
- export type PdfSizedDocument = {
14
- numPages: number;
15
- getPage: (pageNumber: number) => Promise<SizedPage>;
16
- };
17
- /** What a load handler receives: `getPage` is optional for older callers. */
18
- export type PdfLoadedDocument = Pick<PdfSizedDocument, 'numPages'> & Partial<Pick<PdfSizedDocument, 'getPage'>>;
19
- /**
20
- * Reads every page's size, unrotated, and its own `/Rotate`, `chunk` pages
21
- * at a time (at most `chunk` page objects asked for at once): the first chunk
22
- * at once, the rest in the background. `onSizes` gets the list known so far
23
- * after each chunk; the first report holds the pages the fit zoom is computed
24
- * from (`FIT_PAGES`), so later chunks never move it. `isCancelled` stops the
25
- * reading when the document changed.
26
- */
27
- export declare function readPageSizes(pdf: PdfSizedDocument, onSizes: (sizes: PdfPageSize[]) => void, isCancelled?: () => boolean, chunk?: number): Promise<void>;
28
- /**
29
- * Reads the sizes of the document last loaded. `reset` forgets it when the
30
- * file changes, so sizes still arriving for it never land. A document
31
- * without `getPage` keeps the fallback size.
32
- */
33
- export declare function createPageSizesLoader(onSizes: (sizes: PdfPageSize[]) => void): {
34
- reset(): void;
35
- load(pdf: PdfLoadedDocument): Promise<void>;
36
- };
37
- export {};
@@ -1,42 +0,0 @@
1
- /** A vertical extent on screen, as `getBoundingClientRect` gives it. */
2
- export type PdfBox = {
3
- top: number;
4
- bottom: number;
5
- };
6
- /**
7
- * The page with the most of itself on screen, the first one on a tie; once
8
- * scrolled to the end, the last page on screen, however little of it shows.
9
- */
10
- export declare function mostVisiblePage(view: PdfBox & {
11
- atEnd: boolean;
12
- }, pages: Iterable<readonly [number, PdfBox]>): number | null;
13
- /**
14
- * Scrolls the page area around `node`, and nothing else: `scrollIntoView`
15
- * would scroll the host page too. `block` puts `node` at the area's top or
16
- * centre.
17
- */
18
- export declare function scrollIntoArea(node: Element, block: 'start' | 'center', behavior?: ScrollBehavior): void;
19
- /**
20
- * Keeps `node` at the top of the page area while the pages above it change
21
- * size (the zoom fitting to page sizes still arriving), until the user
22
- * scrolls, taps, clicks or types in the page area, or the returned function
23
- * is called. `beforeScroll` runs before each correction.
24
- */
25
- export declare function pinToPage(node: () => Element | null | undefined, beforeScroll: () => void): () => void;
26
- /**
27
- * Reports the page most on screen as the reader's page area (`root`)
28
- * scrolls. `hold`
29
- * ignores scrolling until it has stopped for `idleMs`: the reader calls it
30
- * before scrolling to a page itself, so the pages it passes on the way are
31
- * not reported.
32
- */
33
- export declare function createScrollSpy(root: () => HTMLElement | null | undefined, pages: () => ReadonlyMap<number, HTMLElement>, onPage: (page: number) => void, idleMs?: number): {
34
- hold(): void;
35
- stop(): void;
36
- };
37
- /**
38
- * Scrolls a page's match to the middle of the page area once the page has
39
- * drawn its mark, polling each frame for up to `timeout` ms; `beforeScroll`
40
- * runs first. Returns a function that stops waiting.
41
- */
42
- export declare function revealHit(findPage: () => ParentNode | null | undefined, hit: number, beforeScroll?: () => void, timeout?: number): () => void;
@@ -1,25 +0,0 @@
1
- /** One item of `page.getTextContent()`: marked-content items have no `str`. */
2
- export type PdfTextItem = {
3
- str?: string;
4
- hasEOL?: boolean;
5
- };
6
- /** A page's text, and where each text item starts in it. */
7
- export type PdfPageText = {
8
- text: string;
9
- starts: number[];
10
- };
11
- /** A match in a page's text: `end` is exclusive. */
12
- export type PdfTextRange = {
13
- start: number;
14
- end: number;
15
- };
16
- /** Joins the items' text, a line break after each item that ends a line. */
17
- export declare function pageTextFromItems(items: readonly PdfTextItem[]): PdfPageText;
18
- /** Every match of `query` in `text`, ignoring case, accents and spacing. */
19
- export declare function findTextMatches(text: string, query: string): PdfTextRange[];
20
- /**
21
- * One text item's HTML, its part of each match wrapped in
22
- * `<mark class="pdf-highlight" data-hit="…">`. A match across items gets a
23
- * mark in each; the current one also carries `data-current`.
24
- */
25
- export declare function highlightItemHtml(str: string, itemStart: number, matches: readonly PdfTextRange[], current?: number): string;
@@ -1,35 +0,0 @@
1
- import { PdfSource } from './pdf-source';
2
- /**
3
- * How long an object URL outlives the click that started its download or
4
- * opened its tab. Revoking it synchronously cancels the download in Firefox
5
- * and Safari, which read the URL after `click()` returns.
6
- */
7
- export declare const OBJECT_URL_TTL_MS = 60000;
8
- export type PdfFileOptions = {
9
- /** Name of the saved file; `.pdf` is added when missing. */
10
- fileName?: string;
11
- /**
12
- * Name used when neither `fileName`, a `File`'s name nor the URL gives
13
- * one: `document`, or its translation.
14
- */
15
- defaultName?: string;
16
- /**
17
- * Bytes of the document the reader already loaded. Saving them needs no
18
- * second request, and works for a cross-origin URL, where the `download`
19
- * attribute is ignored.
20
- */
21
- getData?: () => Uint8Array | null | undefined | Promise<Uint8Array | null | undefined>;
22
- };
23
- /**
24
- * Downloads the PDF under its resolved name. A URL is saved from the loaded
25
- * bytes or fetched; when neither works (CORS), it opens in a new tab, which
26
- * a popup blocker may stop once the click's activation has expired. A URL
27
- * with headers never opens in a tab: it would load without them.
28
- */
29
- export declare function downloadPdfFile(source: PdfSource, options?: PdfFileOptions): Promise<void>;
30
- /**
31
- * Prints the PDF from a same-origin object URL in a hidden frame. When the
32
- * browser refuses (a PDF plugin that blocks `print()`, a cross-origin URL
33
- * that could not be fetched), the document opens in a new tab instead.
34
- */
35
- export declare function printPdfFile(source: PdfSource, options?: Pick<PdfFileOptions, 'getData'>): Promise<void>;
@@ -1,9 +0,0 @@
1
- import { PdfSource } from './pdf-source';
2
- /** The name a download takes when nothing else gives one, before `.pdf`. */
3
- export declare const DEFAULT_PDF_FILE_NAME = "document";
4
- /**
5
- * The saved file's name: `fileName`, then the `File`'s own name, then the
6
- * last segment of the URL's path, then `fallback` (`document`, or its
7
- * translation). `.pdf` is added when missing.
8
- */
9
- export declare function resolvePdfFileName(source: PdfSource, fileName?: string, fallback?: string): string;
@@ -1,57 +0,0 @@
1
- /**
2
- * Everything `PdfReader` opens, without touching pdf.js: that is loaded
3
- * lazily, and this module is safe on a server (no browser global at module
4
- * scope).
5
- */
6
- /** A URL fetched with request headers, such as an `Authorization` token. */
7
- export type PdfUrlSource = {
8
- url: string | URL;
9
- httpHeaders?: Record<string, string>;
10
- /** Sends cookies with a cross-origin request. */
11
- withCredentials?: boolean;
12
- };
13
- /**
14
- * What `PdfReader`'s `file` accepts: a URL, a `File` or `Blob`, the bytes
15
- * (`ArrayBuffer`, `Uint8Array`), or a URL with headers. Bytes are copied, so
16
- * your buffer stays usable after the reader opened it.
17
- */
18
- export type PdfSource = string | URL | Blob | ArrayBuffer | Uint8Array | PdfUrlSource;
19
- /** The parameters pdf.js `getDocument` takes. */
20
- export type PdfjsSourceParams = {
21
- url: string;
22
- httpHeaders?: Record<string, string>;
23
- withCredentials?: boolean;
24
- } | {
25
- data: Uint8Array;
26
- };
27
- /** A Blob or a File, also from another realm (an iframe). */
28
- export declare function isBlob(value: unknown): value is Blob;
29
- export declare function isPdfUrlSource(value: unknown): value is PdfUrlSource;
30
- /** The URL a source is fetched from; `null` for a Blob or bytes. */
31
- export declare function pdfSourceUrl(source: PdfSource): string | null;
32
- /**
33
- * A key that changes only when the document does, so a re-render does not
34
- * reload it: a URL (with its headers) is compared by value, a Blob or a
35
- * buffer by identity. An inline `{ url, httpHeaders }` object is therefore
36
- * fine; a new `Uint8Array` on every render reloads every time.
37
- */
38
- export declare function pdfSourceKey(source: PdfSource | null | undefined): string;
39
- /**
40
- * A copy of the bytes. A buffer that was already detached (transferred to a
41
- * worker: it has 0 bytes) gives an empty copy, which pdf.js reports as an
42
- * empty file, instead of throwing here.
43
- */
44
- export declare function copyPdfData(data: ArrayBuffer | ArrayBufferView): Uint8Array<ArrayBuffer>;
45
- /** The URL parameters pdf.js `getDocument` takes. */
46
- export type PdfjsUrlParams = Extract<PdfjsSourceParams, {
47
- url: string;
48
- }>;
49
- /**
50
- * The source as react-pdf's `file` takes it, synchronously: URL parameters,
51
- * or a Blob. Bytes are copied into a Blob, and every load reads a fresh
52
- * buffer from it: pdf.js transfers the buffer it is given to its worker,
53
- * which would leave yours, or a copy reused by a second load, detached.
54
- */
55
- export declare function toPdfjsSource(source: PdfSource): Blob | PdfjsUrlParams;
56
- /** {@link toPdfjsSource} with a Blob read into bytes, for `getDocument`. */
57
- export declare function toPdfjsParams(source: PdfSource): Promise<PdfjsSourceParams>;
@@ -1,12 +0,0 @@
1
- /**
2
- * The most decimals every `Intl.NumberFormat` accepts. ES2023 raised the
3
- * limit to 100; engines before it throw a `RangeError` above 20.
4
- */
5
- export declare const MAX_FRACTION_DIGITS = 20;
6
- /**
7
- * A `fractionDigits` option as both amount formatters apply it —
8
- * `formatAmount` and `CurrencyField` (`currencyFractionDigits`): a finite
9
- * number, truncated and clamped to 0..20; anything else (`undefined`, `NaN`,
10
- * `Infinity`) is `undefined`, so the default decimals apply.
11
- */
12
- export declare function fractionDigitsOption(fractionDigits?: number): number | undefined;