@atlaskit/editor-plugin-block-menu 5.2.14 → 5.2.16

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 (45) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/editor-commands/transform-node-utils/nodeChecks.js +33 -0
  3. package/dist/cjs/editor-commands/transform-node-utils/steps/flattenListStep.js +7 -12
  4. package/dist/cjs/editor-commands/transform-node-utils/steps/listToDecisionListStep.js +3 -3
  5. package/dist/cjs/editor-commands/transform-node-utils/steps/listToListStep.js +11 -11
  6. package/dist/cjs/editor-commands/transform-node-utils/steps/wrapTextToCodeblock.js +21 -0
  7. package/dist/cjs/editor-commands/transform-node-utils/transform.js +5 -11
  8. package/dist/cjs/editor-commands/transform-node-utils/utils.js +20 -7
  9. package/dist/cjs/editor-commands/transform-node-utils/wrapIntoListStep.js +29 -7
  10. package/dist/cjs/ui/block-menu-components.js +1 -3
  11. package/dist/cjs/ui/copy-link.js +2 -2
  12. package/dist/cjs/ui/delete-section.js +1 -8
  13. package/dist/es2019/editor-commands/transform-node-utils/nodeChecks.js +23 -0
  14. package/dist/es2019/editor-commands/transform-node-utils/steps/flattenListStep.js +7 -6
  15. package/dist/es2019/editor-commands/transform-node-utils/steps/listToDecisionListStep.js +3 -4
  16. package/dist/es2019/editor-commands/transform-node-utils/steps/listToListStep.js +11 -12
  17. package/dist/es2019/editor-commands/transform-node-utils/steps/wrapTextToCodeblock.js +18 -0
  18. package/dist/es2019/editor-commands/transform-node-utils/transform.js +5 -11
  19. package/dist/es2019/editor-commands/transform-node-utils/utils.js +19 -4
  20. package/dist/es2019/editor-commands/transform-node-utils/wrapIntoListStep.js +29 -7
  21. package/dist/es2019/ui/block-menu-components.js +1 -3
  22. package/dist/es2019/ui/copy-link.js +2 -2
  23. package/dist/es2019/ui/delete-section.js +0 -7
  24. package/dist/esm/editor-commands/transform-node-utils/nodeChecks.js +27 -0
  25. package/dist/esm/editor-commands/transform-node-utils/steps/flattenListStep.js +7 -12
  26. package/dist/esm/editor-commands/transform-node-utils/steps/listToDecisionListStep.js +3 -4
  27. package/dist/esm/editor-commands/transform-node-utils/steps/listToListStep.js +11 -12
  28. package/dist/esm/editor-commands/transform-node-utils/steps/wrapTextToCodeblock.js +16 -0
  29. package/dist/esm/editor-commands/transform-node-utils/transform.js +5 -11
  30. package/dist/esm/editor-commands/transform-node-utils/utils.js +19 -6
  31. package/dist/esm/editor-commands/transform-node-utils/wrapIntoListStep.js +29 -7
  32. package/dist/esm/ui/block-menu-components.js +1 -3
  33. package/dist/esm/ui/copy-link.js +2 -2
  34. package/dist/esm/ui/delete-section.js +1 -8
  35. package/dist/types/editor-commands/transform-node-utils/nodeChecks.d.ts +17 -0
  36. package/dist/types/editor-commands/transform-node-utils/steps/wrapTextToCodeblock.d.ts +9 -0
  37. package/dist/types/editor-commands/transform-node-utils/utils.d.ts +8 -1
  38. package/dist/types/editor-commands/transform-node-utils/wrapIntoListStep.d.ts +7 -1
  39. package/dist/types/ui/delete-section.d.ts +1 -4
  40. package/dist/types-ts4.5/editor-commands/transform-node-utils/nodeChecks.d.ts +17 -0
  41. package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/wrapTextToCodeblock.d.ts +9 -0
  42. package/dist/types-ts4.5/editor-commands/transform-node-utils/utils.d.ts +8 -1
  43. package/dist/types-ts4.5/editor-commands/transform-node-utils/wrapIntoListStep.d.ts +7 -1
  44. package/dist/types-ts4.5/ui/delete-section.d.ts +1 -4
  45. package/package.json +8 -8
@@ -4,7 +4,6 @@ import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
4
4
  import type { NodeTypeName } from './types';
5
5
  export declare const getSelectedNode: (selection: Selection) => ContentNodeWithPos | undefined;
6
6
  export declare const getTargetNodeTypeNameInContext: (nodeTypeName: NodeTypeName | null, isNested?: boolean) => NodeTypeName | null;
7
- export declare const isListType: (node: PMNode, schema: Schema) => boolean;
8
7
  /**
9
8
  * Converts a nestedExpand to a regular expand node.
10
9
  * NestedExpands can only exist inside expands, so when breaking out or placing
@@ -18,3 +17,11 @@ export declare const convertNestedExpandToExpand: (node: PMNode, schema: Schema)
18
17
  */
19
18
  export declare const convertExpandToNestedExpand: (node: PMNode, schema: Schema) => PMNode | null;
20
19
  export declare const getBlockNodesInRange: (range: NodeRange) => PMNode[];
20
+ /**
21
+ * Iterates over a nodes children and extracting text content, removing all other inline content and converting
22
+ * hardbreaks to newlines.
23
+ *
24
+ * @param node - The node to create text content from (should be paragraph)
25
+ * @returns The text content string.
26
+ */
27
+ export declare const createTextContent: (node: PMNode) => string;
@@ -1,3 +1,9 @@
1
1
  import type { TransformStep } from './types';
2
- /** wrap nodes into bullet list or numbered list, does not work for task list */
2
+ /**
3
+ * Wraps nodes into bullet list, numbered list, task list, or decision list.
4
+ *
5
+ * @param nodes - The nodes to wrap.
6
+ * @param context - The transformation context containing schema and target node type.
7
+ * @returns The wrapped nodes.
8
+ */
3
9
  export declare const wrapIntoListStep: TransformStep;
@@ -1,7 +1,4 @@
1
1
  import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { BlockMenuPlugin } from '../blockMenuPluginType';
4
- export declare const DeleteSection: ({ api, children, }: {
5
- api: ExtractInjectionAPI<BlockMenuPlugin> | undefined;
2
+ export declare const DeleteSection: ({ children, }: {
6
3
  children: React.ReactNode;
7
4
  }) => React.JSX.Element | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-menu",
3
- "version": "5.2.14",
3
+ "version": "5.2.16",
4
4
  "description": "BlockMenu plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -28,10 +28,10 @@
28
28
  "sideEffects": false,
29
29
  "atlaskit:src": "src/index.ts",
30
30
  "dependencies": {
31
- "@atlaskit/css": "^0.17.0",
31
+ "@atlaskit/css": "^0.18.0",
32
32
  "@atlaskit/dropdown-menu": "^16.3.0",
33
33
  "@atlaskit/editor-plugin-analytics": "^6.2.0",
34
- "@atlaskit/editor-plugin-block-controls": "^7.14.0",
34
+ "@atlaskit/editor-plugin-block-controls": "^7.15.0",
35
35
  "@atlaskit/editor-plugin-decorations": "^6.1.0",
36
36
  "@atlaskit/editor-plugin-selection": "^6.1.0",
37
37
  "@atlaskit/editor-plugin-user-intent": "^4.0.0",
@@ -39,17 +39,17 @@
39
39
  "@atlaskit/editor-shared-styles": "^3.10.0",
40
40
  "@atlaskit/editor-tables": "^2.9.0",
41
41
  "@atlaskit/editor-toolbar": "^0.18.0",
42
- "@atlaskit/flag": "^17.6.0",
43
- "@atlaskit/icon": "^29.1.0",
42
+ "@atlaskit/flag": "^17.7.0",
43
+ "@atlaskit/icon": "^29.3.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
46
46
  "@atlaskit/primitives": "^16.4.0",
47
- "@atlaskit/tmp-editor-statsig": "^15.12.0",
48
- "@atlaskit/tokens": "^8.5.0",
47
+ "@atlaskit/tmp-editor-statsig": "^15.13.0",
48
+ "@atlaskit/tokens": "^8.6.0",
49
49
  "@babel/runtime": "^7.0.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "@atlaskit/editor-common": "^110.44.0",
52
+ "@atlaskit/editor-common": "^110.46.0",
53
53
  "react": "^18.2.0",
54
54
  "react-intl-next": "npm:react-intl@^5.18.1"
55
55
  },