@atlaskit/editor-plugin-block-menu 6.0.9 → 6.0.10

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 (21) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/editor-commands/transform-node-utils/TRANSFORMATION_MATRIX.js +224 -0
  3. package/dist/cjs/editor-commands/transform-node-utils/steps/convertEachNodeStep.js +58 -1
  4. package/dist/cjs/editor-commands/transform-node-utils/steps/wrapMixedContentStep.js +12 -1
  5. package/dist/cjs/editor-commands/transform-node-utils/transform.js +4 -238
  6. package/dist/cjs/editor-commands/transform-node-utils/utils.js +33 -11
  7. package/dist/es2019/editor-commands/transform-node-utils/TRANSFORMATION_MATRIX.js +219 -0
  8. package/dist/es2019/editor-commands/transform-node-utils/steps/convertEachNodeStep.js +56 -1
  9. package/dist/es2019/editor-commands/transform-node-utils/steps/wrapMixedContentStep.js +13 -2
  10. package/dist/es2019/editor-commands/transform-node-utils/transform.js +5 -240
  11. package/dist/es2019/editor-commands/transform-node-utils/utils.js +32 -10
  12. package/dist/esm/editor-commands/transform-node-utils/TRANSFORMATION_MATRIX.js +219 -0
  13. package/dist/esm/editor-commands/transform-node-utils/steps/convertEachNodeStep.js +58 -1
  14. package/dist/esm/editor-commands/transform-node-utils/steps/wrapMixedContentStep.js +13 -2
  15. package/dist/esm/editor-commands/transform-node-utils/transform.js +5 -240
  16. package/dist/esm/editor-commands/transform-node-utils/utils.js +32 -10
  17. package/dist/types/editor-commands/transform-node-utils/TRANSFORMATION_MATRIX.d.ts +2 -0
  18. package/dist/types/editor-commands/transform-node-utils/utils.d.ts +10 -5
  19. package/dist/types-ts4.5/editor-commands/transform-node-utils/TRANSFORMATION_MATRIX.d.ts +2 -0
  20. package/dist/types-ts4.5/editor-commands/transform-node-utils/utils.d.ts +10 -5
  21. package/package.json +4 -4
@@ -29,10 +29,15 @@ export declare const convertExpandToNestedExpand: (node: PMNode, schema: Schema)
29
29
  export declare const convertTextNodeToParagraph: (node: PMNode, schema: Schema) => PMNode | null;
30
30
  export declare const getBlockNodesInRange: (range: NodeRange) => PMNode[];
31
31
  /**
32
- * Iterates over a nodes children and extracting text content, removing all other inline content and converting
33
- * hardbreaks to newlines.
32
+ * Splits a text node (paragraph/heading) into parts for codeBlock conversion.
33
+ * Returns an array of:
34
+ * - strings (text content that can go into codeBlock)
35
+ * - PMNodes (incompatible inline nodes wrapped in paragraphs that need to break out)
34
36
  *
35
- * @param node - The node to create text content from (should be paragraph)
36
- * @returns The text content string.
37
+ * This preserves inline nodes (like status, inlineExtension) that cannot be represented as plain text.
38
+ *
39
+ * @param node - The text node (paragraph or heading) to split
40
+ * @param schema - The schema to use for creating paragraph nodes
41
+ * @returns Array of strings (for codeBlock) and PMNodes (to break out)
37
42
  */
38
- export declare const createTextContent: (node: PMNode) => string;
43
+ export declare const splitTextNodeForCodeBlock: (node: PMNode, schema: Schema) => Array<string | PMNode>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-menu",
3
- "version": "6.0.9",
3
+ "version": "6.0.10",
4
4
  "description": "BlockMenu plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -40,16 +40,16 @@
40
40
  "@atlaskit/editor-tables": "^2.9.0",
41
41
  "@atlaskit/editor-toolbar": "^0.18.0",
42
42
  "@atlaskit/flag": "^17.7.0",
43
- "@atlaskit/icon": "^29.3.0",
43
+ "@atlaskit/icon": "^29.4.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
46
46
  "@atlaskit/primitives": "^17.0.0",
47
- "@atlaskit/tmp-editor-statsig": "^16.5.0",
47
+ "@atlaskit/tmp-editor-statsig": "^16.8.0",
48
48
  "@atlaskit/tokens": "^9.1.0",
49
49
  "@babel/runtime": "^7.0.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "@atlaskit/editor-common": "^111.2.0",
52
+ "@atlaskit/editor-common": "^111.6.0",
53
53
  "react": "^18.2.0",
54
54
  "react-intl-next": "npm:react-intl@^5.18.1"
55
55
  },