From 1860b9c925993e2980016191648a174b99c7bbae Mon Sep 17 00:00:00 2001 From: Daniel Pokorny Date: Fri, 1 Nov 2024 17:11:07 +0100 Subject: [PATCH] refactor transformation to a single pass, remove unused utils --- src/parser/parser-models.ts | 2 + .../portable-text-transformer.ts | 464 +++++------- src/transformers/transformer-models.ts | 27 +- src/utils/common-utils.ts | 28 +- src/utils/constants.ts | 8 +- src/utils/resolution/html.ts | 2 +- src/utils/resolution/vue.ts | 2 +- src/utils/transformer-utils.ts | 128 ++-- .../portable-text-transformer.spec.ts.snap | 668 +++++------------- .../html-transformer.spec.ts | 2 +- .../mapi-transformer.spec.ts | 46 +- .../portable-text-transformer.spec.ts | 29 +- 12 files changed, 520 insertions(+), 886 deletions(-) diff --git a/src/parser/parser-models.ts b/src/parser/parser-models.ts index 15f55fd..e1be76e 100644 --- a/src/parser/parser-models.ts +++ b/src/parser/parser-models.ts @@ -73,6 +73,8 @@ export type ImgElementAttributes = { src: string; "data-asset-id": string; "data-image-id"?: string; + "data-asset-codename"?: string; + "data-asset-external-id"?: string; // TODO: ensure all potential attributes are accounted for alt?: string; }; diff --git a/src/transformers/portable-text-transformer/portable-text-transformer.ts b/src/transformers/portable-text-transformer/portable-text-transformer.ts index 91f0e58..f3ad00e 100644 --- a/src/transformers/portable-text-transformer/portable-text-transformer.ts +++ b/src/transformers/portable-text-transformer/portable-text-transformer.ts @@ -1,367 +1,259 @@ -import { PortableTextBlock, PortableTextListItemType } from "@portabletext/types"; - import { DomHtmlNode, DomNode, - FigureElementAttributes, + DomTextNode, + ImgElementAttributes, ObjectElementAttributes, ParseResult, } from "../../parser/index.js"; import { BlockElement, IgnoredElement, - MarkElement, - ModularContentType, + PortableTextComponentOrItem, + PortableTextExternalLink, + PortableTextImage, PortableTextItem, - PortableTextLink, + PortableTextItemLink, + PortableTextMark, PortableTextObject, + PortableTextSpan, PortableTextStrictBlock, + PortableTextStrictListItemBlock, PortableTextTable, + PortableTextTableCell, PortableTextTableRow, Reference, - ShortGuid, TextStyleElement, ValidElement, } from "../../transformers/index.js"; import { blockElements, - compose, - countChildTextNodes, createBlock, createComponentOrItemBlock, createExternalLink, createImageBlock, createItemLink, createListBlock, - createMark, createSpan, createTable, createTableCell, createTableRow, ignoredElements, isElement, + isExternalLink, isItemLink, isListBlock, - isListItem, - isNestedImg, isText, - isUnorderedListBlock, - lineBreakElement, - markElements, - MergePortableTextItemsFunction, + isValidElement, randomUUID, textStyleElements, - TransformElementFunction, - TransformFunction, - TransformLinkFunction, - TransformListItemFunction, - TransformTableCellFunction, - TransformTextFunction, + TransformNodeFunction, + traverseAndTransformNodes, } from "../../utils/index.js"; -/** - * Transforms a parsed tree into an array of Portable Text Blocks. - * - * This function takes the parsed tree of a rich text content, flattens it to an array of intermediate - * Portable Text Objects, and then composes and merges these objects into an array of Portable Text Blocks. - * - * @param {ParseResult} parsedTree The parsed tree structure representing the rich text content. - * @returns {PortableTextObject[]} An array of Portable Text Blocks representing the structured content. - */ -export const transformToPortableText = (parsedTree: ParseResult): PortableTextObject[] => - composeAndMerge(flatten(parsedTree.children)) as PortableTextObject[]; - -/** - * Iterates over the array of `PortableTextObjects` to find the last text block. If found, it adds a link item - * to its `markDef` array. If no text block is found (which can happen in structures like tables), a new text - * block is created with the link item and pushed to `mergedItems` array. - * - * @param {PortableTextItem[]} mergedItems - The array of PortableTextItems being processed. - * @param {PortableTextLink} linkItem - The link item (either internal or external) to be added to the text block's mark definitions. - */ -const handleLinks = ( - mergedItems: PortableTextItem[], - linkItem: PortableTextLink, -) => { - const lastBlock = mergedItems.findLast( - (item): item is PortableTextStrictBlock => item._type === "block", - ); - - if (lastBlock) { - (lastBlock.markDefs ||= []).push(linkItem); - } else { - mergedItems.push(createBlock(randomUUID(), [linkItem])); - } +type ListContext = { + depth: number; + type: "number" | "bullet" | "unknown"; }; -/** - * Merges spans and marks into an array of `PortableTextObjects`. - * - * @param {ReadonlyArray} itemsToMerge - The array of PortableTextItems to be merged. - * @returns {PortableTextItem[]} The array of PortableTextItems after merging spans and marks. - */ -const mergeSpansAndMarks: MergePortableTextItemsFunction = (itemsToMerge) => { - /** - * mutable array of tuples, each containing either a style mark or a guid reference to an anchor link, - * in a number corresponding to total number of child text nodes that the mark should affect. - */ - let markSets: (TextStyleElement | ShortGuid)[][] = []; - - return itemsToMerge.reduce((mergedItems, item) => { - switch (item._type) { - case "contentItemLink": - case "link": - handleLinks(mergedItems, item); - break; - case "mark": - markSets.push(Array(item.childCount).fill(item.value)); - break; - case "span": - /** - * mutate markSets array by popping a single mark from each tuple and assign it - * to the span's marks array. remove empty tuples. - */ - markSets = markSets.filter(marks => marks.length > 0); - item.marks = markSets.map(marks => marks.pop()).filter((mark): mark is TextStyleElement | ShortGuid => - Boolean(mark) - ); - mergedItems.push(item); - break; - default: - mergedItems.push(item); - break; - } - return mergedItems; - }, []); -}; - -const mergeBlocksAndSpans: MergePortableTextItemsFunction = (itemsToMerge) => - itemsToMerge.reduce((mergedItems, item) => { - const lastItem = mergedItems[mergedItems.length - 1]; - if (item._type === "span" && lastItem && lastItem._type === "block") { - lastItem.children.push(item); - } else { - mergedItems.push(item); - } - return mergedItems; - }, []); - -const mergeTablesAndRows: MergePortableTextItemsFunction = (itemsToMerge) => - itemsToMerge.reduce((mergedItems, item) => { - if (item._type === "row") { - const tableBlock = mergedItems[mergedItems.length - 1] as PortableTextTable; - tableBlock.rows.push(item); - } else { - mergedItems.push(item); - } - return mergedItems; - }, []); - -const mergeRowsAndCells: MergePortableTextItemsFunction = (itemsToMerge) => - itemsToMerge.reduce((mergedItems, item) => { - if (item._type === "cell") { - const tableRow = mergedItems[mergedItems.length - 1] as PortableTextTableRow; - tableRow.cells.push(item); - } else { - mergedItems.push(item); - } - return mergedItems; - }, []); - -const composeAndMerge = compose(mergeTablesAndRows, mergeRowsAndCells, mergeBlocksAndSpans, mergeSpansAndMarks); - -/** - * Recursively traverses a tree structure, converting each `DomNode` into its corresponding `PortableTextItem` using an appropriate method from `transformMap`. - * The output is a flattened array, specifically organized for later merging operations. - * - * @param {DomNode[]} nodes - The array of DomNodes to be flattened. - * @param {number} [depth=0] - The current depth in the tree, used for list items. - * @param {DomHtmlNode} [lastListElement] - The last processed list element, used for tracking nested lists. - * @param {PortableTextListItemType} [listType] - The type of the current list being processed (bullet or number). - * @returns {PortableTextItem[]} The flattened array of PortableTextItems. - */ -const flatten = ( - nodes: DomNode[], - depth = 0, - lastListElement?: DomHtmlNode, - listType?: PortableTextListItemType, -): PortableTextItem[] => - nodes.flatMap((node: DomNode): PortableTextItem[] => { - let currentListType = listType; - - if (isElement(node)) { - if (node.tagName === "td") { - return transformTableCell(node); - } - - if (isListBlock(node)) { - lastListElement = node; - currentListType = isUnorderedListBlock(node) ? "bullet" : "number"; - } - - if (isListItem(node)) { - // set depth to 1 for the first list item, increment for each nested list - if (lastListElement && isListBlock(lastListElement)) { - depth++; - } - // ensures depth remains the same until a nested listBlock is found - lastListElement = undefined; +type NodeToPortableText = TransformNodeFunction; + +const categorizeItems = (items: PortableTextItem[]) => + items.reduce( + (acc, item) => { + const categoryMap: Record = { + link: acc.links, + contentItemLink: acc.contentItemLinks, + span: acc.spans, + mark: acc.marks, + cell: acc.cells, + row: acc.rows, + image: acc.images, + componentOrItem: acc.componentsOrItems, + table: acc.tables, + block: acc.blocks, + reference: acc.references, + }; + + if (item._type === "block") { + (item.listItem ? acc.listBlocks : acc.blocks).push(item); + } else { + categoryMap[item._type]?.push(item); } - // Recursively flatten children and concatenate with the transformed node. - const transformedNode = transformNode(node, depth, currentListType); - const transformedChildren = flatten(node.children, depth, lastListElement, currentListType); - - return [...transformedNode, ...transformedChildren]; - } + return acc; + }, + { + links: [] as PortableTextExternalLink[], + contentItemLinks: [] as PortableTextItemLink[], + spans: [] as PortableTextSpan[], + listBlocks: [] as PortableTextStrictListItemBlock[], + blocks: [] as PortableTextStrictBlock[], + marks: [] as PortableTextMark[], + cells: [] as PortableTextTableCell[], + rows: [] as PortableTextTableRow[], + images: [] as PortableTextImage[], + componentsOrItems: [] as PortableTextComponentOrItem[], + tables: [] as PortableTextTable[], + references: [] as Reference[], + }, + ); - return [transformText(node)]; - }); +const updateListContext = (node: DomNode, context: ListContext): ListContext => + (isElement(node) && isListBlock(node)) + ? { depth: context.depth + 1, type: node.tagName === "ol" ? "number" : "bullet" } + : context; -const transformNode = (node: DomNode, depth: number, listType?: PortableTextListItemType): PortableTextItem[] => - isText(node) ? [transformText(node)] : transformElement(node, depth, listType); +const transformLineBreak: NodeToPortableText = () => [createSpan(randomUUID(), [], "\n")]; -const transformElement = ( - node: DomHtmlNode, - depth: number, - listType?: PortableTextListItemType, -): PortableTextItem[] => { - const transformFunction = transformMap[node.tagName as ValidElement]; +const transformListItem: NodeToPortableText = (_, processedItems, listContext) => { + const { + links, + contentItemLinks, + spans, + listBlocks, + } = categorizeItems(processedItems); - return listType !== undefined - ? (transformFunction as TransformListItemFunction)(node, depth, listType) - : (transformFunction as TransformElementFunction)(node); + return [ + createListBlock( + randomUUID(), + listContext?.depth, + listContext?.type, + [...links, ...contentItemLinks], + "normal", + spans, + ), + // any existing listBlocks need to be returned as well, because of nested lists + ...listBlocks, + ]; }; -const transformImage: TransformElementFunction = (node) => { - const imageTag = node.children[0]; +const transformBlockElement: NodeToPortableText = (node, processedItems) => { + const { + spans, + links, + contentItemLinks, + } = categorizeItems(processedItems); - if (!isNestedImg(imageTag)) { - throw new Error("Expected the first child of
to be an element."); - } + return [ + createBlock(randomUUID(), [...links, ...contentItemLinks], node.tagName === "p" ? "normal" : node.tagName, spans), + ]; +}; - const block = createImageBlock( - randomUUID(), - node.attributes["data-asset-id"], - imageTag.attributes.src, - imageTag.attributes.alt, +const transformMarkElement: NodeToPortableText = (node, processedItems) => { + const { + links, + contentItemLinks, + spans, + } = categorizeItems(processedItems); + + const key = randomUUID(); + const mark = isExternalLink(node) + ? (links.push(createExternalLink(key, node.attributes)), key) + : isItemLink(node) + ? (contentItemLinks.push(createItemLink(key, node.attributes["data-item-id"])), key) + : node.tagName; + + const updatedSpans = spans.map( + s => ({ ...s, marks: [...(s.marks ?? []), mark] } as PortableTextSpan), ); - return [block]; + return [...updatedSpans, ...links, ...contentItemLinks]; }; -const transformTableCell: TransformTableCellFunction = (node) => { - const cellContent = flatten(node.children); - const firstChild = node.children[0]; - const requiresNewBlock = !firstChild - || isText(firstChild) - || firstChild.tagName === lineBreakElement - || markElements.includes(firstChild.tagName as MarkElement); - - /** - * cell content may not start with

but can be directly text, - * styled text (e.g. ), anchor or a line break. - * in such cases, a block has to be created manually first. - */ - if (requiresNewBlock) { - cellContent.unshift(createBlock(randomUUID())); - } - - const mergedCellContent = composeAndMerge(cellContent); - const tableCell = createTableCell(randomUUID(), mergedCellContent.length); - tableCell.content = mergedCellContent as PortableTextBlock[]; - - return [tableCell]; -}; +const transformImage: NodeToPortableText> = (node) => [ + createImageBlock( + randomUUID(), + node.attributes["data-asset-id"], + node.attributes["src"], + node.attributes["alt"], + ), +]; -const transformComponentOrItem: TransformElementFunction = ( - node, -) => { - // data-codename reference is for DAPI, data-id for MAPI - const itemReference: Reference = { +const transformLinkedItemOrComponent: NodeToPortableText> = (node) => { + const itemComponentReference: Reference = { _type: "reference", _ref: node.attributes["data-codename"] || node.attributes["data-id"], }; + const modularContentType = node.attributes["data-rel"] ?? node.attributes["data-type"]; - /** - * data-rel is only present in DAPI and acts as a differentiator - * between component and linked item in rich text - * - * data-type is present in both DAPI and MAPI but differentiates - * only in the latter - */ - const modularContentType = node.attributes["data-rel"] ?? node.attributes["data-type"] as ModularContentType; - - return [ - createComponentOrItemBlock(randomUUID(), itemReference, modularContentType), - ]; + return [createComponentOrItemBlock(randomUUID(), itemComponentReference, modularContentType)]; }; -const transformLink: TransformLinkFunction = (node) => { - const linkId = randomUUID(); - const link = isItemLink(node) - ? createItemLink(linkId, node.attributes["data-item-id"]) - : createExternalLink(linkId, node.attributes); - - const mark = createMark(randomUUID(), link._key, countChildTextNodes(node)); +const transformTableCell: NodeToPortableText = (_, processedItems) => { + const { + links, + contentItemLinks, + spans, + } = categorizeItems(processedItems); - return [link, mark]; -}; - -const transformTable: TransformElementFunction = (node) => { - const tableBody = node.children[0] as DomHtmlNode; - if (tableBody.tagName !== "tbody") { - throw new Error("Expected the first child to be a element."); + if (!spans.length) { + return [createTableCell(randomUUID(), processedItems)]; } + // in case there are orphaned spans (can happen as table cell content can be directly text, without any enclosing block tag such as

) + const block = createBlock(randomUUID(), [...links, ...contentItemLinks], "normal", spans); - const tableRow = tableBody.children[0] as DomHtmlNode; - if (tableRow.tagName !== "tr") { - throw new Error("Expected the first child of to be a element."); - } + return [createTableCell(randomUUID(), [block])]; +}; - const numCols = tableRow.children.length; +const transformTableRow: NodeToPortableText = (_, processedItems) => { + const { cells } = categorizeItems(processedItems); - return [createTable(randomUUID(), numCols)]; + return [createTableRow(randomUUID(), cells)]; }; -const transformTableRow: TransformElementFunction = (): PortableTextTableRow[] => [createTableRow(randomUUID())]; +const transformTable: NodeToPortableText = (_, processedItems) => { + const { rows } = categorizeItems(processedItems); -const transformText: TransformTextFunction = (node) => createSpan(randomUUID(), [], node.content); - -const transformBlock: TransformElementFunction = ( - node, -) => [createBlock(randomUUID(), undefined, node.tagName === "p" ? "normal" : node.tagName)]; + return [createTable(randomUUID(), rows)]; +}; -const transformTextMark: TransformElementFunction = ( - node, -) => [createMark(randomUUID(), node.tagName as TextStyleElement, countChildTextNodes(node))]; +const ignoreElement: NodeToPortableText = (_, processedItems) => processedItems; -const transformLineBreak: TransformElementFunction = () => [createSpan(randomUUID(), [], "\n")]; +const transformElement: NodeToPortableText = (node, processedItems, listContext) => + transformMap[node.tagName as ValidElement](node, processedItems, listContext); -const transformListItem: TransformListItemFunction = ( - _, - depth, - listType, -) => [createListBlock(randomUUID(), depth, listType)]; +const transformText: NodeToPortableText = (node) => [createSpan(randomUUID(), [], node.content)]; -const ignoreElement: TransformElementFunction = () => []; +const toPortableText: NodeToPortableText = (node, processedItems, listContext) => + isText(node) + ? transformText(node, processedItems) + : isValidElement(node) + ? transformElement(node, processedItems, listContext) + : []; -const transformMap: Record = { - ...Object.fromEntries( - blockElements.map(tagName => [tagName, transformBlock]), - ) as Record, - ...Object.fromEntries( - textStyleElements.map(tagName => [tagName, transformTextMark]), - ) as Record, - ...Object.fromEntries( - ignoredElements.map(tagName => [tagName, ignoreElement]), - ) as Record, - a: transformLink, +/** + * Transforms a parsed tree into an array of Portable Text Blocks. + * + * @param {ParseResult} parsedTree The parsed tree structure representing the rich text content. + * @returns {PortableTextObject[]} An array of Portable Text Blocks representing the structured content. + */ +export const transformToPortableText = ( + parsedTree: ParseResult, +): PortableTextObject[] => + traverseAndTransformNodes( + parsedTree.children, + toPortableText, + { depth: 0, type: "unknown" }, // initialization of list transformation context + updateListContext, + ) as PortableTextObject[]; // TODO: examine why as PortableTextObject[] was required, update jsdoc + +const transformMap: Record>> = { + ...(Object.fromEntries( + blockElements.map((tagName) => [tagName, transformBlockElement]), + ) as Record>), + ...(Object.fromEntries( + textStyleElements.map((tagName) => [tagName, transformMarkElement]), + ) as Record>), + ...(Object.fromEntries( + ignoredElements.map((tagName) => [tagName, ignoreElement]), + ) as Record>), + a: transformMarkElement, li: transformListItem, table: transformTable, tr: transformTableRow, td: transformTableCell, br: transformLineBreak, - figure: transformImage, - object: transformComponentOrItem, + img: transformImage, + object: transformLinkedItemOrComponent, }; diff --git a/src/transformers/transformer-models.ts b/src/transformers/transformer-models.ts index 428ce89..58472db 100644 --- a/src/transformers/transformer-models.ts +++ b/src/transformers/transformer-models.ts @@ -6,7 +6,14 @@ import { PortableTextSpan, } from "@portabletext/types"; -import { allElements, blockElements, ignoredElements, markElements, textStyleElements } from "../index.js"; +import { + blockElements, + ignoredElements, + listTypeElements, + markElements, + textStyleElements, + validElements, +} from "../index.js"; /** * A reference to various Kontent.ai objects in rich text @@ -31,6 +38,10 @@ export interface AssetReference extends Reference { * Alternate image text. */ alt?: string; + /** + * Type of reference (codename, id or external id) + */ + referenceType?: "codename" | "external-id" | "id"; // TODO: add referenceType to image block, check API output when asset is added via

element alone } /** @@ -67,10 +78,6 @@ export interface PortableTextImage extends ArbitraryTypedObject { */ export interface PortableTextTable extends ArbitraryTypedObject { _type: "table"; - /** - * The number of columns the table has. - */ - numColumns: number; /** * Array of table row objects. */ @@ -93,15 +100,10 @@ export interface PortableTextTableRow extends ArbitraryTypedObject { */ export interface PortableTextTableCell extends ArbitraryTypedObject { _type: "cell"; - /** - * Number of blocks that belong to a table cell. - * Helps with table resolution. - */ - childBlocksCount: number; /** * All blocks belonging to a cell. */ - content: PortableTextBlock[]; + content: PortableTextItem[]; } /** @@ -202,5 +204,6 @@ export type TextStyleElement = typeof textStyleElements[number]; export type BlockElement = typeof blockElements[number]; export type IgnoredElement = typeof ignoredElements[number]; export type MarkElement = typeof markElements[number]; -export type ValidElement = typeof allElements[number]; +export type ValidElement = typeof validElements[number]; +export type ListTypeElement = typeof listTypeElements[number]; export type ShortGuid = string; diff --git a/src/utils/common-utils.ts b/src/utils/common-utils.ts index ba901f8..e7cfc12 100644 --- a/src/utils/common-utils.ts +++ b/src/utils/common-utils.ts @@ -1,11 +1,17 @@ import { + BlockElement, + blockElements, DomHtmlNode, DomNode, DomTextNode, FigureElementAttributes, ImgElementAttributes, ItemLinkElementAttributes, + MarkElement, + markElements, ObjectElementAttributes, + ValidElement, + validElements, } from "../index.js"; export const isOrderedListBlock = (node: DomHtmlNode): boolean => node.tagName === "ol"; @@ -24,6 +30,15 @@ export const isTableCell = (node: DomHtmlNode): boolean => isElement(node) && no export const isLineBreak = (node: DomHtmlNode): boolean => isElement(node) && node.tagName === "br"; +export const isBlockElement = (node: DomHtmlNode): boolean => + isElement(node) && blockElements.includes(node.tagName as BlockElement); + +export const isValidElement = (node: DomHtmlNode): boolean => + isElement(node) && validElements.includes(node.tagName as ValidElement); + +export const isMarkElement = (node: DomHtmlNode): boolean => + isElement(node) && markElements.includes(node.tagName as MarkElement); + /** * Returns `true` for text nodes and type guards the node as `DomTextNode`. */ @@ -37,7 +52,7 @@ export const isElement = (node: DomNode): node is DomHtmlNode => node.type === " /** * Returns `true` if the node is a linked item node (``) and narrows type guard. */ -export const isLinkedItem = (node: DomNode): node is DomHtmlNode => +export const isLinkedItemOrComponent = (node: DomNode): node is DomHtmlNode => isElement(node) && node.tagName === "object" && node.attributes["type"] === "application/kenticocloud"; @@ -65,17 +80,6 @@ export const isNestedImg = (node?: DomNode): node is DomHtmlNode - node.type === "text" - ? 1 - : node.children.reduce((count, child) => count + countChildTextNodes(child), 0); - export const throwError = (msg: string) => { throw new Error(msg); }; diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 33f72d3..7e8249f 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -1,18 +1,20 @@ export const textStyleElements = ["strong", "em", "sub", "sup", "code"] as const; export const blockElements = ["p", "h1", "h2", "h3", "h4", "h5", "h6"] as const; -export const ignoredElements = ["img", "tbody", "ol", "ul"] as const; export const tableElements = ["table", "td", "tr"] as const; export const lineBreakElement = "br" as const; export const anchorElement = "a" as const; export const objectElement = "object" as const; -export const assetElement = "figure" as const; +export const assetElement = "img" as const; export const listItemElement = "li" as const; +export const listTypeElements = ["ul", "ol"] as const; +export const ignoredElements = ["figure", "tbody", ...listTypeElements] as const; export const markElements = [...textStyleElements, anchorElement] as const; -export const allElements = [ +export const validElements = [ ...blockElements, ...ignoredElements, ...markElements, ...tableElements, + ...listTypeElements, assetElement, objectElement, lineBreakElement, diff --git a/src/utils/resolution/html.ts b/src/utils/resolution/html.ts index f4c1a3c..63ecb68 100644 --- a/src/utils/resolution/html.ts +++ b/src/utils/resolution/html.ts @@ -15,7 +15,7 @@ export const resolveTable = ( resolver: (value: PortableTextBlock[]) => string, ) => { const renderCell = (cell: PortableTextTableCell) => { - const cellContent = resolver(cell.content); + const cellContent = resolver(cell.content); // TODO: fix types return `${cellContent}`; }; diff --git a/src/utils/resolution/vue.ts b/src/utils/resolution/vue.ts index 643fa13..a85f2bd 100644 --- a/src/utils/resolution/vue.ts +++ b/src/utils/resolution/vue.ts @@ -17,7 +17,7 @@ export const resolveTable = ( resolver: (value: PortableTextBlock[]) => string, ) => { const renderCell = (cell: PortableTextTableCell) => { - const cellContent = resolver(cell.content); + const cellContent = resolver(cell.content); // TODO: fix types return vueRenderFunction("td", {}, cellContent); }; diff --git a/src/utils/transformer-utils.ts b/src/utils/transformer-utils.ts index 07b4ada..175637b 100644 --- a/src/utils/transformer-utils.ts +++ b/src/utils/transformer-utils.ts @@ -7,8 +7,7 @@ import { } from "@portabletext/types"; import ShortUniqueId from "short-unique-id"; -import { isElement } from "../index.js"; -import { DomHtmlNode, DomNode, DomTextNode } from "../parser/index.js"; +import { DomNode } from "../parser/index.js"; import { ModularContentType, PortableTextComponentOrItem, @@ -16,7 +15,6 @@ import { PortableTextImage, PortableTextItem, PortableTextItemLink, - PortableTextLink, PortableTextMark, PortableTextObject, PortableTextStrictBlock, @@ -29,23 +27,47 @@ import { TextStyleElement, } from "../transformers/index.js"; -export type TransformLinkFunction> = ( - node: DomHtmlNode, -) => [PortableTextLink, PortableTextMark]; -export type TransformElementFunction> = ( - node: DomHtmlNode, -) => PortableTextItem[]; -export type TransformListItemFunction = ( - node: DomHtmlNode, - depth: number, - listType: PortableTextListItemType, -) => PortableTextStrictListItemBlock[]; -export type TransformTextFunction = (node: DomTextNode) => PortableTextSpan; -export type TransformTableCellFunction = (node: DomHtmlNode) => PortableTextItem[]; -export type TransformFunction = TransformElementFunction | TransformListItemFunction; - -export type MergePortableTextItemsFunction = (itemsToMerge: ReadonlyArray) => PortableTextItem[]; -export type ResolverFunction = (value: T) => string; +export type ResolverFunction = ( + value: T, +) => string; + +export type TransformNodeFunction = ( + node: T, + processedItems: V[], + context?: U, +) => V[]; + +/** + * Recursively traverses an array of `DomNode` elements, transforming each node using the provided `transform` function. + * You can optionally provide a context object and a handler to update it before a node is processed. + * + * @template TContext - The type of the context object used during traversal. + * + * @param {DomNode[]} nodes - The array of `DomNode` elements to traverse and transform. + * @param {TransformNodeFunction} transform - The function applied to each node to transform it. + * @param {TContext} [context={}] - The initial context object passed to the `transform` function and updated by the `contextHandler` empty object by default. + * @param {(node: DomNode, context: TContext) => TContext} [contextHandler] - An optional function that updates the context based on the current node. + * + * @returns {ReturnType} - The transformed result after applying the `transform` function to all nodes. + * + * @remarks + * - The function traverses the nodes in a depth-first manner. + * - If a `contextHandler` is provided, it **clones** and updates the context before passing it to child nodes traversal. + */ +export const traverseAndTransformNodes = ( + nodes: DomNode[], + transform: TransformNodeFunction, + context: TContext = {} as TContext, + contextHandler?: (node: DomNode, context: TContext) => TContext, +): ReturnType => + nodes.flatMap(node => { + const updatedContext = contextHandler?.(node, context) ?? {...context}; + const children = node.type === "tag" + ? traverseAndTransformNodes(node.children, transform, updatedContext, contextHandler) + : []; + + return transform(node, children, updatedContext); + }); /** * Recursively traverses and optionally transforms a Portable Text structure using a provided @@ -84,26 +106,6 @@ export const traversePortableText = < }); }; -/** - * Recursively traverses a tree of DomNodes, applies a transformation callback to each node, - * and returns a flattened array of transformed items. - * - * @param nodes - The array of DomNodes to traverse. - * @param callback - A function that transforms a DomNode into a desired type T. Returns null or undefined to skip the node. - * @returns An array of transformed items of type T. - */ -export const traverseJsonTree = ( - nodes: DomNode[], - callback: (node: DomNode) => T | null | undefined, -): T[] => - nodes.flatMap((node) => { - const transformed = callback(node); - const children = isElement(node) - ? traverseJsonTree(node.children, callback) - : []; - return transformed ? [transformed, ...children] : children; - }); - export const createSpan = ( guid: ShortGuid, marks?: string[], @@ -130,8 +132,8 @@ export const createBlock = ( export const createListBlock = ( guid: ShortGuid, - level: number, - listItem: PortableTextListItemType, + level?: number, + listItem?: PortableTextListItemType, markDefs?: PortableTextMarkDefinition[], style?: string, children?: PortableTextSpan[], @@ -140,12 +142,17 @@ export const createListBlock = ( _key: guid, markDefs: markDefs || [], level: level, - listItem: listItem, + listItem: listItem ?? "unknown", style: style || "normal", children: children || [], }); -export const createImageBlock = (guid: ShortGuid, reference: string, url: string, alt?: string): PortableTextImage => ({ +export const createImageBlock = ( + guid: ShortGuid, + reference: string, + url: string, + alt?: string, +): PortableTextImage => ({ _type: "image", _key: guid, asset: { @@ -156,16 +163,6 @@ export const createImageBlock = (guid: ShortGuid, reference: string, url: string }, }); -export const createTableBlock = ( - guid: ShortGuid, - columns: number, -): PortableTextTable => ({ - _type: "table", - _key: guid, - numColumns: columns, - rows: [], -}); - export const createExternalLink = ( guid: ShortGuid, attributes: Readonly>, @@ -189,28 +186,26 @@ export const createItemLink = ( export const createTable = ( guid: ShortGuid, - numColumns: number, + rows?: PortableTextTableRow[], ): PortableTextTable => ({ _key: guid, _type: "table", - numColumns: numColumns, - rows: [], + rows: rows ?? [], }); -export const createTableRow = (guid: ShortGuid): PortableTextTableRow => ({ +export const createTableRow = (guid: ShortGuid, cells?: PortableTextTableCell[]): PortableTextTableRow => ({ _key: guid, _type: "row", - cells: [], + cells: cells ?? [], }); export const createTableCell = ( guid: ShortGuid, - childCount: number, + content?: PortableTextItem[], ): PortableTextTableCell => ({ _key: guid, _type: "cell", - content: [], - childBlocksCount: childCount, + content: content ?? [], }); export const createMark = ( @@ -235,15 +230,6 @@ export const createComponentOrItemBlock = ( component: reference, }); -export const compose = ( - firstFunction: (argument: T) => T, - ...functions: ReadonlyArray<(argument: T) => T> -) => - functions.reduce( - (previousFunction, nextFunction) => (value) => previousFunction(nextFunction(value)), - firstFunction, - ); - export const getAllNewLineAndWhiteSpace = /\n\s*/g; export const { randomUUID } = new ShortUniqueId({ length: 10 }); diff --git a/tests/transfomers/portable-text-transformer/__snapshots__/portable-text-transformer.spec.ts.snap b/tests/transfomers/portable-text-transformer/__snapshots__/portable-text-transformer.spec.ts.snap index c6fbab6..729cb20 100644 --- a/tests/transfomers/portable-text-transformer/__snapshots__/portable-text-transformer.spec.ts.snap +++ b/tests/transfomers/portable-text-transformer/__snapshots__/portable-text-transformer.spec.ts.snap @@ -51,8 +51,8 @@ exports[`Portable Text Transformer doesn't extend link mark to adjacent spans 1` "_key": "guid", "_type": "span", "marks": [ - "guid", "strong", + "guid", ], "text": "today", }, @@ -98,7 +98,6 @@ exports[`Portable Text Transformer extends link nested in a table with additiona { "_key": "guid", "_type": "table", - "numColumns": 1, "rows": [ { "_key": "guid", @@ -107,7 +106,6 @@ exports[`Portable Text Transformer extends link nested in a table with additiona { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -146,7 +144,6 @@ exports[`Portable Text Transformer resolves adjacent styled fonts in table cell { "_key": "guid", "_type": "table", - "numColumns": 1, "rows": [ { "_key": "guid", @@ -155,7 +152,6 @@ exports[`Portable Text Transformer resolves adjacent styled fonts in table cell { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -444,6 +440,63 @@ exports[`Portable Text Transformer transforms a linked item and a component from ] `; +exports[`Portable Text Transformer transforms a simple table 1`] = ` +[ + { + "_key": "guid", + "_type": "table", + "rows": [ + { + "_key": "guid", + "_type": "row", + "cells": [ + { + "_key": "guid", + "_type": "cell", + "content": [ + { + "_key": "guid", + "_type": "block", + "children": [ + { + "_key": "guid", + "_type": "span", + "marks": [], + "text": "hello world", + }, + ], + "markDefs": [], + "style": "normal", + }, + ], + }, + { + "_key": "guid", + "_type": "cell", + "content": [ + { + "_key": "guid", + "_type": "block", + "children": [ + { + "_key": "guid", + "_type": "span", + "marks": [], + "text": "hello second world", + }, + ], + "markDefs": [], + "style": "normal", + }, + ], + }, + ], + }, + ], + }, +] +`; + exports[`Portable Text Transformer transforms asset from MAPI 1`] = ` [ { @@ -464,7 +517,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "table", - "numColumns": 1, "rows": [ { "_key": "guid", @@ -473,7 +525,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 2, "content": [ { "_key": "guid", @@ -516,7 +567,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "table", - "numColumns": 3, "rows": [ { "_key": "guid", @@ -525,7 +575,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 2, "content": [ { "_key": "guid", @@ -560,7 +609,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -583,7 +631,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -601,8 +648,8 @@ exports[`Portable Text Transformer transforms complex rich text into portable te "_key": "guid", "_type": "span", "marks": [ - "guid", "strong", + "guid", ], "text": "strong", }, @@ -639,7 +686,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -662,7 +708,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -683,7 +728,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -710,7 +754,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -733,7 +776,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -754,7 +796,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -798,8 +839,8 @@ exports[`Portable Text Transformer transforms complex rich text into portable te "_key": "guid", "_type": "span", "marks": [ - "guid", "strong", + "guid", ], "text": "bold", }, @@ -903,8 +944,8 @@ exports[`Portable Text Transformer transforms external links 1`] = ` "_key": "guid", "_type": "span", "marks": [ - "guid", "strong", + "guid", ], "text": "GitHub repository.", }, @@ -974,8 +1015,8 @@ exports[`Portable Text Transformer transforms item links 1`] = ` "_key": "guid", "_type": "span", "marks": [ - "guid", "strong", + "guid", ], "text": "link to an item", }, @@ -995,6 +1036,43 @@ exports[`Portable Text Transformer transforms item links 1`] = ` ] `; +exports[`Portable Text Transformer transforms list with two items 1`] = ` +[ + { + "_key": "guid", + "_type": "block", + "children": [ + { + "_key": "guid", + "_type": "span", + "marks": [], + "text": "first", + }, + ], + "level": 1, + "listItem": "bullet", + "markDefs": [], + "style": "normal", + }, + { + "_key": "guid", + "_type": "block", + "children": [ + { + "_key": "guid", + "_type": "span", + "marks": [], + "text": "second", + }, + ], + "level": 1, + "listItem": "bullet", + "markDefs": [], + "style": "normal", + }, +] +`; + exports[`Portable Text Transformer transforms lists 1`] = ` [ { @@ -1114,6 +1192,46 @@ exports[`Portable Text Transformer transforms lists 1`] = ` ] `; +exports[`Portable Text Transformer transforms minimal rich text 1`] = ` +[ + { + "_key": "guid", + "_type": "block", + "children": [ + { + "_key": "guid", + "_type": "span", + "marks": [], + "text": "minimal", + }, + ], + "markDefs": [], + "style": "normal", + }, +] +`; + +exports[`Portable Text Transformer transforms minimal rich text with formatting 1`] = ` +[ + { + "_key": "guid", + "_type": "block", + "children": [ + { + "_key": "guid", + "_type": "span", + "marks": [ + "strong", + ], + "text": "minimal", + }, + ], + "markDefs": [], + "style": "normal", + }, +] +`; + exports[`Portable Text Transformer transforms nested styles 1`] = ` [ { @@ -1132,8 +1250,8 @@ exports[`Portable Text Transformer transforms nested styles 1`] = ` "_key": "guid", "_type": "span", "marks": [ - "em", "strong", + "em", ], "text": "also italic and this is also ", }, @@ -1141,9 +1259,9 @@ exports[`Portable Text Transformer transforms nested styles 1`] = ` "_key": "guid", "_type": "span", "marks": [ - "em", - "strong", "sup", + "strong", + "em", ], "text": "superscript", }, @@ -1154,6 +1272,27 @@ exports[`Portable Text Transformer transforms nested styles 1`] = ` ] `; +exports[`Portable Text Transformer transforms simplest list 1`] = ` +[ + { + "_key": "guid", + "_type": "block", + "children": [ + { + "_key": "guid", + "_type": "span", + "marks": [], + "text": "some text", + }, + ], + "level": 1, + "listItem": "bullet", + "markDefs": [], + "style": "normal", + }, +] +`; + exports[`Portable Text Transformer transforms tables with input

Text

Bold text

Bold text with itallic in it

@@ -1256,8 +1395,8 @@ exports[`Portable Text Transformer transforms tables with input

Text

"_key": "guid", "_type": "span", "marks": [ - "em", "strong", + "em", ], "text": "with itallic", }, @@ -1289,8 +1428,8 @@ exports[`Portable Text Transformer transforms tables with input

Text

"_key": "guid", "_type": "span", "marks": [ - "em", "strong", + "em", ], "text": "over", }, @@ -1344,8 +1483,8 @@ exports[`Portable Text Transformer transforms tables with input

Text

"_key": "guid", "_type": "span", "marks": [ - "strong", "sub", + "strong", ], "text": "li", }, @@ -1353,10 +1492,10 @@ exports[`Portable Text Transformer transforms tables with input

Text

"_key": "guid", "_type": "span", "marks": [ - "guid", - "em", - "strong", "sub", + "strong", + "em", + "guid", ], "text": "s", }, @@ -1364,8 +1503,8 @@ exports[`Portable Text Transformer transforms tables with input

Text

"_key": "guid", "_type": "span", "marks": [ - "guid", "em", + "guid", ], "text": "t with s", }, @@ -1516,7 +1655,6 @@ exports[`Portable Text Transformer transforms tables with input

Text

{ "_key": "guid", "_type": "table", - "numColumns": 3, "rows": [ { "_key": "guid", @@ -1525,7 +1663,6 @@ exports[`Portable Text Transformer transforms tables with input

Text

{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -1546,7 +1683,6 @@ exports[`Portable Text Transformer transforms tables with input

Text

{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -1581,7 +1717,6 @@ exports[`Portable Text Transformer transforms tables with input

Text

{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -1628,7 +1763,6 @@ exports[`Portable Text Transformer transforms tables with input

Text

{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -1652,8 +1786,8 @@ exports[`Portable Text Transformer transforms tables with input

Text

"_key": "guid", "_type": "span", "marks": [ - "guid", "em", + "guid", ], "text": "ith lin", }, @@ -1689,7 +1823,6 @@ exports[`Portable Text Transformer transforms tables with input

Text

{ "_key": "guid", "_type": "cell", - "childBlocksCount": 3, "content": [ { "_key": "guid", @@ -1750,7 +1883,6 @@ exports[`Portable Text Transformer transforms tables with input

Text

{ "_key": "guid", "_type": "cell", - "childBlocksCount": 9, "content": [ { "_key": "guid", @@ -1906,7 +2038,6 @@ exports[`Portable Text Transformer transforms tables with input

Text

{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -1927,7 +2058,6 @@ exports[`Portable Text Transformer transforms tables with input

Text

{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -1948,7 +2078,6 @@ exports[`Portable Text Transformer transforms tables with input

Text

{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2021,7 +2150,6 @@ exports[`Portable Text Transformer transforms tables with input { "_key": "guid", "_type": "table", - "numColumns": 6, "rows": [ { "_key": "guid", @@ -2030,7 +2158,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2051,7 +2178,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2072,7 +2198,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2093,7 +2218,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2114,7 +2238,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2135,7 +2258,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2162,7 +2284,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2183,7 +2304,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2204,7 +2324,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2225,7 +2344,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2246,7 +2364,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2267,7 +2384,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2294,7 +2410,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2315,7 +2430,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2336,7 +2450,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2357,7 +2470,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2378,7 +2490,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2399,7 +2510,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2426,7 +2536,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2447,7 +2556,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2468,7 +2576,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2489,7 +2596,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2510,7 +2616,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2531,7 +2636,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2558,7 +2662,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2579,7 +2682,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2600,7 +2702,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2621,7 +2722,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2642,7 +2742,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2663,7 +2762,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2736,7 +2834,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "table", - "numColumns": 3, "rows": [ { "_key": "guid", @@ -2745,7 +2842,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2767,7 +2863,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 2, "content": [ { "_key": "guid", @@ -2777,8 +2872,8 @@ exports[`Portable Text Transformer transforms tables with input
"_key": "guid", "_type": "span", "marks": [ - "guid", "strong", + "guid", ], "text": "NanoBlade X", }, @@ -2810,7 +2905,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 2, "content": [ { "_key": "guid", @@ -2820,8 +2914,8 @@ exports[`Portable Text Transformer transforms tables with input
"_key": "guid", "_type": "span", "marks": [ - "guid", "strong", + "guid", ], "text": "NanoBlade V", }, @@ -2859,7 +2953,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2880,7 +2973,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2901,7 +2993,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2928,7 +3019,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2949,7 +3039,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2985,7 +3074,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3012,7 +3100,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3033,7 +3120,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3062,7 +3148,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3089,7 +3174,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3119,7 +3203,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 4, "content": [ { "_key": "guid", @@ -3190,7 +3273,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3241,7 +3323,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "table", - "numColumns": 20, "rows": [ { "_key": "guid", @@ -3250,7 +3331,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3272,7 +3352,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3294,7 +3373,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3316,7 +3394,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3338,7 +3415,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3360,7 +3436,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3382,7 +3457,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3404,7 +3478,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3426,7 +3499,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3448,7 +3520,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3470,7 +3541,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3492,7 +3562,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3514,7 +3583,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3536,7 +3604,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3558,7 +3625,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3580,7 +3646,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3602,7 +3667,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3624,7 +3688,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3646,7 +3709,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3668,7 +3730,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3696,7 +3757,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3718,7 +3778,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3740,7 +3799,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3762,7 +3820,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3784,7 +3841,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3806,7 +3862,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3828,7 +3883,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3850,7 +3904,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3872,7 +3925,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3894,7 +3946,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3916,7 +3967,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3938,7 +3988,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3960,7 +4009,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3982,7 +4030,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4004,7 +4051,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4026,7 +4072,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4048,7 +4093,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4070,7 +4114,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4092,7 +4135,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4114,7 +4156,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4142,7 +4183,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4164,7 +4204,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4186,7 +4225,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4208,7 +4246,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4230,7 +4267,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4252,7 +4288,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4274,7 +4309,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4296,7 +4330,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4318,7 +4351,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4340,7 +4372,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4362,7 +4393,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4384,7 +4414,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4406,7 +4435,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4428,7 +4456,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4450,7 +4477,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4472,7 +4498,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4494,7 +4519,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4516,7 +4540,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4538,7 +4561,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4560,7 +4582,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4588,7 +4609,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4610,7 +4630,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4632,7 +4651,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4654,7 +4672,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4676,7 +4693,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4698,7 +4714,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4720,7 +4735,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4742,7 +4756,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4764,7 +4777,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4786,7 +4798,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4808,7 +4819,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4830,7 +4840,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4852,7 +4861,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4874,7 +4882,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4896,7 +4903,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4918,7 +4924,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4940,7 +4945,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4962,7 +4966,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4984,7 +4987,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5006,7 +5008,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5034,7 +5035,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5056,7 +5056,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5078,7 +5077,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5100,7 +5098,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5122,7 +5119,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5144,7 +5140,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5166,7 +5161,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5188,7 +5182,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5210,7 +5203,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5232,7 +5224,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5254,7 +5245,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5276,7 +5266,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5298,7 +5287,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5320,7 +5308,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5342,7 +5329,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5364,7 +5350,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5386,7 +5371,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5408,7 +5392,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5430,7 +5413,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5452,7 +5434,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5480,7 +5461,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5502,7 +5482,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5524,7 +5503,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5546,7 +5524,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5568,7 +5545,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5590,7 +5566,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5612,7 +5587,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5634,7 +5608,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5656,7 +5629,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5678,7 +5650,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5700,7 +5671,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5722,7 +5692,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5744,7 +5713,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5766,7 +5734,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5788,7 +5755,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5810,7 +5776,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5832,7 +5797,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5854,7 +5818,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5876,7 +5839,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5898,7 +5860,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5926,7 +5887,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5948,7 +5908,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5970,7 +5929,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5992,7 +5950,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6014,7 +5971,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6036,7 +5992,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6058,7 +6013,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6080,7 +6034,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6102,7 +6055,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6124,7 +6076,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6146,7 +6097,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6168,7 +6118,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6190,7 +6139,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6212,7 +6160,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6234,7 +6181,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6256,7 +6202,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6278,7 +6223,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6300,7 +6244,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6322,7 +6265,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6344,7 +6286,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6372,7 +6313,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6394,7 +6334,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6416,7 +6355,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6438,7 +6376,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6460,7 +6397,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6482,7 +6418,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6504,7 +6439,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6526,7 +6460,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6548,7 +6481,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6570,7 +6502,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6592,7 +6523,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6614,7 +6544,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6636,7 +6565,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6658,7 +6586,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6680,7 +6607,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6702,7 +6628,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6724,7 +6649,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6746,7 +6670,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6768,7 +6691,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6790,7 +6712,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6818,7 +6739,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6840,7 +6760,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6862,7 +6781,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6884,7 +6802,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6906,7 +6823,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6928,7 +6844,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6950,7 +6865,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6972,7 +6886,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6994,7 +6907,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7016,7 +6928,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7038,7 +6949,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7060,7 +6970,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7082,7 +6991,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7104,7 +7012,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7126,7 +7033,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7148,7 +7054,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7170,7 +7075,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7192,7 +7096,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7214,7 +7117,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7236,7 +7138,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7264,7 +7165,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7286,7 +7186,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7308,7 +7207,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7330,7 +7228,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7352,7 +7249,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7374,7 +7270,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7396,7 +7291,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7418,7 +7312,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7440,7 +7333,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7462,7 +7354,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7484,7 +7375,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7506,7 +7396,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7528,7 +7417,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7550,7 +7438,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7572,7 +7459,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7594,7 +7480,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7616,7 +7501,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7638,7 +7522,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7660,7 +7543,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7682,7 +7564,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7710,7 +7591,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7732,7 +7612,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7754,7 +7633,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7776,7 +7654,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7798,7 +7675,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7820,7 +7696,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7842,7 +7717,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7864,7 +7738,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7886,7 +7759,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7908,7 +7780,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7930,7 +7801,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7952,7 +7822,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7974,7 +7843,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7996,7 +7864,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8018,7 +7885,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8040,7 +7906,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8062,7 +7927,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8084,7 +7948,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8106,7 +7969,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8128,7 +7990,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8156,7 +8017,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8178,7 +8038,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8200,7 +8059,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8222,7 +8080,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8244,7 +8101,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8266,7 +8122,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8288,7 +8143,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8310,7 +8164,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8332,7 +8185,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8354,7 +8206,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8376,7 +8227,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8398,7 +8248,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8420,7 +8269,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8442,7 +8290,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8464,7 +8311,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8486,7 +8332,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8508,7 +8353,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8530,7 +8374,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8552,7 +8395,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8574,7 +8416,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8602,7 +8443,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8624,7 +8464,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8646,7 +8485,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8668,7 +8506,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8690,7 +8527,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8712,7 +8548,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8734,7 +8569,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8756,7 +8590,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8778,7 +8611,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8800,7 +8632,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8822,7 +8653,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8844,7 +8674,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8866,7 +8695,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8888,7 +8716,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8910,7 +8737,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8932,7 +8758,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8954,7 +8779,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8976,7 +8800,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8998,7 +8821,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9020,7 +8842,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9048,7 +8869,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9070,7 +8890,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9092,7 +8911,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9114,7 +8932,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9136,7 +8953,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9158,7 +8974,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9180,7 +8995,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9202,7 +9016,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9224,7 +9037,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9246,7 +9058,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9268,7 +9079,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9290,7 +9100,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9312,7 +9121,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9334,7 +9142,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9356,7 +9163,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9378,7 +9184,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9400,7 +9205,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9422,7 +9226,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9444,7 +9247,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9466,7 +9268,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9494,7 +9295,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9516,7 +9316,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9538,7 +9337,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9560,7 +9358,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9582,7 +9379,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9604,7 +9400,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9626,7 +9421,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9648,7 +9442,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9670,7 +9463,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9692,7 +9484,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9714,7 +9505,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9736,7 +9526,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9758,7 +9547,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9780,7 +9568,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9802,7 +9589,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9824,7 +9610,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9846,7 +9631,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9868,7 +9652,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9890,7 +9673,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9912,7 +9694,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9940,7 +9721,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9962,7 +9742,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9984,7 +9763,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10006,7 +9784,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10028,7 +9805,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10050,7 +9826,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10072,7 +9847,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10094,7 +9868,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10116,7 +9889,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10138,7 +9910,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10160,7 +9931,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10182,7 +9952,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10204,7 +9973,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10226,7 +9994,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10248,7 +10015,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10270,7 +10036,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10292,7 +10057,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10314,7 +10078,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10336,7 +10099,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10358,7 +10120,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10386,7 +10147,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10408,7 +10168,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10430,7 +10189,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10452,7 +10210,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10474,7 +10231,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10496,7 +10252,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10518,7 +10273,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10540,7 +10294,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10562,7 +10315,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10584,7 +10336,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10606,7 +10357,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10628,7 +10378,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10650,7 +10399,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10672,7 +10420,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10694,7 +10441,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10716,7 +10462,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10738,7 +10483,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10760,7 +10504,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10782,7 +10525,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10804,7 +10546,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10832,7 +10573,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10854,7 +10594,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10876,7 +10615,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10898,7 +10636,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10920,7 +10657,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10942,7 +10678,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10964,7 +10699,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10986,7 +10720,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11008,7 +10741,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11030,7 +10762,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11052,7 +10783,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11074,7 +10804,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11096,7 +10825,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11118,7 +10846,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11140,7 +10867,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11162,7 +10888,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11184,7 +10909,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11206,7 +10930,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11228,7 +10951,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11250,7 +10972,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11278,7 +10999,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11300,7 +11020,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11322,7 +11041,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11344,7 +11062,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11366,7 +11083,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11388,7 +11104,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11410,7 +11125,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11432,7 +11146,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11454,7 +11167,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11476,7 +11188,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11498,7 +11209,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11520,7 +11230,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11542,7 +11251,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11564,7 +11272,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11586,7 +11293,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11608,7 +11314,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11630,7 +11335,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11652,7 +11356,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11674,7 +11377,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11696,7 +11398,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11724,7 +11425,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11746,7 +11446,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11768,7 +11467,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11790,7 +11488,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11812,7 +11509,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11834,7 +11530,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11856,7 +11551,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11878,7 +11572,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11900,7 +11593,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11922,7 +11614,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11944,7 +11635,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11966,7 +11656,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11988,7 +11677,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12010,7 +11698,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12032,7 +11719,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12054,7 +11740,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12076,7 +11761,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12098,7 +11782,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12120,7 +11803,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12142,7 +11824,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12173,7 +11854,6 @@ exports[`Portable Text Transformer transforms tables with input
{ types: { image: ({ value, - }: PortableTextTypeComponentOptions) => { + }: PortableTextTypeComponentOptions) => { // TODO: extend type to be more accurate return customResolvers.image ? customResolvers.image(value) : resolveImage(value, toHTMLImageDefault); diff --git a/tests/transfomers/portable-text-transformer/mapi-transformer.spec.ts b/tests/transfomers/portable-text-transformer/mapi-transformer.spec.ts index 4375990..eaa1800 100644 --- a/tests/transfomers/portable-text-transformer/mapi-transformer.spec.ts +++ b/tests/transfomers/portable-text-transformer/mapi-transformer.spec.ts @@ -104,6 +104,50 @@ describe("portabletext to MAPI resolver", () => { const secondParsePortableText = transformToPortableText(secondParseTree); const secondParseMapiFormat = toManagementApiFormat(secondParsePortableText); + expect(portableText).toMatchInlineSnapshot(` +[ + { + "_key": "guid", + "_type": "block", + "children": [ + { + "_key": "guid", + "_type": "span", + "marks": [ + "strong", + ], + "text": "strong text ", + }, + { + "_key": "guid", + "_type": "span", + "marks": [ + "strong", + "guid", + ], + "text": "example strong link text", + }, + { + "_key": "guid", + "_type": "span", + "marks": [ + "guid", + ], + "text": "not strong link text", + }, + ], + "markDefs": [ + { + "_key": "guid", + "_type": "link", + "href": "https://example.com", + }, + ], + "style": "normal", + }, +] +`); + expect(mapiFormat).toMatchInlineSnapshot( `"

strong text example strong link textnot strong link text

"`, ); @@ -112,6 +156,6 @@ describe("portabletext to MAPI resolver", () => { expect(portableText).not.toEqual(secondParsePortableText); // duplicate markdefinition - expect(secondParsePortableText[0].markDefs[0]).toEqual(secondParsePortableText[0].markDefs[1]); + expect(secondParsePortableText[0].markDefs[0]).toEqual(secondParsePortableText[0].markDefs[1]); // TODO: fix types }); }); diff --git a/tests/transfomers/portable-text-transformer/portable-text-transformer.spec.ts b/tests/transfomers/portable-text-transformer/portable-text-transformer.spec.ts index 5443134..e459a2d 100644 --- a/tests/transfomers/portable-text-transformer/portable-text-transformer.spec.ts +++ b/tests/transfomers/portable-text-transformer/portable-text-transformer.spec.ts @@ -19,8 +19,8 @@ describe("Portable Text Transformer", () => { const transformInput = ( input: string, ): { - nodeResult: PortableTextObject[]; - browserResult: PortableTextObject[]; + nodeResult: PortableTextItem[]; + browserResult: PortableTextItem[]; } => { const browserTree = browserParse(input); const nodeTree = nodeParse(input); @@ -305,7 +305,7 @@ describe("Portable Text Transformer", () => { const input = ``; - const processBlock = (block: PortableTextObject) => { + const processBlock = (block: PortableTextItem) => { if (block._type === "componentOrItem") { return { ...block, @@ -375,4 +375,27 @@ describe("Portable Text Transformer", () => { `

Text inner text 1 text between inner text 2.

`, ); }); + // refactor tests below ========================= + + it("transforms a simple table", () => { + transformAndCompare( + `

hello world

hello second world

`, + ); + }); + + it("transforms minimal rich text", () => { + transformAndCompare("

minimal

"); + }); + + it("transforms minimal rich text with formatting", () => { + transformAndCompare("

minimal

"); + }); + + it("transforms simplest list", () => { + transformAndCompare("
  • some text
"); + }); + + it("transforms list with two items", () => { + transformAndCompare("
  • first
  • second
"); + }); });