@brett_lamy/ui 5.15.1 → 5.16.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.
- package/dist/components/debug-toolbar.d.ts +13 -0
- package/dist/components/debug-toolbar.d.ts.map +1 -0
- package/dist/components/debug-toolbar.js +85 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -15
- package/package.json +2 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type DebugToolbarAction = 'continue' | 'step-over' | 'step-into' | 'step-out' | 'step-back' | 'reverse-continue' | 'restart' | 'stop';
|
|
2
|
+
export interface DebugToolbarProps {
|
|
3
|
+
/** Called with the action represented by the pressed control. */
|
|
4
|
+
onAction: (action: DebugToolbarAction) => void;
|
|
5
|
+
/** Actions unavailable in the current debugger state. */
|
|
6
|
+
disabledActions?: readonly DebugToolbarAction[];
|
|
7
|
+
/** `compact` fits narrow panes while keeping every control visible. */
|
|
8
|
+
size?: 'default' | 'compact';
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/** A compact debugger control strip using the VS Code Codicon action glyphs. */
|
|
12
|
+
export declare function DebugToolbar({ onAction, disabledActions, size, className }: DebugToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=debug-toolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-toolbar.d.ts","sourceRoot":"","sources":["../../src/components/debug-toolbar.tsx"],"names":[],"mappings":"AAWA,MAAM,MAAM,kBAAkB,GAC1B,UAAU,GACV,WAAW,GACX,WAAW,GACX,UAAU,GACV,WAAW,GACX,kBAAkB,GAClB,SAAS,GACT,MAAM,CAAC;AAEX,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC/C,yDAAyD;IACzD,eAAe,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAChD,uEAAuE;IACvE,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAaD,gFAAgF;AAChF,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,eAAoB,EAAE,IAAgB,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CAoC9G"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/debug-toolbar.tsx
|
|
6
|
+
var i = "text-[#75beff]", a = "text-[#89d185]", o = "text-[#f48771]", s = "text-[#5c5c5c]", c = "border-[#303030] bg-[#181818]", l = [
|
|
7
|
+
{
|
|
8
|
+
action: "continue",
|
|
9
|
+
label: "Continue",
|
|
10
|
+
icon: "debug-continue",
|
|
11
|
+
color: i
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
action: "step-over",
|
|
15
|
+
label: "Step over",
|
|
16
|
+
icon: "debug-step-over",
|
|
17
|
+
color: i
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
action: "step-into",
|
|
21
|
+
label: "Step into",
|
|
22
|
+
icon: "debug-step-into",
|
|
23
|
+
color: i
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
action: "step-out",
|
|
27
|
+
label: "Step out",
|
|
28
|
+
icon: "debug-step-out",
|
|
29
|
+
color: i
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
action: "step-back",
|
|
33
|
+
label: "Step back",
|
|
34
|
+
icon: "debug-step-back",
|
|
35
|
+
color: i
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
action: "reverse-continue",
|
|
39
|
+
label: "Reverse continue",
|
|
40
|
+
icon: "debug-reverse-continue",
|
|
41
|
+
color: i
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
action: "restart",
|
|
45
|
+
label: "Restart",
|
|
46
|
+
icon: "debug-restart",
|
|
47
|
+
color: a
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
action: "stop",
|
|
51
|
+
label: "Stop",
|
|
52
|
+
icon: "debug-stop",
|
|
53
|
+
color: o
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
function u({ onAction: i, disabledActions: a = [], size: o = "default", className: u }) {
|
|
57
|
+
return /* @__PURE__ */ r("div", {
|
|
58
|
+
"data-slot": "debug-toolbar",
|
|
59
|
+
"data-size": o,
|
|
60
|
+
role: "group",
|
|
61
|
+
"aria-label": "Debugger controls",
|
|
62
|
+
className: e("inline-flex h-[52px] shrink-0 items-center rounded-card border px-3 shadow-md", c, o === "compact" && "h-11 px-2", u),
|
|
63
|
+
children: [/* @__PURE__ */ n("span", {
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
className: e("codicon codicon-gripper mr-4 w-5 shrink-0 text-center text-detail", s, o === "compact" && "mr-2 w-4 text-footnote")
|
|
66
|
+
}), /* @__PURE__ */ n("div", {
|
|
67
|
+
className: e("flex items-center gap-4", o === "compact" && "gap-1.5"),
|
|
68
|
+
children: l.map(({ action: r, label: s, icon: c, color: l }) => /* @__PURE__ */ n(t, {
|
|
69
|
+
variant: "quiet",
|
|
70
|
+
size: "icon",
|
|
71
|
+
"aria-label": s,
|
|
72
|
+
title: s,
|
|
73
|
+
isDisabled: a.includes(r),
|
|
74
|
+
onPress: () => i(r),
|
|
75
|
+
className: e("size-9 rounded-md data-hovered:bg-white/10 data-pressed:bg-white/15", o === "compact" && "size-[30px]"),
|
|
76
|
+
children: /* @__PURE__ */ n("span", {
|
|
77
|
+
"aria-hidden": "true",
|
|
78
|
+
className: e("codicon", `codicon-${c}`, l, o === "compact" ? "text-title" : "text-[24px]")
|
|
79
|
+
})
|
|
80
|
+
}, r))
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
export { u as DebugToolbar };
|