@atlaskit/editor-plugin-show-diff 3.2.3 → 3.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.
- package/CHANGELOG.md +18 -0
- package/afm-jira/tsconfig.json +1 -1
- package/dist/cjs/pm-plugins/decorations.js +33 -220
- package/dist/cjs/pm-plugins/deletedBlocksHandler.js +220 -0
- package/dist/cjs/pm-plugins/deletedRowsHandler.js +1 -1
- package/dist/es2019/pm-plugins/decorations.js +29 -216
- package/dist/es2019/pm-plugins/deletedBlocksHandler.js +214 -0
- package/dist/es2019/pm-plugins/deletedRowsHandler.js +1 -1
- package/dist/esm/pm-plugins/decorations.js +30 -217
- package/dist/esm/pm-plugins/deletedBlocksHandler.js +214 -0
- package/dist/esm/pm-plugins/deletedRowsHandler.js +1 -1
- package/dist/types/pm-plugins/NodeViewSerializer.d.ts +1 -1
- package/dist/types/pm-plugins/decorations.d.ts +2 -0
- package/dist/types/pm-plugins/deletedBlocksHandler.d.ts +48 -0
- package/dist/types-ts4.5/pm-plugins/NodeViewSerializer.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/decorations.d.ts +2 -0
- package/dist/types-ts4.5/pm-plugins/deletedBlocksHandler.d.ts +48 -0
- package/package.json +3 -3
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { IntlShape } from 'react-intl-next';
|
|
2
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
export declare const deletedStyleQuoteNode: string;
|
|
4
|
+
export declare const deletedBlockOutline: string;
|
|
5
|
+
export declare const deletedBlockOutlineRounded: string;
|
|
6
|
+
export declare const getDeletedStyleNode: (nodeName: string) => string | undefined;
|
|
7
|
+
export declare const shouldShowRemovedLozenge: (nodeName: string) => boolean;
|
|
8
|
+
export declare const shouldAddShowDiffDeletedNodeClass: (nodeName: string) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Checks if a node should apply deleted styles directly without wrapper
|
|
11
|
+
* to preserve natural block-level margins
|
|
12
|
+
*/
|
|
13
|
+
export declare const shouldApplyDeletedStylesDirectly: (nodeName: string) => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a "Removed" lozenge to be displayed at the top right corner of deleted block nodes
|
|
16
|
+
*/
|
|
17
|
+
export declare const createRemovedLozenge: (intl: IntlShape, nodeName?: string) => HTMLElement;
|
|
18
|
+
/**
|
|
19
|
+
* Wraps a block node in a container with relative positioning to support absolute positioned lozenge
|
|
20
|
+
*/
|
|
21
|
+
export declare const createBlockNodeWrapper: (nodeName: string) => HTMLDivElement;
|
|
22
|
+
/**
|
|
23
|
+
* Wraps content with deleted styling without opacity (for use when content is a direct child of dom)
|
|
24
|
+
*/
|
|
25
|
+
export declare const createDeletedStyleWrapperWithoutOpacity: (colourScheme?: "standard" | "traditional") => HTMLSpanElement;
|
|
26
|
+
/**
|
|
27
|
+
* Applies deleted styles directly to an HTML element by merging with existing styles
|
|
28
|
+
*/
|
|
29
|
+
export declare const applyDeletedStylesToElement: (element: HTMLElement, targetNode: PMNode, colourScheme: "standard" | "traditional" | undefined) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a content wrapper with deleted styles for a block node
|
|
32
|
+
*/
|
|
33
|
+
export declare const createBlockNodeContentWrapper: (nodeView: Node, targetNode: PMNode, colourScheme: "standard" | "traditional" | undefined) => HTMLElement;
|
|
34
|
+
/**
|
|
35
|
+
* Handles special mediaSingle node rendering with lozenge on child media element
|
|
36
|
+
* @returns true if mediaSingle was handled, false otherwise
|
|
37
|
+
*/
|
|
38
|
+
export declare const handleMediaSingleWithLozenge: (dom: HTMLElement, nodeView: Node, targetNode: PMNode, lozenge: HTMLElement) => boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Appends a block node with wrapper, lozenge, and appropriate styling
|
|
41
|
+
*/
|
|
42
|
+
export declare const appendBlockNodeWithWrapper: (dom: HTMLElement, nodeView: Node, targetNode: PMNode, colourScheme: "standard" | "traditional" | undefined, intl: IntlShape) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Handles all block node rendering with appropriate deleted styling.
|
|
45
|
+
* For blockquote and heading nodes, applies styles directly to preserve natural margins.
|
|
46
|
+
* For other block nodes, uses wrapper approach with optional lozenge.
|
|
47
|
+
*/
|
|
48
|
+
export declare const handleBlockNodeView: (dom: HTMLElement, nodeView: Node, targetNode: PMNode, colourScheme: "standard" | "traditional" | undefined, intl: IntlShape) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-show-diff",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.5",
|
|
4
4
|
"description": "ShowDiff plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/adf-schema": "^51.
|
|
31
|
+
"@atlaskit/adf-schema": "^51.4.0",
|
|
32
32
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
33
33
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
34
34
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"prosemirror-changeset": "^2.2.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@atlaskit/editor-common": "^110.
|
|
42
|
+
"@atlaskit/editor-common": "^110.32.0",
|
|
43
43
|
"react": "^18.2.0"
|
|
44
44
|
},
|
|
45
45
|
"techstack": {
|