litecms 0.2.0 → 0.2.2
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.
- package/README.md +1 -1
- package/dist/admin/CmsBlogAdmin.d.ts.map +1 -1
- package/dist/admin/exports.js +3 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1209,7 +1209,7 @@ import { db } from '@/app/db';
|
|
|
1209
1209
|
import { blogPosts } from '@/app/db/schema';
|
|
1210
1210
|
import { eq, and } from 'drizzle-orm';
|
|
1211
1211
|
import { notFound } from 'next/navigation';
|
|
1212
|
-
import ReactMarkdown from 'react-markdown'
|
|
1212
|
+
import ReactMarkdown from 'react-markdown'
|
|
1213
1213
|
import remarkGfm from 'remark-gfm';
|
|
1214
1214
|
import { Navigation } from '@/app/components/Navigation';
|
|
1215
1215
|
import { getNavigation, getSiteSettings } from '@/app/admin/actions';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmsBlogAdmin.d.ts","sourceRoot":"","sources":["../../src/admin/CmsBlogAdmin.tsx"],"names":[],"mappings":"AAYA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,GAAG,WAAW,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,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ports.js
CHANGED
|
@@ -1803,12 +1803,13 @@ function CmsBlogAdmin({
|
|
|
1803
1803
|
setPosts((prev) => prev.map((p) => p.id === result.post.id ? result.post : p));
|
|
1804
1804
|
return result.post;
|
|
1805
1805
|
} else {
|
|
1806
|
+
const newPostId = postData.id ?? generateId();
|
|
1806
1807
|
const res = await fetch(postsEndpoint, {
|
|
1807
1808
|
method: "POST",
|
|
1808
1809
|
headers: { "Content-Type": "application/json" },
|
|
1809
1810
|
body: JSON.stringify({
|
|
1810
|
-
|
|
1811
|
-
|
|
1811
|
+
...postData,
|
|
1812
|
+
id: newPostId
|
|
1812
1813
|
})
|
|
1813
1814
|
});
|
|
1814
1815
|
if (!res.ok) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "litecms",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Timo Weiss",
|
|
@@ -78,7 +78,9 @@
|
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@hookform/resolvers": "^5.2.2",
|
|
80
80
|
"clsx": "^2.1.1",
|
|
81
|
+
"react-markdown": "^9",
|
|
81
82
|
"react-hook-form": "^7.71.0",
|
|
83
|
+
"remark-gfm": "^4",
|
|
82
84
|
"tailwind-merge": "^3.4.0",
|
|
83
85
|
"zod": "^4.3.5"
|
|
84
86
|
},
|
|
@@ -86,8 +88,6 @@
|
|
|
86
88
|
"@types/node": "^20",
|
|
87
89
|
"@types/react": "^18",
|
|
88
90
|
"@types/react-dom": "^18",
|
|
89
|
-
"react-markdown": "^9",
|
|
90
|
-
"remark-gfm": "^4",
|
|
91
91
|
"typescript": "^5"
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|