@carlonicora/nextjs-jsonapi 2.0.0 → 2.0.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.
- package/dist/{BlockNoteEditor-LMKWUOJG.js → BlockNoteEditor-6TYNLQ4S.js} +9 -9
- package/dist/{BlockNoteEditor-LMKWUOJG.js.map → BlockNoteEditor-6TYNLQ4S.js.map} +1 -1
- package/dist/{BlockNoteEditor-34QM4UR5.mjs → BlockNoteEditor-HMQWM4TQ.mjs} +2 -2
- package/dist/billing/index.js +310 -310
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-F6PZZ4KI.js → chunk-R666YQGQ.js} +6 -5
- package/dist/chunk-R666YQGQ.js.map +1 -0
- package/dist/{chunk-UGSOBBZH.mjs → chunk-RVGBVVRD.mjs} +6 -5
- package/dist/{chunk-UGSOBBZH.mjs.map → chunk-RVGBVVRD.mjs.map} +1 -1
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/dist/features/tokenusage/index.js +56 -56
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/src/features/company/hooks/useSubscriptionStatus.test.ts +130 -0
- package/src/features/company/hooks/useSubscriptionStatus.ts +17 -5
- package/dist/chunk-F6PZZ4KI.js.map +0 -1
- /package/dist/{BlockNoteEditor-34QM4UR5.mjs.map → BlockNoteEditor-HMQWM4TQ.mjs.map} +0 -0
|
@@ -10164,7 +10164,7 @@ import { useRef as useRef17 } from "react";
|
|
|
10164
10164
|
import dynamic from "next/dynamic";
|
|
10165
10165
|
import React17 from "react";
|
|
10166
10166
|
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
10167
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10167
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-HMQWM4TQ.mjs"), {
|
|
10168
10168
|
ssr: false
|
|
10169
10169
|
});
|
|
10170
10170
|
var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -16145,7 +16145,7 @@ function useSubscriptionStatus() {
|
|
|
16145
16145
|
trialEndsAt: null,
|
|
16146
16146
|
daysRemaining: 0,
|
|
16147
16147
|
isGracePeriod: false,
|
|
16148
|
-
isBlocked:
|
|
16148
|
+
isBlocked: false
|
|
16149
16149
|
};
|
|
16150
16150
|
}
|
|
16151
16151
|
if (company.isActiveSubscription) {
|
|
@@ -16163,12 +16163,13 @@ function useSubscriptionStatus() {
|
|
|
16163
16163
|
const now = /* @__PURE__ */ new Date();
|
|
16164
16164
|
const msRemaining = trialEndsAt.getTime() - now.getTime();
|
|
16165
16165
|
const daysRemaining = Math.ceil(msRemaining / (1e3 * 60 * 60 * 24));
|
|
16166
|
+
const trialElapsed = daysRemaining <= 0;
|
|
16166
16167
|
return {
|
|
16167
|
-
status:
|
|
16168
|
+
status: trialElapsed ? "expired" : "trial",
|
|
16168
16169
|
trialEndsAt,
|
|
16169
16170
|
daysRemaining: Math.max(0, daysRemaining),
|
|
16170
16171
|
isGracePeriod: daysRemaining > 0 && daysRemaining <= GRACE_DAYS,
|
|
16171
|
-
isBlocked:
|
|
16172
|
+
isBlocked: trialElapsed
|
|
16172
16173
|
};
|
|
16173
16174
|
}, [company, currentUser]);
|
|
16174
16175
|
}
|
|
@@ -23950,4 +23951,4 @@ export {
|
|
|
23950
23951
|
useOAuthClients,
|
|
23951
23952
|
useOAuthClient
|
|
23952
23953
|
};
|
|
23953
|
-
//# sourceMappingURL=chunk-
|
|
23954
|
+
//# sourceMappingURL=chunk-RVGBVVRD.mjs.map
|