@carlonicora/nextjs-jsonapi 6.27.0 → 6.28.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.
- package/dist/{BlockNoteEditor-D2DXVXTJ.mjs → BlockNoteEditor-2LO34HXR.mjs} +2 -2
- package/dist/{BlockNoteEditor-NQB75M47.js → BlockNoteEditor-SWDRMNLT.js} +9 -9
- package/dist/{BlockNoteEditor-NQB75M47.js.map → BlockNoteEditor-SWDRMNLT.js.map} +1 -1
- package/dist/billing/index.js +378 -378
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-YGV27OAW.js → chunk-6RWEYSYE.js} +27 -5
- package/dist/chunk-6RWEYSYE.js.map +1 -0
- package/dist/{chunk-HU3AGUFI.mjs → chunk-NV3NNNS6.mjs} +27 -5
- package/dist/chunk-NV3NNNS6.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/containers/RoundPageContainer.d.ts +3 -1
- package/dist/components/containers/RoundPageContainer.d.ts.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/components/typography/DetailField.d.ts +3 -1
- package/dist/components/typography/DetailField.d.ts.map +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/email-automations/index.js +78 -78
- package/dist/email-automations/index.mjs +1 -1
- package/dist/features/analytics/index.js +107 -107
- package/dist/features/analytics/index.mjs +1 -1
- package/dist/features/blog/index.js +93 -93
- package/dist/features/blog/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 +102 -102
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/containers/RoundPageContainer.tsx +21 -2
- package/src/components/containers/__tests__/RoundPageContainer.detailsSurface.spec.tsx +82 -0
- package/src/components/typography/DetailField.tsx +4 -1
- package/src/components/typography/__tests__/DetailField.spec.tsx +13 -0
- package/dist/chunk-HU3AGUFI.mjs.map +0 -1
- package/dist/chunk-YGV27OAW.js.map +0 -1
- /package/dist/{BlockNoteEditor-D2DXVXTJ.mjs.map → BlockNoteEditor-2LO34HXR.mjs.map} +0 -0
|
@@ -23,7 +23,7 @@ var _chunkYBZVWLPHjs = require('../../chunk-YBZVWLPH.js');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunk6RWEYSYEjs = require('../../chunk-6RWEYSYE.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkSYMI4IDWjs = require('../../chunk-SYMI4IDW.js');
|
|
@@ -85,29 +85,29 @@ var _lucidereact = require('lucide-react');
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
function HelpAssistantSheet({ open, onOpenChange }) {
|
|
88
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
89
|
-
|
|
88
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6RWEYSYEjs.Sheet, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
89
|
+
_chunk6RWEYSYEjs.SheetContent,
|
|
90
90
|
{
|
|
91
91
|
side: "end",
|
|
92
92
|
className: "flex w-full flex-col data-[side=right]:sm:max-w-2xl data-[side=right]:lg:max-w-3xl data-[side=left]:sm:max-w-2xl data-[side=left]:lg:max-w-3xl",
|
|
93
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
93
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6RWEYSYEjs.AssistantProvider, { manageUrl: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpAssistantSheetBody, {}) })
|
|
94
94
|
}
|
|
95
95
|
) });
|
|
96
96
|
}
|
|
97
97
|
_chunk7QVYU63Ejs.__name.call(void 0, HelpAssistantSheet, "HelpAssistantSheet");
|
|
98
98
|
function HelpAssistantSheetBody() {
|
|
99
99
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
100
|
-
const ctx =
|
|
100
|
+
const ctx = _chunk6RWEYSYEjs.useAssistantContext.call(void 0, );
|
|
101
101
|
const showThread = !!ctx.assistant || ctx.sending || ctx.messages.length > 0;
|
|
102
102
|
const send = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (content) => ctx.sendMessage(content, { howToMode: true }), "send");
|
|
103
103
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
104
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
105
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
106
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
104
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6RWEYSYEjs.SheetHeader, { children: [
|
|
105
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6RWEYSYEjs.SheetTitle, { children: t("help.askAi.sheet.title") }),
|
|
106
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6RWEYSYEjs.SheetDescription, { children: t("help.askAi.sheet.subtitle") })
|
|
107
107
|
] }),
|
|
108
|
-
!showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
108
|
+
!showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6RWEYSYEjs.AssistantEmptyState, { onSend: send }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
109
109
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
110
|
-
|
|
110
|
+
_chunk6RWEYSYEjs.AssistantThread,
|
|
111
111
|
{
|
|
112
112
|
messages: ctx.messages,
|
|
113
113
|
sending: ctx.sending,
|
|
@@ -117,7 +117,7 @@ function HelpAssistantSheetBody() {
|
|
|
117
117
|
onRetry: ctx.retrySend
|
|
118
118
|
}
|
|
119
119
|
),
|
|
120
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
120
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6RWEYSYEjs.AssistantComposer, { onSend: send, disabled: ctx.sending })
|
|
121
121
|
] })
|
|
122
122
|
] });
|
|
123
123
|
}
|
|
@@ -127,20 +127,20 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpAssistantSheetBody, "HelpAssistantSheet
|
|
|
127
127
|
|
|
128
128
|
function HelpAskAi() {
|
|
129
129
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
130
|
-
const { currentUser } =
|
|
130
|
+
const { currentUser } = _chunk6RWEYSYEjs.useCurrentUserContext.call(void 0, );
|
|
131
131
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
132
132
|
const disabled = !currentUser;
|
|
133
133
|
if (disabled) {
|
|
134
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
135
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
134
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6RWEYSYEjs.Tooltip, { children: [
|
|
135
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6RWEYSYEjs.TooltipTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6RWEYSYEjs.Button, { variant: "outline", size: "sm", disabled: true }), children: [
|
|
136
136
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SparklesIcon, { className: "h-4 w-4" }),
|
|
137
137
|
t("help.askAi.button")
|
|
138
138
|
] }),
|
|
139
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
139
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6RWEYSYEjs.TooltipContent, { children: t("help.askAi.loginTooltip") })
|
|
140
140
|
] });
|
|
141
141
|
}
|
|
142
142
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
143
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
143
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6RWEYSYEjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
|
|
144
144
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SparklesIcon, { className: "h-4 w-4" }),
|
|
145
145
|
t("help.askAi.button")
|
|
146
146
|
] }),
|
|
@@ -153,7 +153,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpAskAi, "HelpAskAi");
|
|
|
153
153
|
|
|
154
154
|
function HelpHeader() {
|
|
155
155
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
156
|
-
const { currentUser } =
|
|
156
|
+
const { currentUser } = _chunk6RWEYSYEjs.useCurrentUserContext.call(void 0, );
|
|
157
157
|
const { brand } = useHelp();
|
|
158
158
|
const logo = _optionalChain([brand, 'optionalAccess', _ => _.logo]);
|
|
159
159
|
const label = _nullishCoalesce(_optionalChain([brand, 'optionalAccess', _2 => _2.label]), () => ( t("help.title")));
|
|
@@ -169,7 +169,7 @@ function HelpHeader() {
|
|
|
169
169
|
] }),
|
|
170
170
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 max-md:shrink-0", children: [
|
|
171
171
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpAskAi, {}),
|
|
172
|
-
currentUser ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: appHref, className:
|
|
172
|
+
currentUser ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: appHref, className: _chunk6RWEYSYEjs.buttonVariants.call(void 0, { variant: "outline", size: "sm" }), children: t("help.header.openApp") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: "/login", className: _chunk6RWEYSYEjs.buttonVariants.call(void 0, { variant: "outline", size: "sm" }), children: t("help.header.login") })
|
|
173
173
|
] })
|
|
174
174
|
] });
|
|
175
175
|
}
|
|
@@ -211,7 +211,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, useHelpFilter, "useHelpFilter");
|
|
|
211
211
|
|
|
212
212
|
function HelpSideNav() {
|
|
213
213
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
214
|
-
const generateUrl =
|
|
214
|
+
const generateUrl = _chunk6RWEYSYEjs.usePageUrlGenerator.call(void 0, );
|
|
215
215
|
const pathname = _navigation.usePathname.call(void 0, );
|
|
216
216
|
const [articles, setArticles] = _react.useState.call(void 0, []);
|
|
217
217
|
_react.useEffect.call(void 0, () => {
|
|
@@ -292,7 +292,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpSideNav, "HelpSideNav");
|
|
|
292
292
|
function HelpArticleBody(props) {
|
|
293
293
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
294
294
|
const dates = _chunkSYMI4IDWjs.useDateFormatter.call(void 0, );
|
|
295
|
-
const generateUrl =
|
|
295
|
+
const generateUrl = _chunk6RWEYSYEjs.usePageUrlGenerator.call(void 0, );
|
|
296
296
|
const { howToType, title, summary, updatedAt, prev, next, children } = props;
|
|
297
297
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "article", { className: "prose dark:prose-invert max-w-none", children: [
|
|
298
298
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "nav", { className: "text-muted-foreground mb-2 text-xs", children: [
|
|
@@ -349,7 +349,7 @@ function HelpTOC({ headings }) {
|
|
|
349
349
|
}, [headings]);
|
|
350
350
|
if (headings.length === 0) return null;
|
|
351
351
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "nav", { "aria-label": t("help.toc.title"), className: "hidden lg:block", children: [
|
|
352
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
352
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6RWEYSYEjs.MicroLabel, { className: "mb-2", children: t("help.toc.title") }),
|
|
353
353
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: "space-y-1 text-sm", children: headings.map((h) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { style: { paddingInlineStart: `${(h.depth - 2) * 0.75}rem` }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
354
354
|
"a",
|
|
355
355
|
{
|
|
@@ -370,7 +370,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpTOC, "HelpTOC");
|
|
|
370
370
|
|
|
371
371
|
function HelpHint({ contextKey }) {
|
|
372
372
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
373
|
-
const generateUrl =
|
|
373
|
+
const generateUrl = _chunk6RWEYSYEjs.usePageUrlGenerator.call(void 0, );
|
|
374
374
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
375
375
|
const [picked, setPicked] = _react.useState.call(void 0, null);
|
|
376
376
|
const [articles, setArticles] = _react.useState.call(void 0, []);
|
|
@@ -388,7 +388,7 @@ function HelpHint({ contextKey }) {
|
|
|
388
388
|
if (matches.length === 0) return null;
|
|
389
389
|
const active = _nullishCoalesce(picked, () => ( (matches.length === 1 ? matches[0] : null)));
|
|
390
390
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
391
|
-
|
|
391
|
+
_chunk6RWEYSYEjs.Sheet,
|
|
392
392
|
{
|
|
393
393
|
open,
|
|
394
394
|
onOpenChange: (o) => {
|
|
@@ -396,11 +396,11 @@ function HelpHint({ contextKey }) {
|
|
|
396
396
|
if (!o) setPicked(null);
|
|
397
397
|
},
|
|
398
398
|
children: [
|
|
399
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
400
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
401
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
402
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
403
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
399
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6RWEYSYEjs.SheetTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6RWEYSYEjs.Button, { variant: "ghost", size: "icon-sm", "aria-label": t("help.hint.trigger") }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.HelpCircleIcon, { className: "h-4 w-4" }) }),
|
|
400
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6RWEYSYEjs.SheetContent, { side: "end", className: "w-full max-w-md sm:max-w-lg", children: [
|
|
401
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6RWEYSYEjs.SheetHeader, { children: [
|
|
402
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6RWEYSYEjs.SheetTitle, { children: active ? active.name : t("help.hint.pickArticle") }),
|
|
403
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6RWEYSYEjs.SheetDescription, { children: _nullishCoalesce(_optionalChain([active, 'optionalAccess', _4 => _4.summary]), () => ( "")) })
|
|
404
404
|
] }),
|
|
405
405
|
active ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-4 space-y-3", children: [
|
|
406
406
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: active.summary }),
|
|
@@ -432,7 +432,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpHint, "HelpHint");
|
|
|
432
432
|
|
|
433
433
|
function HelpSearchResultRow({ result, onSelect }) {
|
|
434
434
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
435
|
-
const generateUrl =
|
|
435
|
+
const generateUrl = _chunk6RWEYSYEjs.usePageUrlGenerator.call(void 0, );
|
|
436
436
|
const [article, setArticle] = _react.useState.call(void 0, null);
|
|
437
437
|
_react.useEffect.call(void 0, () => {
|
|
438
438
|
let active = true;
|
|
@@ -443,7 +443,7 @@ function HelpSearchResultRow({ result, onSelect }) {
|
|
|
443
443
|
}, [result.id]);
|
|
444
444
|
if (!article) {
|
|
445
445
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
446
|
-
|
|
446
|
+
_chunk6RWEYSYEjs.CommandItem,
|
|
447
447
|
{
|
|
448
448
|
value: result.id,
|
|
449
449
|
disabled: true,
|
|
@@ -452,7 +452,7 @@ function HelpSearchResultRow({ result, onSelect }) {
|
|
|
452
452
|
}
|
|
453
453
|
);
|
|
454
454
|
}
|
|
455
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
455
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6RWEYSYEjs.CommandItem, { value: result.id, onSelect, className: "cursor-pointer p-0", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
456
456
|
_link2.default,
|
|
457
457
|
{
|
|
458
458
|
href: generateUrl({ page: `/help/${article.howToType}/${article.slug}` }),
|