浏览代码

feat: add typos to GitHub action

Signed-off-by: Zhizhen He <[email protected]>
Zhizhen He 2 年之前
父节点
当前提交
25c15053d6
共有 44 个文件被更改,包括 146 次插入123 次删除
  1. 10 0
      .github/workflows/build.yml
  2. 1 1
      Dockerfile
  3. 1 1
      deps/db/README.md
  4. 2 2
      deps/db/src/logseq/db/rules.cljc
  5. 1 1
      deps/graph-parser/README.md
  6. 1 1
      deps/graph-parser/src/logseq/graph_parser/util.cljs
  7. 1 1
      docs/accessibility.md
  8. 1 1
      e2e-tests/basic.spec.ts
  9. 1 1
      e2e-tests/code-editing.spec.ts
  10. 3 3
      e2e-tests/editor.spec.ts
  11. 1 1
      e2e-tests/fixtures.ts
  12. 2 2
      e2e-tests/logseq-url.spec.ts
  13. 2 2
      e2e-tests/page-search.spec.ts
  14. 1 1
      e2e-tests/random.spec.ts
  15. 5 5
      ios/App/App/FsWatcher.swift
  16. 1 1
      libs/src/LSPlugin.ts
  17. 1 1
      scripts/src/logseq/tasks/file_sync.clj
  18. 1 1
      src/electron/electron/context_menu.cljs
  19. 4 4
      src/electron/electron/core.cljs
  20. 19 19
      src/electron/electron/search.cljs
  21. 2 2
      src/electron/electron/url.cljs
  22. 3 3
      src/main/frontend/components/block.cljs
  23. 2 2
      src/main/frontend/components/datetime.cljs
  24. 1 1
      src/main/frontend/components/theme.cljs
  25. 2 2
      src/main/frontend/components/whiteboard.cljs
  26. 2 2
      src/main/frontend/extensions/pdf/finder.js
  27. 16 16
      src/main/frontend/extensions/srs.cljs
  28. 5 5
      src/main/frontend/extensions/zotero/api.cljs
  29. 2 2
      src/main/frontend/fs/sync.cljs
  30. 6 7
      src/main/frontend/fs/watcher_handler.cljs
  31. 1 1
      src/main/frontend/handler/conversion.cljs
  32. 1 1
      src/main/frontend/handler/export/html.cljs
  33. 10 10
      src/main/frontend/handler/paste.cljs
  34. 7 7
      src/main/frontend/util/text.cljs
  35. 2 2
      src/test/frontend/handler/repo_conversion_test.cljs
  36. 1 1
      tldraw/apps/tldraw-logseq/src/components/PopoverButton/PopoverButton.tsx
  37. 1 1
      tldraw/packages/core/src/lib/TLApp/TLApp.ts
  38. 1 1
      tldraw/packages/core/src/utils/BoundsUtils.ts
  39. 1 1
      tldraw/packages/core/src/utils/DataUtils.ts
  40. 1 1
      tldraw/packages/core/src/utils/PointUtils.ts
  41. 4 4
      tldraw/packages/react/src/hooks/useBoundsEvents.ts
  42. 1 1
      tldraw/packages/utils/curve/src/index.ts
  43. 1 1
      tldraw/packages/utils/intersect/src/index.ts
  44. 14 0
      typos.toml

+ 10 - 0
.github/workflows/build.yml

@@ -18,6 +18,16 @@ env:
   BABASHKA_VERSION: '1.0.168'
   BABASHKA_VERSION: '1.0.168'
 
 
 jobs:
 jobs:
+  typos:
+    name: Spell Check with Typos
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout Actions Repository
+        uses: actions/checkout@v3
+      - name: Check spelling with custom config file
+        uses: crate-ci/[email protected]
+        with:
+          config: ./typos.toml
 
 
   test:
   test:
     strategy:
     strategy:

+ 1 - 1
Dockerfile

@@ -1,6 +1,6 @@
 # NOTE: please keep it in sync with .github pipelines
 # NOTE: please keep it in sync with .github pipelines
 # NOTE: during testing make sure to change the branch below
 # NOTE: during testing make sure to change the branch below
-# NOTE: before runing the build-docker GH action edit
+# NOTE: before running the build-docker GH action edit
 #       build-docker.yml and change the release channel from :latest to :testing
 #       build-docker.yml and change the release channel from :latest to :testing
 
 
 # Builder image
 # Builder image

+ 1 - 1
deps/db/README.md

@@ -46,7 +46,7 @@ bb lint:rules
 The package.json dependencies are just for testing and should be updated if there is
 The package.json dependencies are just for testing and should be updated if there is
 new behavior to test.
 new behavior to test.
 
 
-The deps.edn dependecies are used by both ClojureScript and nbb-logseq. Their
+The deps.edn dependencies are used by both ClojureScript and nbb-logseq. Their
 versions should be backwards compatible with each other with priority given to
 versions should be backwards compatible with each other with priority given to
 the frontend. _No new dependency_ should be introduced to this library without
 the frontend. _No new dependency_ should be introduced to this library without
 an understanding of the tradeoffs of adding this to nbb-logseq.
 an understanding of the tradeoffs of adding this to nbb-logseq.

+ 2 - 2
deps/db/src/logseq/db/rules.cljc

@@ -31,7 +31,7 @@
 ;; https://docs.datomic.com/on-prem/query/query-executing.html#clause-order
 ;; https://docs.datomic.com/on-prem/query/query-executing.html#clause-order
 ;; Recursive optimization Reference:
 ;; Recursive optimization Reference:
 ;; https://stackoverflow.com/questions/42457136/recursive-datalog-queries-for-datomic-really-slow
 ;; https://stackoverflow.com/questions/42457136/recursive-datalog-queries-for-datomic-really-slow
-;; Should optimize for query the decendents of a block
+;; Should optimize for query the descendents of a block
 ;; Quote:
 ;; Quote:
 ;; My theory is that your rules are not written in a way that Datalog can optimize for this read pattern - probably resulting in a traversal of all the entities. I suggest to rewrite them as follows:
 ;; My theory is that your rules are not written in a way that Datalog can optimize for this read pattern - probably resulting in a traversal of all the entities. I suggest to rewrite them as follows:
 ;; [[(ubersymbol ?c ?p)
 ;; [[(ubersymbol ?c ?p)
@@ -62,7 +62,7 @@
 
 
 (def ^:large-vars/data-var query-dsl-rules
 (def ^:large-vars/data-var query-dsl-rules
   "Rules used by frontend.db.query-dsl. The symbols ?b and ?p respectively refer
   "Rules used by frontend.db.query-dsl. The symbols ?b and ?p respectively refer
-  to block and page. Do not alter them as they are programatically built by the
+  to block and page. Do not alter them as they are programmatically built by the
   query-dsl ns"
   query-dsl ns"
   {:page-property
   {:page-property
    '[(page-property ?p ?key ?val)
    '[(page-property ?p ?key ?val)

+ 1 - 1
deps/graph-parser/README.md

@@ -57,7 +57,7 @@ yarn test
 The package.json dependencies are just for testing and should be updated if there is
 The package.json dependencies are just for testing and should be updated if there is
 new behavior to test.
 new behavior to test.
 
 
-The deps.edn dependecies are used by both ClojureScript and nbb-logseq. Their
+The deps.edn dependencies are used by both ClojureScript and nbb-logseq. Their
 versions should be backwards compatible with each other with priority given to
 versions should be backwards compatible with each other with priority given to
 the frontend. _No new dependency_ should be introduced to this library without
 the frontend. _No new dependency_ should be introduced to this library without
 an understanding of the tradeoffs of adding this to nbb-logseq.
 an understanding of the tradeoffs of adding this to nbb-logseq.

+ 1 - 1
deps/graph-parser/src/logseq/graph_parser/util.cljs

@@ -191,7 +191,7 @@
     (keyword format)))
     (keyword format)))
 
 
 (defn path->file-name
 (defn path->file-name
-  ;; Only for interal paths, as they are converted to POXIS already
+  ;; Only for internal paths, as they are converted to POXIS already
   ;; https://github.com/logseq/logseq/blob/48b8e54e0fdd8fbd2c5d25b7f1912efef8814714/deps/graph-parser/src/logseq/graph_parser/extract.cljc#L32
   ;; https://github.com/logseq/logseq/blob/48b8e54e0fdd8fbd2c5d25b7f1912efef8814714/deps/graph-parser/src/logseq/graph_parser/extract.cljc#L32
   ;; Should be converted to POXIS first for external paths
   ;; Should be converted to POXIS first for external paths
   [path]
   [path]

+ 1 - 1
docs/accessibility.md

@@ -10,7 +10,7 @@
 	- We can also provide alternative options in order to conform with AAA standards. For instance, our default themes can aim for AA, but we can provide a high-contrast theme that aims for AAA. Providing [alternative versions](https://www.w3.org/WAI/GL/2007/05/alternate-versions.html) with different levels of conformance is permitted according to WCAG, if there is an accessible way to reach those alternatives.
 	- We can also provide alternative options in order to conform with AAA standards. For instance, our default themes can aim for AA, but we can provide a high-contrast theme that aims for AAA. Providing [alternative versions](https://www.w3.org/WAI/GL/2007/05/alternate-versions.html) with different levels of conformance is permitted according to WCAG, if there is an accessible way to reach those alternatives.
 - ## Simple development guidelines
 - ## Simple development guidelines
 	- Use semantically correct markup whenever possible. Every time you are about to decide which html tag you are going to use, choose the one that behaves the way you want it. For example, let's say you want to create an element that looks like plain text, but triggers an action on click. Usually, the best approach would be to create a `<button>` and make it look like a `<span>` using css. If you use a `span`, you will also have to override other html attributes like `tabindex` and `role` to make the element behave like a button. This is almost always a bad sign, and should be avoided. If you use the appropriate html element, the browser will be able to properly handle it.
 	- Use semantically correct markup whenever possible. Every time you are about to decide which html tag you are going to use, choose the one that behaves the way you want it. For example, let's say you want to create an element that looks like plain text, but triggers an action on click. Usually, the best approach would be to create a `<button>` and make it look like a `<span>` using css. If you use a `span`, you will also have to override other html attributes like `tabindex` and `role` to make the element behave like a button. This is almost always a bad sign, and should be avoided. If you use the appropriate html element, the browser will be able to properly handle it.
-	- Do not skip headings. People who use screen readers and a keyboard to navigate through the app, use the headings structure to quickly jump to areas of interest. Skipping headings to visually conform with the design, makes this hard for them. If you want to create a heading tha looks like an `<h4>` but is in terms of document structure an `<h2>`, use the latter and make it look like an `<h4>`.
+	- Do not skip headings. People who use screen readers and a keyboard to navigate through the app, use the headings structure to quickly jump to areas of interest. Skipping headings to visually conform with the design, makes this hard for them. If you want to create a heading that looks like an `<h4>` but is in terms of document structure an `<h2>`, use the latter and make it look like an `<h4>`.
 	- A more [in-depth guide about HTML and accessibility](https://developer.mozilla.org/en-US/docs/Learn/Accessibility/HTML).
 	- A more [in-depth guide about HTML and accessibility](https://developer.mozilla.org/en-US/docs/Learn/Accessibility/HTML).
 - ## Advanced concepts
 - ## Advanced concepts
 	- Focus management is extremely important for [keyboard navigation](https://developer.mozilla.org/en-US/docs/Web/Accessibility/Understanding_WCAG/Keyboard). Focusable elements can help people with motor disabilities navigate. [Focus Order](https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-focus-order.html) plays an important role in this.
 	- Focus management is extremely important for [keyboard navigation](https://developer.mozilla.org/en-US/docs/Web/Accessibility/Understanding_WCAG/Keyboard). Focusable elements can help people with motor disabilities navigate. [Focus Order](https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-focus-order.html) plays an important role in this.

+ 1 - 1
e2e-tests/basic.spec.ts

@@ -160,7 +160,7 @@ test('template', async ({ page, block }) => {
 test('auto completion square brackets', async ({ page, block }) => {
 test('auto completion square brackets', async ({ page, block }) => {
   await createRandomPage(page)
   await createRandomPage(page)
 
 
-  // In this test, `type` is unsed instead of `fill`, to allow for auto-completion.
+  // In this test, `type` is unused instead of `fill`, to allow for auto-completion.
 
 
   // [[]]
   // [[]]
   await block.mustType('This is a [', { toBe: 'This is a []' })
   await block.mustType('This is a [', { toBe: 'This is a []' })

+ 1 - 1
e2e-tests/code-editing.spec.ts

@@ -47,7 +47,7 @@ test('switch code editing mode', async ({ page }) => {
   await page.waitForTimeout(200) // editor unloading
   await page.waitForTimeout(200) // editor unloading
   await page.press('.block-editor textarea', 'Escape')
   await page.press('.block-editor textarea', 'Escape')
   await page.waitForTimeout(200) // editor loading
   await page.waitForTimeout(200) // editor loading
-  // click position is estimated to be at the begining of the first line
+  // click position is estimated to be at the beginning of the first line
   await page.click('.CodeMirror pre', { position: { x: 1, y: 5 } })
   await page.click('.CodeMirror pre', { position: { x: 1, y: 5 } })
   await page.waitForTimeout(200)
   await page.waitForTimeout(200)
 
 

+ 3 - 3
e2e-tests/editor.spec.ts

@@ -91,7 +91,7 @@ test('create new page from bracketing text #4971', async ({ page, block }) => {
 test.skip('backspace and cursor position #4897', async ({ page, block }) => {
 test.skip('backspace and cursor position #4897', async ({ page, block }) => {
   await createRandomPage(page)
   await createRandomPage(page)
 
 
-  // Delete to previous block, and check cursor postion, with markup
+  // Delete to previous block, and check cursor position, with markup
   await block.mustFill('`012345`')
   await block.mustFill('`012345`')
   await block.enterNext()
   await block.enterNext()
   await block.mustType('`abcdef', { toBe: '`abcdef`' }) // "`" auto-completes
   await block.mustType('`abcdef', { toBe: '`abcdef`' }) // "`" auto-completes
@@ -111,7 +111,7 @@ test.skip('backspace and cursor position #4897', async ({ page, block }) => {
 test.skip('next block and cursor position', async ({ page, block }) => {
 test.skip('next block and cursor position', async ({ page, block }) => {
   await createRandomPage(page)
   await createRandomPage(page)
 
 
-  // Press Enter and check cursor postion, with markup
+  // Press Enter and check cursor position, with markup
   await block.mustType('abcde`12345', { toBe: 'abcde`12345`' }) // "`" auto-completes
   await block.mustType('abcde`12345', { toBe: 'abcde`12345`' }) // "`" auto-completes
   for (let i = 0; i < 7; i++) {
   for (let i = 0; i < 7; i++) {
     await page.keyboard.press('ArrowLeft')
     await page.keyboard.press('ArrowLeft')
@@ -131,7 +131,7 @@ test(
   // cases should trigger [[]] #3251
   // cases should trigger [[]] #3251
   async ({ page, block }) => {
   async ({ page, block }) => {
     // This test requires dev mode
     // This test requires dev mode
-    test.skip(process.env.RELEASE === 'true', 'not avaliable for release version')
+    test.skip(process.env.RELEASE === 'true', 'not available for release version')
 
 
     for (let [idx, events] of [
     for (let [idx, events] of [
       kb_events.win10_pinyin_left_full_square_bracket,
       kb_events.win10_pinyin_left_full_square_bracket,

+ 1 - 1
e2e-tests/fixtures.ts

@@ -219,7 +219,7 @@ export const test = base.extend<LogseqFixtures>({
       },
       },
       activeEditing: async (nth: number): Promise<void> => {
       activeEditing: async (nth: number): Promise<void> => {
         await page.waitForSelector(`.ls-block >> nth=${nth}`, { timeout: 1000 })
         await page.waitForSelector(`.ls-block >> nth=${nth}`, { timeout: 1000 })
-        // scroll, for isVisble test
+        // scroll, for isVisible test
         await page.$eval(`.ls-block >> nth=${nth}`, (element) => {
         await page.$eval(`.ls-block >> nth=${nth}`, (element) => {
           element.scrollIntoView();
           element.scrollIntoView();
         });
         });

+ 2 - 2
e2e-tests/logseq-url.spec.ts

@@ -9,7 +9,7 @@ test("Logseq URLs (same graph)", async ({ page, block }) => {
   let page_title = await createRandomPage(page)
   let page_title = await createRandomPage(page)
   await block.mustFill(identify_text)
   await block.mustFill(identify_text)
 
 
-  // paste current page's URL to another page, then redirect throught the URL
+  // paste current page's URL to another page, then redirect through the URL
   await page.click('.ui__dropdown-trigger .toolbar-dots-btn')
   await page.click('.ui__dropdown-trigger .toolbar-dots-btn')
   await page.locator("text=Copy page URL").click()
   await page.locator("text=Copy page URL").click()
   await createRandomPage(page)
   await createRandomPage(page)
@@ -26,7 +26,7 @@ test("Logseq URLs (same graph)", async ({ page, block }) => {
     expect(await cursor_locator.inputValue()).toBe(identify_text)
     expect(await cursor_locator.inputValue()).toBe(identify_text)
   }
   }
 
 
-  // paste the identify block's URL to another page, then redirect throught the URL
+  // paste the identify block's URL to another page, then redirect through the URL
   await page.click('span.bullet >> nth=0', { button: "right" })
   await page.click('span.bullet >> nth=0', { button: "right" })
   await page.locator("text=Copy block URL").click()
   await page.locator("text=Copy block URL").click()
   await createRandomPage(page)
   await createRandomPage(page)

+ 2 - 2
e2e-tests/page-search.spec.ts

@@ -5,7 +5,7 @@ import { IsMac, createRandomPage, newBlock, newInnerBlock, randomString, lastBlo
 
 
 /***
 /***
  * Test alias features
  * Test alias features
- * Test search refering features
+ * Test search referring features
  * Consider diacritics
  * Consider diacritics
  ***/
  ***/
 
 
@@ -101,7 +101,7 @@ async function alias_test( block: Block, page: Page, page_name: string, search_k
   // the target page will contains the content in
   // the target page will contains the content in
   //   alias_test_content_1,
   //   alias_test_content_1,
   //   alias_test_content_2, and
   //   alias_test_content_2, and
-  //   alias_test_content_3 sequentialy, to validate the target page state
+  //   alias_test_content_3 sequentially, to validate the target page state
   await page.type('textarea >> nth=0', 'alias:: [[' + alias_name, {delay: 10})
   await page.type('textarea >> nth=0', 'alias:: [[' + alias_name, {delay: 10})
   await page.keyboard.press('Enter', {delay: 200}) // Enter for finishing selection
   await page.keyboard.press('Enter', {delay: 200}) // Enter for finishing selection
   await page.keyboard.press('Enter', {delay: 200}) // double Enter for exit property editing
   await page.keyboard.press('Enter', {delay: 200}) // double Enter for exit property editing

+ 1 - 1
e2e-tests/random.spec.ts

@@ -128,7 +128,7 @@ test.skip('Random editor operations', async ({ page, block }) => {
         await page.keyboard.press('Backspace', { delay: 50 })
         await page.keyboard.press('Backspace', { delay: 50 })
       }
       }
     } else if (op === "delete") {
     } else if (op === "delete") {
-      // move text-cursor to begining
+      // move text-cursor to beginning
       // then press delete
       // then press delete
       // then move text-cursor to the end
       // then move text-cursor to the end
       await block.activeEditing(target)
       await block.activeEditing(target)

+ 5 - 5
ios/App/App/FsWatcher.swift

@@ -45,7 +45,7 @@ public class FsWatcher: CAPPlugin, PollingWatcherDelegate {
         call.resolve()
         call.resolve()
     }
     }
 
 
-    public func recevedNotification(_ url: URL, _ event: PollingWatcherEvent, _ metadata: SimpleFileMetadata?) {
+    public func receivedNotification(_ url: URL, _ event: PollingWatcherEvent, _ metadata: SimpleFileMetadata?) {
         // NOTE: Event in js {dir path content stat{mtime}}
         // NOTE: Event in js {dir path content stat{mtime}}
         switch event {
         switch event {
         case .Unlink:
         case .Unlink:
@@ -112,7 +112,7 @@ extension URL {
 // MARK: PollingWatcher
 // MARK: PollingWatcher
 
 
 public protocol PollingWatcherDelegate {
 public protocol PollingWatcherDelegate {
-    func recevedNotification(_ url: URL, _ event: PollingWatcherEvent, _ metadata: SimpleFileMetadata?)
+    func receivedNotification(_ url: URL, _ event: PollingWatcherEvent, _ metadata: SimpleFileMetadata?)
 }
 }
 
 
 public enum PollingWatcherEvent {
 public enum PollingWatcherEvent {
@@ -253,14 +253,14 @@ public class PollingWatcher {
             if let idx = self.metaDb.index(forKey: url) {
             if let idx = self.metaDb.index(forKey: url) {
                 let (_, oldMeta) = self.metaDb.remove(at: idx)
                 let (_, oldMeta) = self.metaDb.remove(at: idx)
                 if oldMeta != meta {
                 if oldMeta != meta {
-                    self.delegate?.recevedNotification(url, .Change, meta)
+                    self.delegate?.receivedNotification(url, .Change, meta)
                 }
                 }
             } else {
             } else {
-                self.delegate?.recevedNotification(url, .Add, meta)
+                self.delegate?.receivedNotification(url, .Add, meta)
             }
             }
         }
         }
         for url in self.metaDb.keys {
         for url in self.metaDb.keys {
-            self.delegate?.recevedNotification(url, .Unlink, nil)
+            self.delegate?.receivedNotification(url, .Unlink, nil)
         }
         }
         self.metaDb = newMetaDb
         self.metaDb = newMetaDb
     }
     }

+ 1 - 1
libs/src/LSPlugin.ts

@@ -381,7 +381,7 @@ export interface IAppProxy {
   ) => Promise<void>
   ) => Promise<void>
 
 
   /**
   /**
-   * Call external plugin command provided by models or registerd commands
+   * Call external plugin command provided by models or registered commands
    * @added 0.0.13
    * @added 0.0.13
    * @param type `xx-plugin-id.commands.xx-key`, `xx-plugin-id.models.xx-key`
    * @param type `xx-plugin-id.commands.xx-key`, `xx-plugin-id.models.xx-key`
    * @param args
    * @param args

+ 1 - 1
scripts/src/logseq/tasks/file_sync.clj

@@ -194,7 +194,7 @@
     \"dir\": \"/Users/me/Documents/untitled folder 31\"}
     \"dir\": \"/Users/me/Documents/untitled folder 31\"}
   ```
   ```
 
 
-  * you alse need to open logseq-app(or yarn electron-watch),
+  * you also need to open logseq-app(or yarn electron-watch),
     and open <dir> and start file-sync"
     and open <dir> and start file-sync"
   [& _args]
   [& _args]
   (setup-vars)
   (setup-vars)

+ 1 - 1
src/electron/electron/context_menu.cljs

@@ -3,7 +3,7 @@
             ["electron" :refer [Menu MenuItem shell nativeImage clipboard] :as electron]
             ["electron" :refer [Menu MenuItem shell nativeImage clipboard] :as electron]
             ["electron-dl" :refer [download]]))
             ["electron-dl" :refer [download]]))
 
 
-;; context menu is registerd in window/setup-window-listeners!
+;; context menu is registered in window/setup-window-listeners!
 (defn setup-context-menu!
 (defn setup-context-menu!
   [^js win]
   [^js win]
   (let [web-contents (.-webContents win)
   (let [web-contents (.-webContents win)

+ 4 - 4
src/electron/electron/core.cljs

@@ -248,7 +248,7 @@
 
 
 (defn- setup-deeplink! []
 (defn- setup-deeplink! []
   ;; Works for Deeplink v1.0.9
   ;; Works for Deeplink v1.0.9
-  ;; :mainWindow is only used for handeling window restoring on second-instance,
+  ;; :mainWindow is only used for handling window restoring on second-instance,
   ;; But we already handle window restoring without deeplink.
   ;; But we already handle window restoring without deeplink.
   ;; https://github.com/glawson/electron-deeplink/blob/73d58edcde3d0e80b1819cd68a0c6e837a9c9258/src/index.ts#L150-L155
   ;; https://github.com/glawson/electron-deeplink/blob/73d58edcde3d0e80b1819cd68a0c6e837a9c9258/src/index.ts#L150-L155
   (-> (Deeplink. #js
   (-> (Deeplink. #js
@@ -290,7 +290,7 @@
                (win/switch-to-window! window))))
                (win/switch-to-window! window))))
 
 
       (.on app "window-all-closed" (fn []
       (.on app "window-all-closed" (fn []
-                                     (logger/debug "window-all-closed" "Quiting...")
+                                     (logger/debug "window-all-closed" "Quitting...")
                                      (try
                                      (try
                                        (fs-watcher/close-watcher!)
                                        (fs-watcher/close-watcher!)
                                        (search/close!)
                                        (search/close!)
@@ -342,7 +342,7 @@
                                       (let [_ (async/<! state/persistent-dbs-chan)]
                                       (let [_ (async/<! state/persistent-dbs-chan)]
                                         (if (or @win/*quitting? (not mac?))
                                         (if (or @win/*quitting? (not mac?))
                                           ;; MacOS: only cmd+q quitting will trigger actual closing
                                           ;; MacOS: only cmd+q quitting will trigger actual closing
-                                          ;; otherwise, it's just hiding - don't do any actuall closing in that case
+                                          ;; otherwise, it's just hiding - don't do any actual closing in that case
                                           ;; except saving transit
                                           ;; except saving transit
                                           (when-let [win @*win]
                                           (when-let [win @*win]
                                             (when-let [dir (state/get-window-graph-path win)]
                                             (when-let [dir (state/get-window-graph-path win)]
@@ -351,7 +351,7 @@
                                             (win/destroy-window! win)
                                             (win/destroy-window! win)
                                             ;; FIXME: what happens when closing main window on Windows?
                                             ;; FIXME: what happens when closing main window on Windows?
                                             (reset! *win nil))
                                             (reset! *win nil))
-                                          ;; Just hiding - don't do any actuall closing operation
+                                          ;; Just hiding - don't do any actual closing operation
                                           (do (.preventDefault ^js/Event e)
                                           (do (.preventDefault ^js/Event e)
                                               (if (and mac? (.isFullScreen win))
                                               (if (and mac? (.isFullScreen win))
                                                 (do (.once win "leave-full-screen" #(.hide win))
                                                 (do (.once win "leave-full-screen" #(.hide win))

+ 19 - 19
src/electron/electron/search.cljs

@@ -134,18 +134,18 @@
 
 
 (defn open-db!
 (defn open-db!
   [db-name]
   [db-name]
-    (let [[db-sanitized-name db-full-path] (get-db-full-path db-name)]
-      (try (let [db (sqlite3 db-full-path nil)]
-             (create-blocks-table! db)
-             (create-blocks-fts-table! db)
-             (create-pages-table! db)
-             (create-pages-fts-table! db)
-             (add-blocks-fts-triggers! db)
-             (add-pages-fts-triggers! db)
-             (swap! databases assoc db-sanitized-name db))
-           (catch :default e
-             (logger/error (str e ": " db-name))
-             (fs/unlinkSync db-full-path)))))
+  (let [[db-sanitized-name db-full-path] (get-db-full-path db-name)]
+    (try (let [db (sqlite3 db-full-path nil)]
+           (create-blocks-table! db)
+           (create-blocks-fts-table! db)
+           (create-pages-table! db)
+           (create-pages-fts-table! db)
+           (add-blocks-fts-triggers! db)
+           (add-pages-fts-triggers! db)
+           (swap! databases assoc db-sanitized-name db))
+         (catch :default e
+           (logger/error (str e ": " db-name))
+           (fs/unlinkSync db-full-path)))))
 
 
 (defn open-dbs!
 (defn open-dbs!
   []
   []
@@ -246,7 +246,7 @@
   (medley/distinct-by f (seq col)))
   (medley/distinct-by f (seq col)))
 
 
 (defn search-blocks
 (defn search-blocks
-  ":page - the page to specificly search on"
+  ":page - the page to specifically search on"
   [repo q {:keys [limit page]}]
   [repo q {:keys [limit page]}]
   (when-let [database (get-db repo)]
   (when-let [database (get-db repo)]
     (when-not (string/blank? q)
     (when-not (string/blank? q)
@@ -263,9 +263,9 @@
                                " content like ? limit ?")
                                " content like ? limit ?")
             matched-result (->>
             matched-result (->>
                             (map
                             (map
-                              (fn [match-input]
-                                (search-blocks-aux database match-sql match-input page limit))
-                              match-inputs)
+                             (fn [match-input]
+                               (search-blocks-aux database match-sql match-input page limit))
+                             match-inputs)
                             (apply concat))]
                             (apply concat))]
         (->>
         (->>
          (concat matched-result
          (concat matched-result
@@ -328,9 +328,9 @@
                                " content like ? limit ?")
                                " content like ? limit ?")
             matched-result (->>
             matched-result (->>
                             (map
                             (map
-                              (fn [match-input]
-                                (search-pages-aux database match-sql match-input limit))
-                              match-inputs)
+                             (fn [match-input]
+                               (search-pages-aux database match-sql match-input limit))
+                             match-inputs)
                             (apply concat))]
                             (apply concat))]
         (->>
         (->>
          (concat matched-result
          (concat matched-result

+ 2 - 2
src/electron/electron/url.cljs

@@ -59,12 +59,12 @@
       (graph-identifier-error-handler graph-identifier))))
       (graph-identifier-error-handler graph-identifier))))
 
 
 (defn- x-callback-url-handler
 (defn- x-callback-url-handler
-  "win - a window used for fallback (main window is prefered)"
+  "win - a window used for fallback (main window is preferred)"
   [^js win ^js/URL parsed-url]
   [^js win ^js/URL parsed-url]
   (let [action (.-pathname parsed-url)]
   (let [action (.-pathname parsed-url)]
     (cond
     (cond
       ;; url:     (string) Page url
       ;; url:     (string) Page url
-      ;; title:   (stirng) Page title
+      ;; title:   (string) Page title
       ;; content: (string) Highlighted text
       ;; content: (string) Highlighted text
       ;; page:    (string) Page name to insert to, use "TODAY" to insert to today page
       ;; page:    (string) Page name to insert to, use "TODAY" to insert to today page
       ;; append:  (bool)   Append to the end of the page, default to false(current editing position)
       ;; append:  (bool)   Append to the end of the page, default to false(current editing position)

+ 3 - 3
src/main/frontend/components/block.cljs

@@ -576,7 +576,7 @@
                        (pdf-utils/fix-local-asset-pagename page-name)
                        (pdf-utils/fix-local-asset-pagename page-name)
 
 
                        (not= (util/safe-page-name-sanity-lc original-name) page-name-in-block)
                        (not= (util/safe-page-name-sanity-lc original-name) page-name-in-block)
-                       page-name-in-block ;; page-name-in-block might be overrided (legacy))
+                       page-name-in-block ;; page-name-in-block might be overridden (legacy))
 
 
                        :else
                        :else
                        (util/trim-safe page-name))
                        (util/trim-safe page-name))
@@ -1899,7 +1899,7 @@
         priority (priority-cp t)
         priority (priority-cp t)
         tags (block-tags-cp t)
         tags (block-tags-cp t)
         bg-color (:background-color properties)
         bg-color (:background-color properties)
-        ;; `heading-level` is for backward compatiblity, will remove it in later releases
+        ;; `heading-level` is for backward compatibility, will remove it in later releases
         heading-level (:block/heading-level t)
         heading-level (:block/heading-level t)
         heading (or
         heading (or
                  (and heading-level
                  (and heading-level
@@ -2991,7 +2991,7 @@
   [log]
   [log]
   (let [clocks (filter #(string/starts-with? % "CLOCK:") log)
   (let [clocks (filter #(string/starts-with? % "CLOCK:") log)
         clocks (reverse (sort-by str clocks))
         clocks (reverse (sort-by str clocks))
-        ;; TODO: diplay states change log
+        ;; TODO: display states change log
         ; states (filter #(not (string/starts-with? % "CLOCK:")) log)
         ; states (filter #(not (string/starts-with? % "CLOCK:")) log)
         ]
         ]
     (when (seq clocks)
     (when (seq clocks)

+ 2 - 2
src/main/frontend/components/datetime.cljs

@@ -132,7 +132,7 @@
 
 
      [:p.mt-4
      [:p.mt-4
       (ui/button "Submit"
       (ui/button "Submit"
-        :on-click on-submit)]]))
+                 :on-click on-submit)]]))
 
 
 (rum/defc date-picker < rum/reactive
 (rum/defc date-picker < rum/reactive
   {:init (fn [state]
   {:init (fn [state]
@@ -161,7 +161,7 @@
          (util/stop e)
          (util/stop e)
          (let [date (t/to-default-time-zone date)
          (let [date (t/to-default-time-zone date)
                journal (date/journal-name date)]
                journal (date/journal-name date)]
-           ;; deadline-or-schedule? is handled in on-sumbit, not here
+           ;; deadline-or-schedule? is handled in on-submit, not here
            (when-not deadline-or-schedule?
            (when-not deadline-or-schedule?
                ;; similar to page reference
                ;; similar to page reference
              (editor-handler/insert-command! dom-id
              (editor-handler/insert-command! dom-id

+ 1 - 1
src/main/frontend/components/theme.cljs

@@ -73,7 +73,7 @@
                     ;; demo graph only
                     ;; demo graph only
                     (and (= 1 (count repos)) (:example? (first repos))
                     (and (= 1 (count repos)) (:example? (first repos))
                          (not (util/mobile?)))
                          (not (util/mobile?)))
-                    ;; not in publising mode
+                    ;; not in publishing mode
                     config/publishing?
                     config/publishing?
                     ;; other graphs exists
                     ;; other graphs exists
                     (seq repos))
                     (seq repos))

+ 2 - 2
src/main/frontend/components/whiteboard.cljs

@@ -53,7 +53,7 @@
 
 
 ;; TODO: use frontend.ui instead of making a new one
 ;; TODO: use frontend.ui instead of making a new one
 (rum/defc dropdown
 (rum/defc dropdown
-  [label children show? outside-click-hander portal?]
+  [label children show? outside-click-handler portal?]
   (let [[anchor-ref anchor-rect] (use-bounding-client-rect show?)
   (let [[anchor-ref anchor-rect] (use-bounding-client-rect show?)
         [content-ref content-rect] (use-bounding-client-rect show?)
         [content-ref content-rect] (use-bounding-client-rect show?)
         offset-x (when (and anchor-rect content-rect)
         offset-x (when (and anchor-rect content-rect)
@@ -67,7 +67,7 @@
                      (* 0.5 (- (.-width anchor-rect) (.-width content-rect)))))
                      (* 0.5 (- (.-width anchor-rect) (.-width content-rect)))))
         offset-y (when (and anchor-rect content-rect)
         offset-y (when (and anchor-rect content-rect)
                    (+ (.-y anchor-rect) (.-height anchor-rect) 8))
                    (+ (.-y anchor-rect) (.-height anchor-rect) 8))
-        click-outside-ref (use-click-outside outside-click-hander)
+        click-outside-ref (use-click-outside outside-click-handler)
         [d-open set-d-open] (rum/use-state false)
         [d-open set-d-open] (rum/use-state false)
         _ (rum/use-effect! (fn [] (js/setTimeout #(set-d-open show?) 100))
         _ (rum/use-effect! (fn [] (js/setTimeout #(set-d-open show?) 100))
                            [show?])]
                            [show?])]

+ 2 - 2
src/main/frontend/extensions/pdf/finder.js

@@ -478,7 +478,7 @@ export class PDFFindController {
       // kind of whitespaces are replaced by a single " ".
       // kind of whitespaces are replaced by a single " ".
 
 
       if (p1) {
       if (p1) {
-        // Escape characters like *+?... to not interfer with regexp syntax.
+        // Escape characters like *+?... to not interfere with regexp syntax.
         return `[ ]*\\${p1}[ ]*`
         return `[ ]*\\${p1}[ ]*`
       }
       }
       if (p2) {
       if (p2) {
@@ -1063,4 +1063,4 @@ export class PDFFindBar {
       this.bar.classList.add('wrapContainers')
       this.bar.classList.add('wrapContainers')
     }
     }
   }
   }
-}
+}

+ 16 - 16
src/main/frontend/extensions/srs.cljs

@@ -299,10 +299,10 @@
                                          (nil? next-sched*)
                                          (nil? next-sched*)
                                          (t/before? next-sched* time))))
                                          (t/before? next-sched* time))))
                                  blocks),
                                  blocks),
-        sort-by-next-shedule   (sort-by (fn [b]
-                                (get (get b :block/properties) card-next-schedule-property)) filtered-result)]
+        sort-by-next-schedule   (sort-by (fn [b]
+                                           (get (get b :block/properties) card-next-schedule-property)) filtered-result)]
     {:total (count blocks)
     {:total (count blocks)
-     :result sort-by-next-shedule}))
+     :result sort-by-next-schedule}))
 
 
 
 
 ;;; ================================================================
 ;;; ================================================================
@@ -412,14 +412,14 @@
 
 
 (defn- btn-with-shortcut [{:keys [shortcut id btn-text background on-click class]}]
 (defn- btn-with-shortcut [{:keys [shortcut id btn-text background on-click class]}]
   (ui/button
   (ui/button
-    [:span btn-text (when-not (util/sm-breakpoint?)
-                      [" " (ui/render-keyboard-shortcut shortcut)])]
-    :id id
-    :class (str id " " class)
-    :background background
-    :on-mouse-down (fn [e] (util/stop-propagation e))
-    :on-click (fn [_e]
-                (js/setTimeout #(on-click) 10))))
+   [:span btn-text (when-not (util/sm-breakpoint?)
+                     [" " (ui/render-keyboard-shortcut shortcut)])]
+   :id id
+   :class (str id " " class)
+   :background background
+   :on-mouse-down (fn [e] (util/stop-propagation e))
+   :on-click (fn [_e]
+               (js/setTimeout #(on-click) 10))))
 
 
 (rum/defcs view < rum/reactive db-mixins/query
 (rum/defcs view < rum/reactive db-mixins/query
   (rum/local 1 ::phase)
   (rum/local 1 ::phase)
@@ -502,11 +502,11 @@
                          :class "tippy-hover"
                          :class "tippy-hover"
                          :interactive true}
                          :interactive true}
                         (ui/button [:span "Reset"]
                         (ui/button [:span "Reset"]
-                          :id "card-reset"
-                          :class (util/hiccup->class "opacity-60.hover:opacity-100.card-reset")
-                          :on-click (fn [e]
-                                      (util/stop e)
-                                      (operation-reset! card)))))]
+                                   :id "card-reset"
+                                   :class (util/hiccup->class "opacity-60.hover:opacity-100.card-reset")
+                                   :on-click (fn [e]
+                                               (util/stop e)
+                                               (operation-reset! card)))))]
            [:div.my-3 (ui/button "Review cards" :small? true)])]))))
            [:div.my-3 (ui/button "Review cards" :small? true)])]))))
 
 
 (rum/defc view-modal <
 (rum/defc view-modal <

+ 5 - 5
src/main/frontend/extensions/zotero/api.cljs

@@ -35,15 +35,15 @@
     out))
     out))
 
 
 (defn parse-start [headers next-or-prev]
 (defn parse-start [headers next-or-prev]
-  (let [inclue-text (case next-or-prev
-                      :next "rel=\"next\""
-                      :prev "rel=\"prev\"")
+  (let [include-text (case next-or-prev
+                       :next "rel=\"next\""
+                       :prev "rel=\"prev\"")
         links
         links
         (str/split
         (str/split
          (:link (cske/transform-keys csk/->kebab-case-keyword headers)) ",")
          (:link (cske/transform-keys csk/->kebab-case-keyword headers)) ",")
         next-link   (->> links
         next-link   (->> links
-                       (filter (fn [l] (str/includes? l inclue-text)))
-                       first)]
+                         (filter (fn [l] (str/includes? l include-text)))
+                         first)]
     (when next-link
     (when next-link
       (let [start    (str/index-of next-link "<")
       (let [start    (str/index-of next-link "<")
             end      (str/last-index-of next-link ">;")
             end      (str/last-index-of next-link ">;")

+ 2 - 2
src/main/frontend/fs/sync.cljs

@@ -342,7 +342,7 @@
       (remove-user-graph-uuid-prefix o)
       (remove-user-graph-uuid-prefix o)
 
 
       :else
       :else
-      (throw (js/Error. (str "unsupport type " (str o)))))))
+      (throw (js/Error. (str "unsupported type " (str o)))))))
 
 
 (defprotocol IChecksum
 (defprotocol IChecksum
   (-checksum [this]))
   (-checksum [this]))
@@ -3258,7 +3258,7 @@
 
 
 ;;; ### some add-watches
 ;;; ### some add-watches
 
 
-;; TOOD: replace this logic by pause/resume state
+;; TODO: replace this logic by pause/resume state
 (defonce network-online-cursor (rum/cursor state/state :network/online?))
 (defonce network-online-cursor (rum/cursor state/state :network/online?))
 (add-watch network-online-cursor "sync-manage"
 (add-watch network-online-cursor "sync-manage"
            (fn [_k _r o n]
            (fn [_k _r o n]

+ 6 - 7
src/main/frontend/fs/watcher_handler.cljs

@@ -37,8 +37,7 @@
 
 
 (defn- handle-add-and-change!
 (defn- handle-add-and-change!
   [repo path content db-content mtime backup?]
   [repo path content db-content mtime backup?]
-  (p/let [
-          ;; save the previous content in a versioned bak file to avoid data overwritten.
+  (p/let [;; save the previous content in a versioned bak file to avoid data overwritten.
           _ (when backup?
           _ (when backup?
               (-> (when-let [repo-dir (config/get-local-dir repo)]
               (-> (when-let [repo-dir (config/get-local-dir repo)]
                     (file-handler/backup-file! repo-dir path db-content content))
                     (file-handler/backup-file! repo-dir path db-content content))
@@ -96,10 +95,10 @@
           (and (= "unlink" type)
           (and (= "unlink" type)
                (db/file-exists? repo path))
                (db/file-exists? repo path))
           (p/let [dir-exists? (fs/file-exists? dir "")]
           (p/let [dir-exists? (fs/file-exists? dir "")]
-                 (when dir-exists?
-                   (when-let [page-name (db/get-file-page path)]
-                     (println "Delete page: " page-name ", file path: " path ".")
-                     (page-handler/delete! page-name #() :delete-file? false))))
+            (when dir-exists?
+              (when-let [page-name (db/get-file-page path)]
+                (println "Delete page: " page-name ", file path: " path ".")
+                (page-handler/delete! page-name #() :delete-file? false))))
 
 
           (and (contains? #{"add" "change" "unlink"} type)
           (and (contains? #{"add" "change" "unlink"} type)
                (string/ends-with? path "logseq/custom.css"))
                (string/ends-with? path "logseq/custom.css"))
@@ -114,7 +113,7 @@
           (log/error :fs/watcher-no-handler {:type type
           (log/error :fs/watcher-no-handler {:type type
                                              :payload payload})))
                                              :payload payload})))
 
 
-      ;; return nil, otherwise the entire db will be transfered by ipc
+      ;; return nil, otherwise the entire db will be transferred by ipc
       nil)))
       nil)))
 
 
 (defn load-graph-files!
 (defn load-graph-files!

+ 1 - 1
src/main/frontend/handler/conversion.cljs

@@ -46,7 +46,7 @@
          :target        target
          :target        target
          :old-title     old-title
          :old-title     old-title
          :changed-title new-title}
          :changed-title new-title}
-        ;; Even the same file body are producing mis-matched titles - it's unreachable!
+        ;; Even the same file body are producing mismatched titles - it's unreachable!
         {:status        :unreachable
         {:status        :unreachable
          :target        target
          :target        target
          :old-title     old-title
          :old-title     old-title

+ 1 - 1
src/main/frontend/handler/export/html.cljs

@@ -62,7 +62,7 @@
   [loc items]
   [loc items]
   (z/edit loc (fn [li] (concatv li items))))
   (z/edit loc (fn [li] (concatv li items))))
 
 
-;;; utils for contruct hiccup(ends)
+;;; utils for construct hiccup(ends)
 
 
 ;;; block/inline-ast -> hiccup
 ;;; block/inline-ast -> hiccup
 (declare inline-ast->hiccup
 (declare inline-ast->hiccup

+ 10 - 10
src/main/frontend/handler/paste.cljs

@@ -109,7 +109,7 @@
           (editor-handler/paste-blocks blocks {})))
           (editor-handler/paste-blocks blocks {})))
       (let [shape-refs-text (when (and (not (string/blank? html))
       (let [shape-refs-text (when (and (not (string/blank? html))
                                        (get-whiteboard-tldr-from-text html))
                                        (get-whiteboard-tldr-from-text html))
-                              ;; text should alway be prepared block-ref generated in tldr
+                              ;; text should always be prepared block-ref generated in tldr
                               text)
                               text)
             {:keys [value selection] :as selection-and-format} (editor-handler/get-selection-and-format)
             {:keys [value selection] :as selection-and-format} (editor-handler/get-selection-and-format)
             text-url? (gp-util/url? text)
             text-url? (gp-util/url? text)
@@ -209,15 +209,15 @@
                text (.getData clipboard-data "text")
                text (.getData clipboard-data "text")
                files (.-files clipboard-data)
                files (.-files clipboard-data)
                paste-file-if-exist (fn []
                paste-file-if-exist (fn []
-                                      (when id
-                                        (let [_handled
-                                              (let [clipboard-data (gobj/get e "clipboardData")
-                                                    files (.-files clipboard-data)]
-                                                (when-let [file (first files)]
-                                                  (when-let [block (state/get-edit-block)]
-                                                    (editor-handler/upload-asset id #js[file] (:block/format block)
-                                                                                 editor-handler/*asset-uploading? true))))]
-                                          (util/stop e))))]
+                                     (when id
+                                       (let [_handled
+                                             (let [clipboard-data (gobj/get e "clipboardData")
+                                                   files (.-files clipboard-data)]
+                                               (when-let [file (first files)]
+                                                 (when-let [block (state/get-edit-block)]
+                                                   (editor-handler/upload-asset id #js[file] (:block/format block)
+                                                                                editor-handler/*asset-uploading? true))))]
+                                         (util/stop e))))]
            (cond
            (cond
              (and (string/blank? text) (string/blank? html)) (paste-file-if-exist)
              (and (string/blank? text) (string/blank? html)) (paste-file-if-exist)
              (and (seq files) (state/preferred-pasting-file?)) (paste-file-if-exist)
              (and (seq files) (state/preferred-pasting-file?)) (paste-file-if-exist)

+ 7 - 7
src/main/frontend/util/text.cljs

@@ -24,7 +24,7 @@
   [col]
   [col]
   (let [items (map (fn [item] (str "\"" item "\"")) col)]
   (let [items (map (fn [item] (str "\"" item "\"")) col)]
     (gstring/format "[%s]"
     (gstring/format "[%s]"
-                 (string/join ", " items))))
+                    (string/join ", " items))))
 
 
 (defn media-link?
 (defn media-link?
   [media-formats s]
   [media-formats s]
@@ -39,7 +39,7 @@
                           (if (string/starts-with? (string/lower-case line) key)
                           (if (string/starts-with? (string/lower-case line) key)
                             new-line
                             new-line
                             line)))
                             line)))
-                    lines)
+                       lines)
         new-lines (if (not= (map string/trim lines) new-lines)
         new-lines (if (not= (map string/trim lines) new-lines)
                     new-lines
                     new-lines
                     (cons (first new-lines) ;; title
                     (cons (first new-lines) ;; title
@@ -94,10 +94,10 @@
   (if (= value "")
   (if (= value "")
     (if before? [0] [(count s)]) ;; Hack: this prevents unnecessary work in wrapped-by?
     (if before? [0] [(count s)]) ;; Hack: this prevents unnecessary work in wrapped-by?
     (loop [acc []
     (loop [acc []
-          i 0]
-     (if-let [i (string/index-of s value i)]
-       (recur (conj acc i) (+ i (count value)))
-       acc))))
+           i 0]
+      (if-let [i (string/index-of s value i)]
+        (recur (conj acc i) (+ i (count value)))
+        acc))))
 
 
 (defn wrapped-by?
 (defn wrapped-by?
   "`pos` must be wrapped by `before` and `end` in string `value`, e.g. ((a|b))"
   "`pos` must be wrapped by `before` and `end` in string `value`, e.g. ((a|b))"
@@ -120,7 +120,7 @@
              ks))))
              ks))))
 
 
 (defn cut-by
 (defn cut-by
-  "Cut string by specifid wrapping symbols, only match the first occurrence.
+  "Cut string by specified wrapping symbols, only match the first occurrence.
      value - string to cut
      value - string to cut
      before - cutting symbol (before)
      before - cutting symbol (before)
      end - cutting symbol (end)"
      end - cutting symbol (end)"

+ 2 - 2
src/test/frontend/handler/repo_conversion_test.cljs

@@ -123,7 +123,7 @@
     (if rename-target
     (if rename-target
       #_:clj-kondo/ignore
       #_:clj-kondo/ignore
       (do #_(prn "conversion triple-lowbar: " original-body " -> " rename-target)
       (do #_(prn "conversion triple-lowbar: " original-body " -> " rename-target)
-        (#'page-handler/compute-new-file-path path rename-target))
+       (#'page-handler/compute-new-file-path path rename-target))
       path)))
       path)))
 
 
 (defn- convert-graph-files-path
 (defn- convert-graph-files-path
@@ -134,7 +134,7 @@
 
 
 ;; Integration test that test parsing a large graph like docs
 ;; Integration test that test parsing a large graph like docs
 ;; Check if file name conversion from old version of docs is working
 ;; Check if file name conversion from old version of docs is working
-(deftest ^:integration convert-v067-filesnames-parse-and-load-files-to-db
+(deftest ^:integration convert-v067-filenames-parse-and-load-files-to-db
   (let [graph-dir "src/test/docs"
   (let [graph-dir "src/test/docs"
         _ (docs-graph-helper/clone-docs-repo-if-not-exists graph-dir "v0.6.7")
         _ (docs-graph-helper/clone-docs-repo-if-not-exists graph-dir "v0.6.7")
         files (gp-cli/build-graph-files graph-dir)
         files (gp-cli/build-graph-files graph-dir)

+ 1 - 1
tldraw/apps/tldraw-logseq/src/components/PopoverButton/PopoverButton.tsx

@@ -60,7 +60,7 @@ export const PopoverButton = observer(
         </Popover.Trigger>
         </Popover.Trigger>
 
 
         <Popover.Content
         <Popover.Content
-          // it seems like the Popover.Content component doesn't update collission when camera changes
+          // it seems like the Popover.Content component doesn't update collision when camera changes
           key={'popover-content-' + tick}
           key={'popover-content-' + tick}
           ref={contentRef}
           ref={contentRef}
           className="tl-popover-content"
           className="tl-popover-content"

+ 1 - 1
tldraw/packages/core/src/lib/TLApp/TLApp.ts

@@ -889,7 +889,7 @@ export class TLApp<
       !this.isInAny('select.translating', 'select.pinching') &&
       !this.isInAny('select.translating', 'select.pinching') &&
       this.selectedShapes.size > 0 &&
       this.selectedShapes.size > 0 &&
       !this.selectedShapesArray.every(shape => shape.hideSelectionDetail) &&
       !this.selectedShapesArray.every(shape => shape.hideSelectionDetail) &&
-      false // FIXME: should we shoult the selection detail?
+      false // FIXME: should we show the selection detail?
     )
     )
   }
   }
 
 

+ 1 - 1
tldraw/packages/core/src/utils/BoundsUtils.ts

@@ -462,7 +462,7 @@ new box's aspect ratio matches the original aspect ratio.
 3. Rotation
 3. Rotation
 
 
 If the bounds are rotated, get a Vector from the rotated anchor
 If the bounds are rotated, get a Vector from the rotated anchor
-corner in the inital bounds to the rotated anchor corner in the
+corner in the initial bounds to the rotated anchor corner in the
 result's bounds. Subtract this Vector from the result's corners,
 result's bounds. Subtract this Vector from the result's corners,
 so that the two anchor points (initial and result) will be equal.
 so that the two anchor points (initial and result) will be equal.
 */
 */

+ 1 - 1
tldraw/packages/core/src/utils/DataUtils.ts

@@ -111,7 +111,7 @@ export function getFirstFromSet<T = unknown>(set: Set<T>): T {
 
 
 /**
 /**
  * Seeded random number generator, using [xorshift](https://en.wikipedia.org/wiki/Xorshift). The
  * Seeded random number generator, using [xorshift](https://en.wikipedia.org/wiki/Xorshift). The
- * result will always be betweeen -1 and 1.
+ * result will always be between -1 and 1.
  *
  *
  * Adapted from [seedrandom](https://github.com/davidbau/seedrandom).
  * Adapted from [seedrandom](https://github.com/davidbau/seedrandom).
  */
  */

+ 1 - 1
tldraw/packages/core/src/utils/PointUtils.ts

@@ -82,7 +82,7 @@ export class PointUtils {
    *
    *
    * @param A The point to check.
    * @param A The point to check.
    * @param points The points that make up the polyline.
    * @param points The points that make up the polyline.
-   * @param distance (optional) The mininum distance that qualifies a hit.
+   * @param distance (optional) The minimum distance that qualifies a hit.
    */
    */
   static pointInPolyline(A: number[], points: number[][], distance = 3): boolean {
   static pointInPolyline(A: number[], points: number[][], distance = 3): boolean {
     for (let i = 1; i < points.length; i++) {
     for (let i = 1; i < points.length; i++) {

+ 4 - 4
tldraw/packages/react/src/hooks/useBoundsEvents.ts

@@ -98,10 +98,10 @@ function loopToHtmlElement(elm: Element): HTMLElement {
 There are a few hacks here in facilitate double clicking and pointer
 There are a few hacks here in facilitate double clicking and pointer
 capture on elements.
 capture on elements.
 
 
-The events in this file are possibly set on individual SVG elements, 
-such as handles or corner handles, rather than on HTML elements or 
-SVGSVGElements. Raw SVG elemnets do not support pointerCapture in 
-most cases, meaning that in order for pointer capture to work, we 
+The events in this file are possibly set on individual SVG elements,
+such as handles or corner handles, rather than on HTML elements or
+SVGSVGElements. Raw SVG elements do not support pointerCapture in
+most cases, meaning that in order for pointer capture to work, we
 need to crawl up the DOM tree to find the nearest HTML element. Then,
 need to crawl up the DOM tree to find the nearest HTML element. Then,
 in order for that element to also call the `onPointerUp` event from
 in order for that element to also call the `onPointerUp` event from
 this file, we need to manually set that event on that element and
 this file, we need to manually set that event on that element and

+ 1 - 1
tldraw/packages/utils/curve/src/index.ts

@@ -125,7 +125,7 @@ export function cubicBezier(tx: number, x1: number, y1: number, x2: number, y2:
     // The curve's x equation for the current time value
     // The curve's x equation for the current time value
     x = A * t * t * t + B * t * t + C * t + D
     x = A * t * t * t + B * t * t + C * t + D
 
 
-    // The slope we want is the inverse of the derivate of x
+    // The slope we want is the inverse of the derivative of x
     slope = 1 / (3 * A * t * t + 2 * B * t + C)
     slope = 1 / (3 * A * t * t + 2 * B * t + C)
 
 
     // Get the next estimated time value, which will be more accurate than the one before
     // Get the next estimated time value, which will be more accurate than the one before

+ 1 - 1
tldraw/packages/utils/intersect/src/index.ts

@@ -1271,7 +1271,7 @@ export function intersectPolylineBounds(points: number[][], bounds: TLBounds): T
 /* -------------------------------------------------- */
 /* -------------------------------------------------- */
 
 
 /**
 /**
- * Find the intersections between a polygon nd a line segment.
+ * Find the intersections between a polygon and a line segment.
  *
  *
  * @param points
  * @param points
  * @param a1
  * @param a1

+ 14 - 0
typos.toml

@@ -0,0 +1,14 @@
+[default.extend-words]
+edn = "edn"
+datas = "datas"
+BA = "BA"
+juxt = "juxt"
+fo = "fo"
+collapsable = "collapsable" # TODO: should be collapsible
+Ded = "Ded"
+aks = "aks"
+Mannor = "Mannor"
+revison = "revison"         # TODO: should be revision
+referer = "referer"         # TODO: should be referrer
+[files]
+extend-exclude = ["resources/*", "templates/*", "dicts.cljc"]