Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork

Upgrade prettier to 3.6 (#8558)

* upgrade prettier

* run prettier

* more files

authored by samuel.fm and committed by GitHub c634cd90 3c92714e

Changed files
+427 -383
bskyembed
bskylink
bskyogcard
src
modules
expo-emoji-picker
scripts
src
components
ContextMenu
Post
Embed
VideoEmbed
VideoEmbedInner
web-controls
PostControls
Select
dialogs
EmailDialog
screens
dms
icons
moderation
verification
lib
platform
screens
Login
Messages
Onboarding
Profile
Search
Settings
AppIconSettings
components
state
storage
view
+2 -2
app.config.js
··· 29 29 const UPDATES_CHANNEL = IS_TESTFLIGHT 30 30 ? 'testflight' 31 31 : IS_PRODUCTION 32 - ? 'production' 33 - : undefined 32 + ? 'production' 33 + : undefined 34 34 const UPDATES_ENABLED = !!UPDATES_CHANNEL 35 35 36 36 const USE_SENTRY = Boolean(process.env.SENTRY_AUTH_TOKEN)
+1 -3
bskyembed/tailwind.config.cjs
··· 1 1 /** @type {import('tailwindcss').Config} */ 2 2 module.exports = { 3 3 content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], 4 - darkMode: ['variant', [ 5 - '&:is(.dark *):not(:is(.dark .light *))', 6 - ]], 4 + darkMode: ['variant', ['&:is(.dark *):not(:is(.dark .light *))']], 7 5 theme: { 8 6 extend: { 9 7 colors: {
-1
bskyembed/tsconfig.snippet.json
··· 1 - 2 1 { 3 2 "compilerOptions": { 4 3 "target": "ES5",
+11 -8
bskylink/src/db/index.ts
··· 1 1 import assert from 'assert' 2 2 import { 3 3 Kysely, 4 - KyselyPlugin, 4 + type KyselyPlugin, 5 5 Migrator, 6 - PluginTransformQueryArgs, 7 - PluginTransformResultArgs, 6 + type PluginTransformQueryArgs, 7 + type PluginTransformResultArgs, 8 8 PostgresDialect, 9 - QueryResult, 10 - RootOperationNode, 11 - UnknownRow, 9 + type QueryResult, 10 + type RootOperationNode, 11 + type UnknownRow, 12 12 } from 'kysely' 13 13 import {default as Pg} from 'pg' 14 14 15 15 import {dbLogger as log} from '../logger.js' 16 16 import {default as migrations} from './migrations/index.js' 17 17 import {DbMigrationProvider} from './migrations/provider.js' 18 - import {DbSchema} from './schema.js' 18 + import {type DbSchema} from './schema.js' 19 19 20 20 export class Database { 21 21 migrator: Migrator 22 22 destroyed = false 23 23 24 - constructor(public db: Kysely<DbSchema>, public cfg: PgConfig) { 24 + constructor( 25 + public db: Kysely<DbSchema>, 26 + public cfg: PgConfig, 27 + ) { 25 28 this.migrator = new Migrator({ 26 29 db, 27 30 migrationTableSchema: cfg.schema,
+7 -4
bskylink/src/index.ts
··· 1 1 import events from 'node:events' 2 - import http from 'node:http' 2 + import type http from 'node:http' 3 3 4 4 import cors from 'cors' 5 5 import express from 'express' 6 - import {createHttpTerminator, HttpTerminator} from 'http-terminator' 6 + import {createHttpTerminator, type HttpTerminator} from 'http-terminator' 7 7 8 - import {Config} from './config.js' 8 + import {type Config} from './config.js' 9 9 import {AppContext} from './context.js' 10 10 import {default as routes, errorHandler} from './routes/index.js' 11 11 ··· 17 17 public server?: http.Server 18 18 private terminator?: HttpTerminator 19 19 20 - constructor(public app: express.Application, public ctx: AppContext) {} 20 + constructor( 21 + public app: express.Application, 22 + public ctx: AppContext, 23 + ) {} 21 24 22 25 static async create(cfg: Config): Promise<LinkService> { 23 26 let app = express()
+7 -4
bskyogcard/src/index.ts
··· 1 1 import events from 'node:events' 2 - import http from 'node:http' 2 + import type http from 'node:http' 3 3 4 4 import express from 'express' 5 - import {createHttpTerminator, HttpTerminator} from 'http-terminator' 5 + import {createHttpTerminator, type HttpTerminator} from 'http-terminator' 6 6 7 - import {Config} from './config.js' 7 + import {type Config} from './config.js' 8 8 import {AppContext} from './context.js' 9 9 import {default as routes, errorHandler} from './routes/index.js' 10 10 ··· 15 15 public server?: http.Server 16 16 private terminator?: HttpTerminator 17 17 18 - constructor(public app: express.Application, public ctx: AppContext) {} 18 + constructor( 19 + public app: express.Application, 20 + public ctx: AppContext, 21 + ) {} 19 22 20 23 static async create(cfg: Config): Promise<CardService> { 21 24 let app = express()
+1 -1
modules/expo-emoji-picker/src/EmojiPicker.android.tsx
··· 12 12 flex: 1, 13 13 width: '100%', 14 14 backgroundColor: scheme === 'dark' ? '#000' : '#fff', 15 - } as const), 15 + }) as const, 16 16 [scheme], 17 17 ) 18 18
+1 -1
package.json
··· 266 266 "lint-staged": "^13.2.3", 267 267 "lockfile-lint": "^4.14.0", 268 268 "metro-react-native-babel-preset": "^0.77.0", 269 - "prettier": "^2.8.3", 269 + "prettier": "^3.6.0", 270 270 "react-native-dotenv": "^3.4.11", 271 271 "react-refresh": "^0.14.0", 272 272 "svgo": "^3.3.2",
+3 -4
scripts/post-web-build.js
··· 9 9 'scripts.html', 10 10 ) 11 11 12 - const {entrypoints} = require(path.join( 13 - projectRoot, 14 - 'web-build/asset-manifest.json', 15 - )) 12 + const {entrypoints} = require( 13 + path.join(projectRoot, 'web-build/asset-manifest.json'), 14 + ) 16 15 17 16 console.log(`Found ${entrypoints.length} entrypoints`) 18 17 console.log(`Writing ${templateFile}`)
+3 -3
src/components/ContextMenu/index.tsx
··· 190 190 if (item) playHaptic('Light') 191 191 setHoveredMenuItem(item) 192 192 }, 193 - } satisfies ContextType), 193 + }) satisfies ContextType, 194 194 [ 195 195 measurement, 196 196 setMeasurement, ··· 710 710 const xOffset = position 711 711 ? position.x 712 712 : align === 'left' 713 - ? measurement.x 714 - : measurement.x + measurement.width - layout.width 713 + ? measurement.x 714 + : measurement.x + measurement.width - layout.width 715 715 716 716 registerHoverable( 717 717 id,
+4 -4
src/components/Link.tsx
··· 99 99 return typeof to === 'string' 100 100 ? convertBskyAppUrlIfNeeded(sanitizeUrl(to)) 101 101 : to.screen 102 - ? router.matchName(to.screen)?.build(to.params) 103 - : to.href 104 - ? convertBskyAppUrlIfNeeded(sanitizeUrl(to.href)) 105 - : undefined 102 + ? router.matchName(to.screen)?.build(to.params) 103 + : to.href 104 + ? convertBskyAppUrlIfNeeded(sanitizeUrl(to.href)) 105 + : undefined 106 106 }, [to]) 107 107 108 108 if (!href) {
+3 -3
src/components/Post/Embed/ImageEmbed.tsx
··· 77 77 rest.viewContext === PostEmbedViewContext.ThreadHighlighted 78 78 ? 'none' 79 79 : rest.viewContext === 80 - PostEmbedViewContext.FeedEmbedRecordWithMedia 81 - ? 'square' 82 - : 'constrained' 80 + PostEmbedViewContext.FeedEmbedRecordWithMedia 81 + ? 'square' 82 + : 'constrained' 83 83 } 84 84 image={image} 85 85 onPress={(containerRef, dims) => onPress(0, [containerRef], [dims])}
+2 -2
src/components/Post/Embed/VideoEmbed/VideoEmbedInner/web-controls/VideoControls.tsx
··· 317 317 !focused 318 318 ? msg`Unmute video` 319 319 : playing 320 - ? msg`Pause video` 321 - : msg`Play video`, 320 + ? msg`Pause video` 321 + : msg`Play video`, 322 322 )} 323 323 accessibilityHint="" 324 324 style={[
+2 -2
src/components/PostControls/PostMenu/PostMenuItems.tsx
··· 600 600 isDetachPending 601 601 ? Loader 602 602 : quoteEmbed.isDetached 603 - ? Eye 604 - : EyeSlash 603 + ? Eye 604 + : EyeSlash 605 605 } 606 606 position="right" 607 607 />
+2 -2
src/components/Select/index.web.tsx
··· 111 111 borderColor: focused 112 112 ? t.palette.primary_500 113 113 : hovered 114 - ? t.palette.contrast_100 115 - : t.palette.contrast_25, 114 + ? t.palette.contrast_100 115 + : t.palette.contrast_25, 116 116 }, 117 117 ])}> 118 118 {children}
+12 -6
src/components/WhoCanReply.tsx
··· 1 1 import React from 'react' 2 - import {Keyboard, Platform, StyleProp, View, ViewStyle} from 'react-native' 3 2 import { 4 - AppBskyFeedDefs, 3 + Keyboard, 4 + Platform, 5 + type StyleProp, 6 + View, 7 + type ViewStyle, 8 + } from 'react-native' 9 + import { 10 + type AppBskyFeedDefs, 5 11 AppBskyFeedPost, 6 - AppBskyGraphDefs, 12 + type AppBskyGraphDefs, 7 13 AtUri, 8 14 } from '@atproto/api' 9 15 import {msg, Trans} from '@lingui/macro' ··· 13 19 import {makeListLink, makeProfileLink} from '#/lib/routes/links' 14 20 import {isNative} from '#/platform/detection' 15 21 import { 16 - ThreadgateAllowUISetting, 22 + type ThreadgateAllowUISetting, 17 23 threadgateViewToAllowUISetting, 18 24 } from '#/state/queries/threadgate' 19 25 import {atoms as a, useTheme} from '#/alf' ··· 70 76 const description = anyoneCanReply 71 77 ? _(msg`Everybody can reply`) 72 78 : noOneCanReply 73 - ? _(msg`Replies disabled`) 74 - : _(msg`Some people can reply`) 79 + ? _(msg`Replies disabled`) 80 + : _(msg`Some people can reply`) 75 81 76 82 const onPressOpen = () => { 77 83 if (isNative && Keyboard.isVisible()) {
+2 -2
src/components/dialogs/EmailDialog/screens/Manage2FA/Disable.tsx
··· 185 185 state.emailStatus === 'pending' 186 186 ? Loader 187 187 : state.emailStatus === 'success' 188 - ? Check 189 - : Envelope 188 + ? Check 189 + : Envelope 190 190 } 191 191 /> 192 192 </Button>
+2 -2
src/components/dialogs/EmailDialog/screens/Manage2FA/Enable.tsx
··· 116 116 state.status === 'pending' 117 117 ? Loader 118 118 : state.status === 'success' 119 - ? Check 120 - : ShieldIcon 119 + ? Check 120 + : ShieldIcon 121 121 } 122 122 /> 123 123 </Button>
+2 -2
src/components/dialogs/SearchablePeopleList.tsx
··· 390 390 !enabled 391 391 ? {opacity: 0.5} 392 392 : pressed || focused || hovered 393 - ? t.atoms.bg_contrast_25 394 - : t.atoms.bg, 393 + ? t.atoms.bg_contrast_25 394 + : t.atoms.bg, 395 395 ]}> 396 396 <ProfileCard.Header> 397 397 <ProfileCard.Avatar
+2 -2
src/components/dms/EmojiReactionPicker.tsx
··· 98 98 : t.palette.primary_500, 99 99 } 100 100 : alreadyReacted 101 - ? {backgroundColor: t.palette.primary_200} 102 - : bgColor, 101 + ? {backgroundColor: t.palette.primary_200} 102 + : bgColor, 103 103 {height: 40, width: 40}, 104 104 a.justify_center, 105 105 a.align_center,
+1 -2
src/components/dms/MessageContextMenu.tsx
··· 128 128 label={_(msg`Message options`)} 129 129 contentLabel={_( 130 130 msg`Message from @${ 131 - sender?.handle ?? // should always be defined 132 - 'unknown' 131 + sender?.handle ?? 'unknown' // should always be defined 133 132 }: ${message.text}`, 134 133 )}> 135 134 {children}
+23 -24
src/components/icons/VerifiedCheck.tsx
··· 3 3 4 4 import {type Props, useCommonSVGProps} from '#/components/icons/common' 5 5 6 - export const VerifiedCheck = React.forwardRef<Svg, Props>(function LogoImpl( 7 - props, 8 - ref, 9 - ) { 10 - const {fill, size, style, ...rest} = useCommonSVGProps(props) 6 + export const VerifiedCheck = React.forwardRef<Svg, Props>( 7 + function LogoImpl(props, ref) { 8 + const {fill, size, style, ...rest} = useCommonSVGProps(props) 11 9 12 - return ( 13 - <Svg 14 - fill="none" 15 - {...rest} 16 - ref={ref} 17 - viewBox="0 0 24 24" 18 - width={size} 19 - height={size} 20 - style={[style]}> 21 - <Circle cx="12" cy="12" r="11.5" fill={fill} /> 22 - <Path 23 - fill="#fff" 24 - fillRule="evenodd" 25 - clipRule="evenodd" 26 - d="M17.659 8.175a1.361 1.361 0 0 1 0 1.925l-6.224 6.223a1.361 1.361 0 0 1-1.925 0L6.4 13.212a1.361 1.361 0 0 1 1.925-1.925l2.149 2.148 5.26-5.26a1.361 1.361 0 0 1 1.925 0Z" 27 - /> 28 - </Svg> 29 - ) 30 - }) 10 + return ( 11 + <Svg 12 + fill="none" 13 + {...rest} 14 + ref={ref} 15 + viewBox="0 0 24 24" 16 + width={size} 17 + height={size} 18 + style={[style]}> 19 + <Circle cx="12" cy="12" r="11.5" fill={fill} /> 20 + <Path 21 + fill="#fff" 22 + fillRule="evenodd" 23 + clipRule="evenodd" 24 + d="M17.659 8.175a1.361 1.361 0 0 1 0 1.925l-6.224 6.223a1.361 1.361 0 0 1-1.925 0L6.4 13.212a1.361 1.361 0 0 1 1.925-1.925l2.149 2.148 5.26-5.26a1.361 1.361 0 0 1 1.925 0Z" 25 + /> 26 + </Svg> 27 + ) 28 + }, 29 + )
+28 -29
src/components/icons/VerifierCheck.tsx
··· 3 3 4 4 import {type Props, useCommonSVGProps} from '#/components/icons/common' 5 5 6 - export const VerifierCheck = React.forwardRef<Svg, Props>(function LogoImpl( 7 - props, 8 - ref, 9 - ) { 10 - const {fill, size, style, ...rest} = useCommonSVGProps(props) 6 + export const VerifierCheck = React.forwardRef<Svg, Props>( 7 + function LogoImpl(props, ref) { 8 + const {fill, size, style, ...rest} = useCommonSVGProps(props) 11 9 12 - return ( 13 - <Svg 14 - fill="none" 15 - {...rest} 16 - ref={ref} 17 - viewBox="0 0 24 24" 18 - width={size} 19 - height={size} 20 - style={[style]}> 21 - <Path 22 - fill={fill} 23 - fillRule="evenodd" 24 - clipRule="evenodd" 25 - d="M8.792 1.615a4.154 4.154 0 0 1 6.416 0 4.154 4.154 0 0 0 3.146 1.515 4.154 4.154 0 0 1 4 5.017 4.154 4.154 0 0 0 .777 3.404 4.154 4.154 0 0 1-1.427 6.255 4.153 4.153 0 0 0-2.177 2.73 4.154 4.154 0 0 1-5.781 2.784 4.154 4.154 0 0 0-3.492 0 4.154 4.154 0 0 1-5.78-2.784 4.154 4.154 0 0 0-2.178-2.73A4.154 4.154 0 0 1 .87 11.551a4.154 4.154 0 0 0 .776-3.404A4.154 4.154 0 0 1 5.646 3.13a4.154 4.154 0 0 0 3.146-1.515Z" 26 - /> 27 - <Path 28 - fill="#fff" 29 - fillRule="evenodd" 30 - clipRule="evenodd" 31 - d="M17.861 8.26a1.438 1.438 0 0 1 0 2.033l-6.571 6.571a1.437 1.437 0 0 1-2.033 0L5.97 13.58a1.438 1.438 0 0 1 2.033-2.033l2.27 2.269 5.554-5.555a1.437 1.437 0 0 1 2.033 0Z" 32 - /> 33 - </Svg> 34 - ) 35 - }) 10 + return ( 11 + <Svg 12 + fill="none" 13 + {...rest} 14 + ref={ref} 15 + viewBox="0 0 24 24" 16 + width={size} 17 + height={size} 18 + style={[style]}> 19 + <Path 20 + fill={fill} 21 + fillRule="evenodd" 22 + clipRule="evenodd" 23 + d="M8.792 1.615a4.154 4.154 0 0 1 6.416 0 4.154 4.154 0 0 0 3.146 1.515 4.154 4.154 0 0 1 4 5.017 4.154 4.154 0 0 0 .777 3.404 4.154 4.154 0 0 1-1.427 6.255 4.153 4.153 0 0 0-2.177 2.73 4.154 4.154 0 0 1-5.781 2.784 4.154 4.154 0 0 0-3.492 0 4.154 4.154 0 0 1-5.78-2.784 4.154 4.154 0 0 0-2.178-2.73A4.154 4.154 0 0 1 .87 11.551a4.154 4.154 0 0 0 .776-3.404A4.154 4.154 0 0 1 5.646 3.13a4.154 4.154 0 0 0 3.146-1.515Z" 24 + /> 25 + <Path 26 + fill="#fff" 27 + fillRule="evenodd" 28 + clipRule="evenodd" 29 + d="M17.861 8.26a1.438 1.438 0 0 1 0 2.033l-6.571 6.571a1.437 1.437 0 0 1-2.033 0L5.97 13.58a1.438 1.438 0 0 1 2.033-2.033l2.27 2.269 5.554-5.555a1.437 1.437 0 0 1 2.033 0Z" 30 + /> 31 + </Svg> 32 + ) 33 + }, 34 + )
+4 -4
src/components/moderation/ContentHider.tsx
··· 1 1 import React from 'react' 2 - import {StyleProp, View, ViewStyle} from 'react-native' 3 - import {ModerationUI} from '@atproto/api' 2 + import {type StyleProp, View, type ViewStyle} from 'react-native' 3 + import {type ModerationUI} from '@atproto/api' 4 4 import {msg, Trans} from '@lingui/macro' 5 5 import {useLingui} from '@lingui/react' 6 6 ··· 148 148 modui.noOverride 149 149 ? _(msg`Learn more about the moderation applied to this content`) 150 150 : override 151 - ? _(msg`Hides the content`) 152 - : _(msg`Shows the content`) 151 + ? _(msg`Hides the content`) 152 + : _(msg`Shows the content`) 153 153 }> 154 154 {state => ( 155 155 <View
+6 -6
src/components/moderation/ReportDialog/index.tsx
··· 512 512 backgroundColor: active 513 513 ? t.palette.primary_500 514 514 : completed 515 - ? t.palette.primary_100 516 - : t.atoms.bg_contrast_25.backgroundColor, 515 + ? t.palette.primary_100 516 + : t.atoms.bg_contrast_25.backgroundColor, 517 517 borderColor: active 518 518 ? t.palette.primary_500 519 519 : completed 520 - ? t.palette.primary_400 521 - : t.atoms.border_contrast_low.borderColor, 520 + ? t.palette.primary_400 521 + : t.atoms.border_contrast_low.borderColor, 522 522 }, 523 523 ]}> 524 524 {completed ? ( ··· 533 533 color: active 534 534 ? 'white' 535 535 : completed 536 - ? t.palette.primary_700 537 - : t.atoms.text_contrast_medium.color, 536 + ? t.palette.primary_700 537 + : t.atoms.text_contrast_medium.color, 538 538 fontVariant: ['tabular-nums'], 539 539 width: 24, 540 540 height: 24,
+2 -2
src/components/verification/VerificationCheckButton.tsx
··· 130 130 verifiedByHidden 131 131 ? t.atoms.bg_contrast_100.backgroundColor 132 132 : state.profile.isVerified 133 - ? t.palette.primary_500 134 - : t.atoms.bg_contrast_100.backgroundColor 133 + ? t.palette.primary_500 134 + : t.atoms.bg_contrast_100.backgroundColor 135 135 } 136 136 verifier={state.profile.role === 'verifier'} 137 137 />
+7 -7
src/components/verification/VerificationsDialog.tsx
··· 64 64 ? _(msg`You are verified`) 65 65 : _(msg`Your verifications`) 66 66 : state.profile.isVerified 67 - ? _(msg`${userName} is verified`) 68 - : _( 69 - msg({ 70 - message: `${userName}'s verifications`, 71 - comment: `Possessive, meaning "the verifications of {userName}"`, 72 - }), 73 - ) 67 + ? _(msg`${userName} is verified`) 68 + : _( 69 + msg({ 70 + message: `${userName}'s verifications`, 71 + comment: `Possessive, meaning "the verifications of {userName}"`, 72 + }), 73 + ) 74 74 75 75 return ( 76 76 <Dialog.ScrollableInner
+9 -9
src/lib/moderation.ts
··· 1 1 import React from 'react' 2 2 import { 3 - AppBskyLabelerDefs, 3 + type AppBskyLabelerDefs, 4 4 BskyAgent, 5 - ComAtprotoLabelDefs, 6 - InterpretedLabelValueDefinition, 5 + type ComAtprotoLabelDefs, 6 + type InterpretedLabelValueDefinition, 7 7 LABELS, 8 - ModerationCause, 9 - ModerationOpts, 10 - ModerationUI, 8 + type ModerationCause, 9 + type ModerationOpts, 10 + type ModerationUI, 11 11 } from '@atproto/api' 12 12 13 13 import {sanitizeDisplayName} from '#/lib/strings/display-names' 14 14 import {sanitizeHandle} from '#/lib/strings/handles' 15 - import {AppModerationCause} from '#/components/Pills' 15 + import {type AppModerationCause} from '#/components/Pills' 16 16 17 17 export const ADULT_CONTENT_LABELS = ['sexual', 'nudity', 'porn'] 18 18 export const OTHER_SELF_LABELS = ['graphic-media'] ··· 29 29 cause.source.type === 'labeler' 30 30 ? cause.source.did 31 31 : cause.source.type === 'list' 32 - ? cause.source.list.uri 33 - : 'user' 32 + ? cause.source.list.uri 33 + : 'user' 34 34 if (cause.type === 'label') { 35 35 return `label:${cause.label.val}:${source}` 36 36 }
+6 -6
src/lib/moderation/useModerationCauseDescription.ts
··· 1 1 import React from 'react' 2 2 import { 3 3 BSKY_LABELER_DID, 4 - ModerationCause, 5 - ModerationCauseSource, 4 + type ModerationCause, 5 + type ModerationCauseSource, 6 6 } from '@atproto/api' 7 7 import {msg} from '@lingui/macro' 8 8 import {useLingui} from '@lingui/react' ··· 12 12 import {useSession} from '#/state/session' 13 13 import {CircleBanSign_Stroke2_Corner0_Rounded as CircleBanSign} from '#/components/icons/CircleBanSign' 14 14 import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo' 15 - import {Props as SVGIconProps} from '#/components/icons/common' 15 + import {type Props as SVGIconProps} from '#/components/icons/common' 16 16 import {EyeSlash_Stroke2_Corner0_Rounded as EyeSlash} from '#/components/icons/EyeSlash' 17 17 import {Warning_Stroke2_Corner0_Rounded as Warning} from '#/components/icons/Warning' 18 - import {AppModerationCause} from '#/components/Pills' 18 + import {type AppModerationCause} from '#/components/Pills' 19 19 import {useGlobalLabelStrings} from './useGlobalLabelStrings' 20 20 import {getDefinition, getLabelStrings} from './useLabelInfo' 21 21 ··· 153 153 def.identifier === '!no-unauthenticated' 154 154 ? EyeSlash 155 155 : def.severity === 'alert' 156 - ? Warning 157 - : CircleInfo, 156 + ? Warning 157 + : CircleInfo, 158 158 name: strings.name, 159 159 description: strings.description, 160 160 source,
+5 -5
src/lib/statsig/statsig.tsx
··· 1 1 import React from 'react' 2 2 import {Platform} from 'react-native' 3 - import {AppState, AppStateStatus} from 'react-native' 3 + import {AppState, type AppStateStatus} from 'react-native' 4 4 import {Statsig, StatsigProvider} from 'statsig-react-native-expo' 5 5 6 6 import {BUNDLE_DATE, BUNDLE_IDENTIFIER, IS_TESTFLIGHT} from '#/lib/app-info' 7 7 import {logger} from '#/logger' 8 - import {MetricEvents} from '#/logger/metrics' 8 + import {type MetricEvents} from '#/logger/metrics' 9 9 import {isWeb} from '#/platform/detection' 10 10 import * as persisted from '#/state/persisted' 11 11 import {useSession} from '../../state/session' 12 12 import {timeout} from '../async/timeout' 13 13 import {useNonReactiveCallback} from '../hooks/useNonReactiveCallback' 14 - import {Gate} from './gates' 14 + import {type Gate} from './gates' 15 15 16 16 const SDK_KEY = 'client-SXJakO39w9vIhl3D44u8UupyzFl4oZ2qPIkjwcvuPsV' 17 17 ··· 51 51 process.env.NODE_ENV === 'development' 52 52 ? 'development' 53 53 : IS_TESTFLIGHT 54 - ? 'staging' 55 - : 'production', 54 + ? 'staging' 55 + : 'production', 56 56 }, 57 57 // Don't block on waiting for network. The fetched config will kick in on next load. 58 58 // This ensures the UI is always consistent and doesn't update mid-session.
+2 -2
src/lib/strings/embed-player.ts
··· 11 11 ? 'http://localhost:8100' 12 12 : 'https://bsky.app' 13 13 : __DEV__ && !process.env.JEST_WORKER_ID 14 - ? 'http://localhost:8100' 15 - : 'https://bsky.app' 14 + ? 'http://localhost:8100' 15 + : 'https://bsky.app' 16 16 17 17 export const embedPlayerSources = [ 18 18 'youtube',
+6 -6
src/platform/polyfills.ts
··· 41 41 r1 === 64 42 42 ? String.fromCharCode((bitmap >> 16) & 255) 43 43 : r2 === 64 44 - ? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255) 45 - : String.fromCharCode( 46 - (bitmap >> 16) & 255, 47 - (bitmap >> 8) & 255, 48 - bitmap & 255, 49 - ) 44 + ? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255) 45 + : String.fromCharCode( 46 + (bitmap >> 16) & 255, 47 + (bitmap >> 8) & 255, 48 + bitmap & 255, 49 + ) 50 50 } 51 51 return result 52 52 }
+2 -2
src/screens/Login/index.tsx
··· 49 49 requestedAccount 50 50 ? Forms.Login 51 51 : accounts.length 52 - ? Forms.ChooseAccount 53 - : Forms.Login, 52 + ? Forms.ChooseAccount 53 + : Forms.Login, 54 54 ) 55 55 56 56 const {
+1 -1
src/screens/Messages/ChatList.tsx
··· 155 155 profiles: inboxPreviewConvos.slice(0, 3), 156 156 }, 157 157 ...conversations.map( 158 - convo => ({type: 'CONVERSATION', conversation: convo} as const), 158 + convo => ({type: 'CONVERSATION', conversation: convo}) as const, 159 159 ), 160 160 ] satisfies ListItem[] 161 161 }
+2 -2
src/screens/Onboarding/StepFinished.tsx
··· 176 176 avatarResult: profileStepResults.isCreatedAvatar 177 177 ? 'created' 178 178 : profileStepResults.image 179 - ? 'uploaded' 180 - : 'default', 179 + ? 'uploaded' 180 + : 'default', 181 181 }) 182 182 })(), 183 183 requestNotificationsPermission('AfterOnboarding'),
+2 -2
src/screens/Profile/Header/ProfileHeaderLabeler.tsx
··· 214 214 ? t.palette.contrast_50 215 215 : t.palette.contrast_25 216 216 : state.hovered || state.pressed 217 - ? tokens.color.temp_purple_dark 218 - : tokens.color.temp_purple, 217 + ? tokens.color.temp_purple_dark 218 + : tokens.color.temp_purple, 219 219 }, 220 220 ]}> 221 221 <Text
+2 -2
src/screens/Search/Explore.tsx
··· 342 342 ]) 343 343 344 344 const topBorder = useMemo( 345 - () => ({type: 'topBorder', key: 'top-border'} as const), 345 + () => ({type: 'topBorder', key: 'top-border'}) as const, 346 346 [], 347 347 ) 348 348 const trendingTopicsModule = useMemo( 349 - () => ({type: 'trendingTopics', key: 'trending-topics'} as const), 349 + () => ({type: 'trendingTopics', key: 'trending-topics'}) as const, 350 350 [], 351 351 ) 352 352 const suggestedFollowsModule = useMemo(() => {
+61 -21
src/screens/Settings/AppIconSettings/useAppIconSets.ts
··· 2 2 import {msg} from '@lingui/macro' 3 3 import {useLingui} from '@lingui/react' 4 4 5 - import {AppIconSet} from '#/screens/Settings/AppIconSettings/types' 5 + import {type AppIconSet} from '#/screens/Settings/AppIconSettings/types' 6 6 7 7 export function useAppIconSets() { 8 8 const {_} = useLingui() ··· 13 13 id: 'default_light', 14 14 name: _(msg({context: 'Name of app icon variant', message: 'Light'})), 15 15 iosImage: () => { 16 - return require(`../../../../assets/app-icons/ios_icon_default_light.png`) 16 + return require( 17 + `../../../../assets/app-icons/ios_icon_default_light.png`, 18 + ) 17 19 }, 18 20 androidImage: () => { 19 - return require(`../../../../assets/app-icons/android_icon_default_light.png`) 21 + return require( 22 + `../../../../assets/app-icons/android_icon_default_light.png`, 23 + ) 20 24 }, 21 25 }, 22 26 { 23 27 id: 'default_dark', 24 28 name: _(msg({context: 'Name of app icon variant', message: 'Dark'})), 25 29 iosImage: () => { 26 - return require(`../../../../assets/app-icons/ios_icon_default_dark.png`) 30 + return require( 31 + `../../../../assets/app-icons/ios_icon_default_dark.png`, 32 + ) 27 33 }, 28 34 androidImage: () => { 29 - return require(`../../../../assets/app-icons/android_icon_default_dark.png`) 35 + return require( 36 + `../../../../assets/app-icons/android_icon_default_dark.png`, 37 + ) 30 38 }, 31 39 }, 32 40 ] satisfies AppIconSet[] ··· 39 47 id: 'core_aurora', 40 48 name: _(msg({context: 'Name of app icon variant', message: 'Aurora'})), 41 49 iosImage: () => { 42 - return require(`../../../../assets/app-icons/ios_icon_core_aurora.png`) 50 + return require( 51 + `../../../../assets/app-icons/ios_icon_core_aurora.png`, 52 + ) 43 53 }, 44 54 androidImage: () => { 45 - return require(`../../../../assets/app-icons/android_icon_core_aurora.png`) 55 + return require( 56 + `../../../../assets/app-icons/android_icon_core_aurora.png`, 57 + ) 46 58 }, 47 59 }, 48 60 // { ··· 59 71 id: 'core_sunrise', 60 72 name: _(msg({context: 'Name of app icon variant', message: 'Sunrise'})), 61 73 iosImage: () => { 62 - return require(`../../../../assets/app-icons/ios_icon_core_sunrise.png`) 74 + return require( 75 + `../../../../assets/app-icons/ios_icon_core_sunrise.png`, 76 + ) 63 77 }, 64 78 androidImage: () => { 65 - return require(`../../../../assets/app-icons/android_icon_core_sunrise.png`) 79 + return require( 80 + `../../../../assets/app-icons/android_icon_core_sunrise.png`, 81 + ) 66 82 }, 67 83 }, 68 84 { 69 85 id: 'core_sunset', 70 86 name: _(msg({context: 'Name of app icon variant', message: 'Sunset'})), 71 87 iosImage: () => { 72 - return require(`../../../../assets/app-icons/ios_icon_core_sunset.png`) 88 + return require( 89 + `../../../../assets/app-icons/ios_icon_core_sunset.png`, 90 + ) 73 91 }, 74 92 androidImage: () => { 75 - return require(`../../../../assets/app-icons/android_icon_core_sunset.png`) 93 + return require( 94 + `../../../../assets/app-icons/android_icon_core_sunset.png`, 95 + ) 76 96 }, 77 97 }, 78 98 { ··· 81 101 msg({context: 'Name of app icon variant', message: 'Midnight'}), 82 102 ), 83 103 iosImage: () => { 84 - return require(`../../../../assets/app-icons/ios_icon_core_midnight.png`) 104 + return require( 105 + `../../../../assets/app-icons/ios_icon_core_midnight.png`, 106 + ) 85 107 }, 86 108 androidImage: () => { 87 - return require(`../../../../assets/app-icons/android_icon_core_midnight.png`) 109 + return require( 110 + `../../../../assets/app-icons/android_icon_core_midnight.png`, 111 + ) 88 112 }, 89 113 }, 90 114 { ··· 93 117 msg({context: 'Name of app icon variant', message: 'Flat Blue'}), 94 118 ), 95 119 iosImage: () => { 96 - return require(`../../../../assets/app-icons/ios_icon_core_flat_blue.png`) 120 + return require( 121 + `../../../../assets/app-icons/ios_icon_core_flat_blue.png`, 122 + ) 97 123 }, 98 124 androidImage: () => { 99 - return require(`../../../../assets/app-icons/android_icon_core_flat_blue.png`) 125 + return require( 126 + `../../../../assets/app-icons/android_icon_core_flat_blue.png`, 127 + ) 100 128 }, 101 129 }, 102 130 { ··· 105 133 msg({context: 'Name of app icon variant', message: 'Flat White'}), 106 134 ), 107 135 iosImage: () => { 108 - return require(`../../../../assets/app-icons/ios_icon_core_flat_white.png`) 136 + return require( 137 + `../../../../assets/app-icons/ios_icon_core_flat_white.png`, 138 + ) 109 139 }, 110 140 androidImage: () => { 111 - return require(`../../../../assets/app-icons/android_icon_core_flat_white.png`) 141 + return require( 142 + `../../../../assets/app-icons/android_icon_core_flat_white.png`, 143 + ) 112 144 }, 113 145 }, 114 146 { ··· 117 149 msg({context: 'Name of app icon variant', message: 'Flat Black'}), 118 150 ), 119 151 iosImage: () => { 120 - return require(`../../../../assets/app-icons/ios_icon_core_flat_black.png`) 152 + return require( 153 + `../../../../assets/app-icons/ios_icon_core_flat_black.png`, 154 + ) 121 155 }, 122 156 androidImage: () => { 123 - return require(`../../../../assets/app-icons/android_icon_core_flat_black.png`) 157 + return require( 158 + `../../../../assets/app-icons/android_icon_core_flat_black.png`, 159 + ) 124 160 }, 125 161 }, 126 162 { ··· 132 168 }), 133 169 ), 134 170 iosImage: () => { 135 - return require(`../../../../assets/app-icons/ios_icon_core_classic.png`) 171 + return require( 172 + `../../../../assets/app-icons/ios_icon_core_classic.png`, 173 + ) 136 174 }, 137 175 androidImage: () => { 138 - return require(`../../../../assets/app-icons/android_icon_core_classic.png`) 176 + return require( 177 + `../../../../assets/app-icons/android_icon_core_classic.png`, 178 + ) 139 179 }, 140 180 }, 141 181 ] satisfies AppIconSet[]
+2 -2
src/screens/Settings/components/ChangeHandleDialog.tsx
··· 525 525 isVerified 526 526 ? _(msg`Update to ${domain}`) 527 527 : dnsPanel 528 - ? _(msg`Verify DNS Record`) 529 - : _(msg`Verify Text File`) 528 + ? _(msg`Verify DNS Record`) 529 + : _(msg`Verify Text File`) 530 530 } 531 531 variant="solid" 532 532 size="large"
+2 -2
src/state/cache/profile-shadow.ts
··· 144 144 'status' in shadow 145 145 ? shadow.status 146 146 : 'status' in profile 147 - ? profile.status 148 - : undefined, 147 + ? profile.status 148 + : undefined, 149 149 }) 150 150 } 151 151
+11 -22
src/state/queries/explore-feed-previews.tsx
··· 36 36 const LIMIT = 8 // sliced to 6, overfetch to account for moderation 37 37 const PINNED_POST_URIS: Record<string, boolean> = { 38 38 // 📰 News 39 - 'at://did:plc:kkf4naxqmweop7dv4l2iqqf5/app.bsky.feed.post/3lgh27w2ngc2b': 40 - true, 39 + 'at://did:plc:kkf4naxqmweop7dv4l2iqqf5/app.bsky.feed.post/3lgh27w2ngc2b': true, 41 40 // Gardening 42 - 'at://did:plc:5rw2on4i56btlcajojaxwcat/app.bsky.feed.post/3kjorckgcwc27': 43 - true, 41 + 'at://did:plc:5rw2on4i56btlcajojaxwcat/app.bsky.feed.post/3kjorckgcwc27': true, 44 42 // Web Development Trending 45 - 'at://did:plc:m2sjv3wncvsasdapla35hzwj/app.bsky.feed.post/3lfaw445axs22': 46 - true, 43 + 'at://did:plc:m2sjv3wncvsasdapla35hzwj/app.bsky.feed.post/3lfaw445axs22': true, 47 44 // Anime & Manga EN 48 - 'at://did:plc:tazrmeme4dzahimsykusrwrk/app.bsky.feed.post/3knxx2gmkns2y': 49 - true, 45 + 'at://did:plc:tazrmeme4dzahimsykusrwrk/app.bsky.feed.post/3knxx2gmkns2y': true, 50 46 // 📽️ Film 51 - 'at://did:plc:2hwwem55ce6djnk6bn62cstr/app.bsky.feed.post/3llhpzhbq7c2g': 52 - true, 47 + 'at://did:plc:2hwwem55ce6djnk6bn62cstr/app.bsky.feed.post/3llhpzhbq7c2g': true, 53 48 // PopSky 54 - 'at://did:plc:lfdf4srj43iwdng7jn35tjsp/app.bsky.feed.post/3lbblgly65c2g': 55 - true, 49 + 'at://did:plc:lfdf4srj43iwdng7jn35tjsp/app.bsky.feed.post/3lbblgly65c2g': true, 56 50 // Science 57 - 'at://did:plc:hu2obebw3nhfj667522dahfg/app.bsky.feed.post/3kl33otd6ob2s': 58 - true, 51 + 'at://did:plc:hu2obebw3nhfj667522dahfg/app.bsky.feed.post/3kl33otd6ob2s': true, 59 52 // Birds! 🦉 60 - 'at://did:plc:ffkgesg3jsv2j7aagkzrtcvt/app.bsky.feed.post/3lbg4r57yk22d': 61 - true, 53 + 'at://did:plc:ffkgesg3jsv2j7aagkzrtcvt/app.bsky.feed.post/3lbg4r57yk22d': true, 62 54 // Astronomy 63 - 'at://did:plc:xy2zorw2ys47poflotxthlzg/app.bsky.feed.post/3kyzye4lujs2w': 64 - true, 55 + 'at://did:plc:xy2zorw2ys47poflotxthlzg/app.bsky.feed.post/3kyzye4lujs2w': true, 65 56 // What's Cooking 🍽️ 66 - 'at://did:plc:geoqe3qls5mwezckxxsewys2/app.bsky.feed.post/3lfqhgvxbqc2q': 67 - true, 57 + 'at://did:plc:geoqe3qls5mwezckxxsewys2/app.bsky.feed.post/3lfqhgvxbqc2q': true, 68 58 // BookSky 💙📚 #booksky 69 - 'at://did:plc:geoqe3qls5mwezckxxsewys2/app.bsky.feed.post/3kgrm2rw5ww2e': 70 - true, 59 + 'at://did:plc:geoqe3qls5mwezckxxsewys2/app.bsky.feed.post/3kgrm2rw5ww2e': true, 71 60 } 72 61 73 62 export type FeedPreviewItem =
+2 -3
src/state/queries/notifications/settings.ts
··· 36 36 mutationFn: async ( 37 37 update: Partial<AppBskyNotificationDefs.Preferences>, 38 38 ) => { 39 - const response = await agent.app.bsky.notification.putPreferencesV2( 40 - update, 41 - ) 39 + const response = 40 + await agent.app.bsky.notification.putPreferencesV2(update) 42 41 return response.data.preferences 43 42 }, 44 43 onMutate: update => {
+5 -5
src/state/queries/notifications/unread.tsx
··· 14 14 import {useModerationOpts} from '../../preferences/moderation-opts' 15 15 import {truncateAndInvalidate} from '../util' 16 16 import {RQKEY as RQKEY_NOTIFS} from './feed' 17 - import {CachedFeedPage, FeedPage} from './types' 17 + import {type CachedFeedPage, type FeedPage} from './types' 18 18 import {fetchPage} from './util' 19 19 20 20 const UPDATE_INTERVAL = 30 * 1e3 // 30sec ··· 94 94 data.event === '30+' 95 95 ? 30 96 96 : data.event === '' 97 - ? 0 98 - : parseInt(data.event, 10) || 1, 97 + ? 0 98 + : parseInt(data.event, 10) || 1, 99 99 } 100 100 setNumUnread(data.event) 101 101 } ··· 164 164 unreadCount >= 30 165 165 ? '30+' 166 166 : unreadCount === 0 167 - ? '' 168 - : String(unreadCount) 167 + ? '' 168 + : String(unreadCount) 169 169 170 170 // track last sync 171 171 const now = new Date()
+2 -2
src/state/queries/usePostThread/index.ts
··· 52 52 return view === 'linear' 53 53 ? LINEAR_VIEW_BELOW 54 54 : isWeb && gtPhone 55 - ? TREE_VIEW_BELOW_DESKTOP 56 - : TREE_VIEW_BELOW 55 + ? TREE_VIEW_BELOW_DESKTOP 56 + : TREE_VIEW_BELOW 57 57 }, [view, gtPhone]) 58 58 59 59 const postThreadQueryKey = createPostThreadQueryKey({
+1 -1
src/state/queries/usePostThread/traversal.ts
··· 444 444 const anchorPost = items.at(0) 445 445 const hasAnchorFromCache = anchorPost && anchorPost.type === 'threadPost' 446 446 const skeletonReplies = hasAnchorFromCache 447 - ? anchorPost.value.post.replyCount ?? 4 447 + ? (anchorPost.value.post.replyCount ?? 4) 448 448 : 4 449 449 450 450 if (!items.length) {
+5 -13
src/storage/index.ts
··· 1 1 import {useCallback, useEffect, useState} from 'react' 2 2 import {MMKV} from 'react-native-mmkv' 3 3 4 - import {Account, Device} from '#/storage/schema' 4 + import {type Account, type Device} from '#/storage/schema' 5 5 6 6 export * from '#/storage/schema' 7 7 ··· 83 83 } 84 84 } 85 85 86 - type StorageSchema<T extends Storage<any, any>> = T extends Storage< 87 - any, 88 - infer U 89 - > 90 - ? U 91 - : never 92 - type StorageScopes<T extends Storage<any, any>> = T extends Storage< 93 - infer S, 94 - any 95 - > 96 - ? S 97 - : never 86 + type StorageSchema<T extends Storage<any, any>> = 87 + T extends Storage<any, infer U> ? U : never 88 + type StorageScopes<T extends Storage<any, any>> = 89 + T extends Storage<infer S, any> ? S : never 98 90 99 91 /** 100 92 * Hook to use a storage instance. Acts like a useState hook, but persists the
+2 -1
src/style.css
··· 328 328 329 329 /* #/components/Select/index.web.tsx */ 330 330 .radix-select-content { 331 - box-shadow: 0px 6px 24px -10px rgba(22, 23, 24, 0.25), 331 + box-shadow: 332 + 0px 6px 24px -10px rgba(22, 23, 24, 0.25), 332 333 0px 6px 12px -12px rgba(22, 23, 24, 0.15); 333 334 min-width: var(--radix-select-trigger-width); 334 335 max-height: var(--radix-select-content-available-height);
+16 -16
src/view/com/composer/Composer.tsx
··· 518 518 thread.posts.length > 1 519 519 ? _(msg`Your posts have been published`) 520 520 : replyTo 521 - ? _(msg`Your reply has been published`) 522 - : _(msg`Your post has been published`), 521 + ? _(msg`Your reply has been published`) 522 + : _(msg`Your post has been published`), 523 523 ) 524 524 }, [ 525 525 _, ··· 1000 1000 }), 1001 1001 ) 1002 1002 : isThread 1003 - ? _( 1004 - msg({ 1005 - message: 'Publish posts', 1006 - comment: 1007 - 'Accessibility label for button to publish multiple posts in a thread', 1008 - }), 1009 - ) 1010 - : _( 1011 - msg({ 1012 - message: 'Publish post', 1013 - comment: 1014 - 'Accessibility label for button to publish a single post', 1015 - }), 1016 - ) 1003 + ? _( 1004 + msg({ 1005 + message: 'Publish posts', 1006 + comment: 1007 + 'Accessibility label for button to publish multiple posts in a thread', 1008 + }), 1009 + ) 1010 + : _( 1011 + msg({ 1012 + message: 'Publish post', 1013 + comment: 1014 + 'Accessibility label for button to publish a single post', 1015 + }), 1016 + ) 1017 1017 } 1018 1018 variant="solid" 1019 1019 color="primary"
+10 -10
src/view/com/composer/photos/Gallery.tsx
··· 1 1 import React from 'react' 2 2 import { 3 - ImageStyle, 3 + type ImageStyle, 4 4 Keyboard, 5 - LayoutChangeEvent, 5 + type LayoutChangeEvent, 6 6 StyleSheet, 7 7 TouchableOpacity, 8 8 View, 9 - ViewStyle, 9 + type ViewStyle, 10 10 } from 'react-native' 11 11 import {Image} from 'expo-image' 12 12 import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' ··· 14 14 import {useLingui} from '@lingui/react' 15 15 16 16 import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' 17 - import {Dimensions} from '#/lib/media/types' 17 + import {type Dimensions} from '#/lib/media/types' 18 18 import {colors, s} from '#/lib/styles' 19 19 import {isNative} from '#/platform/detection' 20 - import {ComposerImage, cropImage} from '#/state/gallery' 20 + import {type ComposerImage, cropImage} from '#/state/gallery' 21 21 import {Text} from '#/view/com/util/text/Text' 22 22 import {useTheme} from '#/alf' 23 23 import * as Dialog from '#/components/Dialog' 24 - import {PostAction} from '../state/composer' 24 + import {type PostAction} from '../state/composer' 25 25 import {EditImageDialog} from './EditImageDialog' 26 26 import {ImageAltTextDialog} from './ImageAltTextDialog' 27 27 ··· 74 74 altTextControlStyle: isOverflow 75 75 ? {left: 4, bottom: 4} 76 76 : !isMobile && images.length < 3 77 - ? {left: 8, top: 8} 78 - : {left: 4, top: 4}, 77 + ? {left: 8, top: 8} 78 + : {left: 4, top: 4}, 79 79 imageControlsStyle: { 80 80 display: 'flex' as const, 81 81 flexDirection: 'row' as const, ··· 83 83 ...(isOverflow 84 84 ? {top: 4, right: 4, gap: 4} 85 85 : !isMobile && images.length < 3 86 - ? {top: 8, right: 8, gap: 8} 87 - : {top: 4, right: 4, gap: 4}), 86 + ? {top: 8, right: 8, gap: 8} 87 + : {top: 4, right: 4, gap: 4}), 88 88 zIndex: 1, 89 89 }, 90 90 imageStyle: {
+21 -16
src/view/com/composer/state/composer.ts
··· 1 - import {ImagePickerAsset} from 'expo-image-picker' 1 + import {type ImagePickerAsset} from 'expo-image-picker' 2 2 import { 3 - AppBskyFeedPostgate, 3 + type AppBskyFeedPostgate, 4 4 AppBskyRichtextFacet, 5 - BskyPreferences, 5 + type BskyPreferences, 6 6 RichText, 7 7 } from '@atproto/api' 8 8 import {nanoid} from 'nanoid/non-secure' 9 9 10 - import {SelfLabel} from '#/lib/moderation' 10 + import {type SelfLabel} from '#/lib/moderation' 11 11 import {insertMentionAt} from '#/lib/strings/mention-manip' 12 12 import {shortenLinks} from '#/lib/strings/rich-text-manip' 13 13 import { ··· 15 15 postUriToRelativePath, 16 16 toBskyAppUrl, 17 17 } from '#/lib/strings/url-helpers' 18 - import {ComposerImage, createInitialImages} from '#/state/gallery' 18 + import {type ComposerImage, createInitialImages} from '#/state/gallery' 19 19 import {createPostgateRecord} from '#/state/queries/postgate/util' 20 - import {Gif} from '#/state/queries/tenor' 20 + import {type Gif} from '#/state/queries/tenor' 21 21 import {threadgateRecordToAllowUISetting} from '#/state/queries/threadgate' 22 - import {ThreadgateAllowUISetting} from '#/state/queries/threadgate' 23 - import {ComposerOpts} from '#/state/shell/composer' 22 + import {type ThreadgateAllowUISetting} from '#/state/queries/threadgate' 23 + import {type ComposerOpts} from '#/state/shell/composer' 24 24 import { 25 - LinkFacetMatch, 25 + type LinkFacetMatch, 26 26 suggestLinkCardUri, 27 27 } from '#/view/com/composer/text-input/text-input-util' 28 - import {createVideoState, VideoAction, videoReducer, VideoState} from './video' 28 + import { 29 + createVideoState, 30 + type VideoAction, 31 + videoReducer, 32 + type VideoState, 33 + } from './video' 29 34 30 35 type ImagesMedia = { 31 36 type: 'images' ··· 514 519 text: initText 515 520 ? initText 516 521 : initMention 517 - ? insertMentionAt( 518 - `@${initMention}`, 519 - initMention.length + 1, 520 - `${initMention}`, 521 - ) 522 - : '', 522 + ? insertMentionAt( 523 + `@${initMention}`, 524 + initMention.length + 1, 525 + `${initMention}`, 526 + ) 527 + : '', 523 528 }) 524 529 525 530 let link: Link | undefined
+2 -2
src/view/com/composer/text-input/web/Autocomplete.tsx
··· 209 209 itemIndex === 0 210 210 ? styles.firstMention 211 211 : itemIndex === totalItems - 1 212 - ? styles.lastMention 213 - : undefined, 212 + ? styles.lastMention 213 + : undefined, 214 214 ]} 215 215 onPress={onPress} 216 216 accessibilityRole="button">
+6 -6
src/view/com/lightbox/Lightbox.web.tsx
··· 1 1 import React, {useCallback, useEffect, useState} from 'react' 2 2 import { 3 3 Image, 4 - ImageStyle, 4 + type ImageStyle, 5 5 Pressable, 6 6 StyleSheet, 7 7 TouchableOpacity, 8 8 TouchableWithoutFeedback, 9 9 View, 10 - ViewStyle, 10 + type ViewStyle, 11 11 } from 'react-native' 12 12 import { 13 13 FontAwesomeIcon, 14 - FontAwesomeIconStyle, 14 + type FontAwesomeIconStyle, 15 15 } from '@fortawesome/react-native-fontawesome' 16 16 import {msg} from '@lingui/macro' 17 17 import {useLingui} from '@lingui/react' ··· 21 21 import {colors, s} from '#/lib/styles' 22 22 import {useLightbox, useLightboxControls} from '#/state/lightbox' 23 23 import {Text} from '../util/text/Text' 24 - import {ImageSource} from './ImageViewing/@types' 24 + import {type ImageSource} from './ImageViewing/@types' 25 25 import ImageDefaultHeader from './ImageViewing/components/ImageDefaultHeader' 26 26 27 27 export function Lightbox() { ··· 121 121 img.type === 'circle-avi' 122 122 ? '50%' 123 123 : img.type === 'rect-avi' 124 - ? '10%' 125 - : 0, 124 + ? '10%' 125 + : 0, 126 126 } as ImageStyle 127 127 } 128 128 alt={img.alt}
+2 -2
src/view/com/post-thread/PostThreadItem.tsx
··· 630 630 showChildReplyLine && !isThreadedChild 631 631 ? 0 632 632 : isThreadedChildAdjacentBot 633 - ? 4 634 - : 8, 633 + ? 4 634 + : 8, 635 635 }, 636 636 ]}> 637 637 {/* If we are in threaded mode, the avatar is rendered in PostMeta */}
+5 -6
src/view/com/posts/PostFeed.tsx
··· 132 132 key: string 133 133 } 134 134 135 - export function getItemsForFeedback(feedRow: FeedRow): 136 - | { 137 - item: FeedPostSliceItem 138 - feedContext: string | undefined 139 - reqId: string | undefined 140 - }[] { 135 + export function getItemsForFeedback(feedRow: FeedRow): { 136 + item: FeedPostSliceItem 137 + feedContext: string | undefined 138 + reqId: string | undefined 139 + }[] { 141 140 if (feedRow.type === 'sliceItem') { 142 141 return feedRow.slice.items.map(item => ({ 143 142 item,
+8 -4
src/view/com/posts/PostFeedErrorMessage.tsx
··· 1 1 import React from 'react' 2 2 import {View} from 'react-native' 3 - import {AppBskyActorDefs, AppBskyFeedGetAuthorFeed, AtUri} from '@atproto/api' 3 + import { 4 + type AppBskyActorDefs, 5 + AppBskyFeedGetAuthorFeed, 6 + AtUri, 7 + } from '@atproto/api' 4 8 import {msg as msgLingui, Trans} from '@lingui/macro' 5 9 import {useLingui} from '@lingui/react' 6 10 import {useNavigation} from '@react-navigation/native' 7 11 8 12 import {usePalette} from '#/lib/hooks/usePalette' 9 - import {NavigationProp} from '#/lib/routes/types' 13 + import {type NavigationProp} from '#/lib/routes/types' 10 14 import {cleanError} from '#/lib/strings/errors' 11 15 import {logger} from '#/logger' 12 - import {FeedDescriptor} from '#/state/queries/post-feed' 16 + import {type FeedDescriptor} from '#/state/queries/post-feed' 13 17 import {useRemoveFeedMutation} from '#/state/queries/preferences' 14 18 import * as Prompt from '#/components/Prompt' 15 19 import {EmptyState} from '../util/EmptyState' ··· 119 123 [KnownError.FeedTooManyRequests]: _l( 120 124 msgLingui`This feed is currently receiving high traffic and is temporarily unavailable. Please try again later.`, 121 125 ), 122 - }[knownError]), 126 + })[knownError], 123 127 [_l, knownError], 124 128 ) 125 129 const [_, uri] = feedDesc.split('|')
+6 -6
src/view/com/profile/ProfileMenu.tsx
··· 461 461 msg`The account will be able to interact with you after unblocking.`, 462 462 ) 463 463 : profile.associated?.labeler 464 - ? _( 465 - msg`Blocking will not prevent labels from being applied on your account, but it will stop this account from replying in your threads or interacting with you.`, 466 - ) 467 - : _( 468 - msg`Blocked accounts cannot reply in your threads, mention you, or otherwise interact with you.`, 469 - ) 464 + ? _( 465 + msg`Blocking will not prevent labels from being applied on your account, but it will stop this account from replying in your threads or interacting with you.`, 466 + ) 467 + : _( 468 + msg`Blocked accounts cannot reply in your threads, mention you, or otherwise interact with you.`, 469 + ) 470 470 } 471 471 onConfirm={blockAccount} 472 472 confirmButtonCta={
+8 -3
src/view/com/util/List.web.tsx
··· 1 1 import React, {isValidElement, memo, startTransition, useRef} from 'react' 2 - import {FlatListProps, StyleSheet, View, ViewProps} from 'react-native' 3 - import {ReanimatedScrollEvent} from 'react-native-reanimated/lib/typescript/hook/commonTypes' 2 + import { 3 + type FlatListProps, 4 + StyleSheet, 5 + View, 6 + type ViewProps, 7 + } from 'react-native' 8 + import {type ReanimatedScrollEvent} from 'react-native-reanimated/lib/typescript/hook/commonTypes' 4 9 5 10 import {batchedUpdates} from '#/lib/batchedUpdates' 6 11 import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' ··· 205 210 behavior: animated ? 'smooth' : 'instant', 206 211 }) 207 212 }, 208 - } as any), // TODO: Better types. 213 + }) as any, // TODO: Better types. 209 214 [getScrollableNode], 210 215 ) 211 216
+8 -8
src/view/screens/DebugMod.tsx
··· 112 112 }), 113 113 ] 114 114 : scenario[0] === 'label' && target[0] === 'profile' 115 - ? [ 116 - mock.label({ 117 - src: isSelfLabel ? did : undefined, 118 - val: label[0], 119 - uri: `at://${did}/app.bsky.actor.profile/self`, 120 - }), 121 - ] 122 - : undefined, 115 + ? [ 116 + mock.label({ 117 + src: isSelfLabel ? did : undefined, 118 + val: label[0], 119 + uri: `at://${did}/app.bsky.actor.profile/self`, 120 + }), 121 + ] 122 + : undefined, 123 123 viewer: mock.actorViewerState({ 124 124 following: isFollowing 125 125 ? `at://${currentAccount?.did || ''}/app.bsky.graph.follow/1234`
+61 -59
svgo.config.mjs
··· 1 1 const preset = [ 2 - "removeDoctype", 3 - "removeXMLProcInst", 4 - "removeComments", 5 - "removeMetadata", 6 - "removeEditorsNSData", 7 - "cleanupAttrs", 8 - "mergeStyles", 9 - "inlineStyles", 10 - "minifyStyles", 11 - "cleanupIds", 12 - "removeUselessDefs", 13 - "cleanupNumericValues", 14 - "convertColors", 15 - "removeUnknownsAndDefaults", 16 - "removeNonInheritableGroupAttrs", 17 - "removeUselessStrokeAndFill", 18 - "removeDimensions", 19 - "cleanupEnableBackground", 20 - "removeHiddenElems", 21 - "removeEmptyText", 22 - "convertShapeToPath", 23 - "convertEllipseToCircle", 24 - "moveElemsAttrsToGroup", 25 - "moveGroupAttrsToElems", 26 - "collapseGroups", 27 - "convertPathData", 28 - "convertTransform", 29 - "removeEmptyAttrs", 30 - "removeEmptyContainers", 31 - "removeUnusedNS", 32 - "mergePaths", 33 - "sortAttrs", 34 - "sortDefsChildren", 35 - "removeTitle", 36 - "removeDesc", 2 + 'removeDoctype', 3 + 'removeXMLProcInst', 4 + 'removeComments', 5 + 'removeMetadata', 6 + 'removeEditorsNSData', 7 + 'cleanupAttrs', 8 + 'mergeStyles', 9 + 'inlineStyles', 10 + 'minifyStyles', 11 + 'cleanupIds', 12 + 'removeUselessDefs', 13 + 'cleanupNumericValues', 14 + 'convertColors', 15 + 'removeUnknownsAndDefaults', 16 + 'removeNonInheritableGroupAttrs', 17 + 'removeUselessStrokeAndFill', 18 + 'removeDimensions', 19 + 'cleanupEnableBackground', 20 + 'removeHiddenElems', 21 + 'removeEmptyText', 22 + 'convertShapeToPath', 23 + 'convertEllipseToCircle', 24 + 'moveElemsAttrsToGroup', 25 + 'moveGroupAttrsToElems', 26 + 'collapseGroups', 27 + 'convertPathData', 28 + 'convertTransform', 29 + 'removeEmptyAttrs', 30 + 'removeEmptyContainers', 31 + 'removeUnusedNS', 32 + 'mergePaths', 33 + 'sortAttrs', 34 + 'sortDefsChildren', 35 + 'removeTitle', 36 + 'removeDesc', 37 37 ] 38 38 39 39 export default { 40 - plugins: [...preset.map(name => ({ 41 - name, 42 - params: { 43 - floatPrecision: 3, 44 - transformPrecision: 5, 45 - // minimise diff in ouput from svgomg 46 - // maybe remove in future? will produce smaller output 47 - convertToZ: false, 48 - removeUseless: false, 49 - } 50 - })), 51 - { 52 - name: 'addTrailingWhitespace', 53 - fn() { 54 - return { 55 - root: { 56 - exit (root) { 57 - root.children.push({ type: 'text', value: '\n' }) 58 - return root 59 - } 40 + plugins: [ 41 + ...preset.map(name => ({ 42 + name, 43 + params: { 44 + floatPrecision: 3, 45 + transformPrecision: 5, 46 + // minimise diff in ouput from svgomg 47 + // maybe remove in future? will produce smaller output 48 + convertToZ: false, 49 + removeUseless: false, 50 + }, 51 + })), 52 + { 53 + name: 'addTrailingWhitespace', 54 + fn() { 55 + return { 56 + root: { 57 + exit(root) { 58 + root.children.push({type: 'text', value: '\n'}) 59 + return root 60 + }, 61 + }, 60 62 } 61 - } 62 - } 63 - }] 64 - }; 63 + }, 64 + }, 65 + ], 66 + }
+4 -4
yarn.lock
··· 16220 16220 resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" 16221 16221 integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== 16222 16222 16223 - prettier@^2.8.3: 16224 - version "2.8.8" 16225 - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" 16226 - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== 16223 + prettier@^3.6.0: 16224 + version "3.6.0" 16225 + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.0.tgz#18ec98d62cb0757a5d4eab40253ff3e6d0fc8dea" 16226 + integrity sha512-ujSB9uXHJKzM/2GBuE0hBOUgC77CN3Bnpqa+g80bkv3T3A93wL/xlzDATHhnhkzifz/UE2SNOvmbTz5hSkDlHw== 16227 16227 16228 16228 pretty-bytes@^5.6.0: 16229 16229 version "5.6.0"