Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
'use strict';
/**
* Verifies if an application can use DOM.
*/
function canUseDOM() {
return typeof window !== 'undefined' && !!(window.document && window.document.createElement);
}
exports.canUseDOM = canUseDOM;
//# sourceMappingURL=canUseDOM.cjs.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"canUseDOM.cjs.js","sources":["../../../../packages/react/src/utils/canUseDOM.ts"],"sourcesContent":["/**\n * Verifies if an application can use DOM.\n */\nexport function canUseDOM(): boolean {\n return typeof window !== 'undefined' && !!(window.document && window.document.createElement);\n}\n"],"names":["canUseDOM","window","document","createElement"],"mappings":";;AAAA;;AAEG;SACaA,SAASA,GAAA;AACvB,EAAA,OAAO,OAAOC,MAAM,KAAK,WAAW,IAAI,CAAC,EAAEA,MAAM,CAACC,QAAQ,IAAID,MAAM,CAACC,QAAQ,CAACC,aAAa,CAAC,CAAA;AAC9F;;;;"}
+9
View File
@@ -0,0 +1,9 @@
/**
* Verifies if an application can use DOM.
*/
function canUseDOM() {
return typeof window !== 'undefined' && !!(window.document && window.document.createElement);
}
export { canUseDOM };
//# sourceMappingURL=canUseDOM.esm.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"canUseDOM.esm.js","sources":["../../../../packages/react/src/utils/canUseDOM.ts"],"sourcesContent":["/**\n * Verifies if an application can use DOM.\n */\nexport function canUseDOM(): boolean {\n return typeof window !== 'undefined' && !!(window.document && window.document.createElement);\n}\n"],"names":["canUseDOM","window","document","createElement"],"mappings":"AAAA;;AAEG;SACaA,SAASA,GAAA;AACvB,EAAA,OAAO,OAAOC,MAAM,KAAK,WAAW,IAAI,CAAC,EAAEA,MAAM,CAACC,QAAQ,IAAID,MAAM,CAACC,QAAQ,CAACC,aAAa,CAAC,CAAA;AAC9F;;;;"}
+45
View File
@@ -0,0 +1,45 @@
'use strict';
var React = require('react');
function _interopNamespaceCompat(e) {
if (e && typeof e === 'object' && 'default' in e) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n.default = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
function isInsideComponent() {
// React 18 always logs errors if a dispatcher is not present:
// https://github.com/facebook/react/blob/42f15b324f50d0fd98322c21646ac3013e30344a/packages/react/src/ReactHooks.js#L26-L36
try {
// @ts-expect-error "SECRET_INTERNALS" are not typed
const dispatcher = React__namespace.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher.current;
// Before any React component was rendered "dispatcher" will be "null"
if (dispatcher === null || dispatcher === undefined) {
return false;
}
// A check with hooks call (i.e. call "React.useContext()" outside a component) will always produce errors, but
// a call on the dispatcher wont
dispatcher.useContext({});
return true;
} catch (e) {
return false;
}
}
exports.isInsideComponent = isInsideComponent;
//# sourceMappingURL=isInsideComponent.cjs.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"isInsideComponent.cjs.js","sources":["../../../../packages/react/src/utils/isInsideComponent.ts"],"sourcesContent":["import * as React from 'react';\n\nexport function isInsideComponent() {\n // React 18 always logs errors if a dispatcher is not present:\n // https://github.com/facebook/react/blob/42f15b324f50d0fd98322c21646ac3013e30344a/packages/react/src/ReactHooks.js#L26-L36\n try {\n // @ts-expect-error \"SECRET_INTERNALS\" are not typed\n const dispatcher = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher.current;\n\n // Before any React component was rendered \"dispatcher\" will be \"null\"\n if (dispatcher === null || dispatcher === undefined) {\n return false;\n }\n\n // A check with hooks call (i.e. call \"React.useContext()\" outside a component) will always produce errors, but\n // a call on the dispatcher wont\n dispatcher.useContext({});\n return true;\n } catch (e) {\n return false;\n }\n}\n"],"names":["isInsideComponent","dispatcher","React","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentDispatcher","current","undefined","useContext","e"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;SAEgBA,iBAAiBA,GAAA;AAC/B;AACA;EACA,IAAI;AACF;IACA,MAAMC,UAAU,GAAGC,gBAAK,CAACC,kDAAkD,CAACC,sBAAsB,CAACC,OAAO,CAAA;AAE1G;AACA,IAAA,IAAIJ,UAAU,KAAK,IAAI,IAAIA,UAAU,KAAKK,SAAS,EAAE;AACnD,MAAA,OAAO,KAAK,CAAA;AACd,KAAA;AAEA;AACA;AACAL,IAAAA,UAAU,CAACM,UAAU,CAAC,EAAE,CAAC,CAAA;AACzB,IAAA,OAAO,IAAI,CAAA;GACZ,CAAC,OAAOC,CAAC,EAAE;AACV,IAAA,OAAO,KAAK,CAAA;AACd,GAAA;AACF;;;;"}
+23
View File
@@ -0,0 +1,23 @@
import * as React from 'react';
function isInsideComponent() {
// React 18 always logs errors if a dispatcher is not present:
// https://github.com/facebook/react/blob/42f15b324f50d0fd98322c21646ac3013e30344a/packages/react/src/ReactHooks.js#L26-L36
try {
// @ts-expect-error "SECRET_INTERNALS" are not typed
const dispatcher = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher.current;
// Before any React component was rendered "dispatcher" will be "null"
if (dispatcher === null || dispatcher === undefined) {
return false;
}
// A check with hooks call (i.e. call "React.useContext()" outside a component) will always produce errors, but
// a call on the dispatcher wont
dispatcher.useContext({});
return true;
} catch (e) {
return false;
}
}
export { isInsideComponent };
//# sourceMappingURL=isInsideComponent.esm.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"isInsideComponent.esm.js","sources":["../../../../packages/react/src/utils/isInsideComponent.ts"],"sourcesContent":["import * as React from 'react';\n\nexport function isInsideComponent() {\n // React 18 always logs errors if a dispatcher is not present:\n // https://github.com/facebook/react/blob/42f15b324f50d0fd98322c21646ac3013e30344a/packages/react/src/ReactHooks.js#L26-L36\n try {\n // @ts-expect-error \"SECRET_INTERNALS\" are not typed\n const dispatcher = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher.current;\n\n // Before any React component was rendered \"dispatcher\" will be \"null\"\n if (dispatcher === null || dispatcher === undefined) {\n return false;\n }\n\n // A check with hooks call (i.e. call \"React.useContext()\" outside a component) will always produce errors, but\n // a call on the dispatcher wont\n dispatcher.useContext({});\n return true;\n } catch (e) {\n return false;\n }\n}\n"],"names":["isInsideComponent","dispatcher","React","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentDispatcher","current","undefined","useContext","e"],"mappings":";;SAEgBA,iBAAiBA,GAAA;AAC/B;AACA;EACA,IAAI;AACF;IACA,MAAMC,UAAU,GAAGC,KAAK,CAACC,kDAAkD,CAACC,sBAAsB,CAACC,OAAO,CAAA;AAE1G;AACA,IAAA,IAAIJ,UAAU,KAAK,IAAI,IAAIA,UAAU,KAAKK,SAAS,EAAE;AACnD,MAAA,OAAO,KAAK,CAAA;AACd,KAAA;AAEA;AACA;AACAL,IAAAA,UAAU,CAACM,UAAU,CAAC,EAAE,CAAC,CAAA;AACzB,IAAA,OAAO,IAAI,CAAA;GACZ,CAAC,OAAOC,CAAC,EAAE;AACV,IAAA,OAAO,KAAK,CAAA;AACd,GAAA;AACF;;;;"}