@btst/stack 1.1.1 → 1.1.3

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 (281) hide show
  1. package/README.md +1 -1
  2. package/dist/client/components/index.cjs +2 -2
  3. package/dist/client/components/index.mjs +2 -2
  4. package/dist/client/index.cjs +3 -3
  5. package/dist/client/index.mjs +3 -3
  6. package/dist/context/index.cjs +1 -1
  7. package/dist/context/index.mjs +1 -1
  8. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +825 -0
  9. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +814 -0
  10. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +763 -0
  11. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +751 -0
  12. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +375 -0
  13. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +350 -0
  14. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +160 -0
  15. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +182 -0
  16. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +161 -0
  17. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +137 -0
  18. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.1/node_modules/@radix-ui/number/dist/index.cjs +8 -0
  19. package/dist/node_modules/.pnpm/@radix-ui_number@1.1.1/node_modules/@radix-ui/number/dist/index.mjs +6 -0
  20. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.cjs +13 -0
  21. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs +11 -0
  22. package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@1_9e04309f365863673e44407648bb0cb6/node_modules/@radix-ui/react-arrow/dist/index.cjs +42 -0
  23. package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@1_9e04309f365863673e44407648bb0cb6/node_modules/@radix-ui/react-arrow/dist/index.mjs +25 -0
  24. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_re_6d7c277722b3619c9ee7e64e9a822c45/node_modules/@radix-ui/react-collection/dist/index.cjs +77 -0
  25. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_re_6d7c277722b3619c9ee7e64e9a822c45/node_modules/@radix-ui/react-collection/dist/index.mjs +71 -0
  26. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +56 -0
  27. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +39 -0
  28. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.2_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.cjs +79 -0
  29. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.2_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.mjs +63 -0
  30. package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-direction/dist/index.cjs +27 -0
  31. package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-direction/dist/index.mjs +11 -0
  32. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.2_@types_react@19.2.2__@_ca5522e5d45d4722cb9eb5ce53defa61/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +229 -0
  33. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.2_@types_react@19.2.2__@_ca5522e5d45d4722cb9eb5ce53defa61/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +212 -0
  34. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.3_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +46 -0
  35. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.3_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +30 -0
  36. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_r_93de389b3f622f9f764acc8e59ec80c0/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +224 -0
  37. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_r_93de389b3f622f9f764acc8e59ec80c0/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +208 -0
  38. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-id/dist/index.cjs +31 -0
  39. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-id/dist/index.mjs +15 -0
  40. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.2.8_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_d6285b8269ea5d6b59b300f5be279a0c/node_modules/@radix-ui/react-popper/dist/index.cjs +308 -0
  41. package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.2.8_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_d6285b8269ea5d6b59b300f5be279a0c/node_modules/@radix-ui/react-popper/dist/index.mjs +284 -0
  42. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.9_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_478b3d5dd4afab1a3dcce7ed1748cb95/node_modules/@radix-ui/react-portal/dist/index.cjs +37 -0
  43. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.9_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_478b3d5dd4afab1a3dcce7ed1748cb95/node_modules/@radix-ui/react-portal/dist/index.mjs +18 -0
  44. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.2_@types_react@19.2.2__@types_rea_bdc15f10281778271ffcbe8dd3cd491e/node_modules/@radix-ui/react-primitive/dist/index.cjs +61 -0
  45. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.2_@types_react@19.2.2__@types_rea_bdc15f10281778271ffcbe8dd3cd491e/node_modules/@radix-ui/react-primitive/dist/index.mjs +43 -0
  46. package/dist/node_modules/.pnpm/@radix-ui_react-select@2.2.6_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_802c3d414c85063bee785fcc98a39c07/node_modules/@radix-ui/react-select/dist/index.cjs +1198 -0
  47. package/dist/node_modules/.pnpm/@radix-ui_react-select@2.2.6_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_802c3d414c85063bee785fcc98a39c07/node_modules/@radix-ui/react-select/dist/index.mjs +1154 -0
  48. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +28 -0
  49. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +12 -0
  50. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +86 -0
  51. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +70 -0
  52. package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +34 -0
  53. package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs +18 -0
  54. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +23 -0
  55. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +7 -0
  56. package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-previous/dist/index.cjs +31 -0
  57. package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs +15 -0
  58. package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-size/dist/index.cjs +56 -0
  59. package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-size/dist/index.mjs +40 -0
  60. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.2_@types_react@19.2.2__@typ_a84e98a44624c31e835a98d4b8b0c30d/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +51 -0
  61. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.2_@types_react@19.2.2__@typ_a84e98a44624c31e835a98d4b8b0c30d/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs +34 -0
  62. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.cjs +139 -0
  63. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.mjs +137 -0
  64. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.0/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.cjs +39 -0
  65. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.0/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.mjs +37 -0
  66. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.cjs +43 -0
  67. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.mjs +38 -0
  68. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1671 -0
  69. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.mjs +1669 -0
  70. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.cjs +10 -0
  71. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.mjs +8 -0
  72. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +74 -0
  73. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/component.mjs +56 -0
  74. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +15 -0
  75. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.mjs +10 -0
  76. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +34 -0
  77. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.mjs +31 -0
  78. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +25 -0
  79. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.mjs +9 -0
  80. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +178 -0
  81. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.mjs +160 -0
  82. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/UI.cjs +54 -0
  83. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/UI.mjs +38 -0
  84. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +23 -0
  85. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.mjs +21 -0
  86. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +113 -0
  87. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.mjs +110 -0
  88. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/medium.cjs +7 -0
  89. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/medium.mjs +5 -0
  90. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +9 -0
  91. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.mjs +7 -0
  92. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0/node_modules/react-style-singleton/dist/es2015/component.cjs +21 -0
  93. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0/node_modules/react-style-singleton/dist/es2015/component.mjs +19 -0
  94. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0/node_modules/react-style-singleton/dist/es2015/hook.cjs +41 -0
  95. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0/node_modules/react-style-singleton/dist/es2015/hook.mjs +25 -0
  96. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0/node_modules/react-style-singleton/dist/es2015/singleton.cjs +53 -0
  97. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0/node_modules/react-style-singleton/dist/es2015/singleton.mjs +51 -0
  98. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +59 -0
  99. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs +56 -0
  100. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +26 -0
  101. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0/node_modules/use-callback-ref/dist/es2015/assignRef.mjs +24 -0
  102. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +64 -0
  103. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.mjs +48 -0
  104. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useRef.cjs +44 -0
  105. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useRef.mjs +42 -0
  106. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0/node_modules/use-sidecar/dist/es2015/exports.cjs +37 -0
  107. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0/node_modules/use-sidecar/dist/es2015/exports.mjs +21 -0
  108. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0/node_modules/use-sidecar/dist/es2015/medium.cjs +79 -0
  109. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0/node_modules/use-sidecar/dist/es2015/medium.mjs +77 -0
  110. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/image-field.cjs +3 -3
  111. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/image-field.mjs +3 -3
  112. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/post-forms.cjs +5 -5
  113. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/post-forms.mjs +5 -5
  114. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/tags-multiselect.cjs +2 -6
  115. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/tags-multiselect.mjs +1 -1
  116. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/form-page-skeleton.cjs +1 -1
  117. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/form-page-skeleton.mjs +1 -1
  118. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/list-page-skeleton.cjs +1 -1
  119. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/list-page-skeleton.mjs +1 -1
  120. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/page-header-skeleton.cjs +1 -1
  121. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/page-header-skeleton.mjs +1 -1
  122. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/post-card-skeleton.cjs +2 -2
  123. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/post-card-skeleton.mjs +2 -2
  124. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/post-page-skeleton.cjs +1 -1
  125. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/post-page-skeleton.mjs +1 -1
  126. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/post-page.internal.cjs +1 -1
  127. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/post-page.internal.mjs +1 -1
  128. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/empty-list.cjs +1 -1
  129. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/empty-list.mjs +1 -1
  130. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/on-this-page.cjs +1 -1
  131. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/on-this-page.mjs +1 -1
  132. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/post-card.cjs +2 -2
  133. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/post-card.mjs +2 -2
  134. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/post-navigation.cjs +1 -1
  135. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/post-navigation.mjs +1 -1
  136. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/posts-list.cjs +1 -1
  137. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/posts-list.mjs +1 -1
  138. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/recent-posts-carousel.cjs +1 -1
  139. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/recent-posts-carousel.mjs +1 -1
  140. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/search-modal.cjs +1 -1
  141. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/search-modal.mjs +1 -1
  142. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/tags-list.cjs +1 -1
  143. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/tags-list.mjs +1 -1
  144. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/hooks/blog-hooks.cjs +1 -1
  145. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/hooks/blog-hooks.mjs +1 -1
  146. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/plugin.cjs +1 -1
  147. package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/plugin.mjs +1 -1
  148. package/dist/packages/ui/src/components/badge.cjs +42 -0
  149. package/dist/packages/ui/src/components/badge.mjs +39 -0
  150. package/dist/packages/ui/src/components/button.cjs +54 -0
  151. package/dist/packages/ui/src/components/button.mjs +51 -0
  152. package/dist/packages/ui/src/components/card.cjs +67 -0
  153. package/dist/packages/ui/src/components/card.mjs +61 -0
  154. package/dist/packages/ui/src/components/carousel.cjs +215 -0
  155. package/dist/packages/ui/src/components/carousel.mjs +195 -0
  156. package/dist/packages/ui/src/components/command.cjs +142 -0
  157. package/dist/packages/ui/src/components/command.mjs +134 -0
  158. package/dist/packages/ui/src/components/dialog.cjs +127 -0
  159. package/dist/packages/ui/src/components/dialog.mjs +105 -0
  160. package/dist/packages/ui/src/components/empty.cjs +76 -0
  161. package/dist/packages/ui/src/components/empty.mjs +71 -0
  162. package/dist/packages/ui/src/components/form.cjs +133 -0
  163. package/dist/packages/ui/src/components/form.mjs +110 -0
  164. package/dist/packages/ui/src/components/input.cjs +23 -0
  165. package/dist/packages/ui/src/components/input.mjs +21 -0
  166. package/dist/packages/ui/src/components/label.cjs +39 -0
  167. package/dist/packages/ui/src/components/label.mjs +23 -0
  168. package/dist/packages/ui/src/components/multi-select.cjs +555 -0
  169. package/dist/packages/ui/src/components/multi-select.mjs +540 -0
  170. package/dist/packages/ui/src/components/select.cjs +140 -0
  171. package/dist/packages/ui/src/components/select.mjs +132 -0
  172. package/dist/packages/ui/src/components/skeleton.cjs +17 -0
  173. package/dist/packages/ui/src/components/skeleton.mjs +15 -0
  174. package/dist/packages/ui/src/components/switch.cjs +48 -0
  175. package/dist/packages/ui/src/components/switch.mjs +32 -0
  176. package/dist/packages/ui/src/components/textarea.cjs +20 -0
  177. package/dist/packages/ui/src/components/textarea.mjs +18 -0
  178. package/dist/packages/ui/src/hooks/use-debounce.cjs +18 -0
  179. package/dist/packages/ui/src/hooks/use-debounce.mjs +16 -0
  180. package/dist/packages/ui/src/lib/utils.cjs +10 -0
  181. package/dist/packages/ui/src/lib/utils.mjs +8 -0
  182. package/dist/plugins/blog/api/index.cjs +1 -1
  183. package/dist/plugins/blog/api/index.mjs +1 -1
  184. package/dist/plugins/blog/client/components/index.cjs +4 -4
  185. package/dist/plugins/blog/client/components/index.mjs +4 -4
  186. package/dist/plugins/blog/client/hooks/index.cjs +1 -1
  187. package/dist/plugins/blog/client/hooks/index.mjs +1 -1
  188. package/dist/plugins/blog/client/index.cjs +1 -1
  189. package/dist/plugins/blog/client/index.d.cts +164 -177
  190. package/dist/plugins/blog/client/index.d.mts +164 -177
  191. package/dist/plugins/blog/client/index.d.ts +164 -177
  192. package/dist/plugins/blog/client/index.mjs +1 -1
  193. package/dist/plugins/client/index.cjs +1 -1
  194. package/dist/plugins/client/index.d.cts +8 -5
  195. package/dist/plugins/client/index.d.mts +8 -5
  196. package/dist/plugins/client/index.d.ts +8 -5
  197. package/dist/plugins/client/index.mjs +1 -1
  198. package/package.json +5 -5
  199. package/src/plugins/client/index.ts +14 -6
  200. /package/dist/{client → packages/better-stack/src/client}/components/compose.cjs +0 -0
  201. /package/dist/{client → packages/better-stack/src/client}/components/compose.mjs +0 -0
  202. /package/dist/{client → packages/better-stack/src/client}/components/error-boundary.cjs +0 -0
  203. /package/dist/{client → packages/better-stack/src/client}/components/error-boundary.mjs +0 -0
  204. /package/dist/{client → packages/better-stack/src/client}/meta-utils.cjs +0 -0
  205. /package/dist/{client → packages/better-stack/src/client}/meta-utils.mjs +0 -0
  206. /package/dist/{client → packages/better-stack/src/client}/path-utils.cjs +0 -0
  207. /package/dist/{client → packages/better-stack/src/client}/path-utils.mjs +0 -0
  208. /package/dist/{client → packages/better-stack/src/client}/sitemap-utils.cjs +0 -0
  209. /package/dist/{client → packages/better-stack/src/client}/sitemap-utils.mjs +0 -0
  210. /package/dist/{context → packages/better-stack/src/context}/provider.cjs +0 -0
  211. /package/dist/{context → packages/better-stack/src/context}/provider.mjs +0 -0
  212. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/api/plugin.cjs +0 -0
  213. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/api/plugin.mjs +0 -0
  214. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/markdown-editor.cjs +0 -0
  215. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/markdown-editor.mjs +0 -0
  216. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/index.cjs +0 -0
  217. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/index.mjs +0 -0
  218. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/404-page.cjs +0 -0
  219. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/404-page.mjs +0 -0
  220. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/edit-post-page.cjs +0 -0
  221. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/edit-post-page.internal.cjs +0 -0
  222. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/edit-post-page.internal.mjs +0 -0
  223. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/edit-post-page.mjs +0 -0
  224. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/home-page.cjs +0 -0
  225. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/home-page.internal.cjs +0 -0
  226. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/home-page.internal.mjs +0 -0
  227. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/home-page.mjs +0 -0
  228. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/new-post-page.cjs +0 -0
  229. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/new-post-page.internal.cjs +0 -0
  230. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/new-post-page.internal.mjs +0 -0
  231. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/new-post-page.mjs +0 -0
  232. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/post-page.cjs +0 -0
  233. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/post-page.mjs +0 -0
  234. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/tag-page.cjs +0 -0
  235. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/tag-page.internal.cjs +0 -0
  236. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/tag-page.internal.mjs +0 -0
  237. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/tag-page.mjs +0 -0
  238. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/better-blog-attribution.cjs +0 -0
  239. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/better-blog-attribution.mjs +0 -0
  240. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/default-error.cjs +0 -0
  241. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/default-error.mjs +0 -0
  242. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/defaults.cjs +0 -0
  243. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/defaults.mjs +0 -0
  244. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/error-placeholder.cjs +0 -0
  245. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/error-placeholder.mjs +0 -0
  246. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/highlight-text.cjs +0 -0
  247. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/highlight-text.mjs +0 -0
  248. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/markdown-content.cjs +0 -0
  249. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/markdown-content.mjs +0 -0
  250. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-header.cjs +0 -0
  251. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-header.mjs +0 -0
  252. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-layout.cjs +0 -0
  253. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-layout.mjs +0 -0
  254. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-wrapper.cjs +0 -0
  255. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-wrapper.mjs +0 -0
  256. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/search-input.cjs +0 -0
  257. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/search-input.mjs +0 -0
  258. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/use-route-lifecycle.cjs +0 -0
  259. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/use-route-lifecycle.mjs +0 -0
  260. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/hooks/use-debounce.cjs +0 -0
  261. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/hooks/use-debounce.mjs +0 -0
  262. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-card.cjs +0 -0
  263. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-card.mjs +0 -0
  264. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-common.cjs +0 -0
  265. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-common.mjs +0 -0
  266. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-forms.cjs +0 -0
  267. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-forms.mjs +0 -0
  268. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-list.cjs +0 -0
  269. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-list.mjs +0 -0
  270. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-post.cjs +0 -0
  271. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-post.mjs +0 -0
  272. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/index.cjs +0 -0
  273. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/index.mjs +0 -0
  274. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/db.cjs +0 -0
  275. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/db.mjs +0 -0
  276. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/schemas.cjs +0 -0
  277. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/schemas.mjs +0 -0
  278. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/utils.cjs +0 -0
  279. /package/dist/{plugins → packages/better-stack/src/plugins}/blog/utils.mjs +0 -0
  280. /package/dist/{plugins → packages/better-stack/src/plugins}/utils.cjs +0 -0
  281. /package/dist/{plugins → packages/better-stack/src/plugins}/utils.mjs +0 -0
@@ -0,0 +1,814 @@
1
+ import { evaluate, getSideAxis, getSide, clamp, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, getAlignmentSides, getAlignment, min, max, getPaddingObject, rectToClientRect, getOppositeAxis, getAlignmentAxis, sides, getAxisLength } from '../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs';
2
+
3
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
4
+ let {
5
+ reference,
6
+ floating
7
+ } = _ref;
8
+ const sideAxis = getSideAxis(placement);
9
+ const alignmentAxis = getAlignmentAxis(placement);
10
+ const alignLength = getAxisLength(alignmentAxis);
11
+ const side = getSide(placement);
12
+ const isVertical = sideAxis === 'y';
13
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
14
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
15
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
16
+ let coords;
17
+ switch (side) {
18
+ case 'top':
19
+ coords = {
20
+ x: commonX,
21
+ y: reference.y - floating.height
22
+ };
23
+ break;
24
+ case 'bottom':
25
+ coords = {
26
+ x: commonX,
27
+ y: reference.y + reference.height
28
+ };
29
+ break;
30
+ case 'right':
31
+ coords = {
32
+ x: reference.x + reference.width,
33
+ y: commonY
34
+ };
35
+ break;
36
+ case 'left':
37
+ coords = {
38
+ x: reference.x - floating.width,
39
+ y: commonY
40
+ };
41
+ break;
42
+ default:
43
+ coords = {
44
+ x: reference.x,
45
+ y: reference.y
46
+ };
47
+ }
48
+ switch (getAlignment(placement)) {
49
+ case 'start':
50
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
51
+ break;
52
+ case 'end':
53
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
54
+ break;
55
+ }
56
+ return coords;
57
+ }
58
+
59
+ /**
60
+ * Computes the `x` and `y` coordinates that will place the floating element
61
+ * next to a given reference element.
62
+ *
63
+ * This export does not have any `platform` interface logic. You will need to
64
+ * write one for the platform you are using Floating UI with.
65
+ */
66
+ const computePosition = async (reference, floating, config) => {
67
+ const {
68
+ placement = 'bottom',
69
+ strategy = 'absolute',
70
+ middleware = [],
71
+ platform
72
+ } = config;
73
+ const validMiddleware = middleware.filter(Boolean);
74
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
75
+ let rects = await platform.getElementRects({
76
+ reference,
77
+ floating,
78
+ strategy
79
+ });
80
+ let {
81
+ x,
82
+ y
83
+ } = computeCoordsFromPlacement(rects, placement, rtl);
84
+ let statefulPlacement = placement;
85
+ let middlewareData = {};
86
+ let resetCount = 0;
87
+ for (let i = 0; i < validMiddleware.length; i++) {
88
+ const {
89
+ name,
90
+ fn
91
+ } = validMiddleware[i];
92
+ const {
93
+ x: nextX,
94
+ y: nextY,
95
+ data,
96
+ reset
97
+ } = await fn({
98
+ x,
99
+ y,
100
+ initialPlacement: placement,
101
+ placement: statefulPlacement,
102
+ strategy,
103
+ middlewareData,
104
+ rects,
105
+ platform,
106
+ elements: {
107
+ reference,
108
+ floating
109
+ }
110
+ });
111
+ x = nextX != null ? nextX : x;
112
+ y = nextY != null ? nextY : y;
113
+ middlewareData = {
114
+ ...middlewareData,
115
+ [name]: {
116
+ ...middlewareData[name],
117
+ ...data
118
+ }
119
+ };
120
+ if (reset && resetCount <= 50) {
121
+ resetCount++;
122
+ if (typeof reset === 'object') {
123
+ if (reset.placement) {
124
+ statefulPlacement = reset.placement;
125
+ }
126
+ if (reset.rects) {
127
+ rects = reset.rects === true ? await platform.getElementRects({
128
+ reference,
129
+ floating,
130
+ strategy
131
+ }) : reset.rects;
132
+ }
133
+ ({
134
+ x,
135
+ y
136
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
137
+ }
138
+ i = -1;
139
+ }
140
+ }
141
+ return {
142
+ x,
143
+ y,
144
+ placement: statefulPlacement,
145
+ strategy,
146
+ middlewareData
147
+ };
148
+ };
149
+
150
+ /**
151
+ * Resolves with an object of overflow side offsets that determine how much the
152
+ * element is overflowing a given clipping boundary on each side.
153
+ * - positive = overflowing the boundary by that number of pixels
154
+ * - negative = how many pixels left before it will overflow
155
+ * - 0 = lies flush with the boundary
156
+ * @see https://floating-ui.com/docs/detectOverflow
157
+ */
158
+ async function detectOverflow(state, options) {
159
+ var _await$platform$isEle;
160
+ if (options === void 0) {
161
+ options = {};
162
+ }
163
+ const {
164
+ x,
165
+ y,
166
+ platform,
167
+ rects,
168
+ elements,
169
+ strategy
170
+ } = state;
171
+ const {
172
+ boundary = 'clippingAncestors',
173
+ rootBoundary = 'viewport',
174
+ elementContext = 'floating',
175
+ altBoundary = false,
176
+ padding = 0
177
+ } = evaluate(options, state);
178
+ const paddingObject = getPaddingObject(padding);
179
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
180
+ const element = elements[altBoundary ? altContext : elementContext];
181
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
182
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
183
+ boundary,
184
+ rootBoundary,
185
+ strategy
186
+ }));
187
+ const rect = elementContext === 'floating' ? {
188
+ x,
189
+ y,
190
+ width: rects.floating.width,
191
+ height: rects.floating.height
192
+ } : rects.reference;
193
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
194
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
195
+ x: 1,
196
+ y: 1
197
+ } : {
198
+ x: 1,
199
+ y: 1
200
+ };
201
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
202
+ elements,
203
+ rect,
204
+ offsetParent,
205
+ strategy
206
+ }) : rect);
207
+ return {
208
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
209
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
210
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
211
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
212
+ };
213
+ }
214
+
215
+ /**
216
+ * Provides data to position an inner element of the floating element so that it
217
+ * appears centered to the reference element.
218
+ * @see https://floating-ui.com/docs/arrow
219
+ */
220
+ const arrow = options => ({
221
+ name: 'arrow',
222
+ options,
223
+ async fn(state) {
224
+ const {
225
+ x,
226
+ y,
227
+ placement,
228
+ rects,
229
+ platform,
230
+ elements,
231
+ middlewareData
232
+ } = state;
233
+ // Since `element` is required, we don't Partial<> the type.
234
+ const {
235
+ element,
236
+ padding = 0
237
+ } = evaluate(options, state) || {};
238
+ if (element == null) {
239
+ return {};
240
+ }
241
+ const paddingObject = getPaddingObject(padding);
242
+ const coords = {
243
+ x,
244
+ y
245
+ };
246
+ const axis = getAlignmentAxis(placement);
247
+ const length = getAxisLength(axis);
248
+ const arrowDimensions = await platform.getDimensions(element);
249
+ const isYAxis = axis === 'y';
250
+ const minProp = isYAxis ? 'top' : 'left';
251
+ const maxProp = isYAxis ? 'bottom' : 'right';
252
+ const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
253
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
254
+ const startDiff = coords[axis] - rects.reference[axis];
255
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
256
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
257
+
258
+ // DOM platform can return `window` as the `offsetParent`.
259
+ if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
260
+ clientSize = elements.floating[clientProp] || rects.floating[length];
261
+ }
262
+ const centerToReference = endDiff / 2 - startDiff / 2;
263
+
264
+ // If the padding is large enough that it causes the arrow to no longer be
265
+ // centered, modify the padding so that it is centered.
266
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
267
+ const minPadding = min(paddingObject[minProp], largestPossiblePadding);
268
+ const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
269
+
270
+ // Make sure the arrow doesn't overflow the floating element if the center
271
+ // point is outside the floating element's bounds.
272
+ const min$1 = minPadding;
273
+ const max = clientSize - arrowDimensions[length] - maxPadding;
274
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
275
+ const offset = clamp(min$1, center, max);
276
+
277
+ // If the reference is small enough that the arrow's padding causes it to
278
+ // to point to nothing for an aligned placement, adjust the offset of the
279
+ // floating element itself. To ensure `shift()` continues to take action,
280
+ // a single reset is performed when this is true.
281
+ const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
282
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
283
+ return {
284
+ [axis]: coords[axis] + alignmentOffset,
285
+ data: {
286
+ [axis]: offset,
287
+ centerOffset: center - offset - alignmentOffset,
288
+ ...(shouldAddOffset && {
289
+ alignmentOffset
290
+ })
291
+ },
292
+ reset: shouldAddOffset
293
+ };
294
+ }
295
+ });
296
+
297
+ /**
298
+ * Optimizes the visibility of the floating element by flipping the `placement`
299
+ * in order to keep it in view when the preferred placement(s) will overflow the
300
+ * clipping boundary. Alternative to `autoPlacement`.
301
+ * @see https://floating-ui.com/docs/flip
302
+ */
303
+ const flip = function (options) {
304
+ if (options === void 0) {
305
+ options = {};
306
+ }
307
+ return {
308
+ name: 'flip',
309
+ options,
310
+ async fn(state) {
311
+ var _middlewareData$arrow, _middlewareData$flip;
312
+ const {
313
+ placement,
314
+ middlewareData,
315
+ rects,
316
+ initialPlacement,
317
+ platform,
318
+ elements
319
+ } = state;
320
+ const {
321
+ mainAxis: checkMainAxis = true,
322
+ crossAxis: checkCrossAxis = true,
323
+ fallbackPlacements: specifiedFallbackPlacements,
324
+ fallbackStrategy = 'bestFit',
325
+ fallbackAxisSideDirection = 'none',
326
+ flipAlignment = true,
327
+ ...detectOverflowOptions
328
+ } = evaluate(options, state);
329
+
330
+ // If a reset by the arrow was caused due to an alignment offset being
331
+ // added, we should skip any logic now since `flip()` has already done its
332
+ // work.
333
+ // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
334
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
335
+ return {};
336
+ }
337
+ const side = getSide(placement);
338
+ const initialSideAxis = getSideAxis(initialPlacement);
339
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
340
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
341
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
342
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
343
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
344
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
345
+ }
346
+ const placements = [initialPlacement, ...fallbackPlacements];
347
+ const overflow = await detectOverflow(state, detectOverflowOptions);
348
+ const overflows = [];
349
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
350
+ if (checkMainAxis) {
351
+ overflows.push(overflow[side]);
352
+ }
353
+ if (checkCrossAxis) {
354
+ const sides = getAlignmentSides(placement, rects, rtl);
355
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
356
+ }
357
+ overflowsData = [...overflowsData, {
358
+ placement,
359
+ overflows
360
+ }];
361
+
362
+ // One or more sides is overflowing.
363
+ if (!overflows.every(side => side <= 0)) {
364
+ var _middlewareData$flip2, _overflowsData$filter;
365
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
366
+ const nextPlacement = placements[nextIndex];
367
+ if (nextPlacement) {
368
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
369
+ if (!ignoreCrossAxisOverflow ||
370
+ // We leave the current main axis only if every placement on that axis
371
+ // overflows the main axis.
372
+ overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
373
+ // Try next placement and re-run the lifecycle.
374
+ return {
375
+ data: {
376
+ index: nextIndex,
377
+ overflows: overflowsData
378
+ },
379
+ reset: {
380
+ placement: nextPlacement
381
+ }
382
+ };
383
+ }
384
+ }
385
+
386
+ // First, find the candidates that fit on the mainAxis side of overflow,
387
+ // then find the placement that fits the best on the main crossAxis side.
388
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
389
+
390
+ // Otherwise fallback.
391
+ if (!resetPlacement) {
392
+ switch (fallbackStrategy) {
393
+ case 'bestFit':
394
+ {
395
+ var _overflowsData$filter2;
396
+ const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
397
+ if (hasFallbackAxisSideDirection) {
398
+ const currentSideAxis = getSideAxis(d.placement);
399
+ return currentSideAxis === initialSideAxis ||
400
+ // Create a bias to the `y` side axis due to horizontal
401
+ // reading directions favoring greater width.
402
+ currentSideAxis === 'y';
403
+ }
404
+ return true;
405
+ }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
406
+ if (placement) {
407
+ resetPlacement = placement;
408
+ }
409
+ break;
410
+ }
411
+ case 'initialPlacement':
412
+ resetPlacement = initialPlacement;
413
+ break;
414
+ }
415
+ }
416
+ if (placement !== resetPlacement) {
417
+ return {
418
+ reset: {
419
+ placement: resetPlacement
420
+ }
421
+ };
422
+ }
423
+ }
424
+ return {};
425
+ }
426
+ };
427
+ };
428
+
429
+ function getSideOffsets(overflow, rect) {
430
+ return {
431
+ top: overflow.top - rect.height,
432
+ right: overflow.right - rect.width,
433
+ bottom: overflow.bottom - rect.height,
434
+ left: overflow.left - rect.width
435
+ };
436
+ }
437
+ function isAnySideFullyClipped(overflow) {
438
+ return sides.some(side => overflow[side] >= 0);
439
+ }
440
+ /**
441
+ * Provides data to hide the floating element in applicable situations, such as
442
+ * when it is not in the same clipping context as the reference element.
443
+ * @see https://floating-ui.com/docs/hide
444
+ */
445
+ const hide = function (options) {
446
+ if (options === void 0) {
447
+ options = {};
448
+ }
449
+ return {
450
+ name: 'hide',
451
+ options,
452
+ async fn(state) {
453
+ const {
454
+ rects
455
+ } = state;
456
+ const {
457
+ strategy = 'referenceHidden',
458
+ ...detectOverflowOptions
459
+ } = evaluate(options, state);
460
+ switch (strategy) {
461
+ case 'referenceHidden':
462
+ {
463
+ const overflow = await detectOverflow(state, {
464
+ ...detectOverflowOptions,
465
+ elementContext: 'reference'
466
+ });
467
+ const offsets = getSideOffsets(overflow, rects.reference);
468
+ return {
469
+ data: {
470
+ referenceHiddenOffsets: offsets,
471
+ referenceHidden: isAnySideFullyClipped(offsets)
472
+ }
473
+ };
474
+ }
475
+ case 'escaped':
476
+ {
477
+ const overflow = await detectOverflow(state, {
478
+ ...detectOverflowOptions,
479
+ altBoundary: true
480
+ });
481
+ const offsets = getSideOffsets(overflow, rects.floating);
482
+ return {
483
+ data: {
484
+ escapedOffsets: offsets,
485
+ escaped: isAnySideFullyClipped(offsets)
486
+ }
487
+ };
488
+ }
489
+ default:
490
+ {
491
+ return {};
492
+ }
493
+ }
494
+ }
495
+ };
496
+ };
497
+
498
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
499
+
500
+ // For type backwards-compatibility, the `OffsetOptions` type was also
501
+ // Derivable.
502
+
503
+ async function convertValueToCoords(state, options) {
504
+ const {
505
+ placement,
506
+ platform,
507
+ elements
508
+ } = state;
509
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
510
+ const side = getSide(placement);
511
+ const alignment = getAlignment(placement);
512
+ const isVertical = getSideAxis(placement) === 'y';
513
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
514
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
515
+ const rawValue = evaluate(options, state);
516
+
517
+ // eslint-disable-next-line prefer-const
518
+ let {
519
+ mainAxis,
520
+ crossAxis,
521
+ alignmentAxis
522
+ } = typeof rawValue === 'number' ? {
523
+ mainAxis: rawValue,
524
+ crossAxis: 0,
525
+ alignmentAxis: null
526
+ } : {
527
+ mainAxis: rawValue.mainAxis || 0,
528
+ crossAxis: rawValue.crossAxis || 0,
529
+ alignmentAxis: rawValue.alignmentAxis
530
+ };
531
+ if (alignment && typeof alignmentAxis === 'number') {
532
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
533
+ }
534
+ return isVertical ? {
535
+ x: crossAxis * crossAxisMulti,
536
+ y: mainAxis * mainAxisMulti
537
+ } : {
538
+ x: mainAxis * mainAxisMulti,
539
+ y: crossAxis * crossAxisMulti
540
+ };
541
+ }
542
+
543
+ /**
544
+ * Modifies the placement by translating the floating element along the
545
+ * specified axes.
546
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
547
+ * object may be passed.
548
+ * @see https://floating-ui.com/docs/offset
549
+ */
550
+ const offset = function (options) {
551
+ if (options === void 0) {
552
+ options = 0;
553
+ }
554
+ return {
555
+ name: 'offset',
556
+ options,
557
+ async fn(state) {
558
+ var _middlewareData$offse, _middlewareData$arrow;
559
+ const {
560
+ x,
561
+ y,
562
+ placement,
563
+ middlewareData
564
+ } = state;
565
+ const diffCoords = await convertValueToCoords(state, options);
566
+
567
+ // If the placement is the same and the arrow caused an alignment offset
568
+ // then we don't need to change the positioning coordinates.
569
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
570
+ return {};
571
+ }
572
+ return {
573
+ x: x + diffCoords.x,
574
+ y: y + diffCoords.y,
575
+ data: {
576
+ ...diffCoords,
577
+ placement
578
+ }
579
+ };
580
+ }
581
+ };
582
+ };
583
+
584
+ /**
585
+ * Optimizes the visibility of the floating element by shifting it in order to
586
+ * keep it in view when it will overflow the clipping boundary.
587
+ * @see https://floating-ui.com/docs/shift
588
+ */
589
+ const shift = function (options) {
590
+ if (options === void 0) {
591
+ options = {};
592
+ }
593
+ return {
594
+ name: 'shift',
595
+ options,
596
+ async fn(state) {
597
+ const {
598
+ x,
599
+ y,
600
+ placement
601
+ } = state;
602
+ const {
603
+ mainAxis: checkMainAxis = true,
604
+ crossAxis: checkCrossAxis = false,
605
+ limiter = {
606
+ fn: _ref => {
607
+ let {
608
+ x,
609
+ y
610
+ } = _ref;
611
+ return {
612
+ x,
613
+ y
614
+ };
615
+ }
616
+ },
617
+ ...detectOverflowOptions
618
+ } = evaluate(options, state);
619
+ const coords = {
620
+ x,
621
+ y
622
+ };
623
+ const overflow = await detectOverflow(state, detectOverflowOptions);
624
+ const crossAxis = getSideAxis(getSide(placement));
625
+ const mainAxis = getOppositeAxis(crossAxis);
626
+ let mainAxisCoord = coords[mainAxis];
627
+ let crossAxisCoord = coords[crossAxis];
628
+ if (checkMainAxis) {
629
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
630
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
631
+ const min = mainAxisCoord + overflow[minSide];
632
+ const max = mainAxisCoord - overflow[maxSide];
633
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
634
+ }
635
+ if (checkCrossAxis) {
636
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
637
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
638
+ const min = crossAxisCoord + overflow[minSide];
639
+ const max = crossAxisCoord - overflow[maxSide];
640
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
641
+ }
642
+ const limitedCoords = limiter.fn({
643
+ ...state,
644
+ [mainAxis]: mainAxisCoord,
645
+ [crossAxis]: crossAxisCoord
646
+ });
647
+ return {
648
+ ...limitedCoords,
649
+ data: {
650
+ x: limitedCoords.x - x,
651
+ y: limitedCoords.y - y,
652
+ enabled: {
653
+ [mainAxis]: checkMainAxis,
654
+ [crossAxis]: checkCrossAxis
655
+ }
656
+ }
657
+ };
658
+ }
659
+ };
660
+ };
661
+ /**
662
+ * Built-in `limiter` that will stop `shift()` at a certain point.
663
+ */
664
+ const limitShift = function (options) {
665
+ if (options === void 0) {
666
+ options = {};
667
+ }
668
+ return {
669
+ options,
670
+ fn(state) {
671
+ const {
672
+ x,
673
+ y,
674
+ placement,
675
+ rects,
676
+ middlewareData
677
+ } = state;
678
+ const {
679
+ offset = 0,
680
+ mainAxis: checkMainAxis = true,
681
+ crossAxis: checkCrossAxis = true
682
+ } = evaluate(options, state);
683
+ const coords = {
684
+ x,
685
+ y
686
+ };
687
+ const crossAxis = getSideAxis(placement);
688
+ const mainAxis = getOppositeAxis(crossAxis);
689
+ let mainAxisCoord = coords[mainAxis];
690
+ let crossAxisCoord = coords[crossAxis];
691
+ const rawOffset = evaluate(offset, state);
692
+ const computedOffset = typeof rawOffset === 'number' ? {
693
+ mainAxis: rawOffset,
694
+ crossAxis: 0
695
+ } : {
696
+ mainAxis: 0,
697
+ crossAxis: 0,
698
+ ...rawOffset
699
+ };
700
+ if (checkMainAxis) {
701
+ const len = mainAxis === 'y' ? 'height' : 'width';
702
+ const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
703
+ const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
704
+ if (mainAxisCoord < limitMin) {
705
+ mainAxisCoord = limitMin;
706
+ } else if (mainAxisCoord > limitMax) {
707
+ mainAxisCoord = limitMax;
708
+ }
709
+ }
710
+ if (checkCrossAxis) {
711
+ var _middlewareData$offse, _middlewareData$offse2;
712
+ const len = mainAxis === 'y' ? 'width' : 'height';
713
+ const isOriginSide = originSides.has(getSide(placement));
714
+ const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
715
+ const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
716
+ if (crossAxisCoord < limitMin) {
717
+ crossAxisCoord = limitMin;
718
+ } else if (crossAxisCoord > limitMax) {
719
+ crossAxisCoord = limitMax;
720
+ }
721
+ }
722
+ return {
723
+ [mainAxis]: mainAxisCoord,
724
+ [crossAxis]: crossAxisCoord
725
+ };
726
+ }
727
+ };
728
+ };
729
+
730
+ /**
731
+ * Provides data that allows you to change the size of the floating element —
732
+ * for instance, prevent it from overflowing the clipping boundary or match the
733
+ * width of the reference element.
734
+ * @see https://floating-ui.com/docs/size
735
+ */
736
+ const size = function (options) {
737
+ if (options === void 0) {
738
+ options = {};
739
+ }
740
+ return {
741
+ name: 'size',
742
+ options,
743
+ async fn(state) {
744
+ var _state$middlewareData, _state$middlewareData2;
745
+ const {
746
+ placement,
747
+ rects,
748
+ platform,
749
+ elements
750
+ } = state;
751
+ const {
752
+ apply = () => {},
753
+ ...detectOverflowOptions
754
+ } = evaluate(options, state);
755
+ const overflow = await detectOverflow(state, detectOverflowOptions);
756
+ const side = getSide(placement);
757
+ const alignment = getAlignment(placement);
758
+ const isYAxis = getSideAxis(placement) === 'y';
759
+ const {
760
+ width,
761
+ height
762
+ } = rects.floating;
763
+ let heightSide;
764
+ let widthSide;
765
+ if (side === 'top' || side === 'bottom') {
766
+ heightSide = side;
767
+ widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
768
+ } else {
769
+ widthSide = side;
770
+ heightSide = alignment === 'end' ? 'top' : 'bottom';
771
+ }
772
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
773
+ const maximumClippingWidth = width - overflow.left - overflow.right;
774
+ const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
775
+ const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
776
+ const noShift = !state.middlewareData.shift;
777
+ let availableHeight = overflowAvailableHeight;
778
+ let availableWidth = overflowAvailableWidth;
779
+ if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
780
+ availableWidth = maximumClippingWidth;
781
+ }
782
+ if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
783
+ availableHeight = maximumClippingHeight;
784
+ }
785
+ if (noShift && !alignment) {
786
+ const xMin = max(overflow.left, 0);
787
+ const xMax = max(overflow.right, 0);
788
+ const yMin = max(overflow.top, 0);
789
+ const yMax = max(overflow.bottom, 0);
790
+ if (isYAxis) {
791
+ availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
792
+ } else {
793
+ availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
794
+ }
795
+ }
796
+ await apply({
797
+ ...state,
798
+ availableWidth,
799
+ availableHeight
800
+ });
801
+ const nextDimensions = await platform.getDimensions(elements.floating);
802
+ if (width !== nextDimensions.width || height !== nextDimensions.height) {
803
+ return {
804
+ reset: {
805
+ rects: true
806
+ }
807
+ };
808
+ }
809
+ return {};
810
+ }
811
+ };
812
+ };
813
+
814
+ export { arrow, computePosition, detectOverflow, flip, hide, limitShift, offset, rectToClientRect, shift, size };