Skip to content

Commit de0fabf

Browse files
authored
fix: use package wrapper for native ESM support in pdnd (#3756)
1 parent 7a7b262 commit de0fabf

5 files changed

Lines changed: 23 additions & 36 deletions

File tree

eslint.config.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ export default [
1919
...ts,
2020
...unicorn,
2121
...react,
22-
{
23-
files: ['**/pdnd.cts'],
24-
rules: {
25-
'import/no-extraneous-dependencies': 'off',
26-
},
27-
},
2822
{
2923
files: ['**/*.{ts,tsx,cts,mts}'],
3024
rules: {

package-lock.json

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"@zakodium/nmr-types": "^0.2.0",
7272
"@zakodium/nmrium-core": "^0.2.2",
7373
"@zakodium/nmrium-core-plugins": "^0.3.4",
74+
"@zakodium/pdnd-esm": "^1.0.2",
7475
"@zip.js/zip.js": "^2.8.7",
7576
"cheminfo-font": "^1.13.1",
7677
"cheminfo-types": "^1.8.1",

src/component/elements/Sections.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ import type { ElementDragPayload } from '@atlaskit/pragmatic-drag-and-drop/dist/
33
import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
44
import { Colors, Icon, Tag } from '@blueprintjs/core';
55
import styled from '@emotion/styled';
6+
import {
7+
attachClosestEdge,
8+
combine,
9+
draggable,
10+
dropTargetForElements,
11+
extractClosestEdge,
12+
getReorderDestinationIndex,
13+
pointerOutsideOfPreview,
14+
setCustomNativeDragPreview,
15+
} from '@zakodium/pdnd-esm';
616
import type {
717
CSSProperties,
818
HTMLAttributes,
@@ -21,17 +31,6 @@ import {
2131
import { createPortal } from 'react-dom';
2232
import { assert } from 'react-science/ui';
2333

24-
import {
25-
attachClosestEdge,
26-
combine,
27-
draggable,
28-
dropTargetForElements,
29-
extractClosestEdge,
30-
getReorderDestinationIndex,
31-
pointerOutsideOfPreview,
32-
setCustomNativeDragPreview,
33-
} from './pdnd.cjs';
34-
3534
interface DropIndicatorProps {
3635
edge: Edge;
3736
}

src/component/elements/pdnd.cts

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)