add all frontend files

This commit is contained in:
2026-01-17 15:16:36 -05:00
parent ff16ae7858
commit e40287e4aa
25704 changed files with 1935289 additions and 0 deletions

21
node_modules/rc-motion/es/util/diff.d.ts generated vendored Normal file
View File

@@ -0,0 +1,21 @@
/// <reference types="react" />
export declare const STATUS_ADD: "add";
export declare const STATUS_KEEP: "keep";
export declare const STATUS_REMOVE: "remove";
export declare const STATUS_REMOVED: "removed";
export type DiffStatus = typeof STATUS_ADD | typeof STATUS_KEEP | typeof STATUS_REMOVE | typeof STATUS_REMOVED;
type RawKeyType = string | number;
export interface KeyObject {
key: RawKeyType;
status?: DiffStatus;
}
export declare function wrapKeyToObject(key: React.Key | KeyObject): {
key: string;
status?: DiffStatus;
};
export declare function parseKeys(keys?: any[]): {
key: string;
status?: DiffStatus;
}[];
export declare function diffKeys(prevKeys?: KeyObject[], currentKeys?: KeyObject[]): KeyObject[];
export {};

103
node_modules/rc-motion/es/util/diff.js generated vendored Normal file
View File

@@ -0,0 +1,103 @@
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _typeof from "@babel/runtime/helpers/esm/typeof";
export var STATUS_ADD = 'add';
export var STATUS_KEEP = 'keep';
export var STATUS_REMOVE = 'remove';
export var STATUS_REMOVED = 'removed';
export function wrapKeyToObject(key) {
var keyObj;
if (key && _typeof(key) === 'object' && 'key' in key) {
keyObj = key;
} else {
keyObj = {
key: key
};
}
return _objectSpread(_objectSpread({}, keyObj), {}, {
key: String(keyObj.key)
});
}
export function parseKeys() {
var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
return keys.map(wrapKeyToObject);
}
export function diffKeys() {
var prevKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var currentKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var list = [];
var currentIndex = 0;
var currentLen = currentKeys.length;
var prevKeyObjects = parseKeys(prevKeys);
var currentKeyObjects = parseKeys(currentKeys);
// Check prev keys to insert or keep
prevKeyObjects.forEach(function (keyObj) {
var hit = false;
for (var i = currentIndex; i < currentLen; i += 1) {
var currentKeyObj = currentKeyObjects[i];
if (currentKeyObj.key === keyObj.key) {
// New added keys should add before current key
if (currentIndex < i) {
list = list.concat(currentKeyObjects.slice(currentIndex, i).map(function (obj) {
return _objectSpread(_objectSpread({}, obj), {}, {
status: STATUS_ADD
});
}));
currentIndex = i;
}
list.push(_objectSpread(_objectSpread({}, currentKeyObj), {}, {
status: STATUS_KEEP
}));
currentIndex += 1;
hit = true;
break;
}
}
// If not hit, it means key is removed
if (!hit) {
list.push(_objectSpread(_objectSpread({}, keyObj), {}, {
status: STATUS_REMOVE
}));
}
});
// Add rest to the list
if (currentIndex < currentLen) {
list = list.concat(currentKeyObjects.slice(currentIndex).map(function (obj) {
return _objectSpread(_objectSpread({}, obj), {}, {
status: STATUS_ADD
});
}));
}
/**
* Merge same key when it remove and add again:
* [1 - add, 2 - keep, 1 - remove] -> [1 - keep, 2 - keep]
*/
var keys = {};
list.forEach(function (_ref) {
var key = _ref.key;
keys[key] = (keys[key] || 0) + 1;
});
var duplicatedKeys = Object.keys(keys).filter(function (key) {
return keys[key] > 1;
});
duplicatedKeys.forEach(function (matchKey) {
// Remove `STATUS_REMOVE` node.
list = list.filter(function (_ref2) {
var key = _ref2.key,
status = _ref2.status;
return key !== matchKey || status !== STATUS_REMOVE;
});
// Update `STATUS_ADD` to `STATUS_KEEP`
list.forEach(function (node) {
if (node.key === matchKey) {
// eslint-disable-next-line no-param-reassign
node.status = STATUS_KEEP;
}
});
});
return list;
}

10
node_modules/rc-motion/es/util/motion.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import { MotionName } from '../CSSMotion';
export declare function getVendorPrefixes(domSupport: boolean, win: object): {
animationend: Record<string, string>;
transitionend: Record<string, string>;
};
export declare function getVendorPrefixedEventName(eventName: string): any;
export declare const supportTransition: boolean;
export declare const animationEndName: any;
export declare const transitionEndName: any;
export declare function getTransitionName(transitionName: MotionName, transitionType: string): any;

68
node_modules/rc-motion/es/util/motion.js generated vendored Normal file
View File

@@ -0,0 +1,68 @@
import _typeof from "@babel/runtime/helpers/esm/typeof";
import canUseDOM from "rc-util/es/Dom/canUseDom";
// ================= Transition =================
// Event wrapper. Copy from react source code
function makePrefixMap(styleProp, eventName) {
var prefixes = {};
prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
prefixes["Webkit".concat(styleProp)] = "webkit".concat(eventName);
prefixes["Moz".concat(styleProp)] = "moz".concat(eventName);
prefixes["ms".concat(styleProp)] = "MS".concat(eventName);
prefixes["O".concat(styleProp)] = "o".concat(eventName.toLowerCase());
return prefixes;
}
export function getVendorPrefixes(domSupport, win) {
var prefixes = {
animationend: makePrefixMap('Animation', 'AnimationEnd'),
transitionend: makePrefixMap('Transition', 'TransitionEnd')
};
if (domSupport) {
if (!('AnimationEvent' in win)) {
delete prefixes.animationend.animation;
}
if (!('TransitionEvent' in win)) {
delete prefixes.transitionend.transition;
}
}
return prefixes;
}
var vendorPrefixes = getVendorPrefixes(canUseDOM(), typeof window !== 'undefined' ? window : {});
var style = {};
if (canUseDOM()) {
var _document$createEleme = document.createElement('div');
style = _document$createEleme.style;
}
var prefixedEventNames = {};
export function getVendorPrefixedEventName(eventName) {
if (prefixedEventNames[eventName]) {
return prefixedEventNames[eventName];
}
var prefixMap = vendorPrefixes[eventName];
if (prefixMap) {
var stylePropList = Object.keys(prefixMap);
var len = stylePropList.length;
for (var i = 0; i < len; i += 1) {
var styleProp = stylePropList[i];
if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) {
prefixedEventNames[eventName] = prefixMap[styleProp];
return prefixedEventNames[eventName];
}
}
}
return '';
}
var internalAnimationEndName = getVendorPrefixedEventName('animationend');
var internalTransitionEndName = getVendorPrefixedEventName('transitionend');
export var supportTransition = !!(internalAnimationEndName && internalTransitionEndName);
export var animationEndName = internalAnimationEndName || 'animationend';
export var transitionEndName = internalTransitionEndName || 'transitionend';
export function getTransitionName(transitionName, transitionType) {
if (!transitionName) return null;
if (_typeof(transitionName) === 'object') {
var type = transitionType.replace(/-\w/g, function (match) {
return match[1].toUpperCase();
});
return transitionName[type];
}
return "".concat(transitionName, "-").concat(transitionType);
}