Define Words (#848)

* Add native dictionary define fallback

* Make dictionary lookup a core launcher command

* feat(dictionary): add dictionary functionality with lookup and display

- Introduced DictionaryEntry model to parse and store dictionary entries.
- Implemented DictionaryProvider to fetch definitions from Dictionary Services.
- Created DictionaryCoordinator to manage dictionary-related actions.
- Developed DictionaryScreen to display definitions in the palette.
- Added fallback command for "define" to trigger dictionary lookups.
- Updated UI components to integrate dictionary features, including copy and open actions.
- Enhanced documentation to cover new dictionary functionality and usage.

* feat(dictionary): enhance dictionary command and fallback functionality

* Render Define Word entries as a structured dictionary page

Read the record's XHTML through Dictionary Services' record calls,
resolved with dlsym so a macOS without them falls back to the public
plain text. DictionaryMarkup turns the span classes into headword,
part of speech, numbered senses, notes and sections, and
DictionarySession looks terms up off the main actor.

---------

Co-authored-by: abue-ammar <iabueammar@gmail.com>
This commit is contained in:
Matt Farrell
2026-09-18 10:13:31 +06:00
committed by GitHub
co-authored by abue-ammar
parent adbfdccc3e
commit 91d8b9c20b
24 changed files with 921 additions and 5 deletions
+2
View File
@@ -267,6 +267,8 @@ run fallback-test Tinycast/Features/Launcher/Model/Fallback.swift \
Tinycast/Features/Quicklinks/Model/QuicklinkDestination.swift \
Tinycast/Features/SystemActions/Model/SystemAction.swift \
Tinycast/Features/WindowManagement/Model/WindowCommand.swift
run dictionary-test Tinycast/Features/Dictionary/Model/DictionaryEntry.swift \
Tinycast/Features/Dictionary/Model/DictionaryMarkup.swift
run hotkey-test Tinycast/Features/HotKeys/Model/DoubleTapModifier.swift \
Tinycast/Features/HotKeys/Model/DoubleTapDetector.swift \
Tinycast/Features/HotKeys/Model/HyperKey.swift \