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 c2be59f..f3ad00e 100644 --- a/src/transformers/portable-text-transformer/portable-text-transformer.ts +++ b/src/transformers/portable-text-transformer/portable-text-transformer.ts @@ -1,379 +1,259 @@ import { DomHtmlNode, DomNode, - FigureElementAttributes, + DomTextNode, + ImgElementAttributes, ObjectElementAttributes, ParseResult, } from "../../parser/index.js"; import { BlockElement, IgnoredElement, - 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, - countDirectChildBlockNodes, createBlock, createComponentOrItemBlock, createExternalLink, createImageBlock, createItemLink, createListBlock, - createMark, createSpan, createTable, createTableCell, createTableRow, ignoredElements, + isElement, + isExternalLink, isItemLink, - isNestedImg, + isListBlock, isText, - MergePortableTextItemsFunction, + isValidElement, randomUUID, textStyleElements, - TransformationContext, - TransformElementFunction, - TransformFunction, - TransformLinkFunction, - TransformTableCellFunction, - TransformTextFunction, - traverseWithContext, + 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[] => { - const flat = flatten(parsedTree.children); - const spanMarks = mergeSpansAndMarks(flat); - const blockSpans = mergeBlocksAndSpans(spanMarks); - const cellBlocks = mergeCellsAndBlocks(blockSpans); - const rowCells = mergeRowsAndCells(cellBlocks); - const tableRows = mergeTablesAndRows(rowCells); - - return tableRows as PortableTextObject[]; +type ListContext = { + depth: number; + type: "number" | "bullet" | "unknown"; }; -/** - * 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" +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); + } + + 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[], + }, ); - if (lastBlock) { - (lastBlock.markDefs ||= []).push(linkItem); - } else { - mergedItems.push(createBlock(randomUUID(), [linkItem])); - } +const updateListContext = (node: DomNode, context: ListContext): ListContext => + (isElement(node) && isListBlock(node)) + ? { depth: context.depth + 1, type: node.tagName === "ol" ? "number" : "bullet" } + : context; + +const transformLineBreak: NodeToPortableText = () => [createSpan(randomUUID(), [], "\n")]; + +const transformListItem: NodeToPortableText = (_, processedItems, listContext) => { + const { + links, + contentItemLinks, + spans, + listBlocks, + } = categorizeItems(processedItems); + + 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, + ]; }; -/** - * 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)[][] = []; +const transformBlockElement: NodeToPortableText = (node, processedItems) => { + const { + spans, + links, + contentItemLinks, + } = categorizeItems(processedItems); - 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; - }, []); + return [ + createBlock(randomUUID(), [...links, ...contentItemLinks], node.tagName === "p" ? "normal" : node.tagName, spans), + ]; }; -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 if (item._type === "span" && lastItem && lastItem._type === "cell") { - const newBlock = createBlock(randomUUID()); - newBlock.children.push(item); - mergedItems.push(newBlock); - } 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 mergeCellsAndBlocks: MergePortableTextItemsFunction = (itemsToMerge) => - itemsToMerge.reduce((mergedItems, item) => { - const lastItem = mergedItems[mergedItems.length - 1]; - if (item._type === "block" && lastItem && lastItem._type === "cell") { - lastItem.content.push(item); - } else if (item._type === "span" && lastItem && lastItem._type === "cell") { - const newBlock = createBlock(randomUUID()); - newBlock.children.push(item); - lastItem.content.push(newBlock); - } else { - mergedItems.push(item); - } - return mergedItems; - }, []); - -const composeAndMerge = compose( - mergeTablesAndRows, - mergeRowsAndCells, - mergeCellsAndBlocks, - 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[]): PortableTextItem[] => - traverseWithContext(nodes, transformNode); - -const transformNode = ( - node: DomNode, - context: TransformationContext -): PortableTextItem | PortableTextItem[] => - isText(node) ? transformText(node, context) : transformElement(node, context); - -const transformElement = ( - node: DomHtmlNode, - context: TransformationContext -): PortableTextItem | PortableTextItem[] => { - const transformFunction = transformMap[node.tagName as ValidElement]; +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 transformFunction(node, context); + return [...updatedSpans, ...links, ...contentItemLinks]; }; -const transformImage: TransformElementFunction = ( - node, - context -) => { - const imageTag = node.children[0]; - - if (!isNestedImg(imageTag)) { - throw new Error( - "Expected the first child of
to be an element." - ); - } - - const block = createImageBlock( +const transformImage: NodeToPortableText> = (node) => [ + createImageBlock( randomUUID(), node.attributes["data-asset-id"], - imageTag.attributes.src, - imageTag.attributes.alt - ); + node.attributes["src"], + node.attributes["alt"], + ), +]; - context.lastProcessedBlock = block; - - return block; -}; - -const transformLink: TransformLinkFunction = (node, context) => { - 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)); - - return [link, mark]; -}; - -const transformTableCell: TransformTableCellFunction = (node, context) => { - const tableCell = createTableCell(randomUUID(), countDirectChildBlockNodes(node)); - - return tableCell; -}; - -const transformComponentOrItem: TransformElementFunction< - ObjectElementAttributes -> = (node, context) => { - // 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 transformTable: TransformElementFunction = (node, context) => { - const tableBody = node.children[0] as DomHtmlNode; - if (tableBody.tagName !== "tbody") { - throw new Error("Expected the first child to be a element."); - } +const transformTableCell: NodeToPortableText = (_, processedItems) => { + const { + links, + contentItemLinks, + spans, + } = categorizeItems(processedItems); - const tableRow = tableBody.children[0] as DomHtmlNode; - if (tableRow.tagName !== "tr") { - throw new Error( - "Expected the first child of 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 numCols = tableRow.children.length; - - return createTable(randomUUID(), numCols); + return [createTableCell(randomUUID(), [block])]; }; -const transformTableRow: TransformElementFunction = ( - _, - context -): PortableTextTableRow => createTableRow(randomUUID()); +const transformTableRow: NodeToPortableText = (_, processedItems) => { + const { cells } = categorizeItems(processedItems); -const transformText: TransformTextFunction = (node, context) => - createSpan(randomUUID(), [], node.content); - -const transformBlock: TransformElementFunction = (node, context) => - createBlock( - randomUUID(), - undefined, - node.tagName === "p" ? "normal" : node.tagName - ); + return [createTableRow(randomUUID(), cells)]; +}; -const transformTextMark: TransformElementFunction = (node, context) => - createMark( - randomUUID(), - node.tagName as TextStyleElement, - countChildTextNodes(node) - ); +const transformTable: NodeToPortableText = (_, processedItems) => { + const { rows } = categorizeItems(processedItems); -const transformLineBreak: TransformElementFunction = () => - createSpan(randomUUID(), [], "\n"); + return [createTable(randomUUID(), rows)]; +}; -const transformListItem: TransformElementFunction = (node, context) => - createListBlock(randomUUID(), context.depth, context.listType!); // TODO: more accurate typing +const ignoreElement: NodeToPortableText = (_, processedItems) => processedItems; -const transformListBlock: TransformElementFunction = (node, context) => { - // TODO: more accurate typing - context.listType = node.tagName === "ul" ? "bullet" : "number"; - context.depth += 1; +const transformElement: NodeToPortableText = (node, processedItems, listContext) => + transformMap[node.tagName as ValidElement](node, processedItems, listContext); - return undefined as unknown as PortableTextItem; -}; +const transformText: NodeToPortableText = (node) => [createSpan(randomUUID(), [], node.content)]; -const ignoreElement = () => undefined; +const toPortableText: NodeToPortableText = (node, processedItems, listContext) => + isText(node) + ? transformText(node, processedItems) + : isValidElement(node) + ? transformElement(node, processedItems, listContext) + : []; -const transformMap: Record = { +/** + * 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, transformBlock]) - ) as Record), + blockElements.map((tagName) => [tagName, transformBlockElement]), + ) as Record>), ...(Object.fromEntries( - textStyleElements.map((tagName) => [tagName, transformTextMark]) - ) as Record), + textStyleElements.map((tagName) => [tagName, transformMarkElement]), + ) as Record>), ...(Object.fromEntries( - ignoredElements.map((tagName) => [tagName, ignoreElement]) - ) as Record), - a: transformLink, - ol: transformListBlock, - ul: transformListBlock, + 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 42b8357..e7cfc12 100644 --- a/src/utils/common-utils.ts +++ b/src/utils/common-utils.ts @@ -1,13 +1,17 @@ import { + BlockElement, + blockElements, DomHtmlNode, DomNode, DomTextNode, FigureElementAttributes, ImgElementAttributes, ItemLinkElementAttributes, + MarkElement, + markElements, ObjectElementAttributes, - TextStyleElement, - textStyleElements, + ValidElement, + validElements, } from "../index.js"; export const isOrderedListBlock = (node: DomHtmlNode): boolean => node.tagName === "ol"; @@ -26,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`. */ @@ -39,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"; @@ -67,23 +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 countDirectChildBlockNodes = (node: DomHtmlNode) => { - const childBlockCount = node.children.filter(childNode => childNode.type === "tag" && ![...textStyleElements].includes(childNode.tagName as TextStyleElement)).length; - - return childBlockCount > 0 ? childBlockCount : 1; -} - export const throwError = (msg: string) => { throw new Error(msg); }; diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 4f435ab..7e8249f 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -1,15 +1,15 @@ 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"] 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, 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 47d53dd..daa5c90 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,50 +27,48 @@ import { TextStyleElement, } from "../transformers/index.js"; -export type TransformLinkFunction< - TElementAttributes = Record, -> = ( - node: DomHtmlNode, - context: TransformationContext, -) => PortableTextItem[]; -export type TransformElementFunction< - TElementAttributes = Record, -> = (node: DomHtmlNode, context: TransformationContext) => PortableTextItem; -// export type TransformContextFunction< -// TElementAttributes = Record, -// > = (node: DomHtmlNode, context: TransformationContext) => undefined; -export type TransformListItemFunction = ( - node: DomHtmlNode, - depth: number, - listType: PortableTextListItemType, -) => PortableTextStrictListItemBlock[]; -export type TransformTextFunction = (node: DomTextNode, context: TransformationContext) => PortableTextSpan; -export type TransformTableCellFunction = ( - node: DomHtmlNode, - context: TransformationContext -) => PortableTextItem; -export type TransformFunction = - | TransformElementFunction - | TransformLinkFunction - - - -export type MergePortableTextItemsFunction = ( - itemsToMerge: ReadonlyArray, -) => PortableTextItem[]; export type ResolverFunction = ( value: T, ) => string; -export type TransformationContext = { - depth: number; - listType: "bullet" | "number" | undefined; - lastProcessedBlock: PortableTextObject | undefined; - lastProcessedSpan: PortableTextSpan | undefined; - parentNode: DomHtmlNode | undefined; - lastNode: DomNode | undefined; - processedBlocks: PortableTextObject[]; -} +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. + * It optionally updates a context object at each node using a `contextHandler` function. + * + * @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`. + * @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 updates the context before traversing the child nodes. + * - The `transform` function is called with the current node, the transformed children, and the updated context. + */ +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 @@ -111,47 +107,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 traverseWithContext = ( - nodes: DomNode[], - callback: (node: DomNode, context: TransformationContext) => T | T[] | null | undefined, - context: TransformationContext = { - depth: 0, - listType: "number", - lastProcessedBlock: undefined, - lastProcessedSpan: undefined, - parentNode: undefined, - lastNode: undefined, - processedBlocks: [] - }, -): T[] => - nodes.flatMap((node) => { - const currentContext = {...context}; - const transformed = callback(node, currentContext); - - // Ensure transformed is always an array of T (or an empty array if null/undefined) - const transformedArray: T[] = transformed === null || transformed === undefined - ? [] - : Array.isArray(transformed) - ? transformed - : [transformed]; - - // Recursively traverse children if the node is an element - const children = isElement(node) - ? traverseWithContext(node.children, callback, currentContext) - : []; - - // Combine the transformed node(s) with the recursively transformed children - return [...transformedArray, ...children]; - }); - export const createSpan = ( guid: ShortGuid, marks?: string[], @@ -178,8 +133,8 @@ export const createBlock = ( export const createListBlock = ( guid: ShortGuid, - level: number, - listItem: PortableTextListItemType, + level?: number, + listItem?: PortableTextListItemType, markDefs?: PortableTextMarkDefinition[], style?: string, children?: PortableTextSpan[], @@ -188,7 +143,7 @@ export const createListBlock = ( _key: guid, markDefs: markDefs || [], level: level, - listItem: listItem, + listItem: listItem ?? "unknown", style: style || "normal", children: children || [], }); @@ -209,16 +164,6 @@ export const createImageBlock = ( }, }); -export const createTableBlock = ( - guid: ShortGuid, - columns: number, -): PortableTextTable => ({ - _type: "table", - _key: guid, - numColumns: columns, - rows: [], -}); - export const createExternalLink = ( guid: ShortGuid, attributes: Readonly>, @@ -242,28 +187,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 = ( @@ -288,15 +231,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 c75f49c..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", @@ -449,7 +445,6 @@ exports[`Portable Text Transformer transforms a simple table 1`] = ` { "_key": "guid", "_type": "table", - "numColumns": 2, "rows": [ { "_key": "guid", @@ -458,7 +453,6 @@ exports[`Portable Text Transformer transforms a simple table 1`] = ` { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -479,7 +473,6 @@ exports[`Portable Text Transformer transforms a simple table 1`] = ` { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -524,7 +517,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "table", - "numColumns": 1, "rows": [ { "_key": "guid", @@ -533,7 +525,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 2, "content": [ { "_key": "guid", @@ -576,7 +567,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "table", - "numColumns": 3, "rows": [ { "_key": "guid", @@ -585,7 +575,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 2, "content": [ { "_key": "guid", @@ -620,7 +609,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -643,7 +631,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -661,8 +648,8 @@ exports[`Portable Text Transformer transforms complex rich text into portable te "_key": "guid", "_type": "span", "marks": [ - "guid", "strong", + "guid", ], "text": "strong", }, @@ -699,7 +686,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -722,7 +708,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -743,7 +728,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -770,7 +754,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -793,7 +776,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -814,7 +796,6 @@ exports[`Portable Text Transformer transforms complex rich text into portable te { "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -858,8 +839,8 @@ exports[`Portable Text Transformer transforms complex rich text into portable te "_key": "guid", "_type": "span", "marks": [ - "guid", "strong", + "guid", ], "text": "bold", }, @@ -963,8 +944,8 @@ exports[`Portable Text Transformer transforms external links 1`] = ` "_key": "guid", "_type": "span", "marks": [ - "guid", "strong", + "guid", ], "text": "GitHub repository.", }, @@ -1034,8 +1015,8 @@ exports[`Portable Text Transformer transforms item links 1`] = ` "_key": "guid", "_type": "span", "marks": [ - "guid", "strong", + "guid", ], "text": "link to an item", }, @@ -1055,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`] = ` [ { @@ -1174,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`] = ` [ { @@ -1192,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 ", }, @@ -1201,9 +1259,9 @@ exports[`Portable Text Transformer transforms nested styles 1`] = ` "_key": "guid", "_type": "span", "marks": [ - "em", - "strong", "sup", + "strong", + "em", ], "text": "superscript", }, @@ -1214,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

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

Text

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

Text

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

Text

"_key": "guid", "_type": "span", "marks": [ - "strong", "sub", + "strong", ], "text": "li", }, @@ -1413,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", }, @@ -1424,8 +1503,8 @@ exports[`Portable Text Transformer transforms tables with input

Text

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

Text

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

Text

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

Text

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

Text

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

Text

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

Text

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

Text

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

Text

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

Text

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

Text

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

Text

{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2081,7 +2150,6 @@ exports[`Portable Text Transformer transforms tables with input { "_key": "guid", "_type": "table", - "numColumns": 6, "rows": [ { "_key": "guid", @@ -2090,7 +2158,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2111,7 +2178,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2132,7 +2198,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2153,7 +2218,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2174,7 +2238,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2195,7 +2258,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2222,7 +2284,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2243,7 +2304,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2264,7 +2324,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2285,7 +2344,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2306,7 +2364,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2327,7 +2384,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2354,7 +2410,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2375,7 +2430,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2396,7 +2450,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2417,7 +2470,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2438,7 +2490,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2459,7 +2510,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2486,7 +2536,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2507,7 +2556,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2528,7 +2576,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2549,7 +2596,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2570,7 +2616,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2591,7 +2636,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2618,7 +2662,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2639,7 +2682,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2660,7 +2702,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2681,7 +2722,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2702,7 +2742,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2723,7 +2762,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2796,7 +2834,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "table", - "numColumns": 3, "rows": [ { "_key": "guid", @@ -2805,7 +2842,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2827,7 +2863,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 2, "content": [ { "_key": "guid", @@ -2837,8 +2872,8 @@ exports[`Portable Text Transformer transforms tables with input
"_key": "guid", "_type": "span", "marks": [ - "guid", "strong", + "guid", ], "text": "NanoBlade X", }, @@ -2870,7 +2905,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 2, "content": [ { "_key": "guid", @@ -2880,8 +2914,8 @@ exports[`Portable Text Transformer transforms tables with input
"_key": "guid", "_type": "span", "marks": [ - "guid", "strong", + "guid", ], "text": "NanoBlade V", }, @@ -2919,7 +2953,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2940,7 +2973,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2961,7 +2993,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -2988,7 +3019,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3009,7 +3039,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3045,7 +3074,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3072,7 +3100,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3093,7 +3120,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3122,7 +3148,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3149,7 +3174,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3179,7 +3203,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 4, "content": [ { "_key": "guid", @@ -3250,7 +3273,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3301,7 +3323,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "table", - "numColumns": 20, "rows": [ { "_key": "guid", @@ -3310,7 +3331,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3332,7 +3352,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3354,7 +3373,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3376,7 +3394,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3398,7 +3415,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3420,7 +3436,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3442,7 +3457,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3464,7 +3478,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3486,7 +3499,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3508,7 +3520,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3530,7 +3541,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3552,7 +3562,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3574,7 +3583,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3596,7 +3604,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3618,7 +3625,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3640,7 +3646,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3662,7 +3667,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3684,7 +3688,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3706,7 +3709,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3728,7 +3730,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3756,7 +3757,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3778,7 +3778,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3800,7 +3799,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3822,7 +3820,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3844,7 +3841,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3866,7 +3862,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3888,7 +3883,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3910,7 +3904,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3932,7 +3925,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3954,7 +3946,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3976,7 +3967,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -3998,7 +3988,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4020,7 +4009,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4042,7 +4030,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4064,7 +4051,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4086,7 +4072,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4108,7 +4093,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4130,7 +4114,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4152,7 +4135,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4174,7 +4156,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4202,7 +4183,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4224,7 +4204,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4246,7 +4225,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4268,7 +4246,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4290,7 +4267,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4312,7 +4288,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4334,7 +4309,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4356,7 +4330,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4378,7 +4351,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4400,7 +4372,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4422,7 +4393,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4444,7 +4414,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4466,7 +4435,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4488,7 +4456,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4510,7 +4477,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4532,7 +4498,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4554,7 +4519,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4576,7 +4540,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4598,7 +4561,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4620,7 +4582,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4648,7 +4609,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4670,7 +4630,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4692,7 +4651,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4714,7 +4672,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4736,7 +4693,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4758,7 +4714,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4780,7 +4735,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4802,7 +4756,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4824,7 +4777,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4846,7 +4798,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4868,7 +4819,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4890,7 +4840,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4912,7 +4861,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4934,7 +4882,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4956,7 +4903,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -4978,7 +4924,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5000,7 +4945,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5022,7 +4966,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5044,7 +4987,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5066,7 +5008,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5094,7 +5035,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5116,7 +5056,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5138,7 +5077,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5160,7 +5098,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5182,7 +5119,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5204,7 +5140,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5226,7 +5161,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5248,7 +5182,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5270,7 +5203,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5292,7 +5224,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5314,7 +5245,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5336,7 +5266,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5358,7 +5287,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5380,7 +5308,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5402,7 +5329,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5424,7 +5350,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5446,7 +5371,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5468,7 +5392,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5490,7 +5413,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5512,7 +5434,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5540,7 +5461,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5562,7 +5482,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5584,7 +5503,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5606,7 +5524,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5628,7 +5545,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5650,7 +5566,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5672,7 +5587,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5694,7 +5608,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5716,7 +5629,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5738,7 +5650,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5760,7 +5671,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5782,7 +5692,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5804,7 +5713,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5826,7 +5734,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5848,7 +5755,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5870,7 +5776,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5892,7 +5797,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5914,7 +5818,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5936,7 +5839,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5958,7 +5860,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -5986,7 +5887,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6008,7 +5908,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6030,7 +5929,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6052,7 +5950,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6074,7 +5971,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6096,7 +5992,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6118,7 +6013,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6140,7 +6034,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6162,7 +6055,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6184,7 +6076,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6206,7 +6097,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6228,7 +6118,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6250,7 +6139,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6272,7 +6160,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6294,7 +6181,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6316,7 +6202,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6338,7 +6223,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6360,7 +6244,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6382,7 +6265,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6404,7 +6286,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6432,7 +6313,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6454,7 +6334,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6476,7 +6355,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6498,7 +6376,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6520,7 +6397,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6542,7 +6418,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6564,7 +6439,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6586,7 +6460,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6608,7 +6481,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6630,7 +6502,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6652,7 +6523,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6674,7 +6544,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6696,7 +6565,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6718,7 +6586,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6740,7 +6607,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6762,7 +6628,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6784,7 +6649,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6806,7 +6670,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6828,7 +6691,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6850,7 +6712,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6878,7 +6739,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6900,7 +6760,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6922,7 +6781,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6944,7 +6802,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6966,7 +6823,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -6988,7 +6844,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7010,7 +6865,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7032,7 +6886,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7054,7 +6907,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7076,7 +6928,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7098,7 +6949,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7120,7 +6970,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7142,7 +6991,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7164,7 +7012,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7186,7 +7033,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7208,7 +7054,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7230,7 +7075,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7252,7 +7096,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7274,7 +7117,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7296,7 +7138,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7324,7 +7165,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7346,7 +7186,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7368,7 +7207,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7390,7 +7228,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7412,7 +7249,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7434,7 +7270,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7456,7 +7291,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7478,7 +7312,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7500,7 +7333,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7522,7 +7354,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7544,7 +7375,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7566,7 +7396,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7588,7 +7417,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7610,7 +7438,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7632,7 +7459,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7654,7 +7480,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7676,7 +7501,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7698,7 +7522,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7720,7 +7543,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7742,7 +7564,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7770,7 +7591,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7792,7 +7612,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7814,7 +7633,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7836,7 +7654,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7858,7 +7675,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7880,7 +7696,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7902,7 +7717,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7924,7 +7738,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7946,7 +7759,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7968,7 +7780,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -7990,7 +7801,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8012,7 +7822,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8034,7 +7843,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8056,7 +7864,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8078,7 +7885,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8100,7 +7906,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8122,7 +7927,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8144,7 +7948,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8166,7 +7969,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8188,7 +7990,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8216,7 +8017,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8238,7 +8038,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8260,7 +8059,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8282,7 +8080,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8304,7 +8101,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8326,7 +8122,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8348,7 +8143,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8370,7 +8164,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8392,7 +8185,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8414,7 +8206,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8436,7 +8227,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8458,7 +8248,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8480,7 +8269,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8502,7 +8290,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8524,7 +8311,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8546,7 +8332,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8568,7 +8353,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8590,7 +8374,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8612,7 +8395,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8634,7 +8416,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8662,7 +8443,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8684,7 +8464,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8706,7 +8485,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8728,7 +8506,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8750,7 +8527,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8772,7 +8548,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8794,7 +8569,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8816,7 +8590,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8838,7 +8611,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8860,7 +8632,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8882,7 +8653,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8904,7 +8674,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8926,7 +8695,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8948,7 +8716,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8970,7 +8737,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -8992,7 +8758,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9014,7 +8779,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9036,7 +8800,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9058,7 +8821,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9080,7 +8842,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9108,7 +8869,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9130,7 +8890,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9152,7 +8911,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9174,7 +8932,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9196,7 +8953,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9218,7 +8974,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9240,7 +8995,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9262,7 +9016,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9284,7 +9037,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9306,7 +9058,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9328,7 +9079,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9350,7 +9100,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9372,7 +9121,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9394,7 +9142,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9416,7 +9163,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9438,7 +9184,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9460,7 +9205,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9482,7 +9226,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9504,7 +9247,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9526,7 +9268,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9554,7 +9295,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9576,7 +9316,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9598,7 +9337,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9620,7 +9358,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9642,7 +9379,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9664,7 +9400,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9686,7 +9421,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9708,7 +9442,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9730,7 +9463,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9752,7 +9484,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9774,7 +9505,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9796,7 +9526,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9818,7 +9547,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9840,7 +9568,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9862,7 +9589,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9884,7 +9610,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9906,7 +9631,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9928,7 +9652,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9950,7 +9673,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -9972,7 +9694,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10000,7 +9721,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10022,7 +9742,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10044,7 +9763,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10066,7 +9784,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10088,7 +9805,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10110,7 +9826,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10132,7 +9847,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10154,7 +9868,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10176,7 +9889,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10198,7 +9910,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10220,7 +9931,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10242,7 +9952,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10264,7 +9973,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10286,7 +9994,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10308,7 +10015,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10330,7 +10036,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10352,7 +10057,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10374,7 +10078,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10396,7 +10099,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10418,7 +10120,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10446,7 +10147,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10468,7 +10168,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10490,7 +10189,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10512,7 +10210,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10534,7 +10231,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10556,7 +10252,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10578,7 +10273,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10600,7 +10294,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10622,7 +10315,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10644,7 +10336,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10666,7 +10357,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10688,7 +10378,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10710,7 +10399,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10732,7 +10420,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10754,7 +10441,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10776,7 +10462,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10798,7 +10483,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10820,7 +10504,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10842,7 +10525,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10864,7 +10546,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10892,7 +10573,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10914,7 +10594,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10936,7 +10615,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10958,7 +10636,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -10980,7 +10657,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11002,7 +10678,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11024,7 +10699,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11046,7 +10720,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11068,7 +10741,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11090,7 +10762,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11112,7 +10783,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11134,7 +10804,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11156,7 +10825,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11178,7 +10846,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11200,7 +10867,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11222,7 +10888,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11244,7 +10909,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11266,7 +10930,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11288,7 +10951,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11310,7 +10972,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11338,7 +10999,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11360,7 +11020,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11382,7 +11041,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11404,7 +11062,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11426,7 +11083,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11448,7 +11104,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11470,7 +11125,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11492,7 +11146,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11514,7 +11167,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11536,7 +11188,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11558,7 +11209,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11580,7 +11230,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11602,7 +11251,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11624,7 +11272,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11646,7 +11293,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11668,7 +11314,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11690,7 +11335,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11712,7 +11356,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11734,7 +11377,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11756,7 +11398,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11784,7 +11425,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11806,7 +11446,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11828,7 +11467,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11850,7 +11488,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11872,7 +11509,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11894,7 +11530,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11916,7 +11551,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11938,7 +11572,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11960,7 +11593,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -11982,7 +11614,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12004,7 +11635,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12026,7 +11656,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12048,7 +11677,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12070,7 +11698,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12092,7 +11719,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12114,7 +11740,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12136,7 +11761,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12158,7 +11782,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12180,7 +11803,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12202,7 +11824,6 @@ exports[`Portable Text Transformer transforms tables with input
{ "_key": "guid", "_type": "cell", - "childBlocksCount": 1, "content": [ { "_key": "guid", @@ -12233,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 4a08835..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,10 +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

` - ) - }) + `

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
"); + }); });