react-devbelt 0.5.0 → 0.5.1

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.
@@ -2443,10 +2443,10 @@ var ConsoleRow = memo(function ConsoleRow2({
2443
2443
  {
2444
2444
  value: String(entry.id),
2445
2445
  label: `${entry.level} ${line}`,
2446
- className: "grid cursor-default grid-cols-[3.25rem_minmax(0,1fr)_2rem_4.5rem] min-h-6 items-center gap-2 rounded-md px-2 py-1 font-mono text-[11px] text-fg data-highlighted:bg-hover-subtle data-selected:bg-accent/15",
2446
+ className: "grid cursor-default grid-cols-[3.25rem_minmax(0,1fr)_minmax(2rem,auto)_4.5rem] min-h-6 items-center gap-2 rounded-md px-2 py-1 font-mono text-[11px] text-fg data-highlighted:bg-hover-subtle data-selected:bg-accent/15",
2447
2447
  children: [
2448
2448
  /* @__PURE__ */ jsx9("span", { className: `font-semibold ${LEVEL_CLASS[entry.level]}`, children: entry.level }),
2449
- /* @__PURE__ */ jsx9("span", { className: "truncate", title: line, children: line }),
2449
+ /* @__PURE__ */ jsx9("span", { className: `truncate ${line ? "" : "text-fg-tertiary"}`, title: line, children: line || "(empty)" }),
2450
2450
  /* @__PURE__ */ jsx9("span", { className: "text-end tabular-nums", children: entry.count > 1 ? `\xD7${entry.count}` : "" }),
2451
2451
  /* @__PURE__ */ jsx9("span", { className: "text-end text-fg-secondary tabular-nums", children: new Date(entry.at).toLocaleTimeString() })
2452
2452
  ]
@@ -4794,7 +4794,8 @@ function DevGrabPicker({
4794
4794
  try {
4795
4795
  const contexts = await Promise.all(elements2.map(getElementContext));
4796
4796
  const view = elements2[0].ownerDocument.defaultView ?? window;
4797
- const header = `[viewport: ${viewportLabel} ${view.innerWidth}\xD7${view.innerHeight}, dpr ${view.devicePixelRatio}${extra}]`;
4797
+ const { pathname, search, hash } = view.location;
4798
+ const header = `[path: ${pathname}${search}${hash}, viewport: ${viewportLabel} ${view.innerWidth}\xD7${view.innerHeight}, dpr ${view.devicePixelRatio}${extra}]`;
4798
4799
  const problems = appendix?.();
4799
4800
  const body = contexts.map((c, i) => {
4800
4801
  const note = notes?.[i];
@@ -5205,6 +5206,20 @@ function grab() {
5205
5206
  // src/plugins/network/index.tsx
5206
5207
  import { NetworkIcon } from "lucide-react";
5207
5208
 
5209
+ // src/ui/primitives/middle-truncate.tsx
5210
+ import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
5211
+ function MiddleTruncate({
5212
+ text: text3,
5213
+ tail = 14,
5214
+ className = ""
5215
+ }) {
5216
+ const split = text3.length > tail * 2 ? text3.length - tail : text3.length;
5217
+ return /* @__PURE__ */ jsxs12("span", { className: `flex min-w-0 ${className}`, title: text3, children: [
5218
+ /* @__PURE__ */ jsx19("span", { className: "min-w-0 truncate", children: text3.slice(0, split) }),
5219
+ split < text3.length ? /* @__PURE__ */ jsx19("span", { className: "shrink-0 whitespace-pre", children: text3.slice(split) }) : null
5220
+ ] });
5221
+ }
5222
+
5208
5223
  // src/plugins/network/panel.tsx
5209
5224
  import {
5210
5225
  memo as memo2,
@@ -5658,7 +5673,7 @@ import "react";
5658
5673
 
5659
5674
  // ../../node_modules/.pnpm/@ui-sdk+react@0.1.0-beta.5_@types+react@19.3.0_@ui-sdk+core@0.1.0-beta.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@ui-sdk/react/dist/dialog-parts.js
5660
5675
  import * as React7 from "react";
5661
- import { jsx as jsx19 } from "react/jsx-runtime";
5676
+ import { jsx as jsx20 } from "react/jsx-runtime";
5662
5677
  var TriggerContext = React7.createContext(null);
5663
5678
  var text2 = (state3) => state3.text;
5664
5679
  function dialogParts(primitive, name, viewport2) {
@@ -5676,7 +5691,7 @@ function dialogParts(primitive, name, viewport2) {
5676
5691
  }) {
5677
5692
  const handle = usePrimitive(primitive, options);
5678
5693
  useControllerEntry(options.controller, handle);
5679
- return /* @__PURE__ */ jsx19(HandleScope, { handle, children: /* @__PURE__ */ jsx19(ContainerContext2.Provider, { value: container, children }) });
5694
+ return /* @__PURE__ */ jsx20(HandleScope, { handle, children: /* @__PURE__ */ jsx20(ContainerContext2.Provider, { value: container, children }) });
5680
5695
  }
5681
5696
  function Trigger({
5682
5697
  controller,
@@ -5704,13 +5719,13 @@ function dialogParts(primitive, name, viewport2) {
5704
5719
  disabled: !!disabled
5705
5720
  }
5706
5721
  );
5707
- return /* @__PURE__ */ jsx19(TriggerContext.Provider, { value: { shortcut }, children: /* @__PURE__ */ jsx19(
5722
+ return /* @__PURE__ */ jsx20(TriggerContext.Provider, { value: { shortcut }, children: /* @__PURE__ */ jsx20(
5708
5723
  Connected,
5709
5724
  {
5710
5725
  primitive,
5711
5726
  controller,
5712
5727
  fallback: unconnected,
5713
- children: /* @__PURE__ */ jsx19(parts6.Trigger, { ...props })
5728
+ children: /* @__PURE__ */ jsx20(parts6.Trigger, { ...props })
5714
5729
  }
5715
5730
  ) });
5716
5731
  }
@@ -5746,7 +5761,7 @@ function dialogParts(primitive, name, viewport2) {
5746
5761
  function Shortcut(props) {
5747
5762
  const trigger = React7.useContext(TriggerContext);
5748
5763
  if (useNearest(primitive)) {
5749
- return /* @__PURE__ */ jsx19(ShortcutPart, { inherited: trigger?.shortcut, ...props });
5764
+ return /* @__PURE__ */ jsx20(ShortcutPart, { inherited: trigger?.shortcut, ...props });
5750
5765
  }
5751
5766
  if (trigger) {
5752
5767
  return null;
@@ -5780,13 +5795,13 @@ function dialogParts(primitive, name, viewport2) {
5780
5795
  }
5781
5796
 
5782
5797
  // ../../node_modules/.pnpm/@ui-sdk+react@0.1.0-beta.5_@types+react@19.3.0_@ui-sdk+core@0.1.0-beta.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@ui-sdk/react/dist/alert-dialog.js
5783
- import { jsx as jsx20 } from "react/jsx-runtime";
5798
+ import { jsx as jsx21 } from "react/jsx-runtime";
5784
5799
  var alertParts = dialogParts(
5785
5800
  alertDialog,
5786
5801
  "AlertDialog"
5787
5802
  );
5788
5803
  function AlertDialog(props) {
5789
- return /* @__PURE__ */ jsx20(
5804
+ return /* @__PURE__ */ jsx21(
5790
5805
  alertParts.Root,
5791
5806
  {
5792
5807
  ...props
@@ -5794,7 +5809,7 @@ function AlertDialog(props) {
5794
5809
  );
5795
5810
  }
5796
5811
  function AlertDialogTrigger(props) {
5797
- return /* @__PURE__ */ jsx20(alertParts.Trigger, { ...props });
5812
+ return /* @__PURE__ */ jsx21(alertParts.Trigger, { ...props });
5798
5813
  }
5799
5814
  var AlertDialogBackdrop = alertParts.Backdrop;
5800
5815
  var AlertDialogContent = alertParts.Content;
@@ -5834,11 +5849,11 @@ var dialog = dialogPrimitive;
5834
5849
 
5835
5850
  // ../../node_modules/.pnpm/@ui-sdk+react@0.1.0-beta.5_@types+react@19.3.0_@ui-sdk+core@0.1.0-beta.5_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@ui-sdk/react/dist/dialog.js
5836
5851
  import "react";
5837
- import { jsx as jsx21 } from "react/jsx-runtime";
5852
+ import { jsx as jsx22 } from "react/jsx-runtime";
5838
5853
  var parts5 = dialogParts(dialog, "Dialog", sheetViewport);
5839
5854
  var Dialog = parts5.Root;
5840
5855
  function DialogTrigger(props) {
5841
- return /* @__PURE__ */ jsx21(parts5.Trigger, { ...props });
5856
+ return /* @__PURE__ */ jsx22(parts5.Trigger, { ...props });
5842
5857
  }
5843
5858
  var DialogBackdrop = parts5.Backdrop;
5844
5859
  var DialogContent = parts5.Content;
@@ -5856,7 +5871,7 @@ import {
5856
5871
  TrashIcon as TrashIcon2,
5857
5872
  XIcon
5858
5873
  } from "lucide-react";
5859
- import { Fragment as Fragment9, jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
5874
+ import { Fragment as Fragment9, jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
5860
5875
  var METHOD_CLASS = {
5861
5876
  GET: "text-accent-fg",
5862
5877
  POST: "text-success-fg",
@@ -5868,6 +5883,9 @@ var FILTER_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE"];
5868
5883
  function isFailed(entry) {
5869
5884
  return entry.status === 0 || (entry.status ?? 0) >= 400;
5870
5885
  }
5886
+ function formatDuration(ms) {
5887
+ return ms >= 1e4 ? `${Math.round(ms / 1e3)}s` : `${ms}ms`;
5888
+ }
5871
5889
  function statusLabel(entry) {
5872
5890
  if (entry.status === null) return "\u2026";
5873
5891
  if (entry.status === 0) return "ERR";
@@ -5889,50 +5907,50 @@ function displayPath(url) {
5889
5907
  }
5890
5908
  function HeaderList({ headers }) {
5891
5909
  const rows = Object.entries(headers);
5892
- if (rows.length === 0) return /* @__PURE__ */ jsx22("p", { className: "text-fg-tertiary", children: "None" });
5893
- return /* @__PURE__ */ jsx22("dl", { className: "grid grid-cols-[max-content_minmax(0,1fr)] gap-x-3 gap-y-1 font-mono text-[11px]", children: rows.map(([name, value]) => /* @__PURE__ */ jsxs12("div", { className: "contents", children: [
5894
- /* @__PURE__ */ jsx22("dt", { className: "text-fg-tertiary", children: name }),
5895
- /* @__PURE__ */ jsx22("dd", { className: "break-all", children: value })
5910
+ if (rows.length === 0) return /* @__PURE__ */ jsx23("p", { className: "text-fg-tertiary", children: "None" });
5911
+ return /* @__PURE__ */ jsx23("dl", { className: "grid grid-cols-[max-content_minmax(0,1fr)] gap-x-3 gap-y-1 font-mono text-[11px]", children: rows.map(([name, value]) => /* @__PURE__ */ jsxs13("div", { className: "contents", children: [
5912
+ /* @__PURE__ */ jsx23("dt", { className: "text-fg-tertiary", children: name }),
5913
+ /* @__PURE__ */ jsx23("dd", { className: "break-all", children: value })
5896
5914
  ] }, name)) });
5897
5915
  }
5898
5916
  function Body({ value, title }) {
5899
5917
  const text3 = prettyBody(value);
5900
- if (!text3) return /* @__PURE__ */ jsx22("p", { className: "text-fg-tertiary", children: "No body" });
5901
- return /* @__PURE__ */ jsxs12("div", { className: "relative", children: [
5902
- /* @__PURE__ */ jsxs12(Dialog, { children: [
5903
- /* @__PURE__ */ jsx22(
5918
+ if (!text3) return /* @__PURE__ */ jsx23("p", { className: "text-fg-tertiary", children: "No body" });
5919
+ return /* @__PURE__ */ jsxs13("div", { className: "relative", children: [
5920
+ /* @__PURE__ */ jsxs13(Dialog, { children: [
5921
+ /* @__PURE__ */ jsx23(
5904
5922
  DialogTrigger,
5905
5923
  {
5906
5924
  "aria-label": `View ${title.toLowerCase()} fullscreen`,
5907
5925
  className: `${iconButtonClass} sticky top-0 float-end ms-2 bg-surface-sticky`,
5908
- children: /* @__PURE__ */ jsx22(Maximize2Icon, { className: "size-3.5", "aria-hidden": "true" })
5926
+ children: /* @__PURE__ */ jsx23(Maximize2Icon, { className: "size-3.5", "aria-hidden": "true" })
5909
5927
  }
5910
5928
  ),
5911
- /* @__PURE__ */ jsxs12(
5929
+ /* @__PURE__ */ jsxs13(
5912
5930
  DialogContent,
5913
5931
  {
5914
5932
  "data-react-grab-ignore": true,
5915
5933
  className: "fixed inset-4 m-0 flex h-auto max-h-none w-auto max-w-none flex-col overflow-hidden rounded-xl border border-line bg-surface p-0 text-xs text-fg shadow-2xl transition-[opacity,scale] duration-[240ms] ease-out data-ending-style:duration-[160ms] backdrop:bg-scrim data-ending-style:opacity-0 data-starting-style:scale-[0.98] data-starting-style:opacity-0 motion-reduce:transition-none",
5916
5934
  children: [
5917
- /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2 border-b border-line px-4 py-2.5", children: [
5918
- /* @__PURE__ */ jsx22(DialogTitle, { className: "min-w-0 flex-1 truncate text-sm font-semibold", children: title }),
5919
- /* @__PURE__ */ jsx22(
5935
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2 border-b border-line px-4 py-2.5", children: [
5936
+ /* @__PURE__ */ jsx23(DialogTitle, { className: "min-w-0 flex-1 truncate text-sm font-semibold", children: title }),
5937
+ /* @__PURE__ */ jsx23(
5920
5938
  Button,
5921
5939
  {
5922
5940
  "aria-label": `Copy ${title.toLowerCase()}`,
5923
5941
  className: iconButtonClass,
5924
5942
  onClick: () => navigator.clipboard.writeText(text3),
5925
- children: /* @__PURE__ */ jsx22(CopyIcon3, { className: "size-3.5", "aria-hidden": "true" })
5943
+ children: /* @__PURE__ */ jsx23(CopyIcon3, { className: "size-3.5", "aria-hidden": "true" })
5926
5944
  }
5927
5945
  ),
5928
- /* @__PURE__ */ jsx22(DialogClose, { "aria-label": "Close", className: iconButtonClass, children: /* @__PURE__ */ jsx22(XIcon, { className: "size-3.5", "aria-hidden": "true" }) })
5946
+ /* @__PURE__ */ jsx23(DialogClose, { "aria-label": "Close", className: iconButtonClass, children: /* @__PURE__ */ jsx23(XIcon, { className: "size-3.5", "aria-hidden": "true" }) })
5929
5947
  ] }),
5930
- /* @__PURE__ */ jsx22("div", { className: "min-h-0 flex-1 scrollbar-slim scroll-fade overflow-auto p-4 [&_pre]:text-[13px]", children: /* @__PURE__ */ jsx22(JsonCode, { code: text3 }) })
5948
+ /* @__PURE__ */ jsx23("div", { className: "min-h-0 flex-1 scrollbar-slim scroll-fade overflow-auto p-4 [&_pre]:text-[13px]", children: /* @__PURE__ */ jsx23(JsonCode, { code: text3 }) })
5931
5949
  ]
5932
5950
  }
5933
5951
  )
5934
5952
  ] }),
5935
- /* @__PURE__ */ jsx22(JsonCode, { code: text3 })
5953
+ /* @__PURE__ */ jsx23(JsonCode, { code: text3 })
5936
5954
  ] });
5937
5955
  }
5938
5956
  var tabClass = "rounded-md px-2.5 py-1 text-fg-secondary hover:text-fg data-selected:bg-hover data-selected:text-fg focus-visible:outline-2 focus-visible:outline-focus";
@@ -5964,16 +5982,16 @@ function CopyMenu({ entry }) {
5964
5982
  writeJson(COPY_PARTS_KEY, next);
5965
5983
  return next;
5966
5984
  });
5967
- return /* @__PURE__ */ jsxs12(Popover, { children: [
5968
- /* @__PURE__ */ jsx22(
5985
+ return /* @__PURE__ */ jsxs13(Popover, { children: [
5986
+ /* @__PURE__ */ jsx23(
5969
5987
  PopoverTrigger,
5970
5988
  {
5971
5989
  "aria-label": "Copy request for agent",
5972
5990
  className: iconButtonClass,
5973
- children: /* @__PURE__ */ jsx22(CopyIcon3, { className: "size-3.5", "aria-hidden": "true" })
5991
+ children: /* @__PURE__ */ jsx23(CopyIcon3, { className: "size-3.5", "aria-hidden": "true" })
5974
5992
  }
5975
5993
  ),
5976
- /* @__PURE__ */ jsxs12(
5994
+ /* @__PURE__ */ jsxs13(
5977
5995
  PopoverContent,
5978
5996
  {
5979
5997
  side: "bottom",
@@ -5982,19 +6000,19 @@ function CopyMenu({ entry }) {
5982
6000
  "data-react-grab-ignore": true,
5983
6001
  className: "m-0 w-52 rounded-lg border border-line bg-surface-raised p-3 text-xs text-fg shadow-xl",
5984
6002
  children: [
5985
- /* @__PURE__ */ jsx22(PopoverTitle, { className: "mb-2 text-xs font-semibold", children: "Copy to clipboard" }),
5986
- /* @__PURE__ */ jsx22("div", { className: "mb-3 flex flex-col gap-1.5", children: COPY_OPTIONS.map(({ key, label }) => /* @__PURE__ */ jsxs12(
6003
+ /* @__PURE__ */ jsx23(PopoverTitle, { className: "mb-2 text-xs font-semibold", children: "Copy to clipboard" }),
6004
+ /* @__PURE__ */ jsx23("div", { className: "mb-3 flex flex-col gap-1.5", children: COPY_OPTIONS.map(({ key, label }) => /* @__PURE__ */ jsxs13(
5987
6005
  "label",
5988
6006
  {
5989
6007
  className: "flex cursor-pointer items-center gap-2 rounded-md px-1 py-1 hover:bg-hover-subtle",
5990
6008
  children: [
5991
- /* @__PURE__ */ jsx22(
6009
+ /* @__PURE__ */ jsx23(
5992
6010
  Checkbox,
5993
6011
  {
5994
6012
  checked: parts6[key],
5995
6013
  onCheckedChange: (checked) => toggle(key, checked === true),
5996
6014
  className: "inline-flex size-4 items-center justify-center rounded border border-line-control bg-transparent text-fg-inverse focus-visible:outline-2 focus-visible:outline-focus data-checked:border-line-inverse data-checked:bg-inverse",
5997
- children: /* @__PURE__ */ jsx22(CheckboxIndicator, { children: /* @__PURE__ */ jsx22(CheckIcon3, { className: "size-3", "aria-hidden": "true" }) })
6015
+ children: /* @__PURE__ */ jsx23(CheckboxIndicator, { children: /* @__PURE__ */ jsx23(CheckIcon3, { className: "size-3", "aria-hidden": "true" }) })
5998
6016
  }
5999
6017
  ),
6000
6018
  label
@@ -6002,20 +6020,20 @@ function CopyMenu({ entry }) {
6002
6020
  },
6003
6021
  key
6004
6022
  )) }),
6005
- /* @__PURE__ */ jsxs12(
6023
+ /* @__PURE__ */ jsxs13(
6006
6024
  PopoverClose,
6007
6025
  {
6008
6026
  disabled: none,
6009
6027
  onClick: () => copyText(formatEntryForAgent(entry, parts6)),
6010
6028
  className: "inline-flex h-7 w-full items-center justify-center gap-1.5 rounded-md bg-inverse font-medium text-fg-inverse hover:bg-inverse-hover focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:opacity-40",
6011
6029
  children: [
6012
- /* @__PURE__ */ jsx22(CopyIcon3, { className: "size-3.5", "aria-hidden": "true" }),
6030
+ /* @__PURE__ */ jsx23(CopyIcon3, { className: "size-3.5", "aria-hidden": "true" }),
6013
6031
  "Copy"
6014
6032
  ]
6015
6033
  }
6016
6034
  ),
6017
- /* @__PURE__ */ jsxs12("div", { className: "mt-2 flex gap-2", children: [
6018
- /* @__PURE__ */ jsx22(
6035
+ /* @__PURE__ */ jsxs13("div", { className: "mt-2 flex gap-2", children: [
6036
+ /* @__PURE__ */ jsx23(
6019
6037
  PopoverClose,
6020
6038
  {
6021
6039
  "aria-label": "Copy as cURL",
@@ -6024,7 +6042,7 @@ function CopyMenu({ entry }) {
6024
6042
  children: "cURL"
6025
6043
  }
6026
6044
  ),
6027
- /* @__PURE__ */ jsx22(
6045
+ /* @__PURE__ */ jsx23(
6028
6046
  PopoverClose,
6029
6047
  {
6030
6048
  "aria-label": "Copy as fetch",
@@ -6040,9 +6058,9 @@ function CopyMenu({ entry }) {
6040
6058
  ] });
6041
6059
  }
6042
6060
  function ReplayButton({ entry }) {
6043
- const icon = /* @__PURE__ */ jsx22(RotateCwIcon, { className: "size-3.5", "aria-hidden": "true" });
6061
+ const icon = /* @__PURE__ */ jsx23(RotateCwIcon, { className: "size-3.5", "aria-hidden": "true" });
6044
6062
  if (entry.method === "GET") {
6045
- return /* @__PURE__ */ jsx22(
6063
+ return /* @__PURE__ */ jsx23(
6046
6064
  Button,
6047
6065
  {
6048
6066
  "aria-label": "Replay request",
@@ -6052,8 +6070,8 @@ function ReplayButton({ entry }) {
6052
6070
  }
6053
6071
  );
6054
6072
  }
6055
- return /* @__PURE__ */ jsxs12(AlertDialog, { children: [
6056
- /* @__PURE__ */ jsx22(
6073
+ return /* @__PURE__ */ jsxs13(AlertDialog, { children: [
6074
+ /* @__PURE__ */ jsx23(
6057
6075
  AlertDialogTrigger,
6058
6076
  {
6059
6077
  "aria-label": "Replay request",
@@ -6061,24 +6079,24 @@ function ReplayButton({ entry }) {
6061
6079
  children: icon
6062
6080
  }
6063
6081
  ),
6064
- /* @__PURE__ */ jsx22(AlertDialogBackdrop, { className: "bg-scrim" }),
6065
- /* @__PURE__ */ jsxs12(
6082
+ /* @__PURE__ */ jsx23(AlertDialogBackdrop, { className: "bg-scrim" }),
6083
+ /* @__PURE__ */ jsxs13(
6066
6084
  AlertDialogContent,
6067
6085
  {
6068
6086
  "data-react-grab-ignore": true,
6069
6087
  className: "m-0 w-[min(380px,calc(100vw-32px))] rounded-xl border border-line bg-surface p-4 text-xs text-fg shadow-2xl",
6070
6088
  children: [
6071
- /* @__PURE__ */ jsxs12(AlertDialogTitle, { className: "text-sm font-semibold", children: [
6089
+ /* @__PURE__ */ jsxs13(AlertDialogTitle, { className: "text-sm font-semibold [overflow-wrap:anywhere]", children: [
6072
6090
  "Replay ",
6073
6091
  entry.method,
6074
6092
  " ",
6075
6093
  displayPath(entry.url),
6076
6094
  "?"
6077
6095
  ] }),
6078
- /* @__PURE__ */ jsx22(AlertDialogDescription, { className: "mt-1 text-fg-secondary", children: "This sends the request again and may change data on the server." }),
6079
- /* @__PURE__ */ jsxs12("div", { className: "mt-4 flex justify-end gap-2", children: [
6080
- /* @__PURE__ */ jsx22(AlertDialogClose, { className: "inline-flex h-7 items-center rounded-md border border-line-strong px-3 font-medium hover:bg-hover focus-visible:outline-2 focus-visible:outline-focus", children: "Cancel" }),
6081
- /* @__PURE__ */ jsx22(
6096
+ /* @__PURE__ */ jsx23(AlertDialogDescription, { className: "mt-1 text-fg-secondary", children: "This sends the request again and may change data on the server." }),
6097
+ /* @__PURE__ */ jsxs13("div", { className: "mt-4 flex justify-end gap-2", children: [
6098
+ /* @__PURE__ */ jsx23(AlertDialogClose, { className: "inline-flex h-7 items-center rounded-md border border-line-strong px-3 font-medium hover:bg-hover focus-visible:outline-2 focus-visible:outline-focus", children: "Cancel" }),
6099
+ /* @__PURE__ */ jsx23(
6082
6100
  AlertDialogClose,
6083
6101
  {
6084
6102
  value: "confirm",
@@ -6095,56 +6113,56 @@ function ReplayButton({ entry }) {
6095
6113
  }
6096
6114
  function EntryDetail2({ entry }) {
6097
6115
  const name = `${entry.method} ${displayPath(entry.url)}`;
6098
- return /* @__PURE__ */ jsxs12("div", { className: "flex min-h-0 flex-1 flex-col", children: [
6099
- /* @__PURE__ */ jsxs12("div", { className: "flex items-start gap-2 border-b border-line px-3 py-2", children: [
6100
- /* @__PURE__ */ jsxs12("p", { className: "min-w-0 flex-1 font-mono text-[11px] break-all", children: [
6101
- /* @__PURE__ */ jsx22("span", { className: `font-semibold ${METHOD_CLASS[entry.method] ?? ""}`, children: entry.method }),
6116
+ return /* @__PURE__ */ jsxs13("div", { className: "flex min-h-0 flex-1 flex-col", children: [
6117
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-start gap-2 border-b border-line px-3 py-2", children: [
6118
+ /* @__PURE__ */ jsxs13("p", { className: "min-w-0 flex-1 font-mono text-[11px] break-all", children: [
6119
+ /* @__PURE__ */ jsx23("span", { className: `font-semibold ${METHOD_CLASS[entry.method] ?? ""}`, children: entry.method }),
6102
6120
  " ",
6103
6121
  entry.url,
6104
- /* @__PURE__ */ jsxs12("span", { className: "block text-fg-tertiary", children: [
6105
- /* @__PURE__ */ jsxs12("span", { className: statusClass(entry), children: [
6122
+ /* @__PURE__ */ jsxs13("span", { className: "block text-fg-tertiary", children: [
6123
+ /* @__PURE__ */ jsxs13("span", { className: statusClass(entry), children: [
6106
6124
  statusLabel(entry),
6107
6125
  entry.status ? ` ${statusReason(entry.status) ?? ""}`.trimEnd() : ""
6108
6126
  ] }),
6109
- entry.duration != null ? ` \xB7 ${entry.duration}ms` : "",
6127
+ entry.duration != null ? ` \xB7 ${formatDuration(entry.duration)}` : "",
6110
6128
  ` \xB7 ${new Date(entry.startedAt).toLocaleTimeString()}`
6111
6129
  ] })
6112
6130
  ] }),
6113
- /* @__PURE__ */ jsx22(ReplayButton, { entry }),
6114
- /* @__PURE__ */ jsx22(CopyMenu, { entry })
6131
+ /* @__PURE__ */ jsx23(ReplayButton, { entry }),
6132
+ /* @__PURE__ */ jsx23(CopyMenu, { entry })
6115
6133
  ] }),
6116
- /* @__PURE__ */ jsxs12(Tabs, { defaultValue: "response", className: "flex min-h-0 flex-1 flex-col", children: [
6117
- /* @__PURE__ */ jsxs12(
6134
+ /* @__PURE__ */ jsxs13(Tabs, { defaultValue: "response", className: "flex min-h-0 flex-1 flex-col", children: [
6135
+ /* @__PURE__ */ jsxs13(
6118
6136
  TabsList,
6119
6137
  {
6120
6138
  "aria-label": "Request details",
6121
6139
  className: "flex gap-1 border-b border-line px-2 py-1.5",
6122
6140
  children: [
6123
- /* @__PURE__ */ jsx22(TabsTab, { value: "request", className: tabClass, children: "Request" }),
6124
- /* @__PURE__ */ jsx22(TabsTab, { value: "response", className: tabClass, children: "Response" }),
6125
- /* @__PURE__ */ jsx22(TabsTab, { value: "headers", className: tabClass, children: "Headers" })
6141
+ /* @__PURE__ */ jsx23(TabsTab, { value: "request", className: tabClass, children: "Request" }),
6142
+ /* @__PURE__ */ jsx23(TabsTab, { value: "response", className: tabClass, children: "Response" }),
6143
+ /* @__PURE__ */ jsx23(TabsTab, { value: "headers", className: tabClass, children: "Headers" })
6126
6144
  ]
6127
6145
  }
6128
6146
  ),
6129
- /* @__PURE__ */ jsx22(TabsPanel, { value: "request", className: "min-h-0 flex-1 scrollbar-slim scroll-fade overflow-auto p-3", children: /* @__PURE__ */ jsx22(Body, { value: entry.requestBody, title: `Request body \xB7 ${name}` }) }),
6130
- /* @__PURE__ */ jsx22(
6147
+ /* @__PURE__ */ jsx23(TabsPanel, { value: "request", className: "min-h-0 flex-1 scrollbar-slim scroll-fade overflow-auto p-3", children: /* @__PURE__ */ jsx23(Body, { value: entry.requestBody, title: `Request body \xB7 ${name}` }) }),
6148
+ /* @__PURE__ */ jsx23(
6131
6149
  TabsPanel,
6132
6150
  {
6133
6151
  value: "response",
6134
6152
  className: "min-h-0 flex-1 scrollbar-slim scroll-fade overflow-auto p-3",
6135
- children: /* @__PURE__ */ jsx22(Body, { value: entry.responseBody, title: `Response body \xB7 ${name}` })
6153
+ children: /* @__PURE__ */ jsx23(Body, { value: entry.responseBody, title: `Response body \xB7 ${name}` })
6136
6154
  }
6137
6155
  ),
6138
- /* @__PURE__ */ jsxs12(
6156
+ /* @__PURE__ */ jsxs13(
6139
6157
  TabsPanel,
6140
6158
  {
6141
6159
  value: "headers",
6142
6160
  className: "min-h-0 flex-1 space-y-3 scrollbar-slim scroll-fade overflow-auto p-3",
6143
6161
  children: [
6144
- /* @__PURE__ */ jsx22("h3", { className: "font-medium text-fg-secondary", children: "Request" }),
6145
- /* @__PURE__ */ jsx22(HeaderList, { headers: entry.requestHeaders }),
6146
- /* @__PURE__ */ jsx22("h3", { className: "font-medium text-fg-secondary", children: "Response" }),
6147
- /* @__PURE__ */ jsx22(HeaderList, { headers: entry.responseHeaders })
6162
+ /* @__PURE__ */ jsx23("h3", { className: "font-medium text-fg-secondary", children: "Request" }),
6163
+ /* @__PURE__ */ jsx23(HeaderList, { headers: entry.requestHeaders }),
6164
+ /* @__PURE__ */ jsx23("h3", { className: "font-medium text-fg-secondary", children: "Response" }),
6165
+ /* @__PURE__ */ jsx23(HeaderList, { headers: entry.responseHeaders })
6148
6166
  ]
6149
6167
  }
6150
6168
  )
@@ -6177,24 +6195,24 @@ var NetworkRow = memo2(function NetworkRow2({
6177
6195
  origin
6178
6196
  }) {
6179
6197
  const pending = entry.duration == null;
6180
- return /* @__PURE__ */ jsxs12(
6198
+ return /* @__PURE__ */ jsxs13(
6181
6199
  ListboxItem,
6182
6200
  {
6183
6201
  value: String(entry.id),
6184
6202
  label: `${entry.method} ${displayPath(entry.url)}`,
6185
6203
  className: `${ROW_GRID} min-h-6 cursor-default rounded-md px-2 py-1 font-mono text-[11px] text-fg data-highlighted:bg-hover-subtle data-selected:bg-accent/15`,
6186
6204
  children: [
6187
- /* @__PURE__ */ jsx22(
6205
+ /* @__PURE__ */ jsx23(
6188
6206
  "span",
6189
6207
  {
6190
6208
  className: `font-semibold ${METHOD_CLASS[entry.method] ?? "text-fg"}`,
6191
6209
  children: entry.method
6192
6210
  }
6193
6211
  ),
6194
- /* @__PURE__ */ jsx22("span", { className: "truncate", title: entry.url, children: displayPath(entry.url) }),
6195
- /* @__PURE__ */ jsx22("span", { className: `text-end tabular-nums ${statusClass(entry)}`, children: statusLabel(entry) }),
6196
- /* @__PURE__ */ jsx22("span", { className: "text-end text-fg tabular-nums", children: pending ? "" : `${entry.duration}ms` }),
6197
- /* @__PURE__ */ jsx22(
6212
+ /* @__PURE__ */ jsx23(MiddleTruncate, { text: displayPath(entry.url) }),
6213
+ /* @__PURE__ */ jsx23("span", { className: `text-end tabular-nums ${statusClass(entry)}`, children: statusLabel(entry) }),
6214
+ /* @__PURE__ */ jsx23("span", { className: "text-end text-fg tabular-nums", children: entry.duration == null ? "" : formatDuration(entry.duration) }),
6215
+ /* @__PURE__ */ jsx23(
6198
6216
  "div",
6199
6217
  {
6200
6218
  "aria-hidden": "true",
@@ -6203,7 +6221,7 @@ var NetworkRow = memo2(function NetworkRow2({
6203
6221
  "--start": entry.startedAt - origin,
6204
6222
  "--dur": pending ? `calc(var(--now) - ${entry.startedAt - origin})` : entry.duration
6205
6223
  },
6206
- children: /* @__PURE__ */ jsx22(
6224
+ children: /* @__PURE__ */ jsx23(
6207
6225
  "div",
6208
6226
  {
6209
6227
  className: `absolute inset-y-0.5 rounded-sm ${barClass(entry)}`,
@@ -6233,19 +6251,19 @@ function NetworkList({
6233
6251
  return () => window.clearInterval(id);
6234
6252
  }, [hasPending]);
6235
6253
  const timeline = buildTimeline(visible, now);
6236
- return /* @__PURE__ */ jsxs12(Fragment9, { children: [
6237
- /* @__PURE__ */ jsxs12(
6254
+ return /* @__PURE__ */ jsxs13(Fragment9, { children: [
6255
+ /* @__PURE__ */ jsxs13(
6238
6256
  "div",
6239
6257
  {
6240
6258
  className: `${ROW_GRID} border-b border-line px-3 py-1.5 text-[10px] tracking-wide text-fg-tertiary uppercase`,
6241
6259
  children: [
6242
- /* @__PURE__ */ jsx22("span", { children: "Method" }),
6243
- /* @__PURE__ */ jsx22("span", { children: "Path" }),
6244
- /* @__PURE__ */ jsx22("span", { className: "text-end", children: "Status" }),
6245
- /* @__PURE__ */ jsx22("span", { className: "text-end", children: "Time" }),
6246
- /* @__PURE__ */ jsxs12("span", { className: "flex justify-between normal-case tabular-nums", children: [
6247
- /* @__PURE__ */ jsx22("span", { children: "0" }),
6248
- /* @__PURE__ */ jsxs12("span", { children: [
6260
+ /* @__PURE__ */ jsx23("span", { children: "Method" }),
6261
+ /* @__PURE__ */ jsx23("span", { children: "Path" }),
6262
+ /* @__PURE__ */ jsx23("span", { className: "text-end", children: "Status" }),
6263
+ /* @__PURE__ */ jsx23("span", { className: "text-end", children: "Time" }),
6264
+ /* @__PURE__ */ jsxs13("span", { className: "flex justify-between normal-case tabular-nums", children: [
6265
+ /* @__PURE__ */ jsx23("span", { children: "0" }),
6266
+ /* @__PURE__ */ jsxs13("span", { children: [
6249
6267
  Math.round(timeline.span),
6250
6268
  "ms"
6251
6269
  ] })
@@ -6253,11 +6271,11 @@ function NetworkList({
6253
6271
  ]
6254
6272
  }
6255
6273
  ),
6256
- /* @__PURE__ */ jsx22(
6274
+ /* @__PURE__ */ jsx23(
6257
6275
  "div",
6258
6276
  {
6259
6277
  className: `min-h-0 scrollbar-slim scroll-fade overflow-auto ${selectedOpen ? "max-h-[40%] shrink-0 border-b border-line" : "flex-1"}`,
6260
- children: visible.length === 0 ? /* @__PURE__ */ jsx22("p", { className: "p-3 text-fg-tertiary", children: total === 0 ? "No requests yet. API calls show up here as they happen." : "No requests match the filter." }) : /* @__PURE__ */ jsx22(
6278
+ children: visible.length === 0 ? /* @__PURE__ */ jsx23("p", { className: "p-3 text-fg-tertiary", children: total === 0 ? "No requests yet. API calls show up here as they happen." : "No requests match the filter." }) : /* @__PURE__ */ jsx23(
6261
6279
  Listbox,
6262
6280
  {
6263
6281
  "aria-label": "Requests",
@@ -6268,7 +6286,7 @@ function NetworkList({
6268
6286
  "--span": timeline.span,
6269
6287
  "--now": now - timeline.start
6270
6288
  },
6271
- children: visible.map((entry) => /* @__PURE__ */ jsx22(
6289
+ children: visible.map((entry) => /* @__PURE__ */ jsx23(
6272
6290
  NetworkRow,
6273
6291
  {
6274
6292
  entry,
@@ -6311,10 +6329,10 @@ function NetworkPanel() {
6311
6329
  }, [entries, query, errorsOnly, methods]);
6312
6330
  const selected = selectedId ? entries.find((e) => String(e.id) === selectedId) ?? null : null;
6313
6331
  const failed = entries.reduce((n, e) => isFailed(e) ? n + 1 : n, 0);
6314
- return /* @__PURE__ */ jsxs12("div", { className: "flex min-h-0 flex-1 flex-col", children: [
6315
- /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2 border-b border-line px-3 py-2", children: [
6316
- /* @__PURE__ */ jsx22("span", { className: "text-fg tabular-nums", children: visible.length === entries.length ? `${entries.length} requests` : `${visible.length} / ${entries.length} requests` }),
6317
- /* @__PURE__ */ jsx22(
6332
+ return /* @__PURE__ */ jsxs13("div", { className: "flex min-h-0 flex-1 flex-col", children: [
6333
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2 border-b border-line px-3 py-2", children: [
6334
+ /* @__PURE__ */ jsx23("span", { className: "text-fg tabular-nums", children: visible.length === entries.length ? `${entries.length} ${entries.length === 1 ? "request" : "requests"}` : `${visible.length} / ${entries.length} ${entries.length === 1 ? "request" : "requests"}` }),
6335
+ /* @__PURE__ */ jsx23(
6318
6336
  Input,
6319
6337
  {
6320
6338
  "aria-label": "Filter requests",
@@ -6324,7 +6342,7 @@ function NetworkPanel() {
6324
6342
  className: "ms-auto h-7 w-56 min-w-0 rounded-md border border-line bg-hover-subtle px-2 text-xs text-fg placeholder:text-fg-disabled focus-visible:outline-2 focus-visible:outline-focus"
6325
6343
  }
6326
6344
  ),
6327
- /* @__PURE__ */ jsx22(
6345
+ /* @__PURE__ */ jsx23(
6328
6346
  Button,
6329
6347
  {
6330
6348
  "aria-label": "Clear requests",
@@ -6333,12 +6351,12 @@ function NetworkPanel() {
6333
6351
  clearNetworkLog();
6334
6352
  setSelectedId(null);
6335
6353
  },
6336
- children: /* @__PURE__ */ jsx22(TrashIcon2, { className: "size-3.5", "aria-hidden": "true" })
6354
+ children: /* @__PURE__ */ jsx23(TrashIcon2, { className: "size-3.5", "aria-hidden": "true" })
6337
6355
  }
6338
6356
  )
6339
6357
  ] }),
6340
- /* @__PURE__ */ jsxs12("div", { className: "flex flex-wrap items-center gap-1.5 border-b border-line px-3 py-1.5", children: [
6341
- /* @__PURE__ */ jsxs12(
6358
+ /* @__PURE__ */ jsxs13("div", { className: "flex flex-wrap items-center gap-1.5 border-b border-line px-3 py-1.5", children: [
6359
+ /* @__PURE__ */ jsxs13(
6342
6360
  Toggle,
6343
6361
  {
6344
6362
  "aria-label": "Errors only",
@@ -6347,11 +6365,11 @@ function NetworkPanel() {
6347
6365
  className: chipClass,
6348
6366
  children: [
6349
6367
  "Errors",
6350
- /* @__PURE__ */ jsx22("span", { className: "tabular-nums", children: failed })
6368
+ /* @__PURE__ */ jsx23("span", { className: "tabular-nums", children: failed })
6351
6369
  ]
6352
6370
  }
6353
6371
  ),
6354
- /* @__PURE__ */ jsx22(
6372
+ /* @__PURE__ */ jsx23(
6355
6373
  ToggleGroup,
6356
6374
  {
6357
6375
  "aria-label": "Filter by method",
@@ -6359,11 +6377,11 @@ function NetworkPanel() {
6359
6377
  value: methods,
6360
6378
  onValueChange: setMethods,
6361
6379
  className: "flex flex-wrap items-center gap-1.5",
6362
- children: FILTER_METHODS.map((method) => /* @__PURE__ */ jsx22(Toggle, { value: method, className: chipClass, children: method }, method))
6380
+ children: FILTER_METHODS.map((method) => /* @__PURE__ */ jsx23(Toggle, { value: method, className: chipClass, children: method }, method))
6363
6381
  }
6364
6382
  )
6365
6383
  ] }),
6366
- /* @__PURE__ */ jsx22(
6384
+ /* @__PURE__ */ jsx23(
6367
6385
  NetworkList,
6368
6386
  {
6369
6387
  visible,
@@ -6373,32 +6391,32 @@ function NetworkPanel() {
6373
6391
  selectedOpen: selected !== null
6374
6392
  }
6375
6393
  ),
6376
- selected ? /* @__PURE__ */ jsx22(EntryDetail2, { entry: selected }, selected.id) : null
6394
+ selected ? /* @__PURE__ */ jsx23(EntryDetail2, { entry: selected }, selected.id) : null
6377
6395
  ] });
6378
6396
  }
6379
6397
 
6380
6398
  // src/plugins/network/index.tsx
6381
- import { Fragment as Fragment10, jsx as jsx23 } from "react/jsx-runtime";
6399
+ import { Fragment as Fragment10, jsx as jsx24 } from "react/jsx-runtime";
6382
6400
  function NetworkBadge() {
6383
6401
  const { total, failed } = useNetworkSummary();
6384
- return total > 0 ? /* @__PURE__ */ jsx23(
6402
+ return total > 0 ? /* @__PURE__ */ jsx24(
6385
6403
  "span",
6386
6404
  {
6387
6405
  className: `min-w-4 text-[10px] tabular-nums ${failed > 0 ? "text-danger-fg" : "text-fg"}`,
6388
- children: /* @__PURE__ */ jsx23(MorphText, { children: total })
6406
+ children: /* @__PURE__ */ jsx24(MorphText, { children: total })
6389
6407
  }
6390
6408
  ) : null;
6391
6409
  }
6392
6410
  function NetworkHint() {
6393
6411
  const { failed } = useNetworkSummary();
6394
- return /* @__PURE__ */ jsx23(Fragment10, { children: failed > 0 ? ` \xB7 ${failed} failed` : "" });
6412
+ return /* @__PURE__ */ jsx24(Fragment10, { children: failed > 0 ? ` \xB7 ${failed} failed` : "" });
6395
6413
  }
6396
6414
  function network(options = {}) {
6397
6415
  return definePlugin({
6398
6416
  id: "network",
6399
6417
  name: "Network",
6400
6418
  label: "Network requests",
6401
- icon: /* @__PURE__ */ jsx23(NetworkIcon, { className: "size-4", "aria-hidden": "true" }),
6419
+ icon: /* @__PURE__ */ jsx24(NetworkIcon, { className: "size-4", "aria-hidden": "true" }),
6402
6420
  install() {
6403
6421
  installNetworkLog(options);
6404
6422
  },
@@ -6464,7 +6482,7 @@ import {
6464
6482
  SmartphoneIcon,
6465
6483
  TabletIcon
6466
6484
  } from "lucide-react";
6467
- import { Fragment as Fragment11, jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
6485
+ import { Fragment as Fragment11, jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
6468
6486
  var FRAME_PADDING = { x: 32, top: 24, bottom: 88 };
6469
6487
  function registerShortcuts() {
6470
6488
  const offs = VIEWPORTS.map(
@@ -6492,7 +6510,7 @@ function ViewportItem() {
6492
6510
  const state3 = useViewportState();
6493
6511
  const preset = presetOf(state3);
6494
6512
  const activeId = preset?.id ?? "full";
6495
- return /* @__PURE__ */ jsx24("div", { className: "relative flex items-center", children: /* @__PURE__ */ jsx24(
6513
+ return /* @__PURE__ */ jsx25("div", { className: "relative flex items-center", children: /* @__PURE__ */ jsx25(
6496
6514
  ToggleGroup,
6497
6515
  {
6498
6516
  "aria-label": "Viewport",
@@ -6502,14 +6520,14 @@ function ViewportItem() {
6502
6520
  if (value) selectViewport(value);
6503
6521
  },
6504
6522
  className: "flex items-center gap-0.5",
6505
- children: VIEWPORTS.map((v) => /* @__PURE__ */ jsxs13(Tooltip, { shortcut: v.keys, children: [
6506
- /* @__PURE__ */ jsxs13(
6523
+ children: VIEWPORTS.map((v) => /* @__PURE__ */ jsxs14(Tooltip, { shortcut: v.keys, children: [
6524
+ /* @__PURE__ */ jsxs14(
6507
6525
  TooltipTrigger,
6508
6526
  {
6509
- render: /* @__PURE__ */ jsx24(Toggle, { value: v.id, "aria-label": v.label }),
6527
+ render: /* @__PURE__ */ jsx25(Toggle, { value: v.id, "aria-label": v.label }),
6510
6528
  className: `${toolbarItemClass} px-3 max-sm:px-1.5 data-pressed:text-fg-inverse data-pressed:[&_svg]:text-fg-inverse! data-pressed:hover:bg-transparent`,
6511
6529
  children: [
6512
- v.id === activeId ? /* @__PURE__ */ jsx24(
6530
+ v.id === activeId ? /* @__PURE__ */ jsx25(
6513
6531
  motion3.span,
6514
6532
  {
6515
6533
  layoutId: "devbelt-viewport-pill",
@@ -6518,19 +6536,19 @@ function ViewportItem() {
6518
6536
  className: "pointer-events-none absolute inset-0 -z-10 rounded-full bg-inverse shadow-sm"
6519
6537
  }
6520
6538
  ) : null,
6521
- /* @__PURE__ */ jsx24(ViewportGlyph, { id: v.id, className: "size-4 sm:hidden" }),
6522
- /* @__PURE__ */ jsx24("span", { className: "max-sm:hidden", children: v.label })
6539
+ /* @__PURE__ */ jsx25(ViewportGlyph, { id: v.id, className: "size-4 sm:hidden" }),
6540
+ /* @__PURE__ */ jsx25("span", { className: "max-sm:hidden", children: v.label })
6523
6541
  ]
6524
6542
  }
6525
6543
  ),
6526
- /* @__PURE__ */ jsxs13(TooltipContent, { side: "top", sideOffset: 8, className: tooltipClass, children: [
6544
+ /* @__PURE__ */ jsxs14(TooltipContent, { side: "top", sideOffset: 8, className: tooltipClass, children: [
6527
6545
  v.label,
6528
- v.width ? /* @__PURE__ */ jsxs13("span", { className: "text-fg-tertiary tabular-nums", children: [
6546
+ v.width ? /* @__PURE__ */ jsxs14("span", { className: "text-fg-tertiary tabular-nums", children: [
6529
6547
  v.width,
6530
6548
  "\xD7",
6531
6549
  v.height
6532
6550
  ] }) : null,
6533
- /* @__PURE__ */ jsx24(TooltipShortcut, { className: kbdClass })
6551
+ /* @__PURE__ */ jsx25(TooltipShortcut, { className: kbdClass })
6534
6552
  ] })
6535
6553
  ] }, v.id))
6536
6554
  }
@@ -6541,13 +6559,13 @@ function ViewportOverlay() {
6541
6559
  const preset = presetOf(state3);
6542
6560
  const scale = useFrameScale(preset?.width, preset?.height);
6543
6561
  const { hud, src } = state3;
6544
- return /* @__PURE__ */ jsxs13(Fragment11, { children: [
6545
- preset?.width && preset.height && src ? /* @__PURE__ */ jsx24(
6562
+ return /* @__PURE__ */ jsxs14(Fragment11, { children: [
6563
+ preset?.width && preset.height && src ? /* @__PURE__ */ jsx25(
6546
6564
  "div",
6547
6565
  {
6548
6566
  className: "fixed inset-0 z-[9000] flex items-start justify-center overflow-hidden bg-surface-raised",
6549
6567
  style: { paddingTop: FRAME_PADDING.top },
6550
- children: /* @__PURE__ */ jsx24(
6568
+ children: /* @__PURE__ */ jsx25(
6551
6569
  "div",
6552
6570
  {
6553
6571
  className: "overflow-hidden rounded-xl bg-page shadow-2xl ring-1 ring-line-strong",
@@ -6555,7 +6573,7 @@ function ViewportOverlay() {
6555
6573
  width: preset.width * scale,
6556
6574
  height: preset.height * scale
6557
6575
  },
6558
- children: /* @__PURE__ */ jsx24(
6576
+ children: /* @__PURE__ */ jsx25(
6559
6577
  "iframe",
6560
6578
  {
6561
6579
  ref: setFrame,
@@ -6575,13 +6593,13 @@ function ViewportOverlay() {
6575
6593
  )
6576
6594
  }
6577
6595
  ) : null,
6578
- hud ? /* @__PURE__ */ jsx24(
6596
+ hud ? /* @__PURE__ */ jsx25(
6579
6597
  "div",
6580
6598
  {
6581
6599
  "aria-hidden": "true",
6582
6600
  "data-devbelt-hud": true,
6583
6601
  className: "pointer-events-none fixed inset-0 z-[10001] grid place-items-center",
6584
- children: /* @__PURE__ */ jsxs13(
6602
+ children: /* @__PURE__ */ jsxs14(
6585
6603
  motion3.div,
6586
6604
  {
6587
6605
  initial: { opacity: 0, scale: 0.9 },
@@ -6589,8 +6607,8 @@ function ViewportOverlay() {
6589
6607
  transition: hud.leaving ? spring.slow.exit : spring.slow,
6590
6608
  className: "flex flex-col items-center gap-1 rounded-2xl bg-surface-overlay px-6 py-4 text-fg shadow-2xl ring-1 ring-line backdrop-blur-md",
6591
6609
  children: [
6592
- /* @__PURE__ */ jsx24("span", { className: "text-2xl font-semibold tracking-tight", children: hud.label }),
6593
- /* @__PURE__ */ jsx24("span", { className: "text-sm text-fg-secondary tabular-nums", children: hud.size })
6610
+ /* @__PURE__ */ jsx25("span", { className: "text-2xl font-semibold tracking-tight", children: hud.label }),
6611
+ /* @__PURE__ */ jsx25("span", { className: "text-sm text-fg-secondary tabular-nums", children: hud.size })
6594
6612
  ]
6595
6613
  }
6596
6614
  )
@@ -6609,23 +6627,23 @@ var VIEWPORT_ICONS = {
6609
6627
  };
6610
6628
  function ViewportGlyph({ id, className }) {
6611
6629
  const Icon = VIEWPORT_ICONS[id] ?? MonitorIcon;
6612
- return /* @__PURE__ */ jsx24(Icon, { className, "aria-hidden": "true" });
6630
+ return /* @__PURE__ */ jsx25(Icon, { className, "aria-hidden": "true" });
6613
6631
  }
6614
6632
  function ViewportMenuSection() {
6615
6633
  const state3 = useViewportState();
6616
- return /* @__PURE__ */ jsxs13(
6634
+ return /* @__PURE__ */ jsxs14(
6617
6635
  MenuRadioGroup,
6618
6636
  {
6619
6637
  name: "viewport",
6620
6638
  value: presetOf(state3)?.id ?? "full",
6621
6639
  onValueChange: selectViewport,
6622
6640
  children: [
6623
- /* @__PURE__ */ jsx24(MenuGroupLabel, { className: menuLabelClass, children: "Viewport" }),
6641
+ /* @__PURE__ */ jsx25(MenuGroupLabel, { className: menuLabelClass, children: "Viewport" }),
6624
6642
  VIEWPORTS.map((v) => {
6625
6643
  const Icon = VIEWPORT_ICONS[v.id] ?? MonitorIcon;
6626
- return /* @__PURE__ */ jsxs13(MenuRadioItem, { value: v.id, className: menuItemClass, children: [
6627
- /* @__PURE__ */ jsx24(MenuItemIndicator, { keepMounted: true, className: menuIndicatorClass, children: /* @__PURE__ */ jsx24(CheckIcon4, { className: "size-3.5", "aria-hidden": "true" }) }),
6628
- /* @__PURE__ */ jsx24(Icon, { className: menuIconClass, "aria-hidden": "true" }),
6644
+ return /* @__PURE__ */ jsxs14(MenuRadioItem, { value: v.id, className: menuItemClass, children: [
6645
+ /* @__PURE__ */ jsx25(MenuItemIndicator, { keepMounted: true, className: menuIndicatorClass, children: /* @__PURE__ */ jsx25(CheckIcon4, { className: "size-3.5", "aria-hidden": "true" }) }),
6646
+ /* @__PURE__ */ jsx25(Icon, { className: menuIconClass, "aria-hidden": "true" }),
6629
6647
  v.label
6630
6648
  ] }, v.id);
6631
6649
  })
@@ -6636,20 +6654,20 @@ function ViewportMenuSection() {
6636
6654
  function ViewportStatus() {
6637
6655
  const preset = presetOf(useViewportState());
6638
6656
  const scale = useFrameScale(preset?.width, preset?.height);
6639
- return preset?.width ? /* @__PURE__ */ jsx24("span", { className: "px-2 text-fg tabular-nums", children: /* @__PURE__ */ jsx24(MorphText, { children: `${preset.width}\xD7${preset.height}${scale < 1 ? ` \xB7 ${Math.round(scale * 100)}%` : ""}` }) }) : null;
6657
+ return preset?.width ? /* @__PURE__ */ jsx25("span", { className: "px-2 text-fg tabular-nums", children: /* @__PURE__ */ jsx25(MorphText, { children: `${preset.width}\xD7${preset.height}${scale < 1 ? ` \xB7 ${Math.round(scale * 100)}%` : ""}` }) }) : null;
6640
6658
  }
6641
6659
  function ViewportChip() {
6642
6660
  const preset = presetOf(useViewportState());
6643
- return /* @__PURE__ */ jsxs13(Fragment11, { children: [
6644
- /* @__PURE__ */ jsx24(MorphText, { children: preset?.label ?? "Full" }),
6645
- preset?.width ? /* @__PURE__ */ jsx24(MorphText, { className: "text-fg-secondary tabular-nums", children: `${preset.width}\xD7${preset.height}` }) : null
6661
+ return /* @__PURE__ */ jsxs14(Fragment11, { children: [
6662
+ /* @__PURE__ */ jsx25(MorphText, { children: preset?.label ?? "Full" }),
6663
+ preset?.width ? /* @__PURE__ */ jsx25(MorphText, { className: "text-fg-secondary tabular-nums", children: `${preset.width}\xD7${preset.height}` }) : null
6646
6664
  ] });
6647
6665
  }
6648
6666
  function viewport() {
6649
6667
  return definePlugin({
6650
6668
  id: "viewport",
6651
6669
  name: "Viewport",
6652
- icon: /* @__PURE__ */ jsx24(MonitorSmartphoneIcon, { className: "size-4", "aria-hidden": "true" }),
6670
+ icon: /* @__PURE__ */ jsx25(MonitorSmartphoneIcon, { className: "size-4", "aria-hidden": "true" }),
6653
6671
  separatorAfter: true,
6654
6672
  install() {
6655
6673
  const offShortcuts = registerShortcuts();
@@ -6767,7 +6785,7 @@ function resolveBreakpoint(width, breakpoints = DEFAULT_BREAKPOINTS, base = BASE
6767
6785
  }
6768
6786
 
6769
6787
  // src/plugins/breakpoint/index.tsx
6770
- import { Fragment as Fragment12, jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
6788
+ import { Fragment as Fragment12, jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
6771
6789
  var OUTLINE_ATTR = "data-devbelt-outline";
6772
6790
  var SKIPPED = ["devbelt-root", "[data-devbelt]", "[data-devbelt-window]"];
6773
6791
  var OUTLINE_CSS = `*${SKIPPED.map((s) => `:not(${s}):not(${s} *)`).join("")}{outline:1px solid rgba(239,68,68,.6)!important;outline-offset:-1px!important}`;
@@ -6830,9 +6848,9 @@ function breakpoint(options = {}) {
6830
6848
  const offs = [document, getFrameDocument()].filter((doc) => Boolean(doc)).map(applyOutline);
6831
6849
  return () => offs.forEach((off) => off());
6832
6850
  }, [on2, active, src, frameVersion]);
6833
- return /* @__PURE__ */ jsxs14(Fragment12, { children: [
6834
- /* @__PURE__ */ jsx25("span", { className: "px-2 text-fg tabular-nums", children: /* @__PURE__ */ jsx25(MorphText, { children: describe(width) }) }),
6835
- /* @__PURE__ */ jsx25(
6851
+ return /* @__PURE__ */ jsxs15(Fragment12, { children: [
6852
+ /* @__PURE__ */ jsx26("span", { className: "px-2 text-fg tabular-nums", children: /* @__PURE__ */ jsx26(MorphText, { children: describe(width) }) }),
6853
+ /* @__PURE__ */ jsx26(
6836
6854
  "button",
6837
6855
  {
6838
6856
  type: "button",
@@ -6841,19 +6859,19 @@ function breakpoint(options = {}) {
6841
6859
  "aria-pressed": on2,
6842
6860
  onClick: () => outline.set(!on2),
6843
6861
  className: `${toolbarItemClass} px-3 ${on2 ? "bg-inverse text-fg-inverse hover:bg-inverse [&_svg]:text-fg-inverse" : ""}`,
6844
- children: /* @__PURE__ */ jsx25(SquareDashedIcon, { className: "size-4", "aria-hidden": "true" })
6862
+ children: /* @__PURE__ */ jsx26(SquareDashedIcon, { className: "size-4", "aria-hidden": "true" })
6845
6863
  }
6846
6864
  )
6847
6865
  ] });
6848
6866
  }
6849
6867
  function BreakpointChip() {
6850
- return /* @__PURE__ */ jsx25("span", { className: "tabular-nums", children: /* @__PURE__ */ jsx25(MorphText, { children: describe(useWidth()) }) });
6868
+ return /* @__PURE__ */ jsx26("span", { className: "tabular-nums", children: /* @__PURE__ */ jsx26(MorphText, { children: describe(useWidth()) }) });
6851
6869
  }
6852
6870
  return definePlugin({
6853
6871
  id: "breakpoint",
6854
6872
  name: "Breakpoint",
6855
6873
  pinned: false,
6856
- icon: /* @__PURE__ */ jsx25(RulerIcon2, { className: "size-4", "aria-hidden": "true" }),
6874
+ icon: /* @__PURE__ */ jsx26(RulerIcon2, { className: "size-4", "aria-hidden": "true" }),
6857
6875
  Item: BreakpointItem,
6858
6876
  ChipStatus: BreakpointChip,
6859
6877
  agentTools: [
@@ -7037,7 +7055,7 @@ function saveFile(blob, name) {
7037
7055
  }
7038
7056
 
7039
7057
  // src/plugins/capture/index.tsx
7040
- import { Fragment as Fragment13, jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
7058
+ import { Fragment as Fragment13, jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
7041
7059
  var flash2 = createFlash();
7042
7060
  var HIDE_KEY = "capture-hide";
7043
7061
  var savedHide = (() => {
@@ -7157,7 +7175,7 @@ function Elapsed({ since }) {
7157
7175
  const timer = window.setInterval(() => setNow(Date.now()), 500);
7158
7176
  return () => window.clearInterval(timer);
7159
7177
  }, []);
7160
- return /* @__PURE__ */ jsx26(MorphText, { className: "tabular-nums", children: clock(now - since) });
7178
+ return /* @__PURE__ */ jsx27(MorphText, { className: "tabular-nums", children: clock(now - since) });
7161
7179
  }
7162
7180
  var MIN_REGION = 8;
7163
7181
  var boxOf = (a, b) => ({
@@ -7196,8 +7214,8 @@ function makeRegionOverlay(scale) {
7196
7214
  void screenshot("copy", false, scale, area);
7197
7215
  }
7198
7216
  };
7199
- return /* @__PURE__ */ jsxs15(Fragment13, { children: [
7200
- /* @__PURE__ */ jsx26(
7217
+ return /* @__PURE__ */ jsxs16(Fragment13, { children: [
7218
+ /* @__PURE__ */ jsx27(
7201
7219
  "div",
7202
7220
  {
7203
7221
  "data-react-grab-ignore": true,
@@ -7219,19 +7237,19 @@ function makeRegionOverlay(scale) {
7219
7237
  onPointerCancel: () => setDrag(null)
7220
7238
  }
7221
7239
  ),
7222
- box ? /* @__PURE__ */ jsx26(
7240
+ box ? /* @__PURE__ */ jsx27(
7223
7241
  "div",
7224
7242
  {
7225
7243
  "data-react-grab-ignore": true,
7226
7244
  className: "pointer-events-none fixed z-[9999] border border-dashed border-accent bg-accent/10",
7227
7245
  style: { left: box.x, top: box.y, width: box.width, height: box.height },
7228
- children: /* @__PURE__ */ jsxs15("span", { className: "absolute -top-6 left-0 rounded bg-accent-strong px-1.5 py-0.5 font-mono text-[11px] leading-none whitespace-nowrap text-fg", children: [
7246
+ children: /* @__PURE__ */ jsxs16("span", { className: "absolute -top-6 left-0 rounded bg-accent-strong px-1.5 py-0.5 font-mono text-[11px] leading-none whitespace-nowrap text-fg", children: [
7229
7247
  Math.round(box.width),
7230
7248
  "\xD7",
7231
7249
  Math.round(box.height)
7232
7250
  ] })
7233
7251
  }
7234
- ) : /* @__PURE__ */ jsx26(
7252
+ ) : /* @__PURE__ */ jsx27(
7235
7253
  "div",
7236
7254
  {
7237
7255
  "data-react-grab-ignore": true,
@@ -7248,12 +7266,12 @@ function makeItem({ scale, hideWhileRecording = true }) {
7248
7266
  const current = useRecording();
7249
7267
  const picking = useSelecting();
7250
7268
  const line = flash2.use();
7251
- return /* @__PURE__ */ jsxs15(Fragment13, { children: [
7252
- /* @__PURE__ */ jsxs15(Tooltip, { children: [
7253
- /* @__PURE__ */ jsx26(
7269
+ return /* @__PURE__ */ jsxs16(Fragment13, { children: [
7270
+ /* @__PURE__ */ jsxs16(Tooltip, { children: [
7271
+ /* @__PURE__ */ jsx27(
7254
7272
  TooltipTrigger,
7255
7273
  {
7256
- render: /* @__PURE__ */ jsx26(
7274
+ render: /* @__PURE__ */ jsx27(
7257
7275
  ToolbarButton,
7258
7276
  {
7259
7277
  "aria-label": "Take screenshot",
@@ -7261,16 +7279,16 @@ function makeItem({ scale, hideWhileRecording = true }) {
7261
7279
  }
7262
7280
  ),
7263
7281
  className: toolbarItemClass,
7264
- children: /* @__PURE__ */ jsx26(CameraIcon, { className: "size-4", "aria-hidden": "true" })
7282
+ children: /* @__PURE__ */ jsx27(CameraIcon, { className: "size-4", "aria-hidden": "true" })
7265
7283
  }
7266
7284
  ),
7267
- /* @__PURE__ */ jsx26(TooltipContent, { side: "top", sideOffset: 8, className: tooltipClass, children: "Copy a screenshot of the page" })
7285
+ /* @__PURE__ */ jsx27(TooltipContent, { side: "top", sideOffset: 8, className: tooltipClass, children: "Copy a screenshot of the page" })
7268
7286
  ] }),
7269
- /* @__PURE__ */ jsxs15(Tooltip, { children: [
7270
- /* @__PURE__ */ jsx26(
7287
+ /* @__PURE__ */ jsxs16(Tooltip, { children: [
7288
+ /* @__PURE__ */ jsx27(
7271
7289
  TooltipTrigger,
7272
7290
  {
7273
- render: /* @__PURE__ */ jsx26(
7291
+ render: /* @__PURE__ */ jsx27(
7274
7292
  ToolbarButton,
7275
7293
  {
7276
7294
  "aria-label": "Screenshot a region",
@@ -7279,16 +7297,16 @@ function makeItem({ scale, hideWhileRecording = true }) {
7279
7297
  }
7280
7298
  ),
7281
7299
  className: `${toolbarItemClass} ${picking ? "bg-accent/20 [&_svg]:text-accent-fg" : ""}`,
7282
- children: /* @__PURE__ */ jsx26(CropIcon, { className: "size-4", "aria-hidden": "true" })
7300
+ children: /* @__PURE__ */ jsx27(CropIcon, { className: "size-4", "aria-hidden": "true" })
7283
7301
  }
7284
7302
  ),
7285
- /* @__PURE__ */ jsx26(TooltipContent, { side: "top", sideOffset: 8, className: tooltipClass, children: "Drag over the page to copy a screenshot of that region" })
7303
+ /* @__PURE__ */ jsx27(TooltipContent, { side: "top", sideOffset: 8, className: tooltipClass, children: "Drag over the page to copy a screenshot of that region" })
7286
7304
  ] }),
7287
- canRecord() ? /* @__PURE__ */ jsxs15(Tooltip, { children: [
7288
- /* @__PURE__ */ jsx26(
7305
+ canRecord() ? /* @__PURE__ */ jsxs16(Tooltip, { children: [
7306
+ /* @__PURE__ */ jsx27(
7289
7307
  TooltipTrigger,
7290
7308
  {
7291
- render: /* @__PURE__ */ jsx26(
7309
+ render: /* @__PURE__ */ jsx27(
7292
7310
  ToolbarButton,
7293
7311
  {
7294
7312
  "aria-label": current ? "Stop recording" : "Record screen",
@@ -7297,15 +7315,15 @@ function makeItem({ scale, hideWhileRecording = true }) {
7297
7315
  }
7298
7316
  ),
7299
7317
  className: `${toolbarItemClass} ${current ? "text-danger-fg" : ""}`,
7300
- children: current ? /* @__PURE__ */ jsxs15(Fragment13, { children: [
7301
- /* @__PURE__ */ jsx26(SquareIcon, { className: "size-3.5 fill-current", "aria-hidden": "true" }),
7302
- /* @__PURE__ */ jsx26(Elapsed, { since: current.startedAt })
7303
- ] }) : /* @__PURE__ */ jsx26(CircleIcon, { className: "size-4", "aria-hidden": "true" })
7318
+ children: current ? /* @__PURE__ */ jsxs16(Fragment13, { children: [
7319
+ /* @__PURE__ */ jsx27(SquareIcon, { className: "size-3.5 fill-current", "aria-hidden": "true" }),
7320
+ /* @__PURE__ */ jsx27(Elapsed, { since: current.startedAt })
7321
+ ] }) : /* @__PURE__ */ jsx27(CircleIcon, { className: "size-4", "aria-hidden": "true" })
7304
7322
  }
7305
7323
  ),
7306
- /* @__PURE__ */ jsx26(TooltipContent, { side: "top", sideOffset: 8, className: tooltipClass, children: current ? "Stop and save the recording" : "Record the screen as a video" })
7324
+ /* @__PURE__ */ jsx27(TooltipContent, { side: "top", sideOffset: 8, className: tooltipClass, children: current ? "Stop and save the recording" : "Record the screen as a video" })
7307
7325
  ] }) : null,
7308
- line ? /* @__PURE__ */ jsx26("span", { className: "px-2 text-fg", children: /* @__PURE__ */ jsx26(MorphText, { children: line }) }) : null
7326
+ line ? /* @__PURE__ */ jsx27("span", { className: "px-2 text-fg", children: /* @__PURE__ */ jsx27(MorphText, { children: line }) }) : null
7309
7327
  ] });
7310
7328
  };
7311
7329
  }
@@ -7314,69 +7332,69 @@ function makeMenuSection({ scale, hideWhileRecording = true }) {
7314
7332
  const api = useToolbar();
7315
7333
  const current = useRecording();
7316
7334
  const hide = useSavedHide() ?? hideWhileRecording;
7317
- return /* @__PURE__ */ jsxs15(MenuGroup, { children: [
7318
- /* @__PURE__ */ jsx26(MenuGroupLabel, { className: menuLabelClass, children: "Capture" }),
7319
- /* @__PURE__ */ jsxs15(
7335
+ return /* @__PURE__ */ jsxs16(MenuGroup, { children: [
7336
+ /* @__PURE__ */ jsx27(MenuGroupLabel, { className: menuLabelClass, children: "Capture" }),
7337
+ /* @__PURE__ */ jsxs16(
7320
7338
  MenuItem,
7321
7339
  {
7322
7340
  value: "capture:copy",
7323
7341
  className: menuItemClass,
7324
7342
  onSelect: () => void screenshot("copy", false, scale),
7325
7343
  children: [
7326
- /* @__PURE__ */ jsx26(CopyIcon4, { className: menuIconClass, "aria-hidden": "true" }),
7344
+ /* @__PURE__ */ jsx27(CopyIcon4, { className: menuIconClass, "aria-hidden": "true" }),
7327
7345
  "Copy screenshot"
7328
7346
  ]
7329
7347
  }
7330
7348
  ),
7331
- /* @__PURE__ */ jsxs15(
7349
+ /* @__PURE__ */ jsxs16(
7332
7350
  MenuItem,
7333
7351
  {
7334
7352
  value: "capture:region",
7335
7353
  className: menuItemClass,
7336
7354
  onSelect: () => setSelecting(true),
7337
7355
  children: [
7338
- /* @__PURE__ */ jsx26(CropIcon, { className: menuIconClass, "aria-hidden": "true" }),
7356
+ /* @__PURE__ */ jsx27(CropIcon, { className: menuIconClass, "aria-hidden": "true" }),
7339
7357
  "Screenshot a region"
7340
7358
  ]
7341
7359
  }
7342
7360
  ),
7343
- /* @__PURE__ */ jsxs15(
7361
+ /* @__PURE__ */ jsxs16(
7344
7362
  MenuItem,
7345
7363
  {
7346
7364
  value: "capture:save",
7347
7365
  className: menuItemClass,
7348
7366
  onSelect: () => void screenshot("download", false, scale),
7349
7367
  children: [
7350
- /* @__PURE__ */ jsx26(DownloadIcon, { className: menuIconClass, "aria-hidden": "true" }),
7368
+ /* @__PURE__ */ jsx27(DownloadIcon, { className: menuIconClass, "aria-hidden": "true" }),
7351
7369
  "Save screenshot"
7352
7370
  ]
7353
7371
  }
7354
7372
  ),
7355
- /* @__PURE__ */ jsxs15(
7373
+ /* @__PURE__ */ jsxs16(
7356
7374
  MenuItem,
7357
7375
  {
7358
7376
  value: "capture:full",
7359
7377
  className: menuItemClass,
7360
7378
  onSelect: () => void screenshot("download", true, scale),
7361
7379
  children: [
7362
- /* @__PURE__ */ jsx26(ArrowDownToLineIcon, { className: menuIconClass, "aria-hidden": "true" }),
7380
+ /* @__PURE__ */ jsx27(ArrowDownToLineIcon, { className: menuIconClass, "aria-hidden": "true" }),
7363
7381
  "Save full-page screenshot"
7364
7382
  ]
7365
7383
  }
7366
7384
  ),
7367
- canRecord() ? /* @__PURE__ */ jsxs15(
7385
+ canRecord() ? /* @__PURE__ */ jsxs16(
7368
7386
  MenuItem,
7369
7387
  {
7370
7388
  value: "capture:record",
7371
7389
  className: menuItemClass,
7372
7390
  onSelect: () => void toggleRecording(api, hideWhileRecording),
7373
7391
  children: [
7374
- current ? /* @__PURE__ */ jsx26(SquareIcon, { className: `${menuIconClass} fill-current`, "aria-hidden": "true" }) : /* @__PURE__ */ jsx26(CircleIcon, { className: menuIconClass, "aria-hidden": "true" }),
7392
+ current ? /* @__PURE__ */ jsx27(SquareIcon, { className: `${menuIconClass} fill-current`, "aria-hidden": "true" }) : /* @__PURE__ */ jsx27(CircleIcon, { className: menuIconClass, "aria-hidden": "true" }),
7375
7393
  current ? "Stop recording" : "Record screen"
7376
7394
  ]
7377
7395
  }
7378
7396
  ) : null,
7379
- canRecord() ? /* @__PURE__ */ jsxs15(
7397
+ canRecord() ? /* @__PURE__ */ jsxs16(
7380
7398
  MenuCheckboxItem,
7381
7399
  {
7382
7400
  value: "capture:hide",
@@ -7384,8 +7402,8 @@ function makeMenuSection({ scale, hideWhileRecording = true }) {
7384
7402
  onCheckedChange: setSavedHide,
7385
7403
  className: menuItemClass,
7386
7404
  children: [
7387
- /* @__PURE__ */ jsx26(MenuItemIndicator, { keepMounted: true, className: menuIndicatorClass, children: /* @__PURE__ */ jsx26(CheckIcon5, { className: "size-3.5", "aria-hidden": "true" }) }),
7388
- /* @__PURE__ */ jsx26(EyeOffIcon, { className: menuIconClass, "aria-hidden": "true" }),
7405
+ /* @__PURE__ */ jsx27(MenuItemIndicator, { keepMounted: true, className: menuIndicatorClass, children: /* @__PURE__ */ jsx27(CheckIcon5, { className: "size-3.5", "aria-hidden": "true" }) }),
7406
+ /* @__PURE__ */ jsx27(EyeOffIcon, { className: menuIconClass, "aria-hidden": "true" }),
7389
7407
  "Hide toolbar while recording"
7390
7408
  ]
7391
7409
  }
@@ -7395,9 +7413,9 @@ function makeMenuSection({ scale, hideWhileRecording = true }) {
7395
7413
  }
7396
7414
  function CaptureChip() {
7397
7415
  const current = useRecording();
7398
- return current ? /* @__PURE__ */ jsxs15("span", { className: "inline-flex items-center gap-1 text-danger-fg", children: [
7399
- /* @__PURE__ */ jsx26(CircleIcon, { className: "size-2.5 fill-current", "aria-hidden": "true" }),
7400
- /* @__PURE__ */ jsx26(Elapsed, { since: current.startedAt })
7416
+ return current ? /* @__PURE__ */ jsxs16("span", { className: "inline-flex items-center gap-1 text-danger-fg", children: [
7417
+ /* @__PURE__ */ jsx27(CircleIcon, { className: "size-2.5 fill-current", "aria-hidden": "true" }),
7418
+ /* @__PURE__ */ jsx27(Elapsed, { since: current.startedAt })
7401
7419
  ] }) : null;
7402
7420
  }
7403
7421
  function capture(options = {}) {
@@ -7405,7 +7423,7 @@ function capture(options = {}) {
7405
7423
  id: "capture",
7406
7424
  name: "Screenshot & recording",
7407
7425
  label: "Screenshot and recording",
7408
- icon: /* @__PURE__ */ jsx26(CameraIcon, { className: "size-4", "aria-hidden": "true" }),
7426
+ icon: /* @__PURE__ */ jsx27(CameraIcon, { className: "size-4", "aria-hidden": "true" }),
7409
7427
  Item: makeItem(options),
7410
7428
  Overlay: makeRegionOverlay(options.scale),
7411
7429
  MenuSection: makeMenuSection(options),
@@ -7665,9 +7683,17 @@ function pollCookiesWhileOpen() {
7665
7683
 
7666
7684
  // src/plugins/storage/panel.tsx
7667
7685
  import { useEffect as useEffect8, useState as useState10 } from "react";
7668
- import { CheckIcon as CheckIcon6, EyeIcon, EyeOffIcon as EyeOffIcon2, PencilIcon, Trash2Icon as Trash2Icon2, XIcon as XIcon2 } from "lucide-react";
7669
- import { Fragment as Fragment14, jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
7686
+ import {
7687
+ CheckIcon as CheckIcon6,
7688
+ EyeIcon,
7689
+ EyeOffIcon as EyeOffIcon2,
7690
+ PencilIcon,
7691
+ Trash2Icon as Trash2Icon2,
7692
+ XIcon as XIcon2
7693
+ } from "lucide-react";
7694
+ import { Fragment as Fragment14, jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
7670
7695
  var PREVIEW_CHARS = 80;
7696
+ var ROW_CAP = 200;
7671
7697
  var DETAIL_CHARS = 240;
7672
7698
  function preview(value) {
7673
7699
  return value.length <= PREVIEW_CHARS ? value : `${value.slice(0, PREVIEW_CHARS)}\u2026`;
@@ -7690,21 +7716,28 @@ function EntryDetail3({
7690
7716
  const full = hidden ? redact(entry.key, entry.value, pattern) : formatStorageValue(entry.value);
7691
7717
  const clipped = !hidden && !expanded && full.length > DETAIL_CHARS;
7692
7718
  const text3 = clipped ? `${full.slice(0, DETAIL_CHARS)}\u2026` : full;
7693
- return /* @__PURE__ */ jsxs16("section", { "aria-label": `Details for ${entry.key}`, className: "mt-3 border-t border-line pt-3", children: [
7694
- /* @__PURE__ */ jsxs16("div", { className: "mb-1 flex items-center gap-2", children: [
7695
- /* @__PURE__ */ jsx27("h3", { className: "font-semibold text-fg", children: entry.key }),
7696
- !hidden && full.length > DETAIL_CHARS ? /* @__PURE__ */ jsx27(
7697
- Button,
7698
- {
7699
- "aria-label": expanded ? "Collapse value" : "Expand value",
7700
- className: `${textButtonClass} text-fg-secondary`,
7701
- onClick: () => setExpanded((current) => !current),
7702
- children: expanded ? "Collapse" : "Expand"
7703
- }
7704
- ) : null
7705
- ] }),
7706
- hidden ? /* @__PURE__ */ jsx27("p", { className: "font-mono text-[11px] break-all text-fg-secondary", children: text3 }) : /* @__PURE__ */ jsx27(JsonCode, { code: text3 })
7707
- ] });
7719
+ return /* @__PURE__ */ jsxs17(
7720
+ "section",
7721
+ {
7722
+ "aria-label": `Details for ${entry.key}`,
7723
+ className: "mt-3 border-t border-line pt-3",
7724
+ children: [
7725
+ /* @__PURE__ */ jsxs17("div", { className: "mb-1 flex items-center gap-2", children: [
7726
+ /* @__PURE__ */ jsx28("h3", { className: "font-semibold text-fg", children: entry.key }),
7727
+ !hidden && full.length > DETAIL_CHARS ? /* @__PURE__ */ jsx28(
7728
+ Button,
7729
+ {
7730
+ "aria-label": expanded ? "Collapse value" : "Expand value",
7731
+ className: `${textButtonClass} text-fg-secondary`,
7732
+ onClick: () => setExpanded((current) => !current),
7733
+ children: expanded ? "Collapse" : "Expand"
7734
+ }
7735
+ ) : null
7736
+ ] }),
7737
+ hidden ? /* @__PURE__ */ jsx28("p", { className: "font-mono text-[11px] break-all text-fg-secondary", children: text3 }) : /* @__PURE__ */ jsx28(JsonCode, { code: text3 })
7738
+ ]
7739
+ }
7740
+ );
7708
7741
  }
7709
7742
  var TAB_KEY = "storage-tab";
7710
7743
  function readSavedTab(enabled) {
@@ -7725,7 +7758,9 @@ function StoragePanel({
7725
7758
  }) {
7726
7759
  const enabled = resolveStorageStores(stores);
7727
7760
  const [state3, setState] = useState10(readStorageState);
7728
- const [active, setActive] = useState10(() => readSavedTab(enabled));
7761
+ const [active, setActive] = useState10(
7762
+ () => readSavedTab(enabled)
7763
+ );
7729
7764
  const { entries, unavailable } = state3;
7730
7765
  const [revealed, setRevealed] = useState10(null);
7731
7766
  const [confirming, setConfirming] = useState10(null);
@@ -7737,7 +7772,9 @@ function StoragePanel({
7737
7772
  const [newKey, setNewKey] = useState10("");
7738
7773
  const [newValue, setNewValue] = useState10("");
7739
7774
  useEffect8(() => {
7740
- const unsubscribe = subscribeStorageChanges(() => setState(readStorageState()));
7775
+ const unsubscribe = subscribeStorageChanges(
7776
+ () => setState(readStorageState())
7777
+ );
7741
7778
  const stopPolling = pollCookiesWhileOpen();
7742
7779
  return () => {
7743
7780
  unsubscribe();
@@ -7775,218 +7812,325 @@ function StoragePanel({
7775
7812
  }
7776
7813
  refresh();
7777
7814
  };
7778
- return /* @__PURE__ */ jsxs16("div", { className: "flex min-h-0 flex-1 flex-col", children: [
7779
- /* @__PURE__ */ jsx27("div", { className: "flex items-center gap-2 border-b border-line px-3 py-2", children: /* @__PURE__ */ jsx27("p", { className: "min-w-0 flex-1 text-fg-secondary", children: HTTP_ONLY_NOTE }) }),
7780
- error ? /* @__PURE__ */ jsx27("p", { role: "alert", className: "border-b border-line px-3 py-1 text-danger-fg", children: error }) : null,
7781
- store ? /* @__PURE__ */ jsxs16(Tabs, { value: store, onValueChange: selectStore, className: "flex min-h-0 flex-1 flex-col", children: [
7782
- /* @__PURE__ */ jsx27(TabsList, { "aria-label": "Stores", className: "flex gap-1 border-b border-line px-2 py-1.5", children: enabled.map((item) => /* @__PURE__ */ jsx27(TabsTab, { value: item, className: tabClass2, children: TITLE[item] }, item)) }),
7783
- /* @__PURE__ */ jsx27(TabsPanel, { value: store, className: "min-h-0 flex-1 scrollbar-slim scroll-fade overflow-auto p-3", children: (() => {
7784
- const all = entries.filter((e) => e.store === store);
7785
- const needle = query.trim().toLowerCase();
7786
- const list = needle ? all.filter((e) => e.key.toLowerCase().includes(needle)) : all;
7787
- const section = /* @__PURE__ */ jsxs16("section", { "aria-label": TITLE[store], className: "mb-4", children: [
7788
- store === "cookies" ? /* @__PURE__ */ jsx27("p", { className: "mb-2 text-fg-secondary", children: COOKIE_PATH_NOTE }) : null,
7789
- /* @__PURE__ */ jsx27(
7790
- Input,
7815
+ return /* @__PURE__ */ jsxs17("div", { className: "flex min-h-0 flex-1 flex-col", children: [
7816
+ /* @__PURE__ */ jsx28("div", { className: "flex items-center gap-2 border-b border-line px-3 py-2", children: /* @__PURE__ */ jsx28("p", { className: "min-w-0 flex-1 text-fg-secondary", children: HTTP_ONLY_NOTE }) }),
7817
+ error ? /* @__PURE__ */ jsx28(
7818
+ "p",
7819
+ {
7820
+ role: "alert",
7821
+ className: "border-b border-line px-3 py-1 text-danger-fg",
7822
+ children: error
7823
+ }
7824
+ ) : null,
7825
+ store ? /* @__PURE__ */ jsxs17(
7826
+ Tabs,
7827
+ {
7828
+ value: store,
7829
+ onValueChange: selectStore,
7830
+ className: "flex min-h-0 flex-1 flex-col",
7831
+ children: [
7832
+ /* @__PURE__ */ jsx28(
7833
+ TabsList,
7791
7834
  {
7792
- "aria-label": "Filter entries",
7793
- placeholder: "Filter by key",
7794
- value: query,
7795
- onChange: (ev) => setQuery(ev.target.value),
7796
- className: "mb-2 h-7 w-full min-w-0 rounded-md border border-line bg-hover-subtle px-2 text-xs text-fg placeholder:text-fg-disabled focus-visible:outline-2 focus-visible:outline-focus"
7835
+ "aria-label": "Stores",
7836
+ className: "flex gap-1 border-b border-line px-2 py-1.5",
7837
+ children: enabled.map((item) => /* @__PURE__ */ jsx28(TabsTab, { value: item, className: tabClass2, children: TITLE[item] }, item))
7797
7838
  }
7798
7839
  ),
7799
- /* @__PURE__ */ jsxs16("div", { className: "mb-1 flex items-center gap-2", children: [
7800
- /* @__PURE__ */ jsxs16("h3", { className: "font-semibold text-fg", children: [
7801
- TITLE[store],
7802
- " ",
7803
- /* @__PURE__ */ jsx27("span", { className: "tabular-nums text-fg-tertiary", children: list.length })
7804
- ] }),
7805
- all.length > 0 && confirming === store ? /* @__PURE__ */ jsxs16("span", { className: "ml-auto flex items-center gap-2 text-fg", children: [
7806
- "Clear all of ",
7807
- TITLE[store],
7808
- "?",
7809
- /* @__PURE__ */ jsx27(
7810
- Button,
7811
- {
7812
- "aria-label": `Confirm clearing ${TITLE[store]}`,
7813
- className: `${textButtonClass} text-danger-fg`,
7814
- onClick: () => {
7815
- setConfirming(null);
7816
- attempt(() => clearStorageStore(store));
7817
- },
7818
- children: "Clear"
7819
- }
7820
- ),
7821
- /* @__PURE__ */ jsx27(
7822
- Button,
7823
- {
7824
- "aria-label": `Cancel clearing ${TITLE[store]}`,
7825
- className: `${textButtonClass} text-fg-secondary`,
7826
- onClick: () => setConfirming(null),
7827
- children: "Cancel"
7828
- }
7829
- )
7830
- ] }) : all.length > 0 ? /* @__PURE__ */ jsx27(
7831
- Button,
7832
- {
7833
- "aria-label": `Clear ${TITLE[store]}`,
7834
- className: `${textButtonClass} ml-auto text-fg-secondary`,
7835
- onClick: () => setConfirming(store),
7836
- children: "Clear"
7837
- }
7838
- ) : null,
7839
- unavailable[store] === void 0 && !adding ? /* @__PURE__ */ jsx27(Button, { "aria-label": "Add entry", className: `${textButtonClass} text-fg-secondary`, onClick: () => setAdding(true), children: "Add" }) : null
7840
- ] }),
7841
- adding && unavailable[store] === void 0 ? /* @__PURE__ */ jsxs16("div", { className: "mb-2 flex flex-wrap items-center gap-2", children: [
7842
- /* @__PURE__ */ jsx27(
7843
- Input,
7844
- {
7845
- "aria-label": "New key",
7846
- placeholder: "Key",
7847
- value: newKey,
7848
- onChange: (ev) => setNewKey(ev.target.value),
7849
- className: "h-7 min-w-0 flex-1 rounded-md border border-line bg-hover-subtle px-2 text-xs text-fg",
7850
- autoFocus: true
7851
- }
7852
- ),
7853
- /* @__PURE__ */ jsx27(
7854
- Input,
7855
- {
7856
- "aria-label": "New value",
7857
- placeholder: "Value",
7858
- value: newValue,
7859
- onChange: (ev) => setNewValue(ev.target.value),
7860
- onKeyDown: (ev) => {
7861
- if (ev.key === "Enter") saveNew();
7862
- if (ev.key === "Escape") setAdding(false);
7863
- },
7864
- className: "h-7 min-w-0 flex-1 rounded-md border border-line bg-hover-subtle px-2 text-xs text-fg"
7865
- }
7866
- ),
7867
- /* @__PURE__ */ jsx27(Button, { "aria-label": "Save new entry", className: `${textButtonClass} text-fg`, onClick: saveNew, children: "Save" }),
7868
- /* @__PURE__ */ jsx27(
7869
- Button,
7870
- {
7871
- "aria-label": "Cancel new entry",
7872
- className: `${textButtonClass} text-fg-secondary`,
7873
- onClick: () => {
7874
- setAdding(false);
7875
- setNewKey("");
7876
- setNewValue("");
7877
- },
7878
- children: "Cancel"
7879
- }
7880
- )
7881
- ] }) : null,
7882
- unavailable[store] !== void 0 ? /* @__PURE__ */ jsxs16("p", { role: "status", className: "text-warning-fg", children: [
7883
- "Unavailable: ",
7884
- unavailable[store],
7885
- ". This is not an empty store."
7886
- ] }) : all.length === 0 ? /* @__PURE__ */ jsx27("p", { className: "text-fg-tertiary", children: "Empty." }) : list.length === 0 ? /* @__PURE__ */ jsx27("p", { className: "text-fg-tertiary", children: "No matches." }) : /* @__PURE__ */ jsx27("dl", { className: "grid grid-cols-[minmax(0,12rem)_minmax(0,1fr)_auto_auto] gap-x-3 gap-y-1 font-mono text-[11px]", children: list.map((e) => {
7887
- const hidden = isRedacted2(e.key, pattern);
7888
- const isRevealed = hidden && revealed?.store === e.store && revealed.key === e.key;
7889
- const isEditing = editing?.store === e.store && editing.key === e.key;
7890
- const save = () => attempt(() => {
7891
- setStorageEntry(e.store, e.key, editing.draft);
7892
- setEditing(null);
7893
- });
7894
- return /* @__PURE__ */ jsxs16("div", { className: "contents", children: [
7895
- /* @__PURE__ */ jsx27("dt", { className: "truncate", title: e.key, children: /* @__PURE__ */ jsx27(
7896
- Button,
7897
- {
7898
- "aria-pressed": selected?.store === e.store && selected.key === e.key,
7899
- className: `${textButtonClass} max-w-full truncate text-fg`,
7900
- onClick: () => setSelected(
7901
- selected?.store === e.store && selected.key === e.key ? null : { store: e.store, key: e.key }
7902
- ),
7903
- children: e.key
7904
- }
7905
- ) }),
7906
- /* @__PURE__ */ jsx27("dd", { className: "m-0 break-all text-fg-secondary", children: isEditing ? /* @__PURE__ */ jsx27(
7907
- Input,
7908
- {
7909
- "aria-label": `Value for ${e.key}`,
7910
- placeholder: isRedacted2(e.key, pattern) ? "New value (current is hidden)" : "",
7911
- value: editing.draft,
7912
- onChange: (ev) => setEditing({ ...editing, draft: ev.target.value }),
7913
- onKeyDown: (ev) => {
7914
- if (ev.key === "Enter") save();
7915
- if (ev.key === "Escape") setEditing(null);
7916
- },
7917
- autoFocus: true
7918
- }
7919
- ) : hidden && !isRevealed ? redact(e.key, e.value, pattern) : preview(e.value) }),
7920
- /* @__PURE__ */ jsx27("dd", { className: "m-0 tabular-nums text-fg-tertiary", children: e.size }),
7921
- /* @__PURE__ */ jsxs16("dd", { className: "m-0 flex gap-1", children: [
7922
- isEditing ? /* @__PURE__ */ jsxs16(Fragment14, { children: [
7923
- /* @__PURE__ */ jsx27(Button, { "aria-label": `Save ${e.key}`, className: iconButtonClass, onClick: save, children: /* @__PURE__ */ jsx27(CheckIcon6, { className: "size-3.5", "aria-hidden": "true" }) }),
7924
- /* @__PURE__ */ jsx27(
7925
- Button,
7926
- {
7927
- "aria-label": `Cancel editing ${e.key}`,
7928
- className: iconButtonClass,
7929
- onClick: () => setEditing(null),
7930
- children: /* @__PURE__ */ jsx27(XIcon2, { className: "size-3.5", "aria-hidden": "true" })
7931
- }
7932
- )
7933
- ] }) : /* @__PURE__ */ jsxs16(Fragment14, { children: [
7934
- hidden ? /* @__PURE__ */ jsx27(
7935
- Button,
7840
+ /* @__PURE__ */ jsx28(
7841
+ TabsPanel,
7842
+ {
7843
+ value: store,
7844
+ className: "min-h-0 flex-1 scrollbar-slim scroll-fade overflow-auto p-3",
7845
+ children: (() => {
7846
+ const all = entries.filter((e) => e.store === store);
7847
+ const needle = query.trim().toLowerCase();
7848
+ const list = needle ? all.filter((e) => e.key.toLowerCase().includes(needle)) : all;
7849
+ const section = /* @__PURE__ */ jsxs17("section", { "aria-label": TITLE[store], className: "mb-4", children: [
7850
+ store === "cookies" ? /* @__PURE__ */ jsx28("p", { className: "mb-2 text-fg-secondary", children: COOKIE_PATH_NOTE }) : null,
7851
+ /* @__PURE__ */ jsx28(
7852
+ Input,
7936
7853
  {
7937
- "aria-label": `${isRevealed ? "Hide" : "Reveal"} ${e.key}`,
7938
- className: iconButtonClass,
7939
- onClick: () => setRevealed(isRevealed ? null : { store: e.store, key: e.key }),
7940
- children: isRevealed ? /* @__PURE__ */ jsx27(EyeOffIcon2, { className: "size-3.5", "aria-hidden": "true" }) : /* @__PURE__ */ jsx27(EyeIcon, { className: "size-3.5", "aria-hidden": "true" })
7854
+ "aria-label": "Filter entries",
7855
+ placeholder: "Filter by key",
7856
+ value: query,
7857
+ onChange: (ev) => setQuery(ev.target.value),
7858
+ className: "mb-2 h-7 w-full min-w-0 rounded-md border border-line bg-hover-subtle px-2 text-xs text-fg placeholder:text-fg-disabled focus-visible:outline-2 focus-visible:outline-focus"
7941
7859
  }
7942
- ) : null,
7943
- /* @__PURE__ */ jsx27(
7944
- Button,
7860
+ ),
7861
+ /* @__PURE__ */ jsxs17("div", { className: "mb-1 flex items-center gap-2", children: [
7862
+ /* @__PURE__ */ jsxs17("h3", { className: "font-semibold text-fg", children: [
7863
+ TITLE[store],
7864
+ " ",
7865
+ /* @__PURE__ */ jsx28("span", { className: "tabular-nums text-fg-tertiary", children: list.length })
7866
+ ] }),
7867
+ all.length > 0 && confirming === store ? /* @__PURE__ */ jsxs17("span", { className: "ml-auto flex items-center gap-2 text-fg", children: [
7868
+ "Clear all of ",
7869
+ TITLE[store],
7870
+ "?",
7871
+ /* @__PURE__ */ jsx28(
7872
+ Button,
7873
+ {
7874
+ "aria-label": `Confirm clearing ${TITLE[store]}`,
7875
+ className: `${textButtonClass} text-danger-fg`,
7876
+ onClick: () => {
7877
+ setConfirming(null);
7878
+ attempt(() => clearStorageStore(store));
7879
+ },
7880
+ children: "Clear"
7881
+ }
7882
+ ),
7883
+ /* @__PURE__ */ jsx28(
7884
+ Button,
7885
+ {
7886
+ "aria-label": `Cancel clearing ${TITLE[store]}`,
7887
+ className: `${textButtonClass} text-fg-secondary`,
7888
+ onClick: () => setConfirming(null),
7889
+ children: "Cancel"
7890
+ }
7891
+ )
7892
+ ] }) : all.length > 0 ? /* @__PURE__ */ jsx28(
7893
+ Button,
7894
+ {
7895
+ "aria-label": `Clear ${TITLE[store]}`,
7896
+ className: `${textButtonClass} ml-auto text-fg-secondary`,
7897
+ onClick: () => setConfirming(store),
7898
+ children: "Clear"
7899
+ }
7900
+ ) : null,
7901
+ unavailable[store] === void 0 && !adding ? /* @__PURE__ */ jsx28(
7902
+ Button,
7903
+ {
7904
+ "aria-label": "Add entry",
7905
+ className: `${textButtonClass} text-fg-secondary`,
7906
+ onClick: () => setAdding(true),
7907
+ children: "Add"
7908
+ }
7909
+ ) : null
7910
+ ] }),
7911
+ adding && unavailable[store] === void 0 ? /* @__PURE__ */ jsxs17("div", { className: "mb-2 flex flex-wrap items-center gap-2", children: [
7912
+ /* @__PURE__ */ jsx28(
7913
+ Input,
7914
+ {
7915
+ "aria-label": "New key",
7916
+ placeholder: "Key",
7917
+ value: newKey,
7918
+ onChange: (ev) => setNewKey(ev.target.value),
7919
+ className: "h-7 min-w-0 flex-1 rounded-md border border-line bg-hover-subtle px-2 text-xs text-fg",
7920
+ autoFocus: true
7921
+ }
7922
+ ),
7923
+ /* @__PURE__ */ jsx28(
7924
+ Input,
7925
+ {
7926
+ "aria-label": "New value",
7927
+ placeholder: "Value",
7928
+ value: newValue,
7929
+ onChange: (ev) => setNewValue(ev.target.value),
7930
+ onKeyDown: (ev) => {
7931
+ if (ev.key === "Enter") saveNew();
7932
+ if (ev.key === "Escape") setAdding(false);
7933
+ },
7934
+ className: "h-7 min-w-0 flex-1 rounded-md border border-line bg-hover-subtle px-2 text-xs text-fg"
7935
+ }
7936
+ ),
7937
+ /* @__PURE__ */ jsx28(
7938
+ Button,
7939
+ {
7940
+ "aria-label": "Save new entry",
7941
+ className: `${textButtonClass} text-fg`,
7942
+ onClick: saveNew,
7943
+ children: "Save"
7944
+ }
7945
+ ),
7946
+ /* @__PURE__ */ jsx28(
7947
+ Button,
7948
+ {
7949
+ "aria-label": "Cancel new entry",
7950
+ className: `${textButtonClass} text-fg-secondary`,
7951
+ onClick: () => {
7952
+ setAdding(false);
7953
+ setNewKey("");
7954
+ setNewValue("");
7955
+ },
7956
+ children: "Cancel"
7957
+ }
7958
+ )
7959
+ ] }) : null,
7960
+ unavailable[store] !== void 0 ? /* @__PURE__ */ jsxs17("p", { role: "status", className: "text-warning-fg", children: [
7961
+ "Unavailable: ",
7962
+ unavailable[store],
7963
+ ". This is not an empty store."
7964
+ ] }) : all.length === 0 ? /* @__PURE__ */ jsx28("p", { className: "text-fg-tertiary", children: "Empty." }) : list.length === 0 ? /* @__PURE__ */ jsx28("p", { className: "text-fg-tertiary", children: "No matches." }) : /* @__PURE__ */ jsxs17(Fragment14, { children: [
7965
+ /* @__PURE__ */ jsx28("dl", { className: "grid grid-cols-[minmax(0,12rem)_minmax(0,1fr)_auto_auto] gap-x-3 gap-y-1 font-mono text-[11px]", children: list.slice(0, ROW_CAP).map((e) => {
7966
+ const hidden = isRedacted2(e.key, pattern);
7967
+ const isRevealed = hidden && revealed?.store === e.store && revealed.key === e.key;
7968
+ const isEditing = editing?.store === e.store && editing.key === e.key;
7969
+ const save = () => attempt(() => {
7970
+ setStorageEntry(e.store, e.key, editing.draft);
7971
+ setEditing(null);
7972
+ });
7973
+ return /* @__PURE__ */ jsxs17("div", { className: "contents", children: [
7974
+ /* @__PURE__ */ jsx28("dt", { className: "min-w-0", children: /* @__PURE__ */ jsx28(
7975
+ Button,
7976
+ {
7977
+ "aria-pressed": selected?.store === e.store && selected.key === e.key,
7978
+ className: `${textButtonClass} max-w-full text-fg`,
7979
+ onClick: () => setSelected(
7980
+ selected?.store === e.store && selected.key === e.key ? null : { store: e.store, key: e.key }
7981
+ ),
7982
+ children: /* @__PURE__ */ jsx28(MiddleTruncate, { text: e.key })
7983
+ }
7984
+ ) }),
7985
+ /* @__PURE__ */ jsx28("dd", { className: "m-0 break-all text-fg-secondary", children: isEditing ? /* @__PURE__ */ jsx28(
7986
+ Input,
7987
+ {
7988
+ "aria-label": `Value for ${e.key}`,
7989
+ placeholder: isRedacted2(e.key, pattern) ? "New value (current is hidden)" : "",
7990
+ value: editing.draft,
7991
+ onChange: (ev) => setEditing({
7992
+ ...editing,
7993
+ draft: ev.target.value
7994
+ }),
7995
+ onKeyDown: (ev) => {
7996
+ if (ev.key === "Enter") save();
7997
+ if (ev.key === "Escape") setEditing(null);
7998
+ },
7999
+ autoFocus: true
8000
+ }
8001
+ ) : hidden && !isRevealed ? redact(e.key, e.value, pattern) : preview(e.value) }),
8002
+ /* @__PURE__ */ jsx28("dd", { className: "m-0 tabular-nums text-fg-tertiary", children: e.size }),
8003
+ /* @__PURE__ */ jsxs17("dd", { className: "m-0 flex gap-1", children: [
8004
+ isEditing ? /* @__PURE__ */ jsxs17(Fragment14, { children: [
8005
+ /* @__PURE__ */ jsx28(
8006
+ Button,
8007
+ {
8008
+ "aria-label": `Save ${e.key}`,
8009
+ className: iconButtonClass,
8010
+ onClick: save,
8011
+ children: /* @__PURE__ */ jsx28(
8012
+ CheckIcon6,
8013
+ {
8014
+ className: "size-3.5",
8015
+ "aria-hidden": "true"
8016
+ }
8017
+ )
8018
+ }
8019
+ ),
8020
+ /* @__PURE__ */ jsx28(
8021
+ Button,
8022
+ {
8023
+ "aria-label": `Cancel editing ${e.key}`,
8024
+ className: iconButtonClass,
8025
+ onClick: () => setEditing(null),
8026
+ children: /* @__PURE__ */ jsx28(
8027
+ XIcon2,
8028
+ {
8029
+ className: "size-3.5",
8030
+ "aria-hidden": "true"
8031
+ }
8032
+ )
8033
+ }
8034
+ )
8035
+ ] }) : /* @__PURE__ */ jsxs17(Fragment14, { children: [
8036
+ hidden ? /* @__PURE__ */ jsx28(
8037
+ Button,
8038
+ {
8039
+ "aria-label": `${isRevealed ? "Hide" : "Reveal"} ${e.key}`,
8040
+ className: iconButtonClass,
8041
+ onClick: () => setRevealed(
8042
+ isRevealed ? null : { store: e.store, key: e.key }
8043
+ ),
8044
+ children: isRevealed ? /* @__PURE__ */ jsx28(
8045
+ EyeOffIcon2,
8046
+ {
8047
+ className: "size-3.5",
8048
+ "aria-hidden": "true"
8049
+ }
8050
+ ) : /* @__PURE__ */ jsx28(
8051
+ EyeIcon,
8052
+ {
8053
+ className: "size-3.5",
8054
+ "aria-hidden": "true"
8055
+ }
8056
+ )
8057
+ }
8058
+ ) : null,
8059
+ /* @__PURE__ */ jsx28(
8060
+ Button,
8061
+ {
8062
+ "aria-label": `Edit ${e.key}`,
8063
+ className: iconButtonClass,
8064
+ onClick: () => setEditing({
8065
+ store: e.store,
8066
+ key: e.key,
8067
+ // A Redacted value is never put in the field.
8068
+ draft: isRedacted2(e.key, pattern) ? "" : e.value
8069
+ }),
8070
+ children: /* @__PURE__ */ jsx28(
8071
+ PencilIcon,
8072
+ {
8073
+ className: "size-3.5",
8074
+ "aria-hidden": "true"
8075
+ }
8076
+ )
8077
+ }
8078
+ )
8079
+ ] }),
8080
+ /* @__PURE__ */ jsx28(
8081
+ Button,
8082
+ {
8083
+ "aria-label": `Delete ${e.key}`,
8084
+ className: iconButtonClass,
8085
+ onClick: () => attempt(
8086
+ () => deleteStorageEntry(e.store, e.key)
8087
+ ),
8088
+ children: /* @__PURE__ */ jsx28(
8089
+ Trash2Icon2,
8090
+ {
8091
+ className: "size-3.5",
8092
+ "aria-hidden": "true"
8093
+ }
8094
+ )
8095
+ }
8096
+ )
8097
+ ] })
8098
+ ] }, e.key);
8099
+ }) }),
8100
+ list.length > ROW_CAP ? /* @__PURE__ */ jsxs17("p", { className: "text-fg-tertiary", children: [
8101
+ "Showing ",
8102
+ ROW_CAP,
8103
+ " of ",
8104
+ list.length,
8105
+ " entries. Search to narrow them down."
8106
+ ] }) : null
8107
+ ] })
8108
+ ] });
8109
+ const open = selected?.store === store ? entries.find(
8110
+ (entry) => entry.store === store && entry.key === selected.key
8111
+ ) : void 0;
8112
+ return /* @__PURE__ */ jsxs17(Fragment14, { children: [
8113
+ section,
8114
+ open ? /* @__PURE__ */ jsx28(
8115
+ EntryDetail3,
7945
8116
  {
7946
- "aria-label": `Edit ${e.key}`,
7947
- className: iconButtonClass,
7948
- onClick: () => setEditing({
7949
- store: e.store,
7950
- key: e.key,
7951
- // A Redacted value is never put in the field.
7952
- draft: isRedacted2(e.key, pattern) ? "" : e.value
7953
- }),
7954
- children: /* @__PURE__ */ jsx27(PencilIcon, { className: "size-3.5", "aria-hidden": "true" })
8117
+ entry: open,
8118
+ pattern,
8119
+ revealed: revealed?.store === open.store && revealed.key === open.key
7955
8120
  }
7956
- )
7957
- ] }),
7958
- /* @__PURE__ */ jsx27(
7959
- Button,
7960
- {
7961
- "aria-label": `Delete ${e.key}`,
7962
- className: iconButtonClass,
7963
- onClick: () => attempt(() => deleteStorageEntry(e.store, e.key)),
7964
- children: /* @__PURE__ */ jsx27(Trash2Icon2, { className: "size-3.5", "aria-hidden": "true" })
7965
- }
7966
- )
7967
- ] })
7968
- ] }, e.key);
7969
- }) })
7970
- ] });
7971
- const open = selected?.store === store ? entries.find((entry) => entry.store === store && entry.key === selected.key) : void 0;
7972
- return /* @__PURE__ */ jsxs16(Fragment14, { children: [
7973
- section,
7974
- open ? /* @__PURE__ */ jsx27(
7975
- EntryDetail3,
7976
- {
7977
- entry: open,
7978
- pattern,
7979
- revealed: revealed?.store === open.store && revealed.key === open.key
8121
+ ) : null
8122
+ ] });
8123
+ })()
7980
8124
  }
7981
- ) : null
7982
- ] });
7983
- })() })
7984
- ] }) : /* @__PURE__ */ jsx27("p", { className: "p-3 text-fg-tertiary", children: "No stores are enabled." })
8125
+ )
8126
+ ]
8127
+ }
8128
+ ) : /* @__PURE__ */ jsx28("p", { className: "p-3 text-fg-tertiary", children: "No stores are enabled." })
7985
8129
  ] });
7986
8130
  }
7987
8131
 
7988
8132
  // src/plugins/storage/index.tsx
7989
- import { jsx as jsx28 } from "react/jsx-runtime";
8133
+ import { jsx as jsx29 } from "react/jsx-runtime";
7990
8134
  function storeProp(stores) {
7991
8135
  return {
7992
8136
  type: "string",
@@ -8012,14 +8156,14 @@ function storage(options = {}) {
8012
8156
  id: "storage",
8013
8157
  name: "Storage",
8014
8158
  label: "Storage",
8015
- icon: /* @__PURE__ */ jsx28(DatabaseIcon, { className: "size-4", "aria-hidden": "true" }),
8159
+ icon: /* @__PURE__ */ jsx29(DatabaseIcon, { className: "size-4", "aria-hidden": "true" }),
8016
8160
  install() {
8017
8161
  return installStorageWatch();
8018
8162
  },
8019
8163
  window: {
8020
8164
  title: "Storage",
8021
8165
  size: { width: 640, height: 420, minWidth: 360, minHeight: 220 },
8022
- Component: () => /* @__PURE__ */ jsx28(StoragePanel, { pattern, stores })
8166
+ Component: () => /* @__PURE__ */ jsx29(StoragePanel, { pattern, stores })
8023
8167
  },
8024
8168
  debugSections: () => {
8025
8169
  const { entries, unavailable } = readStorageState();
@@ -8168,4 +8312,4 @@ export {
8168
8312
  storage,
8169
8313
  defaultPlugins
8170
8314
  };
8171
- //# sourceMappingURL=chunk-AYUYZKKU.js.map
8315
+ //# sourceMappingURL=chunk-5QVD43AU.js.map