Files
chatkit/dist/react/attach.d.ts
T
CatoandClaude dce645fff5 feat: @bitbaum/chatkit/attach for any uploader, and the file-input check every app runs (0.4.0) (#9)
- `@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>
2026-10-07 04:43:16 -07:00

17 lines
953 B
TypeScript

/**
* @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 type { AttachMenuLabels } from "./AttachMenu.js";
export { ATTACH_SOURCE_INPUT, acceptFamilies, isImageMime, isTextFile, type AcceptFamily, type AttachSource, } from "../attachments.js";
export { shrinkImage } from "../image.js";
//# sourceMappingURL=attach.d.ts.map