/**
* Helpful utility for parsing out all matching top-level JSX tags in a given string.
* This will collect them in a list, that contains the content of the JSX tag and the props string.
*
* While this is not used within payload, this can be used for certain payload blocks that need to
* be serializable and deserializable to and from JSX.
*
* @example:
*
* Say you have Steps block that contains a steps array. Its JSX representation may look like this:
*
*
*
* Step 1
*
*
* Step 2
*
*
*
* In this case, the Steps block would have the following content as its children string:
*
* Step 1
*
*
* Step 2
*
*
* It could then use this function to collect all the top-level JSX tags (= the steps):
*
* collectTopLevelJSXInLines(children.split('\n'), 'Step')
*
* This will return:
*
* [
* {
* content: '
Step 1
',
* propsString: 'title="Step1"',
* },
* {
* content: 'Step 2
',
* propsString: 'title="Step2"',
* },
* ]
*
* You can then map this data to construct the data for this blocks array field.
*/
export declare function collectTopLevelJSXInLines(lines: Array, jsxToMatch: string): {
content: string;
propsString: string;
}[];
//# sourceMappingURL=collectTopLevelJSXInLines.d.ts.map