@btst/stack 1.3.1 → 1.4.1
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 +85 -37
- package/dist/node_modules/.pnpm/@radix-ui_react-accordion@1.2.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_947719a27ff11ec6f09710dd9e85efc5/node_modules/@radix-ui/react-accordion/dist/index.cjs +321 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-accordion@1.2.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_947719a27ff11ec6f09710dd9e85efc5/node_modules/@radix-ui/react-accordion/dist/index.mjs +306 -0
- package/dist/node_modules/.pnpm/{@radix-ui_react-alert-dialog@1.1.15_@types_react-dom@19.2.2_@types_react@19.2.2__@types_ec789942cd38340bd7362c09e7d34384 → @radix-ui_react-alert-dialog@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_4f58c757aa677e233cf96d60fda2f1da}/node_modules/@radix-ui/react-alert-dialog/dist/index.cjs +2 -2
- package/dist/node_modules/.pnpm/{@radix-ui_react-alert-dialog@1.1.15_@types_react-dom@19.2.2_@types_react@19.2.2__@types_ec789942cd38340bd7362c09e7d34384 → @radix-ui_react-alert-dialog@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_4f58c757aa677e233cf96d60fda2f1da}/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs +2 -2
- 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 → @radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_35df44f6d87656c1401686c91d770dbb}/node_modules/@radix-ui/react-arrow/dist/index.cjs +1 -1
- 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 → @radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_35df44f6d87656c1401686c91d770dbb}/node_modules/@radix-ui/react-arrow/dist/index.mjs +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types__d025a77f62ee83ca6bd8b0ea1f9de738/node_modules/@radix-ui/react-collapsible/dist/index.cjs +168 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types__d025a77f62ee83ca6bd8b0ea1f9de738/node_modules/@radix-ui/react-collapsible/dist/index.mjs +146 -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 → @radix-ui_react-collection@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_59aa5e150e70a3e7bfb1567148b021b5}/node_modules/@radix-ui/react-collection/dist/index.cjs +2 -2
- 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 → @radix-ui_react-collection@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_59aa5e150e70a3e7bfb1567148b021b5}/node_modules/@radix-ui/react-collection/dist/index.mjs +2 -2
- 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 → @radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@_9ee1db7daf927866cf505b31d40047ad}/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +4 -4
- 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 → @radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@_9ee1db7daf927866cf505b31d40047ad}/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +4 -4
- package/dist/node_modules/.pnpm/@radix-ui_react-dropdown-menu@2.1.16_@types_react-dom@19.2.3_@types_react@19.2.6__@type_a50051c7210b6fbd5be09388bda08578/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs +282 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dropdown-menu@2.1.16_@types_react-dom@19.2.3_@types_react@19.2.6__@type_a50051c7210b6fbd5be09388bda08578/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs +247 -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 → @radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_0a31b7f987af9482d13505312e1a1be9}/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +3 -3
- 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 → @radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_0a31b7f987af9482d13505312e1a1be9}/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +3 -3
- package/dist/node_modules/.pnpm/{@radix-ui_react-id@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-id@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-id/dist/index.cjs +1 -1
- package/dist/node_modules/.pnpm/{@radix-ui_react-id@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-id@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-id/dist/index.mjs +1 -1
- package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.16_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_82ed1fcd848b6984d9291a784d477cf4/node_modules/@radix-ui/react-menu/dist/index.cjs +845 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.16_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_82ed1fcd848b6984d9291a784d477cf4/node_modules/@radix-ui/react-menu/dist/index.mjs +799 -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 → @radix-ui_react-popper@1.2.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_7ac2caae1e39f9ba93d5015614525161}/node_modules/@radix-ui/react-popper/dist/index.cjs +7 -7
- 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 → @radix-ui_react-popper@1.2.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_7ac2caae1e39f9ba93d5015614525161}/node_modules/@radix-ui/react-popper/dist/index.mjs +7 -7
- 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 → @radix-ui_react-portal@1.1.9_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_1bb4e0f97f86496802d28a2e74e2a8b9}/node_modules/@radix-ui/react-portal/dist/index.cjs +2 -2
- 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 → @radix-ui_react-portal@1.1.9_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_1bb4e0f97f86496802d28a2e74e2a8b9}/node_modules/@radix-ui/react-portal/dist/index.mjs +2 -2
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_90f8e5c12233caef3399d5fd66452a13/node_modules/@radix-ui/react-presence/dist/index.cjs +147 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_90f8e5c12233caef3399d5fd66452a13/node_modules/@radix-ui/react-presence/dist/index.mjs +131 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@types_fe1151d1f393bbc1072b24a86dff3a23/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +244 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@types_fe1151d1f393bbc1072b24a86dff3a23/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +224 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-scroll-area@1.2.10_@types_react-dom@19.2.3_@types_react@19.2.6__@types__e3f7735e9b444a10b3bbfd9fe97d44d0/node_modules/@radix-ui/react-scroll-area/dist/index.cjs +742 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-scroll-area@1.2.10_@types_react-dom@19.2.3_@types_react@19.2.6__@types__e3f7735e9b444a10b3bbfd9fe97d44d0/node_modules/@radix-ui/react-scroll-area/dist/index.mjs +719 -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 → @radix-ui_react-select@2.2.6_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_38dc681bb1f2bcfeb5249d8ca2bc01f5}/node_modules/@radix-ui/react-select/dist/index.cjs +17 -17
- 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 → @radix-ui_react-select@2.2.6_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_38dc681bb1f2bcfeb5249d8ca2bc01f5}/node_modules/@radix-ui/react-select/dist/index.mjs +17 -17
- package/dist/node_modules/.pnpm/{@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +1 -1
- package/dist/node_modules/.pnpm/{@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +1 -1
- package/dist/node_modules/.pnpm/{@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +1 -1
- package/dist/node_modules/.pnpm/{@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs +1 -1
- package/dist/node_modules/.pnpm/{@radix-ui_react-use-size@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-size@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-size/dist/index.cjs +1 -1
- package/dist/node_modules/.pnpm/{@radix-ui_react-use-size@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-size@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-size/dist/index.mjs +1 -1
- 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 → @radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.3_@types_react@19.2.6__@typ_f453379bbd5a4932ec515167f81be42a}/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +1 -1
- 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 → @radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.3_@types_react@19.2.6__@typ_f453379bbd5a4932ec515167f81be42a}/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs +1 -1
- package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +1 -1
- package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/component.mjs +1 -1
- package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +2 -2
- package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/SideEffect.mjs +2 -2
- package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/UI.cjs +2 -2
- package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/UI.mjs +2 -2
- package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/medium.cjs +1 -1
- package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/medium.mjs +1 -1
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_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 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/sidecar.mjs +1 -1
- package/dist/packages/better-stack/src/plugins/ai-chat/api/plugin.cjs +610 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/api/plugin.mjs +608 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-input.cjs +221 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-input.mjs +219 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.cjs +341 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.mjs +339 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-layout.cjs +135 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-layout.mjs +133 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-message.cjs +429 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-message.mjs +423 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.cjs +227 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.mjs +225 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.cjs +31 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.mjs +29 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/index.cjs +11 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/index.mjs +8 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/404-page.cjs +18 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/404-page.mjs +16 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.cjs +39 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.internal.cjs +22 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.internal.mjs +20 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.mjs +37 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/default-error.cjs +18 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/default-error.mjs +16 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/error-placeholder.cjs +26 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/error-placeholder.mjs +24 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/tool-call-display.cjs +123 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/tool-call-display.mjs +121 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/hooks/chat-hooks.cjs +199 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/hooks/chat-hooks.mjs +191 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/localization/index.cjs +63 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/localization/index.mjs +61 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/overrides.cjs +14 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/overrides.mjs +11 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/plugin.cjs +241 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/plugin.mjs +239 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/db.cjs +65 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/db.mjs +63 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/schemas.cjs +42 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/schemas.mjs +38 -0
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/markdown-content.cjs +12 -309
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/markdown-content.mjs +13 -303
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.cjs +2 -2
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.mjs +2 -2
- package/dist/packages/ui/src/components/accordion.cjs +67 -0
- package/dist/packages/ui/src/components/accordion.mjs +62 -0
- package/dist/packages/ui/src/components/alert-dialog.cjs +1 -1
- package/dist/packages/ui/src/components/alert-dialog.mjs +1 -1
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared/better-blog-attribution.cjs → ui/src/components/better-stack-attribution.cjs} +3 -3
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared/better-blog-attribution.mjs → ui/src/components/better-stack-attribution.mjs} +3 -3
- package/dist/packages/ui/src/components/dialog.cjs +14 -0
- package/dist/packages/ui/src/components/dialog.mjs +14 -1
- package/dist/packages/ui/src/components/dropdown-menu.cjs +67 -0
- package/dist/packages/ui/src/components/dropdown-menu.mjs +62 -0
- package/dist/packages/ui/src/components/markdown-content.cjs +306 -0
- package/dist/packages/ui/src/components/markdown-content.mjs +297 -0
- package/dist/packages/ui/src/components/scroll-area.cjs +63 -0
- package/dist/packages/ui/src/components/scroll-area.mjs +60 -0
- package/dist/packages/ui/src/components/select.cjs +1 -1
- package/dist/packages/ui/src/components/select.mjs +1 -1
- package/dist/packages/ui/src/components/sheet.cjs +87 -0
- package/dist/packages/ui/src/components/sheet.mjs +69 -0
- package/dist/plugins/ai-chat/api/index.cjs +9 -0
- package/dist/plugins/ai-chat/api/index.d.cts +9 -0
- package/dist/plugins/ai-chat/api/index.d.mts +9 -0
- package/dist/plugins/ai-chat/api/index.d.ts +9 -0
- package/dist/plugins/ai-chat/api/index.mjs +2 -0
- package/dist/plugins/ai-chat/client/components/index.cjs +29 -0
- package/dist/plugins/ai-chat/client/components/index.d.cts +30 -0
- package/dist/plugins/ai-chat/client/components/index.d.mts +30 -0
- package/dist/plugins/ai-chat/client/components/index.d.ts +30 -0
- package/dist/plugins/ai-chat/client/components/index.mjs +12 -0
- package/dist/plugins/ai-chat/client/hooks/index.cjs +13 -0
- package/dist/plugins/ai-chat/client/hooks/index.d.cts +98 -0
- package/dist/plugins/ai-chat/client/hooks/index.d.mts +98 -0
- package/dist/plugins/ai-chat/client/hooks/index.d.ts +98 -0
- package/dist/plugins/ai-chat/client/hooks/index.mjs +1 -0
- package/dist/plugins/ai-chat/client/index.cjs +21 -0
- package/dist/plugins/ai-chat/client/index.d.cts +156 -0
- package/dist/plugins/ai-chat/client/index.d.mts +156 -0
- package/dist/plugins/ai-chat/client/index.d.ts +156 -0
- package/dist/plugins/ai-chat/client/index.mjs +8 -0
- package/dist/plugins/ai-chat/client.css +6 -0
- package/dist/plugins/ai-chat/query-keys.cjs +60 -0
- package/dist/plugins/ai-chat/query-keys.d.cts +478 -0
- package/dist/plugins/ai-chat/query-keys.d.mts +478 -0
- package/dist/plugins/ai-chat/query-keys.d.ts +478 -0
- package/dist/plugins/ai-chat/query-keys.mjs +58 -0
- package/dist/plugins/ai-chat/style.css +19 -0
- 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/client/components/shared/markdown-content-styles.css +91 -62
- package/dist/plugins/blog/client/hooks/index.d.cts +4 -4
- package/dist/plugins/blog/client/hooks/index.d.mts +4 -4
- package/dist/plugins/blog/client/hooks/index.d.ts +4 -4
- 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/query-keys.d.cts +7 -7
- package/dist/plugins/blog/query-keys.d.mts +7 -7
- package/dist/plugins/blog/query-keys.d.ts +7 -7
- package/dist/shared/stack.Be1QIHEn.d.cts +23 -0
- package/dist/shared/stack.Be1QIHEn.d.mts +23 -0
- package/dist/shared/stack.Be1QIHEn.d.ts +23 -0
- package/dist/shared/stack.DaOcgmrM.d.cts +323 -0
- package/dist/shared/stack.DaOcgmrM.d.mts +323 -0
- package/dist/shared/stack.DaOcgmrM.d.ts +323 -0
- package/package.json +59 -1
- package/src/plugins/ai-chat/api/index.ts +2 -0
- package/src/plugins/ai-chat/api/plugin.ts +1083 -0
- package/src/plugins/ai-chat/client/components/chat-input.tsx +295 -0
- package/src/plugins/ai-chat/client/components/chat-interface.tsx +494 -0
- package/src/plugins/ai-chat/client/components/chat-layout.tsx +175 -0
- package/src/plugins/ai-chat/client/components/chat-message.tsx +561 -0
- package/src/plugins/ai-chat/client/components/chat-sidebar.tsx +296 -0
- package/src/plugins/ai-chat/client/components/index.ts +18 -0
- package/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.tsx +57 -0
- package/src/plugins/ai-chat/client/components/loading/index.tsx +11 -0
- package/src/plugins/ai-chat/client/components/pages/404-page.tsx +27 -0
- package/src/plugins/ai-chat/client/components/pages/chat-page.internal.tsx +31 -0
- package/src/plugins/ai-chat/client/components/pages/chat-page.tsx +46 -0
- package/src/plugins/ai-chat/client/components/shared/default-error.tsx +28 -0
- package/src/plugins/ai-chat/client/components/shared/error-placeholder.tsx +22 -0
- package/src/plugins/ai-chat/client/components/tool-call-display.tsx +197 -0
- package/src/plugins/ai-chat/client/hooks/chat-hooks.tsx +349 -0
- package/src/plugins/ai-chat/client/hooks/index.tsx +1 -0
- package/src/plugins/ai-chat/client/index.ts +25 -0
- package/src/plugins/ai-chat/client/localization/index.ts +156 -0
- package/src/plugins/ai-chat/client/overrides.ts +241 -0
- package/src/plugins/ai-chat/client/plugin.tsx +449 -0
- package/src/plugins/ai-chat/client.css +6 -0
- package/src/plugins/ai-chat/db.ts +65 -0
- package/src/plugins/ai-chat/query-keys.ts +87 -0
- package/src/plugins/ai-chat/schemas.ts +40 -0
- package/src/plugins/ai-chat/style.css +19 -0
- package/src/plugins/ai-chat/types.ts +29 -0
- package/src/plugins/blog/client/components/shared/markdown-content-styles.css +91 -62
- package/src/plugins/blog/client/components/shared/markdown-content.tsx +19 -427
- package/src/plugins/blog/client/components/shared/page-wrapper.tsx +2 -2
- 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 +0 -9
- package/src/plugins/blog/client/components/shared/better-blog-attribution.tsx +0 -19
- package/dist/node_modules/.pnpm/{@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +0 -0
- package/dist/node_modules/.pnpm/{@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +0 -0
- package/dist/node_modules/.pnpm/{@radix-ui_react-context@1.1.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-context/dist/index.cjs +0 -0
- package/dist/node_modules/.pnpm/{@radix-ui_react-context@1.1.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-context/dist/index.mjs +0 -0
- package/dist/node_modules/.pnpm/{@radix-ui_react-direction@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-direction@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-direction/dist/index.cjs +0 -0
- package/dist/node_modules/.pnpm/{@radix-ui_react-direction@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-direction@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-direction/dist/index.mjs +0 -0
- package/dist/node_modules/.pnpm/{@radix-ui_react-focus-guards@1.1.3_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-focus-guards@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +0 -0
- package/dist/node_modules/.pnpm/{@radix-ui_react-focus-guards@1.1.3_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-focus-guards@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +0 -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 → @radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596}/node_modules/@radix-ui/react-primitive/dist/index.cjs +0 -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 → @radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596}/node_modules/@radix-ui/react-primitive/dist/index.mjs +0 -0
- package/dist/node_modules/.pnpm/{@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +0 -0
- package/dist/node_modules/.pnpm/{@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +0 -0
- package/dist/node_modules/.pnpm/{@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +0 -0
- package/dist/node_modules/.pnpm/{@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +0 -0
- package/dist/node_modules/.pnpm/{@radix-ui_react-use-previous@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-previous@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-previous/dist/index.cjs +0 -0
- package/dist/node_modules/.pnpm/{@radix-ui_react-use-previous@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-previous@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-previous/dist/index.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/constants.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/utils.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/Combination.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/handleScroll.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/component.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/component.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/hook.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/hook.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/singleton.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/singleton.mjs +0 -0
- package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +0 -0
- package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/assignRef.mjs +0 -0
- package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +0 -0
- package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/useMergeRef.mjs +0 -0
- package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/useRef.cjs +0 -0
- package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/useRef.mjs +0 -0
- package/dist/node_modules/.pnpm/{use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0 → use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-sidecar/dist/es2015/exports.cjs +0 -0
- package/dist/node_modules/.pnpm/{use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0 → use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-sidecar/dist/es2015/exports.mjs +0 -0
- package/dist/node_modules/.pnpm/{use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0 → use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-sidecar/dist/es2015/medium.cjs +0 -0
- package/dist/node_modules/.pnpm/{use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0 → use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-sidecar/dist/es2015/medium.mjs +0 -0
- package/dist/shared/{stack.CbuN2zVV.d.ts → stack.CcI4sYJP.d.cts} +3 -3
- package/dist/shared/{stack.CbuN2zVV.d.cts → stack.CcI4sYJP.d.mts} +3 -3
- package/dist/shared/{stack.CbuN2zVV.d.mts → stack.CcI4sYJP.d.ts} +3 -3
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { createContextScope } from '../../../../../@radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.mjs';
|
|
4
|
+
import { createCollection } from '../../../../../@radix-ui_react-collection@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_59aa5e150e70a3e7bfb1567148b021b5/node_modules/@radix-ui/react-collection/dist/index.mjs';
|
|
5
|
+
import { useComposedRefs } from '../../../../../@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs';
|
|
6
|
+
import { composeEventHandlers } from '../../../../../@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs';
|
|
7
|
+
import { useControllableState } from '../../../../../@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs';
|
|
8
|
+
import { Primitive } from '../../../../../@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596/node_modules/@radix-ui/react-primitive/dist/index.mjs';
|
|
9
|
+
import { createCollapsibleScope, Root, Trigger, Content } from '../../../../../@radix-ui_react-collapsible@1.1.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types__d025a77f62ee83ca6bd8b0ea1f9de738/node_modules/@radix-ui/react-collapsible/dist/index.mjs';
|
|
10
|
+
import { useId } from '../../../../../@radix-ui_react-id@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-id/dist/index.mjs';
|
|
11
|
+
import { useDirection } from '../../../../../@radix-ui_react-direction@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-direction/dist/index.mjs';
|
|
12
|
+
import { jsx } from 'react/jsx-runtime';
|
|
13
|
+
|
|
14
|
+
var ACCORDION_NAME = "Accordion";
|
|
15
|
+
var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"];
|
|
16
|
+
var [Collection, useCollection, createCollectionScope] = createCollection(ACCORDION_NAME);
|
|
17
|
+
var [createAccordionContext] = createContextScope(ACCORDION_NAME, [
|
|
18
|
+
createCollectionScope,
|
|
19
|
+
createCollapsibleScope
|
|
20
|
+
]);
|
|
21
|
+
var useCollapsibleScope = createCollapsibleScope();
|
|
22
|
+
var Accordion = React__default.forwardRef(
|
|
23
|
+
(props, forwardedRef) => {
|
|
24
|
+
const { type, ...accordionProps } = props;
|
|
25
|
+
const singleProps = accordionProps;
|
|
26
|
+
const multipleProps = accordionProps;
|
|
27
|
+
return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeAccordion, children: type === "multiple" ? /* @__PURE__ */ jsx(AccordionImplMultiple, { ...multipleProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(AccordionImplSingle, { ...singleProps, ref: forwardedRef }) });
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
Accordion.displayName = ACCORDION_NAME;
|
|
31
|
+
var [AccordionValueProvider, useAccordionValueContext] = createAccordionContext(ACCORDION_NAME);
|
|
32
|
+
var [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext(
|
|
33
|
+
ACCORDION_NAME,
|
|
34
|
+
{ collapsible: false }
|
|
35
|
+
);
|
|
36
|
+
var AccordionImplSingle = React__default.forwardRef(
|
|
37
|
+
(props, forwardedRef) => {
|
|
38
|
+
const {
|
|
39
|
+
value: valueProp,
|
|
40
|
+
defaultValue,
|
|
41
|
+
onValueChange = () => {
|
|
42
|
+
},
|
|
43
|
+
collapsible = false,
|
|
44
|
+
...accordionSingleProps
|
|
45
|
+
} = props;
|
|
46
|
+
const [value, setValue] = useControllableState({
|
|
47
|
+
prop: valueProp,
|
|
48
|
+
defaultProp: defaultValue ?? "",
|
|
49
|
+
onChange: onValueChange,
|
|
50
|
+
caller: ACCORDION_NAME
|
|
51
|
+
});
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
AccordionValueProvider,
|
|
54
|
+
{
|
|
55
|
+
scope: props.__scopeAccordion,
|
|
56
|
+
value: React__default.useMemo(() => value ? [value] : [], [value]),
|
|
57
|
+
onItemOpen: setValue,
|
|
58
|
+
onItemClose: React__default.useCallback(() => collapsible && setValue(""), [collapsible, setValue]),
|
|
59
|
+
children: /* @__PURE__ */ jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ jsx(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
var AccordionImplMultiple = React__default.forwardRef((props, forwardedRef) => {
|
|
65
|
+
const {
|
|
66
|
+
value: valueProp,
|
|
67
|
+
defaultValue,
|
|
68
|
+
onValueChange = () => {
|
|
69
|
+
},
|
|
70
|
+
...accordionMultipleProps
|
|
71
|
+
} = props;
|
|
72
|
+
const [value, setValue] = useControllableState({
|
|
73
|
+
prop: valueProp,
|
|
74
|
+
defaultProp: defaultValue ?? [],
|
|
75
|
+
onChange: onValueChange,
|
|
76
|
+
caller: ACCORDION_NAME
|
|
77
|
+
});
|
|
78
|
+
const handleItemOpen = React__default.useCallback(
|
|
79
|
+
(itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
|
|
80
|
+
[setValue]
|
|
81
|
+
);
|
|
82
|
+
const handleItemClose = React__default.useCallback(
|
|
83
|
+
(itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
|
|
84
|
+
[setValue]
|
|
85
|
+
);
|
|
86
|
+
return /* @__PURE__ */ jsx(
|
|
87
|
+
AccordionValueProvider,
|
|
88
|
+
{
|
|
89
|
+
scope: props.__scopeAccordion,
|
|
90
|
+
value,
|
|
91
|
+
onItemOpen: handleItemOpen,
|
|
92
|
+
onItemClose: handleItemClose,
|
|
93
|
+
children: /* @__PURE__ */ jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: true, children: /* @__PURE__ */ jsx(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) })
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
var [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME);
|
|
98
|
+
var AccordionImpl = React__default.forwardRef(
|
|
99
|
+
(props, forwardedRef) => {
|
|
100
|
+
const { __scopeAccordion, disabled, dir, orientation = "vertical", ...accordionProps } = props;
|
|
101
|
+
const accordionRef = React__default.useRef(null);
|
|
102
|
+
const composedRefs = useComposedRefs(accordionRef, forwardedRef);
|
|
103
|
+
const getItems = useCollection(__scopeAccordion);
|
|
104
|
+
const direction = useDirection(dir);
|
|
105
|
+
const isDirectionLTR = direction === "ltr";
|
|
106
|
+
const handleKeyDown = composeEventHandlers(props.onKeyDown, (event) => {
|
|
107
|
+
if (!ACCORDION_KEYS.includes(event.key)) return;
|
|
108
|
+
const target = event.target;
|
|
109
|
+
const triggerCollection = getItems().filter((item) => !item.ref.current?.disabled);
|
|
110
|
+
const triggerIndex = triggerCollection.findIndex((item) => item.ref.current === target);
|
|
111
|
+
const triggerCount = triggerCollection.length;
|
|
112
|
+
if (triggerIndex === -1) return;
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
let nextIndex = triggerIndex;
|
|
115
|
+
const homeIndex = 0;
|
|
116
|
+
const endIndex = triggerCount - 1;
|
|
117
|
+
const moveNext = () => {
|
|
118
|
+
nextIndex = triggerIndex + 1;
|
|
119
|
+
if (nextIndex > endIndex) {
|
|
120
|
+
nextIndex = homeIndex;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const movePrev = () => {
|
|
124
|
+
nextIndex = triggerIndex - 1;
|
|
125
|
+
if (nextIndex < homeIndex) {
|
|
126
|
+
nextIndex = endIndex;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
switch (event.key) {
|
|
130
|
+
case "Home":
|
|
131
|
+
nextIndex = homeIndex;
|
|
132
|
+
break;
|
|
133
|
+
case "End":
|
|
134
|
+
nextIndex = endIndex;
|
|
135
|
+
break;
|
|
136
|
+
case "ArrowRight":
|
|
137
|
+
if (orientation === "horizontal") {
|
|
138
|
+
if (isDirectionLTR) {
|
|
139
|
+
moveNext();
|
|
140
|
+
} else {
|
|
141
|
+
movePrev();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
break;
|
|
145
|
+
case "ArrowDown":
|
|
146
|
+
if (orientation === "vertical") {
|
|
147
|
+
moveNext();
|
|
148
|
+
}
|
|
149
|
+
break;
|
|
150
|
+
case "ArrowLeft":
|
|
151
|
+
if (orientation === "horizontal") {
|
|
152
|
+
if (isDirectionLTR) {
|
|
153
|
+
movePrev();
|
|
154
|
+
} else {
|
|
155
|
+
moveNext();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
break;
|
|
159
|
+
case "ArrowUp":
|
|
160
|
+
if (orientation === "vertical") {
|
|
161
|
+
movePrev();
|
|
162
|
+
}
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
const clampedIndex = nextIndex % triggerCount;
|
|
166
|
+
triggerCollection[clampedIndex].ref.current?.focus();
|
|
167
|
+
});
|
|
168
|
+
return /* @__PURE__ */ jsx(
|
|
169
|
+
AccordionImplProvider,
|
|
170
|
+
{
|
|
171
|
+
scope: __scopeAccordion,
|
|
172
|
+
disabled,
|
|
173
|
+
direction: dir,
|
|
174
|
+
orientation,
|
|
175
|
+
children: /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx(
|
|
176
|
+
Primitive.div,
|
|
177
|
+
{
|
|
178
|
+
...accordionProps,
|
|
179
|
+
"data-orientation": orientation,
|
|
180
|
+
ref: composedRefs,
|
|
181
|
+
onKeyDown: disabled ? void 0 : handleKeyDown
|
|
182
|
+
}
|
|
183
|
+
) })
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
);
|
|
188
|
+
var ITEM_NAME = "AccordionItem";
|
|
189
|
+
var [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME);
|
|
190
|
+
var AccordionItem = React__default.forwardRef(
|
|
191
|
+
(props, forwardedRef) => {
|
|
192
|
+
const { __scopeAccordion, value, ...accordionItemProps } = props;
|
|
193
|
+
const accordionContext = useAccordionContext(ITEM_NAME, __scopeAccordion);
|
|
194
|
+
const valueContext = useAccordionValueContext(ITEM_NAME, __scopeAccordion);
|
|
195
|
+
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
|
196
|
+
const triggerId = useId();
|
|
197
|
+
const open = value && valueContext.value.includes(value) || false;
|
|
198
|
+
const disabled = accordionContext.disabled || props.disabled;
|
|
199
|
+
return /* @__PURE__ */ jsx(
|
|
200
|
+
AccordionItemProvider,
|
|
201
|
+
{
|
|
202
|
+
scope: __scopeAccordion,
|
|
203
|
+
open,
|
|
204
|
+
disabled,
|
|
205
|
+
triggerId,
|
|
206
|
+
children: /* @__PURE__ */ jsx(
|
|
207
|
+
Root,
|
|
208
|
+
{
|
|
209
|
+
"data-orientation": accordionContext.orientation,
|
|
210
|
+
"data-state": getState(open),
|
|
211
|
+
...collapsibleScope,
|
|
212
|
+
...accordionItemProps,
|
|
213
|
+
ref: forwardedRef,
|
|
214
|
+
disabled,
|
|
215
|
+
open,
|
|
216
|
+
onOpenChange: (open2) => {
|
|
217
|
+
if (open2) {
|
|
218
|
+
valueContext.onItemOpen(value);
|
|
219
|
+
} else {
|
|
220
|
+
valueContext.onItemClose(value);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
)
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
AccordionItem.displayName = ITEM_NAME;
|
|
230
|
+
var HEADER_NAME = "AccordionHeader";
|
|
231
|
+
var AccordionHeader = React__default.forwardRef(
|
|
232
|
+
(props, forwardedRef) => {
|
|
233
|
+
const { __scopeAccordion, ...headerProps } = props;
|
|
234
|
+
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
235
|
+
const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
|
|
236
|
+
return /* @__PURE__ */ jsx(
|
|
237
|
+
Primitive.h3,
|
|
238
|
+
{
|
|
239
|
+
"data-orientation": accordionContext.orientation,
|
|
240
|
+
"data-state": getState(itemContext.open),
|
|
241
|
+
"data-disabled": itemContext.disabled ? "" : void 0,
|
|
242
|
+
...headerProps,
|
|
243
|
+
ref: forwardedRef
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
);
|
|
248
|
+
AccordionHeader.displayName = HEADER_NAME;
|
|
249
|
+
var TRIGGER_NAME = "AccordionTrigger";
|
|
250
|
+
var AccordionTrigger = React__default.forwardRef(
|
|
251
|
+
(props, forwardedRef) => {
|
|
252
|
+
const { __scopeAccordion, ...triggerProps } = props;
|
|
253
|
+
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
254
|
+
const itemContext = useAccordionItemContext(TRIGGER_NAME, __scopeAccordion);
|
|
255
|
+
const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME, __scopeAccordion);
|
|
256
|
+
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
|
257
|
+
return /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx(
|
|
258
|
+
Trigger,
|
|
259
|
+
{
|
|
260
|
+
"aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0,
|
|
261
|
+
"data-orientation": accordionContext.orientation,
|
|
262
|
+
id: itemContext.triggerId,
|
|
263
|
+
...collapsibleScope,
|
|
264
|
+
...triggerProps,
|
|
265
|
+
ref: forwardedRef
|
|
266
|
+
}
|
|
267
|
+
) });
|
|
268
|
+
}
|
|
269
|
+
);
|
|
270
|
+
AccordionTrigger.displayName = TRIGGER_NAME;
|
|
271
|
+
var CONTENT_NAME = "AccordionContent";
|
|
272
|
+
var AccordionContent = React__default.forwardRef(
|
|
273
|
+
(props, forwardedRef) => {
|
|
274
|
+
const { __scopeAccordion, ...contentProps } = props;
|
|
275
|
+
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
|
276
|
+
const itemContext = useAccordionItemContext(CONTENT_NAME, __scopeAccordion);
|
|
277
|
+
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
|
278
|
+
return /* @__PURE__ */ jsx(
|
|
279
|
+
Content,
|
|
280
|
+
{
|
|
281
|
+
role: "region",
|
|
282
|
+
"aria-labelledby": itemContext.triggerId,
|
|
283
|
+
"data-orientation": accordionContext.orientation,
|
|
284
|
+
...collapsibleScope,
|
|
285
|
+
...contentProps,
|
|
286
|
+
ref: forwardedRef,
|
|
287
|
+
style: {
|
|
288
|
+
["--radix-accordion-content-height"]: "var(--radix-collapsible-content-height)",
|
|
289
|
+
["--radix-accordion-content-width"]: "var(--radix-collapsible-content-width)",
|
|
290
|
+
...props.style
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
);
|
|
296
|
+
AccordionContent.displayName = CONTENT_NAME;
|
|
297
|
+
function getState(open) {
|
|
298
|
+
return open ? "open" : "closed";
|
|
299
|
+
}
|
|
300
|
+
var Root2 = Accordion;
|
|
301
|
+
var Item = AccordionItem;
|
|
302
|
+
var Header = AccordionHeader;
|
|
303
|
+
var Trigger2 = AccordionTrigger;
|
|
304
|
+
var Content2 = AccordionContent;
|
|
305
|
+
|
|
306
|
+
export { Accordion, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger, Content2 as Content, Header, Item, Root2 as Root, Trigger2 as Trigger };
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
const React = require('react');
|
|
5
|
-
const index$1 = require('../../../../../@radix-ui_react-context@1.1.2_@types_react@19.2.
|
|
6
|
-
const index = require('../../../../../@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.
|
|
5
|
+
const index$1 = require('../../../../../@radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.cjs');
|
|
6
|
+
const index = require('../../../../../@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.cjs');
|
|
7
7
|
const DialogPrimitive = require('@radix-ui/react-dialog');
|
|
8
8
|
const index$2 = require('../../../../../@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.cjs');
|
|
9
9
|
const reactSlot = require('@radix-ui/react-slot');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { createContextScope } from '../../../../../@radix-ui_react-context@1.1.2_@types_react@19.2.
|
|
4
|
-
import { useComposedRefs } from '../../../../../@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.
|
|
3
|
+
import { createContextScope } from '../../../../../@radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.mjs';
|
|
4
|
+
import { useComposedRefs } from '../../../../../@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs';
|
|
5
5
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
6
6
|
import { createDialogScope } from '@radix-ui/react-dialog';
|
|
7
7
|
import { composeEventHandlers } from '../../../../../@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const React = require('react');
|
|
4
|
-
const index = require('../../../../../@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.
|
|
4
|
+
const index = require('../../../../../@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596/node_modules/@radix-ui/react-primitive/dist/index.cjs');
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
|
|
7
7
|
function _interopNamespaceCompat(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Primitive } from '../../../../../@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.
|
|
2
|
+
import { Primitive } from '../../../../../@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596/node_modules/@radix-ui/react-primitive/dist/index.mjs';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
// src/arrow.tsx
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const React = require('react');
|
|
5
|
+
const index$4 = require('../../../../../@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.cjs');
|
|
6
|
+
const index = require('../../../../../@radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.cjs');
|
|
7
|
+
const index$1 = require('../../../../../@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs');
|
|
8
|
+
const index$7 = require('../../../../../@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs');
|
|
9
|
+
const index$6 = require('../../../../../@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.cjs');
|
|
10
|
+
const index$3 = require('../../../../../@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596/node_modules/@radix-ui/react-primitive/dist/index.cjs');
|
|
11
|
+
const index$5 = require('../../../../../@radix-ui_react-presence@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_90f8e5c12233caef3399d5fd66452a13/node_modules/@radix-ui/react-presence/dist/index.cjs');
|
|
12
|
+
const index$2 = require('../../../../../@radix-ui_react-id@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-id/dist/index.cjs');
|
|
13
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
14
|
+
|
|
15
|
+
function _interopNamespaceCompat(e) {
|
|
16
|
+
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
17
|
+
const n = Object.create(null);
|
|
18
|
+
if (e) {
|
|
19
|
+
for (const k in e) {
|
|
20
|
+
n[k] = e[k];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return n;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
|
|
28
|
+
|
|
29
|
+
var COLLAPSIBLE_NAME = "Collapsible";
|
|
30
|
+
var [createCollapsibleContext, createCollapsibleScope] = index.createContextScope(COLLAPSIBLE_NAME);
|
|
31
|
+
var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
|
|
32
|
+
var Collapsible = React__namespace.forwardRef(
|
|
33
|
+
(props, forwardedRef) => {
|
|
34
|
+
const {
|
|
35
|
+
__scopeCollapsible,
|
|
36
|
+
open: openProp,
|
|
37
|
+
defaultOpen,
|
|
38
|
+
disabled,
|
|
39
|
+
onOpenChange,
|
|
40
|
+
...collapsibleProps
|
|
41
|
+
} = props;
|
|
42
|
+
const [open, setOpen] = index$1.useControllableState({
|
|
43
|
+
prop: openProp,
|
|
44
|
+
defaultProp: defaultOpen ?? false,
|
|
45
|
+
onChange: onOpenChange,
|
|
46
|
+
caller: COLLAPSIBLE_NAME
|
|
47
|
+
});
|
|
48
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
49
|
+
CollapsibleProvider,
|
|
50
|
+
{
|
|
51
|
+
scope: __scopeCollapsible,
|
|
52
|
+
disabled,
|
|
53
|
+
contentId: index$2.useId(),
|
|
54
|
+
open,
|
|
55
|
+
onOpenToggle: React__namespace.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
56
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
57
|
+
index$3.Primitive.div,
|
|
58
|
+
{
|
|
59
|
+
"data-state": getState(open),
|
|
60
|
+
"data-disabled": disabled ? "" : void 0,
|
|
61
|
+
...collapsibleProps,
|
|
62
|
+
ref: forwardedRef
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
Collapsible.displayName = COLLAPSIBLE_NAME;
|
|
70
|
+
var TRIGGER_NAME = "CollapsibleTrigger";
|
|
71
|
+
var CollapsibleTrigger = React__namespace.forwardRef(
|
|
72
|
+
(props, forwardedRef) => {
|
|
73
|
+
const { __scopeCollapsible, ...triggerProps } = props;
|
|
74
|
+
const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);
|
|
75
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
76
|
+
index$3.Primitive.button,
|
|
77
|
+
{
|
|
78
|
+
type: "button",
|
|
79
|
+
"aria-controls": context.contentId,
|
|
80
|
+
"aria-expanded": context.open || false,
|
|
81
|
+
"data-state": getState(context.open),
|
|
82
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
83
|
+
disabled: context.disabled,
|
|
84
|
+
...triggerProps,
|
|
85
|
+
ref: forwardedRef,
|
|
86
|
+
onClick: index$4.composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
CollapsibleTrigger.displayName = TRIGGER_NAME;
|
|
92
|
+
var CONTENT_NAME = "CollapsibleContent";
|
|
93
|
+
var CollapsibleContent = React__namespace.forwardRef(
|
|
94
|
+
(props, forwardedRef) => {
|
|
95
|
+
const { forceMount, ...contentProps } = props;
|
|
96
|
+
const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);
|
|
97
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index$5.Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsxRuntime.jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
CollapsibleContent.displayName = CONTENT_NAME;
|
|
101
|
+
var CollapsibleContentImpl = React__namespace.forwardRef((props, forwardedRef) => {
|
|
102
|
+
const { __scopeCollapsible, present, children, ...contentProps } = props;
|
|
103
|
+
const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);
|
|
104
|
+
const [isPresent, setIsPresent] = React__namespace.useState(present);
|
|
105
|
+
const ref = React__namespace.useRef(null);
|
|
106
|
+
const composedRefs = index$6.useComposedRefs(forwardedRef, ref);
|
|
107
|
+
const heightRef = React__namespace.useRef(0);
|
|
108
|
+
const height = heightRef.current;
|
|
109
|
+
const widthRef = React__namespace.useRef(0);
|
|
110
|
+
const width = widthRef.current;
|
|
111
|
+
const isOpen = context.open || isPresent;
|
|
112
|
+
const isMountAnimationPreventedRef = React__namespace.useRef(isOpen);
|
|
113
|
+
const originalStylesRef = React__namespace.useRef(void 0);
|
|
114
|
+
React__namespace.useEffect(() => {
|
|
115
|
+
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
|
|
116
|
+
return () => cancelAnimationFrame(rAF);
|
|
117
|
+
}, []);
|
|
118
|
+
index$7.useLayoutEffect(() => {
|
|
119
|
+
const node = ref.current;
|
|
120
|
+
if (node) {
|
|
121
|
+
originalStylesRef.current = originalStylesRef.current || {
|
|
122
|
+
transitionDuration: node.style.transitionDuration,
|
|
123
|
+
animationName: node.style.animationName
|
|
124
|
+
};
|
|
125
|
+
node.style.transitionDuration = "0s";
|
|
126
|
+
node.style.animationName = "none";
|
|
127
|
+
const rect = node.getBoundingClientRect();
|
|
128
|
+
heightRef.current = rect.height;
|
|
129
|
+
widthRef.current = rect.width;
|
|
130
|
+
if (!isMountAnimationPreventedRef.current) {
|
|
131
|
+
node.style.transitionDuration = originalStylesRef.current.transitionDuration;
|
|
132
|
+
node.style.animationName = originalStylesRef.current.animationName;
|
|
133
|
+
}
|
|
134
|
+
setIsPresent(present);
|
|
135
|
+
}
|
|
136
|
+
}, [context.open, present]);
|
|
137
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
138
|
+
index$3.Primitive.div,
|
|
139
|
+
{
|
|
140
|
+
"data-state": getState(context.open),
|
|
141
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
142
|
+
id: context.contentId,
|
|
143
|
+
hidden: !isOpen,
|
|
144
|
+
...contentProps,
|
|
145
|
+
ref: composedRefs,
|
|
146
|
+
style: {
|
|
147
|
+
[`--radix-collapsible-content-height`]: height ? `${height}px` : void 0,
|
|
148
|
+
[`--radix-collapsible-content-width`]: width ? `${width}px` : void 0,
|
|
149
|
+
...props.style
|
|
150
|
+
},
|
|
151
|
+
children: isOpen && children
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
});
|
|
155
|
+
function getState(open) {
|
|
156
|
+
return open ? "open" : "closed";
|
|
157
|
+
}
|
|
158
|
+
var Root = Collapsible;
|
|
159
|
+
var Trigger = CollapsibleTrigger;
|
|
160
|
+
var Content = CollapsibleContent;
|
|
161
|
+
|
|
162
|
+
exports.Collapsible = Collapsible;
|
|
163
|
+
exports.CollapsibleContent = CollapsibleContent;
|
|
164
|
+
exports.CollapsibleTrigger = CollapsibleTrigger;
|
|
165
|
+
exports.Content = Content;
|
|
166
|
+
exports.Root = Root;
|
|
167
|
+
exports.Trigger = Trigger;
|
|
168
|
+
exports.createCollapsibleScope = createCollapsibleScope;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { composeEventHandlers } from '../../../../../@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs';
|
|
4
|
+
import { createContextScope } from '../../../../../@radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.mjs';
|
|
5
|
+
import { useControllableState } from '../../../../../@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs';
|
|
6
|
+
import { useLayoutEffect as useLayoutEffect2 } from '../../../../../@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs';
|
|
7
|
+
import { useComposedRefs } from '../../../../../@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs';
|
|
8
|
+
import { Primitive } from '../../../../../@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596/node_modules/@radix-ui/react-primitive/dist/index.mjs';
|
|
9
|
+
import { Presence } from '../../../../../@radix-ui_react-presence@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_90f8e5c12233caef3399d5fd66452a13/node_modules/@radix-ui/react-presence/dist/index.mjs';
|
|
10
|
+
import { useId } from '../../../../../@radix-ui_react-id@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-id/dist/index.mjs';
|
|
11
|
+
import { jsx } from 'react/jsx-runtime';
|
|
12
|
+
|
|
13
|
+
var COLLAPSIBLE_NAME = "Collapsible";
|
|
14
|
+
var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
|
|
15
|
+
var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
|
|
16
|
+
var Collapsible = React.forwardRef(
|
|
17
|
+
(props, forwardedRef) => {
|
|
18
|
+
const {
|
|
19
|
+
__scopeCollapsible,
|
|
20
|
+
open: openProp,
|
|
21
|
+
defaultOpen,
|
|
22
|
+
disabled,
|
|
23
|
+
onOpenChange,
|
|
24
|
+
...collapsibleProps
|
|
25
|
+
} = props;
|
|
26
|
+
const [open, setOpen] = useControllableState({
|
|
27
|
+
prop: openProp,
|
|
28
|
+
defaultProp: defaultOpen ?? false,
|
|
29
|
+
onChange: onOpenChange,
|
|
30
|
+
caller: COLLAPSIBLE_NAME
|
|
31
|
+
});
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
CollapsibleProvider,
|
|
34
|
+
{
|
|
35
|
+
scope: __scopeCollapsible,
|
|
36
|
+
disabled,
|
|
37
|
+
contentId: useId(),
|
|
38
|
+
open,
|
|
39
|
+
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
40
|
+
children: /* @__PURE__ */ jsx(
|
|
41
|
+
Primitive.div,
|
|
42
|
+
{
|
|
43
|
+
"data-state": getState(open),
|
|
44
|
+
"data-disabled": disabled ? "" : void 0,
|
|
45
|
+
...collapsibleProps,
|
|
46
|
+
ref: forwardedRef
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
Collapsible.displayName = COLLAPSIBLE_NAME;
|
|
54
|
+
var TRIGGER_NAME = "CollapsibleTrigger";
|
|
55
|
+
var CollapsibleTrigger = React.forwardRef(
|
|
56
|
+
(props, forwardedRef) => {
|
|
57
|
+
const { __scopeCollapsible, ...triggerProps } = props;
|
|
58
|
+
const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);
|
|
59
|
+
return /* @__PURE__ */ jsx(
|
|
60
|
+
Primitive.button,
|
|
61
|
+
{
|
|
62
|
+
type: "button",
|
|
63
|
+
"aria-controls": context.contentId,
|
|
64
|
+
"aria-expanded": context.open || false,
|
|
65
|
+
"data-state": getState(context.open),
|
|
66
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
67
|
+
disabled: context.disabled,
|
|
68
|
+
...triggerProps,
|
|
69
|
+
ref: forwardedRef,
|
|
70
|
+
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
CollapsibleTrigger.displayName = TRIGGER_NAME;
|
|
76
|
+
var CONTENT_NAME = "CollapsibleContent";
|
|
77
|
+
var CollapsibleContent = React.forwardRef(
|
|
78
|
+
(props, forwardedRef) => {
|
|
79
|
+
const { forceMount, ...contentProps } = props;
|
|
80
|
+
const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);
|
|
81
|
+
return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
CollapsibleContent.displayName = CONTENT_NAME;
|
|
85
|
+
var CollapsibleContentImpl = React.forwardRef((props, forwardedRef) => {
|
|
86
|
+
const { __scopeCollapsible, present, children, ...contentProps } = props;
|
|
87
|
+
const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);
|
|
88
|
+
const [isPresent, setIsPresent] = React.useState(present);
|
|
89
|
+
const ref = React.useRef(null);
|
|
90
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
91
|
+
const heightRef = React.useRef(0);
|
|
92
|
+
const height = heightRef.current;
|
|
93
|
+
const widthRef = React.useRef(0);
|
|
94
|
+
const width = widthRef.current;
|
|
95
|
+
const isOpen = context.open || isPresent;
|
|
96
|
+
const isMountAnimationPreventedRef = React.useRef(isOpen);
|
|
97
|
+
const originalStylesRef = React.useRef(void 0);
|
|
98
|
+
React.useEffect(() => {
|
|
99
|
+
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
|
|
100
|
+
return () => cancelAnimationFrame(rAF);
|
|
101
|
+
}, []);
|
|
102
|
+
useLayoutEffect2(() => {
|
|
103
|
+
const node = ref.current;
|
|
104
|
+
if (node) {
|
|
105
|
+
originalStylesRef.current = originalStylesRef.current || {
|
|
106
|
+
transitionDuration: node.style.transitionDuration,
|
|
107
|
+
animationName: node.style.animationName
|
|
108
|
+
};
|
|
109
|
+
node.style.transitionDuration = "0s";
|
|
110
|
+
node.style.animationName = "none";
|
|
111
|
+
const rect = node.getBoundingClientRect();
|
|
112
|
+
heightRef.current = rect.height;
|
|
113
|
+
widthRef.current = rect.width;
|
|
114
|
+
if (!isMountAnimationPreventedRef.current) {
|
|
115
|
+
node.style.transitionDuration = originalStylesRef.current.transitionDuration;
|
|
116
|
+
node.style.animationName = originalStylesRef.current.animationName;
|
|
117
|
+
}
|
|
118
|
+
setIsPresent(present);
|
|
119
|
+
}
|
|
120
|
+
}, [context.open, present]);
|
|
121
|
+
return /* @__PURE__ */ jsx(
|
|
122
|
+
Primitive.div,
|
|
123
|
+
{
|
|
124
|
+
"data-state": getState(context.open),
|
|
125
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
126
|
+
id: context.contentId,
|
|
127
|
+
hidden: !isOpen,
|
|
128
|
+
...contentProps,
|
|
129
|
+
ref: composedRefs,
|
|
130
|
+
style: {
|
|
131
|
+
[`--radix-collapsible-content-height`]: height ? `${height}px` : void 0,
|
|
132
|
+
[`--radix-collapsible-content-width`]: width ? `${width}px` : void 0,
|
|
133
|
+
...props.style
|
|
134
|
+
},
|
|
135
|
+
children: isOpen && children
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
});
|
|
139
|
+
function getState(open) {
|
|
140
|
+
return open ? "open" : "closed";
|
|
141
|
+
}
|
|
142
|
+
var Root = Collapsible;
|
|
143
|
+
var Trigger = CollapsibleTrigger;
|
|
144
|
+
var Content = CollapsibleContent;
|
|
145
|
+
|
|
146
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger, Content, Root, Trigger, createCollapsibleScope };
|