@atlaskit/editor-plugin-block-menu 5.2.3 → 5.2.5

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/editor-commands/transform-node-utils/steps/decisionListToListStep.js +88 -0
  3. package/dist/cjs/editor-commands/transform-node-utils/steps/listToDecisionListStep.js +61 -0
  4. package/dist/cjs/editor-commands/transform-node-utils/steps/listToListStep.js +6 -12
  5. package/dist/cjs/editor-commands/transform-node-utils/{wrapMixedContentStep.js → steps/wrapMixedContentStep.js} +25 -25
  6. package/dist/cjs/editor-commands/transform-node-utils/transform.js +23 -17
  7. package/dist/cjs/editor-commands/transform-node-utils/utils.js +7 -1
  8. package/dist/es2019/editor-commands/transform-node-utils/steps/decisionListToListStep.js +85 -0
  9. package/dist/es2019/editor-commands/transform-node-utils/steps/listToDecisionListStep.js +58 -0
  10. package/dist/es2019/editor-commands/transform-node-utils/steps/listToListStep.js +1 -4
  11. package/dist/es2019/editor-commands/transform-node-utils/{wrapMixedContentStep.js → steps/wrapMixedContentStep.js} +25 -22
  12. package/dist/es2019/editor-commands/transform-node-utils/transform.js +23 -17
  13. package/dist/es2019/editor-commands/transform-node-utils/utils.js +4 -0
  14. package/dist/esm/editor-commands/transform-node-utils/steps/decisionListToListStep.js +82 -0
  15. package/dist/esm/editor-commands/transform-node-utils/steps/listToDecisionListStep.js +56 -0
  16. package/dist/esm/editor-commands/transform-node-utils/steps/listToListStep.js +1 -6
  17. package/dist/esm/editor-commands/transform-node-utils/{wrapMixedContentStep.js → steps/wrapMixedContentStep.js} +25 -24
  18. package/dist/esm/editor-commands/transform-node-utils/transform.js +23 -17
  19. package/dist/esm/editor-commands/transform-node-utils/utils.js +6 -0
  20. package/dist/types/editor-commands/transform-node-utils/steps/decisionListToListStep.d.ts +30 -0
  21. package/dist/types/editor-commands/transform-node-utils/steps/listToDecisionListStep.d.ts +25 -0
  22. package/dist/types/editor-commands/transform-node-utils/{wrapMixedContentStep.d.ts → steps/wrapMixedContentStep.d.ts} +1 -1
  23. package/dist/types/editor-commands/transform-node-utils/utils.d.ts +2 -0
  24. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/decisionListToListStep.d.ts +30 -0
  25. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/listToDecisionListStep.d.ts +25 -0
  26. package/dist/types-ts4.5/editor-commands/transform-node-utils/{wrapMixedContentStep.d.ts → steps/wrapMixedContentStep.d.ts} +1 -1
  27. package/dist/types-ts4.5/editor-commands/transform-node-utils/utils.d.ts +2 -0
  28. package/package.json +1 -1
  29. package/dist/cjs/editor-commands/transform-node-utils/steps/convertBulletListToTextStep.js +0 -34
  30. package/dist/cjs/editor-commands/transform-node-utils/steps/convertOrderedListToTextStep.js +0 -62
  31. package/dist/cjs/editor-commands/transform-node-utils/steps/convertTaskListToTextStep.js +0 -39
  32. package/dist/cjs/editor-commands/transform-node-utils/steps/createListToTextStep.js +0 -90
  33. package/dist/es2019/editor-commands/transform-node-utils/steps/convertBulletListToTextStep.js +0 -27
  34. package/dist/es2019/editor-commands/transform-node-utils/steps/convertOrderedListToTextStep.js +0 -55
  35. package/dist/es2019/editor-commands/transform-node-utils/steps/convertTaskListToTextStep.js +0 -34
  36. package/dist/es2019/editor-commands/transform-node-utils/steps/createListToTextStep.js +0 -86
  37. package/dist/esm/editor-commands/transform-node-utils/steps/convertBulletListToTextStep.js +0 -29
  38. package/dist/esm/editor-commands/transform-node-utils/steps/convertOrderedListToTextStep.js +0 -57
  39. package/dist/esm/editor-commands/transform-node-utils/steps/convertTaskListToTextStep.js +0 -34
  40. package/dist/esm/editor-commands/transform-node-utils/steps/createListToTextStep.js +0 -85
  41. package/dist/types/editor-commands/transform-node-utils/steps/convertBulletListToTextStep.d.ts +0 -18
  42. package/dist/types/editor-commands/transform-node-utils/steps/convertOrderedListToTextStep.d.ts +0 -19
  43. package/dist/types/editor-commands/transform-node-utils/steps/convertTaskListToTextStep.d.ts +0 -22
  44. package/dist/types/editor-commands/transform-node-utils/steps/createListToTextStep.d.ts +0 -38
  45. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/convertBulletListToTextStep.d.ts +0 -18
  46. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/convertOrderedListToTextStep.d.ts +0 -19
  47. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/convertTaskListToTextStep.d.ts +0 -22
  48. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/createListToTextStep.d.ts +0 -38
@@ -1,22 +0,0 @@
1
- /**
2
- * Given an array of nodes, processes each task list by converting its items
3
- * to paragraphs with a checkbox prefix. Uses "[] " for unchecked (TODO) tasks
4
- * and "[x] " for checked (DONE) tasks.
5
- *
6
- * Handles nested task lists recursively with 4-space indentation per level.
7
- *
8
- * This is used when converting a task list to a container that doesn't support
9
- * task items (like blockquote).
10
- *
11
- * @example
12
- * Input:
13
- * - taskList()(
14
- * taskItem({ state: 'TODO' })('Task list item'),
15
- * taskList()(taskItem({ state: 'DONE' })('Nested done task'))
16
- * )
17
- *
18
- * Output:
19
- * - p()('[] Task list item')
20
- * - p()(' [x] Nested done task')
21
- */
22
- export declare const convertTaskListToTextStep: import("../types").TransformStep;
@@ -1,38 +0,0 @@
1
- import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- import type { TransformStep } from '../types';
3
- /**
4
- * Configuration for creating a list-to-text transformation step.
5
- */
6
- export interface ListToTextConfig {
7
- /**
8
- * Generate prefix text for a list item.
9
- * @param depth - Nesting depth (0 = top level)
10
- * @param index - 1-based index within current list
11
- * @param itemNode - The item node (for reading attrs like task state)
12
- */
13
- getPrefix: (depth: number, index: number, itemNode: PMNode) => string;
14
- /** Indentation string per nesting level (e.g., ' ' for 3 spaces) */
15
- indent: string;
16
- /** Name of the item node type (e.g., 'listItem', 'taskItem') */
17
- itemTypeName: string;
18
- /** Name of the list node type (e.g., 'bulletList', 'orderedList', 'taskList') */
19
- listTypeName: string;
20
- /**
21
- * Whether to unwrap content from paragraph children.
22
- * - bullet/ordered lists = true (content is wrapped in paragraphs)
23
- * - task lists = false (inline content is a direct child)
24
- */
25
- unwrapParagraphContent: boolean;
26
- }
27
- /**
28
- * Creates a TransformStep that converts a list to paragraphs with text prefixes.
29
- *
30
- * Given an array of nodes, processes each list by converting its items
31
- * to paragraphs with configurable prefixes.
32
- *
33
- * Handles nested lists recursively with configurable indentation per level.
34
- *
35
- * @param config - Configuration for the list-to-text transformation
36
- * @returns A TransformStep function
37
- */
38
- export declare const createListToTextStep: (config: ListToTextConfig) => TransformStep;