@airoom/nextmin-react 1.3.0 → 1.4.1

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 (40) hide show
  1. package/dist/components/SchemaForm.js +15 -2
  2. package/dist/components/SchemaSuggestionList.d.ts +7 -0
  3. package/dist/components/SchemaSuggestionList.js +43 -0
  4. package/dist/components/editor/TiptapEditor.d.ts +10 -0
  5. package/dist/components/editor/TiptapEditor.js +228 -0
  6. package/dist/components/editor/Toolbar.d.ts +6 -0
  7. package/dist/components/editor/Toolbar.js +99 -0
  8. package/dist/components/editor/components/CommandList.d.ts +7 -0
  9. package/dist/components/editor/components/CommandList.js +47 -0
  10. package/dist/components/editor/components/ImageBubbleMenu.d.ts +6 -0
  11. package/dist/components/editor/components/ImageBubbleMenu.js +15 -0
  12. package/dist/components/editor/components/ImageComponent.d.ts +3 -0
  13. package/dist/components/editor/components/ImageComponent.js +45 -0
  14. package/dist/components/editor/components/SchemaInsertionModal.d.ts +14 -0
  15. package/dist/components/editor/components/SchemaInsertionModal.js +38 -0
  16. package/dist/components/editor/components/TableBubbleMenu.d.ts +6 -0
  17. package/dist/components/editor/components/TableBubbleMenu.js +8 -0
  18. package/dist/components/editor/extensions/Container.d.ts +2 -0
  19. package/dist/components/editor/extensions/Container.js +51 -0
  20. package/dist/components/editor/extensions/Grid.d.ts +3 -0
  21. package/dist/components/editor/extensions/Grid.js +89 -0
  22. package/dist/components/editor/extensions/Layout.d.ts +3 -0
  23. package/dist/components/editor/extensions/Layout.js +116 -0
  24. package/dist/components/editor/extensions/ResizableImage.d.ts +1 -0
  25. package/dist/components/editor/extensions/ResizableImage.js +52 -0
  26. package/dist/components/editor/extensions/SlashCommand.d.ts +15 -0
  27. package/dist/components/editor/extensions/SlashCommand.js +161 -0
  28. package/dist/components/editor/utils/upload.d.ts +1 -0
  29. package/dist/components/editor/utils/upload.js +49 -0
  30. package/dist/editor.css +460 -0
  31. package/dist/lib/upload.d.ts +1 -0
  32. package/dist/lib/upload.js +53 -0
  33. package/dist/lib/utils.d.ts +2 -0
  34. package/dist/lib/utils.js +5 -0
  35. package/dist/nextmin.css +1 -1
  36. package/dist/router/NextMinRouter.d.ts +1 -0
  37. package/dist/router/NextMinRouter.js +1 -0
  38. package/dist/views/list/useListData.js +4 -0
  39. package/package.json +34 -8
  40. package/tsconfig.json +8 -3
@@ -1 +1,2 @@
1
+ import '@airoom/nextmin-react/editor.css';
1
2
  export declare function NextMinRouter(): import("react/jsx-runtime").JSX.Element;
@@ -10,6 +10,7 @@ import { DashboardPage } from '../views/DashboardPage';
10
10
  import { SectionLoader } from '../components/SectionLoader';
11
11
  import SettingsEdit from '../views/SettingsEdit';
12
12
  import ProfilePage from '../views/ProfilePage';
13
+ import '@airoom/nextmin-react/editor.css';
13
14
  export function NextMinRouter() {
14
15
  const pathname = usePathname();
15
16
  const router = useRouter();
@@ -14,6 +14,10 @@ pageSize, filters = {}) {
14
14
  const filtersKey = JSON.stringify(filters);
15
15
  const load = useCallback(async () => {
16
16
  setState((s) => ({ ...s, loading: true, forbidden: false, err: null }));
17
+ if (!model) {
18
+ setState((s) => ({ ...s, loading: false }));
19
+ return;
20
+ }
17
21
  try {
18
22
  const res = await api.list(model, Math.max(0, page - 1), pageSize, filters);
19
23
  if (cancelledRef.current)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airoom/nextmin-react",
3
- "version": "1.3.0",
3
+ "version": "1.4.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -11,7 +11,8 @@
11
11
  "import": "./dist/index.js",
12
12
  "default": "./dist/index.js"
13
13
  },
14
- "./styles.css": "./dist/nextmin.css"
14
+ "./styles.css": "./dist/nextmin.css",
15
+ "./editor.css": "./dist/editor.css"
15
16
  },
16
17
  "files": [
17
18
  "dist",
@@ -21,24 +22,49 @@
21
22
  "README.md"
22
23
  ],
23
24
  "scripts": {
24
- "build": "rm -rf dist && tsc -p tsconfig.json && npm run build:css",
25
+ "build": "rm -rf dist && tsc -p tsconfig.json && npm run build:css && cp src/components/editor/editor.css dist/editor.css",
25
26
  "build:css": "tailwindcss -c tailwind.config.js -i ./src/styles.css -o ./dist/nextmin.css --minify",
26
27
  "dev": "tsc -w -p tsconfig.json",
27
28
  "prepublishOnly": "npm run build && npm pack --dry-run | (! grep -E '\\bsrc/|\\.map$')"
28
29
  },
29
30
  "dependencies": {
30
31
  "@googlemaps/js-api-loader": "^1.16.10",
31
- "@heroui/react": "^2.8.2",
32
+ "@heroui/react": "^2.8.5",
32
33
  "@heroui/use-infinite-scroll": "^2.2.10",
33
34
  "@internationalized/date": "^3.9.0",
34
35
  "@reduxjs/toolkit": "^2.8.2",
36
+ "@tailwindcss/typography": "^0.5.19",
37
+ "@tiptap/extension-bubble-menu": "^3.13.0",
38
+ "@tiptap/extension-color": "^3.13.0",
39
+ "@tiptap/extension-highlight": "^3.13.0",
40
+ "@tiptap/extension-image": "^3.13.0",
41
+ "@tiptap/extension-link": "^3.13.0",
42
+ "@tiptap/extension-placeholder": "^3.13.0",
43
+ "@tiptap/extension-table": "^3.13.0",
44
+ "@tiptap/extension-table-cell": "^3.13.0",
45
+ "@tiptap/extension-table-header": "^3.13.0",
46
+ "@tiptap/extension-table-row": "^3.13.0",
47
+ "@tiptap/extension-text-align": "^3.13.0",
48
+ "@tiptap/extension-text-style": "^3.13.0",
49
+ "@tiptap/extension-underline": "^3.13.0",
50
+ "@tiptap/pm": "^3.13.0",
51
+ "@tiptap/react": "^3.13.0",
52
+ "@tiptap/starter-kit": "^3.13.0",
53
+ "@tiptap/suggestion": "^3.13.0",
54
+ "@types/react-resizable": "^3.0.8",
55
+ "clsx": "^2.1.1",
56
+ "dompurify": "^3.3.0",
35
57
  "framer-motion": "^12.23.12",
36
- "react": "*",
37
- "react-dom": "*",
58
+ "lucide-react": "^0.556.0",
59
+ "react": "^19.2.1",
60
+ "react-dom": "^19.2.1",
38
61
  "react-redux": ">=9",
39
- "socket.io-client": "^4.7.5"
62
+ "react-resizable": "^3.0.5",
63
+ "socket.io-client": "^4.7.5",
64
+ "tailwind-merge": "^3.4.0"
40
65
  },
41
66
  "devDependencies": {
67
+ "@types/dompurify": "^3.2.0",
42
68
  "@types/google.maps": "^3.58.1",
43
69
  "autoprefixer": "^10.4.21",
44
70
  "postcss": "^8.5.6",
@@ -48,4 +74,4 @@
48
74
  "publishConfig": {
49
75
  "access": "public"
50
76
  }
51
- }
77
+ }
package/tsconfig.json CHANGED
@@ -2,7 +2,10 @@
2
2
  "extends": "../../tsconfig.json",
3
3
  "compilerOptions": {
4
4
  "target": "ES2020",
5
- "types": ["google.maps", "node"],
5
+ "types": [
6
+ "google.maps",
7
+ "node"
8
+ ],
6
9
  "module": "ESNext",
7
10
  "moduleResolution": "Bundler",
8
11
  "jsx": "react-jsx",
@@ -14,5 +17,7 @@
14
17
  "resolveJsonModule": true,
15
18
  "sourceMap": false
16
19
  },
17
- "include": ["src"]
18
- }
20
+ "include": [
21
+ "src"
22
+ ]
23
+ }