@haklex/rich-editor 0.4.0 → 0.5.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 (71) hide show
  1. package/README.md +9 -9
  2. package/dist/{AlertQuoteEditNode-C55sxsR3.js → AlertQuoteEditNode-DjObnJI6.js} +3 -3
  3. package/dist/{KaTeXRenderer-CQQT3BMw.js → KaTeXRenderer-CqnhvDmj.js} +37 -3
  4. package/dist/{MermaidPlugin-BrOr-wQi.js → MermaidPlugin-_gPgU34D.js} +2 -2
  5. package/dist/{extractPolls-DO31LNrp.js → PresentDialogContext-DKNicgia.js} +1 -43
  6. package/dist/{SubmitShortcutPlugin-u9xqY3GU.js → SubmitShortcutPlugin-CHn_HBJM.js} +6 -6
  7. package/dist/commands-entry.mjs +2 -2
  8. package/dist/components/RendererWrapper.d.ts +14 -4
  9. package/dist/components/RendererWrapper.d.ts.map +1 -1
  10. package/dist/components/decorators/AlertEditDecorator.d.ts.map +1 -1
  11. package/dist/components/decorators/BannerEditDecorator.d.ts.map +1 -1
  12. package/dist/components/decorators/CodeBlockEditDecorator.d.ts.map +1 -1
  13. package/dist/components/renderers/AlertStaticDecorator.d.ts.map +1 -1
  14. package/dist/components/renderers/BannerStaticDecorator.d.ts.map +1 -1
  15. package/dist/{config-B5BuLljq.js → config-EJe68p4h.js} +10 -397
  16. package/dist/config-edit.d.ts.map +1 -1
  17. package/dist/config.d.ts.map +1 -1
  18. package/dist/index.d.ts +1 -4
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.mjs +8 -8
  21. package/dist/{node-registry-DsyIROEM.js → node-registry-D9t5vPfY.js} +9 -318
  22. package/dist/nodes/CodeBlockNode.d.ts.map +1 -1
  23. package/dist/nodes/FootnoteNode.d.ts.map +1 -1
  24. package/dist/nodes/FootnoteSectionNode.d.ts.map +1 -1
  25. package/dist/nodes/ImageNode.d.ts.map +1 -1
  26. package/dist/nodes/KaTeXBlockNode.d.ts.map +1 -1
  27. package/dist/nodes/KaTeXInlineNode.d.ts.map +1 -1
  28. package/dist/nodes/LinkCardNode.d.ts.map +1 -1
  29. package/dist/nodes/MentionNode.d.ts.map +1 -1
  30. package/dist/nodes/MermaidNode.d.ts.map +1 -1
  31. package/dist/nodes/VideoNode.d.ts.map +1 -1
  32. package/dist/nodes-entry.d.ts +0 -3
  33. package/dist/nodes-entry.d.ts.map +1 -1
  34. package/dist/nodes-entry.mjs +5 -5
  35. package/dist/plugins-entry.mjs +2 -2
  36. package/dist/renderers-entry.d.ts +1 -2
  37. package/dist/renderers-entry.d.ts.map +1 -1
  38. package/dist/renderers-entry.mjs +2 -2
  39. package/dist/rich-editor.css +1 -1
  40. package/dist/static-entry.d.ts +1 -5
  41. package/dist/static-entry.d.ts.map +1 -1
  42. package/dist/static-entry.mjs +5 -5
  43. package/dist/styles/index.d.ts +0 -2
  44. package/dist/styles/index.d.ts.map +1 -1
  45. package/dist/{theme-B5B2EOWM.js → theme-DG7I1YM5.js} +15 -15
  46. package/dist/types/renderer-config.d.ts +28 -33
  47. package/dist/types/renderer-config.d.ts.map +1 -1
  48. package/dist/types/renderer-keys.d.ts +26 -0
  49. package/dist/types/renderer-keys.d.ts.map +1 -0
  50. package/dist/utils/text-selection.d.ts.map +1 -1
  51. package/package.json +4 -4
  52. package/dist/components/decorators/PollEditDecorator.d.ts +0 -13
  53. package/dist/components/decorators/PollEditDecorator.d.ts.map +0 -1
  54. package/dist/components/renderers/ChatRendererProps.d.ts +0 -19
  55. package/dist/components/renderers/ChatRendererProps.d.ts.map +0 -1
  56. package/dist/components/renderers/PollRenderer.d.ts +0 -3
  57. package/dist/components/renderers/PollRenderer.d.ts.map +0 -1
  58. package/dist/context/PollDataContext.d.ts +0 -11
  59. package/dist/context/PollDataContext.d.ts.map +0 -1
  60. package/dist/nodes/PollEditNode.d.ts +0 -14
  61. package/dist/nodes/PollEditNode.d.ts.map +0 -1
  62. package/dist/nodes/PollNode.d.ts +0 -52
  63. package/dist/nodes/PollNode.d.ts.map +0 -1
  64. package/dist/styles/poll-edit.css.d.ts +0 -43
  65. package/dist/styles/poll-edit.css.d.ts.map +0 -1
  66. package/dist/styles/poll.css.d.ts +0 -43
  67. package/dist/styles/poll.css.d.ts.map +0 -1
  68. package/dist/types/poll.d.ts +0 -36
  69. package/dist/types/poll.d.ts.map +0 -1
  70. package/dist/utils/extractPolls.d.ts +0 -4
  71. package/dist/utils/extractPolls.d.ts.map +0 -1
@@ -1,10 +1,10 @@
1
- import { A as AlertQuoteNode, C as ImageNode, E as FootnoteNode, F as useNestedContentRenderer, M as extractTextContent, _ as KaTeXInlineNode, b as KaTeXBlockNode, c as SpoilerNode, d as MermaidNode, i as TagNode, j as _defineProperty, m as MentionNode } from "./theme-B5B2EOWM.js";
2
- import { l as RendererWrapper, m as useVariant, s as useFootnoteDefinitions, u as createRendererDecoration } from "./KaTeXRenderer-CQQT3BMw.js";
1
+ import { A as AlertQuoteNode, C as ImageNode, E as FootnoteNode, F as useNestedContentRenderer, M as extractTextContent, _ as KaTeXInlineNode, b as KaTeXBlockNode, c as SpoilerNode, d as MermaidNode, i as TagNode, j as _defineProperty, m as MentionNode } from "./theme-DG7I1YM5.js";
2
+ import { D as VIDEO_NODE_KEY, S as LINK_CARD_NODE_KEY, _ as CODE_BLOCK_NODE_KEY, g as BANNER_NODE_KEY, l as RendererWrapper, m as useVariant, s as useFootnoteDefinitions, u as createRendererDecoration, y as FOOTNOTE_SECTION_NODE_KEY } from "./KaTeXRenderer-CqnhvDmj.js";
3
3
  import { l as semanticClassNames, r as clsx, u as sharedStyles } from "./katex.css-CIOEOXyd.js";
4
4
  import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-CJCkLTZc.js";
5
5
  import { t as LinkCardRenderer } from "./LinkCardRenderer-CigqFwCv.js";
6
6
  import { AutoLinkNode, LinkNode } from "@lexical/link";
7
- import { createContext, createElement, use, useCallback, useEffect, useMemo, useRef, useState } from "react";
7
+ import { createContext, createElement, use, useCallback, useEffect, useRef, useState } from "react";
8
8
  import { HeadingNode, QuoteNode } from "@lexical/rich-text";
9
9
  import { $createTextNode, $insertNodes, DecoratorNode, ElementNode, TextNode } from "lexical";
10
10
  import { HorizontalRuleNode } from "@lexical/extension";
@@ -13,7 +13,6 @@ import { ListItemNode, ListNode } from "@lexical/list";
13
13
  import { TableCellNode, TableNode, TableRowNode } from "@lexical/table";
14
14
  import { jsx, jsxs } from "react/jsx-runtime";
15
15
  import { ChevronRight, Code, Link, MessageSquareQuote, Video } from "lucide-react";
16
- import { customAlphabet } from "nanoid";
17
16
  //#region src/components/renderers/BannerRenderer.tsx
18
17
  var BannerRenderer = ({ type }) => {
19
18
  return /* @__PURE__ */ jsx("span", { className: `rich-banner-icon rich-banner-icon-${type}` });
@@ -27,7 +26,7 @@ function BannerStaticDecorator({ bannerType, contentState }) {
27
26
  children: [/* @__PURE__ */ jsx(RendererWrapper, {
28
27
  defaultRenderer: BannerRenderer,
29
28
  props: { type: bannerType },
30
- rendererKey: "Banner"
29
+ rendererKey: BANNER_NODE_KEY
31
30
  }), /* @__PURE__ */ jsx("div", {
32
31
  className: "rich-banner-content",
33
32
  children: renderContent(contentState)
@@ -300,7 +299,7 @@ var CodeBlockNode = class CodeBlockNode extends DecoratorNode {
300
299
  writable.__language = language;
301
300
  }
302
301
  decorate(_editor, _config) {
303
- return createRendererDecoration("CodeBlock", CodeBlockRenderer, {
302
+ return createRendererDecoration(CODE_BLOCK_NODE_KEY, CodeBlockRenderer, {
304
303
  code: this.__code,
305
304
  language: this.__language
306
305
  });
@@ -676,7 +675,7 @@ var FootnoteSectionNode = class FootnoteSectionNode extends DecoratorNode {
676
675
  writable.__definitions = rest;
677
676
  }
678
677
  decorate(_editor, _config) {
679
- return createRendererDecoration("FootnoteSection", FootnoteSectionRenderer, {
678
+ return createRendererDecoration(FOOTNOTE_SECTION_NODE_KEY, FootnoteSectionRenderer, {
680
679
  definitions: this.__definitions,
681
680
  nodeKey: this.__key
682
681
  });
@@ -960,7 +959,7 @@ var LinkCardNode = class LinkCardNode extends DecoratorNode {
960
959
  writable.__id = id;
961
960
  }
962
961
  decorate(_editor, _config) {
963
- return createRendererDecoration("LinkCard", LinkCardRenderer, {
962
+ return createRendererDecoration(LINK_CARD_NODE_KEY, LinkCardRenderer, {
964
963
  url: this.__url,
965
964
  source: this.__source,
966
965
  id: this.__id,
@@ -997,391 +996,6 @@ function $isLinkCardNode(node) {
997
996
  return node instanceof LinkCardNode;
998
997
  }
999
998
  //#endregion
1000
- //#region src/context/PollDataContext.tsx
1001
- var PollDataContext = createContext({
1002
- adapter: null,
1003
- initialStates: {}
1004
- });
1005
- function PollDataProvider({ adapter, initialStates, children }) {
1006
- const value = useMemo(() => ({
1007
- adapter,
1008
- initialStates: initialStates ?? {}
1009
- }), [adapter, initialStates]);
1010
- return /* @__PURE__ */ jsx(PollDataContext.Provider, {
1011
- value,
1012
- children
1013
- });
1014
- }
1015
- function usePollDataAdapter() {
1016
- return use(PollDataContext).adapter;
1017
- }
1018
- function useInitialPollState(pollId) {
1019
- return use(PollDataContext).initialStates[pollId];
1020
- }
1021
- //#endregion
1022
- //#region src/styles/poll.css.ts
1023
- var pollClasses = {
1024
- container: "_1m5xzan0",
1025
- meta: "_1m5xzan1",
1026
- question: "_1m5xzan2",
1027
- optionList: "_1m5xzan3",
1028
- option: "_1m5xzan4",
1029
- optionInteractive: "_1m5xzan5",
1030
- optionSelected: "_1m5xzan6",
1031
- optionDisabled: "_1m5xzan7",
1032
- tint: "_1m5xzan8",
1033
- tintActive: "_1m5xzan9",
1034
- optionRow: "_1m5xzana",
1035
- optionLabel: "_1m5xzanb",
1036
- optionPct: "_1m5xzanc",
1037
- optionPctActive: "_1m5xzand",
1038
- hint: "_1m5xzane",
1039
- submit: "_1m5xzanf",
1040
- submitActive: "_1m5xzang",
1041
- footer: "_1m5xzanh",
1042
- errorMessage: "_1m5xzani",
1043
- skeleton: "_1m5xzanj"
1044
- };
1045
- //#endregion
1046
- //#region src/components/renderers/PollRenderer.tsx
1047
- function shouldShowTallies(state, showResults) {
1048
- if (showResults === "after-vote") return state.userVote !== void 0 || state.closed;
1049
- if (showResults === "after-close") return state.closed;
1050
- return true;
1051
- }
1052
- function classNames(...names) {
1053
- return names.filter((n) => Boolean(n)).join(" ");
1054
- }
1055
- function PollStaticFallback({ question, options }) {
1056
- return /* @__PURE__ */ jsxs("div", {
1057
- className: pollClasses.container,
1058
- children: [/* @__PURE__ */ jsx("p", {
1059
- className: pollClasses.question,
1060
- children: question
1061
- }), /* @__PURE__ */ jsx("ul", {
1062
- className: pollClasses.optionList,
1063
- children: options.map((option) => /* @__PURE__ */ jsx("li", {
1064
- className: pollClasses.option,
1065
- children: /* @__PURE__ */ jsx("div", {
1066
- className: pollClasses.optionRow,
1067
- children: /* @__PURE__ */ jsx("span", {
1068
- className: pollClasses.optionLabel,
1069
- children: option.label
1070
- })
1071
- })
1072
- }, option.id))
1073
- })]
1074
- });
1075
- }
1076
- function PollInteractive({ adapter, closeAt, mode, options, pollId, question, showResults }) {
1077
- const initialState = useInitialPollState(pollId);
1078
- const liveState = adapter.usePollState(pollId);
1079
- const submit = adapter.useSubmit(pollId);
1080
- const state = liveState ?? initialState ?? {
1081
- tallies: {},
1082
- totalVotes: 0,
1083
- status: "loading",
1084
- closed: false,
1085
- canVote: false
1086
- };
1087
- const [pendingSelection, setPendingSelection] = useState([]);
1088
- const [isSubmitting, setIsSubmitting] = useState(false);
1089
- const showTallies = shouldShowTallies(state, showResults);
1090
- const userVoted = state.userVote !== void 0;
1091
- const isClosed = state.closed;
1092
- const canInteract = !userVoted && !isClosed && state.canVote && state.status !== "loading";
1093
- const tallyShare = useCallback((optionId) => {
1094
- if (!showTallies || state.totalVotes <= 0) return 0;
1095
- const tally = state.tallies[optionId] ?? 0;
1096
- return Math.max(0, Math.min(1, tally / state.totalVotes));
1097
- }, [
1098
- showTallies,
1099
- state.tallies,
1100
- state.totalVotes
1101
- ]);
1102
- const handleSingleClick = useCallback(async (optionId) => {
1103
- if (!canInteract || isSubmitting) return;
1104
- setIsSubmitting(true);
1105
- try {
1106
- await submit([optionId]);
1107
- } finally {
1108
- setIsSubmitting(false);
1109
- }
1110
- }, [
1111
- canInteract,
1112
- isSubmitting,
1113
- submit
1114
- ]);
1115
- const handleMultiToggle = useCallback((optionId) => {
1116
- if (!canInteract || isSubmitting) return;
1117
- setPendingSelection((prev) => prev.includes(optionId) ? prev.filter((id) => id !== optionId) : [...prev, optionId]);
1118
- }, [canInteract, isSubmitting]);
1119
- const handleMultiSubmit = useCallback(async () => {
1120
- if (!canInteract || isSubmitting || pendingSelection.length === 0) return;
1121
- setIsSubmitting(true);
1122
- try {
1123
- await submit([...pendingSelection]);
1124
- } finally {
1125
- setIsSubmitting(false);
1126
- }
1127
- }, [
1128
- canInteract,
1129
- isSubmitting,
1130
- pendingSelection,
1131
- submit
1132
- ]);
1133
- const metaLabel = useMemo(() => {
1134
- const parts = [mode === "single" ? "Single choice" : "Multiple choice"];
1135
- if (isClosed) parts.push("Voting closed");
1136
- else if (userVoted) parts.push("Voted");
1137
- return parts.join(" · ");
1138
- }, [
1139
- mode,
1140
- isClosed,
1141
- userVoted
1142
- ]);
1143
- if (state.status === "loading") return /* @__PURE__ */ jsxs("div", {
1144
- className: pollClasses.container,
1145
- children: [
1146
- /* @__PURE__ */ jsx("p", {
1147
- className: pollClasses.meta,
1148
- children: metaLabel
1149
- }),
1150
- /* @__PURE__ */ jsx("p", {
1151
- className: pollClasses.question,
1152
- children: question
1153
- }),
1154
- /* @__PURE__ */ jsx("ul", {
1155
- className: pollClasses.optionList,
1156
- children: options.map((option) => /* @__PURE__ */ jsx("li", { className: pollClasses.skeleton }, option.id))
1157
- })
1158
- ]
1159
- });
1160
- return /* @__PURE__ */ jsxs("div", {
1161
- className: pollClasses.container,
1162
- children: [
1163
- /* @__PURE__ */ jsx("p", {
1164
- className: pollClasses.meta,
1165
- children: metaLabel
1166
- }),
1167
- /* @__PURE__ */ jsx("p", {
1168
- className: pollClasses.question,
1169
- children: question
1170
- }),
1171
- /* @__PURE__ */ jsx("ul", {
1172
- className: pollClasses.optionList,
1173
- children: options.map((option) => {
1174
- const isUserChoice = state.userVote?.includes(option.id) ?? false;
1175
- const isPending = pendingSelection.includes(option.id);
1176
- const tintWidth = (() => {
1177
- if (canInteract && mode === "multiple" && isPending) return 1;
1178
- return tallyShare(option.id);
1179
- })();
1180
- const tintShouldBeActive = isUserChoice || isPending;
1181
- const labelHighlighted = isUserChoice || isPending;
1182
- const handleClick = canInteract ? mode === "single" ? () => handleSingleClick(option.id) : () => handleMultiToggle(option.id) : void 0;
1183
- return /* @__PURE__ */ jsxs("li", {
1184
- className: classNames(pollClasses.option, canInteract ? pollClasses.optionInteractive : pollClasses.optionDisabled, labelHighlighted && pollClasses.optionSelected),
1185
- onClick: handleClick,
1186
- ...canInteract ? {
1187
- role: "button",
1188
- tabIndex: 0,
1189
- onKeyDown: (event) => {
1190
- if (event.key === "Enter" || event.key === " ") {
1191
- event.preventDefault();
1192
- handleClick?.();
1193
- }
1194
- }
1195
- } : {},
1196
- children: [/* @__PURE__ */ jsx("span", {
1197
- "aria-hidden": true,
1198
- style: { width: `${tintWidth * 100}%` },
1199
- className: classNames(pollClasses.tint, tintShouldBeActive && pollClasses.tintActive)
1200
- }), /* @__PURE__ */ jsxs("div", {
1201
- className: pollClasses.optionRow,
1202
- children: [/* @__PURE__ */ jsxs("span", {
1203
- className: pollClasses.optionLabel,
1204
- children: [labelHighlighted && "✓ ", option.label]
1205
- }), showTallies && (userVoted || isClosed) ? /* @__PURE__ */ jsxs("span", {
1206
- className: classNames(pollClasses.optionPct, labelHighlighted && pollClasses.optionPctActive),
1207
- children: [Math.round(tallyShare(option.id) * 100), "%"]
1208
- }) : canInteract && mode === "single" ? /* @__PURE__ */ jsx("span", {
1209
- className: pollClasses.hint,
1210
- children: "Click to vote"
1211
- }) : null]
1212
- })]
1213
- }, option.id);
1214
- })
1215
- }),
1216
- canInteract && mode === "multiple" && /* @__PURE__ */ jsx("button", {
1217
- disabled: pendingSelection.length === 0 || isSubmitting,
1218
- type: "button",
1219
- className: classNames(pollClasses.submit, pendingSelection.length > 0 && !isSubmitting && pollClasses.submitActive),
1220
- onClick: handleMultiSubmit,
1221
- children: isSubmitting ? "Submitting…" : pendingSelection.length > 0 ? `Submit ${pendingSelection.length} ${pendingSelection.length === 1 ? "item" : "items"}` : "Submit (select at least one)"
1222
- }),
1223
- /* @__PURE__ */ jsxs("div", {
1224
- className: pollClasses.footer,
1225
- children: [(userVoted || isClosed) && state.totalVotes > 0 ? /* @__PURE__ */ jsxs("span", { children: [
1226
- state.totalVotes.toLocaleString(),
1227
- " ",
1228
- state.totalVotes === 1 ? "vote" : "votes"
1229
- ] }) : /* @__PURE__ */ jsx("span", {}), closeAt && !isClosed ? /* @__PURE__ */ jsxs("span", { children: ["Closes ", closeAt] }) : null]
1230
- }),
1231
- state.status === "error" && state.errorMessage ? /* @__PURE__ */ jsx("p", {
1232
- className: pollClasses.errorMessage,
1233
- children: state.errorMessage
1234
- }) : !state.canVote && !userVoted && !isClosed && state.errorMessage ? /* @__PURE__ */ jsx("p", {
1235
- className: pollClasses.errorMessage,
1236
- children: state.errorMessage
1237
- }) : null
1238
- ]
1239
- });
1240
- }
1241
- function PollRenderer(props) {
1242
- const adapter = usePollDataAdapter();
1243
- if (!adapter) return /* @__PURE__ */ jsx(PollStaticFallback, { ...props });
1244
- return /* @__PURE__ */ jsx(PollInteractive, {
1245
- adapter,
1246
- ...props
1247
- });
1248
- }
1249
- //#endregion
1250
- //#region src/nodes/PollNode.ts
1251
- var idAlphabet = "abcdefghijklmnopqrstuvwxyz0123456789";
1252
- var makePollIdSuffix = customAlphabet(idAlphabet, 10);
1253
- var makeOptionIdSuffix = customAlphabet(idAlphabet, 6);
1254
- function createPollId() {
1255
- return `p_${makePollIdSuffix()}`;
1256
- }
1257
- function createOptionId() {
1258
- return `o_${makeOptionIdSuffix()}`;
1259
- }
1260
- var PollNode = class PollNode extends DecoratorNode {
1261
- static getType() {
1262
- return "poll";
1263
- }
1264
- static clone(node) {
1265
- return new PollNode({
1266
- pollId: node.__pollId,
1267
- question: node.__question,
1268
- options: node.__options,
1269
- mode: node.__mode,
1270
- closeAt: node.__closeAt,
1271
- showResults: node.__showResults
1272
- }, node.__key);
1273
- }
1274
- constructor(payload = {}, key) {
1275
- super(key);
1276
- _defineProperty(this, "__pollId", void 0);
1277
- _defineProperty(this, "__question", void 0);
1278
- _defineProperty(this, "__options", void 0);
1279
- _defineProperty(this, "__mode", void 0);
1280
- _defineProperty(this, "__closeAt", void 0);
1281
- _defineProperty(this, "__showResults", void 0);
1282
- this.__pollId = payload.pollId ?? createPollId();
1283
- this.__question = payload.question ?? "";
1284
- this.__options = payload.options && payload.options.length > 0 ? payload.options : [{
1285
- id: createOptionId(),
1286
- label: ""
1287
- }, {
1288
- id: createOptionId(),
1289
- label: ""
1290
- }];
1291
- this.__mode = payload.mode ?? "single";
1292
- this.__closeAt = payload.closeAt;
1293
- this.__showResults = payload.showResults;
1294
- }
1295
- createDOM(_config) {
1296
- const div = document.createElement("div");
1297
- div.className = "rich-poll-wrapper";
1298
- return div;
1299
- }
1300
- updateDOM() {
1301
- return false;
1302
- }
1303
- isInline() {
1304
- return false;
1305
- }
1306
- getPollId() {
1307
- return this.getLatest().__pollId;
1308
- }
1309
- getQuestion() {
1310
- return this.getLatest().__question;
1311
- }
1312
- setQuestion(question) {
1313
- const writable = this.getWritable();
1314
- writable.__question = question;
1315
- }
1316
- getOptions() {
1317
- return this.getLatest().__options;
1318
- }
1319
- setOptions(options) {
1320
- const writable = this.getWritable();
1321
- writable.__options = options;
1322
- }
1323
- getMode() {
1324
- return this.getLatest().__mode;
1325
- }
1326
- setMode(mode) {
1327
- const writable = this.getWritable();
1328
- writable.__mode = mode;
1329
- }
1330
- getCloseAt() {
1331
- return this.getLatest().__closeAt;
1332
- }
1333
- setCloseAt(closeAt) {
1334
- const writable = this.getWritable();
1335
- writable.__closeAt = closeAt;
1336
- }
1337
- getShowResults() {
1338
- return this.getLatest().__showResults;
1339
- }
1340
- setShowResults(showResults) {
1341
- const writable = this.getWritable();
1342
- writable.__showResults = showResults;
1343
- }
1344
- static importJSON(serializedNode) {
1345
- return new PollNode({
1346
- pollId: serializedNode.pollId,
1347
- question: serializedNode.question,
1348
- options: serializedNode.options,
1349
- mode: serializedNode.mode,
1350
- closeAt: serializedNode.closeAt,
1351
- showResults: serializedNode.showResults
1352
- });
1353
- }
1354
- exportJSON() {
1355
- return {
1356
- ...super.exportJSON(),
1357
- type: "poll",
1358
- pollId: this.__pollId,
1359
- question: this.__question,
1360
- options: this.__options,
1361
- mode: this.__mode,
1362
- ...this.__closeAt ? { closeAt: this.__closeAt } : {},
1363
- ...this.__showResults ? { showResults: this.__showResults } : {},
1364
- version: 1
1365
- };
1366
- }
1367
- decorate(_editor, _config) {
1368
- return createRendererDecoration("Poll", PollRenderer, {
1369
- pollId: this.__pollId,
1370
- question: this.__question,
1371
- options: this.__options,
1372
- mode: this.__mode,
1373
- closeAt: this.__closeAt,
1374
- showResults: this.__showResults
1375
- });
1376
- }
1377
- };
1378
- function $createPollNode(payload) {
1379
- return new PollNode(payload);
1380
- }
1381
- function $isPollNode(node) {
1382
- return node instanceof PollNode;
1383
- }
1384
- //#endregion
1385
999
  //#region src/nodes/RubyNode.ts
1386
1000
  function readBaseTextFromRuby(element) {
1387
1001
  let base = "";
@@ -1563,7 +1177,7 @@ var VideoNode = class VideoNode extends DecoratorNode {
1563
1177
  writable.__src = src;
1564
1178
  }
1565
1179
  decorate(_editor, _config) {
1566
- return createRendererDecoration("Video", VideoRenderer, {
1180
+ return createRendererDecoration(VIDEO_NODE_KEY, VideoRenderer, {
1567
1181
  src: this.__src,
1568
1182
  poster: this.__poster,
1569
1183
  width: this.__width,
@@ -1625,9 +1239,8 @@ var customNodes = [
1625
1239
  BannerNode,
1626
1240
  MermaidNode,
1627
1241
  RubyNode,
1628
- TagNode,
1629
- PollNode
1242
+ TagNode
1630
1243
  ];
1631
1244
  var allNodes = [...builtinNodes, ...customNodes];
1632
1245
  //#endregion
1633
- export { $createCommentPlaceholderNode as A, BANNER_TYPES as B, GridContainerNode as C, $createDetailsNode as D, FootnoteSectionNode as E, CodeBlockRenderer as F, normalizeBannerType as H, ColorSchemeProvider as I, useColorScheme as L, CommentNode as M, $isCodeBlockNode as N, DetailsNode as O, CodeBlockNode as P, $isBannerNode as R, $isGridContainerNode as S, $isFootnoteSectionNode as T, BannerRenderer as U, BannerNode as V, usePollDataAdapter as _, $createRubyNode as a, LinkCardNode as b, $createPollNode as c, createOptionId as d, createPollId as f, useInitialPollState as g, PollDataProvider as h, VideoNode as i, $isCommentNode as j, $createCommentNode as k, $isPollNode as l, pollClasses as m, builtinNodes as n, $isRubyNode as o, PollRenderer as p, customNodes as r, RubyNode as s, allNodes as t, PollNode as u, $createLinkCardNode as v, $createFootnoteSectionNode as w, $createGridContainerNode as x, $isLinkCardNode as y, BANNER_LABELS as z };
1246
+ export { BANNER_TYPES as A, $isCodeBlockNode as C, useColorScheme as D, ColorSchemeProvider as E, normalizeBannerType as M, BannerRenderer as N, $isBannerNode as O, CommentNode as S, CodeBlockRenderer as T, $createDetailsNode as _, $createRubyNode as a, $createCommentPlaceholderNode as b, $createLinkCardNode as c, $createGridContainerNode as d, $isGridContainerNode as f, FootnoteSectionNode as g, $isFootnoteSectionNode as h, VideoNode as i, BannerNode as j, BANNER_LABELS as k, $isLinkCardNode as l, $createFootnoteSectionNode as m, builtinNodes as n, $isRubyNode as o, GridContainerNode as p, customNodes as r, RubyNode as s, allNodes as t, LinkCardNode as u, DetailsNode as v, CodeBlockNode as w, $isCommentNode as x, $createCommentNode as y };
@@ -1 +1 @@
1
- {"version":3,"file":"config-edit.d.ts","sourceRoot":"","sources":["../src/config-edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAuBlD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAoBrD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAyC,CAAC"}
1
+ {"version":3,"file":"config-edit.d.ts","sourceRoot":"","sources":["../src/config-edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAsBlD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAmBrD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAyC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAsBlD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAYlD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAoBjD,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAqC,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAqBlD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAYlD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAmBjD,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAqC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -12,8 +12,6 @@ export type { FootnoteDefinitionsContextValue } from './context/FootnoteDefiniti
12
12
  export { FootnoteDefinitionsProvider, useFootnoteContent, useFootnoteDefinitions, useFootnoteDisplayNumber, } from './context/FootnoteDefinitionsContext';
13
13
  export type { RenderEditorStateFn } from './context/NestedContentRendererContext';
14
14
  export { NestedContentRendererProvider, useNestedContentRenderer, useOptionalNestedContentRenderer, } from './context/NestedContentRendererContext';
15
- export type { PollDataProviderProps } from './context/PollDataContext';
16
- export { PollDataProvider, useInitialPollState, usePollDataAdapter, } from './context/PollDataContext';
17
15
  export type { PresentDialogFn, PresentDialogProps } from './context/PresentDialogContext';
18
16
  export { PresentDialogProvider, usePresentDialog } from './context/PresentDialogContext';
19
17
  export type { RendererMode } from './context/RendererConfigContext';
@@ -23,11 +21,10 @@ export { createTextSelectionStore, TextSelectionStoreProvider, useTextSelectionS
23
21
  export { blockIdState } from './plugins/BlockIdPlugin';
24
22
  export * from './styles';
25
23
  export type { RichEditorProps, RichEditorVariant } from './types';
26
- export type { PollDataAdapter, PollMetadata, PollMode, PollOption, PollRendererProps, PollShowResults, PollState, } from './types/poll';
27
24
  export type { RendererConfig } from './types/renderer-config';
25
+ export { ALERT_NODE_KEY, BANNER_NODE_KEY, CODE_BLOCK_NODE_KEY, FOOTNOTE_NODE_KEY, FOOTNOTE_SECTION_NODE_KEY, IMAGE_NODE_KEY, KATEX_NODE_KEY, LINK_CARD_NODE_KEY, MENTION_NODE_KEY, MERMAID_NODE_KEY, RUBY_NODE_KEY, TAG_NODE_KEY, VIDEO_NODE_KEY, } from './types/renderer-keys';
28
26
  export type { AnchorError, AnchorResult, BlockAnchor, CommentAnchor, RangeAnchor, } from './utils/comment-anchor';
29
27
  export { $getRootBlock, $getTextOffsetInBlock, $resolveSelectionPoint, buildBlockAnchor, buildRangeAnchor, } from './utils/comment-anchor';
30
- export { extractPolls } from './utils/extractPolls';
31
28
  export type { DOMSelectionTarget, TextSelectionSnapshot } from './utils/text-selection';
32
29
  export { $captureTextSelection, $captureTextSelectionFromRangeSelection, $restoreTextSelection, createDOMRangeFromTextSelection, findDOMPointByTextOffset, getBlockElementById, getDOMRectFromTextSelection, getTextOffsetFromDOMPoint, } from './utils/text-selection';
33
30
  export { TEXT_SELECTION_HIGHLIGHT_NAME } from './utils/text-selection-constants';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,YAAY,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAChF,YAAY,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,gCAAgC,GACjC,MAAM,wCAAwC,CAAC;AAChD,YAAY,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAC1F,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACzF,YAAY,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,UAAU,GACX,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAClG,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,cAAc,UAAU,CAAC;AACzB,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAClE,YAAY,EACV,eAAe,EACf,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,eAAe,EACf,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,YAAY,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,aAAa,EACb,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,EACL,qBAAqB,EACrB,uCAAuC,EACvC,qBAAqB,EACrB,+BAA+B,EAC/B,wBAAwB,EACxB,mBAAmB,EACnB,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,YAAY,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAChF,YAAY,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,gCAAgC,GACjC,MAAM,wCAAwC,CAAC;AAChD,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAC1F,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACzF,YAAY,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,UAAU,GACX,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAClG,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,cAAc,UAAU,CAAC;AACzB,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAClE,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,cAAc,GACf,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,aAAa,EACb,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,EACL,qBAAqB,EACrB,uCAAuC,EACvC,qBAAqB,EACrB,+BAA+B,EAC/B,wBAAwB,EACxB,mBAAmB,EACnB,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC"}
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
- import { A as ImageUploadProvider, C as useTextSelectionSnapshot, D as defaultImageUpload, E as ImageUploadPlugin, M as CorePlugins, O as BlockIdPlugin, S as createTextSelectionStore, T as LinkFaviconPlugin, _ as $getTextOffsetInBlock, a as AutoFocusPlugin, b as buildRangeAnchor, c as $captureTextSelectionFromRangeSelection, d as findDOMPointByTextOffset, f as getBlockElementById, g as $getRootBlock, h as TEXT_SELECTION_HIGHLIGHT_NAME, i as EditorRefPlugin, k as blockIdState, l as $restoreTextSelection, m as getTextOffsetFromDOMPoint, n as OnChangePlugin, o as TextSelectionPlugin, p as getDOMRectFromTextSelection, r as FootnotePlugin, s as $captureTextSelection, t as SubmitShortcutPlugin, u as createDOMRangeFromTextSelection, v as $resolveSelectionPoint, w as useTextSelectionStore, x as TextSelectionStoreProvider, y as buildBlockAnchor } from "./SubmitShortcutPlugin-u9xqY3GU.js";
2
- import { n as setResolvedEditNodes, r as allEditNodes, s as pollEditClasses } from "./node-registry-DsyIROEM.js";
3
- import { F as useNestedContentRenderer, I as useOptionalNestedContentRenderer, P as NestedContentRendererProvider, t as editorTheme } from "./theme-B5B2EOWM.js";
4
- import { a as FootnoteDefinitionsProvider, c as useFootnoteDisplayNumber, d as RendererConfigProvider, f as useRendererConfig, m as useVariant, o as useFootnoteContent, p as useRendererMode, s as useFootnoteDefinitions } from "./KaTeXRenderer-CQQT3BMw.js";
1
+ import { A as ImageUploadProvider, C as useTextSelectionSnapshot, D as defaultImageUpload, E as ImageUploadPlugin, M as CorePlugins, O as BlockIdPlugin, S as createTextSelectionStore, T as LinkFaviconPlugin, _ as $getTextOffsetInBlock, a as AutoFocusPlugin, b as buildRangeAnchor, c as $captureTextSelectionFromRangeSelection, d as findDOMPointByTextOffset, f as getBlockElementById, g as $getRootBlock, h as TEXT_SELECTION_HIGHLIGHT_NAME, i as EditorRefPlugin, k as blockIdState, l as $restoreTextSelection, m as getTextOffsetFromDOMPoint, n as OnChangePlugin, o as TextSelectionPlugin, p as getDOMRectFromTextSelection, r as FootnotePlugin, s as $captureTextSelection, t as SubmitShortcutPlugin, u as createDOMRangeFromTextSelection, v as $resolveSelectionPoint, w as useTextSelectionStore, x as TextSelectionStoreProvider, y as buildBlockAnchor } from "./SubmitShortcutPlugin-CHn_HBJM.js";
2
+ import { n as setResolvedEditNodes, r as allEditNodes } from "./node-registry-D9t5vPfY.js";
3
+ import { F as useNestedContentRenderer, I as useOptionalNestedContentRenderer, P as NestedContentRendererProvider, t as editorTheme } from "./theme-DG7I1YM5.js";
4
+ import { C as MENTION_NODE_KEY, D as VIDEO_NODE_KEY, E as TAG_NODE_KEY, S as LINK_CARD_NODE_KEY, T as RUBY_NODE_KEY, _ as CODE_BLOCK_NODE_KEY, a as FootnoteDefinitionsProvider, b as IMAGE_NODE_KEY, c as useFootnoteDisplayNumber, d as RendererConfigProvider, f as useRendererConfig, g as BANNER_NODE_KEY, h as ALERT_NODE_KEY, m as useVariant, o as useFootnoteContent, p as useRendererMode, s as useFootnoteDefinitions, v as FOOTNOTE_NODE_KEY, w as MERMAID_NODE_KEY, x as KATEX_NODE_KEY, y as FOOTNOTE_SECTION_NODE_KEY } from "./KaTeXRenderer-CqnhvDmj.js";
5
5
  import { a as noteVariant, c as richContent, i as getVariantClass, l as semanticClassNames, n as katexStyles, o as commentVariant, r as clsx, s as articleVariant, t as katexClassNames, u as sharedStyles } from "./katex.css-CIOEOXyd.js";
6
- import { I as ColorSchemeProvider, L as useColorScheme, _ as usePollDataAdapter, g as useInitialPollState, h as PollDataProvider, m as pollClasses } from "./config-B5BuLljq.js";
6
+ import { D as useColorScheme, E as ColorSchemeProvider } from "./config-EJe68p4h.js";
7
7
  import { i as detailsStyles, n as gridStyles, r as detailsClassNames, t as gridClassNames } from "./grid.css-CJCkLTZc.js";
8
- import { a as useExtraNodes, i as ExtraNodesProvider, n as PresentDialogProvider, o as LinkFavicon, r as usePresentDialog, t as extractPolls } from "./extractPolls-DO31LNrp.js";
9
- import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-BrOr-wQi.js";
8
+ import { a as LinkFavicon, i as useExtraNodes, n as usePresentDialog, r as ExtraNodesProvider, t as PresentDialogProvider } from "./PresentDialogContext-DKNicgia.js";
9
+ import { a as KaTeXPlugin, c as AlertPlugin, n as MermaidPlugin, s as ImagePlugin } from "./MermaidPlugin-_gPgU34D.js";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
11
  import { ContentEditable } from "@lexical/react/LexicalContentEditable";
12
12
  import { LexicalErrorBoundary } from "@lexical/react/LexicalErrorBoundary";
@@ -130,4 +130,4 @@ function RichEditor({ extraNodes, imageUpload, children, ...shellProps }) {
130
130
  });
131
131
  }
132
132
  //#endregion
133
- export { $captureTextSelection, $captureTextSelectionFromRangeSelection, $getRootBlock, $getTextOffsetInBlock, $resolveSelectionPoint, $restoreTextSelection, ColorSchemeProvider, CorePlugins, ExtraNodesProvider, FootnoteDefinitionsProvider, LinkFavicon, NestedContentRendererProvider, PollDataProvider, PresentDialogProvider, RendererConfigProvider, RichEditor, RichEditorShell, TEXT_SELECTION_HIGHLIGHT_NAME, TextSelectionStoreProvider, articleTheme, articleVariant, blockIdState, buildBlockAnchor, buildRangeAnchor, commentTheme, commentVariant, createDOMRangeFromTextSelection, createTextSelectionStore, detailsClassNames, detailsStyles, editorTheme, extractPolls, findDOMPointByTextOffset, getBlockElementById, getDOMRectFromTextSelection, getTextOffsetFromDOMPoint, getVariantClass, gridClassNames, gridStyles, katexClassNames, katexStyles, noteTheme, noteVariant, pollClasses, pollEditClasses, richContent, semanticClassNames, sharedStyles, useColorScheme, useExtraNodes, useFootnoteContent, useFootnoteDefinitions, useFootnoteDisplayNumber, useInitialPollState, useNestedContentRenderer, useOptionalNestedContentRenderer, usePollDataAdapter, usePresentDialog, useRendererConfig, useRendererMode, useTextSelectionSnapshot, useTextSelectionStore, useVariant, vars };
133
+ export { $captureTextSelection, $captureTextSelectionFromRangeSelection, $getRootBlock, $getTextOffsetInBlock, $resolveSelectionPoint, $restoreTextSelection, ALERT_NODE_KEY, BANNER_NODE_KEY, CODE_BLOCK_NODE_KEY, ColorSchemeProvider, CorePlugins, ExtraNodesProvider, FOOTNOTE_NODE_KEY, FOOTNOTE_SECTION_NODE_KEY, FootnoteDefinitionsProvider, IMAGE_NODE_KEY, KATEX_NODE_KEY, LINK_CARD_NODE_KEY, LinkFavicon, MENTION_NODE_KEY, MERMAID_NODE_KEY, NestedContentRendererProvider, PresentDialogProvider, RUBY_NODE_KEY, RendererConfigProvider, RichEditor, RichEditorShell, TAG_NODE_KEY, TEXT_SELECTION_HIGHLIGHT_NAME, TextSelectionStoreProvider, VIDEO_NODE_KEY, articleTheme, articleVariant, blockIdState, buildBlockAnchor, buildRangeAnchor, commentTheme, commentVariant, createDOMRangeFromTextSelection, createTextSelectionStore, detailsClassNames, detailsStyles, editorTheme, findDOMPointByTextOffset, getBlockElementById, getDOMRectFromTextSelection, getTextOffsetFromDOMPoint, getVariantClass, gridClassNames, gridStyles, katexClassNames, katexStyles, noteTheme, noteVariant, richContent, semanticClassNames, sharedStyles, useColorScheme, useExtraNodes, useFootnoteContent, useFootnoteDefinitions, useFootnoteDisplayNumber, useNestedContentRenderer, useOptionalNestedContentRenderer, usePresentDialog, useRendererConfig, useRendererMode, useTextSelectionSnapshot, useTextSelectionStore, useVariant, vars };