@opsnow-mcp/opsnow-mcp-common-ui-server 1.0.42 → 1.0.44

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.
@@ -0,0 +1,354 @@
1
+ // ============================================================
2
+ // uidemo 데모 사이트 링크 → MCP 컴포넌트·예제 매핑
3
+ //
4
+ // 데모 사이트: https://uidemo.finplex.bespinglobal.com/v2/uidemo (레포: opsnow-common-ui/cm-uidemo-web)
5
+ // 사용처: getComponentSpec / getUIExamples 에 데모 링크를 그대로 넣었을 때의 해석,
6
+ // listComponents 안내, scripts/build-skill.ts 의 references/uidemo-links.md 생성.
7
+ //
8
+ // 갱신: cm-uidemo-web 의 src/route/routes.jsx(path)와 각 페이지의 TAB_IDS(#tab=<id>)를 기준으로 맞춘다.
9
+ // - components: getComponentSpec 의 component 이름 (createXxx 의 Xxx)
10
+ // - examples: getUIExamples 의 uiType (+ keyword). 이름이 틀리면 build:skill 이 실패한다.
11
+ // ============================================================
12
+ export const UIDEMO_BASE_URL = "https://uidemo.finplex.bespinglobal.com/v2/uidemo";
13
+ export const UIDEMO_ROUTES = [
14
+ { path: "/", title: "Typography (첫 화면)", components: ["Typography"], examples: [{ uiType: "Typography" }] },
15
+ { path: "/typography", title: "Typography", components: ["Typography"], examples: [{ uiType: "Typography" }] },
16
+ { path: "/colors", title: "Colors (색상 팔레트)", components: [], examples: [], note: "컴포넌트가 아니라 색상 토큰 데모입니다. 색상은 theme.palette.commonPalette 토큰을 사용하세요 (서버 instructions·SKILL.md 의 색상 규칙 참고)." },
17
+ { path: "/tab", title: "Tab", components: ["Tab"], examples: [{ uiType: "Tab" }] },
18
+ { path: "/calendar", title: "Calendar (DatePicker)", components: ["Calendar"], examples: [{ uiType: "Calendar" }] },
19
+ { path: "/chart/line-chart", title: "Line Chart", components: ["LineChart"], examples: [{ uiType: "LineChart" }] },
20
+ { path: "/chart/bar-chart", title: "Bar Chart", components: ["BarChart"], examples: [{ uiType: "BarChart" }] },
21
+ { path: "/chart/stack-chart", title: "Stack Chart", components: ["StackChart"], examples: [{ uiType: "StackChart" }] },
22
+ { path: "/chart/xy-multi-chart", title: "XY Multi Chart", components: ["XyMultiChart"], examples: [{ uiType: "XyMultiChart" }] },
23
+ { path: "/chart/pie-chart", title: "Pie Chart", components: ["PieChart"], examples: [{ uiType: "PieChart" }] },
24
+ { path: "/chart/bubble-chart", title: "Bubble Chart", components: ["BubbleChart"], examples: [{ uiType: "BubbleChart" }] },
25
+ { path: "/chart/heatmap-chart", title: "Heatmap Chart", components: ["HeatmapChart"], examples: [{ uiType: "HeatmapChart" }] },
26
+ { path: "/chart/zoom-scroll", title: "Chart Zoom / Scroll", components: ["XyMultiChart"], examples: [{ uiType: "XyMultiChart", keyword: "Zoom / Scroll" }] },
27
+ { path: "/chart/download", title: "Chart Download (downloadFile)", components: ["BarChart", "LineChart", "StackChart", "PieChart"], examples: [{ uiType: "BarChart", keyword: "다운로드" }, { uiType: "LineChart", keyword: "다운로드" }, { uiType: "StackChart", keyword: "다운로드" }, { uiType: "PieChart", keyword: "다운로드" }], note: "차트 ref 의 downloadFile(fileName, fileType, fileOption?) 데모입니다." },
28
+ { path: "/data-status", title: "Data Status", components: ["DataStatus"], examples: [{ uiType: "DataStatus" }] },
29
+ { path: "/file-upload", title: "File Upload", components: ["FileUploader"], examples: [{ uiType: "FileUploader" }] },
30
+ { path: "/select", title: "Select", components: ["Select", "AutocompleteSelect", "SelectMenu", "CompanySelect", "CurrencySwitcher"], examples: [{ uiType: "Select" }, { uiType: "Autocomplete" }, { uiType: "CurrencySwitcher" }], note: "탭이 있는 페이지입니다. #tab=<id> 가 붙은 링크면 해당 탭의 컴포넌트만 봅니다." },
31
+ { path: "/select", tab: "select", title: "Select › 기본 Select (단일 선택)", components: ["Select"], examples: [{ uiType: "Select" }] },
32
+ { path: "/select", tab: "multi-select", title: "Select › Multi Select (다중 선택)", components: ["Select"], examples: [{ uiType: "Select" }] },
33
+ { path: "/select", tab: "autocomplete", title: "Select › Autocomplete (검색·체크박스·그룹 선택)", components: ["AutocompleteSelect"], examples: [{ uiType: "Autocomplete" }] },
34
+ { path: "/select", tab: "select-menu", title: "Select › Select Menu (메뉴 선택)", components: ["SelectMenu"], examples: [] },
35
+ { path: "/select", tab: "company-select", title: "Select › Company Select (회사 선택)", components: ["CompanySelect"], examples: [] },
36
+ { path: "/select", tab: "currency-switcher", title: "Select › Currency Switcher (통화 전환)", components: ["CurrencySwitcher"], examples: [{ uiType: "CurrencySwitcher" }] },
37
+ { path: "/forms", title: "Forms", components: ["Button", "Badge", "TextField", "Textarea", "Switch", "ToggleButton", "Chip", "Checkbox", "RadioGroup", "Collapse", "Slider", "Link", "Avatar", "TreeView", "InsightCard", "InsightContent"], examples: [{ uiType: "Button" }, { uiType: "Badge" }, { uiType: "TextField" }, { uiType: "Textarea" }, { uiType: "Switch" }, { uiType: "ToggleButtonGroup" }, { uiType: "Chip" }, { uiType: "Checkbox" }, { uiType: "RadioGroup" }, { uiType: "Collapse" }, { uiType: "Slider" }, { uiType: "Link" }, { uiType: "Avatar" }, { uiType: "TreeView" }, { uiType: "InsightCard" }, { uiType: "InsightContent" }], note: "탭이 있는 페이지입니다. #tab=<id> 가 붙은 링크면 해당 탭의 컴포넌트만 봅니다." },
38
+ { path: "/forms", tab: "button", title: "Forms › Button", components: ["Button"], examples: [{ uiType: "Button" }] },
39
+ { path: "/forms", tab: "badge", title: "Forms › Badge", components: ["Badge"], examples: [{ uiType: "Badge" }] },
40
+ { path: "/forms", tab: "text-field", title: "Forms › TextField", components: ["TextField", "Input"], examples: [{ uiType: "TextField" }] },
41
+ { path: "/forms", tab: "textarea", title: "Forms › Textarea", components: ["Textarea"], examples: [{ uiType: "Textarea" }] },
42
+ { path: "/forms", tab: "switch", title: "Forms › Switch", components: ["Switch"], examples: [{ uiType: "Switch" }] },
43
+ { path: "/forms", tab: "toggle-button", title: "Forms › ToggleButton", components: ["ToggleButton"], examples: [{ uiType: "ToggleButtonGroup" }] },
44
+ { path: "/forms", tab: "chip", title: "Forms › Chip", components: ["Chip"], examples: [{ uiType: "Chip" }], note: "ChipGroup 은 아직 이 MCP/스킬에 스펙이 없습니다." },
45
+ { path: "/forms", tab: "checkbox-radio", title: "Forms › Checkbox & RadioGroup", components: ["Checkbox", "RadioGroup"], examples: [{ uiType: "Checkbox" }, { uiType: "RadioGroup" }], note: "CheckboxGroup 은 아직 이 MCP/스킬에 스펙이 없습니다." },
46
+ { path: "/forms", tab: "collapse", title: "Forms › Collapse", components: ["Collapse"], examples: [{ uiType: "Collapse" }] },
47
+ { path: "/forms", tab: "slider", title: "Forms › Slider", components: ["Slider"], examples: [{ uiType: "Slider" }] },
48
+ { path: "/forms", tab: "link", title: "Forms › Link", components: ["Link"], examples: [{ uiType: "Link" }] },
49
+ { path: "/forms", tab: "avatar", title: "Forms › Avatar", components: ["Avatar"], examples: [{ uiType: "Avatar" }] },
50
+ { path: "/forms", tab: "tree-view", title: "Forms › TreeView", components: ["TreeView"], examples: [{ uiType: "TreeView" }] },
51
+ { path: "/forms", tab: "insight-card", title: "Forms › InsightCard", components: ["InsightCard"], examples: [{ uiType: "InsightCard" }] },
52
+ { path: "/forms", tab: "insight-content", title: "Forms › InsightContent", components: ["InsightContent"], examples: [{ uiType: "InsightContent" }] },
53
+ { path: "/forms", tab: "card", title: "Forms › Card & CardGroup", components: [], examples: [], note: "OpsnowCommonCard · OpsnowCommonCardGroup 은 아직 이 MCP/스킬에 스펙·예제가 없습니다. 카드형 컨테이너가 필요하면 Tile 을 확인하세요." },
54
+ { path: "/grid/ex1", title: "Grid › 기본 그리드", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "기본 데이터 그리드" }] },
55
+ { path: "/grid/interaction", title: "Grid › 그리드 인터랙션", components: ["DataGrid"], examples: [{ uiType: "DataGrid" }] },
56
+ { path: "/grid/scroll-layout", title: "Grid › 그리드 스크롤 레이아웃 (최대 높이)", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "그리드 최대 높이" }] },
57
+ { path: "/grid/ex2", title: "Grid › Header Filter · Tooltip · Sort", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "Header Filter" }] },
58
+ { path: "/grid/ex3", title: "Grid › No Data", components: ["DataGrid", "DataStatus"], examples: [{ uiType: "DataGrid", keyword: "No Data" }] },
59
+ { path: "/grid/ex4", title: "Grid › Custom Header", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "Custom Header" }] },
60
+ { path: "/grid/ex5", title: "Grid › Header Menu (three-dots)", components: ["DataGrid", "HeaderFilter"], examples: [{ uiType: "DataGrid", keyword: "three-dots" }] },
61
+ { path: "/grid/ex6", title: "Grid › Master / Detail Cell", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "Master / Detail" }] },
62
+ { path: "/grid/ex7", title: "Grid › Pivot · Sidebar", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "Pivot" }] },
63
+ { path: "/grid/ex8", title: "Grid › Ratio Bar · Data Bar", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "Bar" }] },
64
+ { path: "/grid/ex9", title: "Grid › Search Left Slot", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "slot to the left" }] },
65
+ { path: "/grid/ex10", title: "Grid › Tree Data Drag", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "Tree data drag" }] },
66
+ { path: "/grid/ex11", title: "Grid › Two Grid Drag and Drop", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "Grid row drag" }] },
67
+ { path: "/grid/ex12", title: "Grid › Server Side Row Model", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "Server side" }] },
68
+ { path: "/grid/ex13", title: "Grid › Column Group", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "Column Group" }] },
69
+ { path: "/grid/ex14", title: "Grid › Grid Tooltip (긴 텍스트 말줄임)", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "긴 텍스트" }] },
70
+ { path: "/grid/ex15", title: "Grid › Cell Loading (Partial Loading)", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "Partial Loading" }] },
71
+ { path: "/grid/ex16", title: "Grid › 표기 표준 (숫자·날짜·2줄 헤더)", components: ["DataGrid"], examples: [{ uiType: "DataGrid", keyword: "표기 표준" }] },
72
+ { path: "/icons", title: "Icons", components: ["Icon", "MuiIcon", "Markers"], examples: [{ uiType: "Icon" }, { uiType: "MuiIcon" }, { uiType: "Markers" }] },
73
+ { path: "/layout", title: "Layout › Tile", components: ["Tile", "GridLayout"], examples: [{ uiType: "GridLayout" }] },
74
+ { path: "/layout/shell", title: "Layout Shell", components: [], examples: [], note: "앱 셸(OpsnowCommonLayout) 데모입니다. 이 MCP/스킬은 Layout 셸 스펙을 제공하지 않습니다." },
75
+ { path: "/mega-filter", title: "Mega Filter", components: ["MegaFilter"], examples: [{ uiType: "MegaFilter" }] },
76
+ { path: "/notification", title: "Notification", components: ["Notification"], examples: [{ uiType: "Notification" }] },
77
+ { path: "/pagination", title: "Pagination", components: ["Pagination"], examples: [{ uiType: "Pagination" }] },
78
+ { path: "/popup", title: "Popup · Toast Popup", components: ["Popup", "ToastPopup"], examples: [{ uiType: "Popup" }, { uiType: "ToastPopup" }] },
79
+ { path: "/progress", title: "Progress · Loading", components: ["ProgressLine", "ProgressCircle"], examples: [{ uiType: "Progress" }, { uiType: "Loading" }] },
80
+ { path: "/stepper", title: "Stepper", components: ["Stepper", "StepButton"], examples: [{ uiType: "Stepper" }] },
81
+ { path: "/storage", title: "Storage (commonUILocalStorage)", components: [], examples: [{ uiType: "Storage" }], note: "컴포넌트가 아니라 공통 스토리지 유틸 데모입니다." },
82
+ { path: "/tooltip", title: "Tooltip", components: ["Tooltip", "CoachMark"], examples: [{ uiType: "Tooltip" }, { uiType: "CoachMark" }], note: "탭이 있는 페이지입니다. #tab=<id> 가 붙은 링크면 해당 탭의 컴포넌트만 봅니다." },
83
+ { path: "/tooltip", tab: "icon-tooltip", title: "Tooltip › Icon Tooltip", components: ["Tooltip"], examples: [{ uiType: "Tooltip" }], note: "OpsnowCommonIconTooltip 은 아직 별도 스펙이 없습니다. Tooltip 스펙·예제를 먼저 확인하세요." },
84
+ { path: "/tooltip", tab: "tooltip", title: "Tooltip › Tooltip", components: ["Tooltip"], examples: [{ uiType: "Tooltip" }] },
85
+ { path: "/tooltip", tab: "coach-mark", title: "Tooltip › Coach Mark", components: ["CoachMark"], examples: [{ uiType: "CoachMark" }] },
86
+ { path: "/utils", title: "Utils (finOpsDateUtils 날짜 표기 표준)", components: [], examples: [], note: "컴포넌트가 아니라 날짜 표기 유틸 데모입니다. 서버 instructions·SKILL.md 의 \"날짜 표기 표준 — finOpsDateUtils\" 절을 따르세요." },
87
+ { path: "/api-example/api-test", title: "API Example (getAxios)", components: ["Input", "ProgressCircle"], examples: [{ uiType: "Loading" }], note: "API 호출은 getAxios() 를 사용합니다 (axios 직접 import 금지). 서버 instructions·SKILL.md 의 API 호출 규칙 참고." },
88
+ { path: "/api-example/error-test", title: "API Error Example (공통 오류 팝업)", components: ["Button", "ProgressCircle"], examples: [{ uiType: "Button" }, { uiType: "Loading" }], note: "공통 오류 팝업 데모입니다. 서버 instructions·SKILL.md 의 API 호출 규칙(공통 오류 팝업) 참고." },
89
+ { path: "/copilot", title: "Copilot", components: [], examples: [], note: "코파일럿 패널 데모입니다. 이 MCP/스킬 범위가 아닙니다." },
90
+ { path: "/finops-plus/button-tab-ui", title: "FinOps Plus › Button Tab UI", components: ["Button", "Tab"], examples: [{ uiType: "Button" }, { uiType: "Tab" }] },
91
+ { path: "/finops-plus/tile-with-checkbox", title: "FinOps Plus › Tile with Checkbox", components: ["Tile", "Checkbox", "Typography"], examples: [{ uiType: "Checkbox" }, { uiType: "Typography" }] },
92
+ { path: "/settings/language", title: "Settings › Language", components: ["Select"], examples: [{ uiType: "Select" }] },
93
+ { path: "/pattern/01/template", title: "페이지 패턴 01 › Template (뼈대)", components: ["Icon", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
94
+ { path: "/pattern/01/ex1", title: "페이지 패턴 01 › Example (적용 예)", components: ["BarChart", "Button", "DataGrid", "Icon", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
95
+ { path: "/pattern/02/template", title: "페이지 패턴 02 › Template (뼈대)", components: ["Button", "Calendar", "DataGrid", "Icon", "Select", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
96
+ { path: "/pattern/02/ex1", title: "페이지 패턴 02 › Example (적용 예)", components: ["BarChart", "Button", "Calendar", "DataGrid", "Icon", "Select", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
97
+ { path: "/pattern/03/template", title: "페이지 패턴 03 › Template (뼈대)", components: ["Icon", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
98
+ { path: "/pattern/03/ex1", title: "페이지 패턴 03 › Example (적용 예)", components: ["BarChart", "Icon", "LineChart", "Notification", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
99
+ { path: "/pattern/04/template", title: "페이지 패턴 04 › Template (뼈대)", components: ["AutocompleteSelect", "Button", "DataGrid", "Icon", "Select", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
100
+ { path: "/pattern/04/ex1", title: "페이지 패턴 04 › Example (적용 예)", components: ["AutocompleteSelect", "BarChart", "Button", "DataGrid", "Icon", "Markers", "Select", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
101
+ { path: "/pattern/05/template", title: "페이지 패턴 05 › Template (뼈대)", components: ["Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
102
+ { path: "/pattern/05/ex1", title: "페이지 패턴 05 › Example (적용 예)", components: ["Button", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
103
+ { path: "/pattern/06/template", title: "페이지 패턴 06 › Template (뼈대)", components: ["AutocompleteSelect", "DataGrid", "Icon", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
104
+ { path: "/pattern/06/ex1", title: "페이지 패턴 06 › Example (적용 예)", components: ["AutocompleteSelect", "DataGrid", "Icon", "PieChart", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
105
+ { path: "/pattern/07/template", title: "페이지 패턴 07 › Template (뼈대)", components: ["Button", "Icon", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
106
+ { path: "/pattern/07/ex1", title: "페이지 패턴 07 › Example (적용 예)", components: ["Button", "Checkbox", "Icon", "Select", "Switch", "Tab", "TextField", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
107
+ { path: "/pattern/08/template", title: "페이지 패턴 08 › Template (뼈대)", components: ["Icon", "Select", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
108
+ { path: "/pattern/08/ex1", title: "페이지 패턴 08 › Example (적용 예)", components: ["Button", "DataGrid", "Icon", "Select", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
109
+ { path: "/pattern/09/template", title: "페이지 패턴 09 › Template (뼈대)", components: ["Icon", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
110
+ { path: "/pattern/09/ex1", title: "페이지 패턴 09 › Example (적용 예)", components: ["AutocompleteSelect", "Button", "DataGrid", "Icon", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
111
+ { path: "/settings/01/template", title: "설정 페이지 패턴 01 › Template (뼈대)", components: ["Avatar", "Button", "Icon", "Input", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
112
+ { path: "/settings/01/ex1", title: "설정 페이지 패턴 01 › Example (적용 예)", components: ["Avatar", "Button", "Chip", "Icon", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
113
+ { path: "/settings/02/template", title: "설정 페이지 패턴 02 › Template (뼈대)", components: ["Avatar", "DataGrid", "Icon", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
114
+ { path: "/settings/02/ex1", title: "설정 페이지 패턴 02 › Example (적용 예)", components: ["Avatar", "Button", "Chip", "DataGrid", "Icon", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
115
+ { path: "/settings/03/template", title: "설정 페이지 패턴 03 › Template (뼈대)", components: ["Button", "DataGrid", "Input", "Tab", "Tile"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
116
+ { path: "/settings/03/ex1", title: "설정 페이지 패턴 03 › Example (적용 예)", components: ["Button", "DataGrid", "Tab", "Tile"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
117
+ { path: "/settings/04/template", title: "설정 페이지 패턴 04 › Template (뼈대)", components: ["Button", "Icon", "Input", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
118
+ { path: "/settings/04/ex1", title: "설정 페이지 패턴 04 › Example (적용 예)", components: ["Button", "Icon", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
119
+ { path: "/settings/05/template", title: "설정 페이지 패턴 05 › Template (뼈대)", components: ["Button", "Icon", "Select", "SelectMenu", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
120
+ { path: "/settings/05/ex1", title: "설정 페이지 패턴 05 › Example (적용 예)", components: ["Button", "Chip", "Icon", "Link", "Select", "SelectMenu", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
121
+ { path: "/settings/06/template", title: "설정 페이지 패턴 06 › Template (뼈대)", components: ["Button", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
122
+ { path: "/settings/06/ex1", title: "설정 페이지 패턴 06 › Example (적용 예)", components: ["Button", "Tab", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
123
+ { path: "/settings/07/template", title: "설정 페이지 패턴 07 › Template (뼈대)", components: ["Icon", "Switch", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
124
+ { path: "/settings/07/ex1", title: "설정 페이지 패턴 07 › Example (적용 예)", components: ["Button", "Icon", "Input", "RadioGroup", "Switch", "Tile", "Typography"], examples: [], note: "여러 컴포넌트를 조합한 화면 패턴 데모입니다. 아래 컴포넌트 스펙을 각각 확인해 조합하세요." },
125
+ ];
126
+ // 데모 페이지(위에서 아래 순서)의 N번째 예제 → MCP 예제 제목.
127
+ // 한 MCP 예제가 데모 여러 개를 합쳐 다루는 경우 같은 제목이 반복된다.
128
+ export const UIDEMO_DEMOS = {
129
+ "/chart/xy-multi-chart": [
130
+ { label: "Basic XyMulti Chart + Multilingual", uiType: "XyMultiChart", title: "XY 멀티 차트 - 기본 + 다국어" },
131
+ { label: "Stack + Stack Line + Multilingual", uiType: "XyMultiChart", title: "XY 멀티 차트 - Stack + Stack Line + 다국어" },
132
+ { label: "Line + Stack + Connect False", uiType: "XyMultiChart", title: "XY 멀티 차트 - Line + Stack + Connect False" },
133
+ { label: "Multi Line", uiType: "XyMultiChart", title: "XY 멀티 차트 - Multi Line + UDF" },
134
+ { label: "Multi Line + Custom Category + Bullet Custom Field", uiType: "XyMultiChart", title: "XY 멀티 차트 - Multi Line + Custom Category + Bullet Custom Field" },
135
+ { label: "Multi Line + Custom Category + Bullet Custom Field + None Alarm", uiType: "XyMultiChart", title: "XY 멀티 차트 - Multi Line + Custom Category + Bullet Custom Field + None Alarm" },
136
+ { label: "Multi Line + Udf", uiType: "XyMultiChart", title: "XY 멀티 차트 - Multi Line + UDF 2" },
137
+ { label: "Multi Line + Udf 2", uiType: "XyMultiChart", title: "XY 멀티 차트 - Multi Line + UDF 3" },
138
+ { label: "Compare Item + Pointerover Event", uiType: "XyMultiChart", title: "XY 멀티 차트 - 기간 비교 툴팁 (tooltip type CG-Compare, 증감률·증감 화살표 색상) + Compare Item + Pointerover Event" },
139
+ { label: "Compare Item With Line Series", uiType: "XyMultiChart", title: "XY 멀티 차트 - 기간 비교 툴팁 (tooltip type CG-Compare, 증감률·증감 화살표 색상) + Compare Item + Line Series" },
140
+ { label: "Base Interval Month", uiType: "XyMultiChart", title: "XY 멀티 차트 - Base Interval Month" },
141
+ { label: "Base Interval Week", uiType: "XyMultiChart", title: "XY 멀티 차트 - Base Interval Week" },
142
+ { label: "Two Y-Axes", uiType: "XyMultiChart", title: "XY 멀티 차트 - Two Y-Axes" },
143
+ { label: "Multi Y-Axes", uiType: "XyMultiChart", title: "XY 멀티 차트 - Multi Y-Axes" },
144
+ { label: "Y axis notation (Numberformatter)", uiType: "XyMultiChart", title: "XY 멀티 차트 - Y Axis Numberformatter" },
145
+ { label: "Group List", uiType: "XyMultiChart", title: "XY 멀티 차트 - Group List" },
146
+ { label: "Multi Chart (Stack + Step + Gap + Interval)", uiType: "XyMultiChart", title: "XY 멀티 차트 - Stack + Step + Gap + Interval" },
147
+ { label: "Grouped Bar Chart with Label Bullet", uiType: "XyMultiChart", title: "XY 멀티 차트 - Bullet Label (Grouped Bar)" },
148
+ { label: "Line + Stack with Label Bullet", uiType: "XyMultiChart", title: "XY 멀티 차트 - Bullet Label (Line + Stack)" },
149
+ { label: "Dual Axis (Bar + Line) with Label Bullet", uiType: "XyMultiChart", title: "XY 멀티 차트 - Bullet Label (Dual Axis: Bar + Line)" },
150
+ { label: "bullet.hitRadius (왼쪽: 기본)", uiType: "XyMultiChart", title: "XY 멀티 차트 - bullet.hitRadius (작은 bullet 의 클릭 영역만 넓히기)" },
151
+ { label: "bullet.hitRadius (오른쪽: hitRadius 적용)", uiType: "XyMultiChart", title: "XY 멀티 차트 - bullet.hitRadius (작은 bullet 의 클릭 영역만 넓히기)" },
152
+ ],
153
+ "/chart/stack-chart": [
154
+ { label: "Basic Stack Chart + Multilingual", uiType: "StackChart", title: "스택 차트 - 기본 + 다국어" },
155
+ { label: "Tooltip Header + Chart Click + Hover Event", uiType: "StackChart", title: "스택 차트 - Tooltip Header + Chart Click + Hover Event" },
156
+ { label: "Group Tooltip", uiType: "StackChart", title: "스택 차트 - Group Tooltip" },
157
+ { label: "Y-Axis Numberformatter", uiType: "StackChart", title: "스택 차트 - Y-Axis Numberformatter" },
158
+ { label: "Template Field + Custom Label Field", uiType: "StackChart", title: "스택 차트 - Template Field + Custom Label Field" },
159
+ { label: "Tooltip Top Fixed With Minus Value (1)", uiType: "StackChart", title: "스택 차트 - Tooltip Top Fixed + WithinArea False + Minus Value" },
160
+ { label: "Tooltip Top Fixed With Minus Value (2)", uiType: "StackChart", title: "스택 차트 - Tooltip Top Fixed + WithinArea False + Minus Value" },
161
+ { label: "WithinArea False + Criteria (1)", uiType: "StackChart", title: "스택 차트 - Tooltip Top Fixed + WithinArea False + Minus Value" },
162
+ { label: "WithinArea False + Criteria (2)", uiType: "StackChart", title: "스택 차트 - Tooltip Top Fixed + WithinArea False + Minus Value" },
163
+ { label: "WithinArea False + Criteria (3)", uiType: "StackChart", title: "스택 차트 - Tooltip Top Fixed + WithinArea False + Minus Value" },
164
+ { label: "Stack Bar", uiType: "StackChart", title: "스택 차트 - Stack Bar(축변경)" },
165
+ { label: "Stack Bar (y-axis tooltip, …, numberformat)", uiType: "StackChart", title: "스택 차트 - Stack Bar (y-axis tooltip, withinArea = false, column hover, templateField, numberformat)" },
166
+ { label: "Stack Bar (y-axis tooltip, …, udf)", uiType: "StackChart", title: "스택 차트 - Stack Bar (y-axis tooltip, withinArea = false, column hover, templateField, udf)" },
167
+ { label: "Tooltip Body Name Truncated (1)", uiType: "StackChart", title: "스택 차트 - Stack Bar Label Truncated" },
168
+ { label: "Tooltip Body Name Truncated (2)", uiType: "StackChart", title: "스택 차트 - Stack Bar Label Truncated" },
169
+ { label: "Base Interval Month", uiType: "StackChart", title: "스택 차트 - Base Interval Month" },
170
+ { label: "Base Interval Week", uiType: "StackChart", title: "스택 차트 - Base Interval Week" },
171
+ { label: "Top N + Others", uiType: "StackChart", title: "스택 차트 - Top N + Others" },
172
+ { label: "Label Bullet - Vertical", uiType: "StackChart", title: "스택 차트 - Bullet Label (Vertical)" },
173
+ { label: "Label Bullet - Horizontal", uiType: "StackChart", title: "스택 차트 - Bullet Label (Horizontal)" },
174
+ ],
175
+ "/chart/bar-chart": [
176
+ { label: "Basic Bar Chart + Multilingual", uiType: "BarChart", title: "바 차트 - 기본 + 다국어" },
177
+ { label: "Click Column BarChart", uiType: "BarChart", title: "바 차트 - 클릭한 막대 색상 강조 (columns.click: clickColor / unClickColor / defaultPosition)" },
178
+ { label: "Tooltip Header + Chart Click Event", uiType: "BarChart", title: "바 차트 - Tooltip Header + Chart Click Event" },
179
+ { label: "Group Tooltip", uiType: "BarChart", title: "바 차트 - Group Tooltip" },
180
+ { label: "Axis Range Line", uiType: "BarChart", title: "바 차트 - Axis Range Line" },
181
+ { label: "Axis Change (colorByIndex = true + tooltip)", uiType: "BarChart", title: "바 차트 - Axis Change (colorByIndex = true + tooltip)" },
182
+ { label: "Axis Change (colorByIndex = true + bullet type label + …)", uiType: "BarChart", title: "바 차트 - Axis Change (colorByIndex = true + bullet type label + y axis label oversize truncate)" },
183
+ { label: "Udf", uiType: "BarChart", title: "바 차트 - User Defined Func" },
184
+ { label: "Top N + Others + Numberformatter", uiType: "BarChart", title: "바 차트 - Top N + Others + Numberformatter" },
185
+ ],
186
+ "/chart/line-chart": [
187
+ { label: "Basic Line Chart + Multilingual", uiType: "LineChart", title: "라인 차트 - 다국어" },
188
+ { label: "Line Only", uiType: "LineChart", title: "라인 차트 - Line Only (불릿 없이 선만 표시, bullet.lineOnly)" },
189
+ { label: "Line Only + Custom Category", uiType: "LineChart", title: "라인 차트 - 커스텀 카테고리" },
190
+ { label: "Group Tooltip", uiType: "LineChart", title: "라인 차트 - 그룹 툴팁 + Y축 NumberFormatter" },
191
+ { label: "Y-Axis Numberformatter", uiType: "LineChart", title: "라인 차트 - 그룹 툴팁 + Y축 NumberFormatter" },
192
+ { label: "Connect False", uiType: "LineChart", title: "라인 차트 - Connect False (값이 없는 구간은 선을 끊어서 표시)" },
193
+ { label: "Range", uiType: "LineChart", title: "라인 차트 - Range Area" },
194
+ { label: "Base Interval Month", uiType: "LineChart", title: "라인 차트 - Base Interval Month (월 단위 X축)" },
195
+ { label: "Base Interval Week + Click Event", uiType: "LineChart", title: "라인 차트 - Interval Week + Click Event" },
196
+ { label: "Udf + Multilingual", uiType: "LineChart", title: "라인 차트 - User Defined Function" },
197
+ { label: "Top N + Others", uiType: "LineChart", title: "라인 차트 - Top N + Others" },
198
+ { label: "Label Bullet", uiType: "LineChart", title: "라인 차트 - Bullet Label (데이터 포인트에 값 표시)" },
199
+ ],
200
+ "/chart/pie-chart": [
201
+ { label: "Basic Pie Chart + Multilingual", uiType: "PieChart", title: "파이 차트 - 기본 + 다국어" },
202
+ { label: "Click Series + Click Legend", uiType: "PieChart", title: "파이 차트 - Click Series + Click Legend" },
203
+ { label: "Legend Scroll", uiType: "PieChart", title: "파이 차트 - Legend Scroll" },
204
+ { label: "Udf + Custom Category", uiType: "PieChart", title: "파이 차트 - Udf + Custom Category" },
205
+ { label: "Label Image", uiType: "PieChart", title: "파이 차트 - Label Image" },
206
+ { label: "Custom Category (다양한 커스텀 색상 적용)", uiType: "PieChart", title: "파이 차트 - Custom Category (조각별 커스텀 색상 지정)" },
207
+ { label: "useSafeResolution", uiType: "PieChart", title: "파이 차트 - useSafeResolution (iOS 캔버스 메모리 제한 회피)" },
208
+ ],
209
+ "/chart/heatmap-chart": [
210
+ { label: "Default Legend Heatmap", uiType: "HeatmapChart", title: "히트맵 차트 - 기본" },
211
+ { label: "Custom Legend Heatmap", uiType: "HeatmapChart", title: "히트맵 차트 - 레전드 라벨 및 스타일" },
212
+ { label: "Custom Color Heatmap", uiType: "HeatmapChart", title: "히트맵 차트 - 커스텀 색상 및 클릭 이벤트" },
213
+ { label: "onClick Event Heatmap", uiType: "HeatmapChart", title: "히트맵 차트 - 커스텀 색상 및 클릭 이벤트" },
214
+ ],
215
+ "/chart/bubble-chart": [
216
+ { label: "1. 국가별 GDP — 다국어 적용", uiType: "BubbleChart", title: "버블 차트 - 국가별 GDP (sizeField + colorField + 다국어)" },
217
+ { label: "2. 클러스터 분포 — 클릭 이벤트", uiType: "BubbleChart", title: "버블 차트 - 클러스터 분포 (클릭 이벤트)" },
218
+ { label: "3. 자동 색상 할당", uiType: "BubbleChart", title: "버블 차트 - 자동 색상 할당 (colorField/sizeField 미지정)" },
219
+ { label: "4. 축 Padding (extraMin/extraMax)", uiType: "BubbleChart", title: "버블 차트 - 축 Padding (extraMin/extraMax 로 가장자리 잘림 방지)" },
220
+ ],
221
+ "/chart/zoom-scroll": [
222
+ { label: "Scrollbar X", uiType: "XyMultiChart", title: "XY 멀티 차트 - Zoom / Scroll: Scrollbar X (X축 스크롤바로 구간 이동·확대)" },
223
+ { label: "Scrollbar Y", uiType: "XyMultiChart", title: "XY 멀티 차트 - Zoom / Scroll: Scrollbar Y (Y축 스크롤바로 값 범위 확대)" },
224
+ { label: "ZoomXY + Scrollbars", uiType: "XyMultiChart", title: "XY 멀티 차트 - Zoom / Scroll: Scrollbar X + Y + 드래그 확대 (cursor.behavior zoomXY)" },
225
+ { label: "Zoom XY + Scrollbars With Series", uiType: "XyMultiChart", title: "XY 멀티 차트 - Zoom / Scroll: Scrollbar X 시리즈 미리보기 (scrollbarX.showSeries + height)" },
226
+ ],
227
+ "/chart/download": [
228
+ { label: "Bar Chart", uiType: "BarChart", title: "바 차트 - 다운로드 (기본)" },
229
+ { label: "Stack Chart", uiType: "StackChart", title: "스택 차트 - 다운로드" },
230
+ { label: "Line Chart", uiType: "LineChart", title: "라인 차트 - 다운로드" },
231
+ { label: "Pie Chart", uiType: "PieChart", title: "파이 차트 - 다운로드" },
232
+ ],
233
+ "/grid/ex1": [
234
+ { label: "Base Example Section", uiType: "DataGrid", title: "기본 데이터 그리드" },
235
+ { label: "다중 선택 (Multi-row Selection with Checkboxes)", uiType: "DataGrid", title: "다중 선택 (체크박스 Multi-row Selection)" },
236
+ { label: "에러 상태 (GRID_STATUS.ERROR)", uiType: "DataGrid", title: "Error Status (다시 시도 onRetry)" },
237
+ { label: "클릭 가능한 행 (Pointer Cursor)", uiType: "DataGrid", title: "행 클릭 이벤트 + 클릭 가능한 행 (onCellClick, Pointer Cursor)" },
238
+ { label: "No Results 상태", uiType: "DataGrid", title: "No Data" },
239
+ ],
240
+ "/grid/interaction": [
241
+ { label: "Input and Pagination (Custom Pagination)", uiType: "DataGrid", title: "Search + Pagination 추가" },
242
+ { label: "Insert Button Inside the Common Grid Search Section", uiType: "DataGrid", title: "Insert Button Inside the Common Grid Search Section" },
243
+ { label: "행 클릭 이벤트", uiType: "DataGrid", title: "행 클릭 이벤트 + 클릭 가능한 행 (onCellClick, Pointer Cursor)" },
244
+ { label: "컬럼 이동 (헤더 드래그 · 순서 저장/복원)", uiType: "DataGrid", title: "컬럼 이동 (헤더 드래그 · 순서 저장/복원)" },
245
+ ],
246
+ "/grid/scroll-layout": [
247
+ { label: "세로 스크롤 (Fixed Height with Vertical Scroll)", uiType: "DataGrid", title: "고정 높이 + 세로 스크롤 (gridHeight)" },
248
+ { label: "최대 10행 표시 + 내부 스크롤 (maxDisplayRows)", uiType: "DataGrid", title: "그리드 최대 높이 + 스크롤 (domLayout autoHeight)" },
249
+ { label: "Long Text with autoHeight", uiType: "DataGrid", title: "긴 텍스트 컬럼 (한 줄 + 말줄임 툴팁 / 줄바꿈 선택)" },
250
+ ],
251
+ "/grid/ex3": [
252
+ { label: "No data Section", uiType: "DataGrid", title: "No Data" },
253
+ { label: "Search No data Section", uiType: "DataGrid", title: "Search No Data (검색 결과 없음 — usedSearch)" },
254
+ { label: "custom no data section", uiType: "DataGrid", title: "Custom No Data" },
255
+ ],
256
+ "/grid/ex8": [
257
+ { label: "RatioBar Section", uiType: "DataGrid", title: "Ratio Bar" },
258
+ { label: "DataBar Section (Excel-style)", uiType: "DataGrid", title: "Data Bar" },
259
+ ],
260
+ "/grid/ex13": [
261
+ { label: "Column Group - Basic Example", uiType: "DataGrid", title: "Column Group - Basic" },
262
+ { label: "Column Group - Nested Example", uiType: "DataGrid", title: "Column Group - Nested" },
263
+ ],
264
+ "/grid/ex15": [
265
+ { label: "1. 셀 단위 로딩 (Cell-level Loading)", uiType: "DataGrid", title: "셀 단위 로딩 (Partial Loading — refreshCells) + 컬럼 전체 / 실패·재시도" },
266
+ { label: "2. 행 단위 로딩 (Row-level Loading)", uiType: "DataGrid", title: "행 단위 로딩 (Partial Loading — rowClassRules + redrawRows) + 선택 행 일괄 로딩" },
267
+ { label: "3. 선택 행 일괄 로딩 (Bulk Row Loading)", uiType: "DataGrid", title: "행 단위 로딩 (Partial Loading — rowClassRules + redrawRows) + 선택 행 일괄 로딩" },
268
+ { label: "4. 컬럼 단위 로딩 + 실패/재시도", uiType: "DataGrid", title: "셀 단위 로딩 (Partial Loading — refreshCells) + 컬럼 전체 / 실패·재시도" },
269
+ ],
270
+ };
271
+ function normalizePath(p) {
272
+ // "<링크> 3" 처럼 뒤에 번호가 붙을 수 있으므로 첫 토큰만 경로로 본다
273
+ let s = p.trim().split(/\s+/)[0] ?? "";
274
+ try {
275
+ if (/^https?:\/\//i.test(s))
276
+ s = new URL(s).pathname;
277
+ }
278
+ catch {
279
+ /* URL 파싱 실패 시 문자열 그대로 처리 */
280
+ }
281
+ s = s.split(/[?#]/)[0];
282
+ s = s.replace(/^\/?v2\/uidemo/i, "").replace(/^\/?uidemo(?=\/|$)/i, "");
283
+ if (!s.startsWith("/"))
284
+ s = "/" + s;
285
+ s = s.replace(/\/+$/, "");
286
+ return (s || "/").toLowerCase();
287
+ }
288
+ /** 입력이 uidemo 데모 링크(또는 /v2/uidemo 경로)처럼 보이는지 */
289
+ export function looksLikeDemoUrl(input) {
290
+ return /uidemo/i.test(input) || /^https?:\/\//i.test(input.trim());
291
+ }
292
+ /** 데모 링크 → 매핑 항목. 못 찾으면 route 가 undefined */
293
+ export function resolveDemoUrl(input) {
294
+ const path = normalizePath(input);
295
+ const tab = /[#&?]tab=([\w-]+)/i.exec(input)?.[1]?.toLowerCase();
296
+ const samePath = UIDEMO_ROUTES.filter(r => r.path === path);
297
+ const tabs = samePath.filter(r => r.tab);
298
+ const route = (tab && tabs.find(r => r.tab === tab)) || samePath.find(r => !r.tab);
299
+ // "N번째": URL 뒤에 공백으로 붙인 "5", "5번째", "#5" 또는 #demo=5 / ?n=5
300
+ const afterUrl = input.trim().replace(/^\S+/, "");
301
+ const idx = /[#&?](?:demo|example|ex|n)=(\d+)/i.exec(input)?.[1] ??
302
+ /(\d+)\s*(?:번째|번|th|st|nd|rd)?/i.exec(afterUrl)?.[1];
303
+ return { path, tab, route, tabs, demos: UIDEMO_DEMOS[path] ?? [], index: idx ? Number(idx) : undefined };
304
+ }
305
+ /** 항목의 데모 링크 */
306
+ export function demoUrlOf(r) {
307
+ return UIDEMO_BASE_URL + (r.path === "/" ? "" : r.path) + (r.tab ? `#tab=${r.tab}` : "");
308
+ }
309
+ /** 데모 링크 해석 결과를 복붙 가능한 다음 호출문과 함께 마크다운으로 */
310
+ export function renderDemoMatch(input) {
311
+ const m = resolveDemoUrl(input);
312
+ if (!m.route) {
313
+ const pages = UIDEMO_ROUTES.filter(r => !r.tab).map(r => `- ${demoUrlOf(r)} — ${r.title}`);
314
+ return `'${input}' 에 해당하는 uidemo 데모 페이지를 찾지 못했습니다 (경로: ${m.path}). 매핑된 데모 페이지 목록:\n${pages.join("\n")}`;
315
+ }
316
+ const r = m.route;
317
+ let md = `# uidemo 데모: ${r.title}\n\n링크: ${demoUrlOf(r)}\n\n`;
318
+ if (r.note)
319
+ md += `> ${r.note}\n\n`;
320
+ if (r.components.length > 0) {
321
+ md += `## 이 화면의 컴포넌트 — 스펙 조회\n`;
322
+ md += r.components.map(c => `getComponentSpec({ component: "${c}" })`).join("\n") + "\n\n";
323
+ }
324
+ if (r.examples.length > 0) {
325
+ md += `## 예제 조회\n`;
326
+ md += r.examples
327
+ .map(e => (e.keyword ? `getUIExamples({ uiType: "${e.uiType}", keyword: "${e.keyword}" })` : `getUIExamples({ uiType: "${e.uiType}" })`))
328
+ .join("\n") + "\n\n";
329
+ }
330
+ if (m.demos.length > 0) {
331
+ const call = (d) => `getUIExamples({ uiType: "${d.uiType}", keyword: "${d.title}" })`;
332
+ const picked = m.index ? m.demos[m.index - 1] : undefined;
333
+ if (m.index && picked) {
334
+ md += `## 데모 화면의 ${m.index}번째 예제 — ${picked.label}\n${call(picked)}\n\n`;
335
+ }
336
+ else if (m.index) {
337
+ md += `> 이 화면의 예제는 ${m.demos.length}개입니다 (${m.index}번째 없음). 아래 순서 목록에서 고르세요.\n\n`;
338
+ }
339
+ md += `## 데모 화면 예제 순서 (위에서 아래) → 해당 예제\n`;
340
+ md += m.demos.map((d, i) => `${i + 1}. ${d.label} → ${call(d)}`).join("\n") + "\n\n";
341
+ md += `"N번째 예제"를 바로 집으려면 링크 뒤에 번호를 붙이세요: getUIExamples({ uiType: "${demoUrlOf(r)} 3" })\n\n`;
342
+ }
343
+ if (r.components.length === 0 && r.examples.length === 0) {
344
+ md += `이 화면에 대응하는 컴포넌트 스펙·예제는 없습니다.\n\n`;
345
+ }
346
+ if (!r.tab && m.tabs.length > 0) {
347
+ md += `## 탭별 링크 (#tab=<id>)\n`;
348
+ md += m.tabs.map(t => `- #tab=${t.tab} — ${t.title}: ${t.components.join(", ") || "(스펙 없음)"}`).join("\n") + "\n\n";
349
+ }
350
+ if (r.components.length > 0 || r.examples.length > 0) {
351
+ md += `위 호출문을 그대로 실행해 스펙·예제를 확인한 뒤 코드를 작성하세요.`;
352
+ }
353
+ return md.trimEnd();
354
+ }