@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
@@ -1,4 +1,4 @@
1
- //#region node_modules/clsx/dist/clsx.mjs
1
+ //#region ../../node_modules/clsx/dist/clsx.mjs
2
2
  function e(t) {
3
3
  var n, r, i = "";
4
4
  if (typeof t == "string" || typeof t == "number") i += t;
@@ -13,7 +13,7 @@ function t() {
13
13
  return i;
14
14
  }
15
15
  //#endregion
16
- //#region node_modules/tailwind-merge/dist/bundle-mjs.mjs
16
+ //#region ../../node_modules/tailwind-merge/dist/bundle-mjs.mjs
17
17
  var n = (e, t) => {
18
18
  let n = Array(e.length + t.length);
19
19
  for (let t = 0; t < e.length; t++) n[t] = e[t];
@@ -1,10 +1,10 @@
1
- import { n as e } from "./chunk-Y2CYZVJY-i11wjrBe.js";
2
- import { p as t } from "./src-CNRY2AUH.js";
3
- import { H as n, U as r, a as i, b as a, c as o, f as s, it as c, nt as l, q as u, rt as d, tt as f, v as p, w as m, y as h } from "./chunk-O7XYJQB3-WMQqqzRb.js";
4
- import { i as g } from "./chunk-ZIGJFQKS-DBdWb0bj.js";
5
- import { t as _ } from "./chunk-6AEJRKK7-D9IaQdwq.js";
6
- import { t as v } from "./rough.esm-rcMoXTJj.js";
7
- //#region node_modules/khroma/dist/methods/transparentize.js
1
+ import { n as e } from "./chunk-Y2CYZVJY-BAad7w_K.js";
2
+ import { p as t } from "./src-Pe71xVTz.js";
3
+ import { H as n, U as r, a as i, b as a, c as o, f as s, it as c, nt as l, q as u, rt as d, tt as f, v as p, w as m, y as h } from "./chunk-O7XYJQB3-BDucxjeL.js";
4
+ import { i as g } from "./chunk-ZIGJFQKS-JoSqKBE3.js";
5
+ import { t as _ } from "./chunk-6AEJRKK7-D1W4b1Ir.js";
6
+ import { t as v } from "./rough.esm-Cvc79rxE.js";
7
+ //#region ../../node_modules/khroma/dist/methods/transparentize.js
8
8
  var y = (e, t) => d(e, "a", -t), b = 1e-10;
9
9
  function x(e, t) {
10
10
  let n = C(e), r = n.filter((t) => S(t, e)), i = 0, a = 0, o = [];
@@ -908,7 +908,7 @@ function we(e, t = {}) {
908
908
  }));
909
909
  }
910
910
  //#endregion
911
- //#region node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-UO4OBE2U.mjs
911
+ //#region ../../node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-UO4OBE2U.mjs
912
912
  var W = (function() {
913
913
  var t = /* @__PURE__ */ e(function(e, t, n, r) {
914
914
  for (n ||= {}, r = e.length; r--; n[e[r]] = t);
package/dist/vite.js CHANGED
@@ -1,18 +1,2 @@
1
- //#region lib/vite/index.ts
2
- function e() {
3
- let e = /[A-Za-z_$][\w$]*\(\s*(['"])#standard-fonts\/(\w+)\1\s*\)/g;
4
- return {
5
- name: "nxgt-material:pdfkit-standard-fonts",
6
- enforce: "pre",
7
- transform(t, n) {
8
- if (!n.includes("pdfkit") || !t.includes("#standard-fonts/")) return null;
9
- let r = /* @__PURE__ */ new Set(), i = t.replace(e, (e, t, n) => (r.add(n), `__stdFont_${n}`));
10
- return i.includes("#standard-fonts/") && this.error(`${n} still references '#standard-fonts/' after the transform — pdfkit changed how it loads its standard fonts. See the doc comment on pdfkitStandardFonts() in the /vite entry.`), {
11
- code: `${[...r].map((e) => `import __stdFont_${e} from './standard-fonts/${e}.mjs';`).join("\n")}\n${i}`,
12
- map: null
13
- };
14
- }
15
- };
16
- }
17
- //#endregion
1
+ import { pdfkitStandardFonts as e } from "@nxgt/material-core/vite";
18
2
  export { e as pdfkitStandardFonts };
@@ -0,0 +1,3 @@
1
+ import "./chunk-FOHPRMQF-DBc3Omt0.js";
2
+ import { i as e } from "./mermaid-parser.core-BXD_TD1T.js";
3
+ export { e as createWardleyServices };
@@ -1,11 +1,11 @@
1
- import { n as e } from "./mermaid-parser.core-Cz-MfB4Z.js";
2
- import { n as t } from "./chunk-Y2CYZVJY-i11wjrBe.js";
3
- import { m as n } from "./src-CNRY2AUH.js";
4
- import { D as r, H as i, U as a, a as o, b as s, c, q as l, v as u, w as d, x as f, y as p } from "./chunk-O7XYJQB3-WMQqqzRb.js";
5
- import { i as m } from "./chunk-ZIGJFQKS-DBdWb0bj.js";
6
- import { t as h } from "./chunk-6AEJRKK7-D9IaQdwq.js";
7
- import { t as g } from "./chunk-JWPE2WC7-Ccb0QaC8.js";
8
- //#region node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-VNRHLVJA.mjs
1
+ import { n as e } from "./mermaid-parser.core-BXD_TD1T.js";
2
+ import { n as t } from "./chunk-Y2CYZVJY-BAad7w_K.js";
3
+ import { m as n } from "./src-Pe71xVTz.js";
4
+ import { D as r, H as i, U as a, a as o, b as s, c, q as l, v as u, w as d, x as f, y as p } from "./chunk-O7XYJQB3-BDucxjeL.js";
5
+ import { i as m } from "./chunk-ZIGJFQKS-JoSqKBE3.js";
6
+ import { t as h } from "./chunk-6AEJRKK7-D1W4b1Ir.js";
7
+ import { t as g } from "./chunk-JWPE2WC7-BGVSGRTC.js";
8
+ //#region ../../node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-VNRHLVJA.mjs
9
9
  var _ = /* @__PURE__ */ t((e, t) => {
10
10
  let n = e <= 1 ? e * 100 : e;
11
11
  if (n < 0 || n > 100) throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);
@@ -1,22 +1,22 @@
1
- import { n as e } from "./chunk-Y2CYZVJY-i11wjrBe.js";
2
- import { m as t } from "./src-CNRY2AUH.js";
3
- import { D as n, H as r, U as i, a, b as o, c as s, f as c, q as l, v as u, w as d, y as f, z as p } from "./chunk-O7XYJQB3-WMQqqzRb.js";
4
- import { t as m } from "./linear-bD_QoED_.js";
5
- import { t as h } from "./ordinal-D_ZgubzR.js";
6
- import { t as g } from "./init-MwSGRDIl.js";
7
- import { i as _ } from "./chunk-ZIGJFQKS-DBdWb0bj.js";
8
- import { t as v } from "./line-UP6dkL36.js";
9
- import { t as y } from "./chunk-6AEJRKK7-D9IaQdwq.js";
10
- import "./chunk-742MDFTN-BIhVe9GR.js";
11
- import { t as b } from "./chunk-MBY4JIJT-HYVRUG_P.js";
12
- //#region node_modules/d3-array/src/range.js
1
+ import { n as e } from "./chunk-Y2CYZVJY-BAad7w_K.js";
2
+ import { m as t } from "./src-Pe71xVTz.js";
3
+ import { D as n, H as r, U as i, a, b as o, c as s, f as c, q as l, v as u, w as d, y as f, z as p } from "./chunk-O7XYJQB3-BDucxjeL.js";
4
+ import { t as m } from "./linear-CobEklb6.js";
5
+ import { t as h } from "./ordinal-BCmOO3Sy.js";
6
+ import { t as g } from "./init-O6p85zx5.js";
7
+ import { i as _ } from "./chunk-ZIGJFQKS-JoSqKBE3.js";
8
+ import { t as v } from "./line-CAYWvrRN.js";
9
+ import { t as y } from "./chunk-6AEJRKK7-D1W4b1Ir.js";
10
+ import "./chunk-742MDFTN-Bh_u1X2k.js";
11
+ import { t as b } from "./chunk-MBY4JIJT-ODeZ1ugd.js";
12
+ //#region ../../node_modules/d3-array/src/range.js
13
13
  function x(e, t, n) {
14
14
  e = +e, t = +t, n = (i = arguments.length) < 2 ? (t = e, e = 0, 1) : i < 3 ? 1 : +n;
15
15
  for (var r = -1, i = Math.max(0, Math.ceil((t - e) / n)) | 0, a = Array(i); ++r < i;) a[r] = e + r * n;
16
16
  return a;
17
17
  }
18
18
  //#endregion
19
- //#region node_modules/d3-scale/src/band.js
19
+ //#region ../../node_modules/d3-scale/src/band.js
20
20
  function S() {
21
21
  var e = h().unknown(void 0), t = e.domain, n = e.range, r = 0, i = 1, a, o, s = !1, c = 0, l = 0, u = .5;
22
22
  delete e.unknown;
@@ -53,7 +53,7 @@ function S() {
53
53
  }, g.apply(d(), arguments);
54
54
  }
55
55
  //#endregion
56
- //#region node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-PMCCYNJV.mjs
56
+ //#region ../../node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-PMCCYNJV.mjs
57
57
  var C = (function() {
58
58
  var t = /* @__PURE__ */ e(function(e, t, n, r) {
59
59
  for (n ||= {}, r = e.length; r--; n[e[r]] = t);
@@ -187,7 +187,10 @@ The module also:
187
187
  - adds the package to `build.transpile`, so it is bundled into the server
188
188
  build ([SSR](guides/ssr.md#nuxt));
189
189
  - installs Pinia when the app has none;
190
- - pre-bundles the CommonJS dependency `jsbarcode` for Vite.
190
+ - pre-bundles the CommonJS dependency `jsbarcode` for Vite;
191
+ - adds pdfkit's standard-font files to `nitro.externals.traceInclude`, so a
192
+ production server renders PDFs from `.output` alone
193
+ ([troubleshooting](troubleshooting.md#cannot-find-module-pdfkitjsstandard-fontshelveticacjs)).
191
194
 
192
195
  It does **not** add the stylesheet: import it yourself as in [Styles](#styles).
193
196
  It does **not** register what is outside `/components`: `I18nProvider`, the
@@ -382,3 +385,23 @@ buttons, `Filter` shows its inline actions and trigger label, and
382
385
  `Notifications`, `Gallery`, `ImageCropperDialog` and `PaneLayout` open from
383
386
  their trigger without `v-model:open`. `LocationMarker` shows a "You are here"
384
387
  tooltip. Update visual snapshots accordingly.
388
+
389
+ ### 0.23.0: `@nxgt/material-core` comes with it
390
+
391
+ The PDF model and renderer, the print formatters and the other
392
+ framework-free helpers now live in `@nxgt/material-core`, which
393
+ `@nxgt/material-vue` depends on and re-exports at the same subpaths. Nothing
394
+ changes in your imports or your `package.json`: your install adds
395
+ `@nxgt/material-core` as a dependency.
396
+
397
+ The one thing to check: a server bundle that inlines `@nxgt/material-vue`
398
+ (`ssr.noExternal`, or a bundle step with an `--external` list), or that runs
399
+ without `node_modules`, must include `@nxgt/material-core` as well
400
+ ([details](troubleshooting.md#cannot-find-package-nxgtmaterial-core)):
401
+
402
+ ```ts
403
+ // vite.config.ts
404
+ export default defineConfig({
405
+ ssr: { noExternal: ['@nxgt/material-vue', '@nxgt/material-core'] },
406
+ });
407
+ ```
@@ -271,8 +271,11 @@ as `invoicePdf(invoice, language)` does above.
271
271
 
272
272
  The PDFs use the fourteen standard PDF fonts, loaded by pdfkit at runtime from
273
273
  a specifier no bundler resolves. Nitro keeps `@react-pdf/renderer` external by
274
- default, where that works. When the runtime image has **no `node_modules`**
275
- (the server inlined into one artifact), bundle the fonts in:
274
+ default, where that works: the Nuxt module adds pdfkit's font files to what
275
+ Nitro copies into `.output/server/node_modules`, which its tracer would miss
276
+ ([troubleshooting](../troubleshooting.md#cannot-find-module-pdfkitjsstandard-fontshelveticacjs)).
277
+ When the runtime image has **no `node_modules`** (the server inlined into one
278
+ artifact, `nitro: { noExternals: true }`), bundle the fonts in:
276
279
 
277
280
  ```ts
278
281
  // nuxt.config.ts
@@ -288,10 +291,14 @@ import { pdfkitStandardFonts } from '@nxgt/material-vue/vite';
288
291
 
289
292
  export default defineConfig({
290
293
  plugins: [pdfkitStandardFonts()],
291
- ssr: { noExternal: ['@nxgt/material-vue'] },
294
+ ssr: { noExternal: ['@nxgt/material-vue', '@nxgt/material-core'] },
292
295
  });
293
296
  ```
294
297
 
298
+ `@nxgt/material-core`, which the library's built code imports by name, is
299
+ bundled with it: leave it out and the server fails at boot with
300
+ [`Cannot find package '@nxgt/material-core'`](../troubleshooting.md#cannot-find-package-nxgtmaterial-core).
301
+
295
302
  The plugin fails the build if a reference survives, rather than the first
296
303
  request ([troubleshooting](../troubleshooting.md#cannot-find-module-standard-fontshelvetica)).
297
304
 
@@ -14,10 +14,15 @@ import { defineConfig } from 'vite';
14
14
 
15
15
  export default defineConfig({
16
16
  plugins: [vue()],
17
- ssr: { noExternal: ['@nxgt/material-vue'] },
17
+ ssr: { noExternal: ['@nxgt/material-vue', '@nxgt/material-core'] },
18
18
  });
19
19
  ```
20
20
 
21
+ `@nxgt/material-core` is a dependency of this package that its built code
22
+ imports by name: bundle it together with `@nxgt/material-vue`, or a server run
23
+ without it in `node_modules` fails at boot with
24
+ [`Cannot find package '@nxgt/material-core'`](../troubleshooting.md#cannot-find-package-nxgtmaterial-core).
25
+
21
26
  With that, **every module the barrels reach is evaluated when the server
22
27
  boots**, whether or not a page renders the component. A browser global touched
23
28
  at import time would crash the server before it answers anything.
@@ -262,6 +267,7 @@ export default defineNuxtPlugin((nuxtApp) => {
262
267
  | --- | --- | --- |
263
268
  | `ReferenceError: window is not defined` at server boot | `leaflet` (or another browser-only module) imported statically by your server code | Import maps from `@nxgt/material-vue/map` only, never `leaflet` directly; `clientOnly(defineAsyncComponent(() => import('./MapView.vue')))` for your own |
264
269
  | `ReferenceError: DOMMatrix is not defined` at server boot | a static `pdfjs-dist` import in your own code | `import()` + `clientOnly`, or use `PdfReader` |
270
+ | Built server fails at boot with `Cannot find package '@nxgt/material-core'` | the library bundled into the server, its core left out | Add `@nxgt/material-core` wherever `@nxgt/material-vue` is in `ssr.noExternal` or `--external` ([troubleshooting](../troubleshooting.md#cannot-find-package-nxgtmaterial-core)) |
265
271
  | Built server answers nothing on every route; its log names a module it cannot find | a bundled dependency whose loader resolves paths at runtime | Keep such a dependency out of your server bundle (`import()` + `clientOnly`), or leave it external |
266
272
  | A map renders as an empty box on the first paint | leaflet initialises in the browser only | Expected: wrap it in `<ClientOnly>` ([maps](maps.md#browser-only)) |
267
273
  | `getActivePinia()` was called but there was no active Pinia | a widget rendered on the server before Pinia was installed | `app.use(createPinia())` in the server entry too; in Nuxt the module does it |
package/docs/roadmap.md CHANGED
@@ -88,6 +88,15 @@ Nothing in progress right now; see Next.
88
88
 
89
89
  ## Shipped
90
90
 
91
+ - **One copy of the framework-free code, shared with `@nxgt/material`** —
92
+ the PDF document model and renderer, the print formatters, the PDF file
93
+ helpers, `PdfReader`'s page geometry, scroll spy and search, the
94
+ `CurrencyField` decimals, the fields' blur rule and `pdfkitStandardFonts()`
95
+ now come from `@nxgt/material-core`, which your install adds on its own.
96
+ Every entry exports the same names with the same types, so nothing changes
97
+ in your imports or your Nuxt config; a server bundled without
98
+ `node_modules` bundles `@nxgt/material-core` too. 0.23.0.
99
+ ([troubleshooting](troubleshooting.md#cannot-find-package-nxgtmaterial-core))
91
100
  - **PdfReader, turned pages and a steady zoom** — a page the PDF turns
92
101
  (`/Rotate`) shows the right way up, the fit zoom settles once when the
93
102
  document opens instead of moving while you read, `@page-change` also reports
@@ -38,6 +38,7 @@ words in your error.
38
38
  - [`ReferenceError: localStorage is not defined`](#referenceerror-localstorage-is-not-defined)
39
39
  - [`Hydration completed but contains mismatches.`](#hydration-completed-but-contains-mismatches)
40
40
  - [`Failed to resolve component: LocationFormField`](#failed-to-resolve-component-locationformfield)
41
+ - [`Cannot find package '@nxgt/material-core'`](#cannot-find-package-nxgtmaterial-core)
41
42
 
42
43
  **Pinia, router & forms**
43
44
 
@@ -58,6 +59,7 @@ words in your error.
58
59
  **PDF documents**
59
60
 
60
61
  - [`Cannot find module '#standard-fonts/Helvetica'`](#cannot-find-module-standard-fontshelvetica)
62
+ - [`Cannot find module '…/pdfkit/js/standard-fonts/Helvetica.cjs'`](#cannot-find-module-pdfkitjsstandard-fontshelveticacjs)
61
63
  - [`still references '#standard-fonts/' after the transform`](#still-references-standard-fonts-after-the-transform)
62
64
  - [`renderToStream is a Node specific API` / `renderToBuffer is a Node specific API`](#rendertostream-is-a-node-specific-api--rendertobuffer-is-a-node-specific-api)
63
65
  - [PDF rendering fails on an edge runtime](#pdf-rendering-fails-on-an-edge-runtime)
@@ -724,6 +726,37 @@ import { I18nProvider } from '@nxgt/material-vue/i18n';
724
726
  </script>
725
727
  ```
726
728
 
729
+ ### `Cannot find package '@nxgt/material-core'`
730
+
731
+ **When:** a built SSR server fails at boot, before it answers anything. Bun
732
+ prints `Cannot find module '@nxgt/material-core'` (or one of its subpaths),
733
+ for the same cause.
734
+ **Why:** `@nxgt/material-vue` depends on `@nxgt/material-core` and its built
735
+ code imports it by name. A server that inlines `@nxgt/material-vue`
736
+ (`ssr.noExternal`, or a bundle step that inlines all but an `--external`
737
+ list) but not its core keeps that import, and a runtime without
738
+ `node_modules` (or with a pruned one that holds only your app's direct
739
+ dependencies) cannot resolve it.
740
+ **Fix:** treat the two as one. Bundle both:
741
+
742
+ ```ts
743
+ // vite.config.ts
744
+ import { defineConfig } from 'vite';
745
+
746
+ export default defineConfig({
747
+ ssr: { noExternal: ['@nxgt/material-vue', '@nxgt/material-core'] },
748
+ });
749
+ ```
750
+
751
+ or leave both external, with a `node_modules` that keeps
752
+ `@nxgt/material-vue`'s dependencies:
753
+ `--external @nxgt/material-vue --external @nxgt/material-core`.
754
+
755
+ In Nuxt there is nothing to do: the module transpiles `@nxgt/material-vue`,
756
+ and Nitro traces `@nxgt/material-core` into `.output/server/node_modules`
757
+ like any dependency — or inlines it with everything else under
758
+ `nitro: { noExternals: true }`.
759
+
727
760
  ## Pinia, router & forms
728
761
 
729
762
  ### `"getActivePinia()" was called but there was no active Pinia`
@@ -976,8 +1009,9 @@ single artifact that runs without `node_modules`.
976
1009
  **Why:** pdfkit, under `@react-pdf/renderer`, loads its standard fonts with a
977
1010
  runtime `require('#standard-fonts/<name>')`, a specifier private to pdfkit
978
1011
  that no bundler resolves. Inlined into your server, the call looks for it next
979
- to your build output. Nitro keeps the renderer external by default, where
980
- pdfkit finds its fonts; this appears when it is inlined.
1012
+ to your build output. Nitro keeps the renderer external by default, and the
1013
+ Nuxt module has it copy the fonts into `.output/server/node_modules`; this
1014
+ appears when the renderer is inlined.
981
1015
  **Fix:** bundle the fonts in. In Nuxt:
982
1016
 
983
1017
  ```ts
@@ -997,16 +1031,60 @@ import { pdfkitStandardFonts } from '@nxgt/material-vue/vite';
997
1031
 
998
1032
  export default defineConfig({
999
1033
  plugins: [pdfkitStandardFonts()],
1000
- ssr: { noExternal: ['@nxgt/material-vue'] },
1034
+ ssr: { noExternal: ['@nxgt/material-vue', '@nxgt/material-core'] },
1001
1035
  });
1002
1036
  ```
1003
1037
 
1038
+ `@nxgt/material-core` is inlined with the library, which imports it by name
1039
+ ([SSR & build](#cannot-find-package-nxgtmaterial-core)).
1004
1040
  When the runtime image keeps `node_modules`, leaving the renderer external
1005
1041
  works too, and keeps pdfkit out of the artifact. A `resolve.alias` for
1006
1042
  `#standard-fonts/` does not help: the specifier is a string passed to
1007
1043
  `require` at runtime, never seen by the resolver. See
1008
1044
  [PDF documents](guides/pdf.md#fonts-on-a-fully-inlined-server).
1009
1045
 
1046
+ ### `Cannot find module '…/pdfkit/js/standard-fonts/Helvetica.cjs'`
1047
+
1048
+ **When:** on every PDF a Nuxt or Nitro production server renders
1049
+ (`node .output/server/index.mjs`), while `nuxi dev` renders fine. The path
1050
+ points into `.output/server/node_modules/pdfkit/`.
1051
+ **Why:** Nitro copies the server's external dependencies into
1052
+ `.output/server/node_modules`, keeping only the files its tracer finds.
1053
+ pdfkit loads its fonts with a runtime `require('#standard-fonts/<name>')`,
1054
+ which resolves to a `.cjs` file the tracer never sees, so pdfkit is copied
1055
+ without them.
1056
+ **Fix:** use the Nuxt module (`modules: ['@nxgt/material-vue/nuxt']`), which
1057
+ adds pdfkit's font files to Nitro's trace. A Nitro server without Nuxt adds
1058
+ them itself:
1059
+
1060
+ ```ts
1061
+ // nitro.config.ts
1062
+ import { createRequire } from 'node:module';
1063
+
1064
+ const require = createRequire(import.meta.url);
1065
+ const fromRenderer = createRequire(require.resolve('@react-pdf/renderer'));
1066
+ const fonts = ['Courier', 'CourierBold', 'CourierBoldOblique', 'CourierOblique',
1067
+ 'Helvetica', 'HelveticaBold', 'HelveticaBoldOblique', 'HelveticaOblique',
1068
+ 'Symbol', 'TimesBold', 'TimesBoldItalic', 'TimesItalic', 'TimesRoman',
1069
+ 'ZapfDingbats'];
1070
+
1071
+ export default defineNitroConfig({
1072
+ externals: {
1073
+ // require.resolve picks pdfkit's `require` export: the .cjs it loads.
1074
+ traceInclude: fonts.map((font) =>
1075
+ fromRenderer.resolve(`pdfkit/standard-fonts/${font}`)),
1076
+ },
1077
+ });
1078
+ ```
1079
+
1080
+ With `nitro.externals` set to a boolean, the module leaves Nitro's trace
1081
+ alone: add the `traceInclude` above yourself (as an `externals` object), or
1082
+ inline the server and use `bundleStandardFonts`. A server built with
1083
+ `noExternals` has no `node_modules` to trace into: use
1084
+ `bundleStandardFonts` instead ([above](#cannot-find-module-standard-fontshelvetica)).
1085
+ When the module cannot resolve pdfkit's fonts although `@react-pdf/renderer`
1086
+ is installed, `nuxi build` prints a `pdf fonts:` warning naming what failed.
1087
+
1010
1088
  ### `still references '#standard-fonts/' after the transform`
1011
1089
 
1012
1090
  **When:** at build, from the `nxgt-material:pdfkit-standard-fonts` plugin
@@ -5,10 +5,15 @@ import {
5
5
  createResolver,
6
6
  defineNuxtModule,
7
7
  extendViteConfig,
8
+ useLogger,
8
9
  } from '@nuxt/kit';
9
10
  import { COMPOSABLE_IMPORTS, I18N_IMPORTS } from './auto-imports';
10
11
  import { COMPONENT_NAMES } from './component-names';
11
- import { addPdfFontsPlugin } from './pdf-fonts';
12
+ import {
13
+ addPdfFontsPlugin,
14
+ addPdfFontsTrace,
15
+ pdfkitStandardFontFiles,
16
+ } from './pdf-fonts';
12
17
 
13
18
  export type ModuleOptions = {
14
19
  /** Prepended to auto-imported component names. Empty by default. */
@@ -21,7 +26,9 @@ export type ModuleOptions = {
21
26
  /**
22
27
  * Bundle pdfkit's standard fonts into the Nitro server, for
23
28
  * `@nxgt/material-vue/pdf` in a server whose runtime image has no
24
- * `node_modules`. Default false: Nitro keeps the renderer external.
29
+ * `node_modules` (`nitro.noExternals`). Default false: Nitro keeps the
30
+ * renderer external, and the module adds pdfkit's font files to what
31
+ * Nitro traces into `.output/server/node_modules`.
25
32
  */
26
33
  bundleStandardFonts?: boolean;
27
34
  };
@@ -48,7 +55,7 @@ export default defineNuxtModule<ModuleOptions>({
48
55
  setup(
49
56
  options: ModuleOptions,
50
57
  nuxt: {
51
- options: { build: { transpile: string[] } };
58
+ options: { rootDir: string; build: { transpile: string[] } };
52
59
  hook: (name: 'nitro:config', fn: (config: object) => void) => void;
53
60
  },
54
61
  ) {
@@ -91,9 +98,19 @@ export default defineNuxtModule<ModuleOptions>({
91
98
  }
92
99
  }
93
100
 
94
- if (options.pdf?.bundleStandardFonts) {
95
- nuxt.hook('nitro:config', (config) => addPdfFontsPlugin(config));
96
- }
101
+ // @nxgt/material-core is not transpiled: Nitro traces it into
102
+ // .output/server/node_modules like any external, and inlines it with
103
+ // everything else under noExternals.
104
+ nuxt.hook('nitro:config', (config) => {
105
+ const logger = useLogger('@nxgt/material-vue');
106
+ addPdfFontsTrace(
107
+ config,
108
+ pdfkitStandardFontFiles(nuxt.options.rootDir, (message) =>
109
+ logger.warn(`pdf fonts: ${message}`),
110
+ ),
111
+ );
112
+ if (options.pdf?.bundleStandardFonts) addPdfFontsPlugin(config);
113
+ });
97
114
 
98
115
  addPlugin(resolver.resolve('./runtime/plugin'));
99
116
  },
@@ -1,14 +1,18 @@
1
+ import { createRequire } from 'node:module';
2
+ import { join } from 'node:path';
1
3
  import { pdfkitStandardFonts } from '../vite/index';
2
4
 
3
5
  type NitroConfigLike = {
4
6
  rollupConfig?: { plugins?: unknown };
7
+ externals?: boolean | { traceInclude?: string[] };
5
8
  };
6
9
 
7
10
  /**
8
11
  * Adds `pdfkitStandardFonts()` to a Nitro config's Rollup plugins, for the
9
12
  * `pdf.bundleStandardFonts` module option. Only a fully inlined server
10
13
  * (no `node_modules` in the runtime image) needs it: Nitro keeps
11
- * `@react-pdf/renderer` external by default, where pdfkit finds its fonts.
14
+ * `@react-pdf/renderer` external by default, and `addPdfFontsTrace` copies
15
+ * the fonts pdfkit loads into `.output/server/node_modules`.
12
16
  */
13
17
  export function addPdfFontsPlugin(config: NitroConfigLike): void {
14
18
  config.rollupConfig ??= {};
@@ -16,3 +20,99 @@ export function addPdfFontsPlugin(config: NitroConfigLike): void {
16
20
  const plugins = Array.isArray(current) ? current : current ? [current] : [];
17
21
  config.rollupConfig.plugins = [...plugins, pdfkitStandardFonts()];
18
22
  }
23
+
24
+ /** The fourteen standard PDF fonts, as pdfkit exports them. */
25
+ export const PDFKIT_STANDARD_FONTS = [
26
+ 'Courier',
27
+ 'CourierBold',
28
+ 'CourierBoldOblique',
29
+ 'CourierOblique',
30
+ 'Helvetica',
31
+ 'HelveticaBold',
32
+ 'HelveticaBoldOblique',
33
+ 'HelveticaOblique',
34
+ 'Symbol',
35
+ 'TimesBold',
36
+ 'TimesBoldItalic',
37
+ 'TimesItalic',
38
+ 'TimesRoman',
39
+ 'ZapfDingbats',
40
+ ] as const;
41
+
42
+ const isNotFound = (error: unknown) =>
43
+ (error as { code?: string } | null)?.code === 'MODULE_NOT_FOUND';
44
+
45
+ /**
46
+ * pdfkit's standard-font modules as the app at `rootDir` loads them: through
47
+ * pdfkit's own `standard-fonts/<Name>` exports under the `require` condition
48
+ * (the `.cjs` files its runtime `require('#standard-fonts/<Name>')` reads),
49
+ * for the pdfkit `@react-pdf/renderer` depends on and the one
50
+ * `@react-pdf/font` depends on, without duplicates.
51
+ *
52
+ * None, silently, when the app does not install `@react-pdf/renderer` (an
53
+ * optional peer). Any other failure is passed to `warn` — a font that
54
+ * cannot be resolved here is a PDF route that fails in production.
55
+ */
56
+ export function pdfkitStandardFontFiles(
57
+ rootDir: string,
58
+ warn: (message: string) => void = () => {},
59
+ ): string[] {
60
+ let renderer: string;
61
+ try {
62
+ renderer = createRequire(join(rootDir, 'package.json')).resolve(
63
+ '@react-pdf/renderer',
64
+ );
65
+ } catch (error) {
66
+ if (!isNotFound(error)) {
67
+ warn(`could not resolve @react-pdf/renderer: ${String(error)}`);
68
+ }
69
+ return [];
70
+ }
71
+ const fromRenderer = createRequire(renderer);
72
+ const owners: [string, ReturnType<typeof createRequire>][] = [
73
+ ['@react-pdf/renderer', fromRenderer],
74
+ ];
75
+ try {
76
+ owners.push([
77
+ '@react-pdf/font',
78
+ createRequire(fromRenderer.resolve('@react-pdf/font')),
79
+ ]);
80
+ } catch (error) {
81
+ warn(`could not resolve @react-pdf/font: ${String(error)}`);
82
+ }
83
+ const files = new Set<string>();
84
+ for (const [owner, from] of owners) {
85
+ for (const font of PDFKIT_STANDARD_FONTS) {
86
+ try {
87
+ files.add(from.resolve(`pdfkit/standard-fonts/${font}`));
88
+ } catch (error) {
89
+ warn(
90
+ `could not resolve pdfkit's ${font} font for ${owner}: ${String(error)}`,
91
+ );
92
+ }
93
+ }
94
+ }
95
+ return [...files];
96
+ }
97
+
98
+ /**
99
+ * Adds pdfkit's standard fonts to what Nitro traces into
100
+ * `.output/server/node_modules`. pdfkit loads them with a runtime
101
+ * `require('#standard-fonts/<name>')`, which resolves to a `.cjs` file its
102
+ * tracer never sees: without this, a default Nuxt build copies pdfkit but not
103
+ * those files, and every PDF rendered on the server fails with
104
+ * `Cannot find module '…/pdfkit/js/standard-fonts/Helvetica.cjs'`.
105
+ * Nothing changes for a server built with `noExternals`, which traces nothing,
106
+ * nor for an `externals` set to a boolean, which is left as it is.
107
+ */
108
+ export function addPdfFontsTrace(
109
+ config: NitroConfigLike,
110
+ fontFiles: string[],
111
+ ): void {
112
+ if (fontFiles.length === 0 || typeof config.externals === 'boolean') return;
113
+ config.externals ??= {};
114
+ config.externals.traceInclude = [
115
+ ...(config.externals.traceInclude ?? []),
116
+ ...fontFiles,
117
+ ];
118
+ }