Initial commit — Pokemon Doors Randomiser
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
import { XYHandleInstance } from './types';
|
||||
export declare const XYHandle: XYHandleInstance;
|
||||
//# sourceMappingURL=XYHandle.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"XYHandle.d.ts","sourceRoot":"","sources":["../../src/xyhandle/XYHandle.ts"],"names":[],"mappings":"AAqBA,OAAO,EAA8C,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA6SvF,eAAO,MAAM,QAAQ,EAAE,gBAGtB,CAAC"}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export * from './XYHandle';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/xyhandle/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
import { ConnectionMode, type Connection, type OnConnect, type OnConnectStart, type HandleType, type PanBy, type Transform, type Handle, type OnConnectEnd, type UpdateConnection, type IsValidConnection, NodeLookup, FinalConnectionState, NodeBase, InternalNodeBase, EdgeBase } from '../types';
|
||||
export type OnPointerDownParams<NodeType extends NodeBase = NodeBase, EdgeType extends EdgeBase = EdgeBase> = {
|
||||
autoPanOnConnect: boolean;
|
||||
connectionMode: ConnectionMode;
|
||||
connectionRadius: number;
|
||||
domNode: HTMLDivElement | null;
|
||||
handleId: string | null;
|
||||
nodeId: string;
|
||||
isTarget: boolean;
|
||||
nodeLookup: NodeLookup<InternalNodeBase<NodeType>>;
|
||||
lib: string;
|
||||
flowId: string | null;
|
||||
edgeUpdaterType?: HandleType;
|
||||
updateConnection: UpdateConnection<InternalNodeBase<NodeType>>;
|
||||
panBy: PanBy;
|
||||
cancelConnection: () => void;
|
||||
onConnectStart?: OnConnectStart;
|
||||
onConnect?: OnConnect;
|
||||
onConnectEnd?: OnConnectEnd<NodeType>;
|
||||
isValidConnection?: IsValidConnection<EdgeType>;
|
||||
onReconnectEnd?: (evt: MouseEvent | TouchEvent, connectionState: FinalConnectionState<InternalNodeBase<NodeType>>) => void;
|
||||
getTransform: () => Transform;
|
||||
getFromHandle: () => Handle | null;
|
||||
autoPanSpeed?: number;
|
||||
dragThreshold?: number;
|
||||
handleDomNode: Element;
|
||||
};
|
||||
export type IsValidParams<NodeType extends NodeBase = NodeBase, EdgeType extends EdgeBase = EdgeBase> = {
|
||||
handle: Pick<Handle, 'nodeId' | 'id' | 'type'> | null;
|
||||
connectionMode: ConnectionMode;
|
||||
fromNodeId: string;
|
||||
fromHandleId: string | null;
|
||||
fromType: HandleType;
|
||||
isValidConnection?: IsValidConnection<EdgeType>;
|
||||
doc: Document | ShadowRoot;
|
||||
lib: string;
|
||||
flowId: string | null;
|
||||
nodeLookup: NodeLookup<InternalNodeBase<NodeType>>;
|
||||
};
|
||||
export type XYHandleInstance = {
|
||||
onPointerDown: (event: MouseEvent | TouchEvent, params: OnPointerDownParams) => void;
|
||||
isValid: (event: MouseEvent | TouchEvent, params: IsValidParams) => Result;
|
||||
};
|
||||
export type Result = {
|
||||
handleDomNode: Element | null;
|
||||
isValid: boolean;
|
||||
connection: Connection | null;
|
||||
toHandle: Handle | null;
|
||||
};
|
||||
//# sourceMappingURL=types.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/xyhandle/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACT,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM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,SAAS,QAAQ,GAAG,QAAQ,EAAE,QAAQ,SAAS,QAAQ,GAAG,QAAQ,IAAI;IACtG,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC;IACtD,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,UAAU,CAAC;IACrB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAChD,GAAG,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,aAAa,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,EAAE,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACrF,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,EAAE,MAAM,EAAE,aAAa,KAAK,MAAM,CAAC;CAC5E,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC"}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import type { HandleType, XYPosition, Handle, NodeLookup, ConnectionMode } from '../types';
|
||||
export declare function getClosestHandle(position: XYPosition, connectionRadius: number, nodeLookup: NodeLookup, fromHandle: {
|
||||
nodeId: string;
|
||||
type: HandleType;
|
||||
id?: string | null;
|
||||
}): Handle | null;
|
||||
export declare function getHandle(nodeId: string, handleType: HandleType, handleId: string | null, nodeLookup: NodeLookup, connectionMode: ConnectionMode, withAbsolutePosition?: boolean): Handle | null;
|
||||
export declare function getHandleType(edgeUpdaterType: HandleType | undefined, handleDomNode: Element | null): HandleType | null;
|
||||
export declare function isConnectionValid(isInsideConnectionRadius: boolean, isHandleValid: boolean): boolean | null;
|
||||
//# sourceMappingURL=utils.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/xyhandle/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAoB,UAAU,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AA0B7G,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,UAAU,EACpB,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACnE,MAAM,GAAG,IAAI,CA2Cf;AAED,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,oBAAoB,UAAQ,GAC3B,MAAM,GAAG,IAAI,CAef;AAED,wBAAgB,aAAa,CAC3B,eAAe,EAAE,UAAU,GAAG,SAAS,EACvC,aAAa,EAAE,OAAO,GAAG,IAAI,GAC5B,UAAU,GAAG,IAAI,CAUnB;AAED,wBAAgB,iBAAiB,CAAC,wBAAwB,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,kBAU1F"}
|
||||
Reference in New Issue
Block a user