@carlonicora/nextjs-jsonapi 6.28.0 → 6.29.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-2LO34HXR.mjs → BlockNoteEditor-BHCNJ2JA.mjs} +8 -60
- package/dist/BlockNoteEditor-BHCNJ2JA.mjs.map +1 -0
- package/dist/{BlockNoteEditor-SWDRMNLT.js → BlockNoteEditor-KGCHQQVY.js} +21 -73
- package/dist/BlockNoteEditor-KGCHQQVY.js.map +1 -0
- package/dist/billing/index.js +378 -378
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-NV3NNNS6.mjs → chunk-UQFDOZVF.mjs} +66 -5
- package/dist/chunk-UQFDOZVF.mjs.map +1 -0
- package/dist/{chunk-6RWEYSYE.js → chunk-WXTEAATG.js} +67 -6
- package/dist/chunk-WXTEAATG.js.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/editors/BlockNoteEditorMentionHoverCard.d.ts.map +1 -1
- package/dist/components/editors/BlockNoteEditorMentionInlineContent.d.ts +2 -0
- package/dist/components/editors/BlockNoteEditorMentionInlineContent.d.ts.map +1 -1
- package/dist/components/editors/index.d.ts +1 -0
- package/dist/components/editors/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -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/editors/BlockNoteEditorMentionHoverCard.tsx +8 -1
- package/src/components/editors/BlockNoteEditorMentionInlineContent.tsx +3 -1
- package/src/components/editors/__tests__/BlockNoteEditorMentionHoverCard.spec.tsx +42 -0
- package/src/components/editors/__tests__/BlockNoteEditorMentionInlineContent.spec.ts +30 -2
- package/src/components/editors/__tests__/blocknote-editor-options.spec.ts +8 -0
- package/src/components/editors/index.ts +1 -0
- package/dist/BlockNoteEditor-2LO34HXR.mjs.map +0 -1
- package/dist/BlockNoteEditor-SWDRMNLT.js.map +0 -1
- package/dist/chunk-6RWEYSYE.js.map +0 -1
- package/dist/chunk-NV3NNNS6.mjs.map +0 -1
package/dist/billing/index.mjs
CHANGED
|
@@ -10876,7 +10876,7 @@ import { useRef as useRef18 } from "react";
|
|
|
10876
10876
|
import dynamic from "next/dynamic";
|
|
10877
10877
|
import React18 from "react";
|
|
10878
10878
|
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
10879
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10879
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-BHCNJ2JA.mjs"), {
|
|
10880
10880
|
ssr: false
|
|
10881
10881
|
});
|
|
10882
10882
|
var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -17055,9 +17055,10 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
17055
17055
|
top: rect.bottom + 4,
|
|
17056
17056
|
// rtl-ok: viewport-anchored floating position
|
|
17057
17057
|
left: rect.left,
|
|
17058
|
-
zIndex: 50
|
|
17058
|
+
zIndex: 50,
|
|
17059
|
+
...resolved.hoverFrameless ? { maxHeight: Math.max(240, window.innerHeight - rect.bottom - 12), overflowY: "auto" } : {}
|
|
17059
17060
|
},
|
|
17060
|
-
className: "bg-popover text-popover-foreground rounded-lg border p-2.5 text-xs shadow-md animate-in fade-in-0 zoom-in-95 duration-100",
|
|
17061
|
+
className: resolved.hoverFrameless ? "animate-in fade-in-0 zoom-in-95 duration-100" : "bg-popover text-popover-foreground rounded-lg border p-2.5 text-xs shadow-md animate-in fade-in-0 zoom-in-95 duration-100",
|
|
17061
17062
|
children: /* @__PURE__ */ jsx175(ContentComponent, { id: hovered.id, entityType: hovered.entityType, alias: hovered.alias })
|
|
17062
17063
|
}
|
|
17063
17064
|
),
|
|
@@ -17095,7 +17096,7 @@ var createMentionInlineContentSpec = /* @__PURE__ */ __name((resolveFn, disableM
|
|
|
17095
17096
|
const displayName = nameResolver?.(props.id, props.entityType, props.alias) ?? props.alias;
|
|
17096
17097
|
if (disableMention) {
|
|
17097
17098
|
const resolved2 = resolveFn?.(props.id, props.entityType, displayName);
|
|
17098
|
-
return /* @__PURE__ */ jsxs99(Link3, { href: resolved2?.url ?? "#", className: "text-primary", children: [
|
|
17099
|
+
return /* @__PURE__ */ jsxs99(Link3, { href: resolved2?.url ?? "#", className: "text-primary", "data-mention-link": "", children: [
|
|
17099
17100
|
"@",
|
|
17100
17101
|
displayName
|
|
17101
17102
|
] });
|
|
@@ -17249,6 +17250,62 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
17249
17250
|
}
|
|
17250
17251
|
__name(BlockNoteEditorMentionSuggestionMenu, "BlockNoteEditorMentionSuggestionMenu");
|
|
17251
17252
|
|
|
17253
|
+
// src/components/editors/blockNoteEditorOptions.ts
|
|
17254
|
+
import * as coreLocales from "@blocknote/core/locales";
|
|
17255
|
+
import { withCollaboration } from "@blocknote/core/yjs";
|
|
17256
|
+
function buildBlockNoteEditorOptions(params) {
|
|
17257
|
+
const { aiExtension, coreDictionary, aiDictionary, collaboration } = params;
|
|
17258
|
+
const options = {
|
|
17259
|
+
placeholders: {
|
|
17260
|
+
emptyDocument: params.placeholder
|
|
17261
|
+
},
|
|
17262
|
+
schema: params.schema,
|
|
17263
|
+
uploadFile: params.disableUploads ? void 0 : params.uploadFile,
|
|
17264
|
+
extensions: aiExtension ? [aiExtension] : void 0,
|
|
17265
|
+
dictionary: aiExtension ? { ...coreDictionary, ai: aiDictionary } : coreDictionary === coreLocales.en ? void 0 : coreDictionary
|
|
17266
|
+
};
|
|
17267
|
+
if (collaboration) return withCollaboration({ ...options, collaboration });
|
|
17268
|
+
return { ...options, initialContent: params.initialContent };
|
|
17269
|
+
}
|
|
17270
|
+
__name(buildBlockNoteEditorOptions, "buildBlockNoteEditorOptions");
|
|
17271
|
+
function resolveEditable(params) {
|
|
17272
|
+
return params.editable !== void 0 ? params.editable : params.onChange !== void 0;
|
|
17273
|
+
}
|
|
17274
|
+
__name(resolveEditable, "resolveEditable");
|
|
17275
|
+
function isBlockEmpty(block) {
|
|
17276
|
+
if (!block || typeof block !== "object") return true;
|
|
17277
|
+
if (block.type !== "paragraph") return false;
|
|
17278
|
+
if (Array.isArray(block.children) && block.children.length > 0 && !isDocumentEmpty(block.children)) {
|
|
17279
|
+
return false;
|
|
17280
|
+
}
|
|
17281
|
+
if (Array.isArray(block.content)) {
|
|
17282
|
+
for (const inline of block.content) {
|
|
17283
|
+
if (typeof inline === "string") {
|
|
17284
|
+
if (inline.trim()) return false;
|
|
17285
|
+
} else if (inline && typeof inline === "object") {
|
|
17286
|
+
if (inline.type !== "text") return false;
|
|
17287
|
+
if (typeof inline.text === "string" && inline.text.trim()) return false;
|
|
17288
|
+
}
|
|
17289
|
+
}
|
|
17290
|
+
} else if (typeof block.content === "string" && block.content.trim()) {
|
|
17291
|
+
return false;
|
|
17292
|
+
}
|
|
17293
|
+
return true;
|
|
17294
|
+
}
|
|
17295
|
+
__name(isBlockEmpty, "isBlockEmpty");
|
|
17296
|
+
function isDocumentEmpty(blocks) {
|
|
17297
|
+
if (!Array.isArray(blocks) || blocks.length === 0) return true;
|
|
17298
|
+
return blocks.every(isBlockEmpty);
|
|
17299
|
+
}
|
|
17300
|
+
__name(isDocumentEmpty, "isDocumentEmpty");
|
|
17301
|
+
function removeTrailingEmptyBlocks(blocks) {
|
|
17302
|
+
if (!blocks || blocks.length === 0) return blocks;
|
|
17303
|
+
const result = [...blocks];
|
|
17304
|
+
while (result.length > 1 && isBlockEmpty(result[result.length - 1])) result.pop();
|
|
17305
|
+
return result;
|
|
17306
|
+
}
|
|
17307
|
+
__name(removeTrailingEmptyBlocks, "removeTrailingEmptyBlocks");
|
|
17308
|
+
|
|
17252
17309
|
// src/components/viewers/BlockNoteViewerContainer.tsx
|
|
17253
17310
|
import dynamic2 from "next/dynamic";
|
|
17254
17311
|
import React29 from "react";
|
|
@@ -30715,6 +30772,10 @@ export {
|
|
|
30715
30772
|
UsersListByContentIds,
|
|
30716
30773
|
AllowedUsersDetails,
|
|
30717
30774
|
ErrorDetails,
|
|
30775
|
+
buildBlockNoteEditorOptions,
|
|
30776
|
+
resolveEditable,
|
|
30777
|
+
isDocumentEmpty,
|
|
30778
|
+
removeTrailingEmptyBlocks,
|
|
30718
30779
|
BlockNoteEditorMentionHoverCard,
|
|
30719
30780
|
mentionDataAttrs,
|
|
30720
30781
|
parseMentionElement,
|
|
@@ -31001,4 +31062,4 @@ export {
|
|
|
31001
31062
|
useOAuthClients,
|
|
31002
31063
|
useOAuthClient
|
|
31003
31064
|
};
|
|
31004
|
-
//# sourceMappingURL=chunk-
|
|
31065
|
+
//# sourceMappingURL=chunk-UQFDOZVF.mjs.map
|