@carlonicora/nextjs-jsonapi 1.106.2 → 1.107.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-Z3LF4LFQ.mjs → BlockNoteEditor-7TSK7PNG.mjs} +278 -15
- package/dist/BlockNoteEditor-7TSK7PNG.mjs.map +1 -0
- package/dist/{BlockNoteEditor-54ZSYWYM.js → BlockNoteEditor-RWRVIEZC.js} +285 -22
- package/dist/BlockNoteEditor-RWRVIEZC.js.map +1 -0
- package/dist/billing/index.js +299 -299
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-UB7VGH2D.js → chunk-2IRWQVG4.js} +131 -104
- package/dist/chunk-2IRWQVG4.js.map +1 -0
- package/dist/{chunk-THZ4W7TG.mjs → chunk-WSOPEIRP.mjs} +31 -4
- package/dist/chunk-WSOPEIRP.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.d.mts +15 -2
- package/dist/components/index.d.ts +15 -2
- 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/package.json +3 -1
- package/src/components/editors/BlockNoteEditor.tsx +356 -5
- package/src/components/editors/BlockNoteEditorFormattingToolbar.tsx +4 -1
- package/src/components/editors/BlockNoteEditorMentionInlineContent.tsx +27 -0
- package/src/components/editors/__tests__/BlockNoteEditorMentionInlineContent.test.ts +97 -0
- package/src/components/editors/index.ts +1 -0
- package/src/components/forms/FormBlockNote.tsx +4 -0
- package/dist/BlockNoteEditor-54ZSYWYM.js.map +0 -1
- package/dist/BlockNoteEditor-Z3LF4LFQ.mjs.map +0 -1
- package/dist/chunk-THZ4W7TG.mjs.map +0 -1
- package/dist/chunk-UB7VGH2D.js.map +0 -1
|
@@ -9588,7 +9588,7 @@ import { useRef as useRef15 } from "react";
|
|
|
9588
9588
|
import dynamic from "next/dynamic";
|
|
9589
9589
|
import React15 from "react";
|
|
9590
9590
|
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
9591
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
9591
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-7TSK7PNG.mjs"), {
|
|
9592
9592
|
ssr: false
|
|
9593
9593
|
});
|
|
9594
9594
|
var BlockNoteEditorContainer = React15.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -9617,7 +9617,8 @@ function FormBlockNote({
|
|
|
9617
9617
|
mentionResolveFn,
|
|
9618
9618
|
suggestionMenuComponent,
|
|
9619
9619
|
mentionNameResolver,
|
|
9620
|
-
onWarmMentions
|
|
9620
|
+
onWarmMentions,
|
|
9621
|
+
aiConfig
|
|
9621
9622
|
}) {
|
|
9622
9623
|
const initialContentRef = useRef15(null);
|
|
9623
9624
|
const lastEditorContentRef = useRef15(void 0);
|
|
@@ -9665,6 +9666,8 @@ function FormBlockNote({
|
|
|
9665
9666
|
suggestionMenuComponent,
|
|
9666
9667
|
mentionNameResolver,
|
|
9667
9668
|
onWarmMentions,
|
|
9669
|
+
aiConfig,
|
|
9670
|
+
stretch,
|
|
9668
9671
|
className: cn(stretch && "min-h-0 flex-1")
|
|
9669
9672
|
}
|
|
9670
9673
|
);
|
|
@@ -14147,7 +14150,21 @@ var mentionDataAttrs = /* @__PURE__ */ __name((p) => ({
|
|
|
14147
14150
|
"data-mention-type": p.entityType,
|
|
14148
14151
|
"data-mention-alias": p.alias
|
|
14149
14152
|
}), "mentionDataAttrs");
|
|
14153
|
+
var parseMentionElement = /* @__PURE__ */ __name((element) => {
|
|
14154
|
+
const id = element.getAttribute("data-mention-id");
|
|
14155
|
+
const entityType = element.getAttribute("data-mention-type");
|
|
14156
|
+
const alias = element.getAttribute("data-mention-alias");
|
|
14157
|
+
if (!id || !entityType || !alias) return void 0;
|
|
14158
|
+
return { id, entityType, alias };
|
|
14159
|
+
}, "parseMentionElement");
|
|
14150
14160
|
var createMentionInlineContentSpec = /* @__PURE__ */ __name((resolveFn, disableMention, nameResolver) => {
|
|
14161
|
+
const MentionExternalHTML = /* @__PURE__ */ __name((props) => {
|
|
14162
|
+
const displayName = nameResolver?.(props.id, props.entityType, props.alias) ?? props.alias;
|
|
14163
|
+
return /* @__PURE__ */ jsxs91("span", { "data-mention-id": props.id, "data-mention-type": props.entityType, "data-mention-alias": props.alias, children: [
|
|
14164
|
+
"@",
|
|
14165
|
+
displayName
|
|
14166
|
+
] });
|
|
14167
|
+
}, "MentionExternalHTML");
|
|
14151
14168
|
const Mention = React22.memo(/* @__PURE__ */ __name(function Mention2(props) {
|
|
14152
14169
|
const displayName = nameResolver?.(props.id, props.entityType, props.alias) ?? props.alias;
|
|
14153
14170
|
if (disableMention) {
|
|
@@ -14196,7 +14213,16 @@ var createMentionInlineContentSpec = /* @__PURE__ */ __name((resolveFn, disableM
|
|
|
14196
14213
|
entityType: props.inlineContent.props.entityType,
|
|
14197
14214
|
alias: props.inlineContent.props.alias
|
|
14198
14215
|
}
|
|
14199
|
-
), "render")
|
|
14216
|
+
), "render"),
|
|
14217
|
+
toExternalHTML: /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsx152(
|
|
14218
|
+
MentionExternalHTML,
|
|
14219
|
+
{
|
|
14220
|
+
id: props.inlineContent.props.id,
|
|
14221
|
+
entityType: props.inlineContent.props.entityType,
|
|
14222
|
+
alias: props.inlineContent.props.alias
|
|
14223
|
+
}
|
|
14224
|
+
), "toExternalHTML"),
|
|
14225
|
+
parse: /* @__PURE__ */ __name((element) => parseMentionElement(element), "parse")
|
|
14200
14226
|
}
|
|
14201
14227
|
);
|
|
14202
14228
|
}, "createMentionInlineContentSpec");
|
|
@@ -22329,6 +22355,7 @@ export {
|
|
|
22329
22355
|
ErrorDetails,
|
|
22330
22356
|
BlockNoteEditorMentionHoverCard,
|
|
22331
22357
|
mentionDataAttrs,
|
|
22358
|
+
parseMentionElement,
|
|
22332
22359
|
createMentionInlineContentSpec,
|
|
22333
22360
|
useMentionInsert,
|
|
22334
22361
|
BlockNoteEditorMentionSuggestionMenu,
|
|
@@ -22508,4 +22535,4 @@ export {
|
|
|
22508
22535
|
useOAuthClients,
|
|
22509
22536
|
useOAuthClient
|
|
22510
22537
|
};
|
|
22511
|
-
//# sourceMappingURL=chunk-
|
|
22538
|
+
//# sourceMappingURL=chunk-WSOPEIRP.mjs.map
|