@neuctra/cms-core 1.0.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.
- package/README.md +242 -0
- package/dist/cms-core.css +1 -0
- package/dist/index.cjs.js +714 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.es.js +33025 -0
- package/dist/index.es.js.map +1 -0
- package/dist/types/components/code/CodeBlock.d.ts +16 -0
- package/dist/types/components/code/CodeBlockEditor.d.ts +9 -0
- package/dist/types/components/heading/HeadingEditor.d.ts +10 -0
- package/dist/types/components/heading/HeadingPreview.d.ts +6 -0
- package/dist/types/components/image/ImageEditor.d.ts +8 -0
- package/dist/types/components/image/ImagePreview.d.ts +6 -0
- package/dist/types/components/table/TableEditor.d.ts +11 -0
- package/dist/types/components/table/TablePreview.d.ts +8 -0
- package/dist/types/components/text/RichTextEditor.d.ts +8 -0
- package/dist/types/components/text/RichTextPreview.d.ts +6 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/neuctra-editor/NeuctraEditor.d.ts +10 -0
- package/dist/types/neuctra-editor/NeuctraEditorPreview.d.ts +7 -0
- package/dist/types/utils/blogBlocks.d.ts +41 -0
- package/package.json +87 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface CodeTab {
|
|
2
|
+
name: string;
|
|
3
|
+
code: string;
|
|
4
|
+
language: string;
|
|
5
|
+
}
|
|
6
|
+
interface CodeBlockProps {
|
|
7
|
+
code?: string;
|
|
8
|
+
language?: string;
|
|
9
|
+
showLineNumbers?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
tabs?: CodeTab[] | null;
|
|
12
|
+
activeTab?: number;
|
|
13
|
+
onTabChange?: (index: number) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const CodeBlock: ({ code, language, showLineNumbers, className, tabs, activeTab: externalActiveTab, onTabChange, }: CodeBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default CodeBlock;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface CodeBlockEditorProps {
|
|
2
|
+
value?: string;
|
|
3
|
+
language?: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
onLanguageChange?: (language: string) => void;
|
|
6
|
+
onDelete?: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare const CodeBlockEditor: ({ value, language, onChange, onLanguageChange, onDelete, }: CodeBlockEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default CodeBlockEditor;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface HeadingEditorProps {
|
|
2
|
+
value?: string;
|
|
3
|
+
level?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
onLevelChange?: (level: "h1" | "h2" | "h3" | "h4" | "h5" | "h6") => void;
|
|
6
|
+
onDelete?: () => void;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const HeadingEditor: ({ value, level, onChange, onLevelChange, onDelete, placeholder, }: HeadingEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default HeadingEditor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ImageBlock } from '../../utils/blogBlocks';
|
|
2
|
+
interface ImageEditorProps {
|
|
3
|
+
value?: Partial<ImageBlock>;
|
|
4
|
+
onChange?: (data: Partial<ImageBlock>) => void;
|
|
5
|
+
onDelete?: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const ImageEditor: ({ value, onChange, onDelete }: ImageEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ImageEditor;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface TableEditorProps {
|
|
2
|
+
headers?: string[];
|
|
3
|
+
rows?: string[][];
|
|
4
|
+
onChange?: (data: {
|
|
5
|
+
headers: string[];
|
|
6
|
+
rows: string[][];
|
|
7
|
+
}) => void;
|
|
8
|
+
onDelete?: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const TableEditor: ({ headers, rows, onChange, onDelete, }: TableEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default TableEditor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface TablePreviewProps {
|
|
2
|
+
headers?: string[];
|
|
3
|
+
rows?: (string | null | undefined)[][];
|
|
4
|
+
striped?: boolean;
|
|
5
|
+
hoverable?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const TablePreview: ({ headers, rows, striped, hoverable, }: TablePreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default TablePreview;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface RichTextEditorProps {
|
|
2
|
+
value?: string;
|
|
3
|
+
onChange: (html: string) => void;
|
|
4
|
+
onDelete?: () => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const RichTextEditor: ({ value, onChange, onDelete, placeholder, }: RichTextEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default RichTextEditor;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Block } from '../utils/blogBlocks';
|
|
3
|
+
interface NeuctraEditorProps {
|
|
4
|
+
blocks?: Block[];
|
|
5
|
+
setBlocks?: React.Dispatch<React.SetStateAction<Block[]>>;
|
|
6
|
+
className?: string;
|
|
7
|
+
showToolbar?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const NeuctraEditor: ({ blocks, setBlocks, className, showToolbar, }: NeuctraEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Block } from '../utils/blogBlocks';
|
|
2
|
+
interface NeuctraBlogPreviewProps {
|
|
3
|
+
blocks?: Block[];
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const NeuctraEditorPreview: ({ blocks, className, }: NeuctraBlogPreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface TextBlock {
|
|
2
|
+
id: string;
|
|
3
|
+
type: "text";
|
|
4
|
+
content: string;
|
|
5
|
+
}
|
|
6
|
+
export interface HeadingBlock {
|
|
7
|
+
id: string;
|
|
8
|
+
type: "heading";
|
|
9
|
+
content: string;
|
|
10
|
+
level: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
11
|
+
}
|
|
12
|
+
export interface ImageBlock {
|
|
13
|
+
id: string;
|
|
14
|
+
type: "image";
|
|
15
|
+
url: string;
|
|
16
|
+
caption: string;
|
|
17
|
+
width: string | number;
|
|
18
|
+
height: number;
|
|
19
|
+
radius: number;
|
|
20
|
+
opacity: number;
|
|
21
|
+
objectFit: "cover" | "contain" | "fill" | "scale-down";
|
|
22
|
+
shadow?: boolean;
|
|
23
|
+
clickable?: boolean;
|
|
24
|
+
bordered?: boolean;
|
|
25
|
+
showOverlay?: boolean;
|
|
26
|
+
overlayText?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface CodeBlock {
|
|
29
|
+
id: string;
|
|
30
|
+
type: "code";
|
|
31
|
+
language: string;
|
|
32
|
+
content: string;
|
|
33
|
+
}
|
|
34
|
+
export interface TableBlock {
|
|
35
|
+
id: string;
|
|
36
|
+
type: "table";
|
|
37
|
+
headers: string[];
|
|
38
|
+
rows: string[][];
|
|
39
|
+
}
|
|
40
|
+
export type Block = TextBlock | HeadingBlock | ImageBlock | CodeBlock | TableBlock;
|
|
41
|
+
export declare const createBlock: (type: string) => Block | null;
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@neuctra/cms-core",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "A powerful, modular CMS core engine for building modern content editors, blogs, notes, and structured content systems with React and Tailwind CSS.",
|
|
6
|
+
"author": "Your Name <tahaasifaqwe@gmail.com>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/Taha-Asif-313/neuctra-cms-core#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/Taha-Asif-313/neuctra-cms-core.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/Taha-Asif-313/neuctra-cms-core/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"cms",
|
|
18
|
+
"content-management",
|
|
19
|
+
"editor",
|
|
20
|
+
"rich-text",
|
|
21
|
+
"block-editor",
|
|
22
|
+
"react",
|
|
23
|
+
"ui",
|
|
24
|
+
"component-library",
|
|
25
|
+
"tailwindcss",
|
|
26
|
+
"vite",
|
|
27
|
+
"typescript",
|
|
28
|
+
"neuctra",
|
|
29
|
+
"headless-cms",
|
|
30
|
+
"content-core",
|
|
31
|
+
"blog-editor",
|
|
32
|
+
"notes-app",
|
|
33
|
+
"design-system",
|
|
34
|
+
"modern",
|
|
35
|
+
"customizable"
|
|
36
|
+
],
|
|
37
|
+
"main": "dist/index.cjs.js",
|
|
38
|
+
"module": "dist/index.es.js",
|
|
39
|
+
"types": "dist/types/index.d.ts",
|
|
40
|
+
"exports": {
|
|
41
|
+
".": {
|
|
42
|
+
"types": "./dist/types/index.d.ts",
|
|
43
|
+
"import": "./dist/index.es.js",
|
|
44
|
+
"require": "./dist/index.cjs.js"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"files": [
|
|
48
|
+
"dist"
|
|
49
|
+
],
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "vite build",
|
|
52
|
+
"clean": "rm -rf dist",
|
|
53
|
+
"dev": "vite",
|
|
54
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@tailwindcss/vite": "^4.1.11",
|
|
58
|
+
"lucide-react": "^0.536.0",
|
|
59
|
+
"react": ">=18.0.0",
|
|
60
|
+
"react-dom": ">=18.0.0",
|
|
61
|
+
"react-icons": "^5.5.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@monaco-editor/react": "^4.7.0",
|
|
65
|
+
"@neuctra/ui": "^0.2.39",
|
|
66
|
+
"@tailwindcss/postcss": "^4.1.11",
|
|
67
|
+
"@types/node": "^24.9.1",
|
|
68
|
+
"@types/react": "^19.1.9",
|
|
69
|
+
"@types/react-dom": "^19.1.7",
|
|
70
|
+
"@types/react-syntax-highlighter": "^15.5.13",
|
|
71
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
72
|
+
"autoprefixer": "^10.4.21",
|
|
73
|
+
"clsx": "^2.1.1",
|
|
74
|
+
"framer-motion": "^12.38.0",
|
|
75
|
+
"minimatch": "^10.0.3",
|
|
76
|
+
"postcss": "^8.5.6",
|
|
77
|
+
"react-syntax-highlighter": "^16.1.1",
|
|
78
|
+
"tailwindcss": "^4.1.11",
|
|
79
|
+
"typescript": "^5.9.2",
|
|
80
|
+
"vite": "^7.0.6",
|
|
81
|
+
"vite-plugin-dts": "^4.5.4"
|
|
82
|
+
},
|
|
83
|
+
"peerDependencies": {
|
|
84
|
+
"react": ">=18.0.0",
|
|
85
|
+
"react-dom": ">=18.0.0"
|
|
86
|
+
}
|
|
87
|
+
}
|