@micromerce/formbuilder-react 1.0.815 → 1.0.817

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -256,11 +256,13 @@ export declare const useDropLine: () => {
256
256
  export declare const getBlocksWithId: jest.Mock<any[], [], any>;
257
257
  export declare const isType: (_editor: any, element: any, types: string[]) => boolean;
258
258
  export declare const KEYS: {
259
+ table: string;
259
260
  column: string;
260
261
  tr: string;
261
262
  td: string;
262
263
  link: string;
263
264
  };
265
+ export declare const createSlatePlugin: (config: any) => any;
264
266
  export declare const MemoizedChildren: ({ children }: any) => any;
265
267
  export declare const useEditorRef: () => {
266
268
  api: {
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Flattens nested HTML lists for Plate deserialization.
3
+ *
4
+ * Standard HTML represents sub-lists by nesting <ul>/<ol> inside <li>:
5
+ * <ul><li>A<ul><li>B</li></ul></li></ul>
6
+ *
7
+ * Plate's indent-based ListPlugin expects a FLAT sequence of sibling nodes,
8
+ * each with an `indent` property. When the nested HTML is deserialized
9
+ * as-is, the inner <li> becomes a child Slate node of the outer <li>,
10
+ * producing an invalid block-inside-block structure. It *looks* correct
11
+ * initially but breaks on any subsequent list modification (indent/outdent).
12
+ *
13
+ * This function rewrites the DOM so that every <li> is a flat sibling with a
14
+ * `data-indent` attribute that the ListPlugin parse function can read:
15
+ * <ul>
16
+ * <li data-indent="1" data-list-style-type="disc">A</li>
17
+ * <li data-indent="2" data-list-style-type="disc">B</li>
18
+ * </ul>
19
+ */
20
+ export declare const flattenListHtml: (html: string) => string;