A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
global: run prettier & eslint on all files
Abdullah Atta408cd5a9f330
diff --git a/.github/actions/setup-node-with-cache/action.yml b/.github/actions/setup-node-with-cache/action.ymlindex b1f4e8e91..1e9dd1558 100644--- a/.github/actions/setup-node-with-cache/action.yml+++ b/.github/actions/setup-node-with-cache/action.yml@@ -1,5 +1,5 @@-name: 'Setup node with cache action'-description: 'Setups node with cache'+name: "Setup node with cache action"+description: "Setups node with cache"runs:using: "composite"@@ -24,4 +24,4 @@ runs:packages/editor/package-lock.jsonpackages/logger/package-lock.jsonpackages/streamable-fs/package-lock.json- packages/theme/package-lock.json\ No newline at end of file+ packages/theme/package-lock.jsondiff --git a/.github/dco.yml b/.github/dco.ymldeleted file mode 100644index 2ad867ce3..000000000--- a/.github/dco.yml+++ /dev/null@@ -1,4 +0,0 @@-allowRemediationCommits:- individual: true-require:- members: false\ No newline at end of filediff --git a/.github/workflows/android.publish.internal.yml b/.github/workflows/android.publish.internal.ymlindex b4fafcc21..9bc85226a 100644--- a/.github/workflows/android.publish.internal.yml+++ b/.github/workflows/android.publish.internal.yml@@ -17,8 +17,8 @@ jobs:- name: Use specific Java version for the buildsuses: joschi/setup-jdk@v2with:- java-version: '11'- architecture: 'x64'+ java-version: "11"+ architecture: "x64"- name: Install node modulesrun: |@@ -37,7 +37,7 @@ jobs:signingKeyBase64: ${{ secrets.SIGNING_KEY }}alias: ${{ secrets.ALIAS }}keyStorePassword: ${{ secrets.KEY_PASSWORD }}- keyPassword: ${{ secrets.KEY_PASSWORD }}+ keyPassword: ${{ secrets.KEY_PASSWORD }}- name: Publish to Playstoreid: deploy@@ -48,4 +48,4 @@ jobs:releaseFile: ${{steps.sign_app.outputs.signedReleaseFile}}track: internalstatus: completed- whatsNewDirectory: apps/mobile/native/android/releasenotes/\ No newline at end of file+ whatsNewDirectory: apps/mobile/native/android/releasenotes/diff --git a/.github/workflows/android.publish.yml b/.github/workflows/android.publish.ymlindex 79ffa5024..21759ac31 100644--- a/.github/workflows/android.publish.yml+++ b/.github/workflows/android.publish.yml@@ -17,8 +17,8 @@ jobs:- name: Use specific Java version for the buildsuses: joschi/setup-jdk@v2with:- java-version: '11'- architecture: 'x64'+ java-version: "11"+ architecture: "x64"- name: Install node modulesrun: |@@ -37,7 +37,7 @@ jobs:signingKeyBase64: ${{ secrets.SIGNING_KEY }}alias: ${{ secrets.ALIAS }}keyStorePassword: ${{ secrets.KEY_PASSWORD }}- keyPassword: ${{ secrets.KEY_PASSWORD }}+ keyPassword: ${{ secrets.KEY_PASSWORD }}- name: Publish to Playstoreid: deploy@@ -48,7 +48,7 @@ jobs:releaseFiles: ${{steps.sign_app.outputs.signedReleaseFile}}track: productionstatus: completed- whatsNewDirectory: apps/mobile/native/android/releasenotes/+ whatsNewDirectory: apps/mobile/native/android/releasenotes/- name: Build apks for Github releaserun: yarn release:android@@ -61,7 +61,7 @@ jobs:signingKeyBase64: ${{ secrets.PUBLIC_SIGNING_KEY }}alias: ${{ secrets.PUBLIC_ALIAS }}keyStorePassword: ${{ secrets.PUBLIC_KEY_PASSWORD }}- keyPassword: ${{ secrets.PUBLIC_KEY_PASSWORD }}+ keyPassword: ${{ secrets.PUBLIC_KEY_PASSWORD }}- name: Rename apk filesrun: |@@ -89,4 +89,4 @@ jobs:apps/mobile/native/android/app/build/outputs/apk/release/notesnook-arm64-v8a.apkapps/mobile/native/android/app/build/outputs/apk/release/notesnook-armeabi-v7a.apkapps/mobile/native/android/app/build/outputs/apk/release/notesnook-x86.apk- apps/mobile/native/android/app/build/outputs/apk/release/notesnook-x86_64.apk\ No newline at end of file+ apps/mobile/native/android/app/build/outputs/apk/release/notesnook-x86_64.apkdiff --git a/.github/workflows/core.tests.yml b/.github/workflows/core.tests.ymlindex b978dc478..9e04dc575 100644--- a/.github/workflows/core.tests.yml+++ b/.github/workflows/core.tests.yml@@ -8,7 +8,7 @@ on:paths:- "packages/core/**"# re-run workflow if workflow file changes- - ".github/workflows/core.tests.yml"+ - ".github/workflows/core.tests.yml"pull_request:types:- "ready_for_review"diff --git a/.github/workflows/desktop.publish.yml b/.github/workflows/desktop.publish.ymlindex 52eef7421..5bb6bae35 100644--- a/.github/workflows/desktop.publish.yml+++ b/.github/workflows/desktop.publish.yml@@ -93,7 +93,7 @@ jobs:echo ::set-output name=app_bundle_id::$(cat package.json | jq -r .build.appId)echo ::set-output name=app_version::$(cat package.json | jq -r .version)echo ::set-output name=bundle_version::$(cat package.json | jq -r .build.mac.bundleVersion)-+- name: Get App Store Versionid: appstoreuses: streetwriters/appstore-connect-app-version@develop@@ -114,7 +114,7 @@ jobs:run: |npm i --ignore-scripts --prefer-offline --no-auditnpx lerna bootstrap --scope=@notesnook/desktop --scope=@notesnook/crypto --scope=@notesnook/sodium -- --prefer-offline --no-audit-+- name: Install provisioning profilerun: echo "${{ secrets.MAC_PROVISIONING_PROFILE }}" | base64 --decode > embedded.provisionprofileworking-directory: ./apps/desktop@@ -151,7 +151,7 @@ jobs:env:API_KEY_ID: ${{ secrets.api_key_id }}API_KEY_ISSUER_ID: ${{ secrets.api_key_issuer_id }}- run: |+ run: |package=$(find ./output/mas-universal/notesnook*.pkg)echo "Uploading ${package} using altool..."@@ -252,4 +252,4 @@ jobs:} else {yarn electron-builder --win --publish never}- working-directory: ./apps/desktop\ No newline at end of file+ working-directory: ./apps/desktopdiff --git a/.github/workflows/nscurl.test.yml b/.github/workflows/nscurl.test.ymlindex 66532c3d1..d566d0371 100644--- a/.github/workflows/nscurl.test.yml+++ b/.github/workflows/nscurl.test.yml@@ -11,4 +11,4 @@ jobs:steps:- name: Run ats-diagnostics- run: nscurl --ats-diagnostics https://payments.streetwriters.co\ No newline at end of file+ run: nscurl --ats-diagnostics https://payments.streetwriters.codiff --git a/apps/mobile/.vscode/launch.json b/apps/mobile/.vscode/launch.jsonindex 70e3c4d0f..1a48c7f0c 100644--- a/apps/mobile/.vscode/launch.json+++ b/apps/mobile/.vscode/launch.json@@ -25,4 +25,4 @@"request": "attach"}]-}\ No newline at end of file+}diff --git a/apps/mobile/app/common/filesystem/attach-file.ts b/apps/mobile/app/common/filesystem/attach-file.tsdeleted file mode 100644index e69de29bb..000000000diff --git a/apps/mobile/package.json b/apps/mobile/package.jsonindex 06b1fd10f..56218a0f6 100644--- a/apps/mobile/package.json+++ b/apps/mobile/package.json@@ -36,4 +36,4 @@"@notesnook/logger": "*","@notesnook/common": "*"}-}\ No newline at end of file+}diff --git a/apps/mobile/tsconfig.json b/apps/mobile/tsconfig.jsonindex 7475dfd95..db95e7324 100644--- a/apps/mobile/tsconfig.json+++ b/apps/mobile/tsconfig.json@@ -10,7 +10,9 @@"types": ["node", "jest", "detox"],"paths": {"@notesnook/*": ["../../packages"],- "@notifee/react-native": ["./node_modules/@ammarahmed/notifee-react-native"]+ "@notifee/react-native": [+ "./node_modules/@ammarahmed/notifee-react-native"+ ]},"incremental": true},diff --git a/apps/web/src/components/icons/index.tsx b/apps/web/src/components/icons/index.tsxindex ff5e09d97..c69b66239 100644--- a/apps/web/src/components/icons/index.tsx+++ b/apps/web/src/components/icons/index.tsx@@ -208,7 +208,6 @@ import {mdiInformationOutline,mdiHeadCogOutline,mdiFormTextarea,- mdiDatabaseExportOutline,mdiGavel,mdiDesktopClassic,mdiBellBadgeOutlinediff --git a/apps/web/src/hooks/use-database.ts b/apps/web/src/hooks/use-database.tsindex 7f99f986b..db2ecf3da 100644--- a/apps/web/src/hooks/use-database.ts+++ b/apps/web/src/hooks/use-database.ts@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import { useEffect, useState } from "react";-import { initializeDatabase, db } from "../common/db";+import { initializeDatabase } from "../common/db";import "allotment/dist/style.css";import "../utils/analytics";import "../app.css";diff --git a/docs/help/contents/importing-notes/import-notes-from-evernote.md b/docs/help/contents/importing-notes/import-notes-from-evernote.mdindex 6d3dc9f0a..ebac8b695 100644--- a/docs/help/contents/importing-notes/import-notes-from-evernote.md+++ b/docs/help/contents/importing-notes/import-notes-from-evernote.md@@ -26,6 +26,6 @@ The following steps will help you import your notes from EverNote easily.<img style="margin-bottom:15px;" src="/static/evernote-importer/6.png" alt="Download importer .zip file"/>7. After you have downloaded the `.zip` file, go to Notesnook app > Settings > Notesnook Importer and click on "Import from ZIP file" & select the .zip you downloaded earlier.-<img style="margin-bottom:15px;" src="/static/import-zip-app.png" alt="Import .zip in Notesnook app"/>+ <img style="margin-bottom:15px;" src="/static/import-zip-app.png" alt="Import .zip in Notesnook app"/>8. Once importing completes you should see all your notes in Notesnook. If you face any issues during importing, [report it on github](https://github.com/streetwriters/notesnook).diff --git a/docs/help/contents/importing-notes/import-notes-from-html-files.md b/docs/help/contents/importing-notes/import-notes-from-html-files.mdindex 96c635820..0b77e5427 100644--- a/docs/help/contents/importing-notes/import-notes-from-html-files.md+++ b/docs/help/contents/importing-notes/import-notes-from-html-files.md@@ -12,10 +12,10 @@ To import html files to notesnook go to Notesnook Importer on your PC/Laptop.2. Drop your html files or click anywhere inside the box to browse and select your html files. Once selected, click on "Start processing".<img style="margin-bottom:15px;" src="/static/html/2.png" alt="From the list of formats to import, select Plain Text."/>-5. Once importer completes processing, download the .zip file.+3. Once importer completes processing, download the .zip file.<img style="margin-bottom:15px;" src="/static/html/3.png" alt="Download importer .zip file"/>-6. After you have downloaded the `.zip` file, go to Notesnook app > Settings > Notesnook Importer and click on "Import from ZIP file" & select the .zip you downloaded earlier.-<img style="margin-bottom:15px;" src="/static/import-zip-app.png" alt="Import .zip in Notesnook app"/>+4. After you have downloaded the `.zip` file, go to Notesnook app > Settings > Notesnook Importer and click on "Import from ZIP file" & select the .zip you downloaded earlier.+ <img style="margin-bottom:15px;" src="/static/import-zip-app.png" alt="Import .zip in Notesnook app"/>-7. Once importing completes you should see all your notes in Notesnook. If you face any issues during importing, [report it on github](https://github.com/streetwriters/notesnook).\ No newline at end of file+5. Once importing completes you should see all your notes in Notesnook. If you face any issues during importing, [report it on github](https://github.com/streetwriters/notesnook).diff --git a/docs/help/contents/importing-notes/import-notes-from-joplin.md b/docs/help/contents/importing-notes/import-notes-from-joplin.mdindex 2a57fd813..11aa5fade 100644--- a/docs/help/contents/importing-notes/import-notes-from-joplin.md+++ b/docs/help/contents/importing-notes/import-notes-from-joplin.md@@ -5,7 +5,7 @@ title: Joplin# How do I import notes from Joplin notes app?The following steps will help you import your notes from Joplin easily.-+1. Open Joplin app on Desktop and click on `File` and select `Export All -> JEX - Joplin Export File` and save it in desired location.<img style="margin-bottom:15px;" src="/static/joplin-importer/1.png" alt="Click on `File` and select `Export All -> JEX - Joplin Export File`"/>@@ -15,10 +15,10 @@ The following steps will help you import your notes from Joplin easily.3. Drop the .jex backup file you exported earlier from Joplin in the box or click anywhere to open system file picker to select the backup.<img style="margin-bottom:15px;" src="/static/joplin-importer/3.png" alt="Drop the .zip backup file you exported earlier from Standard Notes in the box or click anywhere to open system file picker to select the backup."/>-5. Once importer completes processing, download the .zip file.+4. Once importer completes processing, download the .zip file.<img style="margin-bottom:15px;" src="/static/joplin-importer/4.png" alt="Download importer .zip file"/>-6. After you have downloaded the `.zip` file, go to Notesnook app > Settings > Notesnook Importer and click on "Import from ZIP file" & select the .zip you downloaded earlier.-<img style="margin-bottom:15px;" src="/static/import-zip-app.png" alt="Import .zip in Notesnook app"/>+5. After you have downloaded the `.zip` file, go to Notesnook app > Settings > Notesnook Importer and click on "Import from ZIP file" & select the .zip you downloaded earlier.+ <img style="margin-bottom:15px;" src="/static/import-zip-app.png" alt="Import .zip in Notesnook app"/>-7. Once importing completes you should see all your notes in Notesnook. If you face any issues during importing, [report it on github](https://github.com/streetwriters/notesnook).\ No newline at end of file+6. Once importing completes you should see all your notes in Notesnook. If you face any issues during importing, [report it on github](https://github.com/streetwriters/notesnook).diff --git a/docs/help/contents/importing-notes/import-notes-from-mardown-files.md b/docs/help/contents/importing-notes/import-notes-from-mardown-files.mdindex bb403f06b..820128382 100644--- a/docs/help/contents/importing-notes/import-notes-from-mardown-files.md+++ b/docs/help/contents/importing-notes/import-notes-from-mardown-files.md@@ -12,10 +12,10 @@ To import markdown files to notesnook go to Notesnook Importer on your PC/Laptop2. Drop your markdown files or click anywhere inside the box to browse and select your markdown files and then click "Start processing".<img style="margin-bottom:15px;" src="/static/markdown-importer/2.png" alt="Drop your markdown files or click anywhere inside the box to browse and select your markdown files."/>-5. Once importer completes processing, download the .zip file.+3. Once importer completes processing, download the .zip file.<img style="margin-bottom:15px;" src="/static/markdown-importer/6.png" alt="Download importer .zip file"/>-6. After you have downloaded the `.zip` file, go to Notesnook app > Settings > Notesnook Importer and click on "Import from ZIP file" & select the .zip you downloaded earlier.-<img style="margin-bottom:15px;" src="/static/import-zip-app.png" alt="Import .zip in Notesnook app"/>+4. After you have downloaded the `.zip` file, go to Notesnook app > Settings > Notesnook Importer and click on "Import from ZIP file" & select the .zip you downloaded earlier.+ <img style="margin-bottom:15px;" src="/static/import-zip-app.png" alt="Import .zip in Notesnook app"/>-7. Once importing completes you should see all your notes in Notesnook. If you face any issues during importing, [report it on github](https://github.com/streetwriters/notesnook).\ No newline at end of file+5. Once importing completes you should see all your notes in Notesnook. If you face any issues during importing, [report it on github](https://github.com/streetwriters/notesnook).diff --git a/docs/help/contents/importing-notes/import-notes-from-simplenote.md b/docs/help/contents/importing-notes/import-notes-from-simplenote.mdindex bf3cb28bc..0b772bfef 100644--- a/docs/help/contents/importing-notes/import-notes-from-simplenote.md+++ b/docs/help/contents/importing-notes/import-notes-from-simplenote.md@@ -21,10 +21,10 @@ The following steps will help you import your notes from Simplenote easily.6. Drop the .zip backup file you exported earlier from Simplenote in the box or click anywhere to open system file picker to select the backup and click "Start processing".<img style="margin-bottom:15px;" src="/static/simplenote-importer/4.png" alt="Drop the .zip backup file you exported earlier from Standard Notes in the box or click anywhere to open system file picker to select the backup."/>-5. Once importer completes processing, download the .zip file.+7. Once importer completes processing, download the .zip file.<img style="margin-bottom:15px;" src="/static/simplenote-importer/5.png" alt="Download importer .zip file"/>-6. After you have downloaded the `.zip` file, go to Notesnook app > Settings > Notesnook Importer and click on "Import from ZIP file" & select the .zip you downloaded earlier.-<img style="margin-bottom:15px;" src="/static/import-zip-app.png" alt="Import .zip in Notesnook app"/>+8. After you have downloaded the `.zip` file, go to Notesnook app > Settings > Notesnook Importer and click on "Import from ZIP file" & select the .zip you downloaded earlier.+ <img style="margin-bottom:15px;" src="/static/import-zip-app.png" alt="Import .zip in Notesnook app"/>-7. Once importing completes you should see all your notes in Notesnook. If you face any issues during importing, [report it on github](https://github.com/streetwriters/notesnook).\ No newline at end of file+9. Once importing completes you should see all your notes in Notesnook. If you face any issues during importing, [report it on github](https://github.com/streetwriters/notesnook).diff --git a/docs/help/contents/importing-notes/import-notes-from-standardnotes.md b/docs/help/contents/importing-notes/import-notes-from-standardnotes.mdindex b8071b3a1..ac7623e16 100644--- a/docs/help/contents/importing-notes/import-notes-from-standardnotes.md+++ b/docs/help/contents/importing-notes/import-notes-from-standardnotes.md@@ -21,10 +21,10 @@ The following steps will help you import your notes from Standard notes easily.6. Drop the .zip backup file you exported earlier from Standard Notes in the box or click anywhere to open system file picker to select the backup.<img style="margin-bottom:15px;" src="/static/standard-notes-importer/4.png" alt="Drop the .zip backup file you exported earlier from Standard Notes in the box or click anywhere to open system file picker to select the backup."/>-5. Once importer completes processing, download the .zip file.+7. Once importer completes processing, download the .zip file.<img style="margin-bottom:15px;" src="/static/standard-notes-importer/5.png" alt="Download importer .zip file"/>-6. After you have downloaded the `.zip` file, go to Notesnook app > Settings > Notesnook Importer and click on "Import from ZIP file" & select the .zip you downloaded earlier.-<img style="margin-bottom:15px;" src="/static/import-zip-app.png" alt="Import .zip in Notesnook app"/>+8. After you have downloaded the `.zip` file, go to Notesnook app > Settings > Notesnook Importer and click on "Import from ZIP file" & select the .zip you downloaded earlier.+ <img style="margin-bottom:15px;" src="/static/import-zip-app.png" alt="Import .zip in Notesnook app"/>-7. Once importing completes you should see all your notes in Notesnook. If you face any issues during importing, [report it on github](https://github.com/streetwriters/notesnook).\ No newline at end of file+9. Once importing completes you should see all your notes in Notesnook. If you face any issues during importing, [report it on github](https://github.com/streetwriters/notesnook).diff --git a/docs/help/contents/mobile-integration/README.md b/docs/help/contents/mobile-integration/README.mdindex 27b6bbc51..f51629e41 100644--- a/docs/help/contents/mobile-integration/README.md+++ b/docs/help/contents/mobile-integration/README.md@@ -1 +1 @@-# Mobile integration\ No newline at end of file+# Mobile integrationdiff --git a/extensions/web-clipper/public/index.html b/extensions/web-clipper/public/index.htmlindex 2510a3550..c963f2d2e 100644--- a/extensions/web-clipper/public/index.html+++ b/extensions/web-clipper/public/index.html@@ -1,16 +1,14 @@<!DOCTYPE html><html lang="en">--<head>- <meta charset="UTF-8" />- <meta http-equiv="X-UA-Compatible" content="IE=edge">- <meta name="viewport" content="width=device-width, initial-scale=1" />-- <title></title>-</head>--<body>- <div id="root"></div>-</body>--</html>\ No newline at end of file+ <head>+ <meta charset="UTF-8" />+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />++ <title></title>+ </head>++ <body>+ <div id="root"></div>+ </body>+</html>diff --git a/packages/clipper/src/images.ts b/packages/clipper/src/images.tsindex 897aa01e5..10a8f590a 100644--- a/packages/clipper/src/images.ts+++ b/packages/clipper/src/images.ts@@ -54,7 +54,7 @@ async function inlineImage(element: HTMLImageElement, options?: FetchOptions) {return element;}- return new Promise<HTMLImageElement | null>(function(resolve, reject) {+ return new Promise<HTMLImageElement | null>(function (resolve, reject) {if (element.parentElement?.tagName === "PICTURE") {element.parentElement?.replaceWith(element);}diff --git a/packages/editor/src/components/resizer/index.tsx b/packages/editor/src/components/resizer/index.tsxindex b30ce7d2f..711dfab0d 100644--- a/packages/editor/src/components/resizer/index.tsx+++ b/packages/editor/src/components/resizer/index.tsx@@ -45,7 +45,8 @@ export function Resizer(props: PropsWithChildren<ResizerProps>) {style} = props;- if (!editor.isEditable) return <Flex sx={{position:"relative"}}>{children}</Flex>;+ if (!editor.isEditable)+ return <Flex sx={{ position: "relative" }}>{children}</Flex>;return (<Resizablediff --git a/packages/editor/src/extensions/attachment/component.tsx b/packages/editor/src/extensions/attachment/component.tsxindex 9243f3759..779b87491 100644--- a/packages/editor/src/extensions/attachment/component.tsx+++ b/packages/editor/src/extensions/attachment/component.tsx@@ -32,7 +32,7 @@ export function AttachmentComponent(const { editor, node, selected } = props;const { filename, size, progress } = node.attrs;const elementRef = useRef<HTMLSpanElement>();-+return (<><Box@@ -87,15 +87,15 @@ export function AttachmentComponent({selected && (<ToolbarGroupeditor={editor}- tools={ editor.isEditable ? [- "removeAttachment",- "downloadAttachment",- "previewAttachment"- ] : [- "downloadAttachment",- "previewAttachment"- ]- }+ tools={+ editor.isEditable+ ? [+ "removeAttachment",+ "downloadAttachment",+ "previewAttachment"+ ]+ : ["downloadAttachment", "previewAttachment"]+ }sx={{boxShadow: "menu",borderRadius: "default",diff --git a/packages/editor/src/extensions/key-map/key-map.ts b/packages/editor/src/extensions/key-map/key-map.tsindex 2968f2884..e6eb6e144 100644--- a/packages/editor/src/extensions/key-map/key-map.ts+++ b/packages/editor/src/extensions/key-map/key-map.ts@@ -44,9 +44,9 @@ export const KeyMap = Extension.create({},Backspace: ({ editor }) => {return joinUpWithLastListItem(editor);- },+ }};- },+ }});/**diff --git a/packages/editor/src/utils/word-counter.ts b/packages/editor/src/utils/word-counter.tsindex eda5e5720..5da2e5692 100644--- a/packages/editor/src/utils/word-counter.ts+++ b/packages/editor/src/utils/word-counter.ts@@ -20,14 +20,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { Editor } from "@tiptap/core";export function getTotalWords(editor: Editor): number {- const documentText = editor.state.doc.textBetween(- 0,- editor.state.doc.content.size,- "\n",- " "- );- return countWords(documentText);- }+ const documentText = editor.state.doc.textBetween(+ 0,+ editor.state.doc.content.size,+ "\n",+ " "+ );+ return countWords(documentText);+}export function countWords(str: string) {let count = 0;