@focus-reactive/payload-plugin-seo 1.9.0 → 1.10.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/admin.css +553 -669
- package/dist/components/SeoButton/ScoreBadge.js +4 -4
- package/dist/components/SeoButton/ScoreBadge.js.map +1 -1
- package/dist/components/SeoButton/SeoButtonInner.js +2 -2
- package/dist/components/SeoButton/SeoButtonInner.js.map +1 -1
- package/dist/components/SeoDrawer/TabsNav/index.js +1 -1
- package/dist/components/SeoDrawer/TabsNav/variants.js +3 -3
- package/dist/components/SeoDrawer/components/Header.js +6 -6
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingIssueBanner.js +4 -4
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingIssuePills.js +1 -1
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingLevelTiles.js +7 -7
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingTree/Chevron.js +2 -2
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingTree/HeadingTreeGroup.js +3 -3
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingTree/HeadingTreeRow.js +8 -8
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingTree/index.js +5 -5
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingTree/index.js.map +1 -1
- package/dist/components/SeoDrawer/components/HeadingsSection/index.js +1 -1
- package/dist/components/SeoDrawer/components/SerpPreview/index.js +2 -2
- package/dist/components/SeoDrawer/components/SerpPreview/serp-favicon.js +1 -1
- package/dist/components/SeoDrawer/components/SerpPreview/variants.js +13 -13
- package/dist/components/SeoDrawer/components/TabWrapper.js +1 -1
- package/dist/components/SeoDrawer/index.js +5 -5
- package/dist/components/SeoDrawer/index.js.map +1 -1
- package/dist/components/SeoDrawer/tabs/InclusiveTab.js +11 -11
- package/dist/components/SeoDrawer/tabs/KeyphraseTab.js +1 -1
- package/dist/components/SeoDrawer/tabs/OnPageTab.js +1 -1
- package/dist/components/SeoDrawer/tabs/ReadabilityTab.js +1 -1
- package/dist/components/SeoDrawer/tabs/SerpTab.js +4 -4
- package/dist/components/SeoDrawer/tabs/VitalsTab.js +10 -10
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseCard.d.ts.map +1 -1
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseCard.js +5 -5
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseCard.js.map +1 -1
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseDetail.js +14 -14
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseRail.js +4 -4
- package/dist/components/SeoDrawer/tabs/keyphrase/SynonymsField.js +14 -14
- package/dist/components/SeoDrawer/tabs/keyphrase/SynonymsField.js.map +1 -1
- package/dist/components/SeoDrawer/variants.js +4 -4
- package/dist/components/SeoDrawer/variants.js.map +1 -1
- package/dist/components/SeoField/Meter.js +6 -6
- package/dist/components/SeoField/index.d.ts.map +1 -1
- package/dist/components/SeoField/index.js +9 -7
- package/dist/components/SeoField/index.js.map +1 -1
- package/dist/ui/CheckRow/CheckVisualization/visualizations/DensityGauge.js +10 -10
- package/dist/ui/CheckRow/CheckVisualization/visualizations/DistributionBar.js +3 -3
- package/dist/ui/CheckRow/CheckVisualization/visualizations/DistributionBar.js.map +1 -1
- package/dist/ui/CheckRow/CheckVisualization/visualizations/DrillDown.js +4 -4
- package/dist/ui/CheckRow/CheckVisualization/visualizations/SegmentBar.js +10 -10
- package/dist/ui/CheckRow/index.js +6 -6
- package/dist/ui/FilterPills.js +6 -6
- package/dist/ui/IconButton.js +3 -3
- package/dist/ui/KpiCard.js +4 -4
- package/dist/ui/Pill.js +5 -5
- package/dist/ui/ScoreRing.js +10 -10
- package/dist/ui/SectionCard.js +3 -3
- package/dist/ui/SectionWrapper.js +1 -1
- package/dist/ui/SegmentedControl.js +4 -4
- package/dist/ui/TabHeader.js +5 -5
- package/dist/ui/Tooltip.js +4 -4
- package/dist/utils/style.d.ts +1 -1
- package/dist/utils/style.d.ts.map +1 -1
- package/dist/utils/style.js +5 -2
- package/dist/utils/style.js.map +1 -1
- package/package.json +3 -3
|
@@ -11,7 +11,7 @@ function ReadabilityTab({ data }) {
|
|
|
11
11
|
const [filter, setFilter] = useState("all");
|
|
12
12
|
const visible = data.checks.filter((c) => filter === "all" || c.status === filter);
|
|
13
13
|
const passing = data.checks.filter((c) => c.status === "good").length;
|
|
14
|
-
return /* @__PURE__ */ jsx(TabWrapper, { children: /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-[13px]", children: [
|
|
14
|
+
return /* @__PURE__ */ jsx(TabWrapper, { children: /* @__PURE__ */ jsxs("section", { className: "frseo:flex frseo:flex-col frseo:gap-[13px]", children: [
|
|
15
15
|
/* @__PURE__ */ jsx(
|
|
16
16
|
TabHeader,
|
|
17
17
|
{
|
|
@@ -13,7 +13,7 @@ function SerpTab({
|
|
|
13
13
|
faviconUrl
|
|
14
14
|
}) {
|
|
15
15
|
const [mode, setMode] = useState("mobile");
|
|
16
|
-
return /* @__PURE__ */ jsx(TabWrapper, { children: /* @__PURE__ */ jsx("section", { className: "flex flex-col gap-[13px]", children: /* @__PURE__ */ jsx(
|
|
16
|
+
return /* @__PURE__ */ jsx(TabWrapper, { children: /* @__PURE__ */ jsx("section", { className: "frseo:flex frseo:flex-col frseo:gap-[13px]", children: /* @__PURE__ */ jsx(
|
|
17
17
|
SectionCard,
|
|
18
18
|
{
|
|
19
19
|
title: "Search result preview",
|
|
@@ -24,12 +24,12 @@ function SerpTab({
|
|
|
24
24
|
{
|
|
25
25
|
value: "mobile",
|
|
26
26
|
label: "Mobile",
|
|
27
|
-
icon: /* @__PURE__ */ jsx(Smartphone, { "aria-hidden": "true", className: "w-[13px] h-[13px]" })
|
|
27
|
+
icon: /* @__PURE__ */ jsx(Smartphone, { "aria-hidden": "true", className: "frseo:w-[13px] frseo:h-[13px]" })
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
value: "desktop",
|
|
31
31
|
label: "Desktop",
|
|
32
|
-
icon: /* @__PURE__ */ jsx(Monitor, { "aria-hidden": "true", className: "w-[13px] h-[13px]" })
|
|
32
|
+
icon: /* @__PURE__ */ jsx(Monitor, { "aria-hidden": "true", className: "frseo:w-[13px] frseo:h-[13px]" })
|
|
33
33
|
}
|
|
34
34
|
],
|
|
35
35
|
value: mode,
|
|
@@ -37,7 +37,7 @@ function SerpTab({
|
|
|
37
37
|
label: "Preview device"
|
|
38
38
|
}
|
|
39
39
|
),
|
|
40
|
-
children: /* @__PURE__ */ jsx("div", { className: "p-4", children: /* @__PURE__ */ jsx(
|
|
40
|
+
children: /* @__PURE__ */ jsx("div", { className: "frseo:p-4", children: /* @__PURE__ */ jsx(
|
|
41
41
|
SerpPreview,
|
|
42
42
|
{
|
|
43
43
|
data,
|
|
@@ -9,8 +9,8 @@ import { TabWrapper } from "../components/TabWrapper";
|
|
|
9
9
|
function VitalsTab({ data, onRequestKeyphrase }) {
|
|
10
10
|
const max = Math.max(1, ...data.prominentWords.map((w) => w.count));
|
|
11
11
|
const noKeyphraseMatch = data.prominentWords.every((w) => !w.isKeyphrase);
|
|
12
|
-
return /* @__PURE__ */ jsx(TabWrapper, { children: /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-[13px]", children: [
|
|
13
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-3 gap-[9px]", children: [
|
|
12
|
+
return /* @__PURE__ */ jsx(TabWrapper, { children: /* @__PURE__ */ jsxs("section", { className: "frseo:flex frseo:flex-col frseo:gap-[13px]", children: [
|
|
13
|
+
/* @__PURE__ */ jsxs("div", { className: "frseo:grid frseo:grid-cols-3 frseo:gap-[9px]", children: [
|
|
14
14
|
/* @__PURE__ */ jsx(KpiCard, { label: "Words", value: data.words.toLocaleString() }),
|
|
15
15
|
/* @__PURE__ */ jsx(KpiCard, { label: "Sentences", value: data.sentences }),
|
|
16
16
|
/* @__PURE__ */ jsx(KpiCard, { label: "Paragraphs", value: data.paragraphs }),
|
|
@@ -28,26 +28,26 @@ function VitalsTab({ data, onRequestKeyphrase }) {
|
|
|
28
28
|
"div",
|
|
29
29
|
{
|
|
30
30
|
className: cn(
|
|
31
|
-
"relative flex items-center gap-[12px] px-[15px] py-[9px]",
|
|
31
|
+
"frseo:relative frseo:flex frseo:items-center frseo:gap-[12px] frseo:px-[15px] frseo:py-[9px]",
|
|
32
32
|
ROW_SEPARATOR
|
|
33
33
|
),
|
|
34
34
|
children: [
|
|
35
|
-
/* @__PURE__ */ jsxs("div", { className: "w-[120px] flex-none text-[12px] font-medium flex items-center gap-[6px]", children: [
|
|
35
|
+
/* @__PURE__ */ jsxs("div", { className: "frseo:w-[120px] frseo:flex-none frseo:text-[12px] frseo:font-medium frseo:flex frseo:items-center frseo:gap-[6px]", children: [
|
|
36
36
|
w.word,
|
|
37
37
|
" ",
|
|
38
|
-
w.isKeyphrase && /* @__PURE__ */ jsx("span", { className: "text-[9px] font-bold uppercase tracking-[0.04em] text-neutral-1000 bg-neutral-150 rounded-[3px] px-[5px] py-[1px]", children: "Key" })
|
|
38
|
+
w.isKeyphrase && /* @__PURE__ */ jsx("span", { className: "frseo:text-[9px] frseo:font-bold frseo:uppercase frseo:tracking-[0.04em] frseo:text-neutral-1000 frseo:bg-neutral-150 frseo:rounded-[3px] frseo:px-[5px] frseo:py-[1px]", children: "Key" })
|
|
39
39
|
] }),
|
|
40
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 h-[6px] rounded-[3px] bg-neutral-100 overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
40
|
+
/* @__PURE__ */ jsx("div", { className: "frseo:flex-1 frseo:h-[6px] frseo:rounded-[3px] frseo:bg-neutral-100 frseo:overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
41
41
|
"i",
|
|
42
42
|
{
|
|
43
43
|
className: cn(
|
|
44
|
-
"block h-full",
|
|
45
|
-
w.isKeyphrase ? "bg-neutral-1000" : "bg-neutral-400"
|
|
44
|
+
"frseo:block frseo:h-full",
|
|
45
|
+
w.isKeyphrase ? "frseo:bg-neutral-1000" : "frseo:bg-neutral-400"
|
|
46
46
|
),
|
|
47
47
|
style: { width: `${w.count / max * 100}%` }
|
|
48
48
|
}
|
|
49
49
|
) }),
|
|
50
|
-
/* @__PURE__ */ jsx("div", { className: "w-[30px] text-right font-mono text-[11px] font-semibold text-neutral-700", children: w.count })
|
|
50
|
+
/* @__PURE__ */ jsx("div", { className: "frseo:w-[30px] frseo:text-right frseo:font-mono frseo:text-[11px] frseo:font-semibold frseo:text-neutral-700", children: w.count })
|
|
51
51
|
]
|
|
52
52
|
},
|
|
53
53
|
w.word
|
|
@@ -59,7 +59,7 @@ function VitalsTab({ data, onRequestKeyphrase }) {
|
|
|
59
59
|
{
|
|
60
60
|
type: "button",
|
|
61
61
|
onClick: onRequestKeyphrase,
|
|
62
|
-
className: "self-start text-[12px] text-neutral-600 underline underline-offset-2 hover:text-neutral-800 cursor-pointer bg-transparent border-0 p-0",
|
|
62
|
+
className: "frseo:self-start frseo:text-[12px] frseo:text-neutral-600 frseo:underline frseo:underline-offset-2 frseo:hover:text-neutral-800 frseo:cursor-pointer frseo:bg-transparent frseo:border-0 frseo:p-0",
|
|
63
63
|
children: "Set a focus keyphrase to see which prominent words match it"
|
|
64
64
|
}
|
|
65
65
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyphraseCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/SeoDrawer/tabs/keyphrase/KeyphraseCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAGhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAErB,UAAU,kBAAkB;IAC1B,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAcD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"KeyphraseCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/SeoDrawer/tabs/keyphrase/KeyphraseCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAGhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAErB,UAAU,kBAAkB;IAC1B,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAcD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CA8B9F"}
|
|
@@ -19,14 +19,14 @@ function KeyphraseCard({ entry, isFocus, selected, state, onSelect }) {
|
|
|
19
19
|
"aria-pressed": selected,
|
|
20
20
|
onClick: () => onSelect(entry.id),
|
|
21
21
|
className: cn(
|
|
22
|
-
"flex items-center gap-[10px] p-[8px] rounded-rs w-full text-left bg-neutral-0 border cursor-pointer",
|
|
23
|
-
selected ? "border-neutral-300 shadow-
|
|
22
|
+
"frseo:flex frseo:items-center frseo:gap-[10px] frseo:p-[8px] frseo:rounded-rs frseo:w-full frseo:text-left frseo:bg-neutral-0 frseo:border frseo:cursor-pointer",
|
|
23
|
+
selected ? "frseo:border-neutral-300 frseo:shadow-card" : "frseo:border-transparent frseo:hover:border-neutral-150"
|
|
24
24
|
),
|
|
25
25
|
children: [
|
|
26
26
|
/* @__PURE__ */ jsx(MiniRing, { state }),
|
|
27
|
-
/* @__PURE__ */ jsxs("span", { className: "flex-1 min-w-0 flex flex-col gap-[2px]", children: [
|
|
28
|
-
isFocus && /* @__PURE__ */ jsx("span", { className: "self-start text-[7px] leading-none uppercase bg-neutral-1000 text-neutral-0 px-[6px] py-[2px] rounded-[7px] tracking-[0.06em] font-bold", children: "Focus" }),
|
|
29
|
-
entry.text ? /* @__PURE__ */ jsx("span", { className: "text-[12px] font-semibold text-neutral-800 truncate", children: entry.text }) : /* @__PURE__ */ jsx("span", { className: "text-[12px] font-medium italic text-neutral-300 truncate", children: "New keyphrase" })
|
|
27
|
+
/* @__PURE__ */ jsxs("span", { className: "frseo:flex-1 frseo:min-w-0 frseo:flex frseo:flex-col frseo:gap-[2px]", children: [
|
|
28
|
+
isFocus && /* @__PURE__ */ jsx("span", { className: "frseo:self-start frseo:text-[7px] frseo:leading-none frseo:uppercase frseo:bg-neutral-1000 frseo:text-neutral-0 frseo:px-[6px] frseo:py-[2px] frseo:rounded-[7px] frseo:tracking-[0.06em] frseo:font-bold", children: "Focus" }),
|
|
29
|
+
entry.text ? /* @__PURE__ */ jsx("span", { className: "frseo:text-[12px] frseo:font-semibold frseo:text-neutral-800 frseo:truncate", children: entry.text }) : /* @__PURE__ */ jsx("span", { className: "frseo:text-[12px] frseo:font-medium frseo:italic frseo:text-neutral-300 frseo:truncate", children: "New keyphrase" })
|
|
30
30
|
] })
|
|
31
31
|
]
|
|
32
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/SeoDrawer/tabs/keyphrase/KeyphraseCard.tsx"],"sourcesContent":["\"use client\";\n\nimport type { Status } from \"../../../../engine/types/analysis\";\nimport { ScoreRing } from \"../../../../ui/ScoreRing\";\nimport { cn } from \"../../../../utils/style\";\nimport type { KeyphraseEntry } from \"../../keyphraseState\";\n\nexport type CardState =\n | { kind: \"score\"; score: number; status: Status }\n | { kind: \"analyzing\" }\n | { kind: \"idle\" };\n\ninterface KeyphraseCardProps {\n entry: KeyphraseEntry;\n isFocus: boolean;\n selected: boolean;\n state: CardState;\n onSelect: (id: string) => void;\n}\n\nfunction MiniRing({ state }: { state: CardState }) {\n if (state.kind === \"analyzing\") {\n return <ScoreRing size=\"small\" status=\"loading\" />;\n }\n\n if (state.kind === \"score\") {\n return <ScoreRing score={state.score} size=\"small\" status={state.status} />;\n }\n\n return <ScoreRing size=\"small\" status=\"idle\" />;\n}\n\nexport function KeyphraseCard({ entry, isFocus, selected, state, onSelect }: KeyphraseCardProps) {\n return (\n <button\n type=\"button\"\n aria-pressed={selected}\n onClick={() => onSelect(entry.id)}\n className={cn(\n \"flex items-center gap-[10px] p-[8px] rounded-rs w-full text-left bg-neutral-0 border cursor-pointer\",\n selected
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/SeoDrawer/tabs/keyphrase/KeyphraseCard.tsx"],"sourcesContent":["\"use client\";\n\nimport type { Status } from \"../../../../engine/types/analysis\";\nimport { ScoreRing } from \"../../../../ui/ScoreRing\";\nimport { cn } from \"../../../../utils/style\";\nimport type { KeyphraseEntry } from \"../../keyphraseState\";\n\nexport type CardState =\n | { kind: \"score\"; score: number; status: Status }\n | { kind: \"analyzing\" }\n | { kind: \"idle\" };\n\ninterface KeyphraseCardProps {\n entry: KeyphraseEntry;\n isFocus: boolean;\n selected: boolean;\n state: CardState;\n onSelect: (id: string) => void;\n}\n\nfunction MiniRing({ state }: { state: CardState }) {\n if (state.kind === \"analyzing\") {\n return <ScoreRing size=\"small\" status=\"loading\" />;\n }\n\n if (state.kind === \"score\") {\n return <ScoreRing score={state.score} size=\"small\" status={state.status} />;\n }\n\n return <ScoreRing size=\"small\" status=\"idle\" />;\n}\n\nexport function KeyphraseCard({ entry, isFocus, selected, state, onSelect }: KeyphraseCardProps) {\n return (\n <button\n type=\"button\"\n aria-pressed={selected}\n onClick={() => onSelect(entry.id)}\n className={cn(\n \"flex items-center gap-[10px] p-[8px] rounded-rs w-full text-left bg-neutral-0 border cursor-pointer\",\n selected ? \"border-neutral-300 shadow-card\" : \"border-transparent hover:border-neutral-150\"\n )}\n >\n <MiniRing state={state} />\n\n <span className=\"flex-1 min-w-0 flex flex-col gap-[2px]\">\n {isFocus && (\n <span className=\"self-start text-[7px] leading-none uppercase bg-neutral-1000 text-neutral-0 px-[6px] py-[2px] rounded-[7px] tracking-[0.06em] font-bold\">\n Focus\n </span>\n )}\n\n {entry.text ? (\n <span className=\"text-[12px] font-semibold text-neutral-800 truncate\">{entry.text}</span>\n ) : (\n <span className=\"text-[12px] font-medium italic text-neutral-300 truncate\">\n New keyphrase\n </span>\n )}\n </span>\n </button>\n );\n}\n"],"mappings":";AAsBW,cAuBL,YAvBK;AAnBX,SAAS,iBAAiB;AAC1B,SAAS,UAAU;AAgBnB,SAAS,SAAS,EAAE,MAAM,GAAyB;AACjD,MAAI,MAAM,SAAS,aAAa;AAC9B,WAAO,oBAAC,aAAU,MAAK,SAAQ,QAAO,WAAU;AAAA,EAClD;AAEA,MAAI,MAAM,SAAS,SAAS;AAC1B,WAAO,oBAAC,aAAU,OAAO,MAAM,OAAO,MAAK,SAAQ,QAAQ,MAAM,QAAQ;AAAA,EAC3E;AAEA,SAAO,oBAAC,aAAU,MAAK,SAAQ,QAAO,QAAO;AAC/C;AAEO,SAAS,cAAc,EAAE,OAAO,SAAS,UAAU,OAAO,SAAS,GAAuB;AAC/F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,gBAAc;AAAA,MACd,SAAS,MAAM,SAAS,MAAM,EAAE;AAAA,MAChC,WAAW;AAAA,QACT;AAAA,QACA,WAAW,mCAAmC;AAAA,MAChD;AAAA,MAEA;AAAA,4BAAC,YAAS,OAAc;AAAA,QAExB,qBAAC,UAAK,WAAU,0CACb;AAAA,qBACC,oBAAC,UAAK,WAAU,2IAA0I,mBAE1J;AAAA,UAGD,MAAM,OACL,oBAAC,UAAK,WAAU,uDAAuD,gBAAM,MAAK,IAElF,oBAAC,UAAK,WAAU,4DAA2D,2BAE3E;AAAA,WAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -18,17 +18,17 @@ function Analysis({ analysis }) {
|
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
20
|
"aria-live": "polite",
|
|
21
|
-
className: "flex items-center gap-[9px] text-neutral-500 text-[13px] py-[12px]",
|
|
21
|
+
className: "frseo:flex frseo:items-center frseo:gap-[9px] frseo:text-neutral-500 frseo:text-[13px] frseo:py-[12px]",
|
|
22
22
|
role: "status",
|
|
23
23
|
children: [
|
|
24
|
-
/* @__PURE__ */ jsx(Loader2, { "aria-hidden": "true", className: "w-[15px] h-[15px] animate-spin" }),
|
|
24
|
+
/* @__PURE__ */ jsx(Loader2, { "aria-hidden": "true", className: "frseo:w-[15px] frseo:h-[15px] frseo:animate-spin" }),
|
|
25
25
|
"Analyzing keyphrase\u2026"
|
|
26
26
|
]
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
30
|
if (analysis.kind === "hint") {
|
|
31
|
-
return /* @__PURE__ */ jsx("div", { className: "text-neutral-500 text-[12px] py-[6px]", children: analysis.message });
|
|
31
|
+
return /* @__PURE__ */ jsx("div", { className: "frseo:text-neutral-500 frseo:text-[12px] frseo:py-[6px]", children: analysis.message });
|
|
32
32
|
}
|
|
33
33
|
const { result, dim } = analysis;
|
|
34
34
|
const passing = result.checks.filter((check) => check.status === "good").length;
|
|
@@ -37,8 +37,8 @@ function Analysis({ analysis }) {
|
|
|
37
37
|
"div",
|
|
38
38
|
{
|
|
39
39
|
className: cn(
|
|
40
|
-
"flex flex-col gap-[13px] transition-opacity",
|
|
41
|
-
dim && "opacity-40 pointer-events-none"
|
|
40
|
+
"frseo:flex frseo:flex-col frseo:gap-[13px] frseo:transition-opacity",
|
|
41
|
+
dim && "frseo:opacity-40 frseo:pointer-events-none"
|
|
42
42
|
),
|
|
43
43
|
children: [
|
|
44
44
|
/* @__PURE__ */ jsx(
|
|
@@ -76,18 +76,18 @@ function KeyphraseDetail({
|
|
|
76
76
|
}) {
|
|
77
77
|
const textInputId = useId();
|
|
78
78
|
const label = isFocus ? "Focus keyphrase" : "Related keyphrase";
|
|
79
|
-
return /* @__PURE__ */ jsxs("section", { className: "flex-1 min-w-0 px-[15px] py-[18px] flex flex-col gap-[13px] overflow-auto", children: [
|
|
80
|
-
/* @__PURE__ */ jsxs("div", { className: "mb-[9px]", children: [
|
|
81
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-[8px] mb-[6px]", children: [
|
|
79
|
+
return /* @__PURE__ */ jsxs("section", { className: "frseo:flex-1 frseo:min-w-0 frseo:px-[15px] frseo:py-[18px] frseo:flex frseo:flex-col frseo:gap-[13px] frseo:overflow-auto", children: [
|
|
80
|
+
/* @__PURE__ */ jsxs("div", { className: "frseo:mb-[9px]", children: [
|
|
81
|
+
/* @__PURE__ */ jsxs("div", { className: "frseo:flex frseo:items-center frseo:justify-between frseo:gap-[8px] frseo:mb-[6px]", children: [
|
|
82
82
|
/* @__PURE__ */ jsx(
|
|
83
83
|
"label",
|
|
84
84
|
{
|
|
85
|
-
className: "text-[10px] uppercase tracking-[0.05em] text-neutral-500",
|
|
85
|
+
className: "frseo:text-[10px] frseo:uppercase frseo:tracking-[0.05em] frseo:text-neutral-500",
|
|
86
86
|
htmlFor: textInputId,
|
|
87
87
|
children: label
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
|
-
!isFocus && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[6px]", children: [
|
|
90
|
+
!isFocus && /* @__PURE__ */ jsxs("div", { className: "frseo:flex frseo:items-center frseo:gap-[6px]", children: [
|
|
91
91
|
/* @__PURE__ */ jsx(
|
|
92
92
|
IconButton,
|
|
93
93
|
{
|
|
@@ -114,7 +114,7 @@ function KeyphraseDetail({
|
|
|
114
114
|
"input",
|
|
115
115
|
{
|
|
116
116
|
autoComplete: "off",
|
|
117
|
-
className: "w-full border border-neutral-200 rounded-rs px-[12px] py-[10px] text-[13px] text-neutral-800 bg-neutral-0 outline-none focus:border-neutral-800",
|
|
117
|
+
className: "frseo:w-full frseo:border frseo:border-neutral-200 frseo:rounded-rs frseo:px-[12px] frseo:py-[10px] frseo:text-[13px] frseo:text-neutral-800 frseo:bg-neutral-0 frseo:outline-none frseo:focus:border-neutral-800",
|
|
118
118
|
id: textInputId,
|
|
119
119
|
onChange: (e) => onTextChange(e.target.value),
|
|
120
120
|
placeholder: isFocus ? "Type your primary keyphrase" : "Type a related keyphrase",
|
|
@@ -127,17 +127,17 @@ function KeyphraseDetail({
|
|
|
127
127
|
"div",
|
|
128
128
|
{
|
|
129
129
|
"aria-live": "polite",
|
|
130
|
-
className: "text-[11.5px] text-seo-warn bg-seo-warn-100 rounded-rs px-[10px] py-[8px] flex items-center gap-[7px]",
|
|
130
|
+
className: "frseo:text-[11.5px] frseo:text-seo-warn frseo:bg-seo-warn-100 frseo:rounded-rs frseo:px-[10px] frseo:py-[8px] frseo:flex frseo:items-center frseo:gap-[7px]",
|
|
131
131
|
role: "status",
|
|
132
132
|
children: [
|
|
133
|
-
/* @__PURE__ */ jsx(AlertTriangle, { "aria-hidden": "true", className: "w-[15px] h-[15px] flex-none" }),
|
|
133
|
+
/* @__PURE__ */ jsx(AlertTriangle, { "aria-hidden": "true", className: "frseo:w-[15px] frseo:h-[15px] frseo:flex-none" }),
|
|
134
134
|
"\u201C",
|
|
135
135
|
entry.text.trim(),
|
|
136
136
|
"\u201D is already in your keyphrase list."
|
|
137
137
|
]
|
|
138
138
|
}
|
|
139
139
|
),
|
|
140
|
-
/* @__PURE__ */ jsx("div", { className: "mb-[9px]", children: /* @__PURE__ */ jsx(SynonymsField, { onAdd: onAddSynonym, onRemove: onRemoveSynonym, synonyms: entry.synonyms }) }),
|
|
140
|
+
/* @__PURE__ */ jsx("div", { className: "frseo:mb-[9px]", children: /* @__PURE__ */ jsx(SynonymsField, { onAdd: onAddSynonym, onRemove: onRemoveSynonym, synonyms: entry.synonyms }) }),
|
|
141
141
|
/* @__PURE__ */ jsx(Analysis, { analysis })
|
|
142
142
|
] });
|
|
143
143
|
}
|
|
@@ -11,9 +11,9 @@ function KeyphraseRail({
|
|
|
11
11
|
onAdd
|
|
12
12
|
}) {
|
|
13
13
|
const atMax = entries.length >= MAX_KEYPHRASES;
|
|
14
|
-
return /* @__PURE__ */ jsx("aside", { className: "w-[264px] flex-none border-r border-neutral-200 bg-neutral-50", children: /* @__PURE__ */ jsxs("div", { className: "sticky top-0 px-[9px] py-[18px] flex flex-col gap-[5px]", children: [
|
|
15
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-[7px] pt-[5px] pb-[3px]", children: [
|
|
16
|
-
/* @__PURE__ */ jsxs("span", { className: "text-[10px] uppercase tracking-[0.05em] text-neutral-500 font-bold", children: [
|
|
14
|
+
return /* @__PURE__ */ jsx("aside", { className: "frseo:w-[264px] frseo:flex-none frseo:border-r frseo:border-neutral-200 frseo:bg-neutral-50", children: /* @__PURE__ */ jsxs("div", { className: "frseo:sticky frseo:top-0 frseo:px-[9px] frseo:py-[18px] frseo:flex frseo:flex-col frseo:gap-[5px]", children: [
|
|
15
|
+
/* @__PURE__ */ jsxs("div", { className: "frseo:flex frseo:items-center frseo:justify-between frseo:px-[7px] frseo:pt-[5px] frseo:pb-[3px]", children: [
|
|
16
|
+
/* @__PURE__ */ jsxs("span", { className: "frseo:text-[10px] frseo:uppercase frseo:tracking-[0.05em] frseo:text-neutral-500 frseo:font-bold", children: [
|
|
17
17
|
"Keyphrases \xB7 ",
|
|
18
18
|
entries.length,
|
|
19
19
|
"/",
|
|
@@ -27,7 +27,7 @@ function KeyphraseRail({
|
|
|
27
27
|
title: atMax ? `Up to ${MAX_KEYPHRASES} keyphrases` : "Add related keyphrase",
|
|
28
28
|
disabled: atMax,
|
|
29
29
|
onClick: onAdd,
|
|
30
|
-
className: "w-[26px] h-[26px] rounded-rs border border-neutral-200 grid place-items-center text-neutral-600 bg-neutral-0 hover:border-neutral-800 hover:text-neutral-800 disabled:opacity-35 not-disabled:cursor-pointer disabled:cursor-not-allowed [&_svg]:size-[15px]",
|
|
30
|
+
className: "frseo:w-[26px] frseo:h-[26px] frseo:rounded-rs frseo:border frseo:border-neutral-200 frseo:grid frseo:place-items-center frseo:text-neutral-600 frseo:bg-neutral-0 frseo:hover:border-neutral-800 frseo:hover:text-neutral-800 frseo:disabled:opacity-35 frseo:not-disabled:cursor-pointer frseo:disabled:cursor-not-allowed frseo:[&_svg]:size-[15px]",
|
|
31
31
|
children: /* @__PURE__ */ jsx(Plus, { "aria-hidden": "true" })
|
|
32
32
|
}
|
|
33
33
|
)
|
|
@@ -14,20 +14,20 @@ function SynonymsField({ synonyms, onAdd, onRemove }) {
|
|
|
14
14
|
setDraft("");
|
|
15
15
|
};
|
|
16
16
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
17
|
-
/* @__PURE__ */ jsx("span", { className: "block text-[10px] uppercase tracking-[0.05em] text-neutral-500 mb-[6px]", children: "Synonyms" }),
|
|
17
|
+
/* @__PURE__ */ jsx("span", { className: "frseo:block frseo:text-[10px] frseo:uppercase frseo:tracking-[0.05em] frseo:text-neutral-500 frseo:mb-[6px]", children: "Synonyms" }),
|
|
18
18
|
/* @__PURE__ */ jsxs(
|
|
19
19
|
"div",
|
|
20
20
|
{
|
|
21
21
|
className: cn(
|
|
22
|
-
"border rounded-rs bg-neutral-0 overflow-hidden",
|
|
23
|
-
focused ? "border-neutral-800" : "border-neutral-200"
|
|
22
|
+
"frseo:border frseo:rounded-rs frseo:bg-neutral-0 frseo:overflow-hidden",
|
|
23
|
+
focused ? "frseo:border-neutral-800" : "frseo:border-neutral-200"
|
|
24
24
|
),
|
|
25
25
|
children: [
|
|
26
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-[7px] p-[9px] items-center", children: [
|
|
26
|
+
/* @__PURE__ */ jsxs("div", { className: "frseo:flex frseo:flex-wrap frseo:gap-[7px] frseo:p-[9px] frseo:items-center", children: [
|
|
27
27
|
synonyms.map((synonym, index) => /* @__PURE__ */ jsxs(
|
|
28
28
|
"span",
|
|
29
29
|
{
|
|
30
|
-
className: "bg-neutral-1000 text-neutral-0 rounded-[15px] pl-[12px] pr-[6px] py-[4px] text-[11.5px] inline-flex items-center gap-[7px]",
|
|
30
|
+
className: "frseo:bg-neutral-1000 frseo:text-neutral-0 frseo:rounded-[15px] frseo:pl-[12px] frseo:pr-[6px] frseo:py-[4px] frseo:text-[11.5px] frseo:inline-flex frseo:items-center frseo:gap-[7px]",
|
|
31
31
|
children: [
|
|
32
32
|
synonym,
|
|
33
33
|
/* @__PURE__ */ jsx(
|
|
@@ -35,7 +35,7 @@ function SynonymsField({ synonyms, onAdd, onRemove }) {
|
|
|
35
35
|
{
|
|
36
36
|
type: "button",
|
|
37
37
|
"aria-label": `Remove synonym ${synonym} (${index + 1})`,
|
|
38
|
-
className: "grid place-items-center p-0.5 text-
|
|
38
|
+
className: "frseo:grid frseo:place-items-center frseo:p-0.5 frseo:text-neutral-400 frseo:rounded-full frseo:bg-transparent frseo:hover:text-neutral-0 frseo:hover:bg-neutral-800 frseo:[&_svg]:size-[1em] frseo:cursor-pointer",
|
|
39
39
|
onClick: () => onRemove(index),
|
|
40
40
|
children: /* @__PURE__ */ jsx(X, { "aria-hidden": "true" })
|
|
41
41
|
}
|
|
@@ -51,9 +51,9 @@ function SynonymsField({ synonyms, onAdd, onRemove }) {
|
|
|
51
51
|
disabled: !canAdd,
|
|
52
52
|
onClick: commit,
|
|
53
53
|
className: cn(
|
|
54
|
-
"inline-flex items-center gap-[5px] rounded-[15px] px-[11px] py-[5px] text-[11.5px] font-semibold [&_svg]:size-[13px] not-disabled:cursor-pointer transition-colors duration-150",
|
|
55
|
-
"bg-neutral-1000 text-neutral-0 not-disabled:hover:bg-neutral-
|
|
56
|
-
"disabled:bg-neutral-100 disabled:text-neutral-300 disabled:cursor-not-allowed"
|
|
54
|
+
"frseo:inline-flex frseo:items-center frseo:gap-[5px] frseo:rounded-[15px] frseo:px-[11px] frseo:py-[5px] frseo:text-[11.5px] frseo:font-semibold frseo:[&_svg]:size-[13px] frseo:not-disabled:cursor-pointer frseo:transition-colors frseo:duration-150",
|
|
55
|
+
"frseo:bg-neutral-1000 frseo:text-neutral-0 frseo:not-disabled:hover:bg-neutral-800",
|
|
56
|
+
"frseo:disabled:bg-neutral-100 frseo:disabled:text-neutral-300 frseo:disabled:cursor-not-allowed"
|
|
57
57
|
),
|
|
58
58
|
children: [
|
|
59
59
|
/* @__PURE__ */ jsx(Plus, { "aria-hidden": "true" }),
|
|
@@ -62,8 +62,8 @@ function SynonymsField({ synonyms, onAdd, onRemove }) {
|
|
|
62
62
|
}
|
|
63
63
|
)
|
|
64
64
|
] }),
|
|
65
|
-
/* @__PURE__ */ jsx("div", { className: "border-t border-neutral-150" }),
|
|
66
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[8px] px-[11px] py-[8px]", children: [
|
|
65
|
+
/* @__PURE__ */ jsx("div", { className: "frseo:border-t frseo:border-neutral-150" }),
|
|
66
|
+
/* @__PURE__ */ jsxs("div", { className: "frseo:flex frseo:items-center frseo:gap-[8px] frseo:px-[11px] frseo:py-[8px]", children: [
|
|
67
67
|
/* @__PURE__ */ jsx(
|
|
68
68
|
"input",
|
|
69
69
|
{
|
|
@@ -80,15 +80,15 @@ function SynonymsField({ synonyms, onAdd, onRemove }) {
|
|
|
80
80
|
},
|
|
81
81
|
placeholder: "Add a synonym\u2026",
|
|
82
82
|
"aria-label": "Add a synonym",
|
|
83
|
-
className: "flex-1 border-0 outline-none text-[12.5px] text-neutral-800 bg-transparent"
|
|
83
|
+
className: "frseo:flex-1 frseo:border-0 frseo:outline-none frseo:text-[12.5px] frseo:text-neutral-800 frseo:bg-transparent"
|
|
84
84
|
}
|
|
85
85
|
),
|
|
86
|
-
/* @__PURE__ */ jsx("span", { className: "text-[9px] text-neutral-500 border border-neutral-200 rounded-[4px] px-[5px] py-[1px] font-semibold", children: "Enter" })
|
|
86
|
+
/* @__PURE__ */ jsx("span", { className: "frseo:text-[9px] frseo:text-neutral-500 frseo:border frseo:border-neutral-200 frseo:rounded-[4px] frseo:px-[5px] frseo:py-[1px] frseo:font-semibold", children: "Enter" })
|
|
87
87
|
] })
|
|
88
88
|
]
|
|
89
89
|
}
|
|
90
90
|
),
|
|
91
|
-
/* @__PURE__ */ jsx("div", { className: "text-[11px] text-neutral-500 mt-[6px] leading-[1.45]", children: "Synonyms count as keyphrase matches in this keyphrase\u2019s checks. One chip per synonym." })
|
|
91
|
+
/* @__PURE__ */ jsx("div", { className: "frseo:text-[11px] frseo:text-neutral-500 frseo:mt-[6px] frseo:leading-[1.45]", children: "Synonyms count as keyphrase matches in this keyphrase\u2019s checks. One chip per synonym." })
|
|
92
92
|
] });
|
|
93
93
|
}
|
|
94
94
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/SeoDrawer/tabs/keyphrase/SynonymsField.tsx"],"sourcesContent":["\"use client\";\n\nimport { Plus, X } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { cn } from \"../../../../utils/style\";\n\nexport interface SynonymsFieldProps {\n synonyms: string[];\n onAdd: (syn: string) => void;\n onRemove: (index: number) => void;\n}\n\nexport function SynonymsField({ synonyms, onAdd, onRemove }: SynonymsFieldProps) {\n const [draft, setDraft] = useState(\"\");\n const [focused, setFocused] = useState(false);\n const canAdd = draft.trim().length > 0;\n\n const commit = () => {\n if (!canAdd) return;\n onAdd(draft.trim());\n setDraft(\"\");\n };\n\n return (\n <div>\n <span className=\"block text-[10px] uppercase tracking-[0.05em] text-neutral-500 mb-[6px]\">\n Synonyms\n </span>\n\n <div\n className={cn(\n \"border rounded-rs bg-neutral-0 overflow-hidden\",\n focused ? \"border-neutral-800\" : \"border-neutral-200\"\n )}\n >\n <div className=\"flex flex-wrap gap-[7px] p-[9px] items-center\">\n {synonyms.map((synonym, index) => (\n <span\n key={`${synonym}-${index}`}\n className=\"bg-neutral-1000 text-neutral-0 rounded-[15px] pl-[12px] pr-[6px] py-[4px] text-[11.5px] inline-flex items-center gap-[7px]\"\n >\n {synonym}\n\n <button\n type=\"button\"\n aria-label={`Remove synonym ${synonym} (${index + 1})`}\n className=\"grid place-items-center p-0.5 text-
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/SeoDrawer/tabs/keyphrase/SynonymsField.tsx"],"sourcesContent":["\"use client\";\n\nimport { Plus, X } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { cn } from \"../../../../utils/style\";\n\nexport interface SynonymsFieldProps {\n synonyms: string[];\n onAdd: (syn: string) => void;\n onRemove: (index: number) => void;\n}\n\nexport function SynonymsField({ synonyms, onAdd, onRemove }: SynonymsFieldProps) {\n const [draft, setDraft] = useState(\"\");\n const [focused, setFocused] = useState(false);\n const canAdd = draft.trim().length > 0;\n\n const commit = () => {\n if (!canAdd) return;\n onAdd(draft.trim());\n setDraft(\"\");\n };\n\n return (\n <div>\n <span className=\"block text-[10px] uppercase tracking-[0.05em] text-neutral-500 mb-[6px]\">\n Synonyms\n </span>\n\n <div\n className={cn(\n \"border rounded-rs bg-neutral-0 overflow-hidden\",\n focused ? \"border-neutral-800\" : \"border-neutral-200\"\n )}\n >\n <div className=\"flex flex-wrap gap-[7px] p-[9px] items-center\">\n {synonyms.map((synonym, index) => (\n <span\n key={`${synonym}-${index}`}\n className=\"bg-neutral-1000 text-neutral-0 rounded-[15px] pl-[12px] pr-[6px] py-[4px] text-[11.5px] inline-flex items-center gap-[7px]\"\n >\n {synonym}\n\n <button\n type=\"button\"\n aria-label={`Remove synonym ${synonym} (${index + 1})`}\n className=\"grid place-items-center p-0.5 text-neutral-400 rounded-full bg-transparent hover:text-neutral-0 hover:bg-neutral-800 [&_svg]:size-[1em] cursor-pointer\"\n onClick={() => onRemove(index)}\n >\n <X aria-hidden=\"true\" />\n </button>\n </span>\n ))}\n <button\n type=\"button\"\n disabled={!canAdd}\n onClick={commit}\n className={cn(\n \"inline-flex items-center gap-[5px] rounded-[15px] px-[11px] py-[5px] text-[11.5px] font-semibold [&_svg]:size-[13px] not-disabled:cursor-pointer transition-colors duration-150\",\n \"bg-neutral-1000 text-neutral-0 not-disabled:hover:bg-neutral-800\",\n \"disabled:bg-neutral-100 disabled:text-neutral-300 disabled:cursor-not-allowed\"\n )}\n >\n <Plus aria-hidden=\"true\" /> Add synonym\n </button>\n </div>\n <div className=\"border-t border-neutral-150\" />\n <div className=\"flex items-center gap-[8px] px-[11px] py-[8px]\">\n <input\n type=\"text\"\n value={draft}\n onChange={(e) => setDraft(e.target.value)}\n onFocus={() => setFocused(true)}\n onBlur={() => setFocused(false)}\n onKeyDown={(e) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n commit();\n }\n }}\n placeholder=\"Add a synonym…\"\n aria-label=\"Add a synonym\"\n className=\"flex-1 border-0 outline-none text-[12.5px] text-neutral-800 bg-transparent\"\n />\n <span className=\"text-[9px] text-neutral-500 border border-neutral-200 rounded-[4px] px-[5px] py-[1px] font-semibold\">\n Enter\n </span>\n </div>\n </div>\n <div className=\"text-[11px] text-neutral-500 mt-[6px] leading-[1.45]\">\n Synonyms count as keyphrase matches in this keyphrase’s checks. One chip per synonym.\n </div>\n </div>\n );\n}\n"],"mappings":";AAyBM,cAYM,YAZN;AAvBN,SAAS,MAAM,SAAS;AACxB,SAAS,gBAAgB;AACzB,SAAS,UAAU;AAQZ,SAAS,cAAc,EAAE,UAAU,OAAO,SAAS,GAAuB;AAC/E,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,EAAE;AACrC,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,SAAS,MAAM,KAAK,EAAE,SAAS;AAErC,QAAM,SAAS,MAAM;AACnB,QAAI,CAAC;AAAQ;AACb,UAAM,MAAM,KAAK,CAAC;AAClB,aAAS,EAAE;AAAA,EACb;AAEA,SACE,qBAAC,SACC;AAAA,wBAAC,UAAK,WAAU,2EAA0E,sBAE1F;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,UAAU,uBAAuB;AAAA,QACnC;AAAA,QAEA;AAAA,+BAAC,SAAI,WAAU,iDACZ;AAAA,qBAAS,IAAI,CAAC,SAAS,UACtB;AAAA,cAAC;AAAA;AAAA,gBAEC,WAAU;AAAA,gBAET;AAAA;AAAA,kBAED;AAAA,oBAAC;AAAA;AAAA,sBACC,MAAK;AAAA,sBACL,cAAY,kBAAkB,OAAO,KAAK,QAAQ,CAAC;AAAA,sBACnD,WAAU;AAAA,sBACV,SAAS,MAAM,SAAS,KAAK;AAAA,sBAE7B,8BAAC,KAAE,eAAY,QAAO;AAAA;AAAA,kBACxB;AAAA;AAAA;AAAA,cAZK,GAAG,OAAO,IAAI,KAAK;AAAA,YAa1B,CACD;AAAA,YACD;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,UAAU,CAAC;AAAA,gBACX,SAAS;AAAA,gBACT,WAAW;AAAA,kBACT;AAAA,kBACA;AAAA,kBACA;AAAA,gBACF;AAAA,gBAEA;AAAA,sCAAC,QAAK,eAAY,QAAO;AAAA,kBAAE;AAAA;AAAA;AAAA,YAC7B;AAAA,aACF;AAAA,UACA,oBAAC,SAAI,WAAU,+BAA8B;AAAA,UAC7C,qBAAC,SAAI,WAAU,kDACb;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,OAAO;AAAA,gBACP,UAAU,CAAC,MAAM,SAAS,EAAE,OAAO,KAAK;AAAA,gBACxC,SAAS,MAAM,WAAW,IAAI;AAAA,gBAC9B,QAAQ,MAAM,WAAW,KAAK;AAAA,gBAC9B,WAAW,CAAC,MAAM;AAChB,sBAAI,EAAE,QAAQ,SAAS;AACrB,sBAAE,eAAe;AACjB,2BAAO;AAAA,kBACT;AAAA,gBACF;AAAA,gBACA,aAAY;AAAA,gBACZ,cAAW;AAAA,gBACX,WAAU;AAAA;AAAA,YACZ;AAAA,YACA,oBAAC,UAAK,WAAU,uGAAsG,mBAEtH;AAAA,aACF;AAAA;AAAA;AAAA,IACF;AAAA,IACA,oBAAC,SAAI,WAAU,wDAAuD,wGAEtE;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -2,10 +2,10 @@ import { cva } from "class-variance-authority";
|
|
|
2
2
|
const statusVar = cva("", {
|
|
3
3
|
variants: {
|
|
4
4
|
status: {
|
|
5
|
-
good: "[--seo-c:var(--
|
|
6
|
-
warn: "[--seo-c:var(--
|
|
7
|
-
bad: "[--seo-c:var(--
|
|
8
|
-
idle: "[--seo-c:var(--
|
|
5
|
+
good: "frseo:[--seo-c:var(--seo-good)]",
|
|
6
|
+
warn: "frseo:[--seo-c:var(--seo-warn)]",
|
|
7
|
+
bad: "frseo:[--seo-c:var(--seo-bad)]",
|
|
8
|
+
idle: "frseo:[--seo-c:var(--theme-elevation-300)]"
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SeoDrawer/variants.ts"],"sourcesContent":["import { cva } from \"class-variance-authority\";\n\nexport const statusVar = cva(\"\", {\n variants: {\n status: {\n good: \"[--seo-c:var(--
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SeoDrawer/variants.ts"],"sourcesContent":["import { cva } from \"class-variance-authority\";\n\nexport const statusVar = cva(\"\", {\n variants: {\n status: {\n good: \"[--seo-c:var(--seo-good)]\",\n warn: \"[--seo-c:var(--seo-warn)]\",\n bad: \"[--seo-c:var(--seo-bad)]\",\n idle: \"[--seo-c:var(--theme-elevation-300)]\",\n },\n },\n});\n"],"mappings":"AAAA,SAAS,WAAW;AAEb,MAAM,YAAY,IAAI,IAAI;AAAA,EAC/B,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,KAAK;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACF;AACF,CAAC;","names":[]}
|
|
@@ -21,12 +21,12 @@ function Meter({ measurement, hasText, loading, kindLabel }) {
|
|
|
21
21
|
const { value, min, max, status, unit } = measurement;
|
|
22
22
|
const readout = unit === "px" ? `${value} / ${max} px` : `${value} / ${max}`;
|
|
23
23
|
const pct = (n) => `${Math.min(100, Math.max(0, n / max * 100))}%`;
|
|
24
|
-
return /* @__PURE__ */ jsxs("div", { className: "mt-[11px] flex items-center gap-[12px]", children: [
|
|
25
|
-
/* @__PURE__ */ jsxs("div", { className: "relative h-[6px] flex-1 overflow-hidden rounded-full bg-neutral-100", children: [
|
|
24
|
+
return /* @__PURE__ */ jsxs("div", { className: "frseo:mt-[11px] frseo:flex frseo:items-center frseo:gap-[12px]", children: [
|
|
25
|
+
/* @__PURE__ */ jsxs("div", { className: "frseo:relative frseo:h-[6px] frseo:flex-1 frseo:overflow-hidden frseo:rounded-full frseo:bg-neutral-100", children: [
|
|
26
26
|
/* @__PURE__ */ jsx(
|
|
27
27
|
"span",
|
|
28
28
|
{
|
|
29
|
-
className: "absolute inset-y-0 border-x border-seo-good/40 bg-seo-good/15",
|
|
29
|
+
className: "frseo:absolute frseo:inset-y-0 frseo:border-x frseo:border-seo-good/40 frseo:bg-seo-good/15",
|
|
30
30
|
style: {
|
|
31
31
|
left: pct(min),
|
|
32
32
|
right: `calc(100% - ${pct(max)})`
|
|
@@ -36,16 +36,16 @@ function Meter({ measurement, hasText, loading, kindLabel }) {
|
|
|
36
36
|
hasText && !loading && /* @__PURE__ */ jsx(
|
|
37
37
|
"span",
|
|
38
38
|
{
|
|
39
|
-
className: cn("absolute inset-y-0 left-0 rounded-full", FILL_CLASS[status]),
|
|
39
|
+
className: cn("frseo:absolute frseo:inset-y-0 frseo:left-0 frseo:rounded-full", FILL_CLASS[status]),
|
|
40
40
|
style: { width: pct(value) }
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
|
-
loading && /* @__PURE__ */ jsx("span", { className: "absolute inset-0 animate-pulse bg-neutral-200" })
|
|
43
|
+
loading && /* @__PURE__ */ jsx("span", { className: "frseo:absolute frseo:inset-0 frseo:animate-pulse frseo:bg-neutral-200" })
|
|
44
44
|
] }),
|
|
45
45
|
/* @__PURE__ */ jsx(
|
|
46
46
|
"span",
|
|
47
47
|
{
|
|
48
|
-
className: "whitespace-nowrap text-[12px] tabular-nums text-neutral-500",
|
|
48
|
+
className: "frseo:whitespace-nowrap frseo:text-[12px] frseo:tabular-nums frseo:text-neutral-500",
|
|
49
49
|
style: { fontFamily: "ui-monospace, monospace" },
|
|
50
50
|
children: loading ? `\u2014 / ${max}` : readout
|
|
51
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SeoField/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAOlE,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;QACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,KAAK,CAAC,EAAE;YAAE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;SAAE,CAAC;KAC3D,CAAC;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SeoField/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAOlE,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;QACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,KAAK,CAAC,EAAE;YAAE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;SAAE,CAAC;KAC3D,CAAC;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAcD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAkH5C;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -8,7 +8,9 @@ import { cn } from "../../utils/style";
|
|
|
8
8
|
import { AutoPublishIcon, ErrorIcon, GenerateIcon, SpinnerIcon } from "./icons";
|
|
9
9
|
import { Meter } from "./Meter";
|
|
10
10
|
import { useGenerate } from "./useGenerate";
|
|
11
|
-
const GEN_BTN_CLASS =
|
|
11
|
+
const GEN_BTN_CLASS = cn(
|
|
12
|
+
"frseo:inline-flex frseo:items-center frseo:gap-[6px] frseo:rounded-rs frseo:border frseo:border-neutral-200 frseo:bg-transparent frseo:px-[9px] frseo:py-[4px] frseo:text-[12px] frseo:font-semibold frseo:text-neutral-800 frseo:transition-colors frseo:hover:border-neutral-300 frseo:hover:bg-neutral-100 frseo:disabled:cursor-default frseo:disabled:text-neutral-400 frseo:cursor-pointer"
|
|
13
|
+
);
|
|
12
14
|
function SeoField(props) {
|
|
13
15
|
const { path, field, readOnly, kind, showButton, generateOnPublish, range } = props;
|
|
14
16
|
const fieldState = useField({ path });
|
|
@@ -20,9 +22,9 @@ function SeoField(props) {
|
|
|
20
22
|
const { generate, status, error } = useGenerate({ kind, measurement, setValue });
|
|
21
23
|
const enabled = getSeoClientConfig().enabled;
|
|
22
24
|
const loading = status === "loading";
|
|
23
|
-
const labelRow = /* @__PURE__ */ jsxs("div", { className: "flex min-h-[26px] items-center justify-between gap-[12px] pb-[5px] [&_.field-label]:pb-0!", children: [
|
|
25
|
+
const labelRow = /* @__PURE__ */ jsxs("div", { className: "frseo:flex frseo:min-h-[26px] frseo:items-center frseo:justify-between frseo:gap-[12px] frseo:pb-[5px] frseo:[&_.field-label]:pb-0!", children: [
|
|
24
26
|
injected.Label ?? /* @__PURE__ */ jsx(FieldLabel, { label: field?.label, path, required: field?.required }),
|
|
25
|
-
/* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-[8px]", children: [
|
|
27
|
+
/* @__PURE__ */ jsxs("span", { className: "frseo:inline-flex frseo:items-center frseo:gap-[8px]", children: [
|
|
26
28
|
status === "error" && /* @__PURE__ */ jsx(
|
|
27
29
|
Tooltip,
|
|
28
30
|
{
|
|
@@ -32,7 +34,7 @@ function SeoField(props) {
|
|
|
32
34
|
/* @__PURE__ */ jsx(TooltipText, { children: error ?? "Your text is unchanged \u2014 press Generate to try again." })
|
|
33
35
|
] }),
|
|
34
36
|
side: "bottom",
|
|
35
|
-
children: /* @__PURE__ */ jsx(ErrorIcon, { "aria-label": "Generation failed", className: "size-[14px] text-seo-bad" })
|
|
37
|
+
children: /* @__PURE__ */ jsx(ErrorIcon, { "aria-label": "Generation failed", className: "frseo:size-[14px] frseo:text-seo-bad" })
|
|
36
38
|
}
|
|
37
39
|
),
|
|
38
40
|
generateOnPublish && enabled && /* @__PURE__ */ jsx(
|
|
@@ -52,7 +54,7 @@ function SeoField(props) {
|
|
|
52
54
|
AutoPublishIcon,
|
|
53
55
|
{
|
|
54
56
|
"aria-label": "Generated on publish",
|
|
55
|
-
className: "size-[14px] text-neutral-500"
|
|
57
|
+
className: "frseo:size-[14px] frseo:text-neutral-500"
|
|
56
58
|
}
|
|
57
59
|
)
|
|
58
60
|
}
|
|
@@ -65,7 +67,7 @@ function SeoField(props) {
|
|
|
65
67
|
onClick: generate,
|
|
66
68
|
type: "button",
|
|
67
69
|
children: [
|
|
68
|
-
loading ? /* @__PURE__ */ jsx(SpinnerIcon, { className: "size-[14px] animate-spin" }) : /* @__PURE__ */ jsx(GenerateIcon, { className: "size-[14px]" }),
|
|
70
|
+
loading ? /* @__PURE__ */ jsx(SpinnerIcon, { className: "frseo:size-[14px] frseo:animate-spin" }) : /* @__PURE__ */ jsx(GenerateIcon, { className: "frseo:size-[14px]" }),
|
|
69
71
|
loading ? "Generating\u2026" : "Generate"
|
|
70
72
|
]
|
|
71
73
|
}
|
|
@@ -84,7 +86,7 @@ function SeoField(props) {
|
|
|
84
86
|
showError,
|
|
85
87
|
value: text
|
|
86
88
|
};
|
|
87
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("seo-generated-field", showError && "error"), children: [
|
|
89
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("frseo:seo-generated-field", showError && "frseo:error"), children: [
|
|
88
90
|
kind === "description" ? /* @__PURE__ */ jsx(
|
|
89
91
|
TextareaInput,
|
|
90
92
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SeoField/index.tsx"],"sourcesContent":["\"use client\";\n\nimport { FieldLabel, TextareaInput, TextInput, useField } from \"@payloadcms/ui\";\nimport type { ChangeEvent, ReactNode } from \"react\";\nimport { getSeoClientConfig } from \"../../client-config/registry\";\nimport { measureDescription, measureTitle } from \"../../measure/measure\";\nimport type { RangeOverride } from \"../../measure/measure\";\nimport type { SeoFieldKind } from \"../../server/generate/prompts\";\nimport { Tooltip, TooltipText, TooltipTitle } from \"../../ui/Tooltip\";\nimport { cn } from \"../../utils/style\";\nimport { AutoPublishIcon, ErrorIcon, GenerateIcon, SpinnerIcon } from \"./icons\";\nimport { Meter } from \"./Meter\";\nimport { useGenerate } from \"./useGenerate\";\n\ninterface SeoFieldProps {\n path: string;\n field?: {\n label?: Record<string, string> | string;\n required?: boolean;\n admin?: { description?: Record<string, string> | string };\n };\n readOnly?: boolean;\n kind: SeoFieldKind;\n showButton?: boolean;\n generateOnPublish?: boolean;\n range?: RangeOverride;\n}\n\nconst GEN_BTN_CLASS
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SeoField/index.tsx"],"sourcesContent":["\"use client\";\n\nimport { FieldLabel, TextareaInput, TextInput, useField } from \"@payloadcms/ui\";\nimport type { ChangeEvent, ReactNode } from \"react\";\nimport { getSeoClientConfig } from \"../../client-config/registry\";\nimport { measureDescription, measureTitle } from \"../../measure/measure\";\nimport type { RangeOverride } from \"../../measure/measure\";\nimport type { SeoFieldKind } from \"../../server/generate/prompts\";\nimport { Tooltip, TooltipText, TooltipTitle } from \"../../ui/Tooltip\";\nimport { cn } from \"../../utils/style\";\nimport { AutoPublishIcon, ErrorIcon, GenerateIcon, SpinnerIcon } from \"./icons\";\nimport { Meter } from \"./Meter\";\nimport { useGenerate } from \"./useGenerate\";\n\ninterface SeoFieldProps {\n path: string;\n field?: {\n label?: Record<string, string> | string;\n required?: boolean;\n admin?: { description?: Record<string, string> | string };\n };\n readOnly?: boolean;\n kind: SeoFieldKind;\n showButton?: boolean;\n generateOnPublish?: boolean;\n range?: RangeOverride;\n}\n\nconst GEN_BTN_CLASS = cn(\n \"inline-flex items-center gap-[6px] rounded-rs border border-neutral-200 bg-transparent px-[9px] py-[4px] text-[12px] font-semibold text-neutral-800 transition-colors hover:border-neutral-300 hover:bg-neutral-100 disabled:cursor-default disabled:text-neutral-400 cursor-pointer\"\n);\n\ninterface InjectedComponents {\n Label?: ReactNode;\n Description?: ReactNode;\n BeforeInput?: ReactNode;\n AfterInput?: ReactNode;\n Error?: ReactNode;\n}\n\nexport function SeoField(props: SeoFieldProps) {\n const { path, field, readOnly, kind, showButton, generateOnPublish, range } = props;\n const fieldState = useField<string>({ path });\n const { value, setValue, showError } = fieldState;\n const injected: InjectedComponents =\n (fieldState as { customComponents?: InjectedComponents }).customComponents ?? {};\n const text = value ?? \"\";\n const measurement =\n kind === \"title\" ? measureTitle(text, range) : measureDescription(text, range);\n const kindLabel = kind === \"title\" ? \"title\" : \"description\";\n\n const { generate, status, error } = useGenerate({ kind, measurement, setValue });\n const enabled = getSeoClientConfig().enabled;\n const loading = status === \"loading\";\n\n const labelRow = (\n <div className=\"flex min-h-[26px] items-center justify-between gap-[12px] pb-[5px] [&_.field-label]:pb-0!\">\n {injected.Label ?? <FieldLabel label={field?.label} path={path} required={field?.required} />}\n\n <span className=\"inline-flex items-center gap-[8px]\">\n {status === \"error\" && (\n <Tooltip\n align=\"end\"\n content={\n <>\n <TooltipTitle>Generation failed</TooltipTitle>\n <TooltipText>\n {error ?? \"Your text is unchanged — press Generate to try again.\"}\n </TooltipText>\n </>\n }\n side=\"bottom\"\n >\n <ErrorIcon aria-label=\"Generation failed\" className=\"size-[14px] text-seo-bad\" />\n </Tooltip>\n )}\n\n {generateOnPublish && enabled && (\n <Tooltip\n align=\"end\"\n content={\n <>\n <TooltipTitle>Generated automatically</TooltipTitle>\n <TooltipText>\n Left empty, this {kindLabel} is generated from the page content when you publish.\n Type a value to keep your own.\n </TooltipText>\n </>\n }\n side=\"bottom\"\n >\n <AutoPublishIcon\n aria-label=\"Generated on publish\"\n className=\"size-[14px] text-neutral-500\"\n />\n </Tooltip>\n )}\n\n {showButton && enabled && (\n <button\n className={GEN_BTN_CLASS}\n disabled={loading || readOnly}\n onClick={generate}\n type=\"button\"\n >\n {loading ? (\n <SpinnerIcon className=\"size-[14px] animate-spin\" />\n ) : (\n <GenerateIcon className=\"size-[14px]\" />\n )}\n\n {loading ? \"Generating…\" : \"Generate\"}\n </button>\n )}\n </span>\n </div>\n );\n\n const commonInputProps = {\n AfterInput: injected.AfterInput,\n BeforeInput: injected.BeforeInput,\n Description: injected.Description,\n Error: injected.Error,\n Label: labelRow,\n description: injected.Description ? undefined : field?.admin?.description,\n path,\n readOnly: loading || readOnly,\n showError,\n value: text,\n };\n\n return (\n <div className={cn(\"seo-generated-field\", showError && \"error\")}>\n {kind === \"description\" ? (\n <TextareaInput\n {...commonInputProps}\n onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setValue(e.target.value)}\n rows={3}\n />\n ) : (\n <TextInput\n {...commonInputProps}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setValue(e.target.value)}\n />\n )}\n\n <Meter\n hasText={text.trim().length > 0}\n kindLabel={kindLabel}\n loading={loading}\n measurement={measurement}\n />\n </div>\n );\n}\n\nexport default SeoField;\n"],"mappings":";AAyDyB,SAOX,UAPW,KAOX,YAPW;AAvDzB,SAAS,YAAY,eAAe,WAAW,gBAAgB;AAE/D,SAAS,0BAA0B;AACnC,SAAS,oBAAoB,oBAAoB;AAGjD,SAAS,SAAS,aAAa,oBAAoB;AACnD,SAAS,UAAU;AACnB,SAAS,iBAAiB,WAAW,cAAc,mBAAmB;AACtE,SAAS,aAAa;AACtB,SAAS,mBAAmB;AAgB5B,MAAM,gBAAgB;AAAA,EACpB;AACF;AAUO,SAAS,SAAS,OAAsB;AAC7C,QAAM,EAAE,MAAM,OAAO,UAAU,MAAM,YAAY,mBAAmB,MAAM,IAAI;AAC9E,QAAM,aAAa,SAAiB,EAAE,KAAK,CAAC;AAC5C,QAAM,EAAE,OAAO,UAAU,UAAU,IAAI;AACvC,QAAM,WACH,WAAyD,oBAAoB,CAAC;AACjF,QAAM,OAAO,SAAS;AACtB,QAAM,cACJ,SAAS,UAAU,aAAa,MAAM,KAAK,IAAI,mBAAmB,MAAM,KAAK;AAC/E,QAAM,YAAY,SAAS,UAAU,UAAU;AAE/C,QAAM,EAAE,UAAU,QAAQ,MAAM,IAAI,YAAY,EAAE,MAAM,aAAa,SAAS,CAAC;AAC/E,QAAM,UAAU,mBAAmB,EAAE;AACrC,QAAM,UAAU,WAAW;AAE3B,QAAM,WACJ,qBAAC,SAAI,WAAU,6FACZ;AAAA,aAAS,SAAS,oBAAC,cAAW,OAAO,OAAO,OAAO,MAAY,UAAU,OAAO,UAAU;AAAA,IAE3F,qBAAC,UAAK,WAAU,sCACb;AAAA,iBAAW,WACV;AAAA,QAAC;AAAA;AAAA,UACC,OAAM;AAAA,UACN,SACE,iCACE;AAAA,gCAAC,gBAAa,+BAAiB;AAAA,YAC/B,oBAAC,eACE,mBAAS,8DACZ;AAAA,aACF;AAAA,UAEF,MAAK;AAAA,UAEL,8BAAC,aAAU,cAAW,qBAAoB,WAAU,4BAA2B;AAAA;AAAA,MACjF;AAAA,MAGD,qBAAqB,WACpB;AAAA,QAAC;AAAA;AAAA,UACC,OAAM;AAAA,UACN,SACE,iCACE;AAAA,gCAAC,gBAAa,qCAAuB;AAAA,YACrC,qBAAC,eAAY;AAAA;AAAA,cACO;AAAA,cAAU;AAAA,eAE9B;AAAA,aACF;AAAA,UAEF,MAAK;AAAA,UAEL;AAAA,YAAC;AAAA;AAAA,cACC,cAAW;AAAA,cACX,WAAU;AAAA;AAAA,UACZ;AAAA;AAAA,MACF;AAAA,MAGD,cAAc,WACb;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,UACX,UAAU,WAAW;AAAA,UACrB,SAAS;AAAA,UACT,MAAK;AAAA,UAEJ;AAAA,sBACC,oBAAC,eAAY,WAAU,4BAA2B,IAElD,oBAAC,gBAAa,WAAU,eAAc;AAAA,YAGvC,UAAU,qBAAgB;AAAA;AAAA;AAAA,MAC7B;AAAA,OAEJ;AAAA,KACF;AAGF,QAAM,mBAAmB;AAAA,IACvB,YAAY,SAAS;AAAA,IACrB,aAAa,SAAS;AAAA,IACtB,aAAa,SAAS;AAAA,IACtB,OAAO,SAAS;AAAA,IAChB,OAAO;AAAA,IACP,aAAa,SAAS,cAAc,SAAY,OAAO,OAAO;AAAA,IAC9D;AAAA,IACA,UAAU,WAAW;AAAA,IACrB;AAAA,IACA,OAAO;AAAA,EACT;AAEA,SACE,qBAAC,SAAI,WAAW,GAAG,uBAAuB,aAAa,OAAO,GAC3D;AAAA,aAAS,gBACR;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,UAAU,CAAC,MAAwC,SAAS,EAAE,OAAO,KAAK;AAAA,QAC1E,MAAM;AAAA;AAAA,IACR,IAEA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,UAAU,CAAC,MAAqC,SAAS,EAAE,OAAO,KAAK;AAAA;AAAA,IACzE;AAAA,IAGF;AAAA,MAAC;AAAA;AAAA,QACC,SAAS,KAAK,KAAK,EAAE,SAAS;AAAA,QAC9B;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,IAAO,mBAAQ;","names":[]}
|
|
@@ -28,15 +28,15 @@ function DensityGauge({ bands, markerPct, markerLabel, markerStatus, labels }) {
|
|
|
28
28
|
return () => observer.disconnect();
|
|
29
29
|
}, []);
|
|
30
30
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
31
|
-
/* @__PURE__ */ jsxs("div", { ref: barRef, className: "relative h-[6px] rounded-[3px] mt-[24px] mb-[14px]", children: [
|
|
31
|
+
/* @__PURE__ */ jsxs("div", { ref: barRef, className: "frseo:relative frseo:h-[6px] frseo:rounded-[3px] frseo:mt-[24px] frseo:mb-[14px]", children: [
|
|
32
32
|
bands.map((band, i) => /* @__PURE__ */ jsx(
|
|
33
33
|
"i",
|
|
34
34
|
{
|
|
35
35
|
className: cn(
|
|
36
|
-
"absolute inset-y-0",
|
|
36
|
+
"frseo:absolute frseo:inset-y-0",
|
|
37
37
|
statusVar({ status: band.status }),
|
|
38
|
-
i === firstVisibleBand && "rounded-l-[3px]",
|
|
39
|
-
i === lastVisibleBand && "rounded-r-[3px]"
|
|
38
|
+
i === firstVisibleBand && "frseo:rounded-l-[3px]",
|
|
39
|
+
i === lastVisibleBand && "frseo:rounded-r-[3px]"
|
|
40
40
|
),
|
|
41
41
|
style: {
|
|
42
42
|
left: `${band.startPct}%`,
|
|
@@ -51,7 +51,7 @@ function DensityGauge({ bands, markerPct, markerLabel, markerStatus, labels }) {
|
|
|
51
51
|
{
|
|
52
52
|
ref: labelRef,
|
|
53
53
|
className: cn(
|
|
54
|
-
"absolute bottom-[13px] font-mono font-bold text-[11px] whitespace-nowrap",
|
|
54
|
+
"frseo:absolute frseo:bottom-[13px] frseo:font-mono frseo:font-bold frseo:text-[11px] frseo:whitespace-nowrap",
|
|
55
55
|
statusVar({ status: markerStatus }),
|
|
56
56
|
labelAlign
|
|
57
57
|
),
|
|
@@ -63,20 +63,20 @@ function DensityGauge({ bands, markerPct, markerLabel, markerStatus, labels }) {
|
|
|
63
63
|
"span",
|
|
64
64
|
{
|
|
65
65
|
className: cn(
|
|
66
|
-
"absolute
|
|
66
|
+
"frseo:absolute frseo:-top-[3px] frseo:-translate-x-1/2 frseo:block frseo:w-[12px] frseo:h-[12px] frseo:rounded-full frseo:bg-neutral-0 frseo:border-2",
|
|
67
67
|
statusVar({ status: markerStatus })
|
|
68
68
|
),
|
|
69
69
|
style: { left: `${markerPct}%`, borderColor: "var(--seo-c)" }
|
|
70
70
|
}
|
|
71
71
|
)
|
|
72
72
|
] }),
|
|
73
|
-
/* @__PURE__ */ jsx("div", { className: "relative h-[14px] text-[10px] text-neutral-500", children: labels.map((label, i) => /* @__PURE__ */ jsx(
|
|
73
|
+
/* @__PURE__ */ jsx("div", { className: "frseo:relative frseo:h-[14px] frseo:text-[10px] frseo:text-neutral-500", children: labels.map((label, i) => /* @__PURE__ */ jsx(
|
|
74
74
|
"span",
|
|
75
75
|
{
|
|
76
76
|
className: cn(
|
|
77
|
-
"absolute whitespace-nowrap",
|
|
78
|
-
label.pct <= 0 ? "translate-x-0" : label.pct >= 100 ? "
|
|
79
|
-
label.emphasis === "good" && "text-seo-good"
|
|
77
|
+
"frseo:absolute frseo:whitespace-nowrap",
|
|
78
|
+
label.pct <= 0 ? "frseo:translate-x-0" : label.pct >= 100 ? "frseo:-translate-x-full" : "frseo:-translate-x-1/2",
|
|
79
|
+
label.emphasis === "good" && "frseo:text-seo-good"
|
|
80
80
|
),
|
|
81
81
|
style: { left: `${label.pct}%` },
|
|
82
82
|
children: label.text
|