@morphika/andami 0.2.6 → 0.2.8

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.
@@ -79,8 +79,8 @@ export default function RichTextEditor({ block, editable = false }: RichTextEdit
79
79
  const commitContent = useCallback(
80
80
  (ed: Editor | null) => {
81
81
  if (!ed) return;
82
- const doc = ed.getJSON();
83
- const portableText = tiptapToPortableText(doc);
82
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
83
+ const portableText = tiptapToPortableText(ed.getJSON() as any);
84
84
  updateBlockDebounced(block._key, {
85
85
  text: portableText,
86
86
  } as Partial<ContentBlock>);
@@ -221,7 +221,7 @@ function convertBlockNode(node: TiptapNode): PortableTextBlock {
221
221
  * Convert a Tiptap JSON document to Sanity Portable Text content.
222
222
  * Accepts the Tiptap editor's `getJSON()` output.
223
223
  */
224
- export function tiptapToPortableText(doc: { type: string; content?: TiptapNode[] }): PortableTextContent {
224
+ export function tiptapToPortableText(doc: { type?: string; content?: TiptapNode[] }): PortableTextContent {
225
225
  if (!doc.content || doc.content.length === 0) {
226
226
  return [
227
227
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morphika/andami",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "Visual Page Builder — core library. A reusable website builder with visual editing, CMS integration, and asset management.",
5
5
  "type": "module",
6
6
  "license": "MIT",