| Current Path : /home/emeraadmin/public_html/4d695/ |
| Current File : /home/emeraadmin/public_html/4d695/dnd-core.zip |
PK s[�\�V�{ { package.jsonnu �[��� {
"_from": "dnd-core@^11.1.3",
"_id": "dnd-core@11.1.3",
"_inBundle": false,
"_integrity": "sha512-QugF55dNW+h+vzxVJ/LSJeTeUw9MCJ2cllhmVThVPEtF16ooBkxj0WBE5RB+AceFxMFo1rO6bJKXtqKl+JNnyA==",
"_location": "/dnd-core",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "dnd-core@^11.1.3",
"name": "dnd-core",
"escapedName": "dnd-core",
"rawSpec": "^11.1.3",
"saveSpec": null,
"fetchSpec": "^11.1.3"
},
"_requiredBy": [
"/react-dnd",
"/react-dnd-html5-backend"
],
"_resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-11.1.3.tgz",
"_shasum": "f92099ba7245e49729d2433157031a6267afcc98",
"_spec": "dnd-core@^11.1.3",
"_where": "C:\\xampp\\htdocs\\emeraltd\\node_modules\\react-dnd",
"bugs": {
"url": "https://github.com/react-dnd/react-dnd/issues"
},
"bundleDependencies": false,
"dependencies": {
"@react-dnd/asap": "^4.0.0",
"@react-dnd/invariant": "^2.0.0",
"redux": "^4.0.4"
},
"deprecated": false,
"description": "Drag and drop sans the GUI",
"gitHead": "32f16c09f0e8560c2a439f3a7fc2e0e8aec3b973",
"homepage": "https://github.com/react-dnd/react-dnd#readme",
"license": "MIT",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"name": "dnd-core",
"repository": {
"type": "git",
"url": "git+https://github.com/react-dnd/react-dnd.git"
},
"scripts": {
"build": "../../../scripts/build_package.sh",
"clean": "../../../scripts/clean_package.sh",
"start": "../../../scripts/watch_package.sh"
},
"sideEffects": false,
"types": "./lib/index.d.ts",
"version": "11.1.3"
}
PK s[�\����: : lib/contracts.d.tsnu �[��� import { DragSource, DropTarget, Identifier } from './interfaces';
export declare function validateSourceContract(source: DragSource): void;
export declare function validateTargetContract(target: DropTarget): void;
export declare function validateType(type: Identifier | Identifier[], allowArray?: boolean): void;
PK s[�\Z�$F} } lib/reducers/refCount.jsnu �[��� import { ADD_SOURCE, ADD_TARGET, REMOVE_SOURCE, REMOVE_TARGET, } from '../actions/registry';
export function reduce(state = 0, action) {
switch (action.type) {
case ADD_SOURCE:
case ADD_TARGET:
return state + 1;
case REMOVE_SOURCE:
case REMOVE_TARGET:
return state - 1;
default:
return state;
}
}
PK s[�\G�� ! lib/reducers/dirtyHandlerIds.d.tsnu �[��� import { Action } from '../interfaces';
export declare type State = string[];
export interface DirtyHandlerIdPayload {
targetIds: string[];
prevTargetIds: string[];
}
export declare function reduce(_state: State | undefined, action: Action<DirtyHandlerIdPayload>): State;
PK s[�\� � � lib/reducers/refCount.d.tsnu �[��� import { Action } from '../interfaces';
export declare type State = number;
export declare function reduce(state: number | undefined, action: Action<any>): State;
PK s[�\h��W W lib/reducers/index.jsnu �[��� import { reduce as dragOffset } from './dragOffset';
import { reduce as dragOperation, } from './dragOperation';
import { reduce as refCount } from './refCount';
import { reduce as dirtyHandlerIds, } from './dirtyHandlerIds';
import { reduce as stateId } from './stateId';
import { get } from '../utils/js_utils';
export function reduce(state = {}, action) {
return {
dirtyHandlerIds: dirtyHandlerIds(state.dirtyHandlerIds, {
type: action.type,
payload: {
...action.payload,
prevTargetIds: get(state, 'dragOperation.targetIds', []),
},
}),
dragOffset: dragOffset(state.dragOffset, action),
refCount: refCount(state.refCount, action),
dragOperation: dragOperation(state.dragOperation, action),
stateId: stateId(state.stateId),
};
}
PK s[�\�f�X X lib/reducers/dragOffset.d.tsnu �[��� import { XYCoord, Action } from '../interfaces';
export interface State {
initialSourceClientOffset: XYCoord | null;
initialClientOffset: XYCoord | null;
clientOffset: XYCoord | null;
}
export declare function reduce(state: State | undefined, action: Action<{
sourceClientOffset: XYCoord;
clientOffset: XYCoord;
}>): State;
PK s[�\%�-I� � lib/reducers/dragOffset.jsnu �[��� import { INIT_COORDS, BEGIN_DRAG, HOVER, END_DRAG, DROP, } from '../actions/dragDrop';
import { areCoordsEqual } from '../utils/equality';
const initialState = {
initialSourceClientOffset: null,
initialClientOffset: null,
clientOffset: null,
};
export function reduce(state = initialState, action) {
const { payload } = action;
switch (action.type) {
case INIT_COORDS:
case BEGIN_DRAG:
return {
initialSourceClientOffset: payload.sourceClientOffset,
initialClientOffset: payload.clientOffset,
clientOffset: payload.clientOffset,
};
case HOVER:
if (areCoordsEqual(state.clientOffset, payload.clientOffset)) {
return state;
}
return {
...state,
clientOffset: payload.clientOffset,
};
case END_DRAG:
case DROP:
return initialState;
default:
return state;
}
}
PK s[�\��l lib/reducers/dirtyHandlerIds.jsnu �[��� import { BEGIN_DRAG, PUBLISH_DRAG_SOURCE, HOVER, END_DRAG, DROP, } from '../actions/dragDrop';
import { ADD_SOURCE, ADD_TARGET, REMOVE_SOURCE, REMOVE_TARGET, } from '../actions/registry';
import { areArraysEqual } from '../utils/equality';
import { NONE, ALL } from '../utils/dirtiness';
import { xor } from '../utils/js_utils';
export function reduce(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_state = NONE, action) {
switch (action.type) {
case HOVER:
break;
case ADD_SOURCE:
case ADD_TARGET:
case REMOVE_TARGET:
case REMOVE_SOURCE:
return NONE;
case BEGIN_DRAG:
case PUBLISH_DRAG_SOURCE:
case END_DRAG:
case DROP:
default:
return ALL;
}
const { targetIds = [], prevTargetIds = [] } = action.payload;
const result = xor(targetIds, prevTargetIds);
const didChange = result.length > 0 || !areArraysEqual(targetIds, prevTargetIds);
if (!didChange) {
return NONE;
}
// Check the target ids at the innermost position. If they are valid, add them
// to the result
const prevInnermostTargetId = prevTargetIds[prevTargetIds.length - 1];
const innermostTargetId = targetIds[targetIds.length - 1];
if (prevInnermostTargetId !== innermostTargetId) {
if (prevInnermostTargetId) {
result.push(prevInnermostTargetId);
}
if (innermostTargetId) {
result.push(innermostTargetId);
}
}
return result;
}
PK s[�\3�g lib/reducers/dragOperation.d.tsnu �[��� import { Identifier, Action } from '../interfaces';
export interface State {
itemType: Identifier | Identifier[] | null;
item: any;
sourceId: string | null;
targetIds: string[];
dropResult: any;
didDrop: boolean;
isSourcePublic: boolean | null;
}
export declare function reduce(state: State | undefined, action: Action<{
itemType: Identifier | Identifier[];
item: any;
sourceId: string;
targetId: string;
targetIds: string[];
isSourcePublic: boolean;
dropResult: any;
}>): State;
PK s[�\�DDd d lib/reducers/index.d.tsnu �[��� import { State as DragOffsetState } from './dragOffset';
import { State as DragOperationState } from './dragOperation';
import { State as RefCountState } from './refCount';
import { State as DirtyHandlerIdsState } from './dirtyHandlerIds';
import { State as StateIdState } from './stateId';
import { Action } from 'interfaces';
export interface State {
dirtyHandlerIds: DirtyHandlerIdsState;
dragOffset: DragOffsetState;
refCount: RefCountState;
dragOperation: DragOperationState;
stateId: StateIdState;
}
export declare function reduce(state: State | undefined, action: Action<any>): State;
PK s[�\�g�<