@carlonicora/nextjs-jsonapi 2.2.2 → 2.3.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 (60) hide show
  1. package/dist/{BlockNoteEditor-ADT6II2V.mjs → BlockNoteEditor-3PS3HYVI.mjs} +12 -11
  2. package/dist/BlockNoteEditor-3PS3HYVI.mjs.map +1 -0
  3. package/dist/{BlockNoteEditor-QTIDATPF.js → BlockNoteEditor-PNAVMGHB.js} +27 -26
  4. package/dist/BlockNoteEditor-PNAVMGHB.js.map +1 -0
  5. package/dist/billing/index.js +377 -377
  6. package/dist/billing/index.js.map +1 -1
  7. package/dist/billing/index.mjs +23 -23
  8. package/dist/billing/index.mjs.map +1 -1
  9. package/dist/{chunk-DLTMYGLR.mjs → chunk-EQEW64CH.mjs} +12 -1
  10. package/dist/chunk-EQEW64CH.mjs.map +1 -0
  11. package/dist/{chunk-YEPE2HT6.mjs → chunk-FSMXD3N7.mjs} +7 -6
  12. package/dist/{chunk-YEPE2HT6.mjs.map → chunk-FSMXD3N7.mjs.map} +1 -1
  13. package/dist/{chunk-7DJOQTNN.mjs → chunk-MN2BUSEU.mjs} +2 -2
  14. package/dist/{chunk-LANOKEFZ.js → chunk-OHJQYVSI.js} +7 -7
  15. package/dist/{chunk-LANOKEFZ.js.map → chunk-OHJQYVSI.js.map} +1 -1
  16. package/dist/{chunk-F3BPNQDB.js → chunk-QYUYQO2M.js} +738 -737
  17. package/dist/chunk-QYUYQO2M.js.map +1 -0
  18. package/dist/{chunk-KSU6CCW6.js → chunk-X5TPKMBS.js} +13 -2
  19. package/dist/chunk-X5TPKMBS.js.map +1 -0
  20. package/dist/client/index.js +4 -4
  21. package/dist/client/index.mjs +3 -3
  22. package/dist/components/index.d.mts +8 -1
  23. package/dist/components/index.d.ts +8 -1
  24. package/dist/components/index.js +4 -4
  25. package/dist/components/index.mjs +3 -3
  26. package/dist/contexts/index.js +4 -4
  27. package/dist/contexts/index.mjs +3 -3
  28. package/dist/core/index.d.mts +11 -1
  29. package/dist/core/index.d.ts +11 -1
  30. package/dist/core/index.js +4 -2
  31. package/dist/core/index.js.map +1 -1
  32. package/dist/core/index.mjs +3 -1
  33. package/dist/features/help/index.js +37 -37
  34. package/dist/features/help/index.mjs +3 -3
  35. package/dist/features/tokenusage/index.js +71 -71
  36. package/dist/features/tokenusage/index.mjs +3 -3
  37. package/dist/index.d.mts +1 -1
  38. package/dist/index.d.ts +1 -1
  39. package/dist/index.js +5 -3
  40. package/dist/index.js.map +1 -1
  41. package/dist/index.mjs +4 -2
  42. package/dist/server/index.js +3 -3
  43. package/dist/server/index.mjs +1 -1
  44. package/package.json +1 -1
  45. package/src/components/editors/BlockNoteEditor.tsx +12 -6
  46. package/src/features/assistant/components/containers/AssistantPageContainer.tsx +8 -1
  47. package/src/features/billing/stripe-price/components/forms/PriceEditor.tsx +3 -3
  48. package/src/features/billing/stripe-promotion-code/components/PromoCodeInput.tsx +2 -2
  49. package/src/features/billing/stripe-subscription/components/details/SubscriptionDetails.tsx +1 -1
  50. package/src/features/billing/stripe-subscription/components/forms/CancelSubscriptionDialog.tsx +1 -1
  51. package/src/features/billing/stripe-subscription/components/widgets/ProrationPreview.tsx +8 -8
  52. package/src/features/billing/stripe-subscription/components/wizards/WizardStepReview.tsx +5 -5
  53. package/src/features/company/data/entity-ai-status.ts +13 -0
  54. package/src/features/company/data/index.ts +1 -0
  55. package/dist/BlockNoteEditor-ADT6II2V.mjs.map +0 -1
  56. package/dist/BlockNoteEditor-QTIDATPF.js.map +0 -1
  57. package/dist/chunk-DLTMYGLR.mjs.map +0 -1
  58. package/dist/chunk-F3BPNQDB.js.map +0 -1
  59. package/dist/chunk-KSU6CCW6.js.map +0 -1
  60. /package/dist/{chunk-7DJOQTNN.mjs.map → chunk-MN2BUSEU.mjs.map} +0 -0
@@ -48,11 +48,11 @@ import {
48
48
  TabsList,
49
49
  TabsTrigger,
50
50
  useCurrentUserContext
51
- } from "../chunk-YEPE2HT6.mjs";
51
+ } from "../chunk-FSMXD3N7.mjs";
52
52
  import {
53
53
  getRoleId,
54
54
  getStripePublishableKey
55
- } from "../chunk-7DJOQTNN.mjs";
55
+ } from "../chunk-MN2BUSEU.mjs";
56
56
  import {
57
57
  FeatureService,
58
58
  StripeCustomerService,
@@ -63,7 +63,7 @@ import {
63
63
  StripeSubscriptionService,
64
64
  StripeUsageService,
65
65
  cn
66
- } from "../chunk-DLTMYGLR.mjs";
66
+ } from "../chunk-EQEW64CH.mjs";
67
67
  import "../chunk-AUXK7QSA.mjs";
68
68
  import "../chunk-C7C7VY4F.mjs";
69
69
  import "../chunk-E5YA5Z5X.mjs";
@@ -1203,7 +1203,7 @@ function CancelSubscriptionDialog({
1203
1203
  /* @__PURE__ */ jsx15(DialogDescription, { children: "Are you sure you want to cancel this subscription? This action cannot be undone." })
1204
1204
  ] }),
1205
1205
  /* @__PURE__ */ jsx15(Form, { ...form, children: /* @__PURE__ */ jsxs13("form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1206
- /* @__PURE__ */ jsxs13("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-3 text-sm text-blue-800", children: [
1206
+ /* @__PURE__ */ jsxs13("div", { className: "bg-primary/10 border-primary/30 text-foreground rounded-lg border p-3 text-sm", children: [
1207
1207
  "Your subscription will remain active until ",
1208
1208
  periodEndDate,
1209
1209
  ". You can continue using the service until then."
@@ -1380,7 +1380,7 @@ function SubscriptionDetails({
1380
1380
  /* @__PURE__ */ jsx17("span", { className: "text-muted-foreground text-xs", children: "Trial Ends:" }),
1381
1381
  /* @__PURE__ */ jsx17("span", { className: "text-sm", children: formatDate3(subscription.trialEnd) })
1382
1382
  ] }),
1383
- subscription.cancelAtPeriodEnd && /* @__PURE__ */ jsx17("div", { className: "bg-yellow-50 border border-yellow-200 rounded-lg p-3", children: /* @__PURE__ */ jsxs14("p", { className: "text-warning text-xs/relaxed", children: [
1383
+ subscription.cancelAtPeriodEnd && /* @__PURE__ */ jsx17("div", { className: "bg-warning/15 border-warning/30 rounded-lg border p-3", children: /* @__PURE__ */ jsxs14("p", { className: "text-warning text-xs/relaxed", children: [
1384
1384
  "This subscription will be canceled at the end of the current period on",
1385
1385
  " ",
1386
1386
  formatDate3(subscription.currentPeriodEnd),
@@ -1774,18 +1774,18 @@ __name(ProductPricingListSkeleton, "ProductPricingListSkeleton");
1774
1774
  // src/features/billing/stripe-subscription/components/widgets/ProrationPreview.tsx
1775
1775
  import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
1776
1776
  function ProrationPreview({ preview }) {
1777
- return /* @__PURE__ */ jsxs21("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4", children: [
1778
- /* @__PURE__ */ jsx24("h4", { className: "font-semibold text-blue-900 mb-3", children: "Proration Breakdown" }),
1777
+ return /* @__PURE__ */ jsxs21("div", { className: "bg-primary/10 border-primary/30 rounded-lg border p-4", children: [
1778
+ /* @__PURE__ */ jsx24("h4", { className: "text-primary mb-3 font-semibold", children: "Proration Breakdown" }),
1779
1779
  /* @__PURE__ */ jsxs21("div", { className: "space-y-2", children: [
1780
1780
  preview.lineItems.map((item, index) => /* @__PURE__ */ jsxs21("div", { className: "flex justify-between text-sm", children: [
1781
- /* @__PURE__ */ jsx24("span", { className: "text-blue-800", children: item.description }),
1782
- /* @__PURE__ */ jsx24("span", { className: `font-medium ${item.amount < 0 ? "text-success" : "text-blue-900"}`, children: formatCurrency(item.amount, preview.currency) })
1781
+ /* @__PURE__ */ jsx24("span", { className: "text-muted-foreground", children: item.description }),
1782
+ /* @__PURE__ */ jsx24("span", { className: `font-medium ${item.amount < 0 ? "text-success" : "text-foreground"}`, children: formatCurrency(item.amount, preview.currency) })
1783
1783
  ] }, index)),
1784
- /* @__PURE__ */ jsx24("div", { className: "border-t border-blue-200 pt-2 mt-2", children: /* @__PURE__ */ jsxs21("div", { className: "flex justify-between font-semibold", children: [
1785
- /* @__PURE__ */ jsx24("span", { className: "text-blue-900", children: "Net Due Today" }),
1786
- /* @__PURE__ */ jsx24("span", { className: "text-blue-900", children: formatCurrency(preview.immediateCharge, preview.currency) })
1784
+ /* @__PURE__ */ jsx24("div", { className: "border-primary/30 mt-2 border-t pt-2", children: /* @__PURE__ */ jsxs21("div", { className: "flex justify-between font-semibold", children: [
1785
+ /* @__PURE__ */ jsx24("span", { className: "text-foreground", children: "Net Due Today" }),
1786
+ /* @__PURE__ */ jsx24("span", { className: "text-foreground", children: formatCurrency(preview.immediateCharge, preview.currency) })
1787
1787
  ] }) }),
1788
- preview.lineItems.length > 0 && preview.lineItems[0].period && /* @__PURE__ */ jsxs21("div", { className: "text-xs text-blue-700 mt-2", children: [
1788
+ preview.lineItems.length > 0 && preview.lineItems[0].period && /* @__PURE__ */ jsxs21("div", { className: "text-muted-foreground mt-2 text-xs", children: [
1789
1789
  "Next invoice on ",
1790
1790
  formatDate3(preview.lineItems[0].period.end),
1791
1791
  " for",
@@ -2205,7 +2205,7 @@ function PromoCodeInput({
2205
2205
  }, "formatDuration");
2206
2206
  if (appliedCode?.valid) {
2207
2207
  return /* @__PURE__ */ jsxs25("div", { className: "space-y-2", children: [
2208
- /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between p-3 bg-green-50 border border-green-200 rounded-lg", children: [
2208
+ /* @__PURE__ */ jsxs25("div", { className: "bg-success/15 border-success/30 flex items-center justify-between rounded-lg border p-3", children: [
2209
2209
  /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
2210
2210
  /* @__PURE__ */ jsx28(Check4, { className: "text-success h-4 w-4" }),
2211
2211
  /* @__PURE__ */ jsx28("span", { className: "text-success font-medium", children: appliedCode.code }),
@@ -2218,7 +2218,7 @@ function PromoCodeInput({
2218
2218
  size: "sm",
2219
2219
  onClick: onRemove,
2220
2220
  disabled,
2221
- className: "text-success hover:bg-green-100 hover:text-success",
2221
+ className: "text-success hover:bg-success/25 hover:text-success",
2222
2222
  children: /* @__PURE__ */ jsx28(X, { className: "h-4 w-4" })
2223
2223
  }
2224
2224
  )
@@ -2330,13 +2330,13 @@ function WizardStepReview({
2330
2330
  isChangingPlan && prorationPreview && /* @__PURE__ */ jsxs26(
2331
2331
  "div",
2332
2332
  {
2333
- className: `${isTrialUpgrade ? "bg-amber-50 border-amber-200" : "bg-blue-50 border-blue-200"} border rounded-lg p-4 space-y-2`,
2333
+ className: `${isTrialUpgrade ? "bg-warning/15 border-warning/30" : "bg-primary/10 border-primary/30"} space-y-2 rounded-lg border p-4`,
2334
2334
  children: [
2335
- /* @__PURE__ */ jsx29("h4", { className: `font-medium ${isTrialUpgrade ? "text-warning" : "text-blue-800"}`, children: isTrialUpgrade ? "Trial Upgrade" : "Proration Summary" }),
2336
- /* @__PURE__ */ jsx29("p", { className: `text-sm ${isTrialUpgrade ? "text-warning" : "text-blue-700"}`, children: isTrialUpgrade ? "Your trial will end immediately and you will be charged the full price." : "Your next charge will be adjusted to account for the plan change." }),
2335
+ /* @__PURE__ */ jsx29("h4", { className: `font-medium ${isTrialUpgrade ? "text-warning" : "text-primary"}`, children: isTrialUpgrade ? "Trial Upgrade" : "Proration Summary" }),
2336
+ /* @__PURE__ */ jsx29("p", { className: `text-sm ${isTrialUpgrade ? "text-warning" : "text-foreground"}`, children: isTrialUpgrade ? "Your trial will end immediately and you will be charged the full price." : "Your next charge will be adjusted to account for the plan change." }),
2337
2337
  /* @__PURE__ */ jsxs26("div", { className: "flex justify-between text-sm", children: [
2338
- /* @__PURE__ */ jsx29("span", { className: `${isTrialUpgrade ? "text-warning" : "text-blue-600"}`, children: isTrialUpgrade ? "Amount to charge now:" : "Amount due now:" }),
2339
- /* @__PURE__ */ jsx29("span", { className: `font-medium ${isTrialUpgrade ? "text-warning" : "text-blue-800"}`, children: discountedImmediateCharge !== null ? /* @__PURE__ */ jsxs26(Fragment6, { children: [
2338
+ /* @__PURE__ */ jsx29("span", { className: `${isTrialUpgrade ? "text-warning" : "text-muted-foreground"}`, children: isTrialUpgrade ? "Amount to charge now:" : "Amount due now:" }),
2339
+ /* @__PURE__ */ jsx29("span", { className: `font-medium ${isTrialUpgrade ? "text-warning" : "text-foreground"}`, children: discountedImmediateCharge !== null ? /* @__PURE__ */ jsxs26(Fragment6, { children: [
2340
2340
  /* @__PURE__ */ jsx29("span", { className: "line-through text-muted-foreground mr-2", children: formatCurrency(prorationPreview.immediateCharge, prorationPreview.currency) }),
2341
2341
  /* @__PURE__ */ jsx29("span", { className: "text-success", children: formatCurrency(discountedImmediateCharge, prorationPreview.currency) })
2342
2342
  ] }) : formatCurrency(prorationPreview.immediateCharge, prorationPreview.currency) })
@@ -3265,9 +3265,9 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
3265
3265
  /* @__PURE__ */ jsx40(DialogTitle, { children: isEditMode ? "Edit Price" : "Create Price" }),
3266
3266
  /* @__PURE__ */ jsx40(DialogDescription, { children: isEditMode ? "Update the price details. Note: Only nickname and active status can be changed." : "Create a new price for this product" })
3267
3267
  ] }),
3268
- isEditMode && /* @__PURE__ */ jsxs35("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4 flex gap-x-3", children: [
3269
- /* @__PURE__ */ jsx40(AlertCircle3, { className: "h-5 w-5 text-blue-600 flex-shrink-0 mt-0.5" }),
3270
- /* @__PURE__ */ jsxs35("div", { className: "text-sm text-blue-800", children: [
3268
+ isEditMode && /* @__PURE__ */ jsxs35("div", { className: "bg-primary/10 border-primary/30 flex gap-x-3 rounded-lg border p-4", children: [
3269
+ /* @__PURE__ */ jsx40(AlertCircle3, { className: "text-primary mt-0.5 h-5 w-5 flex-shrink-0" }),
3270
+ /* @__PURE__ */ jsxs35("div", { className: "text-foreground text-sm", children: [
3271
3271
  /* @__PURE__ */ jsx40("p", { className: "font-semibold mb-1", children: "Stripe Price Immutability" }),
3272
3272
  /* @__PURE__ */ jsx40("p", { children: "Due to Stripe's architecture, only the nickname and active status can be modified after creation. To change amount, currency, or billing interval, create a new price." })
3273
3273
  ] })