@iamfiro/design 0.3.0 → 0.3.2
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.
- package/agents/avatar/AGENTS.md +29 -1
- package/agents/tooltip/AGENTS.md +1 -1
- package/lib/components/Accordion/Accordion2.js +76 -76
- package/lib/components/ActionBar/ActionBar2.js +43 -43
- package/lib/components/Alert/Alert2.js +46 -46
- package/lib/components/AppShell/AppShell2.js +58 -58
- package/lib/components/AreaChart/AreaChart.js +39 -40
- package/lib/components/BarChart/BarChart2.js +169 -169
- package/lib/components/BarList/BarList2.js +99 -99
- package/lib/components/Breadcrumb/Breadcrumb2.js +65 -66
- package/lib/components/Calendar/Calendar2.js +172 -171
- package/lib/components/Calendar/DatePicker2.js +101 -102
- package/lib/components/Calendar/date.js +71 -71
- package/lib/components/Card/Card2.js +55 -56
- package/lib/components/CardFrame/CardFrame2.js +52 -52
- package/lib/components/Chart/ChartParts.js +90 -90
- package/lib/components/Chart/chart2.js +52 -52
- package/lib/components/Chart/useChartInteraction.js +44 -44
- package/lib/components/ChatBubble/ChatBubble2.js +112 -112
- package/lib/components/ChatBubble/formatChatTime.js +44 -42
- package/lib/components/ChatComposer/ChatComposer2.js +94 -94
- package/lib/components/CodeBlock/CodeBlock2.js +66 -66
- package/lib/components/CodeBlock/highlight.js +67 -70
- package/lib/components/ColorPicker/ColorPicker2.js +404 -405
- package/lib/components/ColorPicker/color.js +81 -81
- package/lib/components/ColorPicker/presets.js +44 -43
- package/lib/components/Combobox/Combobox2.js +128 -128
- package/lib/components/CommandMenu/CommandMenu.js +137 -137
- package/lib/components/Comment/Comment2.js +55 -80
- package/lib/components/ContextMenu/ContextMenu2.js +93 -94
- package/lib/components/DataGrid/DataGrid2.js +1181 -1180
- package/lib/components/DataGrid/GridPopover.js +112 -112
- package/lib/components/DataGrid/anchor.js +23 -25
- package/lib/components/DataGrid/model.js +274 -275
- package/lib/components/DataGrid/panels.js +423 -423
- package/lib/components/DataGrid/typeMeta.js +21 -22
- package/lib/components/DataGrid/types.js +38 -37
- package/lib/components/DescriptionList/DescriptionList2.js +107 -107
- package/lib/components/Dialog/AlertDialog.js +53 -53
- package/lib/components/Dialog/Dialog2.js +71 -70
- package/lib/components/Dialog/modal.js +59 -58
- package/lib/components/Drawer/Drawer2.js +123 -124
- package/lib/components/DropdownMenu/DropdownMenu2.js +198 -200
- package/lib/components/DropdownMenu/menuCore.js +46 -47
- package/lib/components/Dropzone/Dropzone2.js +77 -77
- package/lib/components/EmptyState/EmptyState2.js +57 -56
- package/lib/components/FileChip/FileChip2.js +71 -71
- package/lib/components/FileUpload/FileUpload.js +119 -119
- package/lib/components/FilterChips/FilterChips2.js +61 -61
- package/lib/components/FunnelChart/FunnelChart2.js +141 -141
- package/lib/components/FunnelChart/funnel.js +51 -51
- package/lib/components/Highlight/Highlight2.js +54 -54
- package/lib/components/HoverCard/HoverCard.js +108 -83
- package/lib/components/InlineDiff/InlineDiff2.js +126 -126
- package/lib/components/InlineDiff/diff.js +82 -82
- package/lib/components/InlineDiff/useDiffReview.js +62 -60
- package/lib/components/Kanban/Kanban2.js +382 -382
- package/lib/components/Kanban/KanbanCard.js +92 -92
- package/lib/components/Kanban/move.js +45 -49
- package/lib/components/LineChart/LineChart2.js +207 -207
- package/lib/components/List/List2.js +71 -71
- package/lib/components/Listbox/Listbox2.js +115 -115
- package/lib/components/Marker/Marker2.js +67 -60
- package/lib/components/Menubar/Menubar2.js +130 -133
- package/lib/components/MultiSelect/MultiSelect2.js +104 -104
- package/lib/components/NavigationMenu/NavigationMenu2.js +261 -262
- package/lib/components/NoticeStack/NoticeStack2.js +105 -105
- package/lib/components/NumberStepper/NumberStepper2.js +67 -67
- package/lib/components/OtpInput/OtpInput2.js +66 -67
- package/lib/components/Pagination/Pagination2.js +90 -90
- package/lib/components/Pagination/paginationRange.js +24 -24
- package/lib/components/PhoneInput/PhoneInput.js +74 -74
- package/lib/components/PieChart/PieChart2.js +119 -119
- package/lib/components/PieChart/arc.js +63 -42
- package/lib/components/PieChart/useArcTween.js +56 -54
- package/lib/components/Popover/Popover2.js +61 -61
- package/lib/components/ProgressTracker/ProgressTracker2.js +127 -127
- package/lib/components/Rating/Rating2.js +81 -81
- package/lib/components/Resizable/Resizable2.js +112 -110
- package/lib/components/Resizable/layout.js +50 -50
- package/lib/components/ScaledPreview/ScaledPreview2.js +49 -50
- package/lib/components/ScatterChart/ScatterChart2.js +226 -227
- package/lib/components/ScatterChart/scatter.js +59 -57
- package/lib/components/ScrollArea/ScrollArea2.js +112 -112
- package/lib/components/Select/Select2.js +79 -79
- package/lib/components/Sidebar/Sidebar2.js +79 -79
- package/lib/components/Skeleton/Skeleton2.js +68 -68
- package/lib/components/Slider/Slider2.js +78 -77
- package/lib/components/SocialLoginButton/SocialLoginButton.js +65 -66
- package/lib/components/SparkChart/SparkChart2.js +146 -145
- package/lib/components/SparkChart/spark.js +41 -67
- package/lib/components/Sparkbar/Sparkbar2.js +61 -60
- package/lib/components/SplitView/SplitView2.js +53 -53
- package/lib/components/Stat/Stat2.js +94 -94
- package/lib/components/StepList/StepList2.js +70 -70
- package/lib/components/Table/Table2.js +63 -63
- package/lib/components/Tabs/Tabs2.js +70 -70
- package/lib/components/TagInput/TagInput2.js +236 -239
- package/lib/components/TimePicker/TimePicker2.js +231 -232
- package/lib/components/TimePicker/time.js +63 -65
- package/lib/components/Timeline/Timeline2.js +167 -167
- package/lib/components/Timeline/scale.js +55 -55
- package/lib/components/Toast/Toaster.js +151 -152
- package/lib/components/Toast/store.js +90 -87
- package/lib/components/ToggleGroup/ToggleGroup2.js +91 -91
- package/lib/components/Toolbar/Toolbar2.js +145 -145
- package/lib/components/Tracker/Tracker2.js +76 -76
- package/lib/components/TreeDiagram/TreeDiagram2.js +112 -111
- package/lib/components/TreeView/TreeView2.js +124 -124
- package/lib/hooks/timing.js +30 -29
- package/lib/hooks/useControllableState.js +37 -36
- package/lib/hooks/useCountdown.js +56 -59
- package/lib/hooks/useDigitInput.js +52 -78
- package/lib/hooks/useDismiss.js +58 -57
- package/lib/hooks/useElapsed.js +54 -54
- package/lib/hooks/useFloating.js +26 -26
- package/lib/hooks/useFocusTrap.js +42 -42
- package/lib/hooks/usePresence.js +49 -48
- package/lib/hooks/usePressToOpen.js +42 -41
- package/lib/hooks/useScrollLock.js +45 -44
- package/lib/hooks/useSelection.js +45 -39
- package/lib/index.js +71 -71
- package/lib/primitives/AspectRatio2.js +60 -60
- package/lib/primitives/BrandIcon.js +161 -161
- package/lib/primitives/ColorDot2.js +42 -45
- package/lib/primitives/CopyButton2.js +57 -56
- package/lib/primitives/CountBadge2.js +55 -51
- package/lib/primitives/Countdown2.js +41 -46
- package/lib/primitives/Delta2.js +36 -36
- package/lib/primitives/Elapsed.js +49 -49
- package/lib/primitives/FileIcon2.js +96 -96
- package/lib/primitives/Flag2.js +135 -135
- package/lib/primitives/IconStack2.js +38 -60
- package/lib/primitives/IconTile2.js +28 -29
- package/lib/primitives/Kbd2.js +50 -50
- package/lib/primitives/Layout2.js +71 -71
- package/lib/primitives/Link2.js +32 -31
- package/lib/primitives/MaskedText2.js +49 -74
- package/lib/primitives/Progress2.js +65 -66
- package/lib/primitives/RelativeTime.js +58 -57
- package/lib/primitives/SearchInput2.js +65 -65
- package/lib/primitives/SelectorButton2.js +74 -73
- package/lib/primitives/Spinner2.js +50 -50
- package/lib/primitives/StatusIcon2.js +68 -68
- package/lib/primitives/Swatch2.js +59 -55
- package/lib/primitives/Tooltip2.js +81 -81
- package/lib/primitives/Typography2.js +53 -53
- package/lib/primitives/formatCountdown.js +21 -22
- package/lib/primitives/formatElapsed.js +43 -42
- package/lib/primitives/formatRelativeTime.js +50 -50
- package/lib/primitives/hotkey.js +82 -82
- package/lib/primitives/index.js +193 -174
- package/lib/primitives/maskValue.js +28 -28
- package/lib/style.css +1 -1
- package/lib/types/primitives/index.d.ts +6 -2
- package/package.json +1 -1
|
@@ -1,71 +1,59 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
(function(e,
|
|
3
|
-
let
|
|
2
|
+
(function(e, t) {
|
|
3
|
+
let n = d, r = e();
|
|
4
4
|
for (;;) try {
|
|
5
|
-
if (parseInt(
|
|
6
|
-
|
|
5
|
+
if (parseInt(n(307)) / 1 + -parseInt(n(314)) / 2 * (-parseInt(n(319)) / 3) + -parseInt(n(310)) / 4 + -parseInt(n(315)) / 5 * (parseInt(n(320)) / 6) + parseInt(n(316)) / 7 * (-parseInt(n(306)) / 8) + parseInt(n(311)) / 9 * (parseInt(n(318)) / 10) + parseInt(n(309)) / 11 == t) break;
|
|
6
|
+
r.push(r.shift());
|
|
7
7
|
} catch {
|
|
8
|
-
|
|
8
|
+
r.push(r.shift());
|
|
9
9
|
}
|
|
10
|
-
})(
|
|
10
|
+
})(t, 788010);
|
|
11
11
|
import { useControllableState as e } from "../../hooks/useControllableState.js";
|
|
12
|
-
function t(
|
|
13
|
-
e -= 283;
|
|
14
|
-
let i = n(), a = i[e];
|
|
15
|
-
t.nMTRgq === void 0 && (t.Aumktn = function(e) {
|
|
16
|
-
let t = "", n = "";
|
|
17
|
-
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);
|
|
18
|
-
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
19
|
-
return decodeURIComponent(n);
|
|
20
|
-
}, t.OPMeUP = {}, t.nMTRgq = !0);
|
|
21
|
-
let o = i[0];
|
|
22
|
-
t.rOvKmH !== o && (t.OPMeUP = {}, t.rOvKmH = o);
|
|
23
|
-
let s = t.OPMeUP[e];
|
|
24
|
-
return s === void 0 ? (a = t.Aumktn(a), t.OPMeUP[e] = a) : a = s, a;
|
|
25
|
-
}
|
|
26
|
-
function n() {
|
|
12
|
+
function t() {
|
|
27
13
|
let e = [
|
|
28
|
-
"
|
|
14
|
+
"nJy1otK2EwjPB0fR",
|
|
15
|
+
"odCWm09pu1zkrG",
|
|
16
|
+
"CMvQzwn0zwq",
|
|
29
17
|
"BgvUz3rO",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
18
|
+
"nfDdD0HVuW",
|
|
19
|
+
"mti0mZi3mgvmC0Dxza",
|
|
20
|
+
"mJfdALvlsvq",
|
|
21
|
+
"zMLSDgvY",
|
|
22
|
+
"nda0mgziqMvJBq",
|
|
23
|
+
"ntG4mZuXAhLnyM1v",
|
|
24
|
+
"mJrurvf2u1G",
|
|
34
25
|
"Aw5KzxHpzG",
|
|
26
|
+
"CgvUzgLUzW",
|
|
35
27
|
"Aw5JBhvKzxm",
|
|
36
|
-
"
|
|
28
|
+
"odm1mtjQruPbyuS",
|
|
29
|
+
"mJaZnJa1DeDUC3bK",
|
|
37
30
|
"ywnJzxb0zwq",
|
|
38
|
-
"
|
|
39
|
-
"mteYndaYnLHcsMD4qW",
|
|
40
|
-
"CMvQzwn0zwq",
|
|
41
|
-
"nZG2mda2qvbtAwPb",
|
|
42
|
-
"mZq5nZLsDwTjDem",
|
|
43
|
-
"mtq1nZu5mM93runzAq"
|
|
31
|
+
"mta5mZmYodvlAMvjqxq"
|
|
44
32
|
];
|
|
45
|
-
return
|
|
33
|
+
return t = function() {
|
|
46
34
|
return e;
|
|
47
|
-
},
|
|
35
|
+
}, t();
|
|
48
36
|
}
|
|
49
|
-
import { applyDiffDecisions as
|
|
50
|
-
import { useMemo as
|
|
51
|
-
var
|
|
52
|
-
function
|
|
53
|
-
let _ =
|
|
54
|
-
|
|
55
|
-
|
|
37
|
+
import { applyDiffDecisions as n, diffWords as r, listDiffChanges as i, resolveDiffSegments as a } from "./diff.js";
|
|
38
|
+
import { useMemo as o, useState as s } from "react";
|
|
39
|
+
var c = {}, l = (e, t) => (e % t + t) % t;
|
|
40
|
+
function u({ changes: t, before: u, after: f, decisions: p, defaultDecisions: m = c, onDecisionsChange: h, advance: g = !0 } = {}) {
|
|
41
|
+
let _ = d, v = o(() => a(t ?? (u != null || f != null ? r(u ?? "", f ?? "") : [])), [
|
|
42
|
+
t,
|
|
43
|
+
u,
|
|
56
44
|
f
|
|
57
|
-
]), y =
|
|
45
|
+
]), y = o(() => i(v), [v]), b = y.map((e) => e.id), [x, S] = e(p, m, h), [C, w] = s(null), [T, E] = s(0), D = C != null && b[_(323)](C) ? C : null, O = (e) => b[_(317)]((t) => !e[t]), k = O(x), A = (e) => {
|
|
58
46
|
w(e), E((e) => e + 1);
|
|
59
47
|
}, j = (e, t, n) => {
|
|
60
48
|
let r = _;
|
|
61
|
-
if (!b[r(
|
|
62
|
-
let i = e == null ? t > 0 ? -1 : b[r(
|
|
63
|
-
for (let e = 1; e <= b[r(
|
|
64
|
-
let a = b[
|
|
65
|
-
if (n
|
|
49
|
+
if (!b[r(313)] || !n[r(313)]) return;
|
|
50
|
+
let i = e == null ? t > 0 ? -1 : b[r(313)] : b[r(321)](e);
|
|
51
|
+
for (let e = 1; e <= b[r(313)]; e++) {
|
|
52
|
+
let a = b[l(i + t * e, b[r(313)])];
|
|
53
|
+
if (n[r(323)](a)) return a;
|
|
66
54
|
}
|
|
67
55
|
}, M = (e) => {
|
|
68
|
-
let t = j(D, e, k
|
|
56
|
+
let t = j(D, e, k.length ? k : b);
|
|
69
57
|
t != null && A(t);
|
|
70
58
|
}, N = (e, t) => {
|
|
71
59
|
let n = { ...x };
|
|
@@ -73,7 +61,7 @@ function d({ changes: n, before: d, after: f, decisions: p, defaultDecisions: m
|
|
|
73
61
|
let r = j(e, 1, O(n));
|
|
74
62
|
r != null && A(r);
|
|
75
63
|
}, P = (e) => {
|
|
76
|
-
if (!k[_(
|
|
64
|
+
if (!k[_(313)]) return;
|
|
77
65
|
let t = { ...x };
|
|
78
66
|
for (let n of k) t[n] = e;
|
|
79
67
|
S(t);
|
|
@@ -82,28 +70,42 @@ function d({ changes: n, before: d, after: f, decisions: p, defaultDecisions: m
|
|
|
82
70
|
segments: v,
|
|
83
71
|
changes: y,
|
|
84
72
|
decisions: x,
|
|
85
|
-
remaining: k
|
|
73
|
+
remaining: k.length,
|
|
86
74
|
total: b.length,
|
|
87
75
|
current: D,
|
|
88
|
-
currentIndex: D == null ? -1 : b[_(
|
|
89
|
-
text:
|
|
76
|
+
currentIndex: D == null ? -1 : b[_(321)](D),
|
|
77
|
+
text: n(v, x),
|
|
90
78
|
navToken: T,
|
|
91
|
-
getDecision: (e) => x[e] ??
|
|
79
|
+
getDecision: (e) => x[e] ?? _(322),
|
|
92
80
|
setCurrent: w,
|
|
93
81
|
goTo: A,
|
|
94
82
|
next: () => M(1),
|
|
95
83
|
prev: () => M(-1),
|
|
96
84
|
decide: N,
|
|
97
85
|
accept: (e = D ?? void 0) => {
|
|
98
|
-
e != null && N(e,
|
|
86
|
+
e != null && N(e, _(308));
|
|
99
87
|
},
|
|
100
88
|
reject: (e = D ?? void 0) => {
|
|
101
|
-
e != null && N(e, _(
|
|
89
|
+
e != null && N(e, _(312));
|
|
102
90
|
},
|
|
103
|
-
acceptAll: () => P(
|
|
104
|
-
rejectAll: () => P(_(
|
|
91
|
+
acceptAll: () => P("accepted"),
|
|
92
|
+
rejectAll: () => P(_(312)),
|
|
105
93
|
setDecisions: S,
|
|
106
|
-
reset: () => S(
|
|
94
|
+
reset: () => S(c)
|
|
107
95
|
};
|
|
108
96
|
}
|
|
109
|
-
|
|
97
|
+
function d(e, n) {
|
|
98
|
+
e -= 306;
|
|
99
|
+
let r = t(), i = r[e];
|
|
100
|
+
d.YecYlq === void 0 && (d.yTLIQI = function(e) {
|
|
101
|
+
let t = "", n = "";
|
|
102
|
+
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);
|
|
103
|
+
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
104
|
+
return decodeURIComponent(n);
|
|
105
|
+
}, d.BmNOIh = {}, d.YecYlq = !0);
|
|
106
|
+
let a = r[0];
|
|
107
|
+
d.PuXsxQ !== a && (d.BmNOIh = {}, d.PuXsxQ = a);
|
|
108
|
+
let o = d.BmNOIh[e];
|
|
109
|
+
return o === void 0 ? (i = d.yTLIQI(i), d.BmNOIh[e] = i) : i = o, i;
|
|
110
|
+
}
|
|
111
|
+
export { u as useDiffReview };
|