@vitnode/blog 2.0.0-canary.3 → 2.0.0-canary.5
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/dist/src/admin/content.d.ts.map +1 -1
- package/dist/src/admin/content.js +1 -1
- package/dist/src/admin/nav.d.ts.map +1 -1
- package/dist/src/api/lib/events.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
- package/dist/src/config.api.d.ts.map +1 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +1 -1
- package/dist/src/content/category.d.ts.map +1 -1
- package/dist/src/content/post.d.ts.map +1 -1
- package/dist/src/views/admin/article/editor-field.d.ts.map +1 -1
- package/dist/src/views/admin/article/editor-field.js +1 -1
- package/dist/src/views/admin/article/form-layout.d.ts.map +1 -1
- package/dist/src/views/admin/article/form-layout.js +1 -1
- package/dist/src/views/admin/category/color-cell.d.ts.map +1 -1
- package/dist/src/views/admin/category/color-cell.js +1 -1
- package/dist/src/views/admin/category/color-field.d.ts.map +1 -1
- package/dist/src/views/admin/category/color-field.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/admin/content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/admin/content.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,YAAY;;;CAyBc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{contentTypeAdmin}from"@vitnode/core/lib/plugin";import{CONFIG_PLUGIN}from"../const.js";import{BlogArticleEditorField}from"../views/admin/article/editor-field.js";import{BlogArticleFormLayout}from"../views/admin/article/form-layout.js";import{BlogCategoryColorCell}from"../views/admin/category/color-cell.js";import{BlogCategoryColorField}from"../views/admin/category/color-field.js";import{blogCategoryNav,blogPostNav}from"./nav.js";export const adminContent={pluginId:CONFIG_PLUGIN.pluginId,contentTypes:[contentTypeAdmin({...blogPostNav,fields:{content:{component:BlogArticleEditorField}},forms:{layout:BlogArticleFormLayout}}),contentTypeAdmin({...blogCategoryNav,fields:{color:{component:BlogCategoryColorField}},columns:{color:{cell:BlogCategoryColorCell}}})]};
|
|
1
|
+
import{contentTypeAdmin}from"@vitnode/core/lib/plugin";import{CONFIG_PLUGIN}from"../const.js";import{BlogArticleEditorField}from"../views/admin/article/editor-field.js";import{BlogArticleFormLayout}from"../views/admin/article/form-layout.js";import{BlogCategoryColorCell}from"../views/admin/category/color-cell.js";import{BlogCategoryColorField}from"../views/admin/category/color-field.js";import{blogCategoryNav,blogPostNav}from"./nav.js";export const adminContent={pluginId:CONFIG_PLUGIN.pluginId,contentTypes:[contentTypeAdmin({...blogPostNav,fields:{content:{component:BlogArticleEditorField,skeleton:"editor"}},forms:{layout:BlogArticleFormLayout}}),contentTypeAdmin({...blogCategoryNav,fields:{color:{component:BlogCategoryColorField}},columns:{color:{cell:BlogCategoryColorCell}}})]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav.d.ts","sourceRoot":"","sources":["../../../src/admin/nav.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nav.d.ts","sourceRoot":"","sources":["../../../src/admin/nav.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW;;;;;;;;;;;CAGvB,CAAC;AAGF,eAAO,MAAM,eAAe;;;;;;CAG3B,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;CAGW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/api/lib/events.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAM9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/api/lib/events.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAM9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OAAO,QAAQ,iCAAiC,CAAC;IAC/C,UAAU,aACR,SACE,gBAAgB,CAAC,OAAO,uBAAuB,CAAC,EAChD,gBAAgB,CAAC,OAAO,mBAAmB,CAAC;QAC9C,uBAAuB,EAAE;YACvB,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC;QACF,uBAAuB,EAAE;YACvB,UAAU,EAAE,MAAM,CAAC;YAEnB,OAAO,EAAE,MAAM,EAAE,CAAC;SACnB,CAAC;QACF,uBAAuB,EAAE;YACvB,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC;QACF,mBAAmB,EAAE;YACnB,UAAU,EAAE,MAAM,CAAC;YACnB,MAAM,EAAE,MAAM,CAAC;SAChB,CAAC;QAEF,mBAAmB,EAAE;YACnB,MAAM,EAAE,MAAM,CAAC;SAChB,CAAC;QACF,mBAAmB,EAAE;YACnB,UAAU,EAAE,MAAM,CAAC;YACnB,MAAM,EAAE,MAAM,CAAC;SAChB,CAAC;KACH;CACF;AAcD,eAAO,MAAM,yBAAyB,gIAapC,CAAC;AAEH,eAAO,MAAM,yBAAyB,gIAapC,CAAC;AAEH,eAAO,MAAM,yBAAyB,gIASpC,CAAC;AAEH,eAAO,MAAM,6BAA6B,gIASxC,CAAC;AAEH,eAAO,MAAM,6BAA6B,gIASxC,CAAC;AAEH,eAAO,MAAM,6BAA6B,gIAYxC,CAAC;AAEH,eAAO,MAAM,wBAAwB,kIAOpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/admin/admin.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/admin/admin.module.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW,2dAatB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.api.d.ts","sourceRoot":"","sources":["../../src/config.api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.api.d.ts","sourceRoot":"","sources":["../../src/config.api.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,aAAa,mEAYtB,CAAC"}
|
package/dist/src/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU,6EAInB,CAAC"}
|
package/dist/src/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildPlugin}from"@vitnode/core/lib/plugin";import{
|
|
1
|
+
import{buildPlugin}from"@vitnode/core/lib/plugin";import{CONFIG_PLUGIN}from"./const.js";import messages from"./locales/index.js";export const blogPlugin=()=>buildPlugin({...CONFIG_PLUGIN,messages});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../../src/content/category.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../../src/content/category.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB;;;gEAwClC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post.d.ts","sourceRoot":"","sources":["../../../src/content/post.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"post.d.ts","sourceRoot":"","sources":["../../../src/content/post.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB;;;;;;;;8JA4I9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-field.d.ts","sourceRoot":"","sources":["../../../../../src/views/admin/article/editor-field.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor-field.d.ts","sourceRoot":"","sources":["../../../../../src/views/admin/article/editor-field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAG1F,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,eAAO,MAAM,sBAAsB,GAAI,OAAO,0BAA0B,sBAQvE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import{ContentFormFieldSkeleton}from"@vitnode/core/content/admin-form";import React from"react";import{useTranslations}from"use-intl";const AutoFormEditor=React.lazy(async()=>await import("@vitnode/core/components/form/fields/editor").then(mod=>({default:mod.AutoFormEditor})));export const BlogArticleEditorField=props=>{const t=useTranslations("@vitnode/blog.admin.article");return _jsx(React.Suspense,{fallback:_jsx(ContentFormFieldSkeleton,{control:"editor"}),children:_jsx(AutoFormEditor,{label:t("content.label"),...props})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-layout.d.ts","sourceRoot":"","sources":["../../../../../src/views/admin/article/form-layout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"form-layout.d.ts","sourceRoot":"","sources":["../../../../../src/views/admin/article/form-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAcvE,eAAO,MAAM,qBAAqB,GAAI,UAAU,sBAAsB,gCAsCrE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{ContentFormActions,ContentFormField,ContentFormHeader,ContentFormLayoutGrid,ContentFormMain,ContentFormSection,ContentFormSidebar,ContentFormStatus}from"@vitnode/core/content/admin-form";import{useTranslations}from"use-intl";export const BlogArticleFormLayout=({mode})=>{const t=useTranslations("@vitnode/blog.admin.article.form");return _jsxs(_Fragment,{children:[_jsx(ContentFormHeader,{children:_jsx(ContentFormActions,{})}),_jsxs(ContentFormLayoutGrid,{children:[_jsx(ContentFormMain,{children:_jsxs(ContentFormSection,{children:[_jsx(ContentFormField,{name:"title"}),_jsx(ContentFormField,{name:"friendlyUrl"}),_jsx(ContentFormField,{name:"content"})]})}),_jsxs(ContentFormSidebar,{children:[mode==="edit"?_jsx(ContentFormSection,{title:t("publish"),children:_jsx(ContentFormStatus,{})}):null,_jsxs(ContentFormSection,{title:t("cover.title"),children:[_jsx(ContentFormField,{name:"coverImage"}),_jsx(ContentFormField,{name:"coverImageAlt"})]}),_jsxs(ContentFormSection,{title:t("settings.title"),children:[_jsx(ContentFormField,{name:"categoryId"}),_jsx(ContentFormField,{name:"authorId"})]})]})]})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-cell.d.ts","sourceRoot":"","sources":["../../../../../src/views/admin/category/color-cell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color-cell.d.ts","sourceRoot":"","sources":["../../../../../src/views/admin/category/color-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAIjE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,eAAO,MAAM,qBAAqB,GAAI,UAEnC,gBAAgB,CAAC,OAAO,uBAAuB,CAAC,gCAkBlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{useTranslations}from"use-intl";export const BlogCategoryColorCell=({row})=>{const t=useTranslations("@vitnode/blog.admin.category");const color=row.color;if(!color){return _jsx("span",{className:"text-muted-foreground",children:t("color.none")})}return _jsxs("div",{className:"flex items-center gap-2",children:[_jsx("span",{"aria-hidden":true,className:"size-4 shrink-0 rounded-full border",style:{backgroundColor:color}}),_jsx("span",{className:"text-muted-foreground truncate text-sm",children:color})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-field.d.ts","sourceRoot":"","sources":["../../../../../src/views/admin/category/color-field.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color-field.d.ts","sourceRoot":"","sources":["../../../../../src/views/admin/category/color-field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAK1F,eAAO,MAAM,sBAAsB,GAAI,OAAO,0BAA0B,gCAWvE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import{AutoFormColor}from"@vitnode/core/components/form/fields/color";import{useTranslations}from"use-intl";export const BlogCategoryColorField=props=>{const t=useTranslations("@vitnode/blog.admin.category");return _jsx(AutoFormColor,{allowRemoveColor:true,description:t("color.desc"),label:t("color.label"),...props})};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitnode/blog",
|
|
3
|
-
"version": "2.0.0-canary.
|
|
3
|
+
"version": "2.0.0-canary.5",
|
|
4
4
|
"description": "Blog plugin for VitNode, providing a blogging platform on Hono.js.",
|
|
5
5
|
"author": "VitNode Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"sonner": "^2.0.7",
|
|
41
41
|
"use-intl": "^4.13.7",
|
|
42
42
|
"zod": "^4.4.3",
|
|
43
|
-
"@vitnode/core": "2.0.0-canary.
|
|
43
|
+
"@vitnode/core": "2.0.0-canary.5"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@react-email/ui": "^6.9.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"tsc-alias": "^1.9.1",
|
|
56
56
|
"typescript": "^6.0.3",
|
|
57
57
|
"vitest": "^4.1.10",
|
|
58
|
-
"@vitnode/config": "2.0.0-canary.
|
|
58
|
+
"@vitnode/config": "2.0.0-canary.5"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"build:plugins": "vitnode build",
|