tetrons 0.1.0

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.
Files changed (63) hide show
  1. package/.hintrc +13 -0
  2. package/README.md +36 -0
  3. package/eslint.config.mjs +16 -0
  4. package/next.config.ts +7 -0
  5. package/package.json +61 -0
  6. package/postcss.config.mjs +5 -0
  7. package/public/editor-content.json +27 -0
  8. package/public/favicon-16x16.png +0 -0
  9. package/public/favicon-32x32.png +0 -0
  10. package/public/favicon-64x64.png +0 -0
  11. package/public/favicon-768x768.png +0 -0
  12. package/public/file.svg +1 -0
  13. package/public/globe.svg +1 -0
  14. package/public/next.svg +1 -0
  15. package/public/site.webmanifest +20 -0
  16. package/public/vercel.svg +1 -0
  17. package/public/window.svg +1 -0
  18. package/src/app/api/export/route.ts +0 -0
  19. package/src/app/api/save/route.ts +18 -0
  20. package/src/app/favicon-16x16.png +0 -0
  21. package/src/app/favicon-32x32.png +0 -0
  22. package/src/app/favicon-64x64.png +0 -0
  23. package/src/app/favicon-768x768.png +0 -0
  24. package/src/app/favicon.ico +0 -0
  25. package/src/app/globals.css +207 -0
  26. package/src/app/layout.tsx +47 -0
  27. package/src/app/page.tsx +11 -0
  28. package/src/components/UI/Button.tsx +0 -0
  29. package/src/components/UI/Dropdown.tsx +0 -0
  30. package/src/components/tetrons/EditorContent.tsx +210 -0
  31. package/src/components/tetrons/ResizableImage.ts +39 -0
  32. package/src/components/tetrons/ResizableImageComponent.tsx +77 -0
  33. package/src/components/tetrons/ResizableVideo.ts +66 -0
  34. package/src/components/tetrons/ResizableVideoComponent.tsx +56 -0
  35. package/src/components/tetrons/helpers.ts +0 -0
  36. package/src/components/tetrons/toolbar/ActionGroup.tsx +222 -0
  37. package/src/components/tetrons/toolbar/ClipboardGroup.tsx +57 -0
  38. package/src/components/tetrons/toolbar/FileGroup.tsx +70 -0
  39. package/src/components/tetrons/toolbar/FontStyleGroup.tsx +198 -0
  40. package/src/components/tetrons/toolbar/InsertGroup.tsx +268 -0
  41. package/src/components/tetrons/toolbar/ListAlignGroup.tsx +69 -0
  42. package/src/components/tetrons/toolbar/MiscGroup.tsx +70 -0
  43. package/src/components/tetrons/toolbar/TableContextMenu.tsx +91 -0
  44. package/src/components/tetrons/toolbar/TetronsToolbar.tsx +60 -0
  45. package/src/components/tetrons/toolbar/ToolbarButton.tsx +38 -0
  46. package/src/components/tetrons/toolbar/extensions/Comment.ts +72 -0
  47. package/src/components/tetrons/toolbar/extensions/Embed.ts +113 -0
  48. package/src/components/tetrons/toolbar/extensions/FontFamily.ts +43 -0
  49. package/src/components/tetrons/toolbar/extensions/FontSize.ts +43 -0
  50. package/src/components/tetrons/toolbar/extensions/ResizableTable.ts +16 -0
  51. package/src/components/tetrons/toolbar/marks/Subscript.ts +45 -0
  52. package/src/components/tetrons/toolbar/marks/Superscript.ts +45 -0
  53. package/src/index.ts +3 -0
  54. package/src/lib/export.ts +0 -0
  55. package/src/lib/tiptap-extensions.ts +0 -0
  56. package/src/types/dom-to-pdf.d.ts +13 -0
  57. package/src/types/editor.d.ts +0 -0
  58. package/src/types/emoji-picker.d.ts +18 -0
  59. package/src/types/global.d.ts +6 -0
  60. package/src/types/html2pdf.d.ts +1 -0
  61. package/src/types/tiptap-extensions.d.ts +23 -0
  62. package/src/utils/loadEmojiPicker.ts +12 -0
  63. package/tsconfig.json +41 -0
package/.hintrc ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": [
3
+ "development"
4
+ ],
5
+ "hints": {
6
+ "axe/aria": [
7
+ "default",
8
+ {
9
+ "aria-valid-attr-value": "off"
10
+ }
11
+ ]
12
+ }
13
+ }
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2
+
3
+ ## Getting Started
4
+
5
+ First, run the development server:
6
+
7
+ ```bash
8
+ npm run dev
9
+ # or
10
+ yarn dev
11
+ # or
12
+ pnpm dev
13
+ # or
14
+ bun dev
15
+ ```
16
+
17
+ Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18
+
19
+ You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20
+
21
+ This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22
+
23
+ ## Learn More
24
+
25
+ To learn more about Next.js, take a look at the following resources:
26
+
27
+ - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28
+ - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29
+
30
+ You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31
+
32
+ ## Deploy on Vercel
33
+
34
+ The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35
+
36
+ Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
@@ -0,0 +1,16 @@
1
+ import { dirname } from "path";
2
+ import { fileURLToPath } from "url";
3
+ import { FlatCompat } from "@eslint/eslintrc";
4
+
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = dirname(__filename);
7
+
8
+ const compat = new FlatCompat({
9
+ baseDirectory: __dirname,
10
+ });
11
+
12
+ const eslintConfig = [
13
+ ...compat.extends("next/core-web-vitals", "next/typescript"),
14
+ ];
15
+
16
+ export default eslintConfig;
package/next.config.ts ADDED
@@ -0,0 +1,7 @@
1
+ import type { NextConfig } from "next";
2
+
3
+ const nextConfig: NextConfig = {
4
+ /* config options here */
5
+ };
6
+
7
+ export default nextConfig;
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "tetrons",
3
+ "version": "0.1.0",
4
+ "description": "A Next.js project written in TypeScript",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "dev": "next dev --turbo",
9
+ "build": "next build",
10
+ "start": "next start",
11
+ "lint": "next lint"
12
+ },
13
+ "dependencies": {
14
+ "@emoji-mart/react": "^1.1.1",
15
+ "@tiptap/react": "^2.12.0",
16
+ "@tiptap/starter-kit": "^2.12.0",
17
+ "docx": "^9.5.0",
18
+ "dom-to-pdf": "^0.3.2",
19
+ "html2pdf.js": "^0.10.3",
20
+ "lowlight": "^3.3.0",
21
+ "react-icons": "^5.5.0"
22
+ },
23
+ "peerDependencies": {
24
+ "next": "^15.3.2",
25
+ "react": "^18.3.1",
26
+ "react-dom": "^18.3.1"
27
+ },
28
+ "devDependencies": {
29
+ "@eslint/eslintrc": "^3",
30
+ "@tailwindcss/postcss": "^4",
31
+ "@types/node": "^20",
32
+ "@types/react": "^19",
33
+ "@types/react-dom": "^19",
34
+ "eslint": "^9",
35
+ "eslint-config-next": "^15.3.2",
36
+ "tailwindcss": "^4",
37
+ "typescript": "^5"
38
+ },
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/your-repo/tetrons.git"
42
+ },
43
+ "keywords": [
44
+ "nextjs",
45
+ "typescript",
46
+ "react",
47
+ "web"
48
+ ],
49
+ "author": "Your Name",
50
+ "license": "MIT",
51
+ "exports": {
52
+ ".": {
53
+ "import": "./dist/index.js",
54
+ "require": "./dist/index.cjs"
55
+ }
56
+ },
57
+ "bugs": {
58
+ "url": "https://github.com/your-repo/tetrons/issues"
59
+ },
60
+ "homepage": "https://github.com/your-repo/tetrons#readme"
61
+ }
@@ -0,0 +1,5 @@
1
+ const config = {
2
+ plugins: ["@tailwindcss/postcss"],
3
+ };
4
+
5
+ export default config;
@@ -0,0 +1,27 @@
1
+ {
2
+ "type": "doc",
3
+ "content": [
4
+ {
5
+ "type": "paragraph",
6
+ "attrs": {
7
+ "textAlign": null
8
+ },
9
+ "content": [
10
+ {
11
+ "type": "text",
12
+ "text": "Finapsys Consultancy Services is a leading IT consulting firm specializing in delivering innovative technology solutions to global enterprises. Founded in 2020, we have rapidly grown to serve top-tier clients across life sciences, power, technology, infra, and automotive industries. Our mission is to drive digital transformation and empower businesses to achieve their goals through cutting-edge technology."
13
+ },
14
+ {
15
+ "type": "hardBreak"
16
+ },
17
+ {
18
+ "type": "hardBreak"
19
+ },
20
+ {
21
+ "type": "text",
22
+ "text": "Our team comprises seasoned professionals and innovative thinkers committed to turning challenges into opportunities. With expertise in Cloud Solutions, Cybersecurity, Data Analytics & AI, Enterprise SaaS, Web Development, and Human Resource Services, we partner closely with clients to provide actionable insights and implement processes that yield measurable, bottom-line results."
23
+ }
24
+ ]
25
+ }
26
+ ]
27
+ }
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1 @@
1
+ <svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 13.5V5.41a1 1 0 0 0-.3-.7L9.8.29A1 1 0 0 0 9.08 0H1.5v13.5A2.5 2.5 0 0 0 4 16h8a2.5 2.5 0 0 0 2.5-2.5m-1.5 0v-7H8v-5H3v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1M9.5 5V2.12L12.38 5zM5.13 5h-.62v1.25h2.12V5zm-.62 3h7.12v1.25H4.5zm.62 3h-.62v1.25h7.12V11z" clip-rule="evenodd" fill="#666" fill-rule="evenodd"/></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.27 14.1a6.5 6.5 0 0 0 3.67-3.45q-1.24.21-2.7.34-.31 1.83-.97 3.1M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.48-1.52a7 7 0 0 1-.96 0H7.5a4 4 0 0 1-.84-1.32q-.38-.89-.63-2.08a40 40 0 0 0 3.92 0q-.25 1.2-.63 2.08a4 4 0 0 1-.84 1.31zm2.94-4.76q1.66-.15 2.95-.43a7 7 0 0 0 0-2.58q-1.3-.27-2.95-.43a18 18 0 0 1 0 3.44m-1.27-3.54a17 17 0 0 1 0 3.64 39 39 0 0 1-4.3 0 17 17 0 0 1 0-3.64 39 39 0 0 1 4.3 0m1.1-1.17q1.45.13 2.69.34a6.5 6.5 0 0 0-3.67-3.44q.65 1.26.98 3.1M8.48 1.5l.01.02q.41.37.84 1.31.38.89.63 2.08a40 40 0 0 0-3.92 0q.25-1.2.63-2.08a4 4 0 0 1 .85-1.32 7 7 0 0 1 .96 0m-2.75.4a6.5 6.5 0 0 0-3.67 3.44 29 29 0 0 1 2.7-.34q.31-1.83.97-3.1M4.58 6.28q-1.66.16-2.95.43a7 7 0 0 0 0 2.58q1.3.27 2.95.43a18 18 0 0 1 0-3.44m.17 4.71q-1.45-.12-2.69-.34a6.5 6.5 0 0 0 3.67 3.44q-.65-1.27-.98-3.1" fill="#666"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "My App",
3
+ "short_name": "App",
4
+ "start_url": "/",
5
+ "display": "standalone",
6
+ "background_color": "#ffffff",
7
+ "theme_color": "#0d9488",
8
+ "icons": [
9
+ {
10
+ "src": "/icons/icon-192x192.png",
11
+ "type": "image/png",
12
+ "sizes": "192x192"
13
+ },
14
+ {
15
+ "src": "/icons/icon-512x512.png",
16
+ "type": "image/png",
17
+ "sizes": "512x512"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1155 1000"><path d="m577.3 0 577.4 1000H0z" fill="#fff"/></svg>
@@ -0,0 +1 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2.5h13v10a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1zM0 1h16v11.5a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 12.5zm3.75 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M7 4.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m1.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5" fill="#666"/></svg>
File without changes
@@ -0,0 +1,18 @@
1
+ import { NextRequest, NextResponse } from "next/server";
2
+ import path from "path";
3
+ import fs from "fs/promises";
4
+
5
+ export async function POST(request: NextRequest) {
6
+ try {
7
+ const json = await request.json();
8
+
9
+ const publicDir = path.join(process.cwd(), "public");
10
+ const filePath = path.join(publicDir, "editor-content.json");
11
+
12
+ await fs.writeFile(filePath, JSON.stringify(json, null, 2), "utf-8");
13
+
14
+ return NextResponse.json({ message: "File saved successfully" });
15
+ } catch {
16
+ return NextResponse.json({ error: "Failed to save file" }, { status: 500 });
17
+ }
18
+ }
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,207 @@
1
+ @import "tailwindcss";
2
+
3
+ :root {
4
+ --background: #ffffff;
5
+ --foreground: #171717;
6
+ }
7
+
8
+ @media (prefers-color-scheme: dark) {
9
+ :root {
10
+ --background: #0a0a0a;
11
+ --foreground: #ededed;
12
+ }
13
+ }
14
+
15
+ html, body {
16
+ position: relative;
17
+ }
18
+
19
+ body {
20
+ background: var(--background);
21
+ color: var(--foreground);
22
+ font-family: Arial, Helvetica, sans-serif;
23
+ }
24
+
25
+ .ProseMirror {
26
+ position: relative;
27
+ min-height: 100%;
28
+ white-space: normal;
29
+ word-break: break-word;
30
+ padding: 0;
31
+ height: 100%;
32
+ font-family: inherit;
33
+ }
34
+
35
+ .ProseMirror[data-placeholder]:empty::before {
36
+ content: attr(data-placeholder);
37
+ color: #a0a0a0;
38
+ float: left;
39
+ height: 0;
40
+ pointer-events: none;
41
+ -webkit-user-select: none;
42
+ user-select: none;
43
+ position: absolute;
44
+ left: 0;
45
+ top: 0;
46
+ padding-left: 0.25rem;
47
+ }
48
+
49
+ .ProseMirror:focus {
50
+ outline: none;
51
+ }
52
+
53
+ .ProseMirror ul {
54
+ list-style-type: disc;
55
+ margin-left: 1.5rem;
56
+ padding-left: 0;
57
+ }
58
+
59
+ .ProseMirror ol {
60
+ list-style-type: decimal;
61
+ margin-left: 1.5rem;
62
+ padding-left: 0;
63
+ }
64
+
65
+ .ProseMirror li {
66
+ margin-bottom: 0.25rem;
67
+ }
68
+
69
+ .ProseMirror table {
70
+ border-collapse: collapse;
71
+ width: 100%;
72
+ table-layout: fixed;
73
+ margin-top: 1rem;
74
+ margin-bottom: 1rem;
75
+ }
76
+
77
+ .ProseMirror th,
78
+ .ProseMirror td {
79
+ border: 1px solid #ccc;
80
+ padding: 0.5rem;
81
+ vertical-align: top;
82
+ text-align: left;
83
+ word-break: break-word;
84
+ background-color: #fff;
85
+ }
86
+
87
+ .ProseMirror th {
88
+ background-color: #f3f4f6;
89
+ font-weight: 600;
90
+ }
91
+
92
+ .ProseMirror td:empty::before {
93
+ content: "\00a0";
94
+ }
95
+
96
+ @media (prefers-color-scheme: dark) {
97
+ .ProseMirror th,
98
+ .ProseMirror td {
99
+ border-color: #555;
100
+ background-color: #111;
101
+ color: #f3f3f3;
102
+ }
103
+
104
+ .ProseMirror th {
105
+ background-color: #1a1a1a;
106
+ }
107
+ }
108
+
109
+ .ProseMirror hr {
110
+ border: none;
111
+ border-top: 1px solid #ccc;
112
+ margin: 1rem 0;
113
+ }
114
+
115
+ .color-label {
116
+ position: relative;
117
+ display: inline-flex;
118
+ align-items: center;
119
+ justify-content: center;
120
+ }
121
+
122
+ .color-indicator {
123
+ position: absolute;
124
+ bottom: 0;
125
+ left: 25%;
126
+ right: 25%;
127
+ height: 3px;
128
+ background-color: var(--indicator-color);
129
+ border-radius: 2px 2px 0 0;
130
+ pointer-events: none;
131
+ }
132
+
133
+ .ProseMirror .column-resize-handle {
134
+ position: absolute;
135
+ right: -2px;
136
+ top: 0;
137
+ bottom: 0;
138
+ width: 4px;
139
+ background-color: rgba(0, 0, 255, 0.2);
140
+ cursor: col-resize;
141
+ }
142
+
143
+ .ProseMirror .resizable-image-wrapper {
144
+ resize: both;
145
+ overflow: auto;
146
+ display: inline-block;
147
+ max-width: 100%;
148
+ border: 1px solid #ccc;
149
+ padding: 2px;
150
+ }
151
+
152
+ .ProseMirror .resizable-image-wrapper img {
153
+ width: 100%;
154
+ height: auto;
155
+ display: block;
156
+ -webkit-user-select: none;
157
+ user-select: none;
158
+ pointer-events: none;
159
+ }
160
+
161
+ .ProseMirror .resizable-video-wrapper {
162
+ resize: both;
163
+ overflow: auto;
164
+ max-width: 100%;
165
+ border: 1px solid #ccc;
166
+ padding: 4px;
167
+ }
168
+
169
+ .ProseMirror video {
170
+ max-width: 100%;
171
+ height: auto;
172
+ display: block;
173
+ margin: 1rem 0;
174
+ }
175
+
176
+ .comment-highlight {
177
+ background-color: rgba(255, 230, 0, 0.3);
178
+ cursor: pointer;
179
+ border-bottom: 1px dotted orange;
180
+ }
181
+
182
+ .emoji-picker-popup {
183
+ position: absolute;
184
+ top: 40px;
185
+ z-index: 999;
186
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
187
+ }
188
+
189
+ .prose, .ProseMirror, .no-oklch {
190
+ color: black !important;
191
+ background-color: white !important;
192
+ }
193
+
194
+ .embed-responsive {
195
+ position: relative;
196
+ width: 100%;
197
+ padding-bottom: 56.25%;
198
+ height: 0;
199
+ }
200
+
201
+ .embed-responsive iframe {
202
+ position: absolute;
203
+ top: 0;
204
+ left: 0;
205
+ width: 100%;
206
+ height: 100%;
207
+ }
@@ -0,0 +1,47 @@
1
+ import type { Metadata } from "next";
2
+ import { Geist, Geist_Mono } from "next/font/google";
3
+ import "./globals.css";
4
+
5
+ const geistSans = Geist({
6
+ variable: "--font-geist-sans",
7
+ subsets: ["latin"],
8
+ });
9
+
10
+ const geistMono = Geist_Mono({
11
+ variable: "--font-geist-mono",
12
+ subsets: ["latin"],
13
+ });
14
+
15
+ export const metadata: Metadata = {
16
+ title: "Tetrons",
17
+ description: "A modern Word-style rich text editor built with Next.js",
18
+ icons: {
19
+ icon: [
20
+ { url: "/favicon.ico", type: "image/x-icon" },
21
+ { url: "/favicon-32x32.png", type: "image/png", sizes: "32x32" },
22
+ { url: "/favicon-16x16.png", type: "image/png", sizes: "16x16" },
23
+ ],
24
+ apple: "/apple-touch-icon.png",
25
+ },
26
+ manifest: "/site.webmanifest",
27
+ };
28
+
29
+ export default function RootLayout({
30
+ children,
31
+ }: {
32
+ children: React.ReactNode;
33
+ }) {
34
+ console.log("Rendering RootLayout", {
35
+ geistSans: geistSans.variable,
36
+ geistMono: geistMono.variable,
37
+ });
38
+ return (
39
+ <html lang="en">
40
+ <body
41
+ className={`${geistSans.variable} ${geistMono.variable} font-sans antialiased bg-gray-50 text-gray-900`}
42
+ >
43
+ <main className="max-w-screen-xl mx-auto p-4">{children}</main>
44
+ </body>
45
+ </html>
46
+ );
47
+ }
@@ -0,0 +1,11 @@
1
+ import EditorContent from "@/components/tetrons/EditorContent";
2
+
3
+ export default function Home() {
4
+ return (
5
+ <main className="flex flex-col h-screen overflow-hidden">
6
+ <div className="flex-1 overflow-auto flex flex-col">
7
+ <EditorContent />
8
+ </div>
9
+ </main>
10
+ );
11
+ }
File without changes
File without changes