about summary refs log tree commit diff
path: root/src/lib/api/index.ts
Commit message (Collapse)AuthorAgeFilesLines
* Fix video aspect ratio error - "Record/embed/aspectRatio/width cannot be ↵Samuel Newman2025-06-281-4/+16
| | | | less than 1" (#8571)
* bump it bop it upgrade it (rn 79/expo 53) (#8281)hailey2025-05-021-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * basic bumps * more tweaking * fix rn patch * fix crop picker patch * fix media library patch * rm unnecessary patch * fix notifications patch * update bottomsheet * Update withAppDelegateReferrer.js * Delete withNoBundleCompression.js * rm withNoBundleCompression plugin * rm findLast shim * metro package exports is enabled by default * update react/react-dom/react-compiler * fix reanimated issue * vendor expo-ized emoji popup * fix types * hackfix view full thread * Update EmojiPickerModule.podspec * more upgrades * fix multiformats package version * add baseurl * bump mmkv * bumps * update react-keyed-flatten-children * bump locale packages * fix emoji picker dark mode * rn upgrades * Revert "bump locale packages" This reverts commit fc82f0f173032127dd7c18ed0316ae26f53db51d. * upgrade testing-library * rm test renderer * update patch name minors * rm findNodeHandle from tabbar * only do scrollview tag thing on ios * disable package exports * update expo notifications handler * memoize emoji picker styles * fix tests, mock multiformats * bump some dev deps with RC versions * completely rearchitect toasts * rm logs * layout animation config for composer footer * disable autolinking for patched libs * undo lingui changes * version bump from release candidate to 0.1 * update atproto deps * rm @did-plc/server * fix key issue (maybe) * move URL polyfill to the polyfill file * fix yarn lock * upgrade to 53.0.3 * reanimated layout anim bug patch * workletize a function that wasn't getting autoworkletized anymore (#8309) * bump to expo 53.0.4 * bump RN to 0.79.2 * fix yarn lock ci * Revert "completely rearchitect toasts" This reverts commit 2e2fcaeeed527580a6c485718544b85e8b4f52b9. * final upgrades * chore: cleanup yarn lock * prettier --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* `@atproto/api@next` integration (#7344)Eric Bailey2025-02-181-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Bump SDK * Use consistent type in profile query * Omit from constraint for profile shadow * Replace isRecord with isValidRecord in QuoteEmbed * Omit type from constraint for old ProfileCard * Omit type from constraint in profile queries where appropriate * Use correct type for update profile mutation * Conslidate and fix check for isValidRecord in Post.tsx * Replace isRecord with isValidRecord in PostThreadItem * Remove redundant cast in PostThreadFollowBtn * Ignore errors in DebugMod screen * Use matching type in ProfileFollows screen * Use matching type in ProfileFollowers screen * Migrate to isValidRecord in PostFeedItem * Use matching type if PostRepostedBy * Omit type from constraint in avatar props * Use matching types in NotificationFeedItem * Todo * Use isValidRecord in NotfyFeedItem * Improve MediaPreview types * Migrate another isValidRecord in NotificationFeedItem * Migrate to isValidView in queries/util * Migrate to isValidRecord in threadgate/util * Fix types in threadgates * Fix up types in starter-packs queries * Todo * Specify exact types in search-posts * Use internal type util to align types * Ditto last * Migrate postgate/index * Specify exact types in post-thread * Use correct type in post-quotes * FIX potential bug in post-thread * Use correct type in post-feed * Add correct type guards to notifications/feed * Migrate a guard in notifications/util * Migrate guard in Wizard/State * [@next] Profile handling, migrate `ProfileCard` (#7347) * Introduce new utils for profiles, migrate old ProfileCard * Rename, reorg * Add parseEmbed utils * Expand AnyProfileView to include chat profile view, update post shadow to reflect this * Cast for perf reasons * Tighten up types now that we have AnyProfileView * Add fastIsType util * Use `assertDid` Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Use util types * Comment * Use fastIsType where no validation was happening before * suggestions (#7382) * suggestions * Revert unneeded changes --------- Co-authored-by: Eric Bailey <git@esb.lol> * Use new util * Rename to dangerousIsType * Convert object shape * Use dangerous util * Use dangerous util * Use dangerous util, we can trust post records * Use dangerous util * Use AnyProfileVIew * Convert object shape * Clean up handling * Patch moderateProfile to accept known profile views, to discuss * Add AnyStarterPackView and related, implement in first usage * Remove validation, fix type, fix ref * Migrate over list-conversations * Clarify intent behind precacheProfile and its unstable query cache * Clean up unstable profile cache * Fix types during label creation in PwiOptOut (#7346) * Tighten types in queries/list * Chat: use correct profile views * Chat: fix log type check * Chat: construct lexically correct shape, even though it's only internal usage * Chat: use correct profile types * Chat: fix type check in logs * Starter: use correct profile types * Starter: use correct profile types * Starter: tighten types to match lex * Any profile type will work in blocked-and-muted * Use dangerous util * Use dangerousIsType * Update new ProfileCard to use AnyProfileView * Use dangerousIsType * Remove outdated todo * Use correct profile type * Use correct profile types * Tighten up types * Use dangerousIsType * Chat: more type fixes * Remove unused file * Add a few utils * Remove unused file * Ignore feedPost.__source * Clean up types, leave validation in critical path * Use dangerousIstype * Use ANyProfileView * Use isValidRecord * Use dangerousIsType * Fix types in ListCard * Fix FeedInterstitials types * Fix types in FeedCard * Fix types in dms ReportDialog * Fix types in SearchablePeopleList * Fix bad type in composer opts * Starter: ok these need to be loose too * Clarify docs Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Less code Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Use package exports Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Use package exports * Bump sdk, update $Typed imports * Format * Format * Fix weird TS error * Remove patch * Beter name * It's memo, can validate * Tighten up parseEmbed, dogfood * Bump sdk * Use asPredicate * Loosen types a bit * use asPredicate * Fix types * Use asPredicate * Use asPredicate * Use asPredicate * Clean up upsertProfile types * Use asPredicate * Use Un util * Fix types * Use new AnyProfileView * Use dangerousIsType * Use asPredicate * Use asPredicate * Add fallback content-type to pass typecheck * Clean up upsertProfile types * Align types * Use dangerousIsType * Use dangerousIsType * Use asPredicate * Align types * Convert findLast * Align types * Just ignore type errors and use findLast * Rename atproto -> bsky * Add validate util * Fix type error * Loosen types * Export post * rename atp bsky * Remove unused code * minor changes * Bump deps * Fix types * Tighten back up loose check * Tighten back up loose check * Fix small bug * Update comment * Revert change --------- Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> Co-authored-by: Matthieu Sieben <matthieu.sieben@gmail.com>
* Trim leading whitespace-only lines (#7555)dan2025-01-231-1/+6
|
* Implement posting threads (#6049)dan2024-11-011-63/+160
| | | | | | | | | | | | | | | * Implement posting a thread Co-authored-by: Dan Abramov <dan.abramov@gmail.com> * Fix native build * Remove dependency on web crypto API * Fix unrelated TS error (wtf) --------- Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com>
* Refactor composer state for threads (#5945)dan2024-10-291-9/+14
| | | | | | | * Refactor composer state for threads * Remove unnecessary default case TS can see it's exhaustive.
* Remove waterfalls from posting (#5931)dan2024-10-251-29/+36
| | | | | * Extract resolveRT, resolveReply * Parallelize waterfalls
* Make use of applyWrites when publishing posts (#5809)Mary2024-10-241-53/+66
| | | | | | | | | * make use of applywrites * Explicit $type --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Translate strings in `src/lib/api/index.ts` (#5750)surfdude292024-10-141-9/+10
|
* Move remaining composer state into reducer (#5623)dan2024-10-071-28/+17
| | | | | | Co-authored-by: Mary <git@mary.my.id> Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> Co-authored-by: Hailey <me@haileyok.com>
* Fetch link previews from RQ (#5608)dan2024-10-071-9/+38
| | | | | Co-authored-by: Mary <git@mary.my.id> Co-authored-by: Hailey <me@haileyok.com>
* Use composer state as source of truth for embeds/links on publish (#5606)dan2024-10-071-55/+100
| | | | | Co-authored-by: Mary <git@mary.my.id> Co-authored-by: Hailey <me@haileyok.com>
* Make composer reducer source of truth for images/video when publishing (#5595)dan2024-10-051-17/+15
| | | | | * Move caption and altText state into video reducer * Make composer state source of truth for images and video publish
* Rename some files and variables (#5587)dan2024-10-031-1/+1
| | | | | | | * Move composer reducers together * videoUploadState -> videoState * Inline videoDispatch
* Introduce a composer reducer and move image state there (#5547)dan2024-10-021-0/+2
| | | | | | | | | | | | | | | | | | | * Add composer reducer * Support adding images Co-authored-by: Mary <git@mary.my.id> * Support updating and deleting images Co-authored-by: Mary <git@mary.my.id> * Derive images state from composer state Co-authored-by: Mary <git@mary.my.id> --------- Co-authored-by: Mary <git@mary.my.id>
* Paralellize image uploads (#5535)dan2024-10-021-137/+117
| | | | | | | | | | | | | | | * Remove unsafe type coercions from posting embed * Extract resolveEmbed into a separate function * Refactor to if-else because these are mutually exclusive * Refactor resolveEmbed to early returns * Separate resolving embed and media * Parallelize image upload * Prioritize not dropping media
* MobX removal take 2 (#5381)Mary2024-09-251-39/+14
| | | | | | | | | * mobx removal take 2 * Actually rm mobx --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Video] Captions and alt text (#5009)Samuel Newman2024-08-301-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | * video settings modal in composer * show done button on web * rm download options * fix logic for showing settings button * add language picker (wip) * subtitle list with language select * send captions & alt text with video when posting * style "ensure you have selected a language" text * include aspect ratio with video * filter out captions where the lang is not set * rm log * fix label and add hint * minor scrubber fix
* [Video] Add uploaded video to post (#4884)Samuel Newman2024-08-291-11/+27
| | | | | | | | | | | | | | | | | | | | | * video uploads! * use video upload lexicons * add missing postgate * remove references to prerelease package * fix scrubber showing a "0" * Delete types.ts * rm logs * rm upload header --------- Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
* Detached QPs and hidden replies (#4878)Eric Bailey2024-08-211-50/+55
| | | | Co-authored-by: Hailey <me@haileyok.com>
* Upgrade API, implement XRPC rework (#4857)Hailey2024-08-121-34/+5
| | | | Co-authored-by: Matthieu Sieben <matthieu.sieben@gmail.com>
* [Video] Uploads (#4754)Hailey2024-07-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * state for video uploads * get upload working * add a debug log * add post progress * progress * fetch data * add some progress info, web uploads * post on finished uploading (wip) * add a note * add some todos * clear video * merge some stuff * convert to `createUploadTask` * patch expo modules core * working native upload progress * platform fork * upload progress for web * cleanup * cleanup * more tweaks * simplify * fix type errors --------- Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
* Implement thread locking (#4545)Paul Frazee2024-06-181-5/+12
| | | | | | | * Add the ability to edit threadgates * Fix bottom border on mobile * Refresh thread after threadgate edit
* [🐴] send record via link in text (Record DMs - base PR) (#4227)Samuel Newman2024-05-311-13/+2
| | | | | * send record via link in text * re-trim text after removing link
* Cleanup files after each iteration of compression and downloading (#3599)Hailey2024-04-251-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | * delete image on each iteration of compression * replace a few other instances of `unlink()` * ensure that moving to the permanent path will succeed * use `cacheDirectory` * missing file extension? * assert * Remove extra . * Extract safeDeleteAsync, fix normalization * Normalize everywhere * Use safeDeleteAsync in more places * Delete .bin too --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Cleanup files after upload on native (#3597)Hailey2024-04-171-6/+25
| | | | | | | | | | | | | | | | | | | * cleanup images after uploading from the composer cleanup external embed images as well cleanup files after upload add `expo-file-system` * remove test log * await * Revert "await" This reverts commit 771814b40ce1395cac4f56853d8a9e793ca92c2f. * just log an error if it throws
* Scale back sentry logs for trivial events (#2997)Hailey2024-02-261-3/+3
| | | | | * scale back sentry logs * update migrate log tests
* Log post creation failures (#2205)Eric Bailey2023-12-141-0/+6
|
* Add "Who can reply" controls [WIP] (#1954)Paul Frazee2023-12-101-1/+51
| | | | | | | | | | | | | | | | | | | | | * Add threadgating * UI improvements * More ui work * Remove comment * Tweak colors * Add missing keys * Tweak sizing * Only show composer option on non-reply * Flex wrap fix * Move the threadgate control to the top of the composer
* Remove deprecated models and mobx usage (react-query refactor) (#1934)Paul Frazee2023-11-161-28/+0
| | | | | | | | | | | | | | | | | | | | | * Update login page to use service query * Update modal to use session instead of store * Move image sizes cache off store * Update settings to no longer use store * Update link-meta fetch to use agent instead of rootstore * Remove deprecated resolveName() * Delete deprecated link-metas cache * Delete deprecated posts cache * Delete all remaining mobx models, including the root store * Strip out unused mobx observer wrappers
* Composer update (react-query refactor) (#1899)Paul Frazee2023-11-141-7/+6
| | | | | | | | | * Move composer state to a context * Rework composer to use RQ --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Refactor lists to use new queries (#1875)Paul Frazee2023-11-121-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * Refactor lists queries to react-query * Delete old lists-list model * Implement list, list-members, and list-memberships react-queries * Update CreateOrEditList modal * First pass at my-follows and actor-autocomplete queries * Update ListAddUserModal to use new queries, change to ListAddRemoveUsersModal * Update UserAddRemoveLists modal * Remove old TODO * Fix indent, autocomplete query * Add a todo --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Replace all logs with new loggerEric Bailey2023-11-041-1/+2
|
* Fix immediate TS errorsEric Bailey2023-11-041-4/+3
|
* Dont trim before posting (close #1621) (#1622)Paul Frazee2023-10-051-1/+1
| | | | | * Dont trim before posting (close #1621) * Tweak: do trim end
* Improve image cropping on android and introduce aspect ratio field (#1525)Paul Frazee2023-09-271-0/+2
| | | | | * Fix image cropping on android * Store and use aspect ratio field in post images (close #1392)
* Shorten links in composer to reduce char usage (#1188)Paul Frazee2023-08-161-1/+3
| | | | | | | * Modify toShortUrl() to always include the full domain * Shorten links in the composer to save on characters * Apply some limits to the link card suggester
* Add self-labeling controls (#1141)Paul Frazee2023-08-091-0/+12
| | | | | | | | | | | | | | | * Add self-label modal * Use the shield-exclamation icon consistently on post moderation * Wire up self-labeling * Bump @atproto/api@0.6.0 * Bump @atproto/dev-env@^0.2.3 * Add e2e test for self-labeling * Fix types
* Use a post and handle-resolution cache to enable quick postthread loading ↵Paul Frazee2023-08-031-4/+18
| | | | | | | | | | | (#1097) * Use a post and handle-resolution cache to enable quick postthread loading * Fix positioning of thread when loaded from cache and give more visual cues * Include parent posts in cache * Include notifications in cache
* [APP-690] better handling of post languages language filtering (#893)Ansh2023-06-231-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add SelectLangBtn * memoized objects that are created to reduce re-creation on re-render * add langs when uploading post * only send the top 3 languages otherwise backend will throw error * mv ContentLanguagesSettings to folder * add post languages settings modal and state * fix typos * modify feed manip to also check langs label on post * Fix tests * Remove log * Update feed-manip.ts * Fix syntax errors * UI tuneups * Show the currently selected languages in the composer * fix linting * Use a bcp-47 matching function * Fix a duplicate language issue * Fix web * Dont include lang in prompt * Make select language btn an observer * Keep device languages on top of language selection UIs * Fix android build settings * Enforce a max of 3 languages in posts * Fix tests * Fix types --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Rework scaled dimensions and compression (#737)Ollie H2023-05-301-0/+1
| | | | | | | | | * Rework scaled dimensions and compression * Unbreak image / banner uploads --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Add feed sharingPaul Frazee2023-05-181-44/+49
|
* Add alt text support and rework image layout (#503)Ollie Hsieh2023-04-211-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * Add alt text support and rework image layout * Add additional BottomSheet implementation to account for nested Composer modal * Use mobile gallery layout on mobile web * Missing key * Fix lint * Move altimage modal into the standard modal system * Fix overflow wrapping of images * Fixes to the alt-image modal * Remove unnecessary switch * Restore old imagelayoutgrid code --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Split image cropping into secondary step (#473)Ollie Hsieh2023-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Split image cropping into secondary step * Use ImageModel and GalleryModel * Add fix for pasting image URLs * Move models to state folder * Fix things that broke after rebase * Latest -- has image display bug * Remove contentFit * Fix iOS display in gallery * Tuneup the api signatures and implement compress/resize on web * Fix await * Lint fix and remove unused function * Fix android image pathing * Fix external embed x button on android * Remove min-height from composer (no longer useful and was mispositioning the composer on android) * Fix e2e picker --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Filter out bad mentions instead of erroring during post (close #391) (#422)Paul Frazee2023-04-071-0/+12
|
* Update AtUri import to use official package with fix for usernames that ↵Paul Frazee2023-04-071-1/+1
| | | | start with numbers (close #414) (#418)
* Lex refactor (#362)Paul Frazee2023-03-311-100/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove the hackcheck for upgrades * Rename the PostEmbeds folder to match the codebase style * Updates to latest lex refactor * Update to use new bsky agent * Update to use api package's richtext library * Switch to upsertProfile * Add TextEncoder/TextDecoder polyfill * Add Intl.Segmenter polyfill * Update composer to calculate lengths by grapheme * Fix detox * Fix login in e2e * Create account e2e passing * Implement an e2e mocking framework * Don't use private methods on mobx models as mobx can't track them * Add tooling for e2e-specific builds and add e2e media-picker mock * Add some tests and fix some bugs around profile editing * Add shell tests * Add home screen tests * Add thread screen tests * Add tests for other user profile screens * Add search screen tests * Implement profile imagery change tools and tests * Update to new embed behaviors * Add post tests * Fix to profile-screen test * Fix session resumption * Update web composer to new api * 1.11.0 * Fix pagination cursor parameters * Add quote posts to notifications * Fix embed layouts * Remove youtube inline player and improve tap handling on link cards * Reset minimal shell mode on all screen loads and feed swipes (close #299) * Update podfile.lock * Improve post notfound UI (close #366) * Bump atproto packages
* Move to expo and react-navigation (#288)Paul Frazee2023-03-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP - adding expo * WIP - adding expo 2 * Fix tsc * Finish adding expo * Disable the 'require cycle' warning * Tweak plist * Modify some dependency versions to make expo happy * Fix icon fill * Get Web compiling for expo * 1.7 * Switch to react-navigation in expo2 (#287) * WIP Switch to react-navigation * WIP Switch to react-navigation 2 * WIP Switch to react-navigation 3 * Convert all screens to react navigation * Update BottomBar for react navigation * Update mobile menu to be react-native drawer * Fixes to drawer and bottombar * Factor out some helpers * Replace the navigation model with react-navigation * Restructure the shell folder and fix the header positioning * Restore the error boundary * Fix tsc * Implement not-found page * Remove react-native-gesture-handler (no longer used) * Handle notifee card presses * Handle all navigations from the state layer * Fix drawer behaviors * Fix two linking issues * Switch to our react-native-progress fork to fix an svg rendering issue * Get Web working with react-navigation * Refactor routes and navigation for a bit more clarity * Remove dead code * Rework Web shell to left/right nav to make this easier * Fix ViewHeader for desktop web * Hide profileheader back btn on desktop web * Move the compose button to the left nav * Implement reply prompt in threads for desktop web * Composer refactors * Factor out all platform-specific text input behaviors from the composer * Small fix * Update the web build to use tiptap for the composer * Tune up the mention autocomplete dropdown * Simplify the default avatar and banner * Fixes to link cards in web composer * Fix dropdowns on web * Tweak load latest on desktop * Add web beta message and feedback link * Fix up links in desktop web
* 73-post-embeds (#253)Ansh2023-03-021-32/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * update api to 0.1.3 * add repost modal with reposting functionality * add quote post UI * allow creation and view of quote posts * Validate the post record before rendering a quote post * Use createdAt in quote posts for now * add web modal support * Tune the quote post rendering * Make did and declarationCid optional in postmeta * Make did and declarationCid optional in postmeta * dont allow image or link preview if quote post * Handle no-text quote posts * Tune the repost modal * Tweak composer post text * Fix lint --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Implement image uploading in the web composerPaul Frazee2023-02-231-9/+43
|