@kushagradhawan/kookie-ui 0.1.52 → 0.1.54

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 (54) hide show
  1. package/components.css +72 -72
  2. package/dist/cjs/components/_internal/shell-bottom.js.map +2 -2
  3. package/dist/cjs/components/_internal/shell-handles.js +1 -1
  4. package/dist/cjs/components/_internal/shell-handles.js.map +3 -3
  5. package/dist/cjs/components/_internal/shell-inspector.js.map +2 -2
  6. package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
  7. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  8. package/dist/cjs/components/_internal/shell-sidebar.js.map +2 -2
  9. package/dist/cjs/components/chatbar.d.ts.map +1 -1
  10. package/dist/cjs/components/chatbar.js +1 -1
  11. package/dist/cjs/components/chatbar.js.map +3 -3
  12. package/dist/cjs/components/shell.hooks.js +1 -1
  13. package/dist/cjs/components/shell.hooks.js.map +2 -2
  14. package/dist/cjs/components/shell.js +1 -1
  15. package/dist/cjs/components/shell.js.map +3 -3
  16. package/dist/cjs/components/shell.types.d.ts +2 -2
  17. package/dist/cjs/components/shell.types.d.ts.map +1 -1
  18. package/dist/cjs/components/shell.types.js +1 -1
  19. package/dist/cjs/components/shell.types.js.map +3 -3
  20. package/dist/esm/components/_internal/shell-bottom.js.map +2 -2
  21. package/dist/esm/components/_internal/shell-handles.js +1 -1
  22. package/dist/esm/components/_internal/shell-handles.js.map +3 -3
  23. package/dist/esm/components/_internal/shell-inspector.js.map +2 -2
  24. package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
  25. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  26. package/dist/esm/components/_internal/shell-sidebar.js.map +2 -2
  27. package/dist/esm/components/chatbar.d.ts.map +1 -1
  28. package/dist/esm/components/chatbar.js +1 -1
  29. package/dist/esm/components/chatbar.js.map +3 -3
  30. package/dist/esm/components/shell.hooks.js +1 -1
  31. package/dist/esm/components/shell.hooks.js.map +3 -3
  32. package/dist/esm/components/shell.js +1 -1
  33. package/dist/esm/components/shell.js.map +3 -3
  34. package/dist/esm/components/shell.types.d.ts +2 -2
  35. package/dist/esm/components/shell.types.d.ts.map +1 -1
  36. package/dist/esm/components/shell.types.js +1 -1
  37. package/dist/esm/components/shell.types.js.map +3 -3
  38. package/package.json +1 -1
  39. package/schemas/base-button.json +1 -1
  40. package/schemas/button.json +1 -1
  41. package/schemas/icon-button.json +1 -1
  42. package/schemas/index.json +6 -6
  43. package/schemas/toggle-button.json +1 -1
  44. package/schemas/toggle-icon-button.json +1 -1
  45. package/src/components/_internal/shell-bottom.tsx +1 -1
  46. package/src/components/_internal/shell-handles.tsx +1 -1
  47. package/src/components/_internal/shell-inspector.tsx +1 -1
  48. package/src/components/_internal/shell-sidebar.tsx +2 -2
  49. package/src/components/chatbar.css +15 -12
  50. package/src/components/chatbar.tsx +7 -5
  51. package/src/components/shell.hooks.ts +3 -3
  52. package/src/components/shell.tsx +14 -14
  53. package/src/components/shell.types.ts +2 -2
  54. package/styles.css +72 -72
package/components.css CHANGED
@@ -19494,68 +19494,68 @@
19494
19494
  --backdrop-filter-components: none;
19495
19495
  }
19496
19496
  .rt-ChatbarRoot:where(.rt-r-size-1) .rt-ChatbarBox {
19497
- border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
19498
- padding: var(--space-2);
19497
+ border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
19498
+ padding: var(--space-3);
19499
19499
  }
19500
19500
  .rt-ChatbarRoot:where(.rt-r-size-1) .rt-ChatbarInput {
19501
- --text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));
19502
- --text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));
19501
+ --text-area-padding-y: calc(var(--space-3) - var(--text-area-border-width));
19502
+ --text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));
19503
19503
  font-size: var(--font-size-1);
19504
19504
  line-height: var(--line-height-1);
19505
19505
  letter-spacing: var(--letter-spacing-1);
19506
19506
  }
19507
19507
  .rt-ChatbarRoot:where(.rt-r-size-2) .rt-ChatbarBox {
19508
- border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
19509
- padding: var(--space-3);
19508
+ border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
19509
+ padding: var(--space-4);
19510
19510
  }
19511
19511
  .rt-ChatbarRoot:where(.rt-r-size-2) .rt-ChatbarInput {
19512
- --text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));
19513
- --text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));
19512
+ --text-area-padding-y: calc(var(--space-4) - var(--text-area-border-width));
19513
+ --text-area-padding-x: calc(var(--space-4) - var(--text-area-border-width));
19514
19514
  font-size: var(--font-size-2);
19515
19515
  line-height: var(--line-height-2);
19516
19516
  letter-spacing: var(--letter-spacing-2);
19517
19517
  }
19518
19518
  .rt-ChatbarRoot:where(.rt-r-size-3) .rt-ChatbarBox {
19519
- border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
19520
- padding: var(--space-4);
19519
+ border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
19520
+ padding: var(--space-5);
19521
19521
  }
19522
19522
  .rt-ChatbarRoot:where(.rt-r-size-3) .rt-ChatbarInput {
19523
- --text-area-padding-y: calc(var(--space-3) - var(--text-area-border-width));
19524
- --text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));
19523
+ --text-area-padding-y: calc(var(--space-5) - var(--text-area-border-width));
19524
+ --text-area-padding-x: calc(var(--space-5) - var(--text-area-border-width));
19525
19525
  font-size: var(--font-size-3);
19526
19526
  line-height: var(--line-height-3);
19527
19527
  letter-spacing: var(--letter-spacing-3);
19528
19528
  }
19529
19529
  @media (min-width: 520px) {
19530
19530
  .rt-ChatbarRoot:where(.xs\:rt-r-size-1) .rt-ChatbarBox {
19531
- border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
19532
- padding: var(--space-2);
19531
+ border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
19532
+ padding: var(--space-3);
19533
19533
  }
19534
19534
  .rt-ChatbarRoot:where(.xs\:rt-r-size-1) .rt-ChatbarInput {
19535
- --text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));
19536
- --text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));
19535
+ --text-area-padding-y: calc(var(--space-3) - var(--text-area-border-width));
19536
+ --text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));
19537
19537
  font-size: var(--font-size-1);
19538
19538
  line-height: var(--line-height-1);
19539
19539
  letter-spacing: var(--letter-spacing-1);
19540
19540
  }
19541
19541
  .rt-ChatbarRoot:where(.xs\:rt-r-size-2) .rt-ChatbarBox {
19542
- border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
19543
- padding: var(--space-3);
19542
+ border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
19543
+ padding: var(--space-4);
19544
19544
  }
19545
19545
  .rt-ChatbarRoot:where(.xs\:rt-r-size-2) .rt-ChatbarInput {
19546
- --text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));
19547
- --text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));
19546
+ --text-area-padding-y: calc(var(--space-4) - var(--text-area-border-width));
19547
+ --text-area-padding-x: calc(var(--space-4) - var(--text-area-border-width));
19548
19548
  font-size: var(--font-size-2);
19549
19549
  line-height: var(--line-height-2);
19550
19550
  letter-spacing: var(--letter-spacing-2);
19551
19551
  }
19552
19552
  .rt-ChatbarRoot:where(.xs\:rt-r-size-3) .rt-ChatbarBox {
19553
- border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
19554
- padding: var(--space-4);
19553
+ border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
19554
+ padding: var(--space-5);
19555
19555
  }
19556
19556
  .rt-ChatbarRoot:where(.xs\:rt-r-size-3) .rt-ChatbarInput {
19557
- --text-area-padding-y: calc(var(--space-3) - var(--text-area-border-width));
19558
- --text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));
19557
+ --text-area-padding-y: calc(var(--space-5) - var(--text-area-border-width));
19558
+ --text-area-padding-x: calc(var(--space-5) - var(--text-area-border-width));
19559
19559
  font-size: var(--font-size-3);
19560
19560
  line-height: var(--line-height-3);
19561
19561
  letter-spacing: var(--letter-spacing-3);
@@ -19563,34 +19563,34 @@
19563
19563
  }
19564
19564
  @media (min-width: 768px) {
19565
19565
  .rt-ChatbarRoot:where(.sm\:rt-r-size-1) .rt-ChatbarBox {
19566
- border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
19567
- padding: var(--space-2);
19566
+ border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
19567
+ padding: var(--space-3);
19568
19568
  }
19569
19569
  .rt-ChatbarRoot:where(.sm\:rt-r-size-1) .rt-ChatbarInput {
19570
- --text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));
19571
- --text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));
19570
+ --text-area-padding-y: calc(var(--space-3) - var(--text-area-border-width));
19571
+ --text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));
19572
19572
  font-size: var(--font-size-1);
19573
19573
  line-height: var(--line-height-1);
19574
19574
  letter-spacing: var(--letter-spacing-1);
19575
19575
  }
19576
19576
  .rt-ChatbarRoot:where(.sm\:rt-r-size-2) .rt-ChatbarBox {
19577
- border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
19578
- padding: var(--space-3);
19577
+ border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
19578
+ padding: var(--space-4);
19579
19579
  }
19580
19580
  .rt-ChatbarRoot:where(.sm\:rt-r-size-2) .rt-ChatbarInput {
19581
- --text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));
19582
- --text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));
19581
+ --text-area-padding-y: calc(var(--space-4) - var(--text-area-border-width));
19582
+ --text-area-padding-x: calc(var(--space-4) - var(--text-area-border-width));
19583
19583
  font-size: var(--font-size-2);
19584
19584
  line-height: var(--line-height-2);
19585
19585
  letter-spacing: var(--letter-spacing-2);
19586
19586
  }
19587
19587
  .rt-ChatbarRoot:where(.sm\:rt-r-size-3) .rt-ChatbarBox {
19588
- border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
19589
- padding: var(--space-4);
19588
+ border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
19589
+ padding: var(--space-5);
19590
19590
  }
19591
19591
  .rt-ChatbarRoot:where(.sm\:rt-r-size-3) .rt-ChatbarInput {
19592
- --text-area-padding-y: calc(var(--space-3) - var(--text-area-border-width));
19593
- --text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));
19592
+ --text-area-padding-y: calc(var(--space-5) - var(--text-area-border-width));
19593
+ --text-area-padding-x: calc(var(--space-5) - var(--text-area-border-width));
19594
19594
  font-size: var(--font-size-3);
19595
19595
  line-height: var(--line-height-3);
19596
19596
  letter-spacing: var(--letter-spacing-3);
@@ -19598,34 +19598,34 @@
19598
19598
  }
19599
19599
  @media (min-width: 1024px) {
19600
19600
  .rt-ChatbarRoot:where(.md\:rt-r-size-1) .rt-ChatbarBox {
19601
- border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
19602
- padding: var(--space-2);
19601
+ border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
19602
+ padding: var(--space-3);
19603
19603
  }
19604
19604
  .rt-ChatbarRoot:where(.md\:rt-r-size-1) .rt-ChatbarInput {
19605
- --text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));
19606
- --text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));
19605
+ --text-area-padding-y: calc(var(--space-3) - var(--text-area-border-width));
19606
+ --text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));
19607
19607
  font-size: var(--font-size-1);
19608
19608
  line-height: var(--line-height-1);
19609
19609
  letter-spacing: var(--letter-spacing-1);
19610
19610
  }
19611
19611
  .rt-ChatbarRoot:where(.md\:rt-r-size-2) .rt-ChatbarBox {
19612
- border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
19613
- padding: var(--space-3);
19612
+ border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
19613
+ padding: var(--space-4);
19614
19614
  }
19615
19615
  .rt-ChatbarRoot:where(.md\:rt-r-size-2) .rt-ChatbarInput {
19616
- --text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));
19617
- --text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));
19616
+ --text-area-padding-y: calc(var(--space-4) - var(--text-area-border-width));
19617
+ --text-area-padding-x: calc(var(--space-4) - var(--text-area-border-width));
19618
19618
  font-size: var(--font-size-2);
19619
19619
  line-height: var(--line-height-2);
19620
19620
  letter-spacing: var(--letter-spacing-2);
19621
19621
  }
19622
19622
  .rt-ChatbarRoot:where(.md\:rt-r-size-3) .rt-ChatbarBox {
19623
- border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
19624
- padding: var(--space-4);
19623
+ border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
19624
+ padding: var(--space-5);
19625
19625
  }
19626
19626
  .rt-ChatbarRoot:where(.md\:rt-r-size-3) .rt-ChatbarInput {
19627
- --text-area-padding-y: calc(var(--space-3) - var(--text-area-border-width));
19628
- --text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));
19627
+ --text-area-padding-y: calc(var(--space-5) - var(--text-area-border-width));
19628
+ --text-area-padding-x: calc(var(--space-5) - var(--text-area-border-width));
19629
19629
  font-size: var(--font-size-3);
19630
19630
  line-height: var(--line-height-3);
19631
19631
  letter-spacing: var(--letter-spacing-3);
@@ -19633,34 +19633,34 @@
19633
19633
  }
19634
19634
  @media (min-width: 1280px) {
19635
19635
  .rt-ChatbarRoot:where(.lg\:rt-r-size-1) .rt-ChatbarBox {
19636
- border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
19637
- padding: var(--space-2);
19636
+ border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
19637
+ padding: var(--space-3);
19638
19638
  }
19639
19639
  .rt-ChatbarRoot:where(.lg\:rt-r-size-1) .rt-ChatbarInput {
19640
- --text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));
19641
- --text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));
19640
+ --text-area-padding-y: calc(var(--space-3) - var(--text-area-border-width));
19641
+ --text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));
19642
19642
  font-size: var(--font-size-1);
19643
19643
  line-height: var(--line-height-1);
19644
19644
  letter-spacing: var(--letter-spacing-1);
19645
19645
  }
19646
19646
  .rt-ChatbarRoot:where(.lg\:rt-r-size-2) .rt-ChatbarBox {
19647
- border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
19648
- padding: var(--space-3);
19647
+ border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
19648
+ padding: var(--space-4);
19649
19649
  }
19650
19650
  .rt-ChatbarRoot:where(.lg\:rt-r-size-2) .rt-ChatbarInput {
19651
- --text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));
19652
- --text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));
19651
+ --text-area-padding-y: calc(var(--space-4) - var(--text-area-border-width));
19652
+ --text-area-padding-x: calc(var(--space-4) - var(--text-area-border-width));
19653
19653
  font-size: var(--font-size-2);
19654
19654
  line-height: var(--line-height-2);
19655
19655
  letter-spacing: var(--letter-spacing-2);
19656
19656
  }
19657
19657
  .rt-ChatbarRoot:where(.lg\:rt-r-size-3) .rt-ChatbarBox {
19658
- border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
19659
- padding: var(--space-4);
19658
+ border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
19659
+ padding: var(--space-5);
19660
19660
  }
19661
19661
  .rt-ChatbarRoot:where(.lg\:rt-r-size-3) .rt-ChatbarInput {
19662
- --text-area-padding-y: calc(var(--space-3) - var(--text-area-border-width));
19663
- --text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));
19662
+ --text-area-padding-y: calc(var(--space-5) - var(--text-area-border-width));
19663
+ --text-area-padding-x: calc(var(--space-5) - var(--text-area-border-width));
19664
19664
  font-size: var(--font-size-3);
19665
19665
  line-height: var(--line-height-3);
19666
19666
  letter-spacing: var(--letter-spacing-3);
@@ -19668,34 +19668,34 @@
19668
19668
  }
19669
19669
  @media (min-width: 1640px) {
19670
19670
  .rt-ChatbarRoot:where(.xl\:rt-r-size-1) .rt-ChatbarBox {
19671
- border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
19672
- padding: var(--space-2);
19671
+ border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
19672
+ padding: var(--space-3);
19673
19673
  }
19674
19674
  .rt-ChatbarRoot:where(.xl\:rt-r-size-1) .rt-ChatbarInput {
19675
- --text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));
19676
- --text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));
19675
+ --text-area-padding-y: calc(var(--space-3) - var(--text-area-border-width));
19676
+ --text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));
19677
19677
  font-size: var(--font-size-1);
19678
19678
  line-height: var(--line-height-1);
19679
19679
  letter-spacing: var(--letter-spacing-1);
19680
19680
  }
19681
19681
  .rt-ChatbarRoot:where(.xl\:rt-r-size-2) .rt-ChatbarBox {
19682
- border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
19683
- padding: var(--space-3);
19682
+ border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
19683
+ padding: var(--space-4);
19684
19684
  }
19685
19685
  .rt-ChatbarRoot:where(.xl\:rt-r-size-2) .rt-ChatbarInput {
19686
- --text-area-padding-y: calc(var(--space-2) - var(--text-area-border-width));
19687
- --text-area-padding-x: calc(var(--space-2) - var(--text-area-border-width));
19686
+ --text-area-padding-y: calc(var(--space-4) - var(--text-area-border-width));
19687
+ --text-area-padding-x: calc(var(--space-4) - var(--text-area-border-width));
19688
19688
  font-size: var(--font-size-2);
19689
19689
  line-height: var(--line-height-2);
19690
19690
  letter-spacing: var(--letter-spacing-2);
19691
19691
  }
19692
19692
  .rt-ChatbarRoot:where(.xl\:rt-r-size-3) .rt-ChatbarBox {
19693
- border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
19694
- padding: var(--space-4);
19693
+ border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
19694
+ padding: var(--space-5);
19695
19695
  }
19696
19696
  .rt-ChatbarRoot:where(.xl\:rt-r-size-3) .rt-ChatbarInput {
19697
- --text-area-padding-y: calc(var(--space-3) - var(--text-area-border-width));
19698
- --text-area-padding-x: calc(var(--space-3) - var(--text-area-border-width));
19697
+ --text-area-padding-y: calc(var(--space-5) - var(--text-area-border-width));
19698
+ --text-area-padding-x: calc(var(--space-5) - var(--text-area-border-width));
19699
19699
  font-size: var(--font-size-3);
19700
19700
  line-height: var(--line-height-3);
19701
19701
  letter-spacing: var(--letter-spacing-3);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/shell-bottom.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport * as Sheet from '../sheet.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { useShell } from '../shell.context.js';\nimport { useResponsivePresentation, useResponsiveValue } from '../shell.hooks.js';\nimport { PaneResizeContext } from './shell-resize.js';\nimport { BottomHandle, PaneHandle } from './shell-handles.js';\nimport { BREAKPOINTS } from '../shell.types.js';\nimport type { Breakpoint, PaneMode, PaneSizePersistence, ResponsivePresentation } from '../shell.types.js';\n\ninterface PaneProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n // legacy mode removed\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n resizer?: React.ReactNode;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n snapPoints?: number[];\n snapTolerance?: number;\n collapseThreshold?: number;\n paneId?: string;\n persistence?: PaneSizePersistence;\n}\n\ntype BottomOpenChangeMeta = { reason: 'init' | 'toggle' | 'responsive' };\ntype BottomControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; defaultOpen?: never };\ntype BottomUncontrolledProps = { defaultOpen?: boolean; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; open?: never };\ntype BottomSizeControlledProps = { size: number | string; defaultSize?: never };\ntype BottomSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\ntype BottomSizeChangeMeta = { reason: 'init' | 'resize' | 'controlled' };\ntype BottomPublicProps = PaneProps &\n (BottomControlledProps | BottomUncontrolledProps) &\n (BottomSizeControlledProps | BottomSizeUncontrolledProps) & {\n onSizeChange?: (size: number, meta: BottomSizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n };\n\ntype BottomComponent = React.ForwardRefExoticComponent<BottomPublicProps & React.RefAttributes<HTMLDivElement>> & { Handle: typeof BottomHandle };\n\nexport const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>(\n (\n {\n className,\n presentation = 'fixed',\n // removed legacy props\n // new API\n defaultOpen,\n open,\n onOpenChange,\n expandedSize = 200,\n minSize = 100,\n maxSize = 400,\n resizable = false,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n ...props\n },\n ref,\n ) => {\n const shell = useShell();\n const resolvedPresentation = useResponsivePresentation(presentation);\n const isOverlay = resolvedPresentation === 'overlay';\n const isStacked = resolvedPresentation === 'stacked';\n const localRef = React.useRef<HTMLDivElement | null>(null);\n const setRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const handleChildren = childArray.filter((el: React.ReactElement) => React.isValidElement(el) && el.type === BottomHandle);\n const contentChildren = childArray.filter((el: React.ReactElement) => !(React.isValidElement(el) && el.type === BottomHandle));\n\n // Throttled/debounced emitter for onSizeChange\n const emitSizeChange = React.useMemo(() => {\n const cb = (props as any).onSizeChange as undefined | ((s: number, meta: BottomSizeChangeMeta) => void);\n const strategy = (props as any).sizeUpdate as undefined | 'throttle' | 'debounce';\n const ms = (props as any).sizeUpdateMs ?? 50;\n if (!cb) return () => {};\n if (strategy === 'debounce') {\n let t: any = null;\n return (s: number, meta: BottomSizeChangeMeta) => {\n if (t) clearTimeout(t);\n t = setTimeout(() => {\n cb(s, meta);\n }, ms);\n };\n }\n if (strategy === 'throttle') {\n let last = 0;\n return (s: number, meta: BottomSizeChangeMeta) => {\n const now = Date.now();\n if (now - last >= ms) {\n last = now;\n cb(s, meta);\n }\n };\n }\n return (s: number, meta: BottomSizeChangeMeta) => cb(s, meta);\n }, [(props as any).onSizeChange, (props as any).sizeUpdate, (props as any).sizeUpdateMs]);\n\n const didInitRef = React.useRef(false);\n const didInitFromDefaultOpenRef = React.useRef(false);\n const resolvedDefaultOpen = useResponsiveValue(defaultOpen as any);\n React.useEffect(() => {\n if (didInitRef.current) return;\n if (!shell.currentBreakpointReady) return;\n didInitRef.current = true;\n if (typeof open === 'undefined' && typeof defaultOpen !== 'undefined') {\n const initial = Boolean(resolvedDefaultOpen);\n shell.setBottomMode(initial ? 'expanded' : 'collapsed');\n didInitFromDefaultOpenRef.current = true;\n }\n }, [shell.currentBreakpointReady, open, defaultOpen, resolvedDefaultOpen]);\n\n // Dev guards\n const wasControlledRef = React.useRef<boolean | null>(null);\n if (process.env.NODE_ENV !== 'production') {\n if (typeof open !== 'undefined' && typeof defaultOpen !== 'undefined') {\n // eslint-disable-next-line no-console\n console.error('Shell.Bottom: Do not pass both `open` and `defaultOpen`. Choose one.');\n }\n if (typeof (props as any).size !== 'undefined' && typeof (props as any).defaultSize !== 'undefined') {\n // eslint-disable-next-line no-console\n console.error('Shell.Bottom: Do not pass both `size` and `defaultSize`. Choose one.');\n }\n }\n\n React.useEffect(() => {\n const isControlled = typeof open !== 'undefined';\n if (wasControlledRef.current === null) {\n wasControlledRef.current = isControlled;\n return;\n }\n if (wasControlledRef.current !== isControlled) {\n // eslint-disable-next-line no-console\n console.warn('Shell.Bottom: Switching between controlled and uncontrolled `open` is not supported.');\n wasControlledRef.current = isControlled;\n }\n }, [open]);\n\n // Controlled sync (responsive handled below)\n React.useEffect(() => {\n if (typeof open === 'undefined') return;\n shell.setBottomMode(open ? 'expanded' : 'collapsed');\n }, [open]);\n\n const responsiveNotifiedRef = React.useRef(false);\n\n // Controlled responsive open\n const resolvedOpen = useResponsiveValue(open);\n React.useEffect(() => {\n if (typeof resolvedOpen === 'undefined') return;\n const shouldExpand = Boolean(resolvedOpen);\n shell.setBottomMode(shouldExpand ? 'expanded' : 'collapsed');\n }, [resolvedOpen]);\n\n const initNotifiedRef = React.useRef(false);\n const lastBottomModeRef = React.useRef<PaneMode | null>(null);\n React.useEffect(() => {\n if (!initNotifiedRef.current && typeof open === 'undefined' && defaultOpen && shell.bottomMode === 'expanded') {\n onOpenChange?.(true, { reason: 'init' });\n initNotifiedRef.current = true;\n }\n if (typeof open === 'undefined') {\n if (lastBottomModeRef.current !== null && lastBottomModeRef.current !== shell.bottomMode) {\n if (!responsiveNotifiedRef.current) {\n onOpenChange?.(shell.bottomMode === 'expanded', { reason: 'toggle' });\n }\n responsiveNotifiedRef.current = false;\n }\n lastBottomModeRef.current = shell.bottomMode;\n }\n }, [shell.bottomMode, open, defaultOpen, onOpenChange]);\n\n React.useEffect(() => {\n if (shell.bottomMode === 'expanded') {\n onExpand?.();\n } else {\n onCollapse?.();\n }\n }, [shell.bottomMode, onExpand, onCollapse]);\n\n const isExpanded = shell.bottomMode === 'expanded';\n\n const persistenceAdapter = React.useMemo(() => {\n if (!paneId || persistence) return persistence;\n const key = `kookie-ui:shell:bottom:${paneId}`;\n const adapter: PaneSizePersistence = {\n load: () => {\n if (typeof window === 'undefined') return undefined;\n const v = window.localStorage.getItem(key);\n return v ? Number(v) : undefined;\n },\n save: (size: number) => {\n if (typeof window === 'undefined') return;\n window.localStorage.setItem(key, String(size));\n },\n };\n return adapter;\n }, [paneId, persistence]);\n\n React.useEffect(() => {\n let mounted = true;\n (async () => {\n if (!resizable || !persistenceAdapter?.load || isOverlay) return;\n const loaded = await persistenceAdapter.load();\n if (mounted && typeof loaded === 'number' && localRef.current) {\n localRef.current.style.setProperty('--bottom-size', `${loaded}px`);\n onResize?.(loaded);\n }\n })();\n return () => {\n mounted = false;\n };\n }, [resizable, persistenceAdapter, onResize, isOverlay]);\n\n const handleEl =\n resizable && !isOverlay && isExpanded ? (\n <PaneResizeContext.Provider\n value={{\n containerRef: localRef,\n cssVarName: '--bottom-size',\n minSize,\n maxSize,\n defaultSize: expandedSize,\n orientation: 'horizontal',\n edge: 'start',\n computeNext: (client, startClient, startSize) => {\n const delta = client - startClient;\n return startSize - delta;\n },\n onResize,\n onResizeStart,\n onResizeEnd: (size) => {\n onResizeEnd?.(size);\n emitSizeChange(size, { reason: 'resize' });\n persistenceAdapter?.save?.(size);\n },\n target: 'bottom',\n collapsible,\n snapPoints,\n snapTolerance: snapTolerance ?? 8,\n collapseThreshold,\n requestCollapse: () => shell.setBottomMode('collapsed'),\n requestToggle: () => shell.togglePane('bottom'),\n }}\n >\n {handleChildren.length > 0 ? handleChildren.map((el, i) => React.cloneElement(el, { key: el.key ?? i })) : <PaneHandle />}\n </PaneResizeContext.Provider>\n ) : null;\n\n // Strip control/size props from DOM spread (moved above overlay return to keep hook order consistent)\n const {\n defaultOpen: _bottomDefaultOpenIgnored,\n open: _bottomOpenIgnored,\n onOpenChange: _bottomOnOpenChangeIgnored,\n size: _bottomSizeIgnored,\n defaultSize: _bottomDefaultSizeIgnored,\n onSizeChange: _bottomOnSizeChangeIgnored,\n sizeUpdate: _szu,\n sizeUpdateMs: _szums,\n ...bottomDomProps\n } = props as any;\n\n // Normalize CSS lengths to px (moved above overlay return to keep hook order consistent)\n const normalizeToPx = React.useCallback((value: number | string | undefined): number | undefined => {\n if (value == null) return undefined;\n if (typeof value === 'number' && Number.isFinite(value)) return value;\n const str = String(value).trim();\n if (!str) return undefined;\n if (str.endsWith('px')) return Number.parseFloat(str);\n if (str.endsWith('rem')) {\n const rem = Number.parseFloat(getComputedStyle(document.documentElement).fontSize || '16') || 16;\n return Number.parseFloat(str) * rem;\n }\n if (str.endsWith('%')) {\n const pct = Number.parseFloat(str);\n const base = document.documentElement.clientHeight || window.innerHeight || 0;\n return (pct / 100) * base;\n }\n const n = Number.parseFloat(str);\n return Number.isFinite(n) ? n : undefined;\n }, []);\n\n // Apply defaultSize on mount when uncontrolled (moved above overlay return)\n React.useEffect(() => {\n if (!localRef.current) return;\n if (typeof (props as any).size === 'undefined' && typeof (props as any).defaultSize !== 'undefined') {\n const px = normalizeToPx((props as any).defaultSize);\n if (typeof px === 'number' && Number.isFinite(px)) {\n const minPx = typeof minSize === 'number' ? minSize : undefined;\n const maxPx = typeof maxSize === 'number' ? maxSize : undefined;\n const clamped = Math.min(maxPx ?? px, Math.max(minPx ?? px, px));\n localRef.current.style.setProperty('--bottom-size', `${clamped}px`);\n emitSizeChange(clamped, { reason: 'init' });\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Controlled size sync (moved above overlay return)\n React.useEffect(() => {\n if (!localRef.current) return;\n if (typeof (props as any).size === 'undefined') return;\n const px = normalizeToPx((props as any).size);\n if (typeof px === 'number' && Number.isFinite(px)) {\n const minPx = typeof minSize === 'number' ? minSize : undefined;\n const maxPx = typeof maxSize === 'number' ? maxSize : undefined;\n const clamped = Math.min(maxPx ?? px, Math.max(minPx ?? px, px));\n localRef.current.style.setProperty('--bottom-size', `${clamped}px`);\n emitSizeChange(clamped, { reason: 'controlled' });\n }\n }, [(props as any).size, minSize, maxSize, normalizeToPx, emitSizeChange]);\n\n if (isOverlay) {\n const open = shell.bottomMode === 'expanded';\n return (\n <Sheet.Root open={open} onOpenChange={(o) => shell.setBottomMode(o ? 'expanded' : 'collapsed')}>\n <Sheet.Content side=\"bottom\" style={{ padding: 0 }} height={{ initial: `${expandedSize}px` }}>\n <VisuallyHidden>\n <Sheet.Title>Bottom panel</Sheet.Title>\n </VisuallyHidden>\n {contentChildren}\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n return (\n <div\n {...bottomDomProps}\n ref={setRef}\n className={classNames('rt-ShellBottom', className)}\n data-mode={shell.bottomMode}\n data-peek={shell.peekTarget === 'bottom' || undefined}\n data-presentation={shell.currentBreakpointReady ? resolvedPresentation : undefined}\n data-open={(shell.currentBreakpointReady && isStacked && isExpanded) || undefined}\n style={{\n ...style,\n ['--bottom-size' as any]: `${expandedSize}px`,\n ['--bottom-min-size' as any]: `${minSize}px`,\n ['--bottom-max-size' as any]: `${maxSize}px`,\n }}\n >\n <div className=\"rt-ShellBottomContent\" data-visible={isExpanded || undefined}>\n {contentChildren}\n </div>\n {handleEl}\n </div>\n );\n },\n) as BottomComponent;\nBottom.displayName = 'Shell.Bottom';\nBottom.Handle = BottomHandle;\n"],
5
- "mappings": "skBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,YAAAE,IAAA,eAAAC,GAAAH,IAAA,IAAAI,EAAuB,oBACvBC,EAAuB,yBACvBC,EAAuB,0BACvBC,EAA+B,iCAC/BC,EAAyB,+BACzBC,EAA8D,6BAC9DC,EAAkC,6BAClCC,EAAyC,8BACzCC,GAA4B,6BAwCrB,MAAMV,EAASE,EAAM,WAC1B,CACE,CACE,UAAA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sheet from '../sheet.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { useShell } from '../shell.context.js';\nimport { useResponsivePresentation, useResponsiveValue } from '../shell.hooks.js';\nimport { PaneResizeContext } from './shell-resize.js';\nimport { BottomHandle, PaneHandle } from './shell-handles.js';\nimport { _BREAKPOINTS } from '../shell.types.js';\nimport type { Breakpoint, PaneMode, PaneSizePersistence, ResponsivePresentation } from '../shell.types.js';\n\ninterface PaneProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n // legacy mode removed\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n resizer?: React.ReactNode;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n snapPoints?: number[];\n snapTolerance?: number;\n collapseThreshold?: number;\n paneId?: string;\n persistence?: PaneSizePersistence;\n}\n\ntype BottomOpenChangeMeta = { reason: 'init' | 'toggle' | 'responsive' };\ntype BottomControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; defaultOpen?: never };\ntype BottomUncontrolledProps = { defaultOpen?: boolean; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; open?: never };\ntype BottomSizeControlledProps = { size: number | string; defaultSize?: never };\ntype BottomSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\ntype BottomSizeChangeMeta = { reason: 'init' | 'resize' | 'controlled' };\ntype BottomPublicProps = PaneProps &\n (BottomControlledProps | BottomUncontrolledProps) &\n (BottomSizeControlledProps | BottomSizeUncontrolledProps) & {\n onSizeChange?: (size: number, meta: BottomSizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n };\n\ntype BottomComponent = React.ForwardRefExoticComponent<BottomPublicProps & React.RefAttributes<HTMLDivElement>> & { Handle: typeof BottomHandle };\n\nexport const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>(\n (\n {\n className,\n presentation = 'fixed',\n // removed legacy props\n // new API\n defaultOpen,\n open,\n onOpenChange,\n expandedSize = 200,\n minSize = 100,\n maxSize = 400,\n resizable = false,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n ...props\n },\n ref,\n ) => {\n const shell = useShell();\n const resolvedPresentation = useResponsivePresentation(presentation);\n const isOverlay = resolvedPresentation === 'overlay';\n const isStacked = resolvedPresentation === 'stacked';\n const localRef = React.useRef<HTMLDivElement | null>(null);\n const setRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const handleChildren = childArray.filter((el: React.ReactElement) => React.isValidElement(el) && el.type === BottomHandle);\n const contentChildren = childArray.filter((el: React.ReactElement) => !(React.isValidElement(el) && el.type === BottomHandle));\n\n // Throttled/debounced emitter for onSizeChange\n const emitSizeChange = React.useMemo(() => {\n const cb = (props as any).onSizeChange as undefined | ((s: number, meta: BottomSizeChangeMeta) => void);\n const strategy = (props as any).sizeUpdate as undefined | 'throttle' | 'debounce';\n const ms = (props as any).sizeUpdateMs ?? 50;\n if (!cb) return () => {};\n if (strategy === 'debounce') {\n let t: any = null;\n return (s: number, meta: BottomSizeChangeMeta) => {\n if (t) clearTimeout(t);\n t = setTimeout(() => {\n cb(s, meta);\n }, ms);\n };\n }\n if (strategy === 'throttle') {\n let last = 0;\n return (s: number, meta: BottomSizeChangeMeta) => {\n const now = Date.now();\n if (now - last >= ms) {\n last = now;\n cb(s, meta);\n }\n };\n }\n return (s: number, meta: BottomSizeChangeMeta) => cb(s, meta);\n }, [(props as any).onSizeChange, (props as any).sizeUpdate, (props as any).sizeUpdateMs]);\n\n const didInitRef = React.useRef(false);\n const didInitFromDefaultOpenRef = React.useRef(false);\n const resolvedDefaultOpen = useResponsiveValue(defaultOpen as any);\n React.useEffect(() => {\n if (didInitRef.current) return;\n if (!shell.currentBreakpointReady) return;\n didInitRef.current = true;\n if (typeof open === 'undefined' && typeof defaultOpen !== 'undefined') {\n const initial = Boolean(resolvedDefaultOpen);\n shell.setBottomMode(initial ? 'expanded' : 'collapsed');\n didInitFromDefaultOpenRef.current = true;\n }\n }, [shell.currentBreakpointReady, open, defaultOpen, resolvedDefaultOpen]);\n\n // Dev guards\n const wasControlledRef = React.useRef<boolean | null>(null);\n if (process.env.NODE_ENV !== 'production') {\n if (typeof open !== 'undefined' && typeof defaultOpen !== 'undefined') {\n // eslint-disable-next-line no-console\n console.error('Shell.Bottom: Do not pass both `open` and `defaultOpen`. Choose one.');\n }\n if (typeof (props as any).size !== 'undefined' && typeof (props as any).defaultSize !== 'undefined') {\n // eslint-disable-next-line no-console\n console.error('Shell.Bottom: Do not pass both `size` and `defaultSize`. Choose one.');\n }\n }\n\n React.useEffect(() => {\n const isControlled = typeof open !== 'undefined';\n if (wasControlledRef.current === null) {\n wasControlledRef.current = isControlled;\n return;\n }\n if (wasControlledRef.current !== isControlled) {\n // eslint-disable-next-line no-console\n console.warn('Shell.Bottom: Switching between controlled and uncontrolled `open` is not supported.');\n wasControlledRef.current = isControlled;\n }\n }, [open]);\n\n // Controlled sync (responsive handled below)\n React.useEffect(() => {\n if (typeof open === 'undefined') return;\n shell.setBottomMode(open ? 'expanded' : 'collapsed');\n }, [open]);\n\n const responsiveNotifiedRef = React.useRef(false);\n\n // Controlled responsive open\n const resolvedOpen = useResponsiveValue(open);\n React.useEffect(() => {\n if (typeof resolvedOpen === 'undefined') return;\n const shouldExpand = Boolean(resolvedOpen);\n shell.setBottomMode(shouldExpand ? 'expanded' : 'collapsed');\n }, [resolvedOpen]);\n\n const initNotifiedRef = React.useRef(false);\n const lastBottomModeRef = React.useRef<PaneMode | null>(null);\n React.useEffect(() => {\n if (!initNotifiedRef.current && typeof open === 'undefined' && defaultOpen && shell.bottomMode === 'expanded') {\n onOpenChange?.(true, { reason: 'init' });\n initNotifiedRef.current = true;\n }\n if (typeof open === 'undefined') {\n if (lastBottomModeRef.current !== null && lastBottomModeRef.current !== shell.bottomMode) {\n if (!responsiveNotifiedRef.current) {\n onOpenChange?.(shell.bottomMode === 'expanded', { reason: 'toggle' });\n }\n responsiveNotifiedRef.current = false;\n }\n lastBottomModeRef.current = shell.bottomMode;\n }\n }, [shell.bottomMode, open, defaultOpen, onOpenChange]);\n\n React.useEffect(() => {\n if (shell.bottomMode === 'expanded') {\n onExpand?.();\n } else {\n onCollapse?.();\n }\n }, [shell.bottomMode, onExpand, onCollapse]);\n\n const isExpanded = shell.bottomMode === 'expanded';\n\n const persistenceAdapter = React.useMemo(() => {\n if (!paneId || persistence) return persistence;\n const key = `kookie-ui:shell:bottom:${paneId}`;\n const adapter: PaneSizePersistence = {\n load: () => {\n if (typeof window === 'undefined') return undefined;\n const v = window.localStorage.getItem(key);\n return v ? Number(v) : undefined;\n },\n save: (size: number) => {\n if (typeof window === 'undefined') return;\n window.localStorage.setItem(key, String(size));\n },\n };\n return adapter;\n }, [paneId, persistence]);\n\n React.useEffect(() => {\n let mounted = true;\n (async () => {\n if (!resizable || !persistenceAdapter?.load || isOverlay) return;\n const loaded = await persistenceAdapter.load();\n if (mounted && typeof loaded === 'number' && localRef.current) {\n localRef.current.style.setProperty('--bottom-size', `${loaded}px`);\n onResize?.(loaded);\n }\n })();\n return () => {\n mounted = false;\n };\n }, [resizable, persistenceAdapter, onResize, isOverlay]);\n\n const handleEl =\n resizable && !isOverlay && isExpanded ? (\n <PaneResizeContext.Provider\n value={{\n containerRef: localRef,\n cssVarName: '--bottom-size',\n minSize,\n maxSize,\n defaultSize: expandedSize,\n orientation: 'horizontal',\n edge: 'start',\n computeNext: (client, startClient, startSize) => {\n const delta = client - startClient;\n return startSize - delta;\n },\n onResize,\n onResizeStart,\n onResizeEnd: (size) => {\n onResizeEnd?.(size);\n emitSizeChange(size, { reason: 'resize' });\n persistenceAdapter?.save?.(size);\n },\n target: 'bottom',\n collapsible,\n snapPoints,\n snapTolerance: snapTolerance ?? 8,\n collapseThreshold,\n requestCollapse: () => shell.setBottomMode('collapsed'),\n requestToggle: () => shell.togglePane('bottom'),\n }}\n >\n {handleChildren.length > 0 ? handleChildren.map((el, i) => React.cloneElement(el, { key: el.key ?? i })) : <PaneHandle />}\n </PaneResizeContext.Provider>\n ) : null;\n\n // Strip control/size props from DOM spread (moved above overlay return to keep hook order consistent)\n const {\n defaultOpen: _bottomDefaultOpenIgnored,\n open: _bottomOpenIgnored,\n onOpenChange: _bottomOnOpenChangeIgnored,\n size: _bottomSizeIgnored,\n defaultSize: _bottomDefaultSizeIgnored,\n onSizeChange: _bottomOnSizeChangeIgnored,\n sizeUpdate: _szu,\n sizeUpdateMs: _szums,\n ...bottomDomProps\n } = props as any;\n\n // Normalize CSS lengths to px (moved above overlay return to keep hook order consistent)\n const normalizeToPx = React.useCallback((value: number | string | undefined): number | undefined => {\n if (value == null) return undefined;\n if (typeof value === 'number' && Number.isFinite(value)) return value;\n const str = String(value).trim();\n if (!str) return undefined;\n if (str.endsWith('px')) return Number.parseFloat(str);\n if (str.endsWith('rem')) {\n const rem = Number.parseFloat(getComputedStyle(document.documentElement).fontSize || '16') || 16;\n return Number.parseFloat(str) * rem;\n }\n if (str.endsWith('%')) {\n const pct = Number.parseFloat(str);\n const base = document.documentElement.clientHeight || window.innerHeight || 0;\n return (pct / 100) * base;\n }\n const n = Number.parseFloat(str);\n return Number.isFinite(n) ? n : undefined;\n }, []);\n\n // Apply defaultSize on mount when uncontrolled (moved above overlay return)\n React.useEffect(() => {\n if (!localRef.current) return;\n if (typeof (props as any).size === 'undefined' && typeof (props as any).defaultSize !== 'undefined') {\n const px = normalizeToPx((props as any).defaultSize);\n if (typeof px === 'number' && Number.isFinite(px)) {\n const minPx = typeof minSize === 'number' ? minSize : undefined;\n const maxPx = typeof maxSize === 'number' ? maxSize : undefined;\n const clamped = Math.min(maxPx ?? px, Math.max(minPx ?? px, px));\n localRef.current.style.setProperty('--bottom-size', `${clamped}px`);\n emitSizeChange(clamped, { reason: 'init' });\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Controlled size sync (moved above overlay return)\n React.useEffect(() => {\n if (!localRef.current) return;\n if (typeof (props as any).size === 'undefined') return;\n const px = normalizeToPx((props as any).size);\n if (typeof px === 'number' && Number.isFinite(px)) {\n const minPx = typeof minSize === 'number' ? minSize : undefined;\n const maxPx = typeof maxSize === 'number' ? maxSize : undefined;\n const clamped = Math.min(maxPx ?? px, Math.max(minPx ?? px, px));\n localRef.current.style.setProperty('--bottom-size', `${clamped}px`);\n emitSizeChange(clamped, { reason: 'controlled' });\n }\n }, [(props as any).size, minSize, maxSize, normalizeToPx, emitSizeChange]);\n\n if (isOverlay) {\n const open = shell.bottomMode === 'expanded';\n return (\n <Sheet.Root open={open} onOpenChange={(o) => shell.setBottomMode(o ? 'expanded' : 'collapsed')}>\n <Sheet.Content side=\"bottom\" style={{ padding: 0 }} height={{ initial: `${expandedSize}px` }}>\n <VisuallyHidden>\n <Sheet.Title>Bottom panel</Sheet.Title>\n </VisuallyHidden>\n {contentChildren}\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n return (\n <div\n {...bottomDomProps}\n ref={setRef}\n className={classNames('rt-ShellBottom', className)}\n data-mode={shell.bottomMode}\n data-peek={shell.peekTarget === 'bottom' || undefined}\n data-presentation={shell.currentBreakpointReady ? resolvedPresentation : undefined}\n data-open={(shell.currentBreakpointReady && isStacked && isExpanded) || undefined}\n style={{\n ...style,\n ['--bottom-size' as any]: `${expandedSize}px`,\n ['--bottom-min-size' as any]: `${minSize}px`,\n ['--bottom-max-size' as any]: `${maxSize}px`,\n }}\n >\n <div className=\"rt-ShellBottomContent\" data-visible={isExpanded || undefined}>\n {contentChildren}\n </div>\n {handleEl}\n </div>\n );\n },\n) as BottomComponent;\nBottom.displayName = 'Shell.Bottom';\nBottom.Handle = BottomHandle;\n"],
5
+ "mappings": "skBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,YAAAE,IAAA,eAAAC,GAAAH,IAAA,IAAAI,EAAuB,oBACvBC,EAAuB,yBACvBC,EAAuB,0BACvBC,EAA+B,iCAC/BC,EAAyB,+BACzBC,EAA8D,6BAC9DC,EAAkC,6BAClCC,EAAyC,8BACzCC,GAA6B,6BAwCtB,MAAMV,EAASE,EAAM,WAC1B,CACE,CACE,UAAAS,EACA,aAAAC,EAAe,QAGf,YAAAC,EACA,KAAAC,EACA,aAAAC,EACA,aAAAC,EAAe,IACf,QAAAC,EAAU,IACV,QAAAC,EAAU,IACV,UAAAC,EAAY,GACZ,YAAAC,EAAc,GACd,SAAAC,EACA,WAAAC,EACA,SAAAC,EACA,cAAAC,GACA,YAAAC,GACA,WAAAC,GACA,cAAAC,GACA,kBAAAC,GACA,OAAAC,EACA,YAAAC,EACA,SAAAC,GACA,MAAAC,GACA,GAAGC,CACL,EACAC,IACG,CACH,MAAMC,KAAQ,YAAS,EACjBC,KAAuB,6BAA0BxB,CAAY,EAC7DyB,EAAYD,IAAyB,UACrCE,GAAYF,IAAyB,UACrCG,EAAWrC,EAAM,OAA8B,IAAI,EACnDsC,GAAStC,EAAM,YAClBuC,GAAgC,CAC/BF,EAAS,QAAUE,EACf,OAAOP,GAAQ,WAAYA,EAAIO,CAAI,EAC9BP,IAAMA,EAAsD,QAAUO,EACjF,EACA,CAACP,CAAG,CACN,EACMQ,EAAaxC,EAAM,SAAS,QAAQ6B,EAAQ,EAC5CY,EAAiBD,EAAW,OAAQE,GAA2B1C,EAAM,eAAe0C,CAAE,GAAKA,EAAG,OAAS,cAAY,EACnHC,EAAkBH,EAAW,OAAQE,GAA2B,EAAE1C,EAAM,eAAe0C,CAAE,GAAKA,EAAG,OAAS,eAAa,EAGvHE,EAAiB5C,EAA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BAAmBA,EAAM,uBAAyBC,EAAuB,OACzE,YAAYD,EAAM,wBAA0BG,IAAa4B,GAAe,OACxE,MAAO,CACL,GAAGlC,GACF,gBAAyB,GAAGhB,CAAY,KACxC,oBAA6B,GAAGC,CAAO,KACvC,oBAA6B,GAAGC,CAAO,IAC1C,GAEAhB,EAAA,cAAC,OAAI,UAAU,wBAAwB,eAAcgE,GAAc,QAChErB,CACH,EACC4B,EACH,CAEJ,CACF,EACAzE,EAAO,YAAc,eACrBA,EAAO,OAAS",
6
6
  "names": ["shell_bottom_exports", "__export", "Bottom", "__toCommonJS", "React", "import_classnames", "Sheet", "import_visually_hidden", "import_shell_context", "import_shell_hooks", "import_shell_resize", "import_shell_handles", "import_shell_types", "className", "presentation", "defaultOpen", "open", "onOpenChange", "expandedSize", "minSize", "maxSize", "resizable", "collapsible", "onExpand", "onCollapse", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "children", "style", "props", "ref", "shell", "resolvedPresentation", "isOverlay", "isStacked", "localRef", "setRef", "node", "childArray", "handleChildren", "el", "contentChildren", "emitSizeChange", "cb", "strategy", "ms", "t", "s", "meta", "last", "now", "didInitRef", "didInitFromDefaultOpenRef", "resolvedDefaultOpen", "initial", "wasControlledRef", "isControlled", "responsiveNotifiedRef", "resolvedOpen", "shouldExpand", "initNotifiedRef", "lastBottomModeRef", "isExpanded", "persistenceAdapter", "key", "v", "size", "mounted", "loaded", "handleEl", "client", "startClient", "startSize", "delta", "i", "_bottomDefaultOpenIgnored", "_bottomOpenIgnored", "_bottomOnOpenChangeIgnored", "_bottomSizeIgnored", "_bottomDefaultSizeIgnored", "_bottomOnSizeChangeIgnored", "_szu", "_szums", "bottomDomProps", "normalizeToPx", "value", "str", "rem", "pct", "base", "n", "px", "clamped", "o", "classNames"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var _=Object.create;var A=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var ne=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var oe=(e,t)=>{for(var u in t)A(e,u,{get:t[u],enumerable:!0})},K=(e,t,u,H)=>{if(t&&typeof t=="object"||typeof t=="function")for(let p of te(t))!re.call(e,p)&&p!==u&&A(e,p,{get:()=>t[p],enumerable:!(H=ee(t,p))||H.enumerable});return e};var V=(e,t,u)=>(u=e!=null?_(ne(e)):{},K(t||!e||!e.__esModule?A(u,"default",{value:e,enumerable:!0}):u,e)),ae=e=>K(A({},"__esModule",{value:!0}),e);var se={};oe(se,{BottomHandle:()=>O,InspectorHandle:()=>Y,PaneHandle:()=>g,PanelHandle:()=>B,SidebarHandle:()=>X});module.exports=ae(se);var c=V(require("react")),U=V(require("classnames")),q=require("./shell-resize.js");const g=c.forwardRef(({className:e,children:t,...u},H)=>{const{containerRef:p,cssVarName:m,minSize:C,maxSize:M,defaultSize:D,orientation:w,edge:N,computeNext:j,onResize:b,onResizeStart:T,onResizeEnd:P,snapPoints:z,snapTolerance:G,collapseThreshold:k,collapsible:$,target:ie,requestCollapse:J,requestToggle:Q}=(0,q.usePaneResize)(),R=c.useRef(null);c.useEffect(()=>()=>{try{R.current?.()}catch{}R.current=null},[]);const Z=w;return c.createElement("div",{...u,ref:H,className:(0,U.default)("rt-ShellResizer",e),"data-orientation":w,"data-edge":N,role:"slider","aria-orientation":Z,"aria-valuemin":C,"aria-valuemax":M,"aria-valuenow":D,tabIndex:0,onPointerDown:n=>{if(!p.current)return;n.preventDefault();const o=p.current,d=n.currentTarget,x=n.pointerId;try{R.current?.()}catch{}o.setAttribute("data-resizing","");try{d.setPointerCapture(x)}catch{}const L=w==="vertical"?n.clientX:n.clientY,v=parseFloat(getComputedStyle(o).getPropertyValue(m)||`${D}`),y=l=>Math.min(Math.max(l,C),M),a=document.body,r=a.style.cursor,f=a.style.userSelect;a.style.cursor=w==="vertical"?"col-resize":"row-resize",a.style.userSelect="none",T?.(v);const i=l=>{const E=w==="vertical"?l.clientX:l.clientY,S=y(j(E,L,v));o.style.setProperty(m,`${S}px`),d.setAttribute("aria-valuenow",String(S)),b?.(S)},h=()=>{try{d.releasePointerCapture(x)}catch{}window.removeEventListener("pointermove",i),document.removeEventListener("pointermove",i),window.removeEventListener("mousemove",i),document.removeEventListener("mousemove",i),d.removeEventListener("pointermove",i),window.removeEventListener("pointerup",s),document.removeEventListener("pointerup",s),window.removeEventListener("mouseup",s),document.removeEventListener("mouseup",s),window.removeEventListener("pointercancel",s),document.removeEventListener("pointercancel",s),window.removeEventListener("keydown",I),d.removeEventListener("lostpointercapture",s),o.removeAttribute("data-resizing"),a.style.cursor=r,a.style.userSelect=f,R.current=null},s=()=>{const l=parseFloat(getComputedStyle(o).getPropertyValue(m)||`${D}`);let E=l;if(z&&z.length){const S=z.reduce((W,F)=>Math.abs(F-l)<Math.abs(W-l)?F:W,z[0]);Math.abs(S-l)<=(G??8)&&(E=S,o.style.setProperty(m,`${E}px`),d.setAttribute("aria-valuenow",String(E)),b?.(E))}$&&typeof k=="number"&&l<=k&&J?.(),P?.(E),h()},I=l=>{l.key==="Escape"&&(o.style.setProperty(m,`${v}px`),d.setAttribute("aria-valuenow",String(v)),P?.(v),h())};window.addEventListener("pointermove",i),document.addEventListener("pointermove",i),window.addEventListener("mousemove",i),document.addEventListener("mousemove",i),d.addEventListener("pointermove",i),window.addEventListener("pointerup",s),document.addEventListener("pointerup",s),window.addEventListener("mouseup",s),document.addEventListener("mouseup",s),window.addEventListener("pointercancel",s),document.addEventListener("pointercancel",s),window.addEventListener("keydown",I),d.addEventListener("lostpointercapture",s),R.current=h},onDoubleClick:()=>{$&&Q?.()},onKeyDown:n=>{if(!p.current)return;const o=p.current,d=getComputedStyle(o).getPropertyValue(m),x=Number.parseFloat(d.trim()),L=Number.isFinite(x)?x:D,v=r=>Math.min(Math.max(r,C),M),y=n.shiftKey?32:8;let a=0;if(w==="vertical"){const r=typeof document<"u"?document.dir:void 0,f=getComputedStyle(o).direction,i=!!(o.closest&&o.closest('[dir="rtl"]')),h=r==="rtl"||f==="rtl"||i;n.key==="ArrowRight"?a=h?-y:y:n.key==="ArrowLeft"&&(a=h?y:-y)}else n.key==="ArrowDown"?a=y:n.key==="ArrowUp"&&(a=-y);if(n.key==="Home"){n.preventDefault(),T?.(L);const r=v(C);o.style.setProperty(m,`${r}px`),n.currentTarget.setAttribute("aria-valuenow",String(r)),b?.(r),P?.(r);return}if(n.key==="End"){n.preventDefault(),T?.(L);const r=v(M);o.style.setProperty(m,`${r}px`),n.currentTarget.setAttribute("aria-valuenow",String(r)),b?.(r),P?.(r);return}if(a!==0){n.preventDefault(),T?.(L);const r=w==="vertical"&&N==="start"?-a:a,f=v(L+r);o.style.setProperty(m,`${f}px`),n.currentTarget.setAttribute("aria-valuenow",String(f)),b?.(f),P?.(f)}}},t)});g.displayName="Shell.Handle";const B=c.forwardRef((e,t)=>c.createElement(g,{...e,ref:t}));B.displayName="Shell.Panel.Handle";const X=c.forwardRef((e,t)=>c.createElement(g,{...e,ref:t}));X.displayName="Shell.Sidebar.Handle";const Y=c.forwardRef((e,t)=>c.createElement(g,{...e,ref:t}));Y.displayName="Shell.Inspector.Handle";const O=c.forwardRef((e,t)=>c.createElement(g,{...e,ref:t}));O.displayName="Shell.Bottom.Handle";
1
+ "use strict";var Z=Object.create;var A=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var ne=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var oe=(e,t)=>{for(var u in t)A(e,u,{get:t[u],enumerable:!0})},K=(e,t,u,H)=>{if(t&&typeof t=="object"||typeof t=="function")for(let p of te(t))!re.call(e,p)&&p!==u&&A(e,p,{get:()=>t[p],enumerable:!(H=ee(t,p))||H.enumerable});return e};var V=(e,t,u)=>(u=e!=null?Z(ne(e)):{},K(t||!e||!e.__esModule?A(u,"default",{value:e,enumerable:!0}):u,e)),ae=e=>K(A({},"__esModule",{value:!0}),e);var se={};oe(se,{BottomHandle:()=>O,InspectorHandle:()=>Y,PaneHandle:()=>S,PanelHandle:()=>B,SidebarHandle:()=>X});module.exports=ae(se);var c=V(require("react")),U=V(require("classnames")),q=require("./shell-resize.js");const S=c.forwardRef(({className:e,children:t,...u},H)=>{const{containerRef:p,cssVarName:m,minSize:C,maxSize:M,defaultSize:D,orientation:w,edge:N,computeNext:_,onResize:b,onResizeStart:T,onResizeEnd:P,snapPoints:z,snapTolerance:j,collapseThreshold:k,collapsible:$,target:ie,requestCollapse:G,requestToggle:J}=(0,q.usePaneResize)(),R=c.useRef(null);c.useEffect(()=>()=>{try{R.current?.()}catch{}R.current=null},[]);const Q=w;return c.createElement("div",{...u,ref:H,className:(0,U.default)("rt-ShellResizer",e),"data-orientation":w,"data-edge":N,role:"slider","aria-orientation":Q,"aria-valuemin":C,"aria-valuemax":M,"aria-valuenow":D,tabIndex:0,onPointerDown:n=>{if(!p.current)return;n.preventDefault();const o=p.current,d=n.currentTarget,x=n.pointerId;try{R.current?.()}catch{}o.setAttribute("data-resizing","");try{d.setPointerCapture(x)}catch{}const L=w==="vertical"?n.clientX:n.clientY,v=parseFloat(getComputedStyle(o).getPropertyValue(m)||`${D}`),y=l=>Math.min(Math.max(l,C),M),a=document.body,r=a.style.cursor,f=a.style.userSelect;a.style.cursor=w==="vertical"?"col-resize":"row-resize",a.style.userSelect="none",T?.(v);const i=l=>{const E=w==="vertical"?l.clientX:l.clientY,g=y(_(E,L,v));o.style.setProperty(m,`${g}px`),d.setAttribute("aria-valuenow",String(g)),b?.(g)},h=()=>{try{d.releasePointerCapture(x)}catch{}window.removeEventListener("pointermove",i),document.removeEventListener("pointermove",i),window.removeEventListener("mousemove",i),document.removeEventListener("mousemove",i),d.removeEventListener("pointermove",i),window.removeEventListener("pointerup",s),document.removeEventListener("pointerup",s),window.removeEventListener("mouseup",s),document.removeEventListener("mouseup",s),window.removeEventListener("pointercancel",s),document.removeEventListener("pointercancel",s),window.removeEventListener("keydown",I),d.removeEventListener("lostpointercapture",s),o.removeAttribute("data-resizing"),a.style.cursor=r,a.style.userSelect=f,R.current=null},s=()=>{const l=parseFloat(getComputedStyle(o).getPropertyValue(m)||`${D}`);let E=l;if(z&&z.length){const g=z.reduce((W,F)=>Math.abs(F-l)<Math.abs(W-l)?F:W,z[0]);Math.abs(g-l)<=(j??8)&&(E=g,o.style.setProperty(m,`${E}px`),d.setAttribute("aria-valuenow",String(E)),b?.(E))}$&&typeof k=="number"&&l<=k&&G?.(),P?.(E),h()},I=l=>{l.key==="Escape"&&(o.style.setProperty(m,`${v}px`),d.setAttribute("aria-valuenow",String(v)),P?.(v),h())};window.addEventListener("pointermove",i),document.addEventListener("pointermove",i),window.addEventListener("mousemove",i),document.addEventListener("mousemove",i),d.addEventListener("pointermove",i),window.addEventListener("pointerup",s),document.addEventListener("pointerup",s),window.addEventListener("mouseup",s),document.addEventListener("mouseup",s),window.addEventListener("pointercancel",s),document.addEventListener("pointercancel",s),window.addEventListener("keydown",I),d.addEventListener("lostpointercapture",s),R.current=h},onDoubleClick:()=>{$&&J?.()},onKeyDown:n=>{if(!p.current)return;const o=p.current,d=getComputedStyle(o).getPropertyValue(m),x=Number.parseFloat(d.trim()),L=Number.isFinite(x)?x:D,v=r=>Math.min(Math.max(r,C),M),y=n.shiftKey?32:8;let a=0;if(w==="vertical"){const r=typeof document<"u"?document.dir:void 0,f=getComputedStyle(o).direction,i=!!(o.closest&&o.closest('[dir="rtl"]')),h=r==="rtl"||f==="rtl"||i;n.key==="ArrowRight"?a=h?-y:y:n.key==="ArrowLeft"&&(a=h?y:-y)}else n.key==="ArrowDown"?a=y:n.key==="ArrowUp"&&(a=-y);if(n.key==="Home"){n.preventDefault(),T?.(L);const r=v(C);o.style.setProperty(m,`${r}px`),n.currentTarget.setAttribute("aria-valuenow",String(r)),b?.(r),P?.(r);return}if(n.key==="End"){n.preventDefault(),T?.(L);const r=v(M);o.style.setProperty(m,`${r}px`),n.currentTarget.setAttribute("aria-valuenow",String(r)),b?.(r),P?.(r);return}if(a!==0){n.preventDefault(),T?.(L);const r=w==="vertical"&&N==="start"?-a:a,f=v(L+r);o.style.setProperty(m,`${f}px`),n.currentTarget.setAttribute("aria-valuenow",String(f)),b?.(f),P?.(f)}}},t)});S.displayName="Shell.Handle";const B=c.forwardRef((e,t)=>c.createElement(S,{...e,ref:t}));B.displayName="Shell.Panel.Handle";const X=c.forwardRef((e,t)=>c.createElement(S,{...e,ref:t}));X.displayName="Shell.Sidebar.Handle";const Y=c.forwardRef((e,t)=>c.createElement(S,{...e,ref:t}));Y.displayName="Shell.Inspector.Handle";const O=c.forwardRef((e,t)=>c.createElement(S,{...e,ref:t}));O.displayName="Shell.Bottom.Handle";
2
2
  //# sourceMappingURL=shell-handles.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/shell-handles.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { usePaneResize } from './shell-resize.js';\n\nexport const PaneHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(({ className, children, ...props }, ref) => {\n const {\n containerRef,\n cssVarName,\n minSize,\n maxSize,\n defaultSize,\n orientation,\n edge,\n computeNext,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n collapsible,\n target,\n requestCollapse,\n requestToggle,\n } = usePaneResize();\n\n const activeCleanupRef = React.useRef<(() => void) | null>(null);\n React.useEffect(\n () => () => {\n try {\n activeCleanupRef.current?.();\n } catch {}\n activeCleanupRef.current = null;\n },\n [],\n );\n\n const ariaOrientation = orientation;\n\n return (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-ShellResizer', className)}\n data-orientation={orientation}\n data-edge={edge}\n role=\"slider\"\n aria-orientation={ariaOrientation}\n aria-valuemin={minSize}\n aria-valuemax={maxSize}\n aria-valuenow={defaultSize}\n tabIndex={0}\n onPointerDown={(e) => {\n if (!containerRef.current) return;\n e.preventDefault();\n const container = containerRef.current;\n const handleEl = e.currentTarget as HTMLElement;\n const pointerId = e.pointerId;\n try {\n activeCleanupRef.current?.();\n } catch {}\n container.setAttribute('data-resizing', '');\n try {\n handleEl.setPointerCapture(pointerId);\n } catch {}\n const startClient = orientation === 'vertical' ? e.clientX : e.clientY;\n const startSize = parseFloat(getComputedStyle(container).getPropertyValue(cssVarName) || `${defaultSize}`);\n const clamp = (v: number) => Math.min(Math.max(v, minSize), maxSize);\n const body = document.body;\n const prevCursor = body.style.cursor;\n const prevUserSelect = body.style.userSelect;\n body.style.cursor = orientation === 'vertical' ? 'col-resize' : 'row-resize';\n body.style.userSelect = 'none';\n onResizeStart?.(startSize);\n const handleMove = (ev: PointerEvent) => {\n const client = orientation === 'vertical' ? ev.clientX : ev.clientY;\n const next = clamp(computeNext(client, startClient, startSize));\n container.style.setProperty(cssVarName, `${next}px`);\n handleEl.setAttribute('aria-valuenow', String(next));\n onResize?.(next);\n };\n const cleanup = () => {\n try {\n handleEl.releasePointerCapture(pointerId);\n } catch {}\n window.removeEventListener('pointermove', handleMove as any);\n document.removeEventListener('pointermove', handleMove as any);\n window.removeEventListener('mousemove', handleMove as any);\n document.removeEventListener('mousemove', handleMove as any);\n handleEl.removeEventListener('pointermove', handleMove as any);\n window.removeEventListener('pointerup', handleUp as any);\n document.removeEventListener('pointerup', handleUp as any);\n window.removeEventListener('mouseup', handleUp as any);\n document.removeEventListener('mouseup', handleUp as any);\n window.removeEventListener('pointercancel', handleUp as any);\n document.removeEventListener('pointercancel', handleUp as any);\n window.removeEventListener('keydown', handleKey as any);\n handleEl.removeEventListener('lostpointercapture', handleUp as any);\n container.removeAttribute('data-resizing');\n body.style.cursor = prevCursor;\n body.style.userSelect = prevUserSelect;\n activeCleanupRef.current = null;\n };\n const handleUp = () => {\n const finalSize = parseFloat(getComputedStyle(container).getPropertyValue(cssVarName) || `${defaultSize}`);\n let snapped = finalSize;\n if (snapPoints && snapPoints.length) {\n const nearest = snapPoints.reduce((acc, p) => (Math.abs(p - finalSize) < Math.abs(acc - finalSize) ? p : acc), snapPoints[0]);\n if (Math.abs(nearest - finalSize) <= (snapTolerance ?? 8)) {\n snapped = nearest;\n container.style.setProperty(cssVarName, `${snapped}px`);\n handleEl.setAttribute('aria-valuenow', String(snapped));\n onResize?.(snapped);\n }\n }\n if (collapsible && typeof collapseThreshold === 'number' && finalSize <= collapseThreshold) {\n requestCollapse?.();\n }\n onResizeEnd?.(snapped);\n cleanup();\n };\n const handleKey = (kev: KeyboardEvent) => {\n if (kev.key === 'Escape') {\n container.style.setProperty(cssVarName, `${startSize}px`);\n handleEl.setAttribute('aria-valuenow', String(startSize));\n onResizeEnd?.(startSize);\n cleanup();\n }\n };\n window.addEventListener('pointermove', handleMove as any);\n document.addEventListener('pointermove', handleMove as any);\n // Fallbacks for environments that don't fully support PointerEvent on window\n window.addEventListener('mousemove', handleMove as any);\n document.addEventListener('mousemove', handleMove as any);\n handleEl.addEventListener('pointermove', handleMove as any);\n window.addEventListener('pointerup', handleUp as any);\n document.addEventListener('pointerup', handleUp as any);\n window.addEventListener('mouseup', handleUp as any);\n document.addEventListener('mouseup', handleUp as any);\n window.addEventListener('pointercancel', handleUp as any);\n document.addEventListener('pointercancel', handleUp as any);\n window.addEventListener('keydown', handleKey as any);\n handleEl.addEventListener('lostpointercapture', handleUp as any);\n activeCleanupRef.current = cleanup;\n }}\n onDoubleClick={() => {\n if (collapsible) requestToggle?.();\n }}\n onKeyDown={(e) => {\n if (!containerRef.current) return;\n const container = containerRef.current;\n const rawCurrent = getComputedStyle(container).getPropertyValue(cssVarName);\n const parsedCurrent = Number.parseFloat(rawCurrent.trim());\n const current = Number.isFinite(parsedCurrent) ? parsedCurrent : defaultSize;\n const clamp = (v: number) => Math.min(Math.max(v, minSize), maxSize);\n const step = e.shiftKey ? 32 : 8;\n let delta = 0;\n if (orientation === 'vertical') {\n const docDir = typeof document !== 'undefined' ? document.dir : undefined;\n const cssDir = getComputedStyle(container).direction;\n const hasRtlAncestor = !!(container.closest && container.closest('[dir=\"rtl\"]'));\n const isRtl = docDir === 'rtl' || cssDir === 'rtl' || hasRtlAncestor;\n if (e.key === 'ArrowRight')\n delta = isRtl ? -step : step; // inline-end\n else if (e.key === 'ArrowLeft') delta = isRtl ? step : -step; // inline-start\n } else {\n if (e.key === 'ArrowDown') delta = step;\n else if (e.key === 'ArrowUp') delta = -step;\n }\n if (e.key === 'Home') {\n e.preventDefault();\n onResizeStart?.(current);\n const next = clamp(minSize);\n container.style.setProperty(cssVarName, `${next}px`);\n (e.currentTarget as HTMLElement).setAttribute('aria-valuenow', String(next));\n onResize?.(next);\n onResizeEnd?.(next);\n return;\n }\n if (e.key === 'End') {\n e.preventDefault();\n onResizeStart?.(current);\n const next = clamp(maxSize);\n container.style.setProperty(cssVarName, `${next}px`);\n (e.currentTarget as HTMLElement).setAttribute('aria-valuenow', String(next));\n onResize?.(next);\n onResizeEnd?.(next);\n return;\n }\n if (delta !== 0) {\n e.preventDefault();\n onResizeStart?.(current);\n const signedDelta = orientation === 'vertical' ? (edge === 'start' ? -delta : delta) : delta;\n const next = clamp(current + signedDelta);\n container.style.setProperty(cssVarName, `${next}px`);\n (e.currentTarget as HTMLElement).setAttribute('aria-valuenow', String(next));\n onResize?.(next);\n onResizeEnd?.(next);\n }\n }}\n >\n {children}\n </div>\n );\n});\nPaneHandle.displayName = 'Shell.Handle';\n\nexport const PanelHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nPanelHandle.displayName = 'Shell.Panel.Handle';\n\nexport const SidebarHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nSidebarHandle.displayName = 'Shell.Sidebar.Handle';\n\nexport const InspectorHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nInspectorHandle.displayName = 'Shell.Inspector.Handle';\n\nexport const BottomHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nBottomHandle.displayName = 'Shell.Bottom.Handle';\n"],
5
- "mappings": "okBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,kBAAAE,EAAA,oBAAAC,EAAA,eAAAC,EAAA,gBAAAC,EAAA,kBAAAC,IAAA,eAAAC,GAAAP,IAAA,IAAAQ,EAAuB,oBACvBC,EAAuB,yBACvBC,EAA8B,6BAEvB,MAAMN,EAAaI,EAAM,WAAkE,CAAC,CAAE,UAAAG,EAAW,SAAAC,EAAU,GAAGC,CAAM,EAAGC,IAAQ,CAC5I,KAAM,CACJ,aAAAC,EACA,WAAAC,EACA,QAAAC,EACA,QAAAC,EACA,YAAAC,EACA,YAAAC,EACA,KAAAC,EACA,YAAAC,EACA,SAAAC,EACA,cAAAC,EACA,YAAAC,EACA,WAAAC,EACA,cAAAC,EACA,kBAAAC,EACA,YAAAC,EACA,OAAAC,GACA,gBAAAC,EACA,cAAAC,CACF,KAAI,iBAAc,EAEZC,EAAmBzB,EAAM,OAA4B,IAAI,EAC/DA,EAAM,UACJ,IAAM,IAAM,CACV,GAAI,CACFyB,EAAiB,UAAU,CAC7B,MAAQ,CAAC,CACTA,EAAiB,QAAU,IAC7B,EACA,CAAC,CACH,EAEA,MAAMC,EAAkBd,EAExB,OACEZ,EAAA,cAAC,OACE,GAAGK,EACJ,IAAKC,EACL,aAAW,EAAAqB,SAAW,kBAAmBxB,CAAS,EAClD,mBAAkBS,EAClB,YAAWC,EACX,KAAK,SACL,mBAAkBa,EAClB,gBAAejB,EACf,gBAAeC,EACf,gBAAeC,EACf,SAAU,EACV,cAAgBiB,GAAM,CACpB,GAAI,CAACrB,EAAa,QAAS,OAC3BqB,EAAE,eAAe,EACjB,MAAMC,EAAYtB,EAAa,QACzBuB,EAAWF,EAAE,cACbG,EAAYH,EAAE,UACpB,GAAI,CACFH,EAAiB,UAAU,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,IAAQN,EAAA,cAACJ,EAAA,CAAY,GAAGS,EAAO,IAAKC,EAAK,CAAE,EACvJZ,EAAa,YAAc",
6
- "names": ["shell_handles_exports", "__export", "BottomHandle", "InspectorHandle", "PaneHandle", "PanelHandle", "SidebarHandle", "__toCommonJS", "React", "import_classnames", "import_shell_resize", "className", "children", "props", "ref", "containerRef", "cssVarName", "minSize", "maxSize", "defaultSize", "orientation", "edge", "computeNext", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "collapsible", "target", "requestCollapse", "requestToggle", "activeCleanupRef", "ariaOrientation", "classNames", "e", "container", "handleEl", "pointerId", "startClient", "startSize", "clamp", "v", "body", "prevCursor", "prevUserSelect", "handleMove", "ev", "client", "next", "cleanup", "handleUp", "handleKey", "finalSize", "snapped", "nearest", "acc", "p", "kev", "rawCurrent", "parsedCurrent", "current", "step", "delta", "docDir", "cssDir", "hasRtlAncestor", "isRtl", "signedDelta"]
4
+ "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { usePaneResize } from './shell-resize.js';\n\nexport const PaneHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(({ className, children, ...props }, ref) => {\n const {\n containerRef,\n cssVarName,\n minSize,\n maxSize,\n defaultSize,\n orientation,\n edge,\n computeNext,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n collapsible,\n target: _target,\n requestCollapse,\n requestToggle,\n } = usePaneResize();\n\n const activeCleanupRef = React.useRef<(() => void) | null>(null);\n React.useEffect(\n () => () => {\n try {\n activeCleanupRef.current?.();\n } catch {}\n activeCleanupRef.current = null;\n },\n [],\n );\n\n const ariaOrientation = orientation;\n\n return (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-ShellResizer', className)}\n data-orientation={orientation}\n data-edge={edge}\n role=\"slider\"\n aria-orientation={ariaOrientation}\n aria-valuemin={minSize}\n aria-valuemax={maxSize}\n aria-valuenow={defaultSize}\n tabIndex={0}\n onPointerDown={(e) => {\n if (!containerRef.current) return;\n e.preventDefault();\n const container = containerRef.current;\n const handleEl = e.currentTarget as HTMLElement;\n const pointerId = e.pointerId;\n try {\n activeCleanupRef.current?.();\n } catch {}\n container.setAttribute('data-resizing', '');\n try {\n handleEl.setPointerCapture(pointerId);\n } catch {}\n const startClient = orientation === 'vertical' ? e.clientX : e.clientY;\n const startSize = parseFloat(getComputedStyle(container).getPropertyValue(cssVarName) || `${defaultSize}`);\n const clamp = (v: number) => Math.min(Math.max(v, minSize), maxSize);\n const body = document.body;\n const prevCursor = body.style.cursor;\n const prevUserSelect = body.style.userSelect;\n body.style.cursor = orientation === 'vertical' ? 'col-resize' : 'row-resize';\n body.style.userSelect = 'none';\n onResizeStart?.(startSize);\n const handleMove = (ev: PointerEvent) => {\n const client = orientation === 'vertical' ? ev.clientX : ev.clientY;\n const next = clamp(computeNext(client, startClient, startSize));\n container.style.setProperty(cssVarName, `${next}px`);\n handleEl.setAttribute('aria-valuenow', String(next));\n onResize?.(next);\n };\n const cleanup = () => {\n try {\n handleEl.releasePointerCapture(pointerId);\n } catch {}\n window.removeEventListener('pointermove', handleMove as any);\n document.removeEventListener('pointermove', handleMove as any);\n window.removeEventListener('mousemove', handleMove as any);\n document.removeEventListener('mousemove', handleMove as any);\n handleEl.removeEventListener('pointermove', handleMove as any);\n window.removeEventListener('pointerup', handleUp as any);\n document.removeEventListener('pointerup', handleUp as any);\n window.removeEventListener('mouseup', handleUp as any);\n document.removeEventListener('mouseup', handleUp as any);\n window.removeEventListener('pointercancel', handleUp as any);\n document.removeEventListener('pointercancel', handleUp as any);\n window.removeEventListener('keydown', handleKey as any);\n handleEl.removeEventListener('lostpointercapture', handleUp as any);\n container.removeAttribute('data-resizing');\n body.style.cursor = prevCursor;\n body.style.userSelect = prevUserSelect;\n activeCleanupRef.current = null;\n };\n const handleUp = () => {\n const finalSize = parseFloat(getComputedStyle(container).getPropertyValue(cssVarName) || `${defaultSize}`);\n let snapped = finalSize;\n if (snapPoints && snapPoints.length) {\n const nearest = snapPoints.reduce((acc, p) => (Math.abs(p - finalSize) < Math.abs(acc - finalSize) ? p : acc), snapPoints[0]);\n if (Math.abs(nearest - finalSize) <= (snapTolerance ?? 8)) {\n snapped = nearest;\n container.style.setProperty(cssVarName, `${snapped}px`);\n handleEl.setAttribute('aria-valuenow', String(snapped));\n onResize?.(snapped);\n }\n }\n if (collapsible && typeof collapseThreshold === 'number' && finalSize <= collapseThreshold) {\n requestCollapse?.();\n }\n onResizeEnd?.(snapped);\n cleanup();\n };\n const handleKey = (kev: KeyboardEvent) => {\n if (kev.key === 'Escape') {\n container.style.setProperty(cssVarName, `${startSize}px`);\n handleEl.setAttribute('aria-valuenow', String(startSize));\n onResizeEnd?.(startSize);\n cleanup();\n }\n };\n window.addEventListener('pointermove', handleMove as any);\n document.addEventListener('pointermove', handleMove as any);\n // Fallbacks for environments that don't fully support PointerEvent on window\n window.addEventListener('mousemove', handleMove as any);\n document.addEventListener('mousemove', handleMove as any);\n handleEl.addEventListener('pointermove', handleMove as any);\n window.addEventListener('pointerup', handleUp as any);\n document.addEventListener('pointerup', handleUp as any);\n window.addEventListener('mouseup', handleUp as any);\n document.addEventListener('mouseup', handleUp as any);\n window.addEventListener('pointercancel', handleUp as any);\n document.addEventListener('pointercancel', handleUp as any);\n window.addEventListener('keydown', handleKey as any);\n handleEl.addEventListener('lostpointercapture', handleUp as any);\n activeCleanupRef.current = cleanup;\n }}\n onDoubleClick={() => {\n if (collapsible) requestToggle?.();\n }}\n onKeyDown={(e) => {\n if (!containerRef.current) return;\n const container = containerRef.current;\n const rawCurrent = getComputedStyle(container).getPropertyValue(cssVarName);\n const parsedCurrent = Number.parseFloat(rawCurrent.trim());\n const current = Number.isFinite(parsedCurrent) ? parsedCurrent : defaultSize;\n const clamp = (v: number) => Math.min(Math.max(v, minSize), maxSize);\n const step = e.shiftKey ? 32 : 8;\n let delta = 0;\n if (orientation === 'vertical') {\n const docDir = typeof document !== 'undefined' ? document.dir : undefined;\n const cssDir = getComputedStyle(container).direction;\n const hasRtlAncestor = !!(container.closest && container.closest('[dir=\"rtl\"]'));\n const isRtl = docDir === 'rtl' || cssDir === 'rtl' || hasRtlAncestor;\n if (e.key === 'ArrowRight')\n delta = isRtl ? -step : step; // inline-end\n else if (e.key === 'ArrowLeft') delta = isRtl ? step : -step; // inline-start\n } else {\n if (e.key === 'ArrowDown') delta = step;\n else if (e.key === 'ArrowUp') delta = -step;\n }\n if (e.key === 'Home') {\n e.preventDefault();\n onResizeStart?.(current);\n const next = clamp(minSize);\n container.style.setProperty(cssVarName, `${next}px`);\n (e.currentTarget as HTMLElement).setAttribute('aria-valuenow', String(next));\n onResize?.(next);\n onResizeEnd?.(next);\n return;\n }\n if (e.key === 'End') {\n e.preventDefault();\n onResizeStart?.(current);\n const next = clamp(maxSize);\n container.style.setProperty(cssVarName, `${next}px`);\n (e.currentTarget as HTMLElement).setAttribute('aria-valuenow', String(next));\n onResize?.(next);\n onResizeEnd?.(next);\n return;\n }\n if (delta !== 0) {\n e.preventDefault();\n onResizeStart?.(current);\n const signedDelta = orientation === 'vertical' ? (edge === 'start' ? -delta : delta) : delta;\n const next = clamp(current + signedDelta);\n container.style.setProperty(cssVarName, `${next}px`);\n (e.currentTarget as HTMLElement).setAttribute('aria-valuenow', String(next));\n onResize?.(next);\n onResizeEnd?.(next);\n }\n }}\n >\n {children}\n </div>\n );\n});\nPaneHandle.displayName = 'Shell.Handle';\n\nexport const PanelHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nPanelHandle.displayName = 'Shell.Panel.Handle';\n\nexport const SidebarHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nSidebarHandle.displayName = 'Shell.Sidebar.Handle';\n\nexport const InspectorHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nInspectorHandle.displayName = 'Shell.Inspector.Handle';\n\nexport const BottomHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nBottomHandle.displayName = 'Shell.Bottom.Handle';\n"],
5
+ "mappings": "okBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,kBAAAE,EAAA,oBAAAC,EAAA,eAAAC,EAAA,gBAAAC,EAAA,kBAAAC,IAAA,eAAAC,GAAAP,IAAA,IAAAQ,EAAuB,oBACvBC,EAAuB,yBACvBC,EAA8B,6BAEvB,MAAMN,EAAaI,EAAM,WAAkE,CAAC,CAAE,UAAAG,EAAW,SAAAC,EAAU,GAAGC,CAAM,EAAGC,IAAQ,CAC5I,KAAM,CACJ,aAAAC,EACA,WAAAC,EACA,QAAAC,EACA,QAAAC,EACA,YAAAC,EACA,YAAAC,EACA,KAAAC,EACA,YAAAC,EACA,SAAAC,EACA,cAAAC,EACA,YAAAC,EACA,WAAAC,EACA,cAAAC,EACA,kBAAAC,EACA,YAAAC,EACA,OAAQC,GACR,gBAAAC,EACA,cAAAC,CACF,KAAI,iBAAc,EAEZC,EAAmBzB,EAAM,OAA4B,IAAI,EAC/DA,EAAM,UACJ,IAAM,IAAM,CACV,GAAI,CACFyB,EAAiB,UAAU,CAC7B,MAAQ,CAAC,CACTA,EAAiB,QAAU,IAC7B,EACA,CAAC,CACH,EAEA,MAAMC,EAAkBd,EAExB,OACEZ,EAAA,cAAC,OACE,GAAGK,EACJ,IAAKC,EACL,aAAW,EAAAqB,SAAW,kBAAmBxB,CAAS,EAClD,mBAAkBS,EAClB,YAAWC,EACX,KAAK,SACL,mBAAkBa,EAClB,gBAAejB,EACf,gBAAeC,EACf,gBAAeC,EACf,SAAU,EACV,cAAgBiB,GAAM,CACpB,GAAI,CAACrB,EAAa,QAAS,OAC3BqB,EAAE,eAAe,EACjB,MAAMC,EAAYtB,E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,CAAE,EAC1JX,EAAgB,YAAc,yBAEvB,MAAMD,EAAeM,EAAM,WAAkE,CAACK,EAAOC,IAAQN,EAAA,cAACJ,EAAA,CAAY,GAAGS,EAAO,IAAKC,EAAK,CAAE,EACvJZ,EAAa,YAAc",
6
+ "names": ["shell_handles_exports", "__export", "BottomHandle", "InspectorHandle", "PaneHandle", "PanelHandle", "SidebarHandle", "__toCommonJS", "React", "import_classnames", "import_shell_resize", "className", "children", "props", "ref", "containerRef", "cssVarName", "minSize", "maxSize", "defaultSize", "orientation", "edge", "computeNext", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "collapsible", "_target", "requestCollapse", "requestToggle", "activeCleanupRef", "ariaOrientation", "classNames", "e", "container", "handleEl", "pointerId", "startClient", "startSize", "clamp", "v", "body", "prevCursor", "prevUserSelect", "handleMove", "ev", "client", "next", "cleanup", "handleUp", "handleKey", "finalSize", "snapped", "nearest", "acc", "p", "kev", "rawCurrent", "parsedCurrent", "current", "step", "delta", "docDir", "cssDir", "hasRtlAncestor", "isRtl", "signedDelta"]
7
7
  }