@iamfiro/design 0.1.0 → 0.3.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 (160) hide show
  1. package/AGENTS.md +1 -0
  2. package/agents/INDEX.md +1 -0
  3. package/agents/brand-icon/AGENTS.md +2 -2
  4. package/agents/social-login-button/AGENTS.md +156 -0
  5. package/lib/components/Accordion/Accordion2.js +135 -0
  6. package/lib/components/ActionBar/ActionBar2.js +65 -0
  7. package/lib/components/Alert/Alert2.js +131 -0
  8. package/lib/components/AppShell/AppShell2.js +94 -0
  9. package/lib/components/AreaChart/AreaChart.js +59 -0
  10. package/lib/components/BarChart/BarChart2.js +243 -0
  11. package/lib/components/BarList/BarList2.js +172 -0
  12. package/lib/components/Breadcrumb/Breadcrumb2.js +87 -0
  13. package/lib/components/Calendar/Calendar2.js +309 -0
  14. package/lib/components/Calendar/DatePicker2.js +229 -0
  15. package/lib/components/Calendar/date.js +121 -0
  16. package/lib/components/Card/Card2.js +104 -0
  17. package/lib/components/CardFrame/CardFrame2.js +72 -0
  18. package/lib/components/Chart/ChartParts.js +150 -0
  19. package/lib/components/Chart/chart2.js +96 -0
  20. package/lib/components/Chart/useChartInteraction.js +94 -0
  21. package/lib/components/ChatBubble/ChatBubble2.js +174 -0
  22. package/lib/components/ChatBubble/formatChatTime.js +53 -0
  23. package/lib/components/ChatComposer/ChatComposer2.js +153 -0
  24. package/lib/components/CodeBlock/CodeBlock2.js +93 -0
  25. package/lib/components/CodeBlock/highlight.js +114 -0
  26. package/lib/components/ColorPicker/ColorPicker2.js +610 -0
  27. package/lib/components/ColorPicker/color.js +180 -0
  28. package/lib/components/ColorPicker/presets.js +75 -0
  29. package/lib/components/Combobox/Combobox2.js +229 -0
  30. package/lib/components/CommandMenu/CommandMenu.js +267 -0
  31. package/lib/components/Comment/Comment2.js +134 -0
  32. package/lib/components/ContextMenu/ContextMenu2.js +168 -0
  33. package/lib/components/DataGrid/DataGrid2.js +1996 -0
  34. package/lib/components/DataGrid/GridPopover.js +154 -0
  35. package/lib/components/DataGrid/anchor.js +50 -0
  36. package/lib/components/DataGrid/model.js +558 -0
  37. package/lib/components/DataGrid/panels.js +703 -0
  38. package/lib/components/DataGrid/typeMeta.js +76 -0
  39. package/lib/components/DataGrid/types.js +54 -0
  40. package/lib/components/DescriptionList/DescriptionList2.js +180 -0
  41. package/lib/components/Dialog/AlertDialog.js +118 -0
  42. package/lib/components/Dialog/Dialog2.js +109 -0
  43. package/lib/components/Dialog/modal.js +92 -0
  44. package/lib/components/Drawer/Drawer2.js +244 -0
  45. package/lib/components/DropdownMenu/DropdownMenu2.js +394 -0
  46. package/lib/components/DropdownMenu/menuCore.js +63 -0
  47. package/lib/components/Dropzone/Dropzone2.js +144 -0
  48. package/lib/components/EmptyState/EmptyState2.js +72 -0
  49. package/lib/components/FileChip/FileChip2.js +118 -0
  50. package/lib/components/FileUpload/FileUpload.js +258 -0
  51. package/lib/components/FilterChips/FilterChips2.js +101 -0
  52. package/lib/components/FunnelChart/FunnelChart2.js +283 -0
  53. package/lib/components/FunnelChart/funnel.js +69 -0
  54. package/lib/components/Highlight/Highlight2.js +100 -0
  55. package/lib/components/HoverCard/HoverCard.js +134 -0
  56. package/lib/components/InlineDiff/InlineDiff2.js +215 -0
  57. package/lib/components/InlineDiff/diff.js +126 -0
  58. package/lib/components/InlineDiff/useDiffReview.js +109 -0
  59. package/lib/components/Kanban/Kanban2.js +691 -0
  60. package/lib/components/Kanban/KanbanCard.js +159 -0
  61. package/lib/components/Kanban/move.js +69 -0
  62. package/lib/components/LineChart/LineChart2.js +342 -0
  63. package/lib/components/List/List2.js +133 -0
  64. package/lib/components/Listbox/Listbox2.js +163 -0
  65. package/lib/components/Marker/Marker2.js +82 -0
  66. package/lib/components/Menubar/Menubar2.js +223 -0
  67. package/lib/components/MultiSelect/MultiSelect2.js +204 -0
  68. package/lib/components/NavigationMenu/NavigationMenu2.js +481 -0
  69. package/lib/components/NoticeStack/NoticeStack2.js +178 -0
  70. package/lib/components/NumberStepper/NumberStepper2.js +129 -0
  71. package/lib/components/OtpInput/OtpInput2.js +122 -0
  72. package/lib/components/Pagination/Pagination2.js +210 -0
  73. package/lib/components/Pagination/paginationRange.js +53 -0
  74. package/lib/components/PhoneInput/PhoneInput.js +175 -0
  75. package/lib/components/PieChart/PieChart2.js +246 -0
  76. package/lib/components/PieChart/arc.js +66 -0
  77. package/lib/components/PieChart/useArcTween.js +94 -0
  78. package/lib/components/Popover/Popover2.js +112 -0
  79. package/lib/components/ProgressTracker/ProgressTracker2.js +226 -0
  80. package/lib/components/Rating/Rating2.js +186 -0
  81. package/lib/components/Resizable/Resizable2.js +236 -0
  82. package/lib/components/Resizable/layout.js +115 -0
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +100 -0
  84. package/lib/components/ScatterChart/ScatterChart2.js +356 -0
  85. package/lib/components/ScatterChart/scatter.js +83 -0
  86. package/lib/components/ScrollArea/ScrollArea2.js +218 -0
  87. package/lib/components/Select/Select2.js +153 -0
  88. package/lib/components/Sidebar/Sidebar2.js +127 -0
  89. package/lib/components/Skeleton/Skeleton2.js +91 -0
  90. package/lib/components/Slider/Slider2.js +142 -0
  91. package/lib/components/SocialLoginButton/SocialLoginButton.js +85 -0
  92. package/lib/components/SparkChart/SparkChart2.js +217 -0
  93. package/lib/components/SparkChart/spark.js +76 -0
  94. package/lib/components/Sparkbar/Sparkbar2.js +111 -0
  95. package/lib/components/SplitView/SplitView2.js +95 -0
  96. package/lib/components/Stat/Stat2.js +164 -0
  97. package/lib/components/StepList/StepList2.js +131 -0
  98. package/lib/components/Table/Table2.js +104 -0
  99. package/lib/components/Tabs/Tabs2.js +131 -0
  100. package/lib/components/TagInput/TagInput2.js +360 -0
  101. package/lib/components/TimePicker/TimePicker2.js +388 -0
  102. package/lib/components/TimePicker/time.js +83 -0
  103. package/lib/components/Timeline/Timeline2.js +369 -0
  104. package/lib/components/Timeline/scale.js +83 -0
  105. package/lib/components/Toast/Toaster.js +212 -0
  106. package/lib/components/Toast/store.js +129 -0
  107. package/lib/components/ToggleGroup/ToggleGroup2.js +125 -0
  108. package/lib/components/Toolbar/Toolbar2.js +281 -0
  109. package/lib/components/Tracker/Tracker2.js +172 -0
  110. package/lib/components/TreeDiagram/TreeDiagram2.js +223 -0
  111. package/lib/components/TreeView/TreeView2.js +284 -0
  112. package/lib/hooks/timing.js +55 -0
  113. package/lib/hooks/useControllableState.js +49 -0
  114. package/lib/hooks/useCountdown.js +80 -0
  115. package/lib/hooks/useDigitInput.js +105 -0
  116. package/lib/hooks/useDismiss.js +71 -0
  117. package/lib/hooks/useElapsed.js +83 -0
  118. package/lib/hooks/useFloating.js +70 -0
  119. package/lib/hooks/useFocusTrap.js +61 -0
  120. package/lib/hooks/usePresence.js +60 -0
  121. package/lib/hooks/usePressToOpen.js +69 -0
  122. package/lib/hooks/useScrollLock.js +70 -0
  123. package/lib/hooks/useSelection.js +68 -0
  124. package/lib/index.js +175 -17911
  125. package/lib/primitives/AspectRatio2.js +80 -0
  126. package/lib/primitives/BrandIcon.js +245 -0
  127. package/lib/primitives/ColorDot2.js +70 -0
  128. package/lib/primitives/CopyButton2.js +85 -0
  129. package/lib/primitives/CountBadge2.js +78 -0
  130. package/lib/primitives/Countdown2.js +65 -0
  131. package/lib/primitives/Delta2.js +67 -0
  132. package/lib/primitives/Elapsed.js +62 -0
  133. package/lib/primitives/FileIcon2.js +125 -0
  134. package/lib/primitives/Flag2.js +263 -0
  135. package/lib/primitives/IconStack2.js +85 -0
  136. package/lib/primitives/IconTile2.js +68 -0
  137. package/lib/primitives/Kbd2.js +88 -0
  138. package/lib/primitives/Layout2.js +118 -0
  139. package/lib/primitives/Link2.js +53 -0
  140. package/lib/primitives/MaskedText2.js +120 -0
  141. package/lib/primitives/Progress2.js +137 -0
  142. package/lib/primitives/RelativeTime.js +84 -0
  143. package/lib/primitives/SearchInput2.js +84 -0
  144. package/lib/primitives/SelectorButton2.js +97 -0
  145. package/lib/primitives/Spinner2.js +98 -0
  146. package/lib/primitives/StatusIcon2.js +126 -0
  147. package/lib/primitives/Swatch2.js +79 -0
  148. package/lib/primitives/Tooltip2.js +132 -0
  149. package/lib/primitives/Typography2.js +97 -0
  150. package/lib/primitives/formatCountdown.js +51 -0
  151. package/lib/primitives/formatElapsed.js +66 -0
  152. package/lib/primitives/formatRelativeTime.js +64 -0
  153. package/lib/primitives/hotkey.js +94 -0
  154. package/lib/primitives/index.js +352 -0
  155. package/lib/primitives/maskValue.js +65 -0
  156. package/lib/style.css +1 -1
  157. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +10 -0
  158. package/lib/types/components/index.d.ts +2 -0
  159. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  160. package/package.json +2 -1
@@ -0,0 +1,53 @@
1
+ "use client";
2
+ function e(t, r) {
3
+ t -= 103;
4
+ var i = n(), a = i[t];
5
+ e.QDOOFc === void 0 && (e.aZXDIp = function(e) {
6
+ for (var t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=", n = "", r = "", i = 0, a, o, s = 0; o = e.charAt(s++); ~o && (a = i % 4 ? a * 64 + o : o, i++ % 4) && (n += String.fromCharCode(255 & a >> (-2 * i & 6)))) o = t.indexOf(o);
7
+ for (var c = 0, l = n.length; c < l; c++) r += "%" + ("00" + n.charCodeAt(c).toString(16)).slice(-2);
8
+ return decodeURIComponent(r);
9
+ }, e.pNISwi = {}, e.QDOOFc = !0);
10
+ var o = i[0];
11
+ e.CjNQoe !== o && (e.pNISwi = {}, e.CjNQoe = o);
12
+ var s = e.pNISwi[t];
13
+ return s === void 0 ? (a = e.aZXDIp(a), e.pNISwi[t] = a) : a = s, a;
14
+ }
15
+ (function(t, n) {
16
+ for (var r = e, i = t();;) try {
17
+ if (parseInt(r(110)) / 1 + -parseInt(r(108)) / 2 * (-parseInt(r(118)) / 3) + parseInt(r(111)) / 4 * (parseInt(r(116)) / 5) + parseInt(r(115)) / 6 + parseInt(r(112)) / 7 + -parseInt(r(106)) / 8 * (-parseInt(r(109)) / 9) + -parseInt(r(107)) / 10 * (parseInt(r(113)) / 11) == n) break;
18
+ i.push(i.shift());
19
+ } catch {
20
+ i.push(i.shift());
21
+ }
22
+ })(n, 758137);
23
+ function t(t) {
24
+ var n = e;
25
+ return new Intl[n(114)](n(104), {
26
+ hour: n(103),
27
+ minute: n(117)
28
+ })[n(105)](t);
29
+ }
30
+ export { t as formatChatTime };
31
+ function n() {
32
+ var e = [
33
+ "rgf0zvrPBwvgB3jTyxq",
34
+ "oduWmZq4ogHLAhzmqG",
35
+ "ndi4mte1yLDsr1b0",
36
+ "mI1KAwDPDa",
37
+ "nJiYmJnnwuHwrMO",
38
+ "BNvTzxjPyW",
39
+ "A28Ts1i",
40
+ "zM9YBwf0",
41
+ "ofL5qKD4sq",
42
+ "nZiXodbervv6yMe",
43
+ "mMDtrvrdBW",
44
+ "nZm5ndeWm1zPEej5rq",
45
+ "ntyZmZeZyM1rBMzS",
46
+ "ngnLue5dCa",
47
+ "ntyXmJy0oxrkqNLhCq",
48
+ "ndq5ouzKCNzSAW"
49
+ ];
50
+ return n = function() {
51
+ return e;
52
+ }, n();
53
+ }
@@ -0,0 +1,153 @@
1
+ "use client";
2
+ const e = i;
3
+ (function(e, t) {
4
+ let n = i, r = e();
5
+ for (;;) try {
6
+ if (parseInt(n(264)) / 1 * (parseInt(n(304)) / 2) + parseInt(n(276)) / 3 * (parseInt(n(300)) / 4) + -parseInt(n(274)) / 5 * (-parseInt(n(305)) / 6) + -parseInt(n(277)) / 7 * (parseInt(n(275)) / 8) + -parseInt(n(273)) / 9 * (parseInt(n(271)) / 10) + parseInt(n(299)) / 11 + -parseInt(n(285)) / 12 == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(t, 230464);
12
+ function t() {
13
+ let e = /* @__PURE__ */ "C2HPzNrlzxK.66Mu7iUC7kEa.ndmZmgr0zwrSrW.zw50zxi.mZK1mvfLD2TTqG.nuzoD1jYzq.ofLqC0LkrG.nJKXntLoC2vfz3C.nZm3odq5B0vktvLq.yNv0Dg9UlcbHlcbPBNb1DcWGDgv4DgfYzweSifTYB2XLpsjTzw51iL0.66Y07jEh7j2065oGioUSVoYwToUZToYeUoYALa.yMv0D2vLBG.zhmTy29TCg9ZzxjFx2zVB3rLCG.7yYm7j28ioYYQoU2Ga.7j2r64U1ioYKKEYNGa.y3vYCMvUDenVBg9Y.nJmXmdaWohfNrvrbCW.zhmTy29TCg9ZzxiTlxnT.zhmTy29TCg9ZzxjFx3nLBMq.67o064k06RIWia.y3vYCMvUDa.z2HVC3q.rxnJyxbL.zw5K.DMfSDwu.zM9JDxm.zhmTy29UDhjVBcbKCY1JB21WB3nLCG.y29UDgfPBNm.rw50zxi.BMf0AxzLrxzLBNq.ndy2otC3nu14A3HHyW.mtzwyNHtyK8.zgL2.DgfYz2v0.ChjPBwfYEq.mJiWmZmYuwHPA1PQ.mJu0otmZnfHhB2XlvG.A2v5.y2XVC2vZDa.67o064k06RIW.7ksr7kEaia.mu5lvMTrtq.ChjLDMvUDerLzMf1Bhq.zhmTy29TCg9ZzxjFx2LUChv0.y3vYCMvUDfrHCMDLDa.zxnJ".split(".");
14
+ return t = function() {
15
+ return e;
16
+ }, t();
17
+ }
18
+ import { Kbd as n } from "../../primitives/Kbd2.js";
19
+ import { Tooltip as r } from "../../primitives/Tooltip2.js";
20
+ function i(e, n) {
21
+ e -= 260;
22
+ let r = t(), a = r[e];
23
+ i.QAvxvB === void 0 && (i.eHaljV = function(e) {
24
+ let t = "", n = "";
25
+ for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
26
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
27
+ return decodeURIComponent(n);
28
+ }, i.yTorLt = {}, i.QAvxvB = !0);
29
+ let o = r[0];
30
+ i.VDJefR !== o && (i.yTorLt = {}, i.VDJefR = o);
31
+ let s = i.yTorLt[e];
32
+ return s === void 0 ? (a = i.eHaljV(a), i.yTorLt[e] = a) : a = s, a;
33
+ }
34
+ import { Box as a, Inline as o, Stack as s } from "../../primitives/Layout2.js";
35
+ import { useControllableState as c } from "../../hooks/useControllableState.js";
36
+ import { Button as l, Textarea as u, cx as d } from "../../primitives/index.js";
37
+ /* empty css */
38
+ import { useRef as f } from "react";
39
+ import { ArrowUp as p, Plus as m, Square as h } from "lucide-react";
40
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
41
+ function y({ value: t, defaultValue: y = "", onValueChange: b, onSubmit: x, placeholder: S = e(279), disabled: C, pending: w, onStop: T, onAttach: E, attachLabel: D = e(282), tools: O, actions: k, attachments: A, footer: j, maxRows: M, size: N = "md", autoFocus: P, name: F, "aria-label": I = e(270), className: L }) {
42
+ let R = e, [z, B] = c(t, y, b), V = f(null), H = !C && !w && z.trim() !== "", U = N === "sm", W = () => {
43
+ H && (x?.(z), B(""));
44
+ }, G = (e) => {
45
+ let t = i;
46
+ e[t(298)].isComposing || (e.key === t(297) && !e[t(269)] ? (e.preventDefault(), W()) : e[t(260)] === t(291) && w && T?.());
47
+ }, K = (e) => {
48
+ let t = i, n = e[t(302)];
49
+ !C && e[t(267)][t(296)](n) && (n[t(261)](t(278)) || (e[t(265)](), V[t(289)]?.[t(294)]()));
50
+ }, q = U ? "sm" : "md", J = _(u, {
51
+ ref: V,
52
+ className: R(266),
53
+ bare: !0,
54
+ autoResize: !0,
55
+ maxRows: M ?? (U ? 4 : 8),
56
+ value: z,
57
+ onChange: (e) => B(e[R(302)][R(293)]),
58
+ onKeyDown: G,
59
+ placeholder: S,
60
+ disabled: C,
61
+ autoFocus: P,
62
+ name: F,
63
+ "aria-label": I
64
+ }), Y = E && _(l, {
65
+ variant: R(290),
66
+ size: q,
67
+ iconOnly: !0,
68
+ icon: _(m, {}),
69
+ "aria-label": D,
70
+ onClick: E,
71
+ disabled: C
72
+ }), X = w ? _(r, {
73
+ content: v(g, { children: [R(263), _(n, {
74
+ keys: [R(268)],
75
+ size: "sm"
76
+ })] }),
77
+ children: _(l, {
78
+ className: "ds-composer__send",
79
+ variant: "primary",
80
+ size: q,
81
+ iconOnly: !0,
82
+ icon: _(h, { fill: R(284) }),
83
+ "aria-label": R(283),
84
+ onClick: T
85
+ })
86
+ }) : _(r, {
87
+ content: v(g, { children: [R(288), _(n, {
88
+ keys: [R(272)],
89
+ size: "sm"
90
+ })] }),
91
+ children: _(l, {
92
+ className: R(287),
93
+ variant: R(303),
94
+ size: q,
95
+ iconOnly: !0,
96
+ icon: _(p, {}),
97
+ "aria-label": R(262),
98
+ disabled: !H,
99
+ onClick: W
100
+ })
101
+ });
102
+ return v("div", {
103
+ className: d(R(295), U && R(286), L),
104
+ "data-disabled": C || void 0,
105
+ "data-pending": w || void 0,
106
+ onMouseDown: K,
107
+ children: [U ? _(a, {
108
+ padding: 2,
109
+ children: v(s, {
110
+ gap: 2,
111
+ children: [A, v(o, {
112
+ gap: 1,
113
+ align: R(292),
114
+ wrap: !1,
115
+ children: [
116
+ Y,
117
+ O,
118
+ J,
119
+ k,
120
+ X
121
+ ]
122
+ })]
123
+ })
124
+ }) : _(a, {
125
+ padding: 3,
126
+ children: v(s, {
127
+ gap: 3,
128
+ children: [
129
+ A,
130
+ J,
131
+ v(o, {
132
+ gap: 2,
133
+ justify: R(280),
134
+ wrap: !1,
135
+ children: [v(o, {
136
+ gap: 2,
137
+ wrap: !1,
138
+ children: [Y, O]
139
+ }), v(o, {
140
+ gap: 1,
141
+ wrap: !1,
142
+ children: [k, X]
143
+ })]
144
+ })
145
+ ]
146
+ })
147
+ }), j && _(R(301), {
148
+ className: R(281),
149
+ children: j
150
+ })]
151
+ });
152
+ }
153
+ export { y as ChatComposer };
@@ -0,0 +1,93 @@
1
+ "use client";
2
+ const e = a;
3
+ (function(e, t) {
4
+ let n = a, r = e();
5
+ for (;;) try {
6
+ if (parseInt(n(471)) / 1 + -parseInt(n(463)) / 2 + parseInt(n(450)) / 3 + parseInt(n(446)) / 4 + parseInt(n(462)) / 5 + -parseInt(n(470)) / 6 * (parseInt(n(452)) / 7) + parseInt(n(465)) / 8 * (-parseInt(n(472)) / 9) == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(i, 960925);
12
+ import { CopyButton as t } from "../../primitives/CopyButton2.js";
13
+ import { cx as n } from "../../primitives/index.js";
14
+ import { tokenize as r } from "./highlight.js";
15
+ function i() {
16
+ let e = /* @__PURE__ */ "zhmTy29Kzv9FDgL0Bgu.nJzmq3nwvKC.mta0ndiWmgvdz2XPCa.mtuZvuzcAgLJ.zhmTy29Kzv9FBw9Yzq.zhmTy29Kzs0Ty29TBwfUza.BwfW.yMfZAa.oti4odK2swL6yM1n.zhmTy29Kzv9FAgvHza.y29Kzq.DhLWzq.mtq0nZCZn2jVz2fpwa.zhmTy29Kzv9FAw5SAw5L.mZyXnZeXyxHxuM9k.zhmTy29Kzv9Fz3v0DgvY.7l2u65oCioUnLcdRS7tQUlaGWRCG.zhmTy29Kzv9FChjLigrZlxnJCM9SBa.ChjL.zgL2.yNv0Dg9U.Dgv4Da.zNjVBq.C3bSAxq.odm0mZCWnu5qCLfcrW.mJm3mdi5nfvUrLDoqW.BgvUz3rO.mZm1nJu2tvfryvjQ.CMvWBgfJzq.zhmTy29Kzq.C3bHBG".split(".");
17
+ return i = function() {
18
+ return e;
19
+ }, i();
20
+ }
21
+ /* empty css */
22
+ function a(e, t) {
23
+ e -= 444;
24
+ let n = i(), r = n[e];
25
+ a.TUKGCh === void 0 && (a.QkwDjE = function(e) {
26
+ let t = "", n = "";
27
+ for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
28
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
29
+ return decodeURIComponent(n);
30
+ }, a.AsHpyq = {}, a.TUKGCh = !0);
31
+ let o = n[0];
32
+ a.tAbTlm !== o && (a.AsHpyq = {}, a.tAbTlm = o);
33
+ let s = a.AsHpyq[e];
34
+ return s === void 0 ? (r = a.QkwDjE(r), a.AsHpyq[e] = r) : r = s, r;
35
+ }
36
+ import { useMemo as o, useState as s } from "react";
37
+ import { ChevronDown as c } from "lucide-react";
38
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
39
+ function d({ code: e, language: i = "tsx", title: d, command: p, showLineNumbers: m, maxHeight: h, copyable: g = !0, className: _ }) {
40
+ let v = a, y = e[v(466)](/\n+$/, ""), b = o(() => r(y, p ? v(445) : i), [
41
+ y,
42
+ i,
43
+ p
44
+ ]), [x, S] = s(!1), C = y[v(461)]("\n")[v(464)], w = !!h && C * 22 > h;
45
+ return p ? u("div", {
46
+ className: n(v(467), v(474), _),
47
+ children: [
48
+ l(v(468), {
49
+ className: "ds-code__prompt",
50
+ "aria-hidden": !0,
51
+ children: "$"
52
+ }),
53
+ l("code", {
54
+ className: v(451),
55
+ children: f(b)
56
+ }),
57
+ g && l(t, { value: y })
58
+ ]
59
+ }) : u(v(457), {
60
+ className: n(v(467), _),
61
+ "data-collapsed": w && !x || void 0,
62
+ children: [
63
+ (d || g) && u("div", {
64
+ className: v(447),
65
+ children: [l(v(468), {
66
+ className: v(469),
67
+ children: d
68
+ }), g && l(t, { value: y })]
69
+ }),
70
+ u(v(456), {
71
+ className: v(455),
72
+ style: w && !x ? { maxHeight: h } : void 0,
73
+ children: [m && l("span", {
74
+ className: v(453),
75
+ "aria-hidden": !0,
76
+ children: Array[v(460)]({ length: C }, (e, t) => l(v(468), { children: t + 1 }, t))
77
+ }), l(v(448), { children: f(b) })]
78
+ }),
79
+ w && u(v(458), {
80
+ type: v(458),
81
+ className: v(473),
82
+ "data-expanded": x || void 0,
83
+ onClick: () => S((e) => !e),
84
+ children: [x ? "접기" : v(454) + C + "줄", l(c, {})]
85
+ })
86
+ ]
87
+ });
88
+ }
89
+ var f = (t) => t[e(444)]((t, n) => t[e(449)] === "plain" ? t[e(459)] : l("span", {
90
+ className: "ds-code__t-" + t[e(449)],
91
+ children: t.text
92
+ }, n));
93
+ export { d as CodeBlock };
@@ -0,0 +1,114 @@
1
+ "use client";
2
+ function e() {
3
+ let t = [
4
+ "mZi1mZiYmuTAtKrhqq",
5
+ "BNvTyMvY",
6
+ "BgvUz3rO",
7
+ "mJG4mNDkELHmDq",
8
+ "Dgv4Da",
9
+ "C3rYAw5N",
10
+ "mJqYnJbkCuz1ueq",
11
+ "zxHLyW",
12
+ "mJy0mtu3mKnSC1L3Aq",
13
+ "A2v5D29Yza",
14
+ "DgfN",
15
+ "mtm2mdu0mMnezfrhrq",
16
+ "yxr0CG",
17
+ "mw9lsNfUua",
18
+ "ote3v2ryzNjx",
19
+ "BgfZDeLUzgv4",
20
+ "y29TBwvUDa",
21
+ "mZm2ofbAB2Lfva",
22
+ "CgXHAw4",
23
+ "mtaYndeWohDWrg10yG",
24
+ "mtvZD213v2G",
25
+ "ChvZAa",
26
+ "mZi2ndC4uhjJENPT",
27
+ "ChvUy3q",
28
+ "ChjVCa"
29
+ ];
30
+ return e = function() {
31
+ return t;
32
+ }, e();
33
+ }
34
+ const t = r;
35
+ (function(e, t) {
36
+ let n = r, i = e();
37
+ for (;;) try {
38
+ if (-parseInt(n(372)) / 1 * (-parseInt(n(353)) / 2) + -parseInt(n(370)) / 3 + parseInt(n(367)) / 4 + -parseInt(n(354)) / 5 * (-parseInt(n(356)) / 6) + parseInt(n(373)) / 7 * (-parseInt(n(351)) / 8) + parseInt(n(359)) / 9 + parseInt(n(365)) / 10 * (-parseInt(n(362)) / 11) == t) break;
39
+ i.push(i.shift());
40
+ } catch {
41
+ i.push(i.shift());
42
+ }
43
+ })(e, 552878);
44
+ var n = {
45
+ tsx: [
46
+ [t(375), /\/\/[^\n]*|\/\*[\s\S]*?\*\//y],
47
+ [t(364), /'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|`(?:\\.|[^`\\])*`/y],
48
+ [t(369), /<\/?[A-Za-z][\w.]*|\/?>/y],
49
+ [t(368), /\b(?:import|from|export|default|const|let|var|function|return|if|else|for|of|in|new|type|interface|extends|as|async|await|true|false|null|undefined|typeof|keyof)\b/y],
50
+ ["number", /\b\d[\d_.]*\b/y],
51
+ [t(371), /\b[a-zA-Z-]+(?==)/y],
52
+ ["fn", /\b[a-zA-Z_]\w*(?=\()/y],
53
+ [t(357), /[{}()[\];,.:?=+\-*&|!<>]/y]
54
+ ],
55
+ css: [
56
+ ["comment", /\/\*[\s\S]*?\*\//y],
57
+ [t(364), /'[^']*'|"[^"]*"/y],
58
+ [t(358), /--?[a-zA-Z][\w-]*(?=\s*:)/y],
59
+ [t(369), /[.#]?[a-zA-Z][\w-]*(?=[^{;]*\{)/y],
60
+ [t(360), /\b\d[\d.]*(?:px|rem|em|%|ms|s|deg|fr)?\b|#[0-9a-fA-F]{3,8}\b/y],
61
+ ["fn", /\b[a-z-]+(?=\()/y],
62
+ ["punct", /[{}();:,]/y]
63
+ ],
64
+ bash: [
65
+ ["comment", /#[^\n]*/y],
66
+ [t(364), /'[^']*'|"[^"]*"/y],
67
+ [t(368), /\b(?:npm|npx|pnpm|yarn|git|cd)\b/y],
68
+ [t(371), /\s--?[\w-]+/y]
69
+ ]
70
+ };
71
+ function r(t, n) {
72
+ t -= 351;
73
+ let i = e(), a = i[t];
74
+ r.JEKwER === void 0 && (r.FZZxSD = function(e) {
75
+ let t = "", n = "";
76
+ for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
77
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
78
+ return decodeURIComponent(n);
79
+ }, r.uYIfsY = {}, r.JEKwER = !0);
80
+ let o = i[0];
81
+ r.mpHpcs !== o && (r.uYIfsY = {}, r.mpHpcs = o);
82
+ let s = r.uYIfsY[t];
83
+ return s === void 0 ? (a = r.FZZxSD(a), r.uYIfsY[t] = a) : a = s, a;
84
+ }
85
+ function i(e, r) {
86
+ let i = t;
87
+ if (r === i(363)) return [{
88
+ type: i(352),
89
+ text: e
90
+ }];
91
+ let a = n[r], o = [], s = "", c = 0;
92
+ L: for (; c < e[i(361)];) {
93
+ for (let [t, n] of a) {
94
+ n[i(374)] = c;
95
+ let r = n[i(366)](e);
96
+ if (r && r[0][i(361)]) {
97
+ s && o[i(355)]({
98
+ type: i(352),
99
+ text: s
100
+ }), s = "", o[i(355)]({
101
+ type: t,
102
+ text: r[0]
103
+ }), c += r[0][i(361)];
104
+ continue L;
105
+ }
106
+ }
107
+ s += e[c++];
108
+ }
109
+ return s && o.push({
110
+ type: "plain",
111
+ text: s
112
+ }), o;
113
+ }
114
+ export { i as tokenize };