@crashbytes/contentful-richtext-editor 1.0.5 → 1.0.7

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.
@@ -10,19 +10,27 @@ interface TiptapNode {
10
10
  }>;
11
11
  }
12
12
  /**
13
- * Converts a Contentful Rich Text Document to Tiptap JSON format
13
+ * Creates a professional-grade empty Tiptap document
14
+ */
15
+ export declare const createEmptyTiptapDocument: () => TiptapNode;
16
+ /**
17
+ * Enhanced validation with comprehensive error reporting
18
+ */
19
+ export declare const validateContentfulDocument: (document: any) => document is Document;
20
+ /**
21
+ * Production-grade Contentful to Tiptap conversion with comprehensive error handling
14
22
  */
15
23
  export declare const contentfulToTiptap: (document: Document) => TiptapNode;
16
24
  /**
17
- * Converts Tiptap JSON format to Contentful Rich Text Document
25
+ * Safe wrapper for Contentful to Tiptap conversion with fallback
18
26
  */
19
- export declare const tiptapToContentful: (tiptapDoc: any) => Document;
27
+ export declare const safeContentfulToTiptap: (document: Document) => TiptapNode;
20
28
  /**
21
- * Validates if a Contentful document is properly formatted
29
+ * Strategic Tiptap to Contentful conversion with enhanced error handling
22
30
  */
23
- export declare const validateContentfulDocument: (document: any) => document is Document;
31
+ export declare const tiptapToContentful: (tiptapDoc: any) => Document;
24
32
  /**
25
- * Creates an empty Contentful document
33
+ * Creates an empty Contentful document with professional structure
26
34
  */
27
35
  export declare const createEmptyDocument: () => Document;
28
36
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crashbytes/contentful-richtext-editor",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "A Tiptap-based rich text editor compatible with Contentful's rich text format",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -59,4 +59,4 @@
59
59
  "tslib": "^2.8.1",
60
60
  "typescript": "^5.0.0"
61
61
  }
62
- }
62
+ }