@pactor-app/ui 1.26.0 → 1.28.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/{chunk-HSQJWJDS.js → chunk-NQJLAELF.js} +10 -1
- package/dist/{chunk-VRAVO5LE.js → chunk-P3LRWCYF.js} +1 -1
- package/dist/components/index.cjs +10 -1
- package/dist/components/index.js +1 -1
- package/dist/index.cjs +11 -2
- package/dist/index.js +2 -2
- package/dist/interaction/index.cjs +1 -1
- package/dist/interaction/index.js +1 -1
- package/package.json +6 -6
|
@@ -4334,6 +4334,14 @@ function applyPrecision(value, precision) {
|
|
|
4334
4334
|
const factor = 10 ** precision;
|
|
4335
4335
|
return Math.round(value * factor) / factor;
|
|
4336
4336
|
}
|
|
4337
|
+
function decimalPlaces(value) {
|
|
4338
|
+
if (!Number.isFinite(value)) return 0;
|
|
4339
|
+
const str = String(value);
|
|
4340
|
+
const eIndex = str.indexOf("e-");
|
|
4341
|
+
if (eIndex !== -1) return Number(str.slice(eIndex + 2));
|
|
4342
|
+
const dot = str.indexOf(".");
|
|
4343
|
+
return dot === -1 ? 0 : str.length - dot - 1;
|
|
4344
|
+
}
|
|
4337
4345
|
function toDisplayText(value) {
|
|
4338
4346
|
return typeof value === "number" && Number.isFinite(value) ? String(value) : "";
|
|
4339
4347
|
}
|
|
@@ -4382,7 +4390,8 @@ function NumberInput({
|
|
|
4382
4390
|
};
|
|
4383
4391
|
const stepBy = (direction) => {
|
|
4384
4392
|
const base = externalValue ?? 0;
|
|
4385
|
-
const
|
|
4393
|
+
const effectivePrecision = typeof precision === "number" ? precision : Math.max(decimalPlaces(step), decimalPlaces(base));
|
|
4394
|
+
const next = applyPrecision(clamp(base + direction * step, min, max), effectivePrecision);
|
|
4386
4395
|
setText(toDisplayText(next));
|
|
4387
4396
|
commit(next);
|
|
4388
4397
|
};
|
|
@@ -425,7 +425,7 @@ function ShadcnDrawerView({
|
|
|
425
425
|
children
|
|
426
426
|
}) {
|
|
427
427
|
const { t } = useI18n2();
|
|
428
|
-
const panelStyle = entry.width === void 0 ? void 0 : { width: toCssWidth(entry.width) };
|
|
428
|
+
const panelStyle = entry.width === void 0 ? void 0 : { width: toCssWidth(entry.width), maxWidth: toCssWidth(entry.width) };
|
|
429
429
|
return /* @__PURE__ */ jsx2(
|
|
430
430
|
Drawer,
|
|
431
431
|
{
|
|
@@ -7781,6 +7781,14 @@ function applyPrecision(value, precision) {
|
|
|
7781
7781
|
const factor = 10 ** precision;
|
|
7782
7782
|
return Math.round(value * factor) / factor;
|
|
7783
7783
|
}
|
|
7784
|
+
function decimalPlaces(value) {
|
|
7785
|
+
if (!Number.isFinite(value)) return 0;
|
|
7786
|
+
const str = String(value);
|
|
7787
|
+
const eIndex = str.indexOf("e-");
|
|
7788
|
+
if (eIndex !== -1) return Number(str.slice(eIndex + 2));
|
|
7789
|
+
const dot = str.indexOf(".");
|
|
7790
|
+
return dot === -1 ? 0 : str.length - dot - 1;
|
|
7791
|
+
}
|
|
7784
7792
|
function toDisplayText(value) {
|
|
7785
7793
|
return typeof value === "number" && Number.isFinite(value) ? String(value) : "";
|
|
7786
7794
|
}
|
|
@@ -7829,7 +7837,8 @@ function NumberInput({
|
|
|
7829
7837
|
};
|
|
7830
7838
|
const stepBy = (direction) => {
|
|
7831
7839
|
const base = externalValue ?? 0;
|
|
7832
|
-
const
|
|
7840
|
+
const effectivePrecision = typeof precision === "number" ? precision : Math.max(decimalPlaces(step), decimalPlaces(base));
|
|
7841
|
+
const next = applyPrecision(clamp(base + direction * step, min, max), effectivePrecision);
|
|
7833
7842
|
setText(toDisplayText(next));
|
|
7834
7843
|
commit(next);
|
|
7835
7844
|
};
|
package/dist/components/index.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -7820,6 +7820,14 @@ function applyPrecision(value, precision) {
|
|
|
7820
7820
|
const factor = 10 ** precision;
|
|
7821
7821
|
return Math.round(value * factor) / factor;
|
|
7822
7822
|
}
|
|
7823
|
+
function decimalPlaces(value) {
|
|
7824
|
+
if (!Number.isFinite(value)) return 0;
|
|
7825
|
+
const str = String(value);
|
|
7826
|
+
const eIndex = str.indexOf("e-");
|
|
7827
|
+
if (eIndex !== -1) return Number(str.slice(eIndex + 2));
|
|
7828
|
+
const dot = str.indexOf(".");
|
|
7829
|
+
return dot === -1 ? 0 : str.length - dot - 1;
|
|
7830
|
+
}
|
|
7823
7831
|
function toDisplayText(value) {
|
|
7824
7832
|
return typeof value === "number" && Number.isFinite(value) ? String(value) : "";
|
|
7825
7833
|
}
|
|
@@ -7868,7 +7876,8 @@ function NumberInput({
|
|
|
7868
7876
|
};
|
|
7869
7877
|
const stepBy = (direction) => {
|
|
7870
7878
|
const base = externalValue ?? 0;
|
|
7871
|
-
const
|
|
7879
|
+
const effectivePrecision = typeof precision === "number" ? precision : Math.max(decimalPlaces(step), decimalPlaces(base));
|
|
7880
|
+
const next = applyPrecision(clamp(base + direction * step, min, max), effectivePrecision);
|
|
7872
7881
|
setText(toDisplayText(next));
|
|
7873
7882
|
commit(next);
|
|
7874
7883
|
};
|
|
@@ -16953,7 +16962,7 @@ function ShadcnDrawerView({
|
|
|
16953
16962
|
children
|
|
16954
16963
|
}) {
|
|
16955
16964
|
const { t } = (0, import_runtime32.useI18n)();
|
|
16956
|
-
const panelStyle = entry.width === void 0 ? void 0 : { width: toCssWidth(entry.width) };
|
|
16965
|
+
const panelStyle = entry.width === void 0 ? void 0 : { width: toCssWidth(entry.width), maxWidth: toCssWidth(entry.width) };
|
|
16957
16966
|
return /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
|
|
16958
16967
|
Drawer,
|
|
16959
16968
|
{
|
package/dist/index.js
CHANGED
|
@@ -154,7 +154,7 @@ import {
|
|
|
154
154
|
inferKind,
|
|
155
155
|
registerBuiltinComponents,
|
|
156
156
|
useFormContext
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-NQJLAELF.js";
|
|
158
158
|
import {
|
|
159
159
|
InteractionProvider,
|
|
160
160
|
OVERLAY_CANCEL_PAYLOAD,
|
|
@@ -162,7 +162,7 @@ import {
|
|
|
162
162
|
OverlayManager,
|
|
163
163
|
createUiBridge,
|
|
164
164
|
registerInteractionActions
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-P3LRWCYF.js";
|
|
166
166
|
import {
|
|
167
167
|
AdminLayout,
|
|
168
168
|
BlankLayout,
|
|
@@ -726,7 +726,7 @@ function ShadcnDrawerView({
|
|
|
726
726
|
children
|
|
727
727
|
}) {
|
|
728
728
|
const { t } = (0, import_runtime3.useI18n)();
|
|
729
|
-
const panelStyle = entry.width === void 0 ? void 0 : { width: toCssWidth(entry.width) };
|
|
729
|
+
const panelStyle = entry.width === void 0 ? void 0 : { width: toCssWidth(entry.width), maxWidth: toCssWidth(entry.width) };
|
|
730
730
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
731
731
|
Drawer,
|
|
732
732
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pactor-app/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.0",
|
|
4
4
|
"description": "Pactor UI kit (shadcn): the single built-in UI kit — vendored shadcn/ui components (Base UI primitives + cva + tailwind-merge + lucide-react), props contracts, interaction core (OverlayManager / UiBridge) and layouts, with build-time Tailwind v4 prebuilt styles.css (zero consumer-side Tailwind config)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pactor",
|
|
@@ -107,11 +107,11 @@
|
|
|
107
107
|
"react-resizable-panels": "^4.12.3",
|
|
108
108
|
"tailwind-merge": "^3.6.0",
|
|
109
109
|
"vaul": "^1.1.2",
|
|
110
|
-
"@pactor-app/
|
|
111
|
-
"@pactor-app/
|
|
112
|
-
"@pactor-app/
|
|
113
|
-
"@pactor-app/
|
|
114
|
-
"@pactor-app/
|
|
110
|
+
"@pactor-app/markdown": "1.28.0",
|
|
111
|
+
"@pactor-app/core": "1.28.0",
|
|
112
|
+
"@pactor-app/router": "1.28.0",
|
|
113
|
+
"@pactor-app/runtime": "1.28.0",
|
|
114
|
+
"@pactor-app/permission": "1.28.0"
|
|
115
115
|
},
|
|
116
116
|
"peerDependencies": {
|
|
117
117
|
"react": ">=18",
|