@pactor-app/ui 1.17.0 → 1.18.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/index.cjs CHANGED
@@ -82,6 +82,7 @@ __export(index_exports, {
82
82
  Menu: () => Menu2,
83
83
  Menubar: () => Menubar2,
84
84
  NavigationMenu: () => NavigationMenu2,
85
+ NumberInput: () => NumberInput,
85
86
  OVERLAY_CANCEL_PAYLOAD: () => OVERLAY_CANCEL_PAYLOAD,
86
87
  OverlayHost: () => OverlayHost,
87
88
  OverlayManager: () => OverlayManager,
@@ -1899,7 +1900,7 @@ function ComboboxContent({
1899
1900
  PopoverContent,
1900
1901
  {
1901
1902
  "data-slot": "combobox-content",
1902
- className: cn("w-[--anchor-width] p-0", className),
1903
+ className: cn("w-(--anchor-width) p-0", className),
1903
1904
  ...props,
1904
1905
  children
1905
1906
  }
@@ -4949,7 +4950,9 @@ function SidebarInset({ className, ...props }) {
4949
4950
  {
4950
4951
  "data-slot": "sidebar-inset",
4951
4952
  className: cn(
4952
- "relative flex w-full flex-1 flex-col bg-background",
4953
+ // min-w-0:作为横向 flex 项需允许收缩到内容 min-content 以下,
4954
+ // 否则宽表格等内容会撑破视口(内部 overflow-x-auto 永不生效)
4955
+ "relative flex w-full min-w-0 flex-1 flex-col bg-background",
4953
4956
  "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
4954
4957
  className
4955
4958
  ),
@@ -5809,23 +5812,210 @@ function NavigationMenu2({ items = [], className, style }) {
5809
5812
  ) }, `${item.label}-${index}`)) }) });
5810
5813
  }
5811
5814
 
5812
- // src/components/components/Page/index.tsx
5815
+ // src/components/components/NumberInput/index.tsx
5816
+ var import_runtime17 = require("@pactor-app/runtime");
5817
+ var import_lucide_react21 = require("lucide-react");
5818
+ var import_react21 = require("react");
5819
+
5820
+ // src/components/components/Form/form-item.tsx
5813
5821
  var import_jsx_runtime89 = require("react/jsx-runtime");
5822
+ function FieldShell({
5823
+ layout,
5824
+ label,
5825
+ htmlFor,
5826
+ error,
5827
+ className,
5828
+ style,
5829
+ children
5830
+ }) {
5831
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
5832
+ "div",
5833
+ {
5834
+ "data-slot": "form-item",
5835
+ className: cn(formItemClass(layout), className),
5836
+ style,
5837
+ children: [
5838
+ label ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
5839
+ "label",
5840
+ {
5841
+ htmlFor,
5842
+ className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap",
5843
+ children: label
5844
+ }
5845
+ ) : null,
5846
+ children,
5847
+ error ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
5848
+ ]
5849
+ }
5850
+ );
5851
+ }
5852
+
5853
+ // src/components/components/NumberInput/index.tsx
5854
+ var import_jsx_runtime90 = require("react/jsx-runtime");
5855
+ function clamp(value, min, max) {
5856
+ let next = value;
5857
+ if (typeof min === "number" && next < min) next = min;
5858
+ if (typeof max === "number" && next > max) next = max;
5859
+ return next;
5860
+ }
5861
+ function applyPrecision(value, precision) {
5862
+ if (typeof precision !== "number") return value;
5863
+ const factor = 10 ** precision;
5864
+ return Math.round(value * factor) / factor;
5865
+ }
5866
+ function toDisplayText(value) {
5867
+ return typeof value === "number" && Number.isFinite(value) ? String(value) : "";
5868
+ }
5869
+ function NumberInput({
5870
+ name,
5871
+ label,
5872
+ rules,
5873
+ value,
5874
+ min,
5875
+ max,
5876
+ step = 1,
5877
+ precision,
5878
+ placeholder,
5879
+ disabled,
5880
+ onChange,
5881
+ className,
5882
+ controlClassName,
5883
+ style
5884
+ }) {
5885
+ const form = useFormContext();
5886
+ const { t } = (0, import_runtime17.useI18n)();
5887
+ const controlId = (0, import_react21.useId)();
5888
+ const inForm = form?.inForm === true && typeof name === "string" && name !== "";
5889
+ (0, import_react21.useEffect)(() => {
5890
+ if (inForm && form && name) {
5891
+ form.registerField(name, rules, value);
5892
+ return () => form.unregisterField(name);
5893
+ }
5894
+ return void 0;
5895
+ });
5896
+ const fieldValue = inForm && form && name ? form.values[name] : void 0;
5897
+ const externalValue = typeof fieldValue === "number" ? fieldValue : inForm ? void 0 : typeof value === "number" ? value : void 0;
5898
+ const [text, setText] = (0, import_react21.useState)(() => toDisplayText(externalValue));
5899
+ (0, import_react21.useEffect)(() => {
5900
+ setText((current) => {
5901
+ const parsed = current === "" ? void 0 : Number(current);
5902
+ const currentNumber = parsed !== void 0 && Number.isFinite(parsed) ? applyPrecision(clamp(parsed, min, max), precision) : void 0;
5903
+ return currentNumber === externalValue ? current : toDisplayText(externalValue);
5904
+ });
5905
+ }, [externalValue, min, max, precision]);
5906
+ const commit = (next) => {
5907
+ if (inForm && form && name) {
5908
+ form.setValue(name, next);
5909
+ }
5910
+ onChange?.(next);
5911
+ };
5912
+ const stepBy = (direction) => {
5913
+ const base = externalValue ?? 0;
5914
+ const next = applyPrecision(clamp(base + direction * step, min, max), precision);
5915
+ setText(toDisplayText(next));
5916
+ commit(next);
5917
+ };
5918
+ const atMax = typeof max === "number" && externalValue !== void 0 && externalValue >= max;
5919
+ const atMin = typeof min === "number" && externalValue !== void 0 && externalValue <= min;
5920
+ const stepperClass = "flex flex-1 cursor-pointer items-center justify-center text-muted-foreground transition-colors hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50";
5921
+ const control = /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
5922
+ "span",
5923
+ {
5924
+ "data-slot": "number-input",
5925
+ className: cn("relative block", !inForm && className),
5926
+ style: !inForm ? style : void 0,
5927
+ children: [
5928
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
5929
+ Input,
5930
+ {
5931
+ id: controlId,
5932
+ type: "number",
5933
+ value: text,
5934
+ min,
5935
+ max,
5936
+ step,
5937
+ placeholder,
5938
+ disabled,
5939
+ className: cn(
5940
+ "pr-7 [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
5941
+ controlClassName
5942
+ ),
5943
+ onChange: (event) => {
5944
+ const raw = event.target.value;
5945
+ setText(raw);
5946
+ if (raw === "") {
5947
+ commit(void 0);
5948
+ return;
5949
+ }
5950
+ const parsed = Number(raw);
5951
+ if (!Number.isFinite(parsed)) return;
5952
+ commit(applyPrecision(clamp(parsed, min, max), precision));
5953
+ }
5954
+ }
5955
+ ),
5956
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("span", { className: "absolute inset-y-0 right-0 flex w-7 flex-col divide-y divide-input border-l border-input", children: [
5957
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
5958
+ "button",
5959
+ {
5960
+ type: "button",
5961
+ tabIndex: -1,
5962
+ "aria-label": t("pactor.numberInput.increase"),
5963
+ disabled: disabled === true || atMax,
5964
+ className: stepperClass,
5965
+ onClick: () => stepBy(1),
5966
+ children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react21.ChevronUpIcon, { className: "size-3" })
5967
+ }
5968
+ ),
5969
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
5970
+ "button",
5971
+ {
5972
+ type: "button",
5973
+ tabIndex: -1,
5974
+ "aria-label": t("pactor.numberInput.decrease"),
5975
+ disabled: disabled === true || atMin,
5976
+ className: stepperClass,
5977
+ onClick: () => stepBy(-1),
5978
+ children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react21.ChevronDownIcon, { className: "size-3" })
5979
+ }
5980
+ )
5981
+ ] })
5982
+ ]
5983
+ }
5984
+ );
5985
+ if (inForm && form && name) {
5986
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
5987
+ FieldShell,
5988
+ {
5989
+ layout: form.layout,
5990
+ label,
5991
+ htmlFor: controlId,
5992
+ error: form.errors[name],
5993
+ className,
5994
+ style,
5995
+ children: control
5996
+ }
5997
+ );
5998
+ }
5999
+ return control;
6000
+ }
6001
+
6002
+ // src/components/components/Page/index.tsx
6003
+ var import_jsx_runtime91 = require("react/jsx-runtime");
5814
6004
  function Page({ title, className, style, children }) {
5815
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { "data-slot": "page", className: cn("p-6", className), style, children: [
5816
- title ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("h2", { "data-slot": "page-title", className: "mb-5 text-xl font-semibold", children: title }) : null,
5817
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { "data-slot": "page-content", className: "space-y-5", children })
6005
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { "data-slot": "page", className: cn("p-6", className), style, children: [
6006
+ title ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("h2", { "data-slot": "page-title", className: "mb-5 text-xl font-semibold", children: title }) : null,
6007
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { "data-slot": "page-content", className: "space-y-5", children })
5818
6008
  ] });
5819
6009
  }
5820
6010
 
5821
6011
  // src/components/components/Pagination/index.tsx
5822
- var import_react21 = require("react");
6012
+ var import_react22 = require("react");
5823
6013
 
5824
6014
  // src/ui/pagination.tsx
5825
- var import_lucide_react21 = require("lucide-react");
5826
- var import_jsx_runtime90 = require("react/jsx-runtime");
6015
+ var import_lucide_react22 = require("lucide-react");
6016
+ var import_jsx_runtime92 = require("react/jsx-runtime");
5827
6017
  function Pagination({ className, ...props }) {
5828
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
6018
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
5829
6019
  "nav",
5830
6020
  {
5831
6021
  role: "navigation",
@@ -5837,7 +6027,7 @@ function Pagination({ className, ...props }) {
5837
6027
  );
5838
6028
  }
5839
6029
  function PaginationContent({ className, ...props }) {
5840
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
6030
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
5841
6031
  "ul",
5842
6032
  {
5843
6033
  "data-slot": "pagination-content",
@@ -5847,7 +6037,7 @@ function PaginationContent({ className, ...props }) {
5847
6037
  );
5848
6038
  }
5849
6039
  function PaginationItem({ ...props }) {
5850
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("li", { "data-slot": "pagination-item", ...props });
6040
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("li", { "data-slot": "pagination-item", ...props });
5851
6041
  }
5852
6042
  function PaginationLink({
5853
6043
  className,
@@ -5855,7 +6045,7 @@ function PaginationLink({
5855
6045
  disabled,
5856
6046
  ...props
5857
6047
  }) {
5858
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
6048
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
5859
6049
  "a",
5860
6050
  {
5861
6051
  "aria-current": isActive ? "page" : void 0,
@@ -5879,15 +6069,15 @@ function PaginationPrevious({
5879
6069
  className,
5880
6070
  ...props
5881
6071
  }) {
5882
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
6072
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
5883
6073
  PaginationLink,
5884
6074
  {
5885
6075
  "aria-label": "Go to previous page",
5886
6076
  className: cn("gap-1 px-2.5 sm:pl-2.5", className),
5887
6077
  ...props,
5888
6078
  children: [
5889
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react21.ChevronLeftIcon, {}),
5890
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "hidden sm:block", children: "Previous" })
6079
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react22.ChevronLeftIcon, {}),
6080
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "hidden sm:block", children: "Previous" })
5891
6081
  ]
5892
6082
  }
5893
6083
  );
@@ -5896,21 +6086,21 @@ function PaginationNext({
5896
6086
  className,
5897
6087
  ...props
5898
6088
  }) {
5899
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
6089
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
5900
6090
  PaginationLink,
5901
6091
  {
5902
6092
  "aria-label": "Go to next page",
5903
6093
  className: cn("gap-1 px-2.5 sm:pr-2.5", className),
5904
6094
  ...props,
5905
6095
  children: [
5906
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "hidden sm:block", children: "Next" }),
5907
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react21.ChevronRightIcon, {})
6096
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "hidden sm:block", children: "Next" }),
6097
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react22.ChevronRightIcon, {})
5908
6098
  ]
5909
6099
  }
5910
6100
  );
5911
6101
  }
5912
6102
  function PaginationEllipsis({ className, ...props }) {
5913
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
6103
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
5914
6104
  "span",
5915
6105
  {
5916
6106
  "aria-hidden": true,
@@ -5918,15 +6108,15 @@ function PaginationEllipsis({ className, ...props }) {
5918
6108
  className: cn("flex size-9 items-center justify-center", className),
5919
6109
  ...props,
5920
6110
  children: [
5921
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react21.MoreHorizontalIcon, { className: "size-4" }),
5922
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "sr-only", children: "More pages" })
6111
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_lucide_react22.MoreHorizontalIcon, { className: "size-4" }),
6112
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "sr-only", children: "More pages" })
5923
6113
  ]
5924
6114
  }
5925
6115
  );
5926
6116
  }
5927
6117
 
5928
6118
  // src/components/components/Pagination/index.tsx
5929
- var import_jsx_runtime91 = require("react/jsx-runtime");
6119
+ var import_jsx_runtime93 = require("react/jsx-runtime");
5930
6120
  function pageItems(current, count) {
5931
6121
  if (count <= 7) {
5932
6122
  return Array.from({ length: count }, (_, i) => i + 1);
@@ -5947,7 +6137,7 @@ function Pagination2({
5947
6137
  className,
5948
6138
  style
5949
6139
  }) {
5950
- const [innerPage, setInnerPage] = (0, import_react21.useState)(1);
6140
+ const [innerPage, setInnerPage] = (0, import_react22.useState)(1);
5951
6141
  const pageCount = Math.max(1, Math.ceil(total / Math.max(1, pageSize)));
5952
6142
  const current = Math.min(Math.max(1, page ?? innerPage), pageCount);
5953
6143
  const goTo = (next) => {
@@ -5960,8 +6150,8 @@ function Pagination2({
5960
6150
  }
5961
6151
  onChange?.(target);
5962
6152
  };
5963
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Pagination, { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(PaginationContent, { children: [
5964
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6153
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Pagination, { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(PaginationContent, { children: [
6154
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
5965
6155
  PaginationPrevious,
5966
6156
  {
5967
6157
  href: "#",
@@ -5972,7 +6162,7 @@ function Pagination2({
5972
6162
  }
5973
6163
  }
5974
6164
  ) }),
5975
- pageItems(current, pageCount).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(PaginationEllipsis, {}) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6165
+ pageItems(current, pageCount).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(PaginationItem, { children: item === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(PaginationEllipsis, {}) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
5976
6166
  PaginationLink,
5977
6167
  {
5978
6168
  href: "#",
@@ -5984,7 +6174,7 @@ function Pagination2({
5984
6174
  children: item
5985
6175
  }
5986
6176
  ) }, item === "ellipsis" ? `ellipsis-${index}` : item)),
5987
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6177
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
5988
6178
  PaginationNext,
5989
6179
  {
5990
6180
  href: "#",
@@ -5999,15 +6189,15 @@ function Pagination2({
5999
6189
  }
6000
6190
 
6001
6191
  // src/components/components/Popover/index.tsx
6002
- var import_runtime17 = require("@pactor-app/runtime");
6003
- var import_jsx_runtime92 = require("react/jsx-runtime");
6192
+ var import_runtime18 = require("@pactor-app/runtime");
6193
+ var import_jsx_runtime94 = require("react/jsx-runtime");
6004
6194
  function isDslNode3(value) {
6005
6195
  return typeof value === "object" && value !== null && typeof value.type === "string";
6006
6196
  }
6007
6197
  function Popover2({ content, children, className, style }) {
6008
- const { renderChildren } = (0, import_runtime17.useRenderer)();
6009
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Popover, { children: [
6010
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
6198
+ const { renderChildren } = (0, import_runtime18.useRenderer)();
6199
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Popover, { children: [
6200
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6011
6201
  PopoverTrigger,
6012
6202
  {
6013
6203
  nativeButton: false,
@@ -6015,15 +6205,15 @@ function Popover2({ content, children, className, style }) {
6015
6205
  children
6016
6206
  }
6017
6207
  ),
6018
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(PopoverContent, { className, style, children: isDslNode3(content) ? renderChildren([content]) : content })
6208
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PopoverContent, { className, style, children: isDslNode3(content) ? renderChildren([content]) : content })
6019
6209
  ] });
6020
6210
  }
6021
6211
 
6022
6212
  // src/ui/progress.tsx
6023
6213
  var import_progress = require("@base-ui/react/progress");
6024
- var import_jsx_runtime93 = require("react/jsx-runtime");
6214
+ var import_jsx_runtime95 = require("react/jsx-runtime");
6025
6215
  function Progress({ className, ...props }) {
6026
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6216
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
6027
6217
  import_progress.Progress.Root,
6028
6218
  {
6029
6219
  "data-slot": "progress",
@@ -6033,7 +6223,7 @@ function Progress({ className, ...props }) {
6033
6223
  );
6034
6224
  }
6035
6225
  function ProgressTrack({ className, ...props }) {
6036
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6226
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
6037
6227
  import_progress.Progress.Track,
6038
6228
  {
6039
6229
  "data-slot": "progress-track",
@@ -6046,7 +6236,7 @@ function ProgressIndicator({
6046
6236
  className,
6047
6237
  ...props
6048
6238
  }) {
6049
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6239
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
6050
6240
  import_progress.Progress.Indicator,
6051
6241
  {
6052
6242
  "data-slot": "progress-indicator",
@@ -6060,21 +6250,21 @@ function ProgressIndicator({
6060
6250
  }
6061
6251
 
6062
6252
  // src/components/components/Progress/index.tsx
6063
- var import_jsx_runtime94 = require("react/jsx-runtime");
6253
+ var import_jsx_runtime96 = require("react/jsx-runtime");
6064
6254
  function Progress2({ value, className, style }) {
6065
6255
  const resolved = typeof value === "number" && Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : null;
6066
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Progress, { value: resolved, className, style, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ProgressTrack, { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ProgressIndicator, {}) }) });
6256
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Progress, { value: resolved, className, style, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ProgressTrack, { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ProgressIndicator, {}) }) });
6067
6257
  }
6068
6258
 
6069
6259
  // src/components/components/RadioGroup/index.tsx
6070
- var import_react22 = require("react");
6260
+ var import_react23 = require("react");
6071
6261
 
6072
6262
  // src/ui/radio-group.tsx
6073
6263
  var import_radio = require("@base-ui/react/radio");
6074
6264
  var import_radio_group = require("@base-ui/react/radio-group");
6075
- var import_jsx_runtime95 = require("react/jsx-runtime");
6265
+ var import_jsx_runtime97 = require("react/jsx-runtime");
6076
6266
  function RadioGroup({ className, ...props }) {
6077
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
6267
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
6078
6268
  import_radio_group.RadioGroup,
6079
6269
  {
6080
6270
  "data-slot": "radio-group",
@@ -6084,7 +6274,7 @@ function RadioGroup({ className, ...props }) {
6084
6274
  );
6085
6275
  }
6086
6276
  function RadioGroupItem({ className, ...props }) {
6087
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
6277
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
6088
6278
  import_radio.Radio.Root,
6089
6279
  {
6090
6280
  "data-slot": "radio-group-item",
@@ -6093,53 +6283,20 @@ function RadioGroupItem({ className, ...props }) {
6093
6283
  className
6094
6284
  ),
6095
6285
  ...props,
6096
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
6286
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
6097
6287
  import_radio.Radio.Indicator,
6098
6288
  {
6099
6289
  "data-slot": "radio-group-indicator",
6100
6290
  className: "flex items-center justify-center",
6101
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "size-2 rounded-full bg-(--radio-checked)" })
6291
+ children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "size-2 rounded-full bg-(--radio-checked)" })
6102
6292
  }
6103
6293
  )
6104
6294
  }
6105
6295
  );
6106
6296
  }
6107
6297
 
6108
- // src/components/components/Form/form-item.tsx
6109
- var import_jsx_runtime96 = require("react/jsx-runtime");
6110
- function FieldShell({
6111
- layout,
6112
- label,
6113
- htmlFor,
6114
- error,
6115
- className,
6116
- style,
6117
- children
6118
- }) {
6119
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
6120
- "div",
6121
- {
6122
- "data-slot": "form-item",
6123
- className: cn(formItemClass(layout), className),
6124
- style,
6125
- children: [
6126
- label ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6127
- "label",
6128
- {
6129
- htmlFor,
6130
- className: "shrink-0 text-sm leading-none font-medium whitespace-nowrap",
6131
- children: label
6132
- }
6133
- ) : null,
6134
- children,
6135
- error ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
6136
- ]
6137
- }
6138
- );
6139
- }
6140
-
6141
6298
  // src/components/components/RadioGroup/index.tsx
6142
- var import_jsx_runtime97 = require("react/jsx-runtime");
6299
+ var import_jsx_runtime98 = require("react/jsx-runtime");
6143
6300
  function RadioGroup2({
6144
6301
  name,
6145
6302
  label,
@@ -6153,9 +6310,9 @@ function RadioGroup2({
6153
6310
  style
6154
6311
  }) {
6155
6312
  const form = useFormContext();
6156
- const controlId = (0, import_react22.useId)();
6313
+ const controlId = (0, import_react23.useId)();
6157
6314
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
6158
- (0, import_react22.useEffect)(() => {
6315
+ (0, import_react23.useEffect)(() => {
6159
6316
  if (inForm && form && name) {
6160
6317
  form.registerField(name, rules, value);
6161
6318
  return () => form.unregisterField(name);
@@ -6170,7 +6327,7 @@ function RadioGroup2({
6170
6327
  onChange?.(next);
6171
6328
  };
6172
6329
  const groupValue = current ?? "";
6173
- const group = /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
6330
+ const group = /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
6174
6331
  RadioGroup,
6175
6332
  {
6176
6333
  value: groupValue,
@@ -6185,8 +6342,8 @@ function RadioGroup2({
6185
6342
  children: options.map((option, index) => {
6186
6343
  const optionId = `${controlId}-${index}`;
6187
6344
  const optionDisabled = disabled || option.disabled;
6188
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
6189
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
6345
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
6346
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
6190
6347
  RadioGroupItem,
6191
6348
  {
6192
6349
  id: optionId,
@@ -6194,7 +6351,7 @@ function RadioGroup2({
6194
6351
  disabled: option.disabled
6195
6352
  }
6196
6353
  ),
6197
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
6354
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
6198
6355
  "label",
6199
6356
  {
6200
6357
  htmlFor: optionId,
@@ -6210,7 +6367,7 @@ function RadioGroup2({
6210
6367
  }
6211
6368
  );
6212
6369
  if (inForm && form && name) {
6213
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
6370
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
6214
6371
  FieldShell,
6215
6372
  {
6216
6373
  layout: form.layout,
@@ -6226,18 +6383,18 @@ function RadioGroup2({
6226
6383
  }
6227
6384
 
6228
6385
  // src/components/components/Resizable/index.tsx
6229
- var import_runtime18 = require("@pactor-app/runtime");
6230
- var import_react23 = require("react");
6386
+ var import_runtime19 = require("@pactor-app/runtime");
6387
+ var import_react24 = require("react");
6231
6388
 
6232
6389
  // src/ui/resizable.tsx
6233
- var import_lucide_react22 = require("lucide-react");
6390
+ var import_lucide_react23 = require("lucide-react");
6234
6391
  var import_react_resizable_panels = require("react-resizable-panels");
6235
- var import_jsx_runtime98 = require("react/jsx-runtime");
6392
+ var import_jsx_runtime99 = require("react/jsx-runtime");
6236
6393
  function PanelGroup({
6237
6394
  className,
6238
6395
  ...props
6239
6396
  }) {
6240
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
6397
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
6241
6398
  import_react_resizable_panels.Group,
6242
6399
  {
6243
6400
  "data-slot": "resizable-panel-group",
@@ -6250,14 +6407,14 @@ function PanelGroup({
6250
6407
  );
6251
6408
  }
6252
6409
  function Panel({ ...props }) {
6253
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_resizable_panels.Panel, { "data-slot": "resizable-panel", ...props });
6410
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_resizable_panels.Panel, { "data-slot": "resizable-panel", ...props });
6254
6411
  }
6255
6412
  function ResizableHandle({
6256
6413
  withHandle,
6257
6414
  className,
6258
6415
  ...props
6259
6416
  }) {
6260
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
6417
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
6261
6418
  import_react_resizable_panels.Separator,
6262
6419
  {
6263
6420
  "data-slot": "resizable-handle",
@@ -6266,23 +6423,23 @@ function ResizableHandle({
6266
6423
  className
6267
6424
  ),
6268
6425
  ...props,
6269
- children: withHandle ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-xs border border-border bg-border", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react22.GripVerticalIcon, { className: "size-2.5" }) }) : null
6426
+ children: withHandle ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-xs border border-border bg-border", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_lucide_react23.GripVerticalIcon, { className: "size-2.5" }) }) : null
6270
6427
  }
6271
6428
  );
6272
6429
  }
6273
6430
 
6274
6431
  // src/components/components/Resizable/index.tsx
6275
- var import_jsx_runtime99 = require("react/jsx-runtime");
6432
+ var import_jsx_runtime100 = require("react/jsx-runtime");
6276
6433
  function Resizable({
6277
6434
  panels = [],
6278
6435
  direction = "horizontal",
6279
6436
  className,
6280
6437
  style
6281
6438
  }) {
6282
- const { renderChildren } = (0, import_runtime18.useRenderer)();
6283
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(PanelGroup, { orientation: direction, className, style, children: panels.map((panel, index) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_react23.Fragment, { children: [
6284
- index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ResizableHandle, { withHandle: true }) : null,
6285
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
6439
+ const { renderChildren } = (0, import_runtime19.useRenderer)();
6440
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(PanelGroup, { orientation: direction, className, style, children: panels.map((panel, index) => /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_react24.Fragment, { children: [
6441
+ index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ResizableHandle, { withHandle: true }) : null,
6442
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
6286
6443
  Panel,
6287
6444
  {
6288
6445
  defaultSize: typeof panel.defaultSizePx === "number" ? `${panel.defaultSizePx}px` : typeof panel.defaultSize === "number" ? `${panel.defaultSize}%` : void 0,
@@ -6296,20 +6453,20 @@ function Resizable({
6296
6453
 
6297
6454
  // src/ui/scroll-area.tsx
6298
6455
  var import_scroll_area = require("@base-ui/react/scroll-area");
6299
- var import_jsx_runtime100 = require("react/jsx-runtime");
6456
+ var import_jsx_runtime101 = require("react/jsx-runtime");
6300
6457
  function ScrollArea({
6301
6458
  className,
6302
6459
  children,
6303
6460
  ...props
6304
6461
  }) {
6305
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
6462
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
6306
6463
  import_scroll_area.ScrollArea.Root,
6307
6464
  {
6308
6465
  "data-slot": "scroll-area",
6309
6466
  className: cn("relative overflow-hidden", className),
6310
6467
  ...props,
6311
6468
  children: [
6312
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
6469
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6313
6470
  import_scroll_area.ScrollArea.Viewport,
6314
6471
  {
6315
6472
  "data-slot": "scroll-area-viewport",
@@ -6317,8 +6474,8 @@ function ScrollArea({
6317
6474
  children
6318
6475
  }
6319
6476
  ),
6320
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ScrollBar, {}),
6321
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_scroll_area.ScrollArea.Corner, {})
6477
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ScrollBar, {}),
6478
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_scroll_area.ScrollArea.Corner, {})
6322
6479
  ]
6323
6480
  }
6324
6481
  );
@@ -6328,7 +6485,7 @@ function ScrollBar({
6328
6485
  orientation = "vertical",
6329
6486
  ...props
6330
6487
  }) {
6331
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
6488
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6332
6489
  import_scroll_area.ScrollArea.Scrollbar,
6333
6490
  {
6334
6491
  "data-slot": "scroll-area-scrollbar",
@@ -6340,7 +6497,7 @@ function ScrollBar({
6340
6497
  className
6341
6498
  ),
6342
6499
  ...props,
6343
- children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
6500
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6344
6501
  import_scroll_area.ScrollArea.Thumb,
6345
6502
  {
6346
6503
  "data-slot": "scroll-area-thumb",
@@ -6352,7 +6509,7 @@ function ScrollBar({
6352
6509
  }
6353
6510
 
6354
6511
  // src/components/components/ScrollArea/index.tsx
6355
- var import_jsx_runtime101 = require("react/jsx-runtime");
6512
+ var import_jsx_runtime102 = require("react/jsx-runtime");
6356
6513
  function ScrollArea2({
6357
6514
  maxHeight,
6358
6515
  maxWidth,
@@ -6360,7 +6517,7 @@ function ScrollArea2({
6360
6517
  style,
6361
6518
  children
6362
6519
  }) {
6363
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
6520
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6364
6521
  ScrollArea,
6365
6522
  {
6366
6523
  className,
@@ -6371,18 +6528,18 @@ function ScrollArea2({
6371
6528
  }
6372
6529
 
6373
6530
  // src/components/components/Select/index.tsx
6374
- var import_runtime19 = require("@pactor-app/runtime");
6375
- var import_react24 = require("react");
6531
+ var import_runtime20 = require("@pactor-app/runtime");
6532
+ var import_react25 = require("react");
6376
6533
 
6377
6534
  // src/ui/select.tsx
6378
6535
  var import_select = require("@base-ui/react/select");
6379
- var import_lucide_react23 = require("lucide-react");
6380
- var import_jsx_runtime102 = require("react/jsx-runtime");
6536
+ var import_lucide_react24 = require("lucide-react");
6537
+ var import_jsx_runtime103 = require("react/jsx-runtime");
6381
6538
  var Select = import_select.Select.Root;
6382
6539
  function SelectValue({
6383
6540
  ...props
6384
6541
  }) {
6385
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_select.Select.Value, { "data-slot": "select-value", ...props });
6542
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_select.Select.Value, { "data-slot": "select-value", ...props });
6386
6543
  }
6387
6544
  function SelectTrigger({
6388
6545
  className,
@@ -6390,7 +6547,7 @@ function SelectTrigger({
6390
6547
  children,
6391
6548
  ...props
6392
6549
  }) {
6393
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
6550
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
6394
6551
  import_select.Select.Trigger,
6395
6552
  {
6396
6553
  "data-slot": "select-trigger",
@@ -6402,10 +6559,10 @@ function SelectTrigger({
6402
6559
  ...props,
6403
6560
  children: [
6404
6561
  children,
6405
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6562
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
6406
6563
  import_select.Select.Icon,
6407
6564
  {
6408
- render: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_lucide_react23.ChevronDownIcon, { className: "size-4 opacity-50" })
6565
+ render: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_lucide_react24.ChevronDownIcon, { className: "size-4 opacity-50" })
6409
6566
  }
6410
6567
  )
6411
6568
  ]
@@ -6417,11 +6574,13 @@ function SelectContent({
6417
6574
  children,
6418
6575
  side = "bottom",
6419
6576
  sideOffset = 4,
6420
- align = "center",
6577
+ // 弹层左边缘对齐触发器左边缘(shadcn 上游默认为 'center',居中会显得
6578
+ // 弹层"对着触发器中间",与主流控制台左对齐惯例不符,故改默认值)
6579
+ align = "start",
6421
6580
  alignItemWithTrigger = false,
6422
6581
  ...props
6423
6582
  }) {
6424
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6583
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
6425
6584
  import_select.Select.Positioner,
6426
6585
  {
6427
6586
  side,
@@ -6429,19 +6588,23 @@ function SelectContent({
6429
6588
  align,
6430
6589
  alignItemWithTrigger,
6431
6590
  className: "isolate z-50",
6432
- children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
6591
+ children: /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
6433
6592
  import_select.Select.Popup,
6434
6593
  {
6435
6594
  "data-slot": "select-content",
6436
6595
  className: cn(
6437
- "relative z-50 max-h-96 min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover text-popover-foreground shadow-md shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fill-mode-forwards data-closed:fade-out-0 data-closed:zoom-out-95",
6596
+ // min-w 跟随触发器宽度(Base UI Positioner 在定位元素上暴露
6597
+ // --anchor-width,Popup 作为其子节点可经 var() 继承到),
6598
+ // 选项更长时弹层随内容继续撑宽;不再使用固定的 min-w-[8rem]
6599
+ //(触发器比 8rem 宽时弹层会显得比触发器窄)
6600
+ "relative z-50 max-h-96 min-w-(--anchor-width) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover text-popover-foreground shadow-md shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fill-mode-forwards data-closed:fade-out-0 data-closed:zoom-out-95",
6438
6601
  className
6439
6602
  ),
6440
6603
  ...props,
6441
6604
  children: [
6442
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SelectScrollUpButton, {}),
6443
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_select.Select.List, { className: "p-1", children }),
6444
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(SelectScrollDownButton, {})
6605
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectScrollUpButton, {}),
6606
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_select.Select.List, { className: "p-1", children }),
6607
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectScrollDownButton, {})
6445
6608
  ]
6446
6609
  }
6447
6610
  )
@@ -6453,7 +6616,7 @@ function SelectItem({
6453
6616
  children,
6454
6617
  ...props
6455
6618
  }) {
6456
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
6619
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
6457
6620
  import_select.Select.Item,
6458
6621
  {
6459
6622
  "data-slot": "select-item",
@@ -6463,8 +6626,8 @@ function SelectItem({
6463
6626
  ),
6464
6627
  ...props,
6465
6628
  children: [
6466
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_select.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_lucide_react23.CheckIcon, { className: "size-4" }) }) }),
6467
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_select.Select.ItemText, { children })
6629
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_select.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_lucide_react24.CheckIcon, { className: "size-4" }) }) }),
6630
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_select.Select.ItemText, { children })
6468
6631
  ]
6469
6632
  }
6470
6633
  );
@@ -6473,7 +6636,7 @@ function SelectScrollUpButton({
6473
6636
  className,
6474
6637
  ...props
6475
6638
  }) {
6476
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6639
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
6477
6640
  import_select.Select.ScrollUpArrow,
6478
6641
  {
6479
6642
  "data-slot": "select-scroll-up-button",
@@ -6482,7 +6645,7 @@ function SelectScrollUpButton({
6482
6645
  className
6483
6646
  ),
6484
6647
  ...props,
6485
- children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_lucide_react23.ChevronUpIcon, { className: "size-4" })
6648
+ children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_lucide_react24.ChevronUpIcon, { className: "size-4" })
6486
6649
  }
6487
6650
  );
6488
6651
  }
@@ -6490,7 +6653,7 @@ function SelectScrollDownButton({
6490
6653
  className,
6491
6654
  ...props
6492
6655
  }) {
6493
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
6656
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
6494
6657
  import_select.Select.ScrollDownArrow,
6495
6658
  {
6496
6659
  "data-slot": "select-scroll-down-button",
@@ -6499,13 +6662,13 @@ function SelectScrollDownButton({
6499
6662
  className
6500
6663
  ),
6501
6664
  ...props,
6502
- children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_lucide_react23.ChevronDownIcon, { className: "size-4" })
6665
+ children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_lucide_react24.ChevronDownIcon, { className: "size-4" })
6503
6666
  }
6504
6667
  );
6505
6668
  }
6506
6669
 
6507
6670
  // src/components/components/Select/index.tsx
6508
- var import_jsx_runtime103 = require("react/jsx-runtime");
6671
+ var import_jsx_runtime104 = require("react/jsx-runtime");
6509
6672
  function Select2({
6510
6673
  name,
6511
6674
  label,
@@ -6521,10 +6684,10 @@ function Select2({
6521
6684
  style
6522
6685
  }) {
6523
6686
  const form = useFormContext();
6524
- const { t } = (0, import_runtime19.useI18n)();
6525
- const controlId = (0, import_react24.useId)();
6687
+ const { t } = (0, import_runtime20.useI18n)();
6688
+ const controlId = (0, import_react25.useId)();
6526
6689
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
6527
- (0, import_react24.useEffect)(() => {
6690
+ (0, import_react25.useEffect)(() => {
6528
6691
  if (inForm && form && name) {
6529
6692
  form.registerField(name, rules, value);
6530
6693
  return () => form.unregisterField(name);
@@ -6540,7 +6703,7 @@ function Select2({
6540
6703
  onChange?.(next ?? void 0);
6541
6704
  };
6542
6705
  const inFormRoot = inForm === true;
6543
- const select = /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
6706
+ const select = /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
6544
6707
  "span",
6545
6708
  {
6546
6709
  className: cn(
@@ -6551,7 +6714,7 @@ function Select2({
6551
6714
  ),
6552
6715
  style: inFormRoot ? void 0 : style,
6553
6716
  children: [
6554
- /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
6717
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
6555
6718
  Select,
6556
6719
  {
6557
6720
  items: options,
@@ -6560,8 +6723,8 @@ function Select2({
6560
6723
  disabled,
6561
6724
  name: inForm ? name : void 0,
6562
6725
  children: [
6563
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectTrigger, { id: controlId, className: inFormRoot ? "w-full" : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectValue, { placeholder }) }),
6564
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(SelectContent, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
6726
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(SelectTrigger, { id: controlId, className: inFormRoot ? "w-full" : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(SelectValue, { placeholder }) }),
6727
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(SelectContent, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
6565
6728
  SelectItem,
6566
6729
  {
6567
6730
  value: option.value,
@@ -6573,7 +6736,7 @@ function Select2({
6573
6736
  ]
6574
6737
  }
6575
6738
  ),
6576
- allowClear && selectedValue !== null && !disabled ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
6739
+ allowClear && selectedValue !== null && !disabled ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
6577
6740
  "button",
6578
6741
  {
6579
6742
  type: "button",
@@ -6593,14 +6756,14 @@ function Select2({
6593
6756
  );
6594
6757
  if (inForm && form && name) {
6595
6758
  const error = form.errors[name];
6596
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
6759
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
6597
6760
  "div",
6598
6761
  {
6599
6762
  "data-slot": "form-item",
6600
6763
  className: cn(formItemClass(form.layout), className),
6601
6764
  style,
6602
6765
  children: [
6603
- label ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
6766
+ label ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
6604
6767
  "label",
6605
6768
  {
6606
6769
  htmlFor: controlId,
@@ -6609,7 +6772,7 @@ function Select2({
6609
6772
  }
6610
6773
  ) : null,
6611
6774
  select,
6612
- error ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
6775
+ error ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { "data-slot": "form-error", className: "text-sm text-destructive", children: error }) : null
6613
6776
  ]
6614
6777
  }
6615
6778
  );
@@ -6618,13 +6781,13 @@ function Select2({
6618
6781
  }
6619
6782
 
6620
6783
  // src/components/components/Separator/index.tsx
6621
- var import_jsx_runtime104 = require("react/jsx-runtime");
6784
+ var import_jsx_runtime105 = require("react/jsx-runtime");
6622
6785
  function Separator2({ orientation = "horizontal", className, style }) {
6623
- return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Separator, { orientation, className, style });
6786
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Separator, { orientation, className, style });
6624
6787
  }
6625
6788
 
6626
6789
  // src/components/components/Sheet/index.tsx
6627
- var import_jsx_runtime105 = require("react/jsx-runtime");
6790
+ var import_jsx_runtime106 = require("react/jsx-runtime");
6628
6791
  function Sheet2({
6629
6792
  title,
6630
6793
  open,
@@ -6634,7 +6797,7 @@ function Sheet2({
6634
6797
  className,
6635
6798
  style
6636
6799
  }) {
6637
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
6800
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
6638
6801
  Sheet,
6639
6802
  {
6640
6803
  open: open ?? false,
@@ -6643,17 +6806,17 @@ function Sheet2({
6643
6806
  onClose?.();
6644
6807
  }
6645
6808
  },
6646
- children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(SheetContent, { side, className, style, children: [
6647
- title ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(SheetHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(SheetTitle, { children: title }) }) : null,
6648
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "flex-1 overflow-auto px-4", children })
6809
+ children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(SheetContent, { side, className, style, children: [
6810
+ title ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(SheetHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(SheetTitle, { children: title }) }) : null,
6811
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex-1 overflow-auto px-4", children })
6649
6812
  ] })
6650
6813
  }
6651
6814
  );
6652
6815
  }
6653
6816
 
6654
6817
  // src/components/components/Sider/index.tsx
6655
- var import_lucide_react24 = require("lucide-react");
6656
- var import_jsx_runtime106 = require("react/jsx-runtime");
6818
+ var import_lucide_react25 = require("lucide-react");
6819
+ var import_jsx_runtime107 = require("react/jsx-runtime");
6657
6820
  function Sider({
6658
6821
  width = 200,
6659
6822
  collapsible,
@@ -6665,7 +6828,7 @@ function Sider({
6665
6828
  children
6666
6829
  }) {
6667
6830
  const current = collapsed ? collapsedWidth : width;
6668
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
6831
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
6669
6832
  "aside",
6670
6833
  {
6671
6834
  "data-slot": "layout-sider",
@@ -6676,15 +6839,15 @@ function Sider({
6676
6839
  ),
6677
6840
  style: { width: current, ...style },
6678
6841
  children: [
6679
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "min-h-0 flex-1 overflow-auto", children }),
6680
- collapsible ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
6842
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "min-h-0 flex-1 overflow-auto", children }),
6843
+ collapsible ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
6681
6844
  "button",
6682
6845
  {
6683
6846
  type: "button",
6684
6847
  "aria-label": collapsed ? "expand sider" : "collapse sider",
6685
6848
  className: "flex h-10 shrink-0 items-center justify-center border-t text-muted-foreground hover:text-foreground",
6686
6849
  onClick: () => onCollapse?.(!collapsed),
6687
- children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_lucide_react24.ChevronRight, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_lucide_react24.ChevronLeft, { "aria-hidden": true, className: "size-4" })
6850
+ children: collapsed ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react25.ChevronRight, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react25.ChevronLeft, { "aria-hidden": true, className: "size-4" })
6688
6851
  }
6689
6852
  ) : null
6690
6853
  ]
@@ -6693,7 +6856,7 @@ function Sider({
6693
6856
  }
6694
6857
 
6695
6858
  // src/components/components/Skeleton/index.tsx
6696
- var import_jsx_runtime107 = require("react/jsx-runtime");
6859
+ var import_jsx_runtime108 = require("react/jsx-runtime");
6697
6860
  var shapeDefaults = {
6698
6861
  line: { className: "h-4 w-full", style: {} },
6699
6862
  circle: { className: "rounded-full", style: { width: 40, height: 40 } },
@@ -6704,7 +6867,7 @@ function toSize(value) {
6704
6867
  }
6705
6868
  function Skeleton2({ shape = "line", width, height, className, style }) {
6706
6869
  const defaults = shapeDefaults[shape];
6707
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
6870
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
6708
6871
  Skeleton,
6709
6872
  {
6710
6873
  className: cn(defaults.className, className),
@@ -6719,13 +6882,13 @@ function Skeleton2({ shape = "line", width, height, className, style }) {
6719
6882
  }
6720
6883
 
6721
6884
  // src/components/components/Slider/index.tsx
6722
- var import_react25 = require("react");
6885
+ var import_react26 = require("react");
6723
6886
 
6724
6887
  // src/ui/slider.tsx
6725
6888
  var import_slider = require("@base-ui/react/slider");
6726
- var import_jsx_runtime108 = require("react/jsx-runtime");
6889
+ var import_jsx_runtime109 = require("react/jsx-runtime");
6727
6890
  function Slider({ className, ...props }) {
6728
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
6891
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
6729
6892
  import_slider.Slider.Root,
6730
6893
  {
6731
6894
  "data-slot": "slider",
@@ -6738,7 +6901,7 @@ function Slider({ className, ...props }) {
6738
6901
  );
6739
6902
  }
6740
6903
  function SliderControl({ className, ...props }) {
6741
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
6904
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
6742
6905
  import_slider.Slider.Control,
6743
6906
  {
6744
6907
  "data-slot": "slider-control",
@@ -6748,7 +6911,7 @@ function SliderControl({ className, ...props }) {
6748
6911
  );
6749
6912
  }
6750
6913
  function SliderTrack({ className, ...props }) {
6751
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
6914
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
6752
6915
  import_slider.Slider.Track,
6753
6916
  {
6754
6917
  "data-slot": "slider-track",
@@ -6761,7 +6924,7 @@ function SliderTrack({ className, ...props }) {
6761
6924
  );
6762
6925
  }
6763
6926
  function SliderIndicator({ className, ...props }) {
6764
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
6927
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
6765
6928
  import_slider.Slider.Indicator,
6766
6929
  {
6767
6930
  "data-slot": "slider-indicator",
@@ -6771,7 +6934,7 @@ function SliderIndicator({ className, ...props }) {
6771
6934
  );
6772
6935
  }
6773
6936
  function SliderThumb({ className, ...props }) {
6774
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
6937
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
6775
6938
  import_slider.Slider.Thumb,
6776
6939
  {
6777
6940
  "data-slot": "slider-thumb",
@@ -6785,7 +6948,7 @@ function SliderThumb({ className, ...props }) {
6785
6948
  }
6786
6949
 
6787
6950
  // src/components/components/Slider/index.tsx
6788
- var import_jsx_runtime109 = require("react/jsx-runtime");
6951
+ var import_jsx_runtime110 = require("react/jsx-runtime");
6789
6952
  function Slider2({
6790
6953
  name,
6791
6954
  label,
@@ -6801,7 +6964,7 @@ function Slider2({
6801
6964
  }) {
6802
6965
  const form = useFormContext();
6803
6966
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
6804
- (0, import_react25.useEffect)(() => {
6967
+ (0, import_react26.useEffect)(() => {
6805
6968
  if (inForm && form && name) {
6806
6969
  form.registerField(name, rules, value);
6807
6970
  return () => form.unregisterField(name);
@@ -6816,7 +6979,7 @@ function Slider2({
6816
6979
  }
6817
6980
  onChange?.(next);
6818
6981
  };
6819
- const slider = /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
6982
+ const slider = /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
6820
6983
  Slider,
6821
6984
  {
6822
6985
  value: numberValue,
@@ -6828,14 +6991,14 @@ function Slider2({
6828
6991
  onValueChange: handleChange,
6829
6992
  className: inForm ? void 0 : className,
6830
6993
  style: inForm ? void 0 : style,
6831
- children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(SliderControl, { children: [
6832
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(SliderTrack, { children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(SliderIndicator, {}) }),
6833
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(SliderThumb, {})
6994
+ children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(SliderControl, { children: [
6995
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SliderTrack, { children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SliderIndicator, {}) }),
6996
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SliderThumb, {})
6834
6997
  ] })
6835
6998
  }
6836
6999
  );
6837
7000
  if (inForm && form && name) {
6838
- return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
7001
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
6839
7002
  FieldShell,
6840
7003
  {
6841
7004
  layout: form.layout,
@@ -6851,13 +7014,13 @@ function Slider2({
6851
7014
  }
6852
7015
 
6853
7016
  // src/components/components/Sonner/index.tsx
6854
- var import_runtime20 = require("@pactor-app/runtime");
6855
- var import_react26 = require("react");
7017
+ var import_runtime21 = require("@pactor-app/runtime");
7018
+ var import_react27 = require("react");
6856
7019
 
6857
7020
  // src/ui/toast.tsx
6858
7021
  var import_toast = require("@base-ui/react/toast");
6859
- var import_lucide_react25 = require("lucide-react");
6860
- var import_jsx_runtime110 = require("react/jsx-runtime");
7022
+ var import_lucide_react26 = require("lucide-react");
7023
+ var import_jsx_runtime111 = require("react/jsx-runtime");
6861
7024
  var toastManager = import_toast.Toast.createToastManager();
6862
7025
  function toast(message, options = {}) {
6863
7026
  return toastManager.add({
@@ -6873,7 +7036,7 @@ var toastVariantClass = {
6873
7036
  };
6874
7037
  function ToasterViewport({ className }) {
6875
7038
  const { toasts } = import_toast.Toast.useToastManager();
6876
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_toast.Toast.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7039
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_toast.Toast.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
6877
7040
  import_toast.Toast.Viewport,
6878
7041
  {
6879
7042
  "data-slot": "toast-viewport",
@@ -6881,7 +7044,7 @@ function ToasterViewport({ className }) {
6881
7044
  "fixed top-4 right-4 z-[100] flex w-80 flex-col gap-2 outline-none",
6882
7045
  className
6883
7046
  ),
6884
- children: toasts.map((item) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7047
+ children: toasts.map((item) => /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
6885
7048
  import_toast.Toast.Root,
6886
7049
  {
6887
7050
  toast: item,
@@ -6891,16 +7054,16 @@ function ToasterViewport({ className }) {
6891
7054
  "rounded-md border border-border bg-popover px-4 py-3 text-sm text-popover-foreground shadow-md shadow-(color:--shadow-color) transition-[opacity,transform] duration-200 data-ending-style:animate-toast-out data-starting-style:animate-toast-in",
6892
7055
  toastVariantClass[item.type ?? "info"] ?? toastVariantClass.info
6893
7056
  ),
6894
- children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_toast.Toast.Content, { className: "flex items-start justify-between gap-2", children: [
6895
- /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "grid gap-0.5", children: [
6896
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7057
+ children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_toast.Toast.Content, { className: "flex items-start justify-between gap-2", children: [
7058
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "grid gap-0.5", children: [
7059
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
6897
7060
  import_toast.Toast.Title,
6898
7061
  {
6899
7062
  "data-slot": "toast-title",
6900
7063
  className: "font-medium"
6901
7064
  }
6902
7065
  ),
6903
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7066
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
6904
7067
  import_toast.Toast.Description,
6905
7068
  {
6906
7069
  "data-slot": "toast-description",
@@ -6908,13 +7071,13 @@ function ToasterViewport({ className }) {
6908
7071
  }
6909
7072
  )
6910
7073
  ] }),
6911
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
7074
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
6912
7075
  import_toast.Toast.Close,
6913
7076
  {
6914
7077
  "data-slot": "toast-close",
6915
7078
  "aria-label": "Close",
6916
7079
  className: "cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none [&_svg]:size-3.5",
6917
- children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react25.XIcon, {})
7080
+ children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_lucide_react26.XIcon, {})
6918
7081
  }
6919
7082
  )
6920
7083
  ] })
@@ -6925,14 +7088,14 @@ function ToasterViewport({ className }) {
6925
7088
  ) });
6926
7089
  }
6927
7090
  function Toaster({ className }) {
6928
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_toast.Toast.Provider, { toastManager, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(ToasterViewport, { className }) });
7091
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_toast.Toast.Provider, { toastManager, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(ToasterViewport, { className }) });
6929
7092
  }
6930
7093
 
6931
7094
  // src/components/components/Sonner/index.tsx
6932
- var import_jsx_runtime111 = require("react/jsx-runtime");
7095
+ var import_jsx_runtime112 = require("react/jsx-runtime");
6933
7096
  function Sonner({ className, style }) {
6934
- const { context } = (0, import_runtime20.useRenderer)();
6935
- (0, import_react26.useEffect)(() => {
7097
+ const { context } = (0, import_runtime21.useRenderer)();
7098
+ (0, import_react27.useEffect)(() => {
6936
7099
  const { actions } = context;
6937
7100
  if (actions.has("toast")) {
6938
7101
  return;
@@ -6946,15 +7109,15 @@ function Sonner({ className, style }) {
6946
7109
  return { ok: true };
6947
7110
  });
6948
7111
  }, [context]);
6949
- return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { "data-slot": "sonner", className, style, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Toaster, {}) });
7112
+ return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { "data-slot": "sonner", className, style, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Toaster, {}) });
6950
7113
  }
6951
7114
 
6952
7115
  // src/ui/spinner.tsx
6953
- var import_lucide_react26 = require("lucide-react");
6954
- var import_jsx_runtime112 = require("react/jsx-runtime");
7116
+ var import_lucide_react27 = require("lucide-react");
7117
+ var import_jsx_runtime113 = require("react/jsx-runtime");
6955
7118
  function Spinner({ className, ...props }) {
6956
- return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
6957
- import_lucide_react26.Loader2Icon,
7119
+ return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
7120
+ import_lucide_react27.Loader2Icon,
6958
7121
  {
6959
7122
  role: "status",
6960
7123
  "aria-label": "Loading",
@@ -6966,37 +7129,37 @@ function Spinner({ className, ...props }) {
6966
7129
  }
6967
7130
 
6968
7131
  // src/components/components/Spinner/index.tsx
6969
- var import_jsx_runtime113 = require("react/jsx-runtime");
7132
+ var import_jsx_runtime114 = require("react/jsx-runtime");
6970
7133
  var sizeClass = {
6971
7134
  sm: "size-3",
6972
7135
  default: "size-4",
6973
7136
  lg: "size-6"
6974
7137
  };
6975
7138
  function Spinner2({ size = "default", className, style }) {
6976
- return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Spinner, { className: cn(sizeClass[size], className), style });
7139
+ return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Spinner, { className: cn(sizeClass[size], className), style });
6977
7140
  }
6978
7141
 
6979
7142
  // src/components/components/Statistic/index.tsx
6980
- var import_jsx_runtime114 = require("react/jsx-runtime");
7143
+ var import_jsx_runtime115 = require("react/jsx-runtime");
6981
7144
  function Statistic({ title, value, precision, suffix, className, style }) {
6982
7145
  const display = typeof value === "number" && precision !== void 0 ? value.toFixed(precision) : value;
6983
- return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { "data-slot": "statistic", className: cn(className), style, children: [
6984
- title ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { "data-slot": "statistic-title", className: "text-sm text-muted-foreground", children: title }) : null,
6985
- /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { "data-slot": "statistic-value", className: "text-2xl font-bold tabular-nums", children: [
7146
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { "data-slot": "statistic", className: cn(className), style, children: [
7147
+ title ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { "data-slot": "statistic-title", className: "text-sm text-muted-foreground", children: title }) : null,
7148
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { "data-slot": "statistic-value", className: "text-2xl font-bold tabular-nums", children: [
6986
7149
  display,
6987
- suffix ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: suffix }) : null
7150
+ suffix ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: suffix }) : null
6988
7151
  ] })
6989
7152
  ] });
6990
7153
  }
6991
7154
 
6992
7155
  // src/components/components/Switch/index.tsx
6993
- var import_react27 = require("react");
7156
+ var import_react28 = require("react");
6994
7157
 
6995
7158
  // src/ui/switch.tsx
6996
7159
  var import_switch = require("@base-ui/react/switch");
6997
- var import_jsx_runtime115 = require("react/jsx-runtime");
7160
+ var import_jsx_runtime116 = require("react/jsx-runtime");
6998
7161
  function Switch({ className, ...props }) {
6999
- return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
7162
+ return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
7000
7163
  import_switch.Switch.Root,
7001
7164
  {
7002
7165
  "data-slot": "switch",
@@ -7005,7 +7168,7 @@ function Switch({ className, ...props }) {
7005
7168
  className
7006
7169
  ),
7007
7170
  ...props,
7008
- children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
7171
+ children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
7009
7172
  import_switch.Switch.Thumb,
7010
7173
  {
7011
7174
  "data-slot": "switch-thumb",
@@ -7017,7 +7180,7 @@ function Switch({ className, ...props }) {
7017
7180
  }
7018
7181
 
7019
7182
  // src/components/components/Switch/index.tsx
7020
- var import_jsx_runtime116 = require("react/jsx-runtime");
7183
+ var import_jsx_runtime117 = require("react/jsx-runtime");
7021
7184
  function Switch2({
7022
7185
  name,
7023
7186
  label,
@@ -7029,9 +7192,9 @@ function Switch2({
7029
7192
  style
7030
7193
  }) {
7031
7194
  const form = useFormContext();
7032
- const controlId = (0, import_react27.useId)();
7195
+ const controlId = (0, import_react28.useId)();
7033
7196
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
7034
- (0, import_react27.useEffect)(() => {
7197
+ (0, import_react28.useEffect)(() => {
7035
7198
  if (inForm && form && name) {
7036
7199
  form.registerField(name, rules, value);
7037
7200
  return () => form.unregisterField(name);
@@ -7046,13 +7209,13 @@ function Switch2({
7046
7209
  }
7047
7210
  onChange?.(next);
7048
7211
  };
7049
- const control = /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
7212
+ const control = /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
7050
7213
  "span",
7051
7214
  {
7052
7215
  className: cn("inline-flex items-center gap-2", !inForm && className),
7053
7216
  style: inForm ? void 0 : style,
7054
7217
  children: [
7055
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
7218
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
7056
7219
  Switch,
7057
7220
  {
7058
7221
  id: controlId,
@@ -7062,12 +7225,12 @@ function Switch2({
7062
7225
  onCheckedChange: handleChange
7063
7226
  }
7064
7227
  ),
7065
- label ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
7228
+ label ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("label", { htmlFor: controlId, className: "text-sm leading-none font-medium", children: label }) : null
7066
7229
  ]
7067
7230
  }
7068
7231
  );
7069
7232
  if (inForm && form && name) {
7070
- return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
7233
+ return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
7071
7234
  "div",
7072
7235
  {
7073
7236
  "data-slot": "form-item",
@@ -7075,7 +7238,7 @@ function Switch2({
7075
7238
  style,
7076
7239
  children: [
7077
7240
  control,
7078
- form.errors[name] ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { "data-slot": "form-error", className: "mt-1.5 text-sm text-destructive", children: form.errors[name] }) : null
7241
+ form.errors[name] ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { "data-slot": "form-error", className: "mt-1.5 text-sm text-destructive", children: form.errors[name] }) : null
7079
7242
  ]
7080
7243
  }
7081
7244
  );
@@ -7084,9 +7247,9 @@ function Switch2({
7084
7247
  }
7085
7248
 
7086
7249
  // src/components/components/Table/index.tsx
7087
- var import_runtime21 = require("@pactor-app/runtime");
7088
- var import_react28 = require("react");
7089
- var import_jsx_runtime117 = require("react/jsx-runtime");
7250
+ var import_runtime22 = require("@pactor-app/runtime");
7251
+ var import_react29 = require("react");
7252
+ var import_jsx_runtime118 = require("react/jsx-runtime");
7090
7253
  function renderCellValue2(value) {
7091
7254
  if (value === void 0 || value === null) {
7092
7255
  return "";
@@ -7096,6 +7259,11 @@ function renderCellValue2(value) {
7096
7259
  }
7097
7260
  return String(value);
7098
7261
  }
7262
+ var columnAlignClass = {
7263
+ left: void 0,
7264
+ center: "text-center",
7265
+ right: "text-right"
7266
+ };
7099
7267
  function Table3({
7100
7268
  columns = [],
7101
7269
  dataSource = [],
@@ -7106,9 +7274,9 @@ function Table3({
7106
7274
  className,
7107
7275
  style
7108
7276
  }) {
7109
- const { renderChildren } = (0, import_runtime21.useRenderer)();
7110
- const { t } = (0, import_runtime21.useI18n)();
7111
- const [current, setCurrent] = (0, import_react28.useState)(1);
7277
+ const { renderChildren } = (0, import_runtime22.useRenderer)();
7278
+ const { t } = (0, import_runtime22.useI18n)();
7279
+ const [current, setCurrent] = (0, import_react29.useState)(1);
7112
7280
  const pageSize = pagination === false ? void 0 : pagination?.pageSize;
7113
7281
  const total = dataSource.length;
7114
7282
  const pageCount = pageSize !== void 0 && pageSize > 0 ? Math.max(1, Math.ceil(total / pageSize)) : 1;
@@ -7117,8 +7285,8 @@ function Table3({
7117
7285
  setCurrent(page);
7118
7286
  onChange?.({ current: page, pageSize, total });
7119
7287
  };
7120
- return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { "data-slot": "dsl-table", className: cn("relative", className), style, children: [
7121
- loading ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
7288
+ return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { "data-slot": "dsl-table", className: cn("relative", className), style, children: [
7289
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7122
7290
  "div",
7123
7291
  {
7124
7292
  "data-slot": "table-loading",
@@ -7126,16 +7294,17 @@ function Table3({
7126
7294
  children: t("pactor.table.loading")
7127
7295
  }
7128
7296
  ) : null,
7129
- /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(Table2, { children: [
7130
- /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TableRow, { className: "hover:bg-transparent", children: columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
7297
+ /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(Table2, { children: [
7298
+ /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(TableRow, { className: "hover:bg-transparent", children: columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7131
7299
  TableHead,
7132
7300
  {
7301
+ className: column.align ? columnAlignClass[column.align] : void 0,
7133
7302
  style: column.width !== void 0 ? { width: column.width } : void 0,
7134
7303
  children: column.title
7135
7304
  },
7136
7305
  column.dataIndex ?? String(index)
7137
7306
  )) }) }),
7138
- /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TableBody, { children: pageRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TableCell, { colSpan: Math.max(1, columns.length), children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
7307
+ /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(TableBody, { children: pageRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(TableCell, { colSpan: Math.max(1, columns.length), children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7139
7308
  "div",
7140
7309
  {
7141
7310
  "data-slot": "table-empty",
@@ -7144,19 +7313,26 @@ function Table3({
7144
7313
  }
7145
7314
  ) }) }) : pageRows.map((row, rowIndex) => {
7146
7315
  const key = row[rowKey];
7147
- return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
7316
+ return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7148
7317
  TableRow,
7149
7318
  {
7150
- children: columns.map((column, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(TableCell, { children: column.cell ? renderChildren([column.cell], { row, rowIndex }) : renderCellValue2(
7151
- column.dataIndex === void 0 ? void 0 : row[column.dataIndex]
7152
- ) }, column.dataIndex ?? String(columnIndex)))
7319
+ children: columns.map((column, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7320
+ TableCell,
7321
+ {
7322
+ className: column.align ? columnAlignClass[column.align] : void 0,
7323
+ children: column.cell ? renderChildren([column.cell], { row, rowIndex }) : renderCellValue2(
7324
+ column.dataIndex === void 0 ? void 0 : row[column.dataIndex]
7325
+ )
7326
+ },
7327
+ column.dataIndex ?? String(columnIndex)
7328
+ ))
7153
7329
  },
7154
7330
  key === void 0 || key === null ? rowIndex : String(key)
7155
7331
  );
7156
7332
  }) })
7157
7333
  ] }),
7158
- pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { "data-slot": "table-pagination", className: "mt-3 flex justify-end gap-1", children: Array.from({ length: pageCount }, (_, index) => index + 1).map(
7159
- (page) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
7334
+ pageSize !== void 0 && pageSize > 0 ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { "data-slot": "table-pagination", className: "mt-3 flex justify-end gap-1", children: Array.from({ length: pageCount }, (_, index) => index + 1).map(
7335
+ (page) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7160
7336
  Button,
7161
7337
  {
7162
7338
  type: "button",
@@ -7173,17 +7349,17 @@ function Table3({
7173
7349
  }
7174
7350
 
7175
7351
  // src/components/components/Tabs/index.tsx
7176
- var import_runtime22 = require("@pactor-app/runtime");
7352
+ var import_runtime23 = require("@pactor-app/runtime");
7177
7353
 
7178
7354
  // src/ui/tabs.tsx
7179
7355
  var import_tabs = require("@base-ui/react/tabs");
7180
7356
  var import_class_variance_authority7 = require("class-variance-authority");
7181
- var import_jsx_runtime118 = require("react/jsx-runtime");
7357
+ var import_jsx_runtime119 = require("react/jsx-runtime");
7182
7358
  function Tabs({
7183
7359
  className,
7184
7360
  ...props
7185
7361
  }) {
7186
- return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7362
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7187
7363
  import_tabs.Tabs.Root,
7188
7364
  {
7189
7365
  "data-slot": "tabs",
@@ -7212,7 +7388,7 @@ function TabsList({
7212
7388
  variant,
7213
7389
  ...props
7214
7390
  }) {
7215
- return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7391
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7216
7392
  import_tabs.Tabs.List,
7217
7393
  {
7218
7394
  "data-slot": "tabs-list",
@@ -7226,7 +7402,7 @@ function TabsTrigger({
7226
7402
  className,
7227
7403
  ...props
7228
7404
  }) {
7229
- return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7405
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7230
7406
  import_tabs.Tabs.Tab,
7231
7407
  {
7232
7408
  "data-slot": "tabs-trigger",
@@ -7248,7 +7424,7 @@ function TabsContent({
7248
7424
  className,
7249
7425
  ...props
7250
7426
  }) {
7251
- return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
7427
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7252
7428
  import_tabs.Tabs.Panel,
7253
7429
  {
7254
7430
  "data-slot": "tabs-content",
@@ -7259,7 +7435,7 @@ function TabsContent({
7259
7435
  }
7260
7436
 
7261
7437
  // src/components/components/Tabs/index.tsx
7262
- var import_jsx_runtime119 = require("react/jsx-runtime");
7438
+ var import_jsx_runtime120 = require("react/jsx-runtime");
7263
7439
  function Tabs2({
7264
7440
  items = [],
7265
7441
  activeKey,
@@ -7270,8 +7446,8 @@ function Tabs2({
7270
7446
  className,
7271
7447
  style
7272
7448
  }) {
7273
- const { renderChildren } = (0, import_runtime22.useRenderer)();
7274
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
7449
+ const { renderChildren } = (0, import_runtime23.useRenderer)();
7450
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
7275
7451
  Tabs,
7276
7452
  {
7277
7453
  value: activeKey,
@@ -7280,8 +7456,8 @@ function Tabs2({
7280
7456
  className,
7281
7457
  style,
7282
7458
  children: [
7283
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsList, { variant, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(TabsTrigger, { value: item.key, children: item.label }, item.key)) }),
7284
- items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
7459
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(TabsList, { variant, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(TabsTrigger, { value: item.key, children: item.label }, item.key)) }),
7460
+ items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
7285
7461
  TabsContent,
7286
7462
  {
7287
7463
  value: item.key,
@@ -7297,7 +7473,7 @@ function Tabs2({
7297
7473
  }
7298
7474
 
7299
7475
  // src/components/components/Text/index.tsx
7300
- var import_jsx_runtime120 = require("react/jsx-runtime");
7476
+ var import_jsx_runtime121 = require("react/jsx-runtime");
7301
7477
  var typeClassMap = {
7302
7478
  default: "",
7303
7479
  secondary: "text-muted-foreground",
@@ -7322,7 +7498,7 @@ function Text({
7322
7498
  style,
7323
7499
  children
7324
7500
  }) {
7325
- return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
7501
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
7326
7502
  "span",
7327
7503
  {
7328
7504
  "data-slot": "text",
@@ -7343,8 +7519,8 @@ function Text({
7343
7519
  }
7344
7520
 
7345
7521
  // src/components/components/Textarea/index.tsx
7346
- var import_react29 = require("react");
7347
- var import_jsx_runtime121 = require("react/jsx-runtime");
7522
+ var import_react30 = require("react");
7523
+ var import_jsx_runtime122 = require("react/jsx-runtime");
7348
7524
  function Textarea2({
7349
7525
  name,
7350
7526
  label,
@@ -7358,9 +7534,9 @@ function Textarea2({
7358
7534
  style
7359
7535
  }) {
7360
7536
  const form = useFormContext();
7361
- const controlId = (0, import_react29.useId)();
7537
+ const controlId = (0, import_react30.useId)();
7362
7538
  const inForm = form?.inForm === true && typeof name === "string" && name !== "";
7363
- (0, import_react29.useEffect)(() => {
7539
+ (0, import_react30.useEffect)(() => {
7364
7540
  if (inForm && form && name) {
7365
7541
  form.registerField(name, rules, value);
7366
7542
  return () => form.unregisterField(name);
@@ -7369,7 +7545,7 @@ function Textarea2({
7369
7545
  });
7370
7546
  if (inForm && form && name) {
7371
7547
  const fieldValue = form.values[name];
7372
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
7548
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
7373
7549
  FieldShell,
7374
7550
  {
7375
7551
  layout: form.layout,
@@ -7378,7 +7554,7 @@ function Textarea2({
7378
7554
  error: form.errors[name],
7379
7555
  className,
7380
7556
  style,
7381
- children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
7557
+ children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
7382
7558
  Textarea,
7383
7559
  {
7384
7560
  id: controlId,
@@ -7395,7 +7571,7 @@ function Textarea2({
7395
7571
  }
7396
7572
  );
7397
7573
  }
7398
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
7574
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
7399
7575
  Textarea,
7400
7576
  {
7401
7577
  value: value ?? "",
@@ -7412,7 +7588,7 @@ function Textarea2({
7412
7588
  // src/ui/toggle.tsx
7413
7589
  var import_toggle = require("@base-ui/react/toggle");
7414
7590
  var import_class_variance_authority8 = require("class-variance-authority");
7415
- var import_jsx_runtime122 = require("react/jsx-runtime");
7591
+ var import_jsx_runtime123 = require("react/jsx-runtime");
7416
7592
  var toggleVariants = (0, import_class_variance_authority8.cva)(
7417
7593
  "inline-flex cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-colors outline-none hover:bg-muted hover:text-muted-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-pressed:bg-accent data-pressed:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
7418
7594
  {
@@ -7439,7 +7615,7 @@ function Toggle({
7439
7615
  size,
7440
7616
  ...props
7441
7617
  }) {
7442
- return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
7618
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
7443
7619
  import_toggle.Toggle,
7444
7620
  {
7445
7621
  "data-slot": "toggle",
@@ -7450,7 +7626,7 @@ function Toggle({
7450
7626
  }
7451
7627
 
7452
7628
  // src/components/components/Toggle/index.tsx
7453
- var import_jsx_runtime123 = require("react/jsx-runtime");
7629
+ var import_jsx_runtime124 = require("react/jsx-runtime");
7454
7630
  function Toggle2({
7455
7631
  text,
7456
7632
  pressed,
@@ -7461,7 +7637,7 @@ function Toggle2({
7461
7637
  className,
7462
7638
  style
7463
7639
  }) {
7464
- return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
7640
+ return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
7465
7641
  Toggle,
7466
7642
  {
7467
7643
  pressed,
@@ -7480,7 +7656,7 @@ function Toggle2({
7480
7656
  var import_toggle3 = require("@base-ui/react/toggle");
7481
7657
  var import_toggle_group = require("@base-ui/react/toggle-group");
7482
7658
  var React6 = __toESM(require("react"), 1);
7483
- var import_jsx_runtime124 = require("react/jsx-runtime");
7659
+ var import_jsx_runtime125 = require("react/jsx-runtime");
7484
7660
  var ToggleGroupContext = React6.createContext({
7485
7661
  size: "default",
7486
7662
  variant: "default"
@@ -7492,7 +7668,7 @@ function ToggleGroup({
7492
7668
  children,
7493
7669
  ...props
7494
7670
  }) {
7495
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
7671
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
7496
7672
  import_toggle_group.ToggleGroup,
7497
7673
  {
7498
7674
  "data-slot": "toggle-group",
@@ -7503,7 +7679,7 @@ function ToggleGroup({
7503
7679
  className
7504
7680
  ),
7505
7681
  ...props,
7506
- children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
7682
+ children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
7507
7683
  }
7508
7684
  );
7509
7685
  }
@@ -7515,7 +7691,7 @@ function ToggleGroupItem({
7515
7691
  ...props
7516
7692
  }) {
7517
7693
  const context = React6.useContext(ToggleGroupContext);
7518
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
7694
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
7519
7695
  import_toggle3.Toggle,
7520
7696
  {
7521
7697
  "data-slot": "toggle-group-item",
@@ -7536,7 +7712,7 @@ function ToggleGroupItem({
7536
7712
  }
7537
7713
 
7538
7714
  // src/components/components/ToggleGroup/index.tsx
7539
- var import_jsx_runtime125 = require("react/jsx-runtime");
7715
+ var import_jsx_runtime126 = require("react/jsx-runtime");
7540
7716
  function ToggleGroup2({
7541
7717
  options = [],
7542
7718
  value,
@@ -7556,7 +7732,7 @@ function ToggleGroup2({
7556
7732
  onChange?.(added ?? void 0);
7557
7733
  }
7558
7734
  };
7559
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
7735
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
7560
7736
  ToggleGroup,
7561
7737
  {
7562
7738
  value: groupValue,
@@ -7565,7 +7741,7 @@ function ToggleGroup2({
7565
7741
  onValueChange: (next) => handleChange(next),
7566
7742
  className,
7567
7743
  style,
7568
- children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
7744
+ children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
7569
7745
  ToggleGroupItem,
7570
7746
  {
7571
7747
  value: option.value,
@@ -7579,17 +7755,17 @@ function ToggleGroup2({
7579
7755
  }
7580
7756
 
7581
7757
  // src/components/components/Tooltip/index.tsx
7582
- var import_jsx_runtime126 = require("react/jsx-runtime");
7758
+ var import_jsx_runtime127 = require("react/jsx-runtime");
7583
7759
  function Tooltip3({ content, children, className, style }) {
7584
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Tooltip, { children: [
7585
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(TooltipTrigger, { render: triggerWrapper("tooltip-trigger-wrap"), children }),
7586
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(TooltipContent, { className, style, children: content })
7760
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(Tooltip, { children: [
7761
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(TooltipTrigger, { render: triggerWrapper("tooltip-trigger-wrap"), children }),
7762
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(TooltipContent, { className, style, children: content })
7587
7763
  ] });
7588
7764
  }
7589
7765
 
7590
7766
  // src/ui/typography.tsx
7591
7767
  var import_class_variance_authority9 = require("class-variance-authority");
7592
- var import_jsx_runtime127 = require("react/jsx-runtime");
7768
+ var import_jsx_runtime128 = require("react/jsx-runtime");
7593
7769
  var typographyVariants = (0, import_class_variance_authority9.cva)("", {
7594
7770
  variants: {
7595
7771
  variant: {
@@ -7625,7 +7801,7 @@ var variantTagMap = {
7625
7801
  };
7626
7802
  function Typography({ className, variant = "p", ...props }) {
7627
7803
  const Tag2 = variantTagMap[variant ?? "p"];
7628
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
7804
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
7629
7805
  Tag2,
7630
7806
  {
7631
7807
  "data-slot": "typography",
@@ -7637,14 +7813,14 @@ function Typography({ className, variant = "p", ...props }) {
7637
7813
  }
7638
7814
 
7639
7815
  // src/components/components/Typography/index.tsx
7640
- var import_jsx_runtime128 = require("react/jsx-runtime");
7816
+ var import_jsx_runtime129 = require("react/jsx-runtime");
7641
7817
  function Typography2({
7642
7818
  variant = "p",
7643
7819
  text,
7644
7820
  className,
7645
7821
  style
7646
7822
  }) {
7647
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Typography, { variant, className, style, children: text });
7823
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Typography, { variant, className, style, children: text });
7648
7824
  }
7649
7825
 
7650
7826
  // src/components/register.ts
@@ -7660,6 +7836,7 @@ var builtinComponents = {
7660
7836
  Table: Table3,
7661
7837
  Form,
7662
7838
  Input: Input2,
7839
+ NumberInput,
7663
7840
  Select: Select2,
7664
7841
  // Layout 需要原始 DSL 子树做方向推导(含 Sider 判定),以 withScope 注册
7665
7842
  Layout: { component: Layout, withScope: true },
@@ -7787,11 +7964,11 @@ function collectDefaultOpenKeys(registry, activeMenuId) {
7787
7964
  // src/layout/admin/AdminLayout.tsx
7788
7965
  var import_permission = require("@pactor-app/permission");
7789
7966
  var import_router = require("@pactor-app/router");
7790
- var import_runtime23 = require("@pactor-app/runtime");
7791
- var import_react31 = require("react");
7967
+ var import_runtime24 = require("@pactor-app/runtime");
7968
+ var import_react32 = require("react");
7792
7969
 
7793
7970
  // src/layout/admin/use-media-query.ts
7794
- var import_react30 = require("react");
7971
+ var import_react31 = require("react");
7795
7972
  var BREAKPOINT_PX = {
7796
7973
  xs: 480,
7797
7974
  sm: 576,
@@ -7801,10 +7978,10 @@ var BREAKPOINT_PX = {
7801
7978
  xxl: 1600
7802
7979
  };
7803
7980
  function useMediaQuery(query) {
7804
- const [matches, setMatches] = (0, import_react30.useState)(
7981
+ const [matches, setMatches] = (0, import_react31.useState)(
7805
7982
  () => typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia(query).matches : false
7806
7983
  );
7807
- (0, import_react30.useEffect)(() => {
7984
+ (0, import_react31.useEffect)(() => {
7808
7985
  if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
7809
7986
  return;
7810
7987
  }
@@ -7824,7 +8001,7 @@ function useBreakpointBelow(breakpoint) {
7824
8001
  }
7825
8002
 
7826
8003
  // src/layout/admin/AdminLayout.tsx
7827
- var import_jsx_runtime129 = require("react/jsx-runtime");
8004
+ var import_jsx_runtime130 = require("react/jsx-runtime");
7828
8005
  function buildVisibleMenuTree(registry, permissionChecker) {
7829
8006
  const tree = registry.tree();
7830
8007
  return permissionChecker === void 0 ? [...tree] : (0, import_permission.filterMenusByPermission)(tree, permissionChecker);
@@ -7847,8 +8024,8 @@ function CollapsedGroupFlyout({
7847
8024
  activeMenuId,
7848
8025
  defaultOpenKeys
7849
8026
  }) {
7850
- const [open, setOpen] = (0, import_react31.useState)(false);
7851
- const closeTimer = (0, import_react31.useRef)(void 0);
8027
+ const [open, setOpen] = (0, import_react32.useState)(false);
8028
+ const closeTimer = (0, import_react32.useRef)(void 0);
7852
8029
  const openNow = () => {
7853
8030
  window.clearTimeout(closeTimer.current);
7854
8031
  setOpen(true);
@@ -7857,12 +8034,12 @@ function CollapsedGroupFlyout({
7857
8034
  window.clearTimeout(closeTimer.current);
7858
8035
  closeTimer.current = window.setTimeout(() => setOpen(false), 200);
7859
8036
  };
7860
- (0, import_react31.useEffect)(() => () => window.clearTimeout(closeTimer.current), []);
7861
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
7862
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8037
+ (0, import_react32.useEffect)(() => () => window.clearTimeout(closeTimer.current), []);
8038
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
8039
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
7863
8040
  PopoverTrigger,
7864
8041
  {
7865
- render: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8042
+ render: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
7866
8043
  "button",
7867
8044
  {
7868
8045
  type: "button",
@@ -7880,7 +8057,7 @@ function CollapsedGroupFlyout({
7880
8057
  )
7881
8058
  }
7882
8059
  ),
7883
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
8060
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
7884
8061
  PopoverContent,
7885
8062
  {
7886
8063
  "data-slot": "menu-flyout",
@@ -7897,8 +8074,8 @@ function CollapsedGroupFlyout({
7897
8074
  }
7898
8075
  },
7899
8076
  children: [
7900
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "px-3 pt-2 pb-1 text-xs font-semibold text-muted-foreground", children: menu.title }),
7901
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8077
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "px-3 pt-2 pb-1 text-xs font-semibold text-muted-foreground", children: menu.title }),
8078
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
7902
8079
  MenuTree,
7903
8080
  {
7904
8081
  menus: menu.children ?? [],
@@ -7922,9 +8099,9 @@ function MenuTree({
7922
8099
  collapsed = false
7923
8100
  }) {
7924
8101
  if (collapsed) {
7925
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { "data-slot": "menu", "data-collapsed": "true", className: "flex flex-col gap-1", children: menus.map((menu) => {
8102
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { "data-slot": "menu", "data-collapsed": "true", className: "flex flex-col gap-1", children: menus.map((menu) => {
7926
8103
  if (menu.type === "group") {
7927
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8104
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
7928
8105
  CollapsedGroupFlyout,
7929
8106
  {
7930
8107
  menu,
@@ -7936,7 +8113,7 @@ function MenuTree({
7936
8113
  menu.id
7937
8114
  );
7938
8115
  }
7939
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8116
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
7940
8117
  "button",
7941
8118
  {
7942
8119
  type: "button",
@@ -7956,7 +8133,7 @@ function MenuTree({
7956
8133
  );
7957
8134
  }) });
7958
8135
  }
7959
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8136
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
7960
8137
  Accordion,
7961
8138
  {
7962
8139
  type: "multiple",
@@ -7965,27 +8142,27 @@ function MenuTree({
7965
8142
  className: "flex flex-col gap-0.5 px-2",
7966
8143
  children: menus.map((menu) => {
7967
8144
  if (menu.type === "group") {
7968
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
8145
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
7969
8146
  AccordionItem,
7970
8147
  {
7971
8148
  value: menu.id,
7972
8149
  "data-slot": "menu-group",
7973
8150
  className: "border-b-0",
7974
8151
  children: [
7975
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8152
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
7976
8153
  AccordionTrigger,
7977
8154
  {
7978
8155
  "data-slot": "menu-group-trigger",
7979
8156
  className: cn(menuItemClass2, "py-2 font-medium"),
7980
8157
  disabled: menu.disabled,
7981
8158
  title: menu.title,
7982
- children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
7983
- menu.icon ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { name: menu.icon, size: "sm" }) : null,
8159
+ children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("span", { className: "inline-flex items-center gap-2", children: [
8160
+ menu.icon ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { name: menu.icon, size: "sm" }) : null,
7984
8161
  menu.title
7985
8162
  ] })
7986
8163
  }
7987
8164
  ),
7988
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(AccordionContent, { "data-slot": "menu-group-content", className: "pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "flex flex-col gap-0.5 pl-3", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8165
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(AccordionContent, { "data-slot": "menu-group-content", className: "pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "flex flex-col gap-0.5 pl-3", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
7989
8166
  MenuTree,
7990
8167
  {
7991
8168
  menus: menu.children ?? [],
@@ -8000,7 +8177,7 @@ function MenuTree({
8000
8177
  menu.id
8001
8178
  );
8002
8179
  }
8003
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
8180
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
8004
8181
  "button",
8005
8182
  {
8006
8183
  type: "button",
@@ -8014,7 +8191,7 @@ function MenuTree({
8014
8191
  title: menu.title,
8015
8192
  onClick: () => navigateMenuItem(registry.findById(menu.id), bridge),
8016
8193
  children: [
8017
- menu.icon ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { name: menu.icon, size: "sm" }) : null,
8194
+ menu.icon ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { name: menu.icon, size: "sm" }) : null,
8018
8195
  menu.title
8019
8196
  ]
8020
8197
  },
@@ -8034,23 +8211,23 @@ function AdminLayout({
8034
8211
  headerExtra,
8035
8212
  children
8036
8213
  }) {
8037
- const { t } = (0, import_runtime23.useI18n)();
8214
+ const { t } = (0, import_runtime24.useI18n)();
8038
8215
  const mode = config.mode ?? "top-side";
8039
8216
  const showHeader = config.header ?? true;
8040
8217
  const showSidebar = (config.sidebar ?? true) && mode !== "top-bottom";
8041
8218
  const showTabs = config.tabs ?? false;
8042
8219
  const showBreadcrumb = config.breadcrumb ?? false;
8043
8220
  const showFooter = config.footer ?? false;
8044
- const [collapsed, setCollapsed] = (0, import_react31.useState)(config.collapsed ?? false);
8221
+ const [collapsed, setCollapsed] = (0, import_react32.useState)(config.collapsed ?? false);
8045
8222
  const broken = useBreakpointBelow(config.breakpoint);
8046
8223
  const effectiveCollapsed = collapsed || broken;
8047
- const [bridgeRoute, setBridgeRoute] = (0, import_react31.useState)(
8224
+ const [bridgeRoute, setBridgeRoute] = (0, import_react32.useState)(
8048
8225
  () => (0, import_router.resolveRoute)(registry, bridge.getLocation())
8049
8226
  );
8050
- const [tabs, setTabs] = (0, import_react31.useState)([]);
8051
- const tabsRef = (0, import_react31.useRef)(tabs);
8227
+ const [tabs, setTabs] = (0, import_react32.useState)([]);
8228
+ const tabsRef = (0, import_react32.useRef)(tabs);
8052
8229
  tabsRef.current = tabs;
8053
- (0, import_react31.useEffect)(() => {
8230
+ (0, import_react32.useEffect)(() => {
8054
8231
  const handleLocation = (location) => {
8055
8232
  const next = (0, import_router.resolveRoute)(registry, location);
8056
8233
  setBridgeRoute(next);
@@ -8071,16 +8248,16 @@ function AdminLayout({
8071
8248
  }, [registry, bridge]);
8072
8249
  const route = routeProp ?? bridgeRoute;
8073
8250
  const activeMenuId = route?.activeMenu;
8074
- const visibleMenus = (0, import_react31.useMemo)(
8251
+ const visibleMenus = (0, import_react32.useMemo)(
8075
8252
  () => buildVisibleMenuTree(registry, permissionChecker),
8076
8253
  [registry, permissionChecker]
8077
8254
  );
8078
- const defaultOpenKeysRef = (0, import_react31.useRef)(null);
8255
+ const defaultOpenKeysRef = (0, import_react32.useRef)(null);
8079
8256
  if (defaultOpenKeysRef.current === null) {
8080
8257
  defaultOpenKeysRef.current = collectDefaultOpenKeys(registry, activeMenuId);
8081
8258
  }
8082
8259
  const defaultOpenKeys = defaultOpenKeysRef.current;
8083
- const activeTopId = (0, import_react31.useMemo)(() => {
8260
+ const activeTopId = (0, import_react32.useMemo)(() => {
8084
8261
  if (activeMenuId !== void 0) {
8085
8262
  const chain = findMenuChain(registry, activeMenuId);
8086
8263
  if (chain.length > 0) {
@@ -8089,11 +8266,11 @@ function AdminLayout({
8089
8266
  }
8090
8267
  return void 0;
8091
8268
  }, [registry, activeMenuId]);
8092
- const [selectedTopId, setSelectedTopId] = (0, import_react31.useState)();
8269
+ const [selectedTopId, setSelectedTopId] = (0, import_react32.useState)();
8093
8270
  const secondaryTopId = selectedTopId ?? activeTopId ?? visibleMenus.find((m) => m.type === "group")?.id ?? visibleMenus[0]?.id;
8094
8271
  const secondaryTop = visibleMenus.find((m) => m.id === secondaryTopId);
8095
8272
  const hasSecondary = (secondaryTop?.children?.length ?? 0) > 0;
8096
- const breadcrumbItems = (0, import_react31.useMemo)(() => {
8273
+ const breadcrumbItems = (0, import_react32.useMemo)(() => {
8097
8274
  if (!showBreadcrumb || activeMenuId === void 0) {
8098
8275
  return [];
8099
8276
  }
@@ -8109,7 +8286,7 @@ function AdminLayout({
8109
8286
  };
8110
8287
  const fixedHeader = config.fixedHeader ?? true;
8111
8288
  const fixedSider = config.fixedSider ?? true;
8112
- const header = showHeader ? /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
8289
+ const header = showHeader ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
8113
8290
  "header",
8114
8291
  {
8115
8292
  "data-slot": "admin-header",
@@ -8118,21 +8295,21 @@ function AdminLayout({
8118
8295
  fixedHeader && "sticky top-0 z-20"
8119
8296
  ),
8120
8297
  children: [
8121
- mode !== "side-full" && /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_jsx_runtime129.Fragment, { children: [
8298
+ mode !== "side-full" && /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
8122
8299
  brand.logo,
8123
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { "data-slot": "admin-brand", className: "text-lg font-semibold", children: brand.title })
8300
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { "data-slot": "admin-brand", className: "text-lg font-semibold", children: brand.title })
8124
8301
  ] }),
8125
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "flex-1" }),
8302
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "flex-1" }),
8126
8303
  headerExtra
8127
8304
  ]
8128
8305
  }
8129
8306
  ) : null;
8130
- const primaryColumn = /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8307
+ const primaryColumn = /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8131
8308
  "div",
8132
8309
  {
8133
8310
  "data-slot": "admin-primary-col",
8134
8311
  className: "flex w-12 shrink-0 flex-col items-center gap-1 border-r border-border py-2",
8135
- children: visibleMenus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8312
+ children: visibleMenus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8136
8313
  "button",
8137
8314
  {
8138
8315
  type: "button",
@@ -8159,7 +8336,7 @@ function AdminLayout({
8159
8336
  }
8160
8337
  );
8161
8338
  const showTrigger = config.collapsible && mode !== "two-column";
8162
- const sidebar = showSidebar ? /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
8339
+ const sidebar = showSidebar ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
8163
8340
  "aside",
8164
8341
  {
8165
8342
  "data-slot": "admin-sidebar",
@@ -8171,20 +8348,20 @@ function AdminLayout({
8171
8348
  ),
8172
8349
  style: mode === "two-column" && !hasSecondary ? { width: 56 } : void 0,
8173
8350
  children: [
8174
- mode === "side-full" && /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
8351
+ mode === "side-full" && /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
8175
8352
  "div",
8176
8353
  {
8177
8354
  "data-slot": "admin-sidebar-brand",
8178
8355
  className: "flex items-center gap-2 border-b border-border px-4 py-4 font-semibold",
8179
8356
  children: [
8180
8357
  brand.logo,
8181
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { children: brand.title })
8358
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { children: brand.title })
8182
8359
  ]
8183
8360
  }
8184
8361
  ),
8185
- mode === "two-column" ? /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { "data-slot": "admin-two-col", className: "flex h-full", children: [
8362
+ mode === "two-column" ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { "data-slot": "admin-two-col", className: "flex h-full", children: [
8186
8363
  primaryColumn,
8187
- hasSecondary && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { "data-slot": "admin-secondary-col", className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8364
+ hasSecondary && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { "data-slot": "admin-secondary-col", className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8188
8365
  MenuTree,
8189
8366
  {
8190
8367
  menus: secondaryTop?.children ?? [],
@@ -8194,7 +8371,7 @@ function AdminLayout({
8194
8371
  defaultOpenKeys
8195
8372
  }
8196
8373
  ) })
8197
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8374
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8198
8375
  MenuTree,
8199
8376
  {
8200
8377
  menus: visibleMenus,
@@ -8205,7 +8382,7 @@ function AdminLayout({
8205
8382
  collapsed: effectiveCollapsed
8206
8383
  }
8207
8384
  ),
8208
- showTrigger && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8385
+ showTrigger && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8209
8386
  "button",
8210
8387
  {
8211
8388
  type: "button",
@@ -8220,14 +8397,14 @@ function AdminLayout({
8220
8397
  ]
8221
8398
  }
8222
8399
  ) : null;
8223
- const body = /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { "data-slot": "admin-body", className: "flex min-w-0 flex-1 flex-col", children: [
8224
- showTabs && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8400
+ const body = /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { "data-slot": "admin-body", className: "flex min-w-0 flex-1 flex-col", children: [
8401
+ showTabs && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8225
8402
  "div",
8226
8403
  {
8227
8404
  "data-slot": "admin-tabs",
8228
8405
  role: "tablist",
8229
8406
  className: "flex items-center gap-1 border-b border-border bg-card px-4 pt-2",
8230
- children: tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
8407
+ children: tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
8231
8408
  "div",
8232
8409
  {
8233
8410
  "data-slot": "admin-tab",
@@ -8238,7 +8415,7 @@ function AdminLayout({
8238
8415
  tab.key === currentPath ? "bg-card font-medium text-foreground" : "bg-muted text-muted-foreground"
8239
8416
  ),
8240
8417
  children: [
8241
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8418
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8242
8419
  "button",
8243
8420
  {
8244
8421
  type: "button",
@@ -8249,7 +8426,7 @@ function AdminLayout({
8249
8426
  children: tab.title
8250
8427
  }
8251
8428
  ),
8252
- index > 0 && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8429
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8253
8430
  "button",
8254
8431
  {
8255
8432
  type: "button",
@@ -8266,21 +8443,21 @@ function AdminLayout({
8266
8443
  ))
8267
8444
  }
8268
8445
  ),
8269
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
8446
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
8270
8447
  "main",
8271
8448
  {
8272
8449
  "data-slot": "admin-content",
8273
8450
  className: "flex-1 bg-muted/40 p-6",
8274
8451
  children: [
8275
- showBreadcrumb && breadcrumbItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8452
+ showBreadcrumb && breadcrumbItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8276
8453
  "nav",
8277
8454
  {
8278
8455
  "data-slot": "admin-breadcrumb",
8279
8456
  "aria-label": t("pactor.layout.breadcrumb"),
8280
8457
  className: "mb-4",
8281
- children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("ol", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: breadcrumbItems.map((title, index) => /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("li", { className: "flex items-center gap-2", children: [
8282
- index > 0 && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { "aria-hidden": true, children: "/" }),
8283
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { "data-slot": "breadcrumb-link", children: title })
8458
+ children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("ol", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: breadcrumbItems.map((title, index) => /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("li", { className: "flex items-center gap-2", children: [
8459
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { "aria-hidden": true, children: "/" }),
8460
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { "data-slot": "breadcrumb-link", children: title })
8284
8461
  ] }, index)) })
8285
8462
  }
8286
8463
  ),
@@ -8289,7 +8466,7 @@ function AdminLayout({
8289
8466
  }
8290
8467
  )
8291
8468
  ] });
8292
- const footer = showFooter ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8469
+ const footer = showFooter ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8293
8470
  "footer",
8294
8471
  {
8295
8472
  "data-slot": "admin-footer",
@@ -8297,7 +8474,7 @@ function AdminLayout({
8297
8474
  children: brand.title
8298
8475
  }
8299
8476
  ) : null;
8300
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8477
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8301
8478
  "div",
8302
8479
  {
8303
8480
  "data-slot": "admin-layout",
@@ -8305,9 +8482,9 @@ function AdminLayout({
8305
8482
  "data-fixed-header": fixedHeader || void 0,
8306
8483
  "data-fixed-sider": fixedSider || void 0,
8307
8484
  className: "flex min-h-screen flex-col bg-background text-foreground",
8308
- children: mode === "side-full" ? /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { "data-slot": "admin-side-full", className: "flex min-h-screen flex-1", children: [
8485
+ children: mode === "side-full" ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { "data-slot": "admin-side-full", className: "flex min-h-screen flex-1", children: [
8309
8486
  sidebar,
8310
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
8487
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
8311
8488
  "div",
8312
8489
  {
8313
8490
  "data-slot": "admin-side-full-main",
@@ -8319,9 +8496,9 @@ function AdminLayout({
8319
8496
  ]
8320
8497
  }
8321
8498
  )
8322
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_jsx_runtime129.Fragment, { children: [
8499
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
8323
8500
  header,
8324
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { "data-slot": "admin-main", className: "flex min-h-0 flex-1", children: [
8501
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { "data-slot": "admin-main", className: "flex min-h-0 flex-1", children: [
8325
8502
  sidebar,
8326
8503
  body
8327
8504
  ] }),
@@ -8332,9 +8509,9 @@ function AdminLayout({
8332
8509
  }
8333
8510
 
8334
8511
  // src/layout/basic/BlankLayout.tsx
8335
- var import_jsx_runtime130 = require("react/jsx-runtime");
8512
+ var import_jsx_runtime131 = require("react/jsx-runtime");
8336
8513
  function BlankLayout({ children }) {
8337
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8514
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8338
8515
  "div",
8339
8516
  {
8340
8517
  "data-slot": "blank-layout",
@@ -8346,8 +8523,8 @@ function BlankLayout({ children }) {
8346
8523
 
8347
8524
  // src/layout/chat/ChatLayout.tsx
8348
8525
  var import_permission2 = require("@pactor-app/permission");
8349
- var import_react32 = require("react");
8350
- var import_jsx_runtime131 = require("react/jsx-runtime");
8526
+ var import_react33 = require("react");
8527
+ var import_jsx_runtime132 = require("react/jsx-runtime");
8351
8528
  function ChatLayout({
8352
8529
  brand,
8353
8530
  menu,
@@ -8362,7 +8539,7 @@ function ChatLayout({
8362
8539
  sidebarFooter,
8363
8540
  children
8364
8541
  }) {
8365
- const registryMenus = (0, import_react32.useMemo)(() => {
8542
+ const registryMenus = (0, import_react33.useMemo)(() => {
8366
8543
  if (menu !== void 0 || registry === void 0) {
8367
8544
  return [];
8368
8545
  }
@@ -8371,10 +8548,10 @@ function ChatLayout({
8371
8548
  return visible.flatMap((item) => menuItemToMenuData(item));
8372
8549
  }, [menu, registry, permissionChecker]);
8373
8550
  const menuItems = menu ?? registryMenus;
8374
- const [bridgePath, setBridgePath] = (0, import_react32.useState)(
8551
+ const [bridgePath, setBridgePath] = (0, import_react33.useState)(
8375
8552
  () => bridge?.getLocation().pathname ?? "/"
8376
8553
  );
8377
- (0, import_react32.useEffect)(() => {
8554
+ (0, import_react33.useEffect)(() => {
8378
8555
  if (bridge === void 0) {
8379
8556
  return;
8380
8557
  }
@@ -8382,7 +8559,7 @@ function ChatLayout({
8382
8559
  setBridgePath(location.pathname);
8383
8560
  });
8384
8561
  }, [bridge]);
8385
- const activeKey = (0, import_react32.useMemo)(() => {
8562
+ const activeKey = (0, import_react33.useMemo)(() => {
8386
8563
  if (activeMenuKey !== void 0) {
8387
8564
  return activeMenuKey;
8388
8565
  }
@@ -8402,7 +8579,7 @@ function ChatLayout({
8402
8579
  bridge.push(item.path);
8403
8580
  }
8404
8581
  };
8405
- const sidebarContent = sidebar !== void 0 && sidebar !== null ? sidebar : menuItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8582
+ const sidebarContent = sidebar !== void 0 && sidebar !== null ? sidebar : menuItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8406
8583
  Menu2,
8407
8584
  {
8408
8585
  items: menuItems.map((item) => chatMenuItemToUiMenuItem(item)),
@@ -8410,7 +8587,7 @@ function ChatLayout({
8410
8587
  onSelect: handleSelect
8411
8588
  }
8412
8589
  ) : void 0;
8413
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8590
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8414
8591
  Sidebar,
8415
8592
  {
8416
8593
  brand,
@@ -8418,7 +8595,7 @@ function ChatLayout({
8418
8595
  sidebarFooter,
8419
8596
  collapsible,
8420
8597
  locationKey: routeProp?.path ?? bridgePath,
8421
- children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8598
+ children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8422
8599
  "div",
8423
8600
  {
8424
8601
  "data-slot": "chat-layout-content",
@@ -8472,26 +8649,26 @@ function menuItemToMenuData(item) {
8472
8649
  }
8473
8650
 
8474
8651
  // src/layout/basic/LoginLayout.tsx
8475
- var import_jsx_runtime132 = require("react/jsx-runtime");
8652
+ var import_jsx_runtime133 = require("react/jsx-runtime");
8476
8653
  function LoginLayout({
8477
8654
  variant = "center",
8478
8655
  brand,
8479
8656
  children
8480
8657
  }) {
8481
- const brandBlock = /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { "data-slot": "login-brand", className: "flex flex-col items-center gap-2", children: [
8658
+ const brandBlock = /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { "data-slot": "login-brand", className: "flex flex-col items-center gap-2", children: [
8482
8659
  brand.logo,
8483
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("h1", { className: "text-xl font-semibold", children: brand.title }),
8484
- brand.description !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "text-sm text-muted-foreground", children: brand.description })
8660
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("h1", { className: "text-xl font-semibold", children: brand.title }),
8661
+ brand.description !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "text-sm text-muted-foreground", children: brand.description })
8485
8662
  ] });
8486
8663
  if (variant === "split") {
8487
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
8664
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
8488
8665
  "div",
8489
8666
  {
8490
8667
  "data-slot": "login-layout",
8491
8668
  "data-variant": "split",
8492
8669
  className: "grid min-h-screen grid-cols-2 bg-background text-foreground",
8493
8670
  children: [
8494
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8671
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8495
8672
  "div",
8496
8673
  {
8497
8674
  "data-slot": "login-brand-panel",
@@ -8499,7 +8676,7 @@ function LoginLayout({
8499
8676
  children: brandBlock
8500
8677
  }
8501
8678
  ),
8502
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8679
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8503
8680
  "div",
8504
8681
  {
8505
8682
  "data-slot": "login-form-panel",
@@ -8511,37 +8688,37 @@ function LoginLayout({
8511
8688
  }
8512
8689
  );
8513
8690
  }
8514
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8691
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8515
8692
  "div",
8516
8693
  {
8517
8694
  "data-slot": "login-layout",
8518
8695
  "data-variant": "center",
8519
8696
  className: "flex min-h-screen items-center justify-center bg-muted/40 text-foreground",
8520
- children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Card, { "data-slot": "login-card", className: "w-full max-w-sm gap-4 py-6", children: [
8521
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(CardHeader, { className: "px-6", children: [
8522
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(CardTitle, { className: "sr-only", children: brand.title }),
8697
+ children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(Card, { "data-slot": "login-card", className: "w-full max-w-sm gap-4 py-6", children: [
8698
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(CardHeader, { className: "px-6", children: [
8699
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(CardTitle, { className: "sr-only", children: brand.title }),
8523
8700
  brandBlock
8524
8701
  ] }),
8525
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(CardContent, { className: "flex flex-col gap-4 px-6", children })
8702
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(CardContent, { className: "flex flex-col gap-4 px-6", children })
8526
8703
  ] })
8527
8704
  }
8528
8705
  );
8529
8706
  }
8530
8707
 
8531
8708
  // src/layout/basic/LandingLayout.tsx
8532
- var import_jsx_runtime133 = require("react/jsx-runtime");
8709
+ var import_jsx_runtime134 = require("react/jsx-runtime");
8533
8710
  function LandingLayout({
8534
8711
  navbar,
8535
8712
  footer,
8536
8713
  children
8537
8714
  }) {
8538
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
8715
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
8539
8716
  "div",
8540
8717
  {
8541
8718
  "data-slot": "landing-layout",
8542
8719
  className: "flex min-h-screen flex-col bg-background text-foreground",
8543
8720
  children: [
8544
- navbar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8721
+ navbar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
8545
8722
  "header",
8546
8723
  {
8547
8724
  "data-slot": "landing-navbar",
@@ -8549,8 +8726,8 @@ function LandingLayout({
8549
8726
  children: navbar
8550
8727
  }
8551
8728
  ),
8552
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("main", { "data-slot": "landing-content", className: "flex-1", children }),
8553
- footer !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
8729
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("main", { "data-slot": "landing-content", className: "flex-1", children }),
8730
+ footer !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
8554
8731
  "footer",
8555
8732
  {
8556
8733
  "data-slot": "landing-footer",
@@ -8677,7 +8854,7 @@ var OverlayManager = class {
8677
8854
  };
8678
8855
 
8679
8856
  // src/interaction/actions.ts
8680
- var import_runtime24 = require("@pactor-app/runtime");
8857
+ var import_runtime25 = require("@pactor-app/runtime");
8681
8858
  function createUiBridge() {
8682
8859
  return {};
8683
8860
  }
@@ -8693,7 +8870,7 @@ function registerInteractionActions(actions, manager, ui) {
8693
8870
  return failure("[pactor-interaction] overlay.open \u7F3A\u5C11 overlay \u914D\u7F6E\u53C2\u6570");
8694
8871
  }
8695
8872
  const { content, ...rest } = overlay;
8696
- const resolved = (0, import_runtime24.resolveDeep)(rest, ctx.scope);
8873
+ const resolved = (0, import_runtime25.resolveDeep)(rest, ctx.scope);
8697
8874
  const config = { ...resolved, content };
8698
8875
  const data = await manager.open(config, {
8699
8876
  parentScope: { ...ctx.scope }
@@ -8756,10 +8933,10 @@ function isRecord(value) {
8756
8933
  }
8757
8934
 
8758
8935
  // src/interaction/provider.tsx
8759
- var import_runtime25 = require("@pactor-app/runtime");
8760
- var import_react33 = require("react");
8936
+ var import_runtime26 = require("@pactor-app/runtime");
8937
+ var import_react34 = require("react");
8761
8938
  var import_react_dom = require("react-dom");
8762
- var import_jsx_runtime134 = require("react/jsx-runtime");
8939
+ var import_jsx_runtime135 = require("react/jsx-runtime");
8763
8940
  var TOAST_DURATION = 3e3;
8764
8941
  var toastTypeClass = {
8765
8942
  success: "border-l-4 border-l-success",
@@ -8771,11 +8948,11 @@ function InteractionProvider({
8771
8948
  bridge,
8772
8949
  children
8773
8950
  }) {
8774
- const [confirmState, setConfirmState] = (0, import_react33.useState)(null);
8775
- const [confirmOpen, setConfirmOpen] = (0, import_react33.useState)(false);
8776
- const [toasts, setToasts] = (0, import_react33.useState)([]);
8777
- const { t } = (0, import_runtime25.useI18n)();
8778
- const { modal, message } = (0, import_react33.useMemo)(() => {
8951
+ const [confirmState, setConfirmState] = (0, import_react34.useState)(null);
8952
+ const [confirmOpen, setConfirmOpen] = (0, import_react34.useState)(false);
8953
+ const [toasts, setToasts] = (0, import_react34.useState)([]);
8954
+ const { t } = (0, import_runtime26.useI18n)();
8955
+ const { modal, message } = (0, import_react34.useMemo)(() => {
8779
8956
  const pushToast = (type, content) => {
8780
8957
  const id = Date.now() + Math.random();
8781
8958
  setToasts((prev) => [...prev, { id, type, content }]);
@@ -8797,7 +8974,7 @@ function InteractionProvider({
8797
8974
  };
8798
8975
  return { modal: modalImpl, message: messageImpl };
8799
8976
  }, []);
8800
- (0, import_react33.useEffect)(() => {
8977
+ (0, import_react34.useEffect)(() => {
8801
8978
  bridge.modal = modal;
8802
8979
  bridge.message = message;
8803
8980
  return () => {
@@ -8815,11 +8992,11 @@ function InteractionProvider({
8815
8992
  setConfirmOpen(false);
8816
8993
  state?.onCancel?.();
8817
8994
  };
8818
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
8995
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, { children: [
8819
8996
  children,
8820
8997
  typeof document !== "undefined" && (0, import_react_dom.createPortal)(
8821
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
8822
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
8998
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, { children: [
8999
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
8823
9000
  Dialog,
8824
9001
  {
8825
9002
  open: confirmOpen,
@@ -8833,29 +9010,29 @@ function InteractionProvider({
8833
9010
  setConfirmState(null);
8834
9011
  }
8835
9012
  },
8836
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DialogContent, { "data-slot": "confirm-dialog", className: "sm:max-w-sm", children: [
8837
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DialogHeader, { children: [
8838
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DialogTitle, { children: confirmState?.title ?? "" }),
8839
- confirmState?.content !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9013
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(DialogContent, { "data-slot": "confirm-dialog", className: "sm:max-w-sm", children: [
9014
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(DialogHeader, { children: [
9015
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DialogTitle, { children: confirmState?.title ?? "" }),
9016
+ confirmState?.content !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
8840
9017
  DialogDescription,
8841
9018
  {
8842
- render: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { children: confirmState.content })
9019
+ render: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { children: confirmState.content })
8843
9020
  }
8844
9021
  )
8845
9022
  ] }),
8846
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DialogFooter, { children: [
8847
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Button, { type: "button", variant: "outline", onClick: handleCancel, children: t("pactor.alertDialog.cancel") }),
8848
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Button, { type: "button", onClick: handleOk, children: t("pactor.alertDialog.confirm") })
9023
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(DialogFooter, { children: [
9024
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Button, { type: "button", variant: "outline", onClick: handleCancel, children: t("pactor.alertDialog.cancel") }),
9025
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Button, { type: "button", onClick: handleOk, children: t("pactor.alertDialog.confirm") })
8849
9026
  ] })
8850
9027
  ] })
8851
9028
  }
8852
9029
  ),
8853
- toasts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9030
+ toasts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
8854
9031
  "div",
8855
9032
  {
8856
9033
  "data-slot": "toast-container",
8857
9034
  className: "fixed top-4 right-4 z-[100] flex w-80 flex-col gap-2",
8858
- children: toasts.map((toast2) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9035
+ children: toasts.map((toast2) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
8859
9036
  "div",
8860
9037
  {
8861
9038
  "data-slot": "toast",
@@ -8878,10 +9055,10 @@ function InteractionProvider({
8878
9055
  }
8879
9056
 
8880
9057
  // src/interaction/host.tsx
8881
- var import_lucide_react27 = require("lucide-react");
8882
- var import_runtime26 = require("@pactor-app/runtime");
8883
- var import_react34 = require("react");
8884
- var import_jsx_runtime135 = require("react/jsx-runtime");
9058
+ var import_lucide_react28 = require("lucide-react");
9059
+ var import_runtime27 = require("@pactor-app/runtime");
9060
+ var import_react35 = require("react");
9061
+ var import_jsx_runtime136 = require("react/jsx-runtime");
8885
9062
  function toCssWidth(width) {
8886
9063
  if (width === void 0) {
8887
9064
  return void 0;
@@ -8889,12 +9066,12 @@ function toCssWidth(width) {
8889
9066
  return typeof width === "number" ? `${width}px` : width;
8890
9067
  }
8891
9068
  function OverlayHost({ manager, resolvePage }) {
8892
- const renderer = (0, import_runtime26.useRenderer)();
8893
- const stack = (0, import_react34.useSyncExternalStore)(
9069
+ const renderer = (0, import_runtime27.useRenderer)();
9070
+ const stack = (0, import_react35.useSyncExternalStore)(
8894
9071
  (onChange) => manager.subscribe(onChange),
8895
9072
  () => manager.stack()
8896
9073
  );
8897
- (0, import_react34.useSyncExternalStore)(
9074
+ (0, import_react35.useSyncExternalStore)(
8898
9075
  (onChange) => {
8899
9076
  const offState = renderer.context.state.subscribe(onChange);
8900
9077
  const offData = renderer.context.data.subscribe(onChange);
@@ -8905,7 +9082,7 @@ function OverlayHost({ manager, resolvePage }) {
8905
9082
  },
8906
9083
  () => `${renderer.context.state.getVersion()}:${renderer.context.data.getVersion()}`
8907
9084
  );
8908
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, { children: stack.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9085
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_jsx_runtime136.Fragment, { children: stack.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
8909
9086
  OverlayEntryView,
8910
9087
  {
8911
9088
  entry,
@@ -8922,7 +9099,7 @@ function OverlayEntryView({
8922
9099
  renderer,
8923
9100
  resolvePage
8924
9101
  }) {
8925
- const { t } = (0, import_runtime26.useI18n)();
9102
+ const { t } = (0, import_runtime27.useI18n)();
8926
9103
  const handleCancel = () => manager.close(entry.id);
8927
9104
  let body = null;
8928
9105
  if (entry.content) {
@@ -8931,7 +9108,7 @@ function OverlayEntryView({
8931
9108
  parent: manager.parentScopeOf(entry.id)
8932
9109
  });
8933
9110
  } else if (entry.page) {
8934
- body = /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9111
+ body = /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
8935
9112
  PageOverlayBody,
8936
9113
  {
8937
9114
  entry,
@@ -8941,9 +9118,9 @@ function OverlayEntryView({
8941
9118
  );
8942
9119
  }
8943
9120
  if (entry.type === "drawer") {
8944
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ShadcnDrawerView, { entry, onCancel: handleCancel, children: body });
9121
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ShadcnDrawerView, { entry, onCancel: handleCancel, children: body });
8945
9122
  }
8946
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9123
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
8947
9124
  Dialog,
8948
9125
  {
8949
9126
  open: true,
@@ -8952,7 +9129,7 @@ function OverlayEntryView({
8952
9129
  handleCancel();
8953
9130
  }
8954
9131
  },
8955
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
9132
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
8956
9133
  DialogContent,
8957
9134
  {
8958
9135
  "data-slot": "overlay-modal",
@@ -8960,25 +9137,25 @@ function OverlayEntryView({
8960
9137
  style: entry.width === void 0 ? void 0 : { width: toCssWidth(entry.width) },
8961
9138
  showCloseButton: false,
8962
9139
  children: [
8963
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(DialogHeader, { children: [
8964
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DialogTitle, { children: entry.title ?? "" }),
8965
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9140
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(DialogHeader, { children: [
9141
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DialogTitle, { children: entry.title ?? "" }),
9142
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
8966
9143
  DialogClose,
8967
9144
  {
8968
- render: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9145
+ render: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
8969
9146
  "button",
8970
9147
  {
8971
9148
  type: "button",
8972
9149
  "data-slot": "overlay-modal-close",
8973
9150
  "aria-label": t("pactor.overlay.close"),
8974
9151
  className: "absolute top-4 right-4 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none",
8975
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_lucide_react27.XIcon, { className: "size-4" })
9152
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_lucide_react28.XIcon, { className: "size-4" })
8976
9153
  }
8977
9154
  )
8978
9155
  }
8979
9156
  )
8980
9157
  ] }),
8981
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { "data-slot": "overlay-modal-body", children: body })
9158
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { "data-slot": "overlay-modal-body", children: body })
8982
9159
  ]
8983
9160
  }
8984
9161
  )
@@ -8990,9 +9167,9 @@ function ShadcnDrawerView({
8990
9167
  onCancel,
8991
9168
  children
8992
9169
  }) {
8993
- const { t } = (0, import_runtime26.useI18n)();
9170
+ const { t } = (0, import_runtime27.useI18n)();
8994
9171
  const panelStyle = entry.width === void 0 ? void 0 : { width: toCssWidth(entry.width) };
8995
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9172
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
8996
9173
  Drawer,
8997
9174
  {
8998
9175
  direction: "right",
@@ -9002,34 +9179,34 @@ function ShadcnDrawerView({
9002
9179
  onCancel();
9003
9180
  }
9004
9181
  },
9005
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
9182
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
9006
9183
  DrawerContent,
9007
9184
  {
9008
9185
  "data-slot": "drawer-panel",
9009
9186
  className: cn(entry.width !== void 0 && "sm:max-w-none"),
9010
9187
  style: panelStyle,
9011
9188
  children: [
9012
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
9189
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
9013
9190
  DrawerHeader,
9014
9191
  {
9015
9192
  "data-slot": "drawer-header",
9016
9193
  className: "flex flex-row items-center justify-between border-b border-border px-6 py-4",
9017
9194
  children: [
9018
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DrawerTitle, { className: "text-lg", children: entry.title ?? "" }),
9019
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(DrawerClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9195
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DrawerTitle, { className: "text-lg", children: entry.title ?? "" }),
9196
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(DrawerClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9020
9197
  "button",
9021
9198
  {
9022
9199
  type: "button",
9023
9200
  "data-slot": "drawer-close",
9024
9201
  "aria-label": t("pactor.overlay.close"),
9025
9202
  className: "cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none",
9026
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_lucide_react27.XIcon, { className: "size-4" })
9203
+ children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_lucide_react28.XIcon, { className: "size-4" })
9027
9204
  }
9028
9205
  ) })
9029
9206
  ]
9030
9207
  }
9031
9208
  ),
9032
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { "data-slot": "drawer-body", className: "flex-1 overflow-auto p-6", children })
9209
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { "data-slot": "drawer-body", className: "flex-1 overflow-auto p-6", children })
9033
9210
  ]
9034
9211
  }
9035
9212
  )
@@ -9041,9 +9218,9 @@ function PageOverlayBody({
9041
9218
  renderer,
9042
9219
  resolvePage
9043
9220
  }) {
9044
- const [child, setChild] = (0, import_react34.useState)(null);
9045
- const [error, setError] = (0, import_react34.useState)(null);
9046
- (0, import_react34.useEffect)(() => {
9221
+ const [child, setChild] = (0, import_react35.useState)(null);
9222
+ const [error, setError] = (0, import_react35.useState)(null);
9223
+ (0, import_react35.useEffect)(() => {
9047
9224
  if (!resolvePage) {
9048
9225
  setError(
9049
9226
  new Error(
@@ -9061,7 +9238,7 @@ function PageOverlayBody({
9061
9238
  return;
9062
9239
  }
9063
9240
  const host = renderer.context;
9064
- created = (0, import_runtime26.createPageRuntime)(pageDsl, {
9241
+ created = (0, import_runtime27.createPageRuntime)(pageDsl, {
9065
9242
  app: host.app,
9066
9243
  user: host.user,
9067
9244
  components: host.components,
@@ -9085,12 +9262,12 @@ function PageOverlayBody({
9085
9262
  };
9086
9263
  }, [entry.id]);
9087
9264
  if (error) {
9088
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { role: "alert", children: error.message });
9265
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { role: "alert", children: error.message });
9089
9266
  }
9090
9267
  if (!child) {
9091
9268
  return null;
9092
9269
  }
9093
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_runtime26.PageRuntimeView, { runtime: child });
9270
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_runtime27.PageRuntimeView, { runtime: child });
9094
9271
  }
9095
9272
  // Annotate the CommonJS export names for ESM import in node:
9096
9273
  0 && (module.exports = {
@@ -9146,6 +9323,7 @@ function PageOverlayBody({
9146
9323
  Menu,
9147
9324
  Menubar,
9148
9325
  NavigationMenu,
9326
+ NumberInput,
9149
9327
  OVERLAY_CANCEL_PAYLOAD,
9150
9328
  OverlayHost,
9151
9329
  OverlayManager,