Refactor: Organize files by app

This commit is contained in:
James Babcock committed 2026-08-03 00:08:52 -07:00
1 parent 1ec6b3ff83
commit 9b3832d7a7
40 files changed
+175 -175

No files matched your search

@@ -8,19 +8,19 @@
* focus, long-press opens the window menu.
*/
import "@nativescript/core/globals";
import { GrayImage } from "../graphics/image";
import { getDefaultSmallFont, getFont } from "../graphics/bdffont";
import * as frameTimings from "../native/frame-timings";
import type { DashboardInputEvent } from "../ui/layers";
import { buildSoundSequencePayload, type Step } from "../ui/apps/sound-effects";
import { defaultWindowMenuItems, WindowMenu } from "../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../ui/shell/worker-window";
import { GrayImage } from "../../graphics/image";
import { getDefaultSmallFont, getFont } from "../../graphics/bdffont";
import * as frameTimings from "../../native/frame-timings";
import type { DashboardInputEvent } from "../../ui/layers";
import { buildSoundSequencePayload, type Step } from "../../ui/sound-effects";
import { defaultWindowMenuItems, WindowMenu } from "../../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window";
import {
GESTURE_CLICK,
GESTURE_DOUBLE_CLICK,
GESTURE_LONG_PRESS,
GESTURE_SCROLL,
} from "../ui/gestures";
} from "../../ui/gestures";
declare const global: any;
declare const com: any;
@@ -1,12 +1,12 @@
import { ensureCalendarPermission, hasCalendarPermission } from "../../g2/android-permissions";
import { invalidateCalendarCache } from "../../native/calendar";
import { CalendarLayer } from "../apps/calendar";
import { CalendarLayer } from "./calendar";
import {
createInProcessWindow,
YieldAtRootLayer,
type InProcessAppOptions,
type InProcessWindow,
} from "./in-process-window";
} from "../../ui/shell/in-process-window";
export const CALENDAR_WINDOW_ID = "calendar";
export const CALENDAR_SURFACE_ID = "window:calendar";
@@ -3,10 +3,10 @@ import { GrayImage } from "../../graphics/image";
import { wrapText, truncateText } from "../../graphics/textwrap";
import { clamp } from "../../util/numeric-util";
import { readUpcomingEvents, type CalendarEvent } from "../../native/calendar";
import { timeFormatSetting } from "../dashboard-settings";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK } from "../gestures";
import { timeFormatSetting } from "../../ui/dashboard-settings";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK } from "../../ui/gestures";
import { hasCalendarPermission } from "../../g2/android-permissions";
import { type DashboardInputEvent, type Layer, type LayerContext } from "../layers";
import { type DashboardInputEvent, type Layer, type LayerContext } from "../../ui/layers";
const PAGE_X = 12;
const PAGE_Y = 12;
@@ -2,9 +2,9 @@ import { getDefaultMediumFont, getDefaultSmallFont } from "../../graphics/bdffon
import { GrayImage } from "../../graphics/image";
import { clamp } from "../../util/numeric-util";
import { addImuListener, imuSourceLabel, setImuReportEnabled, type ImuReading } from "../../native/imu";
import { GESTURE_DOUBLE_CLICK } from "../gestures";
import { Layer, type DashboardInputEvent, type LayerContext } from "../layers";
import { shell } from "../shell/shell";
import { GESTURE_DOUBLE_CLICK } from "../../ui/gestures";
import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
import { shell } from "../../ui/shell/shell";
// IMU report pace. This is NOT a literal Hz — the firmware only accepts the
// ImuReportPace codes 100..1000 (step 100); the real delivery rate is
@@ -1,9 +1,9 @@
import { getDefaultSmallFont } from "../../graphics/bdffont";
import { GrayImage } from "../../graphics/image";
import { clamp } from "../../util/numeric-util";
import { Layer, type DashboardInputEvent, type LayerActions, type LayerContext } from "../layers";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../gestures";
import { drawSelectionHighlight, scrollToKeepSelectionVisible } from "../menu";
import { Layer, type DashboardInputEvent, type LayerActions, type LayerContext } from "../../ui/layers";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../../ui/gestures";
import { drawSelectionHighlight, scrollToKeepSelectionVisible } from "../../ui/menu";
import {
buildSoundSequencePayload,
CFW_SEQ_MAX,
@@ -11,7 +11,7 @@ import {
phraseDurationMs,
SOUND_EFFECTS,
type SoundEffect,
} from "./sound-effects";
} from "../../ui/sound-effects";
const HEADER_HEIGHT = 30;
const ROW_HEIGHT = 16;
@@ -1,14 +1,14 @@
import { MenuLayer } from "../menu";
import { ScreenTestLayer } from "../apps/screen-test";
import { BuzzerDemoLayer } from "../apps/buzzer-demo";
import { AccelerometerDemoLayer } from "../apps/accelerometer-demo";
import { appViewportSize } from "./geometry";
import { MenuLayer } from "../../ui/menu";
import { ScreenTestLayer } from "./screen-test";
import { BuzzerDemoLayer } from "./buzzer-demo";
import { AccelerometerDemoLayer } from "./accelerometer-demo";
import { appViewportSize } from "../../ui/shell/geometry";
import {
createInProcessWindow,
YieldAtRootLayer,
type InProcessAppOptions,
type InProcessWindow,
} from "./in-process-window";
} from "../../ui/shell/in-process-window";
export const DEBUG_TESTS_WINDOW_ID = "debug-tests";
export const DEBUG_TESTS_SURFACE_ID = "window:debug-tests";
@@ -1,6 +1,6 @@
import { getDefaultSmallFont } from "../../graphics/bdffont";
import { GrayImage } from "../../graphics/image";
import { Layer, type DashboardInputEvent, type LayerContext } from "../layers";
import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
const COLOR_VALUE_COUNT = 256;
const COLOR_VALUE_STEP = 1;
@@ -3,9 +3,9 @@ import { truncateText, truncateLeft } from "../../graphics/textwrap";
import { GrayImage } from "../../graphics/image";
import { renderIcon, type IconName } from "../../graphics/icons";
import { clamp } from "../../util/numeric-util";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../gestures";
import { drawListScrollbar, drawSelectionHighlight, scrollToKeepSelectionVisible, type MenuItem } from "../menu";
import { ConfigSettingEnum } from "../dashboard-settings";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../../ui/gestures";
import { drawListScrollbar, drawSelectionHighlight, scrollToKeepSelectionVisible, type MenuItem } from "../../ui/menu";
import { ConfigSettingEnum } from "../../ui/dashboard-settings";
import { getStringSetting, setStringSetting } from "../../native/settings-store";
import {
externalStorageRootPath,
@@ -15,7 +15,7 @@ import {
statPath,
type DirectoryEntry,
} from "../../native/file-access";
import { Layer, type DashboardInputEvent, type LayerContext } from "../layers";
import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
const HEADER_HEIGHT = 34;
const ROW_HEIGHT = 16;
@@ -2,9 +2,9 @@ import { getDefaultSmallFont } from "../../graphics/bdffont";
import { GrayImage } from "../../graphics/image";
import { wrapText } from "../../graphics/textwrap";
import type { DirectoryEntry } from "../../native/file-access";
import { GESTURE_DOUBLE_CLICK } from "../gestures";
import { Layer, type DashboardInputEvent, type LayerContext, type PaintBelow } from "../layers";
import { drawSelectionHighlight } from "../menu";
import { GESTURE_DOUBLE_CLICK } from "../../ui/gestures";
import { Layer, type DashboardInputEvent, type LayerContext, type PaintBelow } from "../../ui/layers";
import { drawSelectionHighlight } from "../../ui/menu";
const DIALOG_X = 8;
const DIALOG_Y = 8;
@@ -1,16 +1,16 @@
import { readTextFile, type DirectoryEntry } from "../../native/file-access";
import { isDecodableImageFile } from "../../native/image-files";
import { FileBrowserLayer } from "../apps/file-browser";
import { FileInfoDialogLayer, type FileInfoAction } from "../apps/file-info-dialog";
import { ImageViewerLayer } from "../apps/image-viewer";
import { TextViewerLayer } from "../apps/text-viewer";
import { FileBrowserLayer } from "./file-browser";
import { FileInfoDialogLayer, type FileInfoAction } from "./file-info-dialog";
import { ImageViewerLayer } from "./image-viewer";
import { TextViewerLayer } from "./text-viewer";
import {
createInProcessWindow,
YieldAtRootLayer,
type InProcessAppOptions,
type InProcessWindow,
} from "./in-process-window";
import { shell } from "./shell";
} from "../../ui/shell/in-process-window";
import { shell } from "../../ui/shell/shell";
export const FILES_WINDOW_ID = "files";
export const FILES_SURFACE_ID = "window:files";
@@ -2,8 +2,8 @@ import { getDefaultSmallFont, type BdfFont } from "../../graphics/bdffont";
import { truncateText } from "../../graphics/textwrap";
import { GrayImage } from "../../graphics/image";
import { loadImageFileAsGray } from "../../native/image-files";
import { GESTURE_DOUBLE_CLICK } from "../gestures";
import { Layer, type DashboardInputEvent, type LayerContext } from "../layers";
import { GESTURE_DOUBLE_CLICK } from "../../ui/gestures";
import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
const MARGIN_X = 18;
const TITLE_Y = 8;
@@ -1,7 +1,7 @@
import { wrapText, truncateText } from "../../graphics/textwrap";
import { getDefaultSmallFont, type BdfFont } from "../../graphics/bdffont";
import { GrayImage } from "../../graphics/image";
import { Layer, type DashboardInputEvent, type LayerContext } from "../layers";
import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
const MARGIN_X = 18;
const TITLE_Y = 16;
@@ -12,15 +12,15 @@
* Safe cards auto-play to the foundations after every move.
*/
import "@nativescript/core/globals";
import { GrayImage } from "../graphics/image";
import { getDefaultSmallFont, getFont } from "../graphics/bdffont";
import * as frameTimings from "../native/frame-timings";
import type { DashboardInputEvent } from "../ui/layers";
import { buildSoundSequencePayload, type Step } from "../ui/apps/sound-effects";
import { defaultWindowMenuItems, WindowMenu } from "../ui/window-menu";
import type { MenuItem } from "../ui/menu";
import type { WorkerAppMessage, WorkerAppReply } from "../ui/shell/worker-window";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_LONG_PRESS } from "../ui/gestures";
import { GrayImage } from "../../graphics/image";
import { getDefaultSmallFont, getFont } from "../../graphics/bdffont";
import * as frameTimings from "../../native/frame-timings";
import type { DashboardInputEvent } from "../../ui/layers";
import { buildSoundSequencePayload, type Step } from "../../ui/sound-effects";
import { defaultWindowMenuItems, WindowMenu } from "../../ui/window-menu";
import type { MenuItem } from "../../ui/menu";
import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_LONG_PRESS } from "../../ui/gestures";
declare const global: any;
declare const com: any;
@@ -7,13 +7,13 @@ import {
GESTURE_CLICK,
GESTURE_DOUBLE_CLICK,
GESTURE_SCROLL,
} from "../gestures";
import { DashboardInputEvent, Layer, LayerActions, LayerContext } from "../layers";
import { drawSelectionHighlight, scrollToKeepSelectionVisible } from "../menu";
import { onAnySettingChanged } from "../dashboard-settings";
import { createInProcessWindow } from "./in-process-window";
} from "../../ui/gestures";
import { DashboardInputEvent, Layer, LayerActions, LayerContext } from "../../ui/layers";
import { drawSelectionHighlight, scrollToKeepSelectionVisible } from "../../ui/menu";
import { onAnySettingChanged } from "../../ui/dashboard-settings";
import { createInProcessWindow } from "../../ui/shell/in-process-window";
import { getFolderAssignments, getFolders, getFolderStateFingerprint } from "./launcher-folders";
import { shell, type ShellWindow } from "./shell";
import { shell, type ShellWindow } from "../../ui/shell/shell";
export type LauncherAppEntry = {
appId: string;
File renamed without changes.
@@ -12,20 +12,20 @@
* focus, long-press opens the window menu.
*/
import "@nativescript/core/globals";
import { GrayImage } from "../graphics/image";
import { getDefaultSmallFont, getFont } from "../graphics/bdffont";
import * as frameTimings from "../native/frame-timings";
import type { DashboardInputEvent } from "../ui/layers";
import { buildSoundSequencePayload, type Step } from "../ui/apps/sound-effects";
import { defaultWindowMenuItems, WindowMenu } from "../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../ui/shell/worker-window";
import { GrayImage } from "../../graphics/image";
import { getDefaultSmallFont, getFont } from "../../graphics/bdffont";
import * as frameTimings from "../../native/frame-timings";
import type { DashboardInputEvent } from "../../ui/layers";
import { buildSoundSequencePayload, type Step } from "../../ui/sound-effects";
import { defaultWindowMenuItems, WindowMenu } from "../../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window";
import {
GESTURE_CLICK,
GESTURE_DOUBLE_CLICK,
GESTURE_LONG_PRESS,
GESTURE_SCROLL,
} from "../ui/gestures";
import { clamp } from "../util/numeric-util";
} from "../../ui/gestures";
import { clamp } from "../../util/numeric-util";
declare const global: any;
declare const com: any;
@@ -1,20 +1,20 @@
import { getDefaultSmallFont, type BdfFont } from "../../graphics/bdffont";
import { GrayImage } from "../../graphics/image";
import { clamp } from "../../util/numeric-util";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../gestures";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../../ui/gestures";
import {
MenuLayer,
drawListScrollbar,
drawSelectionHighlight,
drawSubmenuIndicator,
scrollToKeepSelectionVisible,
} from "../menu";
} from "../../ui/menu";
import {
mediaBrowserBridge,
type MediaBrowseItem,
type MediaBrowserApp,
} from "../../native/media-browser";
import { Layer, type DashboardInputEvent, type LayerContext } from "../layers";
import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
const HEADER_HEIGHT = 34;
const ROW_HEIGHT = 16;
@@ -8,22 +8,22 @@ import {
GESTURE_SCROLL,
GESTURE_SCROLL_DOWN,
GESTURE_SCROLL_UP,
} from "../gestures";
import { MenuLayer, drawSelectionHighlight, drawSubmenuIndicator } from "../menu";
} from "../../ui/gestures";
import { MenuLayer, drawSelectionHighlight, drawSubmenuIndicator } from "../../ui/menu";
import {
mediaControllerBridge,
type MediaControllerState,
type MediaQueueItem,
} from "../../native/media-controller";
import { mediaBrowserBridge, type MediaBrowserApp } from "../../native/media-browser";
import { MediaBrowseLayer } from "../apps/media-browse";
import { Layer, type DashboardInputEvent, type LayerContext, type PaintBelow } from "../layers";
import { MediaBrowseLayer } from "./media-browse";
import { Layer, type DashboardInputEvent, type LayerContext, type PaintBelow } from "../../ui/layers";
import {
createInProcessWindow,
YieldAtRootLayer,
type InProcessAppOptions,
type InProcessWindow,
} from "./in-process-window";
} from "../../ui/shell/in-process-window";
export const MUSIC_WINDOW_ID = "music";
export const MUSIC_SURFACE_ID = "window:music";
@@ -2,7 +2,7 @@
* Maneuver arrow glyphs for turn-by-turn guidance, drawn with GrayImage
* primitives from the Directions maneuver type + modifier (no image assets).
*/
import { GrayImage } from "../graphics/image";
import { GrayImage } from "../../graphics/image";
/**
* Draw the glyph for a maneuver into a size x size box at (x, y).
@@ -7,15 +7,15 @@
* guidance text (right pane) updates per GPS fix and ships as small deltas.
*/
import "@nativescript/core/globals";
import { GrayImage } from "../graphics/image";
import { getDefaultSmallFont, getFont } from "../graphics/bdffont";
import * as frameTimings from "../native/frame-timings";
import type { DashboardInputEvent } from "../ui/layers";
import { defaultWindowMenuItems, WindowMenu } from "../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../ui/shell/worker-window";
import type { ToolSpec, ToolResult } from "../assistant/tool-registry";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../ui/gestures";
import { LocationTracker, type TrackedLocation } from "../native/location-tracker";
import { GrayImage } from "../../graphics/image";
import { getDefaultSmallFont, getFont } from "../../graphics/bdffont";
import * as frameTimings from "../../native/frame-timings";
import type { DashboardInputEvent } from "../../ui/layers";
import { defaultWindowMenuItems, WindowMenu } from "../../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window";
import type { ToolSpec, ToolResult } from "../../assistant/tool-registry";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../../ui/gestures";
import { LocationTracker, type TrackedLocation } from "../../native/location-tracker";
import {
fetchRoute,
fetchStaticMapGray,
@@ -25,9 +25,9 @@ import {
type Route,
type RouteProfile,
type StaticMapCamera,
} from "../native/mapbox";
import { bearingDegrees, haversineMeters, RouteFollower, type RouteProgress } from "../navigate/route-follower";
import { drawManeuverGlyph } from "../navigate/maneuver-icons";
} from "../../native/mapbox";
import { bearingDegrees, haversineMeters, RouteFollower, type RouteProgress } from "./route-follower";
import { drawManeuverGlyph } from "./maneuver-icons";
declare const global: any;
declare const com: any;
@@ -3,7 +3,7 @@
* progress toward the next maneuver, and detect off-route/arrival. Pure
* geometry over the Directions response — no network, no Android.
*/
import type { Route } from "../native/mapbox";
import type { Route } from "../../native/mapbox";
const EARTH_RADIUS_M = 6_371_000;
/** Perpendicular distance that counts as off the route. */
@@ -1,14 +1,14 @@
import { getDefaultSmallFont } from "../../graphics/bdffont";
import { GrayImage } from "../../graphics/image";
import { nightscoutBridge, type NightscoutState } from "../../native/nightscout-bridge";
import { NightscoutLayer } from "../apps/nightscout";
import { NightscoutLayer } from "./nightscout";
import {
createInProcessWindow,
YieldAtRootLayer,
type InProcessAppOptions,
type InProcessWindow,
} from "./in-process-window";
import { shell } from "./shell";
} from "../../ui/shell/in-process-window";
import { shell } from "../../ui/shell/shell";
export const NIGHTSCOUT_WINDOW_ID = "nightscout";
export const NIGHTSCOUT_SURFACE_ID = "window:nightscout";
@@ -1,18 +1,18 @@
import { BdfFont, getDefaultLargeFont, getDefaultSmallFont } from "../../graphics/bdffont";
import { GrayImage, imageFromAsciiArt } from "../../graphics/image";
import { DashboardInputEvent, Layer, LayerContext } from "../layers";
import { DashboardInputEvent, Layer, LayerContext } from "../../ui/layers";
import { nightscoutBridge, type NightscoutState } from "../../native/nightscout-bridge";
import {
isNightscoutSettingsConfigured,
nightscoutApiTokenSetting,
nightscoutSiteUrlSetting,
textSettingMenuItem,
} from "../dashboard-settings";
} from "../../ui/dashboard-settings";
import { formatAgeShortFromTimestamp, formatTimestamp } from "~/util/date-util";
import { MenuLayer } from "../menu";
import { openSettingsSubMenu } from "../dashboard/settings-panel";
import { MenuLayer } from "../../ui/menu";
import { openSettingsSubMenu } from "../../ui/dashboard/settings-panel";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK } from "../gestures";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK } from "../../ui/gestures";
const nightscoutLargeFont = getDefaultLargeFont();
const NIGHTSCOUT_STALE_MS = 15 * 60 * 1000;
const NIGHTSCOUT_GRAPH_WINDOW_MS = 2 * 60 * 60 * 1000;
@@ -1,10 +1,10 @@
import { NotificationsListLayer } from "../notifications";
import { NotificationsListLayer } from "../../ui/notifications";
import {
createInProcessWindow,
YieldAtRootLayer,
type InProcessAppOptions,
type InProcessWindow,
} from "./in-process-window";
} from "../../ui/shell/in-process-window";
export const NOTIFICATIONS_WINDOW_ID = "notifications";
export const NOTIFICATIONS_SURFACE_ID = "window:notifications";
@@ -18,21 +18,21 @@
* focus, long-press opens the window menu.
*/
import "@nativescript/core/globals";
import { GrayImage } from "../graphics/image";
import { getDefaultSmallFont, getFont } from "../graphics/bdffont";
import * as frameTimings from "../native/frame-timings";
import { getStringSetting, setStringSetting } from "../native/settings-store";
import type { DashboardInputEvent } from "../ui/layers";
import { buildSoundSequencePayload, type Step } from "../ui/apps/sound-effects";
import { defaultWindowMenuItems, WindowMenu } from "../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../ui/shell/worker-window";
import { GrayImage } from "../../graphics/image";
import { getDefaultSmallFont, getFont } from "../../graphics/bdffont";
import * as frameTimings from "../../native/frame-timings";
import { getStringSetting, setStringSetting } from "../../native/settings-store";
import type { DashboardInputEvent } from "../../ui/layers";
import { buildSoundSequencePayload, type Step } from "../../ui/sound-effects";
import { defaultWindowMenuItems, WindowMenu } from "../../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window";
import {
GESTURE_CLICK,
GESTURE_DOUBLE_CLICK,
GESTURE_LONG_PRESS,
GESTURE_SCROLL,
} from "../ui/gestures";
import { clamp } from "../util/numeric-util";
} from "../../ui/gestures";
import { clamp } from "../../util/numeric-util";
declare const global: any;
declare const com: any;
@@ -1,9 +1,9 @@
import { GrayImage } from "../../graphics/image";
import { LayerActions } from "../layers";
import { EditTextSettingLayer } from "../dashboard-settings";
import { createSettingsPanelLayer } from "../dashboard/settings-menus";
import { createInProcessWindow } from "./in-process-window";
import { type ShellWindow } from "./shell";
import { LayerActions } from "../../ui/layers";
import { EditTextSettingLayer } from "../../ui/dashboard-settings";
import { createSettingsPanelLayer } from "../../ui/dashboard/settings-menus";
import { createInProcessWindow } from "../../ui/shell/in-process-window";
import { type ShellWindow } from "../../ui/shell/shell";
export const SETTINGS_WINDOW_ID = "settings";
export const SETTINGS_SURFACE_ID = "window:settings";
@@ -13,37 +13,37 @@
* this worker's thread.
*/
import "@nativescript/core/globals";
import { GrayImage } from "../graphics/image";
import { getFont } from "../graphics/bdffont";
import { TERMINAL_ICON_GLYPHS } from "../graphics/icons";
import * as frameTimings from "../native/frame-timings";
import { GESTURE_DOUBLE_CLICK } from "../ui/gestures";
import { GrayImage } from "../../graphics/image";
import { getFont } from "../../graphics/bdffont";
import { TERMINAL_ICON_GLYPHS } from "../../graphics/icons";
import * as frameTimings from "../../native/frame-timings";
import { GESTURE_DOUBLE_CLICK } from "../../ui/gestures";
import {
G2MirrorClient,
type G2MirrorSession,
type G2MirrorState,
} from "../native/g2mirror-client";
import { onSettingsStoreChanged } from "../native/settings-store";
import { clamp } from "../util/numeric-util";
} from "../../native/g2mirror-client";
import { onSettingsStoreChanged } from "../../native/settings-store";
import { clamp } from "../../util/numeric-util";
import {
terminalAuthTokenSetting,
terminalHostSetting,
terminalLaunchPresetsSetting,
terminalPortSetting,
terminalWakeOnBellSetting,
} from "../ui/dashboard-settings";
import { TerminalEmulator } from "../ui/apps/terminal-emulator";
import type { DashboardInputEvent } from "../ui/layers";
} from "../../ui/dashboard-settings";
import { TerminalEmulator } from "./terminal-emulator";
import type { DashboardInputEvent } from "../../ui/layers";
import {
drawListScrollbar,
drawSelectionHighlight,
scrollToKeepSelectionVisible,
type MenuItem,
} from "../ui/menu";
import { defaultWindowMenuItems, WindowMenu } from "../ui/window-menu";
import { appViewportSize } from "../ui/shell/geometry";
import type { WorkerAppMessage, WorkerAppReply } from "../ui/shell/worker-window";
import type { ToolResult, ToolSpec } from "../assistant/tool-registry";
} from "../../ui/menu";
import { defaultWindowMenuItems, WindowMenu } from "../../ui/window-menu";
import { appViewportSize } from "../../ui/shell/geometry";
import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window";
import type { ToolResult, ToolSpec } from "../../assistant/tool-registry";
declare const global: any;
declare const com: any;
File renamed without changes.
@@ -4,24 +4,24 @@
* durable expiry path; worker timeouts keep the live UI prompt.
*/
import "@nativescript/core/globals";
import { GrayImage } from "../graphics/image";
import { getDefaultSmallFont, getFont } from "../graphics/bdffont";
import * as frameTimings from "../native/frame-timings";
import { GrayImage } from "../../graphics/image";
import { getDefaultSmallFont, getFont } from "../../graphics/bdffont";
import * as frameTimings from "../../native/frame-timings";
import {
cancelTimerNotification,
fireTimerNotification,
scheduleTimerNotification,
} from "../native/timer-notifications";
import type { DashboardInputEvent } from "../ui/layers";
import { defaultWindowMenuItems, WindowMenu } from "../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../ui/shell/worker-window";
import type { ToolResult, ToolSpec } from "../assistant/tool-registry";
} from "../../native/timer-notifications";
import type { DashboardInputEvent } from "../../ui/layers";
import { defaultWindowMenuItems, WindowMenu } from "../../ui/window-menu";
import type { WorkerAppMessage, WorkerAppReply } from "../../ui/shell/worker-window";
import type { ToolResult, ToolSpec } from "../../assistant/tool-registry";
import {
GESTURE_CLICK,
GESTURE_DOUBLE_CLICK,
GESTURE_SCROLL,
} from "../ui/gestures";
import { clamp } from "../util/numeric-util";
} from "../../ui/gestures";
import { clamp } from "../../util/numeric-util";
declare const global: any;
declare const com: any;
@@ -1,12 +1,12 @@
import { imageFromAsciiArt } from "../../graphics/image";
import { TranscribeLayer } from "../apps/transcribe";
import { TranscribeLayer } from "./transcribe";
import {
createInProcessWindow,
YieldAtRootLayer,
type InProcessAppOptions,
type InProcessWindow,
} from "./in-process-window";
import { shell } from "./shell";
} from "../../ui/shell/in-process-window";
import { shell } from "../../ui/shell/shell";
export const TRANSCRIBE_WINDOW_ID = "transcribe";
export const TRANSCRIBE_SURFACE_ID = "window:transcribe";
@@ -2,14 +2,14 @@ import { GrayImage } from "../../graphics/image";
import { getDefaultSmallFont, type BdfFont } from "../../graphics/bdffont";
import { writeTextToDownloads } from "../../native/file-access";
import { voiceControlBridge, type VoiceTranscriptEvent } from "../../native/voice-control";
import { Layer, type DashboardInputEvent, type LayerContext } from "../layers";
import { Layer, type DashboardInputEvent, type LayerContext } from "../../ui/layers";
/**
* Live transcription view. Continuous mic capture is owned by the app wrapper
* (createTranscribeAppWindow); this layer accumulates the transcript, shows
* it, and saves it to Downloads on click.
*/
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK } from "../gestures";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK } from "../../ui/gestures";
export class TranscribeLayer implements Layer {
private status = "Listening...";
// Finalized utterances, plus the live (replace-semantics) partial appended
@@ -1,12 +1,12 @@
import { ensureLocationPermission, hasLocationPermission } from "../../g2/android-permissions";
import { weatherBridge } from "../../native/weather";
import { WeatherLayer } from "../apps/weather";
import { WeatherLayer } from "./weather";
import {
createInProcessWindow,
YieldAtRootLayer,
type InProcessAppOptions,
type InProcessWindow,
} from "./in-process-window";
} from "../../ui/shell/in-process-window";
export const WEATHER_WINDOW_ID = "weather";
export const WEATHER_SURFACE_ID = "window:weather";
@@ -3,9 +3,9 @@ import { GrayImage } from "../../graphics/image";
import { wrapText, truncateText } from "../../graphics/textwrap";
import { clamp } from "../../util/numeric-util";
import { type ForecastPeriod, type WeatherState } from "../../native/weather";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../gestures";
import { type DashboardInputEvent, type Layer, type LayerContext } from "../layers";
import { drawSelectionHighlight, scrollToKeepSelectionVisible } from "../menu";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, GESTURE_SCROLL } from "../../ui/gestures";
import { type DashboardInputEvent, type Layer, type LayerContext } from "../../ui/layers";
import { drawSelectionHighlight, scrollToKeepSelectionVisible } from "../../ui/menu";
const PAGE_X = 18;
const HEADER_Y = 8;
+2 -2
View File
@@ -5,7 +5,7 @@
* mirrors what the user can do from the launcher grid and the sidebar.
*/
import { shell, type ShellWindow } from "../ui/shell/shell";
import type { LauncherAppEntry } from "../ui/shell/launcher-app";
import type { LauncherAppEntry } from "../apps/launcher/launcher-app";
import {
disbandFolder,
FOLDER_NAME_MAX_LENGTH,
@@ -13,7 +13,7 @@ import {
getFolders,
resolveFolderName,
setAppFolder,
} from "../ui/shell/launcher-folders";
} from "../apps/launcher/launcher-folders";
import { toolRegistry, type ToolRegistry, type ToolResult } from "./tool-registry";
export type WindowToolsOptions = {
+18 -18
View File
@@ -19,7 +19,7 @@ import { isNotificationListenerEnabled, requestNotificationListenerAccess } from
import { openEvenAppSettings, readEvenAppNotificationState } from "../native/even-app-conflict";
import { grayImageToPreviewSource } from "../native/gray-image-preview";
import { firmwareIncompatibilityMessage } from "./firmware-compat";
import { findSoundEffect, playSoundEffect } from "../ui/apps/sound-effects";
import { findSoundEffect, playSoundEffect } from "../ui/sound-effects";
import { isWelcomeSoundPending, setWelcomeSoundPending } from "../phone-ui/onboarding-state";
import { beginRenderPass, endRenderPass } from "../util/render-freshness";
import { voiceControlBridge } from "../native/voice-control";
@@ -36,51 +36,51 @@ import {
createLauncherWindow,
LAUNCHER_SURFACE_ID,
type LauncherAppEntry,
} from "../ui/shell/launcher-app";
} from "../apps/launcher/launcher-app";
import {
createSettingsAppWindow,
SETTINGS_SURFACE_ID,
SETTINGS_WINDOW_ID,
type SettingsAppWindow,
} from "../ui/shell/settings-app";
} from "../apps/settings/settings-app";
import {
createNotificationsAppWindow,
NOTIFICATIONS_SURFACE_ID,
NOTIFICATIONS_WINDOW_ID,
} from "../ui/shell/notifications-app";
} from "../apps/notifications/notifications-app";
import {
createCalendarAppWindow,
CALENDAR_SURFACE_ID,
CALENDAR_WINDOW_ID,
} from "../ui/shell/calendar-app";
} from "../apps/calendar/calendar-app";
import {
createWeatherAppWindow,
WEATHER_SURFACE_ID,
WEATHER_WINDOW_ID,
} from "../ui/shell/weather-app";
} from "../apps/weather/weather-app";
import {
createDebugTestsAppWindow,
DEBUG_TESTS_SURFACE_ID,
DEBUG_TESTS_WINDOW_ID,
} from "../ui/shell/debug-tests-app";
} from "../apps/debug-tests/debug-tests-app";
import {
createFilesAppWindow,
createImageDocumentWindow,
createTextDocumentWindow,
FILES_SURFACE_ID,
FILES_WINDOW_ID,
} from "../ui/shell/files-app";
} from "../apps/files/files-app";
import {
createNightscoutAppWindow,
NIGHTSCOUT_SURFACE_ID,
NIGHTSCOUT_WINDOW_ID,
} from "../ui/shell/nightscout-app";
import { createMusicAppWindow, MUSIC_SURFACE_ID, MUSIC_WINDOW_ID } from "../ui/shell/music-app";
} from "../apps/nightscout/nightscout-app";
import { createMusicAppWindow, MUSIC_SURFACE_ID, MUSIC_WINDOW_ID } from "../apps/music/music-app";
import {
createTranscribeAppWindow,
TRANSCRIBE_SURFACE_ID,
TRANSCRIBE_WINDOW_ID,
} from "../ui/shell/transcribe-app";
} from "../apps/transcribe/transcribe-app";
import { type InProcessAppOptions, type InProcessWindow } from "../ui/shell/in-process-window";
import { loadPersistedOpenApps, savePersistedOpenApps } from "../ui/shell/open-apps-persistence";
import { appViewportRect, type WindowHeightMode } from "../ui/shell/geometry";
@@ -1539,19 +1539,19 @@ class DashboardController {
// Worker paths must be string literals for the webpack worker loader.
let worker: Worker;
if (appId === "timer") {
worker = new Worker("../workers/timer-app.worker");
worker = new Worker("../apps/timer/timer-app.worker");
} else if (appId === "terminal") {
worker = new Worker("../workers/terminal-app.worker");
worker = new Worker("../apps/terminal/terminal-app.worker");
} else if (appId === "navigate") {
worker = new Worker("../workers/navigate-app.worker");
worker = new Worker("../apps/navigate/navigate-app.worker");
} else if (appId === "blocks") {
worker = new Worker("../workers/blocks-app.worker");
worker = new Worker("../apps/blocks/blocks-app.worker");
} else if (appId === "minesweeper") {
worker = new Worker("../workers/minesweeper-app.worker");
worker = new Worker("../apps/minesweeper/minesweeper-app.worker");
} else if (appId === "freecell") {
worker = new Worker("../workers/freecell-app.worker");
worker = new Worker("../apps/freecell/freecell-app.worker");
} else if (appId === "pinball") {
worker = new Worker("../workers/pinball-app.worker");
worker = new Worker("../apps/pinball/pinball-app.worker");
} else {
return null;
}
+1 -1
View File
@@ -3,7 +3,7 @@ import { getDefaultSmallFont } from "../../graphics/bdffont";
import type { GrayImage } from "../../graphics/image";
import { getDashboardLogo } from "../../graphics/logo";
import { wrapText } from "../../graphics/textwrap";
import { TextViewerLayer } from "../apps/text-viewer";
import { TextViewerLayer } from "../../apps/files/text-viewer";
import type { MenuItem } from "../menu";
import { shell } from "../shell/shell";
import {
@@ -4,7 +4,7 @@ import { GESTURE_DOUBLE_CLICK } from "../gestures";
import { drawSelectionHighlight } from "../menu";
import { Layer, type DashboardInputEvent, type LayerActions, type LayerContext } from "../layers";
import { wrapText, truncateText } from "../../graphics/textwrap";
import { MIN_WINDOW_HEIGHT, minWindowTop } from "../shell/geometry";
import { MIN_WINDOW_HEIGHT, minWindowTop } from "./geometry";
const DIALOG_X = 40;
const DIALOG_W = G2_LENS_WIDTH - 80;
+2 -2
View File
@@ -4,8 +4,8 @@ import { EvenAIStatus, EventSourceType, OsEventTypeList } from "../../g2/events"
import type { RawInputEvent } from "../../native/faceclaw-communicator";
import { DashboardInputEvent, Layer, LayerActions, LayerContext, LayerStack, noopLayerActions } from "../layers";
import { MenuLayer, type MenuItem } from "../menu";
import { VoiceInputLayer, type VoiceSendTarget } from "../apps/voice-input";
import { AssistantLayer } from "../apps/assistant";
import { VoiceInputLayer, type VoiceSendTarget } from "./voice-input";
import { AssistantLayer } from "./assistant";
import { AssistantSession, type AssistantBackendConfig } from "../../assistant/session";
import { resolveAssistantModel } from "../../assistant/models";
import type { AssistantContext } from "../../assistant/types";
@@ -7,7 +7,7 @@ import { anthropicApiKeySetting } from "../dashboard-settings";
import { GESTURE_CLICK, GESTURE_DOUBLE_CLICK, gestureHints } from "../gestures";
import { drawSelectionHighlight } from "../menu";
import { Layer, type DashboardInputEvent, type LayerActions, type LayerContext } from "../layers";
import { MIN_WINDOW_HEIGHT, minWindowTop } from "../shell/geometry";
import { MIN_WINDOW_HEIGHT, minWindowTop } from "./geometry";
const DIALOG_X = 40;
const DIALOG_W = G2_LENS_WIDTH - 80;
File renamed without changes.