Documentation
¶
Overview ¶
Package palette is the command-palette TUI component.
Index ¶
- type AddExternalAssetDirMsg
- type BookmarkCurrentTabMsg
- type CloseMsg
- type CopyFileToAssetsMsg
- type CopyNoteMsg
- type CreateNoteMsg
- type CreateTemplateMsg
- type CreateVaultMsg
- type DeleteNoteConfirmMsg
- type DeleteNoteMsg
- type EditBookmarksMsg
- type InsertAssetLinkMsg
- type InsertLinkMsg
- type InsertTemplateMsg
- type LoadVaultMsg
- type Model
- type NewFromTemplateMsg
- type OpenAssetMsg
- type OpenBookmarkMsg
- type OpenJournalMsg
- type OpenNoteMsg
- type OpenSettingsEditorMsg
- type RenameNoteMsg
- type SwitchLangMsg
- type SwitchThemeMsg
- type TabsToSpacesMsg
- type ToggleAllFoldsMsg
- type ToggleCheckboxMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddExternalAssetDirMsg ¶ added in v1.2.0
AddExternalAssetDirMsg is sent when the user registers a new named external dir.
type BookmarkCurrentTabMsg ¶
type BookmarkCurrentTabMsg struct{}
BookmarkCurrentTabMsg is sent when the user bookmarks the active tab.
type CloseMsg ¶
type CloseMsg struct{}
CloseMsg is sent when the palette is dismissed without a selection.
type CopyFileToAssetsMsg ¶ added in v1.2.0
type CopyFileToAssetsMsg struct{ SourcePath string }
CopyFileToAssetsMsg is sent when the user wants to copy a file into vault assets.
type CopyNoteMsg ¶ added in v1.3.0
CopyNoteMsg is sent when the user submits a new note name, after first selecting the source note.
type CreateNoteMsg ¶
type CreateNoteMsg struct {
Name string
InsertLink bool // true when created via "Insert Note Link"
}
CreateNoteMsg is sent when the user submits a new note name.
type CreateTemplateMsg ¶
type CreateTemplateMsg struct{ Name string }
CreateTemplateMsg is sent when the user submits a new template name.
type CreateVaultMsg ¶
type CreateVaultMsg struct{ Path string }
CreateVaultMsg is sent when the user submits a path for a new vault.
type DeleteNoteConfirmMsg ¶
DeleteNoteConfirmMsg is sent when the user confirms a note deletion.
type DeleteNoteMsg ¶
type DeleteNoteMsg struct{ Path string }
DeleteNoteMsg is sent to execute a confirmed note deletion.
type EditBookmarksMsg ¶
type EditBookmarksMsg struct{}
EditBookmarksMsg is sent when the user opens the bookmark editor.
type InsertAssetLinkMsg ¶ added in v1.2.0
type InsertAssetLinkMsg struct{ Path string }
InsertAssetLinkMsg is sent when the user picks an asset to insert a link to. Path is vault-relative (e.g. "assets/photo.jpg").
type InsertLinkMsg ¶
type InsertLinkMsg struct{ Link string }
InsertLinkMsg is sent when the user picks "Insert Note Link".
type InsertTemplateMsg ¶
type InsertTemplateMsg struct{ Path string }
InsertTemplateMsg is sent when the user picks a template to insert inline.
type LoadVaultMsg ¶ added in v0.9.0
type LoadVaultMsg struct{ Path string }
LoadVaultMsg is sent when the user selects a vault to load.
type Model ¶
type Model struct {
FSComplete func(string) []string // nil-safe; set by caller after New()
// contains filtered or unexported fields
}
Model is the palette component model.
type NewFromTemplateMsg ¶
NewFromTemplateMsg is sent when a new note is created from a template.
type OpenAssetMsg ¶ added in v1.2.0
type OpenAssetMsg struct{ Path string }
OpenAssetMsg is sent when the user picks an asset to open externally.
type OpenBookmarkMsg ¶
type OpenBookmarkMsg struct{ Path string }
OpenBookmarkMsg is sent when the user selects a bookmark to open.
type OpenJournalMsg ¶
type OpenJournalMsg struct{ Ref string }
OpenJournalMsg is sent when the user selects a journal date reference.
type OpenNoteMsg ¶
type OpenNoteMsg struct{ Path string }
OpenNoteMsg is sent when the user selects a note to open.
type OpenSettingsEditorMsg ¶ added in v1.2.0
type OpenSettingsEditorMsg struct{ Scope int }
OpenSettingsEditorMsg is sent when the user selects a settings editor command. Scope 0 = global config, 1 = vault config.
type RenameNoteMsg ¶
type RenameNoteMsg struct {
Path string // file being renamed (selected via picker)
Name string // new name entered by user
}
RenameNoteMsg is sent when the user submits a new name for a note.
type SwitchLangMsg ¶ added in v1.2.0
type SwitchLangMsg struct{ Code string }
SwitchLangMsg is sent when the user selects a language from the language picker.
type SwitchThemeMsg ¶
type SwitchThemeMsg struct{ Name string }
SwitchThemeMsg is sent when the user selects a theme to apply.
type TabsToSpacesMsg ¶ added in v0.9.0
type TabsToSpacesMsg struct{}
TabsToSpacesMsg is sent when the user selects "Convert Tabs to Spaces".
type ToggleAllFoldsMsg ¶ added in v1.2.0
type ToggleAllFoldsMsg struct{ Folded bool }
ToggleAllFoldsMsg is sent when the user selects "Folds: Expand/Collapse all Folds". folded=false expands all; folded=true collapses all.
type ToggleCheckboxMsg ¶
type ToggleCheckboxMsg struct{}
ToggleCheckboxMsg is sent when the user toggles the nearest checkbox.