tetrons 2.3.23 → 2.3.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -136,8 +136,8 @@
136
136
 
137
137
  .tetrons-toolbar label {
138
138
  font-size: 0.875rem;
139
- user-select: none;
140
139
  -webkit-user-select: none;
140
+ user-select: none;
141
141
  }
142
142
 
143
143
  .misc-group {
@@ -136,8 +136,8 @@
136
136
 
137
137
  .tetrons-toolbar label {
138
138
  font-size: 0.875rem;
139
- user-select: none;
140
139
  -webkit-user-select: none;
140
+ user-select: none;
141
141
  }
142
142
 
143
143
  .misc-group {
@@ -0,0 +1,25 @@
1
+ export interface GrammarMatch {
2
+ message: string;
3
+ shortMessage: string;
4
+ offset: number;
5
+ length: number;
6
+ replacements: {
7
+ value: string;
8
+ }[];
9
+ context: {
10
+ text: string;
11
+ offset: number;
12
+ length: number;
13
+ };
14
+ sentence: string;
15
+ rule: {
16
+ id: string;
17
+ description: string;
18
+ issueType: string;
19
+ category: {
20
+ id: string;
21
+ name: string;
22
+ };
23
+ };
24
+ }
25
+ export declare function checkGrammar(text: string): Promise<GrammarMatch[]>;
@@ -0,0 +1,17 @@
1
+ export async function checkGrammar(text) {
2
+ const response = await fetch("https://api.languagetool.org/v2/check", {
3
+ method: "POST",
4
+ headers: {
5
+ "Content-Type": "application/x-www-form-urlencoded",
6
+ },
7
+ body: new URLSearchParams({
8
+ text,
9
+ language: "en-US",
10
+ }),
11
+ });
12
+ if (!response.ok) {
13
+ throw new Error("Grammar check failed");
14
+ }
15
+ const result = await response.json();
16
+ return result.matches;
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tetrons",
3
- "version": "2.3.23",
3
+ "version": "2.3.24",
4
4
  "description": "A Next.js project written in TypeScript",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,7 +30,8 @@
30
30
  "html2pdf.js": "^0.10.3",
31
31
  "lowlight": "^3.3.0",
32
32
  "mongoose": "^8.16.0",
33
- "react-icons": "^5.5.0"
33
+ "react-icons": "^5.5.0",
34
+ "typo-js": "^1.2.5"
34
35
  },
35
36
  "peerDependencies": {
36
37
  "next": "^15.3.2",
@@ -39,7 +40,6 @@
39
40
  },
40
41
  "devDependencies": {
41
42
  "@eslint/eslintrc": "^3",
42
- "@tailwindcss/postcss": "^4.1.11",
43
43
  "@types/node": "^20",
44
44
  "@types/react": "^19",
45
45
  "@types/react-dom": "^19",
@@ -63,13 +63,13 @@
63
63
  "author": "Your Name",
64
64
  "license": "MIT",
65
65
  "exports": {
66
- ".": {
67
- "import": "./dist/index.js",
68
- "require": "./dist/index.js",
69
- "types": "./dist/index.d.ts"
66
+ ".": {
67
+ "import": "./dist/index.js",
68
+ "require": "./dist/index.js",
69
+ "types": "./dist/index.d.ts"
70
+ },
71
+ "./style.css": "./dist/styles/tetrons.css"
70
72
  },
71
- "./style.css": "./dist/styles/tetrons.css"
72
- },
73
73
  "files": [
74
74
  "dist",
75
75
  "dist/styles/tetrons.css",