feat(spreadsheet): 우클릭 메뉴에 구글 시트 항목 덧붙임(81-3)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MPcuokNm1ZR2kqgGGDfaJA
This commit is contained in:
@@ -64,3 +64,9 @@
|
||||
.ui-ctx-menu__item.is-sub {
|
||||
padding-left: var(--spacing-24);
|
||||
}
|
||||
|
||||
/* 구분선(81-3) — 블록별 CSS 가 없으면(`.ss__context-menu-sep` 같은) 이 기본으로 */
|
||||
.ui-ctx-menu__sep {
|
||||
margin: var(--spacing-4);
|
||||
border-top: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
@@ -14,10 +14,12 @@
|
||||
import "./ui_template_context_menu.css";
|
||||
|
||||
/** 평면 항목 = [문구, 동작]. 하위 메뉴 항목 = {label, children} — 누르면 바로 아래로
|
||||
* 펼쳐지는 아코디언(구조물군 → 종류, 2026-08-18 B05 우클릭 메뉴 일원화). */
|
||||
* 펼쳐지는 아코디언(구조물군 → 종류, 2026-08-18 B05 우클릭 메뉴 일원화).
|
||||
* 구분선 = {divider: true}(81-3 — 덧붙이는 꼴 · B04 · B05 · 나무 메뉴는 안 써서 그대로). */
|
||||
export type MapContextMenuItem =
|
||||
| [label: string, action: () => void]
|
||||
| { label: string; children: Array<[label: string, action: () => void]> };
|
||||
| { label: string; children: Array<[label: string, action: () => void]> }
|
||||
| { divider: true };
|
||||
|
||||
export interface MapContextMenu {
|
||||
/** 뷰포트에 append할 요소. */
|
||||
@@ -122,6 +124,12 @@ export function createMapContextMenu(blockClass: string): MapContextMenu {
|
||||
element.append(buildLeaf(item[0], item[1]));
|
||||
return;
|
||||
}
|
||||
if ("divider" in item) {
|
||||
const sep = document.createElement("div");
|
||||
sep.className = `${blockClass}__context-menu-sep ui-ctx-menu__sep`;
|
||||
element.append(sep);
|
||||
return;
|
||||
}
|
||||
// 하위 메뉴(아코디언) — 머리글을 누르면 종류 목록이 바로 아래로 펼쳐진다.
|
||||
// 한 번에 한 군만 연다(다른 군을 열면 앞의 군은 접힘).
|
||||
const head = document.createElement("button");
|
||||
|
||||
Reference in New Issue
Block a user