@cloudvoyant/helical-react 0.20.1 → 0.21.1

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.js CHANGED
@@ -213,76 +213,333 @@ import {
213
213
  windowResizeTriggerBase,
214
214
  cn as cn6
215
215
  } from "@cloudvoyant/helical-ui";
216
+
217
+ // src/which-key/context.tsx
218
+ import {
219
+ createContext,
220
+ useCallback,
221
+ useContext,
222
+ useEffect,
223
+ useId,
224
+ useRef,
225
+ useSyncExternalStore
226
+ } from "react";
227
+ import { useEnvironmentContext } from "@ark-ui/react/environment";
228
+ import { HotkeysProvider } from "@tanstack/react-hotkeys";
229
+ import {
230
+ createWhichKeyController,
231
+ getDocumentWhichKeyController,
232
+ subscribeDocumentWhichKeyController
233
+ } from "@cloudvoyant/helical-ui";
216
234
  import { jsx as jsx6 } from "react/jsx-runtime";
217
- function Window({ className, positionerClassName, children, ...props }) {
218
- return /* @__PURE__ */ jsx6(ArkWindowRoot, { ...props, children: /* @__PURE__ */ jsx6(Portal4, { children: /* @__PURE__ */ jsx6(ArkWindowPositioner, { className: cn6(windowPositionerBase, positionerClassName), children: /* @__PURE__ */ jsx6(ArkWindowContent, { className: cn6(windowContentBase, className), children }) }) }) });
235
+ var WhichKeyContext = createContext(null);
236
+ function WhichKeyProvider({
237
+ preset,
238
+ defaultMode = "normal",
239
+ leaderKey = "Space",
240
+ jumpAction,
241
+ jumpAlphabet,
242
+ storageKey,
243
+ keymap,
244
+ commands,
245
+ enabled = true,
246
+ disableOnMobile = true,
247
+ scoped = true,
248
+ onPresetChange,
249
+ onModeChange,
250
+ onJumpActionChange,
251
+ onCommand,
252
+ onYank,
253
+ children
254
+ }) {
255
+ const env = useEnvironmentContext();
256
+ const scopeRef = useRef(null);
257
+ const controllerRef = useRef(null);
258
+ if (!controllerRef.current) {
259
+ controllerRef.current = createWhichKeyController({
260
+ preset,
261
+ defaultMode,
262
+ leaderKey,
263
+ jumpAction,
264
+ jumpAlphabet,
265
+ storageKey,
266
+ keymap,
267
+ commands,
268
+ enabled,
269
+ disableOnMobile,
270
+ getDocument: () => env.getDocument(),
271
+ getScopeElement: () => scoped ? scopeRef.current : null,
272
+ onPresetChange,
273
+ onModeChange,
274
+ onJumpActionChange,
275
+ onCommand,
276
+ onYank
277
+ });
278
+ }
279
+ const controller = controllerRef.current;
280
+ useEffect(() => {
281
+ if (preset !== void 0) {
282
+ controller.setPreset(preset);
283
+ }
284
+ }, [controller, preset]);
285
+ useEffect(() => {
286
+ if (jumpAction !== void 0) {
287
+ controller.setJumpAction(jumpAction);
288
+ }
289
+ }, [controller, jumpAction]);
290
+ useEffect(() => {
291
+ if (!enabled) return;
292
+ const doc = env.getDocument();
293
+ return controller.attach(doc);
294
+ }, [controller, enabled, env]);
295
+ useEffect(() => {
296
+ if (!keymap) return;
297
+ return controller.registerKeymap("__provider_keymap__", keymap, {
298
+ enabled: true
299
+ });
300
+ }, [controller, keymap]);
301
+ useEffect(() => {
302
+ if (!commands) return;
303
+ const cleanups = Object.entries(commands).map(
304
+ ([cmdId, handler]) => controller.registerCommand(cmdId, handler)
305
+ );
306
+ return () => {
307
+ cleanups.forEach((fn) => fn());
308
+ };
309
+ }, [controller, commands]);
310
+ return /* @__PURE__ */ jsx6(HotkeysProvider, { children: /* @__PURE__ */ jsx6(WhichKeyContext.Provider, { value: controller, children: scoped ? /* @__PURE__ */ jsx6("div", { ref: scopeRef, "data-which-key-scope": true, className: "contents", children }) : children }) });
311
+ }
312
+ function useOptionalWhichKeyController() {
313
+ const contextController = useContext(WhichKeyContext);
314
+ const docController = useSyncExternalStore(
315
+ (listener) => contextController ? () => {
316
+ } : subscribeDocumentWhichKeyController(
317
+ typeof document !== "undefined" ? document : void 0,
318
+ listener
319
+ ),
320
+ () => contextController ? null : getDocumentWhichKeyController(),
321
+ () => null
322
+ );
323
+ return contextController ?? docController;
324
+ }
325
+ function useWhichKeyController() {
326
+ const controller = useOptionalWhichKeyController();
327
+ const fallbackRef = useRef(null);
328
+ if (controller) return controller;
329
+ if (!fallbackRef.current) {
330
+ fallbackRef.current = createWhichKeyController();
331
+ }
332
+ return fallbackRef.current;
333
+ }
334
+ function useWhichKey() {
335
+ const controller = useWhichKeyController();
336
+ const state = useSyncExternalStore(
337
+ controller.subscribe,
338
+ controller.getState,
339
+ controller.getState
340
+ );
341
+ return {
342
+ ...state,
343
+ controller,
344
+ setPreset: controller.setPreset,
345
+ setMode: controller.setMode,
346
+ setJumpAction: controller.setJumpAction,
347
+ openExplorer: controller.openExplorer,
348
+ closeExplorer: controller.closeExplorer,
349
+ setExplorerQuery: controller.setExplorerQuery,
350
+ openPrefix: controller.openPrefix,
351
+ closePrefix: controller.closePrefix,
352
+ stepBackPrefix: controller.stepBackPrefix,
353
+ triggerKey: controller.triggerKey,
354
+ focusPane: controller.focusPane,
355
+ startJumpMode: controller.startJumpMode,
356
+ cancelJumpMode: controller.cancelJumpMode,
357
+ jumpBack: controller.jumpBack,
358
+ jumpForward: controller.jumpForward,
359
+ executeCommand: controller.executeCommand
360
+ };
361
+ }
362
+ function useKeymap(nodes, options) {
363
+ const controller = useOptionalWhichKeyController();
364
+ const layerId = useId();
365
+ useEffect(() => {
366
+ if (!controller || options?.enabled === false) return;
367
+ return controller.registerKeymap(layerId, nodes, options);
368
+ }, [controller, layerId, nodes, options]);
369
+ }
370
+ function useKeymapScope(scopeId, nodes, enabled = true) {
371
+ useKeymap(nodes, { scope: scopeId, enabled });
372
+ }
373
+ function useOptionalPaneRegistration(options) {
374
+ const controller = useOptionalWhichKeyController();
375
+ const reactId = useId();
376
+ const resolvedId = options.paneId ?? `pane-${reactId.replace(/:/g, "")}`;
377
+ const resolvedTitle = options.paneTitle ?? options.defaultTitle;
378
+ const elementRef = useRef(null);
379
+ const cleanupRef = useRef(null);
380
+ const activePaneId = useSyncExternalStore(
381
+ controller ? controller.subscribe : () => () => {
382
+ },
383
+ () => controller ? controller.getState().activePaneId : null,
384
+ () => null
385
+ );
386
+ const setRef = useCallback((node) => {
387
+ elementRef.current = node;
388
+ }, []);
389
+ useEffect(() => {
390
+ if (!controller || !elementRef.current || options.paneDisabled) {
391
+ cleanupRef.current?.();
392
+ cleanupRef.current = null;
393
+ return;
394
+ }
395
+ cleanupRef.current?.();
396
+ cleanupRef.current = controller.registerPane({
397
+ id: resolvedId,
398
+ title: resolvedTitle,
399
+ element: elementRef.current,
400
+ disabled: options.paneDisabled,
401
+ order: options.paneOrder
402
+ });
403
+ return () => {
404
+ cleanupRef.current?.();
405
+ cleanupRef.current = null;
406
+ };
407
+ }, [
408
+ controller,
409
+ resolvedId,
410
+ resolvedTitle,
411
+ options.paneDisabled,
412
+ options.paneOrder
413
+ ]);
414
+ if (options.paneDisabled) {
415
+ return {
416
+ ref: () => {
417
+ },
418
+ paneId: resolvedId,
419
+ isActive: false,
420
+ dataAttributes: {}
421
+ };
422
+ }
423
+ if (!controller) {
424
+ return {
425
+ ref: () => {
426
+ },
427
+ paneId: resolvedId,
428
+ isActive: false,
429
+ dataAttributes: options.paneId ? {
430
+ "data-pane-id": options.paneId,
431
+ "data-pane-title": resolvedTitle,
432
+ ...options.paneOrder !== void 0 ? { "data-pane-order": String(options.paneOrder) } : {}
433
+ } : {}
434
+ };
435
+ }
436
+ const isActive = activePaneId === resolvedId;
437
+ return {
438
+ ref: setRef,
439
+ paneId: resolvedId,
440
+ isActive,
441
+ dataAttributes: {
442
+ "data-pane-id": resolvedId,
443
+ "data-pane-title": resolvedTitle,
444
+ ...options.paneOrder !== void 0 ? { "data-pane-order": String(options.paneOrder) } : {},
445
+ "data-pane-active": isActive ? "true" : "false"
446
+ }
447
+ };
448
+ }
449
+
450
+ // src/window.tsx
451
+ import { jsx as jsx7 } from "react/jsx-runtime";
452
+ function Window({
453
+ paneId,
454
+ paneTitle,
455
+ paneDisabled,
456
+ className,
457
+ positionerClassName,
458
+ children,
459
+ ...props
460
+ }) {
461
+ const pane = useOptionalPaneRegistration({
462
+ paneId,
463
+ paneTitle,
464
+ paneDisabled: paneDisabled || props.open === false,
465
+ defaultTitle: "Window"
466
+ });
467
+ return /* @__PURE__ */ jsx7(ArkWindowRoot, { ...props, children: /* @__PURE__ */ jsx7(Portal4, { children: /* @__PURE__ */ jsx7(ArkWindowPositioner, { className: cn6(windowPositionerBase, positionerClassName), children: /* @__PURE__ */ jsx7(
468
+ ArkWindowContent,
469
+ {
470
+ ref: pane.ref,
471
+ ...pane.dataAttributes,
472
+ className: cn6(windowContentBase, className),
473
+ children
474
+ }
475
+ ) }) }) });
219
476
  }
220
477
  function WindowProvider(props) {
221
- return /* @__PURE__ */ jsx6(ArkWindowRootProvider, { ...props });
478
+ return /* @__PURE__ */ jsx7(ArkWindowRootProvider, { ...props });
222
479
  }
223
480
  function WindowDragTrigger({ className, ...props }) {
224
- return /* @__PURE__ */ jsx6(ArkWindowDragTrigger, { className: cn6(windowDragTriggerBase, className), ...props });
481
+ return /* @__PURE__ */ jsx7(ArkWindowDragTrigger, { className: cn6(windowDragTriggerBase, className), ...props });
225
482
  }
226
483
  function WindowHeader({ className, ...props }) {
227
- return /* @__PURE__ */ jsx6(ArkWindowHeader, { className: cn6(windowHeaderBase, className), ...props });
484
+ return /* @__PURE__ */ jsx7(ArkWindowHeader, { className: cn6(windowHeaderBase, className), ...props });
228
485
  }
229
486
  function WindowTitle({ className, ...props }) {
230
- return /* @__PURE__ */ jsx6(ArkWindowTitle, { className: cn6(windowTitleBase, className), ...props });
487
+ return /* @__PURE__ */ jsx7(ArkWindowTitle, { className: cn6(windowTitleBase, className), ...props });
231
488
  }
232
489
  function WindowControl({ className, ...props }) {
233
- return /* @__PURE__ */ jsx6(ArkWindowControl, { className: cn6(windowControlBase, className), ...props });
490
+ return /* @__PURE__ */ jsx7(ArkWindowControl, { className: cn6(windowControlBase, className), ...props });
234
491
  }
235
492
  function WindowStageTrigger({ className, ...props }) {
236
- return /* @__PURE__ */ jsx6(ArkWindowStageTrigger, { className: cn6(windowStageTriggerBase, className), ...props });
493
+ return /* @__PURE__ */ jsx7(ArkWindowStageTrigger, { className: cn6(windowStageTriggerBase, className), ...props });
237
494
  }
238
495
  function WindowDismiss({ className, ...props }) {
239
- return /* @__PURE__ */ jsx6(ArkWindowCloseTrigger, { "aria-label": "Close", className: cn6(windowCloseTriggerBase, className), ...props });
496
+ return /* @__PURE__ */ jsx7(ArkWindowCloseTrigger, { "aria-label": "Close", className: cn6(windowCloseTriggerBase, className), ...props });
240
497
  }
241
498
  function WindowBody({ className, ...props }) {
242
- return /* @__PURE__ */ jsx6(ArkWindowBody, { className: cn6(windowBodyBase, className), ...props });
499
+ return /* @__PURE__ */ jsx7(ArkWindowBody, { className: cn6(windowBodyBase, className), ...props });
243
500
  }
244
501
  function WindowResizeTrigger({ axis = "se", className, ...props }) {
245
- return /* @__PURE__ */ jsx6(ArkWindowResizeTrigger, { axis, className: cn6(windowResizeTriggerBase, className), ...props });
502
+ return /* @__PURE__ */ jsx7(ArkWindowResizeTrigger, { axis, className: cn6(windowResizeTriggerBase, className), ...props });
246
503
  }
247
504
 
248
505
  // src/badge.tsx
249
506
  import { ark as ark2 } from "@ark-ui/react/factory";
250
507
  import { badgeVariants, cn as cn7 } from "@cloudvoyant/helical-ui";
251
- import { jsx as jsx7 } from "react/jsx-runtime";
508
+ import { jsx as jsx8 } from "react/jsx-runtime";
252
509
  function Badge({ className, variant, color, size, ...props }) {
253
- return /* @__PURE__ */ jsx7(ark2.span, { className: cn7(badgeVariants({ variant, color, size }), className), ...props });
510
+ return /* @__PURE__ */ jsx8(ark2.span, { className: cn7(badgeVariants({ variant, color, size }), className), ...props });
254
511
  }
255
512
 
256
513
  // src/container.tsx
257
514
  import { ark as ark3 } from "@ark-ui/react/factory";
258
515
  import { containerBase, cn as cn8 } from "@cloudvoyant/helical-ui";
259
- import { jsx as jsx8 } from "react/jsx-runtime";
516
+ import { jsx as jsx9 } from "react/jsx-runtime";
260
517
  function Container({ className, ...props }) {
261
- return /* @__PURE__ */ jsx8(ark3.div, { className: cn8(containerBase, className), ...props });
518
+ return /* @__PURE__ */ jsx9(ark3.div, { className: cn8(containerBase, className), ...props });
262
519
  }
263
520
 
264
521
  // src/row.tsx
265
522
  import { ark as ark4 } from "@ark-ui/react/factory";
266
523
  import { rowBase, cn as cn9 } from "@cloudvoyant/helical-ui";
267
- import { jsx as jsx9 } from "react/jsx-runtime";
524
+ import { jsx as jsx10 } from "react/jsx-runtime";
268
525
  function Row({ className, ...props }) {
269
- return /* @__PURE__ */ jsx9(ark4.div, { className: cn9(rowBase, className), ...props });
526
+ return /* @__PURE__ */ jsx10(ark4.div, { className: cn9(rowBase, className), ...props });
270
527
  }
271
528
 
272
529
  // src/col.tsx
273
530
  import { ark as ark5 } from "@ark-ui/react/factory";
274
531
  import { colBase, cn as cn10 } from "@cloudvoyant/helical-ui";
275
- import { jsx as jsx10 } from "react/jsx-runtime";
532
+ import { jsx as jsx11 } from "react/jsx-runtime";
276
533
  function Col({ className, ...props }) {
277
- return /* @__PURE__ */ jsx10(ark5.div, { className: cn10(colBase, className), ...props });
534
+ return /* @__PURE__ */ jsx11(ark5.div, { className: cn10(colBase, className), ...props });
278
535
  }
279
536
 
280
537
  // src/center.tsx
281
538
  import { ark as ark6 } from "@ark-ui/react/factory";
282
539
  import { centerBase, cn as cn11 } from "@cloudvoyant/helical-ui";
283
- import { jsx as jsx11 } from "react/jsx-runtime";
540
+ import { jsx as jsx12 } from "react/jsx-runtime";
284
541
  function Center({ className, ...props }) {
285
- return /* @__PURE__ */ jsx11(ark6.div, { className: cn11(centerBase, className), ...props });
542
+ return /* @__PURE__ */ jsx12(ark6.div, { className: cn11(centerBase, className), ...props });
286
543
  }
287
544
 
288
545
  // src/portal.tsx
@@ -291,9 +548,9 @@ import { Portal as Portal5 } from "@ark-ui/react/portal";
291
548
  // src/item.tsx
292
549
  import { ark as ark7 } from "@ark-ui/react/factory";
293
550
  import { itemVariants, cn as cn12 } from "@cloudvoyant/helical-ui";
294
- import { jsx as jsx12 } from "react/jsx-runtime";
551
+ import { jsx as jsx13 } from "react/jsx-runtime";
295
552
  function Item({ className, variant, ...props }) {
296
- return /* @__PURE__ */ jsx12(ark7.div, { className: cn12(itemVariants({ variant }), className), ...props });
553
+ return /* @__PURE__ */ jsx13(ark7.div, { className: cn12(itemVariants({ variant }), className), ...props });
297
554
  }
298
555
 
299
556
  // src/card/root.tsx
@@ -301,66 +558,66 @@ import { ark as ark8 } from "@ark-ui/react/factory";
301
558
  import { cardVariants, cn as cn13 } from "@cloudvoyant/helical-ui";
302
559
 
303
560
  // src/card/context.ts
304
- import { createContext, useContext } from "react";
305
- var CardOrientationContext = createContext("vertical");
561
+ import { createContext as createContext2, useContext as useContext2 } from "react";
562
+ var CardOrientationContext = createContext2("vertical");
306
563
  function useCardOrientation() {
307
- return useContext(CardOrientationContext);
564
+ return useContext2(CardOrientationContext);
308
565
  }
309
566
 
310
567
  // src/card/root.tsx
311
- import { jsx as jsx13 } from "react/jsx-runtime";
568
+ import { jsx as jsx14 } from "react/jsx-runtime";
312
569
  function Card({ className, variant, size, orientation, children, ...props }) {
313
570
  const resolvedOrientation = orientation ?? "vertical";
314
- return /* @__PURE__ */ jsx13(CardOrientationContext.Provider, { value: resolvedOrientation, children: /* @__PURE__ */ jsx13(ark8.div, { className: cn13(cardVariants({ variant, size, orientation: resolvedOrientation }), className), ...props, children }) });
571
+ return /* @__PURE__ */ jsx14(CardOrientationContext.Provider, { value: resolvedOrientation, children: /* @__PURE__ */ jsx14(ark8.div, { className: cn13(cardVariants({ variant, size, orientation: resolvedOrientation }), className), ...props, children }) });
315
572
  }
316
573
 
317
574
  // src/card/header.tsx
318
575
  import { ark as ark9 } from "@ark-ui/react/factory";
319
576
  import { cardHeaderBase, cn as cn14 } from "@cloudvoyant/helical-ui";
320
- import { jsx as jsx14 } from "react/jsx-runtime";
577
+ import { jsx as jsx15 } from "react/jsx-runtime";
321
578
  function CardHeader({ className, ...props }) {
322
- return /* @__PURE__ */ jsx14(ark9.div, { className: cn14(cardHeaderBase, className), ...props });
579
+ return /* @__PURE__ */ jsx15(ark9.div, { className: cn14(cardHeaderBase, className), ...props });
323
580
  }
324
581
 
325
582
  // src/card/body.tsx
326
583
  import { ark as ark10 } from "@ark-ui/react/factory";
327
584
  import { cardBodyBase, cn as cn15 } from "@cloudvoyant/helical-ui";
328
- import { jsx as jsx15 } from "react/jsx-runtime";
585
+ import { jsx as jsx16 } from "react/jsx-runtime";
329
586
  function CardBody({ className, ...props }) {
330
- return /* @__PURE__ */ jsx15(ark10.div, { className: cn15(cardBodyBase, className), ...props });
587
+ return /* @__PURE__ */ jsx16(ark10.div, { className: cn15(cardBodyBase, className), ...props });
331
588
  }
332
589
 
333
590
  // src/card/footer.tsx
334
591
  import { ark as ark11 } from "@ark-ui/react/factory";
335
592
  import { cardFooterBase, cn as cn16 } from "@cloudvoyant/helical-ui";
336
- import { jsx as jsx16 } from "react/jsx-runtime";
593
+ import { jsx as jsx17 } from "react/jsx-runtime";
337
594
  function CardFooter({ className, ...props }) {
338
- return /* @__PURE__ */ jsx16(ark11.div, { className: cn16(cardFooterBase, className), ...props });
595
+ return /* @__PURE__ */ jsx17(ark11.div, { className: cn16(cardFooterBase, className), ...props });
339
596
  }
340
597
 
341
598
  // src/card/title.tsx
342
599
  import { ark as ark12 } from "@ark-ui/react/factory";
343
600
  import { cardTitleBase, cn as cn17 } from "@cloudvoyant/helical-ui";
344
- import { jsx as jsx17 } from "react/jsx-runtime";
601
+ import { jsx as jsx18 } from "react/jsx-runtime";
345
602
  function CardTitle({ className, ...props }) {
346
- return /* @__PURE__ */ jsx17(ark12.h3, { className: cn17(cardTitleBase, className), ...props });
603
+ return /* @__PURE__ */ jsx18(ark12.h3, { className: cn17(cardTitleBase, className), ...props });
347
604
  }
348
605
 
349
606
  // src/card/description.tsx
350
607
  import { ark as ark13 } from "@ark-ui/react/factory";
351
608
  import { cardDescriptionBase, cn as cn18 } from "@cloudvoyant/helical-ui";
352
- import { jsx as jsx18 } from "react/jsx-runtime";
609
+ import { jsx as jsx19 } from "react/jsx-runtime";
353
610
  function CardDescription({ className, ...props }) {
354
- return /* @__PURE__ */ jsx18(ark13.p, { className: cn18(cardDescriptionBase, className), ...props });
611
+ return /* @__PURE__ */ jsx19(ark13.p, { className: cn18(cardDescriptionBase, className), ...props });
355
612
  }
356
613
 
357
614
  // src/card/cover.tsx
358
615
  import { ark as ark14 } from "@ark-ui/react/factory";
359
616
  import { cardCoverVariants, cn as cn19 } from "@cloudvoyant/helical-ui";
360
- import { jsx as jsx19 } from "react/jsx-runtime";
617
+ import { jsx as jsx20 } from "react/jsx-runtime";
361
618
  function CardCover({ className, variant, orientation, ...props }) {
362
619
  const contextOrientation = useCardOrientation();
363
- return /* @__PURE__ */ jsx19(
620
+ return /* @__PURE__ */ jsx20(
364
621
  ark14.div,
365
622
  {
366
623
  className: cn19(cardCoverVariants({ variant, orientation: orientation ?? contextOrientation }), className),
@@ -372,15 +629,15 @@ function CardCover({ className, variant, orientation, ...props }) {
372
629
  // src/stack.tsx
373
630
  import { ark as ark15 } from "@ark-ui/react/factory";
374
631
  import { stackBase, hstackBase, vstackBase, cn as cn20 } from "@cloudvoyant/helical-ui";
375
- import { jsx as jsx20 } from "react/jsx-runtime";
632
+ import { jsx as jsx21 } from "react/jsx-runtime";
376
633
  function Stack({ className, ...props }) {
377
- return /* @__PURE__ */ jsx20(ark15.div, { className: cn20(stackBase, className), ...props });
634
+ return /* @__PURE__ */ jsx21(ark15.div, { className: cn20(stackBase, className), ...props });
378
635
  }
379
636
  function HStack({ className, ...props }) {
380
- return /* @__PURE__ */ jsx20(ark15.div, { className: cn20(hstackBase, className), ...props });
637
+ return /* @__PURE__ */ jsx21(ark15.div, { className: cn20(hstackBase, className), ...props });
381
638
  }
382
639
  function VStack({ className, ...props }) {
383
- return /* @__PURE__ */ jsx20(ark15.div, { className: cn20(vstackBase, className), ...props });
640
+ return /* @__PURE__ */ jsx21(ark15.div, { className: cn20(vstackBase, className), ...props });
384
641
  }
385
642
 
386
643
  // src/scroll.tsx
@@ -401,7 +658,7 @@ import {
401
658
  scrollCornerBase,
402
659
  cn as cn21
403
660
  } from "@cloudvoyant/helical-ui";
404
- import { Fragment, jsx as jsx21, jsxs as jsxs3 } from "react/jsx-runtime";
661
+ import { Fragment, jsx as jsx22, jsxs as jsxs3 } from "react/jsx-runtime";
405
662
  function Scroll({
406
663
  className,
407
664
  orientation = "vertical",
@@ -413,11 +670,11 @@ function Scroll({
413
670
  ...props
414
671
  }) {
415
672
  return /* @__PURE__ */ jsxs3(ArkRoot, { className: cn21(scrollRootBase, className), ...props, children: [
416
- /* @__PURE__ */ jsx21(ArkViewport, { className: cn21(scrollViewportBase, viewportClassName), children: /* @__PURE__ */ jsx21(ArkContent, { className: cn21(scrollContentBase, contentClassName), children }) }),
673
+ /* @__PURE__ */ jsx22(ArkViewport, { className: cn21(scrollViewportBase, viewportClassName), children: /* @__PURE__ */ jsx22(ArkContent, { className: cn21(scrollContentBase, contentClassName), children }) }),
417
674
  variant === "hidden" ? null : /* @__PURE__ */ jsxs3(Fragment, { children: [
418
- (orientation === "vertical" || orientation === "both") && /* @__PURE__ */ jsx21(ArkScrollbar, { orientation: "vertical", className: scrollScrollbarBase, children: /* @__PURE__ */ jsx21(ArkThumb, { className: cn21(scrollThumbBase, thumbClassName) }) }),
419
- (orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ jsx21(ArkScrollbar, { orientation: "horizontal", className: scrollScrollbarBase, children: /* @__PURE__ */ jsx21(ArkThumb, { className: cn21(scrollThumbBase, thumbClassName) }) }),
420
- orientation === "both" && /* @__PURE__ */ jsx21(ArkCorner, { className: scrollCornerBase })
675
+ (orientation === "vertical" || orientation === "both") && /* @__PURE__ */ jsx22(ArkScrollbar, { orientation: "vertical", className: scrollScrollbarBase, children: /* @__PURE__ */ jsx22(ArkThumb, { className: cn21(scrollThumbBase, thumbClassName) }) }),
676
+ (orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ jsx22(ArkScrollbar, { orientation: "horizontal", className: scrollScrollbarBase, children: /* @__PURE__ */ jsx22(ArkThumb, { className: cn21(scrollThumbBase, thumbClassName) }) }),
677
+ orientation === "both" && /* @__PURE__ */ jsx22(ArkCorner, { className: scrollCornerBase })
421
678
  ] })
422
679
  ] });
423
680
  }
@@ -434,28 +691,125 @@ import {
434
691
  pageSectionBase,
435
692
  cn as cn22
436
693
  } from "@cloudvoyant/helical-ui";
437
- import { jsx as jsx22 } from "react/jsx-runtime";
438
- function Page({ variant = "default", className, children, ...props }) {
439
- return /* @__PURE__ */ jsx22(ark16.div, { "data-slot": "page", className: cn22(pageVariants({ variant }), className), ...props, children });
694
+ import { jsx as jsx23 } from "react/jsx-runtime";
695
+ function Page({
696
+ variant = "default",
697
+ paneId,
698
+ paneTitle,
699
+ paneDisabled,
700
+ paneOrder,
701
+ className,
702
+ children,
703
+ ...props
704
+ }) {
705
+ const pane = useOptionalPaneRegistration({
706
+ paneId,
707
+ paneTitle,
708
+ paneDisabled: paneDisabled ?? !paneId,
709
+ paneOrder,
710
+ defaultTitle: "Page"
711
+ });
712
+ return /* @__PURE__ */ jsx23(
713
+ ark16.div,
714
+ {
715
+ ref: pane.ref,
716
+ "data-slot": "page",
717
+ ...pane.dataAttributes,
718
+ className: cn22(pageVariants({ variant }), className),
719
+ ...props,
720
+ children
721
+ }
722
+ );
440
723
  }
441
724
  function PageGutter({
442
725
  side = "left",
443
726
  align = "start",
444
727
  contentClassName,
728
+ paneId,
729
+ paneTitle,
730
+ paneDisabled,
731
+ paneOrder,
445
732
  className,
446
733
  children,
447
734
  ...props
448
735
  }) {
449
- return /* @__PURE__ */ jsx22(ark16.div, { "data-slot": "page-gutter-area", className: cn22(pageGutterAreaBase, side === "right" && "[grid-area:right]"), children: /* @__PURE__ */ jsx22(ark16.div, { "data-slot": "page-gutter", className: cn22(pageGutterVariants({ side }), className), ...props, children: /* @__PURE__ */ jsx22(ark16.div, { "data-slot": "page-gutter-content", className: cn22(pageGutterContentVariants({ align }), contentClassName), children }) }) });
736
+ const pane = useOptionalPaneRegistration({
737
+ paneId,
738
+ paneTitle,
739
+ paneDisabled,
740
+ paneOrder,
741
+ defaultTitle: side === "right" ? "Right Gutter" : "Left Gutter"
742
+ });
743
+ return /* @__PURE__ */ jsx23(ark16.div, { "data-slot": "page-gutter-area", className: cn22(pageGutterAreaBase, side === "right" && "[grid-area:right]"), children: /* @__PURE__ */ jsx23(
744
+ ark16.div,
745
+ {
746
+ ref: pane.ref,
747
+ "data-slot": "page-gutter",
748
+ ...pane.dataAttributes,
749
+ className: cn22(pageGutterVariants({ side }), className),
750
+ ...props,
751
+ children: /* @__PURE__ */ jsx23(ark16.div, { "data-slot": "page-gutter-content", className: cn22(pageGutterContentVariants({ align }), contentClassName), children })
752
+ }
753
+ ) });
450
754
  }
451
- function PageContent({ className, children, ...props }) {
452
- return /* @__PURE__ */ jsx22(ark16.main, { "data-slot": "page-content", className: cn22(pageContentBase, className), ...props, children });
755
+ function PageContent({
756
+ paneId,
757
+ paneTitle,
758
+ paneDisabled,
759
+ paneOrder,
760
+ className,
761
+ children,
762
+ ...props
763
+ }) {
764
+ const pane = useOptionalPaneRegistration({
765
+ paneId,
766
+ paneTitle,
767
+ paneDisabled,
768
+ paneOrder,
769
+ defaultTitle: "Main Content"
770
+ });
771
+ return /* @__PURE__ */ jsx23(
772
+ ark16.main,
773
+ {
774
+ ref: pane.ref,
775
+ "data-slot": "page-content",
776
+ ...pane.dataAttributes,
777
+ className: cn22(pageContentBase, className),
778
+ ...props,
779
+ children
780
+ }
781
+ );
453
782
  }
454
783
  function PageFooter({ className, children, ...props }) {
455
- return /* @__PURE__ */ jsx22(ark16.footer, { "data-slot": "page-footer", className: cn22(pageFooterBase, className), ...props, children });
784
+ return /* @__PURE__ */ jsx23(ark16.footer, { "data-slot": "page-footer", className: cn22(pageFooterBase, className), ...props, children });
456
785
  }
457
- function PageSection({ className, children, ...props }) {
458
- return /* @__PURE__ */ jsx22(ark16.section, { "data-slot": "page-section", className: cn22(pageSectionBase, className), ...props, children });
786
+ function PageSection({
787
+ paneId,
788
+ paneTitle,
789
+ paneDisabled,
790
+ paneOrder,
791
+ className,
792
+ children,
793
+ ...props
794
+ }) {
795
+ const pane = useOptionalPaneRegistration({
796
+ paneId,
797
+ paneTitle,
798
+ paneDisabled: paneDisabled ?? !paneId,
799
+ paneOrder,
800
+ defaultTitle: "Section"
801
+ });
802
+ return /* @__PURE__ */ jsx23(
803
+ ark16.section,
804
+ {
805
+ ref: pane.ref,
806
+ "data-slot": "page-section",
807
+ ...pane.dataAttributes,
808
+ className: cn22(pageSectionBase, className),
809
+ ...props,
810
+ children
811
+ }
812
+ );
459
813
  }
460
814
 
461
815
  // src/splitter.tsx
@@ -473,21 +827,41 @@ import {
473
827
  splitterResizeTriggerIndicatorBase,
474
828
  cn as cn23
475
829
  } from "@cloudvoyant/helical-ui";
476
- import { jsx as jsx23, jsxs as jsxs4 } from "react/jsx-runtime";
830
+ import { jsx as jsx24, jsxs as jsxs4 } from "react/jsx-runtime";
477
831
  function Splitter({ className, ...props }) {
478
- return /* @__PURE__ */ jsx23(ArkSplitterRoot, { className: cn23(splitterRootBase, className), ...props });
832
+ return /* @__PURE__ */ jsx24(ArkSplitterRoot, { className: cn23(splitterRootBase, className), ...props });
479
833
  }
480
- function SplitterPanel({ className, ...props }) {
481
- return /* @__PURE__ */ jsx23(ArkSplitterPanel, { className: cn23(splitterPanelBase, className), ...props });
834
+ function SplitterPanel({
835
+ paneId,
836
+ paneTitle,
837
+ paneDisabled,
838
+ className,
839
+ ...props
840
+ }) {
841
+ const pane = useOptionalPaneRegistration({
842
+ paneId: paneId ?? (typeof props.id === "string" ? `splitter-${props.id}` : void 0),
843
+ paneTitle: paneTitle ?? (typeof props.id === "string" ? `Panel ${props.id}` : "Splitter Panel"),
844
+ paneDisabled,
845
+ defaultTitle: "Splitter Panel"
846
+ });
847
+ return /* @__PURE__ */ jsx24(
848
+ ArkSplitterPanel,
849
+ {
850
+ ref: pane.ref,
851
+ ...pane.dataAttributes,
852
+ className: cn23(splitterPanelBase, className),
853
+ ...props
854
+ }
855
+ );
482
856
  }
483
857
  function SplitterResizeTrigger({ className, children, ...props }) {
484
858
  return /* @__PURE__ */ jsxs4(ArkSplitterResizeTrigger, { className: cn23(splitterResizeTriggerBase, className), ...props, children: [
485
- /* @__PURE__ */ jsx23("span", { "aria-hidden": true, "data-part": "separator", className: splitterResizeTriggerSeparatorBase }),
859
+ /* @__PURE__ */ jsx24("span", { "aria-hidden": true, "data-part": "separator", className: splitterResizeTriggerSeparatorBase }),
486
860
  children
487
861
  ] });
488
862
  }
489
863
  function SplitterResizeTriggerIndicator({ className, ...props }) {
490
- return /* @__PURE__ */ jsx23(ArkSplitterResizeTriggerIndicator, { className: cn23(splitterResizeTriggerIndicatorBase, className), ...props });
864
+ return /* @__PURE__ */ jsx24(ArkSplitterResizeTriggerIndicator, { className: cn23(splitterResizeTriggerIndicatorBase, className), ...props });
491
865
  }
492
866
 
493
867
  // src/sidebar/Provider.tsx
@@ -512,7 +886,7 @@ function useSidebar() {
512
886
  }
513
887
 
514
888
  // src/sidebar/Provider.tsx
515
- import { jsx as jsx24 } from "react/jsx-runtime";
889
+ import { jsx as jsx25 } from "react/jsx-runtime";
516
890
  var SIDEBAR_COOKIE_NAME = "sidebar_state";
517
891
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
518
892
  function useIsMobile() {
@@ -594,7 +968,7 @@ function Provider({
594
968
  }),
595
969
  [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar, isControlled]
596
970
  );
597
- return /* @__PURE__ */ jsx24(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx24(
971
+ return /* @__PURE__ */ jsx25(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx25(
598
972
  Row,
599
973
  {
600
974
  "data-slot": "sidebar-wrapper",
@@ -629,22 +1003,33 @@ import {
629
1003
  sidebarStyles as sidebarStyles2,
630
1004
  cn as cn25
631
1005
  } from "@cloudvoyant/helical-ui";
632
- import { jsx as jsx25, jsxs as jsxs5 } from "react/jsx-runtime";
1006
+ import { jsx as jsx26, jsxs as jsxs5 } from "react/jsx-runtime";
633
1007
  function Root({
634
1008
  side = "left",
635
1009
  variant = "sidebar",
636
1010
  collapsible = "offcanvas",
1011
+ paneId,
1012
+ paneTitle,
1013
+ paneDisabled,
637
1014
  className,
638
1015
  children,
639
1016
  ...props
640
1017
  }) {
641
1018
  const { isMobile, state, open, setOpen, openMobile, setOpenMobile, isControlled } = useSidebar();
1019
+ const pane = useOptionalPaneRegistration({
1020
+ paneId,
1021
+ paneTitle,
1022
+ paneDisabled: paneDisabled || state === "collapsed",
1023
+ defaultTitle: "Sidebar"
1024
+ });
642
1025
  if (collapsible === "none") {
643
- return /* @__PURE__ */ jsx25(
1026
+ return /* @__PURE__ */ jsx26(
644
1027
  Col,
645
1028
  {
1029
+ ref: pane.ref,
646
1030
  "data-slot": "sidebar",
647
1031
  "data-sidebar": "sidebar",
1032
+ ...pane.dataAttributes,
648
1033
  className: cn25("h-full w-(--sidebar-width) bg-sidebar text-sidebar-foreground", className),
649
1034
  ...props,
650
1035
  children
@@ -671,8 +1056,8 @@ function Root({
671
1056
  preventDragOnScroll: false,
672
1057
  ...props,
673
1058
  children: [
674
- !isBottomWidgetSheet && /* @__PURE__ */ jsx25(DrawerBackdrop, { className: sidebarStyles2.mobileBackdropClass }),
675
- /* @__PURE__ */ jsx25(DrawerPositioner, { className: sidebarStyles2.mobilePositionerClass, children: /* @__PURE__ */ jsxs5(
1059
+ !isBottomWidgetSheet && /* @__PURE__ */ jsx26(DrawerBackdrop, { className: sidebarStyles2.mobileBackdropClass }),
1060
+ /* @__PURE__ */ jsx26(DrawerPositioner, { className: sidebarStyles2.mobilePositionerClass, children: /* @__PURE__ */ jsxs5(
676
1061
  DrawerContent,
677
1062
  {
678
1063
  "data-sidebar": "sidebar",
@@ -681,11 +1066,11 @@ function Root({
681
1066
  className: cn25(sidebarStyles2.mobileContentClass, className),
682
1067
  style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
683
1068
  children: [
684
- /* @__PURE__ */ jsx25(DrawerTitle, { className: "sr-only", children: "Sidebar" }),
685
- /* @__PURE__ */ jsx25(DrawerDescription, { className: "sr-only", children: "Displays the mobile sidebar." }),
686
- /* @__PURE__ */ jsx25(DrawerCloseTrigger, { className: "hidden" }),
687
- isBottomWidgetSheet && /* @__PURE__ */ jsx25(DrawerGrabber, { className: sidebarStyles2.mobileGrabberClass, children: /* @__PURE__ */ jsx25(DrawerGrabberIndicator, { className: sidebarStyles2.mobileGrabberIndicatorClass }) }),
688
- /* @__PURE__ */ jsx25("div", { "data-no-drag": true, className: "flex min-h-0 flex-1 flex-col", children: /* @__PURE__ */ jsx25(Col, { className: "h-full w-full", children }) })
1069
+ /* @__PURE__ */ jsx26(DrawerTitle, { className: "sr-only", children: "Sidebar" }),
1070
+ /* @__PURE__ */ jsx26(DrawerDescription, { className: "sr-only", children: "Displays the mobile sidebar." }),
1071
+ /* @__PURE__ */ jsx26(DrawerCloseTrigger, { className: "hidden" }),
1072
+ isBottomWidgetSheet && /* @__PURE__ */ jsx26(DrawerGrabber, { className: sidebarStyles2.mobileGrabberClass, children: /* @__PURE__ */ jsx26(DrawerGrabberIndicator, { className: sidebarStyles2.mobileGrabberIndicatorClass }) }),
1073
+ /* @__PURE__ */ jsx26("div", { "data-no-drag": true, className: "flex min-h-0 flex-1 flex-col", children: /* @__PURE__ */ jsx26(Col, { className: "h-full w-full", children }) })
689
1074
  ]
690
1075
  }
691
1076
  ) })
@@ -703,7 +1088,7 @@ function Root({
703
1088
  "data-side": side,
704
1089
  "data-slot": "sidebar",
705
1090
  children: [
706
- /* @__PURE__ */ jsx25(
1091
+ /* @__PURE__ */ jsx26(
707
1092
  "div",
708
1093
  {
709
1094
  "data-slot": "sidebar-gap",
@@ -714,10 +1099,12 @@ function Root({
714
1099
  )
715
1100
  }
716
1101
  ),
717
- /* @__PURE__ */ jsx25(
1102
+ /* @__PURE__ */ jsx26(
718
1103
  "div",
719
1104
  {
1105
+ ref: pane.ref,
720
1106
  "data-slot": "sidebar-container",
1107
+ ...pane.dataAttributes,
721
1108
  className: cn25(
722
1109
  sidebarStyles2.containerClass,
723
1110
  side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
@@ -725,7 +1112,7 @@ function Root({
725
1112
  className
726
1113
  ),
727
1114
  ...props,
728
- children: /* @__PURE__ */ jsx25(
1115
+ children: /* @__PURE__ */ jsx26(
729
1116
  "div",
730
1117
  {
731
1118
  "data-sidebar": "sidebar",
@@ -744,9 +1131,9 @@ function Root({
744
1131
 
745
1132
  // src/sidebar/Header.tsx
746
1133
  import { sidebarStyles as sidebarStyles3, cn as cn26 } from "@cloudvoyant/helical-ui";
747
- import { jsx as jsx26 } from "react/jsx-runtime";
1134
+ import { jsx as jsx27 } from "react/jsx-runtime";
748
1135
  function Header({ className, ...props }) {
749
- return /* @__PURE__ */ jsx26(
1136
+ return /* @__PURE__ */ jsx27(
750
1137
  Col,
751
1138
  {
752
1139
  "data-slot": "sidebar-header",
@@ -759,9 +1146,9 @@ function Header({ className, ...props }) {
759
1146
 
760
1147
  // src/sidebar/Footer.tsx
761
1148
  import { sidebarStyles as sidebarStyles4, cn as cn27 } from "@cloudvoyant/helical-ui";
762
- import { jsx as jsx27 } from "react/jsx-runtime";
1149
+ import { jsx as jsx28 } from "react/jsx-runtime";
763
1150
  function Footer({ className, ...props }) {
764
- return /* @__PURE__ */ jsx27(
1151
+ return /* @__PURE__ */ jsx28(
765
1152
  Col,
766
1153
  {
767
1154
  "data-slot": "sidebar-footer",
@@ -775,9 +1162,9 @@ function Footer({ className, ...props }) {
775
1162
  // src/sidebar/Separator.tsx
776
1163
  import { ark as ark17 } from "@ark-ui/react/factory";
777
1164
  import { sidebarStyles as sidebarStyles5, cn as cn28 } from "@cloudvoyant/helical-ui";
778
- import { jsx as jsx28 } from "react/jsx-runtime";
1165
+ import { jsx as jsx29 } from "react/jsx-runtime";
779
1166
  function Separator({ className, ...props }) {
780
- return /* @__PURE__ */ jsx28(
1167
+ return /* @__PURE__ */ jsx29(
781
1168
  ark17.div,
782
1169
  {
783
1170
  "data-slot": "sidebar-separator",
@@ -791,9 +1178,9 @@ function Separator({ className, ...props }) {
791
1178
 
792
1179
  // src/sidebar/Content.tsx
793
1180
  import { sidebarStyles as sidebarStyles6, cn as cn29 } from "@cloudvoyant/helical-ui";
794
- import { jsx as jsx29 } from "react/jsx-runtime";
1181
+ import { jsx as jsx30 } from "react/jsx-runtime";
795
1182
  function Content({ className, ...props }) {
796
- return /* @__PURE__ */ jsx29(
1183
+ return /* @__PURE__ */ jsx30(
797
1184
  Col,
798
1185
  {
799
1186
  "data-slot": "sidebar-content",
@@ -806,11 +1193,11 @@ function Content({ className, ...props }) {
806
1193
 
807
1194
  // src/sidebar/Group.tsx
808
1195
  import { sidebarStyles as sidebarStyles7, cn as cn30 } from "@cloudvoyant/helical-ui";
809
- import { jsx as jsx30, jsxs as jsxs6 } from "react/jsx-runtime";
1196
+ import { jsx as jsx31, jsxs as jsxs6 } from "react/jsx-runtime";
810
1197
  function Group({ label, className, children, ...props }) {
811
1198
  return /* @__PURE__ */ jsxs6(Col, { "data-slot": "sidebar-group", "data-sidebar": "group", className: cn30(sidebarStyles7.groupClass, className), ...props, children: [
812
- label && /* @__PURE__ */ jsx30("div", { "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: cn30(sidebarStyles7.groupLabelClass), children: label }),
813
- /* @__PURE__ */ jsx30(
1199
+ label && /* @__PURE__ */ jsx31("div", { "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: cn30(sidebarStyles7.groupLabelClass), children: label }),
1200
+ /* @__PURE__ */ jsx31(
814
1201
  "div",
815
1202
  {
816
1203
  "data-slot": "sidebar-group-content",
@@ -825,9 +1212,9 @@ function Group({ label, className, children, ...props }) {
825
1212
  // src/sidebar/GroupAction.tsx
826
1213
  import { ark as ark18 } from "@ark-ui/react/factory";
827
1214
  import { sidebarStyles as sidebarStyles8, cn as cn31 } from "@cloudvoyant/helical-ui";
828
- import { jsx as jsx31 } from "react/jsx-runtime";
1215
+ import { jsx as jsx32 } from "react/jsx-runtime";
829
1216
  function GroupAction({ className, asChild = false, ...props }) {
830
- return /* @__PURE__ */ jsx31(
1217
+ return /* @__PURE__ */ jsx32(
831
1218
  ark18.button,
832
1219
  {
833
1220
  "data-slot": "sidebar-group-action",
@@ -843,9 +1230,9 @@ function GroupAction({ className, asChild = false, ...props }) {
843
1230
  // src/sidebar/Menu.tsx
844
1231
  import { ark as ark19 } from "@ark-ui/react/factory";
845
1232
  import { sidebarStyles as sidebarStyles9, cn as cn32 } from "@cloudvoyant/helical-ui";
846
- import { jsx as jsx32 } from "react/jsx-runtime";
1233
+ import { jsx as jsx33 } from "react/jsx-runtime";
847
1234
  function Menu({ className, ...props }) {
848
- return /* @__PURE__ */ jsx32(
1235
+ return /* @__PURE__ */ jsx33(
849
1236
  ark19.ul,
850
1237
  {
851
1238
  "data-slot": "sidebar-menu",
@@ -859,9 +1246,9 @@ function Menu({ className, ...props }) {
859
1246
  // src/sidebar/MenuItem.tsx
860
1247
  import { ark as ark20 } from "@ark-ui/react/factory";
861
1248
  import { sidebarStyles as sidebarStyles10, cn as cn33 } from "@cloudvoyant/helical-ui";
862
- import { jsx as jsx33 } from "react/jsx-runtime";
1249
+ import { jsx as jsx34 } from "react/jsx-runtime";
863
1250
  function MenuItem({ className, ...props }) {
864
- return /* @__PURE__ */ jsx33(
1251
+ return /* @__PURE__ */ jsx34(
865
1252
  ark20.li,
866
1253
  {
867
1254
  "data-slot": "sidebar-menu-item",
@@ -881,7 +1268,7 @@ import {
881
1268
  TooltipContent as ArkTooltipContent2
882
1269
  } from "@ark-ui/react/tooltip";
883
1270
  import { sidebarMenuButtonVariants, sidebarStyles as sidebarStyles11, cn as cn34 } from "@cloudvoyant/helical-ui";
884
- import { jsx as jsx34, jsxs as jsxs7 } from "react/jsx-runtime";
1271
+ import { jsx as jsx35, jsxs as jsxs7 } from "react/jsx-runtime";
885
1272
  function MenuButton({
886
1273
  asChild = false,
887
1274
  isActive = false,
@@ -893,7 +1280,7 @@ function MenuButton({
893
1280
  ...props
894
1281
  }) {
895
1282
  const { isMobile, state } = useSidebar();
896
- const button = /* @__PURE__ */ jsx34(
1283
+ const button = /* @__PURE__ */ jsx35(
897
1284
  ark21.button,
898
1285
  {
899
1286
  "data-slot": "sidebar-menu-button",
@@ -912,14 +1299,14 @@ function MenuButton({
912
1299
  }
913
1300
  const tooltipContent = typeof tooltip === "string" ? { children: tooltip } : tooltip;
914
1301
  return /* @__PURE__ */ jsxs7(TooltipRoot, { openDelay: 0, positioning: { placement: "right", gutter: 8 }, children: [
915
- /* @__PURE__ */ jsx34(TooltipTrigger2, { asChild: true, children: button }),
916
- /* @__PURE__ */ jsx34(TooltipPositioner, { children: /* @__PURE__ */ jsx34(ArkTooltipContent2, { className: cn34(sidebarStyles11.tooltipContentClass), ...tooltipContent }) })
1302
+ /* @__PURE__ */ jsx35(TooltipTrigger2, { asChild: true, children: button }),
1303
+ /* @__PURE__ */ jsx35(TooltipPositioner, { children: /* @__PURE__ */ jsx35(ArkTooltipContent2, { className: cn34(sidebarStyles11.tooltipContentClass), ...tooltipContent }) })
917
1304
  ] });
918
1305
  }
919
1306
 
920
1307
  // src/sidebar/MenuLink.tsx
921
1308
  import { sidebarStyles as sidebarStyles12, cn as cn35 } from "@cloudvoyant/helical-ui";
922
- import { Fragment as Fragment2, jsx as jsx35, jsxs as jsxs8 } from "react/jsx-runtime";
1309
+ import { Fragment as Fragment2, jsx as jsx36, jsxs as jsxs8 } from "react/jsx-runtime";
923
1310
  function MenuLink({
924
1311
  icon,
925
1312
  href,
@@ -933,9 +1320,9 @@ function MenuLink({
933
1320
  }) {
934
1321
  const content = /* @__PURE__ */ jsxs8(Fragment2, { children: [
935
1322
  icon,
936
- children != null && /* @__PURE__ */ jsx35("span", { children })
1323
+ children != null && /* @__PURE__ */ jsx36("span", { children })
937
1324
  ] });
938
- return /* @__PURE__ */ jsx35("li", { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: cn35(sidebarStyles12.menuItemClass), children: href == null ? /* @__PURE__ */ jsx35(
1325
+ return /* @__PURE__ */ jsx36("li", { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: cn35(sidebarStyles12.menuItemClass), children: href == null ? /* @__PURE__ */ jsx36(
939
1326
  MenuButton,
940
1327
  {
941
1328
  isActive,
@@ -946,20 +1333,20 @@ function MenuLink({
946
1333
  onClick,
947
1334
  children: content
948
1335
  }
949
- ) : /* @__PURE__ */ jsx35(MenuButton, { asChild: true, isActive, variant, size, tooltip, className, children: /* @__PURE__ */ jsx35("a", { href, onClick, children: content }) }) });
1336
+ ) : /* @__PURE__ */ jsx36(MenuButton, { asChild: true, isActive, variant, size, tooltip, className, children: /* @__PURE__ */ jsx36("a", { href, onClick, children: content }) }) });
950
1337
  }
951
1338
 
952
1339
  // src/sidebar/MenuAction.tsx
953
1340
  import { ark as ark22 } from "@ark-ui/react/factory";
954
1341
  import { sidebarStyles as sidebarStyles13, cn as cn36 } from "@cloudvoyant/helical-ui";
955
- import { jsx as jsx36 } from "react/jsx-runtime";
1342
+ import { jsx as jsx37 } from "react/jsx-runtime";
956
1343
  function MenuAction({
957
1344
  className,
958
1345
  asChild = false,
959
1346
  showOnHover = false,
960
1347
  ...props
961
1348
  }) {
962
- return /* @__PURE__ */ jsx36(
1349
+ return /* @__PURE__ */ jsx37(
963
1350
  ark22.button,
964
1351
  {
965
1352
  "data-slot": "sidebar-menu-action",
@@ -979,9 +1366,9 @@ function MenuAction({
979
1366
  // src/sidebar/MenuBadge.tsx
980
1367
  import { ark as ark23 } from "@ark-ui/react/factory";
981
1368
  import { sidebarStyles as sidebarStyles14, cn as cn37 } from "@cloudvoyant/helical-ui";
982
- import { jsx as jsx37 } from "react/jsx-runtime";
1369
+ import { jsx as jsx38 } from "react/jsx-runtime";
983
1370
  function MenuBadge({ className, ...props }) {
984
- return /* @__PURE__ */ jsx37(
1371
+ return /* @__PURE__ */ jsx38(
985
1372
  ark23.div,
986
1373
  {
987
1374
  "data-slot": "sidebar-menu-badge",
@@ -996,7 +1383,7 @@ function MenuBadge({ className, ...props }) {
996
1383
  import * as React3 from "react";
997
1384
  import { ark as ark24 } from "@ark-ui/react/factory";
998
1385
  import { sidebarStyles as sidebarStyles15, cn as cn38 } from "@cloudvoyant/helical-ui";
999
- import { jsx as jsx38, jsxs as jsxs9 } from "react/jsx-runtime";
1386
+ import { jsx as jsx39, jsxs as jsxs9 } from "react/jsx-runtime";
1000
1387
  function MenuSkeleton({ className, showIcon = false, ...props }) {
1001
1388
  const width = React3.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
1002
1389
  return /* @__PURE__ */ jsxs9(
@@ -1007,14 +1394,14 @@ function MenuSkeleton({ className, showIcon = false, ...props }) {
1007
1394
  className: cn38(sidebarStyles15.menuSkeletonClass, className),
1008
1395
  ...props,
1009
1396
  children: [
1010
- showIcon && /* @__PURE__ */ jsx38(
1397
+ showIcon && /* @__PURE__ */ jsx39(
1011
1398
  ark24.div,
1012
1399
  {
1013
1400
  className: "size-4 shrink-0 animate-pulse rounded-md bg-sidebar-accent",
1014
1401
  "data-sidebar": "menu-skeleton-icon"
1015
1402
  }
1016
1403
  ),
1017
- /* @__PURE__ */ jsx38(
1404
+ /* @__PURE__ */ jsx39(
1018
1405
  ark24.div,
1019
1406
  {
1020
1407
  className: "h-4 max-w-(--skeleton-width) flex-1 animate-pulse rounded-md bg-sidebar-accent",
@@ -1030,9 +1417,9 @@ function MenuSkeleton({ className, showIcon = false, ...props }) {
1030
1417
  // src/sidebar/MenuSub.tsx
1031
1418
  import { ark as ark25 } from "@ark-ui/react/factory";
1032
1419
  import { sidebarStyles as sidebarStyles16, cn as cn39 } from "@cloudvoyant/helical-ui";
1033
- import { jsx as jsx39 } from "react/jsx-runtime";
1420
+ import { jsx as jsx40 } from "react/jsx-runtime";
1034
1421
  function MenuSub({ className, ...props }) {
1035
- return /* @__PURE__ */ jsx39(
1422
+ return /* @__PURE__ */ jsx40(
1036
1423
  ark25.ul,
1037
1424
  {
1038
1425
  "data-slot": "sidebar-menu-sub",
@@ -1046,9 +1433,9 @@ function MenuSub({ className, ...props }) {
1046
1433
  // src/sidebar/MenuSubItem.tsx
1047
1434
  import { ark as ark26 } from "@ark-ui/react/factory";
1048
1435
  import { sidebarStyles as sidebarStyles17, cn as cn40 } from "@cloudvoyant/helical-ui";
1049
- import { jsx as jsx40 } from "react/jsx-runtime";
1436
+ import { jsx as jsx41 } from "react/jsx-runtime";
1050
1437
  function MenuSubItem({ className, ...props }) {
1051
- return /* @__PURE__ */ jsx40(
1438
+ return /* @__PURE__ */ jsx41(
1052
1439
  ark26.li,
1053
1440
  {
1054
1441
  "data-slot": "sidebar-menu-sub-item",
@@ -1062,7 +1449,7 @@ function MenuSubItem({ className, ...props }) {
1062
1449
  // src/sidebar/MenuSubButton.tsx
1063
1450
  import { ark as ark27 } from "@ark-ui/react/factory";
1064
1451
  import { sidebarStyles as sidebarStyles18, cn as cn41 } from "@cloudvoyant/helical-ui";
1065
- import { jsx as jsx41 } from "react/jsx-runtime";
1452
+ import { jsx as jsx42 } from "react/jsx-runtime";
1066
1453
  function MenuSubButton({
1067
1454
  asChild = false,
1068
1455
  size = "md",
@@ -1070,7 +1457,7 @@ function MenuSubButton({
1070
1457
  className,
1071
1458
  ...props
1072
1459
  }) {
1073
- return /* @__PURE__ */ jsx41(
1460
+ return /* @__PURE__ */ jsx42(
1074
1461
  ark27.a,
1075
1462
  {
1076
1463
  "data-slot": "sidebar-menu-sub-button",
@@ -1087,10 +1474,10 @@ function MenuSubButton({
1087
1474
  // src/sidebar/Trigger.tsx
1088
1475
  import { ark as ark28 } from "@ark-ui/react/factory";
1089
1476
  import { sidebarStyles as sidebarStyles19, cn as cn42 } from "@cloudvoyant/helical-ui";
1090
- import { jsx as jsx42 } from "react/jsx-runtime";
1477
+ import { jsx as jsx43 } from "react/jsx-runtime";
1091
1478
  function Trigger({ className, onClick, children, ...props }) {
1092
1479
  const { toggleSidebar } = useSidebar();
1093
- return /* @__PURE__ */ jsx42(
1480
+ return /* @__PURE__ */ jsx43(
1094
1481
  ark28.button,
1095
1482
  {
1096
1483
  "data-sidebar": "trigger",
@@ -1111,10 +1498,10 @@ function Trigger({ className, onClick, children, ...props }) {
1111
1498
  // src/sidebar/Rail.tsx
1112
1499
  import { ark as ark29 } from "@ark-ui/react/factory";
1113
1500
  import { sidebarStyles as sidebarStyles20, cn as cn43 } from "@cloudvoyant/helical-ui";
1114
- import { jsx as jsx43 } from "react/jsx-runtime";
1501
+ import { jsx as jsx44 } from "react/jsx-runtime";
1115
1502
  function Rail({ className, ...props }) {
1116
1503
  const { toggleSidebar } = useSidebar();
1117
- return /* @__PURE__ */ jsx43(
1504
+ return /* @__PURE__ */ jsx44(
1118
1505
  ark29.button,
1119
1506
  {
1120
1507
  "data-sidebar": "rail",
@@ -1133,17 +1520,17 @@ function Rail({ className, ...props }) {
1133
1520
  // src/sidebar/Inset.tsx
1134
1521
  import { ark as ark30 } from "@ark-ui/react/factory";
1135
1522
  import { sidebarStyles as sidebarStyles21, cn as cn44 } from "@cloudvoyant/helical-ui";
1136
- import { jsx as jsx44 } from "react/jsx-runtime";
1523
+ import { jsx as jsx45 } from "react/jsx-runtime";
1137
1524
  function Inset({ className, ...props }) {
1138
- return /* @__PURE__ */ jsx44(ark30.main, { "data-slot": "sidebar-inset", className: cn44(sidebarStyles21.insetClass, className), ...props });
1525
+ return /* @__PURE__ */ jsx45(ark30.main, { "data-slot": "sidebar-inset", className: cn44(sidebarStyles21.insetClass, className), ...props });
1139
1526
  }
1140
1527
 
1141
1528
  // src/sidebar/Input.tsx
1142
1529
  import { ark as ark31 } from "@ark-ui/react/factory";
1143
1530
  import { sidebarStyles as sidebarStyles22, cn as cn45 } from "@cloudvoyant/helical-ui";
1144
- import { jsx as jsx45 } from "react/jsx-runtime";
1531
+ import { jsx as jsx46 } from "react/jsx-runtime";
1145
1532
  function Input({ className, ...props }) {
1146
- return /* @__PURE__ */ jsx45(
1533
+ return /* @__PURE__ */ jsx46(
1147
1534
  ark31.input,
1148
1535
  {
1149
1536
  "data-slot": "sidebar-input",
@@ -1173,21 +1560,21 @@ import {
1173
1560
  tabsContentBase,
1174
1561
  cn as cn46
1175
1562
  } from "@cloudvoyant/helical-ui";
1176
- import { jsx as jsx46, jsxs as jsxs10 } from "react/jsx-runtime";
1563
+ import { jsx as jsx47, jsxs as jsxs10 } from "react/jsx-runtime";
1177
1564
  function Tabs({ className, lazyMount = true, unmountOnExit = true, ...props }) {
1178
- return /* @__PURE__ */ jsx46(TabsRoot, { lazyMount, unmountOnExit, className: cn46(tabsRootBase, className), ...props });
1565
+ return /* @__PURE__ */ jsx47(TabsRoot, { lazyMount, unmountOnExit, className: cn46(tabsRootBase, className), ...props });
1179
1566
  }
1180
1567
  function TabsList({ variant = "default", className, children, ...props }) {
1181
1568
  return /* @__PURE__ */ jsxs10(TabList, { className: cn46(tabsListBase, tabsListVariants({ variant }), className), ...props, children: [
1182
1569
  children,
1183
- /* @__PURE__ */ jsx46(TabIndicator, { className: cn46(tabsIndicatorBase, tabsIndicatorVariants({ variant })) })
1570
+ /* @__PURE__ */ jsx47(TabIndicator, { className: cn46(tabsIndicatorBase, tabsIndicatorVariants({ variant })) })
1184
1571
  ] });
1185
1572
  }
1186
1573
  function TabsTrigger({ className, ...props }) {
1187
- return /* @__PURE__ */ jsx46(TabTrigger, { className: cn46(tabsTriggerBase, className), ...props });
1574
+ return /* @__PURE__ */ jsx47(TabTrigger, { className: cn46(tabsTriggerBase, className), ...props });
1188
1575
  }
1189
1576
  function TabsContent({ className, ...props }) {
1190
- return /* @__PURE__ */ jsx46(TabContent, { className: cn46(tabsContentBase, className), ...props });
1577
+ return /* @__PURE__ */ jsx47(TabContent, { className: cn46(tabsContentBase, className), ...props });
1191
1578
  }
1192
1579
  var useTabs = useTabsContext;
1193
1580
 
@@ -1208,13 +1595,13 @@ import {
1208
1595
  paginationEllipsisBase,
1209
1596
  cn as cn47
1210
1597
  } from "@cloudvoyant/helical-ui";
1211
- import { jsx as jsx47, jsxs as jsxs11 } from "react/jsx-runtime";
1598
+ import { jsx as jsx48, jsxs as jsxs11 } from "react/jsx-runtime";
1212
1599
  function Pagination({ className, ...props }) {
1213
- return /* @__PURE__ */ jsx47(ArkPaginationRoot, { className: cn47(paginationRootBase, className), ...props });
1600
+ return /* @__PURE__ */ jsx48(ArkPaginationRoot, { className: cn47(paginationRootBase, className), ...props });
1214
1601
  }
1215
1602
  function PaginationPrevious(props) {
1216
- return /* @__PURE__ */ jsx47(PaginationPrevTrigger, { asChild: true, ...props, children: /* @__PURE__ */ jsxs11(ark32.button, { className: cn47(paginationTriggerBase), children: [
1217
- /* @__PURE__ */ jsx47(
1603
+ return /* @__PURE__ */ jsx48(PaginationPrevTrigger, { asChild: true, ...props, children: /* @__PURE__ */ jsxs11(ark32.button, { className: cn47(paginationTriggerBase), children: [
1604
+ /* @__PURE__ */ jsx48(
1218
1605
  "svg",
1219
1606
  {
1220
1607
  viewBox: "0 0 24 24",
@@ -1224,16 +1611,16 @@ function PaginationPrevious(props) {
1224
1611
  strokeLinecap: "round",
1225
1612
  strokeLinejoin: "round",
1226
1613
  "aria-hidden": "true",
1227
- children: /* @__PURE__ */ jsx47("path", { d: "m15 18-6-6 6-6" })
1614
+ children: /* @__PURE__ */ jsx48("path", { d: "m15 18-6-6 6-6" })
1228
1615
  }
1229
1616
  ),
1230
1617
  "Previous"
1231
1618
  ] }) });
1232
1619
  }
1233
1620
  function PaginationNext(props) {
1234
- return /* @__PURE__ */ jsx47(PaginationNextTrigger, { asChild: true, ...props, children: /* @__PURE__ */ jsxs11(ark32.button, { className: cn47(paginationTriggerBase), children: [
1621
+ return /* @__PURE__ */ jsx48(PaginationNextTrigger, { asChild: true, ...props, children: /* @__PURE__ */ jsxs11(ark32.button, { className: cn47(paginationTriggerBase), children: [
1235
1622
  "Next",
1236
- /* @__PURE__ */ jsx47(
1623
+ /* @__PURE__ */ jsx48(
1237
1624
  "svg",
1238
1625
  {
1239
1626
  viewBox: "0 0 24 24",
@@ -1243,21 +1630,21 @@ function PaginationNext(props) {
1243
1630
  strokeLinecap: "round",
1244
1631
  strokeLinejoin: "round",
1245
1632
  "aria-hidden": "true",
1246
- children: /* @__PURE__ */ jsx47("path", { d: "m9 18 6-6-6-6" })
1633
+ children: /* @__PURE__ */ jsx48("path", { d: "m9 18 6-6-6-6" })
1247
1634
  }
1248
1635
  )
1249
1636
  ] }) });
1250
1637
  }
1251
1638
  function PaginationItem({ className, children, ...rest }) {
1252
- return /* @__PURE__ */ jsx47(ArkPaginationItem, { asChild: true, ...rest, children: /* @__PURE__ */ jsx47(ark32.button, { className: cn47(paginationItemBase, className), children }) });
1639
+ return /* @__PURE__ */ jsx48(ArkPaginationItem, { asChild: true, ...rest, children: /* @__PURE__ */ jsx48(ark32.button, { className: cn47(paginationItemBase, className), children }) });
1253
1640
  }
1254
1641
  function PaginationItems() {
1255
- return /* @__PURE__ */ jsx47(ArkPaginationContext, { children: ({ pages }) => pages.map(
1256
- (page, index) => page.type === "page" ? /* @__PURE__ */ jsx47(PaginationItem, { type: "page", value: page.value, children: page.value }, page.value) : /* @__PURE__ */ jsx47(PaginationEllipsis, { index }, `ellipsis-${index}`)
1642
+ return /* @__PURE__ */ jsx48(ArkPaginationContext, { children: ({ pages }) => pages.map(
1643
+ (page, index) => page.type === "page" ? /* @__PURE__ */ jsx48(PaginationItem, { type: "page", value: page.value, children: page.value }, page.value) : /* @__PURE__ */ jsx48(PaginationEllipsis, { index }, `ellipsis-${index}`)
1257
1644
  ) });
1258
1645
  }
1259
1646
  function PaginationEllipsis({ className, ...rest }) {
1260
- return /* @__PURE__ */ jsx47(ArkPaginationEllipsis, { className: cn47(paginationEllipsisBase, className), ...rest, children: /* @__PURE__ */ jsxs11(
1647
+ return /* @__PURE__ */ jsx48(ArkPaginationEllipsis, { className: cn47(paginationEllipsisBase, className), ...rest, children: /* @__PURE__ */ jsxs11(
1261
1648
  "svg",
1262
1649
  {
1263
1650
  viewBox: "0 0 24 24",
@@ -1268,9 +1655,9 @@ function PaginationEllipsis({ className, ...rest }) {
1268
1655
  strokeLinejoin: "round",
1269
1656
  "aria-hidden": "true",
1270
1657
  children: [
1271
- /* @__PURE__ */ jsx47("circle", { cx: "12", cy: "12", r: "1" }),
1272
- /* @__PURE__ */ jsx47("circle", { cx: "19", cy: "12", r: "1" }),
1273
- /* @__PURE__ */ jsx47("circle", { cx: "5", cy: "12", r: "1" })
1658
+ /* @__PURE__ */ jsx48("circle", { cx: "12", cy: "12", r: "1" }),
1659
+ /* @__PURE__ */ jsx48("circle", { cx: "19", cy: "12", r: "1" }),
1660
+ /* @__PURE__ */ jsx48("circle", { cx: "5", cy: "12", r: "1" })
1274
1661
  ]
1275
1662
  }
1276
1663
  ) });
@@ -1330,7 +1717,7 @@ import {
1330
1717
  cn as cn48
1331
1718
  } from "@cloudvoyant/helical-ui";
1332
1719
  import { navbarMenuTriggerStyle as navbarMenuTriggerStyle2 } from "@cloudvoyant/helical-ui";
1333
- import { Fragment as Fragment3, jsx as jsx48, jsxs as jsxs12 } from "react/jsx-runtime";
1720
+ import { Fragment as Fragment3, jsx as jsx49, jsxs as jsxs12 } from "react/jsx-runtime";
1334
1721
  var SCROLL_THRESHOLD = 24;
1335
1722
  function resolveScrollContainer(el) {
1336
1723
  for (let n = el; n; n = n.parentElement) {
@@ -1390,7 +1777,7 @@ function NavbarProvider({ defaultOpen = false, children }) {
1390
1777
  }),
1391
1778
  [id, open, scrolled, hovered, slots, setSlot]
1392
1779
  );
1393
- return /* @__PURE__ */ jsx48(NavbarContext.Provider, { value: contextValue, children });
1780
+ return /* @__PURE__ */ jsx49(NavbarContext.Provider, { value: contextValue, children });
1394
1781
  }
1395
1782
  function Navbar({
1396
1783
  variant = "sticky",
@@ -1426,7 +1813,7 @@ function Navbar({
1426
1813
  el.style.overflow = prev;
1427
1814
  };
1428
1815
  }, [base.open]);
1429
- return /* @__PURE__ */ jsx48(NavbarContext.Provider, { value, children: /* @__PURE__ */ jsx48(
1816
+ return /* @__PURE__ */ jsx49(NavbarContext.Provider, { value, children: /* @__PURE__ */ jsx49(
1430
1817
  "header",
1431
1818
  {
1432
1819
  ref: headerRef,
@@ -1450,7 +1837,7 @@ function Navbar({
1450
1837
  }
1451
1838
  function NavbarActivationArea({ className, children, ...props }) {
1452
1839
  const { setHovered } = useNavbar();
1453
- return /* @__PURE__ */ jsx48(
1840
+ return /* @__PURE__ */ jsx49(
1454
1841
  ark33.div,
1455
1842
  {
1456
1843
  "data-slot": "navbar-activation-area",
@@ -1464,7 +1851,7 @@ function NavbarActivationArea({ className, children, ...props }) {
1464
1851
  }
1465
1852
  function NavbarBrand({ className, children, ...props }) {
1466
1853
  useNavbarSlot("brand", children);
1467
- return /* @__PURE__ */ jsx48(ark33.div, { "data-slot": "navbar-brand", className: cn48(navbarBrandBase, className), ...props, children });
1854
+ return /* @__PURE__ */ jsx49(ark33.div, { "data-slot": "navbar-brand", className: cn48(navbarBrandBase, className), ...props, children });
1468
1855
  }
1469
1856
  function NavbarMenu({
1470
1857
  placement = "center",
@@ -1474,7 +1861,7 @@ function NavbarMenu({
1474
1861
  }) {
1475
1862
  const { scrolled, density, variant } = useNavbar();
1476
1863
  const menuDensity = density === "compact" || variant === "shrink" && scrolled ? "compact" : "relaxed";
1477
- return /* @__PURE__ */ jsx48(NavbarMenuStyleContext.Provider, { value: { density: menuDensity, variant: "default", inContent: false }, children: /* @__PURE__ */ jsx48(
1864
+ return /* @__PURE__ */ jsx49(NavbarMenuStyleContext.Provider, { value: { density: menuDensity, variant: "default", inContent: false }, children: /* @__PURE__ */ jsx49(
1478
1865
  ark33.div,
1479
1866
  {
1480
1867
  "data-slot": "navbar-menu",
@@ -1482,13 +1869,13 @@ function NavbarMenu({
1482
1869
  className: cn48(navbarMenuBase, navbarMenuPlacementVariants({ placement }), className),
1483
1870
  children: /* @__PURE__ */ jsxs12(ArkNavMenuRoot, { "data-density": menuDensity, className: cn48(navbarMenuRootBase), ...props, children: [
1484
1871
  children,
1485
- /* @__PURE__ */ jsx48(ArkNavMenuViewportPositioner, { className: cn48(navbarMenuViewportPositionerBase), children: /* @__PURE__ */ jsx48(ArkNavMenuViewport, { className: cn48(navbarMenuViewportBase) }) })
1872
+ /* @__PURE__ */ jsx49(ArkNavMenuViewportPositioner, { className: cn48(navbarMenuViewportPositionerBase), children: /* @__PURE__ */ jsx49(ArkNavMenuViewport, { className: cn48(navbarMenuViewportBase) }) })
1486
1873
  ] })
1487
1874
  }
1488
1875
  ) });
1489
1876
  }
1490
1877
  function NavbarMenuList({ className, children, ...props }) {
1491
- return /* @__PURE__ */ jsx48(ArkNavMenuList, { className: cn48(navbarMenuListBase, className), ...props, children });
1878
+ return /* @__PURE__ */ jsx49(ArkNavMenuList, { className: cn48(navbarMenuListBase, className), ...props, children });
1492
1879
  }
1493
1880
  function NavbarMenuItem({
1494
1881
  variant = "default",
@@ -1496,11 +1883,11 @@ function NavbarMenuItem({
1496
1883
  ...props
1497
1884
  }) {
1498
1885
  const { density } = React4.useContext(NavbarMenuStyleContext);
1499
- return /* @__PURE__ */ jsx48(NavbarMenuStyleContext.Provider, { value: { density, variant, inContent: false }, children: /* @__PURE__ */ jsx48(ArkNavMenuItem, { "data-variant": variant, className: cn48(navbarMenuItemBase, className), ...props }) });
1886
+ return /* @__PURE__ */ jsx49(NavbarMenuStyleContext.Provider, { value: { density, variant, inContent: false }, children: /* @__PURE__ */ jsx49(ArkNavMenuItem, { "data-variant": variant, className: cn48(navbarMenuItemBase, className), ...props }) });
1500
1887
  }
1501
1888
  function NavbarMenuTrigger({ asChild, className, children, ...props }) {
1502
1889
  const { density, variant } = React4.useContext(NavbarMenuStyleContext);
1503
- const chevron = /* @__PURE__ */ jsx48(
1890
+ const chevron = /* @__PURE__ */ jsx49(
1504
1891
  "svg",
1505
1892
  {
1506
1893
  className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
@@ -1511,10 +1898,10 @@ function NavbarMenuTrigger({ asChild, className, children, ...props }) {
1511
1898
  strokeWidth: "2",
1512
1899
  strokeLinecap: "round",
1513
1900
  strokeLinejoin: "round",
1514
- children: /* @__PURE__ */ jsx48("path", { d: "m6 9 6 6 6-6" })
1901
+ children: /* @__PURE__ */ jsx49("path", { d: "m6 9 6 6 6-6" })
1515
1902
  }
1516
1903
  );
1517
- return /* @__PURE__ */ jsx48(
1904
+ return /* @__PURE__ */ jsx49(
1518
1905
  ArkNavMenuTrigger,
1519
1906
  {
1520
1907
  asChild,
@@ -1528,18 +1915,18 @@ function NavbarMenuTrigger({ asChild, className, children, ...props }) {
1528
1915
  );
1529
1916
  }
1530
1917
  function NavbarMenuContent({ className, children, ...props }) {
1531
- return /* @__PURE__ */ jsx48(NavbarMenuStyleContext.Provider, { value: { density: "relaxed", variant: "default", inContent: true }, children: /* @__PURE__ */ jsx48(ArkNavMenuContent, { className: cn48(navbarMenuContentBase, className), ...props, children }) });
1918
+ return /* @__PURE__ */ jsx49(NavbarMenuStyleContext.Provider, { value: { density: "relaxed", variant: "default", inContent: true }, children: /* @__PURE__ */ jsx49(ArkNavMenuContent, { className: cn48(navbarMenuContentBase, className), ...props, children }) });
1532
1919
  }
1533
1920
  function NavbarMenuLink({ className, children, ...props }) {
1534
1921
  const { density, variant, inContent } = React4.useContext(NavbarMenuStyleContext);
1535
1922
  const classes = inContent ? cn48(navbarMenuLinkBase, className) : cn48(navbarMenuTriggerStyle({ density, variant }), className);
1536
- return /* @__PURE__ */ jsx48(ArkNavMenuLink, { className: classes, ...props, children });
1923
+ return /* @__PURE__ */ jsx49(ArkNavMenuLink, { className: classes, ...props, children });
1537
1924
  }
1538
1925
  function NavbarMobileMenu({ className, children, ...props }) {
1539
- return /* @__PURE__ */ jsx48(CollapsibleRoot, { "data-slot": "navbar-mobile-menu", className: cn48("group", className), ...props, children });
1926
+ return /* @__PURE__ */ jsx49(CollapsibleRoot, { "data-slot": "navbar-mobile-menu", className: cn48("group", className), ...props, children });
1540
1927
  }
1541
1928
  function NavbarMobileMenuTrigger({ className, children, ...props }) {
1542
- return /* @__PURE__ */ jsx48(CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ jsxs12(
1929
+ return /* @__PURE__ */ jsx49(CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ jsxs12(
1543
1930
  "button",
1544
1931
  {
1545
1932
  type: "button",
@@ -1548,7 +1935,7 @@ function NavbarMobileMenuTrigger({ className, children, ...props }) {
1548
1935
  ...props,
1549
1936
  children: [
1550
1937
  children,
1551
- /* @__PURE__ */ jsx48(
1938
+ /* @__PURE__ */ jsx49(
1552
1939
  "svg",
1553
1940
  {
1554
1941
  className: "size-4 transition-transform duration-200 group-data-[state=open]:rotate-180",
@@ -1559,7 +1946,7 @@ function NavbarMobileMenuTrigger({ className, children, ...props }) {
1559
1946
  strokeWidth: "2",
1560
1947
  strokeLinecap: "round",
1561
1948
  strokeLinejoin: "round",
1562
- children: /* @__PURE__ */ jsx48("path", { d: "m6 9 6 6 6-6" })
1949
+ children: /* @__PURE__ */ jsx49("path", { d: "m6 9 6 6 6-6" })
1563
1950
  }
1564
1951
  )
1565
1952
  ]
@@ -1567,17 +1954,17 @@ function NavbarMobileMenuTrigger({ className, children, ...props }) {
1567
1954
  ) });
1568
1955
  }
1569
1956
  function NavbarMobileMenuContent({ className, children, ...props }) {
1570
- return /* @__PURE__ */ jsx48(CollapsibleContent, { children: /* @__PURE__ */ jsx48("div", { "data-slot": "navbar-mobile-menu-content", className: cn48(navbarMobileMenuContentBase, className), ...props, children }) });
1957
+ return /* @__PURE__ */ jsx49(CollapsibleContent, { children: /* @__PURE__ */ jsx49("div", { "data-slot": "navbar-mobile-menu-content", className: cn48(navbarMobileMenuContentBase, className), ...props, children }) });
1571
1958
  }
1572
1959
  function NavbarMenuViewport({ className, ...props }) {
1573
- return /* @__PURE__ */ jsx48(ArkNavMenuViewport, { className: cn48(navbarMenuViewportBase, className), ...props });
1960
+ return /* @__PURE__ */ jsx49(ArkNavMenuViewport, { className: cn48(navbarMenuViewportBase, className), ...props });
1574
1961
  }
1575
1962
  function NavbarMenuIndicator({ className, ...props }) {
1576
- return /* @__PURE__ */ jsx48(ArkNavMenuIndicator, { className: cn48(navbarMenuIndicatorBase, className), ...props });
1963
+ return /* @__PURE__ */ jsx49(ArkNavMenuIndicator, { className: cn48(navbarMenuIndicatorBase, className), ...props });
1577
1964
  }
1578
1965
  function NavbarActions({ className, children, ...props }) {
1579
1966
  useNavbarSlot("actions", children);
1580
- return /* @__PURE__ */ jsx48(ark33.div, { "data-slot": "navbar-actions", className: cn48(navbarActionsBase, className), ...props, children });
1967
+ return /* @__PURE__ */ jsx49(ark33.div, { "data-slot": "navbar-actions", className: cn48(navbarActionsBase, className), ...props, children });
1581
1968
  }
1582
1969
  function NavbarTrigger({
1583
1970
  className,
@@ -1586,7 +1973,7 @@ function NavbarTrigger({
1586
1973
  ...props
1587
1974
  }) {
1588
1975
  const { id, open, setOpen, floating } = useNavbar();
1589
- return /* @__PURE__ */ jsx48(
1976
+ return /* @__PURE__ */ jsx49(
1590
1977
  "button",
1591
1978
  {
1592
1979
  type: "button",
@@ -1609,9 +1996,9 @@ function NavbarTrigger({
1609
1996
  strokeLinejoin: "round",
1610
1997
  "aria-hidden": "true",
1611
1998
  children: [
1612
- /* @__PURE__ */ jsx48("line", { x1: "4", x2: "20", y1: "6", y2: "6" }),
1613
- /* @__PURE__ */ jsx48("line", { x1: "4", x2: "20", y1: "12", y2: "12" }),
1614
- /* @__PURE__ */ jsx48("line", { x1: "4", x2: "20", y1: "18", y2: "18" })
1999
+ /* @__PURE__ */ jsx49("line", { x1: "4", x2: "20", y1: "6", y2: "6" }),
2000
+ /* @__PURE__ */ jsx49("line", { x1: "4", x2: "20", y1: "12", y2: "12" }),
2001
+ /* @__PURE__ */ jsx49("line", { x1: "4", x2: "20", y1: "18", y2: "18" })
1615
2002
  ]
1616
2003
  }
1617
2004
  )
@@ -1628,9 +2015,9 @@ function NavbarMobileOverlay({ className, children, ...props }) {
1628
2015
  document.addEventListener("keydown", onKeydown);
1629
2016
  return () => document.removeEventListener("keydown", onKeydown);
1630
2017
  }, [open, setOpen]);
1631
- return /* @__PURE__ */ jsx48(Portal6, { container: portalRef, children: /* @__PURE__ */ jsxs12(DialogRoot, { open, lazyMount: true, unmountOnExit: true, onOpenChange: ({ open: open2 }) => setOpen(open2), preventScroll: false, children: [
1632
- /* @__PURE__ */ jsx48(DialogBackdrop2, { className: "absolute inset-0 z-[100] bg-background/60 backdrop-blur-sm" }),
1633
- /* @__PURE__ */ jsx48(DialogPositioner, { className: "absolute inset-0 z-[100]", children: /* @__PURE__ */ jsxs12(
2018
+ return /* @__PURE__ */ jsx49(Portal6, { container: portalRef, children: /* @__PURE__ */ jsxs12(DialogRoot, { open, lazyMount: true, unmountOnExit: true, onOpenChange: ({ open: open2 }) => setOpen(open2), preventScroll: false, children: [
2019
+ /* @__PURE__ */ jsx49(DialogBackdrop2, { className: "absolute inset-0 z-[100] bg-background/60 backdrop-blur-sm" }),
2020
+ /* @__PURE__ */ jsx49(DialogPositioner, { className: "absolute inset-0 z-[100]", children: /* @__PURE__ */ jsxs12(
1634
2021
  DialogContent2,
1635
2022
  {
1636
2023
  id,
@@ -1638,17 +2025,17 @@ function NavbarMobileOverlay({ className, children, ...props }) {
1638
2025
  className: cn48(navbarMobileContentBase, className),
1639
2026
  ...props,
1640
2027
  children: [
1641
- /* @__PURE__ */ jsx48(DialogTitle2, { className: "sr-only", children: "Navigation menu" }),
1642
- /* @__PURE__ */ jsx48(DialogDescription2, { className: "sr-only", children: "Mobile navigation menu" }),
2028
+ /* @__PURE__ */ jsx49(DialogTitle2, { className: "sr-only", children: "Navigation menu" }),
2029
+ /* @__PURE__ */ jsx49(DialogDescription2, { className: "sr-only", children: "Mobile navigation menu" }),
1643
2030
  /* @__PURE__ */ jsxs12("div", { className: navbarMobileHeaderBase, children: [
1644
2031
  slots.brand,
1645
- /* @__PURE__ */ jsx48(DialogCloseTrigger, { asChild: true, children: /* @__PURE__ */ jsx48(
2032
+ /* @__PURE__ */ jsx49(DialogCloseTrigger, { asChild: true, children: /* @__PURE__ */ jsx49(
1646
2033
  "button",
1647
2034
  {
1648
2035
  type: "button",
1649
2036
  "aria-label": "Close navigation menu",
1650
2037
  className: cn48(navbarTriggerVariants({ floating })),
1651
- children: /* @__PURE__ */ jsx48(
2038
+ children: /* @__PURE__ */ jsx49(
1652
2039
  "svg",
1653
2040
  {
1654
2041
  className: "size-4",
@@ -1659,14 +2046,14 @@ function NavbarMobileOverlay({ className, children, ...props }) {
1659
2046
  strokeLinecap: "round",
1660
2047
  strokeLinejoin: "round",
1661
2048
  "aria-hidden": "true",
1662
- children: /* @__PURE__ */ jsx48("path", { d: "M18 6 6 18M6 6l12 12" })
2049
+ children: /* @__PURE__ */ jsx49("path", { d: "M18 6 6 18M6 6l12 12" })
1663
2050
  }
1664
2051
  )
1665
2052
  }
1666
2053
  ) })
1667
2054
  ] }),
1668
- /* @__PURE__ */ jsx48("div", { className: navbarMobileMenuBase, children }),
1669
- slots.actions ? /* @__PURE__ */ jsx48("div", { className: navbarMobileActionsBase, children: slots.actions }) : null
2055
+ /* @__PURE__ */ jsx49("div", { className: navbarMobileMenuBase, children }),
2056
+ slots.actions ? /* @__PURE__ */ jsx49("div", { className: navbarMobileActionsBase, children: slots.actions }) : null
1670
2057
  ]
1671
2058
  }
1672
2059
  ) })
@@ -1700,50 +2087,50 @@ import {
1700
2087
  fieldsetErrorBase,
1701
2088
  cn as cn49
1702
2089
  } from "@cloudvoyant/helical-ui";
1703
- import { jsx as jsx49 } from "react/jsx-runtime";
2090
+ import { jsx as jsx50 } from "react/jsx-runtime";
1704
2091
  function Field({ className, ...props }) {
1705
- return /* @__PURE__ */ jsx49(ArkFieldRoot, { className: cn49(fieldRootBase, className), ...props });
2092
+ return /* @__PURE__ */ jsx50(ArkFieldRoot, { className: cn49(fieldRootBase, className), ...props });
1706
2093
  }
1707
2094
  function FieldLabel({ className, ...props }) {
1708
- return /* @__PURE__ */ jsx49(ArkFieldLabel, { className: cn49(fieldLabelBase, className), ...props });
2095
+ return /* @__PURE__ */ jsx50(ArkFieldLabel, { className: cn49(fieldLabelBase, className), ...props });
1709
2096
  }
1710
2097
  function FieldHelper({ className, ...props }) {
1711
- return /* @__PURE__ */ jsx49(ArkFieldHelperText, { className: cn49(fieldHelperBase, className), ...props });
2098
+ return /* @__PURE__ */ jsx50(ArkFieldHelperText, { className: cn49(fieldHelperBase, className), ...props });
1712
2099
  }
1713
2100
  function FieldError({ className, ...props }) {
1714
- return /* @__PURE__ */ jsx49(ArkFieldErrorText, { className: cn49(fieldErrorBase, className), ...props });
2101
+ return /* @__PURE__ */ jsx50(ArkFieldErrorText, { className: cn49(fieldErrorBase, className), ...props });
1715
2102
  }
1716
2103
  function FieldRequiredIndicator({ className, ...props }) {
1717
- return /* @__PURE__ */ jsx49(ArkFieldRequiredIndicator, { className: cn49(fieldRequiredIndicatorBase, className), ...props });
2104
+ return /* @__PURE__ */ jsx50(ArkFieldRequiredIndicator, { className: cn49(fieldRequiredIndicatorBase, className), ...props });
1718
2105
  }
1719
2106
  function FieldSet({ className, ...props }) {
1720
- return /* @__PURE__ */ jsx49(ArkFieldsetRoot, { className: cn49(fieldsetRootBase, className), ...props });
2107
+ return /* @__PURE__ */ jsx50(ArkFieldsetRoot, { className: cn49(fieldsetRootBase, className), ...props });
1721
2108
  }
1722
2109
  function FieldSetLegend({ className, ...props }) {
1723
- return /* @__PURE__ */ jsx49(ArkFieldsetLegend, { className: cn49(fieldsetLegendBase, className), ...props });
2110
+ return /* @__PURE__ */ jsx50(ArkFieldsetLegend, { className: cn49(fieldsetLegendBase, className), ...props });
1724
2111
  }
1725
2112
  function FieldSetHelper({ className, ...props }) {
1726
- return /* @__PURE__ */ jsx49(ArkFieldsetHelperText, { className: cn49(fieldsetHelperBase, className), ...props });
2113
+ return /* @__PURE__ */ jsx50(ArkFieldsetHelperText, { className: cn49(fieldsetHelperBase, className), ...props });
1727
2114
  }
1728
2115
  function FieldSetError({ className, ...props }) {
1729
- return /* @__PURE__ */ jsx49(ArkFieldsetErrorText, { className: cn49(fieldsetErrorBase, className), ...props });
2116
+ return /* @__PURE__ */ jsx50(ArkFieldsetErrorText, { className: cn49(fieldsetErrorBase, className), ...props });
1730
2117
  }
1731
2118
  var useField = useFieldContext;
1732
2119
 
1733
2120
  // src/input.tsx
1734
2121
  import { FieldInput } from "@ark-ui/react/field";
1735
2122
  import { inputVariants, cn as cn50 } from "@cloudvoyant/helical-ui";
1736
- import { jsx as jsx50 } from "react/jsx-runtime";
2123
+ import { jsx as jsx51 } from "react/jsx-runtime";
1737
2124
  function Input2({ className, size, ...props }) {
1738
- return /* @__PURE__ */ jsx50(FieldInput, { className: cn50(inputVariants({ size }), className), ...props });
2125
+ return /* @__PURE__ */ jsx51(FieldInput, { className: cn50(inputVariants({ size }), className), ...props });
1739
2126
  }
1740
2127
 
1741
2128
  // src/textarea.tsx
1742
2129
  import { FieldTextarea } from "@ark-ui/react/field";
1743
2130
  import { textareaBase, cn as cn51 } from "@cloudvoyant/helical-ui";
1744
- import { jsx as jsx51 } from "react/jsx-runtime";
2131
+ import { jsx as jsx52 } from "react/jsx-runtime";
1745
2132
  function Textarea({ className, ...props }) {
1746
- return /* @__PURE__ */ jsx51(FieldTextarea, { className: cn51(textareaBase, className), ...props });
2133
+ return /* @__PURE__ */ jsx52(FieldTextarea, { className: cn51(textareaBase, className), ...props });
1747
2134
  }
1748
2135
 
1749
2136
  // src/number-input.tsx
@@ -1762,18 +2149,18 @@ import {
1762
2149
  numberInputTriggerBase,
1763
2150
  cn as cn52
1764
2151
  } from "@cloudvoyant/helical-ui";
1765
- import { jsx as jsx52 } from "react/jsx-runtime";
2152
+ import { jsx as jsx53 } from "react/jsx-runtime";
1766
2153
  function NumberInput({ className, ...props }) {
1767
- return /* @__PURE__ */ jsx52(ArkNumberInputRoot, { className: cn52(numberInputRootBase, className), ...props });
2154
+ return /* @__PURE__ */ jsx53(ArkNumberInputRoot, { className: cn52(numberInputRootBase, className), ...props });
1768
2155
  }
1769
2156
  function NumberInputControl({ className, ...props }) {
1770
- return /* @__PURE__ */ jsx52(ArkNumberInputControl, { className: cn52(numberInputControlBase, className), ...props });
2157
+ return /* @__PURE__ */ jsx53(ArkNumberInputControl, { className: cn52(numberInputControlBase, className), ...props });
1771
2158
  }
1772
2159
  function NumberInputInput({ className, ...props }) {
1773
- return /* @__PURE__ */ jsx52(ArkNumberInputInput, { className: cn52(numberInputInputBase, className), ...props });
2160
+ return /* @__PURE__ */ jsx53(ArkNumberInputInput, { className: cn52(numberInputInputBase, className), ...props });
1774
2161
  }
1775
2162
  function NumberInputDecrement({ className, ...props }) {
1776
- return /* @__PURE__ */ jsx52(
2163
+ return /* @__PURE__ */ jsx53(
1777
2164
  ArkNumberInputDecrementTrigger,
1778
2165
  {
1779
2166
  "aria-label": "Decrement",
@@ -1783,7 +2170,7 @@ function NumberInputDecrement({ className, ...props }) {
1783
2170
  );
1784
2171
  }
1785
2172
  function NumberInputIncrement({ className, ...props }) {
1786
- return /* @__PURE__ */ jsx52(
2173
+ return /* @__PURE__ */ jsx53(
1787
2174
  ArkNumberInputIncrementTrigger,
1788
2175
  {
1789
2176
  "aria-label": "Increment",
@@ -1795,7 +2182,7 @@ function NumberInputIncrement({ className, ...props }) {
1795
2182
  var useNumberInput = useNumberInputContext;
1796
2183
 
1797
2184
  // src/checkbox.tsx
1798
- import { createContext as createContext4, useContext as useContext4 } from "react";
2185
+ import { createContext as createContext5, useContext as useContext5 } from "react";
1799
2186
  import {
1800
2187
  CheckboxRoot as ArkCheckboxRoot,
1801
2188
  CheckboxControl as ArkCheckboxControl,
@@ -1812,31 +2199,31 @@ import {
1812
2199
  checkboxGroupBase,
1813
2200
  cn as cn53
1814
2201
  } from "@cloudvoyant/helical-ui";
1815
- import { jsx as jsx53, jsxs as jsxs13 } from "react/jsx-runtime";
1816
- var CheckboxSizeContext = createContext4("md");
2202
+ import { jsx as jsx54, jsxs as jsxs13 } from "react/jsx-runtime";
2203
+ var CheckboxSizeContext = createContext5("md");
1817
2204
  function Checkbox({ className, size = "md", children, ...props }) {
1818
- return /* @__PURE__ */ jsx53(CheckboxSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsxs13(ArkCheckboxRoot, { className: cn53("flex items-center gap-2", className), ...props, children: [
2205
+ return /* @__PURE__ */ jsx54(CheckboxSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsxs13(ArkCheckboxRoot, { className: cn53("flex items-center gap-2", className), ...props, children: [
1819
2206
  children,
1820
- /* @__PURE__ */ jsx53(ArkCheckboxHiddenInput, {})
2207
+ /* @__PURE__ */ jsx54(ArkCheckboxHiddenInput, {})
1821
2208
  ] }) });
1822
2209
  }
1823
2210
  function CheckboxControl({ className, ...props }) {
1824
- const size = useContext4(CheckboxSizeContext);
1825
- return /* @__PURE__ */ jsx53(ArkCheckboxControl, { className: cn53(checkboxVariants({ size }), className), ...props });
2211
+ const size = useContext5(CheckboxSizeContext);
2212
+ return /* @__PURE__ */ jsx54(ArkCheckboxControl, { className: cn53(checkboxVariants({ size }), className), ...props });
1826
2213
  }
1827
2214
  function CheckboxIndicator({ className, ...props }) {
1828
- return /* @__PURE__ */ jsx53(ArkCheckboxIndicator, { className: cn53(checkboxIndicatorBase, className), ...props });
2215
+ return /* @__PURE__ */ jsx54(ArkCheckboxIndicator, { className: cn53(checkboxIndicatorBase, className), ...props });
1829
2216
  }
1830
2217
  function CheckboxLabel({ className, ...props }) {
1831
- return /* @__PURE__ */ jsx53(ArkCheckboxLabel, { className: cn53(checkboxLabelBase, className), ...props });
2218
+ return /* @__PURE__ */ jsx54(ArkCheckboxLabel, { className: cn53(checkboxLabelBase, className), ...props });
1832
2219
  }
1833
2220
  function CheckboxGroup({ className, ...props }) {
1834
- return /* @__PURE__ */ jsx53(ArkCheckboxGroup, { className: cn53(checkboxGroupBase, className), ...props });
2221
+ return /* @__PURE__ */ jsx54(ArkCheckboxGroup, { className: cn53(checkboxGroupBase, className), ...props });
1835
2222
  }
1836
2223
  var useCheckbox = useCheckboxContext;
1837
2224
 
1838
2225
  // src/switch.tsx
1839
- import { createContext as createContext5, useContext as useContext5 } from "react";
2226
+ import { createContext as createContext6, useContext as useContext6 } from "react";
1840
2227
  import {
1841
2228
  SwitchRoot as ArkSwitchRoot,
1842
2229
  SwitchControl as ArkSwitchControl,
@@ -1846,23 +2233,23 @@ import {
1846
2233
  useSwitchContext
1847
2234
  } from "@ark-ui/react/switch";
1848
2235
  import { switchVariants, switchControlBase, switchThumbBase, switchLabelBase, cn as cn54 } from "@cloudvoyant/helical-ui";
1849
- import { jsx as jsx54, jsxs as jsxs14 } from "react/jsx-runtime";
1850
- var SwitchSizeContext = createContext5("md");
2236
+ import { jsx as jsx55, jsxs as jsxs14 } from "react/jsx-runtime";
2237
+ var SwitchSizeContext = createContext6("md");
1851
2238
  function Switch({ className, size = "md", children, ...props }) {
1852
- return /* @__PURE__ */ jsx54(SwitchSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsxs14(ArkSwitchRoot, { className: cn54("flex items-center gap-2", className), ...props, children: [
2239
+ return /* @__PURE__ */ jsx55(SwitchSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsxs14(ArkSwitchRoot, { className: cn54("flex items-center gap-2", className), ...props, children: [
1853
2240
  children,
1854
- /* @__PURE__ */ jsx54(ArkSwitchHiddenInput, {})
2241
+ /* @__PURE__ */ jsx55(ArkSwitchHiddenInput, {})
1855
2242
  ] }) });
1856
2243
  }
1857
2244
  function SwitchControl({ className, ...props }) {
1858
- const size = useContext5(SwitchSizeContext);
1859
- return /* @__PURE__ */ jsx54(ArkSwitchControl, { className: cn54(switchVariants({ size }), switchControlBase, className), ...props });
2245
+ const size = useContext6(SwitchSizeContext);
2246
+ return /* @__PURE__ */ jsx55(ArkSwitchControl, { className: cn54(switchVariants({ size }), switchControlBase, className), ...props });
1860
2247
  }
1861
2248
  function SwitchThumb({ className, ...props }) {
1862
- return /* @__PURE__ */ jsx54(ArkSwitchThumb, { className: cn54(switchThumbBase, className), ...props });
2249
+ return /* @__PURE__ */ jsx55(ArkSwitchThumb, { className: cn54(switchThumbBase, className), ...props });
1863
2250
  }
1864
2251
  function SwitchLabel({ className, ...props }) {
1865
- return /* @__PURE__ */ jsx54(ArkSwitchLabel, { className: cn54(switchLabelBase, className), ...props });
2252
+ return /* @__PURE__ */ jsx55(ArkSwitchLabel, { className: cn54(switchLabelBase, className), ...props });
1866
2253
  }
1867
2254
  var useSwitch = useSwitchContext;
1868
2255
 
@@ -1906,9 +2293,9 @@ import {
1906
2293
  } from "@cloudvoyant/helical-ui";
1907
2294
 
1908
2295
  // src/use-media-query.ts
1909
- import { useSyncExternalStore } from "react";
2296
+ import { useSyncExternalStore as useSyncExternalStore2 } from "react";
1910
2297
  function useMediaQuery(query) {
1911
- return useSyncExternalStore(
2298
+ return useSyncExternalStore2(
1912
2299
  (onStoreChange) => {
1913
2300
  const mql = window.matchMedia(query);
1914
2301
  mql.addEventListener("change", onStoreChange);
@@ -1920,7 +2307,7 @@ function useMediaQuery(query) {
1920
2307
  }
1921
2308
 
1922
2309
  // src/select.tsx
1923
- import { jsx as jsx55, jsxs as jsxs15 } from "react/jsx-runtime";
2310
+ import { jsx as jsx56, jsxs as jsxs15 } from "react/jsx-runtime";
1924
2311
  function Select({ items, collection, size, children, ...props }) {
1925
2312
  const isCoarse = useMediaQuery("(pointer: coarse)");
1926
2313
  const resolvedCollection = useMemo4(
@@ -1928,7 +2315,7 @@ function Select({ items, collection, size, children, ...props }) {
1928
2315
  [collection, items]
1929
2316
  );
1930
2317
  if (isCoarse && items) {
1931
- return /* @__PURE__ */ jsx55(
2318
+ return /* @__PURE__ */ jsx56(
1932
2319
  SelectNative,
1933
2320
  {
1934
2321
  items,
@@ -1946,42 +2333,42 @@ function Select({ items, collection, size, children, ...props }) {
1946
2333
  }
1947
2334
  return /* @__PURE__ */ jsxs15(ArkSelectRoot, { collection: resolvedCollection, ...props, children: [
1948
2335
  children,
1949
- /* @__PURE__ */ jsx55(ArkSelectHiddenSelect, {})
2336
+ /* @__PURE__ */ jsx56(ArkSelectHiddenSelect, {})
1950
2337
  ] });
1951
2338
  }
1952
2339
  function SelectTrigger({ size = "md", className, ...props }) {
1953
- return /* @__PURE__ */ jsx55(ArkSelectTrigger, { className: cn55(inputVariants2({ size }), selectTriggerBase, className), ...props });
2340
+ return /* @__PURE__ */ jsx56(ArkSelectTrigger, { className: cn55(inputVariants2({ size }), selectTriggerBase, className), ...props });
1954
2341
  }
1955
2342
  function SelectValue({ className, ...props }) {
1956
- return /* @__PURE__ */ jsx55(ArkSelectValueText, { className: cn55(selectValueBase, className), ...props });
2343
+ return /* @__PURE__ */ jsx56(ArkSelectValueText, { className: cn55(selectValueBase, className), ...props });
1957
2344
  }
1958
2345
  function SelectIndicator({ className, ...props }) {
1959
- return /* @__PURE__ */ jsx55(ArkSelectIndicator, { className: cn55(selectIndicatorBase, className), ...props });
2346
+ return /* @__PURE__ */ jsx56(ArkSelectIndicator, { className: cn55(selectIndicatorBase, className), ...props });
1960
2347
  }
1961
2348
  function SelectClearTrigger({ className, ...props }) {
1962
- return /* @__PURE__ */ jsx55(ArkSelectClearTrigger, { "aria-label": "Clear selection", className: cn55(selectClearTriggerBase, className), ...props });
2349
+ return /* @__PURE__ */ jsx56(ArkSelectClearTrigger, { "aria-label": "Clear selection", className: cn55(selectClearTriggerBase, className), ...props });
1963
2350
  }
1964
2351
  function SelectContent({ className, ...props }) {
1965
- return /* @__PURE__ */ jsx55(Portal7, { children: /* @__PURE__ */ jsx55(ArkSelectPositioner, { className: selectPositionerBase, children: /* @__PURE__ */ jsx55(ArkSelectContent, { className: cn55(selectContentBase, className), ...props }) }) });
2352
+ return /* @__PURE__ */ jsx56(Portal7, { children: /* @__PURE__ */ jsx56(ArkSelectPositioner, { className: selectPositionerBase, children: /* @__PURE__ */ jsx56(ArkSelectContent, { className: cn55(selectContentBase, className), ...props }) }) });
1966
2353
  }
1967
2354
  function SelectItemGroup({ className, ...props }) {
1968
- return /* @__PURE__ */ jsx55(ArkSelectItemGroup, { className, ...props });
2355
+ return /* @__PURE__ */ jsx56(ArkSelectItemGroup, { className, ...props });
1969
2356
  }
1970
2357
  function SelectItemGroupLabel({ className, ...props }) {
1971
- return /* @__PURE__ */ jsx55(ArkSelectItemGroupLabel, { className: cn55(selectItemGroupLabelBase, className), ...props });
2358
+ return /* @__PURE__ */ jsx56(ArkSelectItemGroupLabel, { className: cn55(selectItemGroupLabelBase, className), ...props });
1972
2359
  }
1973
2360
  function SelectItem({ item, className, ...props }) {
1974
- return /* @__PURE__ */ jsx55(ArkSelectItem, { item, className: cn55(selectItemBase, className), ...props });
2361
+ return /* @__PURE__ */ jsx56(ArkSelectItem, { item, className: cn55(selectItemBase, className), ...props });
1975
2362
  }
1976
2363
  function SelectItemText({ className, ...props }) {
1977
- return /* @__PURE__ */ jsx55(ArkSelectItemText, { className: cn55(selectItemTextBase, className), ...props });
2364
+ return /* @__PURE__ */ jsx56(ArkSelectItemText, { className: cn55(selectItemTextBase, className), ...props });
1978
2365
  }
1979
2366
  function SelectItemIndicator({ className, ...props }) {
1980
- return /* @__PURE__ */ jsx55(ArkSelectItemIndicator, { className: cn55(selectItemIndicatorBase, className), ...props });
2367
+ return /* @__PURE__ */ jsx56(ArkSelectItemIndicator, { className: cn55(selectItemIndicatorBase, className), ...props });
1981
2368
  }
1982
2369
  var useSelect = useSelectContext;
1983
2370
  function ChevronDownIcon() {
1984
- return /* @__PURE__ */ jsx55(
2371
+ return /* @__PURE__ */ jsx56(
1985
2372
  "svg",
1986
2373
  {
1987
2374
  viewBox: "0 0 24 24",
@@ -1991,7 +2378,7 @@ function ChevronDownIcon() {
1991
2378
  strokeLinecap: "round",
1992
2379
  strokeLinejoin: "round",
1993
2380
  "aria-hidden": true,
1994
- children: /* @__PURE__ */ jsx55("path", { d: "m6 9 6 6 6-6" })
2381
+ children: /* @__PURE__ */ jsx56("path", { d: "m6 9 6 6 6-6" })
1995
2382
  }
1996
2383
  );
1997
2384
  }
@@ -2007,7 +2394,7 @@ function SelectNative({
2007
2394
  ...props
2008
2395
  }) {
2009
2396
  return /* @__PURE__ */ jsxs15(ark34.div, { className: cn55(nativeSelectWrapperBase, className), children: [
2010
- /* @__PURE__ */ jsx55(
2397
+ /* @__PURE__ */ jsx56(
2011
2398
  ark34.select,
2012
2399
  {
2013
2400
  className: nativeSelectVariants({ size }),
@@ -2016,10 +2403,10 @@ function SelectNative({
2016
2403
  onChange: (event) => onValueChange?.(event.currentTarget.value),
2017
2404
  "aria-invalid": invalid,
2018
2405
  ...props,
2019
- children: items.map((item) => /* @__PURE__ */ jsx55(ark34.option, { value: item.value, disabled: item.disabled, children: item.label }, item.value))
2406
+ children: items.map((item) => /* @__PURE__ */ jsx56(ark34.option, { value: item.value, disabled: item.disabled, children: item.label }, item.value))
2020
2407
  }
2021
2408
  ),
2022
- /* @__PURE__ */ jsx55(ark34.span, { className: nativeSelectIconBase, "aria-hidden": true, children: icon ?? /* @__PURE__ */ jsx55(ChevronDownIcon, {}) })
2409
+ /* @__PURE__ */ jsx56(ark34.span, { className: nativeSelectIconBase, "aria-hidden": true, children: icon ?? /* @__PURE__ */ jsx56(ChevronDownIcon, {}) })
2023
2410
  ] });
2024
2411
  }
2025
2412
 
@@ -2059,7 +2446,7 @@ import {
2059
2446
  comboboxEmptyBase,
2060
2447
  cn as cn56
2061
2448
  } from "@cloudvoyant/helical-ui";
2062
- import { jsx as jsx56 } from "react/jsx-runtime";
2449
+ import { jsx as jsx57 } from "react/jsx-runtime";
2063
2450
  function Combobox({
2064
2451
  items,
2065
2452
  collection,
@@ -2072,7 +2459,7 @@ function Combobox({
2072
2459
  () => collection ?? createListCollection2({ items: items ?? [] }),
2073
2460
  [collection, items]
2074
2461
  );
2075
- return /* @__PURE__ */ jsx56(
2462
+ return /* @__PURE__ */ jsx57(
2076
2463
  ArkComboboxRoot,
2077
2464
  {
2078
2465
  collection: resolvedCollection,
@@ -2084,28 +2471,28 @@ function Combobox({
2084
2471
  );
2085
2472
  }
2086
2473
  function ComboboxControl({ className, ...props }) {
2087
- return /* @__PURE__ */ jsx56(ArkComboboxControl, { className: cn56(comboboxControlBase, className), ...props });
2474
+ return /* @__PURE__ */ jsx57(ArkComboboxControl, { className: cn56(comboboxControlBase, className), ...props });
2088
2475
  }
2089
2476
  function ComboboxInput({ size = "md", className, ...props }) {
2090
- return /* @__PURE__ */ jsx56(ArkComboboxInput, { className: cn56(inputVariants3({ size }), comboboxInputBase, className), ...props });
2477
+ return /* @__PURE__ */ jsx57(ArkComboboxInput, { className: cn56(inputVariants3({ size }), comboboxInputBase, className), ...props });
2091
2478
  }
2092
2479
  function ComboboxTrigger({ className, ...props }) {
2093
- return /* @__PURE__ */ jsx56(ArkComboboxTrigger, { className: cn56(comboboxTriggerBase, className), ...props });
2480
+ return /* @__PURE__ */ jsx57(ArkComboboxTrigger, { className: cn56(comboboxTriggerBase, className), ...props });
2094
2481
  }
2095
2482
  function ComboboxClear({ className, ...props }) {
2096
- return /* @__PURE__ */ jsx56(ArkComboboxClearTrigger, { "aria-label": "Clear", className: cn56(comboboxClearTriggerBase, className), ...props });
2483
+ return /* @__PURE__ */ jsx57(ArkComboboxClearTrigger, { "aria-label": "Clear", className: cn56(comboboxClearTriggerBase, className), ...props });
2097
2484
  }
2098
2485
  function ComboboxContent({ className, ...props }) {
2099
- return /* @__PURE__ */ jsx56(Portal8, { children: /* @__PURE__ */ jsx56(ArkComboboxPositioner, { className: comboboxPositionerBase, children: /* @__PURE__ */ jsx56(ArkComboboxContent, { className: cn56(comboboxContentBase, className), ...props }) }) });
2486
+ return /* @__PURE__ */ jsx57(Portal8, { children: /* @__PURE__ */ jsx57(ArkComboboxPositioner, { className: comboboxPositionerBase, children: /* @__PURE__ */ jsx57(ArkComboboxContent, { className: cn56(comboboxContentBase, className), ...props }) }) });
2100
2487
  }
2101
2488
  function ComboboxItemGroup({ className, ...props }) {
2102
- return /* @__PURE__ */ jsx56(ArkComboboxItemGroup, { className, ...props });
2489
+ return /* @__PURE__ */ jsx57(ArkComboboxItemGroup, { className, ...props });
2103
2490
  }
2104
2491
  function ComboboxItemGroupLabel({ className, ...props }) {
2105
- return /* @__PURE__ */ jsx56(ArkComboboxItemGroupLabel, { className: cn56(comboboxItemGroupLabelBase, className), ...props });
2492
+ return /* @__PURE__ */ jsx57(ArkComboboxItemGroupLabel, { className: cn56(comboboxItemGroupLabelBase, className), ...props });
2106
2493
  }
2107
2494
  function ComboboxItem({ item, showIndicator = true, className, ...props }) {
2108
- return /* @__PURE__ */ jsx56(
2495
+ return /* @__PURE__ */ jsx57(
2109
2496
  ArkComboboxItem,
2110
2497
  {
2111
2498
  item,
@@ -2116,16 +2503,16 @@ function ComboboxItem({ item, showIndicator = true, className, ...props }) {
2116
2503
  );
2117
2504
  }
2118
2505
  function ComboboxItemText({ className, ...props }) {
2119
- return /* @__PURE__ */ jsx56(ArkComboboxItemText, { className, ...props });
2506
+ return /* @__PURE__ */ jsx57(ArkComboboxItemText, { className, ...props });
2120
2507
  }
2121
2508
  function ComboboxItemIndicator({ className, ...props }) {
2122
- return /* @__PURE__ */ jsx56(ArkComboboxItemIndicator, { className: cn56(comboboxItemIndicatorBase, className), ...props });
2509
+ return /* @__PURE__ */ jsx57(ArkComboboxItemIndicator, { className: cn56(comboboxItemIndicatorBase, className), ...props });
2123
2510
  }
2124
2511
  function ComboboxList({ className, ...props }) {
2125
- return /* @__PURE__ */ jsx56(ArkComboboxList, { className: cn56(comboboxListBase, className), ...props });
2512
+ return /* @__PURE__ */ jsx57(ArkComboboxList, { className: cn56(comboboxListBase, className), ...props });
2126
2513
  }
2127
2514
  function ComboboxEmpty({ className, children, ...props }) {
2128
- return /* @__PURE__ */ jsx56(ArkComboboxEmpty, { className: cn56(comboboxEmptyBase, className), ...props, children: children ?? "No results found." });
2515
+ return /* @__PURE__ */ jsx57(ArkComboboxEmpty, { className: cn56(comboboxEmptyBase, className), ...props, children: children ?? "No results found." });
2129
2516
  }
2130
2517
  var useCombobox = useComboboxContext;
2131
2518
 
@@ -2155,33 +2542,33 @@ import {
2155
2542
  tagsInputClearTriggerBase,
2156
2543
  cn as cn57
2157
2544
  } from "@cloudvoyant/helical-ui";
2158
- import { jsx as jsx57, jsxs as jsxs16 } from "react/jsx-runtime";
2545
+ import { jsx as jsx58, jsxs as jsxs16 } from "react/jsx-runtime";
2159
2546
  function TagInput({ className, editable = false, children, ...props }) {
2160
2547
  return /* @__PURE__ */ jsxs16(ArkTagsInputRoot, { className: cn57(tagsInputRootBase, className), editable, ...props, children: [
2161
2548
  children,
2162
- /* @__PURE__ */ jsx57(ArkTagsInputHiddenInput, {})
2549
+ /* @__PURE__ */ jsx58(ArkTagsInputHiddenInput, {})
2163
2550
  ] });
2164
2551
  }
2165
2552
  function TagInputControl({ className, ...props }) {
2166
- return /* @__PURE__ */ jsx57(ArkTagsInputControl, { className: cn57(tagsInputControlBase, className), ...props });
2553
+ return /* @__PURE__ */ jsx58(ArkTagsInputControl, { className: cn57(tagsInputControlBase, className), ...props });
2167
2554
  }
2168
2555
  function TagInputInput({ className, ...props }) {
2169
- return /* @__PURE__ */ jsx57(ArkTagsInputInput, { className: cn57(tagsInputInputBase, className), ...props });
2556
+ return /* @__PURE__ */ jsx58(ArkTagsInputInput, { className: cn57(tagsInputInputBase, className), ...props });
2170
2557
  }
2171
2558
  function TagInputItem({ className, ...props }) {
2172
- return /* @__PURE__ */ jsx57(ArkTagsInputItem, { className: cn57(tagsInputItemBase, className), ...props });
2559
+ return /* @__PURE__ */ jsx58(ArkTagsInputItem, { className: cn57(tagsInputItemBase, className), ...props });
2173
2560
  }
2174
2561
  function TagInputItemPreview({ className, ...props }) {
2175
- return /* @__PURE__ */ jsx57(ArkTagsInputItemPreview, { className, ...props });
2562
+ return /* @__PURE__ */ jsx58(ArkTagsInputItemPreview, { className, ...props });
2176
2563
  }
2177
2564
  function TagInputItemText({ className, ...props }) {
2178
- return /* @__PURE__ */ jsx57(ArkTagsInputItemText, { className: cn57(tagsInputItemTextBase, className), ...props });
2565
+ return /* @__PURE__ */ jsx58(ArkTagsInputItemText, { className: cn57(tagsInputItemTextBase, className), ...props });
2179
2566
  }
2180
2567
  function TagInputItemInput({ className, ...props }) {
2181
- return /* @__PURE__ */ jsx57(ArkTagsInputItemInput, { className: cn57(tagsInputItemInputBase, className), ...props });
2568
+ return /* @__PURE__ */ jsx58(ArkTagsInputItemInput, { className: cn57(tagsInputItemInputBase, className), ...props });
2182
2569
  }
2183
2570
  function TagInputItemDeleteTrigger({ className, ...props }) {
2184
- return /* @__PURE__ */ jsx57(
2571
+ return /* @__PURE__ */ jsx58(
2185
2572
  ArkTagsInputItemDeleteTrigger,
2186
2573
  {
2187
2574
  "aria-label": "Remove tag",
@@ -2191,7 +2578,7 @@ function TagInputItemDeleteTrigger({ className, ...props }) {
2191
2578
  );
2192
2579
  }
2193
2580
  function TagInputClearTrigger({ className, ...props }) {
2194
- return /* @__PURE__ */ jsx57(
2581
+ return /* @__PURE__ */ jsx58(
2195
2582
  ArkTagsInputClearTrigger,
2196
2583
  {
2197
2584
  "aria-label": "Clear all tags",
@@ -2204,7 +2591,7 @@ var TagInputContext = ArkTagsInputContext;
2204
2591
  var useTagInput = useTagsInputContext;
2205
2592
 
2206
2593
  // src/mermaid.tsx
2207
- import { useEffect as useEffect3, useState as useState3 } from "react";
2594
+ import { useEffect as useEffect4, useState as useState3 } from "react";
2208
2595
  import { ark as ark35 } from "@ark-ui/react/factory";
2209
2596
  import {
2210
2597
  mermaidRootBase,
@@ -2215,12 +2602,12 @@ import {
2215
2602
  mermaidSvgAspectRatio,
2216
2603
  cn as cn58
2217
2604
  } from "@cloudvoyant/helical-ui";
2218
- import { Fragment as Fragment4, jsx as jsx58, jsxs as jsxs17 } from "react/jsx-runtime";
2605
+ import { Fragment as Fragment4, jsx as jsx59, jsxs as jsxs17 } from "react/jsx-runtime";
2219
2606
  function Mermaid({ code, svg, className, ...props }) {
2220
2607
  const [status, setStatus] = useState3(svg === void 0 ? "loading" : "done");
2221
2608
  const [rendered, setRendered] = useState3(svg ?? null);
2222
2609
  const aspectRatio = rendered === null ? void 0 : mermaidSvgAspectRatio(rendered);
2223
- useEffect3(() => {
2610
+ useEffect4(() => {
2224
2611
  if (svg !== void 0) return;
2225
2612
  let cancelled = false;
2226
2613
  setStatus("loading");
@@ -2237,7 +2624,7 @@ function Mermaid({ code, svg, className, ...props }) {
2237
2624
  cancelled = true;
2238
2625
  };
2239
2626
  }, [code, svg]);
2240
- return /* @__PURE__ */ jsx58(
2627
+ return /* @__PURE__ */ jsx59(
2241
2628
  ark35.div,
2242
2629
  {
2243
2630
  ...props,
@@ -2246,22 +2633,22 @@ function Mermaid({ code, svg, className, ...props }) {
2246
2633
  "data-mermaid-state": status,
2247
2634
  style: aspectRatio === void 0 ? props.style : { ...props.style, aspectRatio },
2248
2635
  className: cn58(mermaidRootBase, className),
2249
- children: rendered === null ? status === "error" ? /* @__PURE__ */ jsx58("pre", { className: mermaidSourceBase, children: code }) : /* @__PURE__ */ jsxs17(Fragment4, { children: [
2636
+ children: rendered === null ? status === "error" ? /* @__PURE__ */ jsx59("pre", { className: mermaidSourceBase, children: code }) : /* @__PURE__ */ jsxs17(Fragment4, { children: [
2250
2637
  /* @__PURE__ */ jsxs17("div", { className: mermaidLoadingBase, role: "status", "aria-label": "Rendering diagram", "data-mermaid-loading": true, children: [
2251
- /* @__PURE__ */ jsx58(
2638
+ /* @__PURE__ */ jsx59(
2252
2639
  "span",
2253
2640
  {
2254
2641
  "aria-hidden": "true",
2255
2642
  className: "h-5 w-5 shrink-0 animate-spin rounded-full border-2 border-muted-foreground/25 border-t-muted-foreground"
2256
2643
  }
2257
2644
  ),
2258
- /* @__PURE__ */ jsx58("span", { className: "text-sm text-muted-foreground", children: "Rendering diagram" })
2645
+ /* @__PURE__ */ jsx59("span", { className: "text-sm text-muted-foreground", children: "Rendering diagram" })
2259
2646
  ] }),
2260
2647
  /* @__PURE__ */ jsxs17("noscript", { children: [
2261
- /* @__PURE__ */ jsx58("style", { children: "[data-mermaid-loading]{display:none}" }),
2262
- /* @__PURE__ */ jsx58("pre", { className: mermaidSourceBase, children: code })
2648
+ /* @__PURE__ */ jsx59("style", { children: "[data-mermaid-loading]{display:none}" }),
2649
+ /* @__PURE__ */ jsx59("pre", { className: mermaidSourceBase, children: code })
2263
2650
  ] })
2264
- ] }) : /* @__PURE__ */ jsx58("div", { className: mermaidSvgBase, dangerouslySetInnerHTML: { __html: rendered } })
2651
+ ] }) : /* @__PURE__ */ jsx59("div", { className: mermaidSvgBase, dangerouslySetInnerHTML: { __html: rendered } })
2265
2652
  }
2266
2653
  );
2267
2654
  }
@@ -2269,7 +2656,7 @@ function Mermaid({ code, svg, className, ...props }) {
2269
2656
  // src/clipboard.tsx
2270
2657
  import { ClipboardRoot, ClipboardTrigger, ClipboardIndicator } from "@ark-ui/react/clipboard";
2271
2658
  import { clipboardTriggerBase, cn as cn59 } from "@cloudvoyant/helical-ui";
2272
- import { jsx as jsx59, jsxs as jsxs18 } from "react/jsx-runtime";
2659
+ import { jsx as jsx60, jsxs as jsxs18 } from "react/jsx-runtime";
2273
2660
  function CopyIcon() {
2274
2661
  return /* @__PURE__ */ jsxs18(
2275
2662
  "svg",
@@ -2283,14 +2670,14 @@ function CopyIcon() {
2283
2670
  strokeLinejoin: "round",
2284
2671
  "aria-hidden": "true",
2285
2672
  children: [
2286
- /* @__PURE__ */ jsx59("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
2287
- /* @__PURE__ */ jsx59("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
2673
+ /* @__PURE__ */ jsx60("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
2674
+ /* @__PURE__ */ jsx60("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
2288
2675
  ]
2289
2676
  }
2290
2677
  );
2291
2678
  }
2292
2679
  function CheckIcon() {
2293
- return /* @__PURE__ */ jsx59(
2680
+ return /* @__PURE__ */ jsx60(
2294
2681
  "svg",
2295
2682
  {
2296
2683
  xmlns: "http://www.w3.org/2000/svg",
@@ -2301,12 +2688,12 @@ function CheckIcon() {
2301
2688
  strokeLinecap: "round",
2302
2689
  strokeLinejoin: "round",
2303
2690
  "aria-hidden": "true",
2304
- children: /* @__PURE__ */ jsx59("path", { d: "M20 6 9 17l-5-5" })
2691
+ children: /* @__PURE__ */ jsx60("path", { d: "M20 6 9 17l-5-5" })
2305
2692
  }
2306
2693
  );
2307
2694
  }
2308
2695
  function CopyButton({ value, label = "Copy", className, ...props }) {
2309
- return /* @__PURE__ */ jsx59(ClipboardRoot, { value, ...props, children: /* @__PURE__ */ jsx59(ClipboardTrigger, { className: cn59(clipboardTriggerBase, className), "aria-label": label, children: /* @__PURE__ */ jsx59(ClipboardIndicator, { copied: /* @__PURE__ */ jsx59(CheckIcon, {}), children: /* @__PURE__ */ jsx59(CopyIcon, {}) }) }) });
2696
+ return /* @__PURE__ */ jsx60(ClipboardRoot, { value, ...props, children: /* @__PURE__ */ jsx60(ClipboardTrigger, { className: cn59(clipboardTriggerBase, className), "aria-label": label, children: /* @__PURE__ */ jsx60(ClipboardIndicator, { copied: /* @__PURE__ */ jsx60(CheckIcon, {}), children: /* @__PURE__ */ jsx60(CopyIcon, {}) }) }) });
2310
2697
  }
2311
2698
 
2312
2699
  // src/radio-group.tsx
@@ -2320,15 +2707,15 @@ import {
2320
2707
  useRadioGroupItemContext
2321
2708
  } from "@ark-ui/react/radio-group";
2322
2709
  import { radioGroupRootBase, radioGroupItemControlBase, radioGroupItemTextBase, cn as cn60 } from "@cloudvoyant/helical-ui";
2323
- import { jsx as jsx60, jsxs as jsxs19 } from "react/jsx-runtime";
2710
+ import { jsx as jsx61, jsxs as jsxs19 } from "react/jsx-runtime";
2324
2711
  function RadioGroup({ className, ...props }) {
2325
- return /* @__PURE__ */ jsx60(RadioGroupRoot, { className: cn60(radioGroupRootBase, className), ...props });
2712
+ return /* @__PURE__ */ jsx61(RadioGroupRoot, { className: cn60(radioGroupRootBase, className), ...props });
2326
2713
  }
2327
2714
  function RadioGroupItem({ className, children, ...props }) {
2328
2715
  return /* @__PURE__ */ jsxs19(ArkRadioGroupItem, { className: cn60("flex cursor-pointer items-center gap-2.5", className), ...props, children: [
2329
- /* @__PURE__ */ jsx60(RadioGroupItemControl, { className: radioGroupItemControlBase, children: /* @__PURE__ */ jsx60("span", { className: "size-1.5 rounded-full bg-current hidden [[data-state=checked]>&]:block" }) }),
2330
- /* @__PURE__ */ jsx60(RadioGroupItemText, { className: radioGroupItemTextBase, children }),
2331
- /* @__PURE__ */ jsx60(RadioGroupItemHiddenInput, {})
2716
+ /* @__PURE__ */ jsx61(RadioGroupItemControl, { className: radioGroupItemControlBase, children: /* @__PURE__ */ jsx61("span", { className: "size-1.5 rounded-full bg-current hidden [[data-state=checked]>&]:block" }) }),
2717
+ /* @__PURE__ */ jsx61(RadioGroupItemText, { className: radioGroupItemTextBase, children }),
2718
+ /* @__PURE__ */ jsx61(RadioGroupItemHiddenInput, {})
2332
2719
  ] });
2333
2720
  }
2334
2721
  var useRadioGroup = useRadioGroupContext;
@@ -2336,7 +2723,7 @@ var useRadioGroup = useRadioGroupContext;
2336
2723
  // src/notice.tsx
2337
2724
  import { ark as ark36 } from "@ark-ui/react/factory";
2338
2725
  import { noticeVariants, noticeTitleBase, noticeDescriptionBase, cn as cn61 } from "@cloudvoyant/helical-ui";
2339
- import { jsx as jsx61, jsxs as jsxs20 } from "react/jsx-runtime";
2726
+ import { jsx as jsx62, jsxs as jsxs20 } from "react/jsx-runtime";
2340
2727
  function InfoIcon() {
2341
2728
  return /* @__PURE__ */ jsxs20(
2342
2729
  "svg",
@@ -2350,9 +2737,9 @@ function InfoIcon() {
2350
2737
  strokeLinejoin: "round",
2351
2738
  "aria-hidden": "true",
2352
2739
  children: [
2353
- /* @__PURE__ */ jsx61("circle", { cx: "12", cy: "12", r: "10" }),
2354
- /* @__PURE__ */ jsx61("path", { d: "M12 16v-4" }),
2355
- /* @__PURE__ */ jsx61("path", { d: "M12 8h.01" })
2740
+ /* @__PURE__ */ jsx62("circle", { cx: "12", cy: "12", r: "10" }),
2741
+ /* @__PURE__ */ jsx62("path", { d: "M12 16v-4" }),
2742
+ /* @__PURE__ */ jsx62("path", { d: "M12 8h.01" })
2356
2743
  ]
2357
2744
  }
2358
2745
  );
@@ -2370,8 +2757,8 @@ function CheckCircleIcon() {
2370
2757
  strokeLinejoin: "round",
2371
2758
  "aria-hidden": "true",
2372
2759
  children: [
2373
- /* @__PURE__ */ jsx61("circle", { cx: "12", cy: "12", r: "10" }),
2374
- /* @__PURE__ */ jsx61("path", { d: "m9 12 2 2 4-4" })
2760
+ /* @__PURE__ */ jsx62("circle", { cx: "12", cy: "12", r: "10" }),
2761
+ /* @__PURE__ */ jsx62("path", { d: "m9 12 2 2 4-4" })
2375
2762
  ]
2376
2763
  }
2377
2764
  );
@@ -2389,9 +2776,9 @@ function TriangleAlertIcon() {
2389
2776
  strokeLinejoin: "round",
2390
2777
  "aria-hidden": "true",
2391
2778
  children: [
2392
- /* @__PURE__ */ jsx61("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
2393
- /* @__PURE__ */ jsx61("path", { d: "M12 9v4" }),
2394
- /* @__PURE__ */ jsx61("path", { d: "M12 17h.01" })
2779
+ /* @__PURE__ */ jsx62("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
2780
+ /* @__PURE__ */ jsx62("path", { d: "M12 9v4" }),
2781
+ /* @__PURE__ */ jsx62("path", { d: "M12 17h.01" })
2395
2782
  ]
2396
2783
  }
2397
2784
  );
@@ -2409,9 +2796,9 @@ function CircleXIcon() {
2409
2796
  strokeLinejoin: "round",
2410
2797
  "aria-hidden": "true",
2411
2798
  children: [
2412
- /* @__PURE__ */ jsx61("circle", { cx: "12", cy: "12", r: "10" }),
2413
- /* @__PURE__ */ jsx61("path", { d: "m15 9-6 6" }),
2414
- /* @__PURE__ */ jsx61("path", { d: "m9 9 6 6" })
2799
+ /* @__PURE__ */ jsx62("circle", { cx: "12", cy: "12", r: "10" }),
2800
+ /* @__PURE__ */ jsx62("path", { d: "m15 9-6 6" }),
2801
+ /* @__PURE__ */ jsx62("path", { d: "m9 9 6 6" })
2415
2802
  ]
2416
2803
  }
2417
2804
  );
@@ -2426,29 +2813,29 @@ function Notice({ variant = "info", title, children, className, ...props }) {
2426
2813
  const Icon = variant !== null && variant !== void 0 && variant !== "none" ? noticeIcons[variant] : null;
2427
2814
  const role = variant === "error" ? "alert" : variant === "none" ? void 0 : "status";
2428
2815
  return /* @__PURE__ */ jsxs20(ark36.div, { role, className: cn61(noticeVariants({ variant }), className), ...props, children: [
2429
- Icon ? /* @__PURE__ */ jsx61(Icon, {}) : null,
2430
- title ? /* @__PURE__ */ jsx61(ark36.div, { className: noticeTitleBase, children: title }) : null,
2431
- children ? /* @__PURE__ */ jsx61(ark36.div, { className: noticeDescriptionBase, children }) : null
2816
+ Icon ? /* @__PURE__ */ jsx62(Icon, {}) : null,
2817
+ title ? /* @__PURE__ */ jsx62(ark36.div, { className: noticeTitleBase, children: title }) : null,
2818
+ children ? /* @__PURE__ */ jsx62(ark36.div, { className: noticeDescriptionBase, children }) : null
2432
2819
  ] });
2433
2820
  }
2434
2821
 
2435
2822
  // src/figure.tsx
2436
2823
  import { ark as ark37 } from "@ark-ui/react/factory";
2437
2824
  import { figureRootBase, figureImageBase, figureCaptionBase, cn as cn62 } from "@cloudvoyant/helical-ui";
2438
- import { jsx as jsx62, jsxs as jsxs21 } from "react/jsx-runtime";
2825
+ import { jsx as jsx63, jsxs as jsxs21 } from "react/jsx-runtime";
2439
2826
  function Figure({ src, alt, img, caption, className, ...props }) {
2440
2827
  return /* @__PURE__ */ jsxs21(ark37.figure, { className: cn62(figureRootBase, className), ...props, children: [
2441
- img ?? (src ? /* @__PURE__ */ jsx62(ark37.img, { src, alt, loading: "lazy", className: figureImageBase }) : null),
2442
- caption ? /* @__PURE__ */ jsx62(ark37.figcaption, { className: figureCaptionBase, children: caption }) : null
2828
+ img ?? (src ? /* @__PURE__ */ jsx63(ark37.img, { src, alt, loading: "lazy", className: figureImageBase }) : null),
2829
+ caption ? /* @__PURE__ */ jsx63(ark37.figcaption, { className: figureCaptionBase, children: caption }) : null
2443
2830
  ] });
2444
2831
  }
2445
2832
 
2446
2833
  // src/reveal.tsx
2447
2834
  import { CollapsibleRoot as CollapsibleRoot2, CollapsibleTrigger as CollapsibleTrigger2, CollapsibleContent as CollapsibleContent2 } from "@ark-ui/react/collapsible";
2448
2835
  import { revealRootBase, revealTriggerBase, revealChevronBase, revealContentBase, cn as cn63 } from "@cloudvoyant/helical-ui";
2449
- import { jsx as jsx63, jsxs as jsxs22 } from "react/jsx-runtime";
2836
+ import { jsx as jsx64, jsxs as jsxs22 } from "react/jsx-runtime";
2450
2837
  function ChevronRightIcon({ className }) {
2451
- return /* @__PURE__ */ jsx63(
2838
+ return /* @__PURE__ */ jsx64(
2452
2839
  "svg",
2453
2840
  {
2454
2841
  xmlns: "http://www.w3.org/2000/svg",
@@ -2460,17 +2847,17 @@ function ChevronRightIcon({ className }) {
2460
2847
  strokeLinejoin: "round",
2461
2848
  "aria-hidden": "true",
2462
2849
  className,
2463
- children: /* @__PURE__ */ jsx63("path", { d: "m9 18 6-6-6-6" })
2850
+ children: /* @__PURE__ */ jsx64("path", { d: "m9 18 6-6-6-6" })
2464
2851
  }
2465
2852
  );
2466
2853
  }
2467
2854
  function Reveal({ question, children, className, ...props }) {
2468
2855
  return /* @__PURE__ */ jsxs22(CollapsibleRoot2, { className: cn63(revealRootBase, className), ...props, children: [
2469
2856
  /* @__PURE__ */ jsxs22(CollapsibleTrigger2, { className: revealTriggerBase, children: [
2470
- /* @__PURE__ */ jsx63(ChevronRightIcon, { className: revealChevronBase }),
2471
- /* @__PURE__ */ jsx63("span", { children: question })
2857
+ /* @__PURE__ */ jsx64(ChevronRightIcon, { className: revealChevronBase }),
2858
+ /* @__PURE__ */ jsx64("span", { children: question })
2472
2859
  ] }),
2473
- /* @__PURE__ */ jsx63(CollapsibleContent2, { className: revealContentBase, children })
2860
+ /* @__PURE__ */ jsx64(CollapsibleContent2, { className: revealContentBase, children })
2474
2861
  ] });
2475
2862
  }
2476
2863
 
@@ -2485,31 +2872,31 @@ import {
2485
2872
  prevNextSpacerBase,
2486
2873
  cn as cn64
2487
2874
  } from "@cloudvoyant/helical-ui";
2488
- import { jsx as jsx64, jsxs as jsxs23 } from "react/jsx-runtime";
2875
+ import { jsx as jsx65, jsxs as jsxs23 } from "react/jsx-runtime";
2489
2876
  function PrevNext({ prev, next, className, ...props }) {
2490
2877
  if (!prev && !next) return null;
2491
2878
  return /* @__PURE__ */ jsxs23(ark38.nav, { className: cn64(prevNextRootBase, className), "aria-label": "Previous and next pages", ...props, children: [
2492
2879
  prev ? /* @__PURE__ */ jsxs23(ark38.a, { href: prev.href, className: prevNextLinkBase, children: [
2493
- /* @__PURE__ */ jsx64(ark38.span, { className: prevNextDirectionBase, children: "Previous" }),
2880
+ /* @__PURE__ */ jsx65(ark38.span, { className: prevNextDirectionBase, children: "Previous" }),
2494
2881
  /* @__PURE__ */ jsxs23(ark38.span, { className: prevNextTitleBase, children: [
2495
2882
  "\u2190 ",
2496
2883
  prev.title
2497
2884
  ] })
2498
- ] }) : /* @__PURE__ */ jsx64(ark38.span, { className: prevNextSpacerBase }),
2885
+ ] }) : /* @__PURE__ */ jsx65(ark38.span, { className: prevNextSpacerBase }),
2499
2886
  next ? /* @__PURE__ */ jsxs23(ark38.a, { href: next.href, className: cn64(prevNextLinkBase, prevNextLinkNextBase), children: [
2500
- /* @__PURE__ */ jsx64(ark38.span, { className: prevNextDirectionBase, children: "Next" }),
2887
+ /* @__PURE__ */ jsx65(ark38.span, { className: prevNextDirectionBase, children: "Next" }),
2501
2888
  /* @__PURE__ */ jsxs23(ark38.span, { className: prevNextTitleBase, children: [
2502
2889
  next.title,
2503
2890
  " \u2192"
2504
2891
  ] })
2505
- ] }) : /* @__PURE__ */ jsx64(ark38.span, { className: prevNextSpacerBase })
2892
+ ] }) : /* @__PURE__ */ jsx65(ark38.span, { className: prevNextSpacerBase })
2506
2893
  ] });
2507
2894
  }
2508
2895
 
2509
2896
  // src/latex.tsx
2510
2897
  import { ark as ark39 } from "@ark-ui/react/factory";
2511
2898
  import { latexRootBase, latexDisplayBase, latexInlineBase, latexErrorBase, toLaTeX, cn as cn65 } from "@cloudvoyant/helical-ui";
2512
- import { jsx as jsx65 } from "react/jsx-runtime";
2899
+ import { jsx as jsx66 } from "react/jsx-runtime";
2513
2900
  function LaTeX({ latex, html, className, ...props }) {
2514
2901
  let markup;
2515
2902
  let error = false;
@@ -2523,13 +2910,13 @@ function LaTeX({ latex, html, className, ...props }) {
2523
2910
  } else {
2524
2911
  markup = html;
2525
2912
  }
2526
- return /* @__PURE__ */ jsx65(
2913
+ return /* @__PURE__ */ jsx66(
2527
2914
  ark39.div,
2528
2915
  {
2529
2916
  ...props,
2530
2917
  "data-latex-state": error ? "error" : "done",
2531
2918
  className: cn65(latexRootBase, latexDisplayBase, className),
2532
- children: error ? /* @__PURE__ */ jsx65("code", { className: latexErrorBase, children: latex }) : /* @__PURE__ */ jsx65("span", { dangerouslySetInnerHTML: { __html: markup } })
2919
+ children: error ? /* @__PURE__ */ jsx66("code", { className: latexErrorBase, children: latex }) : /* @__PURE__ */ jsx66("span", { dangerouslySetInnerHTML: { __html: markup } })
2533
2920
  }
2534
2921
  );
2535
2922
  }
@@ -2546,19 +2933,19 @@ function InlineLaTeX({ latex, html, className, ...props }) {
2546
2933
  } else {
2547
2934
  markup = html;
2548
2935
  }
2549
- return /* @__PURE__ */ jsx65(
2936
+ return /* @__PURE__ */ jsx66(
2550
2937
  ark39.span,
2551
2938
  {
2552
2939
  ...props,
2553
2940
  "data-latex-state": error ? "error" : "done",
2554
2941
  className: cn65(latexRootBase, latexInlineBase, className),
2555
- children: error ? /* @__PURE__ */ jsx65("code", { className: latexErrorBase, children: latex }) : /* @__PURE__ */ jsx65("span", { dangerouslySetInnerHTML: { __html: markup } })
2942
+ children: error ? /* @__PURE__ */ jsx66("code", { className: latexErrorBase, children: latex }) : /* @__PURE__ */ jsx66("span", { dangerouslySetInnerHTML: { __html: markup } })
2556
2943
  }
2557
2944
  );
2558
2945
  }
2559
2946
 
2560
2947
  // src/code-block.tsx
2561
- import { createContext as createContext6, useContext as useContext6, useEffect as useEffect4, useState as useState4 } from "react";
2948
+ import { createContext as createContext7, useContext as useContext7, useEffect as useEffect5, useState as useState4 } from "react";
2562
2949
  import { ark as ark40 } from "@ark-ui/react/factory";
2563
2950
  import {
2564
2951
  codeBlockRootBase,
@@ -2576,10 +2963,10 @@ import {
2576
2963
  renderCodeToHtml,
2577
2964
  cn as cn66
2578
2965
  } from "@cloudvoyant/helical-ui";
2579
- import { Fragment as Fragment5, jsx as jsx66, jsxs as jsxs24 } from "react/jsx-runtime";
2580
- var CodeBlockContext = createContext6(null);
2966
+ import { Fragment as Fragment5, jsx as jsx67, jsxs as jsxs24 } from "react/jsx-runtime";
2967
+ var CodeBlockContext = createContext7(null);
2581
2968
  function useCodeBlock() {
2582
- const ctx = useContext6(CodeBlockContext);
2969
+ const ctx = useContext7(CodeBlockContext);
2583
2970
  if (!ctx) throw new Error("CodeBlock parts must be rendered inside a <CodeBlock>.");
2584
2971
  return ctx;
2585
2972
  }
@@ -2593,11 +2980,11 @@ function CodeRenderer({
2593
2980
  highlightLines
2594
2981
  }) {
2595
2982
  const [rendered, setRendered] = useState4(html ?? null);
2596
- useEffect4(() => {
2983
+ useEffect5(() => {
2597
2984
  injectCodeBlockStyles();
2598
2985
  }, []);
2599
2986
  const highlightKey = highlightLines?.join(",");
2600
- useEffect4(() => {
2987
+ useEffect5(() => {
2601
2988
  if (html !== void 0) return;
2602
2989
  let cancelled = false;
2603
2990
  setRendered(null);
@@ -2608,12 +2995,12 @@ function CodeRenderer({
2608
2995
  cancelled = true;
2609
2996
  };
2610
2997
  }, [code, language, html, highlightKey]);
2611
- return /* @__PURE__ */ jsx66(
2998
+ return /* @__PURE__ */ jsx67(
2612
2999
  "div",
2613
3000
  {
2614
3001
  className: cn66(codeBlockBodyBase, scrollable && codeBlockBodyScrollableBase),
2615
3002
  style: scrollable ? { maxHeight: `${maxHeight}px` } : void 0,
2616
- children: rendered === null ? /* @__PURE__ */ jsx66("div", { className: codeBlockLoadingBase, children: /* @__PURE__ */ jsx66("div", { className: codeBlockSpinnerBase }) }) : /* @__PURE__ */ jsx66(
3003
+ children: rendered === null ? /* @__PURE__ */ jsx67("div", { className: codeBlockLoadingBase, children: /* @__PURE__ */ jsx67("div", { className: codeBlockSpinnerBase }) }) : /* @__PURE__ */ jsx67(
2617
3004
  "div",
2618
3005
  {
2619
3006
  dangerouslySetInnerHTML: { __html: rendered },
@@ -2641,27 +3028,27 @@ function CodeBlock({
2641
3028
  ...props
2642
3029
  }) {
2643
3030
  const ctx = { code, language, html, showLineNumbers, scrollable, maxHeight, highlightLines };
2644
- return /* @__PURE__ */ jsx66(CodeBlockContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx66(ark40.div, { "data-code-block": true, className: cn66(codeBlockRootBase, className), ...props, children: children ?? /* @__PURE__ */ jsxs24(Fragment5, { children: [
3031
+ return /* @__PURE__ */ jsx67(CodeBlockContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx67(ark40.div, { "data-code-block": true, className: cn66(codeBlockRootBase, className), ...props, children: children ?? /* @__PURE__ */ jsxs24(Fragment5, { children: [
2645
3032
  /* @__PURE__ */ jsxs24(CodeBlockHeader, { children: [
2646
- /* @__PURE__ */ jsx66(CodeBlockTitle, { children: filename ?? language }),
2647
- /* @__PURE__ */ jsx66("div", { className: "ml-auto", children: /* @__PURE__ */ jsx66(CodeBlockCopyButton, {}) })
3033
+ /* @__PURE__ */ jsx67(CodeBlockTitle, { children: filename ?? language }),
3034
+ /* @__PURE__ */ jsx67("div", { className: "ml-auto", children: /* @__PURE__ */ jsx67(CodeBlockCopyButton, {}) })
2648
3035
  ] }),
2649
- /* @__PURE__ */ jsx66(CodeBlockContent, {})
3036
+ /* @__PURE__ */ jsx67(CodeBlockContent, {})
2650
3037
  ] }) }) });
2651
3038
  }
2652
3039
  function CodeBlockHeader({ className, children, ...props }) {
2653
- return /* @__PURE__ */ jsx66(ark40.div, { className: cn66(codeBlockHeaderBase, className), ...props, children });
3040
+ return /* @__PURE__ */ jsx67(ark40.div, { className: cn66(codeBlockHeaderBase, className), ...props, children });
2654
3041
  }
2655
3042
  function CodeBlockTitle({ className, children, ...props }) {
2656
- return /* @__PURE__ */ jsx66(ark40.span, { className: cn66(codeBlockTitleBase, className), ...props, children });
3043
+ return /* @__PURE__ */ jsx67(ark40.span, { className: cn66(codeBlockTitleBase, className), ...props, children });
2657
3044
  }
2658
3045
  function CodeBlockCopyButton({ label = "Copy code", className, ...props }) {
2659
3046
  const { code } = useCodeBlock();
2660
- return /* @__PURE__ */ jsx66(ark40.div, { className, ...props, children: /* @__PURE__ */ jsx66(CopyButton, { value: code, label }) });
3047
+ return /* @__PURE__ */ jsx67(ark40.div, { className, ...props, children: /* @__PURE__ */ jsx67(CopyButton, { value: code, label }) });
2661
3048
  }
2662
3049
  function CodeBlockContent({ className, html, ...props }) {
2663
3050
  const ctx = useCodeBlock();
2664
- return /* @__PURE__ */ jsx66(ark40.div, { className, ...props, children: /* @__PURE__ */ jsx66(CodeRenderer, { ...ctx, html: html ?? ctx.html }) });
3051
+ return /* @__PURE__ */ jsx67(ark40.div, { className, ...props, children: /* @__PURE__ */ jsx67(CodeRenderer, { ...ctx, html: html ?? ctx.html }) });
2665
3052
  }
2666
3053
  function MultiFileCodeBlock({
2667
3054
  files,
@@ -2673,14 +3060,14 @@ function MultiFileCodeBlock({
2673
3060
  }) {
2674
3061
  const [active, setActive] = useState4(files[0]?.filename ?? "");
2675
3062
  const file = files.find((f) => f.filename === active) ?? files[0];
2676
- useEffect4(() => {
3063
+ useEffect5(() => {
2677
3064
  if (!files.some((f) => f.filename === active)) {
2678
3065
  setActive(files[0]?.filename ?? "");
2679
3066
  }
2680
3067
  }, [files, active]);
2681
3068
  return /* @__PURE__ */ jsxs24(ark40.div, { "data-code-block": true, className: cn66(codeBlockRootBase, className), ...props, children: [
2682
3069
  /* @__PURE__ */ jsxs24("div", { className: "flex items-center justify-between border-b bg-muted/50", children: [
2683
- /* @__PURE__ */ jsx66("div", { role: "tablist", "aria-label": "Files", className: "flex overflow-x-auto no-scrollbar pl-1", children: files.map((f) => /* @__PURE__ */ jsx66(
3070
+ /* @__PURE__ */ jsx67("div", { role: "tablist", "aria-label": "Files", className: "flex overflow-x-auto no-scrollbar pl-1", children: files.map((f) => /* @__PURE__ */ jsx67(
2684
3071
  "button",
2685
3072
  {
2686
3073
  role: "tab",
@@ -2694,9 +3081,9 @@ function MultiFileCodeBlock({
2694
3081
  },
2695
3082
  f.filename
2696
3083
  )) }),
2697
- file ? /* @__PURE__ */ jsx66("div", { className: "shrink-0 pr-3", children: /* @__PURE__ */ jsx66(CopyButton, { value: file.code, label: "Copy code" }) }) : null
3084
+ file ? /* @__PURE__ */ jsx67("div", { className: "shrink-0 pr-3", children: /* @__PURE__ */ jsx67(CopyButton, { value: file.code, label: "Copy code" }) }) : null
2698
3085
  ] }),
2699
- file ? /* @__PURE__ */ jsx66(
3086
+ file ? /* @__PURE__ */ jsx67(
2700
3087
  CodeRenderer,
2701
3088
  {
2702
3089
  code: file.code,
@@ -2719,15 +3106,15 @@ function LanguageTabsCodeBlock({
2719
3106
  }) {
2720
3107
  const [active, setActive] = useState4(tabs[0]?.label ?? "");
2721
3108
  const tab = tabs.find((t) => t.label === active) ?? tabs[0];
2722
- useEffect4(() => {
3109
+ useEffect5(() => {
2723
3110
  if (!tabs.some((t) => t.label === active)) {
2724
3111
  setActive(tabs[0]?.label ?? "");
2725
3112
  }
2726
3113
  }, [tabs, active]);
2727
3114
  return /* @__PURE__ */ jsxs24(ark40.div, { "data-code-block": true, className: cn66(codeBlockRootBase, className), ...props, children: [
2728
3115
  /* @__PURE__ */ jsxs24(CodeBlockHeader, { children: [
2729
- /* @__PURE__ */ jsx66(CodeBlockTitle, { children: tab?.filename }),
2730
- /* @__PURE__ */ jsx66("div", { className: "ml-auto", children: /* @__PURE__ */ jsxs24(
3116
+ /* @__PURE__ */ jsx67(CodeBlockTitle, { children: tab?.filename }),
3117
+ /* @__PURE__ */ jsx67("div", { className: "ml-auto", children: /* @__PURE__ */ jsxs24(
2731
3118
  Select,
2732
3119
  {
2733
3120
  items: tabs.map((t) => ({ value: t.label, label: t.label })),
@@ -2736,8 +3123,8 @@ function LanguageTabsCodeBlock({
2736
3123
  "aria-label": "Language",
2737
3124
  children: [
2738
3125
  /* @__PURE__ */ jsxs24(SelectTrigger, { size: "sm", className: "min-w-28 justify-between font-mono text-xs", children: [
2739
- /* @__PURE__ */ jsx66(SelectValue, {}),
2740
- /* @__PURE__ */ jsx66(SelectIndicator, { children: /* @__PURE__ */ jsx66(
3126
+ /* @__PURE__ */ jsx67(SelectValue, {}),
3127
+ /* @__PURE__ */ jsx67(SelectIndicator, { children: /* @__PURE__ */ jsx67(
2741
3128
  "svg",
2742
3129
  {
2743
3130
  xmlns: "http://www.w3.org/2000/svg",
@@ -2748,13 +3135,13 @@ function LanguageTabsCodeBlock({
2748
3135
  strokeLinecap: "round",
2749
3136
  strokeLinejoin: "round",
2750
3137
  "aria-hidden": "true",
2751
- children: /* @__PURE__ */ jsx66("path", { d: "m6 9 6 6 6-6" })
3138
+ children: /* @__PURE__ */ jsx67("path", { d: "m6 9 6 6 6-6" })
2752
3139
  }
2753
3140
  ) })
2754
3141
  ] }),
2755
- /* @__PURE__ */ jsx66(SelectContent, { children: tabs.map((t) => /* @__PURE__ */ jsxs24(SelectItem, { item: { value: t.label, label: t.label }, children: [
2756
- /* @__PURE__ */ jsx66(SelectItemText, { children: t.label }),
2757
- /* @__PURE__ */ jsx66(SelectItemIndicator, { children: /* @__PURE__ */ jsx66(
3142
+ /* @__PURE__ */ jsx67(SelectContent, { children: tabs.map((t) => /* @__PURE__ */ jsxs24(SelectItem, { item: { value: t.label, label: t.label }, children: [
3143
+ /* @__PURE__ */ jsx67(SelectItemText, { children: t.label }),
3144
+ /* @__PURE__ */ jsx67(SelectItemIndicator, { children: /* @__PURE__ */ jsx67(
2758
3145
  "svg",
2759
3146
  {
2760
3147
  xmlns: "http://www.w3.org/2000/svg",
@@ -2765,7 +3152,7 @@ function LanguageTabsCodeBlock({
2765
3152
  strokeLinecap: "round",
2766
3153
  strokeLinejoin: "round",
2767
3154
  "aria-hidden": "true",
2768
- children: /* @__PURE__ */ jsx66("path", { d: "M20 6 9 17l-5-5" })
3155
+ children: /* @__PURE__ */ jsx67("path", { d: "M20 6 9 17l-5-5" })
2769
3156
  }
2770
3157
  ) })
2771
3158
  ] }, t.label)) })
@@ -2774,7 +3161,7 @@ function LanguageTabsCodeBlock({
2774
3161
  ) })
2775
3162
  ] }),
2776
3163
  tab ? /* @__PURE__ */ jsxs24("div", { className: "relative", children: [
2777
- /* @__PURE__ */ jsx66(
3164
+ /* @__PURE__ */ jsx67(
2778
3165
  CodeRenderer,
2779
3166
  {
2780
3167
  code: tab.code,
@@ -2785,13 +3172,13 @@ function LanguageTabsCodeBlock({
2785
3172
  maxHeight
2786
3173
  }
2787
3174
  ),
2788
- /* @__PURE__ */ jsx66("div", { className: codeBlockCopyFloatBase, children: /* @__PURE__ */ jsx66(CopyButton, { value: tab.code, label: "Copy code" }) })
3175
+ /* @__PURE__ */ jsx67("div", { className: codeBlockCopyFloatBase, children: /* @__PURE__ */ jsx67(CopyButton, { value: tab.code, label: "Copy code" }) })
2789
3176
  ] }) : null
2790
3177
  ] });
2791
3178
  }
2792
3179
 
2793
3180
  // src/manim.tsx
2794
- import { useEffect as useEffect5, useRef as useRef2, useState as useState5 } from "react";
3181
+ import { useEffect as useEffect6, useRef as useRef3, useState as useState5 } from "react";
2795
3182
  import { ark as ark41 } from "@ark-ui/react/factory";
2796
3183
  import {
2797
3184
  manimRootBase,
@@ -2802,13 +3189,13 @@ import {
2802
3189
  manimCaptionBase,
2803
3190
  cn as cn67
2804
3191
  } from "@cloudvoyant/helical-ui";
2805
- import { jsx as jsx67, jsxs as jsxs25 } from "react/jsx-runtime";
3192
+ import { jsx as jsx68, jsxs as jsxs25 } from "react/jsx-runtime";
2806
3193
  function Manim({ build, width = 800, height = 450, caption, className, ...props }) {
2807
- const wrapperRef = useRef2(null);
2808
- const containerRef = useRef2(null);
3194
+ const wrapperRef = useRef3(null);
3195
+ const containerRef = useRef3(null);
2809
3196
  const [state, setState] = useState5("loading");
2810
3197
  const [errorMsg, setErrorMsg] = useState5("");
2811
- useEffect5(() => {
3198
+ useEffect6(() => {
2812
3199
  const wrapper = wrapperRef.current;
2813
3200
  if (!wrapper) return;
2814
3201
  let disposed = false;
@@ -2873,16 +3260,16 @@ function Manim({ build, width = 800, height = 450, caption, className, ...props
2873
3260
  }, [build, width, height]);
2874
3261
  return /* @__PURE__ */ jsxs25(ark41.figure, { "data-manim-state": state, className: cn67(manimRootBase, className), ...props, children: [
2875
3262
  /* @__PURE__ */ jsxs25("div", { ref: wrapperRef, className: manimContainerBase, children: [
2876
- /* @__PURE__ */ jsx67("div", { ref: containerRef, className: "w-full" }),
2877
- state === "loading" && /* @__PURE__ */ jsx67("div", { className: manimPlaceholderBase, style: { aspectRatio: `${width} / ${height}` }, children: /* @__PURE__ */ jsx67("span", { className: manimPlaceholderLabelBase, children: "Loading animation\u2026" }) }),
2878
- state === "error" && /* @__PURE__ */ jsx67("div", { className: manimErrorBase, children: errorMsg })
3263
+ /* @__PURE__ */ jsx68("div", { ref: containerRef, className: "w-full" }),
3264
+ state === "loading" && /* @__PURE__ */ jsx68("div", { className: manimPlaceholderBase, style: { aspectRatio: `${width} / ${height}` }, children: /* @__PURE__ */ jsx68("span", { className: manimPlaceholderLabelBase, children: "Loading animation\u2026" }) }),
3265
+ state === "error" && /* @__PURE__ */ jsx68("div", { className: manimErrorBase, children: errorMsg })
2879
3266
  ] }),
2880
- caption ? /* @__PURE__ */ jsx67(ark41.figcaption, { className: manimCaptionBase, children: caption }) : null
3267
+ caption ? /* @__PURE__ */ jsx68(ark41.figcaption, { className: manimCaptionBase, children: caption }) : null
2881
3268
  ] });
2882
3269
  }
2883
3270
 
2884
3271
  // src/youtube.tsx
2885
- import { createContext as createContext7, useContext as useContext7, useEffect as useEffect6, useState as useState6 } from "react";
3272
+ import { createContext as createContext8, useContext as useContext8, useEffect as useEffect7, useState as useState6 } from "react";
2886
3273
  import { ark as ark42 } from "@ark-ui/react/factory";
2887
3274
  import { ChevronRight, Play } from "lucide-react";
2888
3275
  import {
@@ -2905,10 +3292,10 @@ import {
2905
3292
  fetchYouTubeMetadata,
2906
3293
  cn as cn68
2907
3294
  } from "@cloudvoyant/helical-ui";
2908
- import { jsx as jsx68, jsxs as jsxs26 } from "react/jsx-runtime";
2909
- var YouTubeContext = createContext7(null);
3295
+ import { jsx as jsx69, jsxs as jsxs26 } from "react/jsx-runtime";
3296
+ var YouTubeContext = createContext8(null);
2910
3297
  function useYouTube() {
2911
- const ctx = useContext7(YouTubeContext);
3298
+ const ctx = useContext8(YouTubeContext);
2912
3299
  if (!ctx) throw new Error("YoutubeTimestamps must be rendered inside a <YouTube>.");
2913
3300
  return ctx;
2914
3301
  }
@@ -2922,9 +3309,9 @@ function YouTube({ url, title, description, poster, className, children, ...prop
2922
3309
  setPlaying(true);
2923
3310
  };
2924
3311
  const src = `https://www.youtube-nocookie.com/embed/${videoId}?autoplay=1${startAt == null ? "" : `&start=${startAt}`}`;
2925
- return /* @__PURE__ */ jsx68(YouTubeContext.Provider, { value: { url, videoId, seek }, children: /* @__PURE__ */ jsxs26(ark42.div, { "data-youtube-id": videoId, className: cn68(youtubeRootBase, className), ...props, children: [
2926
- title ? /* @__PURE__ */ jsx68(ark42.h3, { className: youtubeTitleBase, children: title }) : null,
2927
- playing ? /* @__PURE__ */ jsx68(
3312
+ return /* @__PURE__ */ jsx69(YouTubeContext.Provider, { value: { url, videoId, seek }, children: /* @__PURE__ */ jsxs26(ark42.div, { "data-youtube-id": videoId, className: cn68(youtubeRootBase, className), ...props, children: [
3313
+ title ? /* @__PURE__ */ jsx69(ark42.h3, { className: youtubeTitleBase, children: title }) : null,
3314
+ playing ? /* @__PURE__ */ jsx69(
2928
3315
  "iframe",
2929
3316
  {
2930
3317
  src,
@@ -2941,7 +3328,7 @@ function YouTube({ url, title, description, poster, className, children, ...prop
2941
3328
  onClick: () => setPlaying(true),
2942
3329
  "aria-label": title ? `Play video: ${title}` : "Play video",
2943
3330
  children: [
2944
- /* @__PURE__ */ jsx68(
3331
+ /* @__PURE__ */ jsx69(
2945
3332
  ark42.img,
2946
3333
  {
2947
3334
  src: posterUrl,
@@ -2950,26 +3337,26 @@ function YouTube({ url, title, description, poster, className, children, ...prop
2950
3337
  className: "h-full w-full object-cover"
2951
3338
  }
2952
3339
  ),
2953
- /* @__PURE__ */ jsx68(ark42.span, { className: youtubePlayButtonBase, "aria-hidden": "true", children: /* @__PURE__ */ jsx68(ark42.span, { className: youtubePlayButtonInnerBase, children: /* @__PURE__ */ jsx68(Play, { className: "size-8 fill-current", "aria-hidden": "true", "data-youtube-logo": true }) }) })
3340
+ /* @__PURE__ */ jsx69(ark42.span, { className: youtubePlayButtonBase, "aria-hidden": "true", children: /* @__PURE__ */ jsx69(ark42.span, { className: youtubePlayButtonInnerBase, children: /* @__PURE__ */ jsx69(Play, { className: "size-8 fill-current", "aria-hidden": "true", "data-youtube-logo": true }) }) })
2954
3341
  ]
2955
3342
  }
2956
3343
  ),
2957
- description ? /* @__PURE__ */ jsx68(ark42.p, { className: youtubeDescriptionBase, children: description }) : null,
3344
+ description ? /* @__PURE__ */ jsx69(ark42.p, { className: youtubeDescriptionBase, children: description }) : null,
2958
3345
  children
2959
3346
  ] }) });
2960
3347
  }
2961
3348
  function YoutubeTimestampAt({ t, children, className, ...props }) {
2962
3349
  const { seek } = useYouTube();
2963
- return /* @__PURE__ */ jsx68(ark42.li, { className, ...props, children: /* @__PURE__ */ jsxs26(ark42.button, { type: "button", onClick: () => seek(t), className: youtubeChapterButtonBase, children: [
2964
- /* @__PURE__ */ jsx68(ark42.span, { className: youtubeChapterTimeBase, children: formatTime(t) }),
2965
- /* @__PURE__ */ jsx68(ark42.span, { className: youtubeChapterLabelBase, children })
3350
+ return /* @__PURE__ */ jsx69(ark42.li, { className, ...props, children: /* @__PURE__ */ jsxs26(ark42.button, { type: "button", onClick: () => seek(t), className: youtubeChapterButtonBase, children: [
3351
+ /* @__PURE__ */ jsx69(ark42.span, { className: youtubeChapterTimeBase, children: formatTime(t) }),
3352
+ /* @__PURE__ */ jsx69(ark42.span, { className: youtubeChapterLabelBase, children })
2966
3353
  ] }) });
2967
3354
  }
2968
3355
  function YoutubeTimestamps({ chapters, children, className, ...props }) {
2969
3356
  const { url } = useYouTube();
2970
3357
  const [inferred, setInferred] = useState6([]);
2971
3358
  const [loading, setLoading] = useState6(chapters === void 0);
2972
- useEffect6(() => {
3359
+ useEffect7(() => {
2973
3360
  if (chapters !== void 0) return;
2974
3361
  let cancelled = false;
2975
3362
  setLoading(true);
@@ -2988,13 +3375,13 @@ function YoutubeTimestamps({ chapters, children, className, ...props }) {
2988
3375
  const resolved = chapters ?? inferred;
2989
3376
  const hasChildren = children !== void 0 && children !== null;
2990
3377
  if (!loading && resolved.length === 0 && !hasChildren) return null;
2991
- return /* @__PURE__ */ jsx68(ark42.div, { className: cn68(youtubeChaptersBase, className), ...props, children: /* @__PURE__ */ jsxs26("details", { className: "group", open: true, children: [
3378
+ return /* @__PURE__ */ jsx69(ark42.div, { className: cn68(youtubeChaptersBase, className), ...props, children: /* @__PURE__ */ jsxs26("details", { className: "group", open: true, children: [
2992
3379
  /* @__PURE__ */ jsxs26(ark42.summary, { className: youtubeChaptersSummaryBase, children: [
2993
- /* @__PURE__ */ jsx68(ChevronRight, { className: youtubeChaptersChevronBase, "aria-hidden": "true" }),
2994
- /* @__PURE__ */ jsx68("span", { children: "Timestamps" })
3380
+ /* @__PURE__ */ jsx69(ChevronRight, { className: youtubeChaptersChevronBase, "aria-hidden": "true" }),
3381
+ /* @__PURE__ */ jsx69("span", { children: "Timestamps" })
2995
3382
  ] }),
2996
- /* @__PURE__ */ jsx68(ark42.nav, { "aria-label": "Video timestamps", className: youtubeChaptersListBase, children: /* @__PURE__ */ jsxs26(ark42.ul, { className: "space-y-1", children: [
2997
- resolved.map((ch) => /* @__PURE__ */ jsx68(YoutubeTimestampAt, { t: ch.t, children: ch.label }, ch.t)),
3383
+ /* @__PURE__ */ jsx69(ark42.nav, { "aria-label": "Video timestamps", className: youtubeChaptersListBase, children: /* @__PURE__ */ jsxs26(ark42.ul, { className: "space-y-1", children: [
3384
+ resolved.map((ch) => /* @__PURE__ */ jsx69(YoutubeTimestampAt, { t: ch.t, children: ch.label }, ch.t)),
2998
3385
  children
2999
3386
  ] }) })
3000
3387
  ] }) });
@@ -3004,18 +3391,18 @@ function YoutubeTimestamps({ chapters, children, className, ...props }) {
3004
3391
  import { ark as ark43 } from "@ark-ui/react/factory";
3005
3392
  import { Chart as TanStackChart } from "@tanstack/charts/react";
3006
3393
  import { chartRootBase, buildChartDefinition, cn as cn69 } from "@cloudvoyant/helical-ui";
3007
- import { jsx as jsx69 } from "react/jsx-runtime";
3394
+ import { jsx as jsx70 } from "react/jsx-runtime";
3008
3395
  function Chart({ svg, className, ...props }) {
3009
3396
  const { type, height = 320 } = props;
3010
3397
  if (svg !== void 0) {
3011
- return /* @__PURE__ */ jsx69(ark43.div, { "data-chart-state": "prerendered", "data-chart-type": type, className: cn69(chartRootBase, className), children: /* @__PURE__ */ jsx69("div", { className: "flex w-full justify-center [&>svg]:max-w-full", dangerouslySetInnerHTML: { __html: svg } }) });
3398
+ return /* @__PURE__ */ jsx70(ark43.div, { "data-chart-state": "prerendered", "data-chart-type": type, className: cn69(chartRootBase, className), children: /* @__PURE__ */ jsx70("div", { className: "flex w-full justify-center [&>svg]:max-w-full", dangerouslySetInnerHTML: { __html: svg } }) });
3012
3399
  }
3013
3400
  const definition = buildChartDefinition(props);
3014
- return /* @__PURE__ */ jsx69(ark43.div, { "data-chart-state": "ready", "data-chart-type": type, className: cn69(chartRootBase, className), children: /* @__PURE__ */ jsx69(TanStackChart, { definition, height, ariaLabel: type === "pie" ? "Pie chart" : "Chart" }) });
3401
+ return /* @__PURE__ */ jsx70(ark43.div, { "data-chart-state": "ready", "data-chart-type": type, className: cn69(chartRootBase, className), children: /* @__PURE__ */ jsx70(TanStackChart, { definition, height, ariaLabel: type === "pie" ? "Pie chart" : "Chart" }) });
3015
3402
  }
3016
3403
 
3017
3404
  // src/questions.tsx
3018
- import { useEffect as useEffect7, useState as useState7 } from "react";
3405
+ import { useEffect as useEffect8, useState as useState7 } from "react";
3019
3406
  import { ark as ark44 } from "@ark-ui/react/factory";
3020
3407
  import {
3021
3408
  questionCardBase,
@@ -3041,7 +3428,7 @@ import {
3041
3428
  quizResetButtonBase,
3042
3429
  cn as cn70
3043
3430
  } from "@cloudvoyant/helical-ui";
3044
- import { Fragment as Fragment6, jsx as jsx70, jsxs as jsxs27 } from "react/jsx-runtime";
3431
+ import { Fragment as Fragment6, jsx as jsx71, jsxs as jsxs27 } from "react/jsx-runtime";
3045
3432
  function CheckCircleIcon2() {
3046
3433
  return /* @__PURE__ */ jsxs27(
3047
3434
  "svg",
@@ -3056,8 +3443,8 @@ function CheckCircleIcon2() {
3056
3443
  "aria-hidden": "true",
3057
3444
  className: "size-4 shrink-0",
3058
3445
  children: [
3059
- /* @__PURE__ */ jsx70("circle", { cx: "12", cy: "12", r: "10" }),
3060
- /* @__PURE__ */ jsx70("path", { d: "m9 12 2 2 4-4" })
3446
+ /* @__PURE__ */ jsx71("circle", { cx: "12", cy: "12", r: "10" }),
3447
+ /* @__PURE__ */ jsx71("path", { d: "m9 12 2 2 4-4" })
3061
3448
  ]
3062
3449
  }
3063
3450
  );
@@ -3076,15 +3463,15 @@ function CircleXIcon2() {
3076
3463
  "aria-hidden": "true",
3077
3464
  className: "size-4 shrink-0",
3078
3465
  children: [
3079
- /* @__PURE__ */ jsx70("circle", { cx: "12", cy: "12", r: "10" }),
3080
- /* @__PURE__ */ jsx70("path", { d: "m15 9-6 6" }),
3081
- /* @__PURE__ */ jsx70("path", { d: "m9 9 6 6" })
3466
+ /* @__PURE__ */ jsx71("circle", { cx: "12", cy: "12", r: "10" }),
3467
+ /* @__PURE__ */ jsx71("path", { d: "m15 9-6 6" }),
3468
+ /* @__PURE__ */ jsx71("path", { d: "m9 9 6 6" })
3082
3469
  ]
3083
3470
  }
3084
3471
  );
3085
3472
  }
3086
3473
  function CheckIcon2() {
3087
- return /* @__PURE__ */ jsx70(
3474
+ return /* @__PURE__ */ jsx71(
3088
3475
  "svg",
3089
3476
  {
3090
3477
  xmlns: "http://www.w3.org/2000/svg",
@@ -3095,14 +3482,14 @@ function CheckIcon2() {
3095
3482
  strokeLinecap: "round",
3096
3483
  strokeLinejoin: "round",
3097
3484
  "aria-hidden": "true",
3098
- children: /* @__PURE__ */ jsx70("path", { d: "M20 6 9 17l-5-5" })
3485
+ children: /* @__PURE__ */ jsx71("path", { d: "M20 6 9 17l-5-5" })
3099
3486
  }
3100
3487
  );
3101
3488
  }
3102
3489
  function Feedback({ correct, explanation }) {
3103
3490
  if (correct === null) return null;
3104
3491
  return /* @__PURE__ */ jsxs27("div", { "aria-live": "polite", role: "status", className: "mt-3", children: [
3105
- /* @__PURE__ */ jsx70(
3492
+ /* @__PURE__ */ jsx71(
3106
3493
  "div",
3107
3494
  {
3108
3495
  className: cn70(
@@ -3110,15 +3497,15 @@ function Feedback({ correct, explanation }) {
3110
3497
  correct ? feedbackCorrectBase : feedbackIncorrectBase
3111
3498
  ),
3112
3499
  children: correct ? /* @__PURE__ */ jsxs27(Fragment6, { children: [
3113
- /* @__PURE__ */ jsx70(CheckCircleIcon2, {}),
3114
- /* @__PURE__ */ jsx70("span", { children: "Correct" })
3500
+ /* @__PURE__ */ jsx71(CheckCircleIcon2, {}),
3501
+ /* @__PURE__ */ jsx71("span", { children: "Correct" })
3115
3502
  ] }) : /* @__PURE__ */ jsxs27(Fragment6, { children: [
3116
- /* @__PURE__ */ jsx70(CircleXIcon2, {}),
3117
- /* @__PURE__ */ jsx70("span", { children: "Incorrect" })
3503
+ /* @__PURE__ */ jsx71(CircleXIcon2, {}),
3504
+ /* @__PURE__ */ jsx71("span", { children: "Incorrect" })
3118
3505
  ] })
3119
3506
  }
3120
3507
  ),
3121
- explanation ? /* @__PURE__ */ jsx70("p", { className: feedbackExplanationBase, children: explanation }) : null
3508
+ explanation ? /* @__PURE__ */ jsx71("p", { className: feedbackExplanationBase, children: explanation }) : null
3122
3509
  ] });
3123
3510
  }
3124
3511
  function SingleChoiceRenderer({
@@ -3135,7 +3522,7 @@ function SingleChoiceRenderer({
3135
3522
  }) {
3136
3523
  const [selected, setSelected] = useState7(null);
3137
3524
  const [result, setResult] = useState7(null);
3138
- useEffect7(() => {
3525
+ useEffect8(() => {
3139
3526
  if (quiz) {
3140
3527
  const isAnswered = selected !== null;
3141
3528
  onAnswerChange?.({ answered: isAnswered, correct: isAnswered && selected === correct });
@@ -3149,8 +3536,8 @@ function SingleChoiceRenderer({
3149
3536
  onGraded?.(isCorrect);
3150
3537
  };
3151
3538
  return /* @__PURE__ */ jsxs27("div", { className: cn70(questionCardBase, className), ...rest, children: [
3152
- /* @__PURE__ */ jsx70("p", { className: questionPromptBase, children: prompt }),
3153
- /* @__PURE__ */ jsx70(
3539
+ /* @__PURE__ */ jsx71("p", { className: questionPromptBase, children: prompt }),
3540
+ /* @__PURE__ */ jsx71(
3154
3541
  RadioGroup,
3155
3542
  {
3156
3543
  orientation: "vertical",
@@ -3161,7 +3548,7 @@ function SingleChoiceRenderer({
3161
3548
  },
3162
3549
  disabled: quiz ? submitted : result !== null,
3163
3550
  className: questionGroupBase,
3164
- children: choices.map((choice, i) => /* @__PURE__ */ jsx70(
3551
+ children: choices.map((choice, i) => /* @__PURE__ */ jsx71(
3165
3552
  RadioGroupItem,
3166
3553
  {
3167
3554
  value: String(i),
@@ -3176,7 +3563,7 @@ function SingleChoiceRenderer({
3176
3563
  ))
3177
3564
  }
3178
3565
  ),
3179
- !quiz && result === null && /* @__PURE__ */ jsx70(
3566
+ !quiz && result === null && /* @__PURE__ */ jsx71(
3180
3567
  ark44.button,
3181
3568
  {
3182
3569
  type: "button",
@@ -3186,7 +3573,7 @@ function SingleChoiceRenderer({
3186
3573
  children: "Check"
3187
3574
  }
3188
3575
  ),
3189
- /* @__PURE__ */ jsx70(Feedback, { correct: displayResult, explanation: displayResult === null ? void 0 : explanation })
3576
+ /* @__PURE__ */ jsx71(Feedback, { correct: displayResult, explanation: displayResult === null ? void 0 : explanation })
3190
3577
  ] });
3191
3578
  }
3192
3579
  function MultipleChoiceRenderer({
@@ -3207,7 +3594,7 @@ function MultipleChoiceRenderer({
3207
3594
  const correctSet = new Set(correct);
3208
3595
  return selected.size === correctSet.size && [...selected].every((v) => correctSet.has(v));
3209
3596
  };
3210
- useEffect7(() => {
3597
+ useEffect8(() => {
3211
3598
  if (quiz) {
3212
3599
  const isAnswered = selected.size > 0;
3213
3600
  onAnswerChange?.({ answered: isAnswered, correct: isAnswered && computeCorrect() });
@@ -3230,8 +3617,8 @@ function MultipleChoiceRenderer({
3230
3617
  onGraded?.(isCorrect);
3231
3618
  };
3232
3619
  return /* @__PURE__ */ jsxs27("div", { className: cn70(questionCardBase, className), ...rest, children: [
3233
- /* @__PURE__ */ jsx70("p", { className: questionPromptBase, children: prompt }),
3234
- /* @__PURE__ */ jsx70("div", { role: "group", className: questionGroupBase, children: choices.map((choice, i) => {
3620
+ /* @__PURE__ */ jsx71("p", { className: questionPromptBase, children: prompt }),
3621
+ /* @__PURE__ */ jsx71("div", { role: "group", className: questionGroupBase, children: choices.map((choice, i) => {
3235
3622
  const isCorrectOption = correct.includes(i);
3236
3623
  return /* @__PURE__ */ jsxs27(
3237
3624
  Checkbox,
@@ -3245,14 +3632,14 @@ function MultipleChoiceRenderer({
3245
3632
  displayResult !== null && selected.has(i) && !isCorrectOption && questionOptionIncorrectBase
3246
3633
  ),
3247
3634
  children: [
3248
- /* @__PURE__ */ jsx70(CheckboxControl, { children: /* @__PURE__ */ jsx70(CheckboxIndicator, { children: /* @__PURE__ */ jsx70(CheckIcon2, {}) }) }),
3249
- /* @__PURE__ */ jsx70(CheckboxLabel, { children: choice })
3635
+ /* @__PURE__ */ jsx71(CheckboxControl, { children: /* @__PURE__ */ jsx71(CheckboxIndicator, { children: /* @__PURE__ */ jsx71(CheckIcon2, {}) }) }),
3636
+ /* @__PURE__ */ jsx71(CheckboxLabel, { children: choice })
3250
3637
  ]
3251
3638
  },
3252
3639
  i
3253
3640
  );
3254
3641
  }) }),
3255
- !quiz && result === null && /* @__PURE__ */ jsx70(
3642
+ !quiz && result === null && /* @__PURE__ */ jsx71(
3256
3643
  ark44.button,
3257
3644
  {
3258
3645
  type: "button",
@@ -3262,7 +3649,7 @@ function MultipleChoiceRenderer({
3262
3649
  children: "Check"
3263
3650
  }
3264
3651
  ),
3265
- /* @__PURE__ */ jsx70(Feedback, { correct: displayResult, explanation: displayResult === null ? void 0 : explanation })
3652
+ /* @__PURE__ */ jsx71(Feedback, { correct: displayResult, explanation: displayResult === null ? void 0 : explanation })
3266
3653
  ] });
3267
3654
  }
3268
3655
  function NumericRenderer({
@@ -3286,7 +3673,7 @@ function NumericRenderer({
3286
3673
  const parsed = parseFloat(value);
3287
3674
  return !Number.isNaN(parsed) && Math.abs(parsed - answer) <= tolerance;
3288
3675
  };
3289
- useEffect7(() => {
3676
+ useEffect8(() => {
3290
3677
  if (quiz) {
3291
3678
  const parsed = parseFloat(value);
3292
3679
  const isAnswered = value.trim() !== "" && !Number.isNaN(parsed);
@@ -3302,9 +3689,9 @@ function NumericRenderer({
3302
3689
  onGraded?.(isCorrect);
3303
3690
  };
3304
3691
  return /* @__PURE__ */ jsxs27("div", { className: cn70(questionCardBase, className), ...rest, children: [
3305
- /* @__PURE__ */ jsx70(ark44.label, { htmlFor: inputId, className: questionPromptBase, children: prompt }),
3692
+ /* @__PURE__ */ jsx71(ark44.label, { htmlFor: inputId, className: questionPromptBase, children: prompt }),
3306
3693
  /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2", children: [
3307
- /* @__PURE__ */ jsx70(
3694
+ /* @__PURE__ */ jsx71(
3308
3695
  ark44.input,
3309
3696
  {
3310
3697
  id: inputId,
@@ -3319,9 +3706,9 @@ function NumericRenderer({
3319
3706
  className: questionInputBase
3320
3707
  }
3321
3708
  ),
3322
- unit ? /* @__PURE__ */ jsx70(ark44.span, { className: questionUnitBase, children: unit }) : null
3709
+ unit ? /* @__PURE__ */ jsx71(ark44.span, { className: questionUnitBase, children: unit }) : null
3323
3710
  ] }),
3324
- !quiz && result === null && /* @__PURE__ */ jsx70(
3711
+ !quiz && result === null && /* @__PURE__ */ jsx71(
3325
3712
  ark44.button,
3326
3713
  {
3327
3714
  type: "button",
@@ -3331,17 +3718,17 @@ function NumericRenderer({
3331
3718
  children: "Check"
3332
3719
  }
3333
3720
  ),
3334
- /* @__PURE__ */ jsx70(Feedback, { correct: displayResult, explanation: displayResult === null ? void 0 : explanation })
3721
+ /* @__PURE__ */ jsx71(Feedback, { correct: displayResult, explanation: displayResult === null ? void 0 : explanation })
3335
3722
  ] });
3336
3723
  }
3337
3724
  function SingleChoiceQuestion(props) {
3338
- return /* @__PURE__ */ jsx70(SingleChoiceRenderer, { ...props });
3725
+ return /* @__PURE__ */ jsx71(SingleChoiceRenderer, { ...props });
3339
3726
  }
3340
3727
  function MultipleChoiceQuestion(props) {
3341
- return /* @__PURE__ */ jsx70(MultipleChoiceRenderer, { ...props });
3728
+ return /* @__PURE__ */ jsx71(MultipleChoiceRenderer, { ...props });
3342
3729
  }
3343
3730
  function NumericQuestion(props) {
3344
- return /* @__PURE__ */ jsx70(NumericRenderer, { ...props });
3731
+ return /* @__PURE__ */ jsx71(NumericRenderer, { ...props });
3345
3732
  }
3346
3733
  function Quiz({ id, title, questions, className, ...props }) {
3347
3734
  const [answers, setAnswers] = useState7({});
@@ -3368,7 +3755,7 @@ function Quiz({ id, title, questions, className, ...props }) {
3368
3755
  };
3369
3756
  switch (q.type) {
3370
3757
  case "single":
3371
- return /* @__PURE__ */ jsx70(
3758
+ return /* @__PURE__ */ jsx71(
3372
3759
  SingleChoiceRenderer,
3373
3760
  {
3374
3761
  id: q.id,
@@ -3381,7 +3768,7 @@ function Quiz({ id, title, questions, className, ...props }) {
3381
3768
  key
3382
3769
  );
3383
3770
  case "multiple":
3384
- return /* @__PURE__ */ jsx70(
3771
+ return /* @__PURE__ */ jsx71(
3385
3772
  MultipleChoiceRenderer,
3386
3773
  {
3387
3774
  id: q.id,
@@ -3394,7 +3781,7 @@ function Quiz({ id, title, questions, className, ...props }) {
3394
3781
  key
3395
3782
  );
3396
3783
  case "numeric":
3397
- return /* @__PURE__ */ jsx70(
3784
+ return /* @__PURE__ */ jsx71(
3398
3785
  NumericRenderer,
3399
3786
  {
3400
3787
  id: q.id,
@@ -3412,10 +3799,10 @@ function Quiz({ id, title, questions, className, ...props }) {
3412
3799
  }
3413
3800
  };
3414
3801
  return /* @__PURE__ */ jsxs27("div", { "data-quiz-id": id, className: cn70(quizRootBase, className), ...props, children: [
3415
- /* @__PURE__ */ jsx70("div", { className: quizHeaderBase, children: title ? /* @__PURE__ */ jsx70(ark44.h3, { className: quizTitleBase, children: title }) : null }),
3802
+ /* @__PURE__ */ jsx71("div", { className: quizHeaderBase, children: title ? /* @__PURE__ */ jsx71(ark44.h3, { className: quizTitleBase, children: title }) : null }),
3416
3803
  questions.map(renderQuestion),
3417
3804
  /* @__PURE__ */ jsxs27("div", { className: "mt-4 flex items-center gap-3", children: [
3418
- submitted ? /* @__PURE__ */ jsx70(ark44.button, { type: "button", onClick: handleReset, className: quizResetButtonBase, children: "Reset" }) : /* @__PURE__ */ jsx70(
3805
+ submitted ? /* @__PURE__ */ jsx71(ark44.button, { type: "button", onClick: handleReset, className: quizResetButtonBase, children: "Reset" }) : /* @__PURE__ */ jsx71(
3419
3806
  ark44.button,
3420
3807
  {
3421
3808
  type: "button",
@@ -3425,9 +3812,9 @@ function Quiz({ id, title, questions, className, ...props }) {
3425
3812
  children: "Submit"
3426
3813
  }
3427
3814
  ),
3428
- /* @__PURE__ */ jsx70(ark44.span, { role: "status", className: quizScoreBase, children: submitted ? `${score}/${total} (${pct}%)` : `${total} question${total === 1 ? "" : "s"}` })
3815
+ /* @__PURE__ */ jsx71(ark44.span, { role: "status", className: quizScoreBase, children: submitted ? `${score}/${total} (${pct}%)` : `${total} question${total === 1 ? "" : "s"}` })
3429
3816
  ] }),
3430
- submitted && /* @__PURE__ */ jsx70("div", { className: quizResultBase, children: /* @__PURE__ */ jsxs27("div", { "aria-live": "polite", role: "status", className: "text-center", children: [
3817
+ submitted && /* @__PURE__ */ jsx71("div", { className: quizResultBase, children: /* @__PURE__ */ jsxs27("div", { "aria-live": "polite", role: "status", className: "text-center", children: [
3431
3818
  /* @__PURE__ */ jsxs27("p", { className: quizResultTitleBase, children: [
3432
3819
  score,
3433
3820
  "/",
@@ -3436,16 +3823,16 @@ function Quiz({ id, title, questions, className, ...props }) {
3436
3823
  pct,
3437
3824
  "%)"
3438
3825
  ] }),
3439
- /* @__PURE__ */ jsx70("p", { className: quizResultTextBase, children: pct >= 70 ? "Well done!" : "Keep studying and try again." })
3826
+ /* @__PURE__ */ jsx71("p", { className: quizResultTextBase, children: pct >= 70 ? "Well done!" : "Keep studying and try again." })
3440
3827
  ] }) })
3441
3828
  ] });
3442
3829
  }
3443
3830
 
3444
3831
  // src/prose.tsx
3445
3832
  import { proseVariants, cn as cn71 } from "@cloudvoyant/helical-ui";
3446
- import { jsx as jsx71 } from "react/jsx-runtime";
3833
+ import { jsx as jsx72 } from "react/jsx-runtime";
3447
3834
  function Prose({ as: Tag = "div", size, className, children, ...props }) {
3448
- return /* @__PURE__ */ jsx71(Tag, { className: cn71(proseVariants({ size }), "prose", className), ...props, children });
3835
+ return /* @__PURE__ */ jsx72(Tag, { className: cn71(proseVariants({ size }), "prose", className), ...props, children });
3449
3836
  }
3450
3837
 
3451
3838
  // src/toggle-group.tsx
@@ -3458,9 +3845,9 @@ import {
3458
3845
  toggleButtonVariants as toggleButtonVariants2,
3459
3846
  cn as cn72
3460
3847
  } from "@cloudvoyant/helical-ui";
3461
- import { jsx as jsx72 } from "react/jsx-runtime";
3848
+ import { jsx as jsx73 } from "react/jsx-runtime";
3462
3849
  function ToggleGroup({ orientation, attached, className, ...props }) {
3463
- return /* @__PURE__ */ jsx72(
3850
+ return /* @__PURE__ */ jsx73(
3464
3851
  ToggleGroupRoot,
3465
3852
  {
3466
3853
  orientation: orientation ?? "horizontal",
@@ -3470,7 +3857,7 @@ function ToggleGroup({ orientation, attached, className, ...props }) {
3470
3857
  );
3471
3858
  }
3472
3859
  function ToggleGroupItem({ variant, size, className, ...props }) {
3473
- return /* @__PURE__ */ jsx72(ArkToggleGroupItem, { className: cn72(toggleButtonVariants2({ variant, size }), className), ...props });
3860
+ return /* @__PURE__ */ jsx73(ArkToggleGroupItem, { className: cn72(toggleButtonVariants2({ variant, size }), className), ...props });
3474
3861
  }
3475
3862
 
3476
3863
  // src/listbox.tsx
@@ -3484,6 +3871,8 @@ import {
3484
3871
  ListboxInput as ArkListboxInput,
3485
3872
  ListboxEmpty as ArkListboxEmpty,
3486
3873
  ListboxLabel as ArkListboxLabel,
3874
+ ListboxItemGroup as ArkListboxItemGroup,
3875
+ ListboxItemGroupLabel as ArkListboxItemGroupLabel,
3487
3876
  createListCollection as createListCollection3,
3488
3877
  useListboxContext
3489
3878
  } from "@ark-ui/react/listbox";
@@ -3496,41 +3885,645 @@ import {
3496
3885
  listboxInputBase,
3497
3886
  listboxEmptyBase,
3498
3887
  listboxLabelBase,
3888
+ listboxItemGroupBase,
3889
+ listboxItemGroupLabelBase,
3499
3890
  cn as cn73
3500
3891
  } from "@cloudvoyant/helical-ui";
3501
- import { jsx as jsx73 } from "react/jsx-runtime";
3892
+ import { jsx as jsx74 } from "react/jsx-runtime";
3502
3893
  var useListbox = useListboxContext;
3503
3894
  function Listbox({ items, collection, className, children, ...rest }) {
3504
3895
  const resolvedCollection = useMemo6(
3505
3896
  () => collection ?? createListCollection3({ items: items ?? [] }),
3506
3897
  [collection, items]
3507
3898
  );
3508
- return /* @__PURE__ */ jsx73(ListboxRoot, { collection: resolvedCollection, className: cn73(listboxRootBase, className), ...rest, children });
3899
+ return /* @__PURE__ */ jsx74(ListboxRoot, { collection: resolvedCollection, className: cn73(listboxRootBase, className), ...rest, children });
3509
3900
  }
3510
3901
  function ListboxContent({ className, children, ...rest }) {
3511
- return /* @__PURE__ */ jsx73(ArkListboxContent, { className: cn73(listboxContentBase, className), ...rest, children });
3902
+ return /* @__PURE__ */ jsx74(ArkListboxContent, { className: cn73(listboxContentBase, className), ...rest, children });
3512
3903
  }
3513
3904
  function ListboxItem({ item, className, children, ...rest }) {
3514
- return /* @__PURE__ */ jsx73(ArkListboxItem, { item, className: cn73(listboxItemBase, className), ...rest, children });
3905
+ return /* @__PURE__ */ jsx74(ArkListboxItem, { item, className: cn73(listboxItemBase, className), ...rest, children });
3515
3906
  }
3516
3907
  function ListboxItemText({ className, children, ...rest }) {
3517
- return /* @__PURE__ */ jsx73(ArkListboxItemText, { className: cn73(listboxItemTextBase, className), ...rest, children });
3908
+ return /* @__PURE__ */ jsx74(ArkListboxItemText, { className: cn73(listboxItemTextBase, className), ...rest, children });
3518
3909
  }
3519
3910
  function ListboxItemIndicator({ className, children, ...rest }) {
3520
- return /* @__PURE__ */ jsx73(ArkListboxItemIndicator, { className: cn73(listboxItemIndicatorBase, className), ...rest, children });
3911
+ return /* @__PURE__ */ jsx74(ArkListboxItemIndicator, { className: cn73(listboxItemIndicatorBase, className), ...rest, children });
3521
3912
  }
3522
3913
  function ListboxInput({ className, ...rest }) {
3523
- return /* @__PURE__ */ jsx73(ArkListboxInput, { className: cn73(listboxInputBase, className), ...rest });
3914
+ return /* @__PURE__ */ jsx74(ArkListboxInput, { className: cn73(listboxInputBase, className), ...rest });
3524
3915
  }
3525
3916
  function ListboxEmpty({ className, children, ...rest }) {
3526
- return /* @__PURE__ */ jsx73(ArkListboxEmpty, { className: cn73(listboxEmptyBase, className), ...rest, children: children ?? "No results." });
3917
+ return /* @__PURE__ */ jsx74(ArkListboxEmpty, { className: cn73(listboxEmptyBase, className), ...rest, children: children ?? "No results." });
3527
3918
  }
3528
3919
  function ListboxLabel({ className, children, ...rest }) {
3529
- return /* @__PURE__ */ jsx73(ArkListboxLabel, { className: cn73(listboxLabelBase, className), ...rest, children });
3920
+ return /* @__PURE__ */ jsx74(ArkListboxLabel, { className: cn73(listboxLabelBase, className), ...rest, children });
3921
+ }
3922
+ function ListboxItemGroup({ className, children, ...rest }) {
3923
+ return /* @__PURE__ */ jsx74(ArkListboxItemGroup, { className: cn73(listboxItemGroupBase, className), ...rest, children });
3924
+ }
3925
+ function ListboxItemGroupLabel({ className, children, ...rest }) {
3926
+ return /* @__PURE__ */ jsx74(ArkListboxItemGroupLabel, { className: cn73(listboxItemGroupLabelBase, className), ...rest, children });
3927
+ }
3928
+
3929
+ // src/kbd.tsx
3930
+ import { ark as ark45 } from "@ark-ui/react/factory";
3931
+ import {
3932
+ cn as cn74,
3933
+ formatKeyChord,
3934
+ formatKeySequence,
3935
+ kbdGroupBase,
3936
+ kbdVariants
3937
+ } from "@cloudvoyant/helical-ui";
3938
+ import { jsx as jsx75 } from "react/jsx-runtime";
3939
+ function Kbd({
3940
+ variant = "outline",
3941
+ size = "md",
3942
+ hotkey,
3943
+ platform,
3944
+ useSymbols = true,
3945
+ className,
3946
+ children,
3947
+ ...props
3948
+ }) {
3949
+ if (hotkey && !children) {
3950
+ if (Array.isArray(hotkey) || typeof hotkey === "string" && /\s+/.test(hotkey.trim())) {
3951
+ const steps = formatKeySequence(hotkey, { platform, useSymbols });
3952
+ return /* @__PURE__ */ jsx75("span", { "data-slot": "kbd-sequence", className: cn74(kbdGroupBase, className), children: steps.map((step, idx) => /* @__PURE__ */ jsx75(
3953
+ ark45.kbd,
3954
+ {
3955
+ "data-slot": "kbd",
3956
+ "data-variant": variant,
3957
+ "data-size": size,
3958
+ className: cn74(kbdVariants({ variant, size })),
3959
+ ...props,
3960
+ children: step
3961
+ },
3962
+ `${step}-${idx}`
3963
+ )) });
3964
+ }
3965
+ const formatted = formatKeyChord(hotkey, { platform, useSymbols });
3966
+ return /* @__PURE__ */ jsx75(
3967
+ ark45.kbd,
3968
+ {
3969
+ "data-slot": "kbd",
3970
+ "data-variant": variant,
3971
+ "data-size": size,
3972
+ className: cn74(kbdVariants({ variant, size }), className),
3973
+ ...props,
3974
+ children: formatted
3975
+ }
3976
+ );
3977
+ }
3978
+ return /* @__PURE__ */ jsx75(
3979
+ ark45.kbd,
3980
+ {
3981
+ "data-slot": "kbd",
3982
+ "data-variant": variant,
3983
+ "data-size": size,
3984
+ className: cn74(kbdVariants({ variant, size }), className),
3985
+ ...props,
3986
+ children
3987
+ }
3988
+ );
3989
+ }
3990
+
3991
+ // src/which-key/Pane.tsx
3992
+ import { ark as ark46 } from "@ark-ui/react/factory";
3993
+ import { cn as cn75, paneVariants } from "@cloudvoyant/helical-ui";
3994
+ import { jsx as jsx76 } from "react/jsx-runtime";
3995
+ function Pane({
3996
+ paneId,
3997
+ paneTitle = "Pane",
3998
+ paneDisabled = false,
3999
+ paneOrder,
4000
+ className,
4001
+ children,
4002
+ ...props
4003
+ }) {
4004
+ const pane = useOptionalPaneRegistration({
4005
+ paneId,
4006
+ paneTitle,
4007
+ paneDisabled,
4008
+ paneOrder,
4009
+ defaultTitle: paneTitle
4010
+ });
4011
+ return /* @__PURE__ */ jsx76(
4012
+ ark46.div,
4013
+ {
4014
+ ref: pane.ref,
4015
+ "data-slot": "pane",
4016
+ ...pane.dataAttributes,
4017
+ className: cn75(paneVariants({ active: pane.isActive }), className),
4018
+ ...props,
4019
+ children
4020
+ }
4021
+ );
4022
+ }
4023
+
4024
+ // src/which-key/WhichKey.tsx
4025
+ import { useEffect as useEffect10, useRef as useRef4 } from "react";
4026
+ import { Portal as Portal9 } from "@ark-ui/react/portal";
4027
+ import { Presence } from "@ark-ui/react/presence";
4028
+ import {
4029
+ cn as cn78,
4030
+ isGroupNode,
4031
+ jumpBadgeMatchedPrefixBase,
4032
+ jumpBadgeVariants,
4033
+ jumpOverlayRootBase,
4034
+ whichKeyBodyVariants,
4035
+ whichKeyBreadcrumbBase,
4036
+ whichKeyFooterBase,
4037
+ whichKeyHeaderBase,
4038
+ whichKeyItemBase,
4039
+ whichKeyItemLabelBase,
4040
+ whichKeyTitleBase,
4041
+ whichKeyVariants
4042
+ } from "@cloudvoyant/helical-ui";
4043
+
4044
+ // src/which-key/WhichKeyExplorer.tsx
4045
+ import { useEffect as useEffect9, useMemo as useMemo7, useState as useState8 } from "react";
4046
+ import { Highlight } from "@ark-ui/react/highlight";
4047
+ import { createListCollection as createListCollection4 } from "@ark-ui/react/listbox";
4048
+ import {
4049
+ cn as cn76,
4050
+ whichKeyExplorerContentBase,
4051
+ whichKeyExplorerHeaderBase,
4052
+ whichKeyExplorerHighlightMarkBase,
4053
+ whichKeyExplorerInputBase,
4054
+ whichKeyExplorerItemBase,
4055
+ whichKeyExplorerListboxBase,
4056
+ whichKeyExplorerListContentBase,
4057
+ whichKeyModeBadgeVariants
4058
+ } from "@cloudvoyant/helical-ui";
4059
+ import { jsx as jsx77, jsxs as jsxs28 } from "react/jsx-runtime";
4060
+ function WhichKeyExplorer({
4061
+ open: controlledOpen,
4062
+ onOpenChange,
4063
+ placeholder = "Search keybindings...",
4064
+ className
4065
+ }) {
4066
+ const controller = useOptionalWhichKeyController();
4067
+ if (!controller) return null;
4068
+ return /* @__PURE__ */ jsx77(
4069
+ WhichKeyExplorerInner,
4070
+ {
4071
+ open: controlledOpen,
4072
+ onOpenChange,
4073
+ placeholder,
4074
+ className
4075
+ }
4076
+ );
4077
+ }
4078
+ function WhichKeyExplorerInner({
4079
+ open: controlledOpen,
4080
+ onOpenChange,
4081
+ placeholder,
4082
+ className
4083
+ }) {
4084
+ const {
4085
+ preset,
4086
+ explorerOpen,
4087
+ explorerQuery,
4088
+ explorerEntries,
4089
+ openExplorer,
4090
+ closeExplorer,
4091
+ setExplorerQuery,
4092
+ controller
4093
+ } = useWhichKey();
4094
+ const isOpen = controlledOpen ?? explorerOpen;
4095
+ const [highlightedId, setHighlightedId] = useState8(null);
4096
+ const handleOpenChange = (nextOpen) => {
4097
+ if (nextOpen) {
4098
+ openExplorer();
4099
+ } else {
4100
+ closeExplorer();
4101
+ }
4102
+ onOpenChange?.(nextOpen);
4103
+ };
4104
+ const groupedEntries = useMemo7(() => {
4105
+ const groups = /* @__PURE__ */ new Map();
4106
+ for (const entry of explorerEntries) {
4107
+ const groupName = entry.group || "General";
4108
+ const list = groups.get(groupName) ?? [];
4109
+ list.push(entry);
4110
+ groups.set(groupName, list);
4111
+ }
4112
+ return Array.from(groups.entries());
4113
+ }, [explorerEntries]);
4114
+ const orderedEntries = useMemo7(
4115
+ () => groupedEntries.flatMap(([, entries]) => entries),
4116
+ [groupedEntries]
4117
+ );
4118
+ const effectiveHighlightedId = useMemo7(() => {
4119
+ if (orderedEntries.length === 0) return null;
4120
+ if (highlightedId && orderedEntries.some((e) => e.id === highlightedId)) {
4121
+ return highlightedId;
4122
+ }
4123
+ return orderedEntries[0].id;
4124
+ }, [highlightedId, orderedEntries]);
4125
+ const collection = useMemo7(
4126
+ () => createListCollection4({
4127
+ items: orderedEntries.map((entry) => ({
4128
+ value: entry.id,
4129
+ label: entry.label,
4130
+ entry
4131
+ }))
4132
+ }),
4133
+ [orderedEntries]
4134
+ );
4135
+ useEffect9(() => {
4136
+ if (!isOpen || typeof document === "undefined") return;
4137
+ const focusInput = () => {
4138
+ const input = document.querySelector(
4139
+ '[data-which-key-explorer] [data-testid="which-key-explorer-input"]'
4140
+ );
4141
+ input?.focus();
4142
+ };
4143
+ focusInput();
4144
+ const raf = requestAnimationFrame(focusInput);
4145
+ return () => cancelAnimationFrame(raf);
4146
+ }, [isOpen]);
4147
+ const scrollItemIntoView = (id) => {
4148
+ requestAnimationFrame(() => {
4149
+ if (typeof document === "undefined") return;
4150
+ const items = Array.from(
4151
+ document.querySelectorAll(
4152
+ '[data-which-key-explorer] [data-part="item"]'
4153
+ )
4154
+ );
4155
+ for (const el of items) {
4156
+ if (el.getAttribute("data-value") === id) {
4157
+ el.scrollIntoView({ block: "nearest" });
4158
+ break;
4159
+ }
4160
+ }
4161
+ });
4162
+ };
4163
+ if (!isOpen) return null;
4164
+ return /* @__PURE__ */ jsxs28(
4165
+ Dialog,
4166
+ {
4167
+ open: isOpen,
4168
+ lazyMount: true,
4169
+ unmountOnExit: true,
4170
+ initialFocusEl: () => typeof document !== "undefined" ? document.querySelector(
4171
+ '[data-which-key-explorer] [data-testid="which-key-explorer-input"]'
4172
+ ) : null,
4173
+ onOpenChange: (details) => handleOpenChange(details.open),
4174
+ children: [
4175
+ /* @__PURE__ */ jsx77(DialogBackdrop, {}),
4176
+ /* @__PURE__ */ jsxs28(
4177
+ DialogContent,
4178
+ {
4179
+ "data-which-key-explorer": "true",
4180
+ "data-testid": "which-key-explorer",
4181
+ className: cn76(whichKeyExplorerContentBase, className),
4182
+ children: [
4183
+ /* @__PURE__ */ jsxs28(DialogHeader, { className: whichKeyExplorerHeaderBase, children: [
4184
+ /* @__PURE__ */ jsxs28(Row, { className: "items-center gap-2", children: [
4185
+ /* @__PURE__ */ jsx77(DialogTitle, { className: "text-sm font-semibold", children: "Keybindings" }),
4186
+ /* @__PURE__ */ jsx77("span", { className: whichKeyModeBadgeVariants({ mode: "normal" }), children: preset })
4187
+ ] }),
4188
+ /* @__PURE__ */ jsx77(
4189
+ DialogDismiss,
4190
+ {
4191
+ tabIndex: -1,
4192
+ className: "static opacity-80 hover:opacity-100 focus:ring-0",
4193
+ children: /* @__PURE__ */ jsx77(Kbd, { size: "sm", children: "Esc" })
4194
+ }
4195
+ )
4196
+ ] }),
4197
+ /* @__PURE__ */ jsxs28(
4198
+ Listbox,
4199
+ {
4200
+ collection,
4201
+ selectionMode: "single",
4202
+ highlightedValue: effectiveHighlightedId,
4203
+ onHighlightChange: (details) => {
4204
+ if (details.highlightedValue) {
4205
+ setHighlightedId(details.highlightedValue);
4206
+ }
4207
+ },
4208
+ onSelect: (details) => {
4209
+ controller.executeExplorerEntry(details.value);
4210
+ },
4211
+ className: whichKeyExplorerListboxBase,
4212
+ children: [
4213
+ /* @__PURE__ */ jsx77(
4214
+ ListboxInput,
4215
+ {
4216
+ autoFocus: true,
4217
+ autoHighlight: true,
4218
+ "data-testid": "which-key-explorer-input",
4219
+ placeholder,
4220
+ value: explorerQuery,
4221
+ onChange: (e) => setExplorerQuery(e.currentTarget.value),
4222
+ onKeyDown: (e) => {
4223
+ if (orderedEntries.length === 0) return;
4224
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
4225
+ e.preventDefault();
4226
+ e.stopPropagation();
4227
+ const delta = e.key === "ArrowDown" ? 1 : -1;
4228
+ const currentIdx = orderedEntries.findIndex(
4229
+ (item) => item.id === effectiveHighlightedId
4230
+ );
4231
+ const nextIdx = currentIdx === -1 ? 0 : (currentIdx + delta + orderedEntries.length) % orderedEntries.length;
4232
+ const nextId = orderedEntries[nextIdx].id;
4233
+ setHighlightedId(nextId);
4234
+ scrollItemIntoView(nextId);
4235
+ return;
4236
+ }
4237
+ if (e.key === "Enter") {
4238
+ const itemVal = effectiveHighlightedId ?? orderedEntries[0]?.id;
4239
+ if (itemVal) {
4240
+ e.preventDefault();
4241
+ e.stopPropagation();
4242
+ controller.executeExplorerEntry(itemVal);
4243
+ }
4244
+ }
4245
+ },
4246
+ className: whichKeyExplorerInputBase
4247
+ }
4248
+ ),
4249
+ /* @__PURE__ */ jsx77(Scroll, { className: "max-h-96 min-h-0 flex-1", viewportClassName: "max-h-96", children: /* @__PURE__ */ jsxs28(
4250
+ ListboxContent,
4251
+ {
4252
+ "data-testid": "which-key-explorer-list",
4253
+ className: whichKeyExplorerListContentBase,
4254
+ children: [
4255
+ groupedEntries.map(([groupName, entries]) => /* @__PURE__ */ jsxs28(ListboxItemGroup, { children: [
4256
+ /* @__PURE__ */ jsx77(ListboxItemGroupLabel, { children: groupName }),
4257
+ entries.map((entry) => /* @__PURE__ */ jsxs28(
4258
+ ListboxItem,
4259
+ {
4260
+ item: {
4261
+ value: entry.id,
4262
+ label: entry.label
4263
+ },
4264
+ "data-testid": "which-key-explorer-item",
4265
+ "data-command-id": entry.commandId,
4266
+ onClick: () => controller.executeExplorerEntry(entry),
4267
+ className: whichKeyExplorerItemBase,
4268
+ children: [
4269
+ /* @__PURE__ */ jsx77(ListboxItemText, { className: "min-w-0 flex-1 truncate font-medium text-foreground", children: /* @__PURE__ */ jsx77(
4270
+ Highlight,
4271
+ {
4272
+ text: entry.label,
4273
+ query: explorerQuery,
4274
+ ignoreCase: true,
4275
+ matchAll: true,
4276
+ className: whichKeyExplorerHighlightMarkBase
4277
+ }
4278
+ ) }),
4279
+ /* @__PURE__ */ jsx77(Row, { className: "shrink-0 items-center gap-1", children: /* @__PURE__ */ jsx77(Kbd, { size: "sm", hotkey: entry.chords }) })
4280
+ ]
4281
+ },
4282
+ entry.id
4283
+ ))
4284
+ ] }, groupName)),
4285
+ groupedEntries.length === 0 && /* @__PURE__ */ jsx77(ListboxEmpty, { children: "No matching keybindings found." })
4286
+ ]
4287
+ }
4288
+ ) })
4289
+ ]
4290
+ }
4291
+ )
4292
+ ]
4293
+ }
4294
+ )
4295
+ ]
4296
+ }
4297
+ );
4298
+ }
4299
+
4300
+ // src/which-key/WhichKeyMode.tsx
4301
+ import { forwardRef } from "react";
4302
+ import {
4303
+ cn as cn77,
4304
+ whichKeyModeBadgeVariants as whichKeyModeBadgeVariants2
4305
+ } from "@cloudvoyant/helical-ui";
4306
+ import { jsx as jsx78 } from "react/jsx-runtime";
4307
+ var WhichKeyMode = forwardRef(function WhichKeyMode2({ mode: modeProp, sticky: stickyProp, showPreset = false, size = "sm", className, ...props }, ref) {
4308
+ const ctx = useWhichKey();
4309
+ const resolvedMode = modeProp ?? ctx.mode;
4310
+ const resolvedSticky = stickyProp ?? ctx.sticky;
4311
+ const modeLabel = resolvedSticky ? `${resolvedMode}\xB7lock` : resolvedMode;
4312
+ const label = showPreset ? `${ctx.preset} \xB7 ${modeLabel}` : modeLabel;
4313
+ return /* @__PURE__ */ jsx78(
4314
+ "span",
4315
+ {
4316
+ ref,
4317
+ "data-slot": "which-key-mode",
4318
+ "data-testid": "which-key-mode-badge",
4319
+ "data-mode": resolvedMode,
4320
+ "data-sticky": resolvedSticky ? "true" : "false",
4321
+ "data-preset": ctx.preset,
4322
+ className: cn77(whichKeyModeBadgeVariants2({ mode: resolvedMode, size }), className),
4323
+ ...props,
4324
+ children: label
4325
+ }
4326
+ );
4327
+ });
4328
+
4329
+ // src/which-key/WhichKey.tsx
4330
+ import { Fragment as Fragment7, jsx as jsx79, jsxs as jsxs29 } from "react/jsx-runtime";
4331
+ function WhichKey(props) {
4332
+ const controller = useOptionalWhichKeyController();
4333
+ if (!controller) return null;
4334
+ return /* @__PURE__ */ jsx79(WhichKeyInner, { ...props });
4335
+ }
4336
+ function WhichKeyInner({
4337
+ variant = "helix",
4338
+ showModeBadge = true,
4339
+ showExplorer = true,
4340
+ className
4341
+ }) {
4342
+ const {
4343
+ preset,
4344
+ mode,
4345
+ breadcrumb,
4346
+ title,
4347
+ items,
4348
+ isOpen,
4349
+ sticky,
4350
+ countBuffer,
4351
+ jumpAction,
4352
+ jumpTargets,
4353
+ triggerKey,
4354
+ stepBackPrefix,
4355
+ closePrefix,
4356
+ controller
4357
+ } = useWhichKey();
4358
+ const panelRef = useRef4(null);
4359
+ const jumpOverlayRef = useRef4(null);
4360
+ useEffect10(() => {
4361
+ if (!isOpen) return;
4362
+ return controller.trackBranchElement(() => panelRef.current);
4363
+ }, [controller, isOpen]);
4364
+ useEffect10(() => {
4365
+ if (mode !== "jump") return;
4366
+ return controller.trackBranchElement(() => jumpOverlayRef.current);
4367
+ }, [controller, mode]);
4368
+ return /* @__PURE__ */ jsxs29(Fragment7, { children: [
4369
+ /* @__PURE__ */ jsx79(Portal9, { children: /* @__PURE__ */ jsx79(Presence, { present: isOpen, lazyMount: true, unmountOnExit: true, children: /* @__PURE__ */ jsxs29(
4370
+ "div",
4371
+ {
4372
+ ref: panelRef,
4373
+ role: "region",
4374
+ "aria-label": title || "WhichKey commands",
4375
+ "data-which-key-root": "true",
4376
+ "data-testid": "which-key-panel",
4377
+ "data-variant": variant,
4378
+ "data-preset": preset,
4379
+ "data-mode": mode,
4380
+ "data-sticky": sticky ? "true" : "false",
4381
+ className: cn78(whichKeyVariants({ variant }), className),
4382
+ children: [
4383
+ /* @__PURE__ */ jsxs29("div", { className: whichKeyHeaderBase, children: [
4384
+ /* @__PURE__ */ jsxs29("div", { className: whichKeyTitleBase, children: [
4385
+ showModeBadge && /* @__PURE__ */ jsx79(WhichKeyMode, { mode, sticky }),
4386
+ /* @__PURE__ */ jsx79("span", { "data-testid": "which-key-title", children: title === "Space" ? "Leader" : title }),
4387
+ countBuffer && /* @__PURE__ */ jsxs29(
4388
+ "span",
4389
+ {
4390
+ "data-testid": "which-key-count",
4391
+ className: "rounded bg-muted px-1 font-mono text-[10px]",
4392
+ children: [
4393
+ countBuffer,
4394
+ "\xD7"
4395
+ ]
4396
+ }
4397
+ )
4398
+ ] }),
4399
+ /* @__PURE__ */ jsx79(
4400
+ "div",
4401
+ {
4402
+ "data-testid": "which-key-breadcrumb",
4403
+ className: whichKeyBreadcrumbBase,
4404
+ children: /* @__PURE__ */ jsx79("span", { children: breadcrumb.join(" \xBB ") })
4405
+ }
4406
+ )
4407
+ ] }),
4408
+ /* @__PURE__ */ jsx79(Scroll, { className: "max-h-72", viewportClassName: "max-h-72", children: /* @__PURE__ */ jsx79(
4409
+ "div",
4410
+ {
4411
+ "data-testid": "which-key-items",
4412
+ className: whichKeyBodyVariants({ variant }),
4413
+ children: items.map((node) => {
4414
+ const isGroup = Boolean(
4415
+ node.children || node.proxy || node.expand || node.label.startsWith("+")
4416
+ );
4417
+ return /* @__PURE__ */ jsxs29(
4418
+ "button",
4419
+ {
4420
+ type: "button",
4421
+ "data-testid": "which-key-item",
4422
+ "data-key": node.key,
4423
+ "data-group": isGroup ? "true" : "false",
4424
+ onClick: (e) => {
4425
+ e.preventDefault();
4426
+ e.stopPropagation();
4427
+ triggerKey(node.key);
4428
+ },
4429
+ className: whichKeyItemBase,
4430
+ children: [
4431
+ /* @__PURE__ */ jsx79(
4432
+ "span",
4433
+ {
4434
+ "data-group": isGroup ? "true" : "false",
4435
+ className: whichKeyItemLabelBase,
4436
+ children: node.label
4437
+ }
4438
+ ),
4439
+ /* @__PURE__ */ jsx79(
4440
+ Kbd,
4441
+ {
4442
+ size: "sm",
4443
+ variant: isGroup ? "subtle" : "outline",
4444
+ hotkey: node.key
4445
+ }
4446
+ )
4447
+ ]
4448
+ },
4449
+ node.key
4450
+ );
4451
+ })
4452
+ }
4453
+ ) }),
4454
+ /* @__PURE__ */ jsxs29("div", { className: whichKeyFooterBase, children: [
4455
+ /* @__PURE__ */ jsxs29(Row, { className: "items-center gap-2", children: [
4456
+ breadcrumb.length > 1 && /* @__PURE__ */ jsxs29(
4457
+ "button",
4458
+ {
4459
+ type: "button",
4460
+ onClick: () => stepBackPrefix(),
4461
+ className: "inline-flex items-center gap-1 hover:text-foreground",
4462
+ children: [
4463
+ /* @__PURE__ */ jsx79(Kbd, { size: "sm", children: "\u232B" }),
4464
+ /* @__PURE__ */ jsx79("span", { children: "Back" })
4465
+ ]
4466
+ }
4467
+ ),
4468
+ /* @__PURE__ */ jsxs29(
4469
+ "button",
4470
+ {
4471
+ type: "button",
4472
+ onClick: () => closePrefix(),
4473
+ className: "inline-flex items-center gap-1 hover:text-foreground",
4474
+ children: [
4475
+ /* @__PURE__ */ jsx79(Kbd, { size: "sm", children: "Esc" }),
4476
+ /* @__PURE__ */ jsx79("span", { children: "Close" })
4477
+ ]
4478
+ }
4479
+ )
4480
+ ] }),
4481
+ /* @__PURE__ */ jsx79("span", { className: "font-mono uppercase opacity-75", children: preset })
4482
+ ] })
4483
+ ]
4484
+ }
4485
+ ) }) }),
4486
+ /* @__PURE__ */ jsx79(Portal9, { children: /* @__PURE__ */ jsx79(
4487
+ Presence,
4488
+ {
4489
+ present: mode === "jump" && jumpTargets.length > 0,
4490
+ lazyMount: true,
4491
+ unmountOnExit: true,
4492
+ children: /* @__PURE__ */ jsx79(
4493
+ "div",
4494
+ {
4495
+ ref: jumpOverlayRef,
4496
+ "data-which-key-jump-overlay": "true",
4497
+ "data-testid": "which-key-jump-overlay",
4498
+ "data-jump-action": jumpAction,
4499
+ className: jumpOverlayRootBase,
4500
+ children: jumpTargets.map((target) => /* @__PURE__ */ jsxs29(
4501
+ "span",
4502
+ {
4503
+ "data-testid": "which-key-jump-badge",
4504
+ "data-jump-label": target.label,
4505
+ style: {
4506
+ top: `${Math.max(4, target.rect.top - 4)}px`,
4507
+ left: `${Math.max(4, target.rect.left - 4)}px`
4508
+ },
4509
+ className: jumpBadgeVariants({ action: jumpAction }),
4510
+ children: [
4511
+ target.matchedPrefix && /* @__PURE__ */ jsx79("span", { className: jumpBadgeMatchedPrefixBase, children: target.matchedPrefix }),
4512
+ /* @__PURE__ */ jsx79("span", { children: target.remainingLabel })
4513
+ ]
4514
+ },
4515
+ target.id
4516
+ ))
4517
+ }
4518
+ )
4519
+ }
4520
+ ) }),
4521
+ showExplorer && /* @__PURE__ */ jsx79(WhichKeyExplorer, {})
4522
+ ] });
3530
4523
  }
3531
4524
 
3532
4525
  // src/editor/Editor.tsx
3533
- import { forwardRef as forwardRef3, useEffect as useEffect16, useImperativeHandle as useImperativeHandle3, useMemo as useMemo7, useRef as useRef9, useState as useState18 } from "react";
4526
+ import { forwardRef as forwardRef4, useEffect as useEffect19, useImperativeHandle as useImperativeHandle3, useMemo as useMemo8, useRef as useRef11, useState as useState19 } from "react";
3534
4527
  import { useEditor, EditorContent, ReactNodeViewRenderer } from "@tiptap/react";
3535
4528
  import {
3536
4529
  buildExtensions,
@@ -3544,14 +4537,14 @@ import {
3544
4537
  } from "@cloudvoyant/helical-ui";
3545
4538
 
3546
4539
  // src/editor/ImageNodeView.tsx
3547
- import { useState as useState8 } from "react";
4540
+ import { useState as useState9 } from "react";
3548
4541
  import { NodeViewWrapper } from "@tiptap/react";
3549
- import { jsx as jsx74, jsxs as jsxs28 } from "react/jsx-runtime";
4542
+ import { jsx as jsx80, jsxs as jsxs30 } from "react/jsx-runtime";
3550
4543
  function ImageNodeView({ node, updateAttributes, selected, editor, getPos }) {
3551
- const [captionFocused, setCaptionFocused] = useState8(false);
4544
+ const [captionFocused, setCaptionFocused] = useState9(false);
3552
4545
  const { src, srcset, alt, caption } = node.attrs;
3553
- return /* @__PURE__ */ jsxs28(NodeViewWrapper, { as: "figure", "data-type": "image-node", className: "my-6 m-0 relative", children: [
3554
- /* @__PURE__ */ jsx74(
4546
+ return /* @__PURE__ */ jsxs30(NodeViewWrapper, { as: "figure", "data-type": "image-node", className: "my-6 m-0 relative", children: [
4547
+ /* @__PURE__ */ jsx80(
3555
4548
  "img",
3556
4549
  {
3557
4550
  src,
@@ -3562,7 +4555,7 @@ function ImageNodeView({ node, updateAttributes, selected, editor, getPos }) {
3562
4555
  "data-selected": selected ? "" : void 0
3563
4556
  }
3564
4557
  ),
3565
- /* @__PURE__ */ jsx74(
4558
+ /* @__PURE__ */ jsx80(
3566
4559
  "input",
3567
4560
  {
3568
4561
  className: "caption-input mt-2 w-full bg-transparent text-center text-sm italic text-muted-foreground outline-none",
@@ -3595,11 +4588,11 @@ function ImageNodeView({ node, updateAttributes, selected, editor, getPos }) {
3595
4588
 
3596
4589
  // src/editor/UrlMentionPill.tsx
3597
4590
  import { NodeViewWrapper as NodeViewWrapper2 } from "@tiptap/react";
3598
- import { jsx as jsx75, jsxs as jsxs29 } from "react/jsx-runtime";
4591
+ import { jsx as jsx81, jsxs as jsxs31 } from "react/jsx-runtime";
3599
4592
  function UrlMentionPill({ node }) {
3600
4593
  const { url, title, favicon } = node.attrs;
3601
4594
  const displayTitle = title || url || "";
3602
- return /* @__PURE__ */ jsx75(NodeViewWrapper2, { as: "span", className: "inline", children: /* @__PURE__ */ jsxs29(
4595
+ return /* @__PURE__ */ jsx81(NodeViewWrapper2, { as: "span", className: "inline", children: /* @__PURE__ */ jsxs31(
3603
4596
  "a",
3604
4597
  {
3605
4598
  href: url || "",
@@ -3609,7 +4602,7 @@ function UrlMentionPill({ node }) {
3609
4602
  className: "url-mention-pill url-mention-pill-edit inline-flex items-center gap-1.5 rounded-md px-1.5 py-0.5 align-text-bottom text-sm leading-tight no-underline",
3610
4603
  style: { color: "inherit" },
3611
4604
  children: [
3612
- favicon ? /* @__PURE__ */ jsx75(
4605
+ favicon ? /* @__PURE__ */ jsx81(
3613
4606
  "img",
3614
4607
  {
3615
4608
  src: favicon,
@@ -3619,8 +4612,8 @@ function UrlMentionPill({ node }) {
3619
4612
  event.currentTarget.style.display = "none";
3620
4613
  }
3621
4614
  }
3622
- ) : /* @__PURE__ */ jsx75("svg", { className: "inline-block h-3.5 w-3.5 shrink-0", fill: "currentColor", viewBox: "0 0 20 20", "aria-hidden": "true", children: /* @__PURE__ */ jsx75("path", { d: "M12.586 4.586a2 2 0 112.828 2.828l-3 3a2 2 0 01-2.828 0 1 1 0 00-1.414 1.414 4 4 0 005.656 0l-3-3a4 4 0 00-5.656-5.656l-1.5 1.5a1 1 0 101.414 1.414l1.5-1.5zm-5 5a2 2 0 012.828 0 1 1 0 101.414-1.414 4 4 0 00-5.656 0l-3 3a4 4 0 105.656 5.656l1.5-1.5a1 1 0 10-1.414-1.414l-1.5 1.5a2 2 0 11-2.828-2.828l3-3z" }) }),
3623
- /* @__PURE__ */ jsx75("span", { children: displayTitle })
4615
+ ) : /* @__PURE__ */ jsx81("svg", { className: "inline-block h-3.5 w-3.5 shrink-0", fill: "currentColor", viewBox: "0 0 20 20", "aria-hidden": "true", children: /* @__PURE__ */ jsx81("path", { d: "M12.586 4.586a2 2 0 112.828 2.828l-3 3a2 2 0 01-2.828 0 1 1 0 00-1.414 1.414 4 4 0 005.656 0l-3-3a4 4 0 00-5.656-5.656l-1.5 1.5a1 1 0 101.414 1.414l1.5-1.5zm-5 5a2 2 0 012.828 0 1 1 0 101.414-1.414 4 4 0 00-5.656 0l-3 3a4 4 0 105.656 5.656l1.5-1.5a1 1 0 10-1.414-1.414l-1.5 1.5a2 2 0 11-2.828-2.828l3-3z" }) }),
4616
+ /* @__PURE__ */ jsx81("span", { children: displayTitle })
3624
4617
  ]
3625
4618
  }
3626
4619
  ) });
@@ -3628,7 +4621,7 @@ function UrlMentionPill({ node }) {
3628
4621
 
3629
4622
  // src/editor/LinkPreviewCard.tsx
3630
4623
  import { NodeViewWrapper as NodeViewWrapper3 } from "@tiptap/react";
3631
- import { jsx as jsx76, jsxs as jsxs30 } from "react/jsx-runtime";
4624
+ import { jsx as jsx82, jsxs as jsxs32 } from "react/jsx-runtime";
3632
4625
  function hostnameOf(url) {
3633
4626
  try {
3634
4627
  return new URL(url).hostname;
@@ -3650,10 +4643,10 @@ function LinkPreviewCard({ node }) {
3650
4643
  const { url, title, description, image, favicon, type } = node.attrs;
3651
4644
  if (type === "embed") {
3652
4645
  const videoId = url ? youTubeId(url) : null;
3653
- return /* @__PURE__ */ jsx76(NodeViewWrapper3, { as: "div", "data-type": "link-preview", className: "link-preview my-4", children: videoId ? (
4646
+ return /* @__PURE__ */ jsx82(NodeViewWrapper3, { as: "div", "data-type": "link-preview", className: "link-preview my-4", children: videoId ? (
3654
4647
  // helical YouTube takes the full url and derives the id itself.
3655
- /* @__PURE__ */ jsx76(YouTube, { url, title })
3656
- ) : /* @__PURE__ */ jsx76("div", { className: "relative h-0 overflow-hidden rounded-lg pb-[56.25%]", children: /* @__PURE__ */ jsx76(
4648
+ /* @__PURE__ */ jsx82(YouTube, { url, title })
4649
+ ) : /* @__PURE__ */ jsx82("div", { className: "relative h-0 overflow-hidden rounded-lg pb-[56.25%]", children: /* @__PURE__ */ jsx82(
3657
4650
  "iframe",
3658
4651
  {
3659
4652
  src: url,
@@ -3664,7 +4657,7 @@ function LinkPreviewCard({ node }) {
3664
4657
  }
3665
4658
  ) }) });
3666
4659
  }
3667
- return /* @__PURE__ */ jsx76(NodeViewWrapper3, { as: "div", "data-type": "link-preview", className: "link-preview my-4", children: /* @__PURE__ */ jsxs30(
4660
+ return /* @__PURE__ */ jsx82(NodeViewWrapper3, { as: "div", "data-type": "link-preview", className: "link-preview my-4", children: /* @__PURE__ */ jsxs32(
3668
4661
  "a",
3669
4662
  {
3670
4663
  href: url || "",
@@ -3673,13 +4666,13 @@ function LinkPreviewCard({ node }) {
3673
4666
  className: "bookmark-link flex overflow-hidden rounded-lg border border-border/70 bg-muted/40 no-underline transition-colors hover:bg-muted",
3674
4667
  style: { color: "inherit" },
3675
4668
  children: [
3676
- /* @__PURE__ */ jsxs30("div", { className: "flex min-w-0 flex-1 flex-col justify-between px-3 py-1.5", children: [
3677
- /* @__PURE__ */ jsxs30("div", { children: [
3678
- /* @__PURE__ */ jsx76("div", { className: "mb-1 line-clamp-1 text-base font-semibold", children: title }),
3679
- description ? /* @__PURE__ */ jsx76("p", { className: "mb-2 line-clamp-2 text-xs leading-snug text-muted-foreground", children: description }) : null
4669
+ /* @__PURE__ */ jsxs32("div", { className: "flex min-w-0 flex-1 flex-col justify-between px-3 py-1.5", children: [
4670
+ /* @__PURE__ */ jsxs32("div", { children: [
4671
+ /* @__PURE__ */ jsx82("div", { className: "mb-1 line-clamp-1 text-base font-semibold", children: title }),
4672
+ description ? /* @__PURE__ */ jsx82("p", { className: "mb-2 line-clamp-2 text-xs leading-snug text-muted-foreground", children: description }) : null
3680
4673
  ] }),
3681
- /* @__PURE__ */ jsxs30("div", { className: "mt-auto flex items-center gap-1.5 text-xs text-muted-foreground", children: [
3682
- favicon ? /* @__PURE__ */ jsx76(
4674
+ /* @__PURE__ */ jsxs32("div", { className: "mt-auto flex items-center gap-1.5 text-xs text-muted-foreground", children: [
4675
+ favicon ? /* @__PURE__ */ jsx82(
3683
4676
  "img",
3684
4677
  {
3685
4678
  src: favicon,
@@ -3689,11 +4682,11 @@ function LinkPreviewCard({ node }) {
3689
4682
  event.currentTarget.style.display = "none";
3690
4683
  }
3691
4684
  }
3692
- ) : /* @__PURE__ */ jsx76("svg", { className: "h-3 w-3 shrink-0", fill: "currentColor", viewBox: "0 0 20 20", "aria-hidden": "true", children: /* @__PURE__ */ jsx76("path", { d: "M12.586 4.586a2 2 0 112.828 2.828l-3 3a2 2 0 01-2.828 0 1 1 0 00-1.414 1.414 4 4 0 005.656 0l-3-3a4 4 0 00-5.656-5.656l-1.5 1.5a1 1 0 101.414 1.414l1.5-1.5zm-5 5a2 2 0 012.828 0 1 1 0 101.414-1.414 4 4 0 00-5.656 0l-3 3a4 4 0 105.656 5.656l1.5-1.5a1 1 0 10-1.414-1.414l-1.5 1.5a2 2 0 11-2.828-2.828l3-3z" }) }),
3693
- /* @__PURE__ */ jsx76("span", { className: "truncate opacity-80", children: url ? hostnameOf(url) : "" })
4685
+ ) : /* @__PURE__ */ jsx82("svg", { className: "h-3 w-3 shrink-0", fill: "currentColor", viewBox: "0 0 20 20", "aria-hidden": "true", children: /* @__PURE__ */ jsx82("path", { d: "M12.586 4.586a2 2 0 112.828 2.828l-3 3a2 2 0 01-2.828 0 1 1 0 00-1.414 1.414 4 4 0 005.656 0l-3-3a4 4 0 00-5.656-5.656l-1.5 1.5a1 1 0 101.414 1.414l1.5-1.5zm-5 5a2 2 0 012.828 0 1 1 0 101.414-1.414 4 4 0 00-5.656 0l-3 3a4 4 0 105.656 5.656l1.5-1.5a1 1 0 10-1.414-1.414l-1.5 1.5a2 2 0 11-2.828-2.828l3-3z" }) }),
4686
+ /* @__PURE__ */ jsx82("span", { className: "truncate opacity-80", children: url ? hostnameOf(url) : "" })
3694
4687
  ] })
3695
4688
  ] }),
3696
- image ? /* @__PURE__ */ jsx76("div", { className: "aspect-video w-44 shrink-0 bg-muted", children: /* @__PURE__ */ jsx76(
4689
+ image ? /* @__PURE__ */ jsx82("div", { className: "aspect-video w-44 shrink-0 bg-muted", children: /* @__PURE__ */ jsx82(
3697
4690
  "img",
3698
4691
  {
3699
4692
  src: image,
@@ -3713,8 +4706,8 @@ function LinkPreviewCard({ node }) {
3713
4706
  // src/editor/CodeBlockComponent.tsx
3714
4707
  import { NodeViewWrapper as NodeViewWrapper4, NodeViewContent } from "@tiptap/react";
3715
4708
  import { ChevronsUpDown, Check } from "lucide-react";
3716
- import { cn as cn74, codeBlockBodyBase as codeBlockBodyBase2, codeBlockContentBase as codeBlockContentBase2 } from "@cloudvoyant/helical-ui";
3717
- import { jsx as jsx77, jsxs as jsxs31 } from "react/jsx-runtime";
4709
+ import { cn as cn79, codeBlockBodyBase as codeBlockBodyBase2, codeBlockContentBase as codeBlockContentBase2 } from "@cloudvoyant/helical-ui";
4710
+ import { jsx as jsx83, jsxs as jsxs33 } from "react/jsx-runtime";
3718
4711
  var LANGUAGES = [
3719
4712
  { value: "javascript", label: "JavaScript" },
3720
4713
  { value: "typescript", label: "TypeScript" },
@@ -3737,11 +4730,11 @@ function CodeBlockComponent({ node, editor, updateAttributes }) {
3737
4730
  const language = node.attrs.language || "javascript";
3738
4731
  const editable = editor.isEditable;
3739
4732
  const currentLabel = LANGUAGES.find((item) => item.value === language)?.label ?? "JavaScript";
3740
- return /* @__PURE__ */ jsx77(NodeViewWrapper4, { className: "my-4", children: /* @__PURE__ */ jsxs31(CodeBlock, { code: node.textContent, language, className: "my-0", children: [
3741
- /* @__PURE__ */ jsxs31(CodeBlockHeader, { children: [
3742
- /* @__PURE__ */ jsx77(CodeBlockTitle, { children: currentLabel }),
3743
- /* @__PURE__ */ jsxs31("div", { className: "ml-auto flex items-center gap-2", contentEditable: false, children: [
3744
- editable ? /* @__PURE__ */ jsxs31(
4733
+ return /* @__PURE__ */ jsx83(NodeViewWrapper4, { className: "my-4", children: /* @__PURE__ */ jsxs33(CodeBlock, { code: node.textContent, language, className: "my-0", children: [
4734
+ /* @__PURE__ */ jsxs33(CodeBlockHeader, { children: [
4735
+ /* @__PURE__ */ jsx83(CodeBlockTitle, { children: currentLabel }),
4736
+ /* @__PURE__ */ jsxs33("div", { className: "ml-auto flex items-center gap-2", contentEditable: false, children: [
4737
+ editable ? /* @__PURE__ */ jsxs33(
3745
4738
  Select,
3746
4739
  {
3747
4740
  items: LANGUAGES,
@@ -3752,28 +4745,28 @@ function CodeBlockComponent({ node, editor, updateAttributes }) {
3752
4745
  },
3753
4746
  "aria-label": "Code language",
3754
4747
  children: [
3755
- /* @__PURE__ */ jsxs31(SelectTrigger, { size: "sm", className: "min-w-36 justify-between font-mono text-xs", children: [
3756
- /* @__PURE__ */ jsx77(SelectValue, {}),
3757
- /* @__PURE__ */ jsx77(SelectIndicator, { children: /* @__PURE__ */ jsx77(ChevronsUpDown, { className: "size-3 opacity-50" }) })
4748
+ /* @__PURE__ */ jsxs33(SelectTrigger, { size: "sm", className: "min-w-36 justify-between font-mono text-xs", children: [
4749
+ /* @__PURE__ */ jsx83(SelectValue, {}),
4750
+ /* @__PURE__ */ jsx83(SelectIndicator, { children: /* @__PURE__ */ jsx83(ChevronsUpDown, { className: "size-3 opacity-50" }) })
3758
4751
  ] }),
3759
- /* @__PURE__ */ jsx77(SelectContent, { children: LANGUAGES.map((item) => /* @__PURE__ */ jsxs31(SelectItem, { item, children: [
3760
- /* @__PURE__ */ jsx77(SelectItemText, { children: item.label }),
3761
- /* @__PURE__ */ jsx77(SelectItemIndicator, { children: /* @__PURE__ */ jsx77(Check, { className: "size-4" }) })
4752
+ /* @__PURE__ */ jsx83(SelectContent, { children: LANGUAGES.map((item) => /* @__PURE__ */ jsxs33(SelectItem, { item, children: [
4753
+ /* @__PURE__ */ jsx83(SelectItemText, { children: item.label }),
4754
+ /* @__PURE__ */ jsx83(SelectItemIndicator, { children: /* @__PURE__ */ jsx83(Check, { className: "size-4" }) })
3762
4755
  ] }, item.value)) })
3763
4756
  ]
3764
4757
  }
3765
4758
  ) : null,
3766
- /* @__PURE__ */ jsx77(CodeBlockCopyButton, {})
4759
+ /* @__PURE__ */ jsx83(CodeBlockCopyButton, {})
3767
4760
  ] })
3768
4761
  ] }),
3769
- /* @__PURE__ */ jsx77("div", { className: codeBlockBodyBase2, children: /* @__PURE__ */ jsx77(
4762
+ /* @__PURE__ */ jsx83("div", { className: codeBlockBodyBase2, children: /* @__PURE__ */ jsx83(
3770
4763
  "pre",
3771
4764
  {
3772
- className: cn74(
4765
+ className: cn79(
3773
4766
  codeBlockContentBase2,
3774
4767
  "editor-code-content m-0 rounded-none border-0 bg-transparent p-4 font-mono [&_code]:bg-transparent [&_code]:p-0"
3775
4768
  ),
3776
- children: /* @__PURE__ */ jsx77(NodeViewContent, { as: "code" })
4769
+ children: /* @__PURE__ */ jsx83(NodeViewContent, { as: "code" })
3777
4770
  }
3778
4771
  ) })
3779
4772
  ] }) });
@@ -3781,7 +4774,7 @@ function CodeBlockComponent({ node, editor, updateAttributes }) {
3781
4774
 
3782
4775
  // src/editor/NoticeNodeView.tsx
3783
4776
  import { NodeViewContent as NodeViewContent2, NodeViewWrapper as NodeViewWrapper5 } from "@tiptap/react";
3784
- import { jsx as jsx78, jsxs as jsxs32 } from "react/jsx-runtime";
4777
+ import { jsx as jsx84, jsxs as jsxs34 } from "react/jsx-runtime";
3785
4778
  var VARIANTS = ["info", "success", "warning", "error"];
3786
4779
  function NoticeNodeView({ node, editor, getPos, updateAttributes }) {
3787
4780
  const variant = node.attrs.variant ?? "info";
@@ -3794,9 +4787,9 @@ function NoticeNodeView({ node, editor, getPos, updateAttributes }) {
3794
4787
  const position = bodyStart();
3795
4788
  if (position !== null) editor.chain().focus().setTextSelection(position).run();
3796
4789
  };
3797
- return /* @__PURE__ */ jsx78(NodeViewWrapper5, { children: /* @__PURE__ */ jsxs32(Notice, { variant, className: "editor-notice-node relative my-1 px-2 py-1", children: [
3798
- /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", contentEditable: false, children: [
3799
- /* @__PURE__ */ jsx78(
4790
+ return /* @__PURE__ */ jsx84(NodeViewWrapper5, { children: /* @__PURE__ */ jsxs34(Notice, { variant, className: "editor-notice-node relative my-1 px-2 py-1", children: [
4791
+ /* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2", contentEditable: false, children: [
4792
+ /* @__PURE__ */ jsx84(
3800
4793
  "input",
3801
4794
  {
3802
4795
  "aria-label": "Notice title",
@@ -3812,23 +4805,23 @@ function NoticeNodeView({ node, editor, getPos, updateAttributes }) {
3812
4805
  placeholder: "Notice title"
3813
4806
  }
3814
4807
  ),
3815
- /* @__PURE__ */ jsx78(
4808
+ /* @__PURE__ */ jsx84(
3816
4809
  "select",
3817
4810
  {
3818
4811
  "aria-label": "Notice type",
3819
4812
  value: variant,
3820
4813
  onChange: (event) => updateAttributes({ variant: event.target.value }),
3821
4814
  className: "rounded border border-input bg-background px-1.5 py-0.5 text-xs",
3822
- children: VARIANTS.map((value) => /* @__PURE__ */ jsx78("option", { value, children: value }, value))
4815
+ children: VARIANTS.map((value) => /* @__PURE__ */ jsx84("option", { value, children: value }, value))
3823
4816
  }
3824
4817
  )
3825
4818
  ] }),
3826
- /* @__PURE__ */ jsx78(NodeViewContent2, { className: "[&_p]:m-0" })
4819
+ /* @__PURE__ */ jsx84(NodeViewContent2, { className: "[&_p]:m-0" })
3827
4820
  ] }) });
3828
4821
  }
3829
4822
 
3830
4823
  // src/editor/BubbleMenu.tsx
3831
- import { useEffect as useEffect10, useState as useState11 } from "react";
4824
+ import { useEffect as useEffect13, useState as useState12 } from "react";
3832
4825
  import { BubbleMenu as TiptapBubbleMenu } from "@tiptap/react/menus";
3833
4826
  import {
3834
4827
  Bold,
@@ -3843,10 +4836,10 @@ import {
3843
4836
  } from "lucide-react";
3844
4837
 
3845
4838
  // src/editor/FontColorPicker.tsx
3846
- import { useEffect as useEffect8, useState as useState9 } from "react";
4839
+ import { useEffect as useEffect11, useState as useState10 } from "react";
3847
4840
  import { Palette, Highlighter } from "lucide-react";
3848
- import { cn as cn75 } from "@cloudvoyant/helical-ui";
3849
- import { jsx as jsx79, jsxs as jsxs33 } from "react/jsx-runtime";
4841
+ import { cn as cn80 } from "@cloudvoyant/helical-ui";
4842
+ import { jsx as jsx85, jsxs as jsxs35 } from "react/jsx-runtime";
3850
4843
  var COLORS = ["yellow", "orange", "red", "fuchsia", "violet", "blue", "cyan", "green", "slate"];
3851
4844
  var TEXT_PREVIEW = {
3852
4845
  yellow: "#f59e0b",
@@ -3871,12 +4864,12 @@ var HIGHLIGHT_PREVIEW = {
3871
4864
  slate: "#e2e8f0"
3872
4865
  };
3873
4866
  function FontColorPicker({ editor, mode }) {
3874
- const [open, setOpen] = useState9(false);
3875
- const [, setRevision] = useState9(0);
4867
+ const [open, setOpen] = useState10(false);
4868
+ const [, setRevision] = useState10(0);
3876
4869
  const preview = mode === "highlight" ? HIGHLIGHT_PREVIEW : TEXT_PREVIEW;
3877
4870
  const active = editor.isActive(mode === "highlight" ? "highlight" : "textStyle");
3878
4871
  const currentColor = editor.getAttributes(mode === "highlight" ? "highlight" : "textStyle").color;
3879
- useEffect8(() => {
4872
+ useEffect11(() => {
3880
4873
  const refresh = () => setRevision((revision) => revision + 1);
3881
4874
  editor.on("transaction", refresh);
3882
4875
  editor.on("selectionUpdate", refresh);
@@ -3902,39 +4895,39 @@ function FontColorPicker({ editor, mode }) {
3902
4895
  setOpen(false);
3903
4896
  }
3904
4897
  const label = mode === "highlight" ? "Highlight color" : "Text color";
3905
- return /* @__PURE__ */ jsxs33(Popover, { open, onOpenChange: (details) => setOpen(details.open), children: [
3906
- /* @__PURE__ */ jsx79(
4898
+ return /* @__PURE__ */ jsxs35(Popover, { open, onOpenChange: (details) => setOpen(details.open), children: [
4899
+ /* @__PURE__ */ jsx85(
3907
4900
  PopoverTrigger,
3908
4901
  {
3909
4902
  "aria-label": label,
3910
4903
  "data-state": active ? "on" : "off",
3911
- className: cn75(
4904
+ className: cn80(
3912
4905
  "inline-flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted data-[state=on]:bg-accent data-[state=on]:text-accent-foreground"
3913
4906
  ),
3914
- children: mode === "highlight" ? /* @__PURE__ */ jsx79(Highlighter, { className: "h-4 w-4", style: currentColor ? { color: currentColor } : void 0 }) : /* @__PURE__ */ jsx79(Palette, { className: "h-4 w-4", style: currentColor ? { color: currentColor } : void 0 })
4907
+ children: mode === "highlight" ? /* @__PURE__ */ jsx85(Highlighter, { className: "h-4 w-4", style: currentColor ? { color: currentColor } : void 0 }) : /* @__PURE__ */ jsx85(Palette, { className: "h-4 w-4", style: currentColor ? { color: currentColor } : void 0 })
3915
4908
  }
3916
4909
  ),
3917
- /* @__PURE__ */ jsxs33(PopoverContent, { className: "w-auto p-2", children: [
3918
- /* @__PURE__ */ jsx79("div", { className: "grid grid-cols-5 gap-1", children: COLORS.map((color) => /* @__PURE__ */ jsx79(
4910
+ /* @__PURE__ */ jsxs35(PopoverContent, { className: "w-auto p-2", children: [
4911
+ /* @__PURE__ */ jsx85("div", { className: "grid grid-cols-5 gap-1", children: COLORS.map((color) => /* @__PURE__ */ jsx85(
3919
4912
  "button",
3920
4913
  {
3921
4914
  type: "button",
3922
4915
  "aria-label": color,
3923
4916
  onClick: () => selectColor(color),
3924
- className: cn75("h-6 w-6 rounded border border-border transition-transform hover:scale-110"),
4917
+ className: cn80("h-6 w-6 rounded border border-border transition-transform hover:scale-110"),
3925
4918
  style: { backgroundColor: preview[color] }
3926
4919
  },
3927
4920
  color
3928
4921
  )) }),
3929
- /* @__PURE__ */ jsx79("button", { type: "button", onClick: clearColor, className: "mt-2 w-full rounded px-2 py-1 text-xs hover:bg-muted", children: "Clear" })
4922
+ /* @__PURE__ */ jsx85("button", { type: "button", onClick: clearColor, className: "mt-2 w-full rounded px-2 py-1 text-xs hover:bg-muted", children: "Clear" })
3930
4923
  ] })
3931
4924
  ] });
3932
4925
  }
3933
4926
 
3934
4927
  // src/editor/LinkEditPopover.tsx
3935
- import { useEffect as useEffect9, useRef as useRef3, useState as useState10 } from "react";
4928
+ import { useEffect as useEffect12, useRef as useRef5, useState as useState11 } from "react";
3936
4929
  import { ExternalLink, Globe, Trash2 } from "lucide-react";
3937
- import { jsx as jsx80, jsxs as jsxs34 } from "react/jsx-runtime";
4930
+ import { jsx as jsx86, jsxs as jsxs36 } from "react/jsx-runtime";
3938
4931
  function safeExternalUrl(value) {
3939
4932
  try {
3940
4933
  const url = new URL(value);
@@ -3944,10 +4937,10 @@ function safeExternalUrl(value) {
3944
4937
  }
3945
4938
  }
3946
4939
  function LinkEditPopover({ editor, initialUrl = "", onClose }) {
3947
- const [url, setUrl] = useState10(initialUrl);
3948
- const inputRef = useRef3(null);
4940
+ const [url, setUrl] = useState11(initialUrl);
4941
+ const inputRef = useRef5(null);
3949
4942
  const externalUrl = safeExternalUrl(url.trim());
3950
- useEffect9(() => {
4943
+ useEffect12(() => {
3951
4944
  setUrl(initialUrl);
3952
4945
  inputRef.current?.focus();
3953
4946
  }, [initialUrl]);
@@ -3961,7 +4954,7 @@ function LinkEditPopover({ editor, initialUrl = "", onClose }) {
3961
4954
  editor.chain().focus().unsetLink().run();
3962
4955
  onClose();
3963
4956
  }
3964
- return /* @__PURE__ */ jsxs34(
4957
+ return /* @__PURE__ */ jsxs36(
3965
4958
  "div",
3966
4959
  {
3967
4960
  role: "dialog",
@@ -3978,8 +4971,8 @@ function LinkEditPopover({ editor, initialUrl = "", onClose }) {
3978
4971
  }
3979
4972
  },
3980
4973
  children: [
3981
- /* @__PURE__ */ jsx80(Globe, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }),
3982
- /* @__PURE__ */ jsx80(
4974
+ /* @__PURE__ */ jsx86(Globe, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }),
4975
+ /* @__PURE__ */ jsx86(
3983
4976
  "input",
3984
4977
  {
3985
4978
  ref: inputRef,
@@ -3990,7 +4983,7 @@ function LinkEditPopover({ editor, initialUrl = "", onClose }) {
3990
4983
  className: "min-w-0 flex-1 bg-transparent px-1 py-1 text-sm outline-none placeholder:text-muted-foreground"
3991
4984
  }
3992
4985
  ),
3993
- /* @__PURE__ */ jsx80(
4986
+ /* @__PURE__ */ jsx86(
3994
4987
  "button",
3995
4988
  {
3996
4989
  type: "button",
@@ -3998,10 +4991,10 @@ function LinkEditPopover({ editor, initialUrl = "", onClose }) {
3998
4991
  className: "rounded p-1 text-muted-foreground hover:bg-accent hover:text-accent-foreground",
3999
4992
  "aria-label": "Remove link",
4000
4993
  title: "Remove link",
4001
- children: /* @__PURE__ */ jsx80(Trash2, { className: "size-4" })
4994
+ children: /* @__PURE__ */ jsx86(Trash2, { className: "size-4" })
4002
4995
  }
4003
4996
  ),
4004
- externalUrl ? /* @__PURE__ */ jsx80(
4997
+ externalUrl ? /* @__PURE__ */ jsx86(
4005
4998
  "a",
4006
4999
  {
4007
5000
  href: externalUrl,
@@ -4010,7 +5003,7 @@ function LinkEditPopover({ editor, initialUrl = "", onClose }) {
4010
5003
  className: "rounded p-1 text-muted-foreground hover:bg-accent hover:text-accent-foreground",
4011
5004
  "aria-label": "Open link in new tab",
4012
5005
  title: "Open link in new tab",
4013
- children: /* @__PURE__ */ jsx80(ExternalLink, { className: "size-4" })
5006
+ children: /* @__PURE__ */ jsx86(ExternalLink, { className: "size-4" })
4014
5007
  }
4015
5008
  ) : null
4016
5009
  ]
@@ -4020,13 +5013,13 @@ function LinkEditPopover({ editor, initialUrl = "", onClose }) {
4020
5013
 
4021
5014
  // src/editor/BubbleMenu.tsx
4022
5015
  import { findEditorScrollContainer } from "@cloudvoyant/helical-ui";
4023
- import { jsx as jsx81, jsxs as jsxs35 } from "react/jsx-runtime";
5016
+ import { jsx as jsx87, jsxs as jsxs37 } from "react/jsx-runtime";
4024
5017
  function BubbleMenu({ editor }) {
4025
- const [isEditingLink, setIsEditingLink] = useState11(false);
4026
- const [linkUrl, setLinkUrl] = useState11("");
4027
- const [dismissedSelection, setDismissedSelection] = useState11(null);
5018
+ const [isEditingLink, setIsEditingLink] = useState12(false);
5019
+ const [linkUrl, setLinkUrl] = useState12("");
5020
+ const [dismissedSelection, setDismissedSelection] = useState12(null);
4028
5021
  const currentAlign = ["left", "center", "right", "justify"].find((a) => editor.isActive({ textAlign: a }));
4029
- useEffect10(() => {
5022
+ useEffect13(() => {
4030
5023
  if (!isEditingLink) return;
4031
5024
  const container = findEditorScrollContainer(editor.view.dom);
4032
5025
  if (!container) return;
@@ -4034,7 +5027,7 @@ function BubbleMenu({ editor }) {
4034
5027
  container.addEventListener("wheel", preventWheel, { passive: false });
4035
5028
  return () => container.removeEventListener("wheel", preventWheel);
4036
5029
  }, [editor, isEditingLink]);
4037
- useEffect10(() => {
5030
+ useEffect13(() => {
4038
5031
  const selectionKey = () => `${editor.state.selection.from}:${editor.state.selection.to}`;
4039
5032
  const handleEscape = (event) => {
4040
5033
  if (event.key === "Escape" && !editor.state.selection.empty) setDismissedSelection(selectionKey());
@@ -4050,7 +5043,7 @@ function BubbleMenu({ editor }) {
4050
5043
  editor.off("selectionUpdate", handleSelectionUpdate);
4051
5044
  };
4052
5045
  }, [editor]);
4053
- return /* @__PURE__ */ jsxs35(
5046
+ return /* @__PURE__ */ jsxs37(
4054
5047
  TiptapBubbleMenu,
4055
5048
  {
4056
5049
  editor,
@@ -4061,8 +5054,8 @@ function BubbleMenu({ editor }) {
4061
5054
  tabIndex: -1,
4062
5055
  className: "flex items-center gap-1 rounded-md border border-border bg-popover p-1 shadow-md",
4063
5056
  children: [
4064
- /* @__PURE__ */ jsxs35(ToggleGroup, { multiple: true, defaultValue: [], children: [
4065
- /* @__PURE__ */ jsx81(
5057
+ /* @__PURE__ */ jsxs37(ToggleGroup, { multiple: true, defaultValue: [], children: [
5058
+ /* @__PURE__ */ jsx87(
4066
5059
  ToggleGroupItem,
4067
5060
  {
4068
5061
  value: "bold",
@@ -4070,10 +5063,10 @@ function BubbleMenu({ editor }) {
4070
5063
  "aria-label": "Bold",
4071
5064
  "data-state": editor.isActive("bold") ? "on" : "off",
4072
5065
  onClick: () => editor.chain().focus().toggleBold().run(),
4073
- children: /* @__PURE__ */ jsx81(Bold, {})
5066
+ children: /* @__PURE__ */ jsx87(Bold, {})
4074
5067
  }
4075
5068
  ),
4076
- /* @__PURE__ */ jsx81(
5069
+ /* @__PURE__ */ jsx87(
4077
5070
  ToggleGroupItem,
4078
5071
  {
4079
5072
  value: "italic",
@@ -4081,10 +5074,10 @@ function BubbleMenu({ editor }) {
4081
5074
  "aria-label": "Italic",
4082
5075
  "data-state": editor.isActive("italic") ? "on" : "off",
4083
5076
  onClick: () => editor.chain().focus().toggleItalic().run(),
4084
- children: /* @__PURE__ */ jsx81(Italic, {})
5077
+ children: /* @__PURE__ */ jsx87(Italic, {})
4085
5078
  }
4086
5079
  ),
4087
- /* @__PURE__ */ jsx81(
5080
+ /* @__PURE__ */ jsx87(
4088
5081
  ToggleGroupItem,
4089
5082
  {
4090
5083
  value: "underline",
@@ -4092,10 +5085,10 @@ function BubbleMenu({ editor }) {
4092
5085
  "aria-label": "Underline",
4093
5086
  "data-state": editor.isActive("underline") ? "on" : "off",
4094
5087
  onClick: () => editor.chain().focus().toggleUnderline().run(),
4095
- children: /* @__PURE__ */ jsx81(UnderlineIcon, {})
5088
+ children: /* @__PURE__ */ jsx87(UnderlineIcon, {})
4096
5089
  }
4097
5090
  ),
4098
- /* @__PURE__ */ jsx81(
5091
+ /* @__PURE__ */ jsx87(
4099
5092
  ToggleGroupItem,
4100
5093
  {
4101
5094
  value: "strike",
@@ -4103,30 +5096,30 @@ function BubbleMenu({ editor }) {
4103
5096
  "aria-label": "Strikethrough",
4104
5097
  "data-state": editor.isActive("strike") ? "on" : "off",
4105
5098
  onClick: () => editor.chain().focus().toggleStrike().run(),
4106
- children: /* @__PURE__ */ jsx81(Strikethrough, {})
5099
+ children: /* @__PURE__ */ jsx87(Strikethrough, {})
4107
5100
  }
4108
5101
  )
4109
5102
  ] }),
4110
- /* @__PURE__ */ jsx81(FontColorPicker, { editor, mode: "text" }),
4111
- /* @__PURE__ */ jsx81(FontColorPicker, { editor, mode: "highlight" }),
4112
- /* @__PURE__ */ jsx81(ToggleGroup, { defaultValue: currentAlign ? [currentAlign] : [], children: [
5103
+ /* @__PURE__ */ jsx87(FontColorPicker, { editor, mode: "text" }),
5104
+ /* @__PURE__ */ jsx87(FontColorPicker, { editor, mode: "highlight" }),
5105
+ /* @__PURE__ */ jsx87(ToggleGroup, { defaultValue: currentAlign ? [currentAlign] : [], children: [
4113
5106
  ["left", AlignLeft],
4114
5107
  ["center", AlignCenter],
4115
5108
  ["right", AlignRight],
4116
5109
  ["justify", AlignJustify]
4117
- ].map(([align, Icon]) => /* @__PURE__ */ jsx81(
5110
+ ].map(([align, Icon]) => /* @__PURE__ */ jsx87(
4118
5111
  ToggleGroupItem,
4119
5112
  {
4120
5113
  value: align,
4121
5114
  size: "sm",
4122
5115
  "aria-label": `Align ${align}`,
4123
5116
  onClick: () => editor.chain().focus().setTextAlign(align).run(),
4124
- children: /* @__PURE__ */ jsx81(Icon, {})
5117
+ children: /* @__PURE__ */ jsx87(Icon, {})
4125
5118
  },
4126
5119
  align
4127
5120
  )) }),
4128
- /* @__PURE__ */ jsxs35("div", { className: "relative", children: [
4129
- /* @__PURE__ */ jsx81(ToggleGroup, { defaultValue: [], children: /* @__PURE__ */ jsx81(
5121
+ /* @__PURE__ */ jsxs37("div", { className: "relative", children: [
5122
+ /* @__PURE__ */ jsx87(ToggleGroup, { defaultValue: [], children: /* @__PURE__ */ jsx87(
4130
5123
  ToggleGroupItem,
4131
5124
  {
4132
5125
  value: "link",
@@ -4136,10 +5129,10 @@ function BubbleMenu({ editor }) {
4136
5129
  setLinkUrl(editor.getAttributes("link").href ?? "");
4137
5130
  setIsEditingLink(true);
4138
5131
  },
4139
- children: /* @__PURE__ */ jsx81(Link2, {})
5132
+ children: /* @__PURE__ */ jsx87(Link2, {})
4140
5133
  }
4141
5134
  ) }),
4142
- isEditingLink ? /* @__PURE__ */ jsx81(LinkEditPopover, { editor, initialUrl: linkUrl, onClose: () => setIsEditingLink(false) }) : null
5135
+ isEditingLink ? /* @__PURE__ */ jsx87(LinkEditPopover, { editor, initialUrl: linkUrl, onClose: () => setIsEditingLink(false) }) : null
4143
5136
  ] })
4144
5137
  ]
4145
5138
  }
@@ -4147,7 +5140,7 @@ function BubbleMenu({ editor }) {
4147
5140
  }
4148
5141
 
4149
5142
  // src/editor/SlashMenu.tsx
4150
- import { forwardRef, useEffect as useEffect11, useImperativeHandle, useRef as useRef4, useState as useState12 } from "react";
5143
+ import { forwardRef as forwardRef2, useEffect as useEffect14, useImperativeHandle, useRef as useRef6, useState as useState13 } from "react";
4151
5144
  import {
4152
5145
  Bookmark,
4153
5146
  Code,
@@ -4163,7 +5156,7 @@ import {
4163
5156
  Minus,
4164
5157
  Quote
4165
5158
  } from "lucide-react";
4166
- import { jsx as jsx82, jsxs as jsxs36 } from "react/jsx-runtime";
5159
+ import { jsx as jsx88, jsxs as jsxs38 } from "react/jsx-runtime";
4167
5160
  var SLASH_MENU_ICONS = {
4168
5161
  Heading1,
4169
5162
  Heading2,
@@ -4179,12 +5172,12 @@ var SLASH_MENU_ICONS = {
4179
5172
  Image,
4180
5173
  Bookmark
4181
5174
  };
4182
- var SlashMenu = forwardRef(function SlashMenu2({ items, command }, ref) {
4183
- const [index, setIndex] = useState12(0);
4184
- const itemRefs = useRef4([]);
5175
+ var SlashMenu = forwardRef2(function SlashMenu2({ items, command }, ref) {
5176
+ const [index, setIndex] = useState13(0);
5177
+ const itemRefs = useRef6([]);
4185
5178
  const itemsKey = items.map((item) => item.title).join("\0");
4186
- useEffect11(() => setIndex(0), [itemsKey]);
4187
- useEffect11(() => {
5179
+ useEffect14(() => setIndex(0), [itemsKey]);
5180
+ useEffect14(() => {
4188
5181
  const item = itemRefs.current[index]?.closest('[data-part="item"]');
4189
5182
  const viewport = item?.closest("[data-slash-menu-scroll]");
4190
5183
  if (!(viewport instanceof HTMLElement) || !(item instanceof HTMLElement)) return;
@@ -4213,7 +5206,7 @@ var SlashMenu = forwardRef(function SlashMenu2({ items, command }, ref) {
4213
5206
  }
4214
5207
  }));
4215
5208
  const listItems = items.map((item) => ({ value: item.title, label: item.title }));
4216
- return /* @__PURE__ */ jsx82(
5209
+ return /* @__PURE__ */ jsx88(
4217
5210
  Listbox,
4218
5211
  {
4219
5212
  items: listItems,
@@ -4222,17 +5215,17 @@ var SlashMenu = forwardRef(function SlashMenu2({ items, command }, ref) {
4222
5215
  if (details.highlightedIndex >= 0) setIndex(details.highlightedIndex);
4223
5216
  },
4224
5217
  loopFocus: false,
4225
- children: /* @__PURE__ */ jsx82(ListboxContent, { "data-slash-menu-scroll": true, children: items.map((item, i) => {
5218
+ children: /* @__PURE__ */ jsx88(ListboxContent, { "data-slash-menu-scroll": true, children: items.map((item, i) => {
4226
5219
  const Icon = SLASH_MENU_ICONS[item.icon];
4227
- return /* @__PURE__ */ jsx82(
5220
+ return /* @__PURE__ */ jsx88(
4228
5221
  ListboxItem,
4229
5222
  {
4230
5223
  item: { value: item.title, label: item.title },
4231
5224
  className: i === index ? "bg-accent text-accent-foreground" : void 0,
4232
5225
  "data-slash-selected": i === index ? "" : void 0,
4233
5226
  onClick: () => command(item),
4234
- children: /* @__PURE__ */ jsxs36(ListboxItemText, { children: [
4235
- /* @__PURE__ */ jsx82(
5227
+ children: /* @__PURE__ */ jsxs38(ListboxItemText, { children: [
5228
+ /* @__PURE__ */ jsx88(
4236
5229
  "span",
4237
5230
  {
4238
5231
  ref: (node) => {
@@ -4241,10 +5234,10 @@ var SlashMenu = forwardRef(function SlashMenu2({ items, command }, ref) {
4241
5234
  className: "inline-flex w-5 justify-center opacity-70",
4242
5235
  "data-slash-icon": item.icon,
4243
5236
  "aria-hidden": "true",
4244
- children: item.icon === "YouTube" ? /* @__PURE__ */ jsx82("svg", { viewBox: "0 0 24 24", className: "size-4", fill: "currentColor", children: /* @__PURE__ */ jsx82("path", { d: "M23.5 6.2a3 3 0 0 0-2.1-2.1C19.5 3.6 12 3.6 12 3.6s-7.5 0-9.4.5A3 3 0 0 0 .5 6.2 31 31 0 0 0 0 12a31 31 0 0 0 .5 5.8 3 3 0 0 0 2.1 2.1c1.9.5 9.4.5 9.4.5s7.5 0 9.4-.5a3 3 0 0 0 2.1-2.1A31 31 0 0 0 24 12a31 31 0 0 0-.5-5.8ZM9.6 15.6V8.4L15.8 12l-6.2 3.6Z" }) }) : Icon ? /* @__PURE__ */ jsx82(Icon, { className: "size-4" }) : null
5237
+ children: item.icon === "YouTube" ? /* @__PURE__ */ jsx88("svg", { viewBox: "0 0 24 24", className: "size-4", fill: "currentColor", children: /* @__PURE__ */ jsx88("path", { d: "M23.5 6.2a3 3 0 0 0-2.1-2.1C19.5 3.6 12 3.6 12 3.6s-7.5 0-9.4.5A3 3 0 0 0 .5 6.2 31 31 0 0 0 0 12a31 31 0 0 0 .5 5.8 3 3 0 0 0 2.1 2.1c1.9.5 9.4.5 9.4.5s7.5 0 9.4-.5a3 3 0 0 0 2.1-2.1A31 31 0 0 0 24 12a31 31 0 0 0-.5-5.8ZM9.6 15.6V8.4L15.8 12l-6.2 3.6Z" }) }) : Icon ? /* @__PURE__ */ jsx88(Icon, { className: "size-4" }) : null
4245
5238
  }
4246
5239
  ),
4247
- /* @__PURE__ */ jsx82("span", { children: item.title })
5240
+ /* @__PURE__ */ jsx88("span", { children: item.title })
4248
5241
  ] })
4249
5242
  },
4250
5243
  item.title
@@ -4255,10 +5248,10 @@ var SlashMenu = forwardRef(function SlashMenu2({ items, command }, ref) {
4255
5248
  });
4256
5249
 
4257
5250
  // src/editor/MentionList.tsx
4258
- import { forwardRef as forwardRef2, useImperativeHandle as useImperativeHandle2, useState as useState13 } from "react";
4259
- import { jsx as jsx83 } from "react/jsx-runtime";
4260
- var MentionList = forwardRef2(function MentionList2({ items, command }, ref) {
4261
- const [index, setIndex] = useState13(0);
5251
+ import { forwardRef as forwardRef3, useImperativeHandle as useImperativeHandle2, useState as useState14 } from "react";
5252
+ import { jsx as jsx89 } from "react/jsx-runtime";
5253
+ var MentionList = forwardRef3(function MentionList2({ items, command }, ref) {
5254
+ const [index, setIndex] = useState14(0);
4262
5255
  useImperativeHandle2(ref, () => ({
4263
5256
  onKeyDown: ({ event }) => {
4264
5257
  if (event.key === "ArrowUp") {
@@ -4279,21 +5272,21 @@ var MentionList = forwardRef2(function MentionList2({ items, command }, ref) {
4279
5272
  }));
4280
5273
  if (items.length === 0) return null;
4281
5274
  const listItems = items.map((item) => ({ value: item.id, label: item.label }));
4282
- return /* @__PURE__ */ jsx83(Listbox, { items: listItems, className: "mention-list", children: /* @__PURE__ */ jsx83(ListboxContent, { children: items.map((item, i) => /* @__PURE__ */ jsx83(
5275
+ return /* @__PURE__ */ jsx89(Listbox, { items: listItems, className: "mention-list", children: /* @__PURE__ */ jsx89(ListboxContent, { children: items.map((item, i) => /* @__PURE__ */ jsx89(
4283
5276
  ListboxItem,
4284
5277
  {
4285
5278
  item: { value: item.id, label: item.label },
4286
5279
  className: i === index ? "bg-accent text-accent-foreground" : void 0,
4287
5280
  onMouseEnter: () => setIndex(i),
4288
5281
  onClick: () => command(item),
4289
- children: /* @__PURE__ */ jsx83(ListboxItemText, { children: item.label })
5282
+ children: /* @__PURE__ */ jsx89(ListboxItemText, { children: item.label })
4290
5283
  },
4291
5284
  item.id
4292
5285
  )) }) });
4293
5286
  });
4294
5287
 
4295
5288
  // src/editor/ImageInput.tsx
4296
- import { useEffect as useEffect12, useRef as useRef5, useState as useState14 } from "react";
5289
+ import { useEffect as useEffect15, useRef as useRef7, useState as useState15 } from "react";
4297
5290
  import { X } from "lucide-react";
4298
5291
 
4299
5292
  // src/editor/ImageFileUpload.tsx
@@ -4311,9 +5304,9 @@ import {
4311
5304
  FileUploadItemDeleteTrigger
4312
5305
  } from "@ark-ui/react/file-upload";
4313
5306
  import { ImagePlus, Trash2 as Trash22, Upload } from "lucide-react";
4314
- import { jsx as jsx84, jsxs as jsxs37 } from "react/jsx-runtime";
5307
+ import { jsx as jsx90, jsxs as jsxs39 } from "react/jsx-runtime";
4315
5308
  function ImageFileUpload({ file, onFileChange, disabled = false }) {
4316
- return /* @__PURE__ */ jsxs37(
5309
+ return /* @__PURE__ */ jsxs39(
4317
5310
  FileUploadRoot,
4318
5311
  {
4319
5312
  accept: "image/*",
@@ -4322,45 +5315,45 @@ function ImageFileUpload({ file, onFileChange, disabled = false }) {
4322
5315
  disabled,
4323
5316
  onFileChange: (details) => onFileChange(details.acceptedFiles[0] ?? null),
4324
5317
  children: [
4325
- /* @__PURE__ */ jsxs37(FileUploadDropzone, { className: "flex min-h-32 cursor-pointer flex-col items-center justify-center gap-2 rounded-md border border-dashed border-border bg-muted/30 px-4 py-5 text-center transition-colors data-[dragging]:border-primary data-[dragging]:bg-primary/5", children: [
4326
- /* @__PURE__ */ jsx84(ImagePlus, { className: "size-6 text-muted-foreground", "aria-hidden": "true" }),
4327
- /* @__PURE__ */ jsx84("div", { className: "text-sm font-medium", children: "Drop an image here" }),
4328
- /* @__PURE__ */ jsx84("div", { className: "text-xs text-muted-foreground", children: "or" }),
4329
- /* @__PURE__ */ jsxs37(FileUploadTrigger, { className: "inline-flex items-center gap-2 rounded-md border border-input bg-background px-3 py-1.5 text-sm hover:bg-accent", children: [
4330
- /* @__PURE__ */ jsx84(Upload, { className: "size-4", "aria-hidden": "true" }),
5318
+ /* @__PURE__ */ jsxs39(FileUploadDropzone, { className: "flex min-h-32 cursor-pointer flex-col items-center justify-center gap-2 rounded-md border border-dashed border-border bg-muted/30 px-4 py-5 text-center transition-colors data-[dragging]:border-primary data-[dragging]:bg-primary/5", children: [
5319
+ /* @__PURE__ */ jsx90(ImagePlus, { className: "size-6 text-muted-foreground", "aria-hidden": "true" }),
5320
+ /* @__PURE__ */ jsx90("div", { className: "text-sm font-medium", children: "Drop an image here" }),
5321
+ /* @__PURE__ */ jsx90("div", { className: "text-xs text-muted-foreground", children: "or" }),
5322
+ /* @__PURE__ */ jsxs39(FileUploadTrigger, { className: "inline-flex items-center gap-2 rounded-md border border-input bg-background px-3 py-1.5 text-sm hover:bg-accent", children: [
5323
+ /* @__PURE__ */ jsx90(Upload, { className: "size-4", "aria-hidden": "true" }),
4331
5324
  "Choose image"
4332
5325
  ] })
4333
5326
  ] }),
4334
- /* @__PURE__ */ jsx84(FileUploadItemGroup, { className: "mt-2", children: file ? /* @__PURE__ */ jsxs37(
5327
+ /* @__PURE__ */ jsx90(FileUploadItemGroup, { className: "mt-2", children: file ? /* @__PURE__ */ jsxs39(
4335
5328
  FileUploadItem,
4336
5329
  {
4337
5330
  file,
4338
5331
  className: "flex items-center gap-3 rounded-md border border-border bg-background p-2",
4339
5332
  children: [
4340
- /* @__PURE__ */ jsx84(FileUploadItemPreview, { type: "image/*", className: "size-12 shrink-0 overflow-hidden rounded", children: /* @__PURE__ */ jsx84(FileUploadItemPreviewImage, { className: "size-full object-cover" }) }),
4341
- /* @__PURE__ */ jsxs37("div", { className: "min-w-0 flex-1", children: [
4342
- /* @__PURE__ */ jsx84(FileUploadItemName, { className: "truncate text-sm font-medium" }),
4343
- /* @__PURE__ */ jsx84(FileUploadItemSizeText, { className: "text-xs text-muted-foreground" })
5333
+ /* @__PURE__ */ jsx90(FileUploadItemPreview, { type: "image/*", className: "size-12 shrink-0 overflow-hidden rounded", children: /* @__PURE__ */ jsx90(FileUploadItemPreviewImage, { className: "size-full object-cover" }) }),
5334
+ /* @__PURE__ */ jsxs39("div", { className: "min-w-0 flex-1", children: [
5335
+ /* @__PURE__ */ jsx90(FileUploadItemName, { className: "truncate text-sm font-medium" }),
5336
+ /* @__PURE__ */ jsx90(FileUploadItemSizeText, { className: "text-xs text-muted-foreground" })
4344
5337
  ] }),
4345
- /* @__PURE__ */ jsx84(
5338
+ /* @__PURE__ */ jsx90(
4346
5339
  FileUploadItemDeleteTrigger,
4347
5340
  {
4348
5341
  className: "rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
4349
5342
  "aria-label": "Remove image",
4350
- children: /* @__PURE__ */ jsx84(Trash22, { className: "size-4" })
5343
+ children: /* @__PURE__ */ jsx90(Trash22, { className: "size-4" })
4351
5344
  }
4352
5345
  )
4353
5346
  ]
4354
5347
  }
4355
5348
  ) : null }),
4356
- /* @__PURE__ */ jsx84(FileUploadHiddenInput, {})
5349
+ /* @__PURE__ */ jsx90(FileUploadHiddenInput, {})
4357
5350
  ]
4358
5351
  }
4359
5352
  );
4360
5353
  }
4361
5354
 
4362
5355
  // src/editor/ImageInput.tsx
4363
- import { jsx as jsx85, jsxs as jsxs38 } from "react/jsx-runtime";
5356
+ import { jsx as jsx91, jsxs as jsxs40 } from "react/jsx-runtime";
4364
5357
  function fileToDataUrl(file) {
4365
5358
  return new Promise((resolve, reject) => {
4366
5359
  const reader = new FileReader();
@@ -4370,14 +5363,14 @@ function fileToDataUrl(file) {
4370
5363
  });
4371
5364
  }
4372
5365
  function ImageInput({ editor, position, onClose, onUpload }) {
4373
- const [tab, setTab] = useState14("upload");
4374
- const [urlValue, setUrlValue] = useState14("");
4375
- const [urlError, setUrlError] = useState14("");
4376
- const [selectedFile, setSelectedFile] = useState14(null);
4377
- const [uploading, setUploading] = useState14(false);
4378
- const [uploadError, setUploadError] = useState14("");
4379
- const urlInputRef = useRef5(null);
4380
- useEffect12(() => {
5366
+ const [tab, setTab] = useState15("upload");
5367
+ const [urlValue, setUrlValue] = useState15("");
5368
+ const [urlError, setUrlError] = useState15("");
5369
+ const [selectedFile, setSelectedFile] = useState15(null);
5370
+ const [uploading, setUploading] = useState15(false);
5371
+ const [uploadError, setUploadError] = useState15("");
5372
+ const urlInputRef = useRef7(null);
5373
+ useEffect15(() => {
4381
5374
  if (tab === "url") urlInputRef.current?.focus();
4382
5375
  }, [tab]);
4383
5376
  function insertImage(src, srcset) {
@@ -4407,7 +5400,7 @@ function ImageInput({ editor, position, onClose, onUpload }) {
4407
5400
  }
4408
5401
  insertImage(trimmed);
4409
5402
  }
4410
- return /* @__PURE__ */ jsx85(
5403
+ return /* @__PURE__ */ jsx91(
4411
5404
  "div",
4412
5405
  {
4413
5406
  role: "dialog",
@@ -4417,21 +5410,21 @@ function ImageInput({ editor, position, onClose, onUpload }) {
4417
5410
  if (event.key === "Escape") onClose();
4418
5411
  },
4419
5412
  className: "max-h-[calc(100vh-2rem)] w-80 overflow-y-auto rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-xl",
4420
- children: /* @__PURE__ */ jsxs38("div", { className: "space-y-3", children: [
4421
- /* @__PURE__ */ jsxs38("div", { className: "flex items-center justify-between", children: [
4422
- /* @__PURE__ */ jsx85("p", { className: "text-sm font-semibold", children: "Insert Image" }),
4423
- /* @__PURE__ */ jsx85(
5413
+ children: /* @__PURE__ */ jsxs40("div", { className: "space-y-3", children: [
5414
+ /* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between", children: [
5415
+ /* @__PURE__ */ jsx91("p", { className: "text-sm font-semibold", children: "Insert Image" }),
5416
+ /* @__PURE__ */ jsx91(
4424
5417
  "button",
4425
5418
  {
4426
5419
  type: "button",
4427
5420
  onClick: onClose,
4428
5421
  className: "rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
4429
5422
  "aria-label": "Close image dialog",
4430
- children: /* @__PURE__ */ jsx85(X, { className: "size-4" })
5423
+ children: /* @__PURE__ */ jsx91(X, { className: "size-4" })
4431
5424
  }
4432
5425
  )
4433
5426
  ] }),
4434
- /* @__PURE__ */ jsx85("div", { className: "flex gap-1 rounded-md bg-muted p-1", children: ["upload", "url"].map((value) => /* @__PURE__ */ jsx85(
5427
+ /* @__PURE__ */ jsx91("div", { className: "flex gap-1 rounded-md bg-muted p-1", children: ["upload", "url"].map((value) => /* @__PURE__ */ jsx91(
4435
5428
  "button",
4436
5429
  {
4437
5430
  type: "button",
@@ -4444,8 +5437,8 @@ function ImageInput({ editor, position, onClose, onUpload }) {
4444
5437
  },
4445
5438
  value
4446
5439
  )) }),
4447
- tab === "upload" ? /* @__PURE__ */ jsxs38("div", { className: "space-y-1", children: [
4448
- /* @__PURE__ */ jsx85(
5440
+ tab === "upload" ? /* @__PURE__ */ jsxs40("div", { className: "space-y-1", children: [
5441
+ /* @__PURE__ */ jsx91(
4449
5442
  ImageFileUpload,
4450
5443
  {
4451
5444
  file: selectedFile,
@@ -4456,10 +5449,10 @@ function ImageInput({ editor, position, onClose, onUpload }) {
4456
5449
  }
4457
5450
  }
4458
5451
  ),
4459
- uploading ? /* @__PURE__ */ jsx85("p", { className: "text-xs text-muted-foreground", children: "Uploading\u2026" }) : null,
4460
- uploadError ? /* @__PURE__ */ jsx85("div", { role: "alert", className: "text-xs leading-tight text-destructive", children: uploadError }) : null
4461
- ] }) : /* @__PURE__ */ jsxs38("div", { className: "space-y-1", children: [
4462
- /* @__PURE__ */ jsx85(
5452
+ uploading ? /* @__PURE__ */ jsx91("p", { className: "text-xs text-muted-foreground", children: "Uploading\u2026" }) : null,
5453
+ uploadError ? /* @__PURE__ */ jsx91("div", { role: "alert", className: "text-xs leading-tight text-destructive", children: uploadError }) : null
5454
+ ] }) : /* @__PURE__ */ jsxs40("div", { className: "space-y-1", children: [
5455
+ /* @__PURE__ */ jsx91(
4463
5456
  "input",
4464
5457
  {
4465
5458
  ref: urlInputRef,
@@ -4477,11 +5470,11 @@ function ImageInput({ editor, position, onClose, onUpload }) {
4477
5470
  className: "w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"
4478
5471
  }
4479
5472
  ),
4480
- urlError ? /* @__PURE__ */ jsx85("div", { role: "alert", className: "text-xs leading-tight text-destructive", children: urlError }) : null
5473
+ urlError ? /* @__PURE__ */ jsx91("div", { role: "alert", className: "text-xs leading-tight text-destructive", children: urlError }) : null
4481
5474
  ] }),
4482
- /* @__PURE__ */ jsxs38("div", { className: "flex justify-end gap-2", children: [
4483
- /* @__PURE__ */ jsx85("button", { type: "button", onClick: onClose, className: "rounded-md px-3 py-1.5 text-sm hover:bg-muted", children: "Cancel" }),
4484
- /* @__PURE__ */ jsx85(
5475
+ /* @__PURE__ */ jsxs40("div", { className: "flex justify-end gap-2", children: [
5476
+ /* @__PURE__ */ jsx91("button", { type: "button", onClick: onClose, className: "rounded-md px-3 py-1.5 text-sm hover:bg-muted", children: "Cancel" }),
5477
+ /* @__PURE__ */ jsx91(
4485
5478
  "button",
4486
5479
  {
4487
5480
  type: "button",
@@ -4498,14 +5491,14 @@ function ImageInput({ editor, position, onClose, onUpload }) {
4498
5491
  }
4499
5492
 
4500
5493
  // src/editor/BookmarkInput.tsx
4501
- import { useEffect as useEffect13, useRef as useRef6, useState as useState15 } from "react";
4502
- import { jsx as jsx86, jsxs as jsxs39 } from "react/jsx-runtime";
5494
+ import { useEffect as useEffect16, useRef as useRef8, useState as useState16 } from "react";
5495
+ import { jsx as jsx92, jsxs as jsxs41 } from "react/jsx-runtime";
4503
5496
  function BookmarkInput({ editor, position, onClose, fetchLinkPreview }) {
4504
- const [url, setUrl] = useState15("");
4505
- const [error, setError] = useState15("");
4506
- const [loading, setLoading] = useState15(false);
4507
- const inputRef = useRef6(null);
4508
- useEffect13(() => {
5497
+ const [url, setUrl] = useState16("");
5498
+ const [error, setError] = useState16("");
5499
+ const [loading, setLoading] = useState16(false);
5500
+ const inputRef = useRef8(null);
5501
+ useEffect16(() => {
4509
5502
  inputRef.current?.focus();
4510
5503
  }, []);
4511
5504
  async function submit() {
@@ -4535,7 +5528,7 @@ function BookmarkInput({ editor, position, onClose, fetchLinkPreview }) {
4535
5528
  setLoading(false);
4536
5529
  }
4537
5530
  }
4538
- return /* @__PURE__ */ jsxs39(
5531
+ return /* @__PURE__ */ jsxs41(
4539
5532
  "div",
4540
5533
  {
4541
5534
  role: "dialog",
@@ -4546,9 +5539,9 @@ function BookmarkInput({ editor, position, onClose, fetchLinkPreview }) {
4546
5539
  },
4547
5540
  className: "w-80 space-y-2 rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-xl",
4548
5541
  children: [
4549
- /* @__PURE__ */ jsx86("p", { className: "text-sm font-semibold", children: "Insert Bookmark" }),
4550
- /* @__PURE__ */ jsxs39("div", { className: "space-y-1", children: [
4551
- /* @__PURE__ */ jsx86(
5542
+ /* @__PURE__ */ jsx92("p", { className: "text-sm font-semibold", children: "Insert Bookmark" }),
5543
+ /* @__PURE__ */ jsxs41("div", { className: "space-y-1", children: [
5544
+ /* @__PURE__ */ jsx92(
4552
5545
  "input",
4553
5546
  {
4554
5547
  ref: inputRef,
@@ -4566,11 +5559,11 @@ function BookmarkInput({ editor, position, onClose, fetchLinkPreview }) {
4566
5559
  className: "w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"
4567
5560
  }
4568
5561
  ),
4569
- error ? /* @__PURE__ */ jsx86("div", { role: "alert", className: "text-xs leading-tight text-destructive", children: error }) : null
5562
+ error ? /* @__PURE__ */ jsx92("div", { role: "alert", className: "text-xs leading-tight text-destructive", children: error }) : null
4570
5563
  ] }),
4571
- /* @__PURE__ */ jsxs39("div", { className: "flex justify-end gap-2", children: [
4572
- /* @__PURE__ */ jsx86("button", { type: "button", onClick: onClose, className: "rounded-md px-3 py-1.5 text-sm hover:bg-muted", children: "Cancel" }),
4573
- /* @__PURE__ */ jsx86(
5564
+ /* @__PURE__ */ jsxs41("div", { className: "flex justify-end gap-2", children: [
5565
+ /* @__PURE__ */ jsx92("button", { type: "button", onClick: onClose, className: "rounded-md px-3 py-1.5 text-sm hover:bg-muted", children: "Cancel" }),
5566
+ /* @__PURE__ */ jsx92(
4574
5567
  "button",
4575
5568
  {
4576
5569
  type: "button",
@@ -4587,9 +5580,9 @@ function BookmarkInput({ editor, position, onClose, fetchLinkPreview }) {
4587
5580
  }
4588
5581
 
4589
5582
  // src/editor/YouTubeInput.tsx
4590
- import { useEffect as useEffect14, useRef as useRef7, useState as useState16 } from "react";
5583
+ import { useEffect as useEffect17, useRef as useRef9, useState as useState17 } from "react";
4591
5584
  import { Play as Play2, X as X2 } from "lucide-react";
4592
- import { jsx as jsx87, jsxs as jsxs40 } from "react/jsx-runtime";
5585
+ import { jsx as jsx93, jsxs as jsxs42 } from "react/jsx-runtime";
4593
5586
  function isYouTubeUrl(value) {
4594
5587
  try {
4595
5588
  const host = new URL(value).hostname.replace(/^www\./, "");
@@ -4599,10 +5592,10 @@ function isYouTubeUrl(value) {
4599
5592
  }
4600
5593
  }
4601
5594
  function YouTubeInput({ editor, position, onClose }) {
4602
- const [url, setUrl] = useState16("");
4603
- const [error, setError] = useState16("");
4604
- const inputRef = useRef7(null);
4605
- useEffect14(() => inputRef.current?.focus(), []);
5595
+ const [url, setUrl] = useState17("");
5596
+ const [error, setError] = useState17("");
5597
+ const inputRef = useRef9(null);
5598
+ useEffect17(() => inputRef.current?.focus(), []);
4606
5599
  const insert = () => {
4607
5600
  const value = url.trim();
4608
5601
  if (!isYouTubeUrl(value)) {
@@ -4615,30 +5608,30 @@ function YouTubeInput({ editor, position, onClose }) {
4615
5608
  }).run();
4616
5609
  onClose();
4617
5610
  };
4618
- return /* @__PURE__ */ jsxs40(
5611
+ return /* @__PURE__ */ jsxs42(
4619
5612
  "div",
4620
5613
  {
4621
5614
  role: "dialog",
4622
5615
  "aria-label": "Embed YouTube video",
4623
5616
  className: "w-80 rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-lg",
4624
5617
  children: [
4625
- /* @__PURE__ */ jsxs40("div", { className: "mb-2 flex items-center justify-between", children: [
4626
- /* @__PURE__ */ jsxs40("span", { className: "flex items-center gap-2 text-sm font-medium", children: [
4627
- /* @__PURE__ */ jsx87(Play2, { className: "size-5 fill-current text-red-600", "aria-hidden": "true", "data-youtube-logo": true }),
5618
+ /* @__PURE__ */ jsxs42("div", { className: "mb-2 flex items-center justify-between", children: [
5619
+ /* @__PURE__ */ jsxs42("span", { className: "flex items-center gap-2 text-sm font-medium", children: [
5620
+ /* @__PURE__ */ jsx93(Play2, { className: "size-5 fill-current text-red-600", "aria-hidden": "true", "data-youtube-logo": true }),
4628
5621
  "Embed YouTube video"
4629
5622
  ] }),
4630
- /* @__PURE__ */ jsx87(
5623
+ /* @__PURE__ */ jsx93(
4631
5624
  "button",
4632
5625
  {
4633
5626
  type: "button",
4634
5627
  onClick: onClose,
4635
5628
  "aria-label": "Close YouTube input",
4636
5629
  className: "rounded p-1 hover:bg-accent",
4637
- children: /* @__PURE__ */ jsx87(X2, { className: "h-4 w-4" })
5630
+ children: /* @__PURE__ */ jsx93(X2, { className: "h-4 w-4" })
4638
5631
  }
4639
5632
  )
4640
5633
  ] }),
4641
- /* @__PURE__ */ jsx87(
5634
+ /* @__PURE__ */ jsx93(
4642
5635
  "input",
4643
5636
  {
4644
5637
  ref: inputRef,
@@ -4659,9 +5652,9 @@ function YouTubeInput({ editor, position, onClose }) {
4659
5652
  className: "w-full rounded-md border border-input bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-ring"
4660
5653
  }
4661
5654
  ),
4662
- error ? /* @__PURE__ */ jsx87("div", { role: "alert", className: "mt-1 text-xs leading-tight text-destructive", children: error }) : null,
4663
- /* @__PURE__ */ jsxs40("div", { className: "mt-3 flex justify-end gap-2", children: [
4664
- /* @__PURE__ */ jsx87(
5655
+ error ? /* @__PURE__ */ jsx93("div", { role: "alert", className: "mt-1 text-xs leading-tight text-destructive", children: error }) : null,
5656
+ /* @__PURE__ */ jsxs42("div", { className: "mt-3 flex justify-end gap-2", children: [
5657
+ /* @__PURE__ */ jsx93(
4665
5658
  "button",
4666
5659
  {
4667
5660
  type: "button",
@@ -4670,7 +5663,7 @@ function YouTubeInput({ editor, position, onClose }) {
4670
5663
  children: "Cancel"
4671
5664
  }
4672
5665
  ),
4673
- /* @__PURE__ */ jsx87(
5666
+ /* @__PURE__ */ jsx93(
4674
5667
  "button",
4675
5668
  {
4676
5669
  type: "button",
@@ -4686,12 +5679,12 @@ function YouTubeInput({ editor, position, onClose }) {
4686
5679
  }
4687
5680
 
4688
5681
  // src/editor/CursorOverlay.tsx
4689
- import { useEffect as useEffect15, useRef as useRef8, useState as useState17 } from "react";
5682
+ import { useEffect as useEffect18, useRef as useRef10, useState as useState18 } from "react";
4690
5683
  import {
4691
5684
  lockEditorOverlayScroll,
4692
5685
  placeEditorOverlayAt
4693
5686
  } from "@cloudvoyant/helical-ui";
4694
- import { jsx as jsx88 } from "react/jsx-runtime";
5687
+ import { jsx as jsx94 } from "react/jsx-runtime";
4695
5688
  function CursorOverlay({
4696
5689
  editor,
4697
5690
  position,
@@ -4702,11 +5695,11 @@ function CursorOverlay({
4702
5695
  lockScroll = true,
4703
5696
  children
4704
5697
  }) {
4705
- const surfaceRef = useRef8(null);
4706
- const [coords, setCoords] = useState17(
5698
+ const surfaceRef = useRef10(null);
5699
+ const [coords, setCoords] = useState18(
4707
5700
  () => placeEditorOverlayAt(editor, position, { width, height, gap, viewportGap })
4708
5701
  );
4709
- useEffect15(() => {
5702
+ useEffect18(() => {
4710
5703
  const updatePosition = () => setCoords(placeEditorOverlayAt(editor, position, { width, height, gap, viewportGap }));
4711
5704
  updatePosition();
4712
5705
  window.addEventListener("scroll", updatePosition, true);
@@ -4716,15 +5709,15 @@ function CursorOverlay({
4716
5709
  window.removeEventListener("resize", updatePosition);
4717
5710
  };
4718
5711
  }, [editor, position, width, height, gap, viewportGap]);
4719
- useEffect15(() => {
5712
+ useEffect18(() => {
4720
5713
  if (!lockScroll) return;
4721
5714
  return lockEditorOverlayScroll(editor.view.dom, surfaceRef.current);
4722
5715
  }, [editor, lockScroll]);
4723
- return /* @__PURE__ */ jsx88("div", { ref: surfaceRef, "data-cursor-overlay": true, className: "fixed z-50", style: { left: coords.left, top: coords.top }, children });
5716
+ return /* @__PURE__ */ jsx94("div", { ref: surfaceRef, "data-cursor-overlay": true, className: "fixed z-50", style: { left: coords.left, top: coords.top }, children });
4724
5717
  }
4725
5718
 
4726
5719
  // src/editor/Editor.tsx
4727
- import { jsx as jsx89, jsxs as jsxs41 } from "react/jsx-runtime";
5720
+ import { jsx as jsx95, jsxs as jsxs43 } from "react/jsx-runtime";
4728
5721
  function extractTitle(json) {
4729
5722
  if (json?.content?.[0]?.type === "heading" && json.content[0]?.attrs?.level === 1) {
4730
5723
  return json.content[0]?.content?.[0]?.text || "";
@@ -4745,7 +5738,7 @@ function getEditorCounts(editor) {
4745
5738
  readDuration: Math.max(1, Math.ceil(words / 250))
4746
5739
  };
4747
5740
  }
4748
- var Editor = forwardRef3(function Editor2({
5741
+ var Editor = forwardRef4(function Editor2({
4749
5742
  content = "",
4750
5743
  editable = true,
4751
5744
  enforceTitle = true,
@@ -4755,15 +5748,15 @@ var Editor = forwardRef3(function Editor2({
4755
5748
  onUpload,
4756
5749
  fetchLinkPreview
4757
5750
  }, ref) {
4758
- const [slash, setSlash] = useState18({ props: null, coords: { left: 0, top: 0 } });
4759
- const [mention, setMention] = useState18({ props: null, coords: { left: 0, top: 0 } });
4760
- const [imageInput, setImageInput] = useState18(null);
4761
- const [bookmarkInput, setBookmarkInput] = useState18(null);
4762
- const [youTubeInput, setYouTubeInput] = useState18(null);
4763
- const slashRef = useRef9(null);
4764
- const slashSurfaceRef = useRef9(null);
4765
- const mentionRef = useRef9(null);
4766
- const extensions = useMemo7(
5751
+ const [slash, setSlash] = useState19({ props: null, coords: { left: 0, top: 0 } });
5752
+ const [mention, setMention] = useState19({ props: null, coords: { left: 0, top: 0 } });
5753
+ const [imageInput, setImageInput] = useState19(null);
5754
+ const [bookmarkInput, setBookmarkInput] = useState19(null);
5755
+ const [youTubeInput, setYouTubeInput] = useState19(null);
5756
+ const slashRef = useRef11(null);
5757
+ const slashSurfaceRef = useRef11(null);
5758
+ const mentionRef = useRef11(null);
5759
+ const extensions = useMemo8(
4767
5760
  () => buildExtensions({
4768
5761
  mentionSource,
4769
5762
  hrefBuilder,
@@ -4791,7 +5784,7 @@ var Editor = forwardRef3(function Editor2({
4791
5784
  }),
4792
5785
  [mentionSource, hrefBuilder, enforceTitle]
4793
5786
  );
4794
- useEffect16(() => {
5787
+ useEffect19(() => {
4795
5788
  if (!slash.props) return;
4796
5789
  const updatePosition = () => setSlash(
4797
5790
  (current) => current.props ? slashMenuFrom(current.props, slashSurfaceRef.current) : current
@@ -4828,11 +5821,11 @@ var Editor = forwardRef3(function Editor2({
4828
5821
  handlePaste: insertPastedUrlAsLink
4829
5822
  }
4830
5823
  });
4831
- useEffect16(() => {
5824
+ useEffect19(() => {
4832
5825
  if (!editor || !slash.props) return;
4833
5826
  return lockEditorOverlayScroll2(editor.view.dom, slashSurfaceRef.current);
4834
5827
  }, [editor, slash.props]);
4835
- useEffect16(() => {
5828
+ useEffect19(() => {
4836
5829
  if (!editor) return;
4837
5830
  const instance = editor;
4838
5831
  registerImageInsertCallback(instance, (position) => {
@@ -4840,7 +5833,7 @@ var Editor = forwardRef3(function Editor2({
4840
5833
  });
4841
5834
  return () => unregisterImageInsertCallback(instance);
4842
5835
  }, [editor]);
4843
- useEffect16(() => {
5836
+ useEffect19(() => {
4844
5837
  if (!editor) return;
4845
5838
  const instance = editor;
4846
5839
  registerYouTubeInsertCallback(instance, (position) => {
@@ -4848,7 +5841,7 @@ var Editor = forwardRef3(function Editor2({
4848
5841
  });
4849
5842
  return () => unregisterYouTubeInsertCallback(instance);
4850
5843
  }, [editor]);
4851
- useEffect16(() => {
5844
+ useEffect19(() => {
4852
5845
  if (!editor) return;
4853
5846
  const sync = () => {
4854
5847
  const storage = editor.storage;
@@ -4882,21 +5875,21 @@ var Editor = forwardRef3(function Editor2({
4882
5875
  }),
4883
5876
  [editor]
4884
5877
  );
4885
- return /* @__PURE__ */ jsxs41("div", { className: "relative", children: [
4886
- /* @__PURE__ */ jsx89(EditorContent, { editor }),
4887
- editor ? /* @__PURE__ */ jsx89(BubbleMenu, { editor }) : null,
4888
- editor && slash.props ? /* @__PURE__ */ jsx89(
5878
+ return /* @__PURE__ */ jsxs43("div", { className: "relative", children: [
5879
+ /* @__PURE__ */ jsx95(EditorContent, { editor }),
5880
+ editor ? /* @__PURE__ */ jsx95(BubbleMenu, { editor }) : null,
5881
+ editor && slash.props ? /* @__PURE__ */ jsx95(
4889
5882
  "div",
4890
5883
  {
4891
5884
  ref: slashSurfaceRef,
4892
5885
  "data-slash-menu-surface": true,
4893
5886
  className: "fixed z-50",
4894
5887
  style: { left: slash.coords.left, top: slash.coords.top },
4895
- children: /* @__PURE__ */ jsx89(SlashMenu, { ref: slashRef, ...slash.props })
5888
+ children: /* @__PURE__ */ jsx95(SlashMenu, { ref: slashRef, ...slash.props })
4896
5889
  }
4897
5890
  ) : null,
4898
- editor && mention.props ? /* @__PURE__ */ jsx89("div", { className: "fixed z-50", style: { left: mention.coords.left, top: mention.coords.top }, children: /* @__PURE__ */ jsx89(MentionList, { ref: mentionRef, ...mention.props }) }) : null,
4899
- editor && imageInput ? /* @__PURE__ */ jsx89(CursorOverlay, { editor, position: imageInput.position, ...IMAGE_OVERLAY, children: /* @__PURE__ */ jsx89(
5891
+ editor && mention.props ? /* @__PURE__ */ jsx95("div", { className: "fixed z-50", style: { left: mention.coords.left, top: mention.coords.top }, children: /* @__PURE__ */ jsx95(MentionList, { ref: mentionRef, ...mention.props }) }) : null,
5892
+ editor && imageInput ? /* @__PURE__ */ jsx95(CursorOverlay, { editor, position: imageInput.position, ...IMAGE_OVERLAY, children: /* @__PURE__ */ jsx95(
4900
5893
  ImageInput,
4901
5894
  {
4902
5895
  editor,
@@ -4905,7 +5898,7 @@ var Editor = forwardRef3(function Editor2({
4905
5898
  onClose: () => setImageInput(null)
4906
5899
  }
4907
5900
  ) }) : null,
4908
- editor && bookmarkInput ? /* @__PURE__ */ jsx89(CursorOverlay, { editor, position: bookmarkInput.position, ...BOOKMARK_OVERLAY, children: /* @__PURE__ */ jsx89(
5901
+ editor && bookmarkInput ? /* @__PURE__ */ jsx95(CursorOverlay, { editor, position: bookmarkInput.position, ...BOOKMARK_OVERLAY, children: /* @__PURE__ */ jsx95(
4909
5902
  BookmarkInput,
4910
5903
  {
4911
5904
  editor,
@@ -4914,7 +5907,7 @@ var Editor = forwardRef3(function Editor2({
4914
5907
  onClose: () => setBookmarkInput(null)
4915
5908
  }
4916
5909
  ) }) : null,
4917
- editor && youTubeInput ? /* @__PURE__ */ jsx89(CursorOverlay, { editor, position: youTubeInput.position, ...YOUTUBE_OVERLAY, children: /* @__PURE__ */ jsx89(YouTubeInput, { editor, position: youTubeInput.position, onClose: () => setYouTubeInput(null) }) }) : null
5910
+ editor && youTubeInput ? /* @__PURE__ */ jsx95(CursorOverlay, { editor, position: youTubeInput.position, ...YOUTUBE_OVERLAY, children: /* @__PURE__ */ jsx95(YouTubeInput, { editor, position: youTubeInput.position, onClose: () => setYouTubeInput(null) }) }) : null
4918
5911
  ] });
4919
5912
  });
4920
5913
  function menuFrom(props) {
@@ -4936,10 +5929,10 @@ function slashMenuFrom(props, surface) {
4936
5929
  }
4937
5930
 
4938
5931
  // src/editor/Reader.tsx
4939
- import { useMemo as useMemo8 } from "react";
5932
+ import { useMemo as useMemo9 } from "react";
4940
5933
  import { generateHTML } from "@tiptap/core";
4941
5934
  import { buildExtensions as buildExtensions2 } from "@cloudvoyant/helical-ui";
4942
- import { jsx as jsx90 } from "react/jsx-runtime";
5935
+ import { jsx as jsx96 } from "react/jsx-runtime";
4943
5936
  var noopNodeView = () => () => ({});
4944
5937
  var inertNodeViews = {
4945
5938
  image: noopNodeView,
@@ -4948,7 +5941,7 @@ var inertNodeViews = {
4948
5941
  codeBlock: noopNodeView
4949
5942
  };
4950
5943
  function Reader({ content, className }) {
4951
- const html = useMemo8(() => {
5944
+ const html = useMemo9(() => {
4952
5945
  if (!content) return "";
4953
5946
  try {
4954
5947
  const json = JSON.parse(content);
@@ -4960,7 +5953,7 @@ function Reader({ content, className }) {
4960
5953
  return "";
4961
5954
  }
4962
5955
  }, [content]);
4963
- return /* @__PURE__ */ jsx90(
5956
+ return /* @__PURE__ */ jsx96(
4964
5957
  "div",
4965
5958
  {
4966
5959
  className: className ?? "prose prose-lg reader-content max-w-none dark:prose-invert",
@@ -5032,6 +6025,7 @@ export {
5032
6025
  InlineLaTeX,
5033
6026
  Input2 as Input,
5034
6027
  Item,
6028
+ Kbd,
5035
6029
  LaTeX,
5036
6030
  LanguageTabsCodeBlock,
5037
6031
  Listbox,
@@ -5039,6 +6033,8 @@ export {
5039
6033
  ListboxEmpty,
5040
6034
  ListboxInput,
5041
6035
  ListboxItem,
6036
+ ListboxItemGroup,
6037
+ ListboxItemGroupLabel,
5042
6038
  ListboxItemIndicator,
5043
6039
  ListboxItemText,
5044
6040
  ListboxLabel,
@@ -5083,6 +6079,7 @@ export {
5083
6079
  PaginationItems,
5084
6080
  PaginationNext,
5085
6081
  PaginationPrevious,
6082
+ Pane,
5086
6083
  Popover,
5087
6084
  PopoverAnchor,
5088
6085
  PopoverContent,
@@ -5170,6 +6167,10 @@ export {
5170
6167
  TooltipProvider,
5171
6168
  TooltipTrigger,
5172
6169
  VStack,
6170
+ WhichKey,
6171
+ WhichKeyExplorer,
6172
+ WhichKeyMode,
6173
+ WhichKeyProvider,
5173
6174
  Window,
5174
6175
  WindowBody,
5175
6176
  WindowControl,
@@ -5190,10 +6191,14 @@ export {
5190
6191
  useDialog,
5191
6192
  useDialogContext,
5192
6193
  useField,
6194
+ useKeymap,
6195
+ useKeymapScope,
5193
6196
  useListbox,
5194
6197
  useMediaQuery,
5195
6198
  useNavbar,
5196
6199
  useNumberInput,
6200
+ useOptionalPaneRegistration,
6201
+ useOptionalWhichKeyController,
5197
6202
  usePopover,
5198
6203
  usePopoverContext,
5199
6204
  useRadioGroup,
@@ -5204,6 +6209,8 @@ export {
5204
6209
  useTagInput,
5205
6210
  useTooltip,
5206
6211
  useTooltipContext,
6212
+ useWhichKey,
6213
+ useWhichKeyController,
5207
6214
  useWindow,
5208
6215
  useWindowContext
5209
6216
  };