@jc-times/business-ui 0.2.55 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/AGENTS.md +6 -6
  2. package/CHANGELOG.md +315 -307
  3. package/README.md +48 -48
  4. package/THIRD_PARTY_NOTICES.md +18 -18
  5. package/bin/business-ui-gate.mjs +171 -171
  6. package/dist/Alert.js +5 -1
  7. package/dist/Button.js +1 -1
  8. package/dist/Cascader.js +19 -19
  9. package/dist/Combobox.js +38 -38
  10. package/dist/DataTableIcons.js +25 -25
  11. package/dist/DateInput.js +67 -67
  12. package/dist/DropdownMenu.js +35 -35
  13. package/dist/EmptyState.js +8 -8
  14. package/dist/ExplainableButton.js +11 -11
  15. package/dist/FloatingControls.js +31 -31
  16. package/dist/ModalShell.js +32 -32
  17. package/dist/MultiSelect.js +37 -37
  18. package/dist/Pagination.js +27 -27
  19. package/dist/RecoverableAsyncState.js +8 -8
  20. package/dist/Select.js +17 -17
  21. package/dist/SortableList.js +18 -18
  22. package/dist/Toast.js +30 -30
  23. package/dist/TreeSelect.js +107 -107
  24. package/dist/data-table.js +71 -71
  25. package/dist/document-viewer/PdfToolbar.js +12 -12
  26. package/dist/document-viewer/PdfWorkspace.js +15 -15
  27. package/dist/document-viewer-v2/HeadlessPdfViewer.js +6 -6
  28. package/dist/form-controls.js +4 -0
  29. package/dist/types/form-controls.d.ts +8 -0
  30. package/dist/vendor/embedpdf-zoom-react.js +3 -186
  31. package/dist/vendor/embedpdf-zoom-react10.js +6 -0
  32. package/dist/vendor/embedpdf-zoom-react11.js +30 -0
  33. package/dist/vendor/embedpdf-zoom-react12.js +16 -0
  34. package/dist/vendor/embedpdf-zoom-react13.js +15 -0
  35. package/dist/vendor/embedpdf-zoom-react14.js +33 -0
  36. package/dist/vendor/embedpdf-zoom-react15.js +20 -0
  37. package/dist/vendor/embedpdf-zoom-react16.js +26 -0
  38. package/dist/vendor/embedpdf-zoom-react17.js +25 -0
  39. package/dist/vendor/embedpdf-zoom-react18.js +17 -0
  40. package/dist/vendor/embedpdf-zoom-react19.js +187 -0
  41. package/dist/vendor/embedpdf-zoom-react2.js +13 -0
  42. package/dist/vendor/embedpdf-zoom-react3.js +14 -0
  43. package/dist/vendor/embedpdf-zoom-react4.js +8 -0
  44. package/dist/vendor/embedpdf-zoom-react5.js +4 -0
  45. package/dist/vendor/embedpdf-zoom-react6.js +14 -0
  46. package/dist/vendor/embedpdf-zoom-react7.js +40 -0
  47. package/dist/vendor/embedpdf-zoom-react8.js +17 -0
  48. package/dist/vendor/embedpdf-zoom-react9.js +7 -0
  49. package/docs/agent-guide.md +170 -168
  50. package/docs/api.md +252 -248
  51. package/docs/cascader.md +58 -58
  52. package/docs/component-strategy.md +93 -93
  53. package/docs/data-table.md +127 -127
  54. package/docs/document-viewer-v2.md +265 -265
  55. package/docs/modal-shell-migration.md +43 -43
  56. package/docs/mrt-poc.md +1 -1
  57. package/docs/sortable-list.md +42 -42
  58. package/docs/user-profile.md +17 -17
  59. package/docs/viewport-qa.md +126 -126
  60. package/licenses/rc-cascader-MIT.txt +21 -21
  61. package/package.json +5 -1
@@ -4,9 +4,9 @@ import { DataTableTheme as n } from "./DataTableTheme.js";
4
4
  import { icons as r } from "./DataTableIcons.js";
5
5
  import { DataTableHorizontalScrollbar as i } from "./DataTableHorizontalScrollbar.js";
6
6
  import { DataTableMergedRows as a } from "./DataTableMergedRows.js";
7
- import { ArrowDown as o, ArrowUp as s, ChevronsUpDown as c } from "lucide-react";
8
- import { memo as l, useCallback as u, useMemo as d, useRef as f, useState as p } from "react";
9
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
7
+ import { memo as o, useCallback as s, useMemo as c, useRef as l, useState as u } from "react";
8
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
9
+ import { ArrowDown as p, ArrowUp as m, ChevronsUpDown as h } from "lucide-react";
10
10
  import { MRT_Table as g, MaterialReactTable as _, useMaterialReactTable as v } from "material-react-table";
11
11
  import { MRT_Localization_ZH_HANS as y } from "material-react-table/locales/zh-Hans";
12
12
  //#region src/DataTable.tsx
@@ -22,54 +22,54 @@ function x(e) {
22
22
  });
23
23
  }
24
24
  function S({ table: e, stickyHorizontalScrollbar: t = !1, horizontalScrollbarLabel: r }) {
25
- return /* @__PURE__ */ m(n, { children: /* @__PURE__ */ m(i, {
25
+ return /* @__PURE__ */ d(n, { children: /* @__PURE__ */ d(i, {
26
26
  enabled: t,
27
27
  label: r,
28
- children: /* @__PURE__ */ m(_, { table: e })
28
+ children: /* @__PURE__ */ d(_, { table: e })
29
29
  }) });
30
30
  }
31
31
  function C(e) {
32
- return "options" in e ? /* @__PURE__ */ m(w, { ...e }) : /* @__PURE__ */ m(n, { children: /* @__PURE__ */ m(T, { ...e }) });
32
+ return "options" in e ? /* @__PURE__ */ d(w, { ...e }) : /* @__PURE__ */ d(n, { children: /* @__PURE__ */ d(T, { ...e }) });
33
33
  }
34
34
  function w({ options: e, stickyHorizontalScrollbar: t, horizontalScrollbarLabel: n }) {
35
35
  let r = x(e);
36
- return /* @__PURE__ */ m(S, {
36
+ return /* @__PURE__ */ d(S, {
37
37
  table: r,
38
38
  stickyHorizontalScrollbar: t,
39
39
  horizontalScrollbarLabel: n
40
40
  });
41
41
  }
42
- function T({ rows: n, columns: r, getRowId: a, caption: o, sort: s, defaultSort: c = null, onSortChange: l, sortMode: _ = "client", selectionSummary: y = !0, selectPageLabel: b = "选择本页全部", renderSelectionActions: x, hiddenColumnIds: S, selectedRowIds: C, onSelectedRowIdsChange: w, getRowDisabled: T, loading: D = !1, loadingRows: O = 4, emptyTitle: j = "暂无数据", emptyDescription: M, emptyAction: N, mobileLayout: P = "scroll", className: F = "", stickyHorizontalScrollbar: I = !1, horizontalScrollbarLabel: L, rootRef: R, rootProps: z, tableRef: B, tableProps: V }) {
43
- let [H, U] = p(c), W = s === void 0 ? H : s, G = d(() => _ === "server" ? n : E(n, r, W), [
42
+ function T({ rows: n, columns: r, getRowId: a, caption: o, sort: p, defaultSort: m = null, onSortChange: h, sortMode: _ = "client", selectionSummary: y = !0, selectPageLabel: b = "选择本页全部", renderSelectionActions: x, hiddenColumnIds: S, selectedRowIds: C, onSelectedRowIdsChange: w, getRowDisabled: T, loading: D = !1, loadingRows: k = 4, emptyTitle: M = "暂无数据", emptyDescription: N, emptyAction: P, mobileLayout: ee = "scroll", className: te = "", stickyHorizontalScrollbar: F = !1, horizontalScrollbarLabel: I, rootRef: L, rootProps: R, tableRef: z, tableProps: B }) {
43
+ let [V, H] = u(m), U = p === void 0 ? V : p, W = c(() => _ === "server" ? n : E(n, r, U), [
44
44
  n,
45
45
  r,
46
- W,
46
+ U,
47
47
  _
48
- ]), K = d(() => r.filter((e) => !S?.has(e.id)), [r, S]), q = d(() => G.map((e) => ({
48
+ ]), G = c(() => r.filter((e) => !S?.has(e.id)), [r, S]), K = c(() => W.map((e) => ({
49
49
  row: e,
50
50
  id: a(e),
51
51
  disabled: T?.(e) ?? !1
52
52
  })), [
53
- G,
53
+ W,
54
54
  a,
55
55
  T
56
- ]), J = d(() => q.filter((e) => !e.disabled), [q]), Y = d(() => {
56
+ ]), q = c(() => K.filter((e) => !e.disabled), [K]), J = c(() => {
57
57
  let e = 0;
58
- for (let t of J) C?.has(t.id) && (e += 1);
58
+ for (let t of q) C?.has(t.id) && (e += 1);
59
59
  return e;
60
- }, [J, C]), X = J.length > 0 && Y === J.length, Z = Y > 0 && !X;
61
- function te(e) {
60
+ }, [q, C]), Y = q.length > 0 && J === q.length, X = J > 0 && !Y;
61
+ function Z(e) {
62
62
  if (!(e.sortValue || _ === "server" && e.sortable)) return;
63
- let t = W?.columnId === e.id ? W.direction === "ascending" ? {
63
+ let t = U?.columnId === e.id ? U.direction === "ascending" ? {
64
64
  columnId: e.id,
65
65
  direction: "descending"
66
66
  } : null : {
67
67
  columnId: e.id,
68
68
  direction: "ascending"
69
69
  };
70
- U(t), l?.(t);
70
+ H(t), h?.(t);
71
71
  }
72
- let Q = f({
72
+ let Q = l({
73
73
  selectedRowIds: C,
74
74
  onSelectedRowIdsChange: w
75
75
  });
@@ -77,7 +77,7 @@ function T({ rows: n, columns: r, getRowId: a, caption: o, sort: s, defaultSort:
77
77
  selectedRowIds: C,
78
78
  onSelectedRowIdsChange: w
79
79
  };
80
- let ne = u((e) => {
80
+ let ne = s((e) => {
81
81
  let t = Q.current;
82
82
  if (!t.onSelectedRowIdsChange) return;
83
83
  let n = new Set(t.selectedRowIds ?? []);
@@ -86,53 +86,53 @@ function T({ rows: n, columns: r, getRowId: a, caption: o, sort: s, defaultSort:
86
86
  function re() {
87
87
  if (!w) return;
88
88
  let e = new Set(C ?? []);
89
- for (let t of J) X ? e.delete(t.id) : e.add(t.id);
89
+ for (let t of q) Y ? e.delete(t.id) : e.add(t.id);
90
90
  w(e);
91
91
  }
92
- let $ = !!(C && w), ie = d(() => [...$ ? [{
92
+ let $ = !!(C && w), ie = c(() => [...$ ? [{
93
93
  id: "__selection",
94
94
  header: "",
95
95
  size: 44,
96
- Header: () => /* @__PURE__ */ m(A, {
97
- checked: X,
98
- indeterminate: Z,
96
+ Header: () => /* @__PURE__ */ d(j, {
97
+ checked: Y,
98
+ indeterminate: X,
99
99
  "aria-label": b,
100
- disabled: D || !J.length,
100
+ disabled: D || !q.length,
101
101
  onChange: re
102
102
  })
103
- }] : [], ...K.map((e) => ({
103
+ }] : [], ...G.map((e) => ({
104
104
  id: e.id,
105
105
  header: typeof e.header == "string" ? e.header : e.mobileLabel ?? e.id,
106
106
  Header: () => {
107
- let t = W?.columnId === e.id ? W.direction : void 0;
108
- return e.sortValue || _ === "server" && e.sortable ? /* @__PURE__ */ h("button", {
107
+ let t = U?.columnId === e.id ? U.direction : void 0;
108
+ return e.sortValue || _ === "server" && e.sortable ? /* @__PURE__ */ f("button", {
109
109
  type: "button",
110
110
  className: "ui-table-sort",
111
- onClick: () => te(e),
112
- children: [e.header, /* @__PURE__ */ m(k, { direction: t })]
111
+ onClick: () => Z(e),
112
+ children: [e.header, /* @__PURE__ */ d(A, { direction: t })]
113
113
  }) : e.header;
114
114
  },
115
115
  muiTableHeadCellProps: {
116
116
  style: { width: e.width },
117
117
  "data-align": e.align ?? "start",
118
- "aria-sort": W?.columnId === e.id ? W.direction : e.sortValue || _ === "server" && e.sortable ? "none" : void 0
118
+ "aria-sort": U?.columnId === e.id ? U.direction : e.sortValue || _ === "server" && e.sortable ? "none" : void 0
119
119
  }
120
120
  }))], [
121
- K,
121
+ G,
122
122
  $,
123
+ Y,
123
124
  X,
124
- Z,
125
125
  C,
126
126
  D,
127
- W,
127
+ U,
128
128
  _,
129
- J,
129
+ q,
130
130
  b,
131
- l,
131
+ h,
132
132
  w
133
133
  ]), ae = v({
134
134
  columns: ie,
135
- data: G,
135
+ data: W,
136
136
  getRowId: (e) => a(e),
137
137
  enableSorting: !1,
138
138
  enableColumnActions: !1,
@@ -145,56 +145,56 @@ function T({ rows: n, columns: r, getRowId: a, caption: o, sort: s, defaultSort:
145
145
  layoutMode: "semantic",
146
146
  renderCaption: o === void 0 ? void 0 : () => o,
147
147
  muiTableProps: {
148
- ...V,
149
- ref: B,
148
+ ...B,
149
+ ref: z,
150
150
  className: "ui-data-table",
151
151
  "aria-busy": D || void 0
152
152
  },
153
- muiTableBodyProps: { children: D ? Array.from({ length: Math.max(1, O) }, (e, n) => /* @__PURE__ */ h("tr", { children: [$ && /* @__PURE__ */ m("td", {
153
+ muiTableBodyProps: { children: D ? Array.from({ length: Math.max(1, k) }, (e, n) => /* @__PURE__ */ f("tr", { children: [$ && /* @__PURE__ */ d("td", {
154
154
  className: "ui-table-selection",
155
- children: /* @__PURE__ */ m(t, {
155
+ children: /* @__PURE__ */ d(t, {
156
156
  width: 18,
157
157
  height: 18
158
158
  })
159
- }), K.map((e) => /* @__PURE__ */ m("td", { children: /* @__PURE__ */ m(t, { width: n % 2 ? "68%" : "86%" }) }, e.id))] }, `loading-${n}`)) : q.map(({ row: e, id: t, disabled: n }) => /* @__PURE__ */ m(ee, {
159
+ }), G.map((e) => /* @__PURE__ */ d("td", { children: /* @__PURE__ */ d(t, { width: n % 2 ? "68%" : "86%" }) }, e.id))] }, `loading-${n}`)) : K.map(({ row: e, id: t, disabled: n }) => /* @__PURE__ */ d(O, {
160
160
  row: e,
161
161
  id: t,
162
162
  disabled: n,
163
- columns: K,
163
+ columns: G,
164
164
  selectable: $,
165
165
  selected: C?.has(t) ?? !1,
166
166
  onToggle: ne
167
167
  }, t)) }
168
168
  });
169
- return /* @__PURE__ */ h("div", {
170
- ...z,
171
- ref: R,
172
- "data-mobile-layout": P,
173
- className: `ui-data-table-wrap ${F}`.trim(),
169
+ return /* @__PURE__ */ f("div", {
170
+ ...R,
171
+ ref: L,
172
+ "data-mobile-layout": ee,
173
+ className: `ui-data-table-wrap ${te}`.trim(),
174
174
  children: [
175
- $ && C && C.size > 0 && (y || x) && /* @__PURE__ */ h("div", {
175
+ $ && C && C.size > 0 && (y || x) && /* @__PURE__ */ f("div", {
176
176
  className: "ui-table-selection-summary",
177
- children: [y && /* @__PURE__ */ h("span", {
177
+ children: [y && /* @__PURE__ */ f("span", {
178
178
  role: "status",
179
179
  children: [
180
180
  "已选择 ",
181
181
  C.size,
182
182
  " 项(本页 ",
183
- Y,
183
+ J,
184
184
  " 项)"
185
185
  ]
186
186
  }), x?.(C)]
187
187
  }),
188
- /* @__PURE__ */ m(i, {
189
- enabled: I,
190
- label: L,
191
- children: /* @__PURE__ */ m(g, { table: ae })
188
+ /* @__PURE__ */ d(i, {
189
+ enabled: F,
190
+ label: I,
191
+ children: /* @__PURE__ */ d(g, { table: ae })
192
192
  }),
193
- !D && G.length === 0 && /* @__PURE__ */ m(e, {
193
+ !D && W.length === 0 && /* @__PURE__ */ d(e, {
194
194
  compact: !0,
195
- title: j,
196
- description: M,
197
- action: N
195
+ title: M,
196
+ description: N,
197
+ action: P
198
198
  })
199
199
  ]
200
200
  });
@@ -209,43 +209,43 @@ function E(e, t, n) {
209
209
  index: t,
210
210
  value: r.sortValue(e)
211
211
  })).sort((e, t) => {
212
- let n = O(e.value, t.value);
212
+ let n = k(e.value, t.value);
213
213
  return n === 0 ? e.index - t.index : n * i;
214
214
  }).map(({ row: e }) => e);
215
215
  }
216
216
  function D({ row: e, id: t, disabled: n, columns: r, selectable: i, selected: a, onToggle: o }) {
217
- return /* @__PURE__ */ h("tr", {
217
+ return /* @__PURE__ */ f("tr", {
218
218
  "aria-selected": a || void 0,
219
219
  "data-disabled": n || void 0,
220
- children: [i && /* @__PURE__ */ m("td", {
220
+ children: [i && /* @__PURE__ */ d("td", {
221
221
  className: "ui-table-selection",
222
- children: /* @__PURE__ */ m("input", {
222
+ children: /* @__PURE__ */ d("input", {
223
223
  type: "checkbox",
224
224
  "aria-label": `选择 ${t}`,
225
225
  checked: a,
226
226
  disabled: n,
227
227
  onChange: () => o(t)
228
228
  })
229
- }), r.map((t) => /* @__PURE__ */ m("td", {
229
+ }), r.map((t) => /* @__PURE__ */ d("td", {
230
230
  "data-align": t.align ?? "start",
231
231
  "data-label": t.mobileLabel ?? (typeof t.header == "string" ? t.header : void 0),
232
232
  children: t.cell(e)
233
233
  }, t.id))]
234
234
  });
235
235
  }
236
- var ee = l(D);
237
- function O(e, t) {
236
+ var O = o(D);
237
+ function k(e, t) {
238
238
  if (e == null && t == null) return 0;
239
239
  if (e == null) return 1;
240
240
  if (t == null) return -1;
241
241
  let n = e instanceof Date ? e.getTime() : e, r = t instanceof Date ? t.getTime() : t;
242
242
  return typeof n == "number" && typeof r == "number" ? n - r : b.compare(String(n), String(r));
243
243
  }
244
- function k({ direction: e }) {
245
- return m(e === "ascending" ? s : e === "descending" ? o : c, { size: 14 });
244
+ function A({ direction: e }) {
245
+ return d(e === "ascending" ? m : e === "descending" ? p : h, { size: 14 });
246
246
  }
247
- function A({ indeterminate: e, ...t }) {
248
- return /* @__PURE__ */ m("input", {
247
+ function j({ indeterminate: e, ...t }) {
248
+ return /* @__PURE__ */ d("input", {
249
249
  ...t,
250
250
  type: "checkbox",
251
251
  ref: (t) => {
@@ -1,13 +1,13 @@
1
1
  import { Button as e } from "../Button.js";
2
- import { Maximize2 as t, Minimize2 as n, RotateCw as r, ZoomIn as i, ZoomOut as a } from "lucide-react";
3
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { Maximize2 as r, Minimize2 as i, RotateCw as a, ZoomIn as o, ZoomOut as s } from "lucide-react";
4
4
  //#region src/document-viewer/PdfToolbar.tsx
5
5
  function c(c) {
6
- return /* @__PURE__ */ s("div", {
6
+ return /* @__PURE__ */ n("div", {
7
7
  className: "ui-viewer-tools",
8
8
  "aria-label": "文档视图工具",
9
9
  children: [
10
- /* @__PURE__ */ o(e, {
10
+ /* @__PURE__ */ t(e, {
11
11
  variant: "ghost",
12
12
  size: "compact",
13
13
  className: "ui-viewer-tool",
@@ -16,13 +16,13 @@ function c(c) {
16
16
  title: "缩小",
17
17
  disabled: c.disabled || !c.canZoomOut,
18
18
  onClick: c.onZoomOut,
19
- children: /* @__PURE__ */ o(a, { size: 16 })
19
+ children: /* @__PURE__ */ t(s, { size: 16 })
20
20
  }),
21
- /* @__PURE__ */ s("span", {
21
+ /* @__PURE__ */ n("span", {
22
22
  "aria-live": "polite",
23
23
  children: [Math.round(c.zoom * 100), "%"]
24
24
  }),
25
- /* @__PURE__ */ o(e, {
25
+ /* @__PURE__ */ t(e, {
26
26
  variant: "ghost",
27
27
  size: "compact",
28
28
  className: "ui-viewer-tool",
@@ -31,9 +31,9 @@ function c(c) {
31
31
  title: "放大",
32
32
  disabled: c.disabled || !c.canZoomIn,
33
33
  onClick: c.onZoomIn,
34
- children: /* @__PURE__ */ o(i, { size: 16 })
34
+ children: /* @__PURE__ */ t(o, { size: 16 })
35
35
  }),
36
- /* @__PURE__ */ o(e, {
36
+ /* @__PURE__ */ t(e, {
37
37
  variant: "ghost",
38
38
  size: "compact",
39
39
  className: "ui-viewer-tool ui-viewer-tool-separated",
@@ -42,9 +42,9 @@ function c(c) {
42
42
  title: "顺时针旋转 90°",
43
43
  disabled: c.disabled,
44
44
  onClick: c.onRotate,
45
- children: /* @__PURE__ */ o(r, { size: 16 })
45
+ children: /* @__PURE__ */ t(a, { size: 16 })
46
46
  }),
47
- /* @__PURE__ */ o(e, {
47
+ /* @__PURE__ */ t(e, {
48
48
  variant: "ghost",
49
49
  size: "compact",
50
50
  className: "ui-viewer-tool",
@@ -52,7 +52,7 @@ function c(c) {
52
52
  "aria-label": c.fullscreen ? "退出全屏" : "全屏查看文档",
53
53
  title: c.fullscreen ? "退出全屏" : "全屏",
54
54
  onClick: c.onToggleFullscreen,
55
- children: c.fullscreen ? /* @__PURE__ */ o(n, { size: 16 }) : /* @__PURE__ */ o(t, { size: 16 })
55
+ children: c.fullscreen ? /* @__PURE__ */ t(i, { size: 16 }) : /* @__PURE__ */ t(r, { size: 16 })
56
56
  })
57
57
  ]
58
58
  });
@@ -1,41 +1,41 @@
1
1
  import { Button as e } from "../Button.js";
2
- import { PanelLeftClose as t, PanelLeftOpen as n } from "lucide-react";
3
- import { createContext as r, useContext as i, useEffect as a, useState as o } from "react";
4
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
2
+ import { createContext as t, useContext as n, useEffect as r, useState as i } from "react";
3
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
4
+ import { PanelLeftClose as s, PanelLeftOpen as c } from "lucide-react";
5
5
  //#region src/document-viewer/PdfWorkspace.tsx
6
- var l = r(!1), u = () => i(l);
7
- function d({ rail: r, children: i, defaultRailCollapsed: u, className: d = "", ...f }) {
8
- let [p, m] = o(() => u ?? (typeof window < "u" && window.matchMedia("(max-width: 900px)").matches));
9
- return a(() => {
6
+ var l = t(!1), u = () => n(l);
7
+ function d({ rail: t, children: n, defaultRailCollapsed: u, className: d = "", ...f }) {
8
+ let [p, m] = i(() => u ?? (typeof window < "u" && window.matchMedia("(max-width: 900px)").matches));
9
+ return r(() => {
10
10
  let e = window.matchMedia("(max-width: 900px)"), t = () => {
11
11
  (e.matches || u === void 0) && m(e.matches);
12
12
  };
13
13
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
14
- }, [u]), /* @__PURE__ */ c("div", {
14
+ }, [u]), /* @__PURE__ */ o("div", {
15
15
  ...f,
16
16
  className: `ui-pdf-workspace ${p ? "ui-rail-collapsed" : ""} ${d}`,
17
17
  children: [
18
- /* @__PURE__ */ s("aside", {
18
+ /* @__PURE__ */ a("aside", {
19
19
  className: "ui-viewer-rail",
20
20
  hidden: p,
21
21
  "aria-label": "页面缩略图",
22
- children: /* @__PURE__ */ s(l.Provider, {
22
+ children: /* @__PURE__ */ a(l.Provider, {
23
23
  value: p,
24
- children: r
24
+ children: t
25
25
  })
26
26
  }),
27
- /* @__PURE__ */ c(e, {
27
+ /* @__PURE__ */ o(e, {
28
28
  variant: "secondary",
29
29
  size: "compact",
30
30
  className: "ui-viewer-rail-toggle",
31
31
  "aria-expanded": !p,
32
32
  "aria-label": p ? "显示页面缩略图" : "隐藏页面缩略图",
33
33
  onClick: () => m((e) => !e),
34
- children: [s(p ? n : t, { size: 17 }), /* @__PURE__ */ s("span", { children: p ? "页面" : "收起" })]
34
+ children: [a(p ? c : s, { size: 17 }), /* @__PURE__ */ a("span", { children: p ? "页面" : "收起" })]
35
35
  }),
36
- /* @__PURE__ */ s("div", {
36
+ /* @__PURE__ */ a("div", {
37
37
  className: "ui-viewer-stage",
38
- children: i
38
+ children: n
39
39
  })
40
40
  ]
41
41
  });
@@ -2,11 +2,11 @@ import { Button as e } from "../Button.js";
2
2
  import { PdfWorkspace as t } from "../document-viewer/PdfWorkspace.js";
3
3
  import { PdfToolbar as n } from "../document-viewer/PdfToolbar.js";
4
4
  import { usePdfViewport as r } from "../document-viewer/usePdfViewport.js";
5
- import { ZoomGestureWrapper as i, react_exports as a, useZoom as o } from "../vendor/embedpdf-zoom-react.js";
5
+ import { ZoomGestureWrapper as i, react_exports as a, useZoom as o } from "../vendor/embedpdf-zoom-react19.js";
6
6
  import { HeadlessSearch as s } from "./HeadlessSearch.js";
7
- import { Search as ee, X as te } from "lucide-react";
8
- import { useEffect as c, useLayoutEffect as ne, useMemo as re, useRef as l, useState as u } from "react";
7
+ import { useEffect as c, useLayoutEffect as ee, useMemo as te, useRef as l, useState as u } from "react";
9
8
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
9
+ import { Search as ne, X as re } from "lucide-react";
10
10
  import { createPluginRegistration as p } from "@embedpdf/core";
11
11
  import { EmbedPDF as m, useDocumentState as ie } from "@embedpdf/core/react";
12
12
  import { usePdfiumEngine as h } from "@embedpdf/engines/react";
@@ -76,12 +76,12 @@ function T(e) {
76
76
  });
77
77
  }
78
78
  function E(p) {
79
- let m = p.source.id, h = ie(m), g = h?.document, { provides: _ } = ce(), v = re(() => _?.forDocument(m), [_, m]), { provides: y, state: b } = o(m), { provides: x } = oe(), { provides: S } = ve(), { provides: _e } = he(m), { provides: C, rotation: w } = de(m), T = r(m), [E, D] = u(1), [O, k] = u(null), A = be(p.mobileMode === "continuous-reader"), j = p.searchMode === "collapsible", M = p.features?.search !== !1, [N, P] = u(!j), F = g?.pages.length ?? 0, I = Math.max(1, Math.min(F || 1, p.currentPage ?? E)), L = p.pageMode === "single" && !A, R = p.features?.textSelection !== !1 && !A, z = l(p);
79
+ let m = p.source.id, h = ie(m), g = h?.document, { provides: _ } = ce(), v = te(() => _?.forDocument(m), [_, m]), { provides: y, state: b } = o(m), { provides: x } = oe(), { provides: S } = ve(), { provides: _e } = he(m), { provides: C, rotation: w } = de(m), T = r(m), [E, D] = u(1), [O, k] = u(null), A = be(p.mobileMode === "continuous-reader"), j = p.searchMode === "collapsible", M = p.features?.search !== !1, [N, P] = u(!j), F = g?.pages.length ?? 0, I = Math.max(1, Math.min(F || 1, p.currentPage ?? E)), L = p.pageMode === "single" && !A, R = p.features?.textSelection !== !1 && !A, z = l(p);
80
80
  z.current = p, c(() => {
81
81
  P(!j), k(null);
82
82
  }, [m, j]);
83
83
  let B = h?.scale ?? 1, V = l(!1), H = l(p.currentPage ?? 1), U = l(!0), W = l(I), G = l(L), K = l(null);
84
- ne(() => {
84
+ ee(() => {
85
85
  (W.current !== I || G.current !== L) && ((G.current !== L || I !== K.current) && (H.current = I), G.current !== L && (U.current = !0), W.current = I, G.current = L, K.current = null);
86
86
  }, [I, L]);
87
87
  let q = l(y);
@@ -290,7 +290,7 @@ function E(p) {
290
290
  onClick: () => {
291
291
  N && (_e?.stopSearch(), k(null)), P(!N);
292
292
  },
293
- children: [d(N ? te : ee, { size: 15 }), /* @__PURE__ */ d("span", {
293
+ children: [d(N ? re : ne, { size: 15 }), /* @__PURE__ */ d("span", {
294
294
  className: "ui-mobile-reader-search-label",
295
295
  children: N ? "收起搜索" : "搜索文档"
296
296
  })]
@@ -0,0 +1,4 @@
1
+ import { Button as e, LinkButton as t, buttonClassName as n } from "./Button.js";
2
+ import { Alert as r } from "./Alert.js";
3
+ import { Checkbox as i, FormField as a, SelectInput as o, TextArea as s, TextInput as c } from "./FormField.js";
4
+ export { r as Alert, e as Button, i as Checkbox, a as FormField, t as LinkButton, o as SelectInput, s as TextArea, c as TextInput, n as buttonClassName };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Lightweight entry point for simple authenticated forms and standalone pages.
3
+ * It deliberately excludes directory pickers, date controls, data tables and
4
+ * document viewers so consumers do not pull their dependency graphs.
5
+ */
6
+ export { Alert, type AlertProps, type AlertTone } from "./Alert";
7
+ export { Button, LinkButton, buttonClassName, type ButtonProps, type ButtonVariant, type ButtonSize, type LinkButtonProps } from "./Button";
8
+ export { Checkbox, FormField, SelectInput, TextArea, TextInput, type TextInputProps, type TextAreaProps, type SelectInputProps } from "./FormField";