@dcg-overseas/number-line 0.1.21 → 0.1.23
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 +16 -6
- package/dist/index.js +16 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -552,8 +552,8 @@ const ARC_COLORS = [
|
|
|
552
552
|
"#16a34a"
|
|
553
553
|
];
|
|
554
554
|
const ARC_RY_RATIO = 0.9;
|
|
555
|
-
const ARC_ANIMATION_STAGGER_MS =
|
|
556
|
-
const ARC_ANIMATION_DRAW_MS =
|
|
555
|
+
const ARC_ANIMATION_STAGGER_MS = 700;
|
|
556
|
+
const ARC_ANIMATION_DRAW_MS = 800;
|
|
557
557
|
function gcd(a, b) {
|
|
558
558
|
let x = Math.max(1, Math.abs(Math.round(a)));
|
|
559
559
|
let y = Math.max(1, Math.abs(Math.round(b)));
|
|
@@ -624,10 +624,17 @@ const AxisLayer = React.memo(function AxisLayer2({
|
|
|
624
624
|
const renderAsGroup = groupActive;
|
|
625
625
|
const renderAsMajor = !renderAsGroup && majorActive;
|
|
626
626
|
const showLabel = (renderAsGroup || renderAsMajor) && offset % labelStep === 0;
|
|
627
|
-
const currentShowLabelStep = typeof getShowLabelStep !== "function" ? false : getShowLabelStep == null ? void 0 : getShowLabelStep({
|
|
628
|
-
|
|
627
|
+
const currentShowLabelStep = typeof getShowLabelStep !== "function" ? false : getShowLabelStep == null ? void 0 : getShowLabelStep({
|
|
628
|
+
viewMin,
|
|
629
|
+
viewMax,
|
|
630
|
+
offset,
|
|
631
|
+
labelStep,
|
|
632
|
+
length,
|
|
633
|
+
v
|
|
634
|
+
});
|
|
635
|
+
const tickH = renderAsGroup ? 7 : renderAsMajor ? 10 : 6;
|
|
629
636
|
const strokeW = renderAsGroup ? 4 : renderAsMajor ? 2 : 1;
|
|
630
|
-
const color = renderAsGroup || renderAsMajor ? "#374151" : "#
|
|
637
|
+
const color = renderAsGroup || renderAsMajor ? "#374151" : "#4b5563";
|
|
631
638
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
632
639
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
633
640
|
"line",
|
|
@@ -650,7 +657,10 @@ const AxisLayer = React.memo(function AxisLayer2({
|
|
|
650
657
|
fill: "#472E17",
|
|
651
658
|
pointerEvents: "none",
|
|
652
659
|
"data-type": "2",
|
|
653
|
-
style: {
|
|
660
|
+
style: {
|
|
661
|
+
userSelect: "none",
|
|
662
|
+
WebkitUserSelect: "none"
|
|
663
|
+
},
|
|
654
664
|
children: v
|
|
655
665
|
}
|
|
656
666
|
)
|
package/dist/index.js
CHANGED
|
@@ -550,8 +550,8 @@ const ARC_COLORS = [
|
|
|
550
550
|
"#16a34a"
|
|
551
551
|
];
|
|
552
552
|
const ARC_RY_RATIO = 0.9;
|
|
553
|
-
const ARC_ANIMATION_STAGGER_MS =
|
|
554
|
-
const ARC_ANIMATION_DRAW_MS =
|
|
553
|
+
const ARC_ANIMATION_STAGGER_MS = 700;
|
|
554
|
+
const ARC_ANIMATION_DRAW_MS = 800;
|
|
555
555
|
function gcd(a, b) {
|
|
556
556
|
let x = Math.max(1, Math.abs(Math.round(a)));
|
|
557
557
|
let y = Math.max(1, Math.abs(Math.round(b)));
|
|
@@ -622,10 +622,17 @@ const AxisLayer = React.memo(function AxisLayer2({
|
|
|
622
622
|
const renderAsGroup = groupActive;
|
|
623
623
|
const renderAsMajor = !renderAsGroup && majorActive;
|
|
624
624
|
const showLabel = (renderAsGroup || renderAsMajor) && offset % labelStep === 0;
|
|
625
|
-
const currentShowLabelStep = typeof getShowLabelStep !== "function" ? false : getShowLabelStep == null ? void 0 : getShowLabelStep({
|
|
626
|
-
|
|
625
|
+
const currentShowLabelStep = typeof getShowLabelStep !== "function" ? false : getShowLabelStep == null ? void 0 : getShowLabelStep({
|
|
626
|
+
viewMin,
|
|
627
|
+
viewMax,
|
|
628
|
+
offset,
|
|
629
|
+
labelStep,
|
|
630
|
+
length,
|
|
631
|
+
v
|
|
632
|
+
});
|
|
633
|
+
const tickH = renderAsGroup ? 7 : renderAsMajor ? 10 : 6;
|
|
627
634
|
const strokeW = renderAsGroup ? 4 : renderAsMajor ? 2 : 1;
|
|
628
|
-
const color = renderAsGroup || renderAsMajor ? "#374151" : "#
|
|
635
|
+
const color = renderAsGroup || renderAsMajor ? "#374151" : "#4b5563";
|
|
629
636
|
return /* @__PURE__ */ jsxs("g", { children: [
|
|
630
637
|
/* @__PURE__ */ jsx(
|
|
631
638
|
"line",
|
|
@@ -648,7 +655,10 @@ const AxisLayer = React.memo(function AxisLayer2({
|
|
|
648
655
|
fill: "#472E17",
|
|
649
656
|
pointerEvents: "none",
|
|
650
657
|
"data-type": "2",
|
|
651
|
-
style: {
|
|
658
|
+
style: {
|
|
659
|
+
userSelect: "none",
|
|
660
|
+
WebkitUserSelect: "none"
|
|
661
|
+
},
|
|
652
662
|
children: v
|
|
653
663
|
}
|
|
654
664
|
)
|