@zakodium/pdnd-esm 1.0.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 zakodium
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # @zakodium/pdnd-esm
2
+
3
+ [![NPM version](https://img.shields.io/npm/v/@zakodium/pdnd-esm.svg)](https://www.npmjs.com/package/@zakodium/pdnd-esm)
4
+ [![npm download](https://img.shields.io/npm/dm/@zakodium/pdnd-esm.svg)](https://www.npmjs.com/package/@zakodium/pdnd-esm)
5
+ [![license](https://img.shields.io/npm/l/@zakodium/pdnd-esm.svg)](https://github.com/zakodium/@zakodium/pdnd-esm/blob/main/LICENSE)
6
+
7
+ Re-export specific methods from @atlaskit/pragmatic-drag-and-drop for ESM compatibility.
8
+
9
+ ## Installation
10
+
11
+ ```console
12
+ npm install @zakodium/pdnd-esm
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```js
18
+ import { draggable } from '@zakodium/pdnd-esm';
19
+
20
+ // ... use it
21
+ ```
22
+
23
+ ## License
24
+
25
+ [MIT](./LICENSE)
package/lib/index.cjs ADDED
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getReorderDestinationIndex = exports.extractClosestEdge = exports.attachClosestEdge = exports.autoScrollForElements = exports.setCustomNativeDragPreview = exports.pointerOutsideOfPreview = exports.monitorForElements = exports.dropTargetForElements = exports.draggable = exports.combine = void 0;
4
+ // https://github.com/atlassian/pragmatic-drag-and-drop/issues/27
5
+ // Given how `@atlaskit/pragmatic-drag-and-drop` publishes ESM in a non-native way,
6
+ // we have to trick TS into using the CJS build so that our build is compatible
7
+ // with native ESM.
8
+ var combine_1 = require("@atlaskit/pragmatic-drag-and-drop/combine");
9
+ Object.defineProperty(exports, "combine", { enumerable: true, get: function () { return combine_1.combine; } });
10
+ var adapter_1 = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
11
+ Object.defineProperty(exports, "draggable", { enumerable: true, get: function () { return adapter_1.draggable; } });
12
+ Object.defineProperty(exports, "dropTargetForElements", { enumerable: true, get: function () { return adapter_1.dropTargetForElements; } });
13
+ Object.defineProperty(exports, "monitorForElements", { enumerable: true, get: function () { return adapter_1.monitorForElements; } });
14
+ var pointer_outside_of_preview_1 = require("@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview");
15
+ Object.defineProperty(exports, "pointerOutsideOfPreview", { enumerable: true, get: function () { return pointer_outside_of_preview_1.pointerOutsideOfPreview; } });
16
+ var set_custom_native_drag_preview_1 = require("@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview");
17
+ Object.defineProperty(exports, "setCustomNativeDragPreview", { enumerable: true, get: function () { return set_custom_native_drag_preview_1.setCustomNativeDragPreview; } });
18
+ var element_1 = require("@atlaskit/pragmatic-drag-and-drop-auto-scroll/element");
19
+ Object.defineProperty(exports, "autoScrollForElements", { enumerable: true, get: function () { return element_1.autoScrollForElements; } });
20
+ var closest_edge_1 = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge");
21
+ Object.defineProperty(exports, "attachClosestEdge", { enumerable: true, get: function () { return closest_edge_1.attachClosestEdge; } });
22
+ Object.defineProperty(exports, "extractClosestEdge", { enumerable: true, get: function () { return closest_edge_1.extractClosestEdge; } });
23
+ var get_reorder_destination_index_1 = require("@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index");
24
+ Object.defineProperty(exports, "getReorderDestinationIndex", { enumerable: true, get: function () { return get_reorder_destination_index_1.getReorderDestinationIndex; } });
25
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.cts"],"names":[],"mappings":";;;AAAA,iEAAiE;AACjE,mFAAmF;AACnF,+EAA+E;AAC/E,mBAAmB;AACnB,qEAAoE;AAA3D,kGAAA,OAAO,OAAA;AAChB,6EAI2D;AAHzD,oGAAA,SAAS,OAAA;AACT,gHAAA,qBAAqB,OAAA;AACrB,6GAAA,kBAAkB,OAAA;AAEpB,mHAA+G;AAAtG,qIAAA,uBAAuB,OAAA;AAChC,2HAAsH;AAA7G,4IAAA,0BAA0B,OAAA;AACnC,iFAA8F;AAArF,gHAAA,qBAAqB,OAAA;AAC9B,sFAG+D;AAF7D,iHAAA,iBAAiB,OAAA;AACjB,kHAAA,kBAAkB,OAAA;AAEpB,6HAAyH;AAAhH,2IAAA,0BAA0B,OAAA"}
@@ -0,0 +1,8 @@
1
+ export { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
2
+ export { draggable, dropTargetForElements, monitorForElements, } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
3
+ export { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview';
4
+ export { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
5
+ export { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
6
+ export { attachClosestEdge, extractClosestEdge, } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
7
+ export { getReorderDestinationIndex } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index';
8
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.cts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EACL,SAAS,EACT,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAC/G,OAAO,EAAE,0BAA0B,EAAE,MAAM,0EAA0E,CAAC;AACtH,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EACL,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,6EAA6E,CAAC"}
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@zakodium/pdnd-esm",
3
+ "version": "1.0.1",
4
+ "license": "MIT",
5
+ "description": "Re-export specific methods from @atlaskit/pragmatic-drag-and-drop for ESM compatibility",
6
+ "keywords": [],
7
+ "author": "Michael Zasso",
8
+ "type": "module",
9
+ "exports": {
10
+ ".": "./lib/index.cjs"
11
+ },
12
+ "files": [
13
+ "lib",
14
+ "src"
15
+ ],
16
+ "scripts": {
17
+ "check-types": "tsc --noEmit",
18
+ "clean": "rimraf coverage lib",
19
+ "eslint": "eslint .",
20
+ "eslint-fix": "eslint . --fix",
21
+ "prepack": "npm run tsc",
22
+ "prettier": "prettier --check .",
23
+ "prettier-write": "prettier --write .",
24
+ "test": "npm run test-only && npm run check-types && npm run eslint && npm run prettier",
25
+ "test-only": "vitest run --coverage",
26
+ "tsc": "npm run clean && npm run tsc-build",
27
+ "tsc-build": "tsc --project tsconfig.build.json"
28
+ },
29
+ "dependencies": {
30
+ "@atlaskit/pragmatic-drag-and-drop": "^1.7.7",
31
+ "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.2",
32
+ "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0"
33
+ },
34
+ "devDependencies": {
35
+ "@types/node": "^24.7.2",
36
+ "@vitest/coverage-v8": "^3.2.4",
37
+ "@zakodium/tsconfig": "^1.0.2",
38
+ "eslint": "^9.37.0",
39
+ "eslint-config-cheminfo-typescript": "^20.0.0",
40
+ "prettier": "^3.6.2",
41
+ "rimraf": "^6.0.1",
42
+ "typescript": "^5.9.3",
43
+ "vitest": "^3.2.4"
44
+ },
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/zakodium/@zakodium/pdnd-esm.git"
48
+ },
49
+ "bugs": {
50
+ "url": "https://github.com/zakodium/@zakodium/pdnd-esm/issues"
51
+ },
52
+ "homepage": "https://github.com/zakodium/@zakodium/pdnd-esm#readme"
53
+ }
package/src/index.cts ADDED
@@ -0,0 +1,18 @@
1
+ // https://github.com/atlassian/pragmatic-drag-and-drop/issues/27
2
+ // Given how `@atlaskit/pragmatic-drag-and-drop` publishes ESM in a non-native way,
3
+ // we have to trick TS into using the CJS build so that our build is compatible
4
+ // with native ESM.
5
+ export { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
6
+ export {
7
+ draggable,
8
+ dropTargetForElements,
9
+ monitorForElements,
10
+ } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
11
+ export { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview';
12
+ export { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
13
+ export { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
14
+ export {
15
+ attachClosestEdge,
16
+ extractClosestEdge,
17
+ } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
18
+ export { getReorderDestinationIndex } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index';