@yoast/ai-insights-client 1.0.1 → 1.1.1
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 +0 -4
- package/dist/ai-insights-client.cjs.js +1293 -0
- package/dist/{index.css → ai-insights-client.css} +1 -1
- package/dist/ai-insights-client.es.js +32070 -0
- package/dist/index.d.ts +1 -0
- package/package.json +48 -12
- package/dist/1-BrandInfo-CinffkUh.js +0 -1432
- package/dist/2-QuerySelection-BzbyqeHz.js +0 -145
- package/dist/BrandList-DzzZhRJ8.js +0 -460
- package/dist/CXEL7IU7-wPFoEf3d.js +0 -42
- package/dist/HASRA6WW-BgmA3kL8.js +0 -8913
- package/dist/I3HPI4QX-BR0UzjLo.js +0 -33
- package/dist/PaperActions-CJVyQXH2.js +0 -30
- package/dist/Settings-pN5RkxPZ.js +0 -156
- package/dist/index-B56vBhjW.js +0 -49644
- package/dist/index-BhDYrlIQ.js +0 -36
- package/dist/index.js +0 -10
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./HASRA6WW-BgmA3kL8.js";
|
|
2
|
-
import { ay as d, az as f, aA as e } from "./index-B56vBhjW.js";
|
|
3
|
-
var p = (a) => {
|
|
4
|
-
const [r, t] = c({
|
|
5
|
-
prefix: "TanstackQueryDevtools"
|
|
6
|
-
}), n = d(), s = f(() => {
|
|
7
|
-
const o = r.theme_preference || l;
|
|
8
|
-
return o !== "system" ? o : n();
|
|
9
|
-
});
|
|
10
|
-
return e(i.Provider, {
|
|
11
|
-
value: a,
|
|
12
|
-
get children() {
|
|
13
|
-
return e(m, {
|
|
14
|
-
localStore: r,
|
|
15
|
-
setLocalStore: t,
|
|
16
|
-
get children() {
|
|
17
|
-
return e(u.Provider, {
|
|
18
|
-
value: s,
|
|
19
|
-
get children() {
|
|
20
|
-
return e(v, {
|
|
21
|
-
localStore: r,
|
|
22
|
-
setLocalStore: t
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}, C = p;
|
|
31
|
-
export {
|
|
32
|
-
C as default
|
|
33
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { j as s, i as d, c as i, B as r, ax as m, aw as o } from "./index-B56vBhjW.js";
|
|
2
|
-
const f = ({
|
|
3
|
-
sparkCost: a = 0,
|
|
4
|
-
onBack: t,
|
|
5
|
-
variant: e = "ai",
|
|
6
|
-
buttonText: l,
|
|
7
|
-
onButtonClick: y,
|
|
8
|
-
isButtonDisabled: n = !1,
|
|
9
|
-
isLoading: c = !1
|
|
10
|
-
}) => /* @__PURE__ */ s.jsx(d, { nestedInPaperContent: !0, children: /* @__PURE__ */ s.jsxs("div", { className: i(
|
|
11
|
-
// if back button, ensure back appears separately from the button group
|
|
12
|
-
{
|
|
13
|
-
"yst-flex yst-flex-1 yst-flex-col yst-items-start yst-justify-between yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-between": t
|
|
14
|
-
}
|
|
15
|
-
), children: [
|
|
16
|
-
t && /* @__PURE__ */ s.jsx(r, { variant: "tertiary", onClick: t, className: "yst-no-underline", children: "← Back" }),
|
|
17
|
-
/* @__PURE__ */ s.jsxs("div", { className: i("yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-end"), children: [
|
|
18
|
-
a > 0 && /* @__PURE__ */ s.jsx(m, { cost: a }),
|
|
19
|
-
/* @__PURE__ */ s.jsxs(r, { onClick: y, variant: e === "ai" ? "primary" : e, className: "yst-gap-1.5", style: e === "ai" ? {
|
|
20
|
-
background: "linear-gradient(102deg, #A61E69 0%, #6366F1 100%)",
|
|
21
|
-
color: "#fff"
|
|
22
|
-
} : {}, disabled: n, type: "submit", isLoading: c, children: [
|
|
23
|
-
e === "ai" && /* @__PURE__ */ s.jsx(o, {}),
|
|
24
|
-
l
|
|
25
|
-
] })
|
|
26
|
-
] })
|
|
27
|
-
] }) });
|
|
28
|
-
export {
|
|
29
|
-
f as P
|
|
30
|
-
};
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { r as l, j as e, D as b, m as D, n as S, o as T, p as v, q as L, s as h, t as B, v as j, w as N, L as E, c as k, S as x, B as u, x as q, y as f, z as M, A as m } from "./index-B56vBhjW.js";
|
|
2
|
-
const z = ({
|
|
3
|
-
isOpen: t,
|
|
4
|
-
onClose: i
|
|
5
|
-
}) => {
|
|
6
|
-
const [r, a] = l.useState(""), [{
|
|
7
|
-
mutate: o,
|
|
8
|
-
isLoading: d
|
|
9
|
-
}] = l.useState({
|
|
10
|
-
mutate: () => {
|
|
11
|
-
},
|
|
12
|
-
isLoading: !1
|
|
13
|
-
});
|
|
14
|
-
return l.useEffect(() => {
|
|
15
|
-
t && a("");
|
|
16
|
-
}, [t]), /* @__PURE__ */ e.jsx(b, { isOpen: t, onClose: i, onConfirm: () => {
|
|
17
|
-
o(), console.log("Deleting all data"), i();
|
|
18
|
-
}, isLoading: d, disabled: r !== "DELETE ALL", title: "Delete all data?", description: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
19
|
-
/* @__PURE__ */ e.jsx("p", { children: "This will permanently erase all brands, analysis results, and queries from your account." }),
|
|
20
|
-
/* @__PURE__ */ e.jsx("p", { children: "This action cannot be undone." }),
|
|
21
|
-
/* @__PURE__ */ e.jsx(D, { label: "To confirm, please type DELETE ALL:", value: r, onChange: (n) => a(n.target.value) }),
|
|
22
|
-
/* @__PURE__ */ e.jsx("p", { children: /* @__PURE__ */ e.jsx("em", { children: "This is to make sure you understand this action is permanent." }) })
|
|
23
|
-
] }), confirmText: "Yes, delete all data", cancelText: "No, go back" });
|
|
24
|
-
}, A = ({
|
|
25
|
-
isOpen: t,
|
|
26
|
-
brandId: i,
|
|
27
|
-
onClose: r,
|
|
28
|
-
brandName: a
|
|
29
|
-
}) => {
|
|
30
|
-
const o = S(), [d, n] = l.useState(""), {
|
|
31
|
-
mutate: c,
|
|
32
|
-
isPending: s
|
|
33
|
-
} = T({
|
|
34
|
-
mutation: {
|
|
35
|
-
onSuccess: () => {
|
|
36
|
-
o.invalidateQueries({
|
|
37
|
-
queryKey: v()
|
|
38
|
-
}), console.log("Brand data deleted"), r();
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
return l.useEffect(() => {
|
|
43
|
-
t && n("");
|
|
44
|
-
}, [t]), /* @__PURE__ */ e.jsx(
|
|
45
|
-
b,
|
|
46
|
-
{
|
|
47
|
-
isOpen: t,
|
|
48
|
-
onClose: r,
|
|
49
|
-
onConfirm: () => {
|
|
50
|
-
if (!a) {
|
|
51
|
-
console.error("Brand name is required for deletion confirmation");
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
c({
|
|
55
|
-
brandId: i
|
|
56
|
-
});
|
|
57
|
-
},
|
|
58
|
-
isLoading: s,
|
|
59
|
-
disabled: d.toLowerCase() !== a?.toLowerCase(),
|
|
60
|
-
title: "Delete brand?",
|
|
61
|
-
description: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
62
|
-
/* @__PURE__ */ e.jsx("p", { children: "This will permanently delete all data associated with this brand, including past analyses and query history." }),
|
|
63
|
-
/* @__PURE__ */ e.jsx("p", { children: "This action cannot be undone." }),
|
|
64
|
-
/* @__PURE__ */ e.jsx(D, { id: "delete-modal-brand-name-confirmation", label: `To confirm, please type your brand name ${a}:`, value: d, onChange: (y) => n(y.target.value) }),
|
|
65
|
-
/* @__PURE__ */ e.jsx("p", { children: /* @__PURE__ */ e.jsx("em", { children: "This is to make sure you understand this action is permanent." }) })
|
|
66
|
-
] }),
|
|
67
|
-
confirmText: "Yes, delete brand",
|
|
68
|
-
cancelText: "No, go back"
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
}, g = m`xl:yst-w-1/3`, p = m`xl:yst-w-2/3`, w = m`yst-flex yst-flex-col yst-gap-8 xl:yst-flex-row`, F = () => {
|
|
72
|
-
const [t, i] = l.useState(!1), [r, a] = l.useState(!1), [o, d] = l.useState(null), {
|
|
73
|
-
data: n
|
|
74
|
-
} = L({
|
|
75
|
-
query: {
|
|
76
|
-
select: ({
|
|
77
|
-
data: s
|
|
78
|
-
}) => s.brands
|
|
79
|
-
}
|
|
80
|
-
}), c = n?.find((s) => s.id === o);
|
|
81
|
-
return /* @__PURE__ */ e.jsxs("form", { children: [
|
|
82
|
-
/* @__PURE__ */ e.jsxs(h, { children: [
|
|
83
|
-
/* @__PURE__ */ e.jsx(
|
|
84
|
-
B,
|
|
85
|
-
{
|
|
86
|
-
title: "Settings"
|
|
87
|
-
}
|
|
88
|
-
),
|
|
89
|
-
/* @__PURE__ */ e.jsxs(h.Content, { children: [
|
|
90
|
-
/* @__PURE__ */ e.jsxs(w, { children: [
|
|
91
|
-
/* @__PURE__ */ e.jsxs(g, { className: "yst-space-y-2", children: [
|
|
92
|
-
/* @__PURE__ */ e.jsx(j, { size: "4", children: "Brands" }),
|
|
93
|
-
/* @__PURE__ */ e.jsx("p", { children: "Manage your brands. You can edit analysis preferences per brand or delete a brand and its data." })
|
|
94
|
-
] }),
|
|
95
|
-
/* @__PURE__ */ e.jsxs(p, { children: [
|
|
96
|
-
n && n.length === 0 && /* @__PURE__ */ e.jsxs("p", { className: "yst-text-slate-500", children: [
|
|
97
|
-
"No brands found. Please",
|
|
98
|
-
" ",
|
|
99
|
-
/* @__PURE__ */ e.jsx(N, { as: E, to: "/setup", children: "add a brand" }),
|
|
100
|
-
" ",
|
|
101
|
-
"to start analyzing."
|
|
102
|
-
] }),
|
|
103
|
-
(n || [{
|
|
104
|
-
id: "loading",
|
|
105
|
-
name: "Loading..."
|
|
106
|
-
}]).map((s, y, C) => /* @__PURE__ */ e.jsxs("div", { className: k("yst-flex yst-flex-col yst-items-start yst-items-center yst-justify-between yst-gap-2 yst-py-4 lg:yst-flex-row", {
|
|
107
|
-
"yst-border-b-[1px] yst-border-b-slate-200": y !== C.length - 1
|
|
108
|
-
}), children: [
|
|
109
|
-
/* @__PURE__ */ e.jsx("div", { className: "yst-font-medium", children: s.id === "loading" ? /* @__PURE__ */ e.jsx(x, { className: "yst-h-6 yst-w-32" }) : s.name }),
|
|
110
|
-
/* @__PURE__ */ e.jsxs("div", { className: "yst-flex yst-flex-col yst-items-start yst-justify-start yst-gap-2 lg:yst-flex-row lg:yst-items-center", children: [
|
|
111
|
-
s.id === "loading" ? /* @__PURE__ */ e.jsx(x, { className: "yst-h-6 yst-w-32" }) : /* @__PURE__ */ e.jsxs(u, { size: "small", variant: "secondary", className: "yst-gap-1", disabled: s.id === "loading", children: [
|
|
112
|
-
/* @__PURE__ */ e.jsx(q, {}),
|
|
113
|
-
" Edit analysis preferences"
|
|
114
|
-
] }),
|
|
115
|
-
s.id === "loading" ? /* @__PURE__ */ e.jsx(x, { className: "yst-h-6 yst-w-24" }) : /* @__PURE__ */ e.jsxs(u, { size: "small", variant: "tertiary", className: "yst-gap-1 yst-text-red-600 *:hover:yst-text-red-700", onClick: () => {
|
|
116
|
-
s.id && (d(s.id), i(!0));
|
|
117
|
-
}, disabled: s.id === "loading", children: [
|
|
118
|
-
/* @__PURE__ */ e.jsx(f, {}),
|
|
119
|
-
" Delete brand"
|
|
120
|
-
] })
|
|
121
|
-
] })
|
|
122
|
-
] }, s.id))
|
|
123
|
-
] })
|
|
124
|
-
] }),
|
|
125
|
-
/* @__PURE__ */ e.jsx(M, {}),
|
|
126
|
-
/* @__PURE__ */ e.jsxs(w, { children: [
|
|
127
|
-
/* @__PURE__ */ e.jsxs(g, { className: "yst-space-y-2", children: [
|
|
128
|
-
/* @__PURE__ */ e.jsx(j, { size: "4", children: "Delete all data" }),
|
|
129
|
-
/* @__PURE__ */ e.jsx("p", { children: "Permanently delete all brands, analysis results, and query history from your account." })
|
|
130
|
-
] }),
|
|
131
|
-
/* @__PURE__ */ e.jsxs(p, { className: "yst-space-y-4", children: [
|
|
132
|
-
/* @__PURE__ */ e.jsxs(u, { variant: "error", onClick: () => {
|
|
133
|
-
a(!0);
|
|
134
|
-
}, children: [
|
|
135
|
-
/* @__PURE__ */ e.jsx(f, {}),
|
|
136
|
-
" Delete all data"
|
|
137
|
-
] }),
|
|
138
|
-
/* @__PURE__ */ e.jsx("p", { children: /* @__PURE__ */ e.jsxs("i", { children: [
|
|
139
|
-
/* @__PURE__ */ e.jsx("b", { children: "Note:" }),
|
|
140
|
-
" This will erase everything and cannot be reversed."
|
|
141
|
-
] }) })
|
|
142
|
-
] })
|
|
143
|
-
] })
|
|
144
|
-
] })
|
|
145
|
-
] }),
|
|
146
|
-
/* @__PURE__ */ e.jsx(A, { isOpen: t, onClose: () => {
|
|
147
|
-
i(!1), d(null);
|
|
148
|
-
}, brandId: o, brandName: c?.name }),
|
|
149
|
-
/* @__PURE__ */ e.jsx(z, { isOpen: r, onClose: () => {
|
|
150
|
-
a(!1);
|
|
151
|
-
} })
|
|
152
|
-
] });
|
|
153
|
-
};
|
|
154
|
-
export {
|
|
155
|
-
F as default
|
|
156
|
-
};
|