UEA-PRODEM
This commit is contained in:
+35
-7
@@ -1,7 +1,9 @@
|
||||
"use strict";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
@@ -15,26 +17,52 @@ var __copyProps = (to, from, except, desc) => {
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
useIsHydrated: () => useIsHydrated
|
||||
useIsHydrated: () => useIsHydrated2
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/use-is-hydrated.tsx
|
||||
var import_shim = require("use-sync-external-store/shim");
|
||||
var React2 = __toESM(require("react"));
|
||||
|
||||
// src/use-is-hydrated-legacy.ts
|
||||
var React = __toESM(require("react"));
|
||||
var _isHydrated = false;
|
||||
function useIsHydrated() {
|
||||
return (0, import_shim.useSyncExternalStore)(
|
||||
const [isHydrated, setIsHydrated] = React.useState(_isHydrated);
|
||||
React.useEffect(() => {
|
||||
if (!_isHydrated) {
|
||||
_isHydrated = true;
|
||||
setIsHydrated(true);
|
||||
}
|
||||
}, []);
|
||||
return isHydrated;
|
||||
}
|
||||
|
||||
// src/use-is-hydrated.tsx
|
||||
var useReactSyncExternalStore = React2[" useSyncExternalStore ".trim().toString()];
|
||||
function subscribe() {
|
||||
return () => {
|
||||
};
|
||||
}
|
||||
function useIsHydratedModern() {
|
||||
return useReactSyncExternalStore(
|
||||
subscribe,
|
||||
() => true,
|
||||
() => false
|
||||
);
|
||||
}
|
||||
function subscribe() {
|
||||
return () => {
|
||||
};
|
||||
}
|
||||
var useIsHydrated2 = typeof useReactSyncExternalStore === "function" ? useIsHydratedModern : useIsHydrated;
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
Reference in New Issue
Block a user