@sia.soul/sia-react-ui 0.1.124 → 0.1.126
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/{chunk-ZNUTLBDL.js → chunk-33FOEIXI.js} +4 -2
- package/dist/{chunk-5PC3YO7N.js → chunk-B333SUKG.js} +2 -2
- package/dist/{chunk-2GQG4ASH.js → chunk-D3CROVS2.js} +1 -1
- package/dist/{chunk-HQ3PUJLM.js → chunk-OYBMDSTC.js} +3 -3
- package/dist/{chunk-ZALDJYXM.js → chunk-PUNKAJBB.js} +2 -2
- package/dist/{chunk-Y3PGICI6.js → chunk-WA3LO3LY.js} +2 -2
- package/dist/core.cjs +4 -2
- package/dist/core.css +4 -0
- package/dist/core.js +4 -4
- package/dist/game.cjs +4 -2
- package/dist/game.js +1 -1
- package/dist/index.cjs +61 -5
- package/dist/index.css +4 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +145 -91
- package/dist/rich-text-editor.cjs +4 -2
- package/dist/rich-text-editor.js +3 -3
- package/dist/select-date-range.cjs +4 -2
- package/dist/select-date-range.js +4 -4
- package/package.json +1 -1
|
@@ -417,7 +417,8 @@ var extendedIconPaths = {
|
|
|
417
417
|
/* @__PURE__ */ jsx("rect", { x: "3", y: "14", width: "7", height: "7", rx: "2" }),
|
|
418
418
|
/* @__PURE__ */ jsx("rect", { x: "14", y: "14", width: "7", height: "7", rx: "2" })
|
|
419
419
|
] }),
|
|
420
|
-
|
|
420
|
+
/** 扩展与插件:圆角拼图轮廓,顶部及右侧凸出接口,左侧内凹接口。 */
|
|
421
|
+
puzzle: /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M9 6V5a2 2 0 0 1 4 0v1h3a2 2 0 0 1 2 2v2h1a2 2 0 0 1 0 4h-1v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4h1a2 2 0 0 0 0-4H4V8a2 2 0 0 1 2-2h3Z" }) }),
|
|
421
422
|
partition: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
422
423
|
/* @__PURE__ */ jsx("path", { d: "M12 5v5M6 14v-2h12v2M6 18v3M12 18v3M18 18v3" }),
|
|
423
424
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "3", r: "2" }),
|
|
@@ -706,7 +707,8 @@ var outlineIconBounds = {
|
|
|
706
707
|
"plus": [4, 4, 16, 16],
|
|
707
708
|
"power": [4, 3, 16.000002, 16.744997],
|
|
708
709
|
"printer": [4, 3, 16, 18],
|
|
709
|
-
|
|
710
|
+
// 拼图轮廓横向从 4 到 21,纵向从 3 到 21,与图形归一化范围一致。
|
|
711
|
+
"puzzle": [4, 3, 17, 18],
|
|
710
712
|
"qr-code": [3, 3, 18, 18],
|
|
711
713
|
"question": [3, 3, 18, 18],
|
|
712
714
|
"redo": [4, 7, 17, 12],
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Popover,
|
|
3
3
|
Tooltip
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WA3LO3LY.js";
|
|
5
5
|
import {
|
|
6
6
|
Dropdown
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-D3CROVS2.js";
|
|
8
8
|
import {
|
|
9
9
|
TextArea
|
|
10
10
|
} from "./chunk-SCEHVGKV.js";
|
|
11
11
|
import {
|
|
12
12
|
Icon,
|
|
13
13
|
useOverlayLifecycle
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-33FOEIXI.js";
|
|
15
15
|
import {
|
|
16
16
|
Button
|
|
17
17
|
} from "./chunk-CZ2ITBRW.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FloatingScrollbarProvider,
|
|
3
3
|
Select
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WA3LO3LY.js";
|
|
5
5
|
import {
|
|
6
6
|
Icon
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-33FOEIXI.js";
|
|
8
8
|
import {
|
|
9
9
|
useFloatingPlaceholder
|
|
10
10
|
} from "./chunk-KY6A5IJH.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Dropdown,
|
|
3
3
|
Input
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D3CROVS2.js";
|
|
5
5
|
import {
|
|
6
6
|
Icon,
|
|
7
7
|
Modal,
|
|
8
8
|
isAnchorBehindOverlay,
|
|
9
9
|
subscribeOverlayLayers
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-33FOEIXI.js";
|
|
11
11
|
import {
|
|
12
12
|
Button
|
|
13
13
|
} from "./chunk-CZ2ITBRW.js";
|
package/dist/core.cjs
CHANGED
|
@@ -801,7 +801,8 @@ var extendedIconPaths = {
|
|
|
801
801
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("rect", { x: "3", y: "14", width: "7", height: "7", rx: "2" }),
|
|
802
802
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("rect", { x: "14", y: "14", width: "7", height: "7", rx: "2" })
|
|
803
803
|
] }),
|
|
804
|
-
|
|
804
|
+
/** 扩展与插件:圆角拼图轮廓,顶部及右侧凸出接口,左侧内凹接口。 */
|
|
805
|
+
puzzle: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M9 6V5a2 2 0 0 1 4 0v1h3a2 2 0 0 1 2 2v2h1a2 2 0 0 1 0 4h-1v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4h1a2 2 0 0 0 0-4H4V8a2 2 0 0 1 2-2h3Z" }) }),
|
|
805
806
|
partition: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
806
807
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 5v5M6 14v-2h12v2M6 18v3M12 18v3M18 18v3" }),
|
|
807
808
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "3", r: "2" }),
|
|
@@ -1090,7 +1091,8 @@ var outlineIconBounds = {
|
|
|
1090
1091
|
"plus": [4, 4, 16, 16],
|
|
1091
1092
|
"power": [4, 3, 16.000002, 16.744997],
|
|
1092
1093
|
"printer": [4, 3, 16, 18],
|
|
1093
|
-
|
|
1094
|
+
// 拼图轮廓横向从 4 到 21,纵向从 3 到 21,与图形归一化范围一致。
|
|
1095
|
+
"puzzle": [4, 3, 17, 18],
|
|
1094
1096
|
"qr-code": [3, 3, 18, 18],
|
|
1095
1097
|
"question": [3, 3, 18, 18],
|
|
1096
1098
|
"redo": [4, 7, 17, 12],
|
package/dist/core.css
CHANGED
|
@@ -8095,6 +8095,10 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
|
|
|
8095
8095
|
font-size: 12px;
|
|
8096
8096
|
line-height: 1.45;
|
|
8097
8097
|
}
|
|
8098
|
+
.sia-floating__overlay.sia-form-item__error-popover--obscured {
|
|
8099
|
+
opacity: 0;
|
|
8100
|
+
animation: none;
|
|
8101
|
+
}
|
|
8098
8102
|
.sia-form-item__error-content {
|
|
8099
8103
|
display: flex;
|
|
8100
8104
|
align-items: center;
|
package/dist/core.js
CHANGED
|
@@ -11,20 +11,20 @@ import {
|
|
|
11
11
|
Typography,
|
|
12
12
|
Upload,
|
|
13
13
|
message
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OYBMDSTC.js";
|
|
15
15
|
import "./chunk-RX242MUO.js";
|
|
16
16
|
import {
|
|
17
17
|
Select
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WA3LO3LY.js";
|
|
19
19
|
import {
|
|
20
20
|
Input,
|
|
21
21
|
Segmented
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-D3CROVS2.js";
|
|
23
23
|
import "./chunk-SCEHVGKV.js";
|
|
24
24
|
import {
|
|
25
25
|
Icon,
|
|
26
26
|
Modal
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-33FOEIXI.js";
|
|
28
28
|
import {
|
|
29
29
|
Button
|
|
30
30
|
} from "./chunk-CZ2ITBRW.js";
|
package/dist/game.cjs
CHANGED
|
@@ -1503,7 +1503,8 @@ var extendedIconPaths = {
|
|
|
1503
1503
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "3", y: "14", width: "7", height: "7", rx: "2" }),
|
|
1504
1504
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "14", y: "14", width: "7", height: "7", rx: "2" })
|
|
1505
1505
|
] }),
|
|
1506
|
-
|
|
1506
|
+
/** 扩展与插件:圆角拼图轮廓,顶部及右侧凸出接口,左侧内凹接口。 */
|
|
1507
|
+
puzzle: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M9 6V5a2 2 0 0 1 4 0v1h3a2 2 0 0 1 2 2v2h1a2 2 0 0 1 0 4h-1v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4h1a2 2 0 0 0 0-4H4V8a2 2 0 0 1 2-2h3Z" }) }),
|
|
1507
1508
|
partition: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
1508
1509
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 5v5M6 14v-2h12v2M6 18v3M12 18v3M18 18v3" }),
|
|
1509
1510
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "12", cy: "3", r: "2" }),
|
|
@@ -1792,7 +1793,8 @@ var outlineIconBounds = {
|
|
|
1792
1793
|
"plus": [4, 4, 16, 16],
|
|
1793
1794
|
"power": [4, 3, 16.000002, 16.744997],
|
|
1794
1795
|
"printer": [4, 3, 16, 18],
|
|
1795
|
-
|
|
1796
|
+
// 拼图轮廓横向从 4 到 21,纵向从 3 到 21,与图形归一化范围一致。
|
|
1797
|
+
"puzzle": [4, 3, 17, 18],
|
|
1796
1798
|
"qr-code": [3, 3, 18, 18],
|
|
1797
1799
|
"question": [3, 3, 18, 18],
|
|
1798
1800
|
"redo": [4, 7, 17, 12],
|
package/dist/game.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -875,7 +875,8 @@ var extendedIconPaths = {
|
|
|
875
875
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "3", y: "14", width: "7", height: "7", rx: "2" }),
|
|
876
876
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "14", y: "14", width: "7", height: "7", rx: "2" })
|
|
877
877
|
] }),
|
|
878
|
-
|
|
878
|
+
/** 扩展与插件:圆角拼图轮廓,顶部及右侧凸出接口,左侧内凹接口。 */
|
|
879
|
+
puzzle: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M9 6V5a2 2 0 0 1 4 0v1h3a2 2 0 0 1 2 2v2h1a2 2 0 0 1 0 4h-1v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4h1a2 2 0 0 0 0-4H4V8a2 2 0 0 1 2-2h3Z" }) }),
|
|
879
880
|
partition: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
880
881
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 5v5M6 14v-2h12v2M6 18v3M12 18v3M18 18v3" }),
|
|
881
882
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "3", r: "2" }),
|
|
@@ -1164,7 +1165,8 @@ var outlineIconBounds = {
|
|
|
1164
1165
|
"plus": [4, 4, 16, 16],
|
|
1165
1166
|
"power": [4, 3, 16.000002, 16.744997],
|
|
1166
1167
|
"printer": [4, 3, 16, 18],
|
|
1167
|
-
|
|
1168
|
+
// 拼图轮廓横向从 4 到 21,纵向从 3 到 21,与图形归一化范围一致。
|
|
1169
|
+
"puzzle": [4, 3, 17, 18],
|
|
1168
1170
|
"qr-code": [3, 3, 18, 18],
|
|
1169
1171
|
"question": [3, 3, 18, 18],
|
|
1170
1172
|
"redo": [4, 7, 17, 12],
|
|
@@ -7596,6 +7598,8 @@ function FormItem({
|
|
|
7596
7598
|
const form = (0, import_react34.useContext)(FormContext);
|
|
7597
7599
|
const id = (0, import_react34.useId)();
|
|
7598
7600
|
const itemRef = (0, import_react34.useRef)(null);
|
|
7601
|
+
const errorContentRef = (0, import_react34.useRef)(null);
|
|
7602
|
+
const [errorObscured, setErrorObscured] = (0, import_react34.useState)(false);
|
|
7599
7603
|
if (!form) throw new Error("Form.Item \u5FC5\u987B\u5728 Form \u5185\u4F7F\u7528");
|
|
7600
7604
|
(0, import_react34.useSyncExternalStore)(form.subscribe, form.getSnapshot, form.getSnapshot);
|
|
7601
7605
|
const path = name === void 0 ? void 0 : pathArray(name);
|
|
@@ -7606,6 +7610,59 @@ function FormItem({
|
|
|
7606
7610
|
const helpContent = help ?? errors[0];
|
|
7607
7611
|
const labelId = label && !noStyle ? `${id}-label` : void 0;
|
|
7608
7612
|
const errorId = `${id}-error`;
|
|
7613
|
+
const hasError = status === "error" && Boolean(helpContent);
|
|
7614
|
+
(0, import_react34.useEffect)(() => {
|
|
7615
|
+
setErrorObscured(false);
|
|
7616
|
+
if (!hasError || noStyle) return void 0;
|
|
7617
|
+
const doc = itemRef.current?.ownerDocument;
|
|
7618
|
+
const view = doc?.defaultView;
|
|
7619
|
+
if (!doc || !view) return void 0;
|
|
7620
|
+
let frame = 0;
|
|
7621
|
+
let point;
|
|
7622
|
+
const measure = () => {
|
|
7623
|
+
frame = 0;
|
|
7624
|
+
const overlay = errorContentRef.current?.closest(".sia-form-item__error-popover");
|
|
7625
|
+
const bounds = overlay?.getBoundingClientRect();
|
|
7626
|
+
if (!bounds) return;
|
|
7627
|
+
const pointerInside = !!point && point.x >= bounds.left - 4 && point.x <= bounds.right + 4 && point.y >= bounds.top - 4 && point.y <= bounds.bottom + 4;
|
|
7628
|
+
const active = doc.activeElement;
|
|
7629
|
+
const otherControl = active?.matches("input, textarea, button, select, [role='combobox'], [contenteditable='true']") && !itemRef.current?.contains(active);
|
|
7630
|
+
const focusedBounds = otherControl ? active?.getBoundingClientRect() : void 0;
|
|
7631
|
+
const coversFocus = !!focusedBounds && focusedBounds.width > 0 && focusedBounds.height > 0 && bounds.left < focusedBounds.right && bounds.right > focusedBounds.left && bounds.top < focusedBounds.bottom && bounds.bottom > focusedBounds.top;
|
|
7632
|
+
setErrorObscured(pointerInside || coversFocus);
|
|
7633
|
+
};
|
|
7634
|
+
const schedule = () => {
|
|
7635
|
+
if (!frame) frame = view.requestAnimationFrame(measure);
|
|
7636
|
+
};
|
|
7637
|
+
const move = (event) => {
|
|
7638
|
+
point = { x: event.clientX, y: event.clientY };
|
|
7639
|
+
schedule();
|
|
7640
|
+
};
|
|
7641
|
+
const leave = () => {
|
|
7642
|
+
point = void 0;
|
|
7643
|
+
schedule();
|
|
7644
|
+
};
|
|
7645
|
+
doc.addEventListener("pointermove", move, { passive: true });
|
|
7646
|
+
doc.addEventListener("pointerdown", move, { passive: true });
|
|
7647
|
+
doc.addEventListener("pointerleave", leave);
|
|
7648
|
+
doc.addEventListener("scroll", schedule, true);
|
|
7649
|
+
doc.addEventListener("focusin", schedule);
|
|
7650
|
+
doc.addEventListener("focusout", schedule);
|
|
7651
|
+
view.addEventListener("resize", schedule);
|
|
7652
|
+
view.addEventListener("blur", leave);
|
|
7653
|
+
schedule();
|
|
7654
|
+
return () => {
|
|
7655
|
+
view.cancelAnimationFrame(frame);
|
|
7656
|
+
doc.removeEventListener("pointermove", move);
|
|
7657
|
+
doc.removeEventListener("pointerdown", move);
|
|
7658
|
+
doc.removeEventListener("pointerleave", leave);
|
|
7659
|
+
doc.removeEventListener("scroll", schedule, true);
|
|
7660
|
+
doc.removeEventListener("focusin", schedule);
|
|
7661
|
+
doc.removeEventListener("focusout", schedule);
|
|
7662
|
+
view.removeEventListener("resize", schedule);
|
|
7663
|
+
view.removeEventListener("blur", leave);
|
|
7664
|
+
};
|
|
7665
|
+
}, [hasError, noStyle, helpContent]);
|
|
7609
7666
|
(0, import_react34.useEffect)(() => {
|
|
7610
7667
|
if (!path) return void 0;
|
|
7611
7668
|
return form.registerField({
|
|
@@ -7651,7 +7708,6 @@ function FormItem({
|
|
|
7651
7708
|
}
|
|
7652
7709
|
if (noStyle) return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: content });
|
|
7653
7710
|
const inputWrap = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "sia-form-item__input-wrap", children: content });
|
|
7654
|
-
const hasError = status === "error" && Boolean(helpContent);
|
|
7655
7711
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { ref: itemRef, className: `sia-form-item${align === "center" ? " sia-form-item--align-center" : ""}${status ? ` sia-form-item--${status}` : ""} ${className}`.trim(), "data-sia-form-field": key || void 0, children: [
|
|
7656
7712
|
label ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { id: labelId, className: "sia-form-item__label", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "sia-form-item__label-content", children: [
|
|
7657
7713
|
ruleRequired ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "sia-form-item__required-mark", "aria-hidden": "true", children: "*" }) : null,
|
|
@@ -7661,7 +7717,7 @@ function FormItem({
|
|
|
7661
7717
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
7662
7718
|
Tooltip,
|
|
7663
7719
|
{
|
|
7664
|
-
title: hasError ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { id: errorId, className: "sia-form-item__error-content", children: [
|
|
7720
|
+
title: hasError ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { ref: errorContentRef, id: errorId, className: "sia-form-item__error-content", children: [
|
|
7665
7721
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { className: "sia-form-item__error-icon", name: "circle-close", variant: "filled", size: 16, "aria-hidden": "true" }),
|
|
7666
7722
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: helpContent })
|
|
7667
7723
|
] }) : null,
|
|
@@ -7670,7 +7726,7 @@ function FormItem({
|
|
|
7670
7726
|
open: hasError,
|
|
7671
7727
|
role: "alert",
|
|
7672
7728
|
color: "var(--sia-color-error)",
|
|
7673
|
-
overlayClassName: "sia-form-item__error-popover"
|
|
7729
|
+
overlayClassName: `sia-form-item__error-popover${errorObscured ? " sia-form-item__error-popover--obscured" : ""}`,
|
|
7674
7730
|
children: inputWrap
|
|
7675
7731
|
}
|
|
7676
7732
|
),
|
package/dist/index.css
CHANGED
|
@@ -8095,6 +8095,10 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
|
|
|
8095
8095
|
font-size: 12px;
|
|
8096
8096
|
line-height: 1.45;
|
|
8097
8097
|
}
|
|
8098
|
+
.sia-floating__overlay.sia-form-item__error-popover--obscured {
|
|
8099
|
+
opacity: 0;
|
|
8100
|
+
animation: none;
|
|
8101
|
+
}
|
|
8098
8102
|
.sia-form-item__error-content {
|
|
8099
8103
|
display: flex;
|
|
8100
8104
|
align-items: center;
|
package/dist/index.d.cts
CHANGED
|
@@ -868,7 +868,7 @@ interface FormProps extends Omit<FormHTMLAttributes<HTMLFormElement>, "onSubmit"
|
|
|
868
868
|
onValuesChange?: (changedValues: FormValues, values: FormValues) => void;
|
|
869
869
|
}
|
|
870
870
|
declare function FormRoot({ fill, form, initialValues, layout, size: sizeProp, placeholderMode, disabled, requiredMark, className, onFinish, onFinishFailed, onValuesChange, children, ...props }: FormProps): react.JSX.Element;
|
|
871
|
-
/**
|
|
871
|
+
/** 表单项的字段绑定、标签、校验及内容配置;错误气泡不占布局空间,指针进入覆盖区域或被遮挡控件获得焦点时暂时隐藏。默认保留 8px 下外边距,noStyle 不生成布局容器或间距。 */
|
|
872
872
|
interface FormItemProps {
|
|
873
873
|
/** 绑定到表单值的字段名或嵌套路径,例如 ["user", "name"]。 */
|
|
874
874
|
name?: NamePath;
|
|
@@ -887,7 +887,7 @@ interface FormItemProps {
|
|
|
887
887
|
required?: boolean;
|
|
888
888
|
/** 主体之外的补充内容或操作区。 */
|
|
889
889
|
extra?: ReactNode;
|
|
890
|
-
/**
|
|
890
|
+
/** 字段下方的辅助说明或校验提示;错误气泡默认位于下方,指针进入覆盖区域或其他被遮挡控件获得焦点时暂时透明,移出且焦点离开后恢复。保留错误文本和无障碍关联,视口空间不足时沿用浮层防溢出规则。 */
|
|
891
891
|
help?: ReactNode;
|
|
892
892
|
/** 手动指定字段校验状态。 */
|
|
893
893
|
validateStatus?: "success" | "warning" | "error" | "validating";
|
package/dist/index.d.ts
CHANGED
|
@@ -868,7 +868,7 @@ interface FormProps extends Omit<FormHTMLAttributes<HTMLFormElement>, "onSubmit"
|
|
|
868
868
|
onValuesChange?: (changedValues: FormValues, values: FormValues) => void;
|
|
869
869
|
}
|
|
870
870
|
declare function FormRoot({ fill, form, initialValues, layout, size: sizeProp, placeholderMode, disabled, requiredMark, className, onFinish, onFinishFailed, onValuesChange, children, ...props }: FormProps): react.JSX.Element;
|
|
871
|
-
/**
|
|
871
|
+
/** 表单项的字段绑定、标签、校验及内容配置;错误气泡不占布局空间,指针进入覆盖区域或被遮挡控件获得焦点时暂时隐藏。默认保留 8px 下外边距,noStyle 不生成布局容器或间距。 */
|
|
872
872
|
interface FormItemProps {
|
|
873
873
|
/** 绑定到表单值的字段名或嵌套路径,例如 ["user", "name"]。 */
|
|
874
874
|
name?: NamePath;
|
|
@@ -887,7 +887,7 @@ interface FormItemProps {
|
|
|
887
887
|
required?: boolean;
|
|
888
888
|
/** 主体之外的补充内容或操作区。 */
|
|
889
889
|
extra?: ReactNode;
|
|
890
|
-
/**
|
|
890
|
+
/** 字段下方的辅助说明或校验提示;错误气泡默认位于下方,指针进入覆盖区域或其他被遮挡控件获得焦点时暂时透明,移出且焦点离开后恢复。保留错误文本和无障碍关联,视口空间不足时沿用浮层防溢出规则。 */
|
|
891
891
|
help?: ReactNode;
|
|
892
892
|
/** 手动指定字段校验状态。 */
|
|
893
893
|
validateStatus?: "success" | "warning" | "error" | "validating";
|
package/dist/index.js
CHANGED
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
Watermark,
|
|
83
83
|
message,
|
|
84
84
|
notification
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-OYBMDSTC.js";
|
|
86
86
|
import "./chunk-RX242MUO.js";
|
|
87
87
|
import {
|
|
88
88
|
MarkdownEditor
|
|
@@ -90,12 +90,12 @@ import {
|
|
|
90
90
|
import {
|
|
91
91
|
RichTextContent,
|
|
92
92
|
RichTextEditor
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-B333SUKG.js";
|
|
94
94
|
import {
|
|
95
95
|
DatePicker,
|
|
96
96
|
SelectDateRange,
|
|
97
97
|
TimePanel
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-PUNKAJBB.js";
|
|
99
99
|
import {
|
|
100
100
|
Checkbox,
|
|
101
101
|
FloatingScrollbarProvider,
|
|
@@ -107,14 +107,14 @@ import {
|
|
|
107
107
|
Tooltip,
|
|
108
108
|
Tree,
|
|
109
109
|
useScrollbarProximity
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-WA3LO3LY.js";
|
|
111
111
|
import {
|
|
112
112
|
Dropdown,
|
|
113
113
|
Input,
|
|
114
114
|
Menu,
|
|
115
115
|
Segmented,
|
|
116
116
|
Steps
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-D3CROVS2.js";
|
|
118
118
|
import {
|
|
119
119
|
TextArea
|
|
120
120
|
} from "./chunk-SCEHVGKV.js";
|
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
Modal,
|
|
126
126
|
OverlayPortal,
|
|
127
127
|
useOverlayLifecycle
|
|
128
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-33FOEIXI.js";
|
|
129
129
|
import {
|
|
130
130
|
Button
|
|
131
131
|
} from "./chunk-CZ2ITBRW.js";
|
|
@@ -1695,7 +1695,7 @@ var Drawer2 = Object.assign(DrawerRoot, {
|
|
|
1695
1695
|
});
|
|
1696
1696
|
|
|
1697
1697
|
// src/components/Form.tsx
|
|
1698
|
-
import { Children as Children3, cloneElement as cloneElement2, createContext as createContext2, forwardRef as forwardRef2, isValidElement as isValidElement2, useContext as useContext2, useEffect as useEffect6, useId as useId3, useLayoutEffect as useLayoutEffect3, useMemo as useMemo4, useRef as useRef8, useSyncExternalStore } from "react";
|
|
1698
|
+
import { Children as Children3, cloneElement as cloneElement2, createContext as createContext2, forwardRef as forwardRef2, isValidElement as isValidElement2, useContext as useContext2, useEffect as useEffect6, useId as useId3, useLayoutEffect as useLayoutEffect3, useMemo as useMemo4, useRef as useRef8, useState as useState9, useSyncExternalStore } from "react";
|
|
1699
1699
|
import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1700
1700
|
var Switch = forwardRef2(function Switch2({
|
|
1701
1701
|
label,
|
|
@@ -2059,6 +2059,8 @@ function FormItem({
|
|
|
2059
2059
|
const form = useContext2(FormContext);
|
|
2060
2060
|
const id = useId3();
|
|
2061
2061
|
const itemRef = useRef8(null);
|
|
2062
|
+
const errorContentRef = useRef8(null);
|
|
2063
|
+
const [errorObscured, setErrorObscured] = useState9(false);
|
|
2062
2064
|
if (!form) throw new Error("Form.Item \u5FC5\u987B\u5728 Form \u5185\u4F7F\u7528");
|
|
2063
2065
|
useSyncExternalStore(form.subscribe, form.getSnapshot, form.getSnapshot);
|
|
2064
2066
|
const path = name === void 0 ? void 0 : pathArray(name);
|
|
@@ -2069,6 +2071,59 @@ function FormItem({
|
|
|
2069
2071
|
const helpContent = help ?? errors[0];
|
|
2070
2072
|
const labelId = label && !noStyle ? `${id}-label` : void 0;
|
|
2071
2073
|
const errorId = `${id}-error`;
|
|
2074
|
+
const hasError = status === "error" && Boolean(helpContent);
|
|
2075
|
+
useEffect6(() => {
|
|
2076
|
+
setErrorObscured(false);
|
|
2077
|
+
if (!hasError || noStyle) return void 0;
|
|
2078
|
+
const doc = itemRef.current?.ownerDocument;
|
|
2079
|
+
const view = doc?.defaultView;
|
|
2080
|
+
if (!doc || !view) return void 0;
|
|
2081
|
+
let frame = 0;
|
|
2082
|
+
let point;
|
|
2083
|
+
const measure = () => {
|
|
2084
|
+
frame = 0;
|
|
2085
|
+
const overlay = errorContentRef.current?.closest(".sia-form-item__error-popover");
|
|
2086
|
+
const bounds = overlay?.getBoundingClientRect();
|
|
2087
|
+
if (!bounds) return;
|
|
2088
|
+
const pointerInside = !!point && point.x >= bounds.left - 4 && point.x <= bounds.right + 4 && point.y >= bounds.top - 4 && point.y <= bounds.bottom + 4;
|
|
2089
|
+
const active = doc.activeElement;
|
|
2090
|
+
const otherControl = active?.matches("input, textarea, button, select, [role='combobox'], [contenteditable='true']") && !itemRef.current?.contains(active);
|
|
2091
|
+
const focusedBounds = otherControl ? active?.getBoundingClientRect() : void 0;
|
|
2092
|
+
const coversFocus = !!focusedBounds && focusedBounds.width > 0 && focusedBounds.height > 0 && bounds.left < focusedBounds.right && bounds.right > focusedBounds.left && bounds.top < focusedBounds.bottom && bounds.bottom > focusedBounds.top;
|
|
2093
|
+
setErrorObscured(pointerInside || coversFocus);
|
|
2094
|
+
};
|
|
2095
|
+
const schedule = () => {
|
|
2096
|
+
if (!frame) frame = view.requestAnimationFrame(measure);
|
|
2097
|
+
};
|
|
2098
|
+
const move = (event) => {
|
|
2099
|
+
point = { x: event.clientX, y: event.clientY };
|
|
2100
|
+
schedule();
|
|
2101
|
+
};
|
|
2102
|
+
const leave = () => {
|
|
2103
|
+
point = void 0;
|
|
2104
|
+
schedule();
|
|
2105
|
+
};
|
|
2106
|
+
doc.addEventListener("pointermove", move, { passive: true });
|
|
2107
|
+
doc.addEventListener("pointerdown", move, { passive: true });
|
|
2108
|
+
doc.addEventListener("pointerleave", leave);
|
|
2109
|
+
doc.addEventListener("scroll", schedule, true);
|
|
2110
|
+
doc.addEventListener("focusin", schedule);
|
|
2111
|
+
doc.addEventListener("focusout", schedule);
|
|
2112
|
+
view.addEventListener("resize", schedule);
|
|
2113
|
+
view.addEventListener("blur", leave);
|
|
2114
|
+
schedule();
|
|
2115
|
+
return () => {
|
|
2116
|
+
view.cancelAnimationFrame(frame);
|
|
2117
|
+
doc.removeEventListener("pointermove", move);
|
|
2118
|
+
doc.removeEventListener("pointerdown", move);
|
|
2119
|
+
doc.removeEventListener("pointerleave", leave);
|
|
2120
|
+
doc.removeEventListener("scroll", schedule, true);
|
|
2121
|
+
doc.removeEventListener("focusin", schedule);
|
|
2122
|
+
doc.removeEventListener("focusout", schedule);
|
|
2123
|
+
view.removeEventListener("resize", schedule);
|
|
2124
|
+
view.removeEventListener("blur", leave);
|
|
2125
|
+
};
|
|
2126
|
+
}, [hasError, noStyle, helpContent]);
|
|
2072
2127
|
useEffect6(() => {
|
|
2073
2128
|
if (!path) return void 0;
|
|
2074
2129
|
return form.registerField({
|
|
@@ -2114,7 +2169,6 @@ function FormItem({
|
|
|
2114
2169
|
}
|
|
2115
2170
|
if (noStyle) return /* @__PURE__ */ jsx11(Fragment4, { children: content });
|
|
2116
2171
|
const inputWrap = /* @__PURE__ */ jsx11("div", { className: "sia-form-item__input-wrap", children: content });
|
|
2117
|
-
const hasError = status === "error" && Boolean(helpContent);
|
|
2118
2172
|
return /* @__PURE__ */ jsxs11("div", { ref: itemRef, className: `sia-form-item${align === "center" ? " sia-form-item--align-center" : ""}${status ? ` sia-form-item--${status}` : ""} ${className}`.trim(), "data-sia-form-field": key || void 0, children: [
|
|
2119
2173
|
label ? /* @__PURE__ */ jsx11("div", { id: labelId, className: "sia-form-item__label", children: /* @__PURE__ */ jsxs11("span", { className: "sia-form-item__label-content", children: [
|
|
2120
2174
|
ruleRequired ? /* @__PURE__ */ jsx11("span", { className: "sia-form-item__required-mark", "aria-hidden": "true", children: "*" }) : null,
|
|
@@ -2124,7 +2178,7 @@ function FormItem({
|
|
|
2124
2178
|
/* @__PURE__ */ jsx11(
|
|
2125
2179
|
Tooltip,
|
|
2126
2180
|
{
|
|
2127
|
-
title: hasError ? /* @__PURE__ */ jsxs11("span", { id: errorId, className: "sia-form-item__error-content", children: [
|
|
2181
|
+
title: hasError ? /* @__PURE__ */ jsxs11("span", { ref: errorContentRef, id: errorId, className: "sia-form-item__error-content", children: [
|
|
2128
2182
|
/* @__PURE__ */ jsx11(Icon, { className: "sia-form-item__error-icon", name: "circle-close", variant: "filled", size: 16, "aria-hidden": "true" }),
|
|
2129
2183
|
/* @__PURE__ */ jsx11("span", { children: helpContent })
|
|
2130
2184
|
] }) : null,
|
|
@@ -2133,7 +2187,7 @@ function FormItem({
|
|
|
2133
2187
|
open: hasError,
|
|
2134
2188
|
role: "alert",
|
|
2135
2189
|
color: "var(--sia-color-error)",
|
|
2136
|
-
overlayClassName: "sia-form-item__error-popover"
|
|
2190
|
+
overlayClassName: `sia-form-item__error-popover${errorObscured ? " sia-form-item__error-popover--obscured" : ""}`,
|
|
2137
2191
|
children: inputWrap
|
|
2138
2192
|
}
|
|
2139
2193
|
),
|
|
@@ -2264,7 +2318,7 @@ var Radio2 = Object.assign(RadioRoot, {
|
|
|
2264
2318
|
});
|
|
2265
2319
|
|
|
2266
2320
|
// src/components/Slider.tsx
|
|
2267
|
-
import { useState as
|
|
2321
|
+
import { useState as useState10 } from "react";
|
|
2268
2322
|
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2269
2323
|
function percent(value, min, max) {
|
|
2270
2324
|
return (value - min) / (max - min) * 100;
|
|
@@ -2288,7 +2342,7 @@ function Slider({
|
|
|
2288
2342
|
}) {
|
|
2289
2343
|
const fallback = defaultValue ?? (range ? [min, max] : min);
|
|
2290
2344
|
const [currentValue, setValue2] = useControllableState({ value, defaultValue: fallback, onChange });
|
|
2291
|
-
const [activeThumb, setActiveThumb] =
|
|
2345
|
+
const [activeThumb, setActiveThumb] = useState10(null);
|
|
2292
2346
|
const values = Array.isArray(currentValue) ? [...currentValue] : [currentValue];
|
|
2293
2347
|
const start = range ? percent(Math.min(values[0], values[1]), min, max) : 0;
|
|
2294
2348
|
const end = percent(range ? Math.max(values[0], values[1]) : values[0], min, max);
|
|
@@ -2385,7 +2439,7 @@ function Slider({
|
|
|
2385
2439
|
}
|
|
2386
2440
|
|
|
2387
2441
|
// src/components/ColorPicker.tsx
|
|
2388
|
-
import { useEffect as useEffect7, useRef as useRef9, useState as
|
|
2442
|
+
import { useEffect as useEffect7, useRef as useRef9, useState as useState11 } from "react";
|
|
2389
2443
|
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2390
2444
|
var DEFAULT_MODES = ["solid", "gradient"];
|
|
2391
2445
|
var gradientStopSeed = 0;
|
|
@@ -2481,7 +2535,7 @@ function ColorPicker({
|
|
|
2481
2535
|
const lastEmittedValue = useRef9();
|
|
2482
2536
|
const initialGradient = parseGradient(value ?? defaultValue);
|
|
2483
2537
|
const initialSolid = initialGradient?.stops[0]?.color ?? normalizeHex(value || defaultValue);
|
|
2484
|
-
const [open, setOpen] =
|
|
2538
|
+
const [open, setOpen] = useState11(false);
|
|
2485
2539
|
const [color, setColor] = useControllableState({
|
|
2486
2540
|
value,
|
|
2487
2541
|
defaultValue: initialGradient ? formatGradient(initialGradient.angle, initialGradient.stops.map((stop, index) => ({ id: index, ...stop }))) : normalizeHex(defaultValue),
|
|
@@ -2492,15 +2546,15 @@ function ColorPicker({
|
|
|
2492
2546
|
defaultValue: initialGradient ? "gradient" : defaultMode,
|
|
2493
2547
|
onChange: onModeChange
|
|
2494
2548
|
});
|
|
2495
|
-
const [solidColor, setSolidColor] =
|
|
2496
|
-
const [gradientAngle, setGradientAngle] =
|
|
2497
|
-
const [gradientStops, setGradientStops] =
|
|
2498
|
-
const [activeStopId, setActiveStopId] =
|
|
2549
|
+
const [solidColor, setSolidColor] = useState11(initialSolid);
|
|
2550
|
+
const [gradientAngle, setGradientAngle] = useState11(initialGradient?.angle ?? 90);
|
|
2551
|
+
const [gradientStops, setGradientStops] = useState11(() => initialGradient ? initialGradient.stops.map((stop) => createStop(stop.color, stop.position)) : createDefaultStops(initialSolid));
|
|
2552
|
+
const [activeStopId, setActiveStopId] = useState11(() => gradientStops[0]?.id ?? 0);
|
|
2499
2553
|
const activeStop = gradientStops.find((stop) => stop.id === activeStopId) ?? gradientStops[0];
|
|
2500
2554
|
const editingColor = currentMode === "gradient" ? activeStop?.color ?? solidColor : solidColor;
|
|
2501
2555
|
const rgba = parseHex(editingColor) ?? parseHex("#1677FF");
|
|
2502
2556
|
const hsv = rgbToHsv(rgba);
|
|
2503
|
-
const [hexDraft, setHexDraft] =
|
|
2557
|
+
const [hexDraft, setHexDraft] = useState11(editingColor);
|
|
2504
2558
|
const gradientValue = formatGradient(gradientAngle, gradientStops);
|
|
2505
2559
|
useEffect7(() => {
|
|
2506
2560
|
if (!open) return void 0;
|
|
@@ -2701,7 +2755,7 @@ function ColorPicker({
|
|
|
2701
2755
|
}
|
|
2702
2756
|
|
|
2703
2757
|
// src/components/TimePicker.tsx
|
|
2704
|
-
import { useEffect as useEffect8, useId as useId5, useRef as useRef10, useState as
|
|
2758
|
+
import { useEffect as useEffect8, useId as useId5, useRef as useRef10, useState as useState12 } from "react";
|
|
2705
2759
|
import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2706
2760
|
function seconds(value) {
|
|
2707
2761
|
const [h = 0, m = 0, s = 0] = value.split(":").map(Number);
|
|
@@ -2737,8 +2791,8 @@ function TimePicker({
|
|
|
2737
2791
|
const popupRef = useRef10(null);
|
|
2738
2792
|
const focusPanel = useRef10(false);
|
|
2739
2793
|
const [currentValue, setValue2] = useControllableState({ value, defaultValue, onChange });
|
|
2740
|
-
const [open, setOpen] =
|
|
2741
|
-
const [draft, setDraft] =
|
|
2794
|
+
const [open, setOpen] = useState12(false);
|
|
2795
|
+
const [draft, setDraft] = useState12("00:00:00");
|
|
2742
2796
|
const normalize = (time) => showSecond ? (time + ":00").slice(0, 8) : time.slice(0, 5);
|
|
2743
2797
|
const unavailable = (time) => {
|
|
2744
2798
|
const normalized = normalize(time);
|
|
@@ -2875,7 +2929,7 @@ function TimeRangePicker({ value, defaultValue = ["", ""], placeholder = ["\u5F0
|
|
|
2875
2929
|
})(TimePicker || (TimePicker = {}));
|
|
2876
2930
|
|
|
2877
2931
|
// src/components/TreeSelect.tsx
|
|
2878
|
-
import { useEffect as useEffect9, useMemo as useMemo6, useRef as useRef11, useState as
|
|
2932
|
+
import { useEffect as useEffect9, useMemo as useMemo6, useRef as useRef11, useState as useState13 } from "react";
|
|
2879
2933
|
import { Fragment as Fragment5, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2880
2934
|
function flattenTree(nodes, expanded, search, filter, depth = 0, parents = [], ancestorMatched = false) {
|
|
2881
2935
|
const result = [];
|
|
@@ -2959,7 +3013,7 @@ function TreeSelect({
|
|
|
2959
3013
|
});
|
|
2960
3014
|
const [open, setOpen] = useControllableState({ value: controlledOpen, defaultValue: defaultOpen, onChange: onDropdownVisibleChange });
|
|
2961
3015
|
const [search, setSearch] = useControllableState({ value: searchValue, defaultValue: "", onChange: onSearch });
|
|
2962
|
-
const [expanded, setExpanded] =
|
|
3016
|
+
const [expanded, setExpanded] = useState13(() => {
|
|
2963
3017
|
if (!treeDefaultExpandAll) return new Set(treeDefaultExpandedKeys);
|
|
2964
3018
|
const values = [];
|
|
2965
3019
|
const collect = (nodes) => nodes.forEach((node) => {
|
|
@@ -3194,7 +3248,7 @@ function buildFlatTree(items, options = {}) {
|
|
|
3194
3248
|
}
|
|
3195
3249
|
|
|
3196
3250
|
// src/components/Editor.tsx
|
|
3197
|
-
import { useEffect as useEffect10, useId as useId6, useRef as useRef12, useState as
|
|
3251
|
+
import { useEffect as useEffect10, useId as useId6, useRef as useRef12, useState as useState14 } from "react";
|
|
3198
3252
|
import EditorWorker from "monaco-editor/editor/editor.worker.js?worker";
|
|
3199
3253
|
|
|
3200
3254
|
// src/components/jsonLanguage.ts
|
|
@@ -3891,8 +3945,8 @@ function Editor({
|
|
|
3891
3945
|
const initialPathRef = useRef12(path);
|
|
3892
3946
|
const initialThemeRef = useRef12(theme);
|
|
3893
3947
|
const initialOptionsRef = useRef12(options);
|
|
3894
|
-
const [loading, setLoading] =
|
|
3895
|
-
const [, setSelectionVersion] =
|
|
3948
|
+
const [loading, setLoading] = useState14(true);
|
|
3949
|
+
const [, setSelectionVersion] = useState14(0);
|
|
3896
3950
|
initialValueRef.current = value;
|
|
3897
3951
|
initialLanguageRef.current = language;
|
|
3898
3952
|
initialPathRef.current = path;
|
|
@@ -4428,13 +4482,13 @@ function Editor({
|
|
|
4428
4482
|
}
|
|
4429
4483
|
|
|
4430
4484
|
// src/components/Markdown.tsx
|
|
4431
|
-
import { useEffect as useEffect11, useMemo as useMemo7, useRef as useRef13, useState as
|
|
4485
|
+
import { useEffect as useEffect11, useMemo as useMemo7, useRef as useRef13, useState as useState15 } from "react";
|
|
4432
4486
|
import DOMPurify from "dompurify";
|
|
4433
4487
|
import { marked } from "marked";
|
|
4434
4488
|
import { Fragment as Fragment6, jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4435
4489
|
function Markdown({ content, emptyText = "\u6682\u65E0 Markdown \u5185\u5BB9", resolveImageSrc, imagePreview = true, className = "", onClick, onKeyDown, ...props }) {
|
|
4436
4490
|
const rootRef = useRef13(null);
|
|
4437
|
-
const [previewImage, setPreviewImage] =
|
|
4491
|
+
const [previewImage, setPreviewImage] = useState15(null);
|
|
4438
4492
|
const html = useMemo7(() => {
|
|
4439
4493
|
const rendered = marked.parse(content, { breaks: true, gfm: true });
|
|
4440
4494
|
const sanitized = DOMPurify.sanitize(rendered, { USE_PROFILES: { html: true } });
|
|
@@ -4508,7 +4562,7 @@ function Markdown({ content, emptyText = "\u6682\u65E0 Markdown \u5185\u5BB9", r
|
|
|
4508
4562
|
}
|
|
4509
4563
|
|
|
4510
4564
|
// src/components/InputNumber.tsx
|
|
4511
|
-
import { forwardRef as forwardRef4, useEffect as useEffect12, useId as useId7, useRef as useRef14, useState as
|
|
4565
|
+
import { forwardRef as forwardRef4, useEffect as useEffect12, useId as useId7, useRef as useRef14, useState as useState16 } from "react";
|
|
4512
4566
|
import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4513
4567
|
function formatValue(value, precision) {
|
|
4514
4568
|
if (value === null || !Number.isFinite(value)) return "";
|
|
@@ -4548,7 +4602,7 @@ var InputNumber = forwardRef4(function InputNumber2({
|
|
|
4548
4602
|
const plain = formatValue(next, precision);
|
|
4549
4603
|
return plain && formatter ? formatter(plain) : plain;
|
|
4550
4604
|
};
|
|
4551
|
-
const [text, setText] =
|
|
4605
|
+
const [text, setText] = useState16(() => displayValue(currentValue));
|
|
4552
4606
|
useEffect12(() => {
|
|
4553
4607
|
setText(displayValue(currentValue));
|
|
4554
4608
|
}, [currentValue, precision, formatter]);
|
|
@@ -4655,11 +4709,11 @@ var InputNumber = forwardRef4(function InputNumber2({
|
|
|
4655
4709
|
});
|
|
4656
4710
|
|
|
4657
4711
|
// src/components/SelectModal.tsx
|
|
4658
|
-
import { useState as
|
|
4712
|
+
import { useState as useState17 } from "react";
|
|
4659
4713
|
import { Fragment as Fragment7, jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4660
4714
|
function SelectModalBody({ config, values, disabled, onChange }) {
|
|
4661
|
-
const [query, setQuery] =
|
|
4662
|
-
const [selectedOnly, setSelectedOnly] =
|
|
4715
|
+
const [query, setQuery] = useState17("");
|
|
4716
|
+
const [selectedOnly, setSelectedOnly] = useState17(false);
|
|
4663
4717
|
const multiple = config.mode === "multiple";
|
|
4664
4718
|
const search = query.trim();
|
|
4665
4719
|
const filtered = config.options.filter((option) => !search || (config.filterOption ? config.filterOption(search, option) : [option.label, option.value].some((text) => String(text ?? "").toLowerCase().includes(search.toLowerCase()))));
|
|
@@ -4784,7 +4838,7 @@ function openSelectModal(config) {
|
|
|
4784
4838
|
}
|
|
4785
4839
|
|
|
4786
4840
|
// src/components/Treemap.tsx
|
|
4787
|
-
import { useEffect as useEffect13, useMemo as useMemo8, useRef as useRef15, useState as
|
|
4841
|
+
import { useEffect as useEffect13, useMemo as useMemo8, useRef as useRef15, useState as useState18 } from "react";
|
|
4788
4842
|
import { jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4789
4843
|
import { createElement } from "react";
|
|
4790
4844
|
function positiveValue(value) {
|
|
@@ -5158,9 +5212,9 @@ function Treemap({
|
|
|
5158
5212
|
...props
|
|
5159
5213
|
}) {
|
|
5160
5214
|
const containerRef = useRef15(null);
|
|
5161
|
-
const [size, setSize] =
|
|
5162
|
-
const [internalExpandedKeys, setInternalExpandedKeys] =
|
|
5163
|
-
const [internalFocusedKey, setInternalFocusedKey] =
|
|
5215
|
+
const [size, setSize] = useState18({ width: 0, height: 0 });
|
|
5216
|
+
const [internalExpandedKeys, setInternalExpandedKeys] = useState18(() => [...defaultExpandedKeys]);
|
|
5217
|
+
const [internalFocusedKey, setInternalFocusedKey] = useState18(defaultFocusedKey);
|
|
5164
5218
|
const currentExpandedKeys = expandedKeys ?? internalExpandedKeys;
|
|
5165
5219
|
const currentFocusedKey = focusedKey === void 0 ? internalFocusedKey : focusedKey;
|
|
5166
5220
|
const expandedSet = useMemo8(() => new Set(currentExpandedKeys), [currentExpandedKeys]);
|
|
@@ -5310,7 +5364,7 @@ function Treemap({
|
|
|
5310
5364
|
}
|
|
5311
5365
|
|
|
5312
5366
|
// src/components/Table/TableCellContent.tsx
|
|
5313
|
-
import { useLayoutEffect as useLayoutEffect4, useRef as useRef16, useState as
|
|
5367
|
+
import { useLayoutEffect as useLayoutEffect4, useRef as useRef16, useState as useState19 } from "react";
|
|
5314
5368
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
5315
5369
|
var pendingLayouts = /* @__PURE__ */ new Map();
|
|
5316
5370
|
var layoutFrame;
|
|
@@ -5330,7 +5384,7 @@ function scheduleLayout(element, task) {
|
|
|
5330
5384
|
}
|
|
5331
5385
|
function TableCellContent({ children, ellipsis, title }) {
|
|
5332
5386
|
const ref = useRef16(null);
|
|
5333
|
-
const [overflowing, setOverflowing] =
|
|
5387
|
+
const [overflowing, setOverflowing] = useState19(false);
|
|
5334
5388
|
const customContent = typeof children !== "string" && typeof children !== "number" && children != null;
|
|
5335
5389
|
useLayoutEffect4(() => {
|
|
5336
5390
|
const element = ref.current;
|
|
@@ -5368,9 +5422,9 @@ function TableCellContent({ children, ellipsis, title }) {
|
|
|
5368
5422
|
}
|
|
5369
5423
|
|
|
5370
5424
|
// src/components/Table/useRemainingHeight.ts
|
|
5371
|
-
import { useLayoutEffect as useLayoutEffect5, useState as
|
|
5425
|
+
import { useLayoutEffect as useLayoutEffect5, useState as useState20 } from "react";
|
|
5372
5426
|
function useRemainingHeight(rootRef, options) {
|
|
5373
|
-
const [height, setHeight] =
|
|
5427
|
+
const [height, setHeight] = useState20();
|
|
5374
5428
|
const enabled = !!options;
|
|
5375
5429
|
const container = typeof options === "object" ? options.container : void 0;
|
|
5376
5430
|
const bottomOffset = typeof options === "object" ? options.bottomOffset ?? 0 : 0;
|
|
@@ -5645,10 +5699,10 @@ function createRowIdentity() {
|
|
|
5645
5699
|
}
|
|
5646
5700
|
|
|
5647
5701
|
// src/components/Table/Table.tsx
|
|
5648
|
-
import { Fragment as Fragment9, forwardRef as forwardRef5, isValidElement as isValidElement4, memo, useCallback as useCallback2, useEffect as useEffect15, useImperativeHandle, useMemo as useMemo9, useRef as useRef19, useState as
|
|
5702
|
+
import { Fragment as Fragment9, forwardRef as forwardRef5, isValidElement as isValidElement4, memo, useCallback as useCallback2, useEffect as useEffect15, useImperativeHandle, useMemo as useMemo9, useRef as useRef19, useState as useState22 } from "react";
|
|
5649
5703
|
|
|
5650
5704
|
// src/components/Table/plugins.tsx
|
|
5651
|
-
import { isValidElement as isValidElement3, useEffect as useEffect14, useRef as useRef18, useState as
|
|
5705
|
+
import { isValidElement as isValidElement3, useEffect as useEffect14, useRef as useRef18, useState as useState21 } from "react";
|
|
5652
5706
|
|
|
5653
5707
|
// src/components/Table/columnSettings.ts
|
|
5654
5708
|
function reconcileColumnSettings(columns, defaults, saved) {
|
|
@@ -6361,7 +6415,7 @@ function TableSelectedItemsPanel({
|
|
|
6361
6415
|
onRemove,
|
|
6362
6416
|
onClear
|
|
6363
6417
|
}) {
|
|
6364
|
-
const [showAll, setShowAll] =
|
|
6418
|
+
const [showAll, setShowAll] = useState21(false);
|
|
6365
6419
|
const visibleEntries = showAll ? entries : entries.slice(0, maxCount);
|
|
6366
6420
|
const hiddenCount = Math.max(0, entries.length - visibleEntries.length);
|
|
6367
6421
|
const baseColumnMap = new Map(
|
|
@@ -6767,8 +6821,8 @@ function TableFilterControl({
|
|
|
6767
6821
|
placeholder,
|
|
6768
6822
|
onApply
|
|
6769
6823
|
}) {
|
|
6770
|
-
const [open, setOpen] =
|
|
6771
|
-
const [draft, setDraft] =
|
|
6824
|
+
const [open, setOpen] = useState21(false);
|
|
6825
|
+
const [draft, setDraft] = useState21(value);
|
|
6772
6826
|
const label = getColumnLabel(column);
|
|
6773
6827
|
useEffect14(() => {
|
|
6774
6828
|
if (open) setDraft(value);
|
|
@@ -7208,8 +7262,8 @@ function EditableTableCell({
|
|
|
7208
7262
|
trigger
|
|
7209
7263
|
}) {
|
|
7210
7264
|
const config = typeof editable === "object" ? editable : { type: "input" };
|
|
7211
|
-
const [editValue, setEditValue] =
|
|
7212
|
-
const [saving, setSaving] =
|
|
7265
|
+
const [editValue, setEditValue] = useState21(value);
|
|
7266
|
+
const [saving, setSaving] = useState21(false);
|
|
7213
7267
|
const inputRef = useRef18(null);
|
|
7214
7268
|
const editorRef = useRef18(null);
|
|
7215
7269
|
const editValueRef = useRef18(value);
|
|
@@ -7554,10 +7608,10 @@ function ColumnSettingPanel({
|
|
|
7554
7608
|
onClose,
|
|
7555
7609
|
onApply
|
|
7556
7610
|
}) {
|
|
7557
|
-
const [draft, setDraft] =
|
|
7611
|
+
const [draft, setDraft] = useState21(items);
|
|
7558
7612
|
const listRef = useRef18(null);
|
|
7559
7613
|
const cancelDrag = useRef18(null);
|
|
7560
|
-
const [preview, setPreview] =
|
|
7614
|
+
const [preview, setPreview] = useState21(null);
|
|
7561
7615
|
useEffect14(() => {
|
|
7562
7616
|
cancelDrag.current?.();
|
|
7563
7617
|
if (open) setDraft(orderColumnSettings(items));
|
|
@@ -8392,13 +8446,13 @@ function TableInner(props, ref) {
|
|
|
8392
8446
|
const tableRef = useRef19(null);
|
|
8393
8447
|
useScrollbarProximity();
|
|
8394
8448
|
const scrollbarDragRef = useRef19(null);
|
|
8395
|
-
const [internalLoading, setInternalLoading] =
|
|
8396
|
-
const [scrollTop, setScrollTop] =
|
|
8397
|
-
const [scrollLeft, setScrollLeft] =
|
|
8398
|
-
const [viewportHeight, setViewportHeight] =
|
|
8399
|
-
const [viewportWidth, setViewportWidth] =
|
|
8400
|
-
const [autoColumnWidths, setAutoColumnWidths] =
|
|
8401
|
-
const [resolveRowIdentity] =
|
|
8449
|
+
const [internalLoading, setInternalLoading] = useState22(false);
|
|
8450
|
+
const [scrollTop, setScrollTop] = useState22(0);
|
|
8451
|
+
const [scrollLeft, setScrollLeft] = useState22(0);
|
|
8452
|
+
const [viewportHeight, setViewportHeight] = useState22(420);
|
|
8453
|
+
const [viewportWidth, setViewportWidth] = useState22(0);
|
|
8454
|
+
const [autoColumnWidths, setAutoColumnWidths] = useState22({});
|
|
8455
|
+
const [resolveRowIdentity] = useState22(createRowIdentity);
|
|
8402
8456
|
const getRowKey = useCallback2((record, index) => resolveRowIdentity(record, index, typeof rowKey === "function" ? rowKey : rowKey == null ? void 0 : String(rowKey)), [rowKey, resolveRowIdentity]);
|
|
8403
8457
|
const builtInResizePlugin = useMemo9(() => createResizePlugin(), []);
|
|
8404
8458
|
const builtInHighlightPlugin = useMemo9(() => createHighlightPlugin(), []);
|
|
@@ -8415,7 +8469,7 @@ function TableInner(props, ref) {
|
|
|
8415
8469
|
const sortedPlugins = useMemo9(() => [...activePlugins].sort((a, b) => (a.order ?? 100) - (b.order ?? 100)), [activePlugins]);
|
|
8416
8470
|
const pluginsByIdRef = useRef19(/* @__PURE__ */ new Map());
|
|
8417
8471
|
pluginsByIdRef.current = new Map(sortedPlugins.map((plugin) => [plugin.id, plugin]));
|
|
8418
|
-
const [pluginStates, setPluginStates] =
|
|
8472
|
+
const [pluginStates, setPluginStates] = useState22(() => Object.fromEntries(
|
|
8419
8473
|
sortedPlugins.map((plugin) => [plugin.id, resolveInitialState(plugin)])
|
|
8420
8474
|
));
|
|
8421
8475
|
const pluginApisRef = useRef19({});
|
|
@@ -9100,7 +9154,7 @@ function applySiaTheme(mode, target = document.documentElement) {
|
|
|
9100
9154
|
}
|
|
9101
9155
|
|
|
9102
9156
|
// src/components/InputSelect.tsx
|
|
9103
|
-
import { forwardRef as forwardRef7, useEffect as useEffect16, useRef as useRef20, useState as
|
|
9157
|
+
import { forwardRef as forwardRef7, useEffect as useEffect16, useRef as useRef20, useState as useState23 } from "react";
|
|
9104
9158
|
import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
9105
9159
|
var InputSelect = forwardRef7(function InputSelect2({
|
|
9106
9160
|
options,
|
|
@@ -9128,19 +9182,19 @@ var InputSelect = forwardRef7(function InputSelect2({
|
|
|
9128
9182
|
...inputProps
|
|
9129
9183
|
}, forwardedRef) {
|
|
9130
9184
|
const size = useControlSize(sizeProp);
|
|
9131
|
-
const [internal, setInternal] =
|
|
9185
|
+
const [internal, setInternal] = useState23(defaultValue);
|
|
9132
9186
|
const current = value !== void 0 ? value : internal;
|
|
9133
9187
|
const values = current == null ? [] : Array.isArray(current) ? current : [current];
|
|
9134
9188
|
const text = values.map((item) => displayField === "label" ? String(options.find((option) => option.optionType !== "divider" && option.value === item)?.label ?? item) : String(item)).join(",");
|
|
9135
|
-
const [draft, setDraft] =
|
|
9189
|
+
const [draft, setDraft] = useState23(text);
|
|
9136
9190
|
useEffect16(() => {
|
|
9137
9191
|
setDraft(text);
|
|
9138
9192
|
}, [text, current]);
|
|
9139
|
-
const [open, setOpen] =
|
|
9140
|
-
const [search, setSearch] =
|
|
9141
|
-
const [modalOpen, setModalOpen] =
|
|
9142
|
-
const [modalValues, setModalValues] =
|
|
9143
|
-
const [selectedOnly, setSelectedOnly] =
|
|
9193
|
+
const [open, setOpen] = useState23(false);
|
|
9194
|
+
const [search, setSearch] = useState23("");
|
|
9195
|
+
const [modalOpen, setModalOpen] = useState23(false);
|
|
9196
|
+
const [modalValues, setModalValues] = useState23([]);
|
|
9197
|
+
const [selectedOnly, setSelectedOnly] = useState23(false);
|
|
9144
9198
|
const rootRef = useRef20(null);
|
|
9145
9199
|
const popupRef = useRef20(null);
|
|
9146
9200
|
const inputRef = useRef20(null);
|
|
@@ -9304,13 +9358,13 @@ var InputSelect = forwardRef7(function InputSelect2({
|
|
|
9304
9358
|
});
|
|
9305
9359
|
|
|
9306
9360
|
// src/components/QueryForm.tsx
|
|
9307
|
-
import { Children as Children4, isValidElement as isValidElement5, useLayoutEffect as useLayoutEffect7, useRef as useRef23, useState as
|
|
9361
|
+
import { Children as Children4, isValidElement as isValidElement5, useLayoutEffect as useLayoutEffect7, useRef as useRef23, useState as useState26 } from "react";
|
|
9308
9362
|
|
|
9309
9363
|
// src/components/QueryFormSettings.tsx
|
|
9310
|
-
import { useEffect as useEffect18, useRef as useRef22, useState as
|
|
9364
|
+
import { useEffect as useEffect18, useRef as useRef22, useState as useState25 } from "react";
|
|
9311
9365
|
|
|
9312
9366
|
// src/components/useQueryFieldSort.ts
|
|
9313
|
-
import { useEffect as useEffect17, useRef as useRef21, useState as
|
|
9367
|
+
import { useEffect as useEffect17, useRef as useRef21, useState as useState24 } from "react";
|
|
9314
9368
|
function getQuerySortPreview(keys, rects, from, dy, gap) {
|
|
9315
9369
|
const center = rects[from].top + rects[from].height / 2 + dy;
|
|
9316
9370
|
const rest = keys.map((_, index) => index).filter((index) => index !== from);
|
|
@@ -9333,7 +9387,7 @@ function useQueryFieldSort(keys, enabled, onCommit) {
|
|
|
9333
9387
|
const cancelRef = useRef21();
|
|
9334
9388
|
const commitRef = useRef21(onCommit);
|
|
9335
9389
|
commitRef.current = onCommit;
|
|
9336
|
-
const [preview, setPreview] =
|
|
9390
|
+
const [preview, setPreview] = useState24();
|
|
9337
9391
|
const signature = JSON.stringify(keys);
|
|
9338
9392
|
useEffect17(() => {
|
|
9339
9393
|
cancelRef.current?.();
|
|
@@ -9460,13 +9514,13 @@ function countQueryFieldRows(centers) {
|
|
|
9460
9514
|
// src/components/QueryFormSettings.tsx
|
|
9461
9515
|
import { Fragment as Fragment10, jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
9462
9516
|
function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed, disabled) {
|
|
9463
|
-
const [snapshot, setSnapshot] =
|
|
9464
|
-
const [draft, setDraft] =
|
|
9465
|
-
const [open, setOpen] =
|
|
9466
|
-
const [loading, setLoading] =
|
|
9467
|
-
const [saving, setSaving] =
|
|
9468
|
-
const [error, setError] =
|
|
9469
|
-
const [loadFailed, setLoadFailed] =
|
|
9517
|
+
const [snapshot, setSnapshot] = useState25();
|
|
9518
|
+
const [draft, setDraft] = useState25({ fields: [], defaultCollapsed: defaultCollapsed ?? false });
|
|
9519
|
+
const [open, setOpen] = useState25(false);
|
|
9520
|
+
const [loading, setLoading] = useState25(false);
|
|
9521
|
+
const [saving, setSaving] = useState25(false);
|
|
9522
|
+
const [error, setError] = useState25("");
|
|
9523
|
+
const [loadFailed, setLoadFailed] = useState25(false);
|
|
9470
9524
|
const token = useRef22(0);
|
|
9471
9525
|
const saveLock = useRef22(false);
|
|
9472
9526
|
const latest = useRef22({ config, fields, defaultCollapsed, applyCollapsed });
|
|
@@ -9655,18 +9709,18 @@ function QueryForm({
|
|
|
9655
9709
|
...formProps
|
|
9656
9710
|
}) {
|
|
9657
9711
|
const [form] = useForm(providedForm);
|
|
9658
|
-
const [internalCollapsed, setInternalCollapsed] =
|
|
9659
|
-
const [expandedRows, setExpandedRows] =
|
|
9660
|
-
const [needsCollapse, setNeedsCollapse] =
|
|
9712
|
+
const [internalCollapsed, setInternalCollapsed] = useState26(defaultCollapsed);
|
|
9713
|
+
const [expandedRows, setExpandedRows] = useState26(0);
|
|
9714
|
+
const [needsCollapse, setNeedsCollapse] = useState26(false);
|
|
9661
9715
|
const collapsed = collapsible && needsCollapse && (controlledCollapsed ?? internalCollapsed ?? expandedRows >= 3);
|
|
9662
|
-
const [searching, setSearching] =
|
|
9663
|
-
const [saving, setSaving] =
|
|
9664
|
-
const [removing, setRemoving] =
|
|
9665
|
-
const [saveOpen, setSaveOpen] =
|
|
9666
|
-
const [saveName, setSaveName] =
|
|
9667
|
-
const [saveError, setSaveError] =
|
|
9668
|
-
const [error, setError] =
|
|
9669
|
-
const [activeShortcut, setActiveShortcut] =
|
|
9716
|
+
const [searching, setSearching] = useState26(false);
|
|
9717
|
+
const [saving, setSaving] = useState26(false);
|
|
9718
|
+
const [removing, setRemoving] = useState26(false);
|
|
9719
|
+
const [saveOpen, setSaveOpen] = useState26(false);
|
|
9720
|
+
const [saveName, setSaveName] = useState26("");
|
|
9721
|
+
const [saveError, setSaveError] = useState26("");
|
|
9722
|
+
const [error, setError] = useState26("");
|
|
9723
|
+
const [activeShortcut, setActiveShortcut] = useState26("");
|
|
9670
9724
|
const source = useRef23({ source: "submit" });
|
|
9671
9725
|
const searchLock = useRef23(false);
|
|
9672
9726
|
const saveLock = useRef23(false);
|
|
@@ -9701,8 +9755,8 @@ function QueryForm({
|
|
|
9701
9755
|
const rowRef = useRef23(null);
|
|
9702
9756
|
const actionsRef = useRef23(null);
|
|
9703
9757
|
const toggleRef = useRef23(null);
|
|
9704
|
-
const [fittingCount, setFittingCount] =
|
|
9705
|
-
const [settingsRows, setSettingsRows] =
|
|
9758
|
+
const [fittingCount, setFittingCount] = useState26(limit);
|
|
9759
|
+
const [settingsRows, setSettingsRows] = useState26(0);
|
|
9706
9760
|
useLayoutEffect7(() => {
|
|
9707
9761
|
const row = rowRef.current;
|
|
9708
9762
|
const actions = actionsRef.current;
|
|
@@ -818,7 +818,8 @@ var extendedIconPaths = {
|
|
|
818
818
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "3", y: "14", width: "7", height: "7", rx: "2" }),
|
|
819
819
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "14", y: "14", width: "7", height: "7", rx: "2" })
|
|
820
820
|
] }),
|
|
821
|
-
|
|
821
|
+
/** 扩展与插件:圆角拼图轮廓,顶部及右侧凸出接口,左侧内凹接口。 */
|
|
822
|
+
puzzle: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M9 6V5a2 2 0 0 1 4 0v1h3a2 2 0 0 1 2 2v2h1a2 2 0 0 1 0 4h-1v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4h1a2 2 0 0 0 0-4H4V8a2 2 0 0 1 2-2h3Z" }) }),
|
|
822
823
|
partition: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
823
824
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 5v5M6 14v-2h12v2M6 18v3M12 18v3M18 18v3" }),
|
|
824
825
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "12", cy: "3", r: "2" }),
|
|
@@ -1107,7 +1108,8 @@ var outlineIconBounds = {
|
|
|
1107
1108
|
"plus": [4, 4, 16, 16],
|
|
1108
1109
|
"power": [4, 3, 16.000002, 16.744997],
|
|
1109
1110
|
"printer": [4, 3, 16, 18],
|
|
1110
|
-
|
|
1111
|
+
// 拼图轮廓横向从 4 到 21,纵向从 3 到 21,与图形归一化范围一致。
|
|
1112
|
+
"puzzle": [4, 3, 17, 18],
|
|
1111
1113
|
"qr-code": [3, 3, 18, 18],
|
|
1112
1114
|
"question": [3, 3, 18, 18],
|
|
1113
1115
|
"redo": [4, 7, 17, 12],
|
package/dist/rich-text-editor.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RichTextContent,
|
|
3
3
|
RichTextEditor
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-B333SUKG.js";
|
|
5
|
+
import "./chunk-D3CROVS2.js";
|
|
6
6
|
import "./chunk-SCEHVGKV.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-33FOEIXI.js";
|
|
8
8
|
import "./chunk-CZ2ITBRW.js";
|
|
9
9
|
import "./chunk-KY6A5IJH.js";
|
|
10
10
|
import "./chunk-NZMUW5XI.js";
|
|
@@ -735,7 +735,8 @@ var extendedIconPaths = {
|
|
|
735
735
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("rect", { x: "3", y: "14", width: "7", height: "7", rx: "2" }),
|
|
736
736
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("rect", { x: "14", y: "14", width: "7", height: "7", rx: "2" })
|
|
737
737
|
] }),
|
|
738
|
-
|
|
738
|
+
/** 扩展与插件:圆角拼图轮廓,顶部及右侧凸出接口,左侧内凹接口。 */
|
|
739
|
+
puzzle: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M9 6V5a2 2 0 0 1 4 0v1h3a2 2 0 0 1 2 2v2h1a2 2 0 0 1 0 4h-1v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4h1a2 2 0 0 0 0-4H4V8a2 2 0 0 1 2-2h3Z" }) }),
|
|
739
740
|
partition: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
740
741
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 5v5M6 14v-2h12v2M6 18v3M12 18v3M18 18v3" }),
|
|
741
742
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "12", cy: "3", r: "2" }),
|
|
@@ -1024,7 +1025,8 @@ var outlineIconBounds = {
|
|
|
1024
1025
|
"plus": [4, 4, 16, 16],
|
|
1025
1026
|
"power": [4, 3, 16.000002, 16.744997],
|
|
1026
1027
|
"printer": [4, 3, 16, 18],
|
|
1027
|
-
|
|
1028
|
+
// 拼图轮廓横向从 4 到 21,纵向从 3 到 21,与图形归一化范围一致。
|
|
1029
|
+
"puzzle": [4, 3, 17, 18],
|
|
1028
1030
|
"qr-code": [3, 3, 18, 18],
|
|
1029
1031
|
"question": [3, 3, 18, 18],
|
|
1030
1032
|
"redo": [4, 7, 17, 12],
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SelectDateRange
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-PUNKAJBB.js";
|
|
4
|
+
import "./chunk-WA3LO3LY.js";
|
|
5
|
+
import "./chunk-D3CROVS2.js";
|
|
6
6
|
import "./chunk-SCEHVGKV.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-33FOEIXI.js";
|
|
8
8
|
import "./chunk-CZ2ITBRW.js";
|
|
9
9
|
import "./chunk-KY6A5IJH.js";
|
|
10
10
|
import "./chunk-NZMUW5XI.js";
|