@team-monolith/cds 1.9.1 → 1.9.3

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.
@@ -14,6 +14,7 @@ import { $isColoredQuoteNode, } from "../../nodes/ColoredQuoteNode";
14
14
  import { useTheme } from "@emotion/react";
15
15
  import { css } from "@emotion/css";
16
16
  import { $isProblemInputNode } from "../../nodes";
17
+ import { $isProblemSelectNode, } from "../../nodes/ProblemSelectNode";
17
18
  function getParagraphContextMenuOptions(editor, node, setOpen) {
18
19
  return [
19
20
  new ComponentPickerOption("본문", {
@@ -185,6 +186,17 @@ function getProblemInputContextMenuOptions(node) {
185
186
  }),
186
187
  ];
187
188
  }
189
+ function getProblemSelectContextMenuOptions(node) {
190
+ return [
191
+ new ComponentPickerOption("블록 삭제", {
192
+ icon: _jsx(CloseFillIcon, {}),
193
+ keywords: [],
194
+ onSelect: () => {
195
+ node.remove();
196
+ },
197
+ }),
198
+ ];
199
+ }
188
200
  function getColoredQuoteContextMenuOptions(editor, theme, node) {
189
201
  return [
190
202
  new ComponentPickerOption("회색", {
@@ -264,6 +276,9 @@ export function useContextMenuOptions() {
264
276
  if ($isProblemInputNode(node)) {
265
277
  return getProblemInputContextMenuOptions(node);
266
278
  }
279
+ else if ($isProblemSelectNode(node)) {
280
+ return getProblemSelectContextMenuOptions(node);
281
+ }
267
282
  else if (node instanceof ParagraphNode) {
268
283
  return getParagraphContextMenuOptions(editor, node, setImageOpen);
269
284
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-monolith/cds",
3
- "version": "1.9.1",
3
+ "version": "1.9.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": false,