@kushagradhawan/kookie-ui 0.1.57 → 0.1.59

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 (57) hide show
  1. package/components.css +33 -33
  2. package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
  3. package/dist/cjs/components/_internal/shell-bottom.js +1 -1
  4. package/dist/cjs/components/_internal/shell-bottom.js.map +3 -3
  5. package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
  6. package/dist/cjs/components/_internal/shell-inspector.js +1 -1
  7. package/dist/cjs/components/_internal/shell-inspector.js.map +3 -3
  8. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  9. package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
  10. package/dist/cjs/components/chatbar.d.ts.map +1 -1
  11. package/dist/cjs/components/chatbar.js.map +2 -2
  12. package/dist/cjs/components/icons.d.ts +1 -1
  13. package/dist/cjs/components/icons.d.ts.map +1 -1
  14. package/dist/cjs/components/icons.js.map +2 -2
  15. package/dist/cjs/components/schemas/shell.schema.d.ts +2 -2
  16. package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
  17. package/dist/cjs/components/schemas/shell.schema.js +1 -1
  18. package/dist/cjs/components/schemas/shell.schema.js.map +3 -3
  19. package/dist/cjs/components/shell.d.ts.map +1 -1
  20. package/dist/cjs/components/shell.js +1 -1
  21. package/dist/cjs/components/shell.js.map +3 -3
  22. package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
  23. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  24. package/dist/esm/components/_internal/shell-bottom.js.map +3 -3
  25. package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
  26. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  27. package/dist/esm/components/_internal/shell-inspector.js.map +3 -3
  28. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  29. package/dist/esm/components/_internal/shell-sidebar.js.map +3 -3
  30. package/dist/esm/components/chatbar.d.ts.map +1 -1
  31. package/dist/esm/components/chatbar.js.map +2 -2
  32. package/dist/esm/components/icons.d.ts +1 -1
  33. package/dist/esm/components/icons.d.ts.map +1 -1
  34. package/dist/esm/components/icons.js.map +2 -2
  35. package/dist/esm/components/schemas/shell.schema.d.ts +2 -2
  36. package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
  37. package/dist/esm/components/schemas/shell.schema.js.map +3 -3
  38. package/dist/esm/components/shell.d.ts.map +1 -1
  39. package/dist/esm/components/shell.js +1 -1
  40. package/dist/esm/components/shell.js.map +3 -3
  41. package/package.json +1 -1
  42. package/schemas/base-button.json +1 -1
  43. package/schemas/button.json +1 -1
  44. package/schemas/icon-button.json +1 -1
  45. package/schemas/index.json +6 -6
  46. package/schemas/toggle-button.json +1 -1
  47. package/schemas/toggle-icon-button.json +1 -1
  48. package/src/components/_internal/shell-bottom.tsx +14 -13
  49. package/src/components/_internal/shell-inspector.tsx +13 -11
  50. package/src/components/_internal/shell-sidebar.tsx +12 -12
  51. package/src/components/callout.css +5 -5
  52. package/src/components/chatbar.css +3 -3
  53. package/src/components/chatbar.tsx +0 -1
  54. package/src/components/icons.tsx +19 -87
  55. package/src/components/schemas/shell.schema.ts +10 -33
  56. package/src/components/shell.tsx +32 -24
  57. package/styles.css +33 -33
package/components.css CHANGED
@@ -4666,7 +4666,7 @@
4666
4666
  -moz-column-gap: var(--space-2);
4667
4667
  column-gap: var(--space-2);
4668
4668
  padding: var(--space-3);
4669
- --callout-border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
4669
+ --callout-border-radius: max(var(--radius-1), var(--radius-full));
4670
4670
  --callout-icon-height: var(--line-height-1);
4671
4671
  --callout-icon-size: var(--content-icon-size-1);
4672
4672
  }
@@ -4675,7 +4675,7 @@
4675
4675
  -moz-column-gap: var(--space-3);
4676
4676
  column-gap: var(--space-3);
4677
4677
  padding: var(--space-4);
4678
- --callout-border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
4678
+ --callout-border-radius: max(var(--radius-2), var(--radius-full));
4679
4679
  --callout-icon-height: var(--line-height-2);
4680
4680
  --callout-icon-size: var(--content-icon-size-2);
4681
4681
  }
@@ -4684,7 +4684,7 @@
4684
4684
  -moz-column-gap: var(--space-4);
4685
4685
  column-gap: var(--space-4);
4686
4686
  padding: var(--space-5);
4687
- --callout-border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
4687
+ --callout-border-radius: max(var(--radius-3), var(--radius-full));
4688
4688
  --callout-icon-height: var(--line-height-3);
4689
4689
  --callout-icon-size: var(--content-icon-size-3);
4690
4690
  }
@@ -4693,7 +4693,7 @@
4693
4693
  -moz-column-gap: var(--space-5);
4694
4694
  column-gap: var(--space-5);
4695
4695
  padding: var(--space-6);
4696
- --callout-border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
4696
+ --callout-border-radius: max(var(--radius-4), var(--radius-full));
4697
4697
  --callout-icon-height: var(--line-height-4);
4698
4698
  --callout-icon-size: var(--content-icon-size-4);
4699
4699
  }
@@ -4702,7 +4702,7 @@
4702
4702
  -moz-column-gap: var(--space-6);
4703
4703
  column-gap: var(--space-6);
4704
4704
  padding: var(--space-7);
4705
- --callout-border-radius: min(var(--radius-9), calc(var(--radius-5) + var(--space-5)));
4705
+ --callout-border-radius: max(var(--radius-5), var(--radius-full));
4706
4706
  --callout-icon-height: var(--line-height-5);
4707
4707
  --callout-icon-size: var(--content-icon-size-5);
4708
4708
  }
@@ -4712,7 +4712,7 @@
4712
4712
  -moz-column-gap: var(--space-2);
4713
4713
  column-gap: var(--space-2);
4714
4714
  padding: var(--space-3);
4715
- --callout-border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
4715
+ --callout-border-radius: max(var(--radius-1), var(--radius-full));
4716
4716
  --callout-icon-height: var(--line-height-1);
4717
4717
  --callout-icon-size: var(--content-icon-size-1);
4718
4718
  }
@@ -4721,7 +4721,7 @@
4721
4721
  -moz-column-gap: var(--space-3);
4722
4722
  column-gap: var(--space-3);
4723
4723
  padding: var(--space-4);
4724
- --callout-border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
4724
+ --callout-border-radius: max(var(--radius-2), var(--radius-full));
4725
4725
  --callout-icon-height: var(--line-height-2);
4726
4726
  --callout-icon-size: var(--content-icon-size-2);
4727
4727
  }
@@ -4730,7 +4730,7 @@
4730
4730
  -moz-column-gap: var(--space-4);
4731
4731
  column-gap: var(--space-4);
4732
4732
  padding: var(--space-5);
4733
- --callout-border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
4733
+ --callout-border-radius: max(var(--radius-3), var(--radius-full));
4734
4734
  --callout-icon-height: var(--line-height-3);
4735
4735
  --callout-icon-size: var(--content-icon-size-3);
4736
4736
  }
@@ -4739,7 +4739,7 @@
4739
4739
  -moz-column-gap: var(--space-5);
4740
4740
  column-gap: var(--space-5);
4741
4741
  padding: var(--space-6);
4742
- --callout-border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
4742
+ --callout-border-radius: max(var(--radius-4), var(--radius-full));
4743
4743
  --callout-icon-height: var(--line-height-4);
4744
4744
  --callout-icon-size: var(--content-icon-size-4);
4745
4745
  }
@@ -4748,7 +4748,7 @@
4748
4748
  -moz-column-gap: var(--space-6);
4749
4749
  column-gap: var(--space-6);
4750
4750
  padding: var(--space-7);
4751
- --callout-border-radius: min(var(--radius-9), calc(var(--radius-5) + var(--space-5)));
4751
+ --callout-border-radius: max(var(--radius-5), var(--radius-full));
4752
4752
  --callout-icon-height: var(--line-height-5);
4753
4753
  --callout-icon-size: var(--content-icon-size-5);
4754
4754
  }
@@ -4759,7 +4759,7 @@
4759
4759
  -moz-column-gap: var(--space-2);
4760
4760
  column-gap: var(--space-2);
4761
4761
  padding: var(--space-3);
4762
- --callout-border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
4762
+ --callout-border-radius: max(var(--radius-1), var(--radius-full));
4763
4763
  --callout-icon-height: var(--line-height-1);
4764
4764
  --callout-icon-size: var(--content-icon-size-1);
4765
4765
  }
@@ -4768,7 +4768,7 @@
4768
4768
  -moz-column-gap: var(--space-3);
4769
4769
  column-gap: var(--space-3);
4770
4770
  padding: var(--space-4);
4771
- --callout-border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
4771
+ --callout-border-radius: max(var(--radius-2), var(--radius-full));
4772
4772
  --callout-icon-height: var(--line-height-2);
4773
4773
  --callout-icon-size: var(--content-icon-size-2);
4774
4774
  }
@@ -4777,7 +4777,7 @@
4777
4777
  -moz-column-gap: var(--space-4);
4778
4778
  column-gap: var(--space-4);
4779
4779
  padding: var(--space-5);
4780
- --callout-border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
4780
+ --callout-border-radius: max(var(--radius-3), var(--radius-full));
4781
4781
  --callout-icon-height: var(--line-height-3);
4782
4782
  --callout-icon-size: var(--content-icon-size-3);
4783
4783
  }
@@ -4786,7 +4786,7 @@
4786
4786
  -moz-column-gap: var(--space-5);
4787
4787
  column-gap: var(--space-5);
4788
4788
  padding: var(--space-6);
4789
- --callout-border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
4789
+ --callout-border-radius: max(var(--radius-4), var(--radius-full));
4790
4790
  --callout-icon-height: var(--line-height-4);
4791
4791
  --callout-icon-size: var(--content-icon-size-4);
4792
4792
  }
@@ -4795,7 +4795,7 @@
4795
4795
  -moz-column-gap: var(--space-6);
4796
4796
  column-gap: var(--space-6);
4797
4797
  padding: var(--space-7);
4798
- --callout-border-radius: min(var(--radius-9), calc(var(--radius-5) + var(--space-5)));
4798
+ --callout-border-radius: max(var(--radius-5), var(--radius-full));
4799
4799
  --callout-icon-height: var(--line-height-5);
4800
4800
  --callout-icon-size: var(--content-icon-size-5);
4801
4801
  }
@@ -4806,7 +4806,7 @@
4806
4806
  -moz-column-gap: var(--space-2);
4807
4807
  column-gap: var(--space-2);
4808
4808
  padding: var(--space-3);
4809
- --callout-border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
4809
+ --callout-border-radius: max(var(--radius-1), var(--radius-full));
4810
4810
  --callout-icon-height: var(--line-height-1);
4811
4811
  --callout-icon-size: var(--content-icon-size-1);
4812
4812
  }
@@ -4815,7 +4815,7 @@
4815
4815
  -moz-column-gap: var(--space-3);
4816
4816
  column-gap: var(--space-3);
4817
4817
  padding: var(--space-4);
4818
- --callout-border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
4818
+ --callout-border-radius: max(var(--radius-2), var(--radius-full));
4819
4819
  --callout-icon-height: var(--line-height-2);
4820
4820
  --callout-icon-size: var(--content-icon-size-2);
4821
4821
  }
@@ -4824,7 +4824,7 @@
4824
4824
  -moz-column-gap: var(--space-4);
4825
4825
  column-gap: var(--space-4);
4826
4826
  padding: var(--space-5);
4827
- --callout-border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
4827
+ --callout-border-radius: max(var(--radius-3), var(--radius-full));
4828
4828
  --callout-icon-height: var(--line-height-3);
4829
4829
  --callout-icon-size: var(--content-icon-size-3);
4830
4830
  }
@@ -4833,7 +4833,7 @@
4833
4833
  -moz-column-gap: var(--space-5);
4834
4834
  column-gap: var(--space-5);
4835
4835
  padding: var(--space-6);
4836
- --callout-border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
4836
+ --callout-border-radius: max(var(--radius-4), var(--radius-full));
4837
4837
  --callout-icon-height: var(--line-height-4);
4838
4838
  --callout-icon-size: var(--content-icon-size-4);
4839
4839
  }
@@ -4842,7 +4842,7 @@
4842
4842
  -moz-column-gap: var(--space-6);
4843
4843
  column-gap: var(--space-6);
4844
4844
  padding: var(--space-7);
4845
- --callout-border-radius: min(var(--radius-9), calc(var(--radius-5) + var(--space-5)));
4845
+ --callout-border-radius: max(var(--radius-5), var(--radius-full));
4846
4846
  --callout-icon-height: var(--line-height-5);
4847
4847
  --callout-icon-size: var(--content-icon-size-5);
4848
4848
  }
@@ -4853,7 +4853,7 @@
4853
4853
  -moz-column-gap: var(--space-2);
4854
4854
  column-gap: var(--space-2);
4855
4855
  padding: var(--space-3);
4856
- --callout-border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
4856
+ --callout-border-radius: max(var(--radius-1), var(--radius-full));
4857
4857
  --callout-icon-height: var(--line-height-1);
4858
4858
  --callout-icon-size: var(--content-icon-size-1);
4859
4859
  }
@@ -4862,7 +4862,7 @@
4862
4862
  -moz-column-gap: var(--space-3);
4863
4863
  column-gap: var(--space-3);
4864
4864
  padding: var(--space-4);
4865
- --callout-border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
4865
+ --callout-border-radius: max(var(--radius-2), var(--radius-full));
4866
4866
  --callout-icon-height: var(--line-height-2);
4867
4867
  --callout-icon-size: var(--content-icon-size-2);
4868
4868
  }
@@ -4871,7 +4871,7 @@
4871
4871
  -moz-column-gap: var(--space-4);
4872
4872
  column-gap: var(--space-4);
4873
4873
  padding: var(--space-5);
4874
- --callout-border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
4874
+ --callout-border-radius: max(var(--radius-3), var(--radius-full));
4875
4875
  --callout-icon-height: var(--line-height-3);
4876
4876
  --callout-icon-size: var(--content-icon-size-3);
4877
4877
  }
@@ -4880,7 +4880,7 @@
4880
4880
  -moz-column-gap: var(--space-5);
4881
4881
  column-gap: var(--space-5);
4882
4882
  padding: var(--space-6);
4883
- --callout-border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
4883
+ --callout-border-radius: max(var(--radius-4), var(--radius-full));
4884
4884
  --callout-icon-height: var(--line-height-4);
4885
4885
  --callout-icon-size: var(--content-icon-size-4);
4886
4886
  }
@@ -4889,7 +4889,7 @@
4889
4889
  -moz-column-gap: var(--space-6);
4890
4890
  column-gap: var(--space-6);
4891
4891
  padding: var(--space-7);
4892
- --callout-border-radius: min(var(--radius-9), calc(var(--radius-5) + var(--space-5)));
4892
+ --callout-border-radius: max(var(--radius-5), var(--radius-full));
4893
4893
  --callout-icon-height: var(--line-height-5);
4894
4894
  --callout-icon-size: var(--content-icon-size-5);
4895
4895
  }
@@ -4900,7 +4900,7 @@
4900
4900
  -moz-column-gap: var(--space-2);
4901
4901
  column-gap: var(--space-2);
4902
4902
  padding: var(--space-3);
4903
- --callout-border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
4903
+ --callout-border-radius: max(var(--radius-1), var(--radius-full));
4904
4904
  --callout-icon-height: var(--line-height-1);
4905
4905
  --callout-icon-size: var(--content-icon-size-1);
4906
4906
  }
@@ -4909,7 +4909,7 @@
4909
4909
  -moz-column-gap: var(--space-3);
4910
4910
  column-gap: var(--space-3);
4911
4911
  padding: var(--space-4);
4912
- --callout-border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
4912
+ --callout-border-radius: max(var(--radius-2), var(--radius-full));
4913
4913
  --callout-icon-height: var(--line-height-2);
4914
4914
  --callout-icon-size: var(--content-icon-size-2);
4915
4915
  }
@@ -4918,7 +4918,7 @@
4918
4918
  -moz-column-gap: var(--space-4);
4919
4919
  column-gap: var(--space-4);
4920
4920
  padding: var(--space-5);
4921
- --callout-border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
4921
+ --callout-border-radius: max(var(--radius-3), var(--radius-full));
4922
4922
  --callout-icon-height: var(--line-height-3);
4923
4923
  --callout-icon-size: var(--content-icon-size-3);
4924
4924
  }
@@ -4927,7 +4927,7 @@
4927
4927
  -moz-column-gap: var(--space-5);
4928
4928
  column-gap: var(--space-5);
4929
4929
  padding: var(--space-6);
4930
- --callout-border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
4930
+ --callout-border-radius: max(var(--radius-4), var(--radius-full));
4931
4931
  --callout-icon-height: var(--line-height-4);
4932
4932
  --callout-icon-size: var(--content-icon-size-4);
4933
4933
  }
@@ -4936,7 +4936,7 @@
4936
4936
  -moz-column-gap: var(--space-6);
4937
4937
  column-gap: var(--space-6);
4938
4938
  padding: var(--space-7);
4939
- --callout-border-radius: min(var(--radius-9), calc(var(--radius-5) + var(--space-5)));
4939
+ --callout-border-radius: max(var(--radius-5), var(--radius-full));
4940
4940
  --callout-icon-height: var(--line-height-5);
4941
4941
  --callout-icon-size: var(--content-icon-size-5);
4942
4942
  }
@@ -19997,7 +19997,7 @@
19997
19997
  }
19998
19998
  .rt-ChatbarBox:where(.rt-variant-outline) {
19999
19999
  --text-area-selection-color: var(--focus-a5);
20000
- --text-area-focus-color: var(--focus-8);
20000
+ --text-area-focus-color: var(--focus-9);
20001
20001
  --text-area-border-width: 1px;
20002
20002
  box-shadow: inset 0 0 0 1px var(--accent-6);
20003
20003
  transition: var(--transition-background-blur);
@@ -20023,7 +20023,7 @@
20023
20023
  }
20024
20024
  .rt-ChatbarBox:where(.rt-variant-classic) {
20025
20025
  --text-area-selection-color: var(--focus-a5);
20026
- --text-area-focus-color: var(--focus-8);
20026
+ --text-area-focus-color: var(--focus-9);
20027
20027
  --text-area-border-width: 0px;
20028
20028
  background-color: var(--color-surface-solid);
20029
20029
  box-shadow: var(--shadow-2);
@@ -20039,7 +20039,7 @@
20039
20039
  }
20040
20040
  }
20041
20041
  .rt-ChatbarBox:where(.rt-variant-classic):where(:focus-within) {
20042
- box-shadow: var(--shadow-2), 0 0 0 2px var(--focus-8);
20042
+ box-shadow: var(--shadow-2), 0 0 0 2px var(--focus-9);
20043
20043
  }
20044
20044
  .rt-ChatbarBox:where(.rt-variant-soft) {
20045
20045
  --text-area-selection-color: var(--accent-a5);
@@ -1 +1 @@
1
- {"version":3,"file":"shell-bottom.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/shell-bottom.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,YAAY,EAAc,MAAM,oBAAoB,CAAC;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAY,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3G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AAW,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAC3I,KAAK,yBAAyB,GAAG;IAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAChF,KAAK,2BAA2B,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AACnF,KAAK,oBAAoB,GAAG;IAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAA;CAAE,CAAC;AACzE,KAAK,iBAAiB,GAAG,SAAS,GAChC,CAAC,qBAAqB,GAAG,uBAAuB,CAAC,GACjD,CAAC,yBAAyB,GAAG,2BAA2B,CAAC,GAAG;IAC1D,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAClE,UAAU,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEJ,KAAK,eAAe,GAAG,KAAK,CAAC,yBAAyB,CAAC,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,GAAG;IAAE,MAAM,EAAE,OAAO,YAAY,CAAA;CAAE,CAAC;AAElJ,eAAO,MAAM,MAAM,EAwUd,eAAe,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";var fe=Object.create;var C=Object.defineProperty;var ce=Object.getOwnPropertyDescriptor;var pe=Object.getOwnPropertyNames;var be=Object.getPrototypeOf,ye=Object.prototype.hasOwnProperty;var he=(s,l)=>{for(var i in l)C(s,i,{get:l[i],enumerable:!0})},G=(s,l,i,a)=>{if(l&&typeof l=="object"||typeof l=="function")for(let m of pe(l))!ye.call(s,m)&&m!==i&&C(s,m,{get:()=>l[m],enumerable:!(a=ce(l,m))||a.enumerable});return s};var H=(s,l,i)=>(i=s!=null?fe(be(s)):{},G(l||!s||!s.__esModule?C(i,"default",{value:s,enumerable:!0}):i,s)),ze=s=>G(C({},"__esModule",{value:!0}),s);var Pe={};he(Pe,{Bottom:()=>F});module.exports=ze(Pe);var t=H(require("react")),J=H(require("classnames")),U=H(require("../sheet.js")),Q=require("../visually-hidden.js"),X=require("../shell.context.js"),z=require("../shell.hooks.js"),Y=require("./shell-resize.js"),y=require("./shell-handles.js"),Ne=require("../shell.types.js");const F=t.forwardRef(({className:s,presentation:l="fixed",defaultOpen:i,open:a,onOpenChange:m,expandedSize:R=200,minSize:c=100,maxSize:p=400,resizable:S=!1,collapsible:Z=!0,onExpand:I,onCollapse:_,onResize:v,onResizeStart:ee,onResizeEnd:te,snapPoints:ne,snapTolerance:oe,collapseThreshold:re,paneId:x,persistence:E,children:se,style:ie,...u},h)=>{const o=(0,X.useShell)(),N=(0,z.useResponsivePresentation)(l),P=N==="overlay",ae=N==="stacked",f=t.useRef(null),de=t.useCallback(e=>{f.current=e,typeof h=="function"?h(e):h&&(h.current=e)},[h]),$=t.Children.toArray(se),V=$.filter(e=>t.isValidElement(e)&&e.type===y.BottomHandle),A=$.filter(e=>!(t.isValidElement(e)&&e.type===y.BottomHandle)),g=t.useMemo(()=>{const e=u.onSizeChange,n=u.sizeUpdate,d=u.sizeUpdateMs??50;if(!e)return()=>{};if(n==="debounce"){let r=null;return(b,D)=>{r&&clearTimeout(r),r=setTimeout(()=>{e(b,D)},d)}}if(n==="throttle"){let r=0;return(b,D)=>{const K=Date.now();K-r>=d&&(r=K,e(b,D))}}return(r,b)=>e(r,b)},[u.onSizeChange,u.sizeUpdate,u.sizeUpdateMs]),L=t.useRef(!1),le=t.useRef(!1),W=(0,z.useResponsiveValue)(i);t.useEffect(()=>{if(!L.current&&o.currentBreakpointReady&&(L.current=!0,typeof a>"u"&&typeof i<"u")){const e=!!W;o.setBottomMode(e?"expanded":"collapsed"),le.current=!0}},[o.currentBreakpointReady,a,i,W]);const B=t.useRef(null);t.useEffect(()=>{const e=typeof a<"u";if(B.current===null){B.current=e;return}B.current!==e&&(console.warn("Shell.Bottom: Switching between controlled and uncontrolled `open` is not supported."),B.current=e)},[a]),t.useEffect(()=>{typeof a>"u"||o.setBottomMode(a?"expanded":"collapsed")},[a]);const j=t.useRef(!1),w=(0,z.useResponsiveValue)(a);t.useEffect(()=>{if(typeof w>"u")return;const e=!!w;o.setBottomMode(e?"expanded":"collapsed")},[w]);const q=t.useRef(!1),O=t.useRef(null);t.useEffect(()=>{!q.current&&typeof a>"u"&&i&&o.bottomMode==="expanded"&&(m?.(!0,{reason:"init"}),q.current=!0),typeof a>"u"&&(O.current!==null&&O.current!==o.bottomMode&&(j.current||m?.(o.bottomMode==="expanded",{reason:"toggle"}),j.current=!1),O.current=o.bottomMode)},[o.bottomMode,a,i,m]),t.useEffect(()=>{o.bottomMode==="expanded"?I?.():_?.()},[o.bottomMode,I,_]);const k=o.bottomMode==="expanded",M=t.useMemo(()=>{if(!x||E)return E;const e=`kookie-ui:shell:bottom:${x}`;return{load:()=>{if(typeof window>"u")return;const d=window.localStorage.getItem(e);return d?Number(d):void 0},save:d=>{typeof window>"u"||window.localStorage.setItem(e,String(d))}}},[x,E]);t.useEffect(()=>{let e=!0;return(async()=>{if(!S||!M?.load||P)return;const n=await M.load();e&&typeof n=="number"&&f.current&&(f.current.style.setProperty("--bottom-size",`${n}px`),v?.(n))})(),()=>{e=!1}},[S,M,v,P]);const ue=S&&!P&&k?t.createElement(Y.PaneResizeContext.Provider,{value:{containerRef:f,cssVarName:"--bottom-size",minSize:c,maxSize:p,defaultSize:R,orientation:"horizontal",edge:"start",computeNext:(e,n,d)=>{const r=e-n;return d-r},onResize:v,onResizeStart:ee,onResizeEnd:e=>{te?.(e),g(e,{reason:"resize"}),M?.save?.(e)},target:"bottom",collapsible:Z,snapPoints:ne,snapTolerance:oe??8,collapseThreshold:re,requestCollapse:()=>o.setBottomMode("collapsed"),requestToggle:()=>o.togglePane("bottom")}},V.length>0?V.map((e,n)=>t.cloneElement(e,{key:e.key??n})):t.createElement(y.PaneHandle,null)):null,{defaultOpen:ge,open:Be,onOpenChange:Me,size:Ce,defaultSize:Re,onSizeChange:Se,sizeUpdate:ve,sizeUpdateMs:xe,...me}=u,T=t.useCallback(e=>{if(e==null)return;if(typeof e=="number"&&Number.isFinite(e))return e;const n=String(e).trim();if(!n)return;if(n.endsWith("px"))return Number.parseFloat(n);if(n.endsWith("rem")){const r=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||"16")||16;return Number.parseFloat(n)*r}if(n.endsWith("%")){const r=Number.parseFloat(n),b=document.documentElement.clientHeight||window.innerHeight||0;return r/100*b}const d=Number.parseFloat(n);return Number.isFinite(d)?d:void 0},[]);if(t.useEffect(()=>{if(f.current&&typeof u.size>"u"&&typeof u.defaultSize<"u"){const e=T(u.defaultSize);if(typeof e=="number"&&Number.isFinite(e)){const r=Math.min((typeof p=="number"?p:void 0)??e,Math.max((typeof c=="number"?c:void 0)??e,e));f.current.style.setProperty("--bottom-size",`${r}px`),g(r,{reason:"init"})}}},[]),t.useEffect(()=>{if(!f.current||typeof u.size>"u")return;const e=T(u.size);if(typeof e=="number"&&Number.isFinite(e)){const r=Math.min((typeof p=="number"?p:void 0)??e,Math.max((typeof c=="number"?c:void 0)??e,e));f.current.style.setProperty("--bottom-size",`${r}px`),g(r,{reason:"controlled"})}},[u.size,c,p,T,g]),P){const e=o.bottomMode==="expanded";return t.createElement(U.Root,{open:e,onOpenChange:n=>o.setBottomMode(n?"expanded":"collapsed")},t.createElement(U.Content,{side:"bottom",style:{padding:0},height:{initial:`${R}px`}},t.createElement(Q.VisuallyHidden,null,t.createElement(U.Title,null,"Bottom panel")),A))}return t.createElement("div",{...me,ref:de,className:(0,J.default)("rt-ShellBottom",s),"data-mode":o.bottomMode,"data-peek":o.peekTarget==="bottom"||void 0,"data-presentation":o.currentBreakpointReady?N:void 0,"data-open":o.currentBreakpointReady&&ae&&k||void 0,style:{...ie,"--bottom-size":`${R}px`,"--bottom-min-size":`${c}px`,"--bottom-max-size":`${p}px`}},t.createElement("div",{className:"rt-ShellBottomContent","data-visible":k||void 0},A),ue)});F.displayName="Shell.Bottom",F.Handle=y.BottomHandle;
1
+ "use strict";var ye=Object.create;var C=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var Pe=Object.getPrototypeOf,ge=Object.prototype.hasOwnProperty;var Be=(s,l)=>{for(var i in l)C(s,i,{get:l[i],enumerable:!0})},Y=(s,l,i,a)=>{if(l&&typeof l=="object"||typeof l=="function")for(let u of ze(l))!ge.call(s,u)&&u!==i&&C(s,u,{get:()=>l[u],enumerable:!(a=he(l,u))||a.enumerable});return s};var U=(s,l,i)=>(i=s!=null?ye(Pe(s)):{},Y(l||!s||!s.__esModule?C(i,"default",{value:s,enumerable:!0}):i,s)),Me=s=>Y(C({},"__esModule",{value:!0}),s);var Ce={};Be(Ce,{Bottom:()=>I});module.exports=Me(Ce);var t=U(require("react")),Z=U(require("classnames")),F=U(require("../sheet.js")),ee=require("../visually-hidden.js"),te=require("../shell.context.js"),z=require("../shell.hooks.js"),oe=require("./shell-resize.js"),y=require("./shell-handles.js"),Te=require("../shell.types.js");const I=t.forwardRef(({className:s,presentation:l="fixed",defaultOpen:i,open:a,onOpenChange:u,expandedSize:R=200,minSize:c=100,maxSize:p=400,resizable:S=!1,collapsible:ne=!0,onExpand:_,onCollapse:$,onResize:v,onResizeStart:re,onResizeEnd:se,snapPoints:ie,snapTolerance:ae,collapseThreshold:de,paneId:x,persistence:E,children:le,style:ue,...m},h)=>{const n=(0,te.useShell)(),N=(0,z.useResponsivePresentation)(l),P=N==="overlay",me=N==="stacked",f=t.useRef(null),fe=t.useCallback(e=>{f.current=e,typeof h=="function"?h(e):h&&(h.current=e)},[h]),V=t.Children.toArray(le),A=V.filter(e=>t.isValidElement(e)&&e.type===y.BottomHandle),L=V.filter(e=>!(t.isValidElement(e)&&e.type===y.BottomHandle)),W=m.onSizeChange,j=m.sizeUpdate,q=m.sizeUpdateMs,g=t.useMemo(()=>{const e=W,o=j,d=q??50;if(!e)return()=>{};if(o==="debounce"){let r=null;return(b,H)=>{r&&clearTimeout(r),r=setTimeout(()=>{e(b,H)},d)}}if(o==="throttle"){let r=0;return(b,H)=>{const X=Date.now();X-r>=d&&(r=X,e(b,H))}}return(r,b)=>e(r,b)},[W,j,q]),K=t.useRef(!1),ce=t.useRef(!1),G=(0,z.useResponsiveValue)(i);t.useEffect(()=>{if(!K.current&&n.currentBreakpointReady&&(K.current=!0,typeof a>"u"&&typeof i<"u")){const e=!!G;n.setBottomMode(e?"expanded":"collapsed"),ce.current=!0}},[n,a,i,G]);const B=t.useRef(null);t.useEffect(()=>{const e=typeof a<"u";if(B.current===null){B.current=e;return}B.current!==e&&(console.warn("Shell.Bottom: Switching between controlled and uncontrolled `open` is not supported."),B.current=e)},[a]),t.useEffect(()=>{typeof a>"u"||n.setBottomMode(a?"expanded":"collapsed")},[n,a]);const J=t.useRef(!1),w=(0,z.useResponsiveValue)(a);t.useEffect(()=>{if(typeof w>"u")return;const e=!!w;n.setBottomMode(e?"expanded":"collapsed")},[n,w]);const Q=t.useRef(!1),O=t.useRef(null);t.useEffect(()=>{!Q.current&&typeof a>"u"&&i&&n.bottomMode==="expanded"&&(u?.(!0,{reason:"init"}),Q.current=!0),typeof a>"u"&&(O.current!==null&&O.current!==n.bottomMode&&(J.current||u?.(n.bottomMode==="expanded",{reason:"toggle"}),J.current=!1),O.current=n.bottomMode)},[n.bottomMode,a,i,u]),t.useEffect(()=>{n.bottomMode==="expanded"?_?.():$?.()},[n.bottomMode,_,$]);const k=n.bottomMode==="expanded",M=t.useMemo(()=>{if(!x||E)return E;const e=`kookie-ui:shell:bottom:${x}`;return{load:()=>{if(typeof window>"u")return;const d=window.localStorage.getItem(e);return d?Number(d):void 0},save:d=>{typeof window>"u"||window.localStorage.setItem(e,String(d))}}},[x,E]);t.useEffect(()=>{let e=!0;return(async()=>{if(!S||!M?.load||P)return;const o=await M.load();e&&typeof o=="number"&&f.current&&(f.current.style.setProperty("--bottom-size",`${o}px`),v?.(o))})(),()=>{e=!1}},[S,M,v,P]);const pe=S&&!P&&k?t.createElement(oe.PaneResizeContext.Provider,{value:{containerRef:f,cssVarName:"--bottom-size",minSize:c,maxSize:p,defaultSize:R,orientation:"horizontal",edge:"start",computeNext:(e,o,d)=>{const r=e-o;return d-r},onResize:v,onResizeStart:re,onResizeEnd:e=>{se?.(e),g(e,{reason:"resize"}),M?.save?.(e)},target:"bottom",collapsible:ne,snapPoints:ie,snapTolerance:ae??8,collapseThreshold:de,requestCollapse:()=>n.setBottomMode("collapsed"),requestToggle:()=>n.togglePane("bottom")}},A.length>0?A.map((e,o)=>t.cloneElement(e,{key:e.key??o})):t.createElement(y.PaneHandle,null)):null,{defaultOpen:Re,open:Se,onOpenChange:ve,size:xe,defaultSize:Ee,onSizeChange:Ne,sizeUpdate:we,sizeUpdateMs:Oe,...be}=m,T=t.useCallback(e=>{if(e==null)return;if(typeof e=="number"&&Number.isFinite(e))return e;const o=String(e).trim();if(!o)return;if(o.endsWith("px"))return Number.parseFloat(o);if(o.endsWith("rem")){const r=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||"16")||16;return Number.parseFloat(o)*r}if(o.endsWith("%")){const r=Number.parseFloat(o),b=document.documentElement.clientHeight||window.innerHeight||0;return r/100*b}const d=Number.parseFloat(o);return Number.isFinite(d)?d:void 0},[]);t.useEffect(()=>{if(f.current&&typeof m.size>"u"&&typeof m.defaultSize<"u"){const e=T(m.defaultSize);if(typeof e=="number"&&Number.isFinite(e)){const r=Math.min((typeof p=="number"?p:void 0)??e,Math.max((typeof c=="number"?c:void 0)??e,e));f.current.style.setProperty("--bottom-size",`${r}px`),g(r,{reason:"init"})}}},[]);const D=m.size;if(t.useEffect(()=>{if(!f.current||typeof D>"u")return;const e=T(D);if(typeof e=="number"&&Number.isFinite(e)){const r=Math.min((typeof p=="number"?p:void 0)??e,Math.max((typeof c=="number"?c:void 0)??e,e));f.current.style.setProperty("--bottom-size",`${r}px`),g(r,{reason:"controlled"})}},[D,c,p,T,g]),P){const e=n.bottomMode==="expanded";return t.createElement(F.Root,{open:e,onOpenChange:o=>n.setBottomMode(o?"expanded":"collapsed")},t.createElement(F.Content,{side:"bottom",style:{padding:0},height:{initial:`${R}px`}},t.createElement(ee.VisuallyHidden,null,t.createElement(F.Title,null,"Bottom panel")),L))}return t.createElement("div",{...be,ref:fe,className:(0,Z.default)("rt-ShellBottom",s),"data-mode":n.bottomMode,"data-peek":n.peekTarget==="bottom"||void 0,"data-presentation":n.currentBreakpointReady?N:void 0,"data-open":n.currentBreakpointReady&&me&&k||void 0,style:{...ue,"--bottom-size":`${R}px`,"--bottom-min-size":`${c}px`,"--bottom-max-size":`${p}px`}},t.createElement("div",{className:"rt-ShellBottomContent","data-visible":k||void 0},L),pe)});I.displayName="Shell.Bottom",I.Handle=y.BottomHandle;
2
2
  //# sourceMappingURL=shell-bottom.js.map
@@ -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,GAA6B,6BAwCtB,MAAMV,EAASE,EAAM,WAC1B,C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onJS", "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"]
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 onSizeChange = (props as any).onSizeChange;\n const sizeUpdate = (props as any).sizeUpdate;\n const sizeUpdateMs = (props as any).sizeUpdateMs;\n const emitSizeChange = React.useMemo(() => {\n const cb = onSizeChange as undefined | ((s: number, meta: BottomSizeChangeMeta) => void);\n const strategy = sizeUpdate as undefined | 'throttle' | 'debounce';\n const ms = 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 }, [onSizeChange, sizeUpdate, 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, 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 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 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 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 }, [shell, 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 }, [shell, 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 const controlledSize = (props as any).size;\n React.useEffect(() => {\n if (!localRef.current) return;\n if (typeof controlledSize === 'undefined') return;\n const px = normalizeToPx(controlledSize);\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 }, [controlledSize, 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,GAA+B,iCAC/BC,GAAyB,+BACzBC,EAA8D,6BAC9DC,GAAkC,6BAClCC,EAAyC,8BACzCC,GAA6B,6BAwCtB,MAAMV,EAASE,EAAM,WAC1B,CACE,CACE,UAAAS,EACA,aAAAC,EAAe,QAGf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"__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", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "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", "controlledSize", "classNames"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"shell-inspector.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/shell-inspector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,eAAe,EAAc,MAAM,oBAAoB,CAAC;AAEjE,OAAO,KAAK,EAAE,UAAU,EAAY,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3G,UAAU,SAAU,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC/D,YAAY,CAAC,EAAE,sBAAsB,CAAC;IAEtC,YAAY,CAAC,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AK,oBAAoB,GAAG,SAAS,GACnC,CAAC,wBAAwB,GAAG,0BAA0B,CAAC,GAAG;IACxD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACrE,UAAU,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEJ,KAAK,kBAAkB,GAAG,KAAK,CAAC,yBAAyB,CAAC,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,GAAG;IAAE,MAAM,EAAE,OAAO,eAAe,CAAA;CAAE,CAAC;AAE3J,eAAO,MAAM,SAAS,EAuUjB,kBAAkB,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";var ue=Object.create;var I=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var fe=Object.getOwnPropertyNames;var me=Object.getPrototypeOf,ye=Object.prototype.hasOwnProperty;var be=(s,d)=>{for(var i in d)I(s,i,{get:d[i],enumerable:!0})},G=(s,d,i,l)=>{if(d&&typeof d=="object"||typeof d=="function")for(let u of fe(d))!ye.call(s,u)&&u!==i&&I(s,u,{get:()=>d[u],enumerable:!(l=pe(d,u))||l.enumerable});return s};var H=(s,d,i)=>(i=s!=null?ue(me(s)):{},G(d||!s||!s.__esModule?I(i,"default",{value:s,enumerable:!0}):i,s)),he=s=>G(I({},"__esModule",{value:!0}),s);var Pe={};be(Pe,{Inspector:()=>B});module.exports=he(Pe);var n=H(require("react")),J=H(require("classnames")),F=H(require("../sheet.js")),Q=require("../visually-hidden.js"),X=require("../shell.context.js"),P=require("../shell.hooks.js"),Y=require("./shell-resize.js"),b=require("./shell-handles.js"),Se=require("../shell.types.js");const B=n.forwardRef(({className:s,presentation:d={initial:"overlay",lg:"fixed"},defaultOpen:i,open:l,onOpenChange:u,expandedSize:v=320,minSize:m=200,maxSize:y=500,resizable:x=!1,collapsible:Z=!0,onExpand:U,onCollapse:_,onResize:C,onResizeStart:ee,onResizeEnd:ne,snapPoints:te,snapTolerance:oe,collapseThreshold:re,paneId:E,persistence:S,children:se,style:ie,...c},h)=>{const t=(0,X.useShell)(),N=(0,P.useResponsivePresentation)(d),M=N==="overlay",ae=N==="stacked",f=n.useRef(null),de=n.useCallback(e=>{f.current=e,typeof h=="function"?h(e):h&&(h.current=e)},[h]),$=n.Children.toArray(se),V=$.filter(e=>n.isValidElement(e)&&e.type===b.InspectorHandle),W=$.filter(e=>!(n.isValidElement(e)&&e.type===b.InspectorHandle)),g=n.useMemo(()=>{const e=c.onSizeChange,o=c.sizeUpdate,a=c.sizeUpdateMs??50;if(!e)return()=>{};if(o==="debounce"){let r=null;return(p,D)=>{r&&clearTimeout(r),r=setTimeout(()=>{e(p,D)},a)}}if(o==="throttle"){let r=0;return(p,D)=>{const K=Date.now();K-r>=a&&(r=K,e(p,D))}}return(r,p)=>e(r,p)},[c.onSizeChange,c.sizeUpdate,c.sizeUpdateMs]),R=n.useRef(null);n.useEffect(()=>{const e=typeof l<"u";if(R.current===null){R.current=e;return}R.current!==e&&(console.warn("Shell.Inspector: Switching between controlled and uncontrolled `open` is not supported."),R.current=e)},[l]);const A=n.useRef(!1),L=n.useRef(!1),j=(0,P.useResponsiveValue)(i);n.useEffect(()=>{if(!t.currentBreakpointReady||L.current||typeof l<"u"||typeof i>"u")return;const e=!!j;t.setInspectorMode(e?"expanded":"collapsed"),e&&u?.(!0,{reason:"init"}),L.current=!0},[t.currentBreakpointReady,j,i,l,u]);const w=(0,P.useResponsiveValue)(l);n.useEffect(()=>{if(typeof w>"u")return;const e=!!w;e&&t.inspectorMode!=="expanded"&&t.setInspectorMode("expanded"),!e&&t.inspectorMode!=="collapsed"&&t.setInspectorMode("collapsed")},[w,t.inspectorMode]);const q=n.useRef(!1),k=n.useRef(null);n.useEffect(()=>{!q.current&&typeof l>"u"&&i&&t.inspectorMode==="expanded"&&(u?.(!0,{reason:"init"}),q.current=!0),typeof l>"u"&&(k.current!==null&&k.current!==t.inspectorMode&&(A.current||u?.(t.inspectorMode==="expanded",{reason:"toggle"}),A.current=!1),k.current=t.inspectorMode)},[t.inspectorMode,l,i,u]),n.useEffect(()=>{t.inspectorMode==="expanded"?U?.():_?.()},[t.inspectorMode,U,_]);const O=t.inspectorMode==="expanded",z=n.useMemo(()=>{if(!E||S)return S;const e=`kookie-ui:shell:inspector:${E}`;return{load:()=>{if(typeof window>"u")return;const a=window.localStorage.getItem(e);return a?Number(a):void 0},save:a=>{typeof window>"u"||window.localStorage.setItem(e,String(a))}}},[E,S]);n.useEffect(()=>{let e=!0;return(async()=>{if(!x||!z?.load||M)return;const o=await z.load();e&&typeof o=="number"&&f.current&&(f.current.style.setProperty("--inspector-size",`${o}px`),C?.(o))})(),()=>{e=!1}},[x,z,C,M]);const ce=x&&!M&&O?n.createElement(Y.PaneResizeContext.Provider,{value:{containerRef:f,cssVarName:"--inspector-size",minSize:m,maxSize:y,defaultSize:v,orientation:"vertical",edge:"start",computeNext:(e,o,a)=>{const r=getComputedStyle(f.current).direction==="rtl",p=e-o;return a+(r?p:-p)},onResize:C,onResizeStart:ee,onResizeEnd:e=>{ne?.(e),g(e,{reason:"resize"}),z?.save?.(e)},target:"inspector",collapsible:Z,snapPoints:te,snapTolerance:oe??8,collapseThreshold:re,requestCollapse:()=>t.setInspectorMode("collapsed"),requestToggle:()=>t.togglePane("inspector")}},V.length>0?V.map((e,o)=>n.cloneElement(e,{key:e.key??o})):n.createElement(b.PaneHandle,null)):null,T=n.useCallback(e=>{if(e==null)return;if(typeof e=="number"&&Number.isFinite(e))return e;const o=String(e).trim();if(!o)return;if(o.endsWith("px"))return Number.parseFloat(o);if(o.endsWith("rem")){const r=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||"16")||16;return Number.parseFloat(o)*r}if(o.endsWith("%")){const r=Number.parseFloat(o),p=document.documentElement.clientWidth||window.innerWidth||0;return r/100*p}const a=Number.parseFloat(o);return Number.isFinite(a)?a:void 0},[]);if(n.useEffect(()=>{if(f.current&&typeof c.size>"u"&&typeof c.defaultSize<"u"){const e=T(c.defaultSize);if(typeof e=="number"&&Number.isFinite(e)){const r=Math.min((typeof y=="number"?y:void 0)??e,Math.max((typeof m=="number"?m:void 0)??e,e));f.current.style.setProperty("--inspector-size",`${r}px`),g(r,{reason:"init"})}}},[]),n.useEffect(()=>{if(!f.current||typeof c.size>"u")return;const e=T(c.size);if(typeof e=="number"&&Number.isFinite(e)){const r=Math.min((typeof y=="number"?y:void 0)??e,Math.max((typeof m=="number"?m:void 0)??e,e));f.current.style.setProperty("--inspector-size",`${r}px`),g(r,{reason:"controlled"})}},[c.size,m,y,T,g]),M){const e=t.inspectorMode==="expanded";return n.createElement(F.Root,{open:e,onOpenChange:o=>t.setInspectorMode(o?"expanded":"collapsed")},n.createElement(F.Content,{side:"end",style:{padding:0},width:{initial:`${v}px`}},n.createElement(Q.VisuallyHidden,null,n.createElement(F.Title,null,"Inspector")),W))}const{defaultOpen:Me,open:ge,onOpenChange:Re,size:ze,defaultSize:Ie,onSizeChange:ve,sizeUpdate:xe,sizeUpdateMs:Ce,...le}=c;return n.createElement("div",{...le,ref:de,className:(0,J.default)("rt-ShellInspector",s),"data-mode":t.inspectorMode,"data-peek":t.peekTarget==="inspector"||void 0,"data-presentation":t.currentBreakpointReady?N:void 0,"data-open":t.currentBreakpointReady&&ae&&O||void 0,style:{...ie,"--inspector-size":`${v}px`,"--inspector-min-size":`${m}px`,"--inspector-max-size":`${y}px`}},n.createElement("div",{className:"rt-ShellInspectorContent","data-visible":O||void 0},W),ce)});B.displayName="Shell.Inspector",B.Handle=b.InspectorHandle;
1
+ "use strict";var ye=Object.create;var I=Object.defineProperty;var be=Object.getOwnPropertyDescriptor;var he=Object.getOwnPropertyNames;var Pe=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var ge=(s,d)=>{for(var i in d)I(s,i,{get:d[i],enumerable:!0})},Y=(s,d,i,c)=>{if(d&&typeof d=="object"||typeof d=="function")for(let l of he(d))!Me.call(s,l)&&l!==i&&I(s,l,{get:()=>d[l],enumerable:!(c=be(d,l))||c.enumerable});return s};var F=(s,d,i)=>(i=s!=null?ye(Pe(s)):{},Y(d||!s||!s.__esModule?I(i,"default",{value:s,enumerable:!0}):i,s)),Re=s=>Y(I({},"__esModule",{value:!0}),s);var ze={};ge(ze,{Inspector:()=>_});module.exports=Re(ze);var n=F(require("react")),Z=F(require("classnames")),U=F(require("../sheet.js")),ee=require("../visually-hidden.js"),ne=require("../shell.context.js"),P=require("../shell.hooks.js"),te=require("./shell-resize.js"),b=require("./shell-handles.js"),Oe=require("../shell.types.js");const _=n.forwardRef(({className:s,presentation:d={initial:"overlay",lg:"fixed"},defaultOpen:i,open:c,onOpenChange:l,expandedSize:v=320,minSize:m=200,maxSize:y=500,resizable:x=!1,collapsible:oe=!0,onExpand:B,onCollapse:$,onResize:C,onResizeStart:re,onResizeEnd:se,snapPoints:ie,snapTolerance:ae,collapseThreshold:de,paneId:E,persistence:S,children:ce,style:le,...f},h)=>{const t=(0,ne.useShell)(),N=(0,P.useResponsivePresentation)(d),M=N==="overlay",pe=N==="stacked",u=n.useRef(null),ue=n.useCallback(e=>{u.current=e,typeof h=="function"?h(e):h&&(h.current=e)},[h]),V=n.Children.toArray(ce),W=V.filter(e=>n.isValidElement(e)&&e.type===b.InspectorHandle),A=V.filter(e=>!(n.isValidElement(e)&&e.type===b.InspectorHandle)),L=f.onSizeChange,j=f.sizeUpdate,q=f.sizeUpdateMs,g=n.useMemo(()=>{const e=L,o=j,a=q??50;if(!e)return()=>{};if(o==="debounce"){let r=null;return(p,H)=>{r&&clearTimeout(r),r=setTimeout(()=>{e(p,H)},a)}}if(o==="throttle"){let r=0;return(p,H)=>{const X=Date.now();X-r>=a&&(r=X,e(p,H))}}return(r,p)=>e(r,p)},[L,j,q]),R=n.useRef(null);n.useEffect(()=>{const e=typeof c<"u";if(R.current===null){R.current=e;return}R.current!==e&&(console.warn("Shell.Inspector: Switching between controlled and uncontrolled `open` is not supported."),R.current=e)},[c]);const K=n.useRef(!1),G=n.useRef(!1),J=(0,P.useResponsiveValue)(i);n.useEffect(()=>{if(!t.currentBreakpointReady||G.current||typeof c<"u"||typeof i>"u")return;const e=!!J;t.setInspectorMode(e?"expanded":"collapsed"),e&&l?.(!0,{reason:"init"}),G.current=!0},[t,J,i,c,l]);const w=(0,P.useResponsiveValue)(c);n.useEffect(()=>{if(typeof w>"u")return;const e=!!w;e&&t.inspectorMode!=="expanded"&&t.setInspectorMode("expanded"),!e&&t.inspectorMode!=="collapsed"&&t.setInspectorMode("collapsed")},[t,w]);const Q=n.useRef(!1),k=n.useRef(null);n.useEffect(()=>{!Q.current&&typeof c>"u"&&i&&t.inspectorMode==="expanded"&&(l?.(!0,{reason:"init"}),Q.current=!0),typeof c>"u"&&(k.current!==null&&k.current!==t.inspectorMode&&(K.current||l?.(t.inspectorMode==="expanded",{reason:"toggle"}),K.current=!1),k.current=t.inspectorMode)},[t.inspectorMode,c,i,l]),n.useEffect(()=>{t.inspectorMode==="expanded"?B?.():$?.()},[t.inspectorMode,B,$]);const O=t.inspectorMode==="expanded",z=n.useMemo(()=>{if(!E||S)return S;const e=`kookie-ui:shell:inspector:${E}`;return{load:()=>{if(typeof window>"u")return;const a=window.localStorage.getItem(e);return a?Number(a):void 0},save:a=>{typeof window>"u"||window.localStorage.setItem(e,String(a))}}},[E,S]);n.useEffect(()=>{let e=!0;return(async()=>{if(!x||!z?.load||M)return;const o=await z.load();e&&typeof o=="number"&&u.current&&(u.current.style.setProperty("--inspector-size",`${o}px`),C?.(o))})(),()=>{e=!1}},[x,z,C,M]);const fe=x&&!M&&O?n.createElement(te.PaneResizeContext.Provider,{value:{containerRef:u,cssVarName:"--inspector-size",minSize:m,maxSize:y,defaultSize:v,orientation:"vertical",edge:"start",computeNext:(e,o,a)=>{const r=getComputedStyle(u.current).direction==="rtl",p=e-o;return a+(r?p:-p)},onResize:C,onResizeStart:re,onResizeEnd:e=>{se?.(e),g(e,{reason:"resize"}),z?.save?.(e)},target:"inspector",collapsible:oe,snapPoints:ie,snapTolerance:ae??8,collapseThreshold:de,requestCollapse:()=>t.setInspectorMode("collapsed"),requestToggle:()=>t.togglePane("inspector")}},W.length>0?W.map((e,o)=>n.cloneElement(e,{key:e.key??o})):n.createElement(b.PaneHandle,null)):null,T=n.useCallback(e=>{if(e==null)return;if(typeof e=="number"&&Number.isFinite(e))return e;const o=String(e).trim();if(!o)return;if(o.endsWith("px"))return Number.parseFloat(o);if(o.endsWith("rem")){const r=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||"16")||16;return Number.parseFloat(o)*r}if(o.endsWith("%")){const r=Number.parseFloat(o),p=document.documentElement.clientWidth||window.innerWidth||0;return r/100*p}const a=Number.parseFloat(o);return Number.isFinite(a)?a:void 0},[]);n.useEffect(()=>{if(u.current&&typeof f.size>"u"&&typeof f.defaultSize<"u"){const e=T(f.defaultSize);if(typeof e=="number"&&Number.isFinite(e)){const r=Math.min((typeof y=="number"?y:void 0)??e,Math.max((typeof m=="number"?m:void 0)??e,e));u.current.style.setProperty("--inspector-size",`${r}px`),g(r,{reason:"init"})}}},[]);const D=f.size;if(n.useEffect(()=>{if(!u.current||typeof D>"u")return;const e=T(D);if(typeof e=="number"&&Number.isFinite(e)){const r=Math.min((typeof y=="number"?y:void 0)??e,Math.max((typeof m=="number"?m:void 0)??e,e));u.current.style.setProperty("--inspector-size",`${r}px`),g(r,{reason:"controlled"})}},[D,m,y,T,g]),M){const e=t.inspectorMode==="expanded";return n.createElement(U.Root,{open:e,onOpenChange:o=>t.setInspectorMode(o?"expanded":"collapsed")},n.createElement(U.Content,{side:"end",style:{padding:0},width:{initial:`${v}px`}},n.createElement(ee.VisuallyHidden,null,n.createElement(U.Title,null,"Inspector")),A))}const{defaultOpen:Ie,open:ve,onOpenChange:xe,size:Ce,defaultSize:Ee,onSizeChange:Se,sizeUpdate:Ne,sizeUpdateMs:we,...me}=f;return n.createElement("div",{...me,ref:ue,className:(0,Z.default)("rt-ShellInspector",s),"data-mode":t.inspectorMode,"data-peek":t.peekTarget==="inspector"||void 0,"data-presentation":t.currentBreakpointReady?N:void 0,"data-open":t.currentBreakpointReady&&pe&&O||void 0,style:{...le,"--inspector-size":`${v}px`,"--inspector-min-size":`${m}px`,"--inspector-max-size":`${y}px`}},n.createElement("div",{className:"rt-ShellInspectorContent","data-visible":O||void 0},A),fe)});_.displayName="Shell.Inspector",_.Handle=b.InspectorHandle;
2
2
  //# sourceMappingURL=shell-inspector.js.map