Page MenuHomePhabricator

D6693.id22368.diff
No OneTemporary

D6693.id22368.diff

This file is larger than 256 KB, so syntax highlighting was skipped.
diff --git a/keyserver/src/creators/account-creator.js b/keyserver/src/creators/account-creator.js
--- a/keyserver/src/creators/account-creator.js
+++ b/keyserver/src/creators/account-creator.js
@@ -29,6 +29,13 @@
import { reservedUsernamesSet } from 'lib/utils/reserved-users.js';
import { isValidEthereumAddress } from 'lib/utils/siwe-utils.js';
+import createIDs from './id-creator.js';
+import createMessages from './message-creator.js';
+import {
+ createThread,
+ createPrivateThread,
+ privateThreadDescription,
+} from './thread-creator.js';
import { dbQuery, SQL } from '../database/database.js';
import { deleteCookie } from '../deleters/cookie-deleters.js';
import { fetchThreadInfos } from '../fetchers/thread-fetchers.js';
@@ -42,13 +49,6 @@
import type { Viewer } from '../session/viewer.js';
import { updateThread } from '../updaters/thread-updaters.js';
import { viewerAcknowledgmentUpdater } from '../updaters/viewer-acknowledgment-updater.js';
-import createIDs from './id-creator.js';
-import createMessages from './message-creator.js';
-import {
- createThread,
- createPrivateThread,
- privateThreadDescription,
-} from './thread-creator.js';
const { commbot } = bots;
diff --git a/keyserver/src/creators/day-creator.js b/keyserver/src/creators/day-creator.js
--- a/keyserver/src/creators/day-creator.js
+++ b/keyserver/src/creators/day-creator.js
@@ -2,8 +2,8 @@
import { ServerError } from 'lib/utils/errors.js';
-import { dbQuery, SQL } from '../database/database.js';
import createIDs from './id-creator.js';
+import { dbQuery, SQL } from '../database/database.js';
const MYSQL_DUPLICATE_ENTRY_FOR_KEY_ERROR_CODE = 1062;
diff --git a/keyserver/src/creators/message-creator.js b/keyserver/src/creators/message-creator.js
--- a/keyserver/src/creators/message-creator.js
+++ b/keyserver/src/creators/message-creator.js
@@ -22,6 +22,9 @@
import { updateTypes } from 'lib/types/update-types.js';
import { promiseAll } from 'lib/utils/promises.js';
+import createIDs from './id-creator.js';
+import type { UpdatesForCurrentSession } from './update-creator.js';
+import { createUpdates } from './update-creator.js';
import {
dbQuery,
SQL,
@@ -40,9 +43,6 @@
import { earliestFocusedTimeConsideredExpired } from '../shared/focused-times.js';
import { publisher } from '../socket/redis.js';
import { creationString } from '../utils/idempotent.js';
-import createIDs from './id-creator.js';
-import type { UpdatesForCurrentSession } from './update-creator.js';
-import { createUpdates } from './update-creator.js';
type UserThreadInfo = {
+devices: Map<
diff --git a/keyserver/src/creators/message-report-creator.js b/keyserver/src/creators/message-report-creator.js
--- a/keyserver/src/creators/message-report-creator.js
+++ b/keyserver/src/creators/message-report-creator.js
@@ -9,6 +9,7 @@
import { ServerError } from 'lib/utils/errors.js';
import { promiseAll } from 'lib/utils/promises.js';
+import createMessages from './message-creator.js';
import { createCommbotThread } from '../bots/commbot.js';
import { fetchMessageInfoByID } from '../fetchers/message-fetchers.js';
import {
@@ -20,7 +21,6 @@
fetchKeyserverAdminID,
} from '../fetchers/user-fetchers.js';
import type { Viewer } from '../session/viewer.js';
-import createMessages from './message-creator.js';
const { commbot } = bots;
diff --git a/keyserver/src/creators/relationship-creators.js b/keyserver/src/creators/relationship-creators.js
--- a/keyserver/src/creators/relationship-creators.js
+++ b/keyserver/src/creators/relationship-creators.js
@@ -15,11 +15,11 @@
} from 'lib/types/relationship-types.js';
import { getAllTuples } from 'lib/utils/array.js';
+import { createUpdates } from './update-creator.js';
import {
updateUndirectedRelationships,
updateDatasForUserPairs,
} from '../updaters/relationship-updaters.js';
-import { createUpdates } from './update-creator.js';
type QueryResult = {
+thread: number,
diff --git a/keyserver/src/creators/report-creator.js b/keyserver/src/creators/report-creator.js
--- a/keyserver/src/creators/report-creator.js
+++ b/keyserver/src/creators/report-creator.js
@@ -22,14 +22,14 @@
type ReduxCrashReport,
} from 'lib/utils/sanitization.js';
+import createIDs from './id-creator.js';
+import createMessages from './message-creator.js';
import { dbQuery, SQL } from '../database/database.js';
import { fetchUsername } from '../fetchers/user-fetchers.js';
import { handleAsyncPromise } from '../responders/handlers.js';
import { createBotViewer } from '../session/bots.js';
import type { Viewer } from '../session/viewer.js';
import { getAndAssertCommAppURLFacts } from '../utils/urls.js';
-import createIDs from './id-creator.js';
-import createMessages from './message-creator.js';
const { commbot } = bots;
diff --git a/keyserver/src/creators/role-creator.js b/keyserver/src/creators/role-creator.js
--- a/keyserver/src/creators/role-creator.js
+++ b/keyserver/src/creators/role-creator.js
@@ -10,8 +10,8 @@
threadTypes,
} from 'lib/types/thread-types.js';
-import { dbQuery, SQL } from '../database/database.js';
import createIDs from './id-creator.js';
+import { dbQuery, SQL } from '../database/database.js';
type InitialRoles = {
default: RoleInfo,
diff --git a/keyserver/src/creators/thread-creator.js b/keyserver/src/creators/thread-creator.js
--- a/keyserver/src/creators/thread-creator.js
+++ b/keyserver/src/creators/thread-creator.js
@@ -25,6 +25,13 @@
import { promiseAll } from 'lib/utils/promises.js';
import { firstLine } from 'lib/utils/string-utils.js';
+import createIDs from './id-creator.js';
+import createMessages from './message-creator.js';
+import {
+ createInitialRolesForNewThread,
+ getRolePermissionBlobs,
+} from './role-creator.js';
+import type { UpdatesForCurrentSession } from './update-creator.js';
import { dbQuery, SQL } from '../database/database.js';
import { fetchMessageInfoByID } from '../fetchers/message-fetchers.js';
import {
@@ -44,13 +51,6 @@
} from '../updaters/thread-permission-updaters.js';
import { joinThread } from '../updaters/thread-updaters.js';
import RelationshipChangeset from '../utils/relationship-changeset.js';
-import createIDs from './id-creator.js';
-import createMessages from './message-creator.js';
-import {
- createInitialRolesForNewThread,
- getRolePermissionBlobs,
-} from './role-creator.js';
-import type { UpdatesForCurrentSession } from './update-creator.js';
const { commbot } = bots;
diff --git a/keyserver/src/creators/update-creator.js b/keyserver/src/creators/update-creator.js
--- a/keyserver/src/creators/update-creator.js
+++ b/keyserver/src/creators/update-creator.js
@@ -38,6 +38,7 @@
} from 'lib/types/user-types.js';
import { promiseAll } from 'lib/utils/promises.js';
+import createIDs from './id-creator.js';
import { dbQuery, SQL, mergeAndConditions } from '../database/database.js';
import type { SQLStatementType } from '../database/types.js';
import { deleteUpdatesByConditions } from '../deleters/update-deleters.js';
@@ -56,7 +57,6 @@
} from '../fetchers/user-fetchers.js';
import type { Viewer } from '../session/viewer.js';
import { channelNameForUpdateTarget, publisher } from '../socket/redis.js';
-import createIDs from './id-creator.js';
export type UpdatesForCurrentSession =
// This is the default if no Viewer is passed, or if an isSocket Viewer is
diff --git a/keyserver/src/creators/upload-creator.js b/keyserver/src/creators/upload-creator.js
--- a/keyserver/src/creators/upload-creator.js
+++ b/keyserver/src/creators/upload-creator.js
@@ -10,10 +10,10 @@
} from 'lib/types/media-types.js';
import { ServerError } from 'lib/utils/errors.js';
+import createIDs from './id-creator.js';
import { dbQuery, SQL } from '../database/database.js';
import { getUploadURL } from '../fetchers/upload-fetchers.js';
import type { Viewer } from '../session/viewer.js';
-import createIDs from './id-creator.js';
export type UploadInput = {
name: string,
diff --git a/keyserver/src/cron/cron.js b/keyserver/src/cron/cron.js
--- a/keyserver/src/cron/cron.js
+++ b/keyserver/src/cron/cron.js
@@ -3,6 +3,9 @@
import cluster from 'cluster';
import schedule from 'node-schedule';
+import { backupDB } from './backups.js';
+import { createDailyUpdatesThread } from './daily-updates.js';
+import { updateAndReloadGeoipDB } from './update-geoip-db.js';
import { deleteOrphanedActivity } from '../deleters/activity-deleters.js';
import { deleteExpiredCookies } from '../deleters/cookie-deleters.js';
import { deleteOrphanedDays } from '../deleters/day-deleters.js';
@@ -20,9 +23,6 @@
import { deleteInaccessibleThreads } from '../deleters/thread-deleters.js';
import { deleteExpiredUpdates } from '../deleters/update-deleters.js';
import { deleteUnassignedUploads } from '../deleters/upload-deleters.js';
-import { backupDB } from './backups.js';
-import { createDailyUpdatesThread } from './daily-updates.js';
-import { updateAndReloadGeoipDB } from './update-geoip-db.js';
if (cluster.isMaster) {
schedule.scheduleJob(
diff --git a/keyserver/src/database/database.js b/keyserver/src/database/database.js
--- a/keyserver/src/database/database.js
+++ b/keyserver/src/database/database.js
@@ -5,11 +5,11 @@
import mysqlPromise from 'mysql2/promise.js';
import SQL from 'sql-template-strings';
-import { getScriptContext } from '../scripts/script-context.js';
import { connectionLimit, queryWarnTime } from './consts.js';
import { getDBConfig } from './db-config.js';
import DatabaseMonitor from './monitor.js';
import type { Pool, SQLOrString, SQLStatementType } from './types.js';
+import { getScriptContext } from '../scripts/script-context.js';
const SQLStatement: SQLStatementType = SQL.SQLStatement;
diff --git a/keyserver/src/fetchers/entry-fetchers.js b/keyserver/src/fetchers/entry-fetchers.js
--- a/keyserver/src/fetchers/entry-fetchers.js
+++ b/keyserver/src/fetchers/entry-fetchers.js
@@ -24,6 +24,7 @@
import { dateString } from 'lib/utils/date-utils.js';
import { ServerError } from 'lib/utils/errors.js';
+import { checkIfThreadIsBlocked } from './thread-permission-fetchers.js';
import {
dbQuery,
SQL,
@@ -33,7 +34,6 @@
import type { SQLStatementType } from '../database/types.js';
import type { Viewer } from '../session/viewer.js';
import { creationString } from '../utils/idempotent.js';
-import { checkIfThreadIsBlocked } from './thread-permission-fetchers.js';
async function fetchEntryInfo(
viewer: Viewer,
diff --git a/keyserver/src/fetchers/message-fetchers.js b/keyserver/src/fetchers/message-fetchers.js
--- a/keyserver/src/fetchers/message-fetchers.js
+++ b/keyserver/src/fetchers/message-fetchers.js
@@ -25,6 +25,10 @@
import { threadPermissions } from 'lib/types/thread-types.js';
import { ServerError } from 'lib/utils/errors.js';
+import {
+ constructMediaFromMediaMessageContentsAndUploadRows,
+ mediaFromRow,
+} from './upload-fetchers.js';
import {
dbQuery,
SQL,
@@ -38,10 +42,6 @@
creationString,
localIDFromCreationString,
} from '../utils/idempotent.js';
-import {
- constructMediaFromMediaMessageContentsAndUploadRows,
- mediaFromRow,
-} from './upload-fetchers.js';
export type CollapsableNotifInfo = {
collapseKey: ?string,
diff --git a/keyserver/src/fetchers/thread-permission-fetchers.js b/keyserver/src/fetchers/thread-permission-fetchers.js
--- a/keyserver/src/fetchers/thread-permission-fetchers.js
+++ b/keyserver/src/fetchers/thread-permission-fetchers.js
@@ -18,10 +18,10 @@
ThreadRolePermissionsBlob,
} from 'lib/types/thread-types.js';
-import { dbQuery, SQL } from '../database/database.js';
-import type { Viewer } from '../session/viewer.js';
import { fetchThreadInfos } from './thread-fetchers.js';
import { fetchKnownUserInfos } from './user-fetchers.js';
+import { dbQuery, SQL } from '../database/database.js';
+import type { Viewer } from '../session/viewer.js';
// Note that it's risky to verify permissions by inspecting the blob directly.
// There are other factors that can override permissions in the permissions
diff --git a/keyserver/src/fetchers/update-fetchers.js b/keyserver/src/fetchers/update-fetchers.js
--- a/keyserver/src/fetchers/update-fetchers.js
+++ b/keyserver/src/fetchers/update-fetchers.js
@@ -10,8 +10,8 @@
} from 'lib/types/update-types.js';
import { ServerError } from 'lib/utils/errors.js';
-import type { ViewerInfo } from '../creators/update-creator.js';
import {
+ type ViewerInfo,
type FetchUpdatesResult,
fetchUpdateInfosWithRawUpdateInfos,
} from '../creators/update-creator.js';
diff --git a/keyserver/src/push/rescind.js b/keyserver/src/push/rescind.js
--- a/keyserver/src/push/rescind.js
+++ b/keyserver/src/push/rescind.js
@@ -7,11 +7,11 @@
import { threadPermissions } from 'lib/types/thread-types.js';
import { promiseAll } from 'lib/utils/promises.js';
+import { getAPNsNotificationTopic } from './providers.js';
+import { apnPush, fcmPush } from './utils.js';
import createIDs from '../creators/id-creator.js';
import { dbQuery, SQL } from '../database/database.js';
import type { SQLStatementType } from '../database/types.js';
-import { getAPNsNotificationTopic } from './providers.js';
-import { apnPush, fcmPush } from './utils.js';
async function rescindPushNotifs(
notifCondition: SQLStatementType,
diff --git a/keyserver/src/push/send.js b/keyserver/src/push/send.js
--- a/keyserver/src/push/send.js
+++ b/keyserver/src/push/send.js
@@ -31,6 +31,14 @@
import { updateTypes } from 'lib/types/update-types.js';
import { promiseAll } from 'lib/utils/promises.js';
+import { getAPNsNotificationTopic } from './providers.js';
+import {
+ apnPush,
+ fcmPush,
+ getUnreadCounts,
+ apnMaxNotificationPayloadByteSize,
+ fcmMaxNotificationPayloadByteSize,
+} from './utils.js';
import createIDs from '../creators/id-creator.js';
import { createUpdates } from '../creators/update-creator.js';
import { dbQuery, SQL, mergeOrConditions } from '../database/database.js';
@@ -40,14 +48,6 @@
import { fetchUserInfos } from '../fetchers/user-fetchers.js';
import type { Viewer } from '../session/viewer.js';
import { getENSNames } from '../utils/ens-cache.js';
-import { getAPNsNotificationTopic } from './providers.js';
-import {
- apnPush,
- fcmPush,
- getUnreadCounts,
- apnMaxNotificationPayloadByteSize,
- fcmMaxNotificationPayloadByteSize,
-} from './utils.js';
type Device = {
+deviceType: DeviceType,
diff --git a/keyserver/src/push/utils.js b/keyserver/src/push/utils.js
--- a/keyserver/src/push/utils.js
+++ b/keyserver/src/push/utils.js
@@ -8,13 +8,13 @@
import { threadSubscriptions } from 'lib/types/subscription-types.js';
import { threadPermissions } from 'lib/types/thread-types.js';
-import { dbQuery, SQL } from '../database/database.js';
import {
getAPNPushProfileForCodeVersion,
getFCMPushProfileForCodeVersion,
getAPNProvider,
getFCMProvider,
} from './providers.js';
+import { dbQuery, SQL } from '../database/database.js';
const fcmTokenInvalidationErrors = new Set([
'messaging/registration-token-not-registered',
diff --git a/keyserver/src/responders/handlers.js b/keyserver/src/responders/handlers.js
--- a/keyserver/src/responders/handlers.js
+++ b/keyserver/src/responders/handlers.js
@@ -4,6 +4,7 @@
import { ServerError } from 'lib/utils/errors.js';
+import { getMessageForException } from './utils.js';
import { deleteCookie } from '../deleters/cookie-deleters.js';
import type { PolicyType } from '../lib/facts/policies.js';
import {
@@ -19,7 +20,6 @@
getAppURLFactsFromRequestURL,
} from '../utils/urls.js';
import { policiesValidator } from '../utils/validation-utils.js';
-import { getMessageForException } from './utils.js';
export type JSONResponder = {
responder: (viewer: Viewer, input: any) => Promise<*>,
diff --git a/keyserver/src/responders/landing-handler.js b/keyserver/src/responders/landing-handler.js
--- a/keyserver/src/responders/landing-handler.js
+++ b/keyserver/src/responders/landing-handler.js
@@ -12,10 +12,10 @@
isValidSIWENonce,
} from 'lib/utils/siwe-utils.js';
+import { getMessageForException } from './utils.js';
import { type LandingSSRProps } from '../landing/landing-ssr.react.js';
import { waitForStream } from '../utils/json-stream.js';
import { getAndAssertLandingURLFacts } from '../utils/urls.js';
-import { getMessageForException } from './utils.js';
async function landingHandler(req: $Request, res: $Response) {
try {
diff --git a/keyserver/src/responders/report-responders.js b/keyserver/src/responders/report-responders.js
--- a/keyserver/src/responders/report-responders.js
+++ b/keyserver/src/responders/report-responders.js
@@ -18,6 +18,7 @@
tPlatformDetails,
} from 'lib/utils/validation-utils.js';
+import { newEntryQueryInputValidator } from './entry-responders.js';
import createReport from '../creators/report-creator.js';
import {
fetchErrorReportInfos,
@@ -25,7 +26,6 @@
} from '../fetchers/report-fetchers.js';
import type { Viewer } from '../session/viewer.js';
import { validateInput } from '../utils/validation-utils.js';
-import { newEntryQueryInputValidator } from './entry-responders.js';
const tActionSummary = tShape({
type: t.String,
diff --git a/keyserver/src/responders/thread-responders.js b/keyserver/src/responders/thread-responders.js
--- a/keyserver/src/responders/thread-responders.js
+++ b/keyserver/src/responders/thread-responders.js
@@ -25,6 +25,10 @@
tPassword,
} from 'lib/utils/validation-utils.js';
+import {
+ entryQueryInputValidator,
+ verifyCalendarQueryThreadIDs,
+} from './entry-responders.js';
import { createThread } from '../creators/thread-creator.js';
import { deleteThread } from '../deleters/thread-deleters.js';
import type { Viewer } from '../session/viewer.js';
@@ -36,10 +40,6 @@
joinThread,
} from '../updaters/thread-updaters.js';
import { validateInput } from '../utils/validation-utils.js';
-import {
- entryQueryInputValidator,
- verifyCalendarQueryThreadIDs,
-} from './entry-responders.js';
const threadDeletionRequestInputValidator = tShape({
threadID: t.String,
diff --git a/keyserver/src/responders/user-responders.js b/keyserver/src/responders/user-responders.js
--- a/keyserver/src/responders/user-responders.js
+++ b/keyserver/src/responders/user-responders.js
@@ -54,6 +54,12 @@
tRegex,
} from 'lib/utils/validation-utils.js';
+import {
+ entryQueryInputValidator,
+ newEntryQueryInputValidator,
+ normalizeCalendarQuery,
+ verifyCalendarQueryThreadIDs,
+} from './entry-responders.js';
import {
createAccount,
processSIWEAccountCreation,
@@ -87,12 +93,6 @@
import { userSubscriptionUpdater } from '../updaters/user-subscription-updaters.js';
import { viewerAcknowledgmentUpdater } from '../updaters/viewer-acknowledgment-updater.js';
import { validateInput } from '../utils/validation-utils.js';
-import {
- entryQueryInputValidator,
- newEntryQueryInputValidator,
- normalizeCalendarQuery,
- verifyCalendarQueryThreadIDs,
-} from './entry-responders.js';
const subscriptionUpdateRequestInputValidator = tShape({
threadID: t.String,
diff --git a/keyserver/src/scripts/add-edit-thread-detailed-permissions.js b/keyserver/src/scripts/add-edit-thread-detailed-permissions.js
--- a/keyserver/src/scripts/add-edit-thread-detailed-permissions.js
+++ b/keyserver/src/scripts/add-edit-thread-detailed-permissions.js
@@ -3,6 +3,7 @@
import bots from 'lib/facts/bots.js';
import { assertThreadType } from 'lib/types/thread-types.js';
+import { main } from './utils.js';
import { dbQuery, SQL } from '../database/database.js';
import { createScriptViewer } from '../session/scripts.js';
import { updateRoles } from '../updaters/role-updaters.js';
@@ -11,7 +12,6 @@
commitMembershipChangeset,
} from '../updaters/thread-permission-updaters.js';
import RelationshipChangeset from '../utils/relationship-changeset.js';
-import { main } from './utils.js';
async function addEditThreadDetailedPermissions() {
const batchSize = 10;
diff --git a/keyserver/src/scripts/add-indexes-for-account-deletion.js b/keyserver/src/scripts/add-indexes-for-account-deletion.js
--- a/keyserver/src/scripts/add-indexes-for-account-deletion.js
+++ b/keyserver/src/scripts/add-indexes-for-account-deletion.js
@@ -1,8 +1,8 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { setScriptContext } from './script-context.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
setScriptContext({
allowMultiStatementSQLQueries: true,
diff --git a/keyserver/src/scripts/add-key-column-for-sessions.js b/keyserver/src/scripts/add-key-column-for-sessions.js
--- a/keyserver/src/scripts/add-key-column-for-sessions.js
+++ b/keyserver/src/scripts/add-key-column-for-sessions.js
@@ -1,7 +1,7 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function addPublicKeyColumn() {
await dbQuery(SQL`
diff --git a/keyserver/src/scripts/add-key-column-for-users.js b/keyserver/src/scripts/add-key-column-for-users.js
--- a/keyserver/src/scripts/add-key-column-for-users.js
+++ b/keyserver/src/scripts/add-key-column-for-users.js
@@ -1,7 +1,7 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function addPublicKeyColumn() {
await dbQuery(SQL`
diff --git a/keyserver/src/scripts/add-leave-thread-permissions.js b/keyserver/src/scripts/add-leave-thread-permissions.js
--- a/keyserver/src/scripts/add-leave-thread-permissions.js
+++ b/keyserver/src/scripts/add-leave-thread-permissions.js
@@ -2,9 +2,9 @@
import { threadPermissions, threadTypes } from 'lib/types/thread-types.js';
+import { endScript } from './utils.js';
import { dbQuery, SQL } from '../database/database.js';
import { recalculateAllThreadPermissions } from '../updaters/thread-permission-updaters.js';
-import { endScript } from './utils.js';
async function main() {
try {
diff --git a/keyserver/src/scripts/add-primary-column-for-cookies.js b/keyserver/src/scripts/add-primary-column-for-cookies.js
--- a/keyserver/src/scripts/add-primary-column-for-cookies.js
+++ b/keyserver/src/scripts/add-primary-column-for-cookies.js
@@ -1,7 +1,7 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function addPrimaryColumn() {
await dbQuery(SQL`
diff --git a/keyserver/src/scripts/add-source-message-column.js b/keyserver/src/scripts/add-source-message-column.js
--- a/keyserver/src/scripts/add-source-message-column.js
+++ b/keyserver/src/scripts/add-source-message-column.js
@@ -1,7 +1,7 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function deleteUnreadColumn() {
await dbQuery(SQL`
diff --git a/keyserver/src/scripts/add-staff.js b/keyserver/src/scripts/add-staff.js
--- a/keyserver/src/scripts/add-staff.js
+++ b/keyserver/src/scripts/add-staff.js
@@ -2,9 +2,9 @@
import bots from 'lib/facts/bots.js';
+import { main } from './utils.js';
import { createScriptViewer } from '../session/scripts.js';
import { updateThread } from '../updaters/thread-updaters.js';
-import { main } from './utils.js';
const newStaffIDs = ['518252'];
diff --git a/keyserver/src/scripts/add-target-time-index-to-updates-table.js b/keyserver/src/scripts/add-target-time-index-to-updates-table.js
--- a/keyserver/src/scripts/add-target-time-index-to-updates-table.js
+++ b/keyserver/src/scripts/add-target-time-index-to-updates-table.js
@@ -1,8 +1,8 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { setScriptContext } from './script-context.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
setScriptContext({
allowMultiStatementSQLQueries: true,
diff --git a/keyserver/src/scripts/add-thread-ancestry.js b/keyserver/src/scripts/add-thread-ancestry.js
--- a/keyserver/src/scripts/add-thread-ancestry.js
+++ b/keyserver/src/scripts/add-thread-ancestry.js
@@ -6,9 +6,9 @@
} from 'lib/shared/thread-utils.js';
import type { ServerThreadInfo } from 'lib/types/thread-types.js';
+import { main } from './utils.js';
import { dbQuery, SQL } from '../database/database.js';
import { fetchServerThreadInfos } from '../fetchers/thread-fetchers.js';
-import { main } from './utils.js';
async function addColumnAndIndexes() {
await dbQuery(SQL`
diff --git a/keyserver/src/scripts/create-community.js b/keyserver/src/scripts/create-community.js
--- a/keyserver/src/scripts/create-community.js
+++ b/keyserver/src/scripts/create-community.js
@@ -3,9 +3,9 @@
import ashoat from 'lib/facts/ashoat.js';
import { threadTypes } from 'lib/types/thread-types.js';
+import { main } from './utils.js';
import { createThread } from '../creators/thread-creator.js';
import { createScriptViewer } from '../session/scripts.js';
-import { main } from './utils.js';
const communityName = 'New community';
diff --git a/keyserver/src/scripts/create-db.js b/keyserver/src/scripts/create-db.js
--- a/keyserver/src/scripts/create-db.js
+++ b/keyserver/src/scripts/create-db.js
@@ -1,6 +1,6 @@
// @flow
-import { setupDB } from '../database/setup-db.js';
import { main } from './utils.js';
+import { setupDB } from '../database/setup-db.js';
main([setupDB]);
diff --git a/keyserver/src/scripts/create-friend-relationships.js b/keyserver/src/scripts/create-friend-relationships.js
--- a/keyserver/src/scripts/create-friend-relationships.js
+++ b/keyserver/src/scripts/create-friend-relationships.js
@@ -2,9 +2,9 @@
import { undirectedStatus } from 'lib/types/relationship-types.js';
+import { endScript } from './utils.js';
import { createUndirectedRelationships } from '../creators/relationship-creators.js';
import { dbQuery, SQL } from '../database/database.js';
-import { endScript } from './utils.js';
async function main() {
try {
diff --git a/keyserver/src/scripts/create-many-threads-to-trigger-crash-loop.js b/keyserver/src/scripts/create-many-threads-to-trigger-crash-loop.js
--- a/keyserver/src/scripts/create-many-threads-to-trigger-crash-loop.js
+++ b/keyserver/src/scripts/create-many-threads-to-trigger-crash-loop.js
@@ -1,9 +1,9 @@
// @flow
import ashoat from 'lib/facts/ashoat.js';
+import { main } from './utils.js';
import { createThread } from '../creators/thread-creator.js';
import { createScriptViewer } from '../session/scripts.js';
-import { main } from './utils.js';
const testUserID = '';
const numOfThreads = 1000;
diff --git a/keyserver/src/scripts/create-metadata-table.js b/keyserver/src/scripts/create-metadata-table.js
--- a/keyserver/src/scripts/create-metadata-table.js
+++ b/keyserver/src/scripts/create-metadata-table.js
@@ -1,7 +1,7 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function createTable() {
await dbQuery(SQL`
diff --git a/keyserver/src/scripts/create-one-time-keys-table.js b/keyserver/src/scripts/create-one-time-keys-table.js
--- a/keyserver/src/scripts/create-one-time-keys-table.js
+++ b/keyserver/src/scripts/create-one-time-keys-table.js
@@ -1,7 +1,7 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { main, endScript } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function addOneTimeKeysTable() {
await dbQuery(SQL`
diff --git a/keyserver/src/scripts/create-one-time-settings-table.js b/keyserver/src/scripts/create-one-time-settings-table.js
--- a/keyserver/src/scripts/create-one-time-settings-table.js
+++ b/keyserver/src/scripts/create-one-time-settings-table.js
@@ -1,7 +1,7 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { main, endScript } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function addOneTimeSettingsTable() {
await dbQuery(SQL`
diff --git a/keyserver/src/scripts/create-relationships.js b/keyserver/src/scripts/create-relationships.js
--- a/keyserver/src/scripts/create-relationships.js
+++ b/keyserver/src/scripts/create-relationships.js
@@ -2,10 +2,10 @@
import { undirectedStatus } from 'lib/types/relationship-types.js';
+import { endScript } from './utils.js';
import { createUndirectedRelationships } from '../creators/relationship-creators.js';
import { dbQuery, SQL } from '../database/database.js';
import { saveMemberships } from '../updaters/thread-permission-updaters.js';
-import { endScript } from './utils.js';
async function main() {
try {
diff --git a/keyserver/src/scripts/create-sidebar-permissions.js b/keyserver/src/scripts/create-sidebar-permissions.js
--- a/keyserver/src/scripts/create-sidebar-permissions.js
+++ b/keyserver/src/scripts/create-sidebar-permissions.js
@@ -5,9 +5,9 @@
threadPermissionPropagationPrefixes,
} from 'lib/types/thread-types.js';
+import { endScript } from './utils.js';
import { dbQuery, SQL } from '../database/database.js';
import { recalculateAllThreadPermissions } from '../updaters/thread-permission-updaters.js';
-import { endScript } from './utils.js';
async function main() {
try {
diff --git a/keyserver/src/scripts/create-user-messages-table.js b/keyserver/src/scripts/create-user-messages-table.js
--- a/keyserver/src/scripts/create-user-messages-table.js
+++ b/keyserver/src/scripts/create-user-messages-table.js
@@ -1,7 +1,7 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function createTable() {
await dbQuery(SQL`
diff --git a/keyserver/src/scripts/delete-emails.js b/keyserver/src/scripts/delete-emails.js
--- a/keyserver/src/scripts/delete-emails.js
+++ b/keyserver/src/scripts/delete-emails.js
@@ -1,8 +1,8 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { setScriptContext } from './script-context.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
setScriptContext({
allowMultiStatementSQLQueries: true,
diff --git a/keyserver/src/scripts/delete-memberships-of-deleted-users.js b/keyserver/src/scripts/delete-memberships-of-deleted-users.js
--- a/keyserver/src/scripts/delete-memberships-of-deleted-users.js
+++ b/keyserver/src/scripts/delete-memberships-of-deleted-users.js
@@ -1,7 +1,7 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function deleteMemberships() {
const query = SQL`
diff --git a/keyserver/src/scripts/delete-unread-column.js b/keyserver/src/scripts/delete-unread-column.js
--- a/keyserver/src/scripts/delete-unread-column.js
+++ b/keyserver/src/scripts/delete-unread-column.js
@@ -1,7 +1,7 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { endScript } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function deleteUnreadColumn() {
try {
diff --git a/keyserver/src/scripts/fix-new-thread-types.js b/keyserver/src/scripts/fix-new-thread-types.js
--- a/keyserver/src/scripts/fix-new-thread-types.js
+++ b/keyserver/src/scripts/fix-new-thread-types.js
@@ -3,10 +3,10 @@
import bots from 'lib/facts/bots.js';
import { threadTypes, assertThreadType } from 'lib/types/thread-types.js';
+import { main } from './utils.js';
import { dbQuery, SQL } from '../database/database.js';
import { createScriptViewer } from '../session/scripts.js';
import { updateThread } from '../updaters/thread-updaters.js';
-import { main } from './utils.js';
const batchSize = 10;
const updateThreadOptions = { forceUpdateRoot: true };
diff --git a/keyserver/src/scripts/force-policy-acknowledgment.js b/keyserver/src/scripts/force-policy-acknowledgment.js
--- a/keyserver/src/scripts/force-policy-acknowledgment.js
+++ b/keyserver/src/scripts/force-policy-acknowledgment.js
@@ -2,8 +2,8 @@
import { policyTypes } from 'lib/facts/policies.js';
-import { dbQuery, SQL } from '../database/database.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
// time when policy was officially published for users
const policyUpdateTime = new Date('2023-02-03T00:00:00').getTime();
diff --git a/keyserver/src/scripts/image-size.js b/keyserver/src/scripts/image-size.js
--- a/keyserver/src/scripts/image-size.js
+++ b/keyserver/src/scripts/image-size.js
@@ -2,8 +2,8 @@
import sizeOf from 'buffer-image-size';
-import { dbQuery, SQL } from '../database/database.js';
import { endScript } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function main() {
try {
diff --git a/keyserver/src/scripts/make-channel-private.js b/keyserver/src/scripts/make-channel-private.js
--- a/keyserver/src/scripts/make-channel-private.js
+++ b/keyserver/src/scripts/make-channel-private.js
@@ -3,9 +3,9 @@
import ashoat from 'lib/facts/ashoat.js';
import { threadTypes } from 'lib/types/thread-types.js';
+import { main } from './utils.js';
import { createScriptViewer } from '../session/scripts.js';
import { updateThread } from '../updaters/thread-updaters.js';
-import { main } from './utils.js';
const channelID = '-1';
diff --git a/keyserver/src/scripts/make-notif-columns-optional.js b/keyserver/src/scripts/make-notif-columns-optional.js
--- a/keyserver/src/scripts/make-notif-columns-optional.js
+++ b/keyserver/src/scripts/make-notif-columns-optional.js
@@ -1,7 +1,7 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { endScript } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function main() {
try {
diff --git a/keyserver/src/scripts/make-source-message-unique.js b/keyserver/src/scripts/make-source-message-unique.js
--- a/keyserver/src/scripts/make-source-message-unique.js
+++ b/keyserver/src/scripts/make-source-message-unique.js
@@ -1,7 +1,7 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function makeSourceMessageUnique() {
await dbQuery(SQL`
diff --git a/keyserver/src/scripts/merge-users.js b/keyserver/src/scripts/merge-users.js
--- a/keyserver/src/scripts/merge-users.js
+++ b/keyserver/src/scripts/merge-users.js
@@ -4,6 +4,7 @@
import type { ServerThreadInfo } from 'lib/types/thread-types.js';
import { type UpdateData, updateTypes } from 'lib/types/update-types.js';
+import { endScript } from './utils.js';
import { createUpdates } from '../creators/update-creator.js';
import { dbQuery, SQL } from '../database/database.js';
import type { SQLStatementType } from '../database/types.js';
@@ -15,7 +16,6 @@
commitMembershipChangeset,
} from '../updaters/thread-permission-updaters.js';
import RelationshipChangeset from '../utils/relationship-changeset.js';
-import { endScript } from './utils.js';
async function main() {
try {
diff --git a/keyserver/src/scripts/move-threads.js b/keyserver/src/scripts/move-threads.js
--- a/keyserver/src/scripts/move-threads.js
+++ b/keyserver/src/scripts/move-threads.js
@@ -3,9 +3,9 @@
import ashoat from 'lib/facts/ashoat.js';
import { threadTypes } from 'lib/types/thread-types.js';
+import { main } from './utils.js';
import { createScriptViewer } from '../session/scripts.js';
import { updateThread } from '../updaters/thread-updaters.js';
-import { main } from './utils.js';
async function moveThreads() {
const viewer = createScriptViewer(ashoat.id);
diff --git a/keyserver/src/scripts/rename-sidebar-message-fields.js b/keyserver/src/scripts/rename-sidebar-message-fields.js
--- a/keyserver/src/scripts/rename-sidebar-message-fields.js
+++ b/keyserver/src/scripts/rename-sidebar-message-fields.js
@@ -2,8 +2,8 @@
import { messageTypes } from 'lib/types/message-types.js';
-import { dbQuery, SQL } from '../database/database.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function renameSidebarSource() {
const query = SQL`
diff --git a/keyserver/src/scripts/rename-user-column-for-one-time-keys.js b/keyserver/src/scripts/rename-user-column-for-one-time-keys.js
--- a/keyserver/src/scripts/rename-user-column-for-one-time-keys.js
+++ b/keyserver/src/scripts/rename-user-column-for-one-time-keys.js
@@ -1,7 +1,7 @@
// @flow
-import { dbQuery, SQL } from '../database/database.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function renameUserToSession() {
await dbQuery(SQL`
diff --git a/keyserver/src/scripts/rename-user.js b/keyserver/src/scripts/rename-user.js
--- a/keyserver/src/scripts/rename-user.js
+++ b/keyserver/src/scripts/rename-user.js
@@ -2,11 +2,11 @@
import { updateTypes } from 'lib/types/update-types.js';
+import { main } from './utils.js';
import { createUpdates } from '../creators/update-creator.js';
import { dbQuery, SQL } from '../database/database.js';
import { fetchKnownUserInfos } from '../fetchers/user-fetchers.js';
import { createScriptViewer } from '../session/scripts.js';
-import { main } from './utils.js';
const userID = '5';
const newUsername = 'commbot';
diff --git a/keyserver/src/scripts/rescind-notifs.js b/keyserver/src/scripts/rescind-notifs.js
--- a/keyserver/src/scripts/rescind-notifs.js
+++ b/keyserver/src/scripts/rescind-notifs.js
@@ -2,10 +2,10 @@
import { threadTypes } from 'lib/types/thread-types.js';
+import { main } from './utils.js';
import { dbQuery, SQL } from '../database/database.js';
import { createScriptViewer } from '../session/scripts.js';
import { activityUpdater } from '../updaters/activity-updaters.js';
-import { main } from './utils.js';
async function rescindNotifs() {
const fetchRescindThreadInfo = SQL`
diff --git a/keyserver/src/scripts/reset-password.js b/keyserver/src/scripts/reset-password.js
--- a/keyserver/src/scripts/reset-password.js
+++ b/keyserver/src/scripts/reset-password.js
@@ -2,8 +2,8 @@
import bcrypt from 'twin-bcrypt';
-import { dbQuery, SQL } from '../database/database.js';
import { main } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
const userID = '-1';
const password = 'password';
diff --git a/keyserver/src/scripts/set-last-read-messages.js b/keyserver/src/scripts/set-last-read-messages.js
--- a/keyserver/src/scripts/set-last-read-messages.js
+++ b/keyserver/src/scripts/set-last-read-messages.js
@@ -3,8 +3,8 @@
import { messageTypes } from 'lib/types/message-types.js';
import { threadPermissions } from 'lib/types/thread-types.js';
-import { dbQuery, SQL } from '../database/database.js';
import { endScript } from './utils.js';
+import { dbQuery, SQL } from '../database/database.js';
async function main() {
try {
diff --git a/keyserver/src/scripts/setup-sidebars.js b/keyserver/src/scripts/setup-sidebars.js
--- a/keyserver/src/scripts/setup-sidebars.js
+++ b/keyserver/src/scripts/setup-sidebars.js
@@ -4,9 +4,9 @@
import { messageTypes } from 'lib/types/message-types.js';
import { updateTypes } from 'lib/types/update-types.js';
+import { main } from './utils.js';
import { createUpdates } from '../creators/update-creator.js';
import { dbQuery, mergeOrConditions, SQL } from '../database/database.js';
-import { main } from './utils.js';
async function addRepliesCountColumn() {
const update = SQL`
diff --git a/keyserver/src/scripts/sidebar-know-of-migration.js b/keyserver/src/scripts/sidebar-know-of-migration.js
--- a/keyserver/src/scripts/sidebar-know-of-migration.js
+++ b/keyserver/src/scripts/sidebar-know-of-migration.js
@@ -3,6 +3,7 @@
import bots from 'lib/facts/bots.js';
import { threadTypes, type ThreadType } from 'lib/types/thread-types.js';
+import { main } from './utils.js';
import { dbQuery, SQL } from '../database/database.js';
import { createScriptViewer } from '../session/scripts.js';
import { updateRoles } from '../updaters/role-updaters.js';
@@ -11,7 +12,6 @@
commitMembershipChangeset,
} from '../updaters/thread-permission-updaters.js';
import RelationshipChangeset from '../utils/relationship-changeset.js';
-import { main } from './utils.js';
async function updatePrivateThreads() {
console.log('updating private threads');
diff --git a/keyserver/src/scripts/soft-launch-migration.js b/keyserver/src/scripts/soft-launch-migration.js
--- a/keyserver/src/scripts/soft-launch-migration.js
+++ b/keyserver/src/scripts/soft-launch-migration.js
@@ -9,6 +9,7 @@
import { messageTypes } from 'lib/types/message-types.js';
import { threadTypes, type ThreadType } from 'lib/types/thread-types.js';
+import { main } from './utils.js';
import createMessages from '../creators/message-creator.js';
import { createThread } from '../creators/thread-creator.js';
import { dbQuery, SQL } from '../database/database.js';
@@ -22,7 +23,6 @@
saveMemberships,
} from '../updaters/thread-permission-updaters.js';
import { updateThread } from '../updaters/thread-updaters.js';
-import { main } from './utils.js';
const batchSize = 10;
const createThreadOptions = { forceAddMembers: true };
diff --git a/keyserver/src/scripts/update-geoip.js b/keyserver/src/scripts/update-geoip.js
--- a/keyserver/src/scripts/update-geoip.js
+++ b/keyserver/src/scripts/update-geoip.js
@@ -1,7 +1,7 @@
// @flow
-import { updateGeoipDB } from '../cron/update-geoip-db.js';
import { endScript } from './utils.js';
+import { updateGeoipDB } from '../cron/update-geoip-db.js';
async function main() {
try {
diff --git a/keyserver/src/session/cookies.js b/keyserver/src/session/cookies.js
--- a/keyserver/src/session/cookies.js
+++ b/keyserver/src/session/cookies.js
@@ -25,6 +25,8 @@
import { values } from 'lib/utils/objects.js';
import { promiseAll } from 'lib/utils/promises.js';
+import { Viewer } from './viewer.js';
+import type { AnonymousViewerData, UserViewerData } from './viewer.js';
import createIDs from '../creators/id-creator.js';
import { createSession } from '../creators/session-creator.js';
import { dbQuery, SQL } from '../database/database.js';
@@ -37,8 +39,6 @@
type AppURLFacts,
getAppURLFactsFromRequestURL,
} from '../utils/urls.js';
-import { Viewer } from './viewer.js';
-import type { AnonymousViewerData, UserViewerData } from './viewer.js';
function cookieIsExpired(lastUsed: number) {
return lastUsed + cookieLifetime <= Date.now();
diff --git a/keyserver/src/socket/socket.js b/keyserver/src/socket/socket.js
--- a/keyserver/src/socket/socket.js
+++ b/keyserver/src/socket/socket.js
@@ -44,6 +44,13 @@
import sleep from 'lib/utils/sleep.js';
import { tShape, tCookie } from 'lib/utils/validation-utils.js';
+import { RedisSubscriber } from './redis.js';
+import {
+ clientResponseInputValidator,
+ processClientResponses,
+ initializeSession,
+ checkState,
+} from './session-utils.js';
import { fetchUpdateInfosWithRawUpdateInfos } from '../creators/update-creator.js';
import { deleteActivityForViewerSession } from '../deleters/activity-deleters.js';
import { deleteCookie } from '../deleters/cookie-deleters.js';
@@ -78,13 +85,6 @@
checkClientSupported,
policiesValidator,
} from '../utils/validation-utils.js';
-import { RedisSubscriber } from './redis.js';
-import {
- clientResponseInputValidator,
- processClientResponses,
- initializeSession,
- checkState,
-} from './session-utils.js';
const clientSocketMessageInputValidator = t.union([
tShape({
diff --git a/keyserver/src/updaters/entry-updaters.js b/keyserver/src/updaters/entry-updaters.js
--- a/keyserver/src/updaters/entry-updaters.js
+++ b/keyserver/src/updaters/entry-updaters.js
@@ -24,6 +24,7 @@
import { ServerError } from 'lib/utils/errors.js';
import { values } from 'lib/utils/objects.js';
+import type { SessionUpdate } from './session-updaters.js';
import createIDs from '../creators/id-creator.js';
import createMessages from '../creators/message-creator.js';
import { createUpdates } from '../creators/update-creator.js';
@@ -34,7 +35,6 @@
} from '../fetchers/entry-fetchers.js';
import { fetchActiveSessionsForThread } from '../fetchers/session-fetchers.js';
import type { Viewer } from '../session/viewer.js';
-import type { SessionUpdate } from './session-updaters.js';
const defaultUpdateCreationResponse = { viewerUpdates: [], userInfos: [] };
async function updateEntry(
diff --git a/keyserver/src/updaters/thread-permission-updaters.js b/keyserver/src/updaters/thread-permission-updaters.js
--- a/keyserver/src/updaters/thread-permission-updaters.js
+++ b/keyserver/src/updaters/thread-permission-updaters.js
@@ -25,6 +25,7 @@
import { pushAll } from 'lib/utils/array.js';
import { ServerError } from 'lib/utils/errors.js';
+import { updateChangedUndirectedRelationships } from './relationship-updaters.js';
import {
createUpdates,
type UpdatesForCurrentSession,
@@ -41,7 +42,6 @@
import { updateRoles } from '../updaters/role-updaters.js';
import DepthQueue from '../utils/depth-queue.js';
import RelationshipChangeset from '../utils/relationship-changeset.js';
-import { updateChangedUndirectedRelationships } from './relationship-updaters.js';
export type MembershipRowToSave = {
+operation: 'save',
diff --git a/keyserver/src/updaters/thread-updaters.js b/keyserver/src/updaters/thread-updaters.js
--- a/keyserver/src/updaters/thread-updaters.js
+++ b/keyserver/src/updaters/thread-updaters.js
@@ -30,6 +30,12 @@
import { promiseAll } from 'lib/utils/promises.js';
import { firstLine } from 'lib/utils/string-utils.js';
+import { updateRoles } from './role-updaters.js';
+import {
+ changeRole,
+ recalculateThreadPermissions,
+ commitMembershipChangeset,
+} from './thread-permission-updaters.js';
import createMessages from '../creators/message-creator.js';
import { getRolePermissionBlobs } from '../creators/role-creator.js';
import { createUpdates } from '../creators/update-creator.js';
@@ -53,12 +59,6 @@
} from '../fetchers/user-fetchers.js';
import type { Viewer } from '../session/viewer.js';
import RelationshipChangeset from '../utils/relationship-changeset.js';
-import { updateRoles } from './role-updaters.js';
-import {
- changeRole,
- recalculateThreadPermissions,
- commitMembershipChangeset,
-} from './thread-permission-updaters.js';
async function updateRole(
viewer: Viewer,
diff --git a/keyserver/src/uploads/uploads.js b/keyserver/src/uploads/uploads.js
--- a/keyserver/src/uploads/uploads.js
+++ b/keyserver/src/uploads/uploads.js
@@ -12,6 +12,7 @@
} from 'lib/types/media-types.js';
import { ServerError } from 'lib/utils/errors.js';
+import { validateAndConvert } from './media-utils.js';
import createUploads from '../creators/upload-creator.js';
import { deleteUpload } from '../deleters/upload-deleters.js';
import {
@@ -21,7 +22,6 @@
} from '../fetchers/upload-fetchers.js';
import type { MulterRequest } from '../responders/handlers.js';
import type { Viewer } from '../session/viewer.js';
-import { validateAndConvert } from './media-utils.js';
const upload = multer();
const multerProcessor: Middleware<> = upload.array('multimedia');
diff --git a/lib/actions/siwe-actions.js b/lib/actions/siwe-actions.js
--- a/lib/actions/siwe-actions.js
+++ b/lib/actions/siwe-actions.js
@@ -1,5 +1,6 @@
// @flow
+import { mergeUserInfos } from './user-actions.js';
import threadWatcher from '../shared/thread-watcher.js';
import {
type LogInResult,
@@ -8,7 +9,6 @@
import type { SIWEAuthServerCall } from '../types/siwe-types.js';
import type { CallServerEndpoint } from '../utils/call-server-endpoint.js';
import { getConfig } from '../utils/config.js';
-import { mergeUserInfos } from './user-actions.js';
const getSIWENonceActionTypes = Object.freeze({
started: 'GET_SIWE_NONCE_STARTED',
diff --git a/lib/components/connected-wallet-info.react.js b/lib/components/connected-wallet-info.react.js
--- a/lib/components/connected-wallet-info.react.js
+++ b/lib/components/connected-wallet-info.react.js
@@ -4,9 +4,9 @@
import * as React from 'react';
import { useAccount, useEnsAvatar } from 'wagmi';
-import { useENSName } from '../hooks/ens-cache.js';
import css from './connected-wallet-info.css';
import SWMansionIcon from './SWMansionIcon.react.js';
+import { useENSName } from '../hooks/ens-cache.js';
function shortenAddressToFitWidth(address: string): string {
if (address.length < 22) {
diff --git a/lib/media/image-utils.js b/lib/media/image-utils.js
--- a/lib/media/image-utils.js
+++ b/lib/media/image-utils.js
@@ -1,8 +1,8 @@
// @flow
-import type { Dimensions } from '../types/media-types.js';
import { getTargetMIME } from './file-utils.js';
import { maxDimensions } from './media-utils.js';
+import type { Dimensions } from '../types/media-types.js';
const { height: maxHeight, width: maxWidth } = maxDimensions;
diff --git a/lib/media/video-utils.js b/lib/media/video-utils.js
--- a/lib/media/video-utils.js
+++ b/lib/media/video-utils.js
@@ -2,10 +2,10 @@
import invariant from 'invariant';
-import type { Dimensions, MediaMissionFailure } from '../types/media-types.js';
-import { getUUID } from '../utils/uuid.js';
import { replaceExtension, sanitizeFilename } from './file-utils.js';
import { maxDimensions } from './media-utils.js';
+import type { Dimensions, MediaMissionFailure } from '../types/media-types.js';
+import { getUUID } from '../utils/uuid.js';
const { height: maxHeight, width: maxWidth } = maxDimensions;
diff --git a/lib/permissions/thread-permissions.js b/lib/permissions/thread-permissions.js
--- a/lib/permissions/thread-permissions.js
+++ b/lib/permissions/thread-permissions.js
@@ -1,5 +1,9 @@
// @flow
+import {
+ parseThreadPermissionString,
+ includeThreadPermissionForThreadType,
+} from './prefixes.js';
import {
type ThreadPermissionsBlob,
type ThreadType,
@@ -10,10 +14,6 @@
threadPermissions,
threadPermissionPropagationPrefixes,
} from '../types/thread-types.js';
-import {
- parseThreadPermissionString,
- includeThreadPermissionForThreadType,
-} from './prefixes.js';
function permissionLookup(
permissions: ?ThreadPermissionsBlob | ?ThreadPermissionsInfo,
diff --git a/lib/reducers/connection-reducer.js b/lib/reducers/connection-reducer.js
--- a/lib/reducers/connection-reducer.js
+++ b/lib/reducers/connection-reducer.js
@@ -1,5 +1,6 @@
// @flow
+import { unsupervisedBackgroundActionType } from './lifecycle-state-reducer.js';
import { updateActivityActionTypes } from '../actions/activity-actions.js';
import { updateCalendarQueryActionTypes } from '../actions/entry-actions.js';
import { siweAuthActionTypes } from '../actions/siwe-actions.js';
@@ -22,7 +23,6 @@
} from '../types/socket-types.js';
import { setNewSessionActionType } from '../utils/action-utils.js';
import { getConfig } from '../utils/config.js';
-import { unsupervisedBackgroundActionType } from './lifecycle-state-reducer.js';
export default function reduceConnectionInfo(
state: ConnectionInfo,
diff --git a/lib/reducers/master-reducer.js b/lib/reducers/master-reducer.js
--- a/lib/reducers/master-reducer.js
+++ b/lib/reducers/master-reducer.js
@@ -1,17 +1,5 @@
// @flow
-import { siweAuthActionTypes } from '../actions/siwe-actions.js';
-import {
- registerActionTypes,
- logInActionTypes,
-} from '../actions/user-actions.js';
-import type { BaseNavInfo } from '../types/nav-types.js';
-import type { BaseAppState, BaseAction } from '../types/redux-types.js';
-import {
- fullStateSyncActionType,
- incrementalStateSyncActionType,
-} from '../types/socket-types.js';
-import type { StoreOperations } from '../types/store-ops-types.js';
import reduceCalendarFilters from './calendar-filters-reducer.js';
import reduceConnectionInfo from './connection-reducer.js';
import reduceDataLoaded from './data-loaded-reducer.js';
@@ -29,6 +17,18 @@
import reduceUpdatesCurrentAsOf from './updates-reducer.js';
import reduceURLPrefix from './url-prefix-reducer.js';
import { reduceCurrentUserInfo, reduceUserInfos } from './user-reducer.js';
+import { siweAuthActionTypes } from '../actions/siwe-actions.js';
+import {
+ registerActionTypes,
+ logInActionTypes,
+} from '../actions/user-actions.js';
+import type { BaseNavInfo } from '../types/nav-types.js';
+import type { BaseAppState, BaseAction } from '../types/redux-types.js';
+import {
+ fullStateSyncActionType,
+ incrementalStateSyncActionType,
+} from '../types/socket-types.js';
+import type { StoreOperations } from '../types/store-ops-types.js';
export default function baseReducer<N: BaseNavInfo, T: BaseAppState<N>>(
state: T,
diff --git a/lib/reducers/message-reducer.test.js b/lib/reducers/message-reducer.test.js
--- a/lib/reducers/message-reducer.test.js
+++ b/lib/reducers/message-reducer.test.js
@@ -2,11 +2,11 @@
import invariant from 'invariant';
+import { reduceMessageStore } from './message-reducer.js';
import { createPendingThread } from '../shared/thread-utils.js';
import type { MessageStore } from '../types/message-types.js';
import { messageTypes } from '../types/message-types.js';
import { threadTypes } from '../types/thread-types.js';
-import { reduceMessageStore } from './message-reducer.js';
const messageStoreBeforeMediaUpdate: MessageStore = {
messages: {
diff --git a/lib/selectors/account-selectors.js b/lib/selectors/account-selectors.js
--- a/lib/selectors/account-selectors.js
+++ b/lib/selectors/account-selectors.js
@@ -2,6 +2,7 @@
import { createSelector } from 'reselect';
+import { currentCalendarQuery } from './nav-selectors.js';
import type { LogInExtraInfo } from '../types/account-types.js';
import { isDeviceType } from '../types/device-types.js';
import type { CalendarQuery } from '../types/entry-types.js';
@@ -9,7 +10,6 @@
import type { PreRequestUserState } from '../types/session-types.js';
import type { CurrentUserInfo } from '../types/user-types.js';
import { getConfig } from '../utils/config.js';
-import { currentCalendarQuery } from './nav-selectors.js';
const logInExtraInfoSelector: (
state: AppState,
diff --git a/lib/selectors/calendar-selectors.js b/lib/selectors/calendar-selectors.js
--- a/lib/selectors/calendar-selectors.js
+++ b/lib/selectors/calendar-selectors.js
@@ -2,6 +2,8 @@
import * as React from 'react';
+import { currentCalendarQuery } from './nav-selectors.js';
+import { threadInfoSelector } from './thread-selectors.js';
import { rawEntryInfoWithinActiveRange } from '../shared/entry-utils.js';
import SearchIndex from '../shared/search-index.js';
import { threadInFilterList } from '../shared/thread-utils.js';
@@ -9,8 +11,6 @@
import { useResolvedThreadInfosObj } from '../utils/entity-helpers.js';
import { values } from '../utils/objects.js';
import { useSelector } from '../utils/redux-utils.js';
-import { currentCalendarQuery } from './nav-selectors.js';
-import { threadInfoSelector } from './thread-selectors.js';
function useFilterThreadInfos(
calendarActive: boolean,
diff --git a/lib/selectors/chat-selectors.js b/lib/selectors/chat-selectors.js
--- a/lib/selectors/chat-selectors.js
+++ b/lib/selectors/chat-selectors.js
@@ -10,6 +10,11 @@
import { createSelector } from 'reselect';
import { createObjectSelector } from 'reselect-map';
+import {
+ threadInfoSelector,
+ sidebarInfoSelector,
+ threadInfoFromSourceMessageIDSelector,
+} from './thread-selectors.js';
import {
messageKey,
robotextForMessageInfo,
@@ -48,11 +53,6 @@
import { threeDays } from '../utils/date-utils.js';
import type { EntityText } from '../utils/entity-text.js';
import memoize2 from '../utils/memoize.js';
-import {
- threadInfoSelector,
- sidebarInfoSelector,
- threadInfoFromSourceMessageIDSelector,
-} from './thread-selectors.js';
export type SidebarItem =
| {
diff --git a/lib/selectors/socket-selectors.js b/lib/selectors/socket-selectors.js
--- a/lib/selectors/socket-selectors.js
+++ b/lib/selectors/socket-selectors.js
@@ -2,6 +2,7 @@
import { createSelector } from 'reselect';
+import { currentCalendarQuery } from './nav-selectors.js';
import {
serverEntryInfo,
serverEntryInfosObject,
@@ -23,7 +24,6 @@
import { getConfig } from '../utils/config.js';
import { minimumOneTimeKeysRequired } from '../utils/crypto-utils.js';
import { values, hash } from '../utils/objects.js';
-import { currentCalendarQuery } from './nav-selectors.js';
const queuedReports: (
state: AppState,
diff --git a/lib/selectors/thread-selectors.js b/lib/selectors/thread-selectors.js
--- a/lib/selectors/thread-selectors.js
+++ b/lib/selectors/thread-selectors.js
@@ -12,6 +12,11 @@
import { createSelector } from 'reselect';
import { createObjectSelector } from 'reselect-map';
+import {
+ filteredThreadIDsSelector,
+ includeDeletedSelector,
+} from './calendar-filter-selectors.js';
+import { relativeMemberInfoSelectorForMembersOfThread } from './user-selectors.js';
import { createEntryInfo } from '../shared/entry-utils.js';
import { getMostRecentNonLocalMessageID } from '../shared/message-utils.js';
import {
@@ -40,11 +45,6 @@
} from '../types/thread-types.js';
import { dateString, dateFromString } from '../utils/date-utils.js';
import { values } from '../utils/objects.js';
-import {
- filteredThreadIDsSelector,
- includeDeletedSelector,
-} from './calendar-filter-selectors.js';
-import { relativeMemberInfoSelectorForMembersOfThread } from './user-selectors.js';
const _mapValuesWithKeys = _mapValues.convert({ cap: false });
diff --git a/lib/shared/markdown.js b/lib/shared/markdown.js
--- a/lib/shared/markdown.js
+++ b/lib/shared/markdown.js
@@ -2,8 +2,8 @@
import invariant from 'invariant';
-import type { RelativeMemberInfo } from '../types/thread-types.js';
import { oldValidUsernameRegexString } from './account-utils.js';
+import type { RelativeMemberInfo } from '../types/thread-types.js';
// simple-markdown types
export type State = {
diff --git a/lib/shared/message-utils.js b/lib/shared/message-utils.js
--- a/lib/shared/message-utils.js
+++ b/lib/shared/message-utils.js
@@ -5,6 +5,9 @@
import _orderBy from 'lodash/fp/orderBy.js';
import * as React from 'react';
+import { codeBlockRegex, type ParserRules } from './markdown.js';
+import { messageSpecs } from './messages/message-specs.js';
+import { threadIsGroupChat } from './thread-utils.js';
import { useStringForUser } from '../hooks/ens-cache.js';
import { userIDsToRelativeUserInfos } from '../selectors/user-selectors.js';
import type { PlatformDetails } from '../types/device-types.js';
@@ -36,9 +39,6 @@
type EntityText,
useEntityTextAsString,
} from '../utils/entity-text.js';
-import { codeBlockRegex, type ParserRules } from './markdown.js';
-import { messageSpecs } from './messages/message-specs.js';
-import { threadIsGroupChat } from './thread-utils.js';
const localIDPrefix = 'local';
diff --git a/lib/shared/messages/add-members-message-spec.js b/lib/shared/messages/add-members-message-spec.js
--- a/lib/shared/messages/add-members-message-spec.js
+++ b/lib/shared/messages/add-members-message-spec.js
@@ -2,6 +2,8 @@
import invariant from 'invariant';
+import type { CreateMessageInfoParams, MessageSpec } from './message-spec.js';
+import { joinResult } from './utils.js';
import { messageTypes } from '../../types/message-types.js';
import type {
MessageInfo,
@@ -22,8 +24,6 @@
} from '../../utils/entity-text.js';
import { values } from '../../utils/objects.js';
import { notifRobotextForMessageInfo } from '../notif-utils.js';
-import type { CreateMessageInfoParams, MessageSpec } from './message-spec.js';
-import { joinResult } from './utils.js';
export const addMembersMessageSpec: MessageSpec<
AddMembersMessageData,
diff --git a/lib/shared/messages/change-role-message-spec.js b/lib/shared/messages/change-role-message-spec.js
--- a/lib/shared/messages/change-role-message-spec.js
+++ b/lib/shared/messages/change-role-message-spec.js
@@ -2,6 +2,13 @@
import invariant from 'invariant';
+import {
+ pushTypes,
+ type CreateMessageInfoParams,
+ type MessageSpec,
+ type RobotextParams,
+} from './message-spec.js';
+import { joinResult } from './utils.js';
import { messageTypes } from '../../types/message-types.js';
import type {
MessageInfo,
@@ -22,13 +29,6 @@
} from '../../utils/entity-text.js';
import { values } from '../../utils/objects.js';
import { notifRobotextForMessageInfo } from '../notif-utils.js';
-import {
- pushTypes,
- type CreateMessageInfoParams,
- type MessageSpec,
- type RobotextParams,
-} from './message-spec.js';
-import { joinResult } from './utils.js';
export const changeRoleMessageSpec: MessageSpec<
ChangeRoleMessageData,
diff --git a/lib/shared/messages/change-settings-message-spec.js b/lib/shared/messages/change-settings-message-spec.js
--- a/lib/shared/messages/change-settings-message-spec.js
+++ b/lib/shared/messages/change-settings-message-spec.js
@@ -2,6 +2,8 @@
import invariant from 'invariant';
+import { pushTypes, type MessageSpec } from './message-spec.js';
+import { joinResult } from './utils.js';
import { messageTypes } from '../../types/message-types.js';
import type {
MessageInfo,
@@ -20,8 +22,6 @@
import { validHexColorRegex } from '../account-utils.js';
import { notifRobotextForMessageInfo } from '../notif-utils.js';
import { threadLabel } from '../thread-utils.js';
-import { pushTypes, type MessageSpec } from './message-spec.js';
-import { joinResult } from './utils.js';
export const changeSettingsMessageSpec: MessageSpec<
ChangeSettingsMessageData,
diff --git a/lib/shared/messages/create-entry-message-spec.js b/lib/shared/messages/create-entry-message-spec.js
--- a/lib/shared/messages/create-entry-message-spec.js
+++ b/lib/shared/messages/create-entry-message-spec.js
@@ -2,6 +2,8 @@
import invariant from 'invariant';
+import { pushTypes, type MessageSpec } from './message-spec.js';
+import { joinResult } from './utils.js';
import { messageTypes } from '../../types/message-types.js';
import type {
MessageInfo,
@@ -18,8 +20,6 @@
import { prettyDate } from '../../utils/date-utils.js';
import { ET, type EntityText } from '../../utils/entity-text.js';
import { notifTextsForEntryCreationOrEdit } from '../notif-utils.js';
-import { pushTypes, type MessageSpec } from './message-spec.js';
-import { joinResult } from './utils.js';
export const createEntryMessageSpec: MessageSpec<
CreateEntryMessageData,
diff --git a/lib/shared/messages/create-sidebar-message-spec.js b/lib/shared/messages/create-sidebar-message-spec.js
--- a/lib/shared/messages/create-sidebar-message-spec.js
+++ b/lib/shared/messages/create-sidebar-message-spec.js
@@ -2,6 +2,12 @@
import invariant from 'invariant';
+import {
+ pushTypes,
+ type CreateMessageInfoParams,
+ type MessageSpec,
+} from './message-spec.js';
+import { assertSingleMessageInfo } from './utils.js';
import type { PlatformDetails } from '../../types/device-types.js';
import { messageTypes } from '../../types/message-types.js';
import type {
@@ -23,12 +29,6 @@
pluralizeEntityText,
} from '../../utils/entity-text.js';
import { hasMinCodeVersion } from '../version-utils.js';
-import {
- pushTypes,
- type CreateMessageInfoParams,
- type MessageSpec,
-} from './message-spec.js';
-import { assertSingleMessageInfo } from './utils.js';
export const createSidebarMessageSpec: MessageSpec<
CreateSidebarMessageData,
diff --git a/lib/shared/messages/create-sub-thread-message-spec.js b/lib/shared/messages/create-sub-thread-message-spec.js
--- a/lib/shared/messages/create-sub-thread-message-spec.js
+++ b/lib/shared/messages/create-sub-thread-message-spec.js
@@ -2,6 +2,13 @@
import invariant from 'invariant';
+import {
+ pushTypes,
+ type CreateMessageInfoParams,
+ type MessageSpec,
+ type GeneratesNotifsParams,
+} from './message-spec.js';
+import { assertSingleMessageInfo } from './utils.js';
import { permissionLookup } from '../../permissions/thread-permissions.js';
import { messageTypes } from '../../types/message-types.js';
import type {
@@ -19,13 +26,6 @@
import type { RelativeUserInfo } from '../../types/user-types.js';
import { ET, type EntityText } from '../../utils/entity-text.js';
import { notifTextsForSubthreadCreation } from '../notif-utils.js';
-import {
- pushTypes,
- type CreateMessageInfoParams,
- type MessageSpec,
- type GeneratesNotifsParams,
-} from './message-spec.js';
-import { assertSingleMessageInfo } from './utils.js';
export const createSubThreadMessageSpec: MessageSpec<
CreateSubthreadMessageData,
diff --git a/lib/shared/messages/create-thread-message-spec.js b/lib/shared/messages/create-thread-message-spec.js
--- a/lib/shared/messages/create-thread-message-spec.js
+++ b/lib/shared/messages/create-thread-message-spec.js
@@ -2,6 +2,12 @@
import invariant from 'invariant';
+import {
+ pushTypes,
+ type CreateMessageInfoParams,
+ type MessageSpec,
+} from './message-spec.js';
+import { assertSingleMessageInfo } from './utils.js';
import { messageTypes } from '../../types/message-types.js';
import type {
MessageInfo,
@@ -22,12 +28,6 @@
} from '../../utils/entity-text.js';
import { notifTextsForSubthreadCreation } from '../notif-utils.js';
import { threadNoun } from '../thread-utils.js';
-import {
- pushTypes,
- type CreateMessageInfoParams,
- type MessageSpec,
-} from './message-spec.js';
-import { assertSingleMessageInfo } from './utils.js';
export const createThreadMessageSpec: MessageSpec<
CreateThreadMessageData,
diff --git a/lib/shared/messages/delete-entry-message-spec.js b/lib/shared/messages/delete-entry-message-spec.js
--- a/lib/shared/messages/delete-entry-message-spec.js
+++ b/lib/shared/messages/delete-entry-message-spec.js
@@ -2,6 +2,8 @@
import invariant from 'invariant';
+import { pushTypes, type MessageSpec } from './message-spec.js';
+import { assertSingleMessageInfo } from './utils.js';
import { messageTypes } from '../../types/message-types.js';
import type {
MessageInfo,
@@ -17,8 +19,6 @@
import type { RelativeUserInfo } from '../../types/user-types.js';
import { prettyDate } from '../../utils/date-utils.js';
import { ET, type EntityText } from '../../utils/entity-text.js';
-import { pushTypes, type MessageSpec } from './message-spec.js';
-import { assertSingleMessageInfo } from './utils.js';
export const deleteEntryMessageSpec: MessageSpec<
DeleteEntryMessageData,
diff --git a/lib/shared/messages/edit-entry-message-spec.js b/lib/shared/messages/edit-entry-message-spec.js
--- a/lib/shared/messages/edit-entry-message-spec.js
+++ b/lib/shared/messages/edit-entry-message-spec.js
@@ -2,6 +2,8 @@
import invariant from 'invariant';
+import { pushTypes, type MessageSpec } from './message-spec.js';
+import { joinResult } from './utils.js';
import { messageTypes } from '../../types/message-types.js';
import type {
MessageInfo,
@@ -18,8 +20,6 @@
import { prettyDate } from '../../utils/date-utils.js';
import { ET, type EntityText } from '../../utils/entity-text.js';
import { notifTextsForEntryCreationOrEdit } from '../notif-utils.js';
-import { pushTypes, type MessageSpec } from './message-spec.js';
-import { joinResult } from './utils.js';
export const editEntryMessageSpec: MessageSpec<
EditEntryMessageData,
diff --git a/lib/shared/messages/join-thread-message-spec.js b/lib/shared/messages/join-thread-message-spec.js
--- a/lib/shared/messages/join-thread-message-spec.js
+++ b/lib/shared/messages/join-thread-message-spec.js
@@ -2,6 +2,8 @@
import invariant from 'invariant';
+import type { MessageSpec } from './message-spec.js';
+import { joinResult } from './utils.js';
import { messageTypes } from '../../types/message-types.js';
import type {
MessageInfo,
@@ -21,8 +23,6 @@
pluralizeEntityText,
} from '../../utils/entity-text.js';
import { values } from '../../utils/objects.js';
-import type { MessageSpec } from './message-spec.js';
-import { joinResult } from './utils.js';
export const joinThreadMessageSpec: MessageSpec<
JoinThreadMessageData,
diff --git a/lib/shared/messages/leave-thread-message-spec.js b/lib/shared/messages/leave-thread-message-spec.js
--- a/lib/shared/messages/leave-thread-message-spec.js
+++ b/lib/shared/messages/leave-thread-message-spec.js
@@ -2,6 +2,8 @@
import invariant from 'invariant';
+import type { MessageSpec } from './message-spec.js';
+import { joinResult } from './utils.js';
import { messageTypes } from '../../types/message-types.js';
import type {
MessageInfo,
@@ -21,8 +23,6 @@
pluralizeEntityText,
} from '../../utils/entity-text.js';
import { values } from '../../utils/objects.js';
-import type { MessageSpec } from './message-spec.js';
-import { joinResult } from './utils.js';
export const leaveThreadMessageSpec: MessageSpec<
LeaveThreadMessageData,
diff --git a/lib/shared/messages/message-specs.js b/lib/shared/messages/message-specs.js
--- a/lib/shared/messages/message-specs.js
+++ b/lib/shared/messages/message-specs.js
@@ -1,6 +1,5 @@
// @flow
-import { messageTypes, type MessageType } from '../../types/message-types.js';
import { addMembersMessageSpec } from './add-members-message-spec.js';
import { changeRoleMessageSpec } from './change-role-message-spec.js';
import { changeSettingsMessageSpec } from './change-settings-message-spec.js';
@@ -21,6 +20,7 @@
import { textMessageSpec } from './text-message-spec.js';
import { unsupportedMessageSpec } from './unsupported-message-spec.js';
import { updateRelationshipMessageSpec } from './update-relationship-message-spec.js';
+import { messageTypes, type MessageType } from '../../types/message-types.js';
export const messageSpecs: {
[MessageType]: MessageSpec<*, *, *>,
diff --git a/lib/shared/messages/multimedia-message-spec.js b/lib/shared/messages/multimedia-message-spec.js
--- a/lib/shared/messages/multimedia-message-spec.js
+++ b/lib/shared/messages/multimedia-message-spec.js
@@ -2,6 +2,13 @@
import invariant from 'invariant';
+import {
+ pushTypes,
+ type MessageSpec,
+ type MessageTitleParam,
+ type RawMessageInfoFromServerDBRowParams,
+} from './message-spec.js';
+import { joinResult } from './utils.js';
import {
contentStringForMediaArray,
multimediaMessagePreview,
@@ -43,13 +50,6 @@
import { createMediaMessageInfo } from '../message-utils.js';
import { threadIsGroupChat } from '../thread-utils.js';
import { hasMinCodeVersion } from '../version-utils.js';
-import {
- pushTypes,
- type MessageSpec,
- type MessageTitleParam,
- type RawMessageInfoFromServerDBRowParams,
-} from './message-spec.js';
-import { joinResult } from './utils.js';
export const multimediaMessageSpec: MessageSpec<
MediaMessageData | ImagesMessageData,
diff --git a/lib/shared/messages/reaction-message-spec.js b/lib/shared/messages/reaction-message-spec.js
--- a/lib/shared/messages/reaction-message-spec.js
+++ b/lib/shared/messages/reaction-message-spec.js
@@ -2,6 +2,13 @@
import invariant from 'invariant';
+import {
+ pushTypes,
+ type MessageSpec,
+ type MessageTitleParam,
+ type GeneratesNotifsParams,
+} from './message-spec.js';
+import { assertSingleMessageInfo, joinResult } from './utils.js';
import type { PlatformDetails } from '../../types/device-types.js';
import {
assertMessageType,
@@ -21,13 +28,6 @@
import { ET } from '../../utils/entity-text.js';
import { threadIsGroupChat } from '../thread-utils.js';
import { hasMinCodeVersion } from '../version-utils.js';
-import {
- pushTypes,
- type MessageSpec,
- type MessageTitleParam,
- type GeneratesNotifsParams,
-} from './message-spec.js';
-import { assertSingleMessageInfo, joinResult } from './utils.js';
export const reactionMessageSpec: MessageSpec<
ReactionMessageData,
diff --git a/lib/shared/messages/remove-members-message-spec.js b/lib/shared/messages/remove-members-message-spec.js
--- a/lib/shared/messages/remove-members-message-spec.js
+++ b/lib/shared/messages/remove-members-message-spec.js
@@ -2,6 +2,8 @@
import invariant from 'invariant';
+import type { CreateMessageInfoParams, MessageSpec } from './message-spec.js';
+import { joinResult } from './utils.js';
import { messageTypes } from '../../types/message-types.js';
import type {
MessageInfo,
@@ -22,8 +24,6 @@
} from '../../utils/entity-text.js';
import { values } from '../../utils/objects.js';
import { notifRobotextForMessageInfo } from '../notif-utils.js';
-import type { CreateMessageInfoParams, MessageSpec } from './message-spec.js';
-import { joinResult } from './utils.js';
export const removeMembersMessageSpec: MessageSpec<
RemoveMembersMessageData,
diff --git a/lib/shared/messages/restore-entry-message-spec.js b/lib/shared/messages/restore-entry-message-spec.js
--- a/lib/shared/messages/restore-entry-message-spec.js
+++ b/lib/shared/messages/restore-entry-message-spec.js
@@ -2,6 +2,8 @@
import invariant from 'invariant';
+import { pushTypes, type MessageSpec } from './message-spec.js';
+import { assertSingleMessageInfo } from './utils.js';
import { messageTypes } from '../../types/message-types.js';
import type {
MessageInfo,
@@ -17,8 +19,6 @@
import type { RelativeUserInfo } from '../../types/user-types.js';
import { prettyDate } from '../../utils/date-utils.js';
import { ET, type EntityText } from '../../utils/entity-text.js';
-import { pushTypes, type MessageSpec } from './message-spec.js';
-import { assertSingleMessageInfo } from './utils.js';
export const restoreEntryMessageSpec: MessageSpec<
RestoreEntryMessageData,
diff --git a/lib/shared/messages/sidebar-source-message-spec.js b/lib/shared/messages/sidebar-source-message-spec.js
--- a/lib/shared/messages/sidebar-source-message-spec.js
+++ b/lib/shared/messages/sidebar-source-message-spec.js
@@ -2,6 +2,13 @@
import invariant from 'invariant';
+import type {
+ CreateMessageInfoParams,
+ MessageSpec,
+ NotificationTextsParams,
+ RawMessageInfoFromServerDBRowParams,
+} from './message-spec.js';
+import { assertSingleMessageInfo } from './utils.js';
import type { PlatformDetails } from '../../types/device-types.js';
import type {
MessageInfo,
@@ -16,13 +23,6 @@
import type { ThreadInfo } from '../../types/thread-types.js';
import type { RelativeUserInfo } from '../../types/user-types.js';
import { hasMinCodeVersion } from '../version-utils.js';
-import type {
- CreateMessageInfoParams,
- MessageSpec,
- NotificationTextsParams,
- RawMessageInfoFromServerDBRowParams,
-} from './message-spec.js';
-import { assertSingleMessageInfo } from './utils.js';
export const sidebarSourceMessageSpec: MessageSpec<
SidebarSourceMessageData,
diff --git a/lib/shared/messages/text-message-spec.js b/lib/shared/messages/text-message-spec.js
--- a/lib/shared/messages/text-message-spec.js
+++ b/lib/shared/messages/text-message-spec.js
@@ -3,6 +3,12 @@
import invariant from 'invariant';
import * as SimpleMarkdown from 'simple-markdown';
+import {
+ pushTypes,
+ type MessageSpec,
+ type RawMessageInfoFromServerDBRowParams,
+} from './message-spec.js';
+import { assertSingleMessageInfo } from './utils.js';
import { messageTypes } from '../../types/message-types.js';
import type {
MessageInfo,
@@ -24,12 +30,6 @@
stripSpoilersFromMarkdownAST,
} from '../markdown.js';
import { threadIsGroupChat } from '../thread-utils.js';
-import {
- pushTypes,
- type MessageSpec,
- type RawMessageInfoFromServerDBRowParams,
-} from './message-spec.js';
-import { assertSingleMessageInfo } from './utils.js';
/**
* most of the markdown leaves contain `content` field
diff --git a/lib/shared/messages/unsupported-message-spec.js b/lib/shared/messages/unsupported-message-spec.js
--- a/lib/shared/messages/unsupported-message-spec.js
+++ b/lib/shared/messages/unsupported-message-spec.js
@@ -2,6 +2,7 @@
import invariant from 'invariant';
+import { pushTypes, type MessageSpec } from './message-spec.js';
import {
messageTypes,
type ClientDBMessageInfo,
@@ -12,7 +13,6 @@
} from '../../types/messages/unsupported.js';
import type { RelativeUserInfo } from '../../types/user-types.js';
import { ET, type EntityText } from '../../utils/entity-text.js';
-import { pushTypes, type MessageSpec } from './message-spec.js';
export const unsupportedMessageSpec: MessageSpec<
null,
diff --git a/lib/shared/messages/update-relationship-message-spec.js b/lib/shared/messages/update-relationship-message-spec.js
--- a/lib/shared/messages/update-relationship-message-spec.js
+++ b/lib/shared/messages/update-relationship-message-spec.js
@@ -2,6 +2,12 @@
import invariant from 'invariant';
+import {
+ pushTypes,
+ type CreateMessageInfoParams,
+ type MessageSpec,
+} from './message-spec.js';
+import { assertSingleMessageInfo } from './utils.js';
import type { PlatformDetails } from '../../types/device-types.js';
import { messageTypes } from '../../types/message-types.js';
import type {
@@ -19,12 +25,6 @@
import type { RelativeUserInfo } from '../../types/user-types.js';
import { ET, type EntityText } from '../../utils/entity-text.js';
import { hasMinCodeVersion } from '../version-utils.js';
-import {
- pushTypes,
- type CreateMessageInfoParams,
- type MessageSpec,
-} from './message-spec.js';
-import { assertSingleMessageInfo } from './utils.js';
export const updateRelationshipMessageSpec: MessageSpec<
UpdateRelationshipMessageData,
diff --git a/lib/shared/notif-utils.js b/lib/shared/notif-utils.js
--- a/lib/shared/notif-utils.js
+++ b/lib/shared/notif-utils.js
@@ -2,6 +2,9 @@
import invariant from 'invariant';
+import { robotextForMessageInfo } from './message-utils.js';
+import { messageSpecs } from './messages/message-specs.js';
+import { threadNoun } from './thread-utils.js';
import {
type MessageInfo,
type RawMessageInfo,
@@ -23,9 +26,6 @@
} from '../utils/entity-text.js';
import { promiseAll } from '../utils/promises.js';
import { trimText } from '../utils/text-utils.js';
-import { robotextForMessageInfo } from './message-utils.js';
-import { messageSpecs } from './messages/message-specs.js';
-import { threadNoun } from './thread-utils.js';
async function notifTextsForMessageInfo(
messageInfos: MessageInfo[],
diff --git a/lib/shared/reaction-utils.js b/lib/shared/reaction-utils.js
--- a/lib/shared/reaction-utils.js
+++ b/lib/shared/reaction-utils.js
@@ -4,6 +4,9 @@
import _sortBy from 'lodash/fp/sortBy.js';
import * as React from 'react';
+import { relationshipBlockedInEitherDirection } from './relationship-utils.js';
+import { threadHasPermission } from './thread-utils.js';
+import { stringForUserExplicit } from './user-utils.js';
import { useENSNames } from '../hooks/ens-cache.js';
import type { MessageReactionInfo } from '../selectors/chat-selectors.js';
import type {
@@ -12,9 +15,6 @@
} from '../types/message-types.js';
import { threadPermissions, type ThreadInfo } from '../types/thread-types.js';
import { useSelector } from '../utils/redux-utils.js';
-import { relationshipBlockedInEitherDirection } from './relationship-utils.js';
-import { threadHasPermission } from './thread-utils.js';
-import { stringForUserExplicit } from './user-utils.js';
function stringForReactionList(
reactions: $ReadOnlyMap<string, MessageReactionInfo>,
diff --git a/lib/shared/reaction-utils.test.js b/lib/shared/reaction-utils.test.js
--- a/lib/shared/reaction-utils.test.js
+++ b/lib/shared/reaction-utils.test.js
@@ -1,7 +1,7 @@
// @flow
-import type { MessageReactionInfo } from '../selectors/chat-selectors.js';
import { stringForReactionList } from './reaction-utils.js';
+import type { MessageReactionInfo } from '../selectors/chat-selectors.js';
describe(
'stringForReactionList(' +
diff --git a/lib/shared/search-utils.js b/lib/shared/search-utils.js
--- a/lib/shared/search-utils.js
+++ b/lib/shared/search-utils.js
@@ -1,5 +1,11 @@
// @flow
+import SearchIndex from './search-index.js';
+import {
+ userIsMember,
+ threadMemberHasPermission,
+ getContainingThreadID,
+} from './thread-utils.js';
import genesis from '../facts/genesis.js';
import { userRelationshipStatus } from '../types/relationship-types.js';
import {
@@ -9,12 +15,6 @@
threadPermissions,
} from '../types/thread-types.js';
import type { AccountUserInfo, UserListItem } from '../types/user-types.js';
-import SearchIndex from './search-index.js';
-import {
- userIsMember,
- threadMemberHasPermission,
- getContainingThreadID,
-} from './thread-utils.js';
const notFriendNotice = 'not friend';
diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js
--- a/lib/shared/thread-utils.js
+++ b/lib/shared/thread-utils.js
@@ -6,6 +6,10 @@
import stringHash from 'string-hash';
import tinycolor from 'tinycolor2';
+import { type ParserRules } from './markdown.js';
+import { getMessageTitle } from './message-utils.js';
+import { relationshipBlockedInEitherDirection } from './relationship-utils.js';
+import threadWatcher from './thread-watcher.js';
import {
fetchMostRecentMessagesActionTypes,
fetchMostRecentMessages,
@@ -85,10 +89,6 @@
import { useSelector } from '../utils/redux-utils.js';
import { firstLine } from '../utils/string-utils.js';
import { trimText } from '../utils/text-utils.js';
-import { type ParserRules } from './markdown.js';
-import { getMessageTitle } from './message-utils.js';
-import { relationshipBlockedInEitherDirection } from './relationship-utils.js';
-import threadWatcher from './thread-watcher.js';
function colorIsDark(color: string): boolean {
return tinycolor(`#${color}`).isDark();
diff --git a/lib/shared/thread-utils.test.js b/lib/shared/thread-utils.test.js
--- a/lib/shared/thread-utils.test.js
+++ b/lib/shared/thread-utils.test.js
@@ -1,7 +1,7 @@
// @flow
-import { threadTypes } from '../types/thread-types.js';
import { parsePendingThreadID } from './thread-utils.js';
+import { threadTypes } from '../types/thread-types.js';
describe('parsePendingThreadID(pendingThreadID: string)', () => {
it('should return correct data for real pending sidebar ID', () => {
diff --git a/lib/shared/typeahead-utils.js b/lib/shared/typeahead-utils.js
--- a/lib/shared/typeahead-utils.js
+++ b/lib/shared/typeahead-utils.js
@@ -1,9 +1,9 @@
// @flow
-import type { RelativeMemberInfo } from '../types/thread-types.js';
import SearchIndex from './search-index.js';
import { threadOtherMembers } from './thread-utils.js';
import { stringForUserExplicit } from './user-utils.js';
+import type { RelativeMemberInfo } from '../types/thread-types.js';
export type TypeaheadMatchedStrings = {
+textBeforeAtSymbol: string,
diff --git a/lib/shared/unshim-utils.js b/lib/shared/unshim-utils.js
--- a/lib/shared/unshim-utils.js
+++ b/lib/shared/unshim-utils.js
@@ -2,13 +2,13 @@
import _mapValues from 'lodash/fp/mapValues.js';
+import { messageSpecs } from './messages/message-specs.js';
import {
type MessageStore,
type RawMessageInfo,
type MessageType,
messageTypes,
} from '../types/message-types.js';
-import { messageSpecs } from './messages/message-specs.js';
function unshimFunc(
messageInfo: RawMessageInfo,
diff --git a/lib/shared/user-utils.js b/lib/shared/user-utils.js
--- a/lib/shared/user-utils.js
+++ b/lib/shared/user-utils.js
@@ -1,5 +1,6 @@
// @flow
+import { memberHasAdminPowers } from './thread-utils.js';
import bots from '../facts/bots.js';
import staff from '../facts/staff.js';
import { useENSNames } from '../hooks/ens-cache.js';
@@ -10,7 +11,6 @@
} from '../types/thread-types.js';
import type { UserInfo } from '../types/user-types.js';
import { useSelector } from '../utils/redux-utils.js';
-import { memberHasAdminPowers } from './thread-utils.js';
function stringForUser(user: {
+username?: ?string,
diff --git a/lib/socket/api-request-handler.react.js b/lib/socket/api-request-handler.react.js
--- a/lib/socket/api-request-handler.react.js
+++ b/lib/socket/api-request-handler.react.js
@@ -3,6 +3,7 @@
import invariant from 'invariant';
import * as React from 'react';
+import { InflightRequests, SocketOffline } from './inflight-requests.js';
import type { APIRequest } from '../types/endpoints.js';
import {
clientSocketMessageTypes,
@@ -12,7 +13,6 @@
} from '../types/socket-types.js';
import { registerActiveSocket } from '../utils/action-utils.js';
import { useSelector } from '../utils/redux-utils.js';
-import { InflightRequests, SocketOffline } from './inflight-requests.js';
type BaseProps = {
+inflightRequests: ?InflightRequests,
diff --git a/lib/socket/request-response-handler.react.js b/lib/socket/request-response-handler.react.js
--- a/lib/socket/request-response-handler.react.js
+++ b/lib/socket/request-response-handler.react.js
@@ -4,6 +4,7 @@
import * as React from 'react';
import { useDispatch } from 'react-redux';
+import { InflightRequests, SocketTimeout } from './inflight-requests.js';
import type { CalendarQuery } from '../types/entry-types.js';
import type { Dispatch } from '../types/redux-types.js';
import {
@@ -22,7 +23,6 @@
} from '../types/socket-types.js';
import { ServerError } from '../utils/errors.js';
import { useSelector } from '../utils/redux-utils.js';
-import { InflightRequests, SocketTimeout } from './inflight-requests.js';
type BaseProps = {
+inflightRequests: ?InflightRequests,
diff --git a/lib/socket/socket.react.js b/lib/socket/socket.react.js
--- a/lib/socket/socket.react.js
+++ b/lib/socket/socket.react.js
@@ -4,6 +4,18 @@
import _throttle from 'lodash/throttle.js';
import * as React from 'react';
+import ActivityHandler from './activity-handler.react.js';
+import APIRequestHandler from './api-request-handler.react.js';
+import CalendarQueryHandler from './calendar-query-handler.react.js';
+import {
+ InflightRequests,
+ SocketTimeout,
+ SocketOffline,
+} from './inflight-requests.js';
+import MessageHandler from './message-handler.react.js';
+import ReportHandler from './report-handler.react.js';
+import RequestResponseHandler from './request-response-handler.react.js';
+import UpdateHandler from './update-handler.react.js';
import { updateActivityActionTypes } from '../actions/activity-actions.js';
import { logOutActionTypes } from '../actions/user-actions.js';
import { unsupervisedBackgroundActionType } from '../reducers/lifecycle-state-reducer.js';
@@ -49,8 +61,8 @@
type SocketListener,
type ConnectionStatus,
setLateResponseActionType,
+ type CommTransportLayer,
} from '../types/socket-types.js';
-import type { CommTransportLayer } from '../types/socket-types.js';
import { actionLogger } from '../utils/action-logger.js';
import type { DispatchActionPromise } from '../utils/action-utils.js';
import {
@@ -61,18 +73,6 @@
import { ServerError } from '../utils/errors.js';
import { promiseAll } from '../utils/promises.js';
import sleep from '../utils/sleep.js';
-import ActivityHandler from './activity-handler.react.js';
-import APIRequestHandler from './api-request-handler.react.js';
-import CalendarQueryHandler from './calendar-query-handler.react.js';
-import {
- InflightRequests,
- SocketTimeout,
- SocketOffline,
-} from './inflight-requests.js';
-import MessageHandler from './message-handler.react.js';
-import ReportHandler from './report-handler.react.js';
-import RequestResponseHandler from './request-response-handler.react.js';
-import UpdateHandler from './update-handler.react.js';
const remainingTimeAfterVisualTimeout =
clientRequestSocketTimeout - clientRequestVisualTimeout;
diff --git a/lib/types/account-types.js b/lib/types/account-types.js
--- a/lib/types/account-types.js
+++ b/lib/types/account-types.js
@@ -1,7 +1,5 @@
// @flow
-import type { PolicyType } from '../facts/policies.js';
-import { values } from '../utils/objects.js';
import type { PlatformDetails } from './device-types.js';
import type {
CalendarQuery,
@@ -21,6 +19,8 @@
LoggedInUserInfo,
OldLoggedInUserInfo,
} from './user-types.js';
+import type { PolicyType } from '../facts/policies.js';
+import { values } from '../utils/objects.js';
export type ResetPasswordRequest = {
+usernameOrEmail: string,
diff --git a/lib/types/entry-types.js b/lib/types/entry-types.js
--- a/lib/types/entry-types.js
+++ b/lib/types/entry-types.js
@@ -1,10 +1,5 @@
// @flow
-import {
- fifteenDaysEarlier,
- fifteenDaysLater,
- thisMonthDates,
-} from '../utils/date-utils.js';
import type { Platform } from './device-types.js';
import { type CalendarFilter, defaultCalendarFilters } from './filter-types.js';
import type { RawMessageInfo } from './message-types.js';
@@ -13,6 +8,11 @@
ClientCreateUpdatesResponse,
} from './update-types.js';
import type { UserInfo, AccountUserInfo } from './user-types.js';
+import {
+ fifteenDaysEarlier,
+ fifteenDaysLater,
+ thisMonthDates,
+} from '../utils/date-utils.js';
export type RawEntryInfo = {
id?: string, // null if local copy without ID yet
diff --git a/lib/types/message-types.js b/lib/types/message-types.js
--- a/lib/types/message-types.js
+++ b/lib/types/message-types.js
@@ -2,7 +2,6 @@
import invariant from 'invariant';
-import type { CallServerEndpointResultInfoInterface } from '../utils/call-server-endpoint.js';
import { type ClientDBMediaInfo } from './media-types.js';
import type {
AddMembersMessageData,
@@ -100,6 +99,7 @@
UpdateRelationshipMessageInfo,
} from './messages/update-relationship.js';
import { type RelativeUserInfo, type UserInfos } from './user-types.js';
+import type { CallServerEndpointResultInfoInterface } from '../utils/call-server-endpoint.js';
export const messageTypes = Object.freeze({
TEXT: 0,
diff --git a/lib/types/redux-types.js b/lib/types/redux-types.js
--- a/lib/types/redux-types.js
+++ b/lib/types/redux-types.js
@@ -1,6 +1,5 @@
// @flow
-import type { Shape } from '../types/core.js';
import type {
LogOutResult,
LogInStartingPayload,
@@ -83,6 +82,7 @@
} from './thread-types.js';
import type { ClientUpdatesResultWithUserInfos } from './update-types.js';
import type { CurrentUserInfo, UserStore } from './user-types.js';
+import type { Shape } from '../types/core.js';
export type BaseAppState<NavInfo: BaseNavInfo> = {
navInfo: NavInfo,
diff --git a/lib/types/relationship-types.js b/lib/types/relationship-types.js
--- a/lib/types/relationship-types.js
+++ b/lib/types/relationship-types.js
@@ -1,7 +1,7 @@
// @flow
-import { values } from '../utils/objects.js';
import type { AccountUserInfo } from './user-types.js';
+import { values } from '../utils/objects.js';
export const undirectedStatus = Object.freeze({
KNOW_OF: 0,
diff --git a/lib/types/thread-types.js b/lib/types/thread-types.js
--- a/lib/types/thread-types.js
+++ b/lib/types/thread-types.js
@@ -2,7 +2,6 @@
import invariant from 'invariant';
-import type { UserEntity } from '../utils/entity-text.js';
import type { Shape } from './core.js';
import type { CalendarQuery, RawEntryInfo } from './entry-types.js';
import type {
@@ -12,6 +11,7 @@
import type { ThreadSubscription } from './subscription-types.js';
import type { ServerUpdateInfo, ClientUpdateInfo } from './update-types.js';
import type { UserInfo, UserInfos } from './user-types.js';
+import type { UserEntity } from '../utils/entity-text.js';
export const threadTypes = Object.freeze({
//OPEN: 0, (DEPRECATED)
diff --git a/lib/utils/action-logger.js b/lib/utils/action-logger.js
--- a/lib/utils/action-logger.js
+++ b/lib/utils/action-logger.js
@@ -3,9 +3,9 @@
import { type Middleware } from 'redux';
import inspect from 'util-inspect';
+import { sanitizeActionSecrets } from './sanitization.js';
import { rehydrateActionType } from '../types/redux-types.js';
import type { ActionSummary } from '../types/report-types.js';
-import { sanitizeActionSecrets } from './sanitization.js';
const uninterestingActionTypes = new Set(['Navigation/COMPLETE_TRANSITION']);
const maxActionSummaryLength = 500;
diff --git a/lib/utils/action-utils.js b/lib/utils/action-utils.js
--- a/lib/utils/action-utils.js
+++ b/lib/utils/action-utils.js
@@ -5,6 +5,12 @@
import { useSelector, useDispatch } from 'react-redux';
import { createSelector } from 'reselect';
+import callServerEndpoint from './call-server-endpoint.js';
+import type {
+ CallServerEndpoint,
+ CallServerEndpointOptions,
+} from './call-server-endpoint.js';
+import { getConfig } from './config.js';
import { serverCallStateSelector } from '../selectors/server-calls.js';
import {
logInActionSources,
@@ -26,12 +32,6 @@
} from '../types/session-types.js';
import type { ConnectionStatus } from '../types/socket-types.js';
import type { CurrentUserInfo } from '../types/user-types.js';
-import callServerEndpoint from './call-server-endpoint.js';
-import type {
- CallServerEndpoint,
- CallServerEndpointOptions,
-} from './call-server-endpoint.js';
-import { getConfig } from './config.js';
let nextPromiseIndex = 0;
diff --git a/lib/utils/call-server-endpoint.js b/lib/utils/call-server-endpoint.js
--- a/lib/utils/call-server-endpoint.js
+++ b/lib/utils/call-server-endpoint.js
@@ -1,5 +1,9 @@
// @flow
+import { getConfig } from './config.js';
+import { ServerError, FetchTimeout } from './errors.js';
+import sleep from './sleep.js';
+import { uploadBlob, type UploadBlob } from './upload-blob.js';
import { callServerEndpointTimeout } from '../shared/timeouts.js';
import { SocketOffline, SocketTimeout } from '../socket/inflight-requests.js';
import type { Shape } from '../types/core.js';
@@ -17,10 +21,6 @@
} from '../types/session-types.js';
import type { ConnectionStatus } from '../types/socket-types.js';
import type { CurrentUserInfo } from '../types/user-types.js';
-import { getConfig } from './config.js';
-import { ServerError, FetchTimeout } from './errors.js';
-import sleep from './sleep.js';
-import { uploadBlob, type UploadBlob } from './upload-blob.js';
export type CallServerEndpointOptions = Shape<{
// null timeout means no timeout, which is the default for uploadBlob
diff --git a/lib/utils/config.js b/lib/utils/config.js
--- a/lib/utils/config.js
+++ b/lib/utils/config.js
@@ -2,10 +2,10 @@
import invariant from 'invariant';
-import type { LogInActionSource } from '../types/account-types.js';
-import type { PlatformDetails } from '../types/device-types.js';
import type { DispatchRecoveryAttempt } from './action-utils.js';
import type { CallServerEndpoint } from './call-server-endpoint.js';
+import type { LogInActionSource } from '../types/account-types.js';
+import type { PlatformDetails } from '../types/device-types.js';
export type Config = {
+resolveInvalidatedCookie: ?(
diff --git a/lib/utils/ens-helpers.js b/lib/utils/ens-helpers.js
--- a/lib/utils/ens-helpers.js
+++ b/lib/utils/ens-helpers.js
@@ -1,7 +1,7 @@
// @flow
-import { userIdentifiedByETHAddress } from '../shared/account-utils.js';
import { ENSCache } from './ens-cache.js';
+import { userIdentifiedByETHAddress } from '../shared/account-utils.js';
type BaseUserInfo = { +username?: ?string, ... };
export type GetENSNames = <T: ?BaseUserInfo>(
diff --git a/lib/utils/entity-helpers.js b/lib/utils/entity-helpers.js
--- a/lib/utils/entity-helpers.js
+++ b/lib/utils/entity-helpers.js
@@ -3,13 +3,13 @@
import invariant from 'invariant';
import * as React from 'react';
-import type { ThreadInfo, ResolvedThreadInfo } from '../types/thread-types.js';
-import { values } from '../utils/objects.js';
import {
ET,
useENSNamesForEntityText,
entityTextToRawString,
} from './entity-text.js';
+import type { ThreadInfo, ResolvedThreadInfo } from '../types/thread-types.js';
+import { values } from '../utils/objects.js';
function useResolvedThreadInfos(
threadInfos: $ReadOnlyArray<ThreadInfo>,
diff --git a/lib/utils/entity-text.js b/lib/utils/entity-text.js
--- a/lib/utils/entity-text.js
+++ b/lib/utils/entity-text.js
@@ -3,6 +3,7 @@
import invariant from 'invariant';
import * as React from 'react';
+import type { GetENSNames } from './ens-helpers.js';
import { useENSNames } from '../hooks/ens-cache.js';
import { threadNoun } from '../shared/thread-utils.js';
import { stringForUser } from '../shared/user-utils.js';
@@ -13,7 +14,6 @@
type ThreadInfo,
} from '../types/thread-types.js';
import { basePluralize } from '../utils/text-utils.js';
-import type { GetENSNames } from './ens-helpers.js';
export type UserEntity = {
+type: 'user',
diff --git a/lib/utils/message-ops-utils.test.js b/lib/utils/message-ops-utils.test.js
--- a/lib/utils/message-ops-utils.test.js
+++ b/lib/utils/message-ops-utils.test.js
@@ -1,5 +1,10 @@
// @flow
+import {
+ translateRawMessageInfoToClientDBMessageInfo,
+ translateClientDBMessageInfoToRawMessageInfo,
+ translateClientDBMediaInfosToMedia,
+} from './message-ops-utils.js';
import type {
ClientDBMessageInfo,
RawSidebarSourceMessageInfo,
@@ -19,11 +24,6 @@
import type { RawRestoreEntryMessageInfo } from '../types/messages/restore-entry.js';
import type { RawTextMessageInfo } from '../types/messages/text.js';
import type { RawUpdateRelationshipMessageInfo } from '../types/messages/update-relationship.js';
-import {
- translateRawMessageInfoToClientDBMessageInfo,
- translateClientDBMessageInfoToRawMessageInfo,
- translateClientDBMediaInfosToMedia,
-} from './message-ops-utils.js';
test('TEXT: rawMessageInfo -> clientDBMessageInfo -> rawMessageInfo', () => {
const rawTextMessageInfo: RawTextMessageInfo = {
diff --git a/lib/utils/policy-acknowledge-utlis.js b/lib/utils/policy-acknowledge-utlis.js
--- a/lib/utils/policy-acknowledge-utlis.js
+++ b/lib/utils/policy-acknowledge-utlis.js
@@ -1,9 +1,9 @@
// @flow
+import type { DispatchActionPromise } from './action-utils.js';
import { policyAcknowledgmentActionTypes } from '../actions/user-actions.js';
import type { PolicyType } from '../facts/policies.js';
import type { PolicyAcknowledgmentRequest } from '../types/account-types.js';
-import type { DispatchActionPromise } from './action-utils.js';
function acknowledgePolicy(
policy: PolicyType,
diff --git a/lib/utils/report-utils.js b/lib/utils/report-utils.js
--- a/lib/utils/report-utils.js
+++ b/lib/utils/report-utils.js
@@ -1,12 +1,12 @@
// @flow
+import { useSelector } from './redux-utils.js';
import {
type SupportedReports,
type EnabledReports,
type ClientReportCreationRequest,
reportTypes,
} from '../types/report-types.js';
-import { useSelector } from './redux-utils.js';
function useIsReportEnabled(reportType: SupportedReports): boolean {
return useSelector(state => state.reportStore.enabledReports[reportType]);
diff --git a/lib/utils/sanitization.js b/lib/utils/sanitization.js
--- a/lib/utils/sanitization.js
+++ b/lib/utils/sanitization.js
@@ -3,13 +3,13 @@
import clone from 'just-clone';
import stringHash from 'string-hash';
+import { setNewSessionActionType } from './action-utils.js';
import { setDeviceTokenActionTypes } from '../actions/device-actions.js';
import type {
BaseAction,
NativeAppState,
AppState,
} from '../types/redux-types.js';
-import { setNewSessionActionType } from './action-utils.js';
export type ReduxCrashReport = {
+preloadedState: AppState,
diff --git a/lib/utils/siwe-utils.js b/lib/utils/siwe-utils.js
--- a/lib/utils/siwe-utils.js
+++ b/lib/utils/siwe-utils.js
@@ -3,8 +3,8 @@
import invariant from 'invariant';
import { SiweMessage } from 'siwe';
-import type { SIWEMessage } from '../types/siwe-types.js';
import { isDev } from './dev-utils.js';
+import type { SIWEMessage } from '../types/siwe-types.js';
const siweNonceRegex: RegExp = /^[a-zA-Z0-9]{17}$/;
function isValidSIWENonce(candidate: string): boolean {
diff --git a/lib/utils/validation-utils.test.js b/lib/utils/validation-utils.test.js
--- a/lib/utils/validation-utils.test.js
+++ b/lib/utils/validation-utils.test.js
@@ -1,12 +1,12 @@
// @flow
-import { threadTypes } from '../types/thread-types.js';
-import { values } from '../utils/objects.js';
import {
tMediaMessagePhoto,
tMediaMessageVideo,
tNumEnum,
} from './validation-utils.js';
+import { threadTypes } from '../types/thread-types.js';
+import { values } from '../utils/objects.js';
describe('Validation utils', () => {
describe('tNumEnum validator', () => {
diff --git a/native/account/log-in-panel.react.js b/native/account/log-in-panel.react.js
--- a/native/account/log-in-panel.react.js
+++ b/native/account/log-in-panel.react.js
@@ -25,13 +25,6 @@
type DispatchActionPromise,
} from 'lib/utils/action-utils.js';
-import SWMansionIcon from '../components/swmansion-icon.react.js';
-import { commCoreModule } from '../native-modules.js';
-import { NavContext } from '../navigation/navigation-context.js';
-import { useSelector } from '../redux/redux-utils.js';
-import { nativeLogInExtraInfoSelector } from '../selectors/account-selectors.js';
-import type { KeyPressEvent } from '../types/react-native.js';
-import type { StateContainer } from '../utils/state-container.js';
import { TextInput } from './modal-components.react.js';
import {
fetchNativeCredentials,
@@ -39,6 +32,13 @@
} from './native-credentials.js';
import { PanelButton, Panel } from './panel-components.react.js';
import PasswordInput from './password-input.react.js';
+import SWMansionIcon from '../components/swmansion-icon.react.js';
+import { commCoreModule } from '../native-modules.js';
+import { NavContext } from '../navigation/navigation-context.js';
+import { useSelector } from '../redux/redux-utils.js';
+import { nativeLogInExtraInfoSelector } from '../selectors/account-selectors.js';
+import type { KeyPressEvent } from '../types/react-native.js';
+import type { StateContainer } from '../utils/state-container.js';
export type LogInState = {
+usernameInputText: ?string,
diff --git a/native/account/logged-out-modal.react.js b/native/account/logged-out-modal.react.js
--- a/native/account/logged-out-modal.react.js
+++ b/native/account/logged-out-modal.react.js
@@ -22,6 +22,13 @@
import type { Dispatch } from 'lib/types/redux-types.js';
import { fetchNewCookieFromNativeCredentials } from 'lib/utils/action-utils.js';
+import { splashBackgroundURI } from './background-info.js';
+import LogInPanel from './log-in-panel.react.js';
+import type { LogInState } from './log-in-panel.react.js';
+import LoggedOutStaffInfo from './logged-out-staff-info.react.js';
+import RegisterPanel from './register-panel.react.js';
+import type { RegisterState } from './register-panel.react.js';
+import SIWEPanel from './siwe-panel.react.js';
import EthereumLogo from '../components/ethereum-logo.react.js';
import KeyboardAvoidingView from '../components/keyboard-avoiding-view.react.js';
import ConnectedStatusBar from '../connected-status-bar.react.js';
@@ -56,13 +63,6 @@
type StateChange,
setStateForContainer,
} from '../utils/state-container.js';
-import { splashBackgroundURI } from './background-info.js';
-import LogInPanel from './log-in-panel.react.js';
-import type { LogInState } from './log-in-panel.react.js';
-import LoggedOutStaffInfo from './logged-out-staff-info.react.js';
-import RegisterPanel from './register-panel.react.js';
-import type { RegisterState } from './register-panel.react.js';
-import SIWEPanel from './siwe-panel.react.js';
let initialAppLoad = true;
const safeAreaEdges = ['top', 'bottom'];
diff --git a/native/account/password-input.react.js b/native/account/password-input.react.js
--- a/native/account/password-input.react.js
+++ b/native/account/password-input.react.js
@@ -3,9 +3,9 @@
import * as React from 'react';
import { TextInput as BaseTextInput, View, StyleSheet } from 'react-native';
+import { TextInput } from './modal-components.react.js';
import Button from '../components/button.react.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
-import { TextInput } from './modal-components.react.js';
type Props = React.ElementConfig<typeof BaseTextInput>;
diff --git a/native/account/register-panel.react.js b/native/account/register-panel.react.js
--- a/native/account/register-panel.react.js
+++ b/native/account/register-panel.react.js
@@ -29,15 +29,15 @@
type DispatchActionPromise,
} from 'lib/utils/action-utils.js';
+import { TextInput } from './modal-components.react.js';
+import { setNativeCredentials } from './native-credentials.js';
+import { PanelButton, Panel } from './panel-components.react.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
import { NavContext } from '../navigation/navigation-context.js';
import { useSelector } from '../redux/redux-utils.js';
import { nativeLogInExtraInfoSelector } from '../selectors/account-selectors.js';
import type { KeyPressEvent } from '../types/react-native.js';
import { type StateContainer } from '../utils/state-container.js';
-import { TextInput } from './modal-components.react.js';
-import { setNativeCredentials } from './native-credentials.js';
-import { PanelButton, Panel } from './panel-components.react.js';
export type RegisterState = {
+usernameInputText: string,
diff --git a/native/account/resolve-invalidated-cookie.js b/native/account/resolve-invalidated-cookie.js
--- a/native/account/resolve-invalidated-cookie.js
+++ b/native/account/resolve-invalidated-cookie.js
@@ -5,10 +5,10 @@
import type { DispatchRecoveryAttempt } from 'lib/utils/action-utils.js';
import type { CallServerEndpoint } from 'lib/utils/call-server-endpoint.js';
+import { fetchNativeKeychainCredentials } from './native-credentials.js';
import { getGlobalNavContext } from '../navigation/icky-global.js';
import { store } from '../redux/redux-setup.js';
import { nativeLogInExtraInfoSelector } from '../selectors/account-selectors.js';
-import { fetchNativeKeychainCredentials } from './native-credentials.js';
async function resolveInvalidatedCookie(
callServerEndpoint: CallServerEndpoint,
diff --git a/native/account/siwe-panel.react.js b/native/account/siwe-panel.react.js
--- a/native/account/siwe-panel.react.js
+++ b/native/account/siwe-panel.react.js
@@ -20,12 +20,12 @@
useDispatchActionPromise,
} from 'lib/utils/action-utils.js';
+import type { LoggedOutMode } from './logged-out-modal.react.js';
import { commCoreModule } from '../native-modules.js';
import { NavContext } from '../navigation/navigation-context.js';
import { useSelector } from '../redux/redux-utils.js';
import { nativeLogInExtraInfoSelector } from '../selectors/account-selectors.js';
import { defaultLandingURLPrefix } from '../utils/url-utils.js';
-import type { LoggedOutMode } from './logged-out-modal.react.js';
const commSIWE = `${defaultLandingURLPrefix}/siwe`;
diff --git a/native/apps/apps-directory.react.js b/native/apps/apps-directory.react.js
--- a/native/apps/apps-directory.react.js
+++ b/native/apps/apps-directory.react.js
@@ -4,8 +4,8 @@
import { Text, FlatList, View } from 'react-native';
import { useSelector } from 'react-redux';
-import { useStyles } from '../themes/colors.js';
import AppListing from './app-listing.react.js';
+import { useStyles } from '../themes/colors.js';
const APP_DIRECTORY_DATA = [
{
diff --git a/native/calendar/calendar.react.js b/native/calendar/calendar.react.js
--- a/native/calendar/calendar.react.js
+++ b/native/calendar/calendar.react.js
@@ -47,6 +47,13 @@
} from 'lib/utils/date-utils.js';
import sleep from 'lib/utils/sleep.js';
+import CalendarInputBar from './calendar-input-bar.react.js';
+import {
+ Entry,
+ InternalEntry,
+ dummyNodeForEntryHeightMeasurement,
+} from './entry.react.js';
+import SectionFooter from './section-footer.react.js';
import ContentLoading from '../components/content-loading.react.js';
import KeyboardAvoidingView from '../components/keyboard-avoiding-view.react.js';
import ListLoadingIndicator from '../components/list-loading-indicator.react.js';
@@ -93,13 +100,6 @@
ViewableItemsChange,
KeyboardEvent,
} from '../types/react-native.js';
-import CalendarInputBar from './calendar-input-bar.react.js';
-import {
- Entry,
- InternalEntry,
- dummyNodeForEntryHeightMeasurement,
-} from './entry.react.js';
-import SectionFooter from './section-footer.react.js';
export type EntryInfoWithHeight = {
...EntryInfo,
diff --git a/native/calendar/entry.react.js b/native/calendar/entry.react.js
--- a/native/calendar/entry.react.js
+++ b/native/calendar/entry.react.js
@@ -59,6 +59,8 @@
import { ServerError } from 'lib/utils/errors.js';
import sleep from 'lib/utils/sleep.js';
+import type { EntryInfoWithHeight } from './calendar.react.js';
+import LoadingIndicator from './loading-indicator.react.js';
import {
type MessageListParams,
useNavigateToThread,
@@ -79,8 +81,6 @@
import { colors, useStyles } from '../themes/colors.js';
import type { LayoutEvent } from '../types/react-native.js';
import { waitForInteractions } from '../utils/timers.js';
-import type { EntryInfoWithHeight } from './calendar.react.js';
-import LoadingIndicator from './loading-indicator.react.js';
function hueDistance(firstColor: string, secondColor: string): number {
const firstHue = tinycolor(firstColor).toHsv().h;
diff --git a/native/chat/background-chat-thread-list.react.js b/native/chat/background-chat-thread-list.react.js
--- a/native/chat/background-chat-thread-list.react.js
+++ b/native/chat/background-chat-thread-list.react.js
@@ -9,12 +9,12 @@
emptyItemText,
} from 'lib/shared/thread-utils.js';
+import ChatThreadList from './chat-thread-list.react.js';
+import type { ChatTopTabsNavigationProp } from './chat.react.js';
import BackgroundTabIllustration from '../components/background-tab-illustration.react.js';
import type { NavigationRoute } from '../navigation/route-names.js';
import { useSelector } from '../redux/redux-utils.js';
import { useStyles } from '../themes/colors.js';
-import ChatThreadList from './chat-thread-list.react.js';
-import type { ChatTopTabsNavigationProp } from './chat.react.js';
type BackgroundChatThreadListProps = {
navigation: ChatTopTabsNavigationProp<'BackgroundChatThreadList'>,
diff --git a/native/chat/chat-context-provider.react.js b/native/chat/chat-context-provider.react.js
--- a/native/chat/chat-context-provider.react.js
+++ b/native/chat/chat-context-provider.react.js
@@ -5,10 +5,10 @@
import type { ChatMessageItem } from 'lib/selectors/chat-selectors.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import type { ChatMessageItemWithHeight } from '../types/chat-types.js';
import { ChatContext } from './chat-context.js';
import type { SidebarAnimationType } from './chat-context.js';
import ChatItemHeightMeasurer from './chat-item-height-measurer.react.js';
+import type { ChatMessageItemWithHeight } from '../types/chat-types.js';
type Props = {
+children: React.Node,
diff --git a/native/chat/chat-input-bar.react.js b/native/chat/chat-input-bar.react.js
--- a/native/chat/chat-input-bar.react.js
+++ b/native/chat/chat-input-bar.react.js
@@ -58,8 +58,8 @@
threadPermissions,
type ClientThreadJoinRequest,
type ThreadJoinPayload,
+ type RelativeMemberInfo,
} from 'lib/types/thread-types.js';
-import type { RelativeMemberInfo } from 'lib/types/thread-types.js';
import { type UserInfos } from 'lib/types/user-types.js';
import {
type DispatchActionPromise,
@@ -67,6 +67,9 @@
useDispatchActionPromise,
} from 'lib/utils/action-utils.js';
+import { ChatContext } from './chat-context.js';
+import type { ChatNavigationProp } from './chat.react.js';
+import TypeaheadTooltip from './typeahead-tooltip.react.js';
import Button from '../components/button.react.js';
import ClearableTextInput from '../components/clearable-text-input.react.js';
import type { SyncedSelectionData } from '../components/selectable-text-input.js';
@@ -95,9 +98,6 @@
import { type AnimatedViewStyle, AnimatedView } from '../types/styles.js';
import { runTiming } from '../utils/animation-utils.js';
import { nativeTypeaheadRegex } from '../utils/typeahead-utils.js';
-import { ChatContext } from './chat-context.js';
-import type { ChatNavigationProp } from './chat.react.js';
-import TypeaheadTooltip from './typeahead-tooltip.react.js';
/* eslint-disable import/no-named-as-default-member */
const {
diff --git a/native/chat/chat-item-height-measurer.react.js b/native/chat/chat-item-height-measurer.react.js
--- a/native/chat/chat-item-height-measurer.react.js
+++ b/native/chat/chat-item-height-measurer.react.js
@@ -8,8 +8,6 @@
import { messageTypes, type MessageType } from 'lib/types/message-types.js';
import { entityTextToRawString } from 'lib/utils/entity-text.js';
-import NodeHeightMeasurer from '../components/node-height-measurer.react.js';
-import { InputStateContext } from '../input/input-state.js';
import type { MeasurementTask } from './chat-context-provider.react.js';
import { useComposedMessageMaxWidth } from './composed-message-width.js';
import { dummyNodeForRobotextMessageHeightMeasurement } from './inner-robotext-message.react.js';
@@ -17,6 +15,8 @@
import { MessageListContextProvider } from './message-list-types.js';
import { multimediaMessageContentSizes } from './multimedia-message-utils.js';
import { chatMessageItemKey } from './utils.js';
+import NodeHeightMeasurer from '../components/node-height-measurer.react.js';
+import { InputStateContext } from '../input/input-state.js';
type Props = {
+measurement: MeasurementTask,
diff --git a/native/chat/chat-list.react.js b/native/chat/chat-list.react.js
--- a/native/chat/chat-list.react.js
+++ b/native/chat/chat-list.react.js
@@ -15,6 +15,9 @@
import { localIDPrefix } from 'lib/shared/message-utils.js';
+import type { ChatNavigationProp } from './chat.react.js';
+import NewMessagesPill from './new-messages-pill.react.js';
+import { chatMessageItemHeight, chatMessageItemKey } from './utils.js';
import {
type KeyboardState,
KeyboardContext,
@@ -24,9 +27,6 @@
import type { ChatMessageItemWithHeight } from '../types/chat-types.js';
import type { ScrollEvent } from '../types/react-native.js';
import type { ViewStyle } from '../types/styles.js';
-import type { ChatNavigationProp } from './chat.react.js';
-import NewMessagesPill from './new-messages-pill.react.js';
-import { chatMessageItemHeight, chatMessageItemKey } from './utils.js';
type FlatListElementRef = React.ElementRef<typeof ReactNativeFlatList>;
type FlatListProps = React.ElementConfig<typeof ReactNativeFlatList>;
diff --git a/native/chat/chat-router.js b/native/chat/chat-router.js
--- a/native/chat/chat-router.js
+++ b/native/chat/chat-router.js
@@ -13,6 +13,7 @@
import type { ThreadInfo } from 'lib/types/thread-types.js';
+import { createNavigateToThreadAction } from './message-list-types.js';
import {
clearScreensActionType,
replaceWithThreadActionType,
@@ -27,7 +28,6 @@
ChatThreadListRouteName,
ComposeSubchannelRouteName,
} from '../navigation/route-names.js';
-import { createNavigateToThreadAction } from './message-list-types.js';
type ClearScreensAction = {
+type: 'CLEAR_SCREENS',
diff --git a/native/chat/chat-thread-list-item.react.js b/native/chat/chat-thread-list-item.react.js
--- a/native/chat/chat-thread-list-item.react.js
+++ b/native/chat/chat-thread-list-item.react.js
@@ -9,16 +9,16 @@
import { shortAbsoluteDate } from 'lib/utils/date-utils.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
+import ChatThreadListSeeMoreSidebars from './chat-thread-list-see-more-sidebars.react.js';
+import ChatThreadListSidebar from './chat-thread-list-sidebar.react.js';
+import MessagePreview from './message-preview.react.js';
+import SwipeableThread from './swipeable-thread.react.js';
import Button from '../components/button.react.js';
import ColorSplotch from '../components/color-splotch.react.js';
import { SingleLine } from '../components/single-line.react.js';
import ThreadAncestorsLabel from '../components/thread-ancestors-label.react.js';
import UnreadDot from '../components/unread-dot.react.js';
import { useColors, useStyles } from '../themes/colors.js';
-import ChatThreadListSeeMoreSidebars from './chat-thread-list-see-more-sidebars.react.js';
-import ChatThreadListSidebar from './chat-thread-list-sidebar.react.js';
-import MessagePreview from './message-preview.react.js';
-import SwipeableThread from './swipeable-thread.react.js';
type Props = {
+data: ChatThreadItem,
diff --git a/native/chat/chat-thread-list-see-more-sidebars.react.js b/native/chat/chat-thread-list-see-more-sidebars.react.js
--- a/native/chat/chat-thread-list-see-more-sidebars.react.js
+++ b/native/chat/chat-thread-list-see-more-sidebars.react.js
@@ -6,9 +6,9 @@
import type { ThreadInfo } from 'lib/types/thread-types.js';
+import { sidebarHeight } from './sidebar-item.react.js';
import Button from '../components/button.react.js';
import { useColors, useStyles } from '../themes/colors.js';
-import { sidebarHeight } from './sidebar-item.react.js';
type Props = {
+threadInfo: ThreadInfo,
diff --git a/native/chat/chat-thread-list-sidebar.react.js b/native/chat/chat-thread-list-sidebar.react.js
--- a/native/chat/chat-thread-list-sidebar.react.js
+++ b/native/chat/chat-thread-list-sidebar.react.js
@@ -5,13 +5,13 @@
import type { ThreadInfo, SidebarInfo } from 'lib/types/thread-types.js';
+import { SidebarItem, sidebarHeight } from './sidebar-item.react.js';
+import SwipeableThread from './swipeable-thread.react.js';
import ExtendedArrow from '../components/arrow-extended.react.js';
import Arrow from '../components/arrow.react.js';
import Button from '../components/button.react.js';
import UnreadDot from '../components/unread-dot.react.js';
import { useColors, useStyles } from '../themes/colors.js';
-import { SidebarItem, sidebarHeight } from './sidebar-item.react.js';
-import SwipeableThread from './swipeable-thread.react.js';
type Props = {
+sidebarInfo: SidebarInfo,
diff --git a/native/chat/chat-thread-list.react.js b/native/chat/chat-thread-list.react.js
--- a/native/chat/chat-thread-list.react.js
+++ b/native/chat/chat-thread-list.react.js
@@ -34,6 +34,20 @@
import type { GlobalAccountUserInfo, UserInfo } from 'lib/types/user-types.js';
import { useServerCall } from 'lib/utils/action-utils.js';
+import {
+ ChatThreadListItem,
+ chatThreadListItemHeight,
+ spacerHeight,
+} from './chat-thread-list-item.react.js';
+import type {
+ ChatTopTabsNavigationProp,
+ ChatNavigationProp,
+} from './chat.react.js';
+import {
+ type MessageListParams,
+ useNavigateToThread,
+} from './message-list-types.js';
+import { sidebarHeight } from './sidebar-item.react.js';
import Button from '../components/button.react.js';
import Search from '../components/search.react.js';
import {
@@ -52,20 +66,6 @@
import type { ScrollEvent } from '../types/react-native.js';
import { AnimatedView, type AnimatedStyleObj } from '../types/styles.js';
import { animateTowards } from '../utils/animation-utils.js';
-import {
- ChatThreadListItem,
- chatThreadListItemHeight,
- spacerHeight,
-} from './chat-thread-list-item.react.js';
-import type {
- ChatTopTabsNavigationProp,
- ChatNavigationProp,
-} from './chat.react.js';
-import {
- type MessageListParams,
- useNavigateToThread,
-} from './message-list-types.js';
-import { sidebarHeight } from './sidebar-item.react.js';
const floatingActions = [
{
diff --git a/native/chat/chat.react.js b/native/chat/chat.react.js
--- a/native/chat/chat.react.js
+++ b/native/chat/chat.react.js
@@ -30,6 +30,20 @@
threadMembersWithoutAddedAshoat,
} from 'lib/shared/thread-utils.js';
+import BackgroundChatThreadList from './background-chat-thread-list.react.js';
+import ChatHeader from './chat-header.react.js';
+import ChatRouter, { type ChatRouterNavigationHelpers } from './chat-router.js';
+import ComposeSubchannel from './compose-subchannel.react.js';
+import ComposeThreadButton from './compose-thread-button.react.js';
+import HomeChatThreadList from './home-chat-thread-list.react.js';
+import MessageListContainer from './message-list-container.react.js';
+import MessageListHeaderTitle from './message-list-header-title.react.js';
+import MessageStorePruner from './message-store-pruner.react.js';
+import DeleteThread from './settings/delete-thread.react.js';
+import ThreadSettings from './settings/thread-settings.react.js';
+import ThreadScreenPruner from './thread-screen-pruner.react.js';
+import ThreadSettingsButton from './thread-settings-button.react.js';
+import ThreadSettingsHeaderTitle from './thread-settings-header-title.react.js';
import KeyboardAvoidingView from '../components/keyboard-avoiding-view.react.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
import { InputStateContext } from '../input/input-state.js';
@@ -50,20 +64,6 @@
type ChatTopTabsParamList,
} from '../navigation/route-names.js';
import { useColors, useStyles } from '../themes/colors.js';
-import BackgroundChatThreadList from './background-chat-thread-list.react.js';
-import ChatHeader from './chat-header.react.js';
-import ChatRouter, { type ChatRouterNavigationHelpers } from './chat-router.js';
-import ComposeSubchannel from './compose-subchannel.react.js';
-import ComposeThreadButton from './compose-thread-button.react.js';
-import HomeChatThreadList from './home-chat-thread-list.react.js';
-import MessageListContainer from './message-list-container.react.js';
-import MessageListHeaderTitle from './message-list-header-title.react.js';
-import MessageStorePruner from './message-store-pruner.react.js';
-import DeleteThread from './settings/delete-thread.react.js';
-import ThreadSettings from './settings/thread-settings.react.js';
-import ThreadScreenPruner from './thread-screen-pruner.react.js';
-import ThreadSettingsButton from './thread-settings-button.react.js';
-import ThreadSettingsHeaderTitle from './thread-settings-header-title.react.js';
const unboundStyles = {
keyboardAvoidingView: {
diff --git a/native/chat/compose-subchannel.react.js b/native/chat/compose-subchannel.react.js
--- a/native/chat/compose-subchannel.react.js
+++ b/native/chat/compose-subchannel.react.js
@@ -27,6 +27,9 @@
useDispatchActionPromise,
} from 'lib/utils/action-utils.js';
+import type { ChatNavigationProp } from './chat.react.js';
+import { useNavigateToThread } from './message-list-types.js';
+import ParentThreadHeader from './parent-thread-header.react.js';
import LinkButton from '../components/link-button.react.js';
import { createTagInput } from '../components/tag-input.react.js';
import ThreadList from '../components/thread-list.react.js';
@@ -35,9 +38,6 @@
import type { NavigationRoute } from '../navigation/route-names.js';
import { useSelector } from '../redux/redux-utils.js';
import { useStyles } from '../themes/colors.js';
-import type { ChatNavigationProp } from './chat.react.js';
-import { useNavigateToThread } from './message-list-types.js';
-import ParentThreadHeader from './parent-thread-header.react.js';
const TagInput = createTagInput<AccountUserInfo>();
diff --git a/native/chat/compose-thread-button.react.js b/native/chat/compose-thread-button.react.js
--- a/native/chat/compose-thread-button.react.js
+++ b/native/chat/compose-thread-button.react.js
@@ -6,12 +6,12 @@
import { createPendingThread } from 'lib/shared/thread-utils.js';
import { threadTypes } from 'lib/types/thread-types.js';
+import type { ChatNavigationProp } from './chat.react.js';
import Button from '../components/button.react.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
import { MessageListRouteName } from '../navigation/route-names.js';
import { useSelector } from '../redux/redux-utils.js';
import { type Colors, useColors } from '../themes/colors.js';
-import type { ChatNavigationProp } from './chat.react.js';
type BaseProps = {
+navigate: $PropertyType<ChatNavigationProp<'ChatThreadList'>, 'navigate'>,
diff --git a/native/chat/composed-message.react.js b/native/chat/composed-message.react.js
--- a/native/chat/composed-message.react.js
+++ b/native/chat/composed-message.react.js
@@ -9,10 +9,6 @@
import { createMessageReply } from 'lib/shared/message-utils.js';
import { assertComposableMessageType } from 'lib/types/message-types.js';
-import { type InputState, InputStateContext } from '../input/input-state.js';
-import { type Colors, useColors } from '../themes/colors.js';
-import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js';
-import { type AnimatedStyleObj, AnimatedView } from '../types/styles.js';
import {
clusterEndHeight,
inlineEngagementStyle,
@@ -27,6 +23,10 @@
import { useNavigateToSidebar } from './sidebar-navigation.js';
import SwipeableMessage from './swipeable-message.react.js';
import { useContentAndHeaderOpacity, useDeliveryIconOpacity } from './utils.js';
+import { type InputState, InputStateContext } from '../input/input-state.js';
+import { type Colors, useColors } from '../themes/colors.js';
+import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js';
+import { type AnimatedStyleObj, AnimatedView } from '../types/styles.js';
/* eslint-disable import/no-named-as-default-member */
const { Node } = Animated;
diff --git a/native/chat/failed-send.react.js b/native/chat/failed-send.react.js
--- a/native/chat/failed-send.react.js
+++ b/native/chat/failed-send.react.js
@@ -11,13 +11,13 @@
} from 'lib/types/message-types.js';
import type { RawComposableMessageInfo } from 'lib/types/message-types.js';
+import { multimediaMessageSendFailed } from './multimedia-message-utils.js';
+import textMessageSendFailed from './text-message-send-failed.js';
import Button from '../components/button.react.js';
import { type InputState, InputStateContext } from '../input/input-state.js';
import { useSelector } from '../redux/redux-utils.js';
import { useStyles } from '../themes/colors.js';
import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js';
-import { multimediaMessageSendFailed } from './multimedia-message-utils.js';
-import textMessageSendFailed from './text-message-send-failed.js';
const failedSendHeight = 22;
diff --git a/native/chat/home-chat-thread-list.react.js b/native/chat/home-chat-thread-list.react.js
--- a/native/chat/home-chat-thread-list.react.js
+++ b/native/chat/home-chat-thread-list.react.js
@@ -4,9 +4,9 @@
import { threadInHomeChatList } from 'lib/shared/thread-utils.js';
-import type { NavigationRoute } from '../navigation/route-names.js';
import ChatThreadList from './chat-thread-list.react.js';
import type { ChatTopTabsNavigationProp } from './chat.react.js';
+import type { NavigationRoute } from '../navigation/route-names.js';
type HomeChatThreadListProps = {
navigation: ChatTopTabsNavigationProp<'HomeChatThreadList'>,
diff --git a/native/chat/inline-engagement.react.js b/native/chat/inline-engagement.react.js
--- a/native/chat/inline-engagement.react.js
+++ b/native/chat/inline-engagement.react.js
@@ -13,11 +13,6 @@
import { stringForReactionList } from 'lib/shared/reaction-utils.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import CommIcon from '../components/comm-icon.react.js';
-import GestureTouchableOpacity from '../components/gesture-touchable-opacity.react.js';
-import { MessageReactionsModalRouteName } from '../navigation/route-names.js';
-import { useStyles } from '../themes/colors.js';
-import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js';
import {
inlineEngagementStyle,
inlineEngagementCenterStyle,
@@ -25,6 +20,11 @@
composedMessageStyle,
} from './chat-constants.js';
import { useNavigateToThread } from './message-list-types.js';
+import CommIcon from '../components/comm-icon.react.js';
+import GestureTouchableOpacity from '../components/gesture-touchable-opacity.react.js';
+import { MessageReactionsModalRouteName } from '../navigation/route-names.js';
+import { useStyles } from '../themes/colors.js';
+import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js';
type Props = {
+threadInfo: ?ThreadInfo,
diff --git a/native/chat/inner-multimedia-message.react.js b/native/chat/inner-multimedia-message.react.js
--- a/native/chat/inner-multimedia-message.react.js
+++ b/native/chat/inner-multimedia-message.react.js
@@ -5,12 +5,6 @@
import type { Corners, Media, MediaInfo } from 'lib/types/media-types.js';
-import type { ChatMultimediaMessageInfoItem } from '../types/chat-types.js';
-import type {
- LayoutCoordinates,
- VerticalBounds,
-} from '../types/layout-types.js';
-import type { ViewStyle } from '../types/styles.js';
import MultimediaMessageMultimedia from './multimedia-message-multimedia.react.js';
import {
getMediaPerRow,
@@ -21,6 +15,12 @@
filterCorners,
getRoundedContainerStyle,
} from './rounded-corners.js';
+import type { ChatMultimediaMessageInfoItem } from '../types/chat-types.js';
+import type {
+ LayoutCoordinates,
+ VerticalBounds,
+} from '../types/layout-types.js';
+import type { ViewStyle } from '../types/styles.js';
const borderRadius = 16;
diff --git a/native/chat/inner-robotext-message.react.js b/native/chat/inner-robotext-message.react.js
--- a/native/chat/inner-robotext-message.react.js
+++ b/native/chat/inner-robotext-message.react.js
@@ -12,12 +12,12 @@
type EntityText,
} from 'lib/utils/entity-text.js';
+import { useNavigateToThread } from './message-list-types.js';
import Markdown from '../markdown/markdown.react.js';
import { inlineMarkdownRules } from '../markdown/rules.react.js';
import { useSelector } from '../redux/redux-utils.js';
import { useOverlayStyles } from '../themes/colors.js';
import type { ChatRobotextMessageInfoItemWithHeight } from '../types/chat-types.js';
-import { useNavigateToThread } from './message-list-types.js';
function dummyNodeForRobotextMessageHeightMeasurement(
robotext: EntityText,
diff --git a/native/chat/inner-text-message.react.js b/native/chat/inner-text-message.react.js
--- a/native/chat/inner-text-message.react.js
+++ b/native/chat/inner-text-message.react.js
@@ -6,11 +6,6 @@
import { colorIsDark } from 'lib/shared/thread-utils.js';
-import GestureTouchableOpacity from '../components/gesture-touchable-opacity.react.js';
-import Markdown from '../markdown/markdown.react.js';
-import { useSelector } from '../redux/redux-utils.js';
-import { useColors, colors } from '../themes/colors.js';
-import type { ChatTextMessageInfoItemWithHeight } from '../types/chat-types.js';
import { useComposedMessageMaxWidth } from './composed-message-width.js';
import { useTextMessageMarkdownRules } from './message-list-types.js';
import {
@@ -22,6 +17,11 @@
TextMessageMarkdownContext,
useTextMessageMarkdown,
} from './text-message-markdown-context.js';
+import GestureTouchableOpacity from '../components/gesture-touchable-opacity.react.js';
+import Markdown from '../markdown/markdown.react.js';
+import { useSelector } from '../redux/redux-utils.js';
+import { useColors, colors } from '../themes/colors.js';
+import type { ChatTextMessageInfoItemWithHeight } from '../types/chat-types.js';
/* eslint-disable import/no-named-as-default-member */
const { Node } = Animated;
diff --git a/native/chat/message-header.react.js b/native/chat/message-header.react.js
--- a/native/chat/message-header.react.js
+++ b/native/chat/message-header.react.js
@@ -5,12 +5,12 @@
import { useStringForUser } from 'lib/hooks/ens-cache.js';
-import { SingleLine } from '../components/single-line.react.js';
-import { useStyles } from '../themes/colors.js';
-import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js';
import { clusterEndHeight } from './chat-constants.js';
import type { DisplayType } from './timestamp.react.js';
import { Timestamp, timestampHeight } from './timestamp.react.js';
+import { SingleLine } from '../components/single-line.react.js';
+import { useStyles } from '../themes/colors.js';
+import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js';
type Props = {
+item: ChatMessageInfoItemWithHeight,
diff --git a/native/chat/message-list-container.react.js b/native/chat/message-list-container.react.js
--- a/native/chat/message-list-container.react.js
+++ b/native/chat/message-list-container.react.js
@@ -23,6 +23,13 @@
import type { ThreadInfo } from 'lib/types/thread-types.js';
import type { AccountUserInfo, UserListItem } from 'lib/types/user-types.js';
+import { type MessagesMeasurer, useHeightMeasurer } from './chat-context.js';
+import { ChatInputBar } from './chat-input-bar.react.js';
+import type { ChatNavigationProp } from './chat.react.js';
+import MessageListThreadSearch from './message-list-thread-search.react.js';
+import { MessageListContextProvider } from './message-list-types.js';
+import MessageList from './message-list.react.js';
+import ParentThreadHeader from './parent-thread-header.react.js';
import ContentLoading from '../components/content-loading.react.js';
import { InputStateContext } from '../input/input-state.js';
import {
@@ -34,13 +41,6 @@
import { useSelector } from '../redux/redux-utils.js';
import { type Colors, useColors, useStyles } from '../themes/colors.js';
import type { ChatMessageItemWithHeight } from '../types/chat-types.js';
-import { type MessagesMeasurer, useHeightMeasurer } from './chat-context.js';
-import { ChatInputBar } from './chat-input-bar.react.js';
-import type { ChatNavigationProp } from './chat.react.js';
-import MessageListThreadSearch from './message-list-thread-search.react.js';
-import { MessageListContextProvider } from './message-list-types.js';
-import MessageList from './message-list.react.js';
-import ParentThreadHeader from './parent-thread-header.react.js';
type BaseProps = {
+navigation: ChatNavigationProp<'MessageList'>,
diff --git a/native/chat/message-list-header-title.react.js b/native/chat/message-list-header-title.react.js
--- a/native/chat/message-list-header-title.react.js
+++ b/native/chat/message-list-header-title.react.js
@@ -12,10 +12,10 @@
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import { firstLine } from 'lib/utils/string-utils.js';
+import type { ChatNavigationProp } from './chat.react.js';
import Button from '../components/button.react.js';
import { ThreadSettingsRouteName } from '../navigation/route-names.js';
import { useStyles } from '../themes/colors.js';
-import type { ChatNavigationProp } from './chat.react.js';
type BaseProps = {
+threadInfo: ThreadInfo,
diff --git a/native/chat/message-list.react.js b/native/chat/message-list.react.js
--- a/native/chat/message-list.react.js
+++ b/native/chat/message-list.react.js
@@ -23,6 +23,10 @@
useDispatchActionPromise,
} from 'lib/utils/action-utils.js';
+import ChatList from './chat-list.react.js';
+import type { ChatNavigationProp } from './chat.react.js';
+import { Message } from './message.react.js';
+import RelationshipPrompt from './relationship-prompt.react.js';
import ListLoadingIndicator from '../components/list-loading-indicator.react.js';
import {
type KeyboardState,
@@ -46,10 +50,6 @@
} from '../types/chat-types.js';
import type { VerticalBounds } from '../types/layout-types.js';
import type { ViewableItemsChange } from '../types/react-native.js';
-import ChatList from './chat-list.react.js';
-import type { ChatNavigationProp } from './chat.react.js';
-import { Message } from './message.react.js';
-import RelationshipPrompt from './relationship-prompt.react.js';
type BaseProps = {
+threadInfo: ThreadInfo,
diff --git a/native/chat/message.react.js b/native/chat/message.react.js
--- a/native/chat/message.react.js
+++ b/native/chat/message.react.js
@@ -11,6 +11,11 @@
import { messageKey } from 'lib/shared/message-utils.js';
+import type { ChatNavigationProp } from './chat.react.js';
+import MultimediaMessage from './multimedia-message.react.js';
+import { RobotextMessage } from './robotext-message.react.js';
+import { TextMessage } from './text-message.react.js';
+import { messageItemHeight } from './utils.js';
import {
type KeyboardState,
KeyboardContext,
@@ -19,11 +24,6 @@
import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js';
import { type VerticalBounds } from '../types/layout-types.js';
import type { LayoutEvent } from '../types/react-native.js';
-import type { ChatNavigationProp } from './chat.react.js';
-import MultimediaMessage from './multimedia-message.react.js';
-import { RobotextMessage } from './robotext-message.react.js';
-import { TextMessage } from './text-message.react.js';
-import { messageItemHeight } from './utils.js';
type BaseProps = {
+item: ChatMessageInfoItemWithHeight,
diff --git a/native/chat/multimedia-message-multimedia.react.js b/native/chat/multimedia-message-multimedia.react.js
--- a/native/chat/multimedia-message-multimedia.react.js
+++ b/native/chat/multimedia-message-multimedia.react.js
@@ -8,6 +8,8 @@
import { type MediaInfo } from 'lib/types/media-types.js';
+import InlineMultimedia from './inline-multimedia.react.js';
+import { getMediaKey } from './multimedia-message-utils.js';
import { type PendingMultimediaUpload } from '../input/input-state.js';
import {
type KeyboardState,
@@ -20,15 +22,15 @@
import { ImageModalRouteName } from '../navigation/route-names.js';
import { type Colors, useColors } from '../themes/colors.js';
import type { ChatMultimediaMessageInfoItem } from '../types/chat-types.js';
-import { type VerticalBounds } from '../types/layout-types.js';
-import type { LayoutCoordinates } from '../types/layout-types.js';
+import type {
+ VerticalBounds,
+ LayoutCoordinates,
+} from '../types/layout-types.js';
import {
type ViewStyle,
type AnimatedStyleObj,
AnimatedView,
} from '../types/styles.js';
-import InlineMultimedia from './inline-multimedia.react.js';
-import { getMediaKey } from './multimedia-message-utils.js';
/* eslint-disable import/no-named-as-default-member */
const { Node, sub, interpolateNode, Extrapolate } = Animated;
diff --git a/native/chat/multimedia-message-tooltip-button.react.js b/native/chat/multimedia-message-tooltip-button.react.js
--- a/native/chat/multimedia-message-tooltip-button.react.js
+++ b/native/chat/multimedia-message-tooltip-button.react.js
@@ -7,10 +7,6 @@
import { localIDPrefix } from 'lib/shared/message-utils.js';
import { useCanCreateReactionFromMessage } from 'lib/shared/reaction-utils.js';
-import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
-import { useSelector } from '../redux/redux-utils.js';
-import { useTooltipActions } from '../tooltip/tooltip-hooks.js';
-import type { TooltipRoute } from '../tooltip/tooltip.react.js';
import { TooltipInlineEngagement } from './inline-engagement.react.js';
import { InnerMultimediaMessage } from './inner-multimedia-message.react.js';
import { MessageHeader } from './message-header.react.js';
@@ -21,6 +17,10 @@
import ReactionSelectionPopover from './reaction-selection-popover.react.js';
import SidebarInputBarHeightMeasurer from './sidebar-input-bar-height-measurer.react.js';
import { useAnimatedMessageTooltipButton } from './utils.js';
+import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
+import { useSelector } from '../redux/redux-utils.js';
+import { useTooltipActions } from '../tooltip/tooltip-hooks.js';
+import type { TooltipRoute } from '../tooltip/tooltip.react.js';
/* eslint-disable import/no-named-as-default-member */
const { Node, Extrapolate, interpolateNode } = Animated;
diff --git a/native/chat/multimedia-message-tooltip-modal.react.js b/native/chat/multimedia-message-tooltip-modal.react.js
--- a/native/chat/multimedia-message-tooltip-modal.react.js
+++ b/native/chat/multimedia-message-tooltip-modal.react.js
@@ -2,6 +2,9 @@
import * as React from 'react';
+import { useOnPressReport } from './message-report-utils.js';
+import MultimediaMessageTooltipButton from './multimedia-message-tooltip-button.react.js';
+import { useAnimatedNavigateToSidebar } from './sidebar-navigation.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
import {
createTooltip,
@@ -11,9 +14,6 @@
} from '../tooltip/tooltip.react.js';
import type { ChatMultimediaMessageInfoItem } from '../types/chat-types.js';
import type { VerticalBounds } from '../types/layout-types.js';
-import { useOnPressReport } from './message-report-utils.js';
-import MultimediaMessageTooltipButton from './multimedia-message-tooltip-button.react.js';
-import { useAnimatedNavigateToSidebar } from './sidebar-navigation.js';
export type MultimediaMessageTooltipModalParams = TooltipParams<{
+item: ChatMultimediaMessageInfoItem,
diff --git a/native/chat/multimedia-message-utils.js b/native/chat/multimedia-message-utils.js
--- a/native/chat/multimedia-message-utils.js
+++ b/native/chat/multimedia-message-utils.js
@@ -6,13 +6,13 @@
import type { MediaInfo } from 'lib/types/media-types.js';
import type { MultimediaMessageInfo } from 'lib/types/message-types.js';
+import { inlineEngagementStyle, clusterEndHeight } from './chat-constants.js';
+import { failedSendHeight } from './failed-send.react.js';
+import { authorNameHeight } from './message-header.react.js';
import type {
ChatMultimediaMessageInfoItem,
MultimediaContentSizes,
} from '../types/chat-types.js';
-import { inlineEngagementStyle, clusterEndHeight } from './chat-constants.js';
-import { failedSendHeight } from './failed-send.react.js';
-import { authorNameHeight } from './message-header.react.js';
const spaceBetweenImages = 4;
diff --git a/native/chat/multimedia-message.react.js b/native/chat/multimedia-message.react.js
--- a/native/chat/multimedia-message.react.js
+++ b/native/chat/multimedia-message.react.js
@@ -13,6 +13,13 @@
import { useCanCreateSidebarFromMessage } from 'lib/shared/thread-utils.js';
import type { MediaInfo } from 'lib/types/media-types.js';
+import ComposedMessage from './composed-message.react.js';
+import { InnerMultimediaMessage } from './inner-multimedia-message.react.js';
+import {
+ getMediaKey,
+ multimediaMessageSendFailed,
+} from './multimedia-message-utils.js';
+import { getMessageTooltipKey } from './utils.js';
import { ChatContext, type ChatContextType } from '../chat/chat-context.js';
import { OverlayContext } from '../navigation/overlay-context.js';
import type { OverlayContextType } from '../navigation/overlay-context.js';
@@ -23,15 +30,10 @@
} from '../navigation/route-names.js';
import { fixedTooltipHeight } from '../tooltip/tooltip.react.js';
import type { ChatMultimediaMessageInfoItem } from '../types/chat-types.js';
-import { type VerticalBounds } from '../types/layout-types.js';
-import type { LayoutCoordinates } from '../types/layout-types.js';
-import ComposedMessage from './composed-message.react.js';
-import { InnerMultimediaMessage } from './inner-multimedia-message.react.js';
-import {
- getMediaKey,
- multimediaMessageSendFailed,
-} from './multimedia-message-utils.js';
-import { getMessageTooltipKey } from './utils.js';
+import type {
+ VerticalBounds,
+ LayoutCoordinates,
+} from '../types/layout-types.js';
type BaseProps = {
...React.ElementConfig<typeof View>,
diff --git a/native/chat/parent-thread-header.react.js b/native/chat/parent-thread-header.react.js
--- a/native/chat/parent-thread-header.react.js
+++ b/native/chat/parent-thread-header.react.js
@@ -6,11 +6,11 @@
import type { ThreadInfo, ThreadType } from 'lib/types/thread-types.js';
+import { useNavigateToThread } from './message-list-types.js';
import Button from '../components/button.react.js';
import CommunityPill from '../components/community-pill.react.js';
import ThreadVisibility from '../components/thread-visibility.react.js';
import { useColors, useStyles } from '../themes/colors.js';
-import { useNavigateToThread } from './message-list-types.js';
type Props = {
+parentThreadInfo: ThreadInfo,
diff --git a/native/chat/robotext-message-tooltip-button.react.js b/native/chat/robotext-message-tooltip-button.react.js
--- a/native/chat/robotext-message-tooltip-button.react.js
+++ b/native/chat/robotext-message-tooltip-button.react.js
@@ -7,10 +7,6 @@
import { localIDPrefix } from 'lib/shared/message-utils.js';
import { useCanCreateReactionFromMessage } from 'lib/shared/reaction-utils.js';
-import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
-import { useSelector } from '../redux/redux-utils.js';
-import { useTooltipActions } from '../tooltip/tooltip-hooks.js';
-import type { TooltipRoute } from '../tooltip/tooltip.react.js';
import { TooltipInlineEngagement } from './inline-engagement.react.js';
import { InnerRobotextMessage } from './inner-robotext-message.react.js';
import {
@@ -21,6 +17,10 @@
import SidebarInputBarHeightMeasurer from './sidebar-input-bar-height-measurer.react.js';
import { Timestamp } from './timestamp.react.js';
import { useAnimatedMessageTooltipButton } from './utils.js';
+import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
+import { useSelector } from '../redux/redux-utils.js';
+import { useTooltipActions } from '../tooltip/tooltip-hooks.js';
+import type { TooltipRoute } from '../tooltip/tooltip.react.js';
/* eslint-disable import/no-named-as-default-member */
const { Node, interpolateNode, Extrapolate } = Animated;
diff --git a/native/chat/robotext-message-tooltip-modal.react.js b/native/chat/robotext-message-tooltip-modal.react.js
--- a/native/chat/robotext-message-tooltip-modal.react.js
+++ b/native/chat/robotext-message-tooltip-modal.react.js
@@ -2,6 +2,8 @@
import * as React from 'react';
+import RobotextMessageTooltipButton from './robotext-message-tooltip-button.react.js';
+import { useAnimatedNavigateToSidebar } from './sidebar-navigation.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
import {
createTooltip,
@@ -10,8 +12,6 @@
type TooltipMenuProps,
} from '../tooltip/tooltip.react.js';
import type { ChatRobotextMessageInfoItemWithHeight } from '../types/chat-types.js';
-import RobotextMessageTooltipButton from './robotext-message-tooltip-button.react.js';
-import { useAnimatedNavigateToSidebar } from './sidebar-navigation.js';
export type RobotextMessageTooltipModalParams = TooltipParams<{
+item: ChatRobotextMessageInfoItemWithHeight,
diff --git a/native/chat/robotext-message.react.js b/native/chat/robotext-message.react.js
--- a/native/chat/robotext-message.react.js
+++ b/native/chat/robotext-message.react.js
@@ -7,6 +7,12 @@
import { messageKey } from 'lib/shared/message-utils.js';
import { useCanCreateSidebarFromMessage } from 'lib/shared/thread-utils.js';
+import { inlineEngagementCenterStyle } from './chat-constants.js';
+import type { ChatNavigationProp } from './chat.react.js';
+import { InlineEngagement } from './inline-engagement.react.js';
+import { InnerRobotextMessage } from './inner-robotext-message.react.js';
+import { Timestamp } from './timestamp.react.js';
+import { getMessageTooltipKey, useContentAndHeaderOpacity } from './utils.js';
import { ChatContext } from '../chat/chat-context.js';
import { KeyboardContext } from '../keyboard/keyboard-state.js';
import { OverlayContext } from '../navigation/overlay-context.js';
@@ -17,12 +23,6 @@
import type { ChatRobotextMessageInfoItemWithHeight } from '../types/chat-types.js';
import type { VerticalBounds } from '../types/layout-types.js';
import { AnimatedView } from '../types/styles.js';
-import { inlineEngagementCenterStyle } from './chat-constants.js';
-import type { ChatNavigationProp } from './chat.react.js';
-import { InlineEngagement } from './inline-engagement.react.js';
-import { InnerRobotextMessage } from './inner-robotext-message.react.js';
-import { Timestamp } from './timestamp.react.js';
-import { getMessageTooltipKey, useContentAndHeaderOpacity } from './utils.js';
type Props = {
...React.ElementConfig<typeof View>,
diff --git a/native/chat/settings/thread-settings-color.react.js b/native/chat/settings/thread-settings-color.react.js
--- a/native/chat/settings/thread-settings-color.react.js
+++ b/native/chat/settings/thread-settings-color.react.js
@@ -8,12 +8,12 @@
import type { LoadingStatus } from 'lib/types/loading-types.js';
import { type ThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadSettingsNavigate } from './thread-settings.react.js';
import ColorSplotch from '../../components/color-splotch.react.js';
import EditSettingButton from '../../components/edit-setting-button.react.js';
import { ColorSelectorModalRouteName } from '../../navigation/route-names.js';
import { useSelector } from '../../redux/redux-utils.js';
import { type Colors, useColors, useStyles } from '../../themes/colors.js';
-import type { ThreadSettingsNavigate } from './thread-settings.react.js';
type BaseProps = {
+threadInfo: ThreadInfo,
diff --git a/native/chat/settings/thread-settings-delete-thread.react.js b/native/chat/settings/thread-settings-delete-thread.react.js
--- a/native/chat/settings/thread-settings-delete-thread.react.js
+++ b/native/chat/settings/thread-settings-delete-thread.react.js
@@ -5,11 +5,11 @@
import type { ResolvedThreadInfo } from 'lib/types/thread-types.js';
+import type { ThreadSettingsNavigate } from './thread-settings.react.js';
import Button from '../../components/button.react.js';
import { DeleteThreadRouteName } from '../../navigation/route-names.js';
import { useColors, useStyles } from '../../themes/colors.js';
import type { ViewStyle } from '../../types/styles.js';
-import type { ThreadSettingsNavigate } from './thread-settings.react.js';
type Props = {
+threadInfo: ResolvedThreadInfo,
diff --git a/native/chat/settings/thread-settings-description.react.js b/native/chat/settings/thread-settings-description.react.js
--- a/native/chat/settings/thread-settings-description.react.js
+++ b/native/chat/settings/thread-settings-description.react.js
@@ -29,6 +29,11 @@
useDispatchActionPromise,
} from 'lib/utils/action-utils.js';
+import SaveSettingButton from './save-setting-button.react.js';
+import {
+ ThreadSettingsCategoryHeader,
+ ThreadSettingsCategoryFooter,
+} from './thread-settings-category.react.js';
import Button from '../../components/button.react.js';
import EditSettingButton from '../../components/edit-setting-button.react.js';
import SWMansionIcon from '../../components/swmansion-icon.react.js';
@@ -39,11 +44,6 @@
LayoutEvent,
ContentSizeChangeEvent,
} from '../../types/react-native.js';
-import SaveSettingButton from './save-setting-button.react.js';
-import {
- ThreadSettingsCategoryHeader,
- ThreadSettingsCategoryFooter,
-} from './thread-settings-category.react.js';
type BaseProps = {
+threadInfo: ThreadInfo,
diff --git a/native/chat/settings/thread-settings-member-tooltip-modal.react.js b/native/chat/settings/thread-settings-member-tooltip-modal.react.js
--- a/native/chat/settings/thread-settings-member-tooltip-modal.react.js
+++ b/native/chat/settings/thread-settings-member-tooltip-modal.react.js
@@ -19,6 +19,7 @@
useServerCall,
} from 'lib/utils/action-utils.js';
+import ThreadSettingsMemberTooltipButton from './thread-settings-member-tooltip-button.react.js';
import {
createTooltip,
type TooltipParams,
@@ -26,7 +27,6 @@
type BaseTooltipProps,
type TooltipMenuProps,
} from '../../tooltip/tooltip.react.js';
-import ThreadSettingsMemberTooltipButton from './thread-settings-member-tooltip-button.react.js';
export type ThreadSettingsMemberTooltipModalParams = TooltipParams<{
+memberInfo: RelativeMemberInfo,
diff --git a/native/chat/settings/thread-settings-member.react.js b/native/chat/settings/thread-settings-member.react.js
--- a/native/chat/settings/thread-settings-member.react.js
+++ b/native/chat/settings/thread-settings-member.react.js
@@ -28,6 +28,7 @@
type RelativeMemberInfo,
} from 'lib/types/thread-types.js';
+import type { ThreadSettingsNavigate } from './thread-settings.react.js';
import PencilIcon from '../../components/pencil-icon.react.js';
import { SingleLine } from '../../components/single-line.react.js';
import {
@@ -42,7 +43,6 @@
import { useSelector } from '../../redux/redux-utils.js';
import { type Colors, useColors, useStyles } from '../../themes/colors.js';
import type { VerticalBounds } from '../../types/layout-types.js';
-import type { ThreadSettingsNavigate } from './thread-settings.react.js';
type BaseProps = {
+memberInfo: RelativeMemberInfo,
diff --git a/native/chat/settings/thread-settings-name.react.js b/native/chat/settings/thread-settings-name.react.js
--- a/native/chat/settings/thread-settings-name.react.js
+++ b/native/chat/settings/thread-settings-name.react.js
@@ -28,12 +28,12 @@
} from 'lib/utils/action-utils.js';
import { firstLine } from 'lib/utils/string-utils.js';
+import SaveSettingButton from './save-setting-button.react.js';
import EditSettingButton from '../../components/edit-setting-button.react.js';
import { SingleLine } from '../../components/single-line.react.js';
import TextInput from '../../components/text-input.react.js';
import { useSelector } from '../../redux/redux-utils.js';
import { type Colors, useStyles, useColors } from '../../themes/colors.js';
-import SaveSettingButton from './save-setting-button.react.js';
type BaseProps = {
+threadInfo: ResolvedThreadInfo,
diff --git a/native/chat/settings/thread-settings.react.js b/native/chat/settings/thread-settings.react.js
--- a/native/chat/settings/thread-settings.react.js
+++ b/native/chat/settings/thread-settings.react.js
@@ -43,6 +43,29 @@
useResolvedOptionalThreadInfos,
} from 'lib/utils/entity-helpers.js';
+import type { CategoryType } from './thread-settings-category.react.js';
+import {
+ ThreadSettingsCategoryHeader,
+ ThreadSettingsCategoryFooter,
+} from './thread-settings-category.react.js';
+import ThreadSettingsChildThread from './thread-settings-child-thread.react.js';
+import ThreadSettingsColor from './thread-settings-color.react.js';
+import ThreadSettingsDeleteThread from './thread-settings-delete-thread.react.js';
+import ThreadSettingsDescription from './thread-settings-description.react.js';
+import ThreadSettingsEditRelationship from './thread-settings-edit-relationship.react.js';
+import ThreadSettingsHomeNotifs from './thread-settings-home-notifs.react.js';
+import ThreadSettingsLeaveThread from './thread-settings-leave-thread.react.js';
+import {
+ ThreadSettingsSeeMore,
+ ThreadSettingsAddMember,
+ ThreadSettingsAddSubchannel,
+} from './thread-settings-list-action.react.js';
+import ThreadSettingsMember from './thread-settings-member.react.js';
+import ThreadSettingsName from './thread-settings-name.react.js';
+import ThreadSettingsParent from './thread-settings-parent.react.js';
+import ThreadSettingsPromoteSidebar from './thread-settings-promote-sidebar.react.js';
+import ThreadSettingsPushNotifs from './thread-settings-push-notifs.react.js';
+import ThreadSettingsVisibility from './thread-settings-visibility.react.js';
import ThreadAncestors from '../../components/thread-ancestors.react.js';
import {
type KeyboardState,
@@ -53,11 +76,11 @@
OverlayContext,
type OverlayContextType,
} from '../../navigation/overlay-context.js';
-import type { NavigationRoute } from '../../navigation/route-names.js';
import {
AddUsersModalRouteName,
ComposeSubchannelModalRouteName,
} from '../../navigation/route-names.js';
+import type { NavigationRoute } from '../../navigation/route-names.js';
import type { TabNavigationProp } from '../../navigation/tab-navigator.react.js';
import { useSelector } from '../../redux/redux-utils.js';
import type { AppState } from '../../redux/state-types.js';
@@ -69,29 +92,6 @@
import type { VerticalBounds } from '../../types/layout-types.js';
import type { ViewStyle } from '../../types/styles.js';
import type { ChatNavigationProp } from '../chat.react.js';
-import type { CategoryType } from './thread-settings-category.react.js';
-import {
- ThreadSettingsCategoryHeader,
- ThreadSettingsCategoryFooter,
-} from './thread-settings-category.react.js';
-import ThreadSettingsChildThread from './thread-settings-child-thread.react.js';
-import ThreadSettingsColor from './thread-settings-color.react.js';
-import ThreadSettingsDeleteThread from './thread-settings-delete-thread.react.js';
-import ThreadSettingsDescription from './thread-settings-description.react.js';
-import ThreadSettingsEditRelationship from './thread-settings-edit-relationship.react.js';
-import ThreadSettingsHomeNotifs from './thread-settings-home-notifs.react.js';
-import ThreadSettingsLeaveThread from './thread-settings-leave-thread.react.js';
-import {
- ThreadSettingsSeeMore,
- ThreadSettingsAddMember,
- ThreadSettingsAddSubchannel,
-} from './thread-settings-list-action.react.js';
-import ThreadSettingsMember from './thread-settings-member.react.js';
-import ThreadSettingsName from './thread-settings-name.react.js';
-import ThreadSettingsParent from './thread-settings-parent.react.js';
-import ThreadSettingsPromoteSidebar from './thread-settings-promote-sidebar.react.js';
-import ThreadSettingsPushNotifs from './thread-settings-push-notifs.react.js';
-import ThreadSettingsVisibility from './thread-settings-visibility.react.js';
const itemPageLength = 5;
diff --git a/native/chat/sidebar-input-bar-height-measurer.react.js b/native/chat/sidebar-input-bar-height-measurer.react.js
--- a/native/chat/sidebar-input-bar-height-measurer.react.js
+++ b/native/chat/sidebar-input-bar-height-measurer.react.js
@@ -3,11 +3,11 @@
import * as React from 'react';
import { View, StyleSheet } from 'react-native';
-import { useSelector } from '../redux/redux-utils.js';
-import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js';
import { DummyChatInputBar } from './chat-input-bar.react.js';
import { useMessageListScreenWidth } from './composed-message-width.js';
import { getUnresolvedSidebarThreadInfo } from './sidebar-navigation.js';
+import { useSelector } from '../redux/redux-utils.js';
+import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js';
type Props = {
+sourceMessage: ChatMessageInfoItemWithHeight,
diff --git a/native/chat/sidebar-list-modal.react.js b/native/chat/sidebar-list-modal.react.js
--- a/native/chat/sidebar-list-modal.react.js
+++ b/native/chat/sidebar-list-modal.react.js
@@ -6,14 +6,14 @@
import { useSearchSidebars } from 'lib/hooks/search-threads.js';
import type { ThreadInfo, SidebarInfo } from 'lib/types/thread-types.js';
+import { SidebarItem } from './sidebar-item.react.js';
+import ThreadListModal from './thread-list-modal.react.js';
import ExtendedArrow from '../components/arrow-extended.react.js';
import Arrow from '../components/arrow.react.js';
import Button from '../components/button.react.js';
import type { RootNavigationProp } from '../navigation/root-navigator.react.js';
import type { NavigationRoute } from '../navigation/route-names.js';
import { useColors, useStyles } from '../themes/colors.js';
-import { SidebarItem } from './sidebar-item.react.js';
-import ThreadListModal from './thread-list-modal.react.js';
export type SidebarListModalParams = {
+threadInfo: ThreadInfo,
diff --git a/native/chat/sidebar-navigation.js b/native/chat/sidebar-navigation.js
--- a/native/chat/sidebar-navigation.js
+++ b/native/chat/sidebar-navigation.js
@@ -11,11 +11,11 @@
import type { ThreadInfo } from 'lib/types/thread-types.js';
import type { GetENSNames } from 'lib/utils/ens-helpers.js';
+import { ChatContext } from './chat-context.js';
+import { useNavigateToThread } from './message-list-types.js';
import { getDefaultTextMessageRules } from '../markdown/rules.react.js';
import { useSelector } from '../redux/redux-utils.js';
import type { ChatMessageInfoItemWithHeight } from '../types/chat-types.js';
-import { ChatContext } from './chat-context.js';
-import { useNavigateToThread } from './message-list-types.js';
type GetUnresolvedSidebarThreadInfoInput = {
+sourceMessage: ChatMessageInfoItemWithHeight,
diff --git a/native/chat/subchannel-item.react.js b/native/chat/subchannel-item.react.js
--- a/native/chat/subchannel-item.react.js
+++ b/native/chat/subchannel-item.react.js
@@ -7,10 +7,10 @@
import { shortAbsoluteDate } from 'lib/utils/date-utils.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
+import MessagePreview from './message-preview.react.js';
import { SingleLine } from '../components/single-line.react.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
import { useStyles } from '../themes/colors.js';
-import MessagePreview from './message-preview.react.js';
type Props = {
+subchannelInfo: ChatThreadItem,
diff --git a/native/chat/subchannels-list-modal.react.js b/native/chat/subchannels-list-modal.react.js
--- a/native/chat/subchannels-list-modal.react.js
+++ b/native/chat/subchannels-list-modal.react.js
@@ -7,12 +7,12 @@
import type { ChatThreadItem } from 'lib/selectors/chat-selectors.js';
import { type ThreadInfo } from 'lib/types/thread-types.js';
+import SubchannelItem from './subchannel-item.react.js';
+import ThreadListModal from './thread-list-modal.react.js';
import Button from '../components/button.react.js';
import type { RootNavigationProp } from '../navigation/root-navigator.react.js';
import type { NavigationRoute } from '../navigation/route-names.js';
import { useColors, useStyles } from '../themes/colors.js';
-import SubchannelItem from './subchannel-item.react.js';
-import ThreadListModal from './thread-list-modal.react.js';
export type SubchannelListModalParams = {
+threadInfo: ThreadInfo,
diff --git a/native/chat/swipeable-message.react.js b/native/chat/swipeable-message.react.js
--- a/native/chat/swipeable-message.react.js
+++ b/native/chat/swipeable-message.react.js
@@ -18,10 +18,10 @@
} from 'react-native-reanimated';
import tinycolor from 'tinycolor2';
+import { useMessageListScreenWidth } from './composed-message-width.js';
import CommIcon from '../components/comm-icon.react.js';
import { colors } from '../themes/colors.js';
import type { ViewStyle } from '../types/styles.js';
-import { useMessageListScreenWidth } from './composed-message-width.js';
const primaryThreshold = 40;
const secondaryThreshold = 120;
diff --git a/native/chat/text-message-tooltip-button.react.js b/native/chat/text-message-tooltip-button.react.js
--- a/native/chat/text-message-tooltip-button.react.js
+++ b/native/chat/text-message-tooltip-button.react.js
@@ -7,10 +7,6 @@
import { localIDPrefix } from 'lib/shared/message-utils.js';
import { useCanCreateReactionFromMessage } from 'lib/shared/reaction-utils.js';
-import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
-import { useSelector } from '../redux/redux-utils.js';
-import { useTooltipActions } from '../tooltip/tooltip-hooks.js';
-import type { TooltipRoute } from '../tooltip/tooltip.react.js';
import { TooltipInlineEngagement } from './inline-engagement.react.js';
import { InnerTextMessage } from './inner-text-message.react.js';
import { MessageHeader } from './message-header.react.js';
@@ -23,6 +19,10 @@
import ReactionSelectionPopover from './reaction-selection-popover.react.js';
import SidebarInputBarHeightMeasurer from './sidebar-input-bar-height-measurer.react.js';
import { useAnimatedMessageTooltipButton } from './utils.js';
+import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
+import { useSelector } from '../redux/redux-utils.js';
+import { useTooltipActions } from '../tooltip/tooltip-hooks.js';
+import type { TooltipRoute } from '../tooltip/tooltip.react.js';
/* eslint-disable import/no-named-as-default-member */
const { Node, interpolateNode, Extrapolate } = Animated;
diff --git a/native/chat/text-message-tooltip-modal.react.js b/native/chat/text-message-tooltip-modal.react.js
--- a/native/chat/text-message-tooltip-modal.react.js
+++ b/native/chat/text-message-tooltip-modal.react.js
@@ -6,6 +6,9 @@
import { createMessageReply } from 'lib/shared/message-utils.js';
+import { useOnPressReport } from './message-report-utils.js';
+import { useAnimatedNavigateToSidebar } from './sidebar-navigation.js';
+import TextMessageTooltipButton from './text-message-tooltip-button.react.js';
import CommIcon from '../components/comm-icon.react.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
import { InputStateContext } from '../input/input-state.js';
@@ -17,9 +20,6 @@
type TooltipMenuProps,
} from '../tooltip/tooltip.react.js';
import type { ChatTextMessageInfoItemWithHeight } from '../types/chat-types.js';
-import { useOnPressReport } from './message-report-utils.js';
-import { useAnimatedNavigateToSidebar } from './sidebar-navigation.js';
-import TextMessageTooltipButton from './text-message-tooltip-button.react.js';
export type TextMessageTooltipModalParams = TooltipParams<{
+item: ChatTextMessageInfoItemWithHeight,
diff --git a/native/chat/text-message.react.js b/native/chat/text-message.react.js
--- a/native/chat/text-message.react.js
+++ b/native/chat/text-message.react.js
@@ -11,6 +11,15 @@
} from 'lib/shared/thread-utils.js';
import { threadPermissions } from 'lib/types/thread-types.js';
+import type { ChatNavigationProp } from './chat.react.js';
+import ComposedMessage from './composed-message.react.js';
+import { InnerTextMessage } from './inner-text-message.react.js';
+import {
+ MessagePressResponderContext,
+ type MessagePressResponderContextType,
+} from './message-press-responder-context.js';
+import textMessageSendFailed from './text-message-send-failed.js';
+import { getMessageTooltipKey } from './utils.js';
import { ChatContext, type ChatContextType } from '../chat/chat-context.js';
import { MarkdownContext } from '../markdown/markdown-context.js';
import {
@@ -22,15 +31,6 @@
import { fixedTooltipHeight } from '../tooltip/tooltip.react.js';
import type { ChatTextMessageInfoItemWithHeight } from '../types/chat-types.js';
import type { VerticalBounds } from '../types/layout-types.js';
-import type { ChatNavigationProp } from './chat.react.js';
-import ComposedMessage from './composed-message.react.js';
-import { InnerTextMessage } from './inner-text-message.react.js';
-import {
- MessagePressResponderContext,
- type MessagePressResponderContextType,
-} from './message-press-responder-context.js';
-import textMessageSendFailed from './text-message-send-failed.js';
-import { getMessageTooltipKey } from './utils.js';
type BaseProps = {
...React.ElementConfig<typeof View>,
diff --git a/native/chat/thread-list-modal.react.js b/native/chat/thread-list-modal.react.js
--- a/native/chat/thread-list-modal.react.js
+++ b/native/chat/thread-list-modal.react.js
@@ -15,13 +15,13 @@
import type { SetState } from 'lib/types/hook-types.js';
import type { ThreadInfo, SidebarInfo } from 'lib/types/thread-types.js';
+import { useNavigateToThread } from './message-list-types.js';
import Modal from '../components/modal.react.js';
import Search from '../components/search.react.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
import ThreadPill from '../components/thread-pill.react.js';
import { useIndicatorStyle, useStyles } from '../themes/colors.js';
import { waitForModalInputFocus } from '../utils/timers.js';
-import { useNavigateToThread } from './message-list-types.js';
function keyExtractor(sidebarInfo: SidebarInfo | ChatThreadItem) {
return sidebarInfo.threadInfo.id;
diff --git a/native/chat/thread-settings-button.react.js b/native/chat/thread-settings-button.react.js
--- a/native/chat/thread-settings-button.react.js
+++ b/native/chat/thread-settings-button.react.js
@@ -5,10 +5,10 @@
import { type ThreadInfo } from 'lib/types/thread-types.js';
+import type { ChatNavigationProp } from './chat.react.js';
import Button from '../components/button.react.js';
import { ThreadSettingsRouteName } from '../navigation/route-names.js';
import { useStyles } from '../themes/colors.js';
-import type { ChatNavigationProp } from './chat.react.js';
type BaseProps = {
+threadInfo: ThreadInfo,
diff --git a/native/chat/utils.js b/native/chat/utils.js
--- a/native/chat/utils.js
+++ b/native/chat/utils.js
@@ -10,6 +10,14 @@
import { colorIsDark, viewerIsMember } from 'lib/shared/thread-utils.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
+import { clusterEndHeight, inlineEngagementStyle } from './chat-constants.js';
+import { ChatContext, useHeightMeasurer } from './chat-context.js';
+import { failedSendHeight } from './failed-send.react.js';
+import { authorNameHeight } from './message-header.react.js';
+import { multimediaMessageItemHeight } from './multimedia-message-utils.js';
+import { getUnresolvedSidebarThreadInfo } from './sidebar-navigation.js';
+import textMessageSendFailed from './text-message-send-failed.js';
+import { timestampHeight } from './timestamp.react.js';
import { KeyboardContext } from '../keyboard/keyboard-state.js';
import { OverlayContext } from '../navigation/overlay-context.js';
import {
@@ -29,14 +37,6 @@
VerticalBounds,
} from '../types/layout-types.js';
import type { AnimatedViewStyle } from '../types/styles.js';
-import { clusterEndHeight, inlineEngagementStyle } from './chat-constants.js';
-import { ChatContext, useHeightMeasurer } from './chat-context.js';
-import { failedSendHeight } from './failed-send.react.js';
-import { authorNameHeight } from './message-header.react.js';
-import { multimediaMessageItemHeight } from './multimedia-message-utils.js';
-import { getUnresolvedSidebarThreadInfo } from './sidebar-navigation.js';
-import textMessageSendFailed from './text-message-send-failed.js';
-import { timestampHeight } from './timestamp.react.js';
/* eslint-disable import/no-named-as-default-member */
const {
diff --git a/native/components/clearable-text-input.react.ios.js b/native/components/clearable-text-input.react.ios.js
--- a/native/components/clearable-text-input.react.ios.js
+++ b/native/components/clearable-text-input.react.ios.js
@@ -4,9 +4,9 @@
import * as React from 'react';
import { TextInput as BaseTextInput, View, StyleSheet } from 'react-native';
-import type { KeyPressEvent } from '../types/react-native.js';
import type { ClearableTextInputProps } from './clearable-text-input.js';
import TextInput from './text-input.react.js';
+import type { KeyPressEvent } from '../types/react-native.js';
type State = {
+textInputKey: number,
diff --git a/native/components/clearable-text-input.react.js b/native/components/clearable-text-input.react.js
--- a/native/components/clearable-text-input.react.js
+++ b/native/components/clearable-text-input.react.js
@@ -5,9 +5,9 @@
import sleep from 'lib/utils/sleep.js';
-import { waitForInteractions } from '../utils/timers.js';
import type { ClearableTextInputProps } from './clearable-text-input.js';
import TextInput from './text-input.react.js';
+import { waitForInteractions } from '../utils/timers.js';
class ClearableTextInput extends React.PureComponent<ClearableTextInputProps> {
textInput: ?React.ElementRef<typeof BaseTextInput>;
diff --git a/native/components/color-selector.react.js b/native/components/color-selector.react.js
--- a/native/components/color-selector.react.js
+++ b/native/components/color-selector.react.js
@@ -6,8 +6,8 @@
import { selectedThreadColors } from 'lib/shared/thread-utils.js';
-import { useStyles } from '../themes/colors.js';
import ColorSelectorButton from './color-selector-button.react.js';
+import { useStyles } from '../themes/colors.js';
type ColorSelectorProps = {
+currentColor: string,
diff --git a/native/components/community-pill.react.js b/native/components/community-pill.react.js
--- a/native/components/community-pill.react.js
+++ b/native/components/community-pill.react.js
@@ -6,10 +6,10 @@
import { useKeyserverAdmin } from 'lib/shared/user-utils.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import { useColors } from '../themes/colors.js';
import CommIcon from './comm-icon.react.js';
import Pill from './pill.react.js';
import ThreadPill from './thread-pill.react.js';
+import { useColors } from '../themes/colors.js';
type Props = {
+community: ThreadInfo,
diff --git a/native/components/edit-setting-button.react.js b/native/components/edit-setting-button.react.js
--- a/native/components/edit-setting-button.react.js
+++ b/native/components/edit-setting-button.react.js
@@ -3,9 +3,9 @@
import * as React from 'react';
import { TouchableOpacity, StyleSheet, Platform } from 'react-native';
+import SWMansionIcon from './swmansion-icon.react.js';
import { useColors } from '../themes/colors.js';
import type { TextStyle } from '../types/styles.js';
-import SWMansionIcon from './swmansion-icon.react.js';
type Props = {
+onPress: () => void,
diff --git a/native/components/link-button.react.js b/native/components/link-button.react.js
--- a/native/components/link-button.react.js
+++ b/native/components/link-button.react.js
@@ -3,9 +3,9 @@
import * as React from 'react';
import { Text } from 'react-native';
+import Button from './button.react.js';
import { useStyles } from '../themes/colors.js';
import type { ViewStyle } from '../types/styles.js';
-import Button from './button.react.js';
type BaseProps = {
+text: string,
diff --git a/native/components/modal.react.js b/native/components/modal.react.js
--- a/native/components/modal.react.js
+++ b/native/components/modal.react.js
@@ -5,9 +5,9 @@
import { View, TouchableWithoutFeedback, StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
+import KeyboardAvoidingView from './keyboard-avoiding-view.react.js';
import { useStyles } from '../themes/colors.js';
import type { ViewStyle } from '../types/styles.js';
-import KeyboardAvoidingView from './keyboard-avoiding-view.react.js';
type Props = $ReadOnly<{
+children: React.Node,
diff --git a/native/components/pencil-icon.react.js b/native/components/pencil-icon.react.js
--- a/native/components/pencil-icon.react.js
+++ b/native/components/pencil-icon.react.js
@@ -3,8 +3,8 @@
import * as React from 'react';
import { Platform } from 'react-native';
-import { useStyles } from '../themes/colors.js';
import SWMansionIcon from './swmansion-icon.react.js';
+import { useStyles } from '../themes/colors.js';
function PencilIcon(): React.Node {
const styles = useStyles(unboundStyles);
diff --git a/native/components/search.react.js b/native/components/search.react.js
--- a/native/components/search.react.js
+++ b/native/components/search.react.js
@@ -11,11 +11,11 @@
import { isLoggedIn } from 'lib/selectors/user-selectors.js';
+import SWMansionIcon from './swmansion-icon.react.js';
+import TextInput from './text-input.react.js';
import { useSelector } from '../redux/redux-utils.js';
import { useStyles, useColors } from '../themes/colors.js';
import type { ViewStyle } from '../types/styles.js';
-import SWMansionIcon from './swmansion-icon.react.js';
-import TextInput from './text-input.react.js';
type Props = {
...React.ElementConfig<typeof BaseTextInput>,
diff --git a/native/components/selectable-text-input.react.ios.js b/native/components/selectable-text-input.react.ios.js
--- a/native/components/selectable-text-input.react.ios.js
+++ b/native/components/selectable-text-input.react.ios.js
@@ -5,12 +5,12 @@
import type { Selection } from 'lib/shared/typeahead-utils.js';
-import type { SelectionChangeEvent } from '../types/react-native.js';
import ClearableTextInput from './clearable-text-input.react.js';
import type {
SelectableTextInputProps,
SelectableTextInputRef,
} from './selectable-text-input.js';
+import type { SelectionChangeEvent } from '../types/react-native.js';
const SelectableTextInput = React.forwardRef(function BaseSelectableTextInput(
props,
diff --git a/native/components/selectable-text-input.react.js b/native/components/selectable-text-input.react.js
--- a/native/components/selectable-text-input.react.js
+++ b/native/components/selectable-text-input.react.js
@@ -2,12 +2,12 @@
import * as React from 'react';
-import type { SelectionChangeEvent } from '../types/react-native.js';
import ClearableTextInput from './clearable-text-input.react.js';
import type {
SelectableTextInputProps,
SelectableTextInputRef,
} from './selectable-text-input.js';
+import type { SelectionChangeEvent } from '../types/react-native.js';
const SelectableTextInput = React.forwardRef(function BaseSelectableTextInput(
props,
diff --git a/native/components/swipeable.js b/native/components/swipeable.js
--- a/native/components/swipeable.js
+++ b/native/components/swipeable.js
@@ -5,8 +5,8 @@
import SwipeableComponent from 'react-native-gesture-handler/Swipeable';
import { useSelector } from 'react-redux';
-import { type Colors, useColors, useStyles } from '../themes/colors.js';
import Button from './button.react.js';
+import { type Colors, useColors, useStyles } from '../themes/colors.js';
type BaseProps = {
+buttonWidth: number,
diff --git a/native/components/tag-input.react.js b/native/components/tag-input.react.js
--- a/native/components/tag-input.react.js
+++ b/native/components/tag-input.react.js
@@ -15,6 +15,7 @@
import type { Shape } from 'lib/types/core.js';
+import TextInput from './text-input.react.js';
import { useSelector } from '../redux/redux-utils.js';
import { useColors, type Colors } from '../themes/colors.js';
import type {
@@ -23,7 +24,6 @@
BlurEvent,
} from '../types/react-native.js';
import type { ViewStyle, TextStyle } from '../types/styles.js';
-import TextInput from './text-input.react.js';
type DefaultProps = {
/**
diff --git a/native/components/thread-ancestors.react.js b/native/components/thread-ancestors.react.js
--- a/native/components/thread-ancestors.react.js
+++ b/native/components/thread-ancestors.react.js
@@ -8,12 +8,12 @@
import { ancestorThreadInfos } from 'lib/selectors/thread-selectors.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import { useNavigateToThread } from '../chat/message-list-types.js';
-import { useSelector } from '../redux/redux-utils.js';
-import { useColors, useStyles } from '../themes/colors.js';
import Button from './button.react.js';
import CommunityPill from './community-pill.react.js';
import ThreadPill from './thread-pill.react.js';
+import { useNavigateToThread } from '../chat/message-list-types.js';
+import { useSelector } from '../redux/redux-utils.js';
+import { useColors, useStyles } from '../themes/colors.js';
type Props = {
+threadInfo: ThreadInfo,
diff --git a/native/components/thread-list-thread.react.js b/native/components/thread-list-thread.react.js
--- a/native/components/thread-list-thread.react.js
+++ b/native/components/thread-list-thread.react.js
@@ -5,11 +5,11 @@
import type { ThreadInfo, ResolvedThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
-import { type Colors, useStyles, useColors } from '../themes/colors.js';
-import type { ViewStyle, TextStyle } from '../types/styles.js';
import Button from './button.react.js';
import ColorSplotch from './color-splotch.react.js';
import { SingleLine } from './single-line.react.js';
+import { type Colors, useStyles, useColors } from '../themes/colors.js';
+import type { ViewStyle, TextStyle } from '../types/styles.js';
type SharedProps = {
+onSelect: (threadID: string) => void,
diff --git a/native/components/thread-list.react.js b/native/components/thread-list.react.js
--- a/native/components/thread-list.react.js
+++ b/native/components/thread-list.react.js
@@ -8,6 +8,8 @@
import SearchIndex from 'lib/shared/search-index.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
+import Search from './search.react.js';
+import ThreadListThread from './thread-list-thread.react.js';
import {
type IndicatorStyle,
useStyles,
@@ -15,8 +17,6 @@
} from '../themes/colors.js';
import type { ViewStyle, TextStyle } from '../types/styles.js';
import { waitForModalInputFocus } from '../utils/timers.js';
-import Search from './search.react.js';
-import ThreadListThread from './thread-list-thread.react.js';
type BaseProps = {
+threadInfos: $ReadOnlyArray<ThreadInfo>,
diff --git a/native/components/unread-dot.react.js b/native/components/unread-dot.react.js
--- a/native/components/unread-dot.react.js
+++ b/native/components/unread-dot.react.js
@@ -3,8 +3,8 @@
import * as React from 'react';
import { View } from 'react-native';
-import { useColors } from '../themes/colors.js';
import ColorSplotch from './color-splotch.react.js';
+import { useColors } from '../themes/colors.js';
type Props = {
+unread: ?boolean,
diff --git a/native/components/user-list-user.react.js b/native/components/user-list-user.react.js
--- a/native/components/user-list-user.react.js
+++ b/native/components/user-list-user.react.js
@@ -5,10 +5,10 @@
import type { UserListItem } from 'lib/types/user-types.js';
-import { type Colors, useColors, useStyles } from '../themes/colors.js';
-import type { TextStyle } from '../types/styles.js';
import Button from './button.react.js';
import { SingleLine } from './single-line.react.js';
+import { type Colors, useColors, useStyles } from '../themes/colors.js';
+import type { TextStyle } from '../types/styles.js';
// eslint-disable-next-line no-unused-vars
const getUserListItemHeight = (item: UserListItem): number => {
diff --git a/native/components/user-list.react.js b/native/components/user-list.react.js
--- a/native/components/user-list.react.js
+++ b/native/components/user-list.react.js
@@ -6,9 +6,9 @@
import type { UserListItem } from 'lib/types/user-types.js';
+import { UserListUser, getUserListItemHeight } from './user-list-user.react.js';
import { type IndicatorStyle, useIndicatorStyle } from '../themes/colors.js';
import type { TextStyle } from '../types/styles.js';
-import { UserListUser, getUserListItemHeight } from './user-list-user.react.js';
type BaseProps = {
+userInfos: $ReadOnlyArray<UserListItem>,
diff --git a/native/crash.react.js b/native/crash.react.js
--- a/native/crash.react.js
+++ b/native/crash.react.js
@@ -22,8 +22,8 @@
import { logOutActionTypes, logOut } from 'lib/actions/user-actions.js';
import { preRequestUserStateSelector } from 'lib/selectors/account-selectors.js';
import type { LogOutResult } from 'lib/types/account-types.js';
-import type { ErrorData } from 'lib/types/report-types.js';
import {
+ type ErrorData,
type ClientReportCreationRequest,
type ReportCreationResponse,
reportTypes,
diff --git a/native/input/input-state-container.react.js b/native/input/input-state-container.react.js
--- a/native/input/input-state-container.react.js
+++ b/native/input/input-state-container.react.js
@@ -86,17 +86,17 @@
import { values } from 'lib/utils/objects.js';
import { useIsReportEnabled } from 'lib/utils/report-utils.js';
+import {
+ InputStateContext,
+ type PendingMultimediaUploads,
+ type MultimediaProcessingStep,
+} from './input-state.js';
import { disposeTempFile } from '../media/file-utils.js';
import { processMedia } from '../media/media-utils.js';
import { displayActionResultModal } from '../navigation/action-result-modal.js';
import { useCalendarQuery } from '../navigation/nav-selectors.js';
import { useSelector } from '../redux/redux-utils.js';
import { useStaffCanSee } from '../utils/staff-utils.js';
-import {
- InputStateContext,
- type PendingMultimediaUploads,
- type MultimediaProcessingStep,
-} from './input-state.js';
type MediaIDs =
| { +type: 'photo', +localMediaID: string }
diff --git a/native/keyboard/keyboard-input-host.react.js b/native/keyboard/keyboard-input-host.react.js
--- a/native/keyboard/keyboard-input-host.react.js
+++ b/native/keyboard/keyboard-input-host.react.js
@@ -8,12 +8,12 @@
import type { MediaLibrarySelection } from 'lib/types/media-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
+import { type KeyboardState, KeyboardContext } from './keyboard-state.js';
import { type InputState, InputStateContext } from '../input/input-state.js';
import { mediaGalleryKeyboardName } from '../media/media-gallery-keyboard.react.js';
import { activeMessageListSelector } from '../navigation/nav-selectors.js';
import { NavContext } from '../navigation/navigation-context.js';
import { useStyles } from '../themes/colors.js';
-import { type KeyboardState, KeyboardContext } from './keyboard-state.js';
type BaseProps = {
+textInputRef?: ?React.ElementRef<typeof TextInput>,
diff --git a/native/keyboard/keyboard-state-container.react.js b/native/keyboard/keyboard-state-container.react.js
--- a/native/keyboard/keyboard-state-container.react.js
+++ b/native/keyboard/keyboard-state-container.react.js
@@ -7,8 +7,6 @@
import type { ThreadInfo } from 'lib/types/thread-types.js';
import sleep from 'lib/utils/sleep.js';
-import { tabBarAnimationDuration } from '../navigation/tab-bar.react.js';
-import { waitForInteractions } from '../utils/timers.js';
import KeyboardInputHost from './keyboard-input-host.react.js';
import { KeyboardContext } from './keyboard-state.js';
import {
@@ -16,6 +14,8 @@
addKeyboardDismissListener,
removeKeyboardListener,
} from './keyboard.js';
+import { tabBarAnimationDuration } from '../navigation/tab-bar.react.js';
+import { waitForInteractions } from '../utils/timers.js';
type Props = {
+children: React.Node,
diff --git a/native/lifecycle/lifecycle-handler.react.js b/native/lifecycle/lifecycle-handler.react.js
--- a/native/lifecycle/lifecycle-handler.react.js
+++ b/native/lifecycle/lifecycle-handler.react.js
@@ -6,8 +6,8 @@
import { updateLifecycleStateActionType } from 'lib/reducers/lifecycle-state-reducer.js';
import type { LifecycleState } from 'lib/types/lifecycle-state-types.js';
-import { appBecameInactive } from '../redux/redux-setup.js';
import { addLifecycleListener } from './lifecycle.js';
+import { appBecameInactive } from '../redux/redux-setup.js';
const LifecycleHandler: React.ComponentType<{}> = React.memo<{}>(
function LifecycleHandler() {
diff --git a/native/lifecycle/lifecycle.js b/native/lifecycle/lifecycle.js
--- a/native/lifecycle/lifecycle.js
+++ b/native/lifecycle/lifecycle.js
@@ -4,11 +4,11 @@
import { type LifecycleState } from 'lib/types/lifecycle-state-types.js';
-import type { EventSubscription } from '../types/react-native.js';
import {
addAndroidLifecycleListener,
initialStatus,
} from './lifecycle-module.js';
+import type { EventSubscription } from '../types/react-native.js';
let currentLifecycleStatus = initialStatus;
if (Platform.OS === 'android') {
diff --git a/native/markdown/markdown-link.react.js b/native/markdown/markdown-link.react.js
--- a/native/markdown/markdown-link.react.js
+++ b/native/markdown/markdown-link.react.js
@@ -6,13 +6,13 @@
import { normalizeURL } from 'lib/utils/url-utils.js';
-import { MessagePressResponderContext } from '../chat/message-press-responder-context.js';
-import { TextMessageMarkdownContext } from '../chat/text-message-markdown-context.js';
import {
MarkdownContext,
type MarkdownContextType,
} from './markdown-context.js';
import { MarkdownSpoilerContext } from './markdown-spoiler-context.js';
+import { MessagePressResponderContext } from '../chat/message-press-responder-context.js';
+import { TextMessageMarkdownContext } from '../chat/text-message-markdown-context.js';
function useDisplayLinkPrompt(
inputURL: string,
diff --git a/native/markdown/markdown-spoiler.react.js b/native/markdown/markdown-spoiler.react.js
--- a/native/markdown/markdown-spoiler.react.js
+++ b/native/markdown/markdown-spoiler.react.js
@@ -6,10 +6,10 @@
import type { ReactElement } from 'lib/shared/markdown.js';
-import { TextMessageMarkdownContext } from '../chat/text-message-markdown-context.js';
-import { useStyles } from '../themes/colors.js';
import { MarkdownContext } from './markdown-context.js';
import { MarkdownSpoilerContext } from './markdown-spoiler-context.js';
+import { TextMessageMarkdownContext } from '../chat/text-message-markdown-context.js';
+import { useStyles } from '../themes/colors.js';
type MarkdownSpoilerProps = {
+spoilerIdentifier: string | number | void,
diff --git a/native/markdown/markdown.react.js b/native/markdown/markdown.react.js
--- a/native/markdown/markdown.react.js
+++ b/native/markdown/markdown.react.js
@@ -8,9 +8,9 @@
import { onlyEmojiRegex } from 'lib/shared/emojis.js';
+import type { MarkdownRules } from './rules.react.js';
import { TextMessageMarkdownContext } from '../chat/text-message-markdown-context.js';
import type { TextStyle } from '../types/styles.js';
-import type { MarkdownRules } from './rules.react.js';
type Props = {
+style: TextStyle,
diff --git a/native/markdown/rules.react.js b/native/markdown/rules.react.js
--- a/native/markdown/rules.react.js
+++ b/native/markdown/rules.react.js
@@ -10,11 +10,11 @@
import * as SharedMarkdown from 'lib/shared/markdown.js';
import type { RelativeMemberInfo } from 'lib/types/thread-types.js';
-import { useSelector } from '../redux/redux-utils.js';
import MarkdownLink from './markdown-link.react.js';
import MarkdownParagraph from './markdown-paragraph.react.js';
import MarkdownSpoiler from './markdown-spoiler.react.js';
import { getMarkdownStyles } from './styles.js';
+import { useSelector } from '../redux/redux-utils.js';
export type MarkdownRules = {
+simpleMarkdownRules: SharedMarkdown.ParserRules,
diff --git a/native/media/camera-modal.react.js b/native/media/camera-modal.react.js
--- a/native/media/camera-modal.react.js
+++ b/native/media/camera-modal.react.js
@@ -33,6 +33,7 @@
import type { Dispatch } from 'lib/types/redux-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
+import SendMediaButton from './send-media-button.react.js';
import ContentLoading from '../components/content-loading.react.js';
import ConnectedStatusBar from '../connected-status-bar.react.js';
import { type InputState, InputStateContext } from '../input/input-state.js';
@@ -54,7 +55,6 @@
type AnimatedViewStyle,
} from '../types/styles.js';
import { clamp, gestureJustEnded } from '../utils/animation-utils.js';
-import SendMediaButton from './send-media-button.react.js';
/* eslint-disable import/no-named-as-default-member */
const {
diff --git a/native/media/image-modal.react.js b/native/media/image-modal.react.js
--- a/native/media/image-modal.react.js
+++ b/native/media/image-modal.react.js
@@ -21,6 +21,11 @@
import { type MediaInfo, type Dimensions } from 'lib/types/media-types.js';
+import Multimedia from './multimedia.react.js';
+import {
+ useIntentionalSaveMedia,
+ type IntentionalSaveMedia,
+} from './save-media.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
import ConnectedStatusBar from '../connected-status-bar.react.js';
import { displayActionResultModal } from '../navigation/action-result-modal.js';
@@ -47,11 +52,6 @@
gestureJustEnded,
runTiming,
} from '../utils/animation-utils.js';
-import Multimedia from './multimedia.react.js';
-import {
- useIntentionalSaveMedia,
- type IntentionalSaveMedia,
-} from './save-media.js';
/* eslint-disable import/no-named-as-default-member */
const {
diff --git a/native/media/media-gallery-keyboard.react.js b/native/media/media-gallery-keyboard.react.js
--- a/native/media/media-gallery-keyboard.react.js
+++ b/native/media/media-gallery-keyboard.react.js
@@ -24,6 +24,9 @@
import type { MediaLibrarySelection } from 'lib/types/media-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
+import { getCompatibleMediaURI } from './identifier-utils.js';
+import MediaGalleryMedia from './media-gallery-media.react.js';
+import SendMediaButton from './send-media-button.react.js';
import Button from '../components/button.react.js';
import type { DimensionsInfo } from '../redux/dimensions-updater.react.js';
import { store } from '../redux/redux-setup.js';
@@ -34,9 +37,6 @@
ViewableItemsChange,
} from '../types/react-native.js';
import type { ViewStyle } from '../types/styles.js';
-import { getCompatibleMediaURI } from './identifier-utils.js';
-import MediaGalleryMedia from './media-gallery-media.react.js';
-import SendMediaButton from './send-media-button.react.js';
const animationSpec = {
duration: 400,
diff --git a/native/media/multimedia.react.js b/native/media/multimedia.react.js
--- a/native/media/multimedia.react.js
+++ b/native/media/multimedia.react.js
@@ -6,8 +6,8 @@
import { type MediaInfo } from 'lib/types/media-types.js';
-import { type InputState, InputStateContext } from '../input/input-state.js';
import RemoteImage from './remote-image.react.js';
+import { type InputState, InputStateContext } from '../input/input-state.js';
type BaseProps = {
+mediaInfo: MediaInfo,
diff --git a/native/media/save-media.js b/native/media/save-media.js
--- a/native/media/save-media.js
+++ b/native/media/save-media.js
@@ -24,8 +24,6 @@
import { promiseAll } from 'lib/utils/promises.js';
import { useIsReportEnabled } from 'lib/utils/report-utils.js';
-import { displayActionResultModal } from '../navigation/action-result-modal.js';
-import { requestAndroidPermission } from '../utils/android-permissions.js';
import { fetchBlob } from './blob-utils.js';
import {
fetchAssetInfo,
@@ -38,6 +36,8 @@
temporaryDirectoryPath,
} from './file-utils.js';
import { getMediaLibraryIdentifier } from './identifier-utils.js';
+import { displayActionResultModal } from '../navigation/action-result-modal.js';
+import { requestAndroidPermission } from '../utils/android-permissions.js';
export type IntentionalSaveMedia = (
uri: string,
diff --git a/native/media/video-playback-modal.react.js b/native/media/video-playback-modal.react.js
--- a/native/media/video-playback-modal.react.js
+++ b/native/media/video-playback-modal.react.js
@@ -13,6 +13,7 @@
import { useIsAppBackgroundedOrInactive } from 'lib/shared/lifecycle-utils.js';
import type { MediaInfo } from 'lib/types/media-types.js';
+import { formatDuration } from './video-utils.js';
import ConnectedStatusBar from '../connected-status-bar.react.js';
import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
import { OverlayContext } from '../navigation/overlay-context.js';
@@ -27,7 +28,6 @@
} from '../types/layout-types.js';
import type { NativeMethods } from '../types/react-native.js';
import { gestureJustEnded, animateTowards } from '../utils/animation-utils.js';
-import { formatDuration } from './video-utils.js';
type TouchableOpacityInstance = React.AbstractComponent<
React.ElementConfig<typeof TouchableOpacity>,
diff --git a/native/navigation/action-result-modal.react.js b/native/navigation/action-result-modal.react.js
--- a/native/navigation/action-result-modal.react.js
+++ b/native/navigation/action-result-modal.react.js
@@ -5,11 +5,11 @@
import { View, Text } from 'react-native';
import Animated from 'react-native-reanimated';
-import { useSelector } from '../redux/redux-utils.js';
-import { useOverlayStyles } from '../themes/colors.js';
import type { AppNavigationProp } from './app-navigator.react.js';
import { OverlayContext } from './overlay-context.js';
import type { NavigationRoute } from './route-names.js';
+import { useSelector } from '../redux/redux-utils.js';
+import { useOverlayStyles } from '../themes/colors.js';
export type ActionResultModalParams = {
+message: string,
diff --git a/native/navigation/app-navigator.react.js b/native/navigation/app-navigator.react.js
--- a/native/navigation/app-navigator.react.js
+++ b/native/navigation/app-navigator.react.js
@@ -5,20 +5,6 @@
import { useSelector } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
-import MultimediaMessageTooltipModal from '../chat/multimedia-message-tooltip-modal.react.js';
-import RobotextMessageTooltipModal from '../chat/robotext-message-tooltip-modal.react.js';
-import ThreadSettingsMemberTooltipModal from '../chat/settings/thread-settings-member-tooltip-modal.react.js';
-import TextMessageTooltipModal from '../chat/text-message-tooltip-modal.react.js';
-import KeyboardStateContainer from '../keyboard/keyboard-state-container.react.js';
-import CameraModal from '../media/camera-modal.react.js';
-import ImageModal from '../media/image-modal.react.js';
-import VideoPlaybackModal from '../media/video-playback-modal.react.js';
-import RelationshipListItemTooltipModal from '../profile/relationship-list-item-tooltip-modal.react.js';
-import PushHandler from '../push/push-handler.react.js';
-import { getPersistor } from '../redux/persist.js';
-import { RootContext } from '../root-context.js';
-import { useLoadCommFonts } from '../themes/fonts.js';
-import { waitForInteractions } from '../utils/timers.js';
import ActionResultModal from './action-result-modal.react.js';
import { CommunityDrawerNavigator } from './community-drawer-navigator.react.js';
import { createOverlayNavigator } from './overlay-navigator.react.js';
@@ -41,6 +27,20 @@
type ScreenParamList,
type OverlayParamList,
} from './route-names.js';
+import MultimediaMessageTooltipModal from '../chat/multimedia-message-tooltip-modal.react.js';
+import RobotextMessageTooltipModal from '../chat/robotext-message-tooltip-modal.react.js';
+import ThreadSettingsMemberTooltipModal from '../chat/settings/thread-settings-member-tooltip-modal.react.js';
+import TextMessageTooltipModal from '../chat/text-message-tooltip-modal.react.js';
+import KeyboardStateContainer from '../keyboard/keyboard-state-container.react.js';
+import CameraModal from '../media/camera-modal.react.js';
+import ImageModal from '../media/image-modal.react.js';
+import VideoPlaybackModal from '../media/video-playback-modal.react.js';
+import RelationshipListItemTooltipModal from '../profile/relationship-list-item-tooltip-modal.react.js';
+import PushHandler from '../push/push-handler.react.js';
+import { getPersistor } from '../redux/persist.js';
+import { RootContext } from '../root-context.js';
+import { useLoadCommFonts } from '../themes/fonts.js';
+import { waitForInteractions } from '../utils/timers.js';
let splashScreenHasHidden = false;
diff --git a/native/navigation/community-drawer-button.react.js b/native/navigation/community-drawer-button.react.js
--- a/native/navigation/community-drawer-button.react.js
+++ b/native/navigation/community-drawer-button.react.js
@@ -4,8 +4,8 @@
import * as React from 'react';
import { TouchableOpacity } from 'react-native';
-import { useStyles } from '../themes/colors.js';
import type { CommunityDrawerNavigationProp } from './community-drawer-navigator.react.js';
+import { useStyles } from '../themes/colors.js';
type Props = {
+navigation: CommunityDrawerNavigationProp<'TabNavigator'>,
diff --git a/native/navigation/community-drawer-content.react.js b/native/navigation/community-drawer-content.react.js
--- a/native/navigation/community-drawer-content.react.js
+++ b/native/navigation/community-drawer-content.react.js
@@ -17,10 +17,10 @@
} from 'lib/types/thread-types.js';
import { useResolvedThreadInfos } from 'lib/utils/entity-helpers.js';
+import CommunityDrawerItemCommunity from './community-drawer-item-community.react.js';
import { useNavigateToThread } from '../chat/message-list-types.js';
import { useStyles } from '../themes/colors.js';
import type { TextStyle } from '../types/styles.js';
-import CommunityDrawerItemCommunity from './community-drawer-item-community.react.js';
const maxDepth = 2;
const safeAreaEdges = Platform.select({
diff --git a/native/navigation/community-drawer-item-community.react.js b/native/navigation/community-drawer-item-community.react.js
--- a/native/navigation/community-drawer-item-community.react.js
+++ b/native/navigation/community-drawer-item-community.react.js
@@ -3,9 +3,9 @@
import * as React from 'react';
import { View } from 'react-native';
-import { useStyles } from '../themes/colors.js';
import CommunityDrawerItem from './community-drawer-item.react.js';
import type { DrawerItemProps } from './community-drawer-item.react.js';
+import { useStyles } from '../themes/colors.js';
function CommunityDrawerItemCommunity(props: DrawerItemProps): React.Node {
const styles = useStyles(unboundStyles);
diff --git a/native/navigation/community-drawer-item.react.js b/native/navigation/community-drawer-item.react.js
--- a/native/navigation/community-drawer-item.react.js
+++ b/native/navigation/community-drawer-item.react.js
@@ -6,12 +6,12 @@
import type { ThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
+import { ExpandButton, ExpandButtonDisabled } from './expand-buttons.react.js';
+import SubchannelsButton from './subchannels-button.react.js';
import type { MessageListParams } from '../chat/message-list-types.js';
import { SingleLine } from '../components/single-line.react.js';
import { useStyles } from '../themes/colors.js';
import type { TextStyle } from '../types/styles.js';
-import { ExpandButton, ExpandButtonDisabled } from './expand-buttons.react.js';
-import SubchannelsButton from './subchannels-button.react.js';
export type CommunityDrawerItemData = {
+threadInfo: ThreadInfo,
diff --git a/native/navigation/community-drawer-navigator.react.js b/native/navigation/community-drawer-navigator.react.js
--- a/native/navigation/community-drawer-navigator.react.js
+++ b/native/navigation/community-drawer-navigator.react.js
@@ -8,7 +8,6 @@
import * as React from 'react';
import { View, useWindowDimensions } from 'react-native';
-import { useStyles } from '../themes/colors.js';
import type { AppNavigationProp } from './app-navigator.react.js';
import CommunityDrawerContent from './community-drawer-content.react.js';
import { drawerSwipeEnabledSelector } from './nav-selectors.js';
@@ -20,6 +19,7 @@
CommunityDrawerParamList,
} from './route-names.js';
import TabNavigator from './tab-navigator.react.js';
+import { useStyles } from '../themes/colors.js';
const communityDrawerContent = () => <CommunityDrawerContent />;
diff --git a/native/navigation/nav-selectors.js b/native/navigation/nav-selectors.js
--- a/native/navigation/nav-selectors.js
+++ b/native/navigation/nav-selectors.js
@@ -10,9 +10,6 @@
import type { CalendarQuery } from 'lib/types/entry-types.js';
import type { CalendarFilter } from 'lib/types/filter-types.js';
-import { useSelector } from '../redux/redux-utils.js';
-import type { NavPlusRedux } from '../types/selector-types.js';
-import type { GlobalTheme } from '../types/themes.js';
import type { NavContextType } from './navigation-context.js';
import { NavContext } from './navigation-context.js';
import {
@@ -33,6 +30,9 @@
threadRoutes,
CommunityDrawerNavigatorRouteName,
} from './route-names.js';
+import { useSelector } from '../redux/redux-utils.js';
+import type { NavPlusRedux } from '../types/selector-types.js';
+import type { GlobalTheme } from '../types/themes.js';
const baseCreateIsForegroundSelector = (routeName: string) =>
createSelector(
diff --git a/native/navigation/navigation-context.js b/native/navigation/navigation-context.js
--- a/native/navigation/navigation-context.js
+++ b/native/navigation/navigation-context.js
@@ -6,9 +6,9 @@
} from '@react-navigation/native';
import * as React from 'react';
-import type { ChatRouterNavigationAction } from '../chat/chat-router.js';
import type { OverlayRouterNavigationAction } from './overlay-router.js';
import type { RootRouterNavigationAction } from './root-router.js';
+import type { ChatRouterNavigationAction } from '../chat/chat-router.js';
export type NavAction =
| CommonAction
diff --git a/native/navigation/navigation-handler.react.js b/native/navigation/navigation-handler.react.js
--- a/native/navigation/navigation-handler.react.js
+++ b/native/navigation/navigation-handler.react.js
@@ -4,10 +4,6 @@
import { isLoggedIn } from 'lib/selectors/user-selectors.js';
-import DevTools from '../redux/dev-tools.react.js';
-import { useSelector } from '../redux/redux-utils.js';
-import type { AppState } from '../redux/state-types.js';
-import { usePersistedStateLoaded } from '../selectors/app-state-selectors.js';
import { logInActionType, logOutActionType } from './action-types.js';
import ModalPruner from './modal-pruner.react.js';
import NavFromReduxHandler from './nav-from-redux-handler.react.js';
@@ -15,6 +11,10 @@
import { NavContext, type NavAction } from './navigation-context.js';
import PolicyAcknowledgmentHandler from './policy-acknowledgment-handler.react.js';
import ThreadScreenTracker from './thread-screen-tracker.react.js';
+import DevTools from '../redux/dev-tools.react.js';
+import { useSelector } from '../redux/redux-utils.js';
+import type { AppState } from '../redux/state-types.js';
+import { usePersistedStateLoaded } from '../selectors/app-state-selectors.js';
const NavigationHandler: React.ComponentType<{}> = React.memo<{}>(
function NavigationHandler() {
diff --git a/native/navigation/overlay-navigator.react.js b/native/navigation/overlay-navigator.react.js
--- a/native/navigation/overlay-navigator.react.js
+++ b/native/navigation/overlay-navigator.react.js
@@ -23,11 +23,11 @@
import { values } from 'lib/utils/objects.js';
-import { isMessageTooltipKey } from '../chat/utils.js';
import { OverlayContext } from './overlay-context.js';
import OverlayRouter from './overlay-router.js';
import type { OverlayRouterExtraNavigationHelpers } from './overlay-router.js';
import { scrollBlockingModals, TabNavigatorRouteName } from './route-names.js';
+import { isMessageTooltipKey } from '../chat/utils.js';
export type OverlayNavigationHelpers<
ParamList: ParamListBase = ParamListBase,
diff --git a/native/navigation/policy-acknowledgment-handler.react.js b/native/navigation/policy-acknowledgment-handler.react.js
--- a/native/navigation/policy-acknowledgment-handler.react.js
+++ b/native/navigation/policy-acknowledgment-handler.react.js
@@ -5,8 +5,8 @@
import { policyTypes } from 'lib/facts/policies.js';
-import { useSelector } from '../redux/redux-utils.js';
import { TermsAndPrivacyRouteName } from './route-names.js';
+import { useSelector } from '../redux/redux-utils.js';
function PolicyAcknowledgmentHandler(): null {
const userPolicies = useSelector(state => state.userPolicies);
diff --git a/native/navigation/root-navigator.react.js b/native/navigation/root-navigator.react.js
--- a/native/navigation/root-navigator.react.js
+++ b/native/navigation/root-navigator.react.js
@@ -17,17 +17,6 @@
import { Platform } from 'react-native';
import { enableScreens } from 'react-native-screens';
-import LoggedOutModal from '../account/logged-out-modal.react.js';
-import TermsAndPrivacyModal from '../account/terms-and-privacy-modal.react.js';
-import ThreadPickerModal from '../calendar/thread-picker-modal.react.js';
-import ImagePasteModal from '../chat/image-paste-modal.react.js';
-import MessageReactionsModal from '../chat/message-reactions-modal.react.js';
-import AddUsersModal from '../chat/settings/add-users-modal.react.js';
-import ColorSelectorModal from '../chat/settings/color-selector-modal.react.js';
-import ComposeSubchannelModal from '../chat/settings/compose-subchannel-modal.react.js';
-import SidebarListModal from '../chat/sidebar-list-modal.react.js';
-import SubchannelsListModal from '../chat/subchannels-list-modal.react.js';
-import CustomServerModal from '../profile/custom-server-modal.react.js';
import AppNavigator from './app-navigator.react.js';
import { defaultStackScreenOptions } from './options.js';
import { RootNavigatorContext } from './root-navigator-context.js';
@@ -50,6 +39,17 @@
type RootParamList,
TermsAndPrivacyRouteName,
} from './route-names.js';
+import LoggedOutModal from '../account/logged-out-modal.react.js';
+import TermsAndPrivacyModal from '../account/terms-and-privacy-modal.react.js';
+import ThreadPickerModal from '../calendar/thread-picker-modal.react.js';
+import ImagePasteModal from '../chat/image-paste-modal.react.js';
+import MessageReactionsModal from '../chat/message-reactions-modal.react.js';
+import AddUsersModal from '../chat/settings/add-users-modal.react.js';
+import ColorSelectorModal from '../chat/settings/color-selector-modal.react.js';
+import ComposeSubchannelModal from '../chat/settings/compose-subchannel-modal.react.js';
+import SidebarListModal from '../chat/sidebar-list-modal.react.js';
+import SubchannelsListModal from '../chat/subchannels-list-modal.react.js';
+import CustomServerModal from '../profile/custom-server-modal.react.js';
enableScreens();
diff --git a/native/navigation/route-names.js b/native/navigation/route-names.js
--- a/native/navigation/route-names.js
+++ b/native/navigation/route-names.js
@@ -2,6 +2,7 @@
import type { RouteProp } from '@react-navigation/native';
+import type { ActionResultModalParams } from './action-result-modal.react.js';
import type { TermsAndPrivacyModalParams } from '../account/terms-and-privacy-modal.react.js';
import type { ThreadPickerModalParams } from '../calendar/thread-picker-modal.react.js';
import type { ComposeSubchannelParams } from '../chat/compose-subchannel.react.js';
@@ -24,7 +25,6 @@
import type { VideoPlaybackModalParams } from '../media/video-playback-modal.react.js';
import type { CustomServerModalParams } from '../profile/custom-server-modal.react.js';
import type { RelationshipListItemTooltipModalParams } from '../profile/relationship-list-item-tooltip-modal.react.js';
-import type { ActionResultModalParams } from './action-result-modal.react.js';
export const ActionResultModalRouteName = 'ActionResultModal';
export const AddUsersModalRouteName = 'AddUsersModal';
diff --git a/native/navigation/subchannels-button.react.js b/native/navigation/subchannels-button.react.js
--- a/native/navigation/subchannels-button.react.js
+++ b/native/navigation/subchannels-button.react.js
@@ -7,8 +7,8 @@
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import { useStyles } from '../themes/colors.js';
import { SubchannelsListModalRouteName } from './route-names.js';
+import { useStyles } from '../themes/colors.js';
type Props = {
+threadInfo: ThreadInfo,
diff --git a/native/navigation/tab-navigator.react.js b/native/navigation/tab-navigator.react.js
--- a/native/navigation/tab-navigator.react.js
+++ b/native/navigation/tab-navigator.react.js
@@ -9,13 +9,6 @@
import { unreadCount } from 'lib/selectors/thread-selectors.js';
-import AppsDirectory from '../apps/apps-directory.react.js';
-import Calendar from '../calendar/calendar.react.js';
-import Chat from '../chat/chat.react.js';
-import SWMansionIcon from '../components/swmansion-icon.react.js';
-import Profile from '../profile/profile.react.js';
-import { useSelector } from '../redux/redux-utils.js';
-import { useColors } from '../themes/colors.js';
import CommunityDrawerButton from './community-drawer-button.react.js';
import type { CommunityDrawerNavigationProp } from './community-drawer-navigator.react.js';
import {
@@ -25,9 +18,16 @@
AppsRouteName,
type ScreenParamList,
type TabParamList,
+ type NavigationRoute,
} from './route-names.js';
-import type { NavigationRoute } from './route-names.js';
import { tabBar } from './tab-bar.react.js';
+import AppsDirectory from '../apps/apps-directory.react.js';
+import Calendar from '../calendar/calendar.react.js';
+import Chat from '../chat/chat.react.js';
+import SWMansionIcon from '../components/swmansion-icon.react.js';
+import Profile from '../profile/profile.react.js';
+import { useSelector } from '../redux/redux-utils.js';
+import { useColors } from '../themes/colors.js';
const calendarTabOptions = {
tabBarLabel: 'Calendar',
diff --git a/native/navigation/thread-screen-tracker.react.js b/native/navigation/thread-screen-tracker.react.js
--- a/native/navigation/thread-screen-tracker.react.js
+++ b/native/navigation/thread-screen-tracker.react.js
@@ -3,8 +3,8 @@
import * as React from 'react';
import { useDispatch } from 'react-redux';
-import { updateThreadLastNavigatedActionType } from '../redux/action-types.js';
import { useActiveMessageList } from './nav-selectors.js';
+import { updateThreadLastNavigatedActionType } from '../redux/action-types.js';
const ThreadScreenTracker: React.ComponentType<{}> = React.memo<{}>(
function ThreadScreenTracker() {
diff --git a/native/profile/default-notifications-preferences.react.js b/native/profile/default-notifications-preferences.react.js
--- a/native/profile/default-notifications-preferences.react.js
+++ b/native/profile/default-notifications-preferences.react.js
@@ -22,12 +22,12 @@
useDispatchActionPromise,
} from 'lib/utils/action-utils.js';
+import type { ProfileNavigationProp } from './profile.react.js';
import Action from '../components/action-row.react.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
import type { NavigationRoute } from '../navigation/route-names.js';
import { useSelector } from '../redux/redux-utils.js';
import { useStyles } from '../themes/colors.js';
-import type { ProfileNavigationProp } from './profile.react.js';
const CheckIcon = () => (
<SWMansionIcon
diff --git a/native/profile/dev-tools.react.js b/native/profile/dev-tools.react.js
--- a/native/profile/dev-tools.react.js
+++ b/native/profile/dev-tools.react.js
@@ -9,6 +9,7 @@
import type { Dispatch } from 'lib/types/redux-types.js';
import { setURLPrefix } from 'lib/utils/url-utils.js';
+import type { ProfileNavigationProp } from './profile.react.js';
import Button from '../components/button.react.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
import type { NavigationRoute } from '../navigation/route-names.js';
@@ -18,7 +19,6 @@
import { wipeAndExit } from '../utils/crash-utils.js';
import { checkForMissingNatDevHostname } from '../utils/dev-hostname.js';
import { nodeServerOptions } from '../utils/url-utils.js';
-import type { ProfileNavigationProp } from './profile.react.js';
const ServerIcon = () => (
<SWMansionIcon
diff --git a/native/profile/edit-password.react.js b/native/profile/edit-password.react.js
--- a/native/profile/edit-password.react.js
+++ b/native/profile/edit-password.react.js
@@ -25,6 +25,7 @@
type DispatchActionPromise,
} from 'lib/utils/action-utils.js';
+import type { ProfileNavigationProp } from './profile.react.js';
import { setNativeCredentials } from '../account/native-credentials.js';
import Button from '../components/button.react.js';
import TextInput from '../components/text-input.react.js';
@@ -32,7 +33,6 @@
import { useSelector } from '../redux/redux-utils.js';
import { type Colors, useColors, useStyles } from '../themes/colors.js';
import type { GlobalTheme } from '../types/themes.js';
-import type { ProfileNavigationProp } from './profile.react.js';
type BaseProps = {
+navigation: ProfileNavigationProp<'EditPassword'>,
diff --git a/native/profile/privacy-preferences.react.js b/native/profile/privacy-preferences.react.js
--- a/native/profile/privacy-preferences.react.js
+++ b/native/profile/privacy-preferences.react.js
@@ -4,8 +4,8 @@
import { View, Text } from 'react-native';
import { ScrollView } from 'react-native-gesture-handler';
-import { useStyles } from '../themes/colors.js';
import ToggleReport from './toggle-report.react.js';
+import { useStyles } from '../themes/colors.js';
// eslint-disable-next-line no-unused-vars
function PrivacyPreferences(props: { ... }): React.Node {
diff --git a/native/profile/profile-screen.react.js b/native/profile/profile-screen.react.js
--- a/native/profile/profile-screen.react.js
+++ b/native/profile/profile-screen.react.js
@@ -17,6 +17,7 @@
useServerCall,
} from 'lib/utils/action-utils.js';
+import type { ProfileNavigationProp } from './profile.react.js';
import { deleteNativeCredentialsFor } from '../account/native-credentials.js';
import Action from '../components/action-row.react.js';
import Button from '../components/button.react.js';
@@ -37,7 +38,6 @@
import { useSelector } from '../redux/redux-utils.js';
import { type Colors, useColors, useStyles } from '../themes/colors.js';
import { useStaffCanSee } from '../utils/staff-utils.js';
-import type { ProfileNavigationProp } from './profile.react.js';
type ProfileRowProps = {
+content: string,
diff --git a/native/profile/profile.react.js b/native/profile/profile.react.js
--- a/native/profile/profile.react.js
+++ b/native/profile/profile.react.js
@@ -9,6 +9,16 @@
import * as React from 'react';
import { View, useWindowDimensions } from 'react-native';
+import AppearancePreferences from './appearance-preferences.react.js';
+import BuildInfo from './build-info.react.js';
+import DefaultNotificationsPreferences from './default-notifications-preferences.react.js';
+import DeleteAccount from './delete-account.react.js';
+import DevTools from './dev-tools.react.js';
+import EditPassword from './edit-password.react.js';
+import PrivacyPreferences from './privacy-preferences.react.js';
+import ProfileHeader from './profile-header.react.js';
+import ProfileScreen from './profile-screen.react.js';
+import RelationshipList from './relationship-list.react.js';
import KeyboardAvoidingView from '../components/keyboard-avoiding-view.react.js';
import CommunityDrawerButton from '../navigation/community-drawer-button.react.js';
import type { CommunityDrawerNavigationProp } from '../navigation/community-drawer-navigator.react.js';
@@ -28,16 +38,6 @@
type ProfileParamList,
} from '../navigation/route-names.js';
import { useStyles, useColors } from '../themes/colors.js';
-import AppearancePreferences from './appearance-preferences.react.js';
-import BuildInfo from './build-info.react.js';
-import DefaultNotificationsPreferences from './default-notifications-preferences.react.js';
-import DeleteAccount from './delete-account.react.js';
-import DevTools from './dev-tools.react.js';
-import EditPassword from './edit-password.react.js';
-import PrivacyPreferences from './privacy-preferences.react.js';
-import ProfileHeader from './profile-header.react.js';
-import ProfileScreen from './profile-screen.react.js';
-import RelationshipList from './relationship-list.react.js';
const header = (props: StackHeaderProps) => <ProfileHeader {...props} />;
const profileScreenOptions = { headerTitle: 'Profile' };
diff --git a/native/profile/relationship-list-item.react.js b/native/profile/relationship-list-item.react.js
--- a/native/profile/relationship-list-item.react.js
+++ b/native/profile/relationship-list-item.react.js
@@ -33,6 +33,7 @@
useDispatchActionPromise,
} from 'lib/utils/action-utils.js';
+import type { RelationshipListNavigate } from './relationship-list.react.js';
import PencilIcon from '../components/pencil-icon.react.js';
import { SingleLine } from '../components/single-line.react.js';
import {
@@ -52,7 +53,6 @@
import { useSelector } from '../redux/redux-utils.js';
import { type Colors, useColors, useStyles } from '../themes/colors.js';
import type { VerticalBounds } from '../types/layout-types.js';
-import type { RelationshipListNavigate } from './relationship-list.react.js';
type BaseProps = {
+userInfo: AccountUserInfo,
diff --git a/native/profile/relationship-list.react.js b/native/profile/relationship-list.react.js
--- a/native/profile/relationship-list.react.js
+++ b/native/profile/relationship-list.react.js
@@ -30,6 +30,8 @@
useDispatchActionPromise,
} from 'lib/utils/action-utils.js';
+import type { ProfileNavigationProp } from './profile.react.js';
+import RelationshipListItem from './relationship-list-item.react.js';
import LinkButton from '../components/link-button.react.js';
import { createTagInput, BaseTagInput } from '../components/tag-input.react.js';
import { KeyboardContext } from '../keyboard/keyboard-state.js';
@@ -42,8 +44,6 @@
import { useSelector } from '../redux/redux-utils.js';
import { useStyles, useIndicatorStyle } from '../themes/colors.js';
import type { VerticalBounds } from '../types/layout-types.js';
-import type { ProfileNavigationProp } from './profile.react.js';
-import RelationshipListItem from './relationship-list-item.react.js';
const TagInput = createTagInput<GlobalAccountUserInfo>();
diff --git a/native/push/push-handler.react.js b/native/push/push-handler.react.js
--- a/native/push/push-handler.react.js
+++ b/native/push/push-handler.react.js
@@ -27,23 +27,6 @@
type DispatchActionPromise,
} from 'lib/utils/action-utils.js';
-import {
- type MessageListParams,
- useNavigateToThread,
-} from '../chat/message-list-types.js';
-import {
- addLifecycleListener,
- getCurrentLifecycleState,
-} from '../lifecycle/lifecycle.js';
-import { replaceWithThreadActionType } from '../navigation/action-types.js';
-import { activeMessageListSelector } from '../navigation/nav-selectors.js';
-import { NavContext } from '../navigation/navigation-context.js';
-import type { RootNavigationProp } from '../navigation/root-navigator.react.js';
-import { recordNotifPermissionAlertActionType } from '../redux/action-types.js';
-import { useSelector } from '../redux/redux-utils.js';
-import { RootContext, type RootContextType } from '../root-context.js';
-import type { EventSubscription } from '../types/react-native.js';
-import { type GlobalTheme } from '../types/themes.js';
import { type NotifPermissionAlertInfo } from './alerts.js';
import {
androidNotificationChannelID,
@@ -64,6 +47,23 @@
CommIOSNotifications,
getCommIOSNotificationsEventEmitter,
} from './ios';
+import {
+ type MessageListParams,
+ useNavigateToThread,
+} from '../chat/message-list-types.js';
+import {
+ addLifecycleListener,
+ getCurrentLifecycleState,
+} from '../lifecycle/lifecycle.js';
+import { replaceWithThreadActionType } from '../navigation/action-types.js';
+import { activeMessageListSelector } from '../navigation/nav-selectors.js';
+import { NavContext } from '../navigation/navigation-context.js';
+import type { RootNavigationProp } from '../navigation/root-navigator.react.js';
+import { recordNotifPermissionAlertActionType } from '../redux/action-types.js';
+import { useSelector } from '../redux/redux-utils.js';
+import { RootContext, type RootContextType } from '../root-context.js';
+import type { EventSubscription } from '../types/react-native.js';
+import { type GlobalTheme } from '../types/themes.js';
LogBox.ignoreLogs([
// react-native-in-app-message
diff --git a/native/redux/action-types.js b/native/redux/action-types.js
--- a/native/redux/action-types.js
+++ b/native/redux/action-types.js
@@ -6,11 +6,11 @@
import type { Shape } from 'lib/types/core.js';
import type { BaseAction } from 'lib/types/redux-types.js';
+import type { DimensionsInfo } from './dimensions-updater.react.js';
+import type { AppState } from './state-types.js';
import type { DeviceCameraInfo } from '../types/camera.js';
import type { ConnectivityInfo } from '../types/connectivity.js';
import type { GlobalThemeInfo } from '../types/themes.js';
-import type { DimensionsInfo } from './dimensions-updater.react.js';
-import type { AppState } from './state-types.js';
export const resetUserStateActionType = 'RESET_USER_STATE';
export const recordNotifPermissionAlertActionType =
diff --git a/native/redux/dev-tools.react.js b/native/redux/dev-tools.react.js
--- a/native/redux/dev-tools.react.js
+++ b/native/redux/dev-tools.react.js
@@ -5,10 +5,10 @@
import { actionLogger } from 'lib/utils/action-logger.js';
-import { setNavStateActionType } from '../navigation/action-types.js';
-import { NavContext } from '../navigation/navigation-context.js';
import { setReduxStateActionType } from './action-types.js';
import { useSelector } from './redux-utils.js';
+import { setNavStateActionType } from '../navigation/action-types.js';
+import { NavContext } from '../navigation/navigation-context.js';
const DevTools: React.ComponentType<{}> = React.memo<{}>(function DevTools() {
const devToolsRef = React.useRef();
diff --git a/native/redux/dimensions-updater.react.js b/native/redux/dimensions-updater.react.js
--- a/native/redux/dimensions-updater.react.js
+++ b/native/redux/dimensions-updater.react.js
@@ -10,14 +10,14 @@
import type { Dimensions } from 'lib/types/media-types.js';
+import { updateDimensionsActiveType } from './action-types.js';
+import { useSelector } from './redux-utils.js';
import {
addKeyboardShowListener,
addKeyboardDismissListener,
removeKeyboardListener,
rnsacThinksAndroidKeyboardResizesFrame,
} from '../keyboard/keyboard.js';
-import { updateDimensionsActiveType } from './action-types.js';
-import { useSelector } from './redux-utils.js';
type BaseDimensionsInfo = {
...Dimensions,
diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -21,8 +21,8 @@
type MessageStore,
messageTypes,
type ClientDBMessageStoreOperation,
+ type ClientDBMessageInfo,
} from 'lib/types/message-types.js';
-import type { ClientDBMessageInfo } from 'lib/types/message-types.js';
import { defaultConnectionInfo } from 'lib/types/socket-types.js';
import {
translateClientDBMessageInfoToRawMessageInfo,
@@ -30,13 +30,13 @@
} from 'lib/utils/message-ops-utils.js';
import { convertThreadStoreOperationsToClientDBOperations } from 'lib/utils/thread-ops-utils.js';
+import { migrateThreadStoreForEditThreadPermissions } from './edit-thread-permission-migration.js';
+import type { AppState } from './state-types.js';
import { commCoreModule } from '../native-modules.js';
import { defaultNotifPermissionAlertInfo } from '../push/alerts.js';
import { defaultDeviceCameraInfo } from '../types/camera.js';
import { defaultGlobalThemeInfo } from '../types/themes.js';
import { isTaskCancelledError } from '../utils/error-handling.js';
-import { migrateThreadStoreForEditThreadPermissions } from './edit-thread-permission-migration.js';
-import type { AppState } from './state-types.js';
const migrations = {
[1]: (state: AppState) => ({
diff --git a/native/redux/redux-setup.js b/native/redux/redux-setup.js
--- a/native/redux/redux-setup.js
+++ b/native/redux/redux-setup.js
@@ -38,23 +38,6 @@
import { convertMessageStoreOperationsToClientDBOperations } from 'lib/utils/message-ops-utils.js';
import { convertThreadStoreOperationsToClientDBOperations } from 'lib/utils/thread-ops-utils.js';
-import { commCoreModule } from '../native-modules.js';
-import { defaultNavInfo } from '../navigation/default-state.js';
-import { getGlobalNavContext } from '../navigation/icky-global.js';
-import { activeMessageListSelector } from '../navigation/nav-selectors.js';
-import { defaultNotifPermissionAlertInfo } from '../push/alerts.js';
-import reactotron from '../reactotron.js';
-import { defaultDeviceCameraInfo } from '../types/camera.js';
-import { defaultConnectivityInfo } from '../types/connectivity.js';
-import { defaultGlobalThemeInfo } from '../types/themes.js';
-import { isTaskCancelledError } from '../utils/error-handling.js';
-import { isStaffRelease } from '../utils/staff-utils.js';
-import {
- defaultURLPrefix,
- natNodeServer,
- setCustomServer,
- getDevServerHostname,
-} from '../utils/url-utils.js';
import {
resetUserStateActionType,
recordNotifPermissionAlertActionType,
@@ -73,6 +56,23 @@
import { defaultDimensionsInfo } from './dimensions-updater.react.js';
import { persistConfig, setPersistor } from './persist.js';
import type { AppState } from './state-types.js';
+import { commCoreModule } from '../native-modules.js';
+import { defaultNavInfo } from '../navigation/default-state.js';
+import { getGlobalNavContext } from '../navigation/icky-global.js';
+import { activeMessageListSelector } from '../navigation/nav-selectors.js';
+import { defaultNotifPermissionAlertInfo } from '../push/alerts.js';
+import reactotron from '../reactotron.js';
+import { defaultDeviceCameraInfo } from '../types/camera.js';
+import { defaultConnectivityInfo } from '../types/connectivity.js';
+import { defaultGlobalThemeInfo } from '../types/themes.js';
+import { isTaskCancelledError } from '../utils/error-handling.js';
+import { isStaffRelease } from '../utils/staff-utils.js';
+import {
+ defaultURLPrefix,
+ natNodeServer,
+ setCustomServer,
+ getDevServerHostname,
+} from '../utils/url-utils.js';
const defaultState = ({
navInfo: defaultNavInfo,
diff --git a/native/redux/state-types.js b/native/redux/state-types.js
--- a/native/redux/state-types.js
+++ b/native/redux/state-types.js
@@ -16,12 +16,12 @@
import type { ThreadStore } from 'lib/types/thread-types.js';
import type { CurrentUserInfo, UserStore } from 'lib/types/user-types.js';
+import type { DimensionsInfo } from './dimensions-updater.react.js';
import type { NavInfo } from '../navigation/default-state.js';
import type { NotifPermissionAlertInfo } from '../push/alerts.js';
import type { DeviceCameraInfo } from '../types/camera.js';
import type { ConnectivityInfo } from '../types/connectivity.js';
import type { GlobalThemeInfo } from '../types/themes.js';
-import type { DimensionsInfo } from './dimensions-updater.react.js';
export type AppState = {
navInfo: NavInfo,
diff --git a/native/staff/staff-context.provider.react.js b/native/staff/staff-context.provider.react.js
--- a/native/staff/staff-context.provider.react.js
+++ b/native/staff/staff-context.provider.react.js
@@ -2,8 +2,8 @@
import * as React from 'react';
-import { useIsCurrentUserStaff } from '../utils/staff-utils.js';
import { StaffContext, type StaffContextType } from './staff-context.js';
+import { useIsCurrentUserStaff } from '../utils/staff-utils.js';
type Props = {
+children: React.Node,
diff --git a/native/tooltip/tooltip-item.react.js b/native/tooltip/tooltip-item.react.js
--- a/native/tooltip/tooltip-item.react.js
+++ b/native/tooltip/tooltip-item.react.js
@@ -4,10 +4,10 @@
import * as React from 'react';
import { TouchableOpacity } from 'react-native';
+import { TooltipContext } from './tooltip-context.react.js';
import { SingleLine } from '../components/single-line.react.js';
import { useStyles } from '../themes/colors.js';
import type { ViewStyle, TextStyle } from '../types/styles.js';
-import { TooltipContext } from './tooltip-context.react.js';
export type TooltipItemBaseProps = {
+id: string,
diff --git a/native/tooltip/tooltip.react.js b/native/tooltip/tooltip.react.js
--- a/native/tooltip/tooltip.react.js
+++ b/native/tooltip/tooltip.react.js
@@ -12,6 +12,14 @@
} from 'react-native';
import Animated, { SlideInDown, SlideOutDown } from 'react-native-reanimated';
+import {
+ TooltipContextProvider,
+ TooltipContext,
+ type TooltipContextType,
+} from './tooltip-context.react.js';
+import BaseTooltipItem, {
+ type TooltipItemBaseProps,
+} from './tooltip-item.react.js';
import { ChatContext, type ChatContextType } from '../chat/chat-context.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
@@ -29,14 +37,6 @@
} from '../types/layout-types.js';
import type { LayoutEvent } from '../types/react-native.js';
import { AnimatedView } from '../types/styles.js';
-import {
- TooltipContextProvider,
- TooltipContext,
- type TooltipContextType,
-} from './tooltip-context.react.js';
-import BaseTooltipItem, {
- type TooltipItemBaseProps,
-} from './tooltip-item.react.js';
/* eslint-disable import/no-named-as-default-member */
const { Value, Node, Extrapolate, add, multiply, interpolateNode } = Animated;
diff --git a/package.json b/package.json
--- a/package.json
+++ b/package.json
@@ -34,7 +34,7 @@
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-flowtype": "^5.4.0",
- "eslint-plugin-import": "^2.22.1",
+ "eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^24.2.2",
"eslint-plugin-monorepo": "^0.3.2",
"eslint-plugin-prettier": "^3.3.1",
diff --git a/web/account/log-in-form.react.js b/web/account/log-in-form.react.js
--- a/web/account/log-in-form.react.js
+++ b/web/account/log-in-form.react.js
@@ -4,11 +4,11 @@
import * as React from 'react';
import { useSigner } from 'wagmi';
-import OrBreak from '../components/or-break.react.js';
import css from './log-in-form.css';
import SIWEButton from './siwe-button.react.js';
import SIWELoginForm from './siwe-login-form.react.js';
import TraditionalLoginForm from './traditional-login-form.react.js';
+import OrBreak from '../components/or-break.react.js';
function LoginForm(): React.Node {
const { openConnectModal } = useConnectModal();
diff --git a/web/account/password-input.react.js b/web/account/password-input.react.js
--- a/web/account/password-input.react.js
+++ b/web/account/password-input.react.js
@@ -6,9 +6,9 @@
type Icon,
} from 'lib/components/SWMansionIcon.react.js';
+import css from './password-input.css';
import Button from '../components/button.react.js';
import Input, { type BaseInputProps } from '../modals/input.react.js';
-import css from './password-input.css';
type PasswordInputProps = BaseInputProps;
diff --git a/web/account/siwe-button.react.js b/web/account/siwe-button.react.js
--- a/web/account/siwe-button.react.js
+++ b/web/account/siwe-button.react.js
@@ -3,8 +3,8 @@
import * as React from 'react';
import { FaEthereum } from 'react-icons/fa';
-import Button from '../components/button.react.js';
import css from './siwe.css';
+import Button from '../components/button.react.js';
type SIWEButtonProps = {
+onSIWEButtonClick: () => void,
diff --git a/web/account/siwe-login-form.react.js b/web/account/siwe-login-form.react.js
--- a/web/account/siwe-login-form.react.js
+++ b/web/account/siwe-login-form.react.js
@@ -28,14 +28,14 @@
siweMessageSigningExplanationStatements,
} from 'lib/utils/siwe-utils.js';
+import HeaderSeparator from './header-separator.react.js';
+import css from './siwe.css';
import Button from '../components/button.react.js';
import OrBreak from '../components/or-break.react.js';
import LoadingIndicator from '../loading-indicator.react.js';
import { setPrimaryIdentityPublicKey } from '../redux/primary-identity-public-key-reducer.js';
import { useSelector } from '../redux/redux-utils.js';
import { webLogInExtraInfoSelector } from '../selectors/account-selectors.js';
-import HeaderSeparator from './header-separator.react.js';
-import css from './siwe.css';
type SIWELoginFormProps = {
+cancelSIWEAuthFlow: () => void,
diff --git a/web/account/traditional-login-form.react.js b/web/account/traditional-login-form.react.js
--- a/web/account/traditional-login-form.react.js
+++ b/web/account/traditional-login-form.react.js
@@ -20,14 +20,14 @@
useServerCall,
} from 'lib/utils/action-utils.js';
+import HeaderSeparator from './header-separator.react.js';
+import css from './log-in-form.css';
+import PasswordInput from './password-input.react.js';
import Button from '../components/button.react.js';
import LoadingIndicator from '../loading-indicator.react.js';
import Input from '../modals/input.react.js';
import { useSelector } from '../redux/redux-utils.js';
import { webLogInExtraInfoSelector } from '../selectors/account-selectors.js';
-import HeaderSeparator from './header-separator.react.js';
-import css from './log-in-form.css';
-import PasswordInput from './password-input.react.js';
const loadingStatusSelector = createLoadingStatusSelector(logInActionTypes);
function TraditionalLoginForm(): React.Node {
diff --git a/web/apps/app-listing.react.js b/web/apps/app-listing.react.js
--- a/web/apps/app-listing.react.js
+++ b/web/apps/app-listing.react.js
@@ -14,8 +14,8 @@
} from 'lib/reducers/enabled-apps-reducer.js';
import type { SupportedApps } from 'lib/types/enabled-apps.js';
-import Button from '../components/button.react.js';
import css from './apps.css';
+import Button from '../components/button.react.js';
type Props = {
+id: SupportedApps | 'chat',
diff --git a/web/calendar/calendar.react.js b/web/calendar/calendar.react.js
--- a/web/calendar/calendar.react.js
+++ b/web/calendar/calendar.react.js
@@ -31,6 +31,9 @@
endDateForYearAndMonth,
} from 'lib/utils/date-utils.js';
+import css from './calendar.css';
+import Day from './day.react.js';
+import FilterPanel from './filter-panel.react.js';
import { useSelector } from '../redux/redux-utils.js';
import {
yearAssertingSelector,
@@ -39,9 +42,6 @@
} from '../selectors/nav-selectors.js';
import type { NavInfo } from '../types/nav-types.js';
import { canonicalURLFromReduxState } from '../url-utils.js';
-import css from './calendar.css';
-import Day from './day.react.js';
-import FilterPanel from './filter-panel.react.js';
type BaseProps = {
+url: string,
diff --git a/web/calendar/day.react.js b/web/calendar/day.react.js
--- a/web/calendar/day.react.js
+++ b/web/calendar/day.react.js
@@ -21,15 +21,15 @@
import type { ThreadInfo } from 'lib/types/thread-types.js';
import { dateString, dateFromString } from 'lib/utils/date-utils.js';
+import css from './calendar.css';
+import type { InnerEntry } from './entry.react.js';
+import Entry from './entry.react.js';
import LogInFirstModal from '../modals/account/log-in-first-modal.react.js';
import HistoryModal from '../modals/history/history-modal.react.js';
import ThreadPickerModal from '../modals/threads/thread-picker-modal.react.js';
import { useSelector } from '../redux/redux-utils.js';
import { htmlTargetFromEvent } from '../vector-utils.js';
import { AddVector, HistoryVector } from '../vectors.react.js';
-import css from './calendar.css';
-import type { InnerEntry } from './entry.react.js';
-import Entry from './entry.react.js';
type BaseProps = {
+dayString: string,
diff --git a/web/calendar/entry.react.js b/web/calendar/entry.react.js
--- a/web/calendar/entry.react.js
+++ b/web/calendar/entry.react.js
@@ -46,6 +46,7 @@
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import { ServerError } from 'lib/utils/errors.js';
+import css from './calendar.css';
import LoadingIndicator from '../loading-indicator.react.js';
import LogInFirstModal from '../modals/account/log-in-first-modal.react.js';
import ConcurrentModificationModal from '../modals/concurrent-modification-modal.react.js';
@@ -53,7 +54,6 @@
import { useSelector } from '../redux/redux-utils.js';
import { nonThreadCalendarQuery } from '../selectors/nav-selectors.js';
import { HistoryVector, DeleteVector } from '../vectors.react.js';
-import css from './calendar.css';
type BaseProps = {
+innerRef: (key: string, me: Entry) => void,
diff --git a/web/calendar/filter-panel.react.js b/web/calendar/filter-panel.react.js
--- a/web/calendar/filter-panel.react.js
+++ b/web/calendar/filter-panel.react.js
@@ -30,6 +30,7 @@
} from 'lib/types/filter-types.js';
import type { Dispatch } from 'lib/types/redux-types.js';
+import css from './filter-panel.css';
import ThreadSettingsModal from '../modals/threads/settings/thread-settings-modal.react.js';
import { useSelector } from '../redux/redux-utils.js';
import {
@@ -37,7 +38,6 @@
useFilterThreadSearchIndex,
} from '../selectors/calendar-selectors.js';
import { MagnifyingGlass } from '../vectors.react.js';
-import css from './filter-panel.css';
type Props = {
+filterThreadInfos: $ReadOnlyArray<FilterThreadInfo>,
diff --git a/web/chat/chat-input-bar.react.js b/web/chat/chat-input-bar.react.js
--- a/web/chat/chat-input-bar.react.js
+++ b/web/chat/chat-input-bar.react.js
@@ -36,8 +36,8 @@
threadPermissions,
type ClientThreadJoinRequest,
type ThreadJoinPayload,
+ type RelativeMemberInfo,
} from 'lib/types/thread-types.js';
-import type { RelativeMemberInfo } from 'lib/types/thread-types.js';
import { type UserInfos } from 'lib/types/user-types.js';
import {
type DispatchActionPromise,
@@ -45,6 +45,8 @@
useDispatchActionPromise,
} from 'lib/utils/action-utils.js';
+import css from './chat-input-bar.css';
+import TypeaheadTooltip from './typeahead-tooltip.react.js';
import Button from '../components/button.react.js';
import {
type InputState,
@@ -56,8 +58,6 @@
import { useSelector } from '../redux/redux-utils.js';
import { nonThreadCalendarQuery } from '../selectors/nav-selectors.js';
import { webTypeaheadRegex } from '../utils/typeahead-utils.js';
-import css from './chat-input-bar.css';
-import TypeaheadTooltip from './typeahead-tooltip.react.js';
type BaseProps = {
+threadInfo: ThreadInfo,
diff --git a/web/chat/chat-message-list-container.react.js b/web/chat/chat-message-list-container.react.js
--- a/web/chat/chat-message-list-container.react.js
+++ b/web/chat/chat-message-list-container.react.js
@@ -19,14 +19,14 @@
import { threadTypes } from 'lib/types/thread-types.js';
import type { AccountUserInfo } from 'lib/types/user-types.js';
-import { InputStateContext } from '../input/input-state.js';
-import { updateNavInfoActionType } from '../redux/action-types.js';
-import { useSelector } from '../redux/redux-utils.js';
import ChatInputBar from './chat-input-bar.react.js';
import css from './chat-message-list-container.css';
import ChatMessageList from './chat-message-list.react.js';
import ChatThreadComposer from './chat-thread-composer.react.js';
import ThreadTopBar from './thread-top-bar.react.js';
+import { InputStateContext } from '../input/input-state.js';
+import { updateNavInfoActionType } from '../redux/action-types.js';
+import { useSelector } from '../redux/redux-utils.js';
type Props = {
+activeChatThreadID: string,
diff --git a/web/chat/chat-message-list.react.js b/web/chat/chat-message-list.react.js
--- a/web/chat/chat-message-list.react.js
+++ b/web/chat/chat-message-list.react.js
@@ -26,15 +26,15 @@
useDispatchActionPromise,
} from 'lib/utils/action-utils.js';
-import { type InputState, InputStateContext } from '../input/input-state.js';
-import LoadingIndicator from '../loading-indicator.react.js';
-import { useTextMessageRulesFunc } from '../markdown/rules.react.js';
-import { useSelector } from '../redux/redux-utils.js';
import css from './chat-message-list.css';
import { MessageListContext } from './message-list-types.js';
import Message from './message.react.js';
import RelationshipPrompt from './relationship-prompt/relationship-prompt.js';
import { useTooltipContext } from './tooltip-provider.js';
+import { type InputState, InputStateContext } from '../input/input-state.js';
+import LoadingIndicator from '../loading-indicator.react.js';
+import { useTextMessageRulesFunc } from '../markdown/rules.react.js';
+import { useSelector } from '../redux/redux-utils.js';
const browser = detectBrowser();
const supportsReverseFlex =
diff --git a/web/chat/chat-tabs.react.js b/web/chat/chat-tabs.react.js
--- a/web/chat/chat-tabs.react.js
+++ b/web/chat/chat-tabs.react.js
@@ -5,12 +5,12 @@
import { unreadBackgroundCount } from 'lib/selectors/thread-selectors.js';
-import Tabs from '../components/tabs.react.js';
-import { useSelector } from '../redux/redux-utils.js';
import css from './chat-tabs.css';
import ChatThreadList from './chat-thread-list.react.js';
import ChatThreadTab from './chat-thread-tab.react.js';
import { ThreadListContext } from './thread-list-provider.js';
+import Tabs from '../components/tabs.react.js';
+import { useSelector } from '../redux/redux-utils.js';
function ChatTabs(): React.Node {
let backgroundTitle = 'Background';
diff --git a/web/chat/chat-thread-ancestors.react.js b/web/chat/chat-thread-ancestors.react.js
--- a/web/chat/chat-thread-ancestors.react.js
+++ b/web/chat/chat-thread-ancestors.react.js
@@ -10,8 +10,8 @@
import type { ThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
-import CommIcon from '../CommIcon.react.js';
import css from './chat-thread-ancestors.css';
+import CommIcon from '../CommIcon.react.js';
const SHOW_SEE_FULL_STRUCTURE = false;
diff --git a/web/chat/chat-thread-composer.react.js b/web/chat/chat-thread-composer.react.js
--- a/web/chat/chat-thread-composer.react.js
+++ b/web/chat/chat-thread-composer.react.js
@@ -10,13 +10,13 @@
import { threadIsPending } from 'lib/shared/thread-utils.js';
import type { AccountUserInfo, UserListItem } from 'lib/types/user-types.js';
+import css from './chat-thread-composer.css';
import Button from '../components/button.react.js';
import Label from '../components/label.react.js';
import Search from '../components/search.react.js';
import type { InputState } from '../input/input-state.js';
import { updateNavInfoActionType } from '../redux/action-types.js';
import { useSelector } from '../redux/redux-utils.js';
-import css from './chat-thread-composer.css';
type Props = {
+userInfoInputArray: $ReadOnlyArray<AccountUserInfo>,
diff --git a/web/chat/chat-thread-list-item-menu.react.js b/web/chat/chat-thread-list-item-menu.react.js
--- a/web/chat/chat-thread-list-item-menu.react.js
+++ b/web/chat/chat-thread-list-item-menu.react.js
@@ -7,9 +7,9 @@
import useToggleUnreadStatus from 'lib/hooks/toggle-unread-status.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
+import css from './chat-thread-list-item-menu.css';
import Button from '../components/button.react.js';
import { useThreadIsActive } from '../selectors/thread-selectors.js';
-import css from './chat-thread-list-item-menu.css';
type Props = {
+threadInfo: ThreadInfo,
diff --git a/web/chat/chat-thread-list-item.react.js b/web/chat/chat-thread-list-item.react.js
--- a/web/chat/chat-thread-list-item.react.js
+++ b/web/chat/chat-thread-list-item.react.js
@@ -12,16 +12,16 @@
useResolvedThreadInfos,
} from 'lib/utils/entity-helpers.js';
-import { useSelector } from '../redux/redux-utils.js';
-import {
- useOnClickThread,
- useThreadIsActive,
-} from '../selectors/thread-selectors.js';
import ChatThreadListItemMenu from './chat-thread-list-item-menu.react.js';
import ChatThreadListSeeMoreSidebars from './chat-thread-list-see-more-sidebars.react.js';
import ChatThreadListSidebar from './chat-thread-list-sidebar.react.js';
import css from './chat-thread-list.css';
import MessagePreview from './message-preview.react.js';
+import { useSelector } from '../redux/redux-utils.js';
+import {
+ useOnClickThread,
+ useThreadIsActive,
+} from '../selectors/thread-selectors.js';
type Props = {
+item: ChatThreadItem,
diff --git a/web/chat/chat-thread-list-see-more-sidebars.react.js b/web/chat/chat-thread-list-see-more-sidebars.react.js
--- a/web/chat/chat-thread-list-see-more-sidebars.react.js
+++ b/web/chat/chat-thread-list-see-more-sidebars.react.js
@@ -7,8 +7,8 @@
import { useModalContext } from 'lib/components/modal-provider.react.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import SidebarsModal from '../modals/threads/sidebars/sidebars-modal.react.js';
import css from './chat-thread-list.css';
+import SidebarsModal from '../modals/threads/sidebars/sidebars-modal.react.js';
type Props = {
+threadInfo: ThreadInfo,
diff --git a/web/chat/chat-thread-list-sidebar.react.js b/web/chat/chat-thread-list-sidebar.react.js
--- a/web/chat/chat-thread-list-sidebar.react.js
+++ b/web/chat/chat-thread-list-sidebar.react.js
@@ -5,13 +5,13 @@
import type { SidebarInfo } from 'lib/types/thread-types.js';
+import ChatThreadListItemMenu from './chat-thread-list-item-menu.react.js';
+import css from './chat-thread-list.css';
+import SidebarItem from './sidebar-item.react.js';
import {
useOnClickThread,
useThreadIsActive,
} from '../selectors/thread-selectors.js';
-import ChatThreadListItemMenu from './chat-thread-list-item-menu.react.js';
-import css from './chat-thread-list.css';
-import SidebarItem from './sidebar-item.react.js';
type Props = {
+sidebarInfo: SidebarInfo,
diff --git a/web/chat/chat-thread-list.react.js b/web/chat/chat-thread-list.react.js
--- a/web/chat/chat-thread-list.react.js
+++ b/web/chat/chat-thread-list.react.js
@@ -5,14 +5,14 @@
import { emptyItemText } from 'lib/shared/thread-utils.js';
+import ChatThreadListItem from './chat-thread-list-item.react.js';
+import css from './chat-thread-list.css';
+import { ThreadListContext } from './thread-list-provider.js';
import BackgroundIllustration from '../assets/background-illustration.react.js';
import Button from '../components/button.react.js';
import Search from '../components/search.react.js';
import { useSelector } from '../redux/redux-utils.js';
import { useOnClickNewThread } from '../selectors/thread-selectors.js';
-import ChatThreadListItem from './chat-thread-list-item.react.js';
-import css from './chat-thread-list.css';
-import { ThreadListContext } from './thread-list-provider.js';
function ChatThreadList(): React.Node {
const threadListContext = React.useContext(ThreadListContext);
diff --git a/web/chat/chat.react.js b/web/chat/chat.react.js
--- a/web/chat/chat.react.js
+++ b/web/chat/chat.react.js
@@ -5,10 +5,10 @@
import ThreadDraftUpdater from 'lib/components/thread-draft-updater.react.js';
import { isLoggedIn } from 'lib/selectors/user-selectors.js';
-import { useSelector } from '../redux/redux-utils.js';
import ChatMessageListContainer from './chat-message-list-container.react.js';
import ChatTabs from './chat-tabs.react.js';
import { ThreadListProvider } from './thread-list-provider.js';
+import { useSelector } from '../redux/redux-utils.js';
function Chat(): React.Node {
const loggedIn = useSelector(isLoggedIn);
diff --git a/web/chat/composed-message.react.js b/web/chat/composed-message.react.js
--- a/web/chat/composed-message.react.js
+++ b/web/chat/composed-message.react.js
@@ -13,11 +13,11 @@
import { assertComposableMessageType } from 'lib/types/message-types.js';
import { type ThreadInfo } from 'lib/types/thread-types.js';
-import { type InputState, InputStateContext } from '../input/input-state.js';
-import { tooltipPositions, useMessageTooltip } from '../utils/tooltip-utils.js';
import css from './chat-message-list.css';
import FailedSend from './failed-send.react.js';
import InlineEngagement from './inline-engagement.react.js';
+import { type InputState, InputStateContext } from '../input/input-state.js';
+import { tooltipPositions, useMessageTooltip } from '../utils/tooltip-utils.js';
const availableTooltipPositionsForViewerMessage = [
tooltipPositions.LEFT,
diff --git a/web/chat/failed-send.react.js b/web/chat/failed-send.react.js
--- a/web/chat/failed-send.react.js
+++ b/web/chat/failed-send.react.js
@@ -12,12 +12,12 @@
} from 'lib/types/message-types.js';
import { type ThreadInfo } from 'lib/types/thread-types.js';
-import Button from '../components/button.react.js';
-import { type InputState, InputStateContext } from '../input/input-state.js';
-import { useSelector } from '../redux/redux-utils.js';
import css from './chat-message-list.css';
import multimediaMessageSendFailed from './multimedia-message-send-failed.js';
import textMessageSendFailed from './text-message-send-failed.js';
+import Button from '../components/button.react.js';
+import { type InputState, InputStateContext } from '../input/input-state.js';
+import { useSelector } from '../redux/redux-utils.js';
type BaseProps = {
+item: ChatMessageInfoItem,
diff --git a/web/chat/inline-engagement.react.js b/web/chat/inline-engagement.react.js
--- a/web/chat/inline-engagement.react.js
+++ b/web/chat/inline-engagement.react.js
@@ -9,10 +9,10 @@
import { stringForReactionList } from 'lib/shared/reaction-utils.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
+import css from './inline-engagement.css';
import CommIcon from '../CommIcon.react.js';
import MessageReactionsModal from '../modals/chat/message-reactions-modal.react.js';
import { useOnClickThread } from '../selectors/thread-selectors.js';
-import css from './inline-engagement.css';
type Props = {
+threadInfo: ?ThreadInfo,
diff --git a/web/chat/message-preview.react.js b/web/chat/message-preview.react.js
--- a/web/chat/message-preview.react.js
+++ b/web/chat/message-preview.react.js
@@ -8,8 +8,8 @@
import { type MessageInfo } from 'lib/types/message-types.js';
import { type ThreadInfo } from 'lib/types/thread-types.js';
-import { getDefaultTextMessageRules } from '../markdown/rules.react.js';
import css from './chat-thread-list.css';
+import { getDefaultTextMessageRules } from '../markdown/rules.react.js';
type Props = {
+messageInfo: ?MessageInfo,
diff --git a/web/chat/message-tooltip.react.js b/web/chat/message-tooltip.react.js
--- a/web/chat/message-tooltip.react.js
+++ b/web/chat/message-tooltip.react.js
@@ -9,8 +9,6 @@
import { localIDPrefix } from 'lib/shared/message-utils.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import { useSelector } from '../redux/redux-utils.js';
-import { type MessageTooltipAction } from '../utils/tooltip-utils.js';
import {
tooltipButtonStyle,
tooltipLabelStyle,
@@ -19,6 +17,8 @@
import css from './message-tooltip.css';
import { useSendReaction } from './reaction-message-utils.js';
import { useTooltipContext } from './tooltip-provider.js';
+import { useSelector } from '../redux/redux-utils.js';
+import { type MessageTooltipAction } from '../utils/tooltip-utils.js';
type MessageTooltipProps = {
+actions: $ReadOnlyArray<MessageTooltipAction>,
diff --git a/web/chat/multimedia-message.react.js b/web/chat/multimedia-message.react.js
--- a/web/chat/multimedia-message.react.js
+++ b/web/chat/multimedia-message.react.js
@@ -7,11 +7,11 @@
import { messageTypes } from 'lib/types/message-types.js';
import { type ThreadInfo } from 'lib/types/thread-types.js';
-import { type InputState, InputStateContext } from '../input/input-state.js';
-import Multimedia from '../media/multimedia.react.js';
import css from './chat-message-list.css';
import ComposedMessage from './composed-message.react.js';
import sendFailed from './multimedia-message-send-failed.js';
+import { type InputState, InputStateContext } from '../input/input-state.js';
+import Multimedia from '../media/multimedia.react.js';
type BaseProps = {
+item: ChatMessageInfoItem,
+threadInfo: ThreadInfo,
diff --git a/web/chat/relationship-prompt/relationship-prompt-button.js b/web/chat/relationship-prompt/relationship-prompt-button.js
--- a/web/chat/relationship-prompt/relationship-prompt-button.js
+++ b/web/chat/relationship-prompt/relationship-prompt-button.js
@@ -4,8 +4,8 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import * as React from 'react';
-import Button, { type ButtonColor } from '../../components/button.react.js';
import css from './relationship-prompt.css';
+import Button, { type ButtonColor } from '../../components/button.react.js';
type Props = {
+text: string,
diff --git a/web/chat/relationship-prompt/relationship-prompt.js b/web/chat/relationship-prompt/relationship-prompt.js
--- a/web/chat/relationship-prompt/relationship-prompt.js
+++ b/web/chat/relationship-prompt/relationship-prompt.js
@@ -12,9 +12,9 @@
import { userRelationshipStatus } from 'lib/types/relationship-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import { buttonThemes } from '../../components/button.react.js';
import RelationshipPromptButtonContainer from './relationship-prompt-button-container.js';
import RelationshipPromptButton from './relationship-prompt-button.js';
+import { buttonThemes } from '../../components/button.react.js';
type Props = { +threadInfo: ThreadInfo };
diff --git a/web/chat/robotext-message.react.js b/web/chat/robotext-message.react.js
--- a/web/chat/robotext-message.react.js
+++ b/web/chat/robotext-message.react.js
@@ -13,13 +13,13 @@
useENSNamesForEntityText,
} from 'lib/utils/entity-text.js';
+import InlineEngagement from './inline-engagement.react.js';
+import css from './robotext-message.css';
import Markdown from '../markdown/markdown.react.js';
import { linkRules } from '../markdown/rules.react.js';
import { updateNavInfoActionType } from '../redux/action-types.js';
import { useSelector } from '../redux/redux-utils.js';
import { tooltipPositions, useMessageTooltip } from '../utils/tooltip-utils.js';
-import InlineEngagement from './inline-engagement.react.js';
-import css from './robotext-message.css';
const availableTooltipPositionsForRobotext = [
tooltipPositions.LEFT,
diff --git a/web/chat/sidebar-item.react.js b/web/chat/sidebar-item.react.js
--- a/web/chat/sidebar-item.react.js
+++ b/web/chat/sidebar-item.react.js
@@ -6,8 +6,8 @@
import type { SidebarInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
-import { useOnClickThread } from '../selectors/thread-selectors.js';
import css from './chat-thread-list.css';
+import { useOnClickThread } from '../selectors/thread-selectors.js';
type Props = {
+sidebarInfo: SidebarInfo,
diff --git a/web/chat/text-message.react.js b/web/chat/text-message.react.js
--- a/web/chat/text-message.react.js
+++ b/web/chat/text-message.react.js
@@ -10,11 +10,11 @@
import { messageTypes } from 'lib/types/message-types.js';
import { type ThreadInfo } from 'lib/types/thread-types.js';
-import Markdown from '../markdown/markdown.react.js';
import css from './chat-message-list.css';
import ComposedMessage from './composed-message.react.js';
import { MessageListContext } from './message-list-types.js';
import textMessageSendFailed from './text-message-send-failed.js';
+import Markdown from '../markdown/markdown.react.js';
type Props = {
+item: ChatMessageInfoItem,
diff --git a/web/chat/thread-menu.react.js b/web/chat/thread-menu.react.js
--- a/web/chat/thread-menu.react.js
+++ b/web/chat/thread-menu.react.js
@@ -25,6 +25,7 @@
useDispatchActionPromise,
} from 'lib/utils/action-utils.js';
+import css from './thread-menu.css';
import MenuItem from '../components/menu-item.react.js';
import Menu from '../components/menu.react.js';
import SidebarPromoteModal from '../modals/chat/sidebar-promote-modal.react.js';
@@ -36,7 +37,6 @@
import SidebarsModal from '../modals/threads/sidebars/sidebars-modal.react.js';
import SubchannelsModal from '../modals/threads/subchannels/subchannels-modal.react.js';
import { useSelector } from '../redux/redux-utils.js';
-import css from './thread-menu.css';
type ThreadMenuProps = {
+threadInfo: ThreadInfo,
diff --git a/web/chat/tooltip-provider.js b/web/chat/tooltip-provider.js
--- a/web/chat/tooltip-provider.js
+++ b/web/chat/tooltip-provider.js
@@ -6,8 +6,8 @@
import type { SetState } from 'lib/types/hook-types.js';
-import type { TooltipPositionStyle } from '../utils/tooltip-utils.js';
import css from './tooltip.css';
+import type { TooltipPositionStyle } from '../utils/tooltip-utils.js';
const onMouseLeaveSourceDisappearTimeoutMs = 200;
const onMouseLeaveTooltipDisappearTimeoutMs = 100;
diff --git a/web/chat/typeahead-tooltip.react.js b/web/chat/typeahead-tooltip.react.js
--- a/web/chat/typeahead-tooltip.react.js
+++ b/web/chat/typeahead-tooltip.react.js
@@ -7,6 +7,7 @@
import type { RelativeMemberInfo } from 'lib/types/thread-types.js';
import { leastPositiveResidue } from 'lib/utils/math-utils.js';
+import css from './typeahead-tooltip.css';
import type { InputState } from '../input/input-state.js';
import {
getTypeaheadOverlayScroll,
@@ -14,7 +15,6 @@
getTypeaheadTooltipButtons,
getTypeaheadTooltipPosition,
} from '../utils/typeahead-utils.js';
-import css from './typeahead-tooltip.css';
export type TypeaheadTooltipProps = {
+inputState: InputState,
diff --git a/web/components/menu.react.js b/web/components/menu.react.js
--- a/web/components/menu.react.js
+++ b/web/components/menu.react.js
@@ -3,8 +3,8 @@
import classnames from 'classnames';
import * as React from 'react';
-import { useRenderMenu } from '../menu-provider.react.js';
import css from './menu.css';
+import { useRenderMenu } from '../menu-provider.react.js';
type MenuVariant = 'thread-actions' | 'member-actions';
diff --git a/web/components/navigation-arrows.react.js b/web/components/navigation-arrows.react.js
--- a/web/components/navigation-arrows.react.js
+++ b/web/components/navigation-arrows.react.js
@@ -5,9 +5,9 @@
import SWMansionIcon from 'lib/components/SWMansionIcon.react.js';
+import css from './navigation-arrows.css';
import electron from '../electron.js';
import history from '../router-history.js';
-import css from './navigation-arrows.css';
const stopDoubleClickPropagation = e => e.stopPropagation();
diff --git a/web/components/stepper.react.js b/web/components/stepper.react.js
--- a/web/components/stepper.react.js
+++ b/web/components/stepper.react.js
@@ -3,9 +3,9 @@
import classnames from 'classnames';
import * as React from 'react';
-import LoadingIndicator from '../loading-indicator.react.js';
import Button from './button.react.js';
import css from './stepper.css';
+import LoadingIndicator from '../loading-indicator.react.js';
export type ButtonProps = {
+content: React.Node,
diff --git a/web/input/input-state-container.react.js b/web/input/input-state-container.react.js
--- a/web/input/input-state-container.react.js
+++ b/web/input/input-state-container.react.js
@@ -76,16 +76,16 @@
import { getConfig } from 'lib/utils/config.js';
import { getMessageForException, cloneError } from 'lib/utils/errors.js';
-import { validateFile, preloadImage } from '../media/media-utils.js';
-import InvalidUploadModal from '../modals/chat/invalid-upload.react.js';
-import { useSelector } from '../redux/redux-utils.js';
-import { nonThreadCalendarQuery } from '../selectors/nav-selectors.js';
import {
type PendingMultimediaUpload,
type InputState,
type TypeaheadState,
InputStateContext,
} from './input-state.js';
+import { validateFile, preloadImage } from '../media/media-utils.js';
+import InvalidUploadModal from '../modals/chat/invalid-upload.react.js';
+import { useSelector } from '../redux/redux-utils.js';
+import { nonThreadCalendarQuery } from '../selectors/nav-selectors.js';
const browser = detectBrowser();
const exifRotate =
diff --git a/web/markdown/rules.react.js b/web/markdown/rules.react.js
--- a/web/markdown/rules.react.js
+++ b/web/markdown/rules.react.js
@@ -8,8 +8,8 @@
import * as SharedMarkdown from 'lib/shared/markdown.js';
import type { RelativeMemberInfo } from 'lib/types/thread-types.js';
-import { useSelector } from '../redux/redux-utils.js';
import MarkdownSpoiler from './markdown-spoiler.react.js';
+import { useSelector } from '../redux/redux-utils.js';
export type MarkdownRules = {
+simpleMarkdownRules: SharedMarkdown.ParserRules,
diff --git a/web/media/multimedia.react.js b/web/media/multimedia.react.js
--- a/web/media/multimedia.react.js
+++ b/web/media/multimedia.react.js
@@ -16,10 +16,10 @@
} from 'lib/components/modal-provider.react.js';
import type { MediaType } from 'lib/types/media-types.js';
-import Button from '../components/button.react.js';
-import { type PendingMultimediaUpload } from '../input/input-state.js';
import css from './media.css';
import MultimediaModal from './multimedia-modal.react.js';
+import Button from '../components/button.react.js';
+import { type PendingMultimediaUpload } from '../input/input-state.js';
type BaseProps = {
+uri: string,
diff --git a/web/modals/account/log-in-first-modal.react.js b/web/modals/account/log-in-first-modal.react.js
--- a/web/modals/account/log-in-first-modal.react.js
+++ b/web/modals/account/log-in-first-modal.react.js
@@ -7,9 +7,9 @@
type PushModal,
} from 'lib/components/modal-provider.react.js';
+import LogInModal from './log-in-modal.react.js';
import css from '../../style.css';
import Modal from '../modal.react.js';
-import LogInModal from './log-in-modal.react.js';
type BaseProps = {
+inOrderTo: string,
diff --git a/web/modals/alert.react.js b/web/modals/alert.react.js
--- a/web/modals/alert.react.js
+++ b/web/modals/alert.react.js
@@ -4,9 +4,9 @@
import { useModalContext } from 'lib/components/modal-provider.react.js';
-import Button from '../components/button.react.js';
import css from './alert.css';
import Modal from './modal.react.js';
+import Button from '../components/button.react.js';
type AlertProps = {
+title: string,
diff --git a/web/modals/chat/message-reactions-modal.react.js b/web/modals/chat/message-reactions-modal.react.js
--- a/web/modals/chat/message-reactions-modal.react.js
+++ b/web/modals/chat/message-reactions-modal.react.js
@@ -5,8 +5,8 @@
import type { MessageReactionInfo } from 'lib/selectors/chat-selectors.js';
import { useMessageReactionsList } from 'lib/shared/reaction-utils.js';
-import Modal from '../modal.react.js';
import css from './message-reactions-modal.css';
+import Modal from '../modal.react.js';
type Props = {
+onClose: () => void,
diff --git a/web/modals/chat/sidebar-promote-modal.react.js b/web/modals/chat/sidebar-promote-modal.react.js
--- a/web/modals/chat/sidebar-promote-modal.react.js
+++ b/web/modals/chat/sidebar-promote-modal.react.js
@@ -5,9 +5,9 @@
import type { ThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
+import css from './sidebar-promote-modal.css';
import Button from '../../components/button.react.js';
import Modal from '../modal.react.js';
-import css from './sidebar-promote-modal.css';
type Props = {
+onClose: () => void,
diff --git a/web/modals/components/add-members-item.react.js b/web/modals/components/add-members-item.react.js
--- a/web/modals/components/add-members-item.react.js
+++ b/web/modals/components/add-members-item.react.js
@@ -4,8 +4,8 @@
import type { UserListItem } from 'lib/types/user-types.js';
-import Button from '../../components/button.react.js';
import css from './add-members.css';
+import Button from '../../components/button.react.js';
type AddMembersItemProps = {
+userInfo: UserListItem,
diff --git a/web/modals/concurrent-modification-modal.react.js b/web/modals/concurrent-modification-modal.react.js
--- a/web/modals/concurrent-modification-modal.react.js
+++ b/web/modals/concurrent-modification-modal.react.js
@@ -4,9 +4,9 @@
import { useModalContext } from 'lib/components/modal-provider.react.js';
-import Button from '../components/button.react.js';
import css from './concurrent-modification-modal.css';
import Modal from './modal.react.js';
+import Button from '../components/button.react.js';
type Props = {
+onRefresh: () => void,
diff --git a/web/modals/history/history-entry.react.js b/web/modals/history/history-entry.react.js
--- a/web/modals/history/history-entry.react.js
+++ b/web/modals/history/history-entry.react.js
@@ -28,10 +28,10 @@
} from 'lib/utils/action-utils.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
+import css from './history.css';
import LoadingIndicator from '../../loading-indicator.react.js';
import { useSelector } from '../../redux/redux-utils.js';
import { nonThreadCalendarQuery } from '../../selectors/nav-selectors.js';
-import css from './history.css';
type BaseProps = {
+entryInfo: EntryInfo,
diff --git a/web/modals/history/history-modal.react.js b/web/modals/history/history-modal.react.js
--- a/web/modals/history/history-modal.react.js
+++ b/web/modals/history/history-modal.react.js
@@ -35,13 +35,13 @@
} from 'lib/utils/action-utils.js';
import { prettyDateWithoutDay } from 'lib/utils/date-utils.js';
+import HistoryEntry from './history-entry.react.js';
+import HistoryRevision from './history-revision.react.js';
+import css from './history.css';
import LoadingIndicator from '../../loading-indicator.react.js';
import { useSelector } from '../../redux/redux-utils.js';
import { allDaysToEntries } from '../../selectors/entry-selectors.js';
import Modal from '../modal.react.js';
-import HistoryEntry from './history-entry.react.js';
-import HistoryRevision from './history-revision.react.js';
-import css from './history.css';
type BaseProps = {
+mode: HistoryMode,
diff --git a/web/modals/history/history-revision.react.js b/web/modals/history/history-revision.react.js
--- a/web/modals/history/history-revision.react.js
+++ b/web/modals/history/history-revision.react.js
@@ -10,8 +10,8 @@
import { colorIsDark } from 'lib/shared/thread-utils.js';
import type { HistoryRevisionInfo } from 'lib/types/history-types.js';
-import { useSelector } from '../../redux/redux-utils.js';
import css from './history.css';
+import { useSelector } from '../../redux/redux-utils.js';
type Props = {
+revisionInfo: HistoryRevisionInfo,
diff --git a/web/modals/modal.react.js b/web/modals/modal.react.js
--- a/web/modals/modal.react.js
+++ b/web/modals/modal.react.js
@@ -8,8 +8,8 @@
type Icon,
} from 'lib/components/SWMansionIcon.react.js';
-import Button from '../components/button.react.js';
import css from './modal.css';
+import Button from '../components/button.react.js';
export type ModalSize = 'small' | 'large' | 'fit-content';
diff --git a/web/modals/search-modal.react.js b/web/modals/search-modal.react.js
--- a/web/modals/search-modal.react.js
+++ b/web/modals/search-modal.react.js
@@ -2,9 +2,9 @@
import * as React from 'react';
-import Search from '../components/search.react.js';
import Modal, { type ModalOverridableProps } from './modal.react.js';
import css from './search-modal.css';
+import Search from '../components/search.react.js';
type Props = {
...ModalOverridableProps,
diff --git a/web/modals/terms-and-privacy-modal.react.js b/web/modals/terms-and-privacy-modal.react.js
--- a/web/modals/terms-and-privacy-modal.react.js
+++ b/web/modals/terms-and-privacy-modal.react.js
@@ -14,11 +14,11 @@
} from 'lib/utils/action-utils.js';
import { acknowledgePolicy } from 'lib/utils/policy-acknowledge-utlis.js';
+import Modal from './modal.react.js';
+import css from './terms-and-privacy-modal.css';
import Button, { buttonThemes } from '../components/button.react.js';
import LoadingIndicator from '../loading-indicator.react.js';
import { useSelector } from '../redux/redux-utils.js';
-import Modal from './modal.react.js';
-import css from './terms-and-privacy-modal.css';
const loadingStatusSelector = createLoadingStatusSelector(
policyAcknowledgmentActionTypes,
diff --git a/web/modals/threads/cant-leave-thread-modal.react.js b/web/modals/threads/cant-leave-thread-modal.react.js
--- a/web/modals/threads/cant-leave-thread-modal.react.js
+++ b/web/modals/threads/cant-leave-thread-modal.react.js
@@ -2,9 +2,9 @@
import * as React from 'react';
+import css from './cant-leave-thread-modal.css';
import Button from '../../components/button.react.js';
import Modal from '../modal.react.js';
-import css from './cant-leave-thread-modal.css';
type Props = {
+onClose: () => void,
diff --git a/web/modals/threads/color-selector-button.react.js b/web/modals/threads/color-selector-button.react.js
--- a/web/modals/threads/color-selector-button.react.js
+++ b/web/modals/threads/color-selector-button.react.js
@@ -4,8 +4,8 @@
import * as React from 'react';
import tinycolor from 'tinycolor2';
-import Button from '../../components/button.react.js';
import css from './color-selector-button.css';
+import Button from '../../components/button.react.js';
type ColorSelectorButtonProps = {
+color: string,
diff --git a/web/modals/threads/confirm-leave-thread-modal.react.js b/web/modals/threads/confirm-leave-thread-modal.react.js
--- a/web/modals/threads/confirm-leave-thread-modal.react.js
+++ b/web/modals/threads/confirm-leave-thread-modal.react.js
@@ -5,9 +5,9 @@
import { type ThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
+import css from './confirm-leave-thread-modal.css';
import Button, { buttonThemes } from '../../components/button.react.js';
import Modal from '../modal.react.js';
-import css from './confirm-leave-thread-modal.css';
type Props = {
+threadInfo: ThreadInfo,
diff --git a/web/modals/threads/create/compose-subchannel-modal.react.js b/web/modals/threads/create/compose-subchannel-modal.react.js
--- a/web/modals/threads/create/compose-subchannel-modal.react.js
+++ b/web/modals/threads/create/compose-subchannel-modal.react.js
@@ -13,14 +13,14 @@
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import { trimText } from 'lib/utils/text-utils.js';
-import Stepper from '../../../components/stepper.react.js';
-import { updateNavInfoActionType } from '../../../redux/action-types.js';
-import { nonThreadCalendarQuery } from '../../../selectors/nav-selectors.js';
-import Modal from '../../modal.react.js';
import css from './compose-subchannel-modal.css';
import SubchannelMembers from './steps/subchannel-members.react.js';
import SubchannelSettings from './steps/subchannel-settings.react.js';
import type { VisibilityType } from './steps/subchannel-settings.react.js';
+import Stepper from '../../../components/stepper.react.js';
+import { updateNavInfoActionType } from '../../../redux/action-types.js';
+import { nonThreadCalendarQuery } from '../../../selectors/nav-selectors.js';
+import Modal from '../../modal.react.js';
type Props = {
+onClose: () => void,
diff --git a/web/modals/threads/create/steps/subchannel-members.react.js b/web/modals/threads/create/steps/subchannel-members.react.js
--- a/web/modals/threads/create/steps/subchannel-members.react.js
+++ b/web/modals/threads/create/steps/subchannel-members.react.js
@@ -7,9 +7,9 @@
import { useAncestorThreads } from 'lib/shared/ancestor-threads.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import Search from '../../../../components/search.react.js';
import MembersList from './subchannel-members-list.react.js';
import css from './subchannel-members.css';
+import Search from '../../../../components/search.react.js';
type SubchannelMembersProps = {
+parentThreadInfo: ThreadInfo,
diff --git a/web/modals/threads/create/steps/subchannel-settings.react.js b/web/modals/threads/create/steps/subchannel-settings.react.js
--- a/web/modals/threads/create/steps/subchannel-settings.react.js
+++ b/web/modals/threads/create/steps/subchannel-settings.react.js
@@ -6,10 +6,10 @@
import { threadTypeDescriptions } from 'lib/shared/thread-utils.js';
import { threadTypes } from 'lib/types/thread-types.js';
+import css from './subchannel-settings.css';
import CommIcon from '../../../../CommIcon.react.js';
import EnumSettingsOption from '../../../../components/enum-settings-option.react.js';
import Input from '../../../input.react.js';
-import css from './subchannel-settings.css';
const { COMMUNITY_OPEN_SUBTHREAD, COMMUNITY_SECRET_SUBTHREAD } = threadTypes;
diff --git a/web/modals/threads/members/add-members-modal.react.js b/web/modals/threads/members/add-members-modal.react.js
--- a/web/modals/threads/members/add-members-modal.react.js
+++ b/web/modals/threads/members/add-members-modal.react.js
@@ -19,12 +19,12 @@
useServerCall,
} from 'lib/utils/action-utils.js';
+import AddMembersListContent from './add-members-list-content.react.js';
+import css from './members-modal.css';
import Button from '../../../components/button.react.js';
import Label from '../../../components/label.react.js';
import { useSelector } from '../../../redux/redux-utils.js';
import SearchModal from '../../search-modal.react.js';
-import AddMembersListContent from './add-members-list-content.react.js';
-import css from './members-modal.css';
type ContentProps = {
+searchText: string,
diff --git a/web/modals/threads/members/member.react.js b/web/modals/threads/members/member.react.js
--- a/web/modals/threads/members/member.react.js
+++ b/web/modals/threads/members/member.react.js
@@ -26,10 +26,10 @@
useServerCall,
} from 'lib/utils/action-utils.js';
+import css from './members-modal.css';
import Label from '../../../components/label.react.js';
import MenuItem from '../../../components/menu-item.react.js';
import Menu from '../../../components/menu.react.js';
-import css from './members-modal.css';
type Props = {
+memberInfo: RelativeMemberInfo,
diff --git a/web/modals/threads/members/members-modal.react.js b/web/modals/threads/members/members-modal.react.js
--- a/web/modals/threads/members/members-modal.react.js
+++ b/web/modals/threads/members/members-modal.react.js
@@ -15,13 +15,13 @@
threadPermissions,
} from 'lib/types/thread-types.js';
+import AddMembersModal from './add-members-modal.react.js';
+import ThreadMembersList from './members-list.react.js';
+import css from './members-modal.css';
import Button from '../../../components/button.react.js';
import Tabs from '../../../components/tabs.react.js';
import { useSelector } from '../../../redux/redux-utils.js';
import SearchModal from '../../search-modal.react.js';
-import AddMembersModal from './add-members-modal.react.js';
-import ThreadMembersList from './members-list.react.js';
-import css from './members-modal.css';
type ContentProps = {
+searchText: string,
diff --git a/web/modals/threads/notifications/notifications-modal.react.js b/web/modals/threads/notifications/notifications-modal.react.js
--- a/web/modals/threads/notifications/notifications-modal.react.js
+++ b/web/modals/threads/notifications/notifications-modal.react.js
@@ -14,6 +14,7 @@
useDispatchActionPromise,
} from 'lib/utils/action-utils.js';
+import css from './notifications-modal.css';
import AllNotifsIllustration from '../../../assets/all-notifs.react.js';
import BadgeNotifsIllustration from '../../../assets/badge-notifs.react.js';
import MutedNotifsIllustration from '../../../assets/muted-notifs.react.js';
@@ -21,7 +22,6 @@
import EnumSettingsOption from '../../../components/enum-settings-option.react.js';
import { useSelector } from '../../../redux/redux-utils.js';
import Modal from '../../modal.react.js';
-import css from './notifications-modal.css';
type NotificationSettings = 'focused' | 'badge-only' | 'background';
diff --git a/web/modals/threads/settings/submit-section.react.js b/web/modals/threads/settings/submit-section.react.js
--- a/web/modals/threads/settings/submit-section.react.js
+++ b/web/modals/threads/settings/submit-section.react.js
@@ -3,9 +3,9 @@
import classnames from 'classnames';
import * as React from 'react';
+import css from './submit-section.css';
import type { ButtonProps } from '../../../components/button.react.js';
import Button from '../../../components/button.react.js';
-import css from './submit-section.css';
type Props = {
...ButtonProps,
diff --git a/web/modals/threads/settings/thread-settings-delete-tab.react.js b/web/modals/threads/settings/thread-settings-delete-tab.react.js
--- a/web/modals/threads/settings/thread-settings-delete-tab.react.js
+++ b/web/modals/threads/settings/thread-settings-delete-tab.react.js
@@ -15,9 +15,9 @@
useServerCall,
} from 'lib/utils/action-utils.js';
-import { buttonThemes } from '../../../components/button.react.js';
import SubmitSection from './submit-section.react.js';
import css from './thread-settings-delete-tab.css';
+import { buttonThemes } from '../../../components/button.react.js';
type ThreadSettingsDeleteTabProps = {
+threadSettingsOperationInProgress: boolean,
diff --git a/web/modals/threads/settings/thread-settings-general-tab.react.js b/web/modals/threads/settings/thread-settings-general-tab.react.js
--- a/web/modals/threads/settings/thread-settings-general-tab.react.js
+++ b/web/modals/threads/settings/thread-settings-general-tab.react.js
@@ -20,11 +20,11 @@
} from 'lib/utils/action-utils.js';
import { firstLine } from 'lib/utils/string-utils.js';
+import SubmitSection from './submit-section.react.js';
+import css from './thread-settings-general-tab.css';
import LoadingIndicator from '../../../loading-indicator.react.js';
import Input from '../../input.react.js';
import ColorSelector from '../color-selector.react.js';
-import SubmitSection from './submit-section.react.js';
-import css from './thread-settings-general-tab.css';
type ThreadSettingsGeneralTabProps = {
+threadSettingsOperationInProgress: boolean,
diff --git a/web/modals/threads/settings/thread-settings-modal.react.js b/web/modals/threads/settings/thread-settings-modal.react.js
--- a/web/modals/threads/settings/thread-settings-modal.react.js
+++ b/web/modals/threads/settings/thread-settings-modal.react.js
@@ -24,14 +24,14 @@
} from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
-import Tabs from '../../../components/tabs.react.js';
-import { useSelector } from '../../../redux/redux-utils.js';
-import Modal from '../../modal.react.js';
import ThreadSettingsDeleteTab from './thread-settings-delete-tab.react.js';
import ThreadSettingsGeneralTab from './thread-settings-general-tab.react.js';
import css from './thread-settings-modal.css';
import ThreadSettingsPrivacyTab from './thread-settings-privacy-tab.react.js';
import ThreadSettingsRelationshipTab from './thread-settings-relationship-tab.react.js';
+import Tabs from '../../../components/tabs.react.js';
+import { useSelector } from '../../../redux/redux-utils.js';
+import Modal from '../../modal.react.js';
type TabType = 'general' | 'privacy' | 'delete' | 'relationship';
type BaseProps = {
diff --git a/web/modals/threads/settings/thread-settings-privacy-tab.react.js b/web/modals/threads/settings/thread-settings-privacy-tab.react.js
--- a/web/modals/threads/settings/thread-settings-privacy-tab.react.js
+++ b/web/modals/threads/settings/thread-settings-privacy-tab.react.js
@@ -20,9 +20,9 @@
useServerCall,
} from 'lib/utils/action-utils.js';
-import EnumSettingsOption from '../../../components/enum-settings-option.react.js';
import SubmitSection from './submit-section.react.js';
import css from './thread-settings-privacy-tab.css';
+import EnumSettingsOption from '../../../components/enum-settings-option.react.js';
const { COMMUNITY_OPEN_SUBTHREAD, COMMUNITY_SECRET_SUBTHREAD } = threadTypes;
diff --git a/web/modals/threads/settings/thread-settings-relationship-button.react.js b/web/modals/threads/settings/thread-settings-relationship-button.react.js
--- a/web/modals/threads/settings/thread-settings-relationship-button.react.js
+++ b/web/modals/threads/settings/thread-settings-relationship-button.react.js
@@ -29,9 +29,9 @@
useServerCall,
} from 'lib/utils/action-utils.js';
+import css from './thread-settings-relationship-tab.css';
import Button, { buttonThemes } from '../../../components/button.react.js';
import { useSelector } from '../../../redux/redux-utils.js';
-import css from './thread-settings-relationship-tab.css';
const loadingStatusSelector = createLoadingStatusSelector(
updateRelationshipsActionTypes,
diff --git a/web/modals/threads/sidebars/sidebar.react.js b/web/modals/threads/sidebars/sidebar.react.js
--- a/web/modals/threads/sidebars/sidebar.react.js
+++ b/web/modals/threads/sidebars/sidebar.react.js
@@ -9,10 +9,10 @@
import { shortAbsoluteDate } from 'lib/utils/date-utils.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
+import css from './sidebars-modal.css';
import Button from '../../../components/button.react.js';
import { getDefaultTextMessageRules } from '../../../markdown/rules.react.js';
import { useOnClickThread } from '../../../selectors/thread-selectors.js';
-import css from './sidebars-modal.css';
type Props = {
+sidebar: ChatThreadItem,
diff --git a/web/modals/threads/sidebars/sidebars-modal.react.js b/web/modals/threads/sidebars/sidebars-modal.react.js
--- a/web/modals/threads/sidebars/sidebars-modal.react.js
+++ b/web/modals/threads/sidebars/sidebars-modal.react.js
@@ -5,10 +5,10 @@
import { useFilteredChildThreads } from 'lib/hooks/child-threads.js';
import { threadInChatList, threadIsSidebar } from 'lib/shared/thread-utils.js';
-import Tabs from '../../../components/tabs.react.js';
-import SearchModal from '../../search-modal.react.js';
import SidebarList from './sidebar-list.react.js';
import css from './sidebars-modal.css';
+import Tabs from '../../../components/tabs.react.js';
+import SearchModal from '../../search-modal.react.js';
type SidebarTab = 'All Threads' | 'My Threads';
diff --git a/web/modals/threads/subchannels/subchannel.react.js b/web/modals/threads/subchannels/subchannel.react.js
--- a/web/modals/threads/subchannels/subchannel.react.js
+++ b/web/modals/threads/subchannels/subchannel.react.js
@@ -10,10 +10,10 @@
import { shortAbsoluteDate } from 'lib/utils/date-utils.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
+import css from './subchannels-modal.css';
import Button from '../../../components/button.react.js';
import { getDefaultTextMessageRules } from '../../../markdown/rules.react.js';
import { useOnClickThread } from '../../../selectors/thread-selectors.js';
-import css from './subchannels-modal.css';
type Props = {
+chatThreadItem: ChatThreadItem,
diff --git a/web/modals/threads/subchannels/subchannels-modal.react.js b/web/modals/threads/subchannels/subchannels-modal.react.js
--- a/web/modals/threads/subchannels/subchannels-modal.react.js
+++ b/web/modals/threads/subchannels/subchannels-modal.react.js
@@ -5,9 +5,9 @@
import { useFilteredChildThreads } from 'lib/hooks/child-threads.js';
import { threadIsChannel } from 'lib/shared/thread-utils.js';
-import SearchModal from '../../search-modal.react.js';
import Subchannel from './subchannel.react.js';
import css from './subchannels-modal.css';
+import SearchModal from '../../search-modal.react.js';
type ContentProps = {
+searchText: string,
diff --git a/web/modals/threads/thread-picker-modal.react.js b/web/modals/threads/thread-picker-modal.react.js
--- a/web/modals/threads/thread-picker-modal.react.js
+++ b/web/modals/threads/thread-picker-modal.react.js
@@ -9,11 +9,11 @@
import type { ThreadInfo } from 'lib/types/thread-types.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
+import css from './thread-picker-modal.css';
import Button from '../../components/button.react.js';
import Search from '../../components/search.react.js';
import { useSelector } from '../../redux/redux-utils.js';
import Modal, { type ModalOverridableProps } from '../modal.react.js';
-import css from './thread-picker-modal.css';
type OptionProps = {
+threadInfo: ThreadInfo,
diff --git a/web/modals/update-modal.react.js b/web/modals/update-modal.react.js
--- a/web/modals/update-modal.react.js
+++ b/web/modals/update-modal.react.js
@@ -4,10 +4,10 @@
import { useModalContext } from 'lib/components/modal-provider.react.js';
-import Button from '../components/button.react.js';
-import electron from '../electron.js';
import Modal from './modal.react.js';
import css from './update-modal.css';
+import Button from '../components/button.react.js';
+import electron from '../electron.js';
type Props = {
+title: string,
diff --git a/web/redux/device-id-reducer.js b/web/redux/device-id-reducer.js
--- a/web/redux/device-id-reducer.js
+++ b/web/redux/device-id-reducer.js
@@ -6,9 +6,9 @@
} from 'lib/actions/user-actions.js';
import { setNewSessionActionType } from 'lib/utils/action-utils.js';
+import { setDeviceIDActionType } from './action-types.js';
import type { Action } from '../redux/redux-setup.js';
import { deviceIDFormatRegex } from '../utils/device-id.js';
-import { setDeviceIDActionType } from './action-types.js';
export function reduceDeviceID(state: ?string, action: Action): ?string {
if (action.type === setDeviceIDActionType) {
diff --git a/web/redux/device-id-updater.js b/web/redux/device-id-updater.js
--- a/web/redux/device-id-updater.js
+++ b/web/redux/device-id-updater.js
@@ -2,8 +2,8 @@
import * as React from 'react';
import { useDispatch, useSelector } from 'react-redux';
-import { generateDeviceID, deviceTypes } from '../utils/device-id.js';
import { setDeviceIDActionType } from './action-types.js';
+import { generateDeviceID, deviceTypes } from '../utils/device-id.js';
function DeviceIDUpdater(): null {
const dispatch = useDispatch();
diff --git a/web/redux/policy-acknowledgment-handler.js b/web/redux/policy-acknowledgment-handler.js
--- a/web/redux/policy-acknowledgment-handler.js
+++ b/web/redux/policy-acknowledgment-handler.js
@@ -5,8 +5,8 @@
import { useModalContext } from 'lib/components/modal-provider.react.js';
import { policyTypes } from 'lib/facts/policies.js';
-import TermsAndPrivacyModal from '../modals/terms-and-privacy-modal.react.js';
import { useSelector } from './redux-utils.js';
+import TermsAndPrivacyModal from '../modals/terms-and-privacy-modal.react.js';
function PolicyAcknowledgmentHandler(): null {
const termsAndPrivacyState = useSelector(
diff --git a/web/redux/redux-setup.js b/web/redux/redux-setup.js
--- a/web/redux/redux-setup.js
+++ b/web/redux/redux-setup.js
@@ -27,8 +27,6 @@
import type { CurrentUserInfo, UserStore } from 'lib/types/user-types.js';
import { setNewSessionActionType } from 'lib/utils/action-utils.js';
-import { activeThreadSelector } from '../selectors/nav-selectors.js';
-import { type NavInfo } from '../types/nav-types.js';
import {
updateWindowActiveActionType,
setDeviceIDActionType,
@@ -42,6 +40,8 @@
setPrimaryIdentityPublicKey,
} from './primary-identity-public-key-reducer.js';
import { getVisibility } from './visibility.js';
+import { activeThreadSelector } from '../selectors/nav-selectors.js';
+import { type NavInfo } from '../types/nav-types.js';
export type WindowDimensions = { width: number, height: number };
export type AppState = {
diff --git a/web/settings/account-delete-modal.react.js b/web/settings/account-delete-modal.react.js
--- a/web/settings/account-delete-modal.react.js
+++ b/web/settings/account-delete-modal.react.js
@@ -20,11 +20,11 @@
useServerCall,
} from 'lib/utils/action-utils.js';
+import css from './account-delete-modal.css';
import Button, { buttonThemes } from '../components/button.react.js';
import Input from '../modals/input.react.js';
import Modal from '../modals/modal.react.js';
import { useSelector } from '../redux/redux-utils.js';
-import css from './account-delete-modal.css';
type Props = {
+isAccountWithPassword: boolean,
diff --git a/web/settings/account-settings.react.js b/web/settings/account-settings.react.js
--- a/web/settings/account-settings.react.js
+++ b/web/settings/account-settings.react.js
@@ -13,12 +13,12 @@
useServerCall,
} from 'lib/utils/action-utils.js';
-import Button from '../components/button.react.js';
-import { useSelector } from '../redux/redux-utils.js';
import css from './account-settings.css';
import PasswordChangeModal from './password-change-modal.js';
import BlockListModal from './relationship/block-list-modal.react.js';
import FriendListModal from './relationship/friend-list-modal.react.js';
+import Button from '../components/button.react.js';
+import { useSelector } from '../redux/redux-utils.js';
function AccountSettings(): React.Node {
const sendLogoutRequest = useServerCall(logOut);
diff --git a/web/settings/danger-zone.react.js b/web/settings/danger-zone.react.js
--- a/web/settings/danger-zone.react.js
+++ b/web/settings/danger-zone.react.js
@@ -4,9 +4,9 @@
import { useModalContext } from 'lib/components/modal-provider.react.js';
-import Button, { buttonThemes } from '../components/button.react.js';
import AccountDeleteModal from './account-delete-modal.react.js';
import css from './danger-zone.css';
+import Button, { buttonThemes } from '../components/button.react.js';
function DangerZone(): React.Node {
const { pushModal } = useModalContext();
diff --git a/web/settings/password-change-modal.js b/web/settings/password-change-modal.js
--- a/web/settings/password-change-modal.js
+++ b/web/settings/password-change-modal.js
@@ -17,11 +17,11 @@
useServerCall,
} from 'lib/utils/action-utils.js';
+import css from './password-change-modal.css';
import Button from '../components/button.react.js';
import Input from '../modals/input.react.js';
import Modal from '../modals/modal.react.js';
import { useSelector } from '../redux/redux-utils.js';
-import css from './password-change-modal.css';
type Props = {
+inputDisabled: boolean,
diff --git a/web/settings/relationship/add-users-list-item.react.js b/web/settings/relationship/add-users-list-item.react.js
--- a/web/settings/relationship/add-users-list-item.react.js
+++ b/web/settings/relationship/add-users-list-item.react.js
@@ -4,8 +4,8 @@
import type { AccountUserInfo } from 'lib/types/user-types.js';
-import Button from '../../components/button.react.js';
import css from './add-users-list.css';
+import Button from '../../components/button.react.js';
type Props = {
+userInfo: AccountUserInfo,
diff --git a/web/settings/relationship/add-users-list-modal.react.js b/web/settings/relationship/add-users-list-modal.react.js
--- a/web/settings/relationship/add-users-list-modal.react.js
+++ b/web/settings/relationship/add-users-list-modal.react.js
@@ -7,9 +7,9 @@
RelationshipAction,
} from 'lib/types/relationship-types.js';
+import AddUsersList from './add-users-list.react.js';
import type { ButtonColor } from '../../components/button.react.js';
import SearchModal from '../../modals/search-modal.react.js';
-import AddUsersList from './add-users-list.react.js';
type Props = {
+closeModal: () => void,
diff --git a/web/settings/relationship/add-users-list.react.js b/web/settings/relationship/add-users-list.react.js
--- a/web/settings/relationship/add-users-list.react.js
+++ b/web/settings/relationship/add-users-list.react.js
@@ -20,13 +20,13 @@
useServerCall,
} from 'lib/utils/action-utils.js';
+import AddUsersListItem from './add-users-list-item.react.js';
+import css from './add-users-list.css';
import Button from '../../components/button.react.js';
import type { ButtonColor } from '../../components/button.react.js';
import Label from '../../components/label.react.js';
import LoadingIndicator from '../../loading-indicator.react.js';
import { useSelector } from '../../redux/redux-utils.js';
-import AddUsersListItem from './add-users-list-item.react.js';
-import css from './add-users-list.css';
const loadingStatusSelector = createLoadingStatusSelector(
updateRelationshipsActionTypes,
diff --git a/web/settings/relationship/block-list-row.react.js b/web/settings/relationship/block-list-row.react.js
--- a/web/settings/relationship/block-list-row.react.js
+++ b/web/settings/relationship/block-list-row.react.js
@@ -5,10 +5,10 @@
import SWMansionIcon from 'lib/components/SWMansionIcon.react.js';
import { useRelationshipCallbacks } from 'lib/hooks/relationship-prompt.js';
-import MenuItem from '../../components/menu-item.react.js';
-import Menu from '../../components/menu.react.js';
import css from './user-list-row.css';
import type { UserRowProps } from './user-list.react.js';
+import MenuItem from '../../components/menu-item.react.js';
+import Menu from '../../components/menu.react.js';
function BlockListRow(props: UserRowProps): React.Node {
const { userInfo, onMenuVisibilityChange } = props;
diff --git a/web/settings/relationship/block-users-modal.react.js b/web/settings/relationship/block-users-modal.react.js
--- a/web/settings/relationship/block-users-modal.react.js
+++ b/web/settings/relationship/block-users-modal.react.js
@@ -9,8 +9,8 @@
userRelationshipStatus,
} from 'lib/types/relationship-types.js';
-import { buttonThemes } from '../../components/button.react.js';
import AddUsersListModal from './add-users-list-modal.react.js';
+import { buttonThemes } from '../../components/button.react.js';
const excludedStatuses = new Set([
userRelationshipStatus.BOTH_BLOCKED,
diff --git a/web/settings/relationship/friend-list-row.react.js b/web/settings/relationship/friend-list-row.react.js
--- a/web/settings/relationship/friend-list-row.react.js
+++ b/web/settings/relationship/friend-list-row.react.js
@@ -6,11 +6,11 @@
import { useRelationshipCallbacks } from 'lib/hooks/relationship-prompt.js';
import { userRelationshipStatus } from 'lib/types/relationship-types.js';
+import css from './user-list-row.css';
+import type { UserRowProps } from './user-list.react.js';
import Button from '../../components/button.react.js';
import MenuItem from '../../components/menu-item.react.js';
import Menu from '../../components/menu.react.js';
-import css from './user-list-row.css';
-import type { UserRowProps } from './user-list.react.js';
const dangerButtonColor = {
color: 'var(--btn-bg-danger)',
diff --git a/web/settings/relationship/user-list-modal.react.js b/web/settings/relationship/user-list-modal.react.js
--- a/web/settings/relationship/user-list-modal.react.js
+++ b/web/settings/relationship/user-list-modal.react.js
@@ -4,10 +4,10 @@
import type { AccountUserInfo } from 'lib/types/user-types.js';
-import Button from '../../components/button.react.js';
-import SearchModal from '../../modals/search-modal.react.js';
import css from './user-list.css';
import { UserList, type UserRowProps } from './user-list.react.js';
+import Button from '../../components/button.react.js';
+import SearchModal from '../../modals/search-modal.react.js';
type Props = {
+onClose: () => void,
diff --git a/web/settings/relationship/user-list.react.js b/web/settings/relationship/user-list.react.js
--- a/web/settings/relationship/user-list.react.js
+++ b/web/settings/relationship/user-list.react.js
@@ -7,8 +7,8 @@
import { userStoreSearchIndex as userStoreSearchIndexSelector } from 'lib/selectors/user-selectors.js';
import type { AccountUserInfo } from 'lib/types/user-types.js';
-import { useSelector } from '../../redux/redux-utils.js';
import css from './user-list.css';
+import { useSelector } from '../../redux/redux-utils.js';
export type UserRowProps = {
+userInfo: AccountUserInfo,
diff --git a/web/sidebar/app-switcher.react.js b/web/sidebar/app-switcher.react.js
--- a/web/sidebar/app-switcher.react.js
+++ b/web/sidebar/app-switcher.react.js
@@ -9,11 +9,11 @@
unreadCount,
} from 'lib/selectors/thread-selectors.js';
+import css from './left-layout-aside.css';
+import NavigationPanel from './navigation-panel.react.js';
import { updateNavInfoActionType } from '../redux/action-types.js';
import { useSelector } from '../redux/redux-utils.js';
import { navTabSelector } from '../selectors/nav-selectors.js';
-import css from './left-layout-aside.css';
-import NavigationPanel from './navigation-panel.react.js';
function AppSwitcher(): React.Node {
const activeChatThreadID = useSelector(
diff --git a/web/sidebar/community-picker.react.js b/web/sidebar/community-picker.react.js
--- a/web/sidebar/community-picker.react.js
+++ b/web/sidebar/community-picker.react.js
@@ -6,9 +6,9 @@
import SWMansionIcon from 'lib/components/SWMansionIcon.react.js';
+import css from './community-picker.css';
import { updateNavInfoActionType } from '../redux/action-types.js';
import { useSelector } from '../redux/redux-utils.js';
-import css from './community-picker.css';
function CommunityPicker(): React.Node {
const dispatch = useDispatch();
diff --git a/web/sidebar/left-layout-aside.react.js b/web/sidebar/left-layout-aside.react.js
--- a/web/sidebar/left-layout-aside.react.js
+++ b/web/sidebar/left-layout-aside.react.js
@@ -2,11 +2,11 @@
import * as React from 'react';
-import { useSelector } from '../redux/redux-utils.js';
import AppSwitcher from './app-switcher.react.js';
import CommunityPicker from './community-picker.react.js';
import css from './left-layout-aside.css';
import SettingsSwitcher from './settings-switcher.react.js';
+import { useSelector } from '../redux/redux-utils.js';
function LeftLayoutAside(): React.Node {
const navInfo = useSelector(state => state.navInfo);
diff --git a/web/sidebar/navigation-panel.react.js b/web/sidebar/navigation-panel.react.js
--- a/web/sidebar/navigation-panel.react.js
+++ b/web/sidebar/navigation-panel.react.js
@@ -3,9 +3,9 @@
import classNames from 'classnames';
import * as React from 'react';
+import css from './left-layout-aside.css';
import type { AppState } from '../redux/redux-setup.js';
import { useSelector } from '../redux/redux-utils.js';
-import css from './left-layout-aside.css';
type NavigationPanelItemProps = {
+tab: string,
diff --git a/web/sidebar/settings-switcher.react.js b/web/sidebar/settings-switcher.react.js
--- a/web/sidebar/settings-switcher.react.js
+++ b/web/sidebar/settings-switcher.react.js
@@ -3,10 +3,10 @@
import * as React from 'react';
import { useDispatch } from 'react-redux';
-import { updateNavInfoActionType } from '../redux/action-types.js';
-import { navSettingsSectionSelector } from '../selectors/nav-selectors.js';
import css from './left-layout-aside.css';
import NavigationPanel from './navigation-panel.react.js';
+import { updateNavInfoActionType } from '../redux/action-types.js';
+import { navSettingsSectionSelector } from '../selectors/nav-selectors.js';
function SettingsSwitcher(): React.Node {
const dispatch = useDispatch();
diff --git a/web/splash/splash.react.js b/web/splash/splash.react.js
--- a/web/splash/splash.react.js
+++ b/web/splash/splash.react.js
@@ -4,9 +4,9 @@
import _merge from 'lodash/fp/merge.js';
import * as React from 'react';
+import css from './splash.css';
import LoginForm from '../account/log-in-form.react.js';
import { wagmiChains } from '../utils/wagmi-utils.js';
-import css from './splash.css';
function Splash(): React.Node {
const rainbowKitTheme = React.useMemo(() => {
diff --git a/web/utils/tooltip-utils.test.js b/web/utils/tooltip-utils.test.js
--- a/web/utils/tooltip-utils.test.js
+++ b/web/utils/tooltip-utils.test.js
@@ -1,7 +1,7 @@
// @flow
-import type { PositionInfo } from '../chat/position-types.js';
import { findTooltipPosition, tooltipPositions } from './tooltip-utils.js';
+import type { PositionInfo } from '../chat/position-types.js';
const QHDWindow = {
width: 2560,
diff --git a/web/utils/typeahead-utils.test.js b/web/utils/typeahead-utils.test.js
--- a/web/utils/typeahead-utils.test.js
+++ b/web/utils/typeahead-utils.test.js
@@ -1,7 +1,7 @@
// @flow
-import { typeaheadStyle } from '../chat/chat-constants.js';
import { getTypeaheadOverlayScroll } from './typeahead-utils.js';
+import { typeaheadStyle } from '../chat/chat-constants.js';
describe('getTypeaheadOverlayScroll', () => {
it(
diff --git a/yarn.lock b/yarn.lock
--- a/yarn.lock
+++ b/yarn.lock
@@ -6516,16 +6516,7 @@
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=
-array.prototype.flat@^1.2.4:
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz#6ef638b43312bd401b4c6199fdec7e2dc9e9a123"
- integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==
- dependencies:
- call-bind "^1.0.0"
- define-properties "^1.1.3"
- es-abstract "^1.18.0-next.1"
-
-array.prototype.flat@^1.2.5:
+array.prototype.flat@^1.2.5, array.prototype.flat@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2"
integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==
@@ -10555,14 +10546,6 @@
eslint-plugin-react "^7.30.0"
eslint-plugin-react-hooks "^4.5.0"
-eslint-import-resolver-node@^0.3.4:
- version "0.3.4"
- resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717"
- integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==
- dependencies:
- debug "^2.6.9"
- resolve "^1.13.1"
-
eslint-import-resolver-node@^0.3.6:
version "0.3.6"
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd"
@@ -10571,7 +10554,16 @@
debug "^3.2.7"
resolve "^1.20.0"
-eslint-module-utils@^2.1.1, eslint-module-utils@^2.6.1:
+eslint-import-resolver-node@^0.3.7:
+ version "0.3.7"
+ resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7"
+ integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==
+ dependencies:
+ debug "^3.2.7"
+ is-core-module "^2.11.0"
+ resolve "^1.22.1"
+
+eslint-module-utils@^2.1.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz#b51be1e473dd0de1c5ea638e22429c2490ea8233"
integrity sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A==
@@ -10579,7 +10571,7 @@
debug "^3.2.7"
pkg-dir "^2.0.0"
-eslint-module-utils@^2.7.3:
+eslint-module-utils@^2.7.3, eslint-module-utils@^2.7.4:
version "2.7.4"
resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974"
integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==
@@ -10602,27 +10594,6 @@
lodash "^4.17.15"
string-natural-compare "^3.0.1"
-eslint-plugin-import@^2.22.1:
- version "2.23.4"
- resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz#8dceb1ed6b73e46e50ec9a5bb2411b645e7d3d97"
- integrity sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ==
- dependencies:
- array-includes "^3.1.3"
- array.prototype.flat "^1.2.4"
- debug "^2.6.9"
- doctrine "^2.1.0"
- eslint-import-resolver-node "^0.3.4"
- eslint-module-utils "^2.6.1"
- find-up "^2.0.0"
- has "^1.0.3"
- is-core-module "^2.4.0"
- minimatch "^3.0.4"
- object.values "^1.1.3"
- pkg-up "^2.0.0"
- read-pkg-up "^3.0.0"
- resolve "^1.20.0"
- tsconfig-paths "^3.9.0"
-
eslint-plugin-import@^2.26.0:
version "2.26.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b"
@@ -10642,6 +10613,27 @@
resolve "^1.22.0"
tsconfig-paths "^3.14.1"
+eslint-plugin-import@^2.27.5:
+ version "2.27.5"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65"
+ integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==
+ dependencies:
+ array-includes "^3.1.6"
+ array.prototype.flat "^1.3.1"
+ array.prototype.flatmap "^1.3.1"
+ debug "^3.2.7"
+ doctrine "^2.1.0"
+ eslint-import-resolver-node "^0.3.7"
+ eslint-module-utils "^2.7.4"
+ has "^1.0.3"
+ is-core-module "^2.11.0"
+ is-glob "^4.0.3"
+ minimatch "^3.1.2"
+ object.values "^1.1.6"
+ resolve "^1.22.1"
+ semver "^6.3.0"
+ tsconfig-paths "^3.14.1"
+
eslint-plugin-jest@^24.2.2:
version "24.3.6"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.6.tgz#5f0ca019183c3188c5ad3af8e80b41de6c8e9173"
@@ -13854,20 +13846,20 @@
rgb-regex "^1.0.1"
rgba-regex "^1.0.0"
-is-core-module@^2.2.0, is-core-module@^2.4.0:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1"
- integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==
- dependencies:
- has "^1.0.3"
-
-is-core-module@^2.8.1, is-core-module@^2.9.0:
+is-core-module@^2.11.0, is-core-module@^2.8.1, is-core-module@^2.9.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144"
integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==
dependencies:
has "^1.0.3"
+is-core-module@^2.2.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1"
+ integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==
+ dependencies:
+ has "^1.0.3"
+
is-data-descriptor@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
@@ -15674,7 +15666,7 @@
dependencies:
minimist "^1.2.0"
-json5@^2.1.2, json5@^2.2.0, json5@^2.2.1:
+json5@^2.1.2, json5@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
@@ -18302,7 +18294,7 @@
dependencies:
isobject "^3.0.1"
-object.values@^1.1.0, object.values@^1.1.3, object.values@^1.1.4:
+object.values@^1.1.0, object.values@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.4.tgz#0d273762833e816b693a637d30073e7051535b30"
integrity sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==
@@ -19033,13 +19025,6 @@
dependencies:
find-up "^4.0.0"
-pkg-up@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f"
- integrity sha1-yBmscoBZpGHKscOImivjxJoATX8=
- dependencies:
- find-up "^2.1.0"
-
pkg-up@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5"
@@ -20570,14 +20555,6 @@
find-up "^2.0.0"
read-pkg "^2.0.0"
-read-pkg-up@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07"
- integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=
- dependencies:
- find-up "^2.0.0"
- read-pkg "^3.0.0"
-
read-pkg-up@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978"
@@ -21182,7 +21159,7 @@
is-core-module "^2.2.0"
path-parse "^1.0.6"
-resolve@^1.10.1, resolve@^1.19.0, resolve@^1.22.0:
+resolve@^1.10.1, resolve@^1.19.0, resolve@^1.22.0, resolve@^1.22.1:
version "1.22.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177"
integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==
@@ -23544,15 +23521,6 @@
minimist "^1.2.6"
strip-bom "^3.0.0"
-tsconfig-paths@^3.9.0:
- version "3.10.1"
- resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz#79ae67a68c15289fdf5c51cb74f397522d795ed7"
- integrity sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q==
- dependencies:
- json5 "^2.2.0"
- minimist "^1.2.0"
- strip-bom "^3.0.0"
-
tslib@^1.8.1, tslib@^1.9.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 12:56 AM (21 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2495937
Default Alt Text
D6693.id22368.diff (306 KB)

Event Timeline