ssovee-os-web-ui 0.1.32 → 0.1.33
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 +37 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +16 -4
- package/dist/index.js +37 -10
- package/dist/index.js.map +1 -1
- package/dist/sdk.cjs +20 -5
- package/dist/sdk.cjs.map +1 -1
- package/dist/sdk.d.cts +5 -1
- package/dist/sdk.d.ts +5 -1
- package/dist/sdk.js +20 -5
- package/dist/sdk.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1655,8 +1655,8 @@ var SearchInput = React22__namespace.default.forwardRef(
|
|
|
1655
1655
|
outline: "bg-transparent border border-surface-1 focus:border-brand-color focus:ring-1 focus:ring-brand-color/50"
|
|
1656
1656
|
};
|
|
1657
1657
|
const sizeClasses = {
|
|
1658
|
-
sm: "h-8 px-2 pl-
|
|
1659
|
-
md: "h-10 px-3 pl-
|
|
1658
|
+
sm: "h-8 px-2 pl-9 text-sm leading-tight",
|
|
1659
|
+
md: "h-10 px-3 pl-11 text-base leading-tight",
|
|
1660
1660
|
lg: "h-12 px-4 pl-12 text-lg leading-tight"
|
|
1661
1661
|
};
|
|
1662
1662
|
const iconSizeClasses = {
|
|
@@ -1664,8 +1664,13 @@ var SearchInput = React22__namespace.default.forwardRef(
|
|
|
1664
1664
|
md: "w-5 h-5",
|
|
1665
1665
|
lg: "w-6 h-6"
|
|
1666
1666
|
};
|
|
1667
|
+
const iconPixelSizes = {
|
|
1668
|
+
sm: 16,
|
|
1669
|
+
md: 18,
|
|
1670
|
+
lg: 20
|
|
1671
|
+
};
|
|
1667
1672
|
const iconPositionClasses = {
|
|
1668
|
-
sm: "left-2",
|
|
1673
|
+
sm: "left-2.5",
|
|
1669
1674
|
md: "left-3",
|
|
1670
1675
|
lg: "left-3.5"
|
|
1671
1676
|
};
|
|
@@ -1674,10 +1679,17 @@ var SearchInput = React22__namespace.default.forwardRef(
|
|
|
1674
1679
|
"div",
|
|
1675
1680
|
{
|
|
1676
1681
|
className: cn(
|
|
1677
|
-
"pointer-events-none absolute top-1/2 -translate-y-1/2 text-neutral-400",
|
|
1682
|
+
"pointer-events-none absolute top-1/2 z-10 -translate-y-1/2 text-neutral-400",
|
|
1678
1683
|
iconPositionClasses[size]
|
|
1679
1684
|
),
|
|
1680
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1685
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1686
|
+
react.MagnifyingGlassIcon,
|
|
1687
|
+
{
|
|
1688
|
+
size: iconPixelSizes[size],
|
|
1689
|
+
className: cn("block shrink-0", iconSizeClasses[size]),
|
|
1690
|
+
weight: "regular"
|
|
1691
|
+
}
|
|
1692
|
+
)
|
|
1681
1693
|
}
|
|
1682
1694
|
),
|
|
1683
1695
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3230,16 +3242,31 @@ var soundMap = {
|
|
|
3230
3242
|
success: success_tone_default,
|
|
3231
3243
|
swipe: swipe_tone_default
|
|
3232
3244
|
};
|
|
3245
|
+
var audioCache = /* @__PURE__ */ new Map();
|
|
3246
|
+
var clampVolume = (value) => Math.min(1, Math.max(0, value));
|
|
3233
3247
|
var useSound = () => {
|
|
3234
|
-
const playSound = React22.useCallback((type) => {
|
|
3248
|
+
const playSound = React22.useCallback(async (type, options) => {
|
|
3235
3249
|
if (typeof window === "undefined" || typeof window.Audio === "undefined") {
|
|
3236
|
-
return;
|
|
3250
|
+
return false;
|
|
3237
3251
|
}
|
|
3238
3252
|
const soundSrc = soundMap[type];
|
|
3239
|
-
|
|
3240
|
-
audio
|
|
3253
|
+
let audio = audioCache.get(type);
|
|
3254
|
+
if (!audio) {
|
|
3255
|
+
audio = new window.Audio(soundSrc);
|
|
3256
|
+
audio.preload = "auto";
|
|
3257
|
+
audioCache.set(type, audio);
|
|
3258
|
+
}
|
|
3259
|
+
audio.volume = clampVolume(options?.volume ?? 1);
|
|
3260
|
+
if (options?.restart !== false) {
|
|
3261
|
+
audio.currentTime = 0;
|
|
3262
|
+
}
|
|
3263
|
+
try {
|
|
3264
|
+
await audio.play();
|
|
3265
|
+
return true;
|
|
3266
|
+
} catch (err) {
|
|
3241
3267
|
console.error("Sound playback failed:", err);
|
|
3242
|
-
|
|
3268
|
+
return false;
|
|
3269
|
+
}
|
|
3243
3270
|
}, []);
|
|
3244
3271
|
return { playSound };
|
|
3245
3272
|
};
|