mirror of
https://github.com/bitbaum/chatkit.git
synced 2026-12-04 20:07:45 +01:00
- `@bitbaum/chatkit/attach`: AttachMenu, ATTACH_SOURCE_INPUT, isTextFile, acceptFamilies and shrinkImage without the composer, so an app with no chat (avatars, product photos, receipts) uses the same picker instead of re-rolling a file input. AttachMenu takes `sources` (an image uploader offers Camera + Photos; one source skips the sheet) and a `trigger`. - `chatkit-check-file-inputs` (bin): fails CI on a literal accept that mixes file families — the shape that hid screenshots on Android in loki, orangecat and evig. Same rule as the package (acceptFamilies), so there is one definition; a justified exception is marked on the line. - shrinkImage moves out of the composer hook into src/image.ts (unchanged). - README: install releases from npm, never a commit — heidi and substrata stayed on the broken paperclip because they pinned old versions. Claude-Session: https://claude.ai/code/session_01BWXjqiHm8jFta4FXuc7Tck Co-authored-by: Claude <noreply@anthropic.com>
16 lines
856 B
JavaScript
16 lines
856 B
JavaScript
/**
|
|
* @bitbaum/chatkit/attach — picking files, for any screen, not only a chat.
|
|
*
|
|
* import { AttachMenu, ATTACH_SOURCE_INPUT, shrinkImage } from "@bitbaum/chatkit/attach";
|
|
*
|
|
* An avatar uploader, a product-photo grid and a chat composer all need the
|
|
* same thing from a phone: Camera, Photos and Files as separate choices, never
|
|
* one input with a mixed `accept` (see ATTACH_SOURCE_INPUT). This entry point
|
|
* carries exactly that, without the composer, so an app that has no chat does
|
|
* not re-roll a file input — the copy is what drifts. CI enforces it:
|
|
* `chatkit-check-file-inputs`.
|
|
*/
|
|
export { AttachMenu, DEFAULT_ATTACH_MENU_LABELS } from "./AttachMenu.js";
|
|
export { ATTACH_SOURCE_INPUT, acceptFamilies, isImageMime, isTextFile, } from "../attachments.js";
|
|
export { shrinkImage } from "../image.js";
|
|
//# sourceMappingURL=attach.js.map
|