@carlonicora/nextjs-jsonapi 3.3.9 → 3.4.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 (175) hide show
  1. package/dist/{BlockNoteEditor-BYMRWUVG.mjs → BlockNoteEditor-3D5D7YL7.mjs} +2 -2
  2. package/dist/{BlockNoteEditor-USRMFZGP.js → BlockNoteEditor-F6TGKMTW.js} +9 -9
  3. package/dist/{BlockNoteEditor-USRMFZGP.js.map → BlockNoteEditor-F6TGKMTW.js.map} +1 -1
  4. package/dist/billing/index.js +347 -347
  5. package/dist/billing/index.js.map +1 -1
  6. package/dist/billing/index.mjs +27 -27
  7. package/dist/billing/index.mjs.map +1 -1
  8. package/dist/{chunk-CFZW6GU4.mjs → chunk-G5LSXG5K.mjs} +2572 -2482
  9. package/dist/chunk-G5LSXG5K.mjs.map +1 -0
  10. package/dist/{chunk-5WFYQE22.js → chunk-KT4CTWCV.js} +825 -735
  11. package/dist/chunk-KT4CTWCV.js.map +1 -0
  12. package/dist/client/index.d.mts +5 -0
  13. package/dist/client/index.d.ts +5 -0
  14. package/dist/client/index.js +2 -2
  15. package/dist/client/index.mjs +1 -1
  16. package/dist/components/index.d.mts +13 -7
  17. package/dist/components/index.d.ts +13 -7
  18. package/dist/components/index.js +2 -2
  19. package/dist/components/index.mjs +1 -1
  20. package/dist/contexts/index.d.mts +13 -1
  21. package/dist/contexts/index.d.ts +13 -1
  22. package/dist/contexts/index.js +6 -2
  23. package/dist/contexts/index.js.map +1 -1
  24. package/dist/contexts/index.mjs +5 -1
  25. package/dist/features/help/index.js +35 -35
  26. package/dist/features/help/index.js.map +1 -1
  27. package/dist/features/help/index.mjs +6 -6
  28. package/dist/features/help/index.mjs.map +1 -1
  29. package/dist/features/tokenusage/index.js +135 -129
  30. package/dist/features/tokenusage/index.js.map +1 -1
  31. package/dist/features/tokenusage/index.mjs +74 -68
  32. package/dist/features/tokenusage/index.mjs.map +1 -1
  33. package/package.json +35 -35
  34. package/scripts/check-rtl-classes.mjs +60 -0
  35. package/scripts/check-rtl-classes.test.ts +25 -0
  36. package/src/components/TableCellAvatar.tsx +1 -1
  37. package/src/components/containers/PageContainer.tsx +1 -1
  38. package/src/components/containers/ReactMarkdownContainer.tsx +20 -4
  39. package/src/components/containers/RoundPageContainer.tsx +7 -7
  40. package/src/components/contents/AttributeElement.tsx +1 -1
  41. package/src/components/editors/BlockNoteDiffInlineContent.tsx +2 -2
  42. package/src/components/editors/BlockNoteEditorMentionHoverCard.tsx +1 -0
  43. package/src/components/forms/CommonDeleter.tsx +1 -1
  44. package/src/components/forms/CommonEditorButtons.tsx +1 -1
  45. package/src/components/forms/DatePickerPopover.tsx +2 -2
  46. package/src/components/forms/DateRangeSelector.tsx +2 -2
  47. package/src/components/forms/EditorSheet.tsx +18 -9
  48. package/src/components/forms/EntityMultiSelector.tsx +7 -7
  49. package/src/components/forms/EntitySelector.tsx +8 -8
  50. package/src/components/forms/FileUploader.tsx +1 -0
  51. package/src/components/forms/FormCheckbox.tsx +3 -3
  52. package/src/components/forms/FormDateTime.tsx +3 -3
  53. package/src/components/forms/FormFieldWrapper.tsx +1 -1
  54. package/src/components/forms/FormPlaceAutocomplete.tsx +2 -2
  55. package/src/components/forms/GdprConsentCheckbox.tsx +1 -1
  56. package/src/components/forms/MultiFileUploader.tsx +1 -1
  57. package/src/components/forms/PasswordInput.tsx +1 -1
  58. package/src/components/forms/__tests__/FormCheckbox.test.tsx +4 -4
  59. package/src/components/navigations/Header.tsx +2 -2
  60. package/src/components/navigations/PageSection.tsx +1 -1
  61. package/src/components/pages/PageContainerContentDetails.tsx +1 -1
  62. package/src/components/pages/PageContentContainer.tsx +5 -2
  63. package/src/components/tables/ContentListTable.tsx +4 -4
  64. package/src/components/tables/ContentTableSearch.tsx +5 -5
  65. package/src/contexts/DirectionContext.tsx +25 -0
  66. package/src/contexts/__tests__/DirectionContext.test.tsx +22 -0
  67. package/src/contexts/index.ts +1 -0
  68. package/src/features/ai-connection/components/lists/AiConnectionTypeCard.tsx +1 -1
  69. package/src/features/assistant/components/containers/AssistantPageContainer.tsx +1 -1
  70. package/src/features/assistant/components/parts/AssistantBlockNoteComposer.tsx +2 -2
  71. package/src/features/assistant/components/parts/AssistantComposer.tsx +2 -2
  72. package/src/features/assistant/components/parts/AssistantEmptyState.tsx +1 -1
  73. package/src/features/assistant/components/parts/AssistantSidebar.tsx +3 -3
  74. package/src/features/assistant-action/components/ApprovalActionCard.tsx +1 -1
  75. package/src/features/assistant-action/components/AssistantContainerWithApprovals.tsx +1 -1
  76. package/src/features/assistant-message/components/MessageItem.tsx +3 -3
  77. package/src/features/assistant-message/components/__tests__/MessageItem.spec.tsx +1 -0
  78. package/src/features/assistant-message/components/parts/MessageSourcesPanel.tsx +2 -2
  79. package/src/features/assistant-message/components/parts/RelevanceMeter.tsx +1 -1
  80. package/src/features/assistant-message/components/parts/tabs/SuggestedQuestionsTab.tsx +1 -1
  81. package/src/features/auth/components/buttons/GoogleSignInButton.tsx +1 -1
  82. package/src/features/auth/components/forms/Register.tsx +2 -2
  83. package/src/features/auth/components/two-factor/BackupCodesDialog.tsx +3 -3
  84. package/src/features/auth/utils/__tests__/clearClientStorage.spec.ts +4 -4
  85. package/src/features/billing/components/cards/BillingUsageSummaryCard.tsx +1 -1
  86. package/src/features/billing/components/cards/CustomerInfoCard.tsx +1 -1
  87. package/src/features/billing/components/cards/InvoicesSummaryCard.tsx +1 -1
  88. package/src/features/billing/components/cards/PaymentMethodSummaryCard.tsx +1 -1
  89. package/src/features/billing/components/cards/SubscriptionSummaryCard.tsx +1 -1
  90. package/src/features/billing/components/containers/BillingDashboardContainer.tsx +1 -1
  91. package/src/features/billing/stripe-customer/components/details/PaymentMethodCard.tsx +1 -1
  92. package/src/features/billing/stripe-invoice/components/details/InvoiceDetails.tsx +6 -6
  93. package/src/features/billing/stripe-invoice/components/lists/InvoicesList.tsx +2 -2
  94. package/src/features/billing/stripe-price/hooks/useStripePriceTableStructure.tsx +3 -3
  95. package/src/features/billing/stripe-product/hooks/useStripeProductTableStructure.tsx +2 -2
  96. package/src/features/billing/stripe-subscription/components/lists/SubscriptionsList.tsx +4 -4
  97. package/src/features/billing/stripe-subscription/components/widgets/PricingCard.tsx +2 -2
  98. package/src/features/billing/stripe-subscription/components/widgets/SubscriptionConfirmation.tsx +1 -1
  99. package/src/features/billing/stripe-subscription/components/wizards/WizardStepReview.tsx +2 -2
  100. package/src/features/billing/stripe-usage/components/lists/UsageHistoryTable.tsx +2 -2
  101. package/src/features/company/components/forms/CompanyDeleter.tsx +4 -4
  102. package/src/features/content/hooks/useContentTableStructure.tsx +1 -1
  103. package/src/features/feature/components/forms/FormFeatures.tsx +2 -2
  104. package/src/features/help/components/HelpAssistantSheet.tsx +3 -2
  105. package/src/features/help/components/HelpHint.tsx +2 -2
  106. package/src/features/help/components/HelpTOC.tsx +1 -1
  107. package/src/features/how-to/components/containers/HowToCommand.tsx +2 -2
  108. package/src/features/how-to/components/containers/HowToCommandViewer.tsx +5 -5
  109. package/src/features/how-to/components/forms/HowToEditor.tsx +3 -3
  110. package/src/features/how-to/components/forms/HowToSelector.tsx +5 -5
  111. package/src/features/notification/components/lists/NotificationsList.tsx +2 -2
  112. package/src/features/notification/components/modals/NotificationModal.tsx +1 -1
  113. package/src/features/oauth/components/OAuthClientCard.tsx +2 -2
  114. package/src/features/oauth/components/OAuthClientDetail.tsx +2 -2
  115. package/src/features/oauth/components/OAuthClientList.tsx +3 -3
  116. package/src/features/oauth/components/OAuthRedirectUriInput.tsx +1 -1
  117. package/src/features/oauth/components/OAuthScopeSelector.tsx +2 -2
  118. package/src/features/onboarding/components/OnboardingCard.tsx +1 -7
  119. package/src/features/rbac/components/RbacByRoleContainer.tsx +3 -3
  120. package/src/features/rbac/components/RbacContainer.tsx +3 -3
  121. package/src/features/referral/components/ReferralWidget.tsx +1 -0
  122. package/src/features/role/components/forms/FormRoles.tsx +1 -1
  123. package/src/features/role/components/forms/RemoveUserFromRole.tsx +1 -1
  124. package/src/features/role/components/forms/UserRoleAdd.tsx +1 -1
  125. package/src/features/tokenusage/components/TokenUsageBreakdownTable.tsx +9 -9
  126. package/src/features/tokenusage/components/TokenUsageRankedBar.tsx +8 -3
  127. package/src/features/tokenusage/components/TokenUsageTimelineChart.tsx +5 -1
  128. package/src/features/user/components/details/UserStandaloneDetails.tsx +1 -1
  129. package/src/features/user/components/forms/UserReactivator.tsx +2 -2
  130. package/src/features/user/components/forms/UserResentInvitationEmail.tsx +1 -1
  131. package/src/features/user/components/forms/UserSelector.tsx +7 -7
  132. package/src/features/user/components/lists/ContributorsList.tsx +1 -1
  133. package/src/features/user/components/lists/UserListInAdd.tsx +1 -1
  134. package/src/features/user/components/widgets/UserSearchPopover.tsx +5 -5
  135. package/src/features/user/hooks/useUserTableStructure.tsx +1 -1
  136. package/src/features/waitlist/components/forms/WaitlistQuestionnaireRenderer.tsx +1 -1
  137. package/src/features/waitlist/hooks/useWaitlistTableStructure.tsx +1 -1
  138. package/src/hooks/useCustomD3Graph.tsx +16 -0
  139. package/src/lib/__tests__/direction.test.ts +18 -0
  140. package/src/lib/direction.ts +8 -0
  141. package/src/shadcnui/custom/multi-select.tsx +6 -6
  142. package/src/shadcnui/custom/multiple-selector.tsx +6 -2
  143. package/src/shadcnui/ui/accordion.tsx +1 -1
  144. package/src/shadcnui/ui/alert-dialog.tsx +2 -1
  145. package/src/shadcnui/ui/alert.tsx +2 -2
  146. package/src/shadcnui/ui/avatar.tsx +1 -1
  147. package/src/shadcnui/ui/badge.tsx +1 -1
  148. package/src/shadcnui/ui/breadcrumb.tsx +1 -1
  149. package/src/shadcnui/ui/button.tsx +4 -4
  150. package/src/shadcnui/ui/calendar.tsx +9 -8
  151. package/src/shadcnui/ui/carousel.tsx +18 -11
  152. package/src/shadcnui/ui/combobox.tsx +3 -3
  153. package/src/shadcnui/ui/command.tsx +2 -2
  154. package/src/shadcnui/ui/context-menu.tsx +15 -11
  155. package/src/shadcnui/ui/dialog.tsx +2 -1
  156. package/src/shadcnui/ui/drawer.tsx +19 -3
  157. package/src/shadcnui/ui/dropdown-menu.tsx +12 -10
  158. package/src/shadcnui/ui/field.tsx +2 -2
  159. package/src/shadcnui/ui/input-group.tsx +3 -3
  160. package/src/shadcnui/ui/input-otp.tsx +2 -0
  161. package/src/shadcnui/ui/navigation-menu.tsx +2 -2
  162. package/src/shadcnui/ui/progress.tsx +1 -1
  163. package/src/shadcnui/ui/radio-group.tsx +1 -0
  164. package/src/shadcnui/ui/resizable.tsx +1 -0
  165. package/src/shadcnui/ui/scroll-area.tsx +1 -1
  166. package/src/shadcnui/ui/select.tsx +2 -2
  167. package/src/shadcnui/ui/sheet.tsx +11 -4
  168. package/src/shadcnui/ui/sidebar.tsx +37 -20
  169. package/src/shadcnui/ui/sonner.tsx +6 -1
  170. package/src/shadcnui/ui/switch.tsx +1 -1
  171. package/src/shadcnui/ui/table.tsx +2 -2
  172. package/src/shadcnui/ui/tabs.tsx +1 -1
  173. package/dist/chunk-5WFYQE22.js.map +0 -1
  174. package/dist/chunk-CFZW6GU4.mjs.map +0 -1
  175. /package/dist/{BlockNoteEditor-BYMRWUVG.mjs.map → BlockNoteEditor-3D5D7YL7.mjs.map} +0 -0
@@ -26,7 +26,7 @@ import {
26
26
  TableHeader,
27
27
  TableRow,
28
28
  usePageUrlGenerator
29
- } from "../../chunk-CFZW6GU4.mjs";
29
+ } from "../../chunk-G5LSXG5K.mjs";
30
30
  import "../../chunk-RZDY4CIF.mjs";
31
31
  import {
32
32
  AbstractService,
@@ -612,7 +612,7 @@ function TokenUsageBreakdownTable({ rows, metric }) {
612
612
  // would swallow the overflow before this scroller ever saw it — hence the
613
613
  // child override. Wide metric tables must scroll, never widen the page.
614
614
  /* @__PURE__ */ jsx4("div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ jsxs3(Table, { children: [
615
- /* @__PURE__ */ jsx4(TableHeader, { children: /* @__PURE__ */ jsx4(TableRow, { children: columns.map((column) => /* @__PURE__ */ jsx4(TableHead, { className: cn(column.numeric && "text-right"), children: /* @__PURE__ */ jsxs3(
615
+ /* @__PURE__ */ jsx4(TableHeader, { children: /* @__PURE__ */ jsx4(TableRow, { children: columns.map((column) => /* @__PURE__ */ jsx4(TableHead, { className: cn(column.numeric && "text-end"), children: /* @__PURE__ */ jsxs3(
616
616
  "button",
617
617
  {
618
618
  type: "button",
@@ -633,14 +633,14 @@ function TokenUsageBreakdownTable({ rows, metric }) {
633
633
  return /* @__PURE__ */ jsxs3(TableRow, { "data-testid": `breakdown-row-${row.id}`, children: [
634
634
  /* @__PURE__ */ jsx4(TableCell, { className: "text-xs", children: row.id === "other" ? t("token_usage.admin.other") : row.label }),
635
635
  /* @__PURE__ */ jsx4(TableCell, { className: "text-muted-foreground text-xs", children: row.sublabel ?? "" }),
636
- showActiveUsers && /* @__PURE__ */ jsx4(TableCell, { className: "text-right text-xs tabular-nums", children: row.activeUsers === void 0 ? "" : decimal(row.activeUsers, 0) }),
637
- /* @__PURE__ */ jsx4(TableCell, { className: "text-right text-xs tabular-nums", children: decimal(row.calls, 0) }),
638
- /* @__PURE__ */ jsx4(TableCell, { className: "text-right text-xs tabular-nums", children: decimal(row.tokensIn, 0) }),
639
- /* @__PURE__ */ jsx4(TableCell, { className: "text-right text-xs tabular-nums", children: decimal(row.tokensOut, 0) }),
640
- /* @__PURE__ */ jsx4(TableCell, { className: "text-right text-xs tabular-nums", children: percent(cacheHitPercentage(row.cached, row.tokensIn)) }),
641
- /* @__PURE__ */ jsx4(TableCell, { className: "text-right text-xs tabular-nums", children: formatValue(row.cost, "cost") }),
642
- /* @__PURE__ */ jsx4(TableCell, { className: "text-right text-xs tabular-nums", children: formatValue(row.credits, "credits") }),
643
- /* @__PURE__ */ jsx4(TableCell, { className: "text-right text-xs tabular-nums", children: percent(share) })
636
+ showActiveUsers && /* @__PURE__ */ jsx4(TableCell, { className: "text-end text-xs tabular-nums", children: row.activeUsers === void 0 ? "" : decimal(row.activeUsers, 0) }),
637
+ /* @__PURE__ */ jsx4(TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.calls, 0) }),
638
+ /* @__PURE__ */ jsx4(TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.tokensIn, 0) }),
639
+ /* @__PURE__ */ jsx4(TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.tokensOut, 0) }),
640
+ /* @__PURE__ */ jsx4(TableCell, { className: "text-end text-xs tabular-nums", children: percent(cacheHitPercentage(row.cached, row.tokensIn)) }),
641
+ /* @__PURE__ */ jsx4(TableCell, { className: "text-end text-xs tabular-nums", children: formatValue(row.cost, "cost") }),
642
+ /* @__PURE__ */ jsx4(TableCell, { className: "text-end text-xs tabular-nums", children: formatValue(row.credits, "credits") }),
643
+ /* @__PURE__ */ jsx4(TableCell, { className: "text-end text-xs tabular-nums", children: percent(share) })
644
644
  ] }, row.id);
645
645
  }) })
646
646
  ] }) })
@@ -724,7 +724,7 @@ function TokenUsageRankedBar({ rows, metric, emptyLabel, labelsAreOperationTypes
724
724
  return /* @__PURE__ */ jsxs4("div", { className: "grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-x-3 gap-y-0.5 py-0.5", children: [
725
725
  /* @__PURE__ */ jsxs4("div", { className: "grid min-w-0 gap-0.5", children: [
726
726
  /* @__PURE__ */ jsx5("span", { className: "text-muted-foreground truncate text-xs", children: renderLabel(row) }),
727
- /* @__PURE__ */ jsx5("div", { className: "bg-muted h-2 w-full overflow-hidden rounded-r-[4px]", children: /* @__PURE__ */ jsx5(
727
+ /* @__PURE__ */ jsx5("div", { className: "bg-muted h-2 w-full overflow-hidden rounded-r-[4px]", dir: "ltr", children: /* @__PURE__ */ jsx5(
728
728
  "div",
729
729
  {
730
730
  "data-testid": `ranked-fill-${row.id}`,
@@ -734,12 +734,12 @@ function TokenUsageRankedBar({ rows, metric, emptyLabel, labelsAreOperationTypes
734
734
  }
735
735
  ) })
736
736
  ] }),
737
- /* @__PURE__ */ jsx5("span", { "data-testid": `ranked-value-${row.id}`, className: "text-right text-xs tabular-nums", children: formatValue(value, metric) }),
737
+ /* @__PURE__ */ jsx5("span", { "data-testid": `ranked-value-${row.id}`, className: "text-end text-xs tabular-nums", children: formatValue(value, metric) }),
738
738
  /* @__PURE__ */ jsx5(
739
739
  "span",
740
740
  {
741
741
  "data-testid": `ranked-share-${row.id}`,
742
- className: "text-muted-foreground w-16 text-right text-xs tabular-nums",
742
+ className: "text-muted-foreground w-16 text-end text-xs tabular-nums",
743
743
  children: percent(share)
744
744
  }
745
745
  )
@@ -830,61 +830,67 @@ function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
830
830
  }
831
831
  const granularity = inferGranularity(chartData.map((entry) => entry.bucket));
832
832
  const seriesColorFor = /* @__PURE__ */ __name((series, index) => series === OTHER_SERIES ? OTHER_COLOR : seriesColor(index, mode), "seriesColorFor");
833
- return /* @__PURE__ */ jsxs5("div", { className, children: [
834
- /* @__PURE__ */ jsx6("span", { className: "sr-only", "data-testid": "timeline-data", children: JSON.stringify(chartData) }),
835
- /* @__PURE__ */ jsx6("span", { className: "sr-only", "data-testid": "timeline-series", children: JSON.stringify(seriesKeys) }),
836
- /* @__PURE__ */ jsx6(ChartContainer, { config: chartConfig, className: "aspect-auto h-72 w-full", children: /* @__PURE__ */ jsxs5(BarChart, { accessibilityLayer: true, data: chartData, margin: { top: 8, right: 8, bottom: 0, left: 0 }, children: [
837
- /* @__PURE__ */ jsx6(CartesianGrid, { vertical: false }),
838
- /* @__PURE__ */ jsx6(
839
- XAxis,
840
- {
841
- dataKey: "bucket",
842
- tickLine: false,
843
- axisLine: false,
844
- tickMargin: 8,
845
- minTickGap: 16,
846
- tickFormatter: (value) => bucketDate(value, granularity)
847
- }
848
- ),
849
- /* @__PURE__ */ jsx6(
850
- YAxis,
851
- {
852
- tickLine: false,
853
- axisLine: false,
854
- tickMargin: 8,
855
- width: 48,
856
- tickFormatter: (value) => compact(value)
857
- }
858
- ),
859
- /* @__PURE__ */ jsx6(
860
- ChartTooltip,
861
- {
862
- content: /* @__PURE__ */ jsx6(
863
- ChartTooltipContent,
864
- {
865
- labelFormatter: (value) => bucketDate(String(value), granularity),
866
- valueFormatter: (value) => formatValue(Number(value), metric),
867
- hideZeroValues: true
868
- }
869
- )
870
- }
871
- ),
872
- seriesKeys.length >= 2 ? /* @__PURE__ */ jsx6(ChartLegend, { content: /* @__PURE__ */ jsx6(ChartLegendContent, {}) }) : null,
873
- seriesKeys.map((series, index) => /* @__PURE__ */ jsx6(
874
- Bar,
875
- {
876
- dataKey: series,
877
- stackId: "usage",
878
- maxBarSize: 28,
879
- fill: seriesColorFor(series, index),
880
- stroke: "var(--background)",
881
- strokeWidth: 2,
882
- radius: index === seriesKeys.length - 1 ? [4, 4, 0, 0] : 0
883
- },
884
- series
885
- ))
886
- ] }) })
887
- ] });
833
+ return (
834
+ // The chart is a coordinate system, not prose: recharts lays the axes and the
835
+ // stacked bars out left-to-right, so the whole chart stays an LTR island even
836
+ // under dir="rtl". Only the labels inside it are translated.
837
+ // rtl-ok: deliberate LTR island (chart)
838
+ /* @__PURE__ */ jsxs5("div", { className, dir: "ltr", children: [
839
+ /* @__PURE__ */ jsx6("span", { className: "sr-only", "data-testid": "timeline-data", children: JSON.stringify(chartData) }),
840
+ /* @__PURE__ */ jsx6("span", { className: "sr-only", "data-testid": "timeline-series", children: JSON.stringify(seriesKeys) }),
841
+ /* @__PURE__ */ jsx6(ChartContainer, { config: chartConfig, className: "aspect-auto h-72 w-full", children: /* @__PURE__ */ jsxs5(BarChart, { accessibilityLayer: true, data: chartData, margin: { top: 8, right: 8, bottom: 0, left: 0 }, children: [
842
+ /* @__PURE__ */ jsx6(CartesianGrid, { vertical: false }),
843
+ /* @__PURE__ */ jsx6(
844
+ XAxis,
845
+ {
846
+ dataKey: "bucket",
847
+ tickLine: false,
848
+ axisLine: false,
849
+ tickMargin: 8,
850
+ minTickGap: 16,
851
+ tickFormatter: (value) => bucketDate(value, granularity)
852
+ }
853
+ ),
854
+ /* @__PURE__ */ jsx6(
855
+ YAxis,
856
+ {
857
+ tickLine: false,
858
+ axisLine: false,
859
+ tickMargin: 8,
860
+ width: 48,
861
+ tickFormatter: (value) => compact(value)
862
+ }
863
+ ),
864
+ /* @__PURE__ */ jsx6(
865
+ ChartTooltip,
866
+ {
867
+ content: /* @__PURE__ */ jsx6(
868
+ ChartTooltipContent,
869
+ {
870
+ labelFormatter: (value) => bucketDate(String(value), granularity),
871
+ valueFormatter: (value) => formatValue(Number(value), metric),
872
+ hideZeroValues: true
873
+ }
874
+ )
875
+ }
876
+ ),
877
+ seriesKeys.length >= 2 ? /* @__PURE__ */ jsx6(ChartLegend, { content: /* @__PURE__ */ jsx6(ChartLegendContent, {}) }) : null,
878
+ seriesKeys.map((series, index) => /* @__PURE__ */ jsx6(
879
+ Bar,
880
+ {
881
+ dataKey: series,
882
+ stackId: "usage",
883
+ maxBarSize: 28,
884
+ fill: seriesColorFor(series, index),
885
+ stroke: "var(--background)",
886
+ strokeWidth: 2,
887
+ radius: index === seriesKeys.length - 1 ? [4, 4, 0, 0] : 0
888
+ },
889
+ series
890
+ ))
891
+ ] }) })
892
+ ] })
893
+ );
888
894
  }
889
895
  __name(TokenUsageTimelineChart, "TokenUsageTimelineChart");
890
896