@solhun/feedback-kit-web 0.10.0 → 0.11.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/dist/index.cjs +68 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +68 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1117,6 +1117,11 @@ function hintSourceFrom(queue) {
|
|
|
1117
1117
|
const cacheKey = adapter.hintsCacheKey ?? "default";
|
|
1118
1118
|
return { fetchHints: adapter.fetchHints.bind(adapter), cacheKey };
|
|
1119
1119
|
}
|
|
1120
|
+
function connectionSourceFrom(queue) {
|
|
1121
|
+
const adapter = queue.adapter;
|
|
1122
|
+
if (!adapter || typeof adapter.fetchConnection !== "function") return null;
|
|
1123
|
+
return adapter.fetchConnection.bind(adapter);
|
|
1124
|
+
}
|
|
1120
1125
|
function resolveHintProvider(opts) {
|
|
1121
1126
|
if (opts.hintProvider) return opts.hintProvider;
|
|
1122
1127
|
if (opts.hints) {
|
|
@@ -1202,6 +1207,7 @@ function createWebWidget(opts) {
|
|
|
1202
1207
|
widget,
|
|
1203
1208
|
picking,
|
|
1204
1209
|
store,
|
|
1210
|
+
fetchConnection: connectionSourceFrom(opts.queue),
|
|
1205
1211
|
dispose() {
|
|
1206
1212
|
picking.dispose();
|
|
1207
1213
|
widget.dispose();
|
|
@@ -1214,7 +1220,7 @@ var import_feedback_kit_core4 = require("@solhun/feedback-kit-core");
|
|
|
1214
1220
|
var import_react = require("react");
|
|
1215
1221
|
|
|
1216
1222
|
// src/version.ts
|
|
1217
|
-
var VERSION = true ? "0.
|
|
1223
|
+
var VERSION = true ? "0.11.0" : "dev";
|
|
1218
1224
|
|
|
1219
1225
|
// src/dev-clipboard.ts
|
|
1220
1226
|
var import_feedback_kit_core3 = require("@solhun/feedback-kit-core");
|
|
@@ -1793,6 +1799,8 @@ function FeedbackKit(props) {
|
|
|
1793
1799
|
() => props.devMode === true || isDevSettingsHost(globalThis.location?.hostname ?? "")
|
|
1794
1800
|
);
|
|
1795
1801
|
const [devSettingsOpen, setDevSettingsOpen] = (0, import_react.useState)(false);
|
|
1802
|
+
const [connection, setConnection] = (0, import_react.useState)(null);
|
|
1803
|
+
const [connectionState, setConnectionState] = (0, import_react.useState)("idle");
|
|
1796
1804
|
const devClipsRef = (0, import_react.useRef)([]);
|
|
1797
1805
|
const [devClipCount, setDevClipCount] = (0, import_react.useState)(0);
|
|
1798
1806
|
const [devFallbackText, setDevFallbackText] = (0, import_react.useState)(null);
|
|
@@ -1952,6 +1960,20 @@ function FeedbackKit(props) {
|
|
|
1952
1960
|
if (devClipsRef.current.length === 0) return;
|
|
1953
1961
|
await putOnClipboard(renderDevClipList(devClipsRef.current));
|
|
1954
1962
|
}
|
|
1963
|
+
function openDevSettings() {
|
|
1964
|
+
setDevSettingsOpen(true);
|
|
1965
|
+
if (connectionState !== "idle") return;
|
|
1966
|
+
const fetchConnection = activeKit.fetchConnection;
|
|
1967
|
+
if (!fetchConnection) {
|
|
1968
|
+
setConnectionState("fail");
|
|
1969
|
+
return;
|
|
1970
|
+
}
|
|
1971
|
+
setConnectionState("loading");
|
|
1972
|
+
void fetchConnection().then((value) => {
|
|
1973
|
+
setConnection(value);
|
|
1974
|
+
setConnectionState(value ? "done" : "fail");
|
|
1975
|
+
}).catch(() => setConnectionState("fail"));
|
|
1976
|
+
}
|
|
1955
1977
|
function toggleDevMode(next) {
|
|
1956
1978
|
writeDevPreference(next);
|
|
1957
1979
|
setDevMode(next);
|
|
@@ -2073,7 +2095,7 @@ function FeedbackKit(props) {
|
|
|
2073
2095
|
"data-fk-dev-settings-toggle": "",
|
|
2074
2096
|
"aria-label": "\uD53C\uB4DC\uBC31 \uC124\uC815",
|
|
2075
2097
|
"aria-expanded": devSettingsOpen,
|
|
2076
|
-
onClick: () => setDevSettingsOpen(
|
|
2098
|
+
onClick: () => devSettingsOpen ? setDevSettingsOpen(false) : openDevSettings(),
|
|
2077
2099
|
style: {
|
|
2078
2100
|
...baseButton,
|
|
2079
2101
|
width: 46,
|
|
@@ -2218,6 +2240,50 @@ function FeedbackKit(props) {
|
|
|
2218
2240
|
] })
|
|
2219
2241
|
] })
|
|
2220
2242
|
] }),
|
|
2243
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2244
|
+
"div",
|
|
2245
|
+
{
|
|
2246
|
+
"data-fk-connection": "",
|
|
2247
|
+
style: {
|
|
2248
|
+
marginTop: 12,
|
|
2249
|
+
paddingTop: 12,
|
|
2250
|
+
borderTop: `1px solid ${TOKENS.line}`,
|
|
2251
|
+
fontSize: 12.5
|
|
2252
|
+
},
|
|
2253
|
+
children: [
|
|
2254
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { fontWeight: 700, marginBottom: 6 }, children: "\uBCF4\uB0B4\uB294 \uACF3" }),
|
|
2255
|
+
connectionState === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { color: TOKENS.muted }, children: "\uD655\uC778\uD558\uB294 \uC911\u2026" }) : connectionState === "fail" || !connection ? (
|
|
2256
|
+
// 조용히 비우면 "연결이 없다"로 읽힌다. 못 물어봤다는 것과 없다는 것은 다르다.
|
|
2257
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { color: TOKENS.muted }, children: "\uD655\uC778\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4(\uC218\uC9D1\uCC98\uAC00 \uC751\uB2F5\uD558\uC9C0 \uC54A\uC74C)." })
|
|
2258
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("ul", { style: { margin: 0, paddingLeft: 16, color: TOKENS.ink, lineHeight: 1.7 }, children: [
|
|
2259
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { children: [
|
|
2260
|
+
"\uC218\uC9D1\uCC98 \xB7 ",
|
|
2261
|
+
connection.project.name ?? "\uC774\uB984 \uC5C6\uB294 \uD504\uB85C\uC81D\uD2B8"
|
|
2262
|
+
] }),
|
|
2263
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { children: [
|
|
2264
|
+
"Linear \xB7",
|
|
2265
|
+
" ",
|
|
2266
|
+
connection.linear.connected ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
2267
|
+
connection.linear.teamName ?? "\uC5F0\uACB0\uB41C \uD300",
|
|
2268
|
+
connection.linear.projectName ? ` / ${connection.linear.projectName}` : "",
|
|
2269
|
+
" \u2014 ",
|
|
2270
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("b", { children: connection.linear.autoExport ? "\uC81C\uBCF4\uAC00 \uC790\uB3D9\uC73C\uB85C \uB098\uAC11\uB2C8\uB2E4" : "\uC790\uB3D9 \uBC1C\uC1A1 \uAEBC\uC9D0" })
|
|
2271
|
+
] }) : "\uC5F0\uACB0 \uC5C6\uC74C"
|
|
2272
|
+
] }),
|
|
2273
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { children: [
|
|
2274
|
+
"Symphony \xB7",
|
|
2275
|
+
" ",
|
|
2276
|
+
connection.symphonySlug ? `${connection.symphonySlug} \uAC00 \uCC98\uB9AC` : "\uC790\uB3D9 \uCC98\uB9AC \uC548 \uD568"
|
|
2277
|
+
] })
|
|
2278
|
+
] }),
|
|
2279
|
+
devMode ? (
|
|
2280
|
+
// 개발용 모드가 켜져 있으면 위 목록은 "원래 가던 곳"일 뿐이다. 그대로 두면
|
|
2281
|
+
// 지금도 거기로 가는 줄 읽는다.
|
|
2282
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { marginTop: 8, color: TOKENS.warning, fontWeight: 700 }, children: "\uC9C0\uAE08\uC740 \uC5B4\uB514\uC5D0\uB3C4 \uC548 \uBCF4\uB0C5\uB2C8\uB2E4 \u2014 \uAC1C\uBC1C\uC6A9 \uBAA8\uB4DC\uAC00 \uCF1C\uC838 \uC788\uC2B5\uB2C8\uB2E4." })
|
|
2283
|
+
) : null
|
|
2284
|
+
]
|
|
2285
|
+
}
|
|
2286
|
+
),
|
|
2221
2287
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { style: { margin: "12px 0 0", color: TOKENS.muted, fontSize: 12 }, children: [
|
|
2222
2288
|
"\uC774 \uC124\uC815\uC740 \uB85C\uCEEC(",
|
|
2223
2289
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children: "localhost" }),
|