@btst/stack 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/client/components/index.cjs +2 -2
- package/dist/client/components/index.mjs +2 -2
- package/dist/client/index.cjs +3 -3
- package/dist/client/index.mjs +3 -3
- package/dist/context/index.cjs +1 -1
- package/dist/context/index.mjs +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +825 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +814 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +763 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +751 -0
- 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
- 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
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +160 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +182 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +161 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +137 -0
- package/dist/node_modules/.pnpm/@radix-ui_number@1.1.1/node_modules/@radix-ui/number/dist/index.cjs +8 -0
- package/dist/node_modules/.pnpm/@radix-ui_number@1.1.1/node_modules/@radix-ui/number/dist/index.mjs +6 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.cjs +13 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs +11 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.cjs +139 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.mjs +137 -0
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1671 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.mjs +1669 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.cjs +10 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.mjs +8 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +59 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs +56 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/image-field.cjs +3 -3
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/image-field.mjs +3 -3
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/post-forms.cjs +5 -5
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/post-forms.mjs +5 -5
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/tags-multiselect.cjs +2 -6
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/tags-multiselect.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/form-page-skeleton.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/form-page-skeleton.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/list-page-skeleton.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/list-page-skeleton.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/page-header-skeleton.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/page-header-skeleton.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/post-card-skeleton.cjs +2 -2
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/post-card-skeleton.mjs +2 -2
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/post-page-skeleton.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/post-page-skeleton.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/post-page.internal.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/post-page.internal.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/empty-list.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/empty-list.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/on-this-page.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/on-this-page.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/post-card.cjs +2 -2
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/post-card.mjs +2 -2
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/post-navigation.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/post-navigation.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/posts-list.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/posts-list.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/recent-posts-carousel.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/recent-posts-carousel.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/search-modal.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/search-modal.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/tags-list.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/tags-list.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/hooks/blog-hooks.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/hooks/blog-hooks.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/plugin.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/plugin.mjs +1 -1
- package/dist/packages/ui/src/components/badge.cjs +42 -0
- package/dist/packages/ui/src/components/badge.mjs +39 -0
- package/dist/packages/ui/src/components/button.cjs +54 -0
- package/dist/packages/ui/src/components/button.mjs +51 -0
- package/dist/packages/ui/src/components/card.cjs +67 -0
- package/dist/packages/ui/src/components/card.mjs +61 -0
- package/dist/packages/ui/src/components/carousel.cjs +215 -0
- package/dist/packages/ui/src/components/carousel.mjs +195 -0
- package/dist/packages/ui/src/components/command.cjs +142 -0
- package/dist/packages/ui/src/components/command.mjs +134 -0
- package/dist/packages/ui/src/components/dialog.cjs +127 -0
- package/dist/packages/ui/src/components/dialog.mjs +105 -0
- package/dist/packages/ui/src/components/empty.cjs +76 -0
- package/dist/packages/ui/src/components/empty.mjs +71 -0
- package/dist/packages/ui/src/components/form.cjs +133 -0
- package/dist/packages/ui/src/components/form.mjs +110 -0
- package/dist/packages/ui/src/components/input.cjs +23 -0
- package/dist/packages/ui/src/components/input.mjs +21 -0
- package/dist/packages/ui/src/components/label.cjs +39 -0
- package/dist/packages/ui/src/components/label.mjs +23 -0
- package/dist/packages/ui/src/components/multi-select.cjs +555 -0
- package/dist/packages/ui/src/components/multi-select.mjs +540 -0
- package/dist/packages/ui/src/components/select.cjs +140 -0
- package/dist/packages/ui/src/components/select.mjs +132 -0
- package/dist/packages/ui/src/components/skeleton.cjs +17 -0
- package/dist/packages/ui/src/components/skeleton.mjs +15 -0
- package/dist/packages/ui/src/components/switch.cjs +48 -0
- package/dist/packages/ui/src/components/switch.mjs +32 -0
- package/dist/packages/ui/src/components/textarea.cjs +20 -0
- package/dist/packages/ui/src/components/textarea.mjs +18 -0
- package/dist/packages/ui/src/hooks/use-debounce.cjs +18 -0
- package/dist/packages/ui/src/hooks/use-debounce.mjs +16 -0
- package/dist/packages/ui/src/lib/utils.cjs +10 -0
- package/dist/packages/ui/src/lib/utils.mjs +8 -0
- package/dist/plugins/blog/api/index.cjs +1 -1
- package/dist/plugins/blog/api/index.d.cts +1 -1
- package/dist/plugins/blog/api/index.d.mts +1 -1
- package/dist/plugins/blog/api/index.d.ts +1 -1
- package/dist/plugins/blog/api/index.mjs +1 -1
- package/dist/plugins/blog/client/components/index.cjs +4 -4
- package/dist/plugins/blog/client/components/index.mjs +4 -4
- package/dist/plugins/blog/client/hooks/index.cjs +1 -1
- package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
- package/dist/plugins/blog/client/hooks/index.mjs +1 -1
- package/dist/plugins/blog/client/index.cjs +1 -1
- package/dist/plugins/blog/client/index.d.cts +1 -1
- package/dist/plugins/blog/client/index.d.mts +1 -1
- package/dist/plugins/blog/client/index.d.ts +1 -1
- package/dist/plugins/blog/client/index.mjs +1 -1
- package/dist/plugins/blog/query-keys.d.cts +2 -2
- package/dist/plugins/blog/query-keys.d.mts +2 -2
- package/dist/plugins/blog/query-keys.d.ts +2 -2
- package/dist/plugins/client/index.cjs +1 -1
- package/dist/plugins/client/index.mjs +1 -1
- package/package.json +5 -5
- package/dist/{client → packages/better-stack/src/client}/components/compose.cjs +0 -0
- package/dist/{client → packages/better-stack/src/client}/components/compose.mjs +0 -0
- package/dist/{client → packages/better-stack/src/client}/components/error-boundary.cjs +0 -0
- package/dist/{client → packages/better-stack/src/client}/components/error-boundary.mjs +0 -0
- package/dist/{client → packages/better-stack/src/client}/meta-utils.cjs +0 -0
- package/dist/{client → packages/better-stack/src/client}/meta-utils.mjs +0 -0
- package/dist/{client → packages/better-stack/src/client}/path-utils.cjs +0 -0
- package/dist/{client → packages/better-stack/src/client}/path-utils.mjs +0 -0
- package/dist/{client → packages/better-stack/src/client}/sitemap-utils.cjs +0 -0
- package/dist/{client → packages/better-stack/src/client}/sitemap-utils.mjs +0 -0
- package/dist/{context → packages/better-stack/src/context}/provider.cjs +0 -0
- package/dist/{context → packages/better-stack/src/context}/provider.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/api/plugin.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/api/plugin.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/markdown-editor.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/markdown-editor.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/index.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/index.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/404-page.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/404-page.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/edit-post-page.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/edit-post-page.internal.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/edit-post-page.internal.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/edit-post-page.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/home-page.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/home-page.internal.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/home-page.internal.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/home-page.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/new-post-page.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/new-post-page.internal.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/new-post-page.internal.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/new-post-page.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/post-page.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/post-page.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/tag-page.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/tag-page.internal.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/tag-page.internal.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/tag-page.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/better-blog-attribution.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/better-blog-attribution.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/default-error.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/default-error.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/defaults.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/defaults.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/error-placeholder.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/error-placeholder.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/highlight-text.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/highlight-text.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/markdown-content.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/markdown-content.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-header.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-header.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-layout.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-layout.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-wrapper.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-wrapper.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/search-input.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/search-input.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/use-route-lifecycle.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/use-route-lifecycle.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/hooks/use-debounce.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/hooks/use-debounce.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-card.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-card.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-common.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-common.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-forms.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-forms.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-list.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-list.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-post.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-post.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/index.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/index.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/db.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/db.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/schemas.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/schemas.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/utils.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/utils.mjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/utils.cjs +0 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/utils.mjs +0 -0
- package/dist/shared/{stack.CoPoHVfV.d.cts → stack.Cr2JoQdo.d.cts} +1 -1
- package/dist/shared/{stack.CoPoHVfV.d.mts → stack.Cr2JoQdo.d.mts} +1 -1
- package/dist/shared/{stack.CoPoHVfV.d.ts → stack.Cr2JoQdo.d.ts} +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const React = require('react');
|
|
4
|
+
|
|
5
|
+
function _interopNamespaceCompat(e) {
|
|
6
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
7
|
+
const n = Object.create(null);
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
n[k] = e[k];
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
n.default = e;
|
|
14
|
+
return n;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
18
|
+
|
|
19
|
+
// packages/react/use-callback-ref/src/use-callback-ref.tsx
|
|
20
|
+
function useCallbackRef(callback) {
|
|
21
|
+
const callbackRef = React__namespace.useRef(callback);
|
|
22
|
+
React__namespace.useEffect(() => {
|
|
23
|
+
callbackRef.current = callback;
|
|
24
|
+
});
|
|
25
|
+
return React__namespace.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
exports.useCallbackRef = useCallbackRef;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
// packages/react/use-callback-ref/src/use-callback-ref.tsx
|
|
4
|
+
function useCallbackRef(callback) {
|
|
5
|
+
const callbackRef = React.useRef(callback);
|
|
6
|
+
React.useEffect(() => {
|
|
7
|
+
callbackRef.current = callback;
|
|
8
|
+
});
|
|
9
|
+
return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { useCallbackRef };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const React = require('react');
|
|
4
|
+
const index = require('../../../../../@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');
|
|
5
|
+
|
|
6
|
+
function _interopNamespaceCompat(e) {
|
|
7
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
8
|
+
const n = Object.create(null);
|
|
9
|
+
if (e) {
|
|
10
|
+
for (const k in e) {
|
|
11
|
+
n[k] = e[k];
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
n.default = e;
|
|
15
|
+
return n;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
19
|
+
|
|
20
|
+
// src/use-controllable-state.tsx
|
|
21
|
+
var useInsertionEffect = React__namespace[" useInsertionEffect ".trim().toString()] || index.useLayoutEffect;
|
|
22
|
+
function useControllableState({
|
|
23
|
+
prop,
|
|
24
|
+
defaultProp,
|
|
25
|
+
onChange = () => {
|
|
26
|
+
},
|
|
27
|
+
caller
|
|
28
|
+
}) {
|
|
29
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
30
|
+
defaultProp,
|
|
31
|
+
onChange
|
|
32
|
+
});
|
|
33
|
+
const isControlled = prop !== void 0;
|
|
34
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
35
|
+
{
|
|
36
|
+
const isControlledRef = React__namespace.useRef(prop !== void 0);
|
|
37
|
+
React__namespace.useEffect(() => {
|
|
38
|
+
const wasControlled = isControlledRef.current;
|
|
39
|
+
if (wasControlled !== isControlled) {
|
|
40
|
+
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
41
|
+
const to = isControlled ? "controlled" : "uncontrolled";
|
|
42
|
+
console.warn(
|
|
43
|
+
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
isControlledRef.current = isControlled;
|
|
47
|
+
}, [isControlled, caller]);
|
|
48
|
+
}
|
|
49
|
+
const setValue = React__namespace.useCallback(
|
|
50
|
+
(nextValue) => {
|
|
51
|
+
if (isControlled) {
|
|
52
|
+
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
53
|
+
if (value2 !== prop) {
|
|
54
|
+
onChangeRef.current?.(value2);
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
setUncontrolledProp(nextValue);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
61
|
+
);
|
|
62
|
+
return [value, setValue];
|
|
63
|
+
}
|
|
64
|
+
function useUncontrolledState({
|
|
65
|
+
defaultProp,
|
|
66
|
+
onChange
|
|
67
|
+
}) {
|
|
68
|
+
const [value, setValue] = React__namespace.useState(defaultProp);
|
|
69
|
+
const prevValueRef = React__namespace.useRef(value);
|
|
70
|
+
const onChangeRef = React__namespace.useRef(onChange);
|
|
71
|
+
useInsertionEffect(() => {
|
|
72
|
+
onChangeRef.current = onChange;
|
|
73
|
+
}, [onChange]);
|
|
74
|
+
React__namespace.useEffect(() => {
|
|
75
|
+
if (prevValueRef.current !== value) {
|
|
76
|
+
onChangeRef.current?.(value);
|
|
77
|
+
prevValueRef.current = value;
|
|
78
|
+
}
|
|
79
|
+
}, [value, prevValueRef]);
|
|
80
|
+
return [value, setValue, onChangeRef];
|
|
81
|
+
}
|
|
82
|
+
function isFunction(value) {
|
|
83
|
+
return typeof value === "function";
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
exports.useControllableState = useControllableState;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useLayoutEffect as useLayoutEffect2 } from '../../../../../@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';
|
|
3
|
+
|
|
4
|
+
// src/use-controllable-state.tsx
|
|
5
|
+
var useInsertionEffect = React[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
6
|
+
function useControllableState({
|
|
7
|
+
prop,
|
|
8
|
+
defaultProp,
|
|
9
|
+
onChange = () => {
|
|
10
|
+
},
|
|
11
|
+
caller
|
|
12
|
+
}) {
|
|
13
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
14
|
+
defaultProp,
|
|
15
|
+
onChange
|
|
16
|
+
});
|
|
17
|
+
const isControlled = prop !== void 0;
|
|
18
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
19
|
+
{
|
|
20
|
+
const isControlledRef = React.useRef(prop !== void 0);
|
|
21
|
+
React.useEffect(() => {
|
|
22
|
+
const wasControlled = isControlledRef.current;
|
|
23
|
+
if (wasControlled !== isControlled) {
|
|
24
|
+
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
25
|
+
const to = isControlled ? "controlled" : "uncontrolled";
|
|
26
|
+
console.warn(
|
|
27
|
+
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
isControlledRef.current = isControlled;
|
|
31
|
+
}, [isControlled, caller]);
|
|
32
|
+
}
|
|
33
|
+
const setValue = React.useCallback(
|
|
34
|
+
(nextValue) => {
|
|
35
|
+
if (isControlled) {
|
|
36
|
+
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
37
|
+
if (value2 !== prop) {
|
|
38
|
+
onChangeRef.current?.(value2);
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
setUncontrolledProp(nextValue);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
45
|
+
);
|
|
46
|
+
return [value, setValue];
|
|
47
|
+
}
|
|
48
|
+
function useUncontrolledState({
|
|
49
|
+
defaultProp,
|
|
50
|
+
onChange
|
|
51
|
+
}) {
|
|
52
|
+
const [value, setValue] = React.useState(defaultProp);
|
|
53
|
+
const prevValueRef = React.useRef(value);
|
|
54
|
+
const onChangeRef = React.useRef(onChange);
|
|
55
|
+
useInsertionEffect(() => {
|
|
56
|
+
onChangeRef.current = onChange;
|
|
57
|
+
}, [onChange]);
|
|
58
|
+
React.useEffect(() => {
|
|
59
|
+
if (prevValueRef.current !== value) {
|
|
60
|
+
onChangeRef.current?.(value);
|
|
61
|
+
prevValueRef.current = value;
|
|
62
|
+
}
|
|
63
|
+
}, [value, prevValueRef]);
|
|
64
|
+
return [value, setValue, onChangeRef];
|
|
65
|
+
}
|
|
66
|
+
function isFunction(value) {
|
|
67
|
+
return typeof value === "function";
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { useControllableState };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const React = require('react');
|
|
4
|
+
const index = require('../../../../../@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');
|
|
5
|
+
|
|
6
|
+
function _interopNamespaceCompat(e) {
|
|
7
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
8
|
+
const n = Object.create(null);
|
|
9
|
+
if (e) {
|
|
10
|
+
for (const k in e) {
|
|
11
|
+
n[k] = e[k];
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
n.default = e;
|
|
15
|
+
return n;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
19
|
+
|
|
20
|
+
// packages/react/use-escape-keydown/src/use-escape-keydown.tsx
|
|
21
|
+
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
22
|
+
const onEscapeKeyDown = index.useCallbackRef(onEscapeKeyDownProp);
|
|
23
|
+
React__namespace.useEffect(() => {
|
|
24
|
+
const handleKeyDown = (event) => {
|
|
25
|
+
if (event.key === "Escape") {
|
|
26
|
+
onEscapeKeyDown(event);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
30
|
+
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
|
31
|
+
}, [onEscapeKeyDown, ownerDocument]);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
exports.useEscapeKeydown = useEscapeKeydown;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useCallbackRef } from '../../../../../@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';
|
|
3
|
+
|
|
4
|
+
// packages/react/use-escape-keydown/src/use-escape-keydown.tsx
|
|
5
|
+
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
6
|
+
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
7
|
+
React.useEffect(() => {
|
|
8
|
+
const handleKeyDown = (event) => {
|
|
9
|
+
if (event.key === "Escape") {
|
|
10
|
+
onEscapeKeyDown(event);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
14
|
+
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
|
15
|
+
}, [onEscapeKeyDown, ownerDocument]);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { useEscapeKeydown };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const React = require('react');
|
|
4
|
+
|
|
5
|
+
function _interopNamespaceCompat(e) {
|
|
6
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
7
|
+
const n = Object.create(null);
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
n[k] = e[k];
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
n.default = e;
|
|
14
|
+
return n;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
18
|
+
|
|
19
|
+
// packages/react/use-layout-effect/src/use-layout-effect.tsx
|
|
20
|
+
var useLayoutEffect2 = globalThis?.document ? React__namespace.useLayoutEffect : () => {
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.useLayoutEffect = useLayoutEffect2;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const React = require('react');
|
|
4
|
+
|
|
5
|
+
function _interopNamespaceCompat(e) {
|
|
6
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
7
|
+
const n = Object.create(null);
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
n[k] = e[k];
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
n.default = e;
|
|
14
|
+
return n;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
18
|
+
|
|
19
|
+
// packages/react/use-previous/src/use-previous.tsx
|
|
20
|
+
function usePrevious(value) {
|
|
21
|
+
const ref = React__namespace.useRef({ value, previous: value });
|
|
22
|
+
return React__namespace.useMemo(() => {
|
|
23
|
+
if (ref.current.value !== value) {
|
|
24
|
+
ref.current.previous = ref.current.value;
|
|
25
|
+
ref.current.value = value;
|
|
26
|
+
}
|
|
27
|
+
return ref.current.previous;
|
|
28
|
+
}, [value]);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
exports.usePrevious = usePrevious;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
// packages/react/use-previous/src/use-previous.tsx
|
|
4
|
+
function usePrevious(value) {
|
|
5
|
+
const ref = React.useRef({ value, previous: value });
|
|
6
|
+
return React.useMemo(() => {
|
|
7
|
+
if (ref.current.value !== value) {
|
|
8
|
+
ref.current.previous = ref.current.value;
|
|
9
|
+
ref.current.value = value;
|
|
10
|
+
}
|
|
11
|
+
return ref.current.previous;
|
|
12
|
+
}, [value]);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { usePrevious };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const React = require('react');
|
|
4
|
+
const index = require('../../../../../@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');
|
|
5
|
+
|
|
6
|
+
function _interopNamespaceCompat(e) {
|
|
7
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
8
|
+
const n = Object.create(null);
|
|
9
|
+
if (e) {
|
|
10
|
+
for (const k in e) {
|
|
11
|
+
n[k] = e[k];
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
n.default = e;
|
|
15
|
+
return n;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
19
|
+
|
|
20
|
+
// packages/react/use-size/src/use-size.tsx
|
|
21
|
+
function useSize(element) {
|
|
22
|
+
const [size, setSize] = React__namespace.useState(void 0);
|
|
23
|
+
index.useLayoutEffect(() => {
|
|
24
|
+
if (element) {
|
|
25
|
+
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
26
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
27
|
+
if (!Array.isArray(entries)) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (!entries.length) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const entry = entries[0];
|
|
34
|
+
let width;
|
|
35
|
+
let height;
|
|
36
|
+
if ("borderBoxSize" in entry) {
|
|
37
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
|
38
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
39
|
+
width = borderSize["inlineSize"];
|
|
40
|
+
height = borderSize["blockSize"];
|
|
41
|
+
} else {
|
|
42
|
+
width = element.offsetWidth;
|
|
43
|
+
height = element.offsetHeight;
|
|
44
|
+
}
|
|
45
|
+
setSize({ width, height });
|
|
46
|
+
});
|
|
47
|
+
resizeObserver.observe(element, { box: "border-box" });
|
|
48
|
+
return () => resizeObserver.unobserve(element);
|
|
49
|
+
} else {
|
|
50
|
+
setSize(void 0);
|
|
51
|
+
}
|
|
52
|
+
}, [element]);
|
|
53
|
+
return size;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
exports.useSize = useSize;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useLayoutEffect as useLayoutEffect2 } from '../../../../../@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';
|
|
3
|
+
|
|
4
|
+
// packages/react/use-size/src/use-size.tsx
|
|
5
|
+
function useSize(element) {
|
|
6
|
+
const [size, setSize] = React.useState(void 0);
|
|
7
|
+
useLayoutEffect2(() => {
|
|
8
|
+
if (element) {
|
|
9
|
+
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
10
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
11
|
+
if (!Array.isArray(entries)) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (!entries.length) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const entry = entries[0];
|
|
18
|
+
let width;
|
|
19
|
+
let height;
|
|
20
|
+
if ("borderBoxSize" in entry) {
|
|
21
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
|
22
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
23
|
+
width = borderSize["inlineSize"];
|
|
24
|
+
height = borderSize["blockSize"];
|
|
25
|
+
} else {
|
|
26
|
+
width = element.offsetWidth;
|
|
27
|
+
height = element.offsetHeight;
|
|
28
|
+
}
|
|
29
|
+
setSize({ width, height });
|
|
30
|
+
});
|
|
31
|
+
resizeObserver.observe(element, { box: "border-box" });
|
|
32
|
+
return () => resizeObserver.unobserve(element);
|
|
33
|
+
} else {
|
|
34
|
+
setSize(void 0);
|
|
35
|
+
}
|
|
36
|
+
}, [element]);
|
|
37
|
+
return size;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { useSize };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const React = require('react');
|
|
4
|
+
const index = require('../../../../../@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');
|
|
5
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
function _interopNamespaceCompat(e) {
|
|
8
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
9
|
+
const n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
for (const k in e) {
|
|
12
|
+
n[k] = e[k];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
n.default = e;
|
|
16
|
+
return n;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
20
|
+
|
|
21
|
+
// src/visually-hidden.tsx
|
|
22
|
+
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
23
|
+
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
24
|
+
position: "absolute",
|
|
25
|
+
border: 0,
|
|
26
|
+
width: 1,
|
|
27
|
+
height: 1,
|
|
28
|
+
padding: 0,
|
|
29
|
+
margin: -1,
|
|
30
|
+
overflow: "hidden",
|
|
31
|
+
clip: "rect(0, 0, 0, 0)",
|
|
32
|
+
whiteSpace: "nowrap",
|
|
33
|
+
wordWrap: "normal"
|
|
34
|
+
});
|
|
35
|
+
var NAME = "VisuallyHidden";
|
|
36
|
+
var VisuallyHidden = React__namespace.forwardRef(
|
|
37
|
+
(props, forwardedRef) => {
|
|
38
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
39
|
+
index.Primitive.span,
|
|
40
|
+
{
|
|
41
|
+
...props,
|
|
42
|
+
ref: forwardedRef,
|
|
43
|
+
style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
VisuallyHidden.displayName = NAME;
|
|
49
|
+
|
|
50
|
+
exports.VISUALLY_HIDDEN_STYLES = VISUALLY_HIDDEN_STYLES;
|
|
51
|
+
exports.VisuallyHidden = VisuallyHidden;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Primitive } from '../../../../../@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';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
// src/visually-hidden.tsx
|
|
6
|
+
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
7
|
+
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
8
|
+
position: "absolute",
|
|
9
|
+
border: 0,
|
|
10
|
+
width: 1,
|
|
11
|
+
height: 1,
|
|
12
|
+
padding: 0,
|
|
13
|
+
margin: -1,
|
|
14
|
+
overflow: "hidden",
|
|
15
|
+
clip: "rect(0, 0, 0, 0)",
|
|
16
|
+
whiteSpace: "nowrap",
|
|
17
|
+
wordWrap: "normal"
|
|
18
|
+
});
|
|
19
|
+
var NAME = "VisuallyHidden";
|
|
20
|
+
var VisuallyHidden = React.forwardRef(
|
|
21
|
+
(props, forwardedRef) => {
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
Primitive.span,
|
|
24
|
+
{
|
|
25
|
+
...props,
|
|
26
|
+
ref: forwardedRef,
|
|
27
|
+
style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
VisuallyHidden.displayName = NAME;
|
|
33
|
+
|
|
34
|
+
export { VISUALLY_HIDDEN_STYLES, VisuallyHidden };
|
package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.cjs
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var getDefaultParent = function (originalTarget) {
|
|
4
|
+
if (typeof document === 'undefined') {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
7
|
+
var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
|
|
8
|
+
return sampleTarget.ownerDocument.body;
|
|
9
|
+
};
|
|
10
|
+
var counterMap = new WeakMap();
|
|
11
|
+
var uncontrolledNodes = new WeakMap();
|
|
12
|
+
var markerMap = {};
|
|
13
|
+
var lockCount = 0;
|
|
14
|
+
var unwrapHost = function (node) {
|
|
15
|
+
return node && (node.host || unwrapHost(node.parentNode));
|
|
16
|
+
};
|
|
17
|
+
var correctTargets = function (parent, targets) {
|
|
18
|
+
return targets
|
|
19
|
+
.map(function (target) {
|
|
20
|
+
if (parent.contains(target)) {
|
|
21
|
+
return target;
|
|
22
|
+
}
|
|
23
|
+
var correctedTarget = unwrapHost(target);
|
|
24
|
+
if (correctedTarget && parent.contains(correctedTarget)) {
|
|
25
|
+
return correctedTarget;
|
|
26
|
+
}
|
|
27
|
+
console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');
|
|
28
|
+
return null;
|
|
29
|
+
})
|
|
30
|
+
.filter(function (x) { return Boolean(x); });
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Marks everything except given node(or nodes) as aria-hidden
|
|
34
|
+
* @param {Element | Element[]} originalTarget - elements to keep on the page
|
|
35
|
+
* @param [parentNode] - top element, defaults to document.body
|
|
36
|
+
* @param {String} [markerName] - a special attribute to mark every node
|
|
37
|
+
* @param {String} [controlAttribute] - html Attribute to control
|
|
38
|
+
* @return {Undo} undo command
|
|
39
|
+
*/
|
|
40
|
+
var applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {
|
|
41
|
+
var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
42
|
+
if (!markerMap[markerName]) {
|
|
43
|
+
markerMap[markerName] = new WeakMap();
|
|
44
|
+
}
|
|
45
|
+
var markerCounter = markerMap[markerName];
|
|
46
|
+
var hiddenNodes = [];
|
|
47
|
+
var elementsToKeep = new Set();
|
|
48
|
+
var elementsToStop = new Set(targets);
|
|
49
|
+
var keep = function (el) {
|
|
50
|
+
if (!el || elementsToKeep.has(el)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
elementsToKeep.add(el);
|
|
54
|
+
keep(el.parentNode);
|
|
55
|
+
};
|
|
56
|
+
targets.forEach(keep);
|
|
57
|
+
var deep = function (parent) {
|
|
58
|
+
if (!parent || elementsToStop.has(parent)) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
Array.prototype.forEach.call(parent.children, function (node) {
|
|
62
|
+
if (elementsToKeep.has(node)) {
|
|
63
|
+
deep(node);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
try {
|
|
67
|
+
var attr = node.getAttribute(controlAttribute);
|
|
68
|
+
var alreadyHidden = attr !== null && attr !== 'false';
|
|
69
|
+
var counterValue = (counterMap.get(node) || 0) + 1;
|
|
70
|
+
var markerValue = (markerCounter.get(node) || 0) + 1;
|
|
71
|
+
counterMap.set(node, counterValue);
|
|
72
|
+
markerCounter.set(node, markerValue);
|
|
73
|
+
hiddenNodes.push(node);
|
|
74
|
+
if (counterValue === 1 && alreadyHidden) {
|
|
75
|
+
uncontrolledNodes.set(node, true);
|
|
76
|
+
}
|
|
77
|
+
if (markerValue === 1) {
|
|
78
|
+
node.setAttribute(markerName, 'true');
|
|
79
|
+
}
|
|
80
|
+
if (!alreadyHidden) {
|
|
81
|
+
node.setAttribute(controlAttribute, 'true');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
catch (e) {
|
|
85
|
+
console.error('aria-hidden: cannot operate on ', node, e);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
deep(parentNode);
|
|
91
|
+
elementsToKeep.clear();
|
|
92
|
+
lockCount++;
|
|
93
|
+
return function () {
|
|
94
|
+
hiddenNodes.forEach(function (node) {
|
|
95
|
+
var counterValue = counterMap.get(node) - 1;
|
|
96
|
+
var markerValue = markerCounter.get(node) - 1;
|
|
97
|
+
counterMap.set(node, counterValue);
|
|
98
|
+
markerCounter.set(node, markerValue);
|
|
99
|
+
if (!counterValue) {
|
|
100
|
+
if (!uncontrolledNodes.has(node)) {
|
|
101
|
+
node.removeAttribute(controlAttribute);
|
|
102
|
+
}
|
|
103
|
+
uncontrolledNodes.delete(node);
|
|
104
|
+
}
|
|
105
|
+
if (!markerValue) {
|
|
106
|
+
node.removeAttribute(markerName);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
lockCount--;
|
|
110
|
+
if (!lockCount) {
|
|
111
|
+
// clear
|
|
112
|
+
counterMap = new WeakMap();
|
|
113
|
+
counterMap = new WeakMap();
|
|
114
|
+
uncontrolledNodes = new WeakMap();
|
|
115
|
+
markerMap = {};
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Marks everything except given node(or nodes) as aria-hidden
|
|
121
|
+
* @param {Element | Element[]} originalTarget - elements to keep on the page
|
|
122
|
+
* @param [parentNode] - top element, defaults to document.body
|
|
123
|
+
* @param {String} [markerName] - a special attribute to mark every node
|
|
124
|
+
* @return {Undo} undo command
|
|
125
|
+
*/
|
|
126
|
+
var hideOthers = function (originalTarget, parentNode, markerName) {
|
|
127
|
+
if (markerName === void 0) { markerName = 'data-aria-hidden'; }
|
|
128
|
+
var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
129
|
+
var activeParentNode = getDefaultParent(originalTarget);
|
|
130
|
+
if (!activeParentNode) {
|
|
131
|
+
return function () { return null; };
|
|
132
|
+
}
|
|
133
|
+
// we should not hide aria-live elements - https://github.com/theKashey/aria-hidden/issues/10
|
|
134
|
+
// and script elements, as they have no impact on accessibility.
|
|
135
|
+
targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live], script')));
|
|
136
|
+
return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
exports.hideOthers = hideOthers;
|