@fewchurs/react 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/core.d.mts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +2 -2
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +2 -2
- package/dist/core.mjs.map +1 -1
- package/dist/index.d.mts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +15 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { createContext, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
5
5
|
|
|
6
6
|
// src/client/version.ts
|
|
7
|
-
var SDK_VERSION = "1.
|
|
7
|
+
var SDK_VERSION = "1.3.0";
|
|
8
8
|
|
|
9
9
|
// src/client/constants.ts
|
|
10
10
|
var SDK_HEADER = `react/${SDK_VERSION}`;
|
|
@@ -333,7 +333,7 @@ function warnAboutKey(error) {
|
|
|
333
333
|
if (error.code !== "invalid_key" || warnedAboutKey) return;
|
|
334
334
|
if (typeof process !== "undefined" && process.env?.NODE_ENV === "production") return;
|
|
335
335
|
warnedAboutKey = true;
|
|
336
|
-
console.
|
|
336
|
+
console.warn(
|
|
337
337
|
error.status === 403 ? `[fewchurs] ${error.message}` : "[fewchurs] The API key was rejected. Check FEWCHURS_API_KEY (server) or the apiKey passed to FewchursProvider, and that the key is active in your Fewchurs dashboard."
|
|
338
338
|
);
|
|
339
339
|
}
|
|
@@ -1693,16 +1693,22 @@ function FewchursBoardDialog({
|
|
|
1693
1693
|
import { useCallback as useCallback7, useState as useState11 } from "react";
|
|
1694
1694
|
import { createPortal } from "react-dom";
|
|
1695
1695
|
import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1696
|
+
function launcherClasses(floating) {
|
|
1697
|
+
if (!floating) return "fw-launcher";
|
|
1698
|
+
const side = floating === "left" ? " fw-launcher--left" : "";
|
|
1699
|
+
return `fw-launcher fw-launcher--floating${side}`;
|
|
1700
|
+
}
|
|
1696
1701
|
function FewchursButton({
|
|
1697
1702
|
children = "Feedback",
|
|
1698
1703
|
className,
|
|
1699
1704
|
style,
|
|
1700
1705
|
ariaLabel,
|
|
1706
|
+
floating = false,
|
|
1701
1707
|
...board
|
|
1702
1708
|
}) {
|
|
1703
1709
|
const [open, setOpen] = useState11(false);
|
|
1704
1710
|
const close = useCallback7(() => setOpen(false), []);
|
|
1705
|
-
const classes = [board.unstyled ? "" :
|
|
1711
|
+
const classes = [board.unstyled ? "" : launcherClasses(floating), className].filter(Boolean).join(" ");
|
|
1706
1712
|
return /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
1707
1713
|
/* @__PURE__ */ jsx13(
|
|
1708
1714
|
"button",
|