Skip to content

Commit

Permalink
1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nqthqn committed Aug 10, 2023
1 parent b5892c1 commit f156d37
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 26 deletions.
12 changes: 7 additions & 5 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import {
MarkdownView,
Notice,
Plugin,
PluginManifest,
PluginSettingTab,
SuggestModal,
} from "obsidian";

import type { MarkdownFileInfo, PluginManifest }from "obsidian";

import { DatamuseApi } from "./DatamuseApi";

interface WordyPluginSettings {
Expand Down Expand Up @@ -45,7 +47,7 @@ export default class WordyPlugin extends Plugin {
this.addCommand({
id: "wordy-syn",
name: "Synonyms",
editorCallback: async (editor: Editor, view: MarkdownView) => {
editorCallback: async (editor: Editor, view: MarkdownView | MarkdownFileInfo) => {
const rootWord = editor.getSelection();
if (rootWord != "") {
const similarWords = await this.datamuseApi.wordsSimilarTo(
Expand All @@ -71,7 +73,7 @@ export default class WordyPlugin extends Plugin {
this.addCommand({
id: "wordy-ant",
name: "Antonyms",
editorCallback: async (editor: Editor, view: MarkdownView) => {
editorCallback: async (editor: Editor, view: MarkdownView | MarkdownFileInfo) => {
const rootWord = editor.getSelection();
if (rootWord != "") {
const oppositeWords =
Expand All @@ -96,7 +98,7 @@ export default class WordyPlugin extends Plugin {
this.addCommand({
id: "wordy-rhy",
name: "Rhymes",
editorCallback: async (editor: Editor, view: MarkdownView) => {
editorCallback: async (editor: Editor, view: MarkdownView | MarkdownFileInfo) => {
const rootWord = editor.getSelection();
if (rootWord != "") {
const rhymes = await this.datamuseApi.wordsThatRhymeWith(
Expand All @@ -122,7 +124,7 @@ export default class WordyPlugin extends Plugin {
this.addCommand({
id: "wordy-asyn",
name: "Alliterative Synonyms",
editorCallback: async (editor: Editor, view: MarkdownView) => {
editorCallback: async (editor: Editor, view: MarkdownView | MarkdownFileInfo) => {
const [priorWord, rootWord] = editor.getSelection().split(" ");
if (rootWord != "") {
const alliterativeSynonyms =
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"id": "obsidian-wordy",
"name": "Wordy",
"version": "1.2.0",
"version": "1.3.0",
"minAppVersion": "0.15.0",
"description": "Thesaurus, dictionary and more using the Datamuse API",
"description": "Thesaurus, rhymes, alliterations, dictionary and more using the Datamuse API",
"author": "Nate",
"authorUrl": "https://nqthqn.com",
"isDesktopOnly": false
Expand Down
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-wordy",
"version": "1.1.0",
"version": "1.3.0",
"description": "Thesaurus, dictionary and more using the Datamuse API",
"main": "main.js",
"scripts": {
Expand All @@ -19,7 +19,7 @@
"builtin-modules": "3.3.0",
"esbuild": "0.14.47",
"esbuild-svelte": "^0.7.4",
"obsidian": "latest",
"obsidian": "1.3.5",
"svelte": "^4.0.5",
"svelte-preprocess": "^5.0.4",
"tslib": "2.4.0",
Expand All @@ -29,4 +29,4 @@
"@types/lodash": "^4.14.195",
"lodash": "^4.17.21"
}
}
}
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"1.0.0": "0.15.0",
"1.1.0": "0.15.0"
"1.1.0": "0.15.0",
"1.3.0": "0.15.0"
}

0 comments on commit f156d37

Please sign in to comment.