hasancode-math-editor 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.
@@ -0,0 +1,5 @@
1
+ export default function Editor({ content, setContent, editorAreaClassName, }: {
2
+ content: string;
3
+ setContent: React.Dispatch<React.SetStateAction<string>>;
4
+ editorAreaClassName?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export type MathCategory = {
2
+ name: string;
3
+ items: {
4
+ label: string;
5
+ latex: string;
6
+ }[];
7
+ };
8
+ export declare const LATEX_LIST: MathCategory[];
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/react';
2
+ type Props = {
3
+ editor: Editor | null;
4
+ editorId: string;
5
+ };
6
+ export declare function ToolbarMathControls({ editor, editorId }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export declare function ToolbarTableControls({ editor, isTableActive, }: {
3
+ editor: Editor;
4
+ isTableActive: boolean;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/react';
2
+ interface ToolbarProps {
3
+ editor: Editor | null;
4
+ editorId: string;
5
+ }
6
+ export declare function Toolbar({ editor, editorId }: ToolbarProps): import("react/jsx-runtime").JSX.Element | null;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | "emerald" | "orange" | "indigo" | "blue" | "yellow" | "fuchsia" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
7
+ asChild?: boolean;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export { Badge, badgeVariants };
@@ -0,0 +1,10 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | null | undefined;
5
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
+ asChild?: boolean;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export { Button, buttonVariants };
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ declare function Input({ className, type, ...props }: React.ComponentProps<"input">): import("react/jsx-runtime").JSX.Element;
3
+ export { Input };
@@ -0,0 +1,10 @@
1
+ import { Popover as PopoverPrimitive } from 'radix-ui';
2
+ import * as React from "react";
3
+ declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
6
+ declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
7
+ declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
+ declare function PopoverTitle({ className, ...props }: React.ComponentProps<"h2">): import("react/jsx-runtime").JSX.Element;
9
+ declare function PopoverDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
10
+ export { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, };
@@ -0,0 +1,15 @@
1
+ import { Select as SelectPrimitive } from 'radix-ui';
2
+ import * as React from "react";
3
+ declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function SelectGroup({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
5
+ declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
6
+ declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
7
+ size?: "sm" | "default";
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ declare function SelectContent({ className, children, position, align, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
10
+ declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
11
+ declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
12
+ declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
13
+ declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): import("react/jsx-runtime").JSX.Element;
14
+ declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): import("react/jsx-runtime").JSX.Element;
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ declare function Textarea({ className, ...props }: React.ComponentProps<"textarea">): import("react/jsx-runtime").JSX.Element;
3
+ export { Textarea };
@@ -0,0 +1,7 @@
1
+ import { Tooltip as TooltipPrimitive } from 'radix-ui';
2
+ import * as React from "react";
3
+ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
4
+ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
+ declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -0,0 +1 @@
1
+ export { default as Editor } from './components/editor/editor';
@@ -0,0 +1,2 @@
1
+ import { ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
package/package.json ADDED
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "hasancode-math-editor",
3
+ "private": false,
4
+ "version": "1.0.0",
5
+ "type": "module",
6
+ "main": "dist/math-editor.umd.js",
7
+ "module": "dist/math-editor.es.js",
8
+ "types": "dist/index.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/math-editor.es.js",
15
+ "require": "./dist/math-editor.umd.js",
16
+ "types": "./dist/index.d.ts"
17
+ },
18
+ "./style.css": "./dist/math-editor.css"
19
+ },
20
+ "scripts": {
21
+ "dev": "vite",
22
+ "build": "tsc -b && vite build",
23
+ "lint": "eslint .",
24
+ "preview": "vite preview"
25
+ },
26
+ "keywords": [
27
+ "math-editor",
28
+ "editor",
29
+ "rich-text-editor",
30
+ "math",
31
+ "latex",
32
+ "latex-editor",
33
+ "tiptap",
34
+ "shadcn",
35
+ "typescript"
36
+ ],
37
+ "author": "Mehedi Hasan <mehedi01616720009@gmail.com>",
38
+ "license": "MIT",
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/Mehedi01616720009/math-editor.git"
42
+ },
43
+ "homepage": "https://github.com/Mehedi01616720009/math-editor#readme",
44
+ "bugs": {
45
+ "url": "https://github.com/Mehedi01616720009/math-editor/issues"
46
+ },
47
+ "peerDependencies": {
48
+ "react": "^18.0.0 || ^19.0.0",
49
+ "react-dom": "^18.0.0 || ^19.0.0"
50
+ },
51
+ "dependencies": {
52
+ "@fontsource-variable/geist": "^5.2.9",
53
+ "@tailwindcss/vite": "^4.3.0",
54
+ "@tiptap/extension-highlight": "^3.23.6",
55
+ "@tiptap/extension-image": "^3.23.6",
56
+ "@tiptap/extension-link": "^3.23.6",
57
+ "@tiptap/extension-mathematics": "^3.23.6",
58
+ "@tiptap/extension-subscript": "^3.23.6",
59
+ "@tiptap/extension-superscript": "^3.23.6",
60
+ "@tiptap/extension-table": "^3.23.6",
61
+ "@tiptap/extension-table-cell": "^3.23.6",
62
+ "@tiptap/extension-table-header": "^3.23.6",
63
+ "@tiptap/extension-table-row": "^3.23.6",
64
+ "@tiptap/extension-text-align": "^3.23.6",
65
+ "@tiptap/extension-typography": "^3.23.6",
66
+ "@tiptap/extension-underline": "^3.23.6",
67
+ "@tiptap/pm": "^3.23.6",
68
+ "@tiptap/react": "^3.23.6",
69
+ "@tiptap/starter-kit": "^3.23.6",
70
+ "class-variance-authority": "^0.7.1",
71
+ "clsx": "^2.1.1",
72
+ "lucide-react": "^1.17.0",
73
+ "radix-ui": "^1.4.3",
74
+ "react": "^19.2.6",
75
+ "react-dom": "^19.2.6",
76
+ "shadcn": "^4.8.3",
77
+ "tailwind-merge": "^3.6.0",
78
+ "tailwindcss": "^4.3.0",
79
+ "tw-animate-css": "^1.4.0"
80
+ },
81
+ "devDependencies": {
82
+ "@eslint/js": "^10.0.1",
83
+ "@types/node": "^24.12.4",
84
+ "@types/react": "^19.2.14",
85
+ "@types/react-dom": "^19.2.3",
86
+ "@vitejs/plugin-react": "^6.0.1",
87
+ "eslint": "^10.3.0",
88
+ "eslint-plugin-react-hooks": "^7.1.1",
89
+ "eslint-plugin-react-refresh": "^0.5.2",
90
+ "globals": "^17.6.0",
91
+ "tslib": "^2.8.1",
92
+ "typescript": "~6.0.2",
93
+ "typescript-eslint": "^8.59.2",
94
+ "vite": "^8.0.12",
95
+ "vite-plugin-dts": "^5.0.1"
96
+ }
97
+ }