- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
101 lines
3.5 KiB
JavaScript
101 lines
3.5 KiB
JavaScript
"use strict";
|
|
"use client";
|
|
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)
|
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
};
|
|
var __copyProps = (to, from, except, desc) => {
|
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
for (let key of __getOwnPropNames(from))
|
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
}
|
|
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/ReactQueryDevtools.tsx
|
|
var ReactQueryDevtools_exports = {};
|
|
__export(ReactQueryDevtools_exports, {
|
|
ReactQueryDevtools: () => ReactQueryDevtools
|
|
});
|
|
module.exports = __toCommonJS(ReactQueryDevtools_exports);
|
|
var React = __toESM(require("react"), 1);
|
|
var import_react_query = require("@tanstack/react-query");
|
|
var import_query_devtools = require("@tanstack/query-devtools");
|
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
function ReactQueryDevtools(props) {
|
|
const queryClient = (0, import_react_query.useQueryClient)(props.client);
|
|
const ref = React.useRef(null);
|
|
const {
|
|
buttonPosition,
|
|
position,
|
|
initialIsOpen,
|
|
errorTypes,
|
|
styleNonce,
|
|
shadowDOMTarget,
|
|
hideDisabledQueries
|
|
} = props;
|
|
const [devtools] = React.useState(
|
|
new import_query_devtools.TanstackQueryDevtools({
|
|
client: queryClient,
|
|
queryFlavor: "React Query",
|
|
version: "5",
|
|
onlineManager: import_react_query.onlineManager,
|
|
buttonPosition,
|
|
position,
|
|
initialIsOpen,
|
|
errorTypes,
|
|
styleNonce,
|
|
shadowDOMTarget,
|
|
hideDisabledQueries
|
|
})
|
|
);
|
|
React.useEffect(() => {
|
|
devtools.setClient(queryClient);
|
|
}, [queryClient, devtools]);
|
|
React.useEffect(() => {
|
|
if (buttonPosition) {
|
|
devtools.setButtonPosition(buttonPosition);
|
|
}
|
|
}, [buttonPosition, devtools]);
|
|
React.useEffect(() => {
|
|
if (position) {
|
|
devtools.setPosition(position);
|
|
}
|
|
}, [position, devtools]);
|
|
React.useEffect(() => {
|
|
devtools.setInitialIsOpen(initialIsOpen || false);
|
|
}, [initialIsOpen, devtools]);
|
|
React.useEffect(() => {
|
|
devtools.setErrorTypes(errorTypes || []);
|
|
}, [errorTypes, devtools]);
|
|
React.useEffect(() => {
|
|
if (ref.current) {
|
|
devtools.mount(ref.current);
|
|
}
|
|
return () => {
|
|
devtools.unmount();
|
|
};
|
|
}, [devtools]);
|
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { dir: "ltr", className: "tsqd-parent-container", ref });
|
|
}
|
|
// Annotate the CommonJS export names for ESM import in node:
|
|
0 && (module.exports = {
|
|
ReactQueryDevtools
|
|
});
|
|
//# sourceMappingURL=ReactQueryDevtools.cjs.map
|