axiom-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,55 @@
1
+ import { default as default_2 } from 'react';
2
+ import { Editor } from '@tiptap/react';
3
+ import { JSONContent } from '@tiptap/core';
4
+
5
+ /**
6
+ * Out-of-the-box Monolithic Wrapper
7
+ * Provided for backwards compatibility and ease of use.
8
+ * Advanced users should compose AxiomEditorProvider, AxiomToolbar, and AxiomContent directly.
9
+ */
10
+ export declare const AxiomEditor: default_2.FC<AxiomEditorProps>;
11
+
12
+ declare interface AxiomEditorContextType {
13
+ editor: Editor | null;
14
+ isSaved: boolean;
15
+ setIsSaved: (saved: boolean) => void;
16
+ mediaModalOpen: boolean;
17
+ setMediaModalOpen: (open: boolean) => void;
18
+ mediaModalType: 'link' | 'video' | 'tweet' | 'instagram';
19
+ setMediaModalType: (type: 'link' | 'video' | 'tweet' | 'instagram') => void;
20
+ mediaModalInput: string;
21
+ setMediaModalInput: (input: string) => void;
22
+ uploadImage?: (file: File) => Promise<string>;
23
+ minHeightClass?: string;
24
+ maxHeightClass?: string;
25
+ }
26
+
27
+ export declare interface AxiomEditorProps {
28
+ initialContent: JSONContent | string;
29
+ onChange?: (json: JSONContent, html: string) => void;
30
+ uploadImage?: (file: File) => Promise<string>;
31
+ minHeightClass?: string;
32
+ maxHeightClass?: string;
33
+ hideEmbeds?: boolean;
34
+ }
35
+
36
+ export declare const AxiomEditorProvider: default_2.FC<AxiomEditorProviderProps>;
37
+
38
+ declare interface AxiomEditorProviderProps {
39
+ initialContent: JSONContent | string;
40
+ onChange?: (json: JSONContent, html: string) => void;
41
+ uploadImage?: (file: File) => Promise<string>;
42
+ children: default_2.ReactNode;
43
+ minHeightClass?: string;
44
+ maxHeightClass?: string;
45
+ }
46
+
47
+ export declare const AxiomJSONRenderer: default_2.FC<AxiomJSONRendererProps>;
48
+
49
+ declare interface AxiomJSONRendererProps {
50
+ content: JSONContent;
51
+ }
52
+
53
+ export declare const useAxiomEditor: () => AxiomEditorContextType;
54
+
55
+ export { }
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-keyword,.hljs-formula{color:#c678dd}.hljs-section,.hljs-name,.hljs-selector-tag,.hljs-deletion,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-string,.hljs-regexp,.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string{color:#98c379}.hljs-attr,.hljs-variable,.hljs-template-variable,.hljs-type,.hljs-selector-class,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-number{color:#d19a66}.hljs-symbol,.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-title.class_,.hljs-class .hljs-title{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}.ProseMirror{outline:none}.ProseMirror p.is-editor-empty:first-child:before{content:attr(data-placeholder);float:left;color:#a3a3a3;pointer-events:none;height:0}.global-drag-handle{display:flex;align-items:center;justify-content:center;width:20px;height:24px;border-radius:4px;background-color:transparent;color:#a3a3a3;cursor:grab;transition:background-color .2s,color .2s}.global-drag-handle:hover{background-color:#ffffff1a;color:#f59e0b}.global-drag-handle:active{cursor:grabbing}.custom-scrollbar::-webkit-scrollbar{width:6px;height:6px}.custom-scrollbar::-webkit-scrollbar-track{background:transparent;border-radius:8px}.custom-scrollbar::-webkit-scrollbar-thumb{background-color:#3f3f46;border-radius:8px}.custom-scrollbar::-webkit-scrollbar-thumb:hover{background-color:#52525b}.axiom-editor-fixed-size{height:650px!important}.axiom-editor-canvas{position:relative;overflow-y:auto!important;overflow-x:hidden!important;min-height:0}
package/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "axiom-editor",
3
+ "version": "1.0.0",
4
+ "description": "A premium narrative architecture block editor built on Tiptap",
5
+ "type": "module",
6
+ "main": "./dist/axiom-editor.cjs",
7
+ "module": "./dist/axiom-editor.es.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/axiom-editor.es.js",
12
+ "require": "./dist/axiom-editor.cjs",
13
+ "types": "./dist/index.d.ts"
14
+ },
15
+ "./style.css": "./dist/style.css"
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "scripts": {
21
+ "build": "tsc -b && vite build",
22
+ "prepublishOnly": "npm run build"
23
+ },
24
+ "peerDependencies": {
25
+ "react": "^18.0.0 || ^19.0.0",
26
+ "react-dom": "^18.0.0 || ^19.0.0"
27
+ },
28
+ "dependencies": {
29
+ "@tiptap/core": "^3.0.0",
30
+ "@tiptap/extension-character-count": "^3.0.0",
31
+ "@tiptap/extension-code-block-lowlight": "^3.0.0",
32
+ "@tiptap/extension-color": "^3.0.0",
33
+ "@tiptap/extension-image": "^3.0.0",
34
+ "@tiptap/extension-link": "^3.0.0",
35
+ "@tiptap/extension-strike": "^3.0.0",
36
+ "@tiptap/extension-task-item": "^3.0.0",
37
+ "@tiptap/extension-task-list": "^3.0.0",
38
+ "@tiptap/extension-text-align": "^3.0.0",
39
+ "@tiptap/extension-text-style": "^3.0.0",
40
+ "@tiptap/extension-underline": "^3.0.0",
41
+ "@tiptap/extension-youtube": "^3.0.0",
42
+ "@tiptap/html": "^3.0.0",
43
+ "@tiptap/react": "^3.0.0",
44
+ "@tiptap/starter-kit": "^3.0.0",
45
+ "@tiptap/suggestion": "^3.0.0",
46
+ "dompurify": "^3.0.0",
47
+ "highlight.js": "^11.0.0",
48
+ "lowlight": "^3.0.0",
49
+ "lucide-react": "^0.0.0 || ^1.0.0",
50
+ "tippy.js": "^6.0.0",
51
+ "tiptap-extension-global-drag-handle": "^0.1.18"
52
+ },
53
+ "devDependencies": {
54
+ "@eslint/js": "^10.0.1",
55
+ "@types/dompurify": "^3.0.5",
56
+ "@types/node": "^24.0.0",
57
+ "@types/react": "^19.0.0",
58
+ "@types/react-dom": "^19.0.0",
59
+ "@vitejs/plugin-react": "^4.3.0",
60
+ "autoprefixer": "^10.4.0",
61
+ "eslint": "^10.4.1",
62
+ "eslint-plugin-react-hooks": "^7.1.1",
63
+ "eslint-plugin-react-refresh": "^0.5.2",
64
+ "globals": "^17.6.0",
65
+ "postcss": "^8.4.0",
66
+ "tailwindcss": "^3.4.0",
67
+ "typescript": "^5.0.0",
68
+ "typescript-eslint": "^8.61.0",
69
+ "vite": "^5.0.0",
70
+ "vite-plugin-dts": "^4.0.0"
71
+ }
72
+ }