@team-monolith/cds 1.129.2-alpha.2 → 1.129.3-alpha

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 (128) hide show
  1. package/dist/CdsProvider.js +180 -180
  2. package/dist/components/AlertDialog/AlertDialogTitle.js +15 -15
  3. package/dist/components/Banner.js +28 -28
  4. package/dist/components/FileTypeAlertDialog.js +16 -16
  5. package/dist/components/Pagination.js +22 -22
  6. package/dist/emotion.d.ts +185 -0
  7. package/dist/i18n/i18n.js +14 -14
  8. package/dist/index.d.ts +8 -1
  9. package/dist/node_modules/.pnpm/html-parse-stringify@3.0.1/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js +78 -0
  10. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/I18nextProvider.js +12 -0
  11. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/Trans.js +26 -0
  12. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/TransWithoutContext.js +174 -0
  13. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/context.js +20 -0
  14. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/defaults.js +24 -0
  15. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/i18nInstance.js +6 -0
  16. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/initReactI18next.js +11 -0
  17. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/unescape.js +25 -0
  18. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/useTranslation.js +69 -0
  19. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/utils.js +35 -0
  20. package/dist/patterns/LexicalEditor/Plugins.js +64 -64
  21. package/dist/patterns/LexicalEditor/components/FileSelectInput.js +19 -19
  22. package/dist/patterns/LexicalEditor/components/InsertImageDialog/ImagePreview.js +6 -6
  23. package/dist/patterns/LexicalEditor/components/InsertImageDialog/InsertImageDialog.js +34 -34
  24. package/dist/patterns/LexicalEditor/components/UploadFileDialog/UploadFileDialog.js +14 -14
  25. package/dist/patterns/LexicalEditor/nodes/FileNode/FileDownloadButton.js +17 -17
  26. package/dist/patterns/LexicalEditor/nodes/ImageNode/ImageComponent.js +62 -62
  27. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/InputComponent.js +25 -25
  28. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/FormPlaceholder.js +7 -7
  29. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/FormSolution.js +24 -23
  30. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/SettingForm.js +48 -47
  31. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/TextTypeDropdown.js +11 -11
  32. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxView.js +15 -15
  33. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectComponent.js +28 -28
  34. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/FormSelection.js +30 -30
  35. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/SettingForm.js +35 -35
  36. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormIconAndLabel.js +21 -21
  37. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormLabel.js +15 -15
  38. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormQuestion.js +17 -17
  39. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/SettingForm.js +30 -30
  40. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/EvaluationComponent.js +20 -20
  41. package/dist/patterns/LexicalEditor/nodes/SheetInputNode/InputComponent.js +24 -24
  42. package/dist/patterns/LexicalEditor/nodes/SheetInputNode/SettingForm.js +28 -28
  43. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectBox/SelectBoxView.js +11 -11
  44. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectComponent.js +26 -26
  45. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/FormAllowMultipleAnswers.js +8 -8
  46. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/FormSelection.js +27 -27
  47. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/SettingForm.js +33 -33
  48. package/dist/patterns/LexicalEditor/nodes/VideoNode/VideoComponent.js +21 -21
  49. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/ComponentAdderPlugin.js +99 -99
  50. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/useContextMenuOptions.js +50 -50
  51. package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.js +85 -85
  52. package/dist/patterns/LexicalEditor/plugins/DragDropPastePlugin/index.js +13 -13
  53. package/dist/patterns/LexicalEditor/plugins/FloatingLinkEditorPlugin/FloatingLinkEditor.js +48 -48
  54. package/dist/patterns/LexicalEditor/plugins/ImagesPlugin/useImageNodeTransform.js +16 -16
  55. package/dist/patterns/ToggleButtonGroup/ToggleButton.js +17 -17
  56. package/package.json +15 -18
  57. package/@types/emotion.d.ts +0 -197
  58. package/node_modules/react-i18next/.eslintrc.json +0 -74
  59. package/node_modules/react-i18next/.husky/pre-commit +0 -1
  60. package/node_modules/react-i18next/.prettierignore +0 -4
  61. package/node_modules/react-i18next/CHANGELOG.md +0 -1433
  62. package/node_modules/react-i18next/LICENSE +0 -22
  63. package/node_modules/react-i18next/README.md +0 -181
  64. package/node_modules/react-i18next/TransWithoutContext.d.mts +0 -1
  65. package/node_modules/react-i18next/TransWithoutContext.d.ts +0 -129
  66. package/node_modules/react-i18next/dist/amd/react-i18next.js +0 -867
  67. package/node_modules/react-i18next/dist/amd/react-i18next.min.js +0 -1
  68. package/node_modules/react-i18next/dist/commonjs/I18nextProvider.js +0 -21
  69. package/node_modules/react-i18next/dist/commonjs/Trans.js +0 -54
  70. package/node_modules/react-i18next/dist/commonjs/TransWithoutContext.js +0 -330
  71. package/node_modules/react-i18next/dist/commonjs/Translation.js +0 -19
  72. package/node_modules/react-i18next/dist/commonjs/context.js +0 -81
  73. package/node_modules/react-i18next/dist/commonjs/defaults.js +0 -26
  74. package/node_modules/react-i18next/dist/commonjs/i18nInstance.js +0 -13
  75. package/node_modules/react-i18next/dist/commonjs/index.js +0 -128
  76. package/node_modules/react-i18next/dist/commonjs/initReactI18next.js +0 -15
  77. package/node_modules/react-i18next/dist/commonjs/unescape.js +0 -32
  78. package/node_modules/react-i18next/dist/commonjs/useSSR.js +0 -34
  79. package/node_modules/react-i18next/dist/commonjs/useTranslation.js +0 -114
  80. package/node_modules/react-i18next/dist/commonjs/utils.js +0 -76
  81. package/node_modules/react-i18next/dist/commonjs/withSSR.js +0 -27
  82. package/node_modules/react-i18next/dist/commonjs/withTranslation.js +0 -39
  83. package/node_modules/react-i18next/dist/es/I18nextProvider.js +0 -15
  84. package/node_modules/react-i18next/dist/es/Trans.js +0 -43
  85. package/node_modules/react-i18next/dist/es/TransWithoutContext.js +0 -321
  86. package/node_modules/react-i18next/dist/es/Translation.js +0 -12
  87. package/node_modules/react-i18next/dist/es/context.js +0 -42
  88. package/node_modules/react-i18next/dist/es/defaults.js +0 -18
  89. package/node_modules/react-i18next/dist/es/i18nInstance.js +0 -5
  90. package/node_modules/react-i18next/dist/es/index.js +0 -18
  91. package/node_modules/react-i18next/dist/es/initReactI18next.js +0 -9
  92. package/node_modules/react-i18next/dist/es/package.json +0 -1
  93. package/node_modules/react-i18next/dist/es/unescape.js +0 -25
  94. package/node_modules/react-i18next/dist/es/useSSR.js +0 -27
  95. package/node_modules/react-i18next/dist/es/useTranslation.js +0 -107
  96. package/node_modules/react-i18next/dist/es/utils.js +0 -62
  97. package/node_modules/react-i18next/dist/es/withSSR.js +0 -20
  98. package/node_modules/react-i18next/dist/es/withTranslation.js +0 -32
  99. package/node_modules/react-i18next/dist/umd/react-i18next.js +0 -871
  100. package/node_modules/react-i18next/dist/umd/react-i18next.min.js +0 -1
  101. package/node_modules/react-i18next/helpers.d.ts +0 -3
  102. package/node_modules/react-i18next/icu.macro.d.mts +0 -1
  103. package/node_modules/react-i18next/icu.macro.d.ts +0 -103
  104. package/node_modules/react-i18next/icu.macro.js +0 -729
  105. package/node_modules/react-i18next/index.d.mts +0 -1
  106. package/node_modules/react-i18next/index.d.ts +0 -209
  107. package/node_modules/react-i18next/initReactI18next.d.mts +0 -1
  108. package/node_modules/react-i18next/initReactI18next.d.ts +0 -3
  109. package/node_modules/react-i18next/lint-staged.config.mjs +0 -4
  110. package/node_modules/react-i18next/package.json +0 -167
  111. package/node_modules/react-i18next/react-i18next.js +0 -871
  112. package/node_modules/react-i18next/react-i18next.min.js +0 -1
  113. package/node_modules/react-i18next/src/I18nextProvider.js +0 -7
  114. package/node_modules/react-i18next/src/Trans.js +0 -45
  115. package/node_modules/react-i18next/src/TransWithoutContext.js +0 -479
  116. package/node_modules/react-i18next/src/Translation.js +0 -14
  117. package/node_modules/react-i18next/src/context.js +0 -54
  118. package/node_modules/react-i18next/src/defaults.js +0 -20
  119. package/node_modules/react-i18next/src/i18nInstance.js +0 -7
  120. package/node_modules/react-i18next/src/index.js +0 -22
  121. package/node_modules/react-i18next/src/initReactI18next.js +0 -11
  122. package/node_modules/react-i18next/src/unescape.js +0 -31
  123. package/node_modules/react-i18next/src/useSSR.js +0 -33
  124. package/node_modules/react-i18next/src/useTranslation.js +0 -171
  125. package/node_modules/react-i18next/src/utils.js +0 -93
  126. package/node_modules/react-i18next/src/withSSR.js +0 -21
  127. package/node_modules/react-i18next/src/withTranslation.js +0 -35
  128. package/node_modules/react-i18next/vitest.workspace.typescript.mts +0 -52
@@ -1,35 +1,35 @@
1
1
  import { ZINDEX as e } from "../../../../utils/zIndex.js";
2
- import { InsertImageDialog as t } from "../../components/InsertImageDialog/InsertImageDialog.js";
3
- import { useDraggableBlockMenu as n } from "./useDraggableBlockMenu.js";
4
- import { ComponentPickerMenuList as r } from "../ComponentPickerMenuPlugin/ComponentPickerMenuList.js";
5
- import { INSERT_IMAGE_COMMAND as i } from "../ImagesPlugin/index.js";
6
- import { InsertVideoDialog as ee } from "../../components/InsertVideoDialog/InsertVideoDialog.js";
7
- import { INSERT_VIDEO_COMMAND as te } from "../VideosPlugin/index.js";
8
- import { UploadFileDialog as ne } from "../../components/UploadFileDialog/UploadFileDialog.js";
9
- import { UPLOAD_FILE_COMMAND as re } from "../FilePlugin/index.js";
10
- import { ComponentDrawerOption as ie, ComponentPickerOption as ae, getBaseOptions as a } from "../ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.js";
11
- import { useFloatingMenu as o } from "./useFloatingMenu.js";
12
- import { ComponentAdder as s } from "./ComponentAdder.js";
13
- import { useContextMenuOptions as c } from "./useContextMenuOptions.js";
2
+ import { useTranslation as t } from "../../../../node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/useTranslation.js";
3
+ import { InsertImageDialog as n } from "../../components/InsertImageDialog/InsertImageDialog.js";
4
+ import { useDraggableBlockMenu as r } from "./useDraggableBlockMenu.js";
5
+ import { ComponentPickerMenuList as ee } from "../ComponentPickerMenuPlugin/ComponentPickerMenuList.js";
6
+ import { INSERT_IMAGE_COMMAND as te } from "../ImagesPlugin/index.js";
7
+ import { InsertVideoDialog as ne } from "../../components/InsertVideoDialog/InsertVideoDialog.js";
8
+ import { INSERT_VIDEO_COMMAND as re } from "../VideosPlugin/index.js";
9
+ import { UploadFileDialog as ie } from "../../components/UploadFileDialog/UploadFileDialog.js";
10
+ import { UPLOAD_FILE_COMMAND as ae } from "../FilePlugin/index.js";
11
+ import { ComponentDrawerOption as i, ComponentPickerOption as a, getBaseOptions as o } from "../ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.js";
12
+ import { useFloatingMenu as s } from "./useFloatingMenu.js";
13
+ import { ComponentAdder as c } from "./ComponentAdder.js";
14
+ import { useContextMenuOptions as oe } from "./useContextMenuOptions.js";
14
15
  import { useTheme as l } from "@emotion/react";
15
- import { useCallback as oe, useEffect as u, useRef as d, useState as f } from "react";
16
+ import { useCallback as u, useEffect as d, useRef as se, useState as f } from "react";
16
17
  import p from "@emotion/styled";
17
18
  import { Fragment as m, jsx as h, jsxs as g } from "@emotion/react/jsx-runtime";
18
- import { useTranslation as se } from "react-i18next";
19
19
  import { css as ce } from "@emotion/css";
20
- import { $createNodeSelection as le, $createParagraphNode as ue, $getNearestNodeFromDOMNode as _, $getSelection as de, $isNodeSelection as fe, $isParagraphNode as v, $isRangeSelection as y, $setSelection as b } from "lexical";
21
- import { useLexicalComposerContext as x } from "@lexical/react/LexicalComposerContext";
22
- import S, { createPortal as C } from "react-dom";
23
- import { LexicalNodeMenuPlugin as w } from "@lexical/react/LexicalNodeMenuPlugin";
20
+ import { $createNodeSelection as le, $createParagraphNode as ue, $getNearestNodeFromDOMNode as _, $getSelection as de, $isNodeSelection as v, $isParagraphNode as y, $isRangeSelection as b, $setSelection as x } from "lexical";
21
+ import { useLexicalComposerContext as S } from "@lexical/react/LexicalComposerContext";
22
+ import C, { createPortal as w } from "react-dom";
23
+ import { LexicalNodeMenuPlugin as T } from "@lexical/react/LexicalNodeMenuPlugin";
24
24
  //#region src/cds/patterns/LexicalEditor/plugins/ComponentAdderPlugin/ComponentAdderPlugin.tsx
25
- var T = { menu: "ComponentAdder-menu" };
26
- function E(e) {
27
- return !!e.closest(`.${T.menu}`);
28
- }
25
+ var E = { menu: "ComponentAdder-menu" };
29
26
  function D(e) {
30
- return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
27
+ return !!e.closest(`.${E.menu}`);
31
28
  }
32
29
  function O(e) {
30
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
31
+ }
32
+ function k(e) {
33
33
  let t = e.anchor;
34
34
  if (t.type !== "text") return null;
35
35
  let n = t.getNode();
@@ -37,147 +37,147 @@ function O(e) {
37
37
  let r = t.offset;
38
38
  return n.getTextContent().slice(0, r);
39
39
  }
40
- function k(p) {
41
- let { anchorElem: k, isSheetEnabled: j, isQuizEnabled: M, showFileUpload: N } = p, P = l(), [F] = x(), { t: I } = se(), [L, R] = f(null), z = d(null), { blockElem: B, setBlockElem: V } = o({
42
- anchorElem: k,
43
- menuRef: z,
44
- isOnMenu: E
45
- }), [H, U] = f("plus"), [pe, W] = f([]), [me, G] = f(!1), [he, K] = f(!1), [ge, q] = f(!1), [J, Y] = f("");
46
- u(() => {
47
- let e = F.registerUpdateListener(() => {
48
- F.getEditorState().read(() => {
49
- if (L === null) return;
40
+ function A(p) {
41
+ let { anchorElem: A, isSheetEnabled: M, isQuizEnabled: N, showFileUpload: P } = p, F = l(), [I] = S(), { t: L } = t(), [R, z] = f(null), B = se(null), { blockElem: V, setBlockElem: H } = s({
42
+ anchorElem: A,
43
+ menuRef: B,
44
+ isOnMenu: D
45
+ }), [U, W] = f("plus"), [fe, G] = f([]), [pe, K] = f(!1), [me, q] = f(!1), [he, J] = f(!1), [Y, X] = f("");
46
+ d(() => {
47
+ let e = I.registerUpdateListener(() => {
48
+ I.getEditorState().read(() => {
49
+ if (R === null) return;
50
50
  let e = de();
51
- if (y(e)) {
51
+ if (b(e)) {
52
52
  if (e.getNodes().every((e) => {
53
53
  let t = e.getTopLevelElement();
54
- return t ? t.getKey() !== L : !0;
54
+ return t ? t.getKey() !== R : !0;
55
55
  })) {
56
- Y(""), R(null);
56
+ X(""), z(null);
57
57
  return;
58
58
  }
59
- H === "plus" && Y(O(e) ?? "");
60
- } else fe(e) ? e.getNodes()[0]?.getKey() !== L && (Y(""), R(null)) : (Y(""), R(null));
59
+ U === "plus" && X(k(e) ?? "");
60
+ } else v(e) ? e.getNodes()[0]?.getKey() !== R && (X(""), z(null)) : (X(""), z(null));
61
61
  });
62
62
  });
63
63
  return () => {
64
64
  e();
65
65
  };
66
66
  }, [
67
- F,
68
- L,
69
- H
67
+ I,
68
+ R,
69
+ U
70
70
  ]);
71
- let X = oe((e, t, n, r) => {
72
- e instanceof ie || F.update(() => {
73
- e.onSelect(r), R(null), n();
71
+ let ge = u((e, t, n, r) => {
72
+ e instanceof i || I.update(() => {
73
+ e.onSelect(r), z(null), n();
74
74
  });
75
- }, [F]), [Z, Q] = f([]), _e = async () => {
75
+ }, [I]), [Z, Q] = f([]), _e = async () => {
76
76
  Z.forEach((e) => e()), Q((e) => e.filter((e) => Z.indexOf(e) === -1));
77
- }, ve = c(), $ = pe.filter((e) => {
78
- if (!J) return !0;
79
- let t = new RegExp(D(J), "i");
80
- return e instanceof ae && (t.test(e.title) || e.keywords.some((e) => t.test(e)));
81
- }), { onDragStart: ye, onDragEnd: be, targetLineRef: xe } = n(F, k, B, V);
77
+ }, ve = oe(), $ = fe.filter((e) => {
78
+ if (!Y) return !0;
79
+ let t = new RegExp(O(Y), "i");
80
+ return e instanceof a && (t.test(e.title) || e.keywords.some((e) => t.test(e)));
81
+ }), { onDragStart: ye, onDragEnd: be, targetLineRef: xe } = r(I, A, V, H);
82
82
  return /* @__PURE__ */ g(m, { children: [
83
- /* @__PURE__ */ h(t, {
84
- open: me,
85
- title: I("이미지 삽입하기", { context: "제목, 다이얼로그" }),
86
- onClose: () => G(!1),
83
+ /* @__PURE__ */ h(n, {
84
+ open: pe,
85
+ title: L("이미지 삽입하기", { context: "제목, 다이얼로그" }),
86
+ onClose: () => K(!1),
87
87
  onChange: (e) => {
88
- F.dispatchCommand(i, e);
88
+ I.dispatchCommand(te, e);
89
89
  },
90
90
  shouldReset: !0
91
91
  }),
92
- /* @__PURE__ */ h(ee, {
93
- open: he,
94
- title: I("동영상 삽입하기", { context: "제목, 다이얼로그" }),
95
- onClose: () => K(!1),
92
+ /* @__PURE__ */ h(ne, {
93
+ open: me,
94
+ title: L("동영상 삽입하기", { context: "제목, 다이얼로그" }),
95
+ onClose: () => q(!1),
96
96
  onChange: (e) => {
97
- F.dispatchCommand(te, e);
97
+ I.dispatchCommand(re, e);
98
98
  },
99
99
  shouldReset: !0
100
100
  }),
101
- /* @__PURE__ */ h(ne, {
102
- open: ge,
103
- onClose: () => q(!1),
101
+ /* @__PURE__ */ h(ie, {
102
+ open: he,
103
+ onClose: () => J(!1),
104
104
  onChange: (e) => {
105
- F.dispatchCommand(re, e);
105
+ I.dispatchCommand(ae, e);
106
106
  }
107
107
  }),
108
- /* @__PURE__ */ h(w, {
109
- nodeKey: L,
108
+ /* @__PURE__ */ h(T, {
109
+ nodeKey: R,
110
110
  anchorClassName: ce`
111
111
  z-index: ${e.DIALOG + 1};
112
112
  `,
113
113
  options: $,
114
- menuRenderFn: (e, { selectedIndex: t, selectOptionAndCleanUp: n, setHighlightedIndex: i }) => e.current && $.length ? S.createPortal(/* @__PURE__ */ h(r, {
114
+ menuRenderFn: (e, { selectedIndex: t, selectOptionAndCleanUp: n, setHighlightedIndex: r }) => e.current && $.length ? C.createPortal(/* @__PURE__ */ h(ee, {
115
115
  options: $,
116
116
  selectedIndex: t,
117
117
  selectOptionAndCleanUp: n,
118
- setHighlightedIndex: i
118
+ setHighlightedIndex: r
119
119
  }), e.current) : null,
120
- onSelectOption: X,
120
+ onSelectOption: ge,
121
121
  onClose: () => {
122
- R(null), _e();
122
+ z(null), _e();
123
123
  }
124
124
  }),
125
- C(/* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(s, {
126
- ref: z,
127
- className: T.menu,
125
+ w(/* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(c, {
126
+ ref: B,
127
+ className: E.menu,
128
128
  onPlusClick: async () => {
129
- if (!B) return;
129
+ if (!V) return;
130
130
  let e = null;
131
- if (F.update(() => {
132
- let t = _(B);
133
- if (t) if (v(t) && t.isEmpty()) e = t.getKey(), t.selectStart();
131
+ if (I.update(() => {
132
+ let t = _(V);
133
+ if (t) if (y(t) && t.isEmpty()) e = t.getKey(), t.selectStart();
134
134
  else {
135
135
  let n = ue();
136
136
  t.insertAfter(n), n.selectStart(), e = n.getKey(), n.selectStart();
137
137
  }
138
138
  }), e) {
139
- if (L === null) R(e);
139
+ if (R === null) z(e);
140
140
  else {
141
141
  let t = new Promise((e) => {
142
142
  Q((t) => [...t, e]);
143
143
  });
144
- R(null), await t, R(e);
144
+ z(null), await t, z(e);
145
145
  }
146
- W(a({
147
- editor: F,
148
- theme: P,
149
- t: I,
150
- setImageOpen: G,
151
- setVideoOpen: K,
152
- isSheetEnabled: j,
153
- isQuizEnabled: M,
154
- setFileOpen: q,
155
- showFileUpload: N
156
- })), U("plus");
146
+ G(o({
147
+ editor: I,
148
+ theme: F,
149
+ t: L,
150
+ setImageOpen: K,
151
+ setVideoOpen: q,
152
+ isSheetEnabled: M,
153
+ isQuizEnabled: N,
154
+ setFileOpen: J,
155
+ showFileUpload: P
156
+ })), W("plus");
157
157
  }
158
158
  },
159
159
  onMenuClick: async () => {
160
- if (!B) return;
160
+ if (!V) return;
161
161
  let e = null;
162
- F.update(async () => {
163
- if (e = _(B), !e) return;
162
+ I.update(async () => {
163
+ if (e = _(V), !e) return;
164
164
  let t = le();
165
- if (t.add(e.getKey()), b(t), W(ve(F, e)), L === null) R(e.getKey());
165
+ if (t.add(e.getKey()), x(t), G(ve(I, e)), R === null) z(e.getKey());
166
166
  else {
167
167
  let t = new Promise((e) => {
168
168
  Q((t) => [...t, e]);
169
169
  });
170
- R(null), await t, R(e.getKey());
170
+ z(null), await t, z(e.getKey());
171
171
  }
172
- U("menu");
172
+ W("menu");
173
173
  });
174
174
  },
175
175
  onMenuDragStart: ye,
176
176
  onMenuDragEnd: be
177
- }), /* @__PURE__ */ h(A, { ref: xe })] }), k)
177
+ }), /* @__PURE__ */ h(j, { ref: xe })] }), A)
178
178
  ] });
179
179
  }
180
- var A = p.div`
180
+ var j = p.div`
181
181
  pointer-events: none;
182
182
  background: deepskyblue;
183
183
  height: 4px;
@@ -188,4 +188,4 @@ var A = p.div`
188
188
  will-change: transform;
189
189
  `;
190
190
  //#endregion
191
- export { k as ComponentAdderPlugin };
191
+ export { A as ComponentAdderPlugin };
@@ -1,111 +1,111 @@
1
- import { $isColoredQuoteNode as e } from "../../nodes/ColoredQuoteNode.js";
2
- import { getComponentPickerOptions as t, getQuoteColorOptions as n, getRemoveBlockMenu as r } from "../ComponentPickerMenuPlugin/componentPickerOptionUtils.js";
3
- import { useTheme as i } from "@emotion/react";
4
- import { useTranslation as a } from "react-i18next";
1
+ import { useTranslation as e } from "../../../../node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/useTranslation.js";
2
+ import { $isColoredQuoteNode as t } from "../../nodes/ColoredQuoteNode.js";
3
+ import { getComponentPickerOptions as n, getQuoteColorOptions as r, getRemoveBlockMenu as i } from "../ComponentPickerMenuPlugin/componentPickerOptionUtils.js";
4
+ import { useTheme as a } from "@emotion/react";
5
5
  import { $createParagraphNode as o, ParagraphNode as s } from "lexical";
6
6
  import { $createHeadingNode as c, $createQuoteNode as l, HeadingNode as u } from "@lexical/rich-text";
7
7
  import { INSERT_ORDERED_LIST_COMMAND as d, INSERT_UNORDERED_LIST_COMMAND as f, ListItemNode as p, ListNode as m } from "@lexical/list";
8
8
  import { $createCodeNode as h } from "@lexical/code";
9
9
  import { $setBlocksType as g } from "@lexical/selection";
10
10
  //#region src/cds/patterns/LexicalEditor/plugins/ComponentAdderPlugin/useContextMenuOptions.tsx
11
- function _(e, n, i) {
11
+ function _(e, t, r) {
12
12
  return [
13
- t({
13
+ n({
14
14
  key: "p",
15
15
  onSelect: () => e.update(() => {
16
- g(n.selectStart(), () => o());
16
+ g(t.selectStart(), () => o());
17
17
  })
18
- }, i),
18
+ }, r),
19
19
  ...[
20
20
  1,
21
21
  2,
22
22
  3
23
- ].map((r) => {
24
- let a = `h${r}`;
25
- return t({
23
+ ].map((i) => {
24
+ let a = `h${i}`;
25
+ return n({
26
26
  key: a,
27
27
  onSelect: () => e.update(() => {
28
- g(n.selectStart(), () => c(a));
28
+ g(t.selectStart(), () => c(a));
29
29
  })
30
- }, i);
30
+ }, r);
31
31
  }),
32
- t({
32
+ n({
33
33
  key: "ul",
34
34
  onSelect: () => {
35
- n.selectStart(), e.dispatchCommand(f, void 0);
35
+ t.selectStart(), e.dispatchCommand(f, void 0);
36
36
  }
37
- }, i),
38
- t({
37
+ }, r),
38
+ n({
39
39
  key: "ol",
40
40
  onSelect: () => {
41
- n.selectStart(), e.dispatchCommand(d, void 0);
41
+ t.selectStart(), e.dispatchCommand(d, void 0);
42
42
  }
43
- }, i),
44
- t({
43
+ }, r),
44
+ n({
45
45
  key: "quote",
46
46
  onSelect: () => e.update(() => {
47
- g(n.selectStart(), () => l());
47
+ g(t.selectStart(), () => l());
48
48
  })
49
- }, i),
50
- t({
49
+ }, r),
50
+ n({
51
51
  key: "code",
52
52
  onSelect: () => e.update(() => {
53
- let e = n.selectStart();
53
+ let e = t.selectStart();
54
54
  if (e.isCollapsed()) g(e, () => h());
55
55
  else {
56
56
  let t = e.getTextContent(), n = h();
57
57
  e.insertNodes([n]), e.insertRawText(t);
58
58
  }
59
59
  })
60
- }, i),
61
- r(e, n, i)
60
+ }, r),
61
+ i(e, t, r)
62
62
  ];
63
63
  }
64
- function v(e, n, i) {
64
+ function v(e, t, r) {
65
65
  return [...[
66
66
  1,
67
67
  2,
68
68
  3
69
- ].map((r) => {
70
- let a = `h${r}`;
71
- return t({
69
+ ].map((i) => {
70
+ let a = `h${i}`;
71
+ return n({
72
72
  key: a,
73
73
  onSelect: () => e.update(() => {
74
- g(n.selectStart(), () => c(a));
74
+ g(t.selectStart(), () => c(a));
75
75
  })
76
- }, i);
77
- }), r(e, n, i)];
76
+ }, r);
77
+ }), i(e, t, r)];
78
78
  }
79
- function y(e, n, i) {
79
+ function y(e, t, r) {
80
80
  return [
81
- t({
81
+ n({
82
82
  key: "ul",
83
83
  onSelect: () => {
84
- n.selectStart(), e.dispatchCommand(f, void 0);
84
+ t.selectStart(), e.dispatchCommand(f, void 0);
85
85
  }
86
- }, i),
87
- t({
86
+ }, r),
87
+ n({
88
88
  key: "ol",
89
89
  onSelect: () => {
90
- n.selectStart(), e.dispatchCommand(d, void 0);
90
+ t.selectStart(), e.dispatchCommand(d, void 0);
91
91
  }
92
- }, i),
93
- r(e, n, i)
92
+ }, r),
93
+ i(e, t, r)
94
94
  ];
95
95
  }
96
- function b(e, t, i, a) {
96
+ function b(e, t, n, a) {
97
97
  return [
98
- n(e, i, "grey", a, t),
99
- n(e, i, "red", a, t),
100
- n(e, i, "yellow", a, t),
101
- n(e, i, "blue", a, t),
102
- n(e, i, "green", a, t),
103
- r(e, i, a)
98
+ r(e, n, "grey", a, t),
99
+ r(e, n, "red", a, t),
100
+ r(e, n, "yellow", a, t),
101
+ r(e, n, "blue", a, t),
102
+ r(e, n, "green", a, t),
103
+ i(e, n, a)
104
104
  ];
105
105
  }
106
106
  function x() {
107
- let t = i(), { t: n } = a();
108
- return (i, a) => a instanceof s ? _(i, a, n) : a instanceof u ? v(i, a, n) : a instanceof m || a instanceof p ? y(i, a, n) : e(a) ? b(i, t, a, n) : [r(i, a, n)];
107
+ let n = a(), { t: r } = e();
108
+ return (e, a) => a instanceof s ? _(e, a, r) : a instanceof u ? v(e, a, r) : a instanceof m || a instanceof p ? y(e, a, r) : t(a) ? b(e, n, a, r) : [i(e, a, r)];
109
109
  }
110
110
  //#endregion
111
111
  export { x as useContextMenuOptions };