barua-ui 0.4.2 → 0.6.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/index.cjs CHANGED
@@ -314,9 +314,14 @@ __export(index_exports, {
314
314
  block: () => block,
315
315
  buttonClasses: () => buttonClasses,
316
316
  cn: () => cn,
317
+ haptic: () => haptic,
317
318
  iconNames: () => iconNames,
318
319
  useBaruaTheme: () => useBaruaTheme,
319
- useToast: () => useToast
320
+ usePersistedState: () => usePersistedState,
321
+ useScrollGeometry: () => useScrollGeometry,
322
+ useSnapPosition: () => useSnapPosition,
323
+ useToast: () => useToast,
324
+ useVisible: () => useVisible
320
325
  });
321
326
  module.exports = __toCommonJS(index_exports);
322
327
 
@@ -1264,8 +1269,10 @@ function Breadcrumbs({
1264
1269
  var import_react8 = require("react");
1265
1270
  var import_jsx_runtime9 = require("react/jsx-runtime");
1266
1271
  var iconNames = [
1272
+ "archive",
1273
+ "arrow-left",
1267
1274
  "arrow-up-right",
1268
- "backward",
1275
+ "badge-check",
1269
1276
  "bell",
1270
1277
  "bolt",
1271
1278
  "bookmark",
@@ -1278,9 +1285,17 @@ var iconNames = [
1278
1285
  "chevron-up",
1279
1286
  "clock",
1280
1287
  "close",
1288
+ "code",
1289
+ "copy",
1290
+ "display",
1281
1291
  "doc",
1282
1292
  "download",
1283
1293
  "drop",
1294
+ "ellipsis",
1295
+ "ellipsis-vertical",
1296
+ "envelope-open",
1297
+ "eye",
1298
+ "eye-off",
1284
1299
  "film",
1285
1300
  "filter",
1286
1301
  "flame",
@@ -1288,33 +1303,45 @@ var iconNames = [
1288
1303
  "forward",
1289
1304
  "garage",
1290
1305
  "gear",
1306
+ "gift",
1307
+ "globe",
1291
1308
  "grid",
1292
1309
  "heart",
1293
1310
  "house",
1311
+ "image-off",
1294
1312
  "info",
1313
+ "key",
1295
1314
  "lightbulb",
1296
1315
  "link",
1297
1316
  "lock",
1298
1317
  "mail",
1318
+ "menu",
1299
1319
  "message",
1300
1320
  "mic",
1301
1321
  "moon-stars",
1302
1322
  "music-note",
1303
1323
  "newspaper",
1324
+ "paperclip",
1304
1325
  "pause",
1305
1326
  "pencil",
1306
1327
  "people",
1307
1328
  "person",
1329
+ "person-plus",
1308
1330
  "photo",
1309
1331
  "pin",
1310
1332
  "play",
1311
1333
  "plus",
1334
+ "power",
1312
1335
  "refresh",
1313
1336
  "repeat",
1337
+ "reply",
1338
+ "reply-all",
1314
1339
  "search",
1315
1340
  "send",
1316
1341
  "share",
1317
1342
  "shield",
1343
+ "skip-back",
1344
+ "skip-forward",
1318
1345
  "sliders",
1319
1346
  "sparkles",
1320
1347
  "speaker",
@@ -1322,15 +1349,22 @@ var iconNames = [
1322
1349
  "sun",
1323
1350
  "trash",
1324
1351
  "tv",
1352
+ "upload",
1325
1353
  "warning",
1326
1354
  "waveform",
1327
1355
  "wifi"
1328
1356
  ];
1329
1357
  var GLYPHS = {
1358
+ "archive": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1359
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M3 4.5h14V7H3V4.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1360
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M4.2 7v7.5a1 1 0 0 0 1 1h9.6a1 1 0 0 0 1-1V7", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1361
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M8 10h4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1362
+ ] }),
1363
+ "arrow-left": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M16.5 10h-13M8 4.5 3 10l5 5.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1330
1364
  "arrow-up-right": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M6 14 14 6M7.5 6H14v6.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1331
- "backward": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1332
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M5.5 4.5v11", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
1333
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M15 5.6v8.8a.6.6 0 0 1-.93.5L7.6 10.5a.6.6 0 0 1 0-1l6.47-4.4a.6.6 0 0 1 .93.5Z", fill: "currentColor" })
1365
+ "badge-check": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1366
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m10 2.6 2 1.5 2.5-.2.6 2.4 2 1.5-1 2.3 1 2.3-2 1.5-.6 2.4-2.5-.2-2 1.5-2-1.5-2.5.2-.6-2.4-2-1.5 1-2.3-1-2.3 2-1.5.6-2.4 2.5.2 2-1.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1367
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m7.6 10.1 1.7 1.7 3.1-3.4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1334
1368
  ] }),
1335
1369
  "bell": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1336
1370
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 3.5A4.5 4.5 0 0 1 14.5 8c0 3 1 4 1.5 4.5H4c.5-.5 1.5-1.5 1.5-4.5A4.5 4.5 0 0 1 10 3.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
@@ -1356,12 +1390,40 @@ var GLYPHS = {
1356
1390
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 6.5V10l2.5 2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1357
1391
  ] }),
1358
1392
  "close": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m5 5 10 10M15 5 5 15", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }),
1393
+ "code": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m7 7-3.5 3L7 13M13 7l3.5 3L13 13M11.4 5.2 8.6 14.8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1394
+ "copy": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1395
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { x: "7", y: "7", width: "9", height: "9", rx: "1.8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1396
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M4.5 12.5h-.5A1.5 1.5 0 0 1 2.5 11V4A1.5 1.5 0 0 1 4 2.5h7A1.5 1.5 0 0 1 12.5 4v.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1397
+ ] }),
1398
+ "display": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1399
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { x: "2.5", y: "4", width: "15", height: "9.5", rx: "1.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1400
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M7 16.5h6M10 13.5v3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1401
+ ] }),
1359
1402
  "doc": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1360
1403
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M5.5 3.5h6L15 7v9.5H5.5V3.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1361
1404
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M11.5 3.5V7H15M8 10.5h4M8 13h4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1362
1405
  ] }),
1363
1406
  "download": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 3.5v9M6.5 9.5l3.5 3 3.5-3M4 16.5h12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1364
1407
  "drop": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 2.8C7.7 6 5.5 8.6 5.5 11.4a4.5 4.5 0 0 0 9 0c0-2.8-2.2-5.4-4.5-8.6Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1408
+ "ellipsis": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1409
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "4.6", cy: "10", r: "1.3", fill: "currentColor" }),
1410
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "10", cy: "10", r: "1.3", fill: "currentColor" }),
1411
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "15.4", cy: "10", r: "1.3", fill: "currentColor" })
1412
+ ] }),
1413
+ "ellipsis-vertical": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1414
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "10", cy: "4.6", r: "1.3", fill: "currentColor" }),
1415
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "10", cy: "10", r: "1.3", fill: "currentColor" }),
1416
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "10", cy: "15.4", r: "1.3", fill: "currentColor" })
1417
+ ] }),
1418
+ "envelope-open": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1419
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M3.5 8.4 10 3.5l6.5 4.9V15a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 15V8.4Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1420
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m3.5 8.4 6.5 4.7 6.5-4.7", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1421
+ ] }),
1422
+ "eye": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1423
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M2.5 10s2.8-5 7.5-5 7.5 5 7.5 5-2.8 5-7.5 5-7.5-5-7.5-5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1424
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "10", cy: "10", r: "2.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1425
+ ] }),
1426
+ "eye-off": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M3 3l14 14M8.4 8.5A2.5 2.5 0 0 0 11.5 11.6M6.3 6.4C4 7.8 2.5 10 2.5 10s2.8 5 7.5 5c1.3 0 2.5-.4 3.5-.9M9 5.1c.3 0 .7-.1 1-.1 4.7 0 7.5 5 7.5 5s-.6 1.1-1.8 2.3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1365
1427
  "film": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1366
1428
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M3.5 8.5h13V15a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 15V8.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1367
1429
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m3.5 8.5 1-3.4 11.6 1.7-.6 1.7M7.6 5.6 6.6 8.2M11.2 6.1l-1 2.4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
@@ -1370,14 +1432,23 @@ var GLYPHS = {
1370
1432
  "flame": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 3c-2.5 3-4.5 5.2-4.5 7.4a4.5 4.5 0 0 0 9 0C14.5 8.2 12.5 6 10 3Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1371
1433
  "folder": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M3.5 5.5A1.5 1.5 0 0 1 5 4h3l1.5 2H15a1.5 1.5 0 0 1 1.5 1.5V14a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 14V5.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1372
1434
  "forward": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1373
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M14.5 4.5v11", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
1374
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M5 5.6v8.8a.6.6 0 0 0 .93.5l6.47-4.4a.6.6 0 0 0 0-1L5.93 5.1a.6.6 0 0 0-.93.5Z", fill: "currentColor" })
1435
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M12 5.5 16.5 10 12 14.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1436
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M16.5 10h-6a6 6 0 0 0-6 6v.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1375
1437
  ] }),
1376
1438
  "garage": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M3 9.5 10 4l7 5.5M5 8.5V16h10V8.5M7 11h6M7 13.5h6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1377
1439
  "gear": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1378
1440
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "10", cy: "10", r: "2.5", stroke: "currentColor", strokeWidth: "1.5" }),
1379
1441
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 2.5v3M10 14.5v3M2.5 10h3M14.5 10h3M4.7 4.7l2.1 2.1M13.2 13.2l2.1 2.1M15.3 4.7l-2.1 2.1M6.8 13.2l-2.1 2.1", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
1380
1442
  ] }),
1443
+ "gift": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1444
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M3.5 8.5h13V16a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1V8.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1445
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M2.5 6h15v2.5h-15V6ZM10 6v11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1446
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 6S8.8 3 7 3a1.8 1.8 0 0 0 0 3h3Zm0 0s1.2-3 3-3a1.8 1.8 0 0 1 0 3h-3Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1447
+ ] }),
1448
+ "globe": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1449
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "10", cy: "10", r: "7.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1450
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M2.5 10h15M10 2.5c2.2 2.3 3.3 4.8 3.3 7.5S12.2 15.2 10 17.5c-2.2-2.3-3.3-4.8-3.3-7.5S7.8 4.8 10 2.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1451
+ ] }),
1381
1452
  "grid": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1382
1453
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { x: "3.5", y: "3.5", width: "5.5", height: "5.5", rx: "1.5", stroke: "currentColor", strokeWidth: "1.5" }),
1383
1454
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { x: "11", y: "3.5", width: "5.5", height: "5.5", rx: "1.5", stroke: "currentColor", strokeWidth: "1.5" }),
@@ -1386,10 +1457,19 @@ var GLYPHS = {
1386
1457
  ] }),
1387
1458
  "heart": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 16.5S3.5 12.5 3.5 8.2A3.6 3.6 0 0 1 10 6a3.6 3.6 0 0 1 6.5 2.2c0 4.3-6.5 8.3-6.5 8.3Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1388
1459
  "house": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M3 9.5 10 4l7 5.5M5 8.5V16h10V8.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1460
+ "image-off": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1461
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M3 3l14 14", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1462
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M16.5 12.8V5.5a1 1 0 0 0-1-1H8.2m-3.7 0a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h9.3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1463
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m4 13.5 3.2-3a1.4 1.4 0 0 1 1.9 0l1.4 1.3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1464
+ ] }),
1389
1465
  "info": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1390
1466
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "10", cy: "10", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
1391
1467
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 9v4M10 6.4h.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1392
1468
  ] }),
1469
+ "key": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1470
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "7", cy: "7.2", r: "3.2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1471
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m9.4 9.6 6.1 6.1M13.4 13.6l1.6-1.6M15.5 15.7l1.4-1.4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1472
+ ] }),
1393
1473
  "lightbulb": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 3a5 5 0 0 0-2.5 9.3V14a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1.7A5 5 0 0 0 10 3ZM8.5 17h3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1394
1474
  "link": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M8.5 11.5a3 3 0 0 0 4.2 0l2.5-2.5a3 3 0 1 0-4.2-4.2l-1 1M11.5 8.5a3 3 0 0 0-4.2 0L4.8 11a3 3 0 1 0 4.2 4.2l1-1", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }),
1395
1475
  "lock": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
@@ -1400,6 +1480,7 @@ var GLYPHS = {
1400
1480
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { x: "3", y: "4.5", width: "14", height: "11", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
1401
1481
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m4.5 7 5.5 4 5.5-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1402
1482
  ] }),
1483
+ "menu": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M3.5 6h13M3.5 10h13M3.5 14h13", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1403
1484
  "message": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M5.5 4h9a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H8.5l-3 3v-3a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1404
1485
  "mic": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1405
1486
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { x: "7.5", y: "3.5", width: "5", height: "9", rx: "2.5", stroke: "currentColor", strokeWidth: "1.5" }),
@@ -1418,6 +1499,7 @@ var GLYPHS = {
1418
1499
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { x: "3", y: "4", width: "14", height: "12", rx: "1.8", stroke: "currentColor", strokeWidth: "1.5" }),
1419
1500
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M6 7.5h4.5v3.5H6zM13 7.5h1M13 11h1M6 13.5h8", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" })
1420
1501
  ] }),
1502
+ "paperclip": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m13.5 7.5-5.3 5.3a1.8 1.8 0 0 1-2.5-2.5l6-6a3 3 0 0 1 4.2 4.2l-6.3 6.3a4.2 4.2 0 0 1-6-6L9 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1421
1503
  "pause": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M6 4.5h2.5v11H6zM11.5 4.5H14v11h-2.5z" }) }),
1422
1504
  "pencil": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1423
1505
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m4 16 .8-3.2 8.8-8.8a1.4 1.4 0 0 1 2 0l.4.4a1.4 1.4 0 0 1 0 2l-8.8 8.8L4 16Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
@@ -1432,6 +1514,10 @@ var GLYPHS = {
1432
1514
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "10", cy: "6.5", r: "3", stroke: "currentColor", strokeWidth: "1.5" }),
1433
1515
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M4 16.5a6 6 0 0 1 12 0", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1434
1516
  ] }),
1517
+ "person-plus": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1518
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "8", cy: "7", r: "3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1519
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M2.5 16.5c.6-3 3-4.5 5.5-4.5s4.9 1.5 5.5 4.5M15 7.5v5M12.5 10h5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1520
+ ] }),
1435
1521
  "photo": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1436
1522
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { x: "3.5", y: "4.5", width: "13", height: "11", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
1437
1523
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "7.5", cy: "8", r: "1.2", fill: "currentColor" }),
@@ -1443,8 +1529,18 @@ var GLYPHS = {
1443
1529
  ] }),
1444
1530
  "play": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M7 4.9v10.2a.6.6 0 0 0 .92.5l8-5.1a.6.6 0 0 0 0-1l-8-5.1a.6.6 0 0 0-.92.5Z" }) }),
1445
1531
  "plus": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 4v12M4 10h12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }),
1532
+ "power": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 3v6.5M6 6.2a5.5 5.5 0 1 0 8 0", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1446
1533
  "refresh": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M15.8 10A5.8 5.8 0 1 1 13 5.1M15.8 3.5v3.2h-3.2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1447
1534
  "repeat": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M5.5 8V7A2.5 2.5 0 0 1 8 4.5h6.5M12.5 2.5l2 2-2 2M14.5 12v1a2.5 2.5 0 0 1-2.5 2.5H5.5M7.5 17.5l-2-2 2-2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1535
+ "reply": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1536
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M8 5.5 3.5 10 8 14.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1537
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M3.5 10h6a6 6 0 0 1 6 6v.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1538
+ ] }),
1539
+ "reply-all": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1540
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M7 5.5 2.5 10 7 14.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1541
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M11.5 5.5 7 10l4.5 4.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1542
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M7 10h5.5a5 5 0 0 1 5 5v.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1543
+ ] }),
1448
1544
  "search": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1449
1545
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "9", cy: "9", r: "5.5", stroke: "currentColor", strokeWidth: "1.5" }),
1450
1546
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m13.5 13.5 3 3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
@@ -1458,6 +1554,14 @@ var GLYPHS = {
1458
1554
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 3l6 2v5c0 3.5-2.5 5.8-6 7-3.5-1.2-6-3.5-6-7V5l6-2Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1459
1555
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m7.5 10 1.8 1.8L13 8.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1460
1556
  ] }),
1557
+ "skip-back": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1558
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M5.5 4.5v11", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
1559
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M15 5.6v8.8a.6.6 0 0 1-.93.5L7.6 10.5a.6.6 0 0 1 0-1l6.47-4.4a.6.6 0 0 1 .93.5Z", fill: "currentColor" })
1560
+ ] }),
1561
+ "skip-forward": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1562
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M14.5 4.5v11", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
1563
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M5 5.6v8.8a.6.6 0 0 0 .93.5l6.47-4.4a.6.6 0 0 0 0-1L5.93 5.1a.6.6 0 0 0-.93.5Z", fill: "currentColor" })
1564
+ ] }),
1461
1565
  "sliders": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1462
1566
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M3.5 6.5h5M12 6.5h4.5M3.5 13.5h3M10 13.5h6.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
1463
1567
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "10.2", cy: "6.5", r: "1.8", stroke: "currentColor", strokeWidth: "1.5" }),
@@ -1481,6 +1585,7 @@ var GLYPHS = {
1481
1585
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("rect", { x: "3", y: "6", width: "14", height: "9.5", rx: "1.8", stroke: "currentColor", strokeWidth: "1.5" }),
1482
1586
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M7 17.5h6M7.5 2.5 10 5l2.5-2.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1483
1587
  ] }),
1588
+ "upload": /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 16.5v-9M6.5 10.5l3.5-3 3.5 3M4 3.5h12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1484
1589
  "warning": /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1485
1590
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 3.5 18 17H2L10 3.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1486
1591
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M10 8.5V12M10 14.5h.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
@@ -2617,6 +2722,194 @@ var ContextMenuTarget = (0, import_react21.forwardRef)(
2617
2722
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Component, { ref, "data-b-contextmenu": menu, ...rest, children });
2618
2723
  }
2619
2724
  );
2725
+
2726
+ // src/scroll.tsx
2727
+ var import_react22 = require("react");
2728
+ function readGeometry(el) {
2729
+ const page = !el || el === document.documentElement || el === document.body;
2730
+ const box = page ? document.documentElement : el;
2731
+ const x = page ? window.scrollX : el.scrollLeft;
2732
+ const y = page ? window.scrollY : el.scrollTop;
2733
+ const width = box.clientWidth, height = box.clientHeight;
2734
+ const contentWidth = box.scrollWidth, contentHeight = box.scrollHeight;
2735
+ return {
2736
+ x,
2737
+ y,
2738
+ width,
2739
+ height,
2740
+ contentWidth,
2741
+ contentHeight,
2742
+ progressX: contentWidth > width ? Math.min(1, x / (contentWidth - width)) : 0,
2743
+ progressY: contentHeight > height ? Math.min(1, y / (contentHeight - height)) : 0
2744
+ };
2745
+ }
2746
+ function useScrollGeometry(ref, onChange) {
2747
+ const [geometry, setGeometry] = (0, import_react22.useState)(null);
2748
+ (0, import_react22.useEffect)(() => {
2749
+ const el = ref?.current ?? null;
2750
+ const page = !el || el === document.documentElement || el === document.body;
2751
+ const target = page ? window : el;
2752
+ let queued = false;
2753
+ const flush = () => {
2754
+ queued = false;
2755
+ const g = readGeometry(el);
2756
+ setGeometry(g);
2757
+ onChange?.(g);
2758
+ };
2759
+ const on = () => {
2760
+ if (!queued) {
2761
+ queued = true;
2762
+ requestAnimationFrame(flush);
2763
+ }
2764
+ };
2765
+ target.addEventListener("scroll", on, { passive: true });
2766
+ const ro = !page && "ResizeObserver" in window ? new ResizeObserver(on) : null;
2767
+ if (ro && el) ro.observe(el);
2768
+ else window.addEventListener("resize", on);
2769
+ flush();
2770
+ return () => {
2771
+ target.removeEventListener("scroll", on);
2772
+ if (ro) ro.disconnect();
2773
+ else window.removeEventListener("resize", on);
2774
+ };
2775
+ }, [ref?.current]);
2776
+ return geometry;
2777
+ }
2778
+ function useVisible(ref, { threshold = 0.5 } = {}) {
2779
+ const [visible, setVisible] = (0, import_react22.useState)(false);
2780
+ (0, import_react22.useEffect)(() => {
2781
+ const el = ref.current;
2782
+ if (!el) return;
2783
+ if (!("IntersectionObserver" in window)) {
2784
+ setVisible(true);
2785
+ return;
2786
+ }
2787
+ const io = new IntersectionObserver(
2788
+ (entries) => {
2789
+ for (const entry of entries) {
2790
+ setVisible(threshold === 0 ? entry.isIntersecting : entry.intersectionRatio >= threshold);
2791
+ }
2792
+ },
2793
+ { threshold: threshold === 0 ? [0] : [0, threshold] }
2794
+ );
2795
+ io.observe(el);
2796
+ return () => io.disconnect();
2797
+ }, [ref.current, threshold]);
2798
+ return visible;
2799
+ }
2800
+ function useSnapPosition(ref) {
2801
+ const [current, setCurrent] = (0, import_react22.useState)({ id: null, index: -1 });
2802
+ const items = (0, import_react22.useCallback)(() => ref.current ? Array.from(ref.current.children).filter((c) => !c.hidden) : [], [ref]);
2803
+ (0, import_react22.useEffect)(() => {
2804
+ const box = ref.current;
2805
+ if (!box) return;
2806
+ const announce = (el) => {
2807
+ if (!el) return;
2808
+ const list = items();
2809
+ const index = list.indexOf(el);
2810
+ if (index >= 0) setCurrent({ id: el.id || null, index });
2811
+ };
2812
+ const nearest = () => {
2813
+ const list = items();
2814
+ const horizontal = box.scrollWidth > box.clientWidth;
2815
+ const origin = box.getBoundingClientRect();
2816
+ let best = null, distance = Infinity;
2817
+ for (const c of list) {
2818
+ const r = c.getBoundingClientRect();
2819
+ const d = Math.abs(horizontal ? r.left - origin.left : r.top - origin.top);
2820
+ if (d < distance) {
2821
+ distance = d;
2822
+ best = c;
2823
+ }
2824
+ }
2825
+ return best;
2826
+ };
2827
+ let timer;
2828
+ const native = "onscrollsnapchange" in box;
2829
+ const onSnap = (e) => {
2830
+ const ev = e;
2831
+ announce(ev.snapTargetInline || ev.snapTargetBlock);
2832
+ };
2833
+ const settle = () => {
2834
+ clearTimeout(timer);
2835
+ timer = setTimeout(() => announce(nearest()), 90);
2836
+ };
2837
+ if (native) box.addEventListener("scrollsnapchange", onSnap);
2838
+ else box.addEventListener("onscrollend" in box ? "scrollend" : "scroll", settle, { passive: true });
2839
+ announce(nearest());
2840
+ return () => {
2841
+ box.removeEventListener("scrollsnapchange", onSnap);
2842
+ box.removeEventListener("scrollend", settle);
2843
+ box.removeEventListener("scroll", settle);
2844
+ clearTimeout(timer);
2845
+ };
2846
+ }, [ref.current]);
2847
+ const to = (0, import_react22.useCallback)(
2848
+ (target) => {
2849
+ const list = items();
2850
+ const el = typeof target === "number" ? list[target] : list.find((c) => c.id === target);
2851
+ el?.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "start" });
2852
+ },
2853
+ [items]
2854
+ );
2855
+ return { ...current, to };
2856
+ }
2857
+ var HAPTICS = {
2858
+ selection: [8],
2859
+ impact: [16],
2860
+ success: [10, 30, 20],
2861
+ warning: [25, 40, 25],
2862
+ error: [40, 30, 40, 30, 60]
2863
+ };
2864
+ function haptic(kind = "selection") {
2865
+ if (typeof navigator === "undefined") return false;
2866
+ if (typeof navigator.vibrate === "function") {
2867
+ navigator.vibrate(HAPTICS[kind]);
2868
+ return true;
2869
+ }
2870
+ if (/iphone|ipad|ipod/i.test(navigator.userAgent)) {
2871
+ let sw = document.getElementById("b-haptic-switch");
2872
+ if (!sw) {
2873
+ sw = document.createElement("input");
2874
+ sw.type = "checkbox";
2875
+ sw.id = "b-haptic-switch";
2876
+ sw.tabIndex = -1;
2877
+ sw.setAttribute("switch", "");
2878
+ sw.setAttribute("aria-hidden", "true");
2879
+ sw.style.cssText = "position:fixed;inset:auto auto 0 0;width:1px;height:1px;opacity:0;pointer-events:none";
2880
+ document.body.appendChild(sw);
2881
+ }
2882
+ sw.click();
2883
+ return true;
2884
+ }
2885
+ return false;
2886
+ }
2887
+ var PERSIST = "barua-persist:";
2888
+ function usePersistedState(key, initial) {
2889
+ const [value, setValue] = (0, import_react22.useState)(() => {
2890
+ if (typeof window === "undefined") return initial;
2891
+ try {
2892
+ const raw = localStorage.getItem(PERSIST + key);
2893
+ return raw === null ? initial : JSON.parse(raw);
2894
+ } catch {
2895
+ return initial;
2896
+ }
2897
+ });
2898
+ const set = (0, import_react22.useCallback)(
2899
+ (next) => {
2900
+ setValue((prev) => {
2901
+ const resolved = typeof next === "function" ? next(prev) : next;
2902
+ try {
2903
+ localStorage.setItem(PERSIST + key, JSON.stringify(resolved));
2904
+ } catch {
2905
+ }
2906
+ return resolved;
2907
+ });
2908
+ },
2909
+ [key]
2910
+ );
2911
+ return [value, set];
2912
+ }
2620
2913
  // Annotate the CommonJS export names for ESM import in node:
2621
2914
  0 && (module.exports = {
2622
2915
  Accordion,
@@ -2912,8 +3205,13 @@ var ContextMenuTarget = (0, import_react21.forwardRef)(
2912
3205
  block,
2913
3206
  buttonClasses,
2914
3207
  cn,
3208
+ haptic,
2915
3209
  iconNames,
2916
3210
  useBaruaTheme,
2917
- useToast
3211
+ usePersistedState,
3212
+ useScrollGeometry,
3213
+ useSnapPosition,
3214
+ useToast,
3215
+ useVisible
2918
3216
  });
2919
3217
  //# sourceMappingURL=index.cjs.map