@bridger-kr/react 0.1.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 (273) hide show
  1. package/README.md +62 -0
  2. package/dist/components/core/Badge.cjs +36 -0
  3. package/dist/components/core/Badge.cjs.map +1 -0
  4. package/dist/components/core/Badge.d.cts +18 -0
  5. package/dist/components/core/Badge.d.ts +18 -0
  6. package/dist/components/core/Badge.mjs +34 -0
  7. package/dist/components/core/Badge.mjs.map +1 -0
  8. package/dist/components/core/Button.cjs +57 -0
  9. package/dist/components/core/Button.cjs.map +1 -0
  10. package/dist/components/core/Button.d.cts +26 -0
  11. package/dist/components/core/Button.d.ts +26 -0
  12. package/dist/components/core/Button.mjs +55 -0
  13. package/dist/components/core/Button.mjs.map +1 -0
  14. package/dist/components/core/Card.cjs +57 -0
  15. package/dist/components/core/Card.cjs.map +1 -0
  16. package/dist/components/core/Card.d.cts +27 -0
  17. package/dist/components/core/Card.d.ts +27 -0
  18. package/dist/components/core/Card.mjs +54 -0
  19. package/dist/components/core/Card.mjs.map +1 -0
  20. package/dist/components/core/FilterChip.cjs +54 -0
  21. package/dist/components/core/FilterChip.cjs.map +1 -0
  22. package/dist/components/core/FilterChip.d.cts +23 -0
  23. package/dist/components/core/FilterChip.d.ts +23 -0
  24. package/dist/components/core/FilterChip.mjs +52 -0
  25. package/dist/components/core/FilterChip.mjs.map +1 -0
  26. package/dist/components/core/Input.cjs +67 -0
  27. package/dist/components/core/Input.cjs.map +1 -0
  28. package/dist/components/core/Input.d.cts +20 -0
  29. package/dist/components/core/Input.d.ts +20 -0
  30. package/dist/components/core/Input.mjs +65 -0
  31. package/dist/components/core/Input.mjs.map +1 -0
  32. package/dist/components/core/StatusPill.cjs +57 -0
  33. package/dist/components/core/StatusPill.cjs.map +1 -0
  34. package/dist/components/core/StatusPill.d.cts +19 -0
  35. package/dist/components/core/StatusPill.d.ts +19 -0
  36. package/dist/components/core/StatusPill.mjs +55 -0
  37. package/dist/components/core/StatusPill.mjs.map +1 -0
  38. package/dist/components/core/Surface.cjs +52 -0
  39. package/dist/components/core/Surface.cjs.map +1 -0
  40. package/dist/components/core/Surface.d.cts +24 -0
  41. package/dist/components/core/Surface.d.ts +24 -0
  42. package/dist/components/core/Surface.mjs +47 -0
  43. package/dist/components/core/Surface.mjs.map +1 -0
  44. package/dist/components/core/Tabs.cjs +64 -0
  45. package/dist/components/core/Tabs.cjs.map +1 -0
  46. package/dist/components/core/Tabs.d.cts +24 -0
  47. package/dist/components/core/Tabs.d.ts +24 -0
  48. package/dist/components/core/Tabs.mjs +62 -0
  49. package/dist/components/core/Tabs.mjs.map +1 -0
  50. package/dist/components/data/Avatar.cjs +40 -0
  51. package/dist/components/data/Avatar.cjs.map +1 -0
  52. package/dist/components/data/Avatar.d.cts +24 -0
  53. package/dist/components/data/Avatar.d.ts +24 -0
  54. package/dist/components/data/Avatar.mjs +38 -0
  55. package/dist/components/data/Avatar.mjs.map +1 -0
  56. package/dist/components/data/CodeBlock.cjs +92 -0
  57. package/dist/components/data/CodeBlock.cjs.map +1 -0
  58. package/dist/components/data/CodeBlock.d.cts +20 -0
  59. package/dist/components/data/CodeBlock.d.ts +20 -0
  60. package/dist/components/data/CodeBlock.mjs +90 -0
  61. package/dist/components/data/CodeBlock.mjs.map +1 -0
  62. package/dist/components/data/KeyValue.cjs +55 -0
  63. package/dist/components/data/KeyValue.cjs.map +1 -0
  64. package/dist/components/data/KeyValue.d.cts +24 -0
  65. package/dist/components/data/KeyValue.d.ts +24 -0
  66. package/dist/components/data/KeyValue.mjs +53 -0
  67. package/dist/components/data/KeyValue.mjs.map +1 -0
  68. package/dist/components/data/LogRow.cjs +55 -0
  69. package/dist/components/data/LogRow.cjs.map +1 -0
  70. package/dist/components/data/LogRow.d.cts +23 -0
  71. package/dist/components/data/LogRow.d.ts +23 -0
  72. package/dist/components/data/LogRow.mjs +53 -0
  73. package/dist/components/data/LogRow.mjs.map +1 -0
  74. package/dist/components/data/Pagination.cjs +44 -0
  75. package/dist/components/data/Pagination.cjs.map +1 -0
  76. package/dist/components/data/Pagination.d.cts +13 -0
  77. package/dist/components/data/Pagination.d.ts +13 -0
  78. package/dist/components/data/Pagination.mjs +42 -0
  79. package/dist/components/data/Pagination.mjs.map +1 -0
  80. package/dist/components/data/StatTile.cjs +20 -0
  81. package/dist/components/data/StatTile.cjs.map +1 -0
  82. package/dist/components/data/StatTile.d.cts +19 -0
  83. package/dist/components/data/StatTile.d.ts +19 -0
  84. package/dist/components/data/StatTile.mjs +18 -0
  85. package/dist/components/data/StatTile.mjs.map +1 -0
  86. package/dist/components/data/Table.cjs +45 -0
  87. package/dist/components/data/Table.cjs.map +1 -0
  88. package/dist/components/data/Table.d.cts +27 -0
  89. package/dist/components/data/Table.d.ts +27 -0
  90. package/dist/components/data/Table.mjs +43 -0
  91. package/dist/components/data/Table.mjs.map +1 -0
  92. package/dist/components/data/UsageMeter.cjs +28 -0
  93. package/dist/components/data/UsageMeter.cjs.map +1 -0
  94. package/dist/components/data/UsageMeter.d.cts +19 -0
  95. package/dist/components/data/UsageMeter.d.ts +19 -0
  96. package/dist/components/data/UsageMeter.mjs +26 -0
  97. package/dist/components/data/UsageMeter.mjs.map +1 -0
  98. package/dist/components/feedback/Alert.cjs +78 -0
  99. package/dist/components/feedback/Alert.cjs.map +1 -0
  100. package/dist/components/feedback/Alert.d.cts +29 -0
  101. package/dist/components/feedback/Alert.d.ts +29 -0
  102. package/dist/components/feedback/Alert.mjs +74 -0
  103. package/dist/components/feedback/Alert.mjs.map +1 -0
  104. package/dist/components/feedback/Dialog.cjs +62 -0
  105. package/dist/components/feedback/Dialog.cjs.map +1 -0
  106. package/dist/components/feedback/Dialog.d.cts +17 -0
  107. package/dist/components/feedback/Dialog.d.ts +17 -0
  108. package/dist/components/feedback/Dialog.mjs +60 -0
  109. package/dist/components/feedback/Dialog.mjs.map +1 -0
  110. package/dist/components/feedback/Drawer.cjs +58 -0
  111. package/dist/components/feedback/Drawer.cjs.map +1 -0
  112. package/dist/components/feedback/Drawer.d.cts +22 -0
  113. package/dist/components/feedback/Drawer.d.ts +22 -0
  114. package/dist/components/feedback/Drawer.mjs +56 -0
  115. package/dist/components/feedback/Drawer.mjs.map +1 -0
  116. package/dist/components/feedback/EmptyState.cjs +36 -0
  117. package/dist/components/feedback/EmptyState.cjs.map +1 -0
  118. package/dist/components/feedback/EmptyState.d.cts +14 -0
  119. package/dist/components/feedback/EmptyState.d.ts +14 -0
  120. package/dist/components/feedback/EmptyState.mjs +34 -0
  121. package/dist/components/feedback/EmptyState.mjs.map +1 -0
  122. package/dist/components/feedback/Skeleton.cjs +19 -0
  123. package/dist/components/feedback/Skeleton.cjs.map +1 -0
  124. package/dist/components/feedback/Skeleton.d.cts +12 -0
  125. package/dist/components/feedback/Skeleton.d.ts +12 -0
  126. package/dist/components/feedback/Skeleton.mjs +17 -0
  127. package/dist/components/feedback/Skeleton.mjs.map +1 -0
  128. package/dist/components/feedback/Spinner.cjs +17 -0
  129. package/dist/components/feedback/Spinner.cjs.map +1 -0
  130. package/dist/components/feedback/Spinner.d.cts +12 -0
  131. package/dist/components/feedback/Spinner.d.ts +12 -0
  132. package/dist/components/feedback/Spinner.mjs +15 -0
  133. package/dist/components/feedback/Spinner.mjs.map +1 -0
  134. package/dist/components/feedback/Toast.cjs +32 -0
  135. package/dist/components/feedback/Toast.cjs.map +1 -0
  136. package/dist/components/feedback/Toast.d.cts +20 -0
  137. package/dist/components/feedback/Toast.d.ts +20 -0
  138. package/dist/components/feedback/Toast.mjs +30 -0
  139. package/dist/components/feedback/Toast.mjs.map +1 -0
  140. package/dist/components/feedback/Tooltip.cjs +51 -0
  141. package/dist/components/feedback/Tooltip.cjs.map +1 -0
  142. package/dist/components/feedback/Tooltip.d.cts +11 -0
  143. package/dist/components/feedback/Tooltip.d.ts +11 -0
  144. package/dist/components/feedback/Tooltip.mjs +49 -0
  145. package/dist/components/feedback/Tooltip.mjs.map +1 -0
  146. package/dist/components/forms/Checkbox.cjs +74 -0
  147. package/dist/components/forms/Checkbox.cjs.map +1 -0
  148. package/dist/components/forms/Checkbox.d.cts +16 -0
  149. package/dist/components/forms/Checkbox.d.ts +16 -0
  150. package/dist/components/forms/Checkbox.mjs +72 -0
  151. package/dist/components/forms/Checkbox.mjs.map +1 -0
  152. package/dist/components/forms/Combobox.cjs +217 -0
  153. package/dist/components/forms/Combobox.cjs.map +1 -0
  154. package/dist/components/forms/Combobox.d.cts +27 -0
  155. package/dist/components/forms/Combobox.d.ts +27 -0
  156. package/dist/components/forms/Combobox.mjs +215 -0
  157. package/dist/components/forms/Combobox.mjs.map +1 -0
  158. package/dist/components/forms/FileUpload.cjs +187 -0
  159. package/dist/components/forms/FileUpload.cjs.map +1 -0
  160. package/dist/components/forms/FileUpload.d.cts +26 -0
  161. package/dist/components/forms/FileUpload.d.ts +26 -0
  162. package/dist/components/forms/FileUpload.mjs +185 -0
  163. package/dist/components/forms/FileUpload.mjs.map +1 -0
  164. package/dist/components/forms/RadioGroup.cjs +73 -0
  165. package/dist/components/forms/RadioGroup.cjs.map +1 -0
  166. package/dist/components/forms/RadioGroup.d.cts +21 -0
  167. package/dist/components/forms/RadioGroup.d.ts +21 -0
  168. package/dist/components/forms/RadioGroup.mjs +71 -0
  169. package/dist/components/forms/RadioGroup.mjs.map +1 -0
  170. package/dist/components/forms/SegmentedControl.cjs +67 -0
  171. package/dist/components/forms/SegmentedControl.cjs.map +1 -0
  172. package/dist/components/forms/SegmentedControl.d.cts +19 -0
  173. package/dist/components/forms/SegmentedControl.d.ts +19 -0
  174. package/dist/components/forms/SegmentedControl.mjs +65 -0
  175. package/dist/components/forms/SegmentedControl.mjs.map +1 -0
  176. package/dist/components/forms/Select.cjs +67 -0
  177. package/dist/components/forms/Select.cjs.map +1 -0
  178. package/dist/components/forms/Select.d.cts +23 -0
  179. package/dist/components/forms/Select.d.ts +23 -0
  180. package/dist/components/forms/Select.mjs +65 -0
  181. package/dist/components/forms/Select.mjs.map +1 -0
  182. package/dist/components/forms/Slider.cjs +129 -0
  183. package/dist/components/forms/Slider.cjs.map +1 -0
  184. package/dist/components/forms/Slider.d.cts +24 -0
  185. package/dist/components/forms/Slider.d.ts +24 -0
  186. package/dist/components/forms/Slider.mjs +127 -0
  187. package/dist/components/forms/Slider.mjs.map +1 -0
  188. package/dist/components/forms/Switch.cjs +101 -0
  189. package/dist/components/forms/Switch.cjs.map +1 -0
  190. package/dist/components/forms/Switch.d.cts +24 -0
  191. package/dist/components/forms/Switch.d.ts +24 -0
  192. package/dist/components/forms/Switch.mjs +98 -0
  193. package/dist/components/forms/Switch.mjs.map +1 -0
  194. package/dist/components/forms/Textarea.cjs +35 -0
  195. package/dist/components/forms/Textarea.cjs.map +1 -0
  196. package/dist/components/forms/Textarea.d.cts +15 -0
  197. package/dist/components/forms/Textarea.d.ts +15 -0
  198. package/dist/components/forms/Textarea.mjs +33 -0
  199. package/dist/components/forms/Textarea.mjs.map +1 -0
  200. package/dist/components/navigation/Breadcrumb.cjs +27 -0
  201. package/dist/components/navigation/Breadcrumb.cjs.map +1 -0
  202. package/dist/components/navigation/Breadcrumb.d.cts +15 -0
  203. package/dist/components/navigation/Breadcrumb.d.ts +15 -0
  204. package/dist/components/navigation/Breadcrumb.mjs +25 -0
  205. package/dist/components/navigation/Breadcrumb.mjs.map +1 -0
  206. package/dist/components/navigation/CommandPalette.cjs +136 -0
  207. package/dist/components/navigation/CommandPalette.cjs.map +1 -0
  208. package/dist/components/navigation/CommandPalette.d.cts +26 -0
  209. package/dist/components/navigation/CommandPalette.d.ts +26 -0
  210. package/dist/components/navigation/CommandPalette.mjs +134 -0
  211. package/dist/components/navigation/CommandPalette.mjs.map +1 -0
  212. package/dist/components/navigation/Menu.cjs +104 -0
  213. package/dist/components/navigation/Menu.cjs.map +1 -0
  214. package/dist/components/navigation/Menu.d.cts +20 -0
  215. package/dist/components/navigation/Menu.d.ts +20 -0
  216. package/dist/components/navigation/Menu.mjs +102 -0
  217. package/dist/components/navigation/Menu.mjs.map +1 -0
  218. package/dist/components/navigation/Sidebar.cjs +60 -0
  219. package/dist/components/navigation/Sidebar.cjs.map +1 -0
  220. package/dist/components/navigation/Sidebar.d.cts +30 -0
  221. package/dist/components/navigation/Sidebar.d.ts +30 -0
  222. package/dist/components/navigation/Sidebar.mjs +58 -0
  223. package/dist/components/navigation/Sidebar.mjs.map +1 -0
  224. package/dist/components/navigation/Stepper.cjs +55 -0
  225. package/dist/components/navigation/Stepper.cjs.map +1 -0
  226. package/dist/components/navigation/Stepper.d.cts +21 -0
  227. package/dist/components/navigation/Stepper.d.ts +21 -0
  228. package/dist/components/navigation/Stepper.mjs +53 -0
  229. package/dist/components/navigation/Stepper.mjs.map +1 -0
  230. package/dist/components/product/BrandLogo.cjs +159 -0
  231. package/dist/components/product/BrandLogo.cjs.map +1 -0
  232. package/dist/components/product/BrandLogo.d.cts +28 -0
  233. package/dist/components/product/BrandLogo.d.ts +28 -0
  234. package/dist/components/product/BrandLogo.mjs +156 -0
  235. package/dist/components/product/BrandLogo.mjs.map +1 -0
  236. package/dist/components/product/ProductActionPill.cjs +57 -0
  237. package/dist/components/product/ProductActionPill.cjs.map +1 -0
  238. package/dist/components/product/ProductActionPill.d.cts +31 -0
  239. package/dist/components/product/ProductActionPill.d.ts +31 -0
  240. package/dist/components/product/ProductActionPill.mjs +52 -0
  241. package/dist/components/product/ProductActionPill.mjs.map +1 -0
  242. package/dist/components/product/ProductCinematic.cjs +69 -0
  243. package/dist/components/product/ProductCinematic.cjs.map +1 -0
  244. package/dist/components/product/ProductCinematic.d.cts +33 -0
  245. package/dist/components/product/ProductCinematic.d.ts +33 -0
  246. package/dist/components/product/ProductCinematic.mjs +63 -0
  247. package/dist/components/product/ProductCinematic.mjs.map +1 -0
  248. package/dist/components/product/ProductPageHeader.cjs +35 -0
  249. package/dist/components/product/ProductPageHeader.cjs.map +1 -0
  250. package/dist/components/product/ProductPageHeader.d.cts +13 -0
  251. package/dist/components/product/ProductPageHeader.d.ts +13 -0
  252. package/dist/components/product/ProductPageHeader.mjs +33 -0
  253. package/dist/components/product/ProductPageHeader.mjs.map +1 -0
  254. package/dist/components/product/SectionCard.cjs +72 -0
  255. package/dist/components/product/SectionCard.cjs.map +1 -0
  256. package/dist/components/product/SectionCard.d.cts +20 -0
  257. package/dist/components/product/SectionCard.d.ts +20 -0
  258. package/dist/components/product/SectionCard.mjs +70 -0
  259. package/dist/components/product/SectionCard.mjs.map +1 -0
  260. package/dist/components/product/ToolCard.cjs +70 -0
  261. package/dist/components/product/ToolCard.cjs.map +1 -0
  262. package/dist/components/product/ToolCard.d.cts +22 -0
  263. package/dist/components/product/ToolCard.d.ts +22 -0
  264. package/dist/components/product/ToolCard.mjs +68 -0
  265. package/dist/components/product/ToolCard.mjs.map +1 -0
  266. package/dist/index.cjs +2593 -0
  267. package/dist/index.cjs.map +1 -0
  268. package/dist/index.d.cts +49 -0
  269. package/dist/index.d.ts +49 -0
  270. package/dist/index.mjs +2532 -0
  271. package/dist/index.mjs.map +1 -0
  272. package/dist/styles.css +463 -0
  273. package/package.json +50 -0
package/dist/index.cjs ADDED
@@ -0,0 +1,2593 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var react = require('react');
5
+
6
+ // src/lib/cx.ts
7
+ function cx(...classes) {
8
+ return classes.filter(Boolean).join(" ");
9
+ }
10
+ var TONE_CLASS = {
11
+ neutral: "badge",
12
+ accent: "badge badge-accent",
13
+ info: "badge badge-info",
14
+ success: "badge badge-success",
15
+ warning: "badge badge-warning",
16
+ danger: "badge badge-danger"
17
+ };
18
+ function Badge({ children, tone = "neutral", dot = false, style, ...rest }) {
19
+ const cls = TONE_CLASS[tone] ?? TONE_CLASS.neutral;
20
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cls, style, ...rest, children: [
21
+ dot ? /* @__PURE__ */ jsxRuntime.jsx(
22
+ "span",
23
+ {
24
+ "aria-hidden": "true",
25
+ style: {
26
+ width: 6,
27
+ height: 6,
28
+ borderRadius: "9999px",
29
+ background: "currentColor",
30
+ display: "inline-block"
31
+ }
32
+ }
33
+ ) : null,
34
+ children
35
+ ] });
36
+ }
37
+ var SIZE = {
38
+ sm: { height: 36, padding: "0 14px", fontSize: 13 },
39
+ md: { height: 40, padding: "0 16px", fontSize: 14 },
40
+ lg: { height: 48, padding: "0 20px", fontSize: 15 }
41
+ };
42
+ var VARIANT_CLASS = {
43
+ primary: "btn-primary",
44
+ secondary: "btn-secondary",
45
+ ghost: "btn-ghost"
46
+ };
47
+ function Button({
48
+ children,
49
+ variant = "primary",
50
+ size = "md",
51
+ icon = null,
52
+ iconRight = null,
53
+ disabled = false,
54
+ type = "button",
55
+ onClick,
56
+ style,
57
+ ...rest
58
+ }) {
59
+ const cls = VARIANT_CLASS[variant] ?? VARIANT_CLASS.primary;
60
+ const s = SIZE[size] ?? SIZE.md;
61
+ return /* @__PURE__ */ jsxRuntime.jsxs(
62
+ "button",
63
+ {
64
+ type,
65
+ className: cls,
66
+ disabled,
67
+ onClick,
68
+ style: {
69
+ height: s.height,
70
+ padding: s.padding,
71
+ fontSize: s.fontSize,
72
+ opacity: disabled ? 0.55 : 1,
73
+ cursor: disabled ? "not-allowed" : "pointer",
74
+ ...style
75
+ },
76
+ ...rest,
77
+ children: [
78
+ icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-flex" }, "aria-hidden": "true", children: icon }) : null,
79
+ children,
80
+ iconRight ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-flex" }, "aria-hidden": "true", children: iconRight }) : null
81
+ ]
82
+ }
83
+ );
84
+ }
85
+ var CardTone = {
86
+ Default: "default",
87
+ Muted: "muted",
88
+ Raised: "raised",
89
+ Panel: "panel"
90
+ };
91
+ var VARIANT_STYLE = {
92
+ default: { background: "var(--dt-surface)", boxShadow: "var(--dt-card-rest)" },
93
+ muted: { background: "var(--dt-surface-sunken)" },
94
+ raised: { background: "var(--dt-surface-raised)", boxShadow: "var(--dt-card-float)" },
95
+ panel: { background: "var(--dt-surface)", boxShadow: "var(--dt-shadow-xs)" }
96
+ };
97
+ function Card({
98
+ children,
99
+ variant,
100
+ tone,
101
+ interactive = false,
102
+ padding = 20,
103
+ className,
104
+ style,
105
+ ...rest
106
+ }) {
107
+ const selectedTone = tone ?? variant ?? CardTone.Default;
108
+ const v = VARIANT_STYLE[selectedTone] ?? VARIANT_STYLE[CardTone.Default];
109
+ return /* @__PURE__ */ jsxRuntime.jsxs(
110
+ "div",
111
+ {
112
+ className: cx(interactive && "dt-card-interactive", className),
113
+ style: {
114
+ borderRadius: "var(--dt-radius-lg)",
115
+ color: "var(--dt-ink)",
116
+ padding,
117
+ transition: "box-shadow var(--dt-motion), background-color var(--dt-motion)",
118
+ ...v,
119
+ ...style
120
+ },
121
+ ...rest,
122
+ children: [
123
+ children,
124
+ interactive ? /* @__PURE__ */ jsxRuntime.jsx("style", { children: ".dt-card-interactive:hover{box-shadow:var(--dt-card-hover)}" }) : null
125
+ ]
126
+ }
127
+ );
128
+ }
129
+ function FilterChip({ label, count, active = false, removable = false, onToggle, onRemove, icon, style }) {
130
+ return /* @__PURE__ */ jsxRuntime.jsxs(
131
+ "button",
132
+ {
133
+ type: "button",
134
+ onClick: onToggle,
135
+ "aria-pressed": active,
136
+ style: {
137
+ display: "inline-flex",
138
+ alignItems: "center",
139
+ gap: 7,
140
+ height: 30,
141
+ padding: "0 10px",
142
+ borderRadius: "var(--dt-radius-sm)",
143
+ cursor: "pointer",
144
+ fontFamily: "var(--dt-font-sans)",
145
+ fontSize: 13,
146
+ fontWeight: active ? 650 : 500,
147
+ background: active ? "var(--dt-tint-accent)" : "var(--dt-surface)",
148
+ color: active ? "var(--dt-accent)" : "var(--dt-muted-strong)",
149
+ boxShadow: `inset 0 0 0 1px ${active ? "color-mix(in srgb, var(--dt-accent) 40%, transparent)" : "var(--dt-border-strong)"}`,
150
+ transition: "background-color var(--dt-motion-fast), box-shadow var(--dt-motion-fast)",
151
+ ...style
152
+ },
153
+ children: [
154
+ icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-flex", color: active ? "var(--dt-accent)" : "var(--dt-muted)" }, "aria-hidden": "true", children: icon }) : null,
155
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }),
156
+ count != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: "var(--dt-font-mono)", fontSize: 11, fontWeight: 600, color: active ? "var(--dt-accent)" : "var(--dt-muted)", fontVariantNumeric: "tabular-nums" }, children: count }) : null,
157
+ removable ? /* @__PURE__ */ jsxRuntime.jsx(
158
+ "span",
159
+ {
160
+ role: "button",
161
+ "aria-label": "\uC81C\uAC70",
162
+ onClick: (e) => {
163
+ e.stopPropagation();
164
+ onRemove?.();
165
+ },
166
+ style: { display: "inline-flex", marginRight: -2, color: active ? "var(--dt-accent)" : "var(--dt-muted)" },
167
+ children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6L6 18M6 6l12 12", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round" }) })
168
+ }
169
+ ) : null
170
+ ]
171
+ }
172
+ );
173
+ }
174
+ function Input({
175
+ label,
176
+ hint,
177
+ mono = false,
178
+ id,
179
+ type = "text",
180
+ prefix = null,
181
+ invalid = false,
182
+ style,
183
+ ...rest
184
+ }) {
185
+ const inputId = id || (label ? `in-${label.replace(/\s+/g, "-")}` : void 0);
186
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 8 }, children: [
187
+ label ? /* @__PURE__ */ jsxRuntime.jsx(
188
+ "label",
189
+ {
190
+ htmlFor: inputId,
191
+ style: { fontSize: 13, fontWeight: 600, color: "var(--dt-muted-strong)" },
192
+ children: label
193
+ }
194
+ ) : null,
195
+ /* @__PURE__ */ jsxRuntime.jsxs(
196
+ "div",
197
+ {
198
+ className: invalid ? "dt-field dt-field-invalid" : "dt-field",
199
+ style: {
200
+ display: "flex",
201
+ alignItems: "center",
202
+ gap: 8,
203
+ padding: "0 12px"
204
+ },
205
+ children: [
206
+ prefix ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "var(--dt-muted)", display: "inline-flex" }, children: prefix }) : null,
207
+ /* @__PURE__ */ jsxRuntime.jsx(
208
+ "input",
209
+ {
210
+ id: inputId,
211
+ type,
212
+ style: {
213
+ flex: 1,
214
+ border: "none",
215
+ outline: "none",
216
+ background: "transparent",
217
+ color: "var(--dt-ink-strong)",
218
+ padding: "11px 0",
219
+ fontFamily: mono ? "var(--dt-font-mono)" : "var(--dt-font-sans)",
220
+ fontSize: mono ? 13 : 14,
221
+ ...style
222
+ },
223
+ ...rest
224
+ }
225
+ )
226
+ ]
227
+ }
228
+ ),
229
+ hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: "var(--dt-muted)" }, children: hint }) : null
230
+ ] });
231
+ }
232
+ var STATUS = {
233
+ connected: { bg: "var(--dt-tint-success)", fg: "var(--dt-success)" },
234
+ success: { bg: "var(--dt-tint-success)", fg: "var(--dt-success)" },
235
+ reconnecting: { bg: "var(--dt-tint-warning)", fg: "var(--dt-warning)" },
236
+ warning: { bg: "var(--dt-tint-warning)", fg: "var(--dt-warning)" },
237
+ disconnected: { bg: "var(--dt-tint-danger)", fg: "var(--dt-danger)" },
238
+ danger: { bg: "var(--dt-tint-danger)", fg: "var(--dt-danger)" },
239
+ info: { bg: "var(--dt-tint-cobalt)", fg: "var(--dt-info)" },
240
+ idle: { bg: "var(--dt-tint-muted)", fg: "var(--dt-muted-strong)" }
241
+ };
242
+ function StatusPill({ status = "idle", children, pulse = false, style, ...rest }) {
243
+ const tone = STATUS[status] ?? STATUS.idle;
244
+ return /* @__PURE__ */ jsxRuntime.jsxs(
245
+ "span",
246
+ {
247
+ style: {
248
+ display: "inline-flex",
249
+ alignItems: "center",
250
+ gap: 6,
251
+ borderRadius: "var(--dt-radius-full)",
252
+ background: tone.bg,
253
+ padding: "4px 10px",
254
+ fontSize: 12,
255
+ fontWeight: 600,
256
+ color: tone.fg,
257
+ ...style
258
+ },
259
+ ...rest,
260
+ children: [
261
+ pulse ? /* @__PURE__ */ jsxRuntime.jsx(
262
+ "span",
263
+ {
264
+ "aria-hidden": "true",
265
+ style: {
266
+ width: 7,
267
+ height: 7,
268
+ borderRadius: "9999px",
269
+ background: tone.fg,
270
+ animation: "dt-status-pulse 1.6s var(--dt-ease) infinite"
271
+ }
272
+ }
273
+ ) : null,
274
+ children,
275
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: "@keyframes dt-status-pulse{0%,100%{opacity:1}50%{opacity:.35}}" })
276
+ ]
277
+ }
278
+ );
279
+ }
280
+ var SurfaceTone = {
281
+ Default: "default",
282
+ Raised: "raised",
283
+ Sunken: "sunken"
284
+ };
285
+ var MetricAccent = {
286
+ Accent: "accent",
287
+ Success: "success",
288
+ Info: "info"
289
+ };
290
+ var surfaceToneClass = {
291
+ [SurfaceTone.Default]: "bg-[var(--dt-surface)]",
292
+ [SurfaceTone.Raised]: "bg-[var(--dt-surface-raised)]",
293
+ [SurfaceTone.Sunken]: "bg-[var(--dt-surface-sunken)]"
294
+ };
295
+ var metricAccentClass = {
296
+ [MetricAccent.Accent]: "text-[var(--dt-accent)]",
297
+ [MetricAccent.Success]: "text-[var(--dt-success)]",
298
+ [MetricAccent.Info]: "text-[var(--dt-info)]"
299
+ };
300
+ function Panel({ tone = SurfaceTone.Default, className, children, ...props }) {
301
+ return /* @__PURE__ */ jsxRuntime.jsx(
302
+ "section",
303
+ {
304
+ className: cx(
305
+ "rounded-dtLg border border-[var(--dt-border)] px-5 py-5 md:px-6 md:py-6",
306
+ surfaceToneClass[tone],
307
+ className
308
+ ),
309
+ ...props,
310
+ children
311
+ }
312
+ );
313
+ }
314
+ function metricAccentColor(accent) {
315
+ return metricAccentClass[accent];
316
+ }
317
+ function Tabs({ tabs = [], value, defaultValue, onChange, style }) {
318
+ const [internal, setInternal] = react.useState(defaultValue ?? tabs[0]?.id);
319
+ const active = value !== void 0 ? value : internal;
320
+ const select = (id) => {
321
+ if (value === void 0) setInternal(id);
322
+ onChange?.(id);
323
+ };
324
+ return /* @__PURE__ */ jsxRuntime.jsx(
325
+ "div",
326
+ {
327
+ role: "tablist",
328
+ style: {
329
+ display: "flex",
330
+ gap: 4,
331
+ borderBottom: "1px solid var(--dt-border)",
332
+ ...style
333
+ },
334
+ children: tabs.map((tab) => {
335
+ const isActive = tab.id === active;
336
+ return /* @__PURE__ */ jsxRuntime.jsxs(
337
+ "button",
338
+ {
339
+ role: "tab",
340
+ "aria-selected": isActive,
341
+ type: "button",
342
+ onClick: () => select(tab.id),
343
+ style: {
344
+ position: "relative",
345
+ display: "inline-flex",
346
+ alignItems: "center",
347
+ gap: 7,
348
+ background: "transparent",
349
+ border: "none",
350
+ cursor: "pointer",
351
+ padding: "10px 12px",
352
+ marginBottom: -1,
353
+ fontSize: 13,
354
+ fontWeight: 600,
355
+ color: isActive ? "var(--dt-ink-strong)" : "var(--dt-muted)",
356
+ borderBottom: `2px solid ${isActive ? "var(--dt-accent)" : "transparent"}`,
357
+ transition: "color var(--dt-motion-fast)"
358
+ },
359
+ children: [
360
+ tab.icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", style: { display: "inline-flex" }, children: tab.icon }) : null,
361
+ tab.label,
362
+ tab.count != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: "var(--dt-font-mono)", fontSize: 11, color: "var(--dt-muted)" }, children: tab.count }) : null
363
+ ]
364
+ },
365
+ tab.id
366
+ );
367
+ })
368
+ }
369
+ );
370
+ }
371
+ function Checkbox({ label, checked, defaultChecked, onChange, disabled, id, style }) {
372
+ const cbId = id || (label ? `cb-${String(label).replace(/\s+/g, "-")}` : void 0);
373
+ const [internal, setInternal] = react.useState(defaultChecked ?? false);
374
+ const isOn = checked !== void 0 ? checked : internal;
375
+ const toggle = () => {
376
+ if (disabled) return;
377
+ if (checked === void 0) setInternal((v) => !v);
378
+ onChange?.(!isOn);
379
+ };
380
+ return /* @__PURE__ */ jsxRuntime.jsxs(
381
+ "label",
382
+ {
383
+ htmlFor: cbId,
384
+ style: {
385
+ display: "inline-flex",
386
+ alignItems: "center",
387
+ gap: 9,
388
+ cursor: disabled ? "not-allowed" : "pointer",
389
+ opacity: disabled ? 0.55 : 1,
390
+ ...style
391
+ },
392
+ children: [
393
+ /* @__PURE__ */ jsxRuntime.jsx(
394
+ "input",
395
+ {
396
+ id: cbId,
397
+ type: "checkbox",
398
+ checked: isOn,
399
+ onChange: toggle,
400
+ disabled,
401
+ style: { position: "absolute", opacity: 0, width: 0, height: 0 }
402
+ }
403
+ ),
404
+ /* @__PURE__ */ jsxRuntime.jsx(
405
+ "span",
406
+ {
407
+ style: {
408
+ width: 18,
409
+ height: 18,
410
+ flex: "0 0 auto",
411
+ borderRadius: 5,
412
+ display: "grid",
413
+ placeItems: "center",
414
+ background: isOn ? "var(--dt-accent)" : "var(--dt-surface)",
415
+ border: `1.5px solid ${isOn ? "var(--dt-accent)" : "var(--dt-border-strong)"}`,
416
+ transition: "background-color 130ms, border-color 130ms"
417
+ },
418
+ children: isOn ? /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
419
+ "path",
420
+ {
421
+ d: "M5 12l4.5 4.5L19 7",
422
+ stroke: "var(--dt-accent-ink)",
423
+ strokeWidth: "3",
424
+ strokeLinecap: "round",
425
+ strokeLinejoin: "round"
426
+ }
427
+ ) }) : null
428
+ }
429
+ ),
430
+ label ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 14, color: "var(--dt-ink)" }, children: label }) : null
431
+ ]
432
+ }
433
+ );
434
+ }
435
+ function Combobox({
436
+ label,
437
+ hint,
438
+ options = [],
439
+ value,
440
+ onChange,
441
+ placeholder = "\uAC80\uC0C9\u2026",
442
+ emptyText = "\uACB0\uACFC \uC5C6\uC74C",
443
+ id,
444
+ style
445
+ }) {
446
+ const [open, setOpen] = react.useState(false);
447
+ const [query, setQuery] = react.useState("");
448
+ const [active, setActive] = react.useState(0);
449
+ const rootRef = react.useRef(null);
450
+ const cbId = id || (label ? `cb-${label.replace(/\s+/g, "-")}` : void 0);
451
+ const selected = options.find((o) => o.value === value) || null;
452
+ react.useEffect(() => {
453
+ const onDoc = (e) => {
454
+ if (rootRef.current && !rootRef.current.contains(e.target)) setOpen(false);
455
+ };
456
+ document.addEventListener("mousedown", onDoc);
457
+ return () => document.removeEventListener("mousedown", onDoc);
458
+ }, []);
459
+ const q = query.trim().toLowerCase();
460
+ const filtered = q ? options.filter((o) => (o.label + " " + (o.meta || "")).toLowerCase().includes(q)) : options;
461
+ const commit = (o) => {
462
+ onChange?.(o.value);
463
+ setOpen(false);
464
+ setQuery("");
465
+ };
466
+ const onKey = (e) => {
467
+ if (e.key === "ArrowDown") {
468
+ e.preventDefault();
469
+ setOpen(true);
470
+ setActive((i) => Math.min(i + 1, filtered.length - 1));
471
+ } else if (e.key === "ArrowUp") {
472
+ e.preventDefault();
473
+ setActive((i) => Math.max(i - 1, 0));
474
+ } else if (e.key === "Enter" && open && filtered[active]) {
475
+ e.preventDefault();
476
+ commit(filtered[active]);
477
+ } else if (e.key === "Escape") {
478
+ setOpen(false);
479
+ }
480
+ };
481
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: rootRef, style: { display: "grid", gap: 7, position: "relative", ...style }, children: [
482
+ label ? /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: cbId, style: { fontSize: 13, fontWeight: 600, color: "var(--dt-muted-strong)" }, children: label }) : null,
483
+ /* @__PURE__ */ jsxRuntime.jsxs(
484
+ "div",
485
+ {
486
+ className: "dt-field",
487
+ style: {
488
+ display: "flex",
489
+ alignItems: "center",
490
+ gap: 9,
491
+ height: 44,
492
+ padding: "0 12px",
493
+ boxShadow: open ? "var(--dt-shadow-focus)" : void 0,
494
+ background: open ? "var(--dt-surface)" : "var(--dt-surface-sunken)"
495
+ },
496
+ onClick: () => setOpen(true),
497
+ children: [
498
+ /* @__PURE__ */ jsxRuntime.jsxs(
499
+ "svg",
500
+ {
501
+ width: "16",
502
+ height: "16",
503
+ viewBox: "0 0 24 24",
504
+ fill: "none",
505
+ "aria-hidden": "true",
506
+ style: { color: "var(--dt-muted)", flex: "0 0 auto" },
507
+ children: [
508
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "11", cy: "11", r: "7", stroke: "currentColor", strokeWidth: "2" }),
509
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 21l-4-4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
510
+ ]
511
+ }
512
+ ),
513
+ /* @__PURE__ */ jsxRuntime.jsx(
514
+ "input",
515
+ {
516
+ id: cbId,
517
+ value: open ? query : selected ? selected.label : "",
518
+ placeholder: selected && !open ? selected.label : placeholder,
519
+ onChange: (e) => {
520
+ setQuery(e.target.value);
521
+ setOpen(true);
522
+ setActive(0);
523
+ },
524
+ onFocus: () => setOpen(true),
525
+ onKeyDown: onKey,
526
+ style: {
527
+ flex: 1,
528
+ minWidth: 0,
529
+ border: "none",
530
+ outline: "none",
531
+ background: "transparent",
532
+ fontSize: 14,
533
+ fontFamily: "inherit",
534
+ color: "var(--dt-ink-strong)"
535
+ }
536
+ }
537
+ ),
538
+ selected && !open ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: "var(--dt-font-mono)", fontSize: 11, color: "var(--dt-muted)" }, children: selected.meta }) : null
539
+ ]
540
+ }
541
+ ),
542
+ open ? /* @__PURE__ */ jsxRuntime.jsx(
543
+ "div",
544
+ {
545
+ role: "listbox",
546
+ style: {
547
+ position: "absolute",
548
+ top: "calc(100% + 6px)",
549
+ left: 0,
550
+ right: 0,
551
+ zIndex: 20,
552
+ background: "var(--dt-surface)",
553
+ border: "1px solid var(--dt-border-strong)",
554
+ borderRadius: "var(--dt-radius-lg)",
555
+ boxShadow: "var(--dt-shadow-md)",
556
+ maxHeight: 240,
557
+ overflowY: "auto",
558
+ padding: 4
559
+ },
560
+ children: filtered.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "12px 12px", fontSize: 13, color: "var(--dt-muted)" }, children: emptyText }) : filtered.map((o, i) => {
561
+ const isActive = i === active;
562
+ const isSel = o.value === value;
563
+ return /* @__PURE__ */ jsxRuntime.jsxs(
564
+ "div",
565
+ {
566
+ role: "option",
567
+ "aria-selected": isSel,
568
+ onMouseEnter: () => setActive(i),
569
+ onMouseDown: (e) => {
570
+ e.preventDefault();
571
+ commit(o);
572
+ },
573
+ style: {
574
+ display: "flex",
575
+ alignItems: "center",
576
+ gap: 10,
577
+ padding: "9px 10px",
578
+ borderRadius: "var(--dt-radius-md)",
579
+ cursor: "pointer",
580
+ background: isActive ? "var(--dt-surface-sunken)" : "transparent"
581
+ },
582
+ children: [
583
+ /* @__PURE__ */ jsxRuntime.jsx(
584
+ "span",
585
+ {
586
+ style: {
587
+ flex: 1,
588
+ minWidth: 0,
589
+ fontSize: 13.5,
590
+ fontWeight: isSel ? 600 : 500,
591
+ color: "var(--dt-ink-strong)",
592
+ overflow: "hidden",
593
+ textOverflow: "ellipsis",
594
+ whiteSpace: "nowrap"
595
+ },
596
+ children: o.label
597
+ }
598
+ ),
599
+ o.meta ? /* @__PURE__ */ jsxRuntime.jsx(
600
+ "span",
601
+ {
602
+ style: {
603
+ fontFamily: "var(--dt-font-mono)",
604
+ fontSize: 11,
605
+ color: "var(--dt-muted)",
606
+ flex: "0 0 auto"
607
+ },
608
+ children: o.meta
609
+ }
610
+ ) : null,
611
+ isSel ? /* @__PURE__ */ jsxRuntime.jsx(
612
+ "svg",
613
+ {
614
+ width: "15",
615
+ height: "15",
616
+ viewBox: "0 0 24 24",
617
+ fill: "none",
618
+ "aria-hidden": "true",
619
+ style: { color: "var(--dt-accent)", flex: "0 0 auto" },
620
+ children: /* @__PURE__ */ jsxRuntime.jsx(
621
+ "path",
622
+ {
623
+ d: "M20 6L9 17l-5-5",
624
+ stroke: "currentColor",
625
+ strokeWidth: "2.2",
626
+ strokeLinecap: "round",
627
+ strokeLinejoin: "round"
628
+ }
629
+ )
630
+ }
631
+ ) : null
632
+ ]
633
+ },
634
+ o.value
635
+ );
636
+ })
637
+ }
638
+ ) : null,
639
+ hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: "var(--dt-muted)" }, children: hint }) : null
640
+ ] });
641
+ }
642
+ function fmtSize(bytes) {
643
+ if (bytes == null) return "";
644
+ if (bytes < 1024) return `${bytes} B`;
645
+ if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)} KB`;
646
+ return `${(bytes / 1024 / 1024).toFixed(1)} MB`;
647
+ }
648
+ function FileUpload({
649
+ label,
650
+ accept = ".json,.yaml,.yml",
651
+ hint = "OpenAPI \uC2A4\uD399 \xB7 JSON \uB610\uB294 YAML",
652
+ file,
653
+ onFiles,
654
+ onRemove,
655
+ id,
656
+ style
657
+ }) {
658
+ const [drag, setDrag] = react.useState(false);
659
+ const inputRef = react.useRef(null);
660
+ const fId = id || "fu";
661
+ const handle = (files) => {
662
+ if (files && files.length) onFiles?.(files);
663
+ };
664
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 7, ...style }, children: [
665
+ label ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 13, fontWeight: 600, color: "var(--dt-muted-strong)" }, children: label }) : null,
666
+ file ? /* @__PURE__ */ jsxRuntime.jsxs(
667
+ "div",
668
+ {
669
+ style: {
670
+ display: "flex",
671
+ alignItems: "center",
672
+ gap: 12,
673
+ padding: "12px 14px",
674
+ background: "var(--dt-surface)",
675
+ border: "1px solid var(--dt-border-strong)",
676
+ borderRadius: "var(--dt-radius-lg)"
677
+ },
678
+ children: [
679
+ /* @__PURE__ */ jsxRuntime.jsx(
680
+ "span",
681
+ {
682
+ style: {
683
+ width: 34,
684
+ height: 34,
685
+ flex: "0 0 auto",
686
+ display: "grid",
687
+ placeItems: "center",
688
+ borderRadius: "var(--dt-radius-md)",
689
+ background: "var(--dt-tint-accent)",
690
+ color: "var(--dt-accent)"
691
+ },
692
+ children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "17", height: "17", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
693
+ /* @__PURE__ */ jsxRuntime.jsx(
694
+ "path",
695
+ {
696
+ d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z",
697
+ stroke: "currentColor",
698
+ strokeWidth: "2",
699
+ strokeLinejoin: "round"
700
+ }
701
+ ),
702
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14 2v6h6", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round" })
703
+ ] })
704
+ }
705
+ ),
706
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
707
+ /* @__PURE__ */ jsxRuntime.jsx(
708
+ "div",
709
+ {
710
+ style: {
711
+ fontFamily: "var(--dt-font-mono)",
712
+ fontSize: 13,
713
+ fontWeight: 600,
714
+ color: "var(--dt-ink-strong)",
715
+ overflow: "hidden",
716
+ textOverflow: "ellipsis",
717
+ whiteSpace: "nowrap"
718
+ },
719
+ children: file.name
720
+ }
721
+ ),
722
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontFamily: "var(--dt-font-mono)", fontSize: 11, color: "var(--dt-muted)", marginTop: 2 }, children: [
723
+ fmtSize(file.size),
724
+ " \xB7 \uC5C5\uB85C\uB4DC \uC644\uB8CC"
725
+ ] })
726
+ ] }),
727
+ /* @__PURE__ */ jsxRuntime.jsx(
728
+ "button",
729
+ {
730
+ type: "button",
731
+ onClick: onRemove,
732
+ "aria-label": "\uC81C\uAC70",
733
+ style: {
734
+ flex: "0 0 auto",
735
+ width: 30,
736
+ height: 30,
737
+ display: "grid",
738
+ placeItems: "center",
739
+ border: "none",
740
+ background: "var(--dt-surface-sunken)",
741
+ borderRadius: "var(--dt-radius-sm)",
742
+ color: "var(--dt-muted-strong)",
743
+ cursor: "pointer"
744
+ },
745
+ children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6L6 18M6 6l12 12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
746
+ }
747
+ )
748
+ ]
749
+ }
750
+ ) : /* @__PURE__ */ jsxRuntime.jsxs(
751
+ "label",
752
+ {
753
+ htmlFor: fId,
754
+ onDragOver: (e) => {
755
+ e.preventDefault();
756
+ setDrag(true);
757
+ },
758
+ onDragLeave: () => setDrag(false),
759
+ onDrop: (e) => {
760
+ e.preventDefault();
761
+ setDrag(false);
762
+ handle(e.dataTransfer.files);
763
+ },
764
+ style: {
765
+ display: "grid",
766
+ placeItems: "center",
767
+ gap: 8,
768
+ padding: "26px 20px",
769
+ textAlign: "center",
770
+ cursor: "pointer",
771
+ borderRadius: "var(--dt-radius-lg)",
772
+ border: `1.5px dashed ${drag ? "var(--dt-accent)" : "var(--dt-border-strong)"}`,
773
+ background: drag ? "var(--dt-tint-accent)" : "var(--dt-surface-sunken)",
774
+ transition: "background-color var(--dt-motion-fast), border-color var(--dt-motion-fast)"
775
+ },
776
+ children: [
777
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: drag ? "var(--dt-accent)" : "var(--dt-muted)" }, children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
778
+ /* @__PURE__ */ jsxRuntime.jsx(
779
+ "path",
780
+ {
781
+ d: "M12 16V4m0 0L7 9m5-5l5 5",
782
+ stroke: "currentColor",
783
+ strokeWidth: "2",
784
+ strokeLinecap: "round",
785
+ strokeLinejoin: "round"
786
+ }
787
+ ),
788
+ /* @__PURE__ */ jsxRuntime.jsx(
789
+ "path",
790
+ {
791
+ d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",
792
+ stroke: "currentColor",
793
+ strokeWidth: "2",
794
+ strokeLinecap: "round"
795
+ }
796
+ )
797
+ ] }) }),
798
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: 13.5, color: "var(--dt-ink-strong)" }, children: [
799
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 600, color: "var(--dt-accent)" }, children: "\uD30C\uC77C \uC120\uD0DD" }),
800
+ " \uB610\uB294 \uB04C\uC5B4\uB2E4 \uB193\uAE30"
801
+ ] }),
802
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: "var(--dt-font-mono)", fontSize: 11, color: "var(--dt-muted)" }, children: hint }),
803
+ /* @__PURE__ */ jsxRuntime.jsx(
804
+ "input",
805
+ {
806
+ ref: inputRef,
807
+ id: fId,
808
+ type: "file",
809
+ accept,
810
+ onChange: (e) => handle(e.target.files),
811
+ style: { display: "none" }
812
+ }
813
+ )
814
+ ]
815
+ }
816
+ )
817
+ ] });
818
+ }
819
+ function RadioGroup({ name, options = [], value, defaultValue, onChange, disabled, style }) {
820
+ const [internal, setInternal] = react.useState(defaultValue);
821
+ const current = value !== void 0 ? value : internal;
822
+ const generatedName = react.useId();
823
+ const groupName = name || generatedName;
824
+ const select = (v) => {
825
+ if (disabled) return;
826
+ if (value === void 0) setInternal(v);
827
+ onChange?.(v);
828
+ };
829
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "radiogroup", style: { display: "grid", gap: 10, ...style }, children: options.map((o) => {
830
+ const opt = typeof o === "string" ? { value: o, label: o } : o;
831
+ const on = opt.value === current;
832
+ return /* @__PURE__ */ jsxRuntime.jsxs(
833
+ "label",
834
+ {
835
+ style: {
836
+ display: "flex",
837
+ alignItems: "flex-start",
838
+ gap: 10,
839
+ cursor: disabled ? "not-allowed" : "pointer",
840
+ opacity: disabled ? 0.55 : 1
841
+ },
842
+ children: [
843
+ /* @__PURE__ */ jsxRuntime.jsx(
844
+ "input",
845
+ {
846
+ type: "radio",
847
+ name: groupName,
848
+ checked: on,
849
+ onChange: () => select(opt.value),
850
+ disabled,
851
+ style: { position: "absolute", opacity: 0, width: 0, height: 0 }
852
+ }
853
+ ),
854
+ /* @__PURE__ */ jsxRuntime.jsx(
855
+ "span",
856
+ {
857
+ style: {
858
+ width: 18,
859
+ height: 18,
860
+ marginTop: 1,
861
+ flex: "0 0 auto",
862
+ borderRadius: 9999,
863
+ display: "grid",
864
+ placeItems: "center",
865
+ background: "var(--dt-surface)",
866
+ border: `1.5px solid ${on ? "var(--dt-accent)" : "var(--dt-border-strong)"}`,
867
+ transition: "border-color 130ms"
868
+ },
869
+ children: on ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { width: 9, height: 9, borderRadius: 9999, background: "var(--dt-accent)" } }) : null
870
+ }
871
+ ),
872
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "grid", gap: 2 }, children: [
873
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 14, color: "var(--dt-ink)", lineHeight: 1.3 }, children: opt.label }),
874
+ opt.hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: "var(--dt-muted)" }, children: opt.hint }) : null
875
+ ] })
876
+ ]
877
+ },
878
+ opt.value
879
+ );
880
+ }) });
881
+ }
882
+ function SegmentedControl({
883
+ options = [],
884
+ value,
885
+ defaultValue,
886
+ onChange,
887
+ size = "md",
888
+ style
889
+ }) {
890
+ const firstOption = typeof options[0] === "string" ? options[0] : options[0]?.value;
891
+ const [internal, setInternal] = react.useState(defaultValue ?? firstOption);
892
+ const current = value !== void 0 ? value : internal;
893
+ const select = (v) => {
894
+ if (value === void 0) setInternal(v);
895
+ onChange?.(v);
896
+ };
897
+ const pad = size === "sm" ? "5px 11px" : "7px 14px";
898
+ return /* @__PURE__ */ jsxRuntime.jsx(
899
+ "div",
900
+ {
901
+ style: {
902
+ display: "inline-flex",
903
+ padding: 3,
904
+ gap: 2,
905
+ background: "var(--dt-surface-sunken)",
906
+ borderRadius: "var(--dt-radius-md)",
907
+ ...style
908
+ },
909
+ children: options.map((o) => {
910
+ const opt = typeof o === "string" ? { value: o, label: o } : o;
911
+ const on = opt.value === current;
912
+ return /* @__PURE__ */ jsxRuntime.jsx(
913
+ "button",
914
+ {
915
+ type: "button",
916
+ onClick: () => select(opt.value),
917
+ style: {
918
+ border: "none",
919
+ cursor: "pointer",
920
+ padding: pad,
921
+ borderRadius: "var(--dt-radius-sm)",
922
+ fontSize: size === "sm" ? 12 : 13,
923
+ fontWeight: 600,
924
+ fontFamily: "inherit",
925
+ whiteSpace: "nowrap",
926
+ color: on ? "var(--dt-ink-strong)" : "var(--dt-muted)",
927
+ background: on ? "var(--dt-surface)" : "transparent",
928
+ boxShadow: on ? "var(--dt-ring), var(--dt-shadow-xs)" : "none",
929
+ transition: "color 130ms, background-color 130ms"
930
+ },
931
+ children: opt.label
932
+ },
933
+ opt.value
934
+ );
935
+ })
936
+ }
937
+ );
938
+ }
939
+ function Select({ label, hint, options = [], value, defaultValue, onChange, placeholder, disabled, id, style }) {
940
+ const selId = id || (label ? `sel-${label.replace(/\s+/g, "-")}` : void 0);
941
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 7 }, children: [
942
+ label ? /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: selId, style: { fontSize: 13, fontWeight: 600, color: "var(--dt-muted-strong)" }, children: label }) : null,
943
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "relative", display: "flex" }, children: [
944
+ /* @__PURE__ */ jsxRuntime.jsxs(
945
+ "select",
946
+ {
947
+ id: selId,
948
+ className: "dt-field",
949
+ value,
950
+ defaultValue,
951
+ disabled,
952
+ onChange: (e) => onChange?.(e.target.value),
953
+ style: {
954
+ appearance: "none",
955
+ WebkitAppearance: "none",
956
+ width: "100%",
957
+ padding: "10px 36px 10px 13px",
958
+ fontSize: 14,
959
+ fontFamily: "inherit",
960
+ color: "var(--dt-ink-strong)",
961
+ cursor: disabled ? "not-allowed" : "pointer",
962
+ opacity: disabled ? 0.55 : 1,
963
+ ...style
964
+ },
965
+ children: [
966
+ placeholder ? /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, children: placeholder }) : null,
967
+ options.map((o) => {
968
+ const opt = typeof o === "string" ? { value: o, label: o } : o;
969
+ return /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value);
970
+ })
971
+ ]
972
+ }
973
+ ),
974
+ /* @__PURE__ */ jsxRuntime.jsx(
975
+ "svg",
976
+ {
977
+ width: "16",
978
+ height: "16",
979
+ viewBox: "0 0 24 24",
980
+ fill: "none",
981
+ "aria-hidden": "true",
982
+ style: {
983
+ position: "absolute",
984
+ right: 11,
985
+ top: "50%",
986
+ transform: "translateY(-50%)",
987
+ pointerEvents: "none",
988
+ color: "var(--dt-muted)"
989
+ },
990
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 9l6 6 6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
991
+ }
992
+ )
993
+ ] }),
994
+ hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: "var(--dt-muted)" }, children: hint }) : null
995
+ ] });
996
+ }
997
+ function Slider({
998
+ label,
999
+ min = 0,
1000
+ max = 100,
1001
+ step = 1,
1002
+ value,
1003
+ defaultValue,
1004
+ onChange,
1005
+ unit = "",
1006
+ hint,
1007
+ id,
1008
+ style
1009
+ }) {
1010
+ const [internal, setInternal] = react.useState(defaultValue ?? min);
1011
+ const v = value != null ? value : internal;
1012
+ const trackRef = react.useRef(null);
1013
+ const sId = id || (label ? `sl-${label.replace(/\s+/g, "-")}` : void 0);
1014
+ const pct = (v - min) / (max - min) * 100;
1015
+ const set = (nv) => {
1016
+ const clamped = Math.min(max, Math.max(min, Math.round(nv / step) * step));
1017
+ if (value == null) setInternal(clamped);
1018
+ onChange?.(clamped);
1019
+ };
1020
+ const fromClientX = (clientX) => {
1021
+ const r = trackRef.current.getBoundingClientRect();
1022
+ const ratio = Math.min(1, Math.max(0, (clientX - r.left) / r.width));
1023
+ return min + ratio * (max - min);
1024
+ };
1025
+ const onPointerDown = (e) => {
1026
+ e.preventDefault();
1027
+ set(fromClientX(e.clientX));
1028
+ const move = (ev) => set(fromClientX(ev.clientX));
1029
+ const up = () => {
1030
+ window.removeEventListener("pointermove", move);
1031
+ window.removeEventListener("pointerup", up);
1032
+ };
1033
+ window.addEventListener("pointermove", move);
1034
+ window.addEventListener("pointerup", up);
1035
+ };
1036
+ const onKey = (e) => {
1037
+ if (e.key === "ArrowRight" || e.key === "ArrowUp") {
1038
+ e.preventDefault();
1039
+ set(v + step);
1040
+ } else if (e.key === "ArrowLeft" || e.key === "ArrowDown") {
1041
+ e.preventDefault();
1042
+ set(v - step);
1043
+ }
1044
+ };
1045
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 9, ...style }, children: [
1046
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "baseline", justifyContent: "space-between" }, children: [
1047
+ label ? /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: sId, style: { fontSize: 13, fontWeight: 600, color: "var(--dt-muted-strong)" }, children: label }) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
1048
+ /* @__PURE__ */ jsxRuntime.jsxs(
1049
+ "span",
1050
+ {
1051
+ style: {
1052
+ fontFamily: "var(--dt-font-mono)",
1053
+ fontSize: 13,
1054
+ fontWeight: 600,
1055
+ color: "var(--dt-ink-strong)",
1056
+ fontVariantNumeric: "tabular-nums"
1057
+ },
1058
+ children: [
1059
+ v,
1060
+ unit ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "var(--dt-muted)", fontWeight: 400 }, children: unit }) : null
1061
+ ]
1062
+ }
1063
+ )
1064
+ ] }),
1065
+ /* @__PURE__ */ jsxRuntime.jsxs(
1066
+ "div",
1067
+ {
1068
+ ref: trackRef,
1069
+ id: sId,
1070
+ role: "slider",
1071
+ tabIndex: 0,
1072
+ "aria-valuemin": min,
1073
+ "aria-valuemax": max,
1074
+ "aria-valuenow": v,
1075
+ onPointerDown,
1076
+ onKeyDown: onKey,
1077
+ style: { position: "relative", height: 20, display: "flex", alignItems: "center", cursor: "pointer", outline: "none" },
1078
+ children: [
1079
+ /* @__PURE__ */ jsxRuntime.jsx(
1080
+ "div",
1081
+ {
1082
+ style: {
1083
+ position: "absolute",
1084
+ left: 0,
1085
+ right: 0,
1086
+ height: 4,
1087
+ borderRadius: 2,
1088
+ background: "var(--dt-surface-sunken)",
1089
+ boxShadow: "inset 0 0 0 1px var(--dt-border-strong)"
1090
+ }
1091
+ }
1092
+ ),
1093
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "absolute", left: 0, width: `${pct}%`, height: 4, borderRadius: 2, background: "var(--dt-accent)" } }),
1094
+ /* @__PURE__ */ jsxRuntime.jsx(
1095
+ "div",
1096
+ {
1097
+ style: {
1098
+ position: "absolute",
1099
+ left: `${pct}%`,
1100
+ transform: "translateX(-50%)",
1101
+ width: 16,
1102
+ height: 16,
1103
+ borderRadius: "var(--dt-radius-sm)",
1104
+ background: "var(--dt-surface)",
1105
+ boxShadow: "0 0 0 1.5px var(--dt-accent)",
1106
+ border: "3px solid var(--dt-surface)"
1107
+ }
1108
+ }
1109
+ )
1110
+ ]
1111
+ }
1112
+ ),
1113
+ hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: "var(--dt-muted)" }, children: hint }) : null
1114
+ ] });
1115
+ }
1116
+ function Switch({ checked, defaultChecked, onChange, disabled, label, style }) {
1117
+ const [internal, setInternal] = react.useState(defaultChecked ?? false);
1118
+ const isOn = checked !== void 0 ? checked : internal;
1119
+ const toggle = () => {
1120
+ if (disabled) return;
1121
+ if (checked === void 0) setInternal((v) => !v);
1122
+ onChange?.(!isOn);
1123
+ };
1124
+ const sw = /* @__PURE__ */ jsxRuntime.jsx(
1125
+ "button",
1126
+ {
1127
+ type: "button",
1128
+ role: "switch",
1129
+ "aria-checked": isOn,
1130
+ disabled,
1131
+ onClick: toggle,
1132
+ style: {
1133
+ width: 38,
1134
+ height: 22,
1135
+ flex: "0 0 auto",
1136
+ borderRadius: 9999,
1137
+ border: "none",
1138
+ padding: 2,
1139
+ background: isOn ? "var(--dt-accent)" : "var(--dt-border-strong)",
1140
+ cursor: disabled ? "not-allowed" : "pointer",
1141
+ opacity: disabled ? 0.55 : 1,
1142
+ transition: "background-color 160ms var(--dt-ease)",
1143
+ display: "inline-flex"
1144
+ },
1145
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1146
+ "span",
1147
+ {
1148
+ style: {
1149
+ width: 18,
1150
+ height: 18,
1151
+ borderRadius: 9999,
1152
+ background: "#fff",
1153
+ boxShadow: "0 1px 2px rgba(0,0,0,0.25)",
1154
+ transform: isOn ? "translateX(16px)" : "translateX(0)",
1155
+ transition: "transform 160ms var(--dt-ease)"
1156
+ }
1157
+ }
1158
+ )
1159
+ }
1160
+ );
1161
+ if (!label) return sw;
1162
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1163
+ "label",
1164
+ {
1165
+ style: {
1166
+ display: "inline-flex",
1167
+ alignItems: "center",
1168
+ gap: 10,
1169
+ cursor: disabled ? "not-allowed" : "pointer",
1170
+ ...style
1171
+ },
1172
+ children: [
1173
+ sw,
1174
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 14, color: "var(--dt-ink)" }, children: label })
1175
+ ]
1176
+ }
1177
+ );
1178
+ }
1179
+ function ToggleSwitch({
1180
+ checked,
1181
+ label,
1182
+ onChange,
1183
+ disabled = false,
1184
+ className = ""
1185
+ }) {
1186
+ return /* @__PURE__ */ jsxRuntime.jsx(
1187
+ "button",
1188
+ {
1189
+ type: "button",
1190
+ role: "switch",
1191
+ "aria-checked": checked,
1192
+ "aria-label": label,
1193
+ disabled,
1194
+ onClick: () => onChange(!checked),
1195
+ className: `relative inline-flex h-6 w-11 shrink-0 items-center rounded-full border transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${checked ? "border-success/40 bg-success/80" : "border-line-strong bg-raised"} ${className}`,
1196
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1197
+ "span",
1198
+ {
1199
+ "aria-hidden": true,
1200
+ className: `inline-block h-4 w-4 transform rounded-full bg-surface shadow-dtSubtle transition-transform ${checked ? "translate-x-6" : "translate-x-1"}`
1201
+ }
1202
+ )
1203
+ }
1204
+ );
1205
+ }
1206
+ function Textarea({ label, hint, rows = 4, mono = false, id, style, ...rest }) {
1207
+ const taId = id || (label ? `ta-${label.replace(/\s+/g, "-")}` : void 0);
1208
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 7 }, children: [
1209
+ label ? /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: taId, style: { fontSize: 13, fontWeight: 600, color: "var(--dt-muted-strong)" }, children: label }) : null,
1210
+ /* @__PURE__ */ jsxRuntime.jsx(
1211
+ "textarea",
1212
+ {
1213
+ id: taId,
1214
+ rows,
1215
+ className: "dt-field",
1216
+ style: {
1217
+ width: "100%",
1218
+ resize: "vertical",
1219
+ padding: "11px 13px",
1220
+ fontSize: mono ? 13 : 14,
1221
+ fontFamily: mono ? "var(--dt-font-mono)" : "inherit",
1222
+ lineHeight: 1.55,
1223
+ color: "var(--dt-ink-strong)",
1224
+ ...style
1225
+ },
1226
+ ...rest
1227
+ }
1228
+ ),
1229
+ hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: "var(--dt-muted)" }, children: hint }) : null
1230
+ ] });
1231
+ }
1232
+ var AlertTone = {
1233
+ Info: "info",
1234
+ Success: "success",
1235
+ Warning: "warning",
1236
+ Danger: "danger"
1237
+ };
1238
+ var AlertMotion = {
1239
+ None: "none",
1240
+ Subtle: "subtle",
1241
+ Pulse: "pulse"
1242
+ };
1243
+ var TONE_BACKGROUND = {
1244
+ info: "var(--dt-status-cobalt)",
1245
+ success: "var(--dt-status-success)",
1246
+ warning: "var(--dt-status-warning)",
1247
+ danger: "var(--dt-status-danger)"
1248
+ };
1249
+ function Alert({
1250
+ tone = AlertTone.Info,
1251
+ title,
1252
+ children,
1253
+ icon,
1254
+ action,
1255
+ motion = AlertMotion.None,
1256
+ onDismiss,
1257
+ className,
1258
+ style,
1259
+ ...rest
1260
+ }) {
1261
+ const background = TONE_BACKGROUND[tone] ?? TONE_BACKGROUND[AlertTone.Info];
1262
+ const motionClass = motion === AlertMotion.None ? void 0 : `dt-alert-motion-${motion}`;
1263
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1264
+ "div",
1265
+ {
1266
+ role: "status",
1267
+ className: cx("dt-alert", motionClass, className),
1268
+ style: {
1269
+ alignItems: "flex-start",
1270
+ background,
1271
+ borderRadius: "20px",
1272
+ color: "var(--dt-alert-ink)",
1273
+ display: "flex",
1274
+ gap: 12,
1275
+ minHeight: 62,
1276
+ overflow: "clip",
1277
+ padding: "13px 15px",
1278
+ position: "relative",
1279
+ transition: "filter var(--dt-motion-fast), transform var(--dt-motion-fast)",
1280
+ width: "min(100%, 380px)",
1281
+ ...style
1282
+ },
1283
+ ...rest,
1284
+ children: [
1285
+ icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "currentColor", display: "inline-flex", flex: "0 0 auto", marginTop: 1 }, children: icon }) : null,
1286
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: "1 0 0", minWidth: 1, overflow: "clip", wordBreak: "break-word" }, children: [
1287
+ title ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 14, fontWeight: 600, lineHeight: "normal" }, children: title }) : null,
1288
+ children ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: title ? 3 : 0, fontSize: 13, fontWeight: 400, lineHeight: "normal" }, children }) : null,
1289
+ action ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 10 }, children: action }) : null
1290
+ ] }),
1291
+ onDismiss ? /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onDismiss, "aria-label": "\uB2EB\uAE30", style: { flex: "0 0 auto", border: "none", background: "transparent", cursor: "pointer", color: "currentColor", padding: 2, lineHeight: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 6l12 12M18 6L6 18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }) }) : null
1292
+ ]
1293
+ }
1294
+ );
1295
+ }
1296
+ function Dialog({ open, onClose, title, description, children, footer, "aria-label": ariaLabel, width = 460 }) {
1297
+ const titleId = react.useId();
1298
+ react.useEffect(() => {
1299
+ if (!open) return void 0;
1300
+ const onKey = (event) => {
1301
+ if (event.key === "Escape") onClose?.();
1302
+ };
1303
+ window.addEventListener("keydown", onKey);
1304
+ return () => window.removeEventListener("keydown", onKey);
1305
+ }, [open, onClose]);
1306
+ if (!open) return null;
1307
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { onClick: onClose, style: {
1308
+ position: "fixed",
1309
+ inset: 0,
1310
+ zIndex: 100,
1311
+ display: "grid",
1312
+ placeItems: "center",
1313
+ padding: 20,
1314
+ background: "color-mix(in srgb, var(--dt-ink-strong) 32%, transparent)",
1315
+ backdropFilter: "blur(2px)",
1316
+ animation: "dt-fade 160ms var(--dt-ease)"
1317
+ }, children: [
1318
+ /* @__PURE__ */ jsxRuntime.jsxs(
1319
+ "div",
1320
+ {
1321
+ role: "dialog",
1322
+ "aria-modal": "true",
1323
+ onClick: (event) => event.stopPropagation(),
1324
+ "aria-labelledby": title ? titleId : void 0,
1325
+ "aria-label": title ? void 0 : ariaLabel,
1326
+ style: {
1327
+ width: "100%",
1328
+ maxWidth: width,
1329
+ background: "var(--dt-surface)",
1330
+ borderRadius: "var(--dt-radius-lg)",
1331
+ boxShadow: "var(--dt-shadow-xl)",
1332
+ animation: "dt-pop 200ms var(--dt-ease)",
1333
+ overflow: "hidden"
1334
+ },
1335
+ children: [
1336
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "22px 24px" }, children: [
1337
+ title ? /* @__PURE__ */ jsxRuntime.jsx("h3", { id: titleId, style: { fontSize: 18, fontWeight: 700, letterSpacing: "-0.01em", color: "var(--dt-ink-strong)" }, children: title }) : null,
1338
+ description ? /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginTop: 8, fontSize: 14, lineHeight: 1.55, color: "var(--dt-muted-strong)" }, children: description }) : null,
1339
+ children ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: title || description ? 16 : 0 }, children }) : null
1340
+ ] }),
1341
+ footer ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", justifyContent: "flex-end", gap: 8, padding: "14px 24px", background: "var(--dt-surface-sunken)" }, children: footer }) : null
1342
+ ]
1343
+ }
1344
+ ),
1345
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: `@keyframes dt-fade{from{opacity:0}}@keyframes dt-pop{from{opacity:0;transform:translateY(8px) scale(.98)}}` })
1346
+ ] });
1347
+ }
1348
+ function Drawer({ open = false, side = "right", title, children, footer, onClose, width = 420, style, "aria-label": ariaLabel }) {
1349
+ const titleId = react.useId();
1350
+ if (!open) return null;
1351
+ const fromRight = side === "right";
1352
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "absolute", inset: 0, zIndex: 40, display: "flex", justifyContent: fromRight ? "flex-end" : "flex-start" }, children: [
1353
+ /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: onClose, style: { position: "absolute", inset: 0, background: "rgba(24,22,18,0.32)" } }),
1354
+ /* @__PURE__ */ jsxRuntime.jsxs(
1355
+ "aside",
1356
+ {
1357
+ role: "dialog",
1358
+ "aria-modal": "true",
1359
+ "aria-labelledby": title ? titleId : void 0,
1360
+ "aria-label": title ? void 0 : ariaLabel || "pane",
1361
+ style: {
1362
+ position: "relative",
1363
+ width,
1364
+ maxWidth: "100%",
1365
+ height: "100%",
1366
+ display: "flex",
1367
+ flexDirection: "column",
1368
+ background: "var(--dt-surface)",
1369
+ boxShadow: "var(--dt-shadow-xl)",
1370
+ borderLeft: fromRight ? "1px solid var(--dt-border-strong)" : "none",
1371
+ borderRight: fromRight ? "none" : "1px solid var(--dt-border-strong)",
1372
+ fontFamily: "var(--dt-font-sans)",
1373
+ ...style
1374
+ },
1375
+ children: [
1376
+ /* @__PURE__ */ jsxRuntime.jsxs("header", { style: { display: "flex", alignItems: "center", gap: 12, padding: "16px 18px", borderBottom: "1px solid var(--dt-border)" }, children: [
1377
+ title ? /* @__PURE__ */ jsxRuntime.jsx("h3", { id: titleId, style: { margin: 0, flex: 1, minWidth: 0, fontSize: 16, fontWeight: 650, letterSpacing: "-0.01em", color: "var(--dt-ink-strong)" }, children: title }) : null,
1378
+ /* @__PURE__ */ jsxRuntime.jsx(
1379
+ "button",
1380
+ {
1381
+ type: "button",
1382
+ onClick: onClose,
1383
+ "aria-label": "\uB2EB\uAE30",
1384
+ style: { flex: "0 0 auto", width: 30, height: 30, display: "grid", placeItems: "center", border: "none", background: "var(--dt-surface-sunken)", borderRadius: "var(--dt-radius-sm)", color: "var(--dt-muted-strong)", cursor: "pointer" },
1385
+ children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6L6 18M6 6l12 12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
1386
+ }
1387
+ )
1388
+ ] }),
1389
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, overflowY: "auto", padding: 18 }, children }),
1390
+ footer ? /* @__PURE__ */ jsxRuntime.jsx("footer", { style: { display: "flex", alignItems: "center", gap: 10, padding: "14px 18px", borderTop: "1px solid var(--dt-border)" }, children: footer }) : null
1391
+ ]
1392
+ }
1393
+ )
1394
+ ] });
1395
+ }
1396
+ function EmptyState({ icon, title, description, action, style }) {
1397
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
1398
+ display: "grid",
1399
+ placeItems: "center",
1400
+ gap: 10,
1401
+ textAlign: "center",
1402
+ padding: "40px 24px",
1403
+ borderRadius: "var(--dt-radius-lg)",
1404
+ background: "var(--dt-surface-sunken)",
1405
+ ...style
1406
+ }, children: [
1407
+ icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: {
1408
+ display: "inline-flex",
1409
+ width: 44,
1410
+ height: 44,
1411
+ alignItems: "center",
1412
+ justifyContent: "center",
1413
+ borderRadius: "var(--dt-radius-md)",
1414
+ background: "var(--dt-surface)",
1415
+ color: "var(--dt-muted)",
1416
+ boxShadow: "var(--dt-ring), var(--dt-shadow-xs)"
1417
+ }, children: icon }) : null,
1418
+ title ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 15, fontWeight: 650, color: "var(--dt-ink-strong)" }, children: title }) : null,
1419
+ description ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 13, lineHeight: 1.55, color: "var(--dt-muted)", maxWidth: 320 }, children: description }) : null,
1420
+ action ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 6 }, children: action }) : null
1421
+ ] });
1422
+ }
1423
+ function Skeleton({ width = "100%", height = 14, radius = "var(--dt-radius-sm)", style }) {
1424
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "dt-skeleton", style: {
1425
+ display: "block",
1426
+ width,
1427
+ height,
1428
+ borderRadius: radius,
1429
+ background: "var(--dt-surface-sunken)",
1430
+ ...style
1431
+ } });
1432
+ }
1433
+ function Spinner({ size = 18, stroke = 2, color = "var(--dt-accent)", style }) {
1434
+ react.useId();
1435
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-flex", ...style }, role: "status", "aria-label": "\uB85C\uB529 \uC911", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "dt-spinner-svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
1436
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: stroke, style: { color: "var(--dt-border-strong)", opacity: 0.5 } }),
1437
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 3a9 9 0 0 1 9 9", stroke: color, strokeWidth: stroke, strokeLinecap: "round" })
1438
+ ] }) });
1439
+ }
1440
+ var DOT = { info: "var(--dt-cobalt)", success: "var(--dt-success)", warning: "var(--dt-warning)", danger: "var(--dt-danger)" };
1441
+ function Toast({ tone = "success", title, message, action, onDismiss, style }) {
1442
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "status", className: "dt-toast", style: {
1443
+ display: "flex",
1444
+ alignItems: "flex-start",
1445
+ gap: 11,
1446
+ width: 340,
1447
+ maxWidth: "90vw",
1448
+ padding: "13px 15px",
1449
+ background: "var(--dt-surface)",
1450
+ borderRadius: "var(--dt-radius-md)",
1451
+ boxShadow: "var(--dt-shadow-lg)",
1452
+ ...style
1453
+ }, children: [
1454
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { width: 8, height: 8, borderRadius: 9999, marginTop: 5, flex: "0 0 auto", background: DOT[tone] ?? DOT.success } }),
1455
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
1456
+ title ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 14, fontWeight: 650, color: "var(--dt-ink-strong)" }, children: title }) : null,
1457
+ message ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: title ? 2 : 0, fontSize: 13, lineHeight: 1.5, color: "var(--dt-muted-strong)" }, children: message }) : null
1458
+ ] }),
1459
+ action ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: "0 0 auto" }, children: action }) : null,
1460
+ onDismiss ? /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onDismiss, "aria-label": "\uB2EB\uAE30", style: { flex: "0 0 auto", border: "none", background: "transparent", cursor: "pointer", color: "var(--dt-muted)", padding: 2, lineHeight: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 6l12 12M18 6L6 18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }) }) : null
1461
+ ] });
1462
+ }
1463
+ function Tooltip({ label, position = "top", children }) {
1464
+ const tooltipId = react.useId();
1465
+ const [show, setShow] = react.useState(false);
1466
+ const pos = {
1467
+ top: { bottom: "100%", left: "50%", transform: "translateX(-50%) translateY(-7px)" },
1468
+ bottom: { top: "100%", left: "50%", transform: "translateX(-50%) translateY(7px)" },
1469
+ left: { right: "100%", top: "50%", transform: "translateY(-50%) translateX(-7px)" },
1470
+ right: { left: "100%", top: "50%", transform: "translateY(-50%) translateX(7px)" }
1471
+ }[position];
1472
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1473
+ "span",
1474
+ {
1475
+ style: { position: "relative", display: "inline-flex" },
1476
+ onMouseEnter: () => setShow(true),
1477
+ onMouseLeave: () => setShow(false),
1478
+ onFocus: () => setShow(true),
1479
+ onBlur: () => setShow(false),
1480
+ children: [
1481
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-describedby": show ? tooltipId : void 0, children }),
1482
+ /* @__PURE__ */ jsxRuntime.jsx("span", { id: tooltipId, role: "tooltip", style: {
1483
+ position: "absolute",
1484
+ zIndex: 60,
1485
+ whiteSpace: "nowrap",
1486
+ pointerEvents: "none",
1487
+ opacity: show ? 1 : 0,
1488
+ visibility: show ? "visible" : "hidden",
1489
+ padding: "6px 9px",
1490
+ fontSize: 12,
1491
+ fontWeight: 500,
1492
+ lineHeight: 1.2,
1493
+ color: "var(--dt-paper)",
1494
+ background: "var(--dt-ink-strong)",
1495
+ borderRadius: "var(--dt-radius-sm)",
1496
+ boxShadow: "var(--dt-shadow-md)",
1497
+ transition: "opacity var(--dt-motion-fast), visibility var(--dt-motion-fast)",
1498
+ ...pos
1499
+ }, children: label })
1500
+ ]
1501
+ }
1502
+ );
1503
+ }
1504
+ var SIZE2 = { sm: 26, md: 34, lg: 44 };
1505
+ function Avatar({ name = "", src, size = "md", status, square = true, style, ...rest }) {
1506
+ const px = typeof size === "number" ? size : SIZE2[size] ?? SIZE2.md;
1507
+ const initials = name.trim().split(/\s+/).map((word) => word[0]).slice(0, 2).join("").toUpperCase() || "\xB7";
1508
+ const radius = square ? Math.round(px * 0.28) : px;
1509
+ const statusColor = status ? { online: "var(--dt-success)", busy: "var(--dt-danger)", away: "var(--dt-warning)", offline: "var(--dt-muted)" }[status] ?? void 0 : void 0;
1510
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { ...rest, style: { position: "relative", display: "inline-flex", flex: "0 0 auto", ...style }, children: [
1511
+ src ? /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt: name, width: px, height: px, style: { borderRadius: radius, objectFit: "cover", boxShadow: "var(--dt-ring)" } }) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: {
1512
+ width: px,
1513
+ height: px,
1514
+ borderRadius: radius,
1515
+ display: "grid",
1516
+ placeItems: "center",
1517
+ background: "var(--dt-tint-accent)",
1518
+ color: "var(--dt-accent)",
1519
+ fontSize: px * 0.38,
1520
+ fontWeight: 700,
1521
+ letterSpacing: "-0.02em"
1522
+ }, children: initials }),
1523
+ statusColor ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: {
1524
+ position: "absolute",
1525
+ right: -1,
1526
+ bottom: -1,
1527
+ width: px * 0.3,
1528
+ height: px * 0.3,
1529
+ borderRadius: 9999,
1530
+ background: statusColor,
1531
+ boxShadow: "0 0 0 2px var(--dt-surface)"
1532
+ } }) : null
1533
+ ] });
1534
+ }
1535
+ function highlight(line) {
1536
+ const out = [];
1537
+ const re = /("(?:[^"\\]|\\.)*"\s*:)|("(?:[^"\\]|\\.)*")|(\b-?\d+(?:\.\d+)?\b)|(\b(?:true|false|null|GET|POST|PUT|DELETE)\b)|([{}[\],:])/g;
1538
+ let last = 0;
1539
+ let match;
1540
+ while ((match = re.exec(line)) !== null) {
1541
+ if (match.index > last) out.push({ t: line.slice(last, match.index), c: "plain" });
1542
+ if (match[1]) out.push({ t: match[1], c: "key" });
1543
+ else if (match[2]) out.push({ t: match[2], c: "str" });
1544
+ else if (match[3]) out.push({ t: match[3], c: "num" });
1545
+ else if (match[4]) out.push({ t: match[4], c: "kw" });
1546
+ else if (match[5]) out.push({ t: match[5], c: "pun" });
1547
+ last = re.lastIndex;
1548
+ }
1549
+ if (last < line.length) out.push({ t: line.slice(last), c: "plain" });
1550
+ return out;
1551
+ }
1552
+ var COLOR = { plain: "#cdd0d8", key: "#7fd1c0", str: "#e0a96d", num: "#8fb3ff", kw: "#c98aff", pun: "#8a91a3" };
1553
+ function CodeBlock({ code = "", label, language = "json", showLineNumbers = true, copyable = true, style, ...rest }) {
1554
+ const [copied, setCopied] = react.useState(false);
1555
+ const lines = String(code).replace(/\n$/, "").split("\n");
1556
+ const copy = () => {
1557
+ try {
1558
+ navigator.clipboard?.writeText(code);
1559
+ } catch {
1560
+ }
1561
+ setCopied(true);
1562
+ setTimeout(() => setCopied(false), 1400);
1563
+ };
1564
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, style: {
1565
+ background: "var(--dt-code-bg)",
1566
+ border: "1px solid var(--dt-code-border)",
1567
+ borderRadius: "var(--dt-radius-lg)",
1568
+ overflow: "hidden",
1569
+ ...style
1570
+ }, children: [
1571
+ label || copyable ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
1572
+ display: "flex",
1573
+ alignItems: "center",
1574
+ gap: 10,
1575
+ padding: "9px 12px",
1576
+ borderBottom: "1px solid var(--dt-code-border)"
1577
+ }, children: [
1578
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: "var(--dt-font-mono)", fontSize: 11, color: "#8a91a3" }, children: label || language }),
1579
+ copyable ? /* @__PURE__ */ jsxRuntime.jsx(
1580
+ "button",
1581
+ {
1582
+ type: "button",
1583
+ onClick: copy,
1584
+ style: {
1585
+ marginLeft: "auto",
1586
+ display: "inline-flex",
1587
+ alignItems: "center",
1588
+ gap: 6,
1589
+ border: "none",
1590
+ background: "transparent",
1591
+ color: copied ? "#34d399" : "#8a91a3",
1592
+ cursor: "pointer",
1593
+ fontFamily: "var(--dt-font-mono)",
1594
+ fontSize: 11,
1595
+ fontWeight: 600,
1596
+ padding: 0
1597
+ },
1598
+ children: copied ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1599
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 6L9 17l-5-5", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1600
+ "\uBCF5\uC0AC\uB428"
1601
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1602
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
1603
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2", stroke: "currentColor", strokeWidth: "2" }),
1604
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 15V5a2 2 0 0 1 2-2h10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
1605
+ ] }),
1606
+ "\uBCF5\uC0AC"
1607
+ ] })
1608
+ }
1609
+ ) : null
1610
+ ] }) : null,
1611
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "12px 0", overflowX: "auto" }, children: lines.map((line, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: showLineNumbers ? "38px 1fr" : "1fr", fontFamily: "var(--dt-font-mono)", fontSize: 12.5, lineHeight: 1.75 }, children: [
1612
+ showLineNumbers ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { textAlign: "right", paddingRight: 14, color: "#5a6273", userSelect: "none" }, children: index + 1 }) : null,
1613
+ /* @__PURE__ */ jsxRuntime.jsx("code", { style: { color: COLOR.plain, whiteSpace: "pre", paddingRight: 14 }, children: highlight(line).map((segment, segmentIndex) => /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: COLOR[segment.c] }, children: segment.t }, segmentIndex)) })
1614
+ ] }, index)) })
1615
+ ] });
1616
+ }
1617
+ function KeyValue({ items = [], columns = 1, style, ...rest }) {
1618
+ return /* @__PURE__ */ jsxRuntime.jsx("dl", { ...rest, style: {
1619
+ margin: 0,
1620
+ display: "grid",
1621
+ gridTemplateColumns: columns === 2 ? "1fr 1fr" : "1fr",
1622
+ border: "1px solid var(--dt-border-strong)",
1623
+ borderRadius: "var(--dt-radius-lg)",
1624
+ overflow: "hidden",
1625
+ ...style
1626
+ }, children: items.map((item, index) => {
1627
+ const row = Math.floor(index / columns);
1628
+ const col = index % columns;
1629
+ const isLastRow = row === Math.floor((items.length - 1) / columns);
1630
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1631
+ "div",
1632
+ {
1633
+ style: {
1634
+ display: "flex",
1635
+ alignItems: "baseline",
1636
+ justifyContent: "space-between",
1637
+ gap: 14,
1638
+ padding: "11px 14px",
1639
+ borderBottom: isLastRow ? "none" : "1px solid var(--dt-border)",
1640
+ borderRight: columns === 2 && col === 0 ? "1px solid var(--dt-border)" : "none"
1641
+ },
1642
+ children: [
1643
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { style: { fontSize: 12.5, color: "var(--dt-muted)", flex: "0 0 auto" }, children: item.key }),
1644
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { style: {
1645
+ margin: 0,
1646
+ textAlign: "right",
1647
+ minWidth: 0,
1648
+ fontFamily: item.mono ? "var(--dt-font-mono)" : "inherit",
1649
+ fontSize: item.mono ? 12.5 : 13,
1650
+ fontWeight: 600,
1651
+ color: item.accent ? "var(--dt-accent)" : "var(--dt-ink-strong)",
1652
+ fontVariantNumeric: "tabular-nums",
1653
+ overflow: "hidden",
1654
+ textOverflow: "ellipsis",
1655
+ whiteSpace: "nowrap"
1656
+ }, children: item.value })
1657
+ ]
1658
+ },
1659
+ index
1660
+ );
1661
+ }) });
1662
+ }
1663
+ var LEVEL = {
1664
+ ok: { dot: "var(--dt-success)", text: "var(--dt-success)", label: "OK" },
1665
+ warn: { dot: "var(--dt-warning)", text: "var(--dt-warning)", label: "WARN" },
1666
+ error: { dot: "var(--dt-danger)", text: "var(--dt-danger)", label: "ERR" },
1667
+ info: { dot: "var(--dt-muted)", text: "var(--dt-muted-strong)", label: "INFO" }
1668
+ };
1669
+ function LogRow({ entries = [], style, ...rest }) {
1670
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ...rest, style: {
1671
+ border: "1px solid var(--dt-border-strong)",
1672
+ borderRadius: "var(--dt-radius-lg)",
1673
+ overflow: "hidden",
1674
+ background: "var(--dt-surface)",
1675
+ fontVariantNumeric: "tabular-nums",
1676
+ ...style
1677
+ }, children: entries.map((entry, index) => {
1678
+ const level = LEVEL[entry.level] || LEVEL.info;
1679
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1680
+ "div",
1681
+ {
1682
+ style: {
1683
+ display: "grid",
1684
+ gridTemplateColumns: "auto 14px 1fr auto",
1685
+ alignItems: "center",
1686
+ gap: 12,
1687
+ padding: "9px 14px",
1688
+ borderTop: index === 0 ? "none" : "1px solid var(--dt-border)",
1689
+ fontFamily: "var(--dt-font-mono)",
1690
+ fontSize: 12
1691
+ },
1692
+ children: [
1693
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "var(--dt-muted)" }, children: entry.time }),
1694
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { width: 7, height: 7, borderRadius: 9999, background: level.dot, justifySelf: "center" } }),
1695
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
1696
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "var(--dt-ink-strong)", fontWeight: 600 }, children: entry.tool }),
1697
+ entry.message ? /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { color: "var(--dt-muted-strong)" }, children: [
1698
+ " ",
1699
+ entry.message
1700
+ ] }) : null
1701
+ ] }),
1702
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: entry.latency ? "var(--dt-muted-strong)" : level.text, fontWeight: 600 }, children: entry.latency || level.label })
1703
+ ]
1704
+ },
1705
+ index
1706
+ );
1707
+ }) });
1708
+ }
1709
+ function Pagination({ page = 1, pageCount = 1, onChange, style, ...rest }) {
1710
+ const go = (targetPage) => {
1711
+ if (targetPage >= 1 && targetPage <= pageCount && targetPage !== page) onChange?.(targetPage);
1712
+ };
1713
+ const pages = [];
1714
+ const add = (targetPage) => pages.push(targetPage);
1715
+ if (pageCount <= 7) {
1716
+ for (let i = 1; i <= pageCount; i += 1) add(i);
1717
+ } else {
1718
+ add(1);
1719
+ if (page > 3) add("\u2026");
1720
+ for (let i = Math.max(2, page - 1); i <= Math.min(pageCount - 1, page + 1); i += 1) add(i);
1721
+ if (page < pageCount - 2) add("\u2026");
1722
+ add(pageCount);
1723
+ }
1724
+ const cell = (active) => ({
1725
+ minWidth: 32,
1726
+ height: 32,
1727
+ padding: "0 8px",
1728
+ borderRadius: "var(--dt-radius-sm)",
1729
+ border: "none",
1730
+ cursor: "pointer",
1731
+ fontSize: 13,
1732
+ fontWeight: 600,
1733
+ fontVariantNumeric: "tabular-nums",
1734
+ background: active ? "var(--dt-accent)" : "transparent",
1735
+ color: active ? "var(--dt-accent-ink)" : "var(--dt-muted-strong)"
1736
+ });
1737
+ const arrow = (disabled) => ({ ...cell(false), opacity: disabled ? 0.4 : 1, cursor: disabled ? "not-allowed" : "pointer", display: "inline-flex", alignItems: "center", justifyContent: "center" });
1738
+ return /* @__PURE__ */ jsxRuntime.jsxs("nav", { ...rest, style: { display: "inline-flex", alignItems: "center", gap: 2, ...style }, "aria-label": "\uD398\uC774\uC9C0", children: [
1739
+ /* @__PURE__ */ jsxRuntime.jsx("button", { style: arrow(page <= 1), onClick: () => go(page - 1), disabled: page <= 1, "aria-label": "\uC774\uC804", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 6l-6 6 6 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
1740
+ pages.map((pageItem, index) => pageItem === "\u2026" ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { minWidth: 22, textAlign: "center", color: "var(--dt-muted)" }, children: "\u2026" }, `e${index}`) : /* @__PURE__ */ jsxRuntime.jsx("button", { style: cell(pageItem === page), onClick: () => go(pageItem), "aria-current": pageItem === page ? "page" : void 0, children: pageItem }, pageItem)),
1741
+ /* @__PURE__ */ jsxRuntime.jsx("button", { style: arrow(page >= pageCount), onClick: () => go(page + 1), disabled: page >= pageCount, "aria-label": "\uB2E4\uC74C", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 6l6 6-6 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
1742
+ ] });
1743
+ }
1744
+ function StatTile({ label, value, delta, deltaTone = "neutral", hint, style, ...rest }) {
1745
+ const tone = { up: "var(--dt-success)", down: "var(--dt-danger)", neutral: "var(--dt-muted)" }[deltaTone];
1746
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, style: { padding: 18, minWidth: 0, ...style }, children: [
1747
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, fontWeight: 650, letterSpacing: "0.04em", textTransform: "uppercase", color: "var(--dt-muted)" }, children: label }),
1748
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 8, fontSize: 25, fontWeight: 700, lineHeight: 1.1, letterSpacing: "-0.02em", color: "var(--dt-ink-strong)", fontVariantNumeric: "tabular-nums" }, children: value }),
1749
+ delta || hint ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: 6, display: "flex", alignItems: "center", gap: 6, fontSize: 12, color: "var(--dt-muted)" }, children: [
1750
+ delta ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: tone, fontWeight: 600, fontVariantNumeric: "tabular-nums" }, children: delta }) : null,
1751
+ hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: hint }) : null
1752
+ ] }) : null
1753
+ ] });
1754
+ }
1755
+ function Table({ columns = [], rows = [], rowKey, onRowClick, empty, style, ...rest }) {
1756
+ if (!rows.length && empty) return empty;
1757
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, style: { overflowX: "auto", borderRadius: "var(--dt-radius-lg)", background: "var(--dt-surface)", boxShadow: "var(--dt-ring), var(--dt-shadow-xs)", ...style }, children: [
1758
+ /* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse", color: "var(--dt-ink)" }, children: [
1759
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { style: { background: "var(--dt-surface-muted)" }, children: columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx("th", { style: {
1760
+ textAlign: column.align || "left",
1761
+ padding: "11px 18px",
1762
+ fontFamily: "var(--dt-font-mono)",
1763
+ fontSize: 11,
1764
+ fontWeight: 600,
1765
+ letterSpacing: "0.04em",
1766
+ textTransform: "uppercase",
1767
+ color: "var(--dt-muted)",
1768
+ borderBottom: "1px solid var(--dt-divider)",
1769
+ whiteSpace: "nowrap"
1770
+ }, children: column.header }, column.key)) }) }),
1771
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rows.map((row, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx(
1772
+ "tr",
1773
+ {
1774
+ onClick: onRowClick ? () => onRowClick(row) : void 0,
1775
+ className: "dt-tr",
1776
+ style: { cursor: onRowClick ? "pointer" : "default" },
1777
+ children: columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx("td", { style: {
1778
+ textAlign: column.align || "left",
1779
+ padding: "13px 18px",
1780
+ fontSize: 13,
1781
+ borderBottom: "1px solid var(--dt-divider)",
1782
+ whiteSpace: column.nowrap ? "nowrap" : "normal"
1783
+ }, children: column.render ? column.render(row[column.key], row) : row[column.key] }, column.key))
1784
+ },
1785
+ rowKey ? rowKey(row, rowIndex) : rowIndex
1786
+ )) })
1787
+ ] }),
1788
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: `.dt-tr{transition:background-color 130ms}.dt-tr:hover{background:var(--dt-surface-muted)}tbody tr:last-child td{border-bottom:0}` })
1789
+ ] });
1790
+ }
1791
+ function UsageMeter({ label, value = 0, max = 100, unit = "", hint, style, ...rest }) {
1792
+ const pct = Math.min(100, Math.max(0, value / max * 100));
1793
+ const fill = pct >= 90 ? "var(--dt-danger)" : pct >= 75 ? "var(--dt-warning)" : "var(--dt-accent)";
1794
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, style: { display: "grid", gap: 8, ...style }, children: [
1795
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "baseline", justifyContent: "space-between", gap: 12 }, children: [
1796
+ label ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 13, fontWeight: 600, color: "var(--dt-muted-strong)" }, children: label }) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
1797
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontFamily: "var(--dt-font-mono)", fontSize: 12.5, color: "var(--dt-ink-strong)", fontVariantNumeric: "tabular-nums" }, children: [
1798
+ /* @__PURE__ */ jsxRuntime.jsx("b", { style: { fontWeight: 700 }, children: value.toLocaleString() }),
1799
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { color: "var(--dt-muted)" }, children: [
1800
+ " / ",
1801
+ max.toLocaleString(),
1802
+ unit
1803
+ ] })
1804
+ ] })
1805
+ ] }),
1806
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "relative", height: 8, borderRadius: "var(--dt-radius-sm)", background: "var(--dt-surface-sunken)", boxShadow: "inset 0 0 0 1px var(--dt-border-strong)", overflow: "hidden" }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "absolute", inset: 0, width: `${pct}%`, background: fill, borderRadius: "var(--dt-radius-sm)", transition: "width var(--dt-motion)" } }) }),
1807
+ hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: "var(--dt-muted)" }, children: hint }) : null
1808
+ ] });
1809
+ }
1810
+ function Breadcrumb({ items = [], style, ...rest }) {
1811
+ return /* @__PURE__ */ jsxRuntime.jsx(
1812
+ "nav",
1813
+ {
1814
+ ...rest,
1815
+ "aria-label": "breadcrumb",
1816
+ style: { display: "flex", alignItems: "center", gap: 6, flexWrap: "wrap", ...style },
1817
+ children: items.map((it, i) => {
1818
+ const last = i === items.length - 1;
1819
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
1820
+ last ? /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-current": "page", style: { fontSize: 13, fontWeight: 600, color: "var(--dt-ink-strong)" }, children: it.label }) : /* @__PURE__ */ jsxRuntime.jsx("a", { href: it.href || "#", style: { fontSize: 13, fontWeight: 500, color: "var(--dt-muted)", textDecoration: "none" }, children: it.label }),
1821
+ !last ? /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", style: { color: "var(--dt-border-strong)" }, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 6l6 6-6 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) : null
1822
+ ] }, i);
1823
+ })
1824
+ }
1825
+ );
1826
+ }
1827
+ function CommandPalette({ open = true, query = "", onQueryChange, groups = [], footerHint = "\u2191\u2193 \uC774\uB3D9 \xB7 \u21B5 \uC2E4\uD589 \xB7 esc \uB2EB\uAE30", onSelect, style, ...rest }) {
1828
+ const [activeIndex, setActiveIndex] = react.useState([0, 0]);
1829
+ const [isOpen, setIsOpen] = react.useState(open);
1830
+ react.useEffect(() => {
1831
+ setIsOpen(open);
1832
+ }, [open]);
1833
+ if (!isOpen) return null;
1834
+ const handleKeyDown = (_e) => {
1835
+ if (_e.key === "ArrowDown") {
1836
+ _e.preventDefault();
1837
+ setActiveIndex((prev) => {
1838
+ const [groupIdx, itemIdx] = prev;
1839
+ const group = groups[groupIdx];
1840
+ if (!group) return prev;
1841
+ if (itemIdx < group.items.length - 1) return [groupIdx, itemIdx + 1];
1842
+ const nextGroupIdx = (groupIdx + 1) % groups.length;
1843
+ const nextGroup = groups[nextGroupIdx];
1844
+ if (nextGroup && nextGroup.items.length > 0) return [nextGroupIdx, 0];
1845
+ return prev;
1846
+ });
1847
+ } else if (_e.key === "ArrowUp") {
1848
+ _e.preventDefault();
1849
+ setActiveIndex((prev) => {
1850
+ const [groupIdx, itemIdx] = prev;
1851
+ if (itemIdx > 0) return [groupIdx, itemIdx - 1];
1852
+ const prevGroupIdx = (groupIdx - 1 + groups.length) % groups.length;
1853
+ const prevGroup = groups[prevGroupIdx];
1854
+ if (prevGroup && prevGroup.items.length > 0) return [prevGroupIdx, prevGroup.items.length - 1];
1855
+ return prev;
1856
+ });
1857
+ } else if (_e.key === "Enter") {
1858
+ _e.preventDefault();
1859
+ const [gi, ii] = activeIndex;
1860
+ const group = groups[gi];
1861
+ if (group && group.items[ii]) onSelect?.(group.items[ii]);
1862
+ } else if (_e.key === "Escape") {
1863
+ _e.preventDefault();
1864
+ setIsOpen(false);
1865
+ }
1866
+ };
1867
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1868
+ "div",
1869
+ {
1870
+ ...rest,
1871
+ role: "listbox",
1872
+ onKeyDown: handleKeyDown,
1873
+ style: {
1874
+ width: 520,
1875
+ maxWidth: "100%",
1876
+ background: "var(--dt-surface)",
1877
+ border: "1px solid var(--dt-border-strong)",
1878
+ borderRadius: "var(--dt-radius-xl)",
1879
+ boxShadow: "var(--dt-shadow-xl)",
1880
+ overflow: "hidden",
1881
+ fontFamily: "var(--dt-font-sans)",
1882
+ ...style
1883
+ },
1884
+ children: [
1885
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 11, padding: "14px 16px", borderBottom: "1px solid var(--dt-border)" }, children: [
1886
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", style: { color: "var(--dt-muted)", flex: "0 0 auto" }, children: [
1887
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "11", cy: "11", r: "7", stroke: "currentColor", strokeWidth: "2" }),
1888
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 21l-4-4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
1889
+ ] }),
1890
+ /* @__PURE__ */ jsxRuntime.jsx(
1891
+ "input",
1892
+ {
1893
+ autoFocus: true,
1894
+ value: query,
1895
+ onChange: (e) => onQueryChange?.(e.target.value),
1896
+ placeholder: "\uB3C4\uAD6C \xB7 \uC561\uC158 \uAC80\uC0C9\u2026",
1897
+ style: { flex: 1, border: "none", outline: "none", background: "transparent", fontSize: 15, fontFamily: "inherit", color: "var(--dt-ink-strong)" }
1898
+ }
1899
+ ),
1900
+ /* @__PURE__ */ jsxRuntime.jsx("kbd", { style: {
1901
+ fontFamily: "var(--dt-font-mono)",
1902
+ fontSize: 11,
1903
+ fontWeight: 600,
1904
+ color: "var(--dt-muted)",
1905
+ border: "1px solid var(--dt-border-strong)",
1906
+ borderRadius: "var(--dt-radius-sm)",
1907
+ padding: "2px 7px"
1908
+ }, children: "\u2318K" })
1909
+ ] }),
1910
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { maxHeight: 320, overflowY: "auto", padding: 6 }, children: groups.map((g, gi) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 4 }, children: [
1911
+ g.heading ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontFamily: "var(--dt-font-mono)", fontSize: 10, letterSpacing: ".1em", textTransform: "uppercase", color: "var(--dt-muted)", padding: "8px 10px 5px" }, children: g.heading }) : null,
1912
+ g.items.map((it, ii) => {
1913
+ const isActive = activeIndex[0] === gi && activeIndex[1] === ii;
1914
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1915
+ "button",
1916
+ {
1917
+ type: "button",
1918
+ role: "option",
1919
+ "aria-selected": isActive,
1920
+ onMouseDown: (e) => {
1921
+ e.preventDefault();
1922
+ onSelect?.(it);
1923
+ },
1924
+ style: {
1925
+ display: "flex",
1926
+ alignItems: "center",
1927
+ gap: 11,
1928
+ padding: "9px 10px",
1929
+ borderRadius: "var(--dt-radius-md)",
1930
+ cursor: "pointer",
1931
+ background: isActive ? "var(--dt-tint-accent)" : "transparent",
1932
+ border: "none",
1933
+ outline: "none"
1934
+ },
1935
+ children: [
1936
+ it.icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-flex", flex: "0 0 auto", color: isActive ? "var(--dt-accent)" : "var(--dt-muted)" }, "aria-hidden": "true", children: it.icon }) : null,
1937
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { flex: 1, minWidth: 0, fontSize: 13.5, fontWeight: isActive ? 600 : 500, color: isActive ? "var(--dt-accent)" : "var(--dt-ink-strong)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
1938
+ it.label,
1939
+ it.meta ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: "var(--dt-font-mono)", fontSize: 11, color: "var(--dt-muted)", fontWeight: 400, marginLeft: 8 }, children: it.meta }) : null
1940
+ ] }),
1941
+ it.shortcut ? /* @__PURE__ */ jsxRuntime.jsx("kbd", { style: { fontFamily: "var(--dt-font-mono)", fontSize: 11, color: "var(--dt-muted-strong)", border: "1px solid var(--dt-border-strong)", borderRadius: "var(--dt-radius-sm)", padding: "1px 6px" }, children: it.shortcut }) : null
1942
+ ]
1943
+ },
1944
+ ii
1945
+ );
1946
+ })
1947
+ ] }, gi)) }),
1948
+ footerHint ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { borderTop: "1px solid var(--dt-border)", padding: "8px 14px", fontFamily: "var(--dt-font-mono)", fontSize: 11, color: "var(--dt-muted)" }, children: footerHint }) : null
1949
+ ]
1950
+ }
1951
+ );
1952
+ }
1953
+ function Menu({ trigger, items = [], align = "left", width = 200, style, ...rest }) {
1954
+ const [open, setOpen] = react.useState(false);
1955
+ const ref = react.useRef(null);
1956
+ react.useEffect(() => {
1957
+ if (!open) return void 0;
1958
+ const onDoc = (e) => {
1959
+ if (ref.current && !ref.current.contains(e.target)) setOpen(false);
1960
+ };
1961
+ window.addEventListener("mousedown", onDoc);
1962
+ return () => window.removeEventListener("mousedown", onDoc);
1963
+ }, [open]);
1964
+ const handleTriggerKeyDown = (e) => {
1965
+ if (e.key === "Enter" || e.key === " ") {
1966
+ e.preventDefault();
1967
+ setOpen((v) => !v);
1968
+ } else if (e.key === "ArrowDown") {
1969
+ e.preventDefault();
1970
+ const firstItem = ref.current?.querySelector('button[role="menuitem"]');
1971
+ firstItem?.focus();
1972
+ }
1973
+ };
1974
+ const handleItemClick = (item) => {
1975
+ if (item.onClick) {
1976
+ item.onClick();
1977
+ setOpen(false);
1978
+ }
1979
+ };
1980
+ const handleTriggerClick = () => {
1981
+ setOpen((v) => !v);
1982
+ };
1983
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { ...rest, ref, style: { position: "relative", display: "inline-flex", ...style }, children: [
1984
+ /* @__PURE__ */ jsxRuntime.jsx(
1985
+ "button",
1986
+ {
1987
+ type: "button",
1988
+ onClick: handleTriggerClick,
1989
+ onKeyDown: handleTriggerKeyDown,
1990
+ "aria-expanded": open,
1991
+ "aria-haspopup": "menu",
1992
+ style: { display: "inline-flex", cursor: "pointer", border: "none", background: "transparent", padding: 0, fontSize: "inherit", fontFamily: "inherit" },
1993
+ children: trigger
1994
+ }
1995
+ ),
1996
+ open ? /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "menu", "aria-orientation": "vertical", style: {
1997
+ position: "absolute",
1998
+ top: "100%",
1999
+ [align]: 0,
2000
+ marginTop: 6,
2001
+ zIndex: 80,
2002
+ width,
2003
+ padding: 5,
2004
+ background: "var(--dt-surface)",
2005
+ borderRadius: "var(--dt-radius-md)",
2006
+ boxShadow: "var(--dt-shadow-lg)",
2007
+ animation: "dt-menu 130ms var(--dt-ease)"
2008
+ }, children: [
2009
+ items.map((it, i) => it.divider ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: 1, background: "var(--dt-border)", margin: "5px 0" } }, `d${i}`) : /* @__PURE__ */ jsxRuntime.jsxs(
2010
+ "button",
2011
+ {
2012
+ role: "menuitem",
2013
+ onClick: () => handleItemClick(it),
2014
+ style: {
2015
+ display: "flex",
2016
+ alignItems: "center",
2017
+ gap: 9,
2018
+ width: "100%",
2019
+ textAlign: "left",
2020
+ padding: "8px 10px",
2021
+ border: "none",
2022
+ borderRadius: "var(--dt-radius-sm)",
2023
+ cursor: "pointer",
2024
+ background: "transparent",
2025
+ fontSize: 13.5,
2026
+ fontWeight: 500,
2027
+ fontFamily: "inherit",
2028
+ color: it.danger ? "var(--dt-danger)" : "var(--dt-ink)"
2029
+ },
2030
+ onMouseEnter: (e) => {
2031
+ e.currentTarget.style.background = it.danger ? "var(--dt-tint-danger)" : "var(--dt-surface-sunken)";
2032
+ },
2033
+ onMouseLeave: (e) => {
2034
+ e.currentTarget.style.background = "transparent";
2035
+ },
2036
+ children: [
2037
+ it.icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-flex", color: it.danger ? "var(--dt-danger)" : "var(--dt-muted-strong)" }, children: it.icon }) : null,
2038
+ it.label
2039
+ ]
2040
+ },
2041
+ i
2042
+ )),
2043
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: `@keyframes dt-menu{from{opacity:0;transform:translateY(-4px)}}` })
2044
+ ] }) : null
2045
+ ] });
2046
+ }
2047
+ function Sidebar({ brand, sections = [], footer, width = 232, style, ...rest }) {
2048
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2049
+ "nav",
2050
+ {
2051
+ ...rest,
2052
+ style: {
2053
+ width,
2054
+ display: "flex",
2055
+ flexDirection: "column",
2056
+ background: "var(--dt-surface)",
2057
+ borderRight: "1px solid var(--dt-border-strong)",
2058
+ fontFamily: "var(--dt-font-sans)",
2059
+ ...style
2060
+ },
2061
+ children: [
2062
+ brand ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "16px 18px", borderBottom: "1px solid var(--dt-border)" }, children: brand }) : null,
2063
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, overflowY: "auto", padding: "12px 10px", display: "grid", gap: 16, alignContent: "start" }, children: sections.map((sec, si) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 2 }, children: [
2064
+ sec.heading ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontFamily: "var(--dt-font-mono)", fontSize: 10, letterSpacing: ".1em", textTransform: "uppercase", color: "var(--dt-muted)", padding: "4px 10px 6px" }, children: sec.heading }) : null,
2065
+ sec.items.map((it, ii) => /* @__PURE__ */ jsxRuntime.jsxs(
2066
+ "a",
2067
+ {
2068
+ href: it.href || "#",
2069
+ "aria-current": it.active ? "page" : void 0,
2070
+ style: {
2071
+ position: "relative",
2072
+ display: "flex",
2073
+ alignItems: "center",
2074
+ gap: 11,
2075
+ padding: "8px 10px 8px 12px",
2076
+ borderRadius: "var(--dt-radius-md)",
2077
+ textDecoration: "none",
2078
+ fontSize: 13.5,
2079
+ fontWeight: it.active ? 600 : 500,
2080
+ color: it.active ? "var(--dt-accent)" : "var(--dt-muted-strong)",
2081
+ background: it.active ? "var(--dt-tint-accent)" : "transparent"
2082
+ },
2083
+ children: [
2084
+ it.active ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "absolute", left: 0, top: 7, bottom: 7, width: 3, borderRadius: 2, background: "var(--dt-accent)" } }) : null,
2085
+ it.icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-flex", flex: "0 0 auto", color: it.active ? "var(--dt-accent)" : "var(--dt-muted)" }, "aria-hidden": "true", children: it.icon }) : null,
2086
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { flex: 1, minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: it.label }),
2087
+ it.badge != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: "var(--dt-font-mono)", fontSize: 11, color: it.active ? "var(--dt-accent)" : "var(--dt-muted)", fontVariantNumeric: "tabular-nums" }, children: it.badge }) : null
2088
+ ]
2089
+ },
2090
+ ii
2091
+ ))
2092
+ ] }, si)) }),
2093
+ footer ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "12px 16px", borderTop: "1px solid var(--dt-border)" }, children: footer }) : null
2094
+ ]
2095
+ }
2096
+ );
2097
+ }
2098
+ function Stepper({ steps = [], current = 0, orientation = "horizontal", style, ...rest }) {
2099
+ const vertical = orientation === "vertical";
2100
+ return /* @__PURE__ */ jsxRuntime.jsx(
2101
+ "div",
2102
+ {
2103
+ ...rest,
2104
+ style: {
2105
+ display: "flex",
2106
+ flexDirection: vertical ? "column" : "row",
2107
+ alignItems: vertical ? "stretch" : "flex-start",
2108
+ gap: 0,
2109
+ ...style
2110
+ },
2111
+ children: steps.map((s, i) => {
2112
+ const done = i < current, active = i === current;
2113
+ const accent = done || active;
2114
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: vertical ? "row" : "column", alignItems: vertical ? "flex-start" : "stretch", flex: vertical ? "none" : 1, minWidth: 0, gap: vertical ? 12 : 0 }, children: [
2115
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: vertical ? "column" : "row", alignItems: "center", gap: vertical ? 6 : 10, ...vertical ? {} : { width: "100%" } }, children: [
2116
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: {
2117
+ flex: "0 0 auto",
2118
+ width: 26,
2119
+ height: 26,
2120
+ display: "grid",
2121
+ placeItems: "center",
2122
+ borderRadius: "var(--dt-radius-sm)",
2123
+ fontFamily: "var(--dt-font-mono)",
2124
+ fontSize: 12,
2125
+ fontWeight: 700,
2126
+ background: done ? "var(--dt-accent)" : active ? "var(--dt-tint-accent)" : "var(--dt-surface-sunken)",
2127
+ color: done ? "#fff" : active ? "var(--dt-accent)" : "var(--dt-muted)",
2128
+ boxShadow: active ? "inset 0 0 0 1.5px var(--dt-accent)" : done ? "none" : "inset 0 0 0 1px var(--dt-border-strong)"
2129
+ }, children: done ? /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 6L9 17l-5-5", stroke: "currentColor", strokeWidth: "2.6", strokeLinecap: "round", strokeLinejoin: "round" }) }) : i + 1 }),
2130
+ i < steps.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: {
2131
+ background: done ? "var(--dt-accent)" : "var(--dt-border-strong)",
2132
+ ...vertical ? { width: 2, minHeight: 22, flex: 1, marginTop: 2 } : { height: 2, flex: 1 }
2133
+ } }) : null
2134
+ ] }),
2135
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: vertical ? "2px 0 16px" : "10px 14px 0 0" }, children: [
2136
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 13.5, fontWeight: accent ? 650 : 500, color: accent ? "var(--dt-ink-strong)" : "var(--dt-muted)" }, children: s.label }),
2137
+ s.description ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: "var(--dt-muted)", marginTop: 3, lineHeight: 1.45 }, children: s.description }) : null
2138
+ ] })
2139
+ ] }, i);
2140
+ })
2141
+ }
2142
+ );
2143
+ }
2144
+ var BRAND_LOGO_LANGUAGE = {
2145
+ Korean: "ko",
2146
+ English: "en"
2147
+ };
2148
+ var BRAND_LOGO_SIZE = {
2149
+ sm: 20,
2150
+ md: 28,
2151
+ lg: 56,
2152
+ xl: 76
2153
+ };
2154
+ var BRAND_WORDMARK = "Bridger";
2155
+ var BRAND_LOGO_LABEL = {
2156
+ [BRAND_LOGO_LANGUAGE.Korean]: "\uBE0C\uB9BF\uC800",
2157
+ [BRAND_LOGO_LANGUAGE.English]: BRAND_WORDMARK
2158
+ };
2159
+ function playMark(setArmed) {
2160
+ const scheduleFrame = typeof requestAnimationFrame === "function" ? requestAnimationFrame : (callback) => setTimeout(callback, 0);
2161
+ setArmed(false);
2162
+ scheduleFrame(
2163
+ () => scheduleFrame(() => setArmed(true))
2164
+ );
2165
+ }
2166
+ var BrandLogo = react.forwardRef(function BrandLogo2({
2167
+ size = "md",
2168
+ autoplay = false,
2169
+ loop = false,
2170
+ lang = BRAND_LOGO_LANGUAGE.Korean,
2171
+ style
2172
+ }, ref) {
2173
+ const fontSize = typeof size === "number" ? size : BRAND_LOGO_SIZE[size] ?? BRAND_LOGO_SIZE.md;
2174
+ const [armed, setArmed] = react.useState(false);
2175
+ react.useImperativeHandle(
2176
+ ref,
2177
+ () => ({
2178
+ play() {
2179
+ playMark(setArmed);
2180
+ }
2181
+ }),
2182
+ []
2183
+ );
2184
+ react.useEffect(() => {
2185
+ if (!autoplay) return;
2186
+ const timeout = setTimeout(() => playMark(setArmed), 200);
2187
+ return () => clearTimeout(timeout);
2188
+ }, [autoplay]);
2189
+ react.useEffect(() => {
2190
+ if (!loop) return;
2191
+ let alive = true;
2192
+ const interval = setInterval(() => {
2193
+ if (!alive) return;
2194
+ playMark((value) => {
2195
+ if (alive) setArmed(value);
2196
+ });
2197
+ }, 7e3);
2198
+ return () => {
2199
+ alive = false;
2200
+ clearInterval(interval);
2201
+ };
2202
+ }, [loop]);
2203
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2204
+ "span",
2205
+ {
2206
+ "aria-label": BRAND_LOGO_LABEL[lang],
2207
+ style: {
2208
+ display: "inline-flex",
2209
+ alignItems: "center",
2210
+ gap: "0.38em",
2211
+ fontFamily: "var(--dt-font-sans)",
2212
+ fontWeight: 760,
2213
+ fontSize,
2214
+ letterSpacing: 0,
2215
+ lineHeight: 1,
2216
+ color: "var(--dt-ink-strong)",
2217
+ userSelect: "none",
2218
+ ...style
2219
+ },
2220
+ children: [
2221
+ /* @__PURE__ */ jsxRuntime.jsxs(
2222
+ "svg",
2223
+ {
2224
+ width: "2.306em",
2225
+ height: "1.24em",
2226
+ viewBox: "0 0 44 24",
2227
+ "aria-hidden": "true",
2228
+ focusable: "false",
2229
+ style: { flex: "0 0 auto", overflow: "visible" },
2230
+ children: [
2231
+ /* @__PURE__ */ jsxRuntime.jsx(
2232
+ "path",
2233
+ {
2234
+ d: "M4 8H18C24 8 25 4 31 4H40",
2235
+ fill: "none",
2236
+ stroke: "color-mix(in srgb, var(--dt-ink-strong) 24%, transparent)",
2237
+ strokeLinecap: "round",
2238
+ strokeLinejoin: "round",
2239
+ strokeWidth: "3"
2240
+ }
2241
+ ),
2242
+ /* @__PURE__ */ jsxRuntime.jsx(
2243
+ "path",
2244
+ {
2245
+ d: "M4 16H18C24 16 25 20 31 20H40",
2246
+ fill: "none",
2247
+ stroke: "color-mix(in srgb, var(--dt-ink-strong) 24%, transparent)",
2248
+ strokeLinecap: "round",
2249
+ strokeLinejoin: "round",
2250
+ strokeWidth: "3"
2251
+ }
2252
+ ),
2253
+ /* @__PURE__ */ jsxRuntime.jsx(
2254
+ "path",
2255
+ {
2256
+ className: "dt-brand-logo-line",
2257
+ d: "M4 8H18C24 8 25 4 31 4H40",
2258
+ fill: "none",
2259
+ stroke: "var(--dt-accent)",
2260
+ strokeDasharray: "42",
2261
+ strokeDashoffset: armed ? 0 : 0,
2262
+ strokeLinecap: "round",
2263
+ strokeLinejoin: "round",
2264
+ strokeWidth: "3.2",
2265
+ style: armed ? { animation: "dt-brand-logo-line-draw 420ms cubic-bezier(.2, .7, .2, 1) both" } : void 0
2266
+ }
2267
+ ),
2268
+ /* @__PURE__ */ jsxRuntime.jsx(
2269
+ "path",
2270
+ {
2271
+ className: "dt-brand-logo-line",
2272
+ d: "M4 16H18C24 16 25 20 31 20H40",
2273
+ fill: "none",
2274
+ stroke: "var(--dt-accent)",
2275
+ strokeDasharray: "42",
2276
+ strokeDashoffset: armed ? 0 : 0,
2277
+ strokeLinecap: "round",
2278
+ strokeLinejoin: "round",
2279
+ strokeWidth: "3.2",
2280
+ style: armed ? { animation: "dt-brand-logo-line-draw 420ms cubic-bezier(.2, .7, .2, 1) both" } : void 0
2281
+ }
2282
+ )
2283
+ ]
2284
+ }
2285
+ ),
2286
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: BRAND_WORDMARK }),
2287
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: "@keyframes dt-brand-logo-line-draw{from{opacity:.45;stroke-dashoffset:42}to{opacity:1;stroke-dashoffset:0}}@media (prefers-reduced-motion: reduce){.dt-brand-logo-line{animation:none!important}}" })
2288
+ ]
2289
+ }
2290
+ );
2291
+ });
2292
+ var PRODUCT_ACTION_PILL_VARIANT = {
2293
+ Default: "default",
2294
+ Accent: "accent",
2295
+ Outline: "outline"
2296
+ };
2297
+ var PRODUCT_ACTION_PILL_SIZE = {
2298
+ Compact: "compact",
2299
+ Figma: "figma"
2300
+ };
2301
+ var VARIANT_CLASS2 = {
2302
+ [PRODUCT_ACTION_PILL_VARIANT.Default]: "dt-product-action-pill-default",
2303
+ [PRODUCT_ACTION_PILL_VARIANT.Accent]: "dt-product-action-pill-accent",
2304
+ [PRODUCT_ACTION_PILL_VARIANT.Outline]: "dt-product-action-pill-outline"
2305
+ };
2306
+ var SIZE_CLASS = {
2307
+ [PRODUCT_ACTION_PILL_SIZE.Compact]: "dt-product-action-pill-compact",
2308
+ [PRODUCT_ACTION_PILL_SIZE.Figma]: "dt-product-action-pill-figma"
2309
+ };
2310
+ function productActionPillClassName({
2311
+ variant = PRODUCT_ACTION_PILL_VARIANT.Default,
2312
+ size = PRODUCT_ACTION_PILL_SIZE.Compact,
2313
+ className
2314
+ } = {}) {
2315
+ return cx("dt-product-action-pill", VARIANT_CLASS2[variant], SIZE_CLASS[size], className);
2316
+ }
2317
+ function ProductActionPill({
2318
+ as,
2319
+ variant = PRODUCT_ACTION_PILL_VARIANT.Default,
2320
+ size = PRODUCT_ACTION_PILL_SIZE.Compact,
2321
+ leadingIcon,
2322
+ trailingIcon,
2323
+ children,
2324
+ className,
2325
+ ...rest
2326
+ }) {
2327
+ const Component = as ?? "a";
2328
+ return /* @__PURE__ */ jsxRuntime.jsxs(Component, { className: productActionPillClassName({ variant, size, className }), ...rest, children: [
2329
+ leadingIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "dt-product-action-pill-icon", children: leadingIcon }) : null,
2330
+ children ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "dt-product-action-pill-label", children }) : null,
2331
+ trailingIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "dt-product-action-pill-icon", children: trailingIcon }) : null
2332
+ ] });
2333
+ }
2334
+ var PRODUCT_SHELL_TONE = {
2335
+ Cinematic: "cinematic",
2336
+ Console: "console"
2337
+ };
2338
+ var SHELL_TONE_CLASS = {
2339
+ [PRODUCT_SHELL_TONE.Cinematic]: "dt-product-shell-cinematic",
2340
+ [PRODUCT_SHELL_TONE.Console]: "dt-product-shell-console"
2341
+ };
2342
+ function ProductShell({ tone = PRODUCT_SHELL_TONE.Cinematic, className, children, ...rest }) {
2343
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("dt-product-shell", SHELL_TONE_CLASS[tone], className), ...rest, children });
2344
+ }
2345
+ function ProductCinematicBackdrop({
2346
+ animated = true,
2347
+ className,
2348
+ ...rest
2349
+ }) {
2350
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2351
+ "div",
2352
+ {
2353
+ className: cx("dt-product-cinematic-backdrop", animated && "dt-product-cinematic-backdrop-animated", className),
2354
+ "aria-hidden": "true",
2355
+ ...rest,
2356
+ children: [
2357
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "dt-product-cinematic-wash" }),
2358
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "dt-product-cinematic-lines", viewBox: "0 0 1440 720", preserveAspectRatio: "xMidYMid slice", children: [
2359
+ /* @__PURE__ */ jsxRuntime.jsx("path", { className: "dt-product-cinematic-track", d: "M-60 248 H520 C690 248 710 168 884 168 H1500" }),
2360
+ /* @__PURE__ */ jsxRuntime.jsx("path", { className: "dt-product-cinematic-track", d: "M-60 430 H510 C660 430 692 542 872 542 H1500" }),
2361
+ /* @__PURE__ */ jsxRuntime.jsx("path", { className: "dt-product-cinematic-track", d: "M-60 338 H610 C748 338 770 326 930 326 H1500" }),
2362
+ /* @__PURE__ */ jsxRuntime.jsx("path", { className: "dt-product-cinematic-flow dt-product-cinematic-flow-a", d: "M-60 248 H520 C690 248 710 168 884 168 H1500" }),
2363
+ /* @__PURE__ */ jsxRuntime.jsx("path", { className: "dt-product-cinematic-flow dt-product-cinematic-flow-b", d: "M-60 430 H510 C660 430 692 542 872 542 H1500" }),
2364
+ /* @__PURE__ */ jsxRuntime.jsx("path", { className: "dt-product-cinematic-flow dt-product-cinematic-flow-c", d: "M-60 338 H610 C748 338 770 326 930 326 H1500" })
2365
+ ] })
2366
+ ]
2367
+ }
2368
+ );
2369
+ }
2370
+ function ProductMotionField({
2371
+ gridSrc,
2372
+ label = "Live API routing motion",
2373
+ className,
2374
+ ...rest
2375
+ }) {
2376
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("dt-product-motion-field", className), "aria-label": label, ...rest, children: [
2377
+ gridSrc ? /* @__PURE__ */ jsxRuntime.jsx("img", { className: "dt-product-motion-grid", src: gridSrc, alt: "", "aria-hidden": "true", loading: "lazy" }) : null,
2378
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "dt-product-motion-orbit dt-product-motion-orbit-a", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "dt-product-motion-node" }) }),
2379
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "dt-product-motion-orbit dt-product-motion-orbit-b", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "dt-product-motion-node" }) }),
2380
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "dt-product-motion-axis", "aria-hidden": "true" }),
2381
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "dt-product-motion-copy", children: "API" })
2382
+ ] });
2383
+ }
2384
+ function ProductSideRail({ items, label, className, ...rest }) {
2385
+ return /* @__PURE__ */ jsxRuntime.jsx("aside", { className: cx("dt-product-side-rail", className), "aria-label": label, ...rest, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, children: item.label }, item.key)) });
2386
+ }
2387
+ function ProductPageHeader({
2388
+ eyebrow,
2389
+ title,
2390
+ description,
2391
+ actions,
2392
+ children,
2393
+ className,
2394
+ ...rest
2395
+ }) {
2396
+ return /* @__PURE__ */ jsxRuntime.jsxs("header", { className: cx("dt-product-page-header", className), ...rest, children: [
2397
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "dt-product-page-header-row", children: [
2398
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "dt-product-page-header-copy", children: [
2399
+ eyebrow ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "dt-product-page-header-eyebrow", children: eyebrow }) : null,
2400
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "dt-product-page-header-text", children: [
2401
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { children: title }),
2402
+ description ? /* @__PURE__ */ jsxRuntime.jsx("p", { children: description }) : null
2403
+ ] })
2404
+ ] }),
2405
+ actions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "dt-product-page-header-actions", children: actions }) : null
2406
+ ] }),
2407
+ children ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "dt-product-page-header-content", children }) : null
2408
+ ] });
2409
+ }
2410
+ function SectionCard({
2411
+ eyebrow,
2412
+ title,
2413
+ description,
2414
+ action,
2415
+ children,
2416
+ contentClassName,
2417
+ style,
2418
+ ...rest
2419
+ }) {
2420
+ const hasHeader = Boolean(eyebrow || title || description || action);
2421
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2422
+ "section",
2423
+ {
2424
+ ...rest,
2425
+ style: {
2426
+ borderRadius: "var(--dt-radius-lg)",
2427
+ background: "var(--dt-surface)",
2428
+ boxShadow: "var(--dt-ring), var(--dt-shadow-xs)",
2429
+ padding: "var(--dt-space-4)",
2430
+ ...style
2431
+ },
2432
+ children: [
2433
+ hasHeader ? /* @__PURE__ */ jsxRuntime.jsxs(
2434
+ "header",
2435
+ {
2436
+ style: {
2437
+ display: "flex",
2438
+ alignItems: "flex-start",
2439
+ justifyContent: "space-between",
2440
+ gap: "var(--dt-space-3)",
2441
+ marginBottom: children ? "var(--dt-space-3)" : 0
2442
+ },
2443
+ children: [
2444
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 0 }, children: [
2445
+ eyebrow ? /* @__PURE__ */ jsxRuntime.jsx(
2446
+ "p",
2447
+ {
2448
+ style: {
2449
+ marginBottom: 6,
2450
+ fontSize: 12,
2451
+ fontWeight: 650,
2452
+ textTransform: "uppercase",
2453
+ color: "var(--dt-muted)"
2454
+ },
2455
+ children: eyebrow
2456
+ }
2457
+ ) : null,
2458
+ title ? /* @__PURE__ */ jsxRuntime.jsx("h3", { style: { fontSize: 18, fontWeight: 650, letterSpacing: "-0.01em", color: "var(--dt-ink-strong)" }, children: title }) : null,
2459
+ description ? /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginTop: 6, fontSize: 13, lineHeight: 1.55, color: "var(--dt-muted-strong)", maxWidth: 560 }, children: description }) : null
2460
+ ] }),
2461
+ action ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: "0 0 auto" }, children: action }) : null
2462
+ ]
2463
+ }
2464
+ ) : null,
2465
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx(contentClassName), children })
2466
+ ]
2467
+ }
2468
+ );
2469
+ }
2470
+ var STATE_COLOR = {
2471
+ available: "var(--dt-success)",
2472
+ managed: "var(--dt-success)",
2473
+ locked: "var(--dt-warning)"
2474
+ };
2475
+ function ToolCard({
2476
+ name,
2477
+ method = "GET",
2478
+ category,
2479
+ description = "\uC124\uBA85 \uC5C6\uC74C",
2480
+ path = "/",
2481
+ state = "available",
2482
+ stateLabel,
2483
+ style,
2484
+ ...rest
2485
+ }) {
2486
+ const cat = category ?? (name ? name.split("_")[0] : "etc");
2487
+ const labels = { available: "\uC0AC\uC6A9 \uAC00\uB2A5", managed: "\uAD00\uB9AC\uD615 \uD0A4", locked: "\uD0A4 \uB4F1\uB85D" };
2488
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2489
+ "article",
2490
+ {
2491
+ className: "dt-tool-card",
2492
+ ...rest,
2493
+ style: {
2494
+ borderRadius: "var(--dt-radius-md)",
2495
+ background: "var(--dt-surface)",
2496
+ boxShadow: "var(--dt-ring), var(--dt-shadow-xs)",
2497
+ padding: "16px 18px",
2498
+ transition: "box-shadow var(--dt-motion), background-color var(--dt-motion)",
2499
+ ...style
2500
+ },
2501
+ children: [
2502
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: 12 }, children: [
2503
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 0 }, children: [
2504
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexWrap: "wrap", gap: 8 }, children: [
2505
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "dt-chip dt-chip-muted", children: cat }),
2506
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "dt-chip dt-chip-accent", children: method })
2507
+ ] }),
2508
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { style: { marginTop: 11, fontSize: 15, fontWeight: 650, letterSpacing: "-0.01em", color: "var(--dt-ink-strong)", wordBreak: "break-all" }, children: name })
2509
+ ] }),
2510
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, flex: "0 0 auto", fontSize: 12, fontWeight: 600, color: STATE_COLOR[state] }, children: [
2511
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { width: 6, height: 6, borderRadius: "9999px", background: STATE_COLOR[state] } }),
2512
+ stateLabel ?? labels[state]
2513
+ ] })
2514
+ ] }),
2515
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: {
2516
+ marginTop: 12,
2517
+ fontSize: 13,
2518
+ lineHeight: 1.5,
2519
+ color: "var(--dt-muted-strong)",
2520
+ display: "-webkit-box",
2521
+ WebkitLineClamp: 2,
2522
+ WebkitBoxOrient: "vertical",
2523
+ overflow: "hidden"
2524
+ }, children: description }),
2525
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 14, paddingTop: 13, borderTop: "1px solid var(--dt-divider)", display: "flex", alignItems: "center", justifyContent: "space-between", gap: 12 }, children: /* @__PURE__ */ jsxRuntime.jsx("code", { style: { fontFamily: "var(--dt-font-mono)", fontSize: 12, color: "var(--dt-muted)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: path }) }),
2526
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: ".dt-tool-card:hover{box-shadow:var(--dt-ring), var(--dt-shadow-md)}.dt-chip{font-family:var(--dt-font-mono);font-size:11px;font-weight:600;letter-spacing:.02em;padding:3px 8px;border-radius:var(--dt-radius-sm);background:var(--dt-surface-sunken)}.dt-chip-muted{color:var(--dt-muted-strong)}.dt-chip-accent{color:var(--dt-accent)" })
2527
+ ]
2528
+ }
2529
+ );
2530
+ }
2531
+
2532
+ exports.Alert = Alert;
2533
+ exports.AlertMotion = AlertMotion;
2534
+ exports.AlertTone = AlertTone;
2535
+ exports.Avatar = Avatar;
2536
+ exports.BRAND_LOGO_LANGUAGE = BRAND_LOGO_LANGUAGE;
2537
+ exports.Badge = Badge;
2538
+ exports.BrandLogo = BrandLogo;
2539
+ exports.Breadcrumb = Breadcrumb;
2540
+ exports.Button = Button;
2541
+ exports.Card = Card;
2542
+ exports.CardTone = CardTone;
2543
+ exports.Checkbox = Checkbox;
2544
+ exports.CodeBlock = CodeBlock;
2545
+ exports.Combobox = Combobox;
2546
+ exports.CommandPalette = CommandPalette;
2547
+ exports.Dialog = Dialog;
2548
+ exports.Drawer = Drawer;
2549
+ exports.EmptyState = EmptyState;
2550
+ exports.FileUpload = FileUpload;
2551
+ exports.FilterChip = FilterChip;
2552
+ exports.Input = Input;
2553
+ exports.KeyValue = KeyValue;
2554
+ exports.LogRow = LogRow;
2555
+ exports.Menu = Menu;
2556
+ exports.MetricAccent = MetricAccent;
2557
+ exports.PRODUCT_ACTION_PILL_SIZE = PRODUCT_ACTION_PILL_SIZE;
2558
+ exports.PRODUCT_ACTION_PILL_VARIANT = PRODUCT_ACTION_PILL_VARIANT;
2559
+ exports.PRODUCT_SHELL_TONE = PRODUCT_SHELL_TONE;
2560
+ exports.Pagination = Pagination;
2561
+ exports.Panel = Panel;
2562
+ exports.ProductActionPill = ProductActionPill;
2563
+ exports.ProductCinematicBackdrop = ProductCinematicBackdrop;
2564
+ exports.ProductMotionField = ProductMotionField;
2565
+ exports.ProductPageHeader = ProductPageHeader;
2566
+ exports.ProductShell = ProductShell;
2567
+ exports.ProductSideRail = ProductSideRail;
2568
+ exports.RadioGroup = RadioGroup;
2569
+ exports.SectionCard = SectionCard;
2570
+ exports.SegmentedControl = SegmentedControl;
2571
+ exports.Select = Select;
2572
+ exports.Sidebar = Sidebar;
2573
+ exports.Skeleton = Skeleton;
2574
+ exports.Slider = Slider;
2575
+ exports.Spinner = Spinner;
2576
+ exports.StatTile = StatTile;
2577
+ exports.StatusPill = StatusPill;
2578
+ exports.Stepper = Stepper;
2579
+ exports.SurfaceTone = SurfaceTone;
2580
+ exports.Switch = Switch;
2581
+ exports.Table = Table;
2582
+ exports.Tabs = Tabs;
2583
+ exports.Textarea = Textarea;
2584
+ exports.Toast = Toast;
2585
+ exports.ToggleSwitch = ToggleSwitch;
2586
+ exports.ToolCard = ToolCard;
2587
+ exports.Tooltip = Tooltip;
2588
+ exports.UsageMeter = UsageMeter;
2589
+ exports.cx = cx;
2590
+ exports.metricAccentColor = metricAccentColor;
2591
+ exports.productActionPillClassName = productActionPillClassName;
2592
+ //# sourceMappingURL=index.cjs.map
2593
+ //# sourceMappingURL=index.cjs.map