Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@atlaskit/pragmatic-drag-and-drop

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/pragmatic-drag-and-drop - npm Package Compare versions

Comparing version 1.1.11 to 1.1.12

8

CHANGELOG.md
# @atlaskit/pragmatic-drag-and-drop
## 1.1.12
### Patch Changes
- [#109670](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109670)
[`8eb3fe4136d55`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8eb3fe4136d55) -
Internal consolidation of `once()` code
## 1.1.11

@@ -4,0 +12,0 @@

4

dist/cjs/util/android.js

@@ -7,7 +7,7 @@ "use strict";

exports.isAndroid = exports.androidFallbackText = void 0;
var _cacheFirst = require("./cache-first");
var _once = require("../public-utils/once");
// using `cache` as our `isAndroid()` result will not change in a browser
var isAndroid = exports.isAndroid = (0, _cacheFirst.cacheFirst)(function isAndroid() {
var isAndroid = exports.isAndroid = (0, _once.once)(function isAndroid() {
return navigator.userAgent.toLocaleLowerCase().includes('android');
});
var androidFallbackText = exports.androidFallbackText = 'pdnd:android-fallback';

@@ -7,3 +7,3 @@ "use strict";

exports.isFirefox = void 0;
var _cacheFirst = require("./cache-first");
var _once = require("../public-utils/once");
// using `cache` as our `isFirefox()` result will not change in a browser

@@ -14,3 +14,3 @@

* */
var isFirefox = exports.isFirefox = (0, _cacheFirst.cacheFirst)(function isFirefox() {
var isFirefox = exports.isFirefox = (0, _once.once)(function isFirefox() {
if (process.env.NODE_ENV === 'test') {

@@ -17,0 +17,0 @@ return false;

@@ -7,3 +7,3 @@ "use strict";

exports.isSafari = void 0;
var _cacheFirst = require("./cache-first");
var _once = require("../public-utils/once");
// using `cache` as our `isSafari()` result will not change in a browser

@@ -15,3 +15,3 @@

* */
var isSafari = exports.isSafari = (0, _cacheFirst.cacheFirst)(function isSafari() {
var isSafari = exports.isSafari = (0, _once.once)(function isSafari() {
if (process.env.NODE_ENV === 'test') {

@@ -18,0 +18,0 @@ return false;

@@ -1,7 +0,7 @@

import { cacheFirst } from './cache-first';
import { once } from '../public-utils/once';
// using `cache` as our `isAndroid()` result will not change in a browser
export const isAndroid = cacheFirst(function isAndroid() {
export const isAndroid = once(function isAndroid() {
return navigator.userAgent.toLocaleLowerCase().includes('android');
});
export const androidFallbackText = 'pdnd:android-fallback';

@@ -1,2 +0,2 @@

import { cacheFirst } from './cache-first';
import { once } from '../public-utils/once';

@@ -8,3 +8,3 @@ // using `cache` as our `isFirefox()` result will not change in a browser

* */
export const isFirefox = cacheFirst(function isFirefox() {
export const isFirefox = once(function isFirefox() {
if (process.env.NODE_ENV === 'test') {

@@ -11,0 +11,0 @@ return false;

@@ -1,2 +0,2 @@

import { cacheFirst } from './cache-first';
import { once } from '../public-utils/once';

@@ -9,3 +9,3 @@ // using `cache` as our `isSafari()` result will not change in a browser

* */
export const isSafari = cacheFirst(function isSafari() {
export const isSafari = once(function isSafari() {
if (process.env.NODE_ENV === 'test') {

@@ -12,0 +12,0 @@ return false;

@@ -1,7 +0,7 @@

import { cacheFirst } from './cache-first';
import { once } from '../public-utils/once';
// using `cache` as our `isAndroid()` result will not change in a browser
export var isAndroid = cacheFirst(function isAndroid() {
export var isAndroid = once(function isAndroid() {
return navigator.userAgent.toLocaleLowerCase().includes('android');
});
export var androidFallbackText = 'pdnd:android-fallback';

@@ -1,2 +0,2 @@

import { cacheFirst } from './cache-first';
import { once } from '../public-utils/once';

@@ -8,3 +8,3 @@ // using `cache` as our `isFirefox()` result will not change in a browser

* */
export var isFirefox = cacheFirst(function isFirefox() {
export var isFirefox = once(function isFirefox() {
if (process.env.NODE_ENV === 'test') {

@@ -11,0 +11,0 @@ return false;

@@ -1,2 +0,2 @@

import { cacheFirst } from './cache-first';
import { once } from '../public-utils/once';

@@ -9,3 +9,3 @@ // using `cache` as our `isSafari()` result will not change in a browser

* */
export var isSafari = cacheFirst(function isSafari() {
export var isSafari = once(function isSafari() {
if (process.env.NODE_ENV === 'test') {

@@ -12,0 +12,0 @@ return false;

import { type BaseEventPayload, type CleanupFn, type DropTargetEventBasePayload, type DropTargetEventPayloadMap, type DropTargetGetFeedbackArgs, type EventPayloadMap, type ExternalDragType, type MonitorGetFeedbackArgs, type NativeMediaType } from '../internal-types';
export declare function isAnAvailableType({ type, value, }: {
export declare function isAnAvailableType({ type, value }: {
type: string;

@@ -4,0 +4,0 @@ value: string;

@@ -1,3 +0,3 @@

export { monitorForExternal, dropTargetForExternal, } from '../../adapter/external-adapter';
export type { NativeMediaType, ExternalDragPayload, } from '../../internal-types';
export { monitorForExternal, dropTargetForExternal } from '../../adapter/external-adapter';
export type { NativeMediaType, ExternalDragPayload } from '../../internal-types';
export type { ExternalEventBasePayload, ExternalEventPayloadMap, ElementDropTargetEventBasePayload, ExternalDropTargetEventPayloadMap, ExternalMonitorGetFeedbackArgs, ExternalDropTargetGetFeedbackArgs, } from '../../adapter/external-adapter';

@@ -10,3 +10,3 @@ import { type AllDragTypes, type DragLocation, type EventPayloadMap } from '../internal-types';

}): {
start({ nativeSetDragImage, }: {
start({ nativeSetDragImage }: {
nativeSetDragImage: DataTransfer['setDragImage'] | null;

@@ -23,6 +23,6 @@ }): void;

/** When dragging from an external source, we need to collect the
drag source information again as it is often only available during
the "drop" event */
drag source information again as it is often only available during
the "drop" event */
updatedSourcePayload: DragType['payload'] | null;
}): void;
};

@@ -10,5 +10,5 @@ import { type ElementEventPayloadMap } from '../../../adapter/element-adapter';

/** The `HTMLElement` that you need to render your preview element into.
`container` will be appended to the `document.body` and will be removed
after your `CleanupFn` is called
*/
`container` will be appended to the `document.body` and will be removed
after your `CleanupFn` is called
*/
container: HTMLElement;

@@ -15,0 +15,0 @@ }) => CleanupFn | void;

@@ -5,4 +5,4 @@ /**

*/
export declare function scrollJustEnoughIntoView({ element, }: {
export declare function scrollJustEnoughIntoView({ element }: {
element: Element;
}): void;

@@ -1,2 +0,2 @@

export declare const isAndroid: () => boolean;
export declare const isAndroid: (this: unknown) => boolean;
export declare const androidFallbackText = "pdnd:android-fallback";

@@ -1,6 +0,6 @@

export declare function isEnteringWindowInSafari({ dragEnter, }: {
export declare function isEnteringWindowInSafari({ dragEnter }: {
dragEnter: DragEvent;
}): boolean;
export declare function isLeavingWindowInSafari({ dragLeave, }: {
export declare function isLeavingWindowInSafari({ dragLeave }: {
dragLeave: DragEvent;
}): boolean;

@@ -1,3 +0,3 @@

export declare function isEnteringWindow({ dragEnter, }: {
export declare function isEnteringWindow({ dragEnter }: {
dragEnter: DragEvent;
}): boolean;

@@ -1,3 +0,3 @@

export declare function isLeavingWindow({ dragLeave, }: {
export declare function isLeavingWindow({ dragLeave }: {
dragLeave: DragEvent;
}): boolean;

@@ -1,2 +0,2 @@

export declare function getBindingsForBrokenDrags({ onDragEnd, }: {
export declare function getBindingsForBrokenDrags({ onDragEnd }: {
onDragEnd: () => void;

@@ -3,0 +3,0 @@ }): readonly [

/**
* Returns `true` if a `Firefox` browser
* */
export declare const isFirefox: () => boolean;
export declare const isFirefox: (this: unknown) => boolean;

@@ -5,2 +5,2 @@ /**

* */
export declare const isSafari: () => boolean;
export declare const isSafari: (this: unknown) => boolean;
import { type BaseEventPayload, type CleanupFn, type DropTargetEventBasePayload, type DropTargetEventPayloadMap, type DropTargetGetFeedbackArgs, type EventPayloadMap, type ExternalDragType, type MonitorGetFeedbackArgs, type NativeMediaType } from '../internal-types';
export declare function isAnAvailableType({ type, value, }: {
export declare function isAnAvailableType({ type, value }: {
type: string;

@@ -4,0 +4,0 @@ value: string;

@@ -1,3 +0,3 @@

export { monitorForExternal, dropTargetForExternal, } from '../../adapter/external-adapter';
export type { NativeMediaType, ExternalDragPayload, } from '../../internal-types';
export { monitorForExternal, dropTargetForExternal } from '../../adapter/external-adapter';
export type { NativeMediaType, ExternalDragPayload } from '../../internal-types';
export type { ExternalEventBasePayload, ExternalEventPayloadMap, ElementDropTargetEventBasePayload, ExternalDropTargetEventPayloadMap, ExternalMonitorGetFeedbackArgs, ExternalDropTargetGetFeedbackArgs, } from '../../adapter/external-adapter';

@@ -10,3 +10,3 @@ import { type AllDragTypes, type DragLocation, type EventPayloadMap } from '../internal-types';

}): {
start({ nativeSetDragImage, }: {
start({ nativeSetDragImage }: {
nativeSetDragImage: DataTransfer['setDragImage'] | null;

@@ -23,6 +23,6 @@ }): void;

/** When dragging from an external source, we need to collect the
drag source information again as it is often only available during
the "drop" event */
drag source information again as it is often only available during
the "drop" event */
updatedSourcePayload: DragType['payload'] | null;
}): void;
};

@@ -10,5 +10,5 @@ import { type ElementEventPayloadMap } from '../../../adapter/element-adapter';

/** The `HTMLElement` that you need to render your preview element into.
`container` will be appended to the `document.body` and will be removed
after your `CleanupFn` is called
*/
`container` will be appended to the `document.body` and will be removed
after your `CleanupFn` is called
*/
container: HTMLElement;

@@ -15,0 +15,0 @@ }) => CleanupFn | void;

@@ -5,4 +5,4 @@ /**

*/
export declare function scrollJustEnoughIntoView({ element, }: {
export declare function scrollJustEnoughIntoView({ element }: {
element: Element;
}): void;

@@ -1,2 +0,2 @@

export declare const isAndroid: () => boolean;
export declare const isAndroid: (this: unknown) => boolean;
export declare const androidFallbackText = "pdnd:android-fallback";

@@ -1,6 +0,6 @@

export declare function isEnteringWindowInSafari({ dragEnter, }: {
export declare function isEnteringWindowInSafari({ dragEnter }: {
dragEnter: DragEvent;
}): boolean;
export declare function isLeavingWindowInSafari({ dragLeave, }: {
export declare function isLeavingWindowInSafari({ dragLeave }: {
dragLeave: DragEvent;
}): boolean;

@@ -1,3 +0,3 @@

export declare function isEnteringWindow({ dragEnter, }: {
export declare function isEnteringWindow({ dragEnter }: {
dragEnter: DragEvent;
}): boolean;

@@ -1,3 +0,3 @@

export declare function isLeavingWindow({ dragLeave, }: {
export declare function isLeavingWindow({ dragLeave }: {
dragLeave: DragEvent;
}): boolean;

@@ -1,2 +0,2 @@

export declare function getBindingsForBrokenDrags({ onDragEnd, }: {
export declare function getBindingsForBrokenDrags({ onDragEnd }: {
onDragEnd: () => void;

@@ -3,0 +3,0 @@ }): readonly [{

/**
* Returns `true` if a `Firefox` browser
* */
export declare const isFirefox: () => boolean;
export declare const isFirefox: (this: unknown) => boolean;

@@ -5,2 +5,2 @@ /**

* */
export declare const isSafari: () => boolean;
export declare const isSafari: (this: unknown) => boolean;
Copyright 2022 Atlassian Pty Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing permissions and limitations under the
License.
{
"name": "@atlaskit/pragmatic-drag-and-drop",
"version": "1.1.11",
"version": "1.1.12",
"description": "The core package for Pragmatic drag and drop - enabling fast drag and drop for any experience on any tech stack",

@@ -5,0 +5,0 @@ "repository": "https://github.com/atlassian/pragmatic-drag-and-drop",

@@ -5,3 +5,4 @@ <!-- API Report Version: 2.3 -->

> Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
> Do not edit this file. This report is auto-generated using
> [API Extractor](https://api-extractor.com/).
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)

@@ -8,0 +9,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc