@carlonicora/nextjs-jsonapi 5.4.0 → 5.6.0

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 (237) hide show
  1. package/dist/{BlockNoteEditor-4YCAIEPT.js → BlockNoteEditor-AE3ZTEEH.js} +20 -20
  2. package/dist/{BlockNoteEditor-4YCAIEPT.js.map → BlockNoteEditor-AE3ZTEEH.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-YQL2SGFR.mjs → BlockNoteEditor-NEYG5L6W.mjs} +5 -5
  4. package/dist/{BlockNoteViewer-AEJKJ27Q.mjs → BlockNoteViewer-3OUT5UFY.mjs} +3 -3
  5. package/dist/{BlockNoteViewer-YL3J7J2Y.js → BlockNoteViewer-4CFKQM7U.js} +4 -4
  6. package/dist/{BlockNoteViewer-YL3J7J2Y.js.map → BlockNoteViewer-4CFKQM7U.js.map} +1 -1
  7. package/dist/billing/index.d.mts +186 -25
  8. package/dist/billing/index.d.ts +186 -25
  9. package/dist/billing/index.js +1149 -588
  10. package/dist/billing/index.js.map +1 -1
  11. package/dist/billing/index.mjs +786 -225
  12. package/dist/billing/index.mjs.map +1 -1
  13. package/dist/{chunk-5PPG6PL7.js → chunk-3I5AAJXV.js} +3 -3
  14. package/dist/{chunk-5PPG6PL7.js.map → chunk-3I5AAJXV.js.map} +1 -1
  15. package/dist/{chunk-YW4ZCEWB.js → chunk-53BAULDP.js} +4 -4
  16. package/dist/{chunk-YW4ZCEWB.js.map → chunk-53BAULDP.js.map} +1 -1
  17. package/dist/{chunk-XCHSX3VC.mjs → chunk-BTPUYUQ3.mjs} +2 -2
  18. package/dist/{chunk-WC63PJSC.mjs → chunk-EYA2F6AN.mjs} +756 -24
  19. package/dist/chunk-EYA2F6AN.mjs.map +1 -0
  20. package/dist/{chunk-NFBOSPNJ.js → chunk-HKZAESS6.js} +954 -222
  21. package/dist/chunk-HKZAESS6.js.map +1 -0
  22. package/dist/{chunk-6DC2WVVB.mjs → chunk-KQHBONL4.mjs} +2 -2
  23. package/dist/{chunk-3NLAXVIN.js → chunk-LQ4DK4JF.js} +1988 -1089
  24. package/dist/chunk-LQ4DK4JF.js.map +1 -0
  25. package/dist/{chunk-YNCQSWQW.js → chunk-RL3PL3KV.js} +8 -8
  26. package/dist/{chunk-YNCQSWQW.js.map → chunk-RL3PL3KV.js.map} +1 -1
  27. package/dist/{chunk-EUKTBOI2.mjs → chunk-SFYPXCK4.mjs} +3382 -2483
  28. package/dist/chunk-SFYPXCK4.mjs.map +1 -0
  29. package/dist/{chunk-QMYQRPQC.mjs → chunk-Y7RR57EW.mjs} +2 -2
  30. package/dist/client/index.js +5 -5
  31. package/dist/client/index.js.map +1 -1
  32. package/dist/client/index.mjs +4 -4
  33. package/dist/components/editors/server.d.mts +15 -0
  34. package/dist/components/editors/server.d.ts +15 -0
  35. package/dist/components/editors/server.js +38 -0
  36. package/dist/components/editors/server.js.map +1 -0
  37. package/dist/components/editors/server.mjs +38 -0
  38. package/dist/components/editors/server.mjs.map +1 -0
  39. package/dist/components/index.d.mts +33 -10
  40. package/dist/components/index.d.ts +33 -10
  41. package/dist/components/index.js +7 -5
  42. package/dist/components/index.js.map +1 -1
  43. package/dist/components/index.mjs +8 -6
  44. package/dist/contexts/index.d.mts +9 -1
  45. package/dist/contexts/index.d.ts +9 -1
  46. package/dist/contexts/index.js +5 -5
  47. package/dist/contexts/index.mjs +4 -4
  48. package/dist/core/index.d.mts +242 -3
  49. package/dist/core/index.d.ts +242 -3
  50. package/dist/core/index.js +36 -4
  51. package/dist/core/index.js.map +1 -1
  52. package/dist/core/index.mjs +35 -3
  53. package/dist/email-automations/index.d.mts +3 -0
  54. package/dist/email-automations/index.d.ts +3 -0
  55. package/dist/email-automations/index.js +99 -95
  56. package/dist/email-automations/index.js.map +1 -1
  57. package/dist/email-automations/index.mjs +30 -26
  58. package/dist/email-automations/index.mjs.map +1 -1
  59. package/dist/features/analytics/index.d.mts +11 -4
  60. package/dist/features/analytics/index.d.ts +11 -4
  61. package/dist/features/analytics/index.js +127 -135
  62. package/dist/features/analytics/index.js.map +1 -1
  63. package/dist/features/analytics/index.mjs +16 -24
  64. package/dist/features/analytics/index.mjs.map +1 -1
  65. package/dist/features/analytics/server.d.mts +5 -2
  66. package/dist/features/analytics/server.d.ts +5 -2
  67. package/dist/features/analytics/server.js +7 -7
  68. package/dist/features/analytics/server.js.map +1 -1
  69. package/dist/features/analytics/server.mjs +5 -5
  70. package/dist/features/analytics/server.mjs.map +1 -1
  71. package/dist/features/blog/index.d.mts +12 -2
  72. package/dist/features/blog/index.d.ts +12 -2
  73. package/dist/features/blog/index.js +206 -195
  74. package/dist/features/blog/index.js.map +1 -1
  75. package/dist/features/blog/index.mjs +71 -60
  76. package/dist/features/blog/index.mjs.map +1 -1
  77. package/dist/features/blog/server.d.mts +4 -1
  78. package/dist/features/blog/server.d.ts +4 -1
  79. package/dist/features/blog/server.js +49 -21
  80. package/dist/features/blog/server.js.map +1 -1
  81. package/dist/features/blog/server.mjs +36 -8
  82. package/dist/features/blog/server.mjs.map +1 -1
  83. package/dist/features/help/index.js +38 -38
  84. package/dist/features/help/index.mjs +4 -4
  85. package/dist/features/tokenusage/index.d.mts +1 -3
  86. package/dist/features/tokenusage/index.d.ts +1 -3
  87. package/dist/features/tokenusage/index.js +127 -135
  88. package/dist/features/tokenusage/index.js.map +1 -1
  89. package/dist/features/tokenusage/index.mjs +10 -18
  90. package/dist/features/tokenusage/index.mjs.map +1 -1
  91. package/dist/{stripe-promotion-code.interface-C3qqh3mi.d.ts → format-options-BtX3o0Yu.d.ts} +104 -1
  92. package/dist/{stripe-promotion-code.interface-ClZ7DxS9.d.mts → format-options-D6c7FNDi.d.mts} +104 -1
  93. package/dist/index.d.mts +2 -2
  94. package/dist/index.d.ts +2 -2
  95. package/dist/index.js +37 -5
  96. package/dist/index.js.map +1 -1
  97. package/dist/index.mjs +36 -4
  98. package/dist/server/index.js +4 -4
  99. package/dist/server/index.mjs +3 -3
  100. package/messages/en.json +125 -3
  101. package/messages/it.json +125 -3
  102. package/package.json +9 -1
  103. package/scripts/validate-messages.mjs +1 -0
  104. package/src/billing/index.ts +1 -0
  105. package/src/client/index.ts +4 -0
  106. package/src/components/editors/server/BlockNoteServerContent.tsx +28 -0
  107. package/src/components/editors/server/__tests__/renderBlockNoteHTML.spec.ts +44 -0
  108. package/src/components/editors/server/renderBlockNoteHTML.ts +26 -0
  109. package/src/components/editors/server-entry.ts +7 -0
  110. package/src/components/index.ts +1 -0
  111. package/src/components/viewers/BlockNoteStaticViewer.tsx +44 -0
  112. package/src/core/index.ts +1 -0
  113. package/src/core/registry/ModuleRegistry.ts +3 -0
  114. package/src/features/administration/components/AdminIndexContainer.tsx +61 -33
  115. package/src/features/administration/components/__tests__/AdminIndexContainer.spec.tsx +61 -1
  116. package/src/features/administration/components/index.ts +2 -1
  117. package/src/features/administration/contexts/AdministrationContext.tsx +11 -3
  118. package/src/features/administration/contexts/__tests__/AdministrationContext.spec.tsx +40 -0
  119. package/src/features/ai-connection/ai-connection.module.ts +2 -0
  120. package/src/features/ai-connection/contexts/AiConnectionsContext.tsx +3 -16
  121. package/src/features/ai-connection/contexts/__tests__/AiConnectionsContext.spec.tsx +33 -0
  122. package/src/features/analytics/__tests__/server-entry.spec.tsx +2 -1
  123. package/src/features/analytics/analytics.modules.ts +22 -5
  124. package/src/features/analytics/components/AnalyticsAdminContainer.tsx +4 -3
  125. package/src/features/analytics/components/AnalyticsAdminPageContainer.tsx +6 -3
  126. package/src/features/analytics/components/AnalyticsJourneyContainer.tsx +4 -3
  127. package/src/features/analytics/components/__tests__/AnalyticsJourneyContainer.spec.tsx +11 -0
  128. package/src/features/analytics/components/__tests__/AnalyticsPageContainers.spec.tsx +12 -1
  129. package/src/features/analytics/components/server/AnalyticsAdminPage.tsx +6 -3
  130. package/src/features/analytics/contexts/AnalyticsAdminContext.tsx +8 -17
  131. package/src/features/analytics/contexts/__tests__/AnalyticsAdminContext.spec.tsx +17 -0
  132. package/src/features/billing/components/cards/InvoicesSummaryCard.tsx +3 -2
  133. package/src/features/billing/components/cards/SubscriptionSummaryCard.tsx +4 -3
  134. package/src/features/billing/components/containers/BillingDashboardContainer.tsx +22 -5
  135. package/src/features/billing/components/utils/__tests__/discount.spec.ts +59 -0
  136. package/src/features/billing/components/utils/__tests__/url.spec.ts +32 -0
  137. package/src/features/billing/components/utils/discount.ts +38 -0
  138. package/src/features/billing/components/utils/index.ts +2 -0
  139. package/src/features/billing/components/utils/url.ts +12 -0
  140. package/src/features/billing/contexts/CouponContext.tsx +211 -0
  141. package/src/features/billing/contexts/index.ts +1 -0
  142. package/src/features/billing/i18n-keys.ts +79 -0
  143. package/src/features/billing/stripe-coupon/components/containers/CouponContainer.tsx +38 -0
  144. package/src/features/billing/stripe-coupon/components/containers/index.ts +1 -0
  145. package/src/features/billing/stripe-coupon/components/details/CouponDetails.tsx +69 -0
  146. package/src/features/billing/stripe-coupon/components/details/index.ts +1 -0
  147. package/src/features/billing/stripe-coupon/components/forms/CouponCodeEditor.tsx +79 -0
  148. package/src/features/billing/stripe-coupon/components/forms/CouponCodeFields.tsx +192 -0
  149. package/src/features/billing/stripe-coupon/components/forms/CouponEditor.tsx +333 -0
  150. package/src/features/billing/stripe-coupon/components/forms/CouponRefresher.tsx +45 -0
  151. package/src/features/billing/stripe-coupon/components/forms/index.ts +6 -0
  152. package/src/features/billing/stripe-coupon/components/index.ts +5 -0
  153. package/src/features/billing/stripe-coupon/components/lists/CouponCodesList.tsx +61 -0
  154. package/src/features/billing/stripe-coupon/components/lists/CouponsList.tsx +67 -0
  155. package/src/features/billing/stripe-coupon/components/lists/index.ts +2 -0
  156. package/src/features/billing/stripe-coupon/components/widgets/CouponCodeActions.tsx +80 -0
  157. package/src/features/billing/stripe-coupon/components/widgets/index.ts +1 -0
  158. package/src/features/billing/stripe-coupon/data/__tests__/stripe-coupon-models.spec.ts +114 -0
  159. package/src/features/billing/stripe-coupon/data/index.ts +10 -0
  160. package/src/features/billing/stripe-coupon/data/stripe-coupon-code.fields.ts +8 -0
  161. package/src/features/billing/stripe-coupon/data/stripe-coupon-code.interface.ts +44 -0
  162. package/src/features/billing/stripe-coupon/data/stripe-coupon-code.service.ts +92 -0
  163. package/src/features/billing/stripe-coupon/data/stripe-coupon-code.ts +132 -0
  164. package/src/features/billing/stripe-coupon/data/stripe-coupon-offer.interface.ts +17 -0
  165. package/src/features/billing/stripe-coupon/data/stripe-coupon-offer.ts +70 -0
  166. package/src/features/billing/stripe-coupon/data/stripe-coupon.fields.ts +7 -0
  167. package/src/features/billing/stripe-coupon/data/stripe-coupon.interface.ts +51 -0
  168. package/src/features/billing/stripe-coupon/data/stripe-coupon.service.ts +93 -0
  169. package/src/features/billing/stripe-coupon/data/stripe-coupon.ts +165 -0
  170. package/src/features/billing/stripe-coupon/hooks/useStripeCouponCodeTableStructure.tsx +154 -0
  171. package/src/features/billing/stripe-coupon/hooks/useStripeCouponTableStructure.tsx +113 -0
  172. package/src/features/billing/stripe-coupon/index.ts +5 -0
  173. package/src/features/billing/stripe-coupon/stripe-coupon-code.module.ts +14 -0
  174. package/src/features/billing/stripe-coupon/stripe-coupon-offer.module.ts +10 -0
  175. package/src/features/billing/stripe-coupon/stripe-coupon.module.ts +18 -0
  176. package/src/features/billing/stripe-coupon/utils/__tests__/coupon-places.spec.ts +19 -0
  177. package/src/features/billing/stripe-coupon/utils/__tests__/to-promotion-code-result.spec.ts +41 -0
  178. package/src/features/billing/stripe-coupon/utils/coupon-places.ts +23 -0
  179. package/src/features/billing/stripe-coupon/utils/format-coupon-discount.ts +36 -0
  180. package/src/features/billing/stripe-coupon/utils/index.ts +3 -0
  181. package/src/features/billing/stripe-coupon/utils/to-promotion-code-result.ts +23 -0
  182. package/src/features/billing/stripe-customer/components/forms/PaymentMethodForm.tsx +24 -8
  183. package/src/features/billing/stripe-price/stripe-price.module.ts +2 -0
  184. package/src/features/billing/stripe-product/components/containers/ProductsListContainer.tsx +21 -6
  185. package/src/features/billing/stripe-product/stripe-product.module.ts +2 -0
  186. package/src/features/billing/stripe-promotion-code/components/PromoCodeInput.tsx +60 -19
  187. package/src/features/billing/stripe-promotion-code/data/stripe-promotion-code.interface.ts +2 -0
  188. package/src/features/billing/stripe-subscription/components/containers/SubscriptionsContainer.tsx +24 -5
  189. package/src/features/billing/stripe-subscription/components/lists/SubscriptionsList.tsx +21 -2
  190. package/src/features/billing/stripe-subscription/components/wizards/SubscriptionWizard.tsx +1 -1
  191. package/src/features/billing/stripe-subscription/components/wizards/WizardStepPaymentMethod.tsx +1 -1
  192. package/src/features/billing/stripe-subscription/components/wizards/WizardStepReview.tsx +60 -49
  193. package/src/features/billing/stripe-subscription/components/wizards/__tests__/review-card.spec.ts +34 -0
  194. package/src/features/billing/stripe-subscription/components/wizards/review-card.ts +24 -0
  195. package/src/features/billing/stripe-subscription/data/__tests__/stripe-subscription.discount.spec.ts +67 -0
  196. package/src/features/billing/stripe-subscription/data/stripe-subscription.interface.ts +14 -0
  197. package/src/features/billing/stripe-subscription/data/stripe-subscription.service.ts +39 -0
  198. package/src/features/billing/stripe-subscription/data/stripe-subscription.ts +21 -0
  199. package/src/features/billing/stripe-subscription/hooks/__tests__/wizard-payment.spec.ts +48 -0
  200. package/src/features/billing/stripe-subscription/hooks/__tests__/wizard-promotion.spec.ts +132 -0
  201. package/src/features/billing/stripe-subscription/hooks/useSubscriptionWizard.ts +138 -12
  202. package/src/features/billing/stripe-subscription/hooks/wizard-payment.ts +30 -0
  203. package/src/features/billing/stripe-subscription/hooks/wizard-promotion.ts +54 -0
  204. package/src/features/blog/components/admin/BlogAdminContainer.tsx +13 -6
  205. package/src/features/blog/components/admin/BlogCategoriesList.tsx +1 -1
  206. package/src/features/blog/components/admin/BlogCoverImageField.tsx +1 -1
  207. package/src/features/blog/components/admin/BlogPostContainer.tsx +0 -1
  208. package/src/features/blog/components/admin/BlogPostEditor.tsx +42 -33
  209. package/src/features/blog/components/admin/BlogPostTranslationEditor.tsx +12 -4
  210. package/src/features/blog/components/admin/BlogPostsList.tsx +1 -1
  211. package/src/features/blog/components/public/BlogPostCard.tsx +2 -9
  212. package/src/features/blog/components/public/BlogPostMeta.tsx +2 -2
  213. package/src/features/blog/components/public/BlogPostView.tsx +9 -3
  214. package/src/features/blog/components/public/__tests__/BlogList.spec.tsx +2 -0
  215. package/src/features/blog/components/public/__tests__/BlogPostView.spec.tsx +17 -11
  216. package/src/features/blog/server/fetchers.ts +57 -8
  217. package/src/features/email-automation/components/containers/EmailAutomationsListContainer.tsx +12 -3
  218. package/src/features/rbac/contexts/RbacContext.tsx +4 -7
  219. package/src/features/rbac/contexts/__tests__/RbacContext.spec.tsx +42 -0
  220. package/src/features/tokenusage/components/TokenUsageAdminContainer.tsx +4 -3
  221. package/src/features/tokenusage/contexts/TokenUsageAdminContext.tsx +3 -18
  222. package/src/features/tokenusage/contexts/__tests__/TokenUsageAdminContext.spec.tsx +17 -0
  223. package/src/features/tokenusage/tokenusage-admin.module.ts +4 -3
  224. package/src/features/tokenusage/tokenusage.modules.ts +12 -2
  225. package/src/features/user/contexts/CurrentUserContext.tsx +25 -0
  226. package/src/features/user/contexts/UserContext.tsx +18 -3
  227. package/src/features/user/contexts/__tests__/CurrentUserContext.spec.tsx +121 -2
  228. package/src/features/user/contexts/__tests__/UserContext.spec.tsx +95 -0
  229. package/dist/chunk-3NLAXVIN.js.map +0 -1
  230. package/dist/chunk-EUKTBOI2.mjs.map +0 -1
  231. package/dist/chunk-NFBOSPNJ.js.map +0 -1
  232. package/dist/chunk-WC63PJSC.mjs.map +0 -1
  233. /package/dist/{BlockNoteEditor-YQL2SGFR.mjs.map → BlockNoteEditor-NEYG5L6W.mjs.map} +0 -0
  234. /package/dist/{BlockNoteViewer-AEJKJ27Q.mjs.map → BlockNoteViewer-3OUT5UFY.mjs.map} +0 -0
  235. /package/dist/{chunk-XCHSX3VC.mjs.map → chunk-BTPUYUQ3.mjs.map} +0 -0
  236. /package/dist/{chunk-6DC2WVVB.mjs.map → chunk-KQHBONL4.mjs.map} +0 -0
  237. /package/dist/{chunk-QMYQRPQC.mjs.map → chunk-Y7RR57EW.mjs.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/features/analytics/server.js","../../../src/features/analytics/components/server/AnalyticsAdminPage.tsx","../../../src/features/analytics/components/server/AnalyticsJourneyPage.tsx"],"names":["redirect","jsx"],"mappings":"AAAA;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACA;AChBA,6CAAyB;AAMzB,kEAA4C;AAwBnC,+CAAA;AALT,MAAA,SAAsB,kBAAA,CAAmB,EAAE,WAAA,EAAa,OAAA,EAAS,cAAA,EAAgB,eAAA,EAAiB,IAAI,CAAA,EAAU;AAC9G,EAAA,GAAA,CAAI,CAAE,MAAM,8BAAA,CAAc,OAAA,CAAQ,WAAW,CAAA,EAAI;AAC/C,IAAA,kCAAA,cAAuB,CAAA;AAAA,EACzB;AAEA,EAAA,uBAAO,6BAAA,sCAAC,EAAA,EAA4B,OAAA,EAAkB,eAAA,CAAgC,CAAA;AACxF;AANsB,qCAAA,kBAAA,EAAA,oBAAA,CAAA;ADEtB;AACA;AE5BA;AAIA;AAuBS;AALT,MAAA,SAAsB,oBAAA,CAAqB,EAAE,WAAA,EAAa,SAAA,EAAW,OAAA,EAAS,eAAA,EAAiB,IAAI,CAAA,EAAU;AAC3G,EAAA,GAAA,CAAI,CAAE,MAAM,8BAAA,CAAc,OAAA,CAAQ,WAAW,CAAA,EAAI;AAC/C,IAAAA,kCAAAA,cAAuB,CAAA;AAAA,EACzB;AAEA,EAAA,uBAAOC,6BAAAA,wCAAC,EAAA,EAA8B,SAAA,EAAsB,QAAA,CAAkB,CAAA;AAChF;AANsB,qCAAA,oBAAA,EAAA,sBAAA,CAAA;AFiBtB;AACE;AACA;AACF,qGAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/features/analytics/server.js","sourcesContent":[null,"import { redirect } from \"next/navigation\";\n// The container is imported through the package's own client subpath, never by\n// relative path. tsup keeps this specifier external, so the built server entry\n// reaches the container through `features/analytics/index`, which carries the\n// \"use client\" banner. A relative import would inline the container's hooks and\n// contexts into this server bundle, outside any client boundary.\nimport { AnalyticsAdminPageContainer } from \"@carlonicora/nextjs-jsonapi/analytics\";\nimport { ServerSession } from \"../../../../server\";\n\ntype Props = {\n /** Role id the viewer must hold. The package has no role constants, so the host app passes its own. */\n adminRoleId: string;\n /** Route the breadcrumb links back to. */\n pageUrl?: string;\n /** Base route of the journey page each session row links to. */\n sessionPageUrl?: string;\n /** Where a viewer without the role is sent. */\n deniedRedirect?: string;\n};\n\n/**\n * Server page for the administrative analytics dashboard: role gate, then the client container.\n *\n * Reads the session: render inside a `<Suspense>` boundary (Cache Components).\n */\nexport async function AnalyticsAdminPage({ adminRoleId, pageUrl, sessionPageUrl, deniedRedirect = \"/\" }: Props) {\n if (!(await ServerSession.hasRole(adminRoleId))) {\n redirect(deniedRedirect);\n }\n\n return <AnalyticsAdminPageContainer pageUrl={pageUrl} sessionPageUrl={sessionPageUrl} />;\n}\n","import { redirect } from \"next/navigation\";\n// Imported through the package's own client subpath for the same reason as in\n// AnalyticsAdminPage: the built server entry must reach the container through\n// the \"use client\" bundle, not inline it.\nimport { AnalyticsJourneyPageContainer } from \"@carlonicora/nextjs-jsonapi/analytics\";\nimport { ServerSession } from \"../../../../server\";\n\ntype Props = {\n /** Role id the viewer must hold. The package has no role constants, so the host app passes its own. */\n adminRoleId: string;\n sessionId: string;\n /** Route of the dashboard; the journey pages live under `${pageUrl}/sessions`. */\n pageUrl?: string;\n /** Where a viewer without the role is sent. */\n deniedRedirect?: string;\n};\n\n/**\n * Server page for one session's journey: role gate, then the client container.\n *\n * Reads the session: render inside a `<Suspense>` boundary (Cache Components).\n */\nexport async function AnalyticsJourneyPage({ adminRoleId, sessionId, pageUrl, deniedRedirect = \"/\" }: Props) {\n if (!(await ServerSession.hasRole(adminRoleId))) {\n redirect(deniedRedirect);\n }\n\n return <AnalyticsJourneyPageContainer sessionId={sessionId} pageUrl={pageUrl} />;\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/features/analytics/server.js","../../../src/features/analytics/components/server/AnalyticsAdminPage.tsx","../../../src/features/analytics/components/server/AnalyticsJourneyPage.tsx"],"names":["redirect","jsx"],"mappings":"AAAA;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACA;AChBA,6CAAyB;AAMzB,kEAA4C;AA2BnC,+CAAA;AALT,MAAA,SAAsB,kBAAA,CAAmB,EAAE,WAAA,EAAa,cAAA,EAAgB,eAAA,EAAiB,IAAI,CAAA,EAAU;AACrG,EAAA,GAAA,CAAI,CAAE,MAAM,8BAAA,CAAc,OAAA,CAAQ,WAAW,CAAA,EAAI;AAC/C,IAAA,kCAAA,cAAuB,CAAA;AAAA,EACzB;AAEA,EAAA,uBAAO,6BAAA,sCAAC,EAAA,EAA4B,eAAA,CAAgC,CAAA;AACtE;AANsB,qCAAA,kBAAA,EAAA,oBAAA,CAAA;ADDtB;AACA;AE5BA;AAIA;AAuBS;AALT,MAAA,SAAsB,oBAAA,CAAqB,EAAE,WAAA,EAAa,SAAA,EAAW,OAAA,EAAS,eAAA,EAAiB,IAAI,CAAA,EAAU;AAC3G,EAAA,GAAA,CAAI,CAAE,MAAM,8BAAA,CAAc,OAAA,CAAQ,WAAW,CAAA,EAAI;AAC/C,IAAAA,kCAAAA,cAAuB,CAAA;AAAA,EACzB;AAEA,EAAA,uBAAOC,6BAAAA,wCAAC,EAAA,EAA8B,SAAA,EAAsB,QAAA,CAAkB,CAAA;AAChF;AANsB,qCAAA,oBAAA,EAAA,sBAAA,CAAA;AFiBtB;AACE;AACA;AACF,qGAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/features/analytics/server.js","sourcesContent":[null,"import { redirect } from \"next/navigation\";\n// The container is imported through the package's own client subpath, never by\n// relative path. tsup keeps this specifier external, so the built server entry\n// reaches the container through `features/analytics/index`, which carries the\n// \"use client\" banner. A relative import would inline the container's hooks and\n// contexts into this server bundle, outside any client boundary.\nimport { AnalyticsAdminPageContainer } from \"@carlonicora/nextjs-jsonapi/analytics\";\nimport { ServerSession } from \"../../../../server\";\n\ntype Props = {\n /** Role id the viewer must hold. The package has no role constants, so the host app passes its own. */\n adminRoleId: string;\n /**\n * @deprecated No longer read: the dashboard is the current page, so its\n * breadcrumb is not linked. Kept so existing callers still compile.\n */\n pageUrl?: string;\n /** Base route of the journey page each session row links to. */\n sessionPageUrl?: string;\n /** Where a viewer without the role is sent. */\n deniedRedirect?: string;\n};\n\n/**\n * Server page for the administrative analytics dashboard: role gate, then the client container.\n *\n * Reads the session: render inside a `<Suspense>` boundary (Cache Components).\n */\nexport async function AnalyticsAdminPage({ adminRoleId, sessionPageUrl, deniedRedirect = \"/\" }: Props) {\n if (!(await ServerSession.hasRole(adminRoleId))) {\n redirect(deniedRedirect);\n }\n\n return <AnalyticsAdminPageContainer sessionPageUrl={sessionPageUrl} />;\n}\n","import { redirect } from \"next/navigation\";\n// Imported through the package's own client subpath for the same reason as in\n// AnalyticsAdminPage: the built server entry must reach the container through\n// the \"use client\" bundle, not inline it.\nimport { AnalyticsJourneyPageContainer } from \"@carlonicora/nextjs-jsonapi/analytics\";\nimport { ServerSession } from \"../../../../server\";\n\ntype Props = {\n /** Role id the viewer must hold. The package has no role constants, so the host app passes its own. */\n adminRoleId: string;\n sessionId: string;\n /** Route of the dashboard; the journey pages live under `${pageUrl}/sessions`. */\n pageUrl?: string;\n /** Where a viewer without the role is sent. */\n deniedRedirect?: string;\n};\n\n/**\n * Server page for one session's journey: role gate, then the client container.\n *\n * Reads the session: render inside a `<Suspense>` boundary (Cache Components).\n */\nexport async function AnalyticsJourneyPage({ adminRoleId, sessionId, pageUrl, deniedRedirect = \"/\" }: Props) {\n if (!(await ServerSession.hasRole(adminRoleId))) {\n redirect(deniedRedirect);\n }\n\n return <AnalyticsJourneyPageContainer sessionId={sessionId} pageUrl={pageUrl} />;\n}\n"]}
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  ServerSession
3
- } from "../../chunk-XCHSX3VC.mjs";
3
+ } from "../../chunk-BTPUYUQ3.mjs";
4
4
  import "../../chunk-T7SAW3UW.mjs";
5
5
  import "../../chunk-3YW35YHQ.mjs";
6
6
  import "../../chunk-F5UNXZ3J.mjs";
7
7
  import "../../chunk-E2LENTUH.mjs";
8
8
  import "../../chunk-PW42LRSL.mjs";
9
- import "../../chunk-WC63PJSC.mjs";
9
+ import "../../chunk-EYA2F6AN.mjs";
10
+ import "../../chunk-V5MI7RNB.mjs";
10
11
  import "../../chunk-AUXK7QSA.mjs";
11
12
  import "../../chunk-PI56A4DG.mjs";
12
- import "../../chunk-V5MI7RNB.mjs";
13
13
  import {
14
14
  __name
15
15
  } from "../../chunk-PAWJFY3S.mjs";
@@ -18,11 +18,11 @@ import {
18
18
  import { redirect } from "next/navigation";
19
19
  import { AnalyticsAdminPageContainer } from "@carlonicora/nextjs-jsonapi/analytics";
20
20
  import { jsx } from "react/jsx-runtime";
21
- async function AnalyticsAdminPage({ adminRoleId, pageUrl, sessionPageUrl, deniedRedirect = "/" }) {
21
+ async function AnalyticsAdminPage({ adminRoleId, sessionPageUrl, deniedRedirect = "/" }) {
22
22
  if (!await ServerSession.hasRole(adminRoleId)) {
23
23
  redirect(deniedRedirect);
24
24
  }
25
- return /* @__PURE__ */ jsx(AnalyticsAdminPageContainer, { pageUrl, sessionPageUrl });
25
+ return /* @__PURE__ */ jsx(AnalyticsAdminPageContainer, { sessionPageUrl });
26
26
  }
27
27
  __name(AnalyticsAdminPage, "AnalyticsAdminPage");
28
28
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/features/analytics/components/server/AnalyticsAdminPage.tsx","../../../src/features/analytics/components/server/AnalyticsJourneyPage.tsx"],"sourcesContent":["import { redirect } from \"next/navigation\";\n// The container is imported through the package's own client subpath, never by\n// relative path. tsup keeps this specifier external, so the built server entry\n// reaches the container through `features/analytics/index`, which carries the\n// \"use client\" banner. A relative import would inline the container's hooks and\n// contexts into this server bundle, outside any client boundary.\nimport { AnalyticsAdminPageContainer } from \"@carlonicora/nextjs-jsonapi/analytics\";\nimport { ServerSession } from \"../../../../server\";\n\ntype Props = {\n /** Role id the viewer must hold. The package has no role constants, so the host app passes its own. */\n adminRoleId: string;\n /** Route the breadcrumb links back to. */\n pageUrl?: string;\n /** Base route of the journey page each session row links to. */\n sessionPageUrl?: string;\n /** Where a viewer without the role is sent. */\n deniedRedirect?: string;\n};\n\n/**\n * Server page for the administrative analytics dashboard: role gate, then the client container.\n *\n * Reads the session: render inside a `<Suspense>` boundary (Cache Components).\n */\nexport async function AnalyticsAdminPage({ adminRoleId, pageUrl, sessionPageUrl, deniedRedirect = \"/\" }: Props) {\n if (!(await ServerSession.hasRole(adminRoleId))) {\n redirect(deniedRedirect);\n }\n\n return <AnalyticsAdminPageContainer pageUrl={pageUrl} sessionPageUrl={sessionPageUrl} />;\n}\n","import { redirect } from \"next/navigation\";\n// Imported through the package's own client subpath for the same reason as in\n// AnalyticsAdminPage: the built server entry must reach the container through\n// the \"use client\" bundle, not inline it.\nimport { AnalyticsJourneyPageContainer } from \"@carlonicora/nextjs-jsonapi/analytics\";\nimport { ServerSession } from \"../../../../server\";\n\ntype Props = {\n /** Role id the viewer must hold. The package has no role constants, so the host app passes its own. */\n adminRoleId: string;\n sessionId: string;\n /** Route of the dashboard; the journey pages live under `${pageUrl}/sessions`. */\n pageUrl?: string;\n /** Where a viewer without the role is sent. */\n deniedRedirect?: string;\n};\n\n/**\n * Server page for one session's journey: role gate, then the client container.\n *\n * Reads the session: render inside a `<Suspense>` boundary (Cache Components).\n */\nexport async function AnalyticsJourneyPage({ adminRoleId, sessionId, pageUrl, deniedRedirect = \"/\" }: Props) {\n if (!(await ServerSession.hasRole(adminRoleId))) {\n redirect(deniedRedirect);\n }\n\n return <AnalyticsJourneyPageContainer sessionId={sessionId} pageUrl={pageUrl} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAS,gBAAgB;AAMzB,SAAS,mCAAmC;AAwBnC;AALT,eAAsB,mBAAmB,EAAE,aAAa,SAAS,gBAAgB,iBAAiB,IAAI,GAAU;AAC9G,MAAI,CAAE,MAAM,cAAc,QAAQ,WAAW,GAAI;AAC/C,aAAS,cAAc;AAAA,EACzB;AAEA,SAAO,oBAAC,+BAA4B,SAAkB,gBAAgC;AACxF;AANsB;;;ACzBtB,SAAS,YAAAA,iBAAgB;AAIzB,SAAS,qCAAqC;AAuBrC,gBAAAC,YAAA;AALT,eAAsB,qBAAqB,EAAE,aAAa,WAAW,SAAS,iBAAiB,IAAI,GAAU;AAC3G,MAAI,CAAE,MAAM,cAAc,QAAQ,WAAW,GAAI;AAC/C,IAAAC,UAAS,cAAc;AAAA,EACzB;AAEA,SAAO,gBAAAD,KAAC,iCAA8B,WAAsB,SAAkB;AAChF;AANsB;","names":["redirect","jsx","redirect"]}
1
+ {"version":3,"sources":["../../../src/features/analytics/components/server/AnalyticsAdminPage.tsx","../../../src/features/analytics/components/server/AnalyticsJourneyPage.tsx"],"sourcesContent":["import { redirect } from \"next/navigation\";\n// The container is imported through the package's own client subpath, never by\n// relative path. tsup keeps this specifier external, so the built server entry\n// reaches the container through `features/analytics/index`, which carries the\n// \"use client\" banner. A relative import would inline the container's hooks and\n// contexts into this server bundle, outside any client boundary.\nimport { AnalyticsAdminPageContainer } from \"@carlonicora/nextjs-jsonapi/analytics\";\nimport { ServerSession } from \"../../../../server\";\n\ntype Props = {\n /** Role id the viewer must hold. The package has no role constants, so the host app passes its own. */\n adminRoleId: string;\n /**\n * @deprecated No longer read: the dashboard is the current page, so its\n * breadcrumb is not linked. Kept so existing callers still compile.\n */\n pageUrl?: string;\n /** Base route of the journey page each session row links to. */\n sessionPageUrl?: string;\n /** Where a viewer without the role is sent. */\n deniedRedirect?: string;\n};\n\n/**\n * Server page for the administrative analytics dashboard: role gate, then the client container.\n *\n * Reads the session: render inside a `<Suspense>` boundary (Cache Components).\n */\nexport async function AnalyticsAdminPage({ adminRoleId, sessionPageUrl, deniedRedirect = \"/\" }: Props) {\n if (!(await ServerSession.hasRole(adminRoleId))) {\n redirect(deniedRedirect);\n }\n\n return <AnalyticsAdminPageContainer sessionPageUrl={sessionPageUrl} />;\n}\n","import { redirect } from \"next/navigation\";\n// Imported through the package's own client subpath for the same reason as in\n// AnalyticsAdminPage: the built server entry must reach the container through\n// the \"use client\" bundle, not inline it.\nimport { AnalyticsJourneyPageContainer } from \"@carlonicora/nextjs-jsonapi/analytics\";\nimport { ServerSession } from \"../../../../server\";\n\ntype Props = {\n /** Role id the viewer must hold. The package has no role constants, so the host app passes its own. */\n adminRoleId: string;\n sessionId: string;\n /** Route of the dashboard; the journey pages live under `${pageUrl}/sessions`. */\n pageUrl?: string;\n /** Where a viewer without the role is sent. */\n deniedRedirect?: string;\n};\n\n/**\n * Server page for one session's journey: role gate, then the client container.\n *\n * Reads the session: render inside a `<Suspense>` boundary (Cache Components).\n */\nexport async function AnalyticsJourneyPage({ adminRoleId, sessionId, pageUrl, deniedRedirect = \"/\" }: Props) {\n if (!(await ServerSession.hasRole(adminRoleId))) {\n redirect(deniedRedirect);\n }\n\n return <AnalyticsJourneyPageContainer sessionId={sessionId} pageUrl={pageUrl} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAS,gBAAgB;AAMzB,SAAS,mCAAmC;AA2BnC;AALT,eAAsB,mBAAmB,EAAE,aAAa,gBAAgB,iBAAiB,IAAI,GAAU;AACrG,MAAI,CAAE,MAAM,cAAc,QAAQ,WAAW,GAAI;AAC/C,aAAS,cAAc;AAAA,EACzB;AAEA,SAAO,oBAAC,+BAA4B,gBAAgC;AACtE;AANsB;;;AC5BtB,SAAS,YAAAA,iBAAgB;AAIzB,SAAS,qCAAqC;AAuBrC,gBAAAC,YAAA;AALT,eAAsB,qBAAqB,EAAE,aAAa,WAAW,SAAS,iBAAiB,IAAI,GAAU;AAC3G,MAAI,CAAE,MAAM,cAAc,QAAQ,WAAW,GAAI;AAC/C,IAAAC,UAAS,cAAc;AAAA,EACzB;AAEA,SAAO,gBAAAD,KAAC,iCAA8B,WAAsB,SAAkB;AAChF;AANsB;","names":["redirect","jsx","redirect"]}
@@ -19,6 +19,11 @@ import '../../useDataListRetriever-WEXL4bqB.mjs';
19
19
  * Blog admin page: posts, categories and the public list layout, one tab each.
20
20
  * Client component because `module={Modules.BlogPost}` carries an icon component.
21
21
  * Mirrors features/email-automation/components/containers/EmailAutomationsListContainer.tsx.
22
+ *
23
+ * Publishes its own breadcrumb, as CompanyProvider does for the companies list:
24
+ * the list root comes first and has no href because it is the current page.
25
+ * The lists inside the tabs omit `fullWidth` so they keep their bordered card,
26
+ * as PricesList does inside ProductContainer.
22
27
  */
23
28
  declare function BlogAdminContainer(): React.JSX.Element;
24
29
 
@@ -41,7 +46,7 @@ declare function BlogPostContainer({ postId }: BlogPostContainerProps): React.JS
41
46
  declare const useBlogPostTableStructure: UseTableStructureHook<BlogPostInterface, BlogPostFields>;
42
47
 
43
48
  type BlogPostsListProps = {
44
- /** Pass when the list is the page's own content inside a `RoundPageContainer fullWidth`. */
49
+ /** Pass only when the list is the page's whole content inside a `RoundPageContainer fullWidth`; omit it in a tab so the list keeps its bordered card. */
45
50
  fullWidth?: boolean;
46
51
  };
47
52
  /** Admin posts table. Mirrors features/email-automation/components/lists/EmailAutomationsList.tsx. */
@@ -56,7 +61,7 @@ declare function BlogPostsList({ fullWidth }?: BlogPostsListProps): React.JSX.El
56
61
  declare const useBlogCategoryTableStructure: UseTableStructureHook<BlogCategoryInterface, BlogCategoryFields>;
57
62
 
58
63
  type BlogCategoriesListProps = {
59
- /** Pass when the list is the page's own content inside a `RoundPageContainer fullWidth`. */
64
+ /** Pass only when the list is the page's whole content inside a `RoundPageContainer fullWidth`; omit it in a tab so the list keeps its bordered card. */
60
65
  fullWidth?: boolean;
61
66
  };
62
67
  /**
@@ -228,12 +233,17 @@ declare function BlogList(props: BlogListProps): React.JSX.Element;
228
233
  /**
229
234
  * Public post page: back link, category, title, summary, meta, cover, body,
230
235
  * then up to three posts from the same category.
236
+ *
237
+ * `body` replaces the client-only editor with server-rendered content (the app
238
+ * passes BlockNoteServerContent from `@carlonicora/nextjs-jsonapi/blocknote/server`),
239
+ * so the post text is in the HTML crawlers read.
231
240
  */
232
241
  declare function BlogPostView(props: {
233
242
  post: PublicBlogPost;
234
243
  categories: PublicBlogCategory[];
235
244
  related: PublicBlogPost[];
236
245
  basePath: string;
246
+ body?: ReactNode;
237
247
  }): React.JSX.Element;
238
248
 
239
249
  interface BlogPostContextType {
@@ -19,6 +19,11 @@ import '../../useDataListRetriever-WEXL4bqB.js';
19
19
  * Blog admin page: posts, categories and the public list layout, one tab each.
20
20
  * Client component because `module={Modules.BlogPost}` carries an icon component.
21
21
  * Mirrors features/email-automation/components/containers/EmailAutomationsListContainer.tsx.
22
+ *
23
+ * Publishes its own breadcrumb, as CompanyProvider does for the companies list:
24
+ * the list root comes first and has no href because it is the current page.
25
+ * The lists inside the tabs omit `fullWidth` so they keep their bordered card,
26
+ * as PricesList does inside ProductContainer.
22
27
  */
23
28
  declare function BlogAdminContainer(): React.JSX.Element;
24
29
 
@@ -41,7 +46,7 @@ declare function BlogPostContainer({ postId }: BlogPostContainerProps): React.JS
41
46
  declare const useBlogPostTableStructure: UseTableStructureHook<BlogPostInterface, BlogPostFields>;
42
47
 
43
48
  type BlogPostsListProps = {
44
- /** Pass when the list is the page's own content inside a `RoundPageContainer fullWidth`. */
49
+ /** Pass only when the list is the page's whole content inside a `RoundPageContainer fullWidth`; omit it in a tab so the list keeps its bordered card. */
45
50
  fullWidth?: boolean;
46
51
  };
47
52
  /** Admin posts table. Mirrors features/email-automation/components/lists/EmailAutomationsList.tsx. */
@@ -56,7 +61,7 @@ declare function BlogPostsList({ fullWidth }?: BlogPostsListProps): React.JSX.El
56
61
  declare const useBlogCategoryTableStructure: UseTableStructureHook<BlogCategoryInterface, BlogCategoryFields>;
57
62
 
58
63
  type BlogCategoriesListProps = {
59
- /** Pass when the list is the page's own content inside a `RoundPageContainer fullWidth`. */
64
+ /** Pass only when the list is the page's whole content inside a `RoundPageContainer fullWidth`; omit it in a tab so the list keeps its bordered card. */
60
65
  fullWidth?: boolean;
61
66
  };
62
67
  /**
@@ -228,12 +233,17 @@ declare function BlogList(props: BlogListProps): React.JSX.Element;
228
233
  /**
229
234
  * Public post page: back link, category, title, summary, meta, cover, body,
230
235
  * then up to three posts from the same category.
236
+ *
237
+ * `body` replaces the client-only editor with server-rendered content (the app
238
+ * passes BlockNoteServerContent from `@carlonicora/nextjs-jsonapi/blocknote/server`),
239
+ * so the post text is in the HTML crawlers read.
231
240
  */
232
241
  declare function BlogPostView(props: {
233
242
  post: PublicBlogPost;
234
243
  categories: PublicBlogCategory[];
235
244
  related: PublicBlogPost[];
236
245
  basePath: string;
246
+ body?: ReactNode;
237
247
  }): React.JSX.Element;
238
248
 
239
249
  interface BlogPostContextType {