Add yet-another-react-lightbox package and update .gitignore to exclude node_modules

This commit is contained in:
IGNY8 VPS (Salman)
2025-11-12 18:50:30 +00:00
parent bd2a5570a9
commit c92f4a5edd
9304 changed files with 29 additions and 2008667 deletions

View File

@@ -1,123 +0,0 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var React = require('react');
var reactDom = require('react-dom');
var index_cjs = require('@fullcalendar/core/index.cjs');
var internal_cjs = require('@fullcalendar/core/internal.cjs');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
const reactMajorVersion = parseInt(String(React__default["default"].version).split('.')[0]);
const syncRenderingByDefault = reactMajorVersion < 18;
class FullCalendar extends React.Component {
constructor() {
super(...arguments);
this.elRef = React.createRef();
this.isUpdating = false;
this.isUnmounting = false;
this.state = {
customRenderingMap: new Map()
};
this.requestResize = () => {
if (!this.isUnmounting) {
this.cancelResize();
this.resizeId = requestAnimationFrame(() => {
this.doResize();
});
}
};
}
render() {
const customRenderingNodes = [];
for (const customRendering of this.state.customRenderingMap.values()) {
customRenderingNodes.push(React__default["default"].createElement(CustomRenderingComponent, { key: customRendering.id, customRendering: customRendering }));
}
return (React__default["default"].createElement("div", { ref: this.elRef }, customRenderingNodes));
}
componentDidMount() {
// reset b/c react strict-mode calls componentWillUnmount/componentDidMount
this.isUnmounting = false;
const customRenderingStore = new internal_cjs.CustomRenderingStore();
this.handleCustomRendering = customRenderingStore.handle.bind(customRenderingStore);
this.calendar = new index_cjs.Calendar(this.elRef.current, Object.assign(Object.assign({}, this.props), { handleCustomRendering: this.handleCustomRendering }));
this.calendar.render();
// attaching with .on() will cause this to fire AFTER internal preact rendering did flushSync
this.calendar.on('_beforeprint', () => {
reactDom.flushSync(() => {
// our `customRenderingMap` state will be flushed at this point
});
});
let lastRequestTimestamp;
customRenderingStore.subscribe((customRenderingMap) => {
const requestTimestamp = Date.now();
const isMounting = !lastRequestTimestamp;
const runFunc = (
// don't call flushSync if React version already does sync rendering by default
// guards against fatal errors:
// https://github.com/fullcalendar/fullcalendar/issues/7448
syncRenderingByDefault ||
//
isMounting ||
this.isUpdating ||
this.isUnmounting ||
(requestTimestamp - lastRequestTimestamp) < 100 // rerendering frequently
) ? runNow // either sync rendering (first-time or React 16/17) or async (React 18)
: reactDom.flushSync; // guaranteed sync rendering
runFunc(() => {
this.setState({ customRenderingMap }, () => {
lastRequestTimestamp = requestTimestamp;
if (isMounting) {
this.doResize();
}
else {
this.requestResize();
}
});
});
});
}
componentDidUpdate() {
this.isUpdating = true;
this.calendar.resetOptions(Object.assign(Object.assign({}, this.props), { handleCustomRendering: this.handleCustomRendering }));
this.isUpdating = false;
}
componentWillUnmount() {
this.isUnmounting = true;
this.cancelResize();
this.calendar.destroy();
}
doResize() {
this.calendar.updateSize();
}
cancelResize() {
if (this.resizeId !== undefined) {
cancelAnimationFrame(this.resizeId);
this.resizeId = undefined;
}
}
getApi() {
return this.calendar;
}
}
FullCalendar.act = runNow; // DEPRECATED. Not leveraged anymore
class CustomRenderingComponent extends React.PureComponent {
render() {
const { customRendering } = this.props;
const { generatorMeta } = customRendering;
const vnode = typeof generatorMeta === 'function' ?
generatorMeta(customRendering.renderProps) :
generatorMeta;
return reactDom.createPortal(vnode, customRendering.containerEl);
}
}
// Util
// -------------------------------------------------------------------------------------------------
function runNow(f) {
f();
}
exports["default"] = FullCalendar;

View File

@@ -1,26 +0,0 @@
import React, { Component } from 'react';
import { CalendarOptions, CalendarApi } from '@fullcalendar/core';
import { CustomRendering } from '@fullcalendar/core/internal';
interface CalendarState {
customRenderingMap: Map<string, CustomRendering<any>>;
}
export default class FullCalendar extends Component<CalendarOptions, CalendarState> {
static act: typeof runNow;
private elRef;
private calendar;
private handleCustomRendering;
private resizeId;
private isUpdating;
private isUnmounting;
state: CalendarState;
render(): React.JSX.Element;
componentDidMount(): void;
componentDidUpdate(): void;
componentWillUnmount(): void;
requestResize: () => void;
doResize(): void;
cancelResize(): void;
getApi(): CalendarApi;
}
declare function runNow(f: () => void): void;
export {};

View File

@@ -1,113 +0,0 @@
import React, { Component, createRef, PureComponent } from 'react';
import { createPortal, flushSync } from 'react-dom';
import { Calendar, } from '@fullcalendar/core';
import { CustomRenderingStore, } from '@fullcalendar/core/internal';
const reactMajorVersion = parseInt(String(React.version).split('.')[0]);
const syncRenderingByDefault = reactMajorVersion < 18;
export default class FullCalendar extends Component {
constructor() {
super(...arguments);
this.elRef = createRef();
this.isUpdating = false;
this.isUnmounting = false;
this.state = {
customRenderingMap: new Map()
};
this.requestResize = () => {
if (!this.isUnmounting) {
this.cancelResize();
this.resizeId = requestAnimationFrame(() => {
this.doResize();
});
}
};
}
render() {
const customRenderingNodes = [];
for (const customRendering of this.state.customRenderingMap.values()) {
customRenderingNodes.push(React.createElement(CustomRenderingComponent, { key: customRendering.id, customRendering: customRendering }));
}
return (React.createElement("div", { ref: this.elRef }, customRenderingNodes));
}
componentDidMount() {
// reset b/c react strict-mode calls componentWillUnmount/componentDidMount
this.isUnmounting = false;
const customRenderingStore = new CustomRenderingStore();
this.handleCustomRendering = customRenderingStore.handle.bind(customRenderingStore);
this.calendar = new Calendar(this.elRef.current, Object.assign(Object.assign({}, this.props), { handleCustomRendering: this.handleCustomRendering }));
this.calendar.render();
// attaching with .on() will cause this to fire AFTER internal preact rendering did flushSync
this.calendar.on('_beforeprint', () => {
flushSync(() => {
// our `customRenderingMap` state will be flushed at this point
});
});
let lastRequestTimestamp;
customRenderingStore.subscribe((customRenderingMap) => {
const requestTimestamp = Date.now();
const isMounting = !lastRequestTimestamp;
const runFunc = (
// don't call flushSync if React version already does sync rendering by default
// guards against fatal errors:
// https://github.com/fullcalendar/fullcalendar/issues/7448
syncRenderingByDefault ||
//
isMounting ||
this.isUpdating ||
this.isUnmounting ||
(requestTimestamp - lastRequestTimestamp) < 100 // rerendering frequently
) ? runNow // either sync rendering (first-time or React 16/17) or async (React 18)
: flushSync; // guaranteed sync rendering
runFunc(() => {
this.setState({ customRenderingMap }, () => {
lastRequestTimestamp = requestTimestamp;
if (isMounting) {
this.doResize();
}
else {
this.requestResize();
}
});
});
});
}
componentDidUpdate() {
this.isUpdating = true;
this.calendar.resetOptions(Object.assign(Object.assign({}, this.props), { handleCustomRendering: this.handleCustomRendering }));
this.isUpdating = false;
}
componentWillUnmount() {
this.isUnmounting = true;
this.cancelResize();
this.calendar.destroy();
}
doResize() {
this.calendar.updateSize();
}
cancelResize() {
if (this.resizeId !== undefined) {
cancelAnimationFrame(this.resizeId);
this.resizeId = undefined;
}
}
getApi() {
return this.calendar;
}
}
FullCalendar.act = runNow; // DEPRECATED. Not leveraged anymore
class CustomRenderingComponent extends PureComponent {
render() {
const { customRendering } = this.props;
const { generatorMeta } = customRendering;
const vnode = typeof generatorMeta === 'function' ?
generatorMeta(customRendering.renderProps) :
generatorMeta;
return createPortal(vnode, customRendering.containerEl);
}
}
// Util
// -------------------------------------------------------------------------------------------------
function runNow(f) {
f();
}
//# sourceMappingURL=index.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAClE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAGL,QAAQ,GACT,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAEL,oBAAoB,GACrB,MAAM,6BAA6B,CAAA;AAEpC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACvE,MAAM,sBAAsB,GAAG,iBAAiB,GAAG,EAAE,CAAA;AAMrD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAyC;IAAnF;;QAGU,UAAK,GAAG,SAAS,EAA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