Documentation
¶
Index ¶
- Constants
- func NoteColumnMaxWidth(pageWidth string) float32
- type App
- func (a *App) AcknowledgeSyncRecoveryKey() error
- func (a *App) ActiveNoteComments() []model.CommentThread
- func (a *App) ActiveOrProposedDataDir() string
- func (a *App) ApplyAvailableUpdate()
- func (a *App) ChangeSyncPassphrase(newPassphrase string, rotateRecovery bool) (string, error)
- func (a *App) CheckForUpdates(manual bool)
- func (a *App) Close()
- func (a *App) CloseCommentsDrawer()
- func (a *App) CloseSettings()
- func (a *App) CollapseAllFolders()
- func (a *App) CommandSearchOpen() bool
- func (a *App) CommentsDrawerOpen() bool
- func (a *App) CommentsDrawerTab() string
- func (a *App) ConfigureSyncDir(rawDir string) (string, *syncfolder.SyncReport, error)
- func (a *App) ConfigureSyncDirWithCredential(rawDir, credential string) (string, string, *syncfolder.SyncReport, error)
- func (a *App) ConfigureUpdater(client *updater.Client, ...)
- func (a *App) CopyNoteMarkdown(c *ui.Context, noteID string)
- func (a *App) CreateAndOpenNoteTemplate()
- func (a *App) CreateFolder(name string, parentID *string)
- func (a *App) CreateNoteAndOpen(folderID *string)
- func (a *App) CreateQuickDocAndOpen(folderID *string)
- func (a *App) CreateWhiteboardAndOpen(folderID *string)
- func (a *App) CurrentRoute() Route
- func (a *App) CurrentTarget() state.NavTarget
- func (a *App) DeleteCollection(dbID string)
- func (a *App) DeleteFolderToTrash(folderID string)
- func (a *App) DeleteNoteToTrash(noteID string)
- func (a *App) DeleteWhiteboardToTrash(wbID string)
- func (a *App) DisconnectSync() error
- func (a *App) DuplicateNote(noteID string)
- func (a *App) DuplicateWhiteboard(wbID string)
- func (a *App) EnsureWorkspaceActive() error
- func (a *App) ExportNoteMarkdown(noteID string)
- func (a *App) ExportWorkspaceZip()
- func (a *App) FlushAll()
- func (a *App) FlushBeforeWorkspaceSwitch()
- func (a *App) FlushQuickNoteDraft()
- func (a *App) FocusMode() bool
- func (a *App) FocusPinnedNoteInMain(noteID string)
- func (a *App) HasAnyExpandedFolder() bool
- func (a *App) HasWorkspaceSwitcher() bool
- func (a *App) HistoryOpen() bool
- func (a *App) HomeNoteID() string
- func (a *App) ImportFiles(files []ImportFile)
- func (a *App) InstantiateNoteTemplateAndOpen(tplID string, folderID *string)
- func (a *App) IsNotePinnedToDesktop(noteID string) bool
- func (a *App) IsWorkspaceDeferred() bool
- func (a *App) LockSync() error
- func (a *App) MainView(c *ui.Context)
- func (a *App) MigrateLocalStorageToDefault() (string, error)
- func (a *App) MoveCollectionToFolder(dbID string, folderID *string)
- func (a *App) MoveFolderToParent(folderID string, parentID *string)
- func (a *App) MoveNoteToFolder(noteID string, folderID *string)
- func (a *App) MoveWhiteboardToFolder(wbID string, folderID *string)
- func (a *App) NavigateBack() bool
- func (a *App) NavigateForward() bool
- func (a *App) NavigateTo(target state.NavTarget)
- func (a *App) NewExternalMDSession(filePath string, hooks ExternalMDHooks) *ExternalMDSession
- func (a *App) NewPinnedNoteSession(noteID string, hooks PinnedNoteHooks) *PinnedNoteSession
- func (a *App) OnboardingStep() int
- func (a *App) OpenCollection(dbID string)
- func (a *App) OpenCommandSearch()
- func (a *App) OpenCommentsDrawer()
- func (a *App) OpenConfirmDialog(title, description, confirmLabel string, destructive bool, onConfirm func())
- func (a *App) OpenCreateCollectionDialog(folderID *string)
- func (a *App) OpenCreateFolderDialog(parentID *string)
- func (a *App) OpenDocInfo(noteID string)
- func (a *App) OpenFolder(folderID string)
- func (a *App) OpenHistory(noteID string)
- func (a *App) OpenHome()
- func (a *App) OpenHomeFavorites()
- func (a *App) OpenMoveDialog(kind state.DocKind, docID string)
- func (a *App) OpenNote(noteID string)
- func (a *App) OpenRenameDialog(kind string, id, currentName string)
- func (a *App) OpenSettings()
- func (a *App) OpenSettingsSection(section string)
- func (a *App) OpenShortcuts()
- func (a *App) OpenTag(tag string)
- func (a *App) OpenTags()
- func (a *App) OpenWhiteboard(wbID string)
- func (a *App) OpenWorkspaceRoot()
- func (a *App) ParsedWhiteboardThumbSVG(wbID, rawSVG string, dark bool) *ui.SVG
- func (a *App) ParsedWhiteboardThumbSVGVersioned(wbID string, updatedAt int64, rawSVG string, dark bool, ...) *ui.SVG
- func (a *App) PinNoteToDesktop(noteID string)
- func (a *App) PrepareQuickNoteForOpen()
- func (a *App) PurgeDatabase(dbID string)
- func (a *App) QuickNoteView(c *ui.Context)
- func (a *App) RenameCollection(dbID, newName string)
- func (a *App) RenameFolder(folderID, nextName string)
- func (a *App) RenameNote(noteID, nextTitle string)
- func (a *App) ReplayOnboarding()
- func (a *App) ResetAfterWorkspaceSwitch(keepOnboarding bool)
- func (a *App) RestartToApplyUpdate()
- func (a *App) RestoreDatabase(dbID string)
- func (a *App) RestoreFolder(folderID string)
- func (a *App) RestoreNote(noteID string)
- func (a *App) RestoreWhiteboard(wbID string)
- func (a *App) SaveNoteAsTemplate(noteID string)
- func (a *App) SaveRecordAsCollectionTemplate(dbID, noteID string)
- func (a *App) SetCommentsDrawerTab(tab string)
- func (a *App) SetHomeNote(noteID string)
- func (a *App) SetLocalServerURL(rawURL string)
- func (a *App) SetLocalStorageMigrator(fn func() (string, error))
- func (a *App) SetMainHTMLRenderer(fn func(c *ui.Context, slotKey, rawHTML string, width float32, dark bool) bool)
- func (a *App) SetOnPinNoteToDesktop(fn func(noteID string))
- func (a *App) SetOnRelaunchUpdate(fn func(targetPath string, flavor updater.InstallFlavor))
- func (a *App) SetOnboardingImportPicker(fn func() (string, error))
- func (a *App) SetOnboardingSyncDirPicker(fn func() (string, error))
- func (a *App) SetOpenAttachmentFunc(...)
- func (a *App) SetOpenImportFilesFunc(fn func() ([]ImportFile, error))
- func (a *App) SetOpenImportFolderFunc(fn func() (string, error))
- func (a *App) SetPageWidth(width string)
- func (a *App) SetPickImageFunc(fn func(onPicked func(uploaded *contracts.UploadedBlob, err error)))
- func (a *App) SetProposedDataDir(dir string)
- func (a *App) SetQuickNoteCloser(fn func())
- func (a *App) SetRecoveryFileSavePicker(fn func(defaultPath string) (string, error))
- func (a *App) SetSaveFileFunc(...)
- func (a *App) SetSeedDemoOnFirstOnboarding(enable bool)
- func (a *App) SetSettingsSection(section string)
- func (a *App) SetSettingsSyncDirPicker(fn func() (string, error))
- func (a *App) SetSurfaceMaterial(preset theme.SurfacePreset)
- func (a *App) SetSyncManager(mgr *syncfolder.Manager)
- func (a *App) SetThemeMode(mode contracts.ThemeMode)
- func (a *App) SetWorkspaceSwitcher(fn WorkspaceSwitcherFunc)
- func (a *App) SettingsOpen() bool
- func (a *App) SettingsSection() string
- func (a *App) StartAutoUpdateCheck()
- func (a *App) State() *state.AppState
- func (a *App) SyncInBackground()
- func (a *App) SyncManager() *syncfolder.Manager
- func (a *App) SyncStatus() syncfolder.SyncStatus
- func (a *App) ToastError(title string, desc ...string)
- func (a *App) ToastInfo(title string, desc ...string)
- func (a *App) ToastSuccess(title string, desc ...string)
- func (a *App) ToastUndo(title string, undoFn func())
- func (a *App) Toaster() *design.Toaster
- func (a *App) ToggleCommentsDrawer()
- func (a *App) ToggleDarkMode()
- func (a *App) ToggleFocusMode()
- func (a *App) ToggleNotePin(noteID string, currentlyPinned bool)
- func (a *App) ToggleSidebar()
- func (a *App) ToggleWhiteboardPin(wbID string, currentlyPinned bool)
- func (a *App) TriggerImport()
- func (a *App) TriggerImportFolder()
- func (a *App) TriggerSyncNow()
- func (a *App) UnlockSync(credential string) (*syncfolder.SyncReport, error)
- func (a *App) UnpinNoteFromDesktop(noteID string)
- func (a *App) UpdateDesktopSettings(patch config.DesktopSettingsPatch) error
- type ExternalMDHooks
- type ExternalMDSession
- func (s *ExternalMDSession) Close()
- func (s *ExternalMDSession) DisplayTitle() string
- func (s *ExternalMDSession) Editor() contracts.BlockEditorHandle
- func (s *ExternalMDSession) FileName() string
- func (s *ExternalMDSession) FilePath() string
- func (s *ExternalMDSession) ImportedNoteID() string
- func (s *ExternalMDSession) IsClosePromptOpen() bool
- func (s *ExternalMDSession) IsDirty() bool
- func (s *ExternalMDSession) IsImportedOutOfSync() bool
- func (s *ExternalMDSession) IsPathPopoverOpen() bool
- func (s *ExternalMDSession) LoadError() string
- func (s *ExternalMDSession) OpenImportedInMain()
- func (s *ExternalMDSession) ParentDirName() string
- func (s *ExternalMDSession) ReloadFromDisk()
- func (s *ExternalMDSession) RequestClose() bool
- func (s *ExternalMDSession) RevealInFinder() error
- func (s *ExternalMDSession) SaveToDisk() error
- func (s *ExternalMDSession) SaveToMote(folderID *string) (string, error)
- func (s *ExternalMDSession) SerializeMarkdown() string
- func (s *ExternalMDSession) SetRevealPathFunc(fn func(path string) error)
- func (s *ExternalMDSession) UpdateInMote() (string, error)
- func (s *ExternalMDSession) View(c *ui.Context)
- type ImportFile
- type PinnedNoteHooks
- type PinnedNoteSession
- func (s *PinnedNoteSession) Close()
- func (s *PinnedNoteSession) Editor() contracts.BlockEditorHandle
- func (s *PinnedNoteSession) Flush()
- func (s *PinnedNoteSession) IsAlwaysOnTop() bool
- func (s *PinnedNoteSession) IsDirty() bool
- func (s *PinnedNoteSession) IsMissing() bool
- func (s *PinnedNoteSession) IsTrashed() bool
- func (s *PinnedNoteSession) NoteID() string
- func (s *PinnedNoteSession) OpenInMainWindow()
- func (s *PinnedNoteSession) RequestClose()
- func (s *PinnedNoteSession) RestoreNote()
- func (s *PinnedNoteSession) SaveNow()
- func (s *PinnedNoteSession) Title() string
- func (s *PinnedNoteSession) ToggleAlwaysOnTop() bool
- func (s *PinnedNoteSession) View(c *ui.Context)
- type Route
- type WorkspaceSwitchOptions
- type WorkspaceSwitcherFunc
Constants ¶
const ( HeaderH float32 = 54 HeaderActionsGap float32 = 4 SBX float32 = 10 SBRowH float32 = 32 SBRowR float32 = 9 SBRowGap float32 = 2 SBIndent float32 = 14 SBRowIcon float32 = 18 NoteStandardMaxW float32 = contracts.WidthStandard NoteWideMaxW float32 = contracts.WidthWide HistoryDrawerW float32 = 320 HistoryBannerH float32 = 40 )
Mote shell geometry constants (matching mote/src/app.rs & sidebar.rs).
const CommentsDrawerW float32 = 320
CommentsDrawerW matches Mote's 320pt right-side slide-over drawer width (same as HistoryDrawerW).
Variables ¶
This section is empty.
Functions ¶
func NoteColumnMaxWidth ¶
NoteColumnMaxWidth returns the Mote reading column width in DIPs for pageWidth ("standard" -> 720, "wide" -> 960, "full" -> 0 meaning 100%).
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is Mote's 1:1 Mote pure-MyGo desktop application shell built strictly on internal/design, internal/theme, internal/assets, and internal/ui/*. It stores ZERO cross-frame ui.Element references.
func (*App) AcknowledgeSyncRecoveryKey ¶
AcknowledgeSyncRecoveryKey clears the locally staged one-time recovery key after user confirmation.
func (*App) ActiveNoteComments ¶
func (a *App) ActiveNoteComments() []model.CommentThread
ActiveNoteComments returns a copy of all active (open + resolved) comment threads for the loaded note.
func (*App) ActiveOrProposedDataDir ¶
ActiveOrProposedDataDir returns the active local workspace DataDir if materialized, or the proposed local Data Folder path (~/.mote by default) when deferred.
func (*App) ApplyAvailableUpdate ¶
func (a *App) ApplyAvailableUpdate()
ApplyAvailableUpdate downloads, SHA-256 verifies, and installs the discovered release.
func (*App) ChangeSyncPassphrase ¶
ChangeSyncPassphrase re-wraps the vault master key in manifest.json in O(1) without re-uploading data.
func (*App) CheckForUpdates ¶
CheckForUpdates queries GitHub Releases asynchronously and updates the Settings UI state. When manual is false (background startup check), network/offline errors stay calm.
func (*App) Close ¶
func (a *App) Close()
Close flushes active work and releases timers and subscriptions.
func (*App) CloseCommentsDrawer ¶
func (a *App) CloseCommentsDrawer()
CloseCommentsDrawer closes the right-side Comments Drawer.
func (*App) CloseSettings ¶
func (a *App) CloseSettings()
CloseSettings leaves RouteSettings and returns to the active workspace route.
func (*App) CollapseAllFolders ¶ added in v0.0.8
func (a *App) CollapseAllFolders()
CollapseAllFolders collapses every expanded folder in the sidebar and persists the state.
func (*App) CommandSearchOpen ¶
CommandSearchOpen reports whether the Command & Search Palette is open.
func (*App) CommentsDrawerOpen ¶
CommentsDrawerOpen reports whether the right-side Comments Drawer is currently open.
func (*App) CommentsDrawerTab ¶
CommentsDrawerTab returns the active tab ("open" or "resolved") of the Comments Drawer.
func (*App) ConfigureSyncDir ¶
func (a *App) ConfigureSyncDir(rawDir string) (string, *syncfolder.SyncReport, error)
ConfigureSyncDir connects or switches the encrypted Sync Folder using the cached local key or MOTE_SYNC_PASSPHRASE env fallback.
func (*App) ConfigureSyncDirWithCredential ¶
func (a *App) ConfigureSyncDirWithCredential(rawDir, credential string) (string, string, *syncfolder.SyncReport, error)
ConfigureSyncDirWithCredential initializes a new encrypted Sync Folder or unlocks/connects an existing encrypted Sync Folder live without moving local SQLite (~/.mote). Returns (savedDir, oneTimeRecoveryKey, report, error).
func (*App) ConfigureUpdater ¶
func (a *App) ConfigureUpdater(client *updater.Client, relaunchFn func(targetPath string, flavor updater.InstallFlavor))
ConfigureUpdater binds an updater.Client and optional relaunch handler to App.
func (*App) CopyNoteMarkdown ¶
CopyNoteMarkdown copies noteID's Markdown representation to the system clipboard.
func (*App) CreateAndOpenNoteTemplate ¶
func (a *App) CreateAndOpenNoteTemplate()
CreateAndOpenNoteTemplate creates a blank standalone Note Template and immediately opens it in the unified Side-Peek Template Editor.
func (*App) CreateFolder ¶
CreateFolder creates a new folder under parentID (nil for root).
func (*App) CreateNoteAndOpen ¶
CreateNoteAndOpen creates a blank note in folderID (nil for root) and opens it.
func (*App) CreateQuickDocAndOpen ¶
CreateQuickDocAndOpen creates a note or whiteboard according to UIPrefs.QuickCreateDefault / LastCreatedKind.
func (*App) CreateWhiteboardAndOpen ¶
CreateWhiteboardAndOpen creates a blank standalone whiteboard in folderID and opens it.
func (*App) CurrentRoute ¶
CurrentRoute returns the active top-level Route.
func (*App) CurrentTarget ¶
CurrentTarget returns the active workspace NavTarget.
func (*App) DeleteCollection ¶
DeleteCollection soft-deletes a Collection by ID and navigates Home if currently viewing it.
func (*App) DeleteFolderToTrash ¶
DeleteFolderToTrash soft-deletes folderID and offers a one-click Undo toast.
func (*App) DeleteNoteToTrash ¶
DeleteNoteToTrash soft-deletes noteID and offers a one-click Undo toast.
func (*App) DeleteWhiteboardToTrash ¶
DeleteWhiteboardToTrash soft-deletes wbID and offers a one-click Undo toast.
func (*App) DisconnectSync ¶
DisconnectSync disables Sync Folder synchronization and returns to local-only mode without deleting any data.
func (*App) DuplicateNote ¶
DuplicateNote creates a "<title> (Copy)" copy of noteID in the same folder and opens it.
func (*App) DuplicateWhiteboard ¶
DuplicateWhiteboard creates a "<title> (Copy)" copy of wbID in the same folder and opens it.
func (*App) EnsureWorkspaceActive ¶
EnsureWorkspaceActive materializes a deferred first-run workspace on demand (for example, when the user clicks "Save to Mote" in an External Markdown window before finishing Onboarding).
func (*App) ExportNoteMarkdown ¶
ExportNoteMarkdown exports noteID as a .md file using the native save dialog.
func (*App) ExportWorkspaceZip ¶
func (a *App) ExportWorkspaceZip()
ExportWorkspaceZip exports the entire workspace to a .zip backup archive.
func (*App) FlushAll ¶
func (a *App) FlushAll()
FlushAll synchronously persists pending edits in the active note, pinned windows, and whiteboards.
func (*App) FlushBeforeWorkspaceSwitch ¶
func (a *App) FlushBeforeWorkspaceSwitch()
FlushBeforeWorkspaceSwitch flushes all pending edits across the main editor, Side-Peek, template editor, standalone/modal whiteboards, and open Pinned Note sessions before tearing down the current workspace stack.
func (*App) FlushQuickNoteDraft ¶
func (a *App) FlushQuickNoteDraft()
FlushQuickNoteDraft persists any unsaved Quick Note scratchpad draft to disk.
func (*App) FocusPinnedNoteInMain ¶
FocusPinnedNoteInMain brings noteID to the foreground in the main Mote shell, exiting Settings/menus and reloading the latest persisted content if already open.
func (*App) HasAnyExpandedFolder ¶ added in v0.0.8
HasAnyExpandedFolder reports whether at least one sidebar folder is currently expanded.
func (*App) HasWorkspaceSwitcher ¶
HasWorkspaceSwitcher reports whether a live workspace switcher has been wired.
func (*App) HistoryOpen ¶
HistoryOpen reports whether the Version History slide-over drawer is currently open.
func (*App) HomeNoteID ¶ added in v0.0.8
HomeNoteID returns the currently pinned custom Home note ID, if any.
func (*App) ImportFiles ¶
func (a *App) ImportFiles(files []ImportFile)
ImportFiles imports Markdown and Zip files asynchronously into noteops.
func (*App) InstantiateNoteTemplateAndOpen ¶
func (*App) IsNotePinnedToDesktop ¶
IsNotePinnedToDesktop reports whether noteID currently has an open floating desktop sticky window.
func (*App) IsWorkspaceDeferred ¶
IsWorkspaceDeferred reports whether the app is currently running in clean first-run deferred mode (no SQLite store or Data Folder materialized on disk yet).
func (*App) LockSync ¶
LockSync removes the cached local VEK on this machine and pauses Sync Folder push/pull while keeping local SQLite editing and outbox queueing active.
func (*App) MigrateLocalStorageToDefault ¶
MigrateLocalStorageToDefault moves a legacy custom local SQLite directory back to ~/.mote (preserving the old folder untouched as backup) and clears bootstrap.json.
func (*App) MoveCollectionToFolder ¶
MoveCollectionToFolder moves a Collection into folderID (nil moves to workspace root) with one-click Undo.
func (*App) MoveFolderToParent ¶
MoveFolderToParent moves folderID under parentID (nil moves to root) with one-click Undo.
func (*App) MoveNoteToFolder ¶
MoveNoteToFolder moves noteID into folderID (nil moves to root) with one-click Undo.
func (*App) MoveWhiteboardToFolder ¶
MoveWhiteboardToFolder moves wbID into folderID (nil moves to root) with one-click Undo.
func (*App) NavigateBack ¶
NavigateBack flushes active work and steps backward in NavHistory.
func (*App) NavigateForward ¶
NavigateForward flushes active work and steps forward in NavHistory.
func (*App) NavigateTo ¶
NavigateTo flushes active work and navigates to target.
func (*App) NewExternalMDSession ¶
func (a *App) NewExternalMDSession(filePath string, hooks ExternalMDHooks) *ExternalMDSession
NewExternalMDSession creates an independent standalone document window session for filePath. It loads filePath directly from disk without touching Mote's SQLite workspace database.
func (*App) NewPinnedNoteSession ¶
func (a *App) NewPinnedNoteSession(noteID string, hooks PinnedNoteHooks) *PinnedNoteSession
NewPinnedNoteSession creates an independent floating sticky note session for noteID. Each pinned note gets its own BlockEditor instance, autosave loop, and live event subscription.
func (*App) OnboardingStep ¶
OnboardingStep returns the 1-based active onboarding step (1 or 2), or 0 when closed.
func (*App) OpenCollection ¶
OpenCollection navigates to a specific Collection (Database) view.
func (*App) OpenCommandSearch ¶
func (a *App) OpenCommandSearch()
OpenCommandSearch opens the ⌘K / ⌘J Command & Search Palette.
func (*App) OpenCommentsDrawer ¶
func (a *App) OpenCommentsDrawer()
OpenCommentsDrawer opens the 320pt right-side Comments Drawer for the active note.
func (*App) OpenConfirmDialog ¶
func (a *App) OpenConfirmDialog(title, description, confirmLabel string, destructive bool, onConfirm func())
OpenConfirmDialog opens a Mote AlertDialog for destructive or guarded actions.
func (*App) OpenCreateCollectionDialog ¶
OpenCreateCollectionDialog immediately creates a blank Collection in folderID and opens it.
func (*App) OpenCreateFolderDialog ¶
OpenCreateFolderDialog opens the Mote folder creation dialog.
func (*App) OpenDocInfo ¶
OpenDocInfo computes statistics for noteID and opens Mote's Document Info dialog.
func (*App) OpenFolder ¶
OpenFolder navigates to a folder view.
func (*App) OpenHistory ¶
OpenHistory opens the right-docked 320pt Version History slide-over drawer for noteID.
func (*App) OpenHomeFavorites ¶ added in v0.0.8
func (a *App) OpenHomeFavorites()
OpenHomeFavorites navigates to Home and activates the Favorites tab.
func (*App) OpenMoveDialog ¶
OpenMoveDialog opens the Mote folder picker dialog to move a note or whiteboard.
func (*App) OpenRenameDialog ¶
OpenRenameDialog opens a clean Mote rename dialog for a folder, note, or whiteboard.
func (*App) OpenSettings ¶
func (a *App) OpenSettings()
OpenSettings navigates to the full-page Settings view (RouteSettings).
func (*App) OpenSettingsSection ¶
OpenSettingsSection navigates to Settings at the specified section key.
func (*App) OpenShortcuts ¶
func (a *App) OpenShortcuts()
OpenShortcuts opens the keyboard shortcuts dialog.
func (*App) OpenTags ¶ added in v0.0.8
func (a *App) OpenTags()
OpenTags navigates to the dedicated Tags index / cloud view in the main content area.
func (*App) OpenWhiteboard ¶
OpenWhiteboard navigates to a standalone whiteboard document view.
func (*App) OpenWorkspaceRoot ¶ added in v0.0.11
func (a *App) OpenWorkspaceRoot()
OpenWorkspaceRoot navigates to the Workspace root gallery (All items, bypassing any pinned Home note).
func (*App) ParsedWhiteboardThumbSVG ¶
ParsedWhiteboardThumbSVG parses and caches a whiteboard thumbnail SVG (adapting strokes in dark mode). Exported for Wave 3B home_view.go document cards.
func (*App) ParsedWhiteboardThumbSVGVersioned ¶ added in v0.0.9
func (a *App) ParsedWhiteboardThumbSVGVersioned( wbID string, updatedAt int64, rawSVG string, dark bool, darkAdapt func(string) string, ) *ui.SVG
ParsedWhiteboardThumbSVGVersioned looks up a cached whiteboard SVG by (wbID, updatedAt, dark) in O(1) without hashing or running dark-mode string replacements on cache hits.
func (*App) PinNoteToDesktop ¶
PinNoteToDesktop flushes any pending edits for noteID in the main editor and opens (or focuses) noteID in an independent always-on-top desktop sticky window.
func (*App) PrepareQuickNoteForOpen ¶
func (a *App) PrepareQuickNoteForOpen()
PrepareQuickNoteForOpen refreshes focus and clears transient menus whenever the floating Quick Note window is revealed via hotkey or menu bar.
func (*App) PurgeDatabase ¶
PurgeDatabase permanently deletes a soft-deleted Collection and its records.
func (*App) QuickNoteView ¶
QuickNoteView renders the redesigned frameless Apple Glass / Crafted Minimal floating Quick Note capture scratchpad with a borderless 22pt title, native rich BlockEditor body, destination picker (Home / Folder / Collection), inline tag chips, and frosted footer.
func (*App) RenameCollection ¶
RenameCollection renames a Collection by ID.
func (*App) RenameFolder ¶
RenameFolder updates a folder's display name.
func (*App) RenameNote ¶
RenameNote updates a note's title (keeping active editor state synchronized).
func (*App) ReplayOnboarding ¶
func (a *App) ReplayOnboarding()
ReplayOnboarding opens the full-screen onboarding flow from step 1.
func (*App) ResetAfterWorkspaceSwitch ¶
ResetAfterWorkspaceSwitch clears all transient per-workspace UI state after AppState has been rebound to a newly activated or switched workspace.
func (*App) RestartToApplyUpdate ¶
func (a *App) RestartToApplyUpdate()
RestartToApplyUpdate flushes the active note and requests the desktop shell to relaunch the freshly installed Mote bundle/binary.
func (*App) RestoreDatabase ¶
RestoreDatabase restores a soft-deleted Collection from Trash.
func (*App) RestoreFolder ¶
RestoreFolder restores a soft-deleted folder from Trash.
func (*App) RestoreNote ¶
RestoreNote restores a soft-deleted note from Trash.
func (*App) RestoreWhiteboard ¶
RestoreWhiteboard restores a soft-deleted whiteboard from Trash.
func (*App) SaveNoteAsTemplate ¶
func (*App) SaveRecordAsCollectionTemplate ¶
SaveRecordAsCollectionTemplate saves an existing Collection Record (its title, properties, tags, and body) as a reusable Collection template and opens it in the Template Editor.
func (*App) SetCommentsDrawerTab ¶
SetCommentsDrawerTab switches the Comments Drawer tab ("open" or "resolved").
func (*App) SetHomeNote ¶ added in v0.0.8
SetHomeNote pins noteID as the user's custom Home starting page, or clears it when empty.
func (*App) SetLocalServerURL ¶ added in v0.0.8
SetLocalServerURL stores the active local HTTP base URL (e.g. "http://127.0.0.1:5230") displayed in the read-only Settings -> CLI & MCP reference tab.
func (*App) SetLocalStorageMigrator ¶
SetLocalStorageMigrator registers the desktop session callback that safely migrates a legacy custom bootstrap.json SQLite directory back into default ~/.mote live.
func (*App) SetMainHTMLRenderer ¶ added in v0.0.6
func (a *App) SetMainHTMLRenderer(fn func(c *ui.Context, slotKey, rawHTML string, width float32, dark bool) bool)
SetMainHTMLRenderer binds the main desktop window's on-demand sandboxed HTML block renderer.
func (*App) SetOnPinNoteToDesktop ¶
SetOnPinNoteToDesktop registers a callback invoked when the user clicks "Pin to desktop" from Quick Note, Note Topbar, Document menu, Sidebar, or Home cards.
func (*App) SetOnRelaunchUpdate ¶
func (a *App) SetOnRelaunchUpdate(fn func(targetPath string, flavor updater.InstallFlavor))
SetOnRelaunchUpdate registers the desktop shell callback invoked when the user clicks "Restart Mote" after an in-place update completes.
func (*App) SetOnboardingImportPicker ¶
SetOnboardingImportPicker overrides the native directory/file picker used by Step 2 "Import folder…" (primarily for deterministic headless tests).
func (*App) SetOnboardingSyncDirPicker ¶
SetOnboardingSyncDirPicker overrides the native directory picker used by Step 1 "Choose…" / "Change…" (primarily for deterministic headless tests).
func (*App) SetOpenAttachmentFunc ¶
func (a *App) SetOpenAttachmentFunc(fn func(sha256, filename, mimeType string, action editor.AttachmentAction) error)
SetOpenAttachmentFunc overrides the attachment open/reveal callback (primarily for tests).
func (*App) SetOpenImportFilesFunc ¶
func (a *App) SetOpenImportFilesFunc(fn func() ([]ImportFile, error))
SetOpenImportFilesFunc overrides the native Open dialog handler (useful in tests).
func (*App) SetOpenImportFolderFunc ¶
SetOpenImportFolderFunc overrides the native Open directory picker for folder imports (useful in tests).
func (*App) SetPageWidth ¶
SetPageWidth sets the document column width ("standard" | "wide" | "full") and persists UIPrefs.
func (*App) SetPickImageFunc ¶
func (a *App) SetPickImageFunc(fn func(onPicked func(uploaded *contracts.UploadedBlob, err error)))
SetPickImageFunc overrides the native image file picker callback (primarily for tests).
func (*App) SetProposedDataDir ¶
SetProposedDataDir sets the default proposed Data Folder path shown on Onboarding Step 1 while the workspace is deferred (before anything is materialized on disk).
func (*App) SetQuickNoteCloser ¶
func (a *App) SetQuickNoteCloser(fn func())
SetQuickNoteCloser sets the callback invoked when QuickNoteView closes/hides.
func (*App) SetRecoveryFileSavePicker ¶
SetRecoveryFileSavePicker overrides the native save dialog used by "Save file…" on the Recovery Key card (primarily for deterministic headless tests).
func (*App) SetSaveFileFunc ¶
func (a *App) SetSaveFileFunc(fn func(defaultName string, data []byte, filterName string, exts []string) (string, error))
SetSaveFileFunc overrides the native Save dialog handler (useful in tests).
func (*App) SetSeedDemoOnFirstOnboarding ¶
SetSeedDemoOnFirstOnboarding enables the starter sample workspace toggle on Step 2 (default ON) so a brand-new desktop launch seeds the rich demo dataset upon finishing onboarding.
func (*App) SetSettingsSection ¶
SetSettingsSection selects a Settings section key.
func (*App) SetSettingsSyncDirPicker ¶
SetSettingsSyncDirPicker overrides the native directory picker used by Settings → Sync folder (primarily for deterministic headless testing).
func (*App) SetSurfaceMaterial ¶
func (a *App) SetSurfaceMaterial(preset theme.SurfacePreset)
func (*App) SetSyncManager ¶
func (a *App) SetSyncManager(mgr *syncfolder.Manager)
SetSyncManager binds the live Sync Folder manager to this desktop shell App.
func (*App) SetThemeMode ¶
SetThemeMode updates and persists the theme appearance (system/light/dark).
func (*App) SetWorkspaceSwitcher ¶
func (a *App) SetWorkspaceSwitcher(fn WorkspaceSwitcherFunc)
SetWorkspaceSwitcher registers the live workspace activation/hot-swap callback provided by the desktop session coordinator.
func (*App) SettingsOpen ¶
SettingsOpen reports whether RouteSettings is currently active.
func (*App) SettingsSection ¶
SettingsSection returns the active Settings section key.
func (*App) StartAutoUpdateCheck ¶
func (a *App) StartAutoUpdateCheck()
StartAutoUpdateCheck schedules one calm, cooldown-throttled startup check when desktop settings allow automatic update checks.
func (*App) SyncInBackground ¶ added in v0.0.5
func (a *App) SyncInBackground()
SyncInBackground initiates a silent, non-blocking sync pass when an unlocked sync folder is active (e.g. when opening Settings). It refreshes the UI when remote changes arrive and surfaces conflict toasts, without showing noisy "Sync complete" toasts during normal automatic sync.
func (*App) SyncManager ¶
func (a *App) SyncManager() *syncfolder.Manager
SyncManager returns the live Sync Folder manager bound to this App (may be nil in deferred/headless unit tests).
func (*App) SyncStatus ¶
func (a *App) SyncStatus() syncfolder.SyncStatus
SyncStatus returns the current Sync Folder status snapshot. Caches SQLite/disk status probes per workspace snapshot version (with 1s TTL) so 120fps desktop render frames never stall on disk or SQLite I/O.
func (*App) ToastError ¶
ToastError pushes an error notification toast.
func (*App) ToastSuccess ¶
ToastSuccess pushes a success notification toast.
func (*App) Toaster ¶
Toaster returns the global Mote Sonner-style Toaster mounted at the window root.
func (*App) ToggleCommentsDrawer ¶
func (a *App) ToggleCommentsDrawer()
ToggleCommentsDrawer toggles the right-side Comments Drawer.
func (*App) ToggleDarkMode ¶
func (a *App) ToggleDarkMode()
ToggleDarkMode flips light <-> dark mode and persists UIPrefs.
func (*App) ToggleFocusMode ¶
func (a *App) ToggleFocusMode()
ToggleFocusMode toggles distraction-free Focus Mode.
func (*App) ToggleNotePin ¶
ToggleNotePin toggles the favorite/pinned flag on noteID.
func (*App) ToggleSidebar ¶
func (a *App) ToggleSidebar()
ToggleSidebar collapses or expands the left sidebar and persists UIPrefs.
func (*App) ToggleWhiteboardPin ¶
ToggleWhiteboardPin toggles the favorite/pinned flag on wbID.
func (*App) TriggerImport ¶
func (a *App) TriggerImport()
TriggerImport opens a native file picker for .md/.markdown/.zip files and imports them.
func (*App) TriggerImportFolder ¶
func (a *App) TriggerImportFolder()
TriggerImportFolder opens a native folder picker, packs all Markdown files and local relative image assets into an archive copy, and imports them into the workspace.
func (*App) TriggerSyncNow ¶
func (a *App) TriggerSyncNow()
TriggerSyncNow initiates an immediate synchronization pass in the background and surfaces honest status/toasts.
func (*App) UnlockSync ¶
func (a *App) UnlockSync(credential string) (*syncfolder.SyncReport, error)
UnlockSync unlocks the currently configured encrypted Sync Folder using a passphrase or recovery key.
func (*App) UnpinNoteFromDesktop ¶
UnpinNoteFromDesktop flushes and closes the floating desktop sticky window for noteID, if open.
func (*App) UpdateDesktopSettings ¶
func (a *App) UpdateDesktopSettings(patch config.DesktopSettingsPatch) error
UpdateDesktopSettings persists a patch to DesktopSettingsStore and refreshes state.
type ExternalMDHooks ¶
type ExternalMDHooks struct {
SetWindowTitle func(title string)
SetDocumentEdited func(edited bool)
OpenNoteInMainWindow func(noteID string)
CloseWindow func()
ForceCloseWindow func()
Invalidate func()
RenderHTMLBlock func(c *ui.Context, slotKey, rawHTML string, width float32, dark bool) bool
}
ExternalMDHooks links an independent ExternalMDSession to its hosting standalone OS window and the main Mote desktop shell.
type ExternalMDSession ¶
type ExternalMDSession struct {
// contains filtered or unexported fields
}
ExternalMDSession owns the standalone block editor, disk round-trip persistence, in-memory local relative image preview cache, and explicit "Save to Mote" import flow for a single external local Markdown file. Merely opening, viewing, or editing an external file NEVER writes to Mote's SQLite workspace database or CAS blob storage.
func (*ExternalMDSession) Close ¶
func (s *ExternalMDSession) Close()
Close releases in-memory caches and unregisters this session from shell.App. Unlike PinnedNoteSession, Close does NOT silently overwrite the user's disk file.
func (*ExternalMDSession) DisplayTitle ¶
func (s *ExternalMDSession) DisplayTitle() string
DisplayTitle resolves the human-readable title for this document: YAML frontmatter title -> leading H1 heading in editor -> filename stem without Markdown extension.
func (*ExternalMDSession) Editor ¶
func (s *ExternalMDSession) Editor() contracts.BlockEditorHandle
Editor returns the independent BlockEditorHandle owned by this session.
func (*ExternalMDSession) FileName ¶
func (s *ExternalMDSession) FileName() string
FileName returns the base filename (e.g. "readme.md").
func (*ExternalMDSession) FilePath ¶
func (s *ExternalMDSession) FilePath() string
FilePath returns the absolute disk path bound to this standalone session.
func (*ExternalMDSession) ImportedNoteID ¶
func (s *ExternalMDSession) ImportedNoteID() string
ImportedNoteID returns the Mote note ID once this file has been saved into Mote (empty beforehand).
func (*ExternalMDSession) IsClosePromptOpen ¶
func (s *ExternalMDSession) IsClosePromptOpen() bool
IsClosePromptOpen reports whether the unsaved-changes close confirmation dialog is open.
func (*ExternalMDSession) IsDirty ¶
func (s *ExternalMDSession) IsDirty() bool
IsDirty reports whether unsaved edits exist relative to the file on disk.
func (*ExternalMDSession) IsImportedOutOfSync ¶
func (s *ExternalMDSession) IsImportedOutOfSync() bool
IsImportedOutOfSync reports whether this document has diverged from the last copy synced to Mote.
func (*ExternalMDSession) IsPathPopoverOpen ¶
func (s *ExternalMDSession) IsPathPopoverOpen() bool
IsPathPopoverOpen reports whether the compact parent folder path info popover is open.
func (*ExternalMDSession) LoadError ¶
func (s *ExternalMDSession) LoadError() string
LoadError returns any error encountered while reading the file from disk.
func (*ExternalMDSession) OpenImportedInMain ¶
func (s *ExternalMDSession) OpenImportedInMain()
OpenImportedInMain focuses the main Mote window directly on the note created by SaveToMote.
func (*ExternalMDSession) ParentDirName ¶
func (s *ExternalMDSession) ParentDirName() string
ParentDirName returns the compact parent directory name displayed in the topbar badge.
func (*ExternalMDSession) ReloadFromDisk ¶
func (s *ExternalMDSession) ReloadFromDisk()
ReloadFromDisk reloads the external Markdown file from disk, discarding unsaved in-memory edits.
func (*ExternalMDSession) RequestClose ¶
func (s *ExternalMDSession) RequestClose() bool
RequestClose is the OnClose guard for the standalone OS window hosting this session. It returns true when the window may close immediately (no unsaved disk edits, closed, or load error). When unsaved edits exist, it opens the in-window Save / Discard / Cancel prompt and returns false so the host window prevents immediate destruction.
func (*ExternalMDSession) RevealInFinder ¶
func (s *ExternalMDSession) RevealInFinder() error
RevealInFinder reveals the bound external Markdown file in macOS Finder (or the platform file manager).
func (*ExternalMDSession) SaveToDisk ¶
func (s *ExternalMDSession) SaveToDisk() error
SaveToDisk flushes the block editor AST, serializes back to lossless Markdown, writes atomically to the exact original filePath on disk, clears dirty state, and displays a calm "Saved to disk" pill toast. Never modifies Mote's SQLite database.
func (*ExternalMDSession) SaveToMote ¶
func (s *ExternalMDSession) SaveToMote(folderID *string) (string, error)
SaveToMote imports the external Markdown document (including any current in-memory edits and all referenced local relative images uploaded into blob.Service) into Mote's SQLite workspace library, optionally into folderID (nil = Home/root). Refreshes AppState so the main Mote window reflects the newly archived note immediately.
func (*ExternalMDSession) SerializeMarkdown ¶
func (s *ExternalMDSession) SerializeMarkdown() string
SerializeMarkdown renders the current editor document back to lossless Markdown, preserving any original YAML frontmatter and local relative image paths verbatim.
func (*ExternalMDSession) SetRevealPathFunc ¶
func (s *ExternalMDSession) SetRevealPathFunc(fn func(path string) error)
SetRevealPathFunc overrides the OS reveal handler (used by tests to avoid opening Finder).
func (*ExternalMDSession) UpdateInMote ¶
func (s *ExternalMDSession) UpdateInMote() (string, error)
UpdateInMote re-syncs subsequent edits (and any newly referenced local images) into the previously imported Mote note. If the imported note was deleted or trashed in Mote, UpdateInMote gracefully creates a fresh archived copy and links the session to it.
func (*ExternalMDSession) View ¶
func (s *ExternalMDSession) View(c *ui.Context)
View renders the complete standalone external Markdown document window with calm 48pt topbar, "Save to Mote" split import control, full BlockEditor canvas, and status pills.
type ImportFile ¶
ImportFile represents a local Markdown or Zip file loaded for import without external UI library types.
func (ImportFile) ReadAll ¶
func (f ImportFile) ReadAll() ([]byte, error)
ReadAll returns the in-memory bytes or reads from Path if Data is empty.
type PinnedNoteHooks ¶
type PinnedNoteHooks struct {
IsAlwaysOnTop func() bool
ToggleAlwaysOnTop func() bool
SetWindowTitle func(title string)
OpenInMainWindow func()
CloseWindow func()
Invalidate func()
RenderHTMLBlock func(c *ui.Context, slotKey, rawHTML string, width float32, dark bool) bool
}
PinnedNoteHooks links an independent PinnedNoteSession to its hosting floating OS window and the main Mote desktop shell.
type PinnedNoteSession ¶
type PinnedNoteSession struct {
// contains filtered or unexported fields
}
PinnedNoteSession owns the independent editor, title buffer, autosave timer, toaster, and real-time bidirectional workspace sync for a single floating desktop sticky note window.
func (*PinnedNoteSession) Close ¶
func (s *PinnedNoteSession) Close()
Close flushes pending edits, stops timers, and unsubscribes from workspace events. Safe to call multiple times.
func (*PinnedNoteSession) Editor ¶
func (s *PinnedNoteSession) Editor() contracts.BlockEditorHandle
Editor returns the independent BlockEditorHandle owned by this pinned session.
func (*PinnedNoteSession) Flush ¶
func (s *PinnedNoteSession) Flush()
Flush synchronously flushes the block editor buffer and persists any pending changes to SQLite. Idempotent and safe to call on ⌘S, Open-in-Main, window close, and application shutdown.
func (*PinnedNoteSession) IsAlwaysOnTop ¶
func (s *PinnedNoteSession) IsAlwaysOnTop() bool
IsAlwaysOnTop reports whether this pinned sticky window is currently floating above other windows.
func (*PinnedNoteSession) IsDirty ¶
func (s *PinnedNoteSession) IsDirty() bool
IsDirty reports whether unsaved local edits are pending persistence.
func (*PinnedNoteSession) IsMissing ¶
func (s *PinnedNoteSession) IsMissing() bool
IsMissing reports whether the pinned note was permanently deleted or cannot be found.
func (*PinnedNoteSession) IsTrashed ¶
func (s *PinnedNoteSession) IsTrashed() bool
IsTrashed reports whether the pinned note is currently in Trash.
func (*PinnedNoteSession) NoteID ¶
func (s *PinnedNoteSession) NoteID() string
NoteID returns the note ID bound to this pinned session.
func (*PinnedNoteSession) OpenInMainWindow ¶
func (s *PinnedNoteSession) OpenInMainWindow()
OpenInMainWindow flushes pending edits synchronously, brings the main Mote window to the front, and navigates it to this note.
func (*PinnedNoteSession) RequestClose ¶
func (s *PinnedNoteSession) RequestClose()
RequestClose flushes pending edits synchronously and requests that the hosting window close.
func (*PinnedNoteSession) RestoreNote ¶
func (s *PinnedNoteSession) RestoreNote()
RestoreNote restores a soft-deleted pinned note from Trash and resumes live editing.
func (*PinnedNoteSession) SaveNow ¶
func (s *PinnedNoteSession) SaveNow()
SaveNow flushes edits synchronously and shows a single calm "Saved" confirmation in the topbar status.
func (*PinnedNoteSession) Title ¶
func (s *PinnedNoteSession) Title() string
Title returns the current title buffer of this pinned note.
func (*PinnedNoteSession) ToggleAlwaysOnTop ¶
func (s *PinnedNoteSession) ToggleAlwaysOnTop() bool
ToggleAlwaysOnTop toggles AlwaysOnTop on/off and returns the new state.
func (*PinnedNoteSession) View ¶
func (s *PinnedNoteSession) View(c *ui.Context)
View renders this pinned sticky note window's complete UI frame.
type WorkspaceSwitchOptions ¶
type WorkspaceSwitchOptions struct {
// MarkOnboardingCompleted persists OnboardingCompleted=true in the target folder's
// ui_prefs.json after opening (used when switching from Settings or skipping Onboarding).
MarkOnboardingCompleted bool
// KeepOnboardingOpen preserves the active Onboarding flow after switching (used when
// advancing from Onboarding Step 1 to Step 2 or switching folders during Onboarding).
KeepOnboardingOpen bool
// OverrideQuickNoteHotkey, when non-nil, overrides the target workspace's QuickNoteHotkey
// and persists it into <target>/desktop.json (used for hotkeys recorded on Step 1 before
// workspace materialization).
OverrideQuickNoteHotkey *string
// SyncDirSet, when true, configures (non-empty SyncDir) or disconnects (empty SyncDir)
// the encrypted OpLog Sync Folder immediately after opening the local SQLite database.
SyncDirSet bool
SyncDir string
SyncPassphrase string
}
WorkspaceSwitchOptions controls how the host desktop session activates a deferred workspace or live hot-swaps the active workspace to a different Data Folder.
type WorkspaceSwitcherFunc ¶
type WorkspaceSwitcherFunc func(targetDir string, opts WorkspaceSwitchOptions) (string, error)
WorkspaceSwitcherFunc activates a deferred workspace or hot-swaps the running workspace to targetDir without restarting the desktop process.
Source Files
¶
- app.go
- backlinks.go
- collection_templates.go
- collection_view.go
- comments_drawer.go
- dialogs.go
- docmenu.go
- external_md.go
- folder_card.go
- helpers.go
- history_drawer.go
- home_view.go
- note_tags.go
- note_view.go
- onboarding_backdrop.go
- onboarding_view.go
- pinned_note.go
- quick_note.go
- search_dialog.go
- settings_view.go
- sidebar.go
- sync_auth_ui.go
- sync_controller.go
- topbar.go
- update_controller.go
- whiteboard_view.go
- workspace_index.go
- workspace_switch.go