@nimblebrain/synapse 0.17.1 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +20 -18
  2. package/dist/chunk-54W6IAHM.js +24 -0
  3. package/dist/chunk-54W6IAHM.js.map +1 -0
  4. package/dist/{chunk-UPDBDXQB.js → chunk-DRLVEHCD.js} +6 -13
  5. package/dist/chunk-DRLVEHCD.js.map +1 -0
  6. package/dist/chunk-NP7ROSH2.cjs +33 -0
  7. package/dist/chunk-NP7ROSH2.cjs.map +1 -0
  8. package/dist/{chunk-SRQNQ26I.js → chunk-OYLZ5OCK.js} +4 -4
  9. package/dist/chunk-OYLZ5OCK.js.map +1 -0
  10. package/dist/chunk-P5DBJFSQ.js +8459 -0
  11. package/dist/chunk-P5DBJFSQ.js.map +1 -0
  12. package/dist/chunk-PZ5AY32C.js +9 -0
  13. package/dist/chunk-PZ5AY32C.js.map +1 -0
  14. package/dist/chunk-Q7SFCCGT.cjs +11 -0
  15. package/dist/chunk-Q7SFCCGT.cjs.map +1 -0
  16. package/dist/chunk-QXDCA7QW.cjs +8466 -0
  17. package/dist/chunk-QXDCA7QW.cjs.map +1 -0
  18. package/dist/{chunk-EHLQWCYV.cjs → chunk-RU64F5RS.cjs} +7 -7
  19. package/dist/chunk-RU64F5RS.cjs.map +1 -0
  20. package/dist/{chunk-TXJMGQYF.cjs → chunk-SZWHFTXV.cjs} +5 -13
  21. package/dist/chunk-SZWHFTXV.cjs.map +1 -0
  22. package/dist/codegen/cli.cjs +4 -4
  23. package/dist/codegen/cli.js +4 -4
  24. package/dist/codegen/index.cjs +1 -0
  25. package/dist/codegen/index.d.cts +1 -1
  26. package/dist/codegen/index.d.ts +1 -1
  27. package/dist/codegen/index.js +1 -0
  28. package/dist/connect.iife.global.js +66 -43
  29. package/dist/{detect-Bf8Q_0dK.d.ts → detect-DBwc8a21.d.ts} +2 -2
  30. package/dist/{detect-BHYg26_d.d.cts → detect-DZMJsyvZ.d.cts} +2 -2
  31. package/dist/host/index.cjs +15 -14
  32. package/dist/host/index.d.cts +3 -3
  33. package/dist/host/index.d.ts +3 -3
  34. package/dist/host/index.js +3 -2
  35. package/dist/index.cjs +42 -18
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.cts +40 -13
  38. package/dist/index.d.ts +40 -13
  39. package/dist/index.js +35 -3
  40. package/dist/index.js.map +1 -1
  41. package/dist/react/index.cjs +12 -10
  42. package/dist/react/index.cjs.map +1 -1
  43. package/dist/react/index.d.cts +14 -5
  44. package/dist/react/index.d.ts +14 -5
  45. package/dist/react/index.js +7 -5
  46. package/dist/react/index.js.map +1 -1
  47. package/dist/schema-reader-GM4A4L44.js +4 -0
  48. package/dist/{schema-reader-776246MJ.js.map → schema-reader-GM4A4L44.js.map} +1 -1
  49. package/dist/{schema-reader-B6LTGBMJ.cjs → schema-reader-MWBRQ2TQ.cjs} +3 -2
  50. package/dist/{schema-reader-B6LTGBMJ.cjs.map → schema-reader-MWBRQ2TQ.cjs.map} +1 -1
  51. package/dist/{server-QIYIJHD5.cjs → server-LR6T6C44.cjs} +32 -20
  52. package/dist/server-LR6T6C44.cjs.map +1 -0
  53. package/dist/{server-5N76YCWC.js → server-UHPEE55X.js} +32 -21
  54. package/dist/server-UHPEE55X.js.map +1 -0
  55. package/dist/synapse-runtime.iife.global.js +66 -43
  56. package/dist/synapse-ui.iife.global.js +2 -2
  57. package/dist/{type-generator-UA3L4OIA.cjs → type-generator-YTPFWLVG.cjs} +3 -2
  58. package/dist/{type-generator-UA3L4OIA.cjs.map → type-generator-YTPFWLVG.cjs.map} +1 -1
  59. package/dist/type-generator-ZYSVFK3X.js +4 -0
  60. package/dist/{type-generator-MZ4X4DE5.js.map → type-generator-ZYSVFK3X.js.map} +1 -1
  61. package/dist/{types-uEO4VFJ2.d.ts → types-CG08aO82.d.cts} +14 -83
  62. package/dist/{types-uEO4VFJ2.d.cts → types-CG08aO82.d.ts} +14 -83
  63. package/dist/ui/base.cjs +1 -0
  64. package/dist/ui/base.cjs.map +1 -1
  65. package/dist/ui/base.js +1 -0
  66. package/dist/ui/base.js.map +1 -1
  67. package/dist/ui/index.cjs +314 -87
  68. package/dist/ui/index.cjs.map +1 -1
  69. package/dist/ui/index.d.cts +29 -2
  70. package/dist/ui/index.d.ts +29 -2
  71. package/dist/ui/index.js +315 -89
  72. package/dist/ui/index.js.map +1 -1
  73. package/dist/vite/index.cjs +74 -30
  74. package/dist/vite/index.cjs.map +1 -1
  75. package/dist/vite/index.d.cts +5 -1
  76. package/dist/vite/index.d.ts +5 -1
  77. package/dist/vite/index.js +74 -30
  78. package/dist/vite/index.js.map +1 -1
  79. package/dist/{writer-NDK4U6C5.cjs → writer-HDRCQSX2.cjs} +3 -3
  80. package/dist/{writer-NDK4U6C5.cjs.map → writer-HDRCQSX2.cjs.map} +1 -1
  81. package/dist/{writer-ZNBXYUYC.js → writer-QNDPMEYD.js} +3 -3
  82. package/dist/{writer-ZNBXYUYC.js.map → writer-QNDPMEYD.js.map} +1 -1
  83. package/package.json +8 -5
  84. package/dist/chunk-EHLQWCYV.cjs.map +0 -1
  85. package/dist/chunk-FDMRJZKT.cjs +0 -788
  86. package/dist/chunk-FDMRJZKT.cjs.map +0 -1
  87. package/dist/chunk-SRQNQ26I.js.map +0 -1
  88. package/dist/chunk-TXJMGQYF.cjs.map +0 -1
  89. package/dist/chunk-UPDBDXQB.js.map +0 -1
  90. package/dist/chunk-VYR6V47N.js +0 -781
  91. package/dist/chunk-VYR6V47N.js.map +0 -1
  92. package/dist/schema-reader-776246MJ.js +0 -3
  93. package/dist/server-5N76YCWC.js.map +0 -1
  94. package/dist/server-QIYIJHD5.cjs.map +0 -1
  95. package/dist/type-generator-MZ4X4DE5.js +0 -3
package/dist/ui/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ensureStyle, injectBaseReset } from '../chunk-3HQGHPNC.js';
2
- import { createContext, useRef, useId, useState, useEffect, useMemo, useContext, useLayoutEffect, Fragment as Fragment$1 } from 'react';
2
+ import '../chunk-PZ5AY32C.js';
3
+ import { createContext, useRef, useId, useState, useMemo, useContext, useEffect, useLayoutEffect, Fragment as Fragment$1 } from 'react';
3
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
5
 
5
6
  // src/ui/tokens.ts
@@ -20,6 +21,7 @@ var tokens = {
20
21
  ring: "var(--color-ring-primary, #2563eb)",
21
22
  // ── Status / brand semantics ──
22
23
  danger: "var(--nb-color-danger, #dc2626)",
24
+ dangerFg: "var(--nb-color-danger-foreground, #ffffff)",
23
25
  success: "var(--nb-color-success, #059669)",
24
26
  warning: "var(--nb-color-warning, #f59e0b)",
25
27
  processing: "var(--nb-color-processing, #7c3aed)",
@@ -292,6 +294,10 @@ function Button({
292
294
  vars["--nb-btn-bg"] = tokens.accent;
293
295
  vars["--nb-btn-bg-hover"] = `color-mix(in oklab, ${tokens.accent} 88%, black)`;
294
296
  vars["--nb-btn-fg"] = tokens.accentFg;
297
+ } else if (variant === "danger") {
298
+ vars["--nb-btn-bg"] = tokens.danger;
299
+ vars["--nb-btn-bg-hover"] = `color-mix(in oklab, ${tokens.danger} 88%, black)`;
300
+ vars["--nb-btn-fg"] = tokens.dangerFg;
295
301
  } else if (variant === "secondary") {
296
302
  vars["--nb-btn-bg"] = tokens.bgSubtle;
297
303
  vars["--nb-btn-bg-hover"] = tokens.bgRaised;
@@ -410,8 +416,283 @@ function Card({
410
416
  }
411
417
  );
412
418
  }
413
- var STYLE_ID3 = "nb-synapse-drawer";
419
+ function inClosedDetails(el) {
420
+ const details = el.closest("details:not([open])");
421
+ if (!details) return false;
422
+ const summary = details.querySelector("summary");
423
+ return !summary || !summary.contains(el);
424
+ }
425
+ var CANDIDATES = "a[href], button, input, select, textarea, summary, [tabindex]";
426
+ function tabbables(panel) {
427
+ return Array.from(panel.querySelectorAll(CANDIDATES)).filter(
428
+ (el) => el.tabIndex >= 0 && !el.matches(":disabled") && !el.closest("[hidden]") && !inClosedDetails(el) && el.type !== "hidden"
429
+ );
430
+ }
431
+ var openOverlays = [];
432
+ var lockedOverflow = "";
433
+ var handledEscapes = /* @__PURE__ */ new WeakSet();
434
+ function isInnermost(self) {
435
+ const selfAt = openOverlays.indexOf(self);
436
+ return openOverlays.every((other, at) => {
437
+ if (other === self || !other.panel || !self.panel) return true;
438
+ if (self.panel.contains(other.panel)) return false;
439
+ if (other.panel.contains(self.panel)) return true;
440
+ return at < selfAt;
441
+ });
442
+ }
443
+ function useModal(open, panelRef, { onEscape, initialFocus }) {
444
+ const escapeRef = useRef(onEscape);
445
+ escapeRef.current = onEscape;
446
+ const initialFocusRef = useRef(initialFocus);
447
+ initialFocusRef.current = initialFocus;
448
+ useEffect(() => {
449
+ if (!open) return;
450
+ const panel = panelRef.current;
451
+ const previouslyFocused = document.activeElement;
452
+ const entry = { panel, restoreTo: previouslyFocused };
453
+ const nested = openOverlays.filter((o) => panel && o.panel && panel.contains(o.panel)).at(-1);
454
+ if (nested) {
455
+ entry.restoreTo = nested.restoreTo;
456
+ nested.restoreTo = panel;
457
+ }
458
+ const { body } = document;
459
+ if (openOverlays.length === 0) lockedOverflow = body.style.overflow;
460
+ openOverlays.push(entry);
461
+ const innermost = () => isInnermost(entry);
462
+ if (!(panel && previouslyFocused && panel.contains(previouslyFocused))) {
463
+ (initialFocusRef.current?.() ?? panel)?.focus();
464
+ }
465
+ body.style.overflow = "hidden";
466
+ const onWindowKeyDown = (e) => {
467
+ if (e.key !== "Escape" || handledEscapes.has(e) || !innermost()) return;
468
+ handledEscapes.add(e);
469
+ e.preventDefault();
470
+ escapeRef.current();
471
+ };
472
+ window.addEventListener("keydown", onWindowKeyDown);
473
+ const onPanelKeyDown = (e) => {
474
+ if (e.key !== "Tab" || !panel || !innermost()) return;
475
+ const focusables = tabbables(panel);
476
+ if (focusables.length === 0) {
477
+ e.preventDefault();
478
+ return;
479
+ }
480
+ const first = focusables[0];
481
+ const last = focusables[focusables.length - 1];
482
+ const active = document.activeElement;
483
+ if (e.shiftKey && (active === first || active === panel)) {
484
+ e.preventDefault();
485
+ last.focus();
486
+ } else if (!e.shiftKey && active === last) {
487
+ e.preventDefault();
488
+ first.focus();
489
+ }
490
+ };
491
+ panel?.addEventListener("keydown", onPanelKeyDown);
492
+ return () => {
493
+ window.removeEventListener("keydown", onWindowKeyDown);
494
+ panel?.removeEventListener("keydown", onPanelKeyDown);
495
+ const at = openOverlays.indexOf(entry);
496
+ if (at !== -1) openOverlays.splice(at, 1);
497
+ if (openOverlays.length === 0) body.style.overflow = lockedOverflow;
498
+ entry.restoreTo?.focus?.();
499
+ };
500
+ }, [open, panelRef]);
501
+ }
502
+ var STYLE_ID3 = "nb-synapse-confirm-dialog";
414
503
  var RULES3 = `
504
+ /* border-box on both, because the kit cannot assume the host resets it: under
505
+ content-box a full-width panel is its padding wider than a phone screen. */
506
+ .nb-confirm-scrim {
507
+ box-sizing: border-box;
508
+ position: fixed; inset: 0; z-index: 1010;
509
+ display: flex; align-items: center; justify-content: center;
510
+ padding: 1rem;
511
+ background: rgba(0, 0, 0, 0.4);
512
+ animation: nb-confirm-fade 160ms ease;
513
+ }
514
+ .nb-confirm {
515
+ box-sizing: border-box;
516
+ width: 100%; max-width: 28rem; max-height: 100%;
517
+ overflow-y: auto;
518
+ outline: none;
519
+ animation: nb-confirm-in 160ms cubic-bezier(0.2, 0, 0, 1);
520
+ }
521
+ .nb-confirm__actions {
522
+ display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem;
523
+ }
524
+ @keyframes nb-confirm-fade { from { opacity: 0; } }
525
+ @keyframes nb-confirm-in { from { opacity: 0; transform: translateY(4px); } }
526
+ @media (pointer: coarse) {
527
+ .nb-confirm__actions .nb-btn { min-height: 44px; }
528
+ }
529
+ `;
530
+ function ConfirmDialog({
531
+ open,
532
+ onOpenChange,
533
+ title,
534
+ description,
535
+ children,
536
+ confirmLabel = "Confirm",
537
+ cancelLabel = "Cancel",
538
+ pendingLabel,
539
+ destructive = false,
540
+ onConfirm
541
+ }) {
542
+ ensureStyle(STYLE_ID3, RULES3);
543
+ const panelRef = useRef(null);
544
+ const titleId = useId();
545
+ const descriptionId = useId();
546
+ const [pending, setPending] = useState(false);
547
+ const [error, setError] = useState(null);
548
+ useEffect(() => {
549
+ if (open) {
550
+ setError(null);
551
+ setPending(false);
552
+ }
553
+ }, [open]);
554
+ const dismiss = () => {
555
+ if (!pending) onOpenChange(false);
556
+ };
557
+ const focusTarget = () => panelRef.current?.querySelector(
558
+ destructive ? "[data-nb-confirm-cancel]" : "[data-nb-confirm-confirm]"
559
+ );
560
+ useModal(open, panelRef, { onEscape: dismiss, initialFocus: focusTarget });
561
+ useEffect(() => {
562
+ if (error) focusTarget()?.focus();
563
+ }, [error]);
564
+ const confirm = async () => {
565
+ if (pending) return;
566
+ setPending(true);
567
+ setError(null);
568
+ try {
569
+ await onConfirm();
570
+ setPending(false);
571
+ onOpenChange(false);
572
+ } catch (err) {
573
+ const message = err instanceof Error ? err.message : String(err);
574
+ setError(message || "That didn't go through. Try again.");
575
+ setPending(false);
576
+ }
577
+ };
578
+ if (!open) return null;
579
+ const panelStyle = {
580
+ padding: "1.25rem",
581
+ borderRadius: tokens.radiusMd,
582
+ border: `${tokens.borderWidth} solid ${tokens.border}`,
583
+ background: tokens.bg,
584
+ color: tokens.fg,
585
+ boxShadow: tokens.shadowLg,
586
+ fontFamily: tokens.fontSans
587
+ };
588
+ return (
589
+ // biome-ignore lint/a11y/useKeyWithClickEvents: scrim click is a bonus mouse affordance; Escape and Cancel are the keyboard dismissal paths.
590
+ // biome-ignore lint/a11y/noStaticElementInteractions: the scrim is a decorative dismissal backdrop; the panel below owns the alertdialog role/semantics.
591
+ /* @__PURE__ */ jsx(
592
+ "div",
593
+ {
594
+ className: "nb-confirm-scrim",
595
+ onClick: (e) => {
596
+ if (e.target === e.currentTarget) dismiss();
597
+ },
598
+ children: /* @__PURE__ */ jsxs(
599
+ "div",
600
+ {
601
+ ref: panelRef,
602
+ role: "alertdialog",
603
+ "aria-modal": "true",
604
+ "aria-labelledby": titleId,
605
+ "aria-describedby": description != null ? descriptionId : void 0,
606
+ "aria-busy": pending || void 0,
607
+ tabIndex: -1,
608
+ className: "nb-confirm",
609
+ style: panelStyle,
610
+ children: [
611
+ /* @__PURE__ */ jsx(
612
+ "h2",
613
+ {
614
+ id: titleId,
615
+ style: {
616
+ margin: 0,
617
+ fontFamily: tokens.fontSans,
618
+ fontSize: tokens.textBaseSize,
619
+ lineHeight: tokens.textBaseLine,
620
+ fontWeight: tokens.weightSemibold,
621
+ color: tokens.fg
622
+ },
623
+ children: title
624
+ }
625
+ ),
626
+ description != null ? /* @__PURE__ */ jsx(
627
+ "p",
628
+ {
629
+ id: descriptionId,
630
+ style: {
631
+ margin: "0.25rem 0 0",
632
+ fontSize: tokens.textSmSize,
633
+ lineHeight: tokens.textSmLine,
634
+ color: tokens.fgMuted
635
+ },
636
+ children: description
637
+ }
638
+ ) : null,
639
+ children != null ? /* @__PURE__ */ jsx(
640
+ "div",
641
+ {
642
+ style: {
643
+ marginTop: "1rem",
644
+ fontSize: tokens.textSmSize,
645
+ lineHeight: tokens.textSmLine
646
+ },
647
+ children
648
+ }
649
+ ) : null,
650
+ error ? /* @__PURE__ */ jsx(
651
+ "p",
652
+ {
653
+ role: "alert",
654
+ style: {
655
+ margin: "0.75rem 0 0",
656
+ fontSize: tokens.textSmSize,
657
+ lineHeight: tokens.textSmLine,
658
+ color: tokens.danger
659
+ },
660
+ children: error
661
+ }
662
+ ) : null,
663
+ /* @__PURE__ */ jsxs("div", { className: "nb-confirm__actions", style: { marginTop: "1.25rem" }, children: [
664
+ /* @__PURE__ */ jsx(
665
+ Button,
666
+ {
667
+ variant: "secondary",
668
+ size: "sm",
669
+ "data-nb-confirm-cancel": "",
670
+ disabled: pending,
671
+ onClick: dismiss,
672
+ children: cancelLabel
673
+ }
674
+ ),
675
+ /* @__PURE__ */ jsx(
676
+ Button,
677
+ {
678
+ variant: destructive ? "danger" : "primary",
679
+ size: "sm",
680
+ "data-nb-confirm-confirm": "",
681
+ disabled: pending,
682
+ onClick: () => void confirm(),
683
+ children: pending ? pendingLabel ?? confirmLabel : confirmLabel
684
+ }
685
+ )
686
+ ] })
687
+ ]
688
+ }
689
+ )
690
+ }
691
+ )
692
+ );
693
+ }
694
+ var STYLE_ID4 = "nb-synapse-drawer";
695
+ var RULES4 = `
415
696
  .nb-drawer-scrim {
416
697
  position: fixed; inset: 0; z-index: 1000;
417
698
  display: flex; background: rgba(0, 0, 0, 0.32);
@@ -438,18 +719,6 @@ var RULES3 = `
438
719
  .nb-drawer-iconbtn { min-width: 44px; min-height: 44px; }
439
720
  }
440
721
  `;
441
- function inClosedDetails(el) {
442
- const details = el.closest("details:not([open])");
443
- if (!details) return false;
444
- const summary = details.querySelector("summary");
445
- return !summary || !summary.contains(el);
446
- }
447
- var CANDIDATES = "a[href], button, input, select, textarea, summary, [tabindex]";
448
- function tabbables(panel) {
449
- return Array.from(panel.querySelectorAll(CANDIDATES)).filter(
450
- (el) => el.tabIndex >= 0 && !el.matches(":disabled") && !el.closest("[hidden]") && !inClosedDetails(el) && el.type !== "hidden"
451
- );
452
- }
453
722
  var DrawerContext = createContext(null);
454
723
  function DrawerRoot({
455
724
  open,
@@ -461,54 +730,11 @@ function DrawerRoot({
461
730
  children,
462
731
  ...rest
463
732
  }) {
464
- ensureStyle(STYLE_ID3, RULES3);
733
+ ensureStyle(STYLE_ID4, RULES4);
465
734
  const panelRef = useRef(null);
466
735
  const labelId = useId();
467
736
  const [hasTitle, setHasTitle] = useState(false);
468
- useEffect(() => {
469
- if (!open) return;
470
- const onKey = (e) => {
471
- if (e.key === "Escape") {
472
- e.preventDefault();
473
- (onEscape ?? onClose)();
474
- }
475
- };
476
- window.addEventListener("keydown", onKey);
477
- return () => window.removeEventListener("keydown", onKey);
478
- }, [open, onEscape, onClose]);
479
- useEffect(() => {
480
- if (!open) return;
481
- const panel = panelRef.current;
482
- const previouslyFocused = document.activeElement;
483
- panel?.focus();
484
- const { body } = document;
485
- const prevOverflow = body.style.overflow;
486
- body.style.overflow = "hidden";
487
- const onKeyDown = (e) => {
488
- if (e.key !== "Tab" || !panel) return;
489
- const focusables = tabbables(panel);
490
- if (focusables.length === 0) {
491
- e.preventDefault();
492
- return;
493
- }
494
- const first = focusables[0];
495
- const last = focusables[focusables.length - 1];
496
- const active = document.activeElement;
497
- if (e.shiftKey && (active === first || active === panel)) {
498
- e.preventDefault();
499
- last.focus();
500
- } else if (!e.shiftKey && active === last) {
501
- e.preventDefault();
502
- first.focus();
503
- }
504
- };
505
- panel?.addEventListener("keydown", onKeyDown);
506
- return () => {
507
- panel?.removeEventListener("keydown", onKeyDown);
508
- body.style.overflow = prevOverflow;
509
- previouslyFocused?.focus?.();
510
- };
511
- }, [open]);
737
+ useModal(open, panelRef, { onEscape: onEscape ?? onClose });
512
738
  const ctxValue = useMemo(() => ({ labelId, setHasTitle }), [labelId]);
513
739
  if (!open) return null;
514
740
  const isBottom = side === "bottom";
@@ -740,8 +966,8 @@ function EmptyState({ icon, title, description, action, style, ...rest }) {
740
966
  }
741
967
  );
742
968
  }
743
- var STYLE_ID4 = "nb-synapse-listrow";
744
- var RULES4 = `
969
+ var STYLE_ID5 = "nb-synapse-listrow";
970
+ var RULES5 = `
745
971
  .nb-listrow { transition: background 140ms ease; }
746
972
  .nb-listrow--interactive { cursor: pointer; }
747
973
  .nb-listrow--interactive:hover { background: var(--nb-listrow-hover); }
@@ -756,7 +982,7 @@ function ListRow({
756
982
  className,
757
983
  ...rest
758
984
  }) {
759
- ensureStyle(STYLE_ID4, RULES4);
985
+ ensureStyle(STYLE_ID5, RULES5);
760
986
  const rowStyle = {
761
987
  "--nb-listrow-hover": tokens.bgSubtle,
762
988
  display: "grid",
@@ -839,8 +1065,8 @@ function ListRow({
839
1065
  }
840
1066
  );
841
1067
  }
842
- var STYLE_ID5 = "nb-synapse-page-header";
843
- var RULES5 = `
1068
+ var STYLE_ID6 = "nb-synapse-page-header";
1069
+ var RULES6 = `
844
1070
  .nb-page-header__desc {
845
1071
  display: -webkit-box;
846
1072
  -webkit-box-orient: vertical;
@@ -859,7 +1085,7 @@ function PageHeader({
859
1085
  style,
860
1086
  ...rest
861
1087
  }) {
862
- ensureStyle(STYLE_ID5, RULES5);
1088
+ ensureStyle(STYLE_ID6, RULES6);
863
1089
  const descVars = descriptionLines > 0 ? { "--nb-ph-desc-lines": String(descriptionLines) } : {};
864
1090
  return /* @__PURE__ */ jsxs(
865
1091
  "header",
@@ -945,8 +1171,8 @@ function Pagination({ page, pageCount, onChange, style, ...rest }) {
945
1171
  }
946
1172
  );
947
1173
  }
948
- var STYLE_ID6 = "nb-synapse-prose";
949
- var RULES6 = `
1174
+ var STYLE_ID7 = "nb-synapse-prose";
1175
+ var RULES7 = `
950
1176
  .nb-prose {
951
1177
  font-family: ${tokens.fontSans};
952
1178
  font-size: ${tokens.textBaseSize};
@@ -971,15 +1197,15 @@ var RULES6 = `
971
1197
  .nb-prose strong { font-weight: ${tokens.weightSemibold}; }
972
1198
  `;
973
1199
  function Prose({ html, children, className, ...rest }) {
974
- ensureStyle(STYLE_ID6, RULES6);
1200
+ ensureStyle(STYLE_ID7, RULES7);
975
1201
  const cls = `nb-prose ${className ?? ""}`.trim();
976
1202
  if (html !== void 0) {
977
1203
  return /* @__PURE__ */ jsx("div", { className: cls, dangerouslySetInnerHTML: { __html: html }, ...rest });
978
1204
  }
979
1205
  return /* @__PURE__ */ jsx("div", { className: cls, ...rest, children });
980
1206
  }
981
- var STYLE_ID7 = "nb-synapse-searchfield";
982
- var RULES7 = `
1207
+ var STYLE_ID8 = "nb-synapse-searchfield";
1208
+ var RULES8 = `
983
1209
  .nb-search { font-family: var(--nb-search-font); color: var(--nb-search-fg); outline: none; }
984
1210
  .nb-search::placeholder { color: var(--nb-search-placeholder); }
985
1211
  .nb-search--underline {
@@ -1009,7 +1235,7 @@ function SearchField({
1009
1235
  type = "search",
1010
1236
  ...rest
1011
1237
  }) {
1012
- ensureStyle(STYLE_ID7, RULES7);
1238
+ ensureStyle(STYLE_ID8, RULES8);
1013
1239
  const fieldStyle = {
1014
1240
  "--nb-search-font": tokens.fontSans,
1015
1241
  "--nb-search-fg": tokens.fg,
@@ -1032,8 +1258,8 @@ function SearchField({
1032
1258
  }
1033
1259
  );
1034
1260
  }
1035
- var STYLE_ID8 = "nb-synapse-segmented";
1036
- var RULES8 = `
1261
+ var STYLE_ID9 = "nb-synapse-segmented";
1262
+ var RULES9 = `
1037
1263
  .nb-seg {
1038
1264
  display: inline-flex;
1039
1265
  gap: 2px;
@@ -1068,7 +1294,7 @@ function SegmentedControl({
1068
1294
  className,
1069
1295
  ...rest
1070
1296
  }) {
1071
- ensureStyle(STYLE_ID8, RULES8);
1297
+ ensureStyle(STYLE_ID9, RULES9);
1072
1298
  const trackStyle = {
1073
1299
  "--nb-seg-radius": tokens.radiusSm,
1074
1300
  "--nb-seg-track": tokens.bgSubtle,
@@ -1097,14 +1323,14 @@ function SegmentedControl({
1097
1323
  )) })
1098
1324
  );
1099
1325
  }
1100
- var STYLE_ID9 = "nb-synapse-spinner";
1101
- var RULES9 = `
1326
+ var STYLE_ID10 = "nb-synapse-spinner";
1327
+ var RULES10 = `
1102
1328
  @keyframes nb-spin { to { transform: rotate(360deg); } }
1103
1329
  .nb-spinner { animation: nb-spin 0.7s linear infinite; }
1104
1330
  @media (prefers-reduced-motion: reduce) { .nb-spinner { animation-duration: 1.6s; } }
1105
1331
  `;
1106
1332
  function Spinner({ size = 16, color, style, className, ...rest }) {
1107
- ensureStyle(STYLE_ID9, RULES9);
1333
+ ensureStyle(STYLE_ID10, RULES10);
1108
1334
  const spinnerStyle = {
1109
1335
  display: "inline-block",
1110
1336
  flexShrink: 0,
@@ -1133,7 +1359,7 @@ var COLOR = {
1133
1359
  failed: tokens.danger,
1134
1360
  idle: tokens.fgFaint
1135
1361
  };
1136
- var STYLE_ID10 = "nb-synapse-statusdot";
1362
+ var STYLE_ID11 = "nb-synapse-statusdot";
1137
1363
  var KEYFRAMES = `
1138
1364
  @keyframes nb-statusdot-pulse {
1139
1365
  0% { box-shadow: 0 0 0 0 var(--nb-statusdot-ring); transform: scale(1); }
@@ -1155,7 +1381,7 @@ function StatusDot({
1155
1381
  className,
1156
1382
  ...rest
1157
1383
  }) {
1158
- ensureStyle(STYLE_ID10, KEYFRAMES);
1384
+ ensureStyle(STYLE_ID11, KEYFRAMES);
1159
1385
  const dotColor = color ?? COLOR[status];
1160
1386
  const working = status === "working";
1161
1387
  const dotStyle = {
@@ -1178,8 +1404,8 @@ function StatusDot({
1178
1404
  }
1179
1405
  );
1180
1406
  }
1181
- var STYLE_ID11 = "nb-synapse-table";
1182
- var RULES10 = `
1407
+ var STYLE_ID12 = "nb-synapse-table";
1408
+ var RULES11 = `
1183
1409
  .nb-table { width: 100%; border-collapse: collapse; font-family: var(--nb-table-font); }
1184
1410
  .nb-table th, .nb-table td {
1185
1411
  padding: 0.55rem 0.75rem;
@@ -1209,7 +1435,7 @@ function Table({
1209
1435
  className,
1210
1436
  ...rest
1211
1437
  }) {
1212
- ensureStyle(STYLE_ID11, RULES10);
1438
+ ensureStyle(STYLE_ID12, RULES11);
1213
1439
  const vars = {
1214
1440
  "--nb-table-font": tokens.fontSans,
1215
1441
  "--nb-table-fg": tokens.fg,
@@ -1275,8 +1501,8 @@ function Table({
1275
1501
  }
1276
1502
  );
1277
1503
  }
1278
- var STYLE_ID12 = "nb-synapse-tabs";
1279
- var RULES11 = `
1504
+ var STYLE_ID13 = "nb-synapse-tabs";
1505
+ var RULES12 = `
1280
1506
  .nb-tabs {
1281
1507
  display: flex;
1282
1508
  align-items: stretch;
@@ -1334,7 +1560,7 @@ function Tabs({
1334
1560
  onKeyDown: callerKeyDown,
1335
1561
  ...rest
1336
1562
  }) {
1337
- ensureStyle(STYLE_ID12, RULES11);
1563
+ ensureStyle(STYLE_ID13, RULES12);
1338
1564
  const barRef = useRef(null);
1339
1565
  const barStyle = {
1340
1566
  "--nb-tabs-gap": "1.25rem",
@@ -1611,8 +1837,8 @@ function useSidebar() {
1611
1837
  if (!ctx) throw new Error("useSidebar must be used within <SidebarLayout>");
1612
1838
  return ctx;
1613
1839
  }
1614
- var STYLE_ID13 = "nb-synapse-sidebarlayout";
1615
- var RULES12 = `
1840
+ var STYLE_ID14 = "nb-synapse-sidebarlayout";
1841
+ var RULES13 = `
1616
1842
  .nb-sidebar-drawer { transition: transform 220ms cubic-bezier(0.2, 0, 0, 1); }
1617
1843
  .nb-sidebar-scrim { animation: nb-sidebar-fade 180ms ease; }
1618
1844
  @keyframes nb-sidebar-fade { from { opacity: 0; } to { opacity: 1; } }
@@ -1662,7 +1888,7 @@ function SidebarLayoutRoot({
1662
1888
  }
1663
1889
  function Sidebar({ style, children, ...rest }) {
1664
1890
  const { collapsed, mode, side, width, open, setOpen } = useSidebar();
1665
- ensureStyle(STYLE_ID13, RULES12);
1891
+ ensureStyle(STYLE_ID14, RULES13);
1666
1892
  if (!collapsed) {
1667
1893
  const border = `${tokens.borderWidth} solid ${tokens.border}`;
1668
1894
  return /* @__PURE__ */ jsx(
@@ -1787,6 +2013,6 @@ function Trigger({ children, style, onClick, ...rest }) {
1787
2013
  }
1788
2014
  var SidebarLayout = Object.assign(SidebarLayoutRoot, { Sidebar, Main, Trigger });
1789
2015
 
1790
- export { AppFrame, Avatar, Badge, Breadcrumb, Button, Card, Divider, Drawer, EmptyState, Heading, Inline, ListDetailLayout, ListRow, PageHeader, PageLayout, Pagination, Prose, SearchField, SegmentedControl, SidebarLayout, Spacer, Spinner, Stack, StatusDot, Table, Tabs, Text, TextLink, headingStyle, textStyle, tokens, useBreakpoint, useListDetail, useSidebar };
2016
+ export { AppFrame, Avatar, Badge, Breadcrumb, Button, Card, ConfirmDialog, Divider, Drawer, EmptyState, Heading, Inline, ListDetailLayout, ListRow, PageHeader, PageLayout, Pagination, Prose, SearchField, SegmentedControl, SidebarLayout, Spacer, Spinner, Stack, StatusDot, Table, Tabs, Text, TextLink, headingStyle, textStyle, tokens, useBreakpoint, useListDetail, useSidebar };
1791
2017
  //# sourceMappingURL=index.js.map
1792
2018
  //# sourceMappingURL=index.js.map