@carlonicora/nextjs-jsonapi 6.2.0 → 6.4.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 (127) hide show
  1. package/dist/{AssistantMessageInterface-S7oyERTT.d.mts → AssistantMessageInterface-0ZQ1EJKO.d.mts} +1 -1
  2. package/dist/{AssistantMessageInterface-DHJJO_Z_.d.ts → AssistantMessageInterface-CA-hZ5Wj.d.ts} +1 -1
  3. package/dist/{BlockNoteEditor-Q757ZLCO.js → BlockNoteEditor-CT4XUXPC.js} +19 -19
  4. package/dist/{BlockNoteEditor-Q757ZLCO.js.map → BlockNoteEditor-CT4XUXPC.js.map} +1 -1
  5. package/dist/{BlockNoteEditor-D6VMXRZH.mjs → BlockNoteEditor-M6UQRVRK.mjs} +4 -4
  6. package/dist/{BlockNoteViewer-KG4CIJC5.js → BlockNoteViewer-MFLWF3Y2.js} +3 -3
  7. package/dist/{BlockNoteViewer-KG4CIJC5.js.map → BlockNoteViewer-MFLWF3Y2.js.map} +1 -1
  8. package/dist/{BlockNoteViewer-GI5LVQHZ.mjs → BlockNoteViewer-XZJ5Y7WN.mjs} +2 -2
  9. package/dist/{BlogPostInterface-BB_4wcDR.d.mts → BlogPostInterface-BN2mXc46.d.mts} +1 -1
  10. package/dist/{BlogPostInterface-bWAT1rfR.d.ts → BlogPostInterface-CTGfsR1I.d.ts} +1 -1
  11. package/dist/{auth.interface-CSzJ1oP1.d.ts → auth.interface-D5606g19.d.ts} +1 -1
  12. package/dist/{auth.interface-DD4uQv2K.d.mts → auth.interface-tsOuc0Fi.d.mts} +1 -1
  13. package/dist/billing/index.d.mts +3 -3
  14. package/dist/billing/index.d.ts +3 -3
  15. package/dist/billing/index.js +501 -493
  16. package/dist/billing/index.js.map +1 -1
  17. package/dist/billing/index.mjs +13 -5
  18. package/dist/billing/index.mjs.map +1 -1
  19. package/dist/{chunk-QKDPCZ3G.mjs → chunk-3FD6Y734.mjs} +73 -15
  20. package/dist/chunk-3FD6Y734.mjs.map +1 -0
  21. package/dist/{chunk-3P3IYUWQ.js → chunk-DSGP6GC3.js} +8 -8
  22. package/dist/{chunk-3P3IYUWQ.js.map → chunk-DSGP6GC3.js.map} +1 -1
  23. package/dist/{chunk-MHBE4KQR.mjs → chunk-DYOSXIEL.mjs} +26 -21
  24. package/dist/chunk-DYOSXIEL.mjs.map +1 -0
  25. package/dist/{chunk-S332ZCIE.js → chunk-ELQHE2DK.js} +27 -22
  26. package/dist/chunk-ELQHE2DK.js.map +1 -0
  27. package/dist/{chunk-HLW3SUMD.mjs → chunk-O2TEUH5S.mjs} +2 -2
  28. package/dist/{chunk-UEWDYVLW.js → chunk-QJIDORHM.js} +4 -4
  29. package/dist/{chunk-UEWDYVLW.js.map → chunk-QJIDORHM.js.map} +1 -1
  30. package/dist/{chunk-CUNSPLOD.mjs → chunk-RUJCWOJE.mjs} +2 -2
  31. package/dist/{chunk-6PW3562E.mjs → chunk-TIT4CJYQ.mjs} +1233 -1181
  32. package/dist/chunk-TIT4CJYQ.mjs.map +1 -0
  33. package/dist/{chunk-GSHMGL6N.js → chunk-XZCCIKX3.js} +151 -93
  34. package/dist/chunk-XZCCIKX3.js.map +1 -0
  35. package/dist/{chunk-XQEYBESH.js → chunk-Y7JIQNM6.js} +922 -870
  36. package/dist/chunk-Y7JIQNM6.js.map +1 -0
  37. package/dist/client/index.d.mts +4 -4
  38. package/dist/client/index.d.ts +4 -4
  39. package/dist/client/index.js +4 -4
  40. package/dist/client/index.mjs +3 -3
  41. package/dist/components/index.d.mts +22 -6
  42. package/dist/components/index.d.ts +22 -6
  43. package/dist/components/index.js +10 -4
  44. package/dist/components/index.js.map +1 -1
  45. package/dist/components/index.mjs +10 -4
  46. package/dist/contexts/index.d.mts +5 -5
  47. package/dist/contexts/index.d.ts +5 -5
  48. package/dist/contexts/index.js +4 -4
  49. package/dist/contexts/index.mjs +3 -3
  50. package/dist/core/index.d.mts +23 -13
  51. package/dist/core/index.d.ts +23 -13
  52. package/dist/core/index.js +8 -2
  53. package/dist/core/index.js.map +1 -1
  54. package/dist/core/index.mjs +7 -1
  55. package/dist/{currency-DrEVd_Xs.d.mts → currency-BhuEoBOn.d.mts} +2 -115
  56. package/dist/{currency-8ErEC39n.d.ts → currency-CBgZkS0u.d.ts} +2 -115
  57. package/dist/email-automations/index.js +92 -92
  58. package/dist/email-automations/index.mjs +3 -3
  59. package/dist/features/analytics/index.d.mts +2 -2
  60. package/dist/features/analytics/index.d.ts +2 -2
  61. package/dist/features/analytics/index.js +121 -121
  62. package/dist/features/analytics/index.mjs +4 -4
  63. package/dist/features/analytics/server.js +4 -4
  64. package/dist/features/analytics/server.mjs +2 -2
  65. package/dist/features/blog/index.d.mts +4 -4
  66. package/dist/features/blog/index.d.ts +4 -4
  67. package/dist/features/blog/index.js +150 -150
  68. package/dist/features/blog/index.mjs +3 -3
  69. package/dist/features/blog/server.d.mts +4 -4
  70. package/dist/features/blog/server.d.ts +4 -4
  71. package/dist/features/blog/server.js +16 -16
  72. package/dist/features/blog/server.mjs +1 -1
  73. package/dist/features/help/index.js +37 -37
  74. package/dist/features/help/index.mjs +3 -3
  75. package/dist/features/tokenusage/index.d.mts +123 -1
  76. package/dist/features/tokenusage/index.d.ts +123 -1
  77. package/dist/features/tokenusage/index.js +130 -127
  78. package/dist/features/tokenusage/index.js.map +1 -1
  79. package/dist/features/tokenusage/index.mjs +7 -4
  80. package/dist/features/tokenusage/index.mjs.map +1 -1
  81. package/dist/index.d.mts +8 -8
  82. package/dist/index.d.ts +8 -8
  83. package/dist/index.js +9 -3
  84. package/dist/index.js.map +1 -1
  85. package/dist/index.mjs +8 -2
  86. package/dist/{notification.interface-BB6GPpZY.d.mts → notification.interface-CF5h90U2.d.mts} +1 -1
  87. package/dist/{notification.interface-CmAGrijJ.d.ts → notification.interface-DQReXAD7.d.ts} +1 -1
  88. package/dist/{s3.service-Bz_K-tjz.d.ts → s3.service-BTCpmp5g.d.ts} +11 -4
  89. package/dist/{s3.service-D5zNCEW3.d.mts → s3.service-CzFBDEuQ.d.mts} +11 -4
  90. package/dist/server/index.d.mts +5 -5
  91. package/dist/server/index.d.ts +5 -5
  92. package/dist/server/index.js +3 -3
  93. package/dist/server/index.mjs +2 -2
  94. package/dist/stripe-price.interface-D6mKjAdr.d.mts +132 -0
  95. package/dist/stripe-price.interface-DGqcklFJ.d.ts +132 -0
  96. package/dist/{useSocket-B0H9pmmH.d.ts → useSocket-BM3q9A0C.d.ts} +1 -1
  97. package/dist/{useSocket-B5RQb6v2.d.mts → useSocket-CwSoq6VS.d.mts} +1 -1
  98. package/dist/{user.interface-CIWGlbqM.d.mts → user.interface-BYnGJ7ss.d.mts} +37 -2
  99. package/dist/{user.interface-C0ZdsBZj.d.ts → user.interface-BqPjVyJI.d.ts} +37 -2
  100. package/messages/en.json +8 -0
  101. package/messages/it.json +8 -0
  102. package/package.json +1 -1
  103. package/src/components/containers/RoundPageContainer.tsx +7 -2
  104. package/src/components/index.ts +5 -0
  105. package/src/features/billing/components/containers/BillingDashboardContainer.tsx +20 -3
  106. package/src/features/billing/components/widgets/CreditWarningBanner.tsx +93 -0
  107. package/src/features/billing/data/credit-warning.spec.ts +96 -0
  108. package/src/features/billing/data/credit-warning.ts +57 -0
  109. package/src/features/billing/data/index.ts +3 -0
  110. package/src/features/billing/i18n-keys.ts +6 -0
  111. package/src/features/company/data/company.interface.ts +11 -0
  112. package/src/features/company/data/company.service.ts +17 -0
  113. package/src/features/company/data/company.spec.ts +29 -0
  114. package/src/features/company/data/company.ts +31 -0
  115. package/src/features/tokenusage/index.ts +5 -0
  116. package/dist/chunk-6PW3562E.mjs.map +0 -1
  117. package/dist/chunk-GSHMGL6N.js.map +0 -1
  118. package/dist/chunk-MHBE4KQR.mjs.map +0 -1
  119. package/dist/chunk-QKDPCZ3G.mjs.map +0 -1
  120. package/dist/chunk-S332ZCIE.js.map +0 -1
  121. package/dist/chunk-XQEYBESH.js.map +0 -1
  122. package/dist/feature.interface-BO25VLlx.d.ts +0 -19
  123. package/dist/feature.interface-CXb1-vNq.d.mts +0 -19
  124. /package/dist/{BlockNoteEditor-D6VMXRZH.mjs.map → BlockNoteEditor-M6UQRVRK.mjs.map} +0 -0
  125. /package/dist/{BlockNoteViewer-GI5LVQHZ.mjs.map → BlockNoteViewer-XZJ5Y7WN.mjs.map} +0 -0
  126. /package/dist/{chunk-HLW3SUMD.mjs.map → chunk-O2TEUH5S.mjs.map} +0 -0
  127. /package/dist/{chunk-CUNSPLOD.mjs.map → chunk-RUJCWOJE.mjs.map} +0 -0
@@ -782,4 +782,126 @@ declare function createUsageFormatters(locale: string, currency: string): UsageF
782
782
  */
783
783
  declare function useUsageFormatters(): UsageFormatters;
784
784
 
785
- export { type Dimension, type Granularity, type Metric, type ReportDimension, type ReportMetric, type Scope, type StackBy, TOKEN_USAGE_ADMIN_I18N_KEYS, TOKEN_USAGE_REPORT_I18N_KEYS, TokenUsageAdminBreakdown, type TokenUsageAdminBreakdownInput, type TokenUsageAdminBreakdownInterface, TokenUsageAdminContainer, type TokenUsageAdminContextType, TokenUsageAdminFilterBar, type TokenUsageAdminFilterState, type TokenUsageAdminFilters, TokenUsageAdminProvider, TokenUsageAdminService, TokenUsageAdminSummary, type TokenUsageAdminSummaryInput, type TokenUsageAdminSummaryInterface, TokenUsageAdminTiles, TokenUsageAdminTimeline, type TokenUsageAdminTimelineInput, type TokenUsageAdminTimelineInterface, type TokenUsageBalances, TokenUsageBreakdownTable, TokenUsageRankedBar, TokenUsageReportBreakdown, type TokenUsageReportBreakdownInput, type TokenUsageReportBreakdownInterface, TokenUsageReportContainer, type TokenUsageReportContextType, TokenUsageReportFilterBar, type TokenUsageReportFilterState, type TokenUsageReportFilters, TokenUsageReportProvider, TokenUsageReportService, TokenUsageReportSummary, type TokenUsageReportSummaryInput, type TokenUsageReportSummaryInterface, TokenUsageReportTiles, TokenUsageReportTimeline, type TokenUsageReportTimelineInput, type TokenUsageReportTimelineInterface, TokenUsageTimelineChart, type UsageFormatters, createUsageFormatters, useTokenUsageAdmin, useTokenUsageReport, useUsageFormatters };
785
+ /**
786
+ * Chart palette for the administrative token-usage dashboard.
787
+ *
788
+ * Every value here is a documented step of the dataviz skill's reference ramps —
789
+ * nothing was eyeballed, nothing was hand-mixed. The palette was run through the
790
+ * skill's validator against THIS application's real chart surfaces in both modes.
791
+ * The verbatim output is below.
792
+ *
793
+ * The surface is `--card`, NOT `--background`. Every chart that uses this palette
794
+ * is painted inside a `<Card>`, so the card is the surface the marks actually sit
795
+ * on — and in dark mode it is the *lighter* of the two (`oklch(0.205 0 0)` vs the
796
+ * background's `oklch(0.145 0 0)`), which is the harder case for contrast. Taken
797
+ * from `apps/web/src/app/globals.css` (narr8 declares two `:root`/`.dark` pairs;
798
+ * the LATER pair wins, and it is the one read here) — light `oklch(1 0 0)`, dark
799
+ * `oklch(0.205 0 0)`. a360ai declares the same two values.
800
+ *
801
+ * oklch→hex conversion: the algebraic inverse of the Björn Ottosson OKLab
802
+ * matrices — the same matrices the validator applies in the forward direction —
803
+ * giving light `#ffffff` and dark `#171717`. Cross-checked by feeding it the
804
+ * previously recorded background value, which it reproduces exactly:
805
+ * `oklch(0.145 0 0)` → `#0a0a0a`. ✓
806
+ *
807
+ * Light and dark are two SELECTED sets of steps, chosen for their own surface —
808
+ * never one set with its lightness flipped at runtime. Consumers pick a set from
809
+ * the resolved theme (`seriesColor(i, mode)` / `sequentialColor(i, mode)`).
810
+ *
811
+ * ---------------------------------------------------------------------------
812
+ * VALIDATOR OUTPUT — dataviz `scripts/validate_palette.js`, run 2026-08-15
813
+ * ---------------------------------------------------------------------------
814
+ *
815
+ * $ node scripts/validate_palette.js "#2a78d6,#eb6834,#1baf7a,#eda100,#e87ba4,#008300,#4a3aa7" --mode light --surface "#ffffff"
816
+ *
817
+ * Palette (light, surface #ffffff, categorical): 7 slots
818
+ * [PASS] Lightness band all 7 inside L 0.43–0.77
819
+ * [PASS] Chroma floor all 7 >= 0.1
820
+ * [PASS] CVD separation worst adjacent #eda100↔#1baf7a ΔE 9.1 (protan) · tritan 5.8
821
+ * [PASS] Normal-vision floor worst adjacent #e87ba4↔#eda100 ΔE 19.6 (normal)
822
+ * [WARN] Contrast vs surface below 3:1 — relief required (visible labels or table view): [["#1baf7a",2.82],["#eda100",2.17],["#e87ba4",2.69]]
823
+ *
824
+ * → ALL CHECKS PASS (CVD in the 6–8 floor band is legal ONLY with secondary encoding: direct labels, gaps, or texture)
825
+ * scope: categorical palettes only. For a lone status/text color check WCAG text contrast; for a sequential ramp, lightness monotonicity.
826
+ *
827
+ * $ node scripts/validate_palette.js "#3987e5,#d95926,#199e70,#c98500,#d55181,#008300,#9085e9" --mode dark --surface "#171717"
828
+ *
829
+ * Palette (dark, surface #171717, categorical): 7 slots
830
+ * [PASS] Lightness band all 7 inside L 0.48–0.67
831
+ * [PASS] Chroma floor all 7 >= 0.1
832
+ * [PASS] CVD separation worst adjacent #c98500↔#199e70 ΔE 8.4 (protan) · tritan 8.7
833
+ * [PASS] Normal-vision floor worst adjacent #d55181↔#c98500 ΔE 19.3 (normal)
834
+ * [PASS] Contrast vs surface all 7 >= 3:1
835
+ *
836
+ * → ALL CHECKS PASS (CVD in the 6–8 floor band is legal ONLY with secondary encoding: direct labels, gaps, or texture)
837
+ * scope: categorical palettes only. For a lone status/text color check WCAG text contrast; for a sequential ramp, lightness monotonicity.
838
+ *
839
+ * $ node scripts/validate_palette.js "#104281,#1c5cab,#2a78d6,#5598e7,#86b6ef" --mode light --surface "#ffffff" --ordinal
840
+ *
841
+ * Palette (light, surface #ffffff, ordinal ramp): 5 slots
842
+ * [PASS] Lightness monotone steps read light→dark
843
+ * [PASS] Adjacent ΔL all gaps >= 0.06
844
+ * [PASS] Light-end contrast #86b6ef at 2.11:1 vs surface
845
+ * [PASS] Single hue hue spread 3°
846
+ *
847
+ * → ALL CHECKS PASS (ordinal: one hue, monotone L, visible step gaps, light end clears surface)
848
+ *
849
+ * $ node scripts/validate_palette.js "#9ec5f4,#6da7ec,#3987e5,#256abf,#184f95" --mode dark --surface "#171717" --ordinal
850
+ *
851
+ * Palette (dark, surface #171717, ordinal ramp): 5 slots
852
+ * [PASS] Lightness monotone steps read light→dark
853
+ * [PASS] Adjacent ΔL all gaps >= 0.06
854
+ * [PASS] Light-end contrast #184f95 at 2.21:1 vs surface
855
+ * [PASS] Single hue hue spread 3°
856
+ *
857
+ * → ALL CHECKS PASS (ordinal: one hue, monotone L, visible step gaps, light end clears surface)
858
+ *
859
+ * OTHER_COLOR is achromatic, so the categorical checks (which gate hue identity)
860
+ * do not apply to it; it was gated on contrast alone with the validator's own
861
+ * `contrast()` export: 3.59:1 on `#ffffff`, 4.99:1 on `#171717` — both clear 3:1.
862
+ *
863
+ * ---------------------------------------------------------------------------
864
+ * WHAT THE RESULTS OBLIGE US TO DO
865
+ * ---------------------------------------------------------------------------
866
+ *
867
+ * - NO COLOUR VALUE CHANGED in the move from `--background` to `--card`. Every
868
+ * gate that passed on the background still passes on the card, so re-stepping
869
+ * a hue would have been churn, not a fix. Only the recorded surface, the
870
+ * recorded numbers and this prose changed.
871
+ * - The dark set still clears 3:1 on the LIGHTER card surface: the worst slot is
872
+ * green `#008300` at 3.63:1, and the ordinal ramp's surface-nearest step lands
873
+ * at 2.21:1 (down from 2.44:1 on the background) — still above the 2:1 gate.
874
+ * That headroom is thin, so a future card-surface lightening MUST re-run these
875
+ * four commands rather than assume the set still holds.
876
+ * - The light-mode contrast WARN is NOT dismissable. Three slots (aqua, yellow,
877
+ * magenta) sit below 3:1 on white, so every surface that paints with this
878
+ * palette MUST ship the relief channel: a visible legend, direct labels and a
879
+ * tooltip carrying the value in text. The timeline chart and the breakdown
880
+ * table both do. The light card is `#ffffff`, identical to the light
881
+ * background, so this WARN is unchanged rather than newly incurred.
882
+ * - CVD separation is measured on ADJACENT pairs, which is the correct pairlist
883
+ * for stacked bars, grouped bars and lines — the only forms this palette paints.
884
+ * A scatter / bubble / small-multiples chart would need `--pairs all`, which
885
+ * caps the usable slot count at three; do not reuse this array there without
886
+ * re-running the validator with that flag.
887
+ */
888
+ /** Which surface the colours are being painted on. */
889
+ type ChartMode = "light" | "dark";
890
+ /**
891
+ * The identity colour for series `index`.
892
+ *
893
+ * Never generates a hue and never cycles: anything at or past the ceiling gets
894
+ * `OTHER_COLOR`, because a series past the ceiling should already have been
895
+ * folded into the "other" bucket by the caller.
896
+ */
897
+ declare function seriesColor(index: number, mode?: ChartMode): string;
898
+ /**
899
+ * Both mode steps for series `index`, shaped for a shadcn `ChartConfig` entry's
900
+ * `theme` field.
901
+ */
902
+ declare function seriesTheme(index: number): {
903
+ light: string;
904
+ dark: string;
905
+ };
906
+
907
+ export { type ChartMode, type Dimension, type Granularity, type Metric, type ReportDimension, type ReportMetric, type Scope, type StackBy, TOKEN_USAGE_ADMIN_I18N_KEYS, TOKEN_USAGE_REPORT_I18N_KEYS, TokenUsageAdminBreakdown, type TokenUsageAdminBreakdownInput, type TokenUsageAdminBreakdownInterface, TokenUsageAdminContainer, type TokenUsageAdminContextType, TokenUsageAdminFilterBar, type TokenUsageAdminFilterState, type TokenUsageAdminFilters, TokenUsageAdminProvider, TokenUsageAdminService, TokenUsageAdminSummary, type TokenUsageAdminSummaryInput, type TokenUsageAdminSummaryInterface, TokenUsageAdminTiles, TokenUsageAdminTimeline, type TokenUsageAdminTimelineInput, type TokenUsageAdminTimelineInterface, type TokenUsageBalances, TokenUsageBreakdownTable, TokenUsageRankedBar, TokenUsageReportBreakdown, type TokenUsageReportBreakdownInput, type TokenUsageReportBreakdownInterface, TokenUsageReportContainer, type TokenUsageReportContextType, TokenUsageReportFilterBar, type TokenUsageReportFilterState, type TokenUsageReportFilters, TokenUsageReportProvider, TokenUsageReportService, TokenUsageReportSummary, type TokenUsageReportSummaryInput, type TokenUsageReportSummaryInterface, TokenUsageReportTiles, TokenUsageReportTimeline, type TokenUsageReportTimelineInput, type TokenUsageReportTimelineInterface, TokenUsageTimelineChart, type UsageFormatters, createUsageFormatters, seriesColor, seriesTheme, useTokenUsageAdmin, useTokenUsageReport, useUsageFormatters };