Prepare for adding file suffixes

This commit is contained in:
Fedor Indutny
2025-10-16 11:29:11 -07:00
parent 3330dd72ce
commit 3387cf6a77
2095 changed files with 15148 additions and 14629 deletions

View File

@@ -7,10 +7,10 @@ import * as z from 'zod';
import { protocol } from 'electron';
import { LRUCache } from 'lru-cache';
import type { OptionalResourceService } from './OptionalResourceService.js';
import { SignalService as Proto } from '../ts/protobuf/index.js';
import { parseUnknown } from '../ts/util/schemas.js';
import { utf16ToEmoji } from '../ts/util/utf16ToEmoji.js';
import type { OptionalResourceService } from './OptionalResourceService.main.js';
import { SignalService as Proto } from '../ts/protobuf/index.std.js';
import { parseUnknown } from '../ts/util/schemas.std.js';
import { utf16ToEmoji } from '../ts/util/utf16ToEmoji.node.js';
const MANIFEST_PATH = join(__dirname, '..', 'build', 'jumbomoji.json');

View File

@@ -12,12 +12,12 @@ import PQueue from 'p-queue';
import type {
OptionalResourceType,
OptionalResourcesDictType,
} from '../ts/types/OptionalResource.js';
import { OptionalResourcesDictSchema } from '../ts/types/OptionalResource.js';
import { createLogger } from '../ts/logging/log.js';
import { getGotOptions } from '../ts/updater/got.js';
import { drop } from '../ts/util/drop.js';
import { parseUnknown } from '../ts/util/schemas.js';
} from '../ts/types/OptionalResource.std.js';
import { OptionalResourcesDictSchema } from '../ts/types/OptionalResource.std.js';
import { createLogger } from '../ts/logging/log.std.js';
import { getGotOptions } from '../ts/updater/got.node.js';
import { drop } from '../ts/util/drop.std.js';
import { parseUnknown } from '../ts/util/schemas.std.js';
const log = createLogger('OptionalResourceService');

View File

@@ -2,7 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { PowerSaveBlocker } from 'electron';
import { createLogger } from '../ts/logging/log.js';
import { createLogger } from '../ts/logging/log.std.js';
const log = createLogger('PreventDisplaySleepService');

View File

@@ -6,8 +6,8 @@ import { Menu, Tray, app, nativeImage, nativeTheme, screen } from 'electron';
import os from 'node:os';
import { join } from 'node:path';
import { readFileSync } from 'node:fs';
import { createLogger } from '../ts/logging/log.js';
import type { LocalizerType } from '../ts/types/I18N.js';
import { createLogger } from '../ts/logging/log.std.js';
import type { LocalizerType } from '../ts/types/I18N.std.js';
const log = createLogger('SystemTrayService');

View File

@@ -1,14 +1,14 @@
// Copyright 2017 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { createLogger } from '../ts/logging/log.js';
import OS from '../ts/util/os/osMain.js';
import { createLogger } from '../ts/logging/log.std.js';
import OS from '../ts/util/os/osMain.node.js';
import {
parseSystemTraySetting,
SystemTraySetting,
} from '../ts/types/SystemTraySetting.js';
import { isSystemTraySupported } from '../ts/types/Settings.js';
import type { ConfigType } from './base_config.js';
} from '../ts/types/SystemTraySetting.std.js';
import { isSystemTraySupported } from '../ts/types/Settings.std.js';
import type { ConfigType } from './base_config.node.js';
const log = createLogger('SystemTraySettingCache');

View File

@@ -9,10 +9,10 @@ import {
sendDummyKeystroke,
} from '@indutny/simple-windows-notifications';
import { createLogger } from '../ts/logging/log.js';
import { AUMID } from './startup_config.js';
import type { WindowsNotificationData } from '../ts/services/notifications.js';
import { renderWindowsToast } from './renderWindowsToast.js';
import { createLogger } from '../ts/logging/log.std.js';
import { AUMID } from './startup_config.main.js';
import type { WindowsNotificationData } from '../ts/services/notifications.preload.js';
import { renderWindowsToast } from './renderWindowsToast.dom.js';
const log = createLogger('WindowsNotifications');

View File

@@ -23,30 +23,30 @@ import { pathExists } from 'fs-extra';
import {
type DecryptAttachmentToSinkOptionsType,
decryptAttachmentV2ToSink,
} from '../ts/AttachmentCrypto.js';
import * as Bytes from '../ts/Bytes.js';
import type { MessageAttachmentsCursorType } from '../ts/sql/Interface.js';
import type { MainSQL } from '../ts/sql/main.js';
} from '../ts/AttachmentCrypto.node.js';
import * as Bytes from '../ts/Bytes.std.js';
import type { MessageAttachmentsCursorType } from '../ts/sql/Interface.std.js';
import type { MainSQL } from '../ts/sql/main.main.js';
import {
APPLICATION_OCTET_STREAM,
MIMETypeToString,
stringToMIMEType,
} from '../ts/types/MIME.js';
import * as Errors from '../ts/types/errors.js';
} from '../ts/types/MIME.std.js';
import * as Errors from '../ts/types/errors.std.js';
import {
isImageTypeSupported,
isVideoTypeSupported,
} from '../ts/util/GoogleChrome.js';
import { strictAssert } from '../ts/util/assert.js';
import { drop } from '../ts/util/drop.js';
import { SECOND } from '../ts/util/durations/index.js';
import { isPathInside } from '../ts/util/isPathInside.js';
import { missingCaseError } from '../ts/util/missingCaseError.js';
import { safeParseInteger } from '../ts/util/numbers.js';
import { parseLoose } from '../ts/util/schemas.js';
import { sleep } from '../ts/util/sleep.js';
import { toWebStream } from '../ts/util/toWebStream.js';
import { createLogger } from '../ts/logging/log.js';
} from '../ts/util/GoogleChrome.std.js';
import { strictAssert } from '../ts/util/assert.std.js';
import { drop } from '../ts/util/drop.std.js';
import { SECOND } from '../ts/util/durations/index.std.js';
import { isPathInside } from '../ts/util/isPathInside.node.js';
import { missingCaseError } from '../ts/util/missingCaseError.std.js';
import { safeParseInteger } from '../ts/util/numbers.std.js';
import { parseLoose } from '../ts/util/schemas.std.js';
import { sleep } from '../ts/util/sleep.std.js';
import { toWebStream } from '../ts/util/toWebStream.node.js';
import { createLogger } from '../ts/logging/log.std.js';
import {
deleteAll as deleteAllAttachments,
deleteAllBadges,
@@ -64,7 +64,7 @@ import {
getPath,
getStickersPath,
getTempPath,
} from './attachments.js';
} from './attachments.node.js';
const { isNumber } = lodash;

View File

@@ -9,18 +9,18 @@ import fastGlob from 'fast-glob';
import fse from 'fs-extra';
import lodash from 'lodash';
import normalizePath from 'normalize-path';
import { isPathInside } from '../ts/util/isPathInside.js';
import { DAY } from '../ts/util/durations/index.js';
import { isOlderThan } from '../ts/util/timestamp.js';
import { isNotNil } from '../ts/util/isNotNil.js';
import { isPathInside } from '../ts/util/isPathInside.node.js';
import { DAY } from '../ts/util/durations/index.std.js';
import { isOlderThan } from '../ts/util/timestamp.std.js';
import { isNotNil } from '../ts/util/isNotNil.std.js';
import {
generateKeys,
decryptAttachmentV2ToSink,
encryptAttachmentV2ToDisk,
} from '../ts/AttachmentCrypto.js';
import type { LocalAttachmentV2Type } from '../ts/types/Attachment.js';
import * as Errors from '../ts/types/errors.js';
import { createLogger } from '../ts/logging/log.js';
} from '../ts/AttachmentCrypto.node.js';
import type { LocalAttachmentV2Type } from '../ts/types/Attachment.std.js';
import * as Errors from '../ts/types/errors.std.js';
import { createLogger } from '../ts/logging/log.std.js';
const { map, isString } = lodash;

View File

@@ -6,8 +6,8 @@ import { sync as writeFileSync } from 'write-file-atomic';
import lodash from 'lodash';
import lodashFp from 'lodash/fp.js';
import { strictAssert } from '../ts/util/assert.js';
import { createLogger } from '../ts/logging/log.js';
import { strictAssert } from '../ts/util/assert.std.js';
import { createLogger } from '../ts/logging/log.std.js';
const { set } = lodashFp;

View File

@@ -11,8 +11,8 @@ import {
getEnvironment,
setEnvironment,
parseEnvironment,
} from '../ts/environment.js';
import { createLogger } from '../ts/logging/log.js';
} from '../ts/environment.std.js';
import { createLogger } from '../ts/logging/log.std.js';
const log = createLogger('config');

View File

@@ -7,12 +7,12 @@ import { basename, join } from 'node:path';
import { toJSONString as dumpToJSONString } from '@signalapp/libsignal-client/dist/Minidump.js';
import z from 'zod';
import type { LoggerType } from '../ts/types/Logging.js';
import * as Errors from '../ts/types/errors.js';
import { isProduction } from '../ts/util/version.js';
import { isNotNil } from '../ts/util/isNotNil.js';
import OS from '../ts/util/os/osMain.js';
import { parseUnknown } from '../ts/util/schemas.js';
import type { LoggerType } from '../ts/types/Logging.std.js';
import * as Errors from '../ts/types/errors.std.js';
import { isProduction } from '../ts/util/version.std.js';
import { isNotNil } from '../ts/util/isNotNil.std.js';
import OS from '../ts/util/os/osMain.node.js';
import { parseUnknown } from '../ts/util/schemas.std.js';
const { realpath, readdir, readFile, unlink, stat } = fsExtra;

View File

@@ -3,10 +3,10 @@
import { join } from 'node:path';
import { readFile } from 'node:fs/promises';
import { DNSFallbackSchema } from '../ts/types/DNSFallback.js';
import type { DNSFallbackType } from '../ts/types/DNSFallback.js';
import { parseUnknown } from '../ts/util/schemas.js';
import { createLogger } from '../ts/logging/log.js';
import { DNSFallbackSchema } from '../ts/types/DNSFallback.std.js';
import type { DNSFallbackType } from '../ts/types/DNSFallback.std.js';
import { parseUnknown } from '../ts/util/schemas.std.js';
import { createLogger } from '../ts/logging/log.std.js';
const log = createLogger('dns-fallback');

View File

@@ -5,7 +5,7 @@ import { join } from 'node:path';
import { app } from 'electron';
import { start } from './base_config.js';
import { start } from './base_config.node.js';
const userDataPath = app.getPath('userData');
const targetPath = join(userDataPath, 'ephemeral.json');

View File

@@ -4,11 +4,11 @@
import { app, dialog, clipboard } from 'electron';
import os from 'node:os';
import * as Errors from '../ts/types/errors.js';
import { redactAll } from '../ts/util/privacy.js';
import { createLogger } from '../ts/logging/log.js';
import { reallyJsonStringify } from '../ts/util/reallyJsonStringify.js';
import type { LocaleType } from './locale.js';
import * as Errors from '../ts/types/errors.std.js';
import { redactAll } from '../ts/util/privacy.node.js';
import { createLogger } from '../ts/logging/log.std.js';
import { reallyJsonStringify } from '../ts/util/reallyJsonStringify.std.js';
import type { LocaleType } from './locale.main.js';
const log = createLogger('global_errors');

View File

@@ -7,17 +7,17 @@ import { app } from 'electron';
import lodash from 'lodash';
import * as LocaleMatcher from '@formatjs/intl-localematcher';
import { z } from 'zod';
import { setupI18n } from '../ts/util/setupI18nMain.js';
import { shouldNeverBeCalled } from '../ts/util/shouldNeverBeCalled.js';
import { setupI18n } from '../ts/util/setupI18nMain.std.js';
import { shouldNeverBeCalled } from '../ts/util/shouldNeverBeCalled.std.js';
import type { LoggerType } from '../ts/types/Logging.js';
import type { LoggerType } from '../ts/types/Logging.std.js';
import type {
HourCyclePreference,
LocaleMessagesType,
} from '../ts/types/I18N.js';
import type { LocalizerType } from '../ts/types/Util.js';
import * as Errors from '../ts/types/errors.js';
import { parseUnknown } from '../ts/util/schemas.js';
} from '../ts/types/I18N.std.js';
import type { LocalizerType } from '../ts/types/Util.std.js';
import * as Errors from '../ts/types/errors.std.js';
import { parseUnknown } from '../ts/util/schemas.std.js';
const { merge } = lodash;
@@ -197,6 +197,8 @@ export function load({
const i18n = setupI18n(matchedLocale, finalMessages, {
renderEmojify: shouldNeverBeCalled,
getLocaleDirection: shouldNeverBeCalled,
getHourCyclePreference: shouldNeverBeCalled,
});
const direction =
localeDirectionTestingOverride ?? getLocaleDirection(matchedLocale, logger);

View File

@@ -35,100 +35,106 @@ import { z } from 'zod';
import {
version as packageVersion,
productName,
} from '../ts/util/packageJson.js';
import * as GlobalErrors from './global_errors.js';
import { setup as setupCrashReports } from './crashReports.js';
import { setup as setupSpellChecker } from './spell_check.js';
import { getDNSFallback } from './dns-fallback.js';
import { redactAll, addSensitivePath } from '../ts/util/privacy.js';
import { createSupportUrl } from '../ts/util/createSupportUrl.js';
import { missingCaseError } from '../ts/util/missingCaseError.js';
import { strictAssert } from '../ts/util/assert.js';
import { drop } from '../ts/util/drop.js';
import type { ThemeSettingType } from '../ts/types/StorageUIKeys.js';
import { ThemeType } from '../ts/types/Util.js';
import * as Errors from '../ts/types/errors.js';
import { resolveCanonicalLocales } from '../ts/util/resolveCanonicalLocales.js';
import { createLogger } from '../ts/logging/log.js';
import * as debugLog from '../ts/logging/debuglogs.js';
import * as uploadDebugLog from '../ts/logging/uploadDebugLog.js';
import { explodePromise } from '../ts/util/explodePromise.js';
} from '../ts/util/packageJson.node.js';
import * as GlobalErrors from './global_errors.main.js';
import { setup as setupCrashReports } from './crashReports.main.js';
import { setup as setupSpellChecker } from './spell_check.main.js';
import { getDNSFallback } from './dns-fallback.node.js';
import { redactAll, addSensitivePath } from '../ts/util/privacy.node.js';
import { createSupportUrl } from '../ts/util/createSupportUrl.std.js';
import { missingCaseError } from '../ts/util/missingCaseError.std.js';
import { strictAssert } from '../ts/util/assert.std.js';
import { drop } from '../ts/util/drop.std.js';
import type { ThemeSettingType } from '../ts/types/StorageUIKeys.std.js';
import { ThemeType } from '../ts/types/Util.std.js';
import * as Errors from '../ts/types/errors.std.js';
import { resolveCanonicalLocales } from '../ts/util/resolveCanonicalLocales.std.js';
import { createLogger } from '../ts/logging/log.std.js';
import * as debugLog from '../ts/logging/debuglogs.node.js';
import * as uploadDebugLog from '../ts/logging/uploadDebugLog.node.js';
import { explodePromise } from '../ts/util/explodePromise.std.js';
import './startup_config.js';
import './startup_config.main.js';
import type { RendererConfigType } from '../ts/types/RendererConfig.js';
import type { RendererConfigType } from '../ts/types/RendererConfig.std.js';
import {
directoryConfigSchema,
rendererConfigSchema,
} from '../ts/types/RendererConfig.js';
import config from './config.js';
} from '../ts/types/RendererConfig.std.js';
import config from './config.main.js';
import {
Environment,
getEnvironment,
isTestEnvironment,
} from '../ts/environment.js';
} from '../ts/environment.std.js';
// Very important to put before the single instance check, since it is based on the
// userData directory. (see requestSingleInstanceLock below)
import * as userConfig from './user_config.js';
import * as userConfig from './user_config.main.js';
// We generally want to pull in our own modules after this point, after the user
// data directory has been set.
import * as attachments from './attachments.js';
import * as attachmentChannel from './attachment_channel.js';
import * as bounce from '../ts/services/bounce.js';
import * as updater from '../ts/updater/index.js';
import { updateDefaultSession } from './updateDefaultSession.js';
import { PreventDisplaySleepService } from './PreventDisplaySleepService.js';
import { SystemTrayService, focusAndForceToTop } from './SystemTrayService.js';
import { SystemTraySettingCache } from './SystemTraySettingCache.js';
import { OptionalResourceService } from './OptionalResourceService.js';
import { EmojiService } from './EmojiService.js';
import * as attachments from './attachments.node.js';
import * as attachmentChannel from './attachment_channel.main.js';
import * as bounce from '../ts/services/bounce.main.js';
import * as updater from '../ts/updater/index.main.js';
import { updateDefaultSession } from './updateDefaultSession.main.js';
import { PreventDisplaySleepService } from './PreventDisplaySleepService.std.js';
import {
SystemTrayService,
focusAndForceToTop,
} from './SystemTrayService.main.js';
import { SystemTraySettingCache } from './SystemTraySettingCache.node.js';
import { OptionalResourceService } from './OptionalResourceService.main.js';
import { EmojiService } from './EmojiService.main.js';
import {
SystemTraySetting,
shouldMinimizeToSystemTray,
parseSystemTraySetting,
} from '../ts/types/SystemTraySetting.js';
} from '../ts/types/SystemTraySetting.std.js';
import {
getDefaultSystemTraySetting,
isSystemTraySupported,
isContentProtectionEnabledByDefault,
} from '../ts/types/Settings.js';
import * as ephemeralConfig from './ephemeral_config.js';
import * as mainProcessLogging from '../ts/logging/main_process_logging.js';
import { MainSQL } from '../ts/sql/main.js';
import * as sqlChannels from './sql_channel.js';
import * as windowState from './window_state.js';
import type { CreateTemplateOptionsType } from './menu.js';
import { createTemplate } from './menu.js';
import { installFileHandler, installWebHandler } from './protocol_filter.js';
import OS from '../ts/util/os/osMain.js';
import { isNightly, isProduction } from '../ts/util/version.js';
import { clearTimeoutIfNecessary } from '../ts/util/clearTimeoutIfNecessary.js';
import { toggleMaximizedBrowserWindow } from '../ts/util/toggleMaximizedBrowserWindow.js';
import { ChallengeMainHandler } from '../ts/main/challengeMain.js';
import { NativeThemeNotifier } from '../ts/main/NativeThemeNotifier.js';
import { PowerChannel } from '../ts/main/powerChannel.js';
import { SettingsChannel } from '../ts/main/settingsChannel.js';
import { maybeParseUrl, setUrlSearchParams } from '../ts/util/url.js';
import { getHeicConverter } from '../ts/workers/heicConverterMain.js';
} from '../ts/types/Settings.std.js';
import * as ephemeralConfig from './ephemeral_config.main.js';
import * as mainProcessLogging from '../ts/logging/main_process_logging.main.js';
import { MainSQL } from '../ts/sql/main.main.js';
import * as sqlChannels from './sql_channel.main.js';
import * as windowState from './window_state.std.js';
import type { CreateTemplateOptionsType } from './menu.std.js';
import { createTemplate } from './menu.std.js';
import {
installFileHandler,
installWebHandler,
} from './protocol_filter.node.js';
import OS from '../ts/util/os/osMain.node.js';
import { isNightly, isProduction } from '../ts/util/version.std.js';
import { clearTimeoutIfNecessary } from '../ts/util/clearTimeoutIfNecessary.std.js';
import { toggleMaximizedBrowserWindow } from '../ts/util/toggleMaximizedBrowserWindow.std.js';
import { ChallengeMainHandler } from '../ts/main/challengeMain.main.js';
import { NativeThemeNotifier } from '../ts/main/NativeThemeNotifier.main.js';
import { PowerChannel } from '../ts/main/powerChannel.main.js';
import { SettingsChannel } from '../ts/main/settingsChannel.main.js';
import { maybeParseUrl, setUrlSearchParams } from '../ts/util/url.std.js';
import { getHeicConverter } from '../ts/workers/heicConverterMain.main.js';
import type { LocaleDirection, LocaleType } from './locale.js';
import { load as loadLocale } from './locale.js';
import type { LocaleDirection, LocaleType } from './locale.main.js';
import { load as loadLocale } from './locale.main.js';
import { HourCyclePreference } from '../ts/types/I18N.js';
import { ScreenShareStatus } from '../ts/types/Calling.js';
import type { ParsedSignalRoute } from '../ts/util/signalRoutes.js';
import { parseSignalRoute } from '../ts/util/signalRoutes.js';
import * as dns from '../ts/util/dns.js';
import { ZoomFactorService } from '../ts/services/ZoomFactorService.js';
import { SafeStorageBackendChangeError } from '../ts/types/SafeStorageBackendChangeError.js';
import { SafeStorageDecryptionError } from '../ts/types/SafeStorageDecryptionError.js';
import { LINUX_PASSWORD_STORE_FLAGS } from '../ts/util/linuxPasswordStoreFlags.js';
import { getOwn } from '../ts/util/getOwn.js';
import { safeParseLoose, safeParseUnknown } from '../ts/util/schemas.js';
import { getAppErrorIcon } from '../ts/util/getAppErrorIcon.js';
import { promptOSAuth } from '../ts/util/os/promptOSAuthMain.js';
import { HourCyclePreference } from '../ts/types/I18N.std.js';
import { ScreenShareStatus } from '../ts/types/Calling.std.js';
import type { ParsedSignalRoute } from '../ts/util/signalRoutes.std.js';
import { parseSignalRoute } from '../ts/util/signalRoutes.std.js';
import * as dns from '../ts/util/dns.node.js';
import { ZoomFactorService } from '../ts/services/ZoomFactorService.main.js';
import { SafeStorageBackendChangeError } from '../ts/types/SafeStorageBackendChangeError.std.js';
import { SafeStorageDecryptionError } from '../ts/types/SafeStorageDecryptionError.std.js';
import { LINUX_PASSWORD_STORE_FLAGS } from '../ts/util/linuxPasswordStoreFlags.std.js';
import { getOwn } from '../ts/util/getOwn.std.js';
import { safeParseLoose, safeParseUnknown } from '../ts/util/schemas.std.js';
import { getAppErrorIcon } from '../ts/util/getAppErrorIcon.node.js';
import { promptOSAuth } from '../ts/util/os/promptOSAuthMain.main.js';
const { chmod, realpath, writeFile } = fsExtra;
const { get, pick, isNumber, isBoolean, some, debounce, noop } = lodash;

View File

@@ -3,12 +3,12 @@
import lodash from 'lodash';
import type { LocalizerType } from '../ts/types/I18N.js';
import type { LocalizerType } from '../ts/types/I18N.std.js';
import type {
MenuListType,
MenuOptionsType,
MenuActionsType,
} from '../ts/types/menu.js';
} from '../ts/types/menu.std.js';
const { isString } = lodash;

View File

@@ -6,8 +6,8 @@
import type { session as ElectronSession, Session } from 'electron';
import type { ConfigType } from './base_config.js';
import { createLogger } from '../ts/logging/log.js';
import type { ConfigType } from './base_config.node.js';
import { createLogger } from '../ts/logging/log.std.js';
const log = createLogger('permissions');

View File

@@ -14,8 +14,8 @@ import {
getStickersPath,
getTempPath,
getUpdateCachePath,
} from './attachments.js';
import { createLogger } from '../ts/logging/log.js';
} from './attachments.node.js';
import { createLogger } from '../ts/logging/log.std.js';
const log = createLogger('protocol_filter');

View File

@@ -4,16 +4,16 @@
import React from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
import type { WindowsNotificationData } from '../ts/services/notifications';
import type { WindowsNotificationData } from '../ts/services/notifications.preload.js';
import { NotificationType } from '../ts/services/notifications';
import { missingCaseError } from '../ts/util/missingCaseError';
import { NotificationType } from '../ts/types/notifications.std.js';
import { missingCaseError } from '../ts/util/missingCaseError.std.js';
import {
cancelPresentingRoute,
showConversationRoute,
showWindowRoute,
startCallLobbyRoute,
} from '../ts/util/signalRoutes';
} from '../ts/util/signalRoutes.std.js';
function pathToUri(path: string) {
return `file:///${encodeURI(path.replace(/\\/g, '/'))}`;

View File

@@ -5,14 +5,14 @@ import type { BrowserWindow } from 'electron';
import { Menu, clipboard, nativeImage } from 'electron';
import * as LocaleMatcher from '@formatjs/intl-localematcher';
import { maybeParseUrl } from '../ts/util/url.js';
import { maybeParseUrl } from '../ts/util/url.std.js';
import type { MenuListType } from '../ts/types/menu.js';
import type { LocalizerType } from '../ts/types/Util.js';
import { strictAssert } from '../ts/util/assert.js';
import type { LoggerType } from '../ts/types/Logging.js';
import { createLogger } from '../ts/logging/log.js';
import { handleAttachmentRequest } from './attachment_channel.js';
import type { MenuListType } from '../ts/types/menu.std.js';
import type { LocalizerType } from '../ts/types/Util.std.js';
import { strictAssert } from '../ts/util/assert.std.js';
import type { LoggerType } from '../ts/types/Logging.std.js';
import { createLogger } from '../ts/logging/log.std.js';
import { handleAttachmentRequest } from './attachment_channel.main.js';
const log = createLogger('spell_check');

View File

@@ -3,9 +3,9 @@
import { ipcMain } from 'electron';
import type { MainSQL } from '../ts/sql/main.js';
import { remove as removeUserConfig } from './user_config.js';
import { remove as removeEphemeralConfig } from './ephemeral_config.js';
import type { MainSQL } from '../ts/sql/main.main.js';
import { remove as removeUserConfig } from './user_config.main.js';
import { remove as removeEphemeralConfig } from './ephemeral_config.main.js';
let sql:
| Pick<

View File

@@ -3,9 +3,9 @@
import { app } from 'electron';
import { name } from '../ts/util/packageJson.js';
import { createLogger } from '../ts/logging/log.js';
import * as GlobalErrors from './global_errors.js';
import { name } from '../ts/util/packageJson.node.js';
import { createLogger } from '../ts/logging/log.std.js';
import * as GlobalErrors from './global_errors.main.js';
const log = createLogger('startup_config');

View File

@@ -5,10 +5,10 @@ import type { Session, DesktopCapturerSource, IpcMainEvent } from 'electron';
import { desktopCapturer, ipcMain, systemPreferences } from 'electron';
import { v4 as generateUuid } from 'uuid';
import OS from '../ts/util/os/osMain.js';
import type { LoggerType } from '../ts/types/Logging.js';
import { strictAssert } from '../ts/util/assert.js';
import { type IpcResponseType } from '../ts/util/desktopCapturer.js';
import OS from '../ts/util/os/osMain.node.js';
import type { LoggerType } from '../ts/types/Logging.std.js';
import { strictAssert } from '../ts/util/assert.std.js';
import { type IpcResponseType } from '../ts/util/desktopCapturer.preload.js';
const SPELL_CHECKER_DICTIONARY_DOWNLOAD_URL = `https://updates.signal.org/desktop/hunspell_dictionaries/${process.versions.electron}/`;

View File

@@ -5,9 +5,9 @@ import { join } from 'node:path';
import { mkdirSync } from 'node:fs';
import { app } from 'electron';
import { start } from './base_config.js';
import config from './config.js';
import * as Errors from '../ts/types/errors.js';
import { start } from './base_config.node.js';
import config from './config.main.js';
import * as Errors from '../ts/types/errors.std.js';
let userData: string | undefined;
// Use separate data directory for benchmarks & development

View File

@@ -11,17 +11,17 @@ import { readFile } from 'node:fs/promises';
import { join as pathJoin, relative as pathRelative } from 'node:path';
import chalk from 'chalk';
import { deepEqual } from 'node:assert';
import type { Rule } from './utils/rule.js';
import type { Rule } from './utils/rule.std.js';
import icuPrefix from './rules/icuPrefix.js';
import wrapEmoji from './rules/wrapEmoji.js';
import onePlural from './rules/onePlural.js';
import noLegacyVariables from './rules/noLegacyVariables.js';
import noNestedChoice from './rules/noNestedChoice.js';
import noOffset from './rules/noOffset.js';
import noOneChoice from './rules/noOneChoice.js';
import noOrdinal from './rules/noOrdinal.js';
import pluralPound from './rules/pluralPound.js';
import icuPrefix from './rules/icuPrefix.std.js';
import wrapEmoji from './rules/wrapEmoji.std.js';
import onePlural from './rules/onePlural.std.js';
import noLegacyVariables from './rules/noLegacyVariables.std.js';
import noNestedChoice from './rules/noNestedChoice.std.js';
import noOffset from './rules/noOffset.std.js';
import noOneChoice from './rules/noOneChoice.std.js';
import noOrdinal from './rules/noOrdinal.std.js';
import pluralPound from './rules/pluralPound.std.js';
const RULES = [
icuPrefix,

View File

@@ -1,7 +1,7 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
export default rule('icuPrefix', context => {
if (!context.messageId.startsWith('icu:')) {

View File

@@ -1,7 +1,7 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
export default rule('noLegacyVariables', context => {
return {

View File

@@ -1,8 +1,8 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { Element } from '../utils/rule.js';
import { rule } from '../utils/rule.js';
import type { Element } from '../utils/rule.std.js';
import { rule } from '../utils/rule.std.js';
export default rule('noNestedChoice', context => {
let insideChoice = false;

View File

@@ -1,7 +1,7 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
export default rule('noOffset', context => {
return {

View File

@@ -1,7 +1,7 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
export default rule('noOneChoice', context => {
return {

View File

@@ -1,7 +1,7 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
export default rule('noOrdinal', context => {
return {

View File

@@ -1,7 +1,7 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
export default rule('onePlural', context => {
let plurals = 0;

View File

@@ -2,7 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { PluralElement } from '@formatjs/icu-messageformat-parser';
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
export default rule('pluralPound', context => {
const stack: Array<PluralElement> = [];

View File

@@ -10,7 +10,7 @@ import {
isTagElement,
isLiteralElement,
} from '@formatjs/icu-messageformat-parser';
import { rule } from '../utils/rule.js';
import { rule } from '../utils/rule.std.js';
function isEmojifyTag(
element: MessageFormatElement | null

View File

@@ -5,8 +5,8 @@ import type {
MessageFormatElement,
Location,
} from '@formatjs/icu-messageformat-parser';
import type { Visitor } from './traverse.js';
import { traverse } from './traverse.js';
import type { Visitor } from './traverse.std.js';
import { traverse } from './traverse.std.js';
export type Element = MessageFormatElement;
export type { Location };

View File

@@ -47,6 +47,3 @@ delete window.testUtilities.prepareTests;
mocha.run();
})();
window.getPreferredSystemLocales = () => ['en'];
window.getLocaleOverride = () => null;

View File

@@ -26,7 +26,7 @@ import {
import type { ChunkSizeChoice } from '@signalapp/libsignal-client/dist/incremental_mac.js';
import { isAbsolute } from 'node:path';
import { createLogger } from './logging/log.js';
import { createLogger } from './logging/log.std.js';
import {
HashType,
CipherType,
@@ -36,24 +36,24 @@ import {
DIGEST_LENGTH,
ATTACHMENT_MAC_LENGTH,
AES_KEY_LENGTH,
} from './types/Crypto.js';
import { constantTimeEqual } from './Crypto.js';
import { createName, getRelativePath } from './util/attachmentPath.js';
import { appendPaddingStream } from './util/logPadding.js';
import { prependStream } from './util/prependStream.js';
import { appendMacStream } from './util/appendMacStream.js';
import { finalStream } from './util/finalStream.js';
import { getMacAndUpdateHmac } from './util/getMacAndUpdateHmac.js';
import { trimPadding } from './util/trimPadding.js';
import { assertDev, strictAssert } from './util/assert.js';
import * as Errors from './types/errors.js';
import { isNotNil } from './util/isNotNil.js';
import { missingCaseError } from './util/missingCaseError.js';
import { getEnvironment, Environment } from './environment.js';
import { isNotEmpty, toBase64, toHex } from './Bytes.js';
import { decipherWithAesKey } from './util/decipherWithAesKey.js';
import { getAttachmentCiphertextSize } from './util/AttachmentCrypto.js';
import { MediaTier } from './types/AttachmentDownload.js';
} from './types/Crypto.std.js';
import { constantTimeEqual } from './Crypto.node.js';
import { createName, getRelativePath } from './util/attachmentPath.node.js';
import { appendPaddingStream } from './util/logPadding.node.js';
import { prependStream } from './util/prependStream.node.js';
import { appendMacStream } from './util/appendMacStream.node.js';
import { finalStream } from './util/finalStream.node.js';
import { getMacAndUpdateHmac } from './util/getMacAndUpdateHmac.node.js';
import { trimPadding } from './util/trimPadding.node.js';
import { assertDev, strictAssert } from './util/assert.std.js';
import * as Errors from './types/errors.std.js';
import { isNotNil } from './util/isNotNil.std.js';
import { missingCaseError } from './util/missingCaseError.std.js';
import { getEnvironment, Environment } from './environment.std.js';
import { isNotEmpty, toBase64, toHex } from './Bytes.std.js';
import { decipherWithAesKey } from './util/decipherWithAesKey.node.js';
import { getAttachmentCiphertextSize } from './util/AttachmentCrypto.std.js';
import { MediaTier } from './types/AttachmentDownload.std.js';
const { ensureFile } = fsExtra;

View File

@@ -1,7 +1,7 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { Bytes } from './context/Bytes.js';
import { Bytes } from './context/Bytes.std.js';
const bytes = globalThis.window?.SignalContext?.bytes || new Bytes();

View File

@@ -4,22 +4,22 @@
import { format } from 'node:util';
import { ipcRenderer } from 'electron';
import type { IPCResponse as ChallengeResponseType } from './challenge.js';
import type { IPCResponse as ChallengeResponseType } from './challenge.dom.js';
import type { MessageAttributesType } from './model-types.d.ts';
import { createLogger } from './logging/log.js';
import { explodePromise } from './util/explodePromise.js';
import { AccessType, ipcInvoke } from './sql/channels.js';
import { backupsService } from './services/backups/index.js';
import { notificationService } from './services/notifications.js';
import { challengeHandler } from './services/challengeHandler.js';
import { AttachmentBackupManager } from './jobs/AttachmentBackupManager.js';
import { migrateAllMessages } from './messages/migrateMessageData.js';
import { SECOND } from './util/durations/index.js';
import { isSignalRoute } from './util/signalRoutes.js';
import { strictAssert } from './util/assert.js';
import { MessageModel } from './models/messages.js';
import type { SocketStatuses } from './textsecure/SocketManager.js';
import { itemStorage } from './textsecure/Storage.js';
import { createLogger } from './logging/log.std.js';
import { explodePromise } from './util/explodePromise.std.js';
import { AccessType, ipcInvoke } from './sql/channels.preload.js';
import { backupsService } from './services/backups/index.preload.js';
import { notificationService } from './services/notifications.preload.js';
import { challengeHandler } from './services/challengeHandler.preload.js';
import { AttachmentBackupManager } from './jobs/AttachmentBackupManager.preload.js';
import { migrateAllMessages } from './messages/migrateMessageData.preload.js';
import { SECOND } from './util/durations/index.std.js';
import { isSignalRoute } from './util/signalRoutes.std.js';
import { strictAssert } from './util/assert.std.js';
import { MessageModel } from './models/messages.preload.js';
import type { SocketStatuses } from './textsecure/SocketManager.preload.js';
import { itemStorage } from './textsecure/Storage.preload.js';
const log = createLogger('CI');

View File

@@ -3,22 +3,22 @@
import { v4 as uuid } from 'uuid';
import { incrementMessageCounter } from '../util/incrementMessageCounter.js';
import { ReadStatus } from '../messages/MessageReadStatus.js';
import { SendStatus } from '../messages/MessageSendState.js';
import { DataWriter } from '../sql/Client.js';
import { BodyRange } from '../types/BodyRange.js';
import { CURRENT_SCHEMA_VERSION } from '../types/Message2.js';
import { strictAssert } from '../util/assert.js';
import { MINUTE } from '../util/durations/index.js';
import { isOlderThan } from '../util/timestamp.js';
import { sleep } from '../util/sleep.js';
import { stats } from '../util/benchmark/stats.js';
import type { StatsType } from '../util/benchmark/stats.js';
import { incrementMessageCounter } from '../util/incrementMessageCounter.preload.js';
import { ReadStatus } from '../messages/MessageReadStatus.std.js';
import { SendStatus } from '../messages/MessageSendState.std.js';
import { DataWriter } from '../sql/Client.preload.js';
import { BodyRange } from '../types/BodyRange.std.js';
import { CURRENT_SCHEMA_VERSION } from '../types/Message2.preload.js';
import { strictAssert } from '../util/assert.std.js';
import { MINUTE } from '../util/durations/index.std.js';
import { isOlderThan } from '../util/timestamp.std.js';
import { sleep } from '../util/sleep.std.js';
import { stats } from '../util/benchmark/stats.std.js';
import type { StatsType } from '../util/benchmark/stats.std.js';
import type { MessageAttributesType } from '../model-types.d.ts';
import { createLogger } from '../logging/log.js';
import { postSaveUpdates } from '../util/cleanup.js';
import { itemStorage } from '../textsecure/Storage.js';
import { createLogger } from '../logging/log.std.js';
import { postSaveUpdates } from '../util/cleanup.preload.js';
import { itemStorage } from '../textsecure/Storage.preload.js';
const log = createLogger('benchmarkConversationOpen');

View File

@@ -5,50 +5,53 @@ import lodash from 'lodash';
import PQueue from 'p-queue';
import { v4 as generateUuid } from 'uuid';
import { DataReader, DataWriter } from './sql/Client.js';
import { createLogger } from './logging/log.js';
import * as Errors from './types/errors.js';
import { getAuthorId } from './messages/sources.js';
import { maybeDeriveGroupV2Id } from './groups.js';
import { assertDev, strictAssert } from './util/assert.js';
import { drop } from './util/drop.js';
import { DataReader, DataWriter } from './sql/Client.preload.js';
import { createLogger } from './logging/log.std.js';
import * as Errors from './types/errors.std.js';
import { getAuthorId } from './messages/sources.preload.js';
import { maybeDeriveGroupV2Id } from './groups.preload.js';
import { assertDev, strictAssert } from './util/assert.std.js';
import { drop } from './util/drop.std.js';
import {
isDirectConversation,
isGroup,
isGroupV1,
isGroupV2,
} from './util/whatTypeOfConversation.js';
} from './util/whatTypeOfConversation.dom.js';
import {
doesAttachmentExist,
deleteAttachmentData,
} from './util/migrations.js';
} from './util/migrations.preload.js';
import {
isServiceIdString,
normalizePni,
normalizeServiceId,
} from './types/ServiceId.js';
import { normalizeAci } from './util/normalizeAci.js';
import { sleep } from './util/sleep.js';
import { isNotNil } from './util/isNotNil.js';
import { MINUTE, SECOND } from './util/durations/index.js';
import { getServiceIdsForE164s } from './util/getServiceIdsForE164s.js';
import { SIGNAL_ACI, SIGNAL_AVATAR_PATH } from './types/SignalConversation.js';
import { getTitleNoDefault } from './util/getTitle.js';
import * as StorageService from './services/storage.js';
import textsecureUtils from './textsecure/Helpers.js';
import { cdsLookup } from './textsecure/WebAPI.js';
import type { ConversationPropsForUnreadStats } from './util/countUnreadStats.js';
import { countAllConversationsUnreadStats } from './util/countUnreadStats.js';
import { isTestOrMockEnvironment } from './environment.js';
import { isConversationAccepted } from './util/isConversationAccepted.js';
import { areWePending } from './util/groupMembershipUtils.js';
import { conversationJobQueue } from './jobs/conversationJobQueue.js';
import { createBatcher } from './util/batcher.js';
import { validateConversation } from './util/validateConversation.js';
import { ConversationModel } from './models/conversations.js';
import { INITIAL_EXPIRE_TIMER_VERSION } from './util/expirationTimer.js';
import { missingCaseError } from './util/missingCaseError.js';
import { signalProtocolStore } from './SignalProtocolStore.js';
} from './types/ServiceId.std.js';
import { normalizeAci } from './util/normalizeAci.std.js';
import { sleep } from './util/sleep.std.js';
import { isNotNil } from './util/isNotNil.std.js';
import { MINUTE, SECOND } from './util/durations/index.std.js';
import { getServiceIdsForE164s } from './util/getServiceIdsForE164s.dom.js';
import {
SIGNAL_ACI,
SIGNAL_AVATAR_PATH,
} from './types/SignalConversation.std.js';
import { getTitleNoDefault } from './util/getTitle.preload.js';
import * as StorageService from './services/storage.preload.js';
import textsecureUtils from './textsecure/Helpers.std.js';
import { cdsLookup } from './textsecure/WebAPI.preload.js';
import type { ConversationPropsForUnreadStats } from './util/countUnreadStats.std.js';
import { countAllConversationsUnreadStats } from './util/countUnreadStats.std.js';
import { isTestOrMockEnvironment } from './environment.std.js';
import { isConversationAccepted } from './util/isConversationAccepted.preload.js';
import { areWePending } from './util/groupMembershipUtils.preload.js';
import { conversationJobQueue } from './jobs/conversationJobQueue.preload.js';
import { createBatcher } from './util/batcher.std.js';
import { validateConversation } from './util/validateConversation.dom.js';
import { ConversationModel } from './models/conversations.preload.js';
import { INITIAL_EXPIRE_TIMER_VERSION } from './util/expirationTimer.std.js';
import { missingCaseError } from './util/missingCaseError.std.js';
import { signalProtocolStore } from './SignalProtocolStore.preload.js';
import type {
ConversationAttributesType,
@@ -59,8 +62,8 @@ import type {
ServiceIdString,
AciString,
PniString,
} from './types/ServiceId.js';
import { itemStorage } from './textsecure/Storage.js';
} from './types/ServiceId.std.js';
import { itemStorage } from './textsecure/Storage.preload.js';
const { debounce, pick, uniq, without } = lodash;

View File

@@ -7,19 +7,19 @@ import { Aci, Pni, hkdf } from '@signalapp/libsignal-client';
import type { PublicKey, PrivateKey } from '@signalapp/libsignal-client';
import { AccountEntropyPool } from '@signalapp/libsignal-client/dist/AccountKeys.js';
import * as Bytes from './Bytes.js';
import { Crypto } from './context/Crypto.js';
import { calculateAgreement, generateKeyPair } from './Curve.js';
import { HashType, CipherType } from './types/Crypto.js';
import { AVATAR_COLOR_COUNT, AvatarColors } from './types/Colors.js';
import { ProfileDecryptError } from './types/errors.js';
import { getBytesSubarray } from './util/uuidToBytes.js';
import { logPadSize } from './util/logPadSize.js';
import { Environment, getEnvironment } from './environment.js';
import { toWebSafeBase64 } from './util/webSafeBase64.js';
import * as Bytes from './Bytes.std.js';
import { Crypto } from './context/Crypto.node.js';
import { calculateAgreement, generateKeyPair } from './Curve.node.js';
import { HashType, CipherType } from './types/Crypto.std.js';
import { AVATAR_COLOR_COUNT, AvatarColors } from './types/Colors.std.js';
import { ProfileDecryptError } from './types/errors.std.js';
import { getBytesSubarray } from './util/uuidToBytes.std.js';
import { logPadSize } from './util/logPadSize.std.js';
import { Environment, getEnvironment } from './environment.std.js';
import { toWebSafeBase64 } from './util/webSafeBase64.std.js';
import type { AciString, PniString } from './types/ServiceId.js';
import type { AvatarColorType } from './types/Colors.js';
import type { AciString, PniString } from './types/ServiceId.std.js';
import type { AvatarColorType } from './types/Colors.std.js';
const { sample } = lodash;

View File

@@ -4,14 +4,14 @@
import * as client from '@signalapp/libsignal-client';
import type { KyberPreKeyRecord } from '@signalapp/libsignal-client';
import * as Bytes from './Bytes.js';
import { constantTimeEqual } from './Crypto.js';
import * as Bytes from './Bytes.std.js';
import { constantTimeEqual } from './Crypto.node.js';
import type {
KeyPairType,
CompatPreKeyType,
CompatSignedPreKeyType,
} from './textsecure/Types.d.ts';
import { createLogger } from './logging/log.js';
import { createLogger } from './logging/log.std.js';
const log = createLogger('Curve');

View File

@@ -2,8 +2,8 @@
// SPDX-License-Identifier: AGPL-3.0-only
import EventEmitter from 'node:events';
import { createLogger } from './logging/log.js';
import { clearTimeoutIfNecessary } from './util/clearTimeoutIfNecessary.js';
import { createLogger } from './logging/log.std.js';
import { clearTimeoutIfNecessary } from './util/clearTimeoutIfNecessary.std.js';
const log = createLogger('IdleDetector');

View File

@@ -26,13 +26,13 @@ import {
SessionStore,
SignedPreKeyStore,
} from '@signalapp/libsignal-client';
import { Address } from './types/Address.js';
import { QualifiedAddress } from './types/QualifiedAddress.js';
import type { ServiceIdString } from './types/ServiceId.js';
import { normalizeServiceId } from './types/ServiceId.js';
import { signalProtocolStore } from './SignalProtocolStore.js';
import { Address } from './types/Address.std.js';
import { QualifiedAddress } from './types/QualifiedAddress.std.js';
import type { ServiceIdString } from './types/ServiceId.std.js';
import { normalizeServiceId } from './types/ServiceId.std.js';
import { signalProtocolStore } from './SignalProtocolStore.preload.js';
import type { Zone } from './util/Zone.js';
import type { Zone } from './util/Zone.std.js';
const { isNumber } = lodash;

View File

@@ -3,16 +3,16 @@
import lodash from 'lodash';
import type { getConfig } from './textsecure/WebAPI.js';
import { createLogger } from './logging/log.js';
import type { AciString } from './types/ServiceId.js';
import { parseIntOrThrow } from './util/parseIntOrThrow.js';
import { HOUR } from './util/durations/index.js';
import * as Bytes from './Bytes.js';
import { uuidToBytes } from './util/uuidToBytes.js';
import { HashType } from './types/Crypto.js';
import { getCountryCode } from './types/PhoneNumber.js';
import { parseRemoteClientExpiration } from './util/parseRemoteClientExpiration.js';
import type { getConfig } from './textsecure/WebAPI.preload.js';
import { createLogger } from './logging/log.std.js';
import type { AciString } from './types/ServiceId.std.js';
import { parseIntOrThrow } from './util/parseIntOrThrow.std.js';
import { HOUR } from './util/durations/index.std.js';
import * as Bytes from './Bytes.std.js';
import { uuidToBytes } from './util/uuidToBytes.std.js';
import { HashType } from './types/Crypto.std.js';
import { getCountryCode } from './types/PhoneNumber.std.js';
import { parseRemoteClientExpiration } from './util/parseRemoteClientExpiration.dom.js';
import type { StorageInterface } from './types/Storage.d.ts';
const { get, throttle } = lodash;

View File

@@ -19,15 +19,15 @@ import {
SignedPreKeyRecord,
} from '@signalapp/libsignal-client';
import { DataReader, DataWriter } from './sql/Client.js';
import type { ItemType, KyberPreKeyTripleType } from './sql/Interface.js';
import * as Bytes from './Bytes.js';
import { constantTimeEqual, sha256 } from './Crypto.js';
import { assertDev, strictAssert } from './util/assert.js';
import { isNotNil } from './util/isNotNil.js';
import { drop } from './util/drop.js';
import { Zone } from './util/Zone.js';
import { isMoreRecentThan } from './util/timestamp.js';
import { DataReader, DataWriter } from './sql/Client.preload.js';
import type { ItemType, KyberPreKeyTripleType } from './sql/Interface.std.js';
import * as Bytes from './Bytes.std.js';
import { constantTimeEqual, sha256 } from './Crypto.node.js';
import { assertDev, strictAssert } from './util/assert.std.js';
import { isNotNil } from './util/isNotNil.std.js';
import { drop } from './util/drop.std.js';
import { Zone } from './util/Zone.std.js';
import { isMoreRecentThan } from './util/timestamp.std.js';
import type {
DeviceType,
IdentityKeyType,
@@ -53,21 +53,21 @@ import type {
ServiceIdString,
PniString,
AciString,
} from './types/ServiceId.js';
import { isServiceIdString, ServiceIdKind } from './types/ServiceId.js';
import type { Address } from './types/Address.js';
import type { QualifiedAddressStringType } from './types/QualifiedAddress.js';
import { QualifiedAddress } from './types/QualifiedAddress.js';
import { createLogger } from './logging/log.js';
import * as Errors from './types/errors.js';
import { MINUTE } from './util/durations/index.js';
} from './types/ServiceId.std.js';
import { isServiceIdString, ServiceIdKind } from './types/ServiceId.std.js';
import type { Address } from './types/Address.std.js';
import type { QualifiedAddressStringType } from './types/QualifiedAddress.std.js';
import { QualifiedAddress } from './types/QualifiedAddress.std.js';
import { createLogger } from './logging/log.std.js';
import * as Errors from './types/errors.std.js';
import { MINUTE } from './util/durations/index.std.js';
import {
KYBER_KEY_ID_KEY,
SIGNED_PRE_KEY_ID_KEY,
} from './textsecure/AccountManager.js';
import { formatGroups, groupWhile } from './util/groupWhile.js';
import { parseUnknown } from './util/schemas.js';
import { itemStorage } from './textsecure/Storage.js';
} from './textsecure/AccountManager.preload.js';
import { formatGroups, groupWhile } from './util/groupWhile.std.js';
import { parseUnknown } from './util/schemas.std.js';
import { itemStorage } from './textsecure/Storage.preload.js';
const { omit } = lodash;

View File

@@ -3,7 +3,7 @@
const { timers } = window.SignalContext;
export type { Timeout } from './context/Timers.js';
export type { Timeout } from './context/Timers.node.js';
export function setTimeout(
...args: Parameters<typeof timers.setTimeout>

View File

@@ -4,9 +4,9 @@ import type { ReactNode } from 'react';
import React, { useId } from 'react';
import type { Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { AriaClickable } from './AriaClickable.js';
import { AxoButton } from './AxoButton.js';
import { tw } from './tw.js';
import { AriaClickable } from './AriaClickable.dom.js';
import { AxoButton } from './AxoButton.dom.js';
import { tw } from './tw.dom.js';
export default {
title: 'Axo/AriaClickable',

View File

@@ -10,8 +10,8 @@ import React, {
} from 'react';
import type { ReactNode, MouseEvent, FC } from 'react';
import { useLayoutEffect } from '@react-aria/utils';
import { tw } from './tw.js';
import { assert } from './_internal/assert.js';
import { tw } from './tw.dom.js';
import { assert } from './_internal/assert.dom.js';
const Namespace = 'AriaClickable';

View File

@@ -2,8 +2,8 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { Meta } from '@storybook/react';
import React from 'react';
import { ExperimentalAxoBadge } from './AxoBadge.js';
import { tw } from './tw.js';
import { ExperimentalAxoBadge } from './AxoBadge.dom.js';
import { tw } from './tw.dom.js';
export default {
title: 'Axo/AriaBadge (Experimental)',

View File

@@ -2,10 +2,10 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { FC } from 'react';
import React, { memo, useMemo } from 'react';
import { AxoSymbol } from './AxoSymbol.js';
import type { TailwindStyles } from './tw.js';
import { tw } from './tw.js';
import { unreachable } from './_internal/assert.js';
import { AxoSymbol } from './AxoSymbol.dom.js';
import type { TailwindStyles } from './tw.dom.js';
import { tw } from './tw.dom.js';
import { unreachable } from './_internal/assert.dom.js';
const Namespace = 'AxoBadge';

View File

@@ -7,8 +7,8 @@ import {
_getAllAxoButtonVariants,
_getAllAxoButtonSizes,
AxoButton,
} from './AxoButton.js';
import { tw } from './tw.js';
} from './AxoButton.dom.js';
import { tw } from './tw.dom.js';
export default {
title: 'Axo/AxoButton',

View File

@@ -2,10 +2,10 @@
// SPDX-License-Identifier: AGPL-3.0-only
import React, { memo, forwardRef } from 'react';
import type { ButtonHTMLAttributes, FC, ForwardedRef, ReactNode } from 'react';
import type { TailwindStyles } from './tw.js';
import { tw } from './tw.js';
import { AxoSymbol } from './AxoSymbol.js';
import { assert } from './_internal/assert.js';
import type { TailwindStyles } from './tw.dom.js';
import { tw } from './tw.dom.js';
import { AxoSymbol } from './AxoSymbol.dom.js';
import { assert } from './_internal/assert.dom.js';
const Namespace = 'AxoButton';

View File

@@ -2,8 +2,8 @@
// SPDX-License-Identifier: AGPL-3.0-only
import React, { useState } from 'react';
import type { Meta } from '@storybook/react';
import { AxoCheckbox } from './AxoCheckbox.js';
import { tw } from './tw.js';
import { AxoCheckbox } from './AxoCheckbox.dom.js';
import { tw } from './tw.dom.js';
export default {
title: 'Axo/AxoCheckbox',

View File

@@ -2,8 +2,8 @@
// SPDX-License-Identifier: AGPL-3.0-only
import React, { memo } from 'react';
import { Checkbox } from 'radix-ui';
import { AxoSymbol } from './AxoSymbol.js';
import { tw } from './tw.js';
import { AxoSymbol } from './AxoSymbol.dom.js';
import { tw } from './tw.dom.js';
const Namespace = 'AxoCheckbox';

View File

@@ -3,8 +3,8 @@
import React, { useState } from 'react';
import type { Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { AxoContextMenu } from './AxoContextMenu.js';
import { tw } from './tw.js';
import { AxoContextMenu } from './AxoContextMenu.dom.js';
import { tw } from './tw.dom.js';
export default {
title: 'Axo/AxoContextMenu',

View File

@@ -3,9 +3,9 @@
import React, { memo } from 'react';
import { ContextMenu } from 'radix-ui';
import type { FC } from 'react';
import { AxoSymbol } from './AxoSymbol.js';
import { AxoBaseMenu } from './_internal/AxoBaseMenu.js';
import { tw } from './tw.js';
import { AxoSymbol } from './AxoSymbol.dom.js';
import { AxoBaseMenu } from './_internal/AxoBaseMenu.dom.js';
import { tw } from './tw.dom.js';
const Namespace = 'AxoContextMenu';

View File

@@ -4,9 +4,9 @@ import type { ReactNode } from 'react';
import React, { useState } from 'react';
import type { Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { AxoDropdownMenu } from './AxoDropdownMenu.js';
import { AxoButton } from './AxoButton.js';
import { tw } from './tw.js';
import { AxoDropdownMenu } from './AxoDropdownMenu.dom.js';
import { AxoButton } from './AxoButton.dom.js';
import { tw } from './tw.dom.js';
export default {
title: 'Axo/AxoDropdownMenu',

View File

@@ -3,14 +3,14 @@
import React, { memo, useId } from 'react';
import { DropdownMenu } from 'radix-ui';
import type { FC, ReactNode } from 'react';
import { AxoSymbol } from './AxoSymbol.js';
import { AxoBaseMenu } from './_internal/AxoBaseMenu.js';
import { tw } from './tw.js';
import { AxoSymbol } from './AxoSymbol.dom.js';
import { AxoBaseMenu } from './_internal/AxoBaseMenu.dom.js';
import { tw } from './tw.dom.js';
import {
AriaLabellingProvider,
useAriaLabellingContext,
useCreateAriaLabellingContext,
} from './_internal/AriaLabellingContext.js';
} from './_internal/AriaLabellingContext.dom.js';
const Namespace = 'AxoDropdownMenu';

View File

@@ -4,9 +4,9 @@ import type { ReactNode } from 'react';
import React, { useState } from 'react';
import type { Meta } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { AxoMenuBuilder } from './AxoMenuBuilder.js';
import { AxoButton } from './AxoButton.js';
import { tw } from './tw.js';
import { AxoMenuBuilder } from './AxoMenuBuilder.dom.js';
import { AxoButton } from './AxoButton.dom.js';
import { tw } from './tw.dom.js';
export default {
title: 'Axo/AxoMenuBuilder',

View File

@@ -3,10 +3,10 @@
import type { FC } from 'react';
import React, { createContext, memo, useContext } from 'react';
import type { AxoBaseMenu } from './_internal/AxoBaseMenu.js';
import { assert, unreachable } from './_internal/assert.js';
import { AxoDropdownMenu } from './AxoDropdownMenu.js';
import { AxoContextMenu } from './AxoContextMenu.js';
import type { AxoBaseMenu } from './_internal/AxoBaseMenu.dom.js';
import { assert, unreachable } from './_internal/assert.dom.js';
import { AxoDropdownMenu } from './AxoDropdownMenu.dom.js';
import { AxoContextMenu } from './AxoContextMenu.dom.js';
const Namespace = 'AxoMenuBuilder';

View File

@@ -2,8 +2,8 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { Meta } from '@storybook/react';
import React, { useState } from 'react';
import { ExperimentalAxoSegmentedControl } from './AxoSegmentedControl.js';
import { tw } from './tw.js';
import { ExperimentalAxoSegmentedControl } from './AxoSegmentedControl.dom.js';
import { tw } from './tw.dom.js';
export default {
title: 'Axo/AxoSegmentedControl (Experimental)',

View File

@@ -3,7 +3,7 @@
import type { ButtonHTMLAttributes, FC, ForwardedRef, ReactNode } from 'react';
import React, { forwardRef, memo, useCallback } from 'react';
import { ToggleGroup } from 'radix-ui';
import { ExperimentalAxoBaseSegmentedControl } from './_internal/AxoBaseSegmentedControl.js';
import { ExperimentalAxoBaseSegmentedControl } from './_internal/AxoBaseSegmentedControl.dom.js';
const Namespace = 'AxoSegmentedControl';

View File

@@ -3,8 +3,8 @@
import type { ReactNode } from 'react';
import React, { useState } from 'react';
import type { Meta } from '@storybook/react';
import { AxoSelect } from './AxoSelect.js';
import { tw } from './tw.js';
import { AxoSelect } from './AxoSelect.dom.js';
import { tw } from './tw.dom.js';
export default {
title: 'Axo/AxoSelect',

View File

@@ -3,11 +3,11 @@
import React, { memo } from 'react';
import type { FC, ReactNode } from 'react';
import { Select } from 'radix-ui';
import { AxoBaseMenu } from './_internal/AxoBaseMenu.js';
import { AxoSymbol } from './AxoSymbol.js';
import type { TailwindStyles } from './tw.js';
import { tw } from './tw.js';
import { ExperimentalAxoBadge } from './AxoBadge.js';
import { AxoBaseMenu } from './_internal/AxoBaseMenu.dom.js';
import { AxoSymbol } from './AxoSymbol.dom.js';
import type { TailwindStyles } from './tw.dom.js';
import { tw } from './tw.dom.js';
import { ExperimentalAxoBadge } from './AxoBadge.dom.js';
const Namespace = 'AxoSelect';

View File

@@ -2,8 +2,8 @@
// SPDX-License-Identifier: AGPL-3.0-only
import React, { useState } from 'react';
import type { Meta } from '@storybook/react';
import { AxoSwitch } from './AxoSwitch.js';
import { tw } from './tw.js';
import { AxoSwitch } from './AxoSwitch.dom.js';
import { tw } from './tw.dom.js';
export default {
title: 'Axo/AxoSwitch',

View File

@@ -2,8 +2,8 @@
// SPDX-License-Identifier: AGPL-3.0-only
import React, { memo } from 'react';
import { Switch } from 'radix-ui';
import { tw } from './tw.js';
import { AxoSymbol } from './AxoSymbol.js';
import { tw } from './tw.dom.js';
import { AxoSymbol } from './AxoSymbol.dom.js';
const Namespace = 'AxoSwitch';

View File

@@ -4,12 +4,12 @@ import React, { memo, useMemo, useState } from 'react';
import type { Meta } from '@storybook/react';
import { Direction } from 'radix-ui';
import Fuse from 'fuse.js';
import { AxoSymbol } from './AxoSymbol.js';
import { tw } from './tw.js';
import { AxoSymbol } from './AxoSymbol.dom.js';
import { tw } from './tw.dom.js';
import {
_getAllAxoSymbolInlineGlyphNames,
getAxoSymbolInlineGlyph,
} from './_internal/AxoSymbolDefs.generated.js';
} from './_internal/AxoSymbolDefs.generated.std.js';
export default {
title: 'Axo/AxoSymbol',

View File

@@ -4,15 +4,15 @@ import type { FC } from 'react';
import React, { memo, useMemo } from 'react';
import { Direction } from 'radix-ui';
import { VisuallyHidden } from 'react-aria';
import { tw } from './tw.js';
import { tw } from './tw.dom.js';
import {
getAxoSymbolIcon,
getAxoSymbolInlineGlyph,
} from './_internal/AxoSymbolDefs.generated.js';
} from './_internal/AxoSymbolDefs.generated.std.js';
import type {
AxoSymbolIconName,
AxoSymbolInlineGlyphName,
} from './_internal/AxoSymbolDefs.generated.js';
} from './_internal/AxoSymbolDefs.generated.std.js';
const { useDirection } = Direction;

View File

@@ -3,7 +3,7 @@
import type { RefCallback } from 'react';
import { createContext, useContext, useMemo, useState } from 'react';
import { assert } from './assert.js';
import { assert } from './assert.dom.js';
type AriaLabellingContextType = Readonly<{
labelRef: RefCallback<HTMLElement>;

View File

@@ -2,8 +2,8 @@
// SPDX-License-Identifier: AGPL-3.0-only
import React from 'react';
import type { ReactNode } from 'react';
import { tw } from '../tw.js';
import { AxoSymbol } from '../AxoSymbol.js';
import { tw } from '../tw.dom.js';
import { AxoSymbol } from '../AxoSymbol.dom.js';
export namespace AxoBaseMenu {
// <Content/SubContent>

View File

@@ -18,9 +18,9 @@ import React, {
} from 'react';
import type { Transition } from 'framer-motion';
import { motion } from 'framer-motion';
import type { TailwindStyles } from '../tw.js';
import { tw } from '../tw.js';
import { ExperimentalAxoBadge } from '../AxoBadge.js';
import type { TailwindStyles } from '../tw.dom.js';
import { tw } from '../tw.dom.js';
import { ExperimentalAxoBadge } from '../AxoBadge.dom.js';
const Namespace = 'AxoBaseSegmentedControl';

View File

@@ -7,97 +7,97 @@ import PQueue from 'p-queue';
import pMap from 'p-map';
import { v7 as generateUuid } from 'uuid';
import * as Registration from './util/registration.js';
import MessageReceiver from './textsecure/MessageReceiver.js';
import { signalProtocolStore } from './SignalProtocolStore.js';
import * as Registration from './util/registration.preload.js';
import MessageReceiver from './textsecure/MessageReceiver.preload.js';
import { signalProtocolStore } from './SignalProtocolStore.preload.js';
import type {
SessionResetsType,
ProcessedDataMessage,
} from './textsecure/Types.d.ts';
import { HTTPError } from './types/HTTPError.js';
import { HTTPError } from './types/HTTPError.std.js';
import createTaskWithTimeout, {
suspendTasksWithTimeout,
resumeTasksWithTimeout,
reportLongRunningTasks,
} from './textsecure/TaskWithTimeout.js';
} from './textsecure/TaskWithTimeout.std.js';
import type { MessageAttributesType } from './model-types.d.ts';
import * as Bytes from './Bytes.js';
import * as Timers from './Timers.js';
import * as indexedDb from './indexeddb.js';
import type { MenuOptionsType } from './types/menu.js';
import { SocketStatus } from './types/SocketStatus.js';
import { DEFAULT_CONVERSATION_COLOR } from './types/Colors.js';
import { ThemeType } from './types/Util.js';
import * as durations from './util/durations/index.js';
import { drop } from './util/drop.js';
import { explodePromise } from './util/explodePromise.js';
import { deliveryReceiptQueue } from './util/deliveryReceipt.js';
import type { ExplodePromiseResultType } from './util/explodePromise.js';
import { isWindowDragElement } from './util/isWindowDragElement.js';
import { assertDev, strictAssert } from './util/assert.js';
import { filter } from './util/iterables.js';
import { isNotNil } from './util/isNotNil.js';
import { areRemoteBackupsTurnedOn } from './util/isBackupEnabled.js';
import { lightSessionResetQueue } from './util/lightSessionResetQueue.js';
import { setAppLoadingScreenMessage } from './setAppLoadingScreenMessage.js';
import { IdleDetector } from './IdleDetector.js';
import { challengeHandler } from './services/challengeHandler.js';
import * as Bytes from './Bytes.std.js';
import * as Timers from './Timers.dom.js';
import * as indexedDb from './indexeddb.dom.js';
import type { MenuOptionsType } from './types/menu.std.js';
import { SocketStatus } from './types/SocketStatus.std.js';
import { DEFAULT_CONVERSATION_COLOR } from './types/Colors.std.js';
import { ThemeType } from './types/Util.std.js';
import * as durations from './util/durations/index.std.js';
import { drop } from './util/drop.std.js';
import { explodePromise } from './util/explodePromise.std.js';
import { deliveryReceiptQueue } from './util/deliveryReceipt.preload.js';
import type { ExplodePromiseResultType } from './util/explodePromise.std.js';
import { isWindowDragElement } from './util/isWindowDragElement.std.js';
import { assertDev, strictAssert } from './util/assert.std.js';
import { filter } from './util/iterables.std.js';
import { isNotNil } from './util/isNotNil.std.js';
import { areRemoteBackupsTurnedOn } from './util/isBackupEnabled.preload.js';
import { lightSessionResetQueue } from './util/lightSessionResetQueue.std.js';
import { setAppLoadingScreenMessage } from './setAppLoadingScreenMessage.dom.js';
import { IdleDetector } from './IdleDetector.preload.js';
import { challengeHandler } from './services/challengeHandler.preload.js';
import {
initialize as initializeExpiringMessageService,
update as updateExpiringMessagesService,
} from './services/expiringMessagesDeletion.js';
} from './services/expiringMessagesDeletion.preload.js';
import {
initialize as initializeNotificationProfilesService,
fastUpdate as updateNotificationProfileService,
} from './services/notificationProfilesService.js';
import { tapToViewMessagesDeletionService } from './services/tapToViewMessagesDeletionService.js';
import { senderCertificateService } from './services/senderCertificate.js';
} from './services/notificationProfilesService.preload.js';
import { tapToViewMessagesDeletionService } from './services/tapToViewMessagesDeletionService.preload.js';
import { senderCertificateService } from './services/senderCertificate.preload.js';
import {
GROUP_CREDENTIALS_KEY,
initializeGroupCredentialFetcher,
} from './services/groupCredentialFetcher.js';
import { initializeNetworkObserver } from './services/networkObserver.js';
import * as KeyboardLayout from './services/keyboardLayout.js';
import * as StorageService from './services/storage.js';
import { usernameIntegrity } from './services/usernameIntegrity.js';
import { updateIdentityKey } from './services/profiles.js';
import { initializeUpdateListener } from './services/updateListener.js';
import { RoutineProfileRefresher } from './routineProfileRefresh.js';
import { isOlderThan } from './util/timestamp.js';
import { isValidReactionEmoji } from './reactions/isValidReactionEmoji.js';
import { safeParsePartial } from './util/schemas.js';
} from './services/groupCredentialFetcher.preload.js';
import { initializeNetworkObserver } from './services/networkObserver.preload.js';
import * as KeyboardLayout from './services/keyboardLayout.dom.js';
import * as StorageService from './services/storage.preload.js';
import { usernameIntegrity } from './services/usernameIntegrity.preload.js';
import { updateIdentityKey } from './services/profiles.preload.js';
import { initializeUpdateListener } from './services/updateListener.preload.js';
import { RoutineProfileRefresher } from './routineProfileRefresh.preload.js';
import { isOlderThan } from './util/timestamp.std.js';
import { isValidReactionEmoji } from './reactions/isValidReactionEmoji.std.js';
import { safeParsePartial } from './util/schemas.std.js';
import {
PollVoteSchema,
PollTerminateSchema,
isPollReceiveEnabled,
} from './types/Polls.js';
import type { ConversationModel } from './models/conversations.js';
import { isIncoming } from './messages/helpers.js';
import { getAuthor } from './messages/sources.js';
import { migrateBatchOfMessages } from './messages/migrateMessageData.js';
import { createBatcher, waitForAllBatchers } from './util/batcher.js';
} from './types/Polls.dom.js';
import type { ConversationModel } from './models/conversations.preload.js';
import { isIncoming } from './messages/helpers.std.js';
import { getAuthor } from './messages/sources.preload.js';
import { migrateBatchOfMessages } from './messages/migrateMessageData.preload.js';
import { createBatcher, waitForAllBatchers } from './util/batcher.std.js';
import {
flushAllWaitBatchers,
waitForAllWaitBatchers,
} from './util/waitBatcher.js';
} from './util/waitBatcher.std.js';
import {
initializeAllJobQueues,
shutdownAllJobQueues,
} from './jobs/initializeAllJobQueues.js';
import { removeStorageKeyJobQueue } from './jobs/removeStorageKeyJobQueue.js';
import { conversationJobQueue } from './jobs/conversationJobQueue.js';
import { ourProfileKeyService } from './services/ourProfileKey.js';
import { notificationService } from './services/notifications.js';
import { areWeASubscriberService } from './services/areWeASubscriber.js';
} from './jobs/initializeAllJobQueues.preload.js';
import { removeStorageKeyJobQueue } from './jobs/removeStorageKeyJobQueue.preload.js';
import { conversationJobQueue } from './jobs/conversationJobQueue.preload.js';
import { ourProfileKeyService } from './services/ourProfileKey.std.js';
import { notificationService } from './services/notifications.preload.js';
import { areWeASubscriberService } from './services/areWeASubscriber.dom.js';
import {
onContactSync,
setIsInitialContactSync,
} from './services/contactSync.js';
import { startTimeTravelDetector } from './util/startTimeTravelDetector.js';
import { shouldRespondWithProfileKey } from './util/shouldRespondWithProfileKey.js';
import { LatestQueue } from './util/LatestQueue.js';
import { parseIntOrThrow } from './util/parseIntOrThrow.js';
import { getProfile } from './util/getProfile.js';
} from './services/contactSync.preload.js';
import { startTimeTravelDetector } from './util/startTimeTravelDetector.std.js';
import { shouldRespondWithProfileKey } from './util/shouldRespondWithProfileKey.dom.js';
import { LatestQueue } from './util/LatestQueue.std.js';
import { parseIntOrThrow } from './util/parseIntOrThrow.std.js';
import { getProfile } from './util/getProfile.preload.js';
import type {
AttachmentBackfillResponseSyncEvent,
ConfigurationEvent,
@@ -123,7 +123,7 @@ import type {
ViewEvent,
ViewOnceOpenSyncEvent,
ViewSyncEvent,
} from './textsecure/messageReceiverEvents.js';
} from './textsecure/messageReceiverEvents.std.js';
import {
cancelInflightRequests,
checkSockets,
@@ -148,132 +148,139 @@ import {
registerRequestHandler,
reportMessage,
unregisterRequestHandler,
} from './textsecure/WebAPI.js';
import { accountManager } from './textsecure/AccountManager.js';
import * as KeyChangeListener from './textsecure/KeyChangeListener.js';
import { UpdateKeysListener } from './textsecure/UpdateKeysListener.js';
import { isGroup } from './util/whatTypeOfConversation.js';
import { BackOff, FIBONACCI_TIMEOUTS } from './util/BackOff.js';
import { createApp as createAppRoot } from './state/roots/createApp.js';
import { AppViewType } from './state/ducks/app.js';
import { areAnyCallsActiveOrRinging } from './state/selectors/calling.js';
import { badgeImageFileDownloader } from './badges/badgeImageFileDownloader.js';
import * as Deletes from './messageModifiers/Deletes.js';
import * as Edits from './messageModifiers/Edits.js';
import * as MessageReceipts from './messageModifiers/MessageReceipts.js';
import * as MessageRequests from './messageModifiers/MessageRequests.js';
import * as Polls from './messageModifiers/Polls.js';
import * as Reactions from './messageModifiers/Reactions.js';
import * as ViewOnceOpenSyncs from './messageModifiers/ViewOnceOpenSyncs.js';
import type { DeleteAttributesType } from './messageModifiers/Deletes.js';
import type { EditAttributesType } from './messageModifiers/Edits.js';
import type { MessageRequestAttributesType } from './messageModifiers/MessageRequests.js';
} from './textsecure/WebAPI.preload.js';
import { accountManager } from './textsecure/AccountManager.preload.js';
import * as KeyChangeListener from './textsecure/KeyChangeListener.dom.js';
import { UpdateKeysListener } from './textsecure/UpdateKeysListener.preload.js';
import { isGroup } from './util/whatTypeOfConversation.dom.js';
import { BackOff, FIBONACCI_TIMEOUTS } from './util/BackOff.std.js';
import { createApp as createAppRoot } from './state/roots/createApp.preload.js';
import { AppViewType } from './state/ducks/app.preload.js';
import { areAnyCallsActiveOrRinging } from './state/selectors/calling.std.js';
import { badgeImageFileDownloader } from './badges/badgeImageFileDownloader.preload.js';
import * as Deletes from './messageModifiers/Deletes.preload.js';
import * as Edits from './messageModifiers/Edits.preload.js';
import * as MessageReceipts from './messageModifiers/MessageReceipts.preload.js';
import * as MessageRequests from './messageModifiers/MessageRequests.preload.js';
import * as Polls from './messageModifiers/Polls.preload.js';
import * as Reactions from './messageModifiers/Reactions.preload.js';
import * as ViewOnceOpenSyncs from './messageModifiers/ViewOnceOpenSyncs.preload.js';
import type { DeleteAttributesType } from './messageModifiers/Deletes.preload.js';
import type { EditAttributesType } from './messageModifiers/Edits.preload.js';
import type { MessageRequestAttributesType } from './messageModifiers/MessageRequests.preload.js';
import type {
PollVoteAttributesType,
PollTerminateAttributesType,
} from './messageModifiers/Polls.js';
import type { ReactionAttributesType } from './messageModifiers/Reactions.js';
import type { ViewOnceOpenSyncAttributesType } from './messageModifiers/ViewOnceOpenSyncs.js';
import { ReadStatus } from './messages/MessageReadStatus.js';
import type { SendStateByConversationId } from './messages/MessageSendState.js';
import { SendStatus } from './messages/MessageSendState.js';
import * as Stickers from './types/Stickers.js';
import * as Errors from './types/errors.js';
import { InstallScreenStep } from './types/InstallScreen.js';
import { getEnvironment } from './environment.js';
import { SignalService as Proto } from './protobuf/index.js';
} from './messageModifiers/Polls.preload.js';
import type { ReactionAttributesType } from './messageModifiers/Reactions.preload.js';
import type { ViewOnceOpenSyncAttributesType } from './messageModifiers/ViewOnceOpenSyncs.preload.js';
import { ReadStatus } from './messages/MessageReadStatus.std.js';
import type { SendStateByConversationId } from './messages/MessageSendState.std.js';
import { SendStatus } from './messages/MessageSendState.std.js';
import * as Stickers from './types/Stickers.preload.js';
import * as Errors from './types/errors.std.js';
import { InstallScreenStep } from './types/InstallScreen.std.js';
import { getEnvironment } from './environment.std.js';
import { SignalService as Proto } from './protobuf/index.std.js';
import {
getOnDecryptionError,
onRetryRequest,
onInvalidPlaintextMessage,
onSuccessfulDecrypt,
} from './util/handleRetry.js';
import { themeChanged } from './shims/themeChanged.js';
import { createIPCEvents } from './util/createIPCEvents.js';
import type { ServiceIdString } from './types/ServiceId.js';
} from './util/handleRetry.preload.js';
import { themeChanged } from './shims/themeChanged.dom.js';
import { createIPCEvents } from './util/createIPCEvents.preload.js';
import type { ServiceIdString } from './types/ServiceId.std.js';
import {
ServiceIdKind,
isPniString,
isServiceIdString,
} from './types/ServiceId.js';
import { isAciString } from './util/isAciString.js';
import { normalizeAci } from './util/normalizeAci.js';
import { createLogger } from './logging/log.js';
import { deleteAllLogs } from './util/deleteAllLogs.js';
import { startInteractionMode } from './services/InteractionMode.js';
import { calling } from './services/calling.js';
import { ReactionSource } from './reactions/ReactionSource.js';
import { singleProtoJobQueue } from './jobs/singleProtoJobQueue.js';
import { SeenStatus } from './MessageSeenStatus.js';
import { MessageSender } from './textsecure/SendMessage.js';
import { onStoryRecipientUpdate } from './util/onStoryRecipientUpdate.js';
import { flushAttachmentDownloadQueue } from './util/attachmentDownloadQueue.js';
import { initializeRedux } from './state/initializeRedux.js';
import { StartupQueue } from './util/StartupQueue.js';
import { showConfirmationDialog } from './util/showConfirmationDialog.js';
import { onCallEventSync } from './util/onCallEventSync.js';
import { sleeper } from './util/sleeper.js';
import { DAY, HOUR, SECOND } from './util/durations/index.js';
import { copyDataMessageIntoMessage } from './util/copyDataMessageIntoMessage.js';
} from './types/ServiceId.std.js';
import { isAciString } from './util/isAciString.std.js';
import { normalizeAci } from './util/normalizeAci.std.js';
import { createLogger } from './logging/log.std.js';
import { deleteAllLogs } from './util/deleteAllLogs.preload.js';
import { startInteractionMode } from './services/InteractionMode.dom.js';
import { calling } from './services/calling.preload.js';
import { ReactionSource } from './reactions/ReactionSource.std.js';
import { singleProtoJobQueue } from './jobs/singleProtoJobQueue.preload.js';
import { SeenStatus } from './MessageSeenStatus.std.js';
import { MessageSender } from './textsecure/SendMessage.preload.js';
import { onStoryRecipientUpdate } from './util/onStoryRecipientUpdate.preload.js';
import { flushAttachmentDownloadQueue } from './util/attachmentDownloadQueue.preload.js';
import { initializeRedux } from './state/initializeRedux.preload.js';
import { StartupQueue } from './util/StartupQueue.std.js';
import { showConfirmationDialog } from './util/showConfirmationDialog.dom.js';
import { onCallEventSync } from './util/onCallEventSync.preload.js';
import { sleeper } from './util/sleeper.std.js';
import { DAY, HOUR, SECOND } from './util/durations/index.std.js';
import { copyDataMessageIntoMessage } from './util/copyDataMessageIntoMessage.std.js';
import {
flushMessageCounter,
incrementMessageCounter,
initializeMessageCounter,
} from './util/incrementMessageCounter.js';
import { generateMessageId } from './util/generateMessageId.js';
import { retryPlaceholders } from './services/retryPlaceholders.js';
import { setBatchingStrategy } from './util/messageBatcher.js';
import { parseRemoteClientExpiration } from './util/parseRemoteClientExpiration.js';
import { addGlobalKeyboardShortcuts } from './services/addGlobalKeyboardShortcuts.js';
import { createEventHandler } from './quill/signal-clipboard/util.js';
import { onCallLogEventSync } from './util/onCallLogEventSync.js';
import { backupsService } from './services/backups/index.js';
} from './util/incrementMessageCounter.preload.js';
import { generateMessageId } from './util/generateMessageId.node.js';
import { retryPlaceholders } from './services/retryPlaceholders.std.js';
import { setBatchingStrategy } from './util/messageBatcher.preload.js';
import { parseRemoteClientExpiration } from './util/parseRemoteClientExpiration.dom.js';
import { addGlobalKeyboardShortcuts } from './services/addGlobalKeyboardShortcuts.preload.js';
import { createEventHandler } from './quill/signal-clipboard/util.dom.js';
import { onCallLogEventSync } from './util/onCallLogEventSync.preload.js';
import { backupsService } from './services/backups/index.preload.js';
import {
getCallIdFromEra,
updateLocalGroupCallHistoryTimestamp,
} from './util/callDisposition.js';
import { deriveStorageServiceKey, deriveMasterKey } from './Crypto.js';
import { AttachmentDownloadManager } from './jobs/AttachmentDownloadManager.js';
import { onCallLinkUpdateSync } from './util/onCallLinkUpdateSync.js';
import { CallMode } from './types/CallDisposition.js';
import type { SyncTaskType } from './util/syncTasks.js';
import { queueSyncTasks, runAllSyncTasks } from './util/syncTasks.js';
import type { ViewSyncTaskType } from './messageModifiers/ViewSyncs.js';
import type { ReceiptSyncTaskType } from './messageModifiers/MessageReceipts.js';
import type { ReadSyncTaskType } from './messageModifiers/ReadSyncs.js';
import { AttachmentBackupManager } from './jobs/AttachmentBackupManager.js';
import { getConversationIdForLogging } from './util/idForLogging.js';
import { encryptConversationAttachments } from './util/encryptConversationAttachments.js';
import { DataReader, DataWriter } from './sql/Client.js';
} from './util/callDisposition.preload.js';
import { deriveStorageServiceKey, deriveMasterKey } from './Crypto.node.js';
import { AttachmentDownloadManager } from './jobs/AttachmentDownloadManager.preload.js';
import { onCallLinkUpdateSync } from './util/onCallLinkUpdateSync.preload.js';
import { CallMode } from './types/CallDisposition.std.js';
import type { SyncTaskType } from './util/syncTasks.preload.js';
import { queueSyncTasks, runAllSyncTasks } from './util/syncTasks.preload.js';
import type { ViewSyncTaskType } from './messageModifiers/ViewSyncs.preload.js';
import type { ReceiptSyncTaskType } from './messageModifiers/MessageReceipts.preload.js';
import type { ReadSyncTaskType } from './messageModifiers/ReadSyncs.preload.js';
import { AttachmentBackupManager } from './jobs/AttachmentBackupManager.preload.js';
import { getConversationIdForLogging } from './util/idForLogging.preload.js';
import { encryptConversationAttachments } from './util/encryptConversationAttachments.preload.js';
import { DataReader, DataWriter } from './sql/Client.preload.js';
import {
restoreRemoteConfigFromStorage,
getValue as getRemoteConfigValue,
onChange as onRemoteConfigChange,
maybeRefreshRemoteConfig,
forceRefreshRemoteConfig,
} from './RemoteConfig.js';
import { getParametersForRedux, loadAll } from './services/allLoaders.js';
import { checkFirstEnvelope } from './util/checkFirstEnvelope.js';
import { BLOCKED_UUIDS_ID } from './textsecure/storage/Blocked.js';
import { ReleaseNotesFetcher } from './services/releaseNotesFetcher.js';
import { BuildExpirationService } from './services/buildExpiration.js';
} from './RemoteConfig.dom.js';
import {
getParametersForRedux,
loadAll,
} from './services/allLoaders.preload.js';
import { checkFirstEnvelope } from './util/checkFirstEnvelope.dom.js';
import { BLOCKED_UUIDS_ID } from './textsecure/storage/Blocked.std.js';
import { ReleaseNotesFetcher } from './services/releaseNotesFetcher.preload.js';
import { BuildExpirationService } from './services/buildExpiration.preload.js';
import {
maybeQueueDeviceNameFetch,
onDeviceNameChangeSync,
} from './util/onDeviceNameChangeSync.js';
import { postSaveUpdates } from './util/cleanup.js';
import { handleDataMessage } from './messages/handleDataMessage.js';
import { MessageModel } from './models/messages.js';
import { waitForEvent } from './shims/events.js';
import { sendSyncRequests } from './textsecure/syncRequests.js';
import { handleServerAlerts } from './util/handleServerAlerts.js';
import { isLocalBackupsEnabled } from './util/isLocalBackupsEnabled.js';
import { NavTab, SettingsPage, ProfileEditorPage } from './types/Nav.js';
import { initialize as initializeDonationService } from './services/donations.js';
import { MessageRequestResponseSource } from './types/MessageRequestResponseEvent.js';
import { CURRENT_SCHEMA_VERSION, PRIVATE, GROUP } from './types/Message2.js';
import { JobCancelReason } from './jobs/types.js';
import { itemStorage } from './textsecure/Storage.js';
} from './util/onDeviceNameChangeSync.preload.js';
import { postSaveUpdates } from './util/cleanup.preload.js';
import { handleDataMessage } from './messages/handleDataMessage.preload.js';
import { MessageModel } from './models/messages.preload.js';
import { waitForEvent } from './shims/events.dom.js';
import { sendSyncRequests } from './textsecure/syncRequests.preload.js';
import { handleServerAlerts } from './util/handleServerAlerts.preload.js';
import { isLocalBackupsEnabled } from './util/isLocalBackupsEnabled.dom.js';
import { NavTab, SettingsPage, ProfileEditorPage } from './types/Nav.std.js';
import { initialize as initializeDonationService } from './services/donations.preload.js';
import { MessageRequestResponseSource } from './types/MessageRequestResponseEvent.std.js';
import {
CURRENT_SCHEMA_VERSION,
PRIVATE,
GROUP,
} from './types/Message2.preload.js';
import { JobCancelReason } from './jobs/types.std.js';
import { itemStorage } from './textsecure/Storage.preload.js';
const { isNumber, throttle } = lodash;

View File

@@ -1,7 +1,7 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { makeEnumParser } from '../util/enum.js';
import { makeEnumParser } from '../util/enum.std.js';
// The server may return "testing", which we should parse as "other".
export enum BadgeCategory {

View File

@@ -1,7 +1,7 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { makeEnumParser } from '../util/enum.js';
import { makeEnumParser } from '../util/enum.std.js';
export enum BadgeImageTheme {
Light = 'light',

View File

@@ -2,13 +2,13 @@
// SPDX-License-Identifier: AGPL-3.0-only
import PQueue from 'p-queue';
import { DataWriter } from '../sql/Client.js';
import { createLogger } from '../logging/log.js';
import { MINUTE } from '../util/durations/index.js';
import { missingCaseError } from '../util/missingCaseError.js';
import { waitForOnline } from '../util/waitForOnline.js';
import { writeNewBadgeImageFileData } from '../util/migrations.js';
import { getBadgeImageFile, isOnline } from '../textsecure/WebAPI.js';
import { DataWriter } from '../sql/Client.preload.js';
import { createLogger } from '../logging/log.std.js';
import { MINUTE } from '../util/durations/index.std.js';
import { missingCaseError } from '../util/missingCaseError.std.js';
import { waitForOnline } from '../util/waitForOnline.dom.js';
import { writeNewBadgeImageFileData } from '../util/migrations.preload.js';
import { getBadgeImageFile, isOnline } from '../textsecure/WebAPI.preload.js';
const log = createLogger('badgeImageFileDownloader');

View File

@@ -2,8 +2,8 @@
// SPDX-License-Identifier: AGPL-3.0-only
import lodash from 'lodash';
import type { BadgeType } from './types.js';
import { BadgeImageTheme } from './BadgeImageTheme.js';
import type { BadgeType } from './types.std.js';
import { BadgeImageTheme } from './BadgeImageTheme.std.js';
const { find, findLast, first, last } = lodash;

View File

@@ -1,7 +1,7 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { maybeParseUrl } from '../util/url.js';
import { maybeParseUrl } from '../util/url.std.js';
export function isBadgeImageFileUrlValid(
url: string,

View File

@@ -1,7 +1,7 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { BadgeType } from './types.js';
import type { BadgeType } from './types.std.js';
export const isBadgeVisible = (badge: Readonly<BadgeType>): boolean =>
'isVisible' in badge ? badge.isVisible : true;

View File

@@ -3,13 +3,16 @@
import * as z from 'zod';
import lodash from 'lodash';
import { isRecord } from '../util/isRecord.js';
import { isNormalNumber } from '../util/isNormalNumber.js';
import { createLogger } from '../logging/log.js';
import type { BadgeType, BadgeImageType } from './types.js';
import { parseBadgeCategory } from './BadgeCategory.js';
import { BadgeImageTheme, parseBadgeImageTheme } from './BadgeImageTheme.js';
import { safeParseUnknown } from '../util/schemas.js';
import { isRecord } from '../util/isRecord.std.js';
import { isNormalNumber } from '../util/isNormalNumber.std.js';
import { createLogger } from '../logging/log.std.js';
import type { BadgeType, BadgeImageType } from './types.std.js';
import { parseBadgeCategory } from './BadgeCategory.std.js';
import {
BadgeImageTheme,
parseBadgeImageTheme,
} from './BadgeImageTheme.std.js';
import { safeParseUnknown } from '../util/schemas.std.js';
const { isEmpty } = lodash;

View File

@@ -1,8 +1,8 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { BadgeCategory } from './BadgeCategory.js';
import type { BadgeImageTheme } from './BadgeImageTheme.js';
import type { BadgeCategory } from './BadgeCategory.std.js';
import type { BadgeImageTheme } from './BadgeImageTheme.std.js';
type SomeoneElsesBadgeType = Readonly<{
category: BadgeCategory;

View File

@@ -9,7 +9,7 @@
import { videoPixelFormatToEnum } from '@signalapp/ringrtc';
import type { VideoFrameSender, VideoFrameSource } from '@signalapp/ringrtc';
import type { RefObject } from 'react';
import { createLogger } from '../logging/log.js';
import { createLogger } from '../logging/log.std.js';
const log = createLogger('VideoSupport');

View File

@@ -2,7 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { useRef, useCallback } from 'react';
import { FRAME_BUFFER_SIZE } from './constants.js';
import { FRAME_BUFFER_SIZE } from './constants.std.js';
/**
* A hook that returns a function. This function returns a "singleton" `ArrayBuffer` to be

View File

@@ -12,18 +12,18 @@
// are not immediately retried, however, until `.onOnline()` is called from
// when we are actually online.
import { assertDev } from './util/assert.js';
import { isOlderThan } from './util/timestamp.js';
import { clearTimeoutIfNecessary } from './util/clearTimeoutIfNecessary.js';
import { missingCaseError } from './util/missingCaseError.js';
import { assertDev } from './util/assert.std.js';
import { isOlderThan } from './util/timestamp.std.js';
import { clearTimeoutIfNecessary } from './util/clearTimeoutIfNecessary.std.js';
import { missingCaseError } from './util/missingCaseError.std.js';
import type { StorageInterface } from './types/Storage.d.ts';
import * as Errors from './types/errors.js';
import { HTTPError } from './types/HTTPError.js';
import type { SendMessageChallengeData } from './textsecure/Errors.js';
import { createLogger } from './logging/log.js';
import { drop } from './util/drop.js';
import { findRetryAfterTimeFromError } from './jobs/helpers/findRetryAfterTimeFromError.js';
import { MINUTE } from './util/durations/index.js';
import * as Errors from './types/errors.std.js';
import { HTTPError } from './types/HTTPError.std.js';
import type { SendMessageChallengeData } from './textsecure/Errors.std.js';
import { createLogger } from './logging/log.std.js';
import { drop } from './util/drop.std.js';
import { findRetryAfterTimeFromError } from './jobs/helpers/findRetryAfterTimeFromError.std.js';
import { MINUTE } from './util/durations/index.std.js';
const log = createLogger('challenge');

View File

@@ -3,9 +3,9 @@
import React from 'react';
import { action } from '@storybook/addon-actions';
import type { ComponentMeta } from '../storybook/types.js';
import type { AboutProps } from './About.js';
import { About } from './About.js';
import type { ComponentMeta } from '../storybook/types.std.js';
import type { AboutProps } from './About.dom.js';
import { About } from './About.dom.js';
const { i18n } = window.SignalContext;

View File

@@ -3,8 +3,8 @@
import React from 'react';
import type { LocalizerType } from '../types/Util.js';
import { useEscapeHandling } from '../hooks/useEscapeHandling.js';
import type { LocalizerType } from '../types/Util.std.js';
import { useEscapeHandling } from '../hooks/useEscapeHandling.dom.js';
export type AboutProps = Readonly<{
closeAbout: () => unknown;

View File

@@ -6,11 +6,11 @@ import React from 'react';
import { action } from '@storybook/addon-actions';
import type { Meta } from '@storybook/react';
import type { PropsType } from './AddGroupMemberErrorDialog.js';
import type { PropsType } from './AddGroupMemberErrorDialog.dom.js';
import {
AddGroupMemberErrorDialog,
AddGroupMemberErrorDialogMode,
} from './AddGroupMemberErrorDialog.js';
} from './AddGroupMemberErrorDialog.dom.js';
const { i18n } = window.SignalContext;

View File

@@ -4,9 +4,9 @@
import type { ReactNode } from 'react';
import React from 'react';
import type { LocalizerType } from '../types/Util.js';
import { Alert } from './Alert.js';
import { missingCaseError } from '../util/missingCaseError.js';
import type { LocalizerType } from '../types/Util.std.js';
import { Alert } from './Alert.dom.js';
import { missingCaseError } from '../util/missingCaseError.std.js';
export enum AddGroupMemberErrorDialogMode {
MaximumGroupSize,

View File

@@ -5,12 +5,12 @@ import React from 'react';
import type { Meta, StoryFn } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import type { Props } from './AddUserToAnotherGroupModal.js';
import type { Props } from './AddUserToAnotherGroupModal.dom.js';
import {
getDefaultConversation,
getDefaultGroup,
} from '../test-helpers/getDefaultConversation.js';
import { AddUserToAnotherGroupModal } from './AddUserToAnotherGroupModal.js';
} from '../test-helpers/getDefaultConversation.std.js';
import { AddUserToAnotherGroupModal } from './AddUserToAnotherGroupModal.dom.js';
const { i18n } = window.SignalContext;

View File

@@ -5,23 +5,23 @@ import lodash from 'lodash';
import React, { useCallback } from 'react';
import type { ListRowProps } from 'react-virtualized';
import type { ConversationType } from '../state/ducks/conversations.js';
import type { LocalizerType } from '../types/Util.js';
import { ToastType } from '../types/Toast.js';
import { filterAndSortConversations } from '../util/filterAndSortConversations.js';
import { ConfirmationDialog } from './ConfirmationDialog.js';
import type { GroupListItemConversationType } from './conversationList/GroupListItem.js';
import type { ConversationType } from '../state/ducks/conversations.preload.js';
import type { LocalizerType } from '../types/Util.std.js';
import { ToastType } from '../types/Toast.dom.js';
import { filterAndSortConversations } from '../util/filterAndSortConversations.std.js';
import { ConfirmationDialog } from './ConfirmationDialog.dom.js';
import type { GroupListItemConversationType } from './conversationList/GroupListItem.dom.js';
import {
DisabledReason,
GroupListItem,
} from './conversationList/GroupListItem.js';
import { Modal } from './Modal.js';
import { SearchInput } from './SearchInput.js';
import { useRestoreFocus } from '../hooks/useRestoreFocus.js';
import { ListView } from './ListView.js';
import { ListTile } from './ListTile.js';
import type { ShowToastAction } from '../state/ducks/toast.js';
import { SizeObserver } from '../hooks/useSizeObserver.js';
} from './conversationList/GroupListItem.dom.js';
import { Modal } from './Modal.dom.js';
import { SearchInput } from './SearchInput.dom.js';
import { useRestoreFocus } from '../hooks/useRestoreFocus.dom.js';
import { ListView } from './ListView.dom.js';
import { ListTile } from './ListTile.dom.js';
import type { ShowToastAction } from '../state/ducks/toast.preload.js';
import { SizeObserver } from '../hooks/useSizeObserver.dom.js';
const { pick } = lodash;

View File

@@ -4,8 +4,8 @@
import React from 'react';
import { action } from '@storybook/addon-actions';
import type { Meta } from '@storybook/react';
import type { PropsType } from './Alert.js';
import { Alert } from './Alert.js';
import type { PropsType } from './Alert.dom.js';
import { Alert } from './Alert.dom.js';
const { i18n } = window.SignalContext;

View File

@@ -4,10 +4,10 @@
import type { ReactNode } from 'react';
import React from 'react';
import type { LocalizerType } from '../types/Util.js';
import type { Theme } from '../util/theme.js';
import { Button } from './Button.js';
import { Modal } from './Modal.js';
import type { LocalizerType } from '../types/Util.std.js';
import type { Theme } from '../util/theme.std.js';
import { Button } from './Button.dom.js';
import { Modal } from './Modal.dom.js';
export type PropsType = {
body: ReactNode;

View File

@@ -5,8 +5,8 @@ import React from 'react';
import { action } from '@storybook/addon-actions';
import type { Meta } from '@storybook/react';
import type { PropsType } from './AnimatedEmojiGalore.js';
import { AnimatedEmojiGalore } from './AnimatedEmojiGalore.js';
import type { PropsType } from './AnimatedEmojiGalore.dom.js';
import { AnimatedEmojiGalore } from './AnimatedEmojiGalore.dom.js';
export default {
title: 'Components/AnimatedEmojiGalore',

View File

@@ -4,14 +4,14 @@
import React from 'react';
import { animated, to as interpolate, useSprings } from '@react-spring/web';
import lodash from 'lodash';
import { useReducedMotion } from '../hooks/useReducedMotion.js';
import { FunStaticEmoji } from './fun/FunEmoji.js';
import { strictAssert } from '../util/assert.js';
import { useReducedMotion } from '../hooks/useReducedMotion.dom.js';
import { FunStaticEmoji } from './fun/FunEmoji.dom.js';
import { strictAssert } from '../util/assert.std.js';
import {
getEmojiVariantByKey,
getEmojiVariantKeyByValue,
isEmojiVariantValue,
} from './fun/data/emojis.js';
} from './fun/data/emojis.std.js';
const { random } = lodash;

View File

@@ -6,11 +6,11 @@ import lodash from 'lodash';
import type {
ConversationType,
ShowConversationType,
} from '../state/ducks/conversations.js';
import { I18n } from './I18n.js';
import type { LocalizerType, ThemeType } from '../types/Util.js';
import { Modal } from './Modal.js';
import { ConversationListItem } from './conversationList/ConversationListItem.js';
} from '../state/ducks/conversations.preload.js';
import { I18n } from './I18n.dom.js';
import type { LocalizerType, ThemeType } from '../types/Util.std.js';
import { Modal } from './Modal.dom.js';
import { ConversationListItem } from './conversationList/ConversationListItem.dom.js';
const { noop } = lodash;

View File

@@ -4,14 +4,14 @@
import React, { useEffect } from 'react';
import classNames from 'classnames';
import type { ViewStoryActionCreatorType } from '../state/ducks/stories.js';
import type { VerificationTransport } from '../types/VerificationTransport.js';
import { ThemeType } from '../types/Util.js';
import { missingCaseError } from '../util/missingCaseError.js';
import { type AppStateType, AppViewType } from '../state/ducks/app.js';
import { SmartInstallScreen } from '../state/smart/InstallScreen.js';
import { StandaloneRegistration } from './StandaloneRegistration.js';
import { usePageVisibility } from '../hooks/usePageVisibility.js';
import type { ViewStoryActionCreatorType } from '../state/ducks/stories.preload.js';
import type { VerificationTransport } from '../types/VerificationTransport.std.js';
import { ThemeType } from '../types/Util.std.js';
import { missingCaseError } from '../util/missingCaseError.std.js';
import { type AppStateType, AppViewType } from '../state/ducks/app.preload.js';
import { SmartInstallScreen } from '../state/smart/InstallScreen.preload.js';
import { StandaloneRegistration } from './StandaloneRegistration.dom.js';
import { usePageVisibility } from '../hooks/usePageVisibility.dom.js';
type PropsType = {
state: AppStateType;

View File

@@ -4,8 +4,8 @@
import React, { useState } from 'react';
import { action } from '@storybook/addon-actions';
import type { Meta } from '@storybook/react';
import type { PropsType } from './AutoSizeInput.js';
import { AutoSizeInput } from './AutoSizeInput.js';
import type { PropsType } from './AutoSizeInput.dom.js';
import { AutoSizeInput } from './AutoSizeInput.dom.js';
export default {
title: 'Components/AutoSizeInput',

View File

@@ -6,7 +6,7 @@ import React, { useCallback, useState, useEffect, useRef } from 'react';
import { createPortal } from 'react-dom';
import classNames from 'classnames';
import { getClassNamesFor } from '../util/getClassNamesFor.js';
import { getClassNamesFor } from '../util/getClassNamesFor.std.js';
export type PropsType = Readonly<{
disableSpellcheck?: boolean;

Some files were not shown because too many files have changed in this diff Show More