diff --git a/app/workers/blocks-app.worker.ts b/app/apps/blocks/blocks-app.worker.ts similarity index 97% rename from app/workers/blocks-app.worker.ts rename to app/apps/blocks/blocks-app.worker.ts index 3eaeaefb..ebdbb8d6 100644 --- a/app/workers/blocks-app.worker.ts +++ b/app/apps/blocks/blocks-app.worker.ts @@ -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; diff --git a/app/ui/shell/calendar-app.ts b/app/apps/calendar/calendar-app.ts similarity index 95% rename from app/ui/shell/calendar-app.ts rename to app/apps/calendar/calendar-app.ts index 3cf2f79b..1d13337d 100644 --- a/app/ui/shell/calendar-app.ts +++ b/app/apps/calendar/calendar-app.ts @@ -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"; diff --git a/app/ui/apps/calendar.ts b/app/apps/calendar/calendar.ts similarity index 97% rename from app/ui/apps/calendar.ts rename to app/apps/calendar/calendar.ts index dac856d6..47d76748 100644 --- a/app/ui/apps/calendar.ts +++ b/app/apps/calendar/calendar.ts @@ -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; diff --git a/app/ui/apps/accelerometer-demo.ts b/app/apps/debug-tests/accelerometer-demo.ts similarity index 97% rename from app/ui/apps/accelerometer-demo.ts rename to app/apps/debug-tests/accelerometer-demo.ts index 8aa176d8..f80a4955 100644 --- a/app/ui/apps/accelerometer-demo.ts +++ b/app/apps/debug-tests/accelerometer-demo.ts @@ -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 diff --git a/app/ui/apps/buzzer-demo.ts b/app/apps/debug-tests/buzzer-demo.ts similarity index 97% rename from app/ui/apps/buzzer-demo.ts rename to app/apps/debug-tests/buzzer-demo.ts index 351303dc..5ba6f560 100644 --- a/app/ui/apps/buzzer-demo.ts +++ b/app/apps/debug-tests/buzzer-demo.ts @@ -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; diff --git a/app/ui/shell/debug-tests-app.ts b/app/apps/debug-tests/debug-tests-app.ts similarity index 82% rename from app/ui/shell/debug-tests-app.ts rename to app/apps/debug-tests/debug-tests-app.ts index 084af82c..7cb91882 100644 --- a/app/ui/shell/debug-tests-app.ts +++ b/app/apps/debug-tests/debug-tests-app.ts @@ -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"; diff --git a/app/ui/apps/screen-test.ts b/app/apps/debug-tests/screen-test.ts similarity index 99% rename from app/ui/apps/screen-test.ts rename to app/apps/debug-tests/screen-test.ts index b51433bd..f5234649 100644 --- a/app/ui/apps/screen-test.ts +++ b/app/apps/debug-tests/screen-test.ts @@ -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; diff --git a/app/ui/apps/file-browser.ts b/app/apps/files/file-browser.ts similarity index 99% rename from app/ui/apps/file-browser.ts rename to app/apps/files/file-browser.ts index c605178b..1c7f1e51 100644 --- a/app/ui/apps/file-browser.ts +++ b/app/apps/files/file-browser.ts @@ -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; diff --git a/app/ui/apps/file-info-dialog.ts b/app/apps/files/file-info-dialog.ts similarity index 96% rename from app/ui/apps/file-info-dialog.ts rename to app/apps/files/file-info-dialog.ts index d5ced05a..834341af 100644 --- a/app/ui/apps/file-info-dialog.ts +++ b/app/apps/files/file-info-dialog.ts @@ -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; diff --git a/app/ui/shell/files-app.ts b/app/apps/files/files-app.ts similarity index 93% rename from app/ui/shell/files-app.ts rename to app/apps/files/files-app.ts index bcdb2ab0..2e1f46c0 100644 --- a/app/ui/shell/files-app.ts +++ b/app/apps/files/files-app.ts @@ -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"; diff --git a/app/ui/apps/image-viewer.ts b/app/apps/files/image-viewer.ts similarity index 96% rename from app/ui/apps/image-viewer.ts rename to app/apps/files/image-viewer.ts index 2453f0dc..6232e91b 100644 --- a/app/ui/apps/image-viewer.ts +++ b/app/apps/files/image-viewer.ts @@ -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; diff --git a/app/ui/apps/text-viewer.ts b/app/apps/files/text-viewer.ts similarity index 99% rename from app/ui/apps/text-viewer.ts rename to app/apps/files/text-viewer.ts index 698f7869..ce8328cc 100644 --- a/app/ui/apps/text-viewer.ts +++ b/app/apps/files/text-viewer.ts @@ -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; diff --git a/app/workers/freecell-app.worker.ts b/app/apps/freecell/freecell-app.worker.ts similarity index 97% rename from app/workers/freecell-app.worker.ts rename to app/apps/freecell/freecell-app.worker.ts index 73f50a53..ddc587d2 100644 --- a/app/workers/freecell-app.worker.ts +++ b/app/apps/freecell/freecell-app.worker.ts @@ -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; diff --git a/app/ui/shell/launcher-app.ts b/app/apps/launcher/launcher-app.ts similarity index 97% rename from app/ui/shell/launcher-app.ts rename to app/apps/launcher/launcher-app.ts index 3e8eb0e1..00f26d6d 100644 --- a/app/ui/shell/launcher-app.ts +++ b/app/apps/launcher/launcher-app.ts @@ -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; diff --git a/app/ui/shell/launcher-folders.ts b/app/apps/launcher/launcher-folders.ts similarity index 100% rename from app/ui/shell/launcher-folders.ts rename to app/apps/launcher/launcher-folders.ts diff --git a/app/workers/minesweeper-app.worker.ts b/app/apps/minesweeper/minesweeper-app.worker.ts similarity index 97% rename from app/workers/minesweeper-app.worker.ts rename to app/apps/minesweeper/minesweeper-app.worker.ts index 1b6a6ecb..639a4bfc 100644 --- a/app/workers/minesweeper-app.worker.ts +++ b/app/apps/minesweeper/minesweeper-app.worker.ts @@ -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; diff --git a/app/ui/apps/media-browse.ts b/app/apps/music/media-browse.ts similarity index 99% rename from app/ui/apps/media-browse.ts rename to app/apps/music/media-browse.ts index 40340980..930e345f 100644 --- a/app/ui/apps/media-browse.ts +++ b/app/apps/music/media-browse.ts @@ -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; diff --git a/app/ui/shell/music-app.ts b/app/apps/music/music-app.ts similarity index 99% rename from app/ui/shell/music-app.ts rename to app/apps/music/music-app.ts index 2a5f9435..4fe5b962 100644 --- a/app/ui/shell/music-app.ts +++ b/app/apps/music/music-app.ts @@ -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"; diff --git a/app/navigate/maneuver-icons.ts b/app/apps/navigate/maneuver-icons.ts similarity index 99% rename from app/navigate/maneuver-icons.ts rename to app/apps/navigate/maneuver-icons.ts index 32fc2a94..5d585ea9 100644 --- a/app/navigate/maneuver-icons.ts +++ b/app/apps/navigate/maneuver-icons.ts @@ -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). diff --git a/app/workers/navigate-app.worker.ts b/app/apps/navigate/navigate-app.worker.ts similarity index 97% rename from app/workers/navigate-app.worker.ts rename to app/apps/navigate/navigate-app.worker.ts index c657cb00..890869de 100644 --- a/app/workers/navigate-app.worker.ts +++ b/app/apps/navigate/navigate-app.worker.ts @@ -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; diff --git a/app/navigate/route-follower.ts b/app/apps/navigate/route-follower.ts similarity index 99% rename from app/navigate/route-follower.ts rename to app/apps/navigate/route-follower.ts index 2dcdfb34..e40fe8c1 100644 --- a/app/navigate/route-follower.ts +++ b/app/apps/navigate/route-follower.ts @@ -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. */ diff --git a/app/ui/shell/nightscout-app.ts b/app/apps/nightscout/nightscout-app.ts similarity index 96% rename from app/ui/shell/nightscout-app.ts rename to app/apps/nightscout/nightscout-app.ts index 4f91533d..8677f8e2 100644 --- a/app/ui/shell/nightscout-app.ts +++ b/app/apps/nightscout/nightscout-app.ts @@ -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"; diff --git a/app/ui/apps/nightscout.ts b/app/apps/nightscout/nightscout.ts similarity index 97% rename from app/ui/apps/nightscout.ts rename to app/apps/nightscout/nightscout.ts index 57a3ae74..7bd1fc2e 100644 --- a/app/ui/apps/nightscout.ts +++ b/app/apps/nightscout/nightscout.ts @@ -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; diff --git a/app/ui/shell/notifications-app.ts b/app/apps/notifications/notifications-app.ts similarity index 90% rename from app/ui/shell/notifications-app.ts rename to app/apps/notifications/notifications-app.ts index 70828236..39399c73 100644 --- a/app/ui/shell/notifications-app.ts +++ b/app/apps/notifications/notifications-app.ts @@ -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"; diff --git a/app/workers/pinball-app.worker.ts b/app/apps/pinball/pinball-app.worker.ts similarity index 98% rename from app/workers/pinball-app.worker.ts rename to app/apps/pinball/pinball-app.worker.ts index 576e1642..7ad62c0b 100644 --- a/app/workers/pinball-app.worker.ts +++ b/app/apps/pinball/pinball-app.worker.ts @@ -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; diff --git a/app/ui/shell/settings-app.ts b/app/apps/settings/settings-app.ts similarity index 86% rename from app/ui/shell/settings-app.ts rename to app/apps/settings/settings-app.ts index afb8c27d..9cec23f4 100644 --- a/app/ui/shell/settings-app.ts +++ b/app/apps/settings/settings-app.ts @@ -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"; diff --git a/app/workers/terminal-app.worker.ts b/app/apps/terminal/terminal-app.worker.ts similarity index 97% rename from app/workers/terminal-app.worker.ts rename to app/apps/terminal/terminal-app.worker.ts index b4129a00..b4fc1b6e 100644 --- a/app/workers/terminal-app.worker.ts +++ b/app/apps/terminal/terminal-app.worker.ts @@ -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; diff --git a/app/ui/apps/terminal-emulator.ts b/app/apps/terminal/terminal-emulator.ts similarity index 100% rename from app/ui/apps/terminal-emulator.ts rename to app/apps/terminal/terminal-emulator.ts diff --git a/app/workers/timer-app.worker.ts b/app/apps/timer/timer-app.worker.ts similarity index 97% rename from app/workers/timer-app.worker.ts rename to app/apps/timer/timer-app.worker.ts index 3dfb59ae..650983a3 100644 --- a/app/workers/timer-app.worker.ts +++ b/app/apps/timer/timer-app.worker.ts @@ -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; diff --git a/app/ui/shell/transcribe-app.ts b/app/apps/transcribe/transcribe-app.ts similarity index 93% rename from app/ui/shell/transcribe-app.ts rename to app/apps/transcribe/transcribe-app.ts index d33b0357..b51f0139 100644 --- a/app/ui/shell/transcribe-app.ts +++ b/app/apps/transcribe/transcribe-app.ts @@ -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"; diff --git a/app/ui/apps/transcribe.ts b/app/apps/transcribe/transcribe.ts similarity index 97% rename from app/ui/apps/transcribe.ts rename to app/apps/transcribe/transcribe.ts index 95199d24..9a4d479f 100644 --- a/app/ui/apps/transcribe.ts +++ b/app/apps/transcribe/transcribe.ts @@ -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 diff --git a/app/ui/shell/weather-app.ts b/app/apps/weather/weather-app.ts similarity index 95% rename from app/ui/shell/weather-app.ts rename to app/apps/weather/weather-app.ts index 456049a7..02584412 100644 --- a/app/ui/shell/weather-app.ts +++ b/app/apps/weather/weather-app.ts @@ -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"; diff --git a/app/ui/apps/weather.ts b/app/apps/weather/weather.ts similarity index 99% rename from app/ui/apps/weather.ts rename to app/apps/weather/weather.ts index 6dba079d..50e98a0f 100644 --- a/app/ui/apps/weather.ts +++ b/app/apps/weather/weather.ts @@ -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; diff --git a/app/assistant/window-tools.ts b/app/assistant/window-tools.ts index 3b206394..123a2214 100644 --- a/app/assistant/window-tools.ts +++ b/app/assistant/window-tools.ts @@ -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 = { diff --git a/app/g2/dashboard-controller.ts b/app/g2/dashboard-controller.ts index 1e286176..75335585 100644 --- a/app/g2/dashboard-controller.ts +++ b/app/g2/dashboard-controller.ts @@ -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; } diff --git a/app/ui/dashboard/settings-menus.ts b/app/ui/dashboard/settings-menus.ts index 651449c1..45dd8dbe 100644 --- a/app/ui/dashboard/settings-menus.ts +++ b/app/ui/dashboard/settings-menus.ts @@ -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 { diff --git a/app/ui/apps/assistant.ts b/app/ui/shell/assistant.ts similarity index 98% rename from app/ui/apps/assistant.ts rename to app/ui/shell/assistant.ts index 54f73004..3582f7db 100644 --- a/app/ui/apps/assistant.ts +++ b/app/ui/shell/assistant.ts @@ -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; diff --git a/app/ui/shell/shell.ts b/app/ui/shell/shell.ts index cb7d3263..90914d6c 100644 --- a/app/ui/shell/shell.ts +++ b/app/ui/shell/shell.ts @@ -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"; diff --git a/app/ui/apps/voice-input.ts b/app/ui/shell/voice-input.ts similarity index 99% rename from app/ui/apps/voice-input.ts rename to app/ui/shell/voice-input.ts index 2274c9e5..4431af8b 100644 --- a/app/ui/apps/voice-input.ts +++ b/app/ui/shell/voice-input.ts @@ -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; diff --git a/app/ui/apps/sound-effects.ts b/app/ui/sound-effects.ts similarity index 100% rename from app/ui/apps/sound-effects.ts rename to app/ui/sound-effects.ts