@focus-reactive/payload-plugin-seo 1.8.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 +590 -659
- 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.d.ts.map +1 -1
- package/dist/components/SeoDrawer/TabsNav/index.js +21 -14
- package/dist/components/SeoDrawer/TabsNav/index.js.map +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/keyphraseState.d.ts +0 -1
- package/dist/components/SeoDrawer/keyphraseState.d.ts.map +1 -1
- package/dist/components/SeoDrawer/keyphraseState.js +2 -6
- package/dist/components/SeoDrawer/keyphraseState.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/KeyphraseTab.js.map +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.d.ts.map +1 -1
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseDetail.js +44 -24
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseDetail.js.map +1 -1
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseRail.d.ts.map +1 -1
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseRail.js +5 -8
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseRail.js.map +1 -1
- package/dist/components/SeoDrawer/tabs/keyphrase/SynonymsField.d.ts.map +1 -1
- package/dist/components/SeoDrawer/tabs/keyphrase/SynonymsField.js +16 -12
- package/dist/components/SeoDrawer/tabs/keyphrase/SynonymsField.js.map +1 -1
- package/dist/components/SeoDrawer/useKeyphrases.d.ts.map +1 -1
- package/dist/components/SeoDrawer/useKeyphrases.js +2 -8
- package/dist/components/SeoDrawer/useKeyphrases.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.d.ts +9 -0
- package/dist/ui/IconButton.d.ts.map +1 -0
- package/dist/ui/IconButton.js +30 -0
- package/dist/ui/IconButton.js.map +1 -0
- 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
- package/dist/ui/Button.d.ts +0 -9
- package/dist/ui/Button.d.ts.map +0 -1
- package/dist/ui/Button.js +0 -34
- package/dist/ui/Button.js.map +0 -1
|
@@ -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
|
}
|
|
@@ -50,7 +50,11 @@ function SynonymsField({ synonyms, onAdd, onRemove }) {
|
|
|
50
50
|
type: "button",
|
|
51
51
|
disabled: !canAdd,
|
|
52
52
|
onClick: commit,
|
|
53
|
-
className:
|
|
53
|
+
className: cn(
|
|
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
|
+
),
|
|
54
58
|
children: [
|
|
55
59
|
/* @__PURE__ */ jsx(Plus, { "aria-hidden": "true" }),
|
|
56
60
|
" Add synonym"
|
|
@@ -58,8 +62,8 @@ function SynonymsField({ synonyms, onAdd, onRemove }) {
|
|
|
58
62
|
}
|
|
59
63
|
)
|
|
60
64
|
] }),
|
|
61
|
-
/* @__PURE__ */ jsx("div", { className: "border-t border-neutral-150" }),
|
|
62
|
-
/* @__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: [
|
|
63
67
|
/* @__PURE__ */ jsx(
|
|
64
68
|
"input",
|
|
65
69
|
{
|
|
@@ -76,15 +80,15 @@ function SynonymsField({ synonyms, onAdd, onRemove }) {
|
|
|
76
80
|
},
|
|
77
81
|
placeholder: "Add a synonym\u2026",
|
|
78
82
|
"aria-label": "Add a synonym",
|
|
79
|
-
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"
|
|
80
84
|
}
|
|
81
85
|
),
|
|
82
|
-
/* @__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" })
|
|
83
87
|
] })
|
|
84
88
|
]
|
|
85
89
|
}
|
|
86
90
|
),
|
|
87
|
-
/* @__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." })
|
|
88
92
|
] });
|
|
89
93
|
}
|
|
90
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,SA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AG,gBAAgB,CAiEtC"}
|
|
@@ -33,7 +33,7 @@ function useKeyphrases({
|
|
|
33
33
|
const current = listRef.current;
|
|
34
34
|
const next = ops.addRelated(current);
|
|
35
35
|
if (next === current)
|
|
36
|
-
return
|
|
36
|
+
return void 0;
|
|
37
37
|
setList(next);
|
|
38
38
|
return next.at(-1)?.id;
|
|
39
39
|
}, []);
|
|
@@ -49,13 +49,7 @@ function useKeyphrases({
|
|
|
49
49
|
(id, index) => setList((l) => ops.removeSynonym(l, id, index)),
|
|
50
50
|
[]
|
|
51
51
|
);
|
|
52
|
-
const remove = useCallback(
|
|
53
|
-
(id) => setList((l) => {
|
|
54
|
-
const next = ops.remove(l, id);
|
|
55
|
-
return next.length > 0 ? next : [ops.createEntry()];
|
|
56
|
-
}),
|
|
57
|
-
[]
|
|
58
|
-
);
|
|
52
|
+
const remove = useCallback((id) => setList((l) => ops.remove(l, id)), []);
|
|
59
53
|
const setFocus = useCallback((id) => setList((l) => ops.setFocus(l, id)), []);
|
|
60
54
|
const isDuplicate = useCallback(
|
|
61
55
|
(id, text) => ops.isDuplicate(listRef.current, id, text),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SeoDrawer/useKeyphrases.ts"],"sourcesContent":["\"use client\";\n\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport * as ops from \"./keyphraseState\";\nimport type { KeyphraseEntry } from \"./keyphraseState\";\nimport { loadKeyphrases, saveKeyphrases, storageKey } from \"./keyphraseStorage\";\n\nexport interface UseKeyphrasesArgs {\n collectionSlug: string;\n docId: string;\n localeCode: string;\n}\n\nexport interface UseKeyphrasesApi {\n keyphrases: KeyphraseEntry[];\n addRelated: () => string | undefined;\n updateText: (id: string, text: string) => void;\n addSynonym: (id: string, syn: string) => void;\n removeSynonym: (id: string, index: number) => void;\n remove: (id: string) => void;\n setFocus: (id: string) => void;\n isDuplicate: (id: string, text: string) => boolean;\n}\n\nexport function useKeyphrases({\n collectionSlug,\n docId,\n localeCode,\n}: UseKeyphrasesArgs): UseKeyphrasesApi {\n const key = storageKey(collectionSlug, docId, localeCode);\n const [list, setList] = useState<KeyphraseEntry[]>(() => loadKeyphrases(key));\n\n const keyRef = useRef(key);\n\n useEffect(() => {\n if (keyRef.current !== key) {\n keyRef.current = key;\n setList(loadKeyphrases(key));\n }\n }, [key]);\n\n useEffect(() => {\n saveKeyphrases(key, list);\n }, [key, list]);\n\n const listRef = useRef(list);\n listRef.current = list;\n useEffect(\n () => () => {\n const pruned = ops.pruneEmpties(listRef.current);\n if (pruned.length !== listRef.current.length) saveKeyphrases(keyRef.current, pruned);\n },\n []\n );\n\n const addRelated = useCallback((): string | undefined => {\n const current = listRef.current;\n const next = ops.addRelated(current);\n\n if (next === current) return
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SeoDrawer/useKeyphrases.ts"],"sourcesContent":["\"use client\";\n\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport * as ops from \"./keyphraseState\";\nimport type { KeyphraseEntry } from \"./keyphraseState\";\nimport { loadKeyphrases, saveKeyphrases, storageKey } from \"./keyphraseStorage\";\n\nexport interface UseKeyphrasesArgs {\n collectionSlug: string;\n docId: string;\n localeCode: string;\n}\n\nexport interface UseKeyphrasesApi {\n keyphrases: KeyphraseEntry[];\n addRelated: () => string | undefined;\n updateText: (id: string, text: string) => void;\n addSynonym: (id: string, syn: string) => void;\n removeSynonym: (id: string, index: number) => void;\n remove: (id: string) => void;\n setFocus: (id: string) => void;\n isDuplicate: (id: string, text: string) => boolean;\n}\n\nexport function useKeyphrases({\n collectionSlug,\n docId,\n localeCode,\n}: UseKeyphrasesArgs): UseKeyphrasesApi {\n const key = storageKey(collectionSlug, docId, localeCode);\n const [list, setList] = useState<KeyphraseEntry[]>(() => loadKeyphrases(key));\n\n const keyRef = useRef(key);\n\n useEffect(() => {\n if (keyRef.current !== key) {\n keyRef.current = key;\n setList(loadKeyphrases(key));\n }\n }, [key]);\n\n useEffect(() => {\n saveKeyphrases(key, list);\n }, [key, list]);\n\n const listRef = useRef(list);\n listRef.current = list;\n useEffect(\n () => () => {\n const pruned = ops.pruneEmpties(listRef.current);\n if (pruned.length !== listRef.current.length) saveKeyphrases(keyRef.current, pruned);\n },\n []\n );\n\n const addRelated = useCallback((): string | undefined => {\n const current = listRef.current;\n const next = ops.addRelated(current);\n\n if (next === current) return undefined;\n setList(next);\n\n return next.at(-1)?.id;\n }, []);\n const updateText = useCallback(\n (id: string, text: string) => setList((l) => ops.updateText(l, id, text)),\n []\n );\n const addSynonym = useCallback(\n (id: string, syn: string) => setList((l) => ops.addSynonym(l, id, syn)),\n []\n );\n const removeSynonym = useCallback(\n (id: string, index: number) => setList((l) => ops.removeSynonym(l, id, index)),\n []\n );\n const remove = useCallback((id: string) => setList((l) => ops.remove(l, id)), []);\n const setFocus = useCallback((id: string) => setList((l) => ops.setFocus(l, id)), []);\n const isDuplicate = useCallback(\n (id: string, text: string) => ops.isDuplicate(listRef.current, id, text),\n []\n );\n\n return {\n keyphrases: list,\n addRelated,\n updateText,\n addSynonym,\n removeSynonym,\n remove,\n setFocus,\n isDuplicate,\n };\n}\n"],"mappings":";AAEA,SAAS,aAAa,WAAW,QAAQ,gBAAgB;AACzD,YAAY,SAAS;AAErB,SAAS,gBAAgB,gBAAgB,kBAAkB;AAmBpD,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AACF,GAAwC;AACtC,QAAM,MAAM,WAAW,gBAAgB,OAAO,UAAU;AACxD,QAAM,CAAC,MAAM,OAAO,IAAI,SAA2B,MAAM,eAAe,GAAG,CAAC;AAE5E,QAAM,SAAS,OAAO,GAAG;AAEzB,YAAU,MAAM;AACd,QAAI,OAAO,YAAY,KAAK;AAC1B,aAAO,UAAU;AACjB,cAAQ,eAAe,GAAG,CAAC;AAAA,IAC7B;AAAA,EACF,GAAG,CAAC,GAAG,CAAC;AAER,YAAU,MAAM;AACd,mBAAe,KAAK,IAAI;AAAA,EAC1B,GAAG,CAAC,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IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","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,OA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A;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
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
function DistributionBar({ positions }) {
|
|
4
4
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
5
|
+
/* @__PURE__ */ jsx("div", { className: "frseo-docbar frseo:relative frseo:h-[24px] frseo:rounded-rs frseo:border frseo:border-neutral-200", children: positions.map((p, i) => /* @__PURE__ */ jsx(
|
|
6
6
|
"i",
|
|
7
7
|
{
|
|
8
|
-
className: "absolute top-[3px] bottom-[3px] w-[3px] rounded-[2px] bg-neutral-800",
|
|
8
|
+
className: "frseo:absolute frseo:top-[3px] frseo:bottom-[3px] frseo:w-[3px] frseo:rounded-[2px] frseo:bg-neutral-800",
|
|
9
9
|
style: { left: `${p}%` }
|
|
10
10
|
},
|
|
11
11
|
`${p}-${i}`
|
|
12
12
|
)) }),
|
|
13
|
-
/* @__PURE__ */ jsxs("div", { className: "flex justify-between text-[10px] text-neutral-500 mt-[5px]", children: [
|
|
13
|
+
/* @__PURE__ */ jsxs("div", { className: "frseo:flex frseo:justify-between frseo:text-[10px] frseo:text-neutral-500 frseo:mt-[5px]", children: [
|
|
14
14
|
/* @__PURE__ */ jsx("span", { children: "start" }),
|
|
15
15
|
/* @__PURE__ */ jsx("span", { children: "middle" }),
|
|
16
16
|
/* @__PURE__ */ jsx("span", { children: "end" })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/ui/CheckRow/CheckVisualization/visualizations/DistributionBar.tsx"],"sourcesContent":["\"use client\";\n\nimport type { DistributionModel } from \"../../../../engine/types/visualization\";\n\nexport function DistributionBar({ positions }: DistributionModel) {\n return (\n <>\n <div className=\"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/ui/CheckRow/CheckVisualization/visualizations/DistributionBar.tsx"],"sourcesContent":["\"use client\";\n\nimport type { DistributionModel } from \"../../../../engine/types/visualization\";\n\nexport function DistributionBar({ positions }: DistributionModel) {\n return (\n <>\n <div className=\"frseo-docbar relative h-[24px] rounded-rs border border-neutral-200\">\n {positions.map((p, i) => (\n <i\n key={`${p}-${i}`}\n className=\"absolute top-[3px] bottom-[3px] w-[3px] rounded-[2px] bg-neutral-800\"\n style={{ left: `${p}%` }}\n />\n ))}\n </div>\n\n <div className=\"flex justify-between text-[10px] text-neutral-500 mt-[5px]\">\n <span>start</span>\n <span>middle</span>\n <span>end</span>\n </div>\n </>\n );\n}\n"],"mappings":";AAMI,mBAGM,KAQJ,YAXF;AAFG,SAAS,gBAAgB,EAAE,UAAU,GAAsB;AAChE,SACE,iCACE;AAAA,wBAAC,SAAI,WAAU,uEACZ,oBAAU,IAAI,CAAC,GAAG,MACjB;AAAA,MAAC;AAAA;AAAA,QAEC,WAAU;AAAA,QACV,OAAO,EAAE,MAAM,GAAG,CAAC,IAAI;AAAA;AAAA,MAFlB,GAAG,CAAC,IAAI,CAAC;AAAA,IAGhB,CACD,GACH;AAAA,IAEA,qBAAC,SAAI,WAAU,8DACb;AAAA,0BAAC,UAAK,mBAAK;AAAA,MACX,oBAAC,UAAK,oBAAM;AAAA,MACZ,oBAAC,UAAK,iBAAG;AAAA,OACX;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -12,7 +12,7 @@ function DrillDown({ items, label }) {
|
|
|
12
12
|
"button",
|
|
13
13
|
{
|
|
14
14
|
type: "button",
|
|
15
|
-
className: "mt-[8px] text-[11px] text-neutral-700 bg-neutral-100 border border-neutral-200 rounded-rs px-[9px] py-[4px] cursor-pointer inline-flex items-center gap-[4px]",
|
|
15
|
+
className: "frseo:mt-[8px] frseo:text-[11px] frseo:text-neutral-700 frseo:bg-neutral-100 frseo:border frseo:border-neutral-200 frseo:rounded-rs frseo:px-[9px] frseo:py-[4px] frseo:cursor-pointer frseo:inline-flex frseo:items-center frseo:gap-[4px]",
|
|
16
16
|
onClick: () => setOpen((o) => !o),
|
|
17
17
|
children: open ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18
18
|
"Hide ",
|
|
@@ -24,13 +24,13 @@ function DrillDown({ items, label }) {
|
|
|
24
24
|
] })
|
|
25
25
|
}
|
|
26
26
|
),
|
|
27
|
-
/* @__PURE__ */ jsx("div", { className: cn("mt-[8px] flex-col gap-[4px]", open ? "flex" : "hidden"), children: items.map((it, i) => /* @__PURE__ */ jsxs(
|
|
27
|
+
/* @__PURE__ */ jsx("div", { className: cn("frseo:mt-[8px] frseo:flex-col frseo:gap-[4px]", open ? "frseo:flex" : "frseo:hidden"), children: items.map((it, i) => /* @__PURE__ */ jsxs(
|
|
28
28
|
"div",
|
|
29
29
|
{
|
|
30
|
-
className: "flex justify-between text-[11px] text-neutral-700 bg-neutral-50 rounded-rs px-[9px] py-[4px]",
|
|
30
|
+
className: "frseo:flex frseo:justify-between frseo:text-[11px] frseo:text-neutral-700 frseo:bg-neutral-50 frseo:rounded-rs frseo:px-[9px] frseo:py-[4px]",
|
|
31
31
|
children: [
|
|
32
32
|
/* @__PURE__ */ jsx("span", { children: it.left }),
|
|
33
|
-
/* @__PURE__ */ jsx("span", { className: "text-neutral-1000", children: it.right })
|
|
33
|
+
/* @__PURE__ */ jsx("span", { className: "frseo:text-neutral-1000", children: it.right })
|
|
34
34
|
]
|
|
35
35
|
},
|
|
36
36
|
`${it.left}-${i}`
|
|
@@ -3,30 +3,30 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { cn } from "../../../../utils/style";
|
|
5
5
|
import { statusVar } from "../../../../components/SeoDrawer/variants";
|
|
6
|
-
const swatchVariants = cva("w-[8px] h-[8px] rounded-[2px] inline-block", {
|
|
6
|
+
const swatchVariants = cva("frseo:w-[8px] frseo:h-[8px] frseo:rounded-[2px] frseo:inline-block", {
|
|
7
7
|
variants: {
|
|
8
8
|
tone: {
|
|
9
|
-
good: "bg-seo-good",
|
|
10
|
-
warn: "bg-seo-warn",
|
|
11
|
-
bad: "bg-seo-bad",
|
|
12
|
-
muted: "bg-neutral-300"
|
|
9
|
+
good: "frseo:bg-seo-good",
|
|
10
|
+
warn: "frseo:bg-seo-warn",
|
|
11
|
+
bad: "frseo:bg-seo-bad",
|
|
12
|
+
muted: "frseo:bg-neutral-300"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
function SegmentBar({ countLabel, filledPct, filledStatus, legend }) {
|
|
17
17
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18
|
-
countLabel && /* @__PURE__ */ jsx("div", { className: "text-[10px] text-neutral-500 font-mono mb-[4px] flex justify-end", children: /* @__PURE__ */ jsx("span", { children: countLabel }) }),
|
|
19
|
-
/* @__PURE__ */ jsxs("div", { className: "flex h-[6px] rounded-[3px] overflow-hidden", children: [
|
|
18
|
+
countLabel && /* @__PURE__ */ jsx("div", { className: "frseo:text-[10px] frseo:text-neutral-500 frseo:font-mono frseo:mb-[4px] frseo:flex frseo:justify-end", children: /* @__PURE__ */ jsx("span", { children: countLabel }) }),
|
|
19
|
+
/* @__PURE__ */ jsxs("div", { className: "frseo:flex frseo:h-[6px] frseo:rounded-[3px] frseo:overflow-hidden", children: [
|
|
20
20
|
/* @__PURE__ */ jsx(
|
|
21
21
|
"i",
|
|
22
22
|
{
|
|
23
|
-
className: cn("block h-full", statusVar({ status: filledStatus })),
|
|
23
|
+
className: cn("frseo:block frseo:h-full", statusVar({ status: filledStatus })),
|
|
24
24
|
style: { width: `${filledPct}%`, background: "var(--seo-c)" }
|
|
25
25
|
}
|
|
26
26
|
),
|
|
27
|
-
/* @__PURE__ */ jsx("i", { className: "block h-full bg-neutral-150", style: { width: `${100 - filledPct}%` } })
|
|
27
|
+
/* @__PURE__ */ jsx("i", { className: "frseo:block frseo:h-full frseo:bg-neutral-150", style: { width: `${100 - filledPct}%` } })
|
|
28
28
|
] }),
|
|
29
|
-
legend && /* @__PURE__ */ jsx("div", { className: "flex gap-[14px] text-[11px] mt-[6px]", children: legend.map((l) => /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-[5px] text-neutral-700", children: [
|
|
29
|
+
legend && /* @__PURE__ */ jsx("div", { className: "frseo:flex frseo:gap-[14px] frseo:text-[11px] frseo:mt-[6px]", children: legend.map((l) => /* @__PURE__ */ jsxs("span", { className: "frseo:inline-flex frseo:items-center frseo:gap-[5px] frseo:text-neutral-700", children: [
|
|
30
30
|
/* @__PURE__ */ jsx("span", { className: swatchVariants({ tone: l.tone }) }),
|
|
31
31
|
l.label
|
|
32
32
|
] }, l.label)) })
|
|
@@ -16,23 +16,23 @@ function CheckRow({ check }) {
|
|
|
16
16
|
return /* @__PURE__ */ jsxs(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
|
19
|
-
className: cn("relative px-[15px] py-[13px] overflow-visible", ROW_SEPARATOR),
|
|
19
|
+
className: cn("frseo:relative frseo:px-[15px] frseo:py-[13px] frseo:overflow-visible", ROW_SEPARATOR),
|
|
20
20
|
"data-status": check.status,
|
|
21
21
|
children: [
|
|
22
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[9px] mb-[7px]", children: [
|
|
23
|
-
/* @__PURE__ */ jsx("span", { className: "w-[26px] h-[26px] rounded-rs bg-neutral-100 text-neutral-600 grid place-items-center flex-none [&_svg]:size-[15px]", children: /* @__PURE__ */ jsx(Icon, { size: 15 }) }),
|
|
24
|
-
/* @__PURE__ */ jsx("span", { className: "flex-1 font-semibold text-[12.5px]", children: /* @__PURE__ */ jsx(
|
|
22
|
+
/* @__PURE__ */ jsxs("div", { className: "frseo:flex frseo:items-center frseo:gap-[9px] frseo:mb-[7px]", children: [
|
|
23
|
+
/* @__PURE__ */ jsx("span", { className: "frseo:w-[26px] frseo:h-[26px] frseo:rounded-rs frseo:bg-neutral-100 frseo:text-neutral-600 frseo:grid frseo:place-items-center frseo:flex-none frseo:[&_svg]:size-[15px]", children: /* @__PURE__ */ jsx(Icon, { size: 15 }) }),
|
|
24
|
+
/* @__PURE__ */ jsx("span", { className: "frseo:flex-1 frseo:font-semibold frseo:text-[12.5px]", children: /* @__PURE__ */ jsx(
|
|
25
25
|
Tooltip,
|
|
26
26
|
{
|
|
27
27
|
content: meta.tip,
|
|
28
|
-
className: "border-0 border-b border-dotted border-neutral-400",
|
|
28
|
+
className: "frseo:border-0 frseo:border-b frseo:border-dotted frseo:border-neutral-400",
|
|
29
29
|
children: meta.name
|
|
30
30
|
}
|
|
31
31
|
) }),
|
|
32
32
|
/* @__PURE__ */ jsx(Pill, { variant: check.status, children: STATUS_PILL_LABEL[check.status] })
|
|
33
33
|
] }),
|
|
34
34
|
/* @__PURE__ */ jsx(CheckVisualization, { check }),
|
|
35
|
-
check.recommendation && /* @__PURE__ */ jsx("div", { className: "text-neutral-600 text-[11.5px]", children: check.recommendation })
|
|
35
|
+
check.recommendation && /* @__PURE__ */ jsx("div", { className: "frseo:text-neutral-600 frseo:text-[11.5px]", children: check.recommendation })
|
|
36
36
|
]
|
|
37
37
|
}
|
|
38
38
|
);
|
package/dist/ui/FilterPills.js
CHANGED
|
@@ -4,12 +4,12 @@ import { cva } from "class-variance-authority";
|
|
|
4
4
|
import { cn } from "../utils/style";
|
|
5
5
|
import { statusVar } from "../components/SeoDrawer/variants";
|
|
6
6
|
const filterPillVariants = cva(
|
|
7
|
-
"inline-flex items-center gap-[5px] px-[10px] py-[4px] rounded-[20px] border text-[11px] font-medium cursor-pointer",
|
|
7
|
+
"frseo:inline-flex frseo:items-center frseo:gap-[5px] frseo:px-[10px] frseo:py-[4px] frseo:rounded-[20px] frseo:border frseo:text-[11px] frseo:font-medium frseo:cursor-pointer",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
active: {
|
|
11
|
-
true: "bg-neutral-1000 text-neutral-0 border-neutral-1000",
|
|
12
|
-
false: "border-neutral-200 bg-neutral-0 text-neutral-700"
|
|
11
|
+
true: "frseo:bg-neutral-1000 frseo:text-neutral-0 frseo:border-neutral-1000",
|
|
12
|
+
false: "frseo:border-neutral-200 frseo:bg-neutral-0 frseo:text-neutral-700"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
defaultVariants: { active: false }
|
|
@@ -27,7 +27,7 @@ function Pill({ filter, label, count, active, onSelect, dotStatus }) {
|
|
|
27
27
|
"span",
|
|
28
28
|
{
|
|
29
29
|
className: cn(
|
|
30
|
-
"w-[6px] h-[6px] rounded-full inline-block",
|
|
30
|
+
"frseo:w-[6px] frseo:h-[6px] frseo:rounded-full frseo:inline-block",
|
|
31
31
|
statusVar({ status: dotStatus })
|
|
32
32
|
),
|
|
33
33
|
style: { background: "var(--seo-c)" }
|
|
@@ -35,7 +35,7 @@ function Pill({ filter, label, count, active, onSelect, dotStatus }) {
|
|
|
35
35
|
),
|
|
36
36
|
label,
|
|
37
37
|
" ",
|
|
38
|
-
/* @__PURE__ */ jsx("span", { className: "font-mono font-bold", children: count })
|
|
38
|
+
/* @__PURE__ */ jsx("span", { className: "frseo:font-mono frseo:font-bold", children: count })
|
|
39
39
|
]
|
|
40
40
|
}
|
|
41
41
|
);
|
|
@@ -44,7 +44,7 @@ function countByStatus(checks, status) {
|
|
|
44
44
|
return checks.filter((c) => c.status === status).length;
|
|
45
45
|
}
|
|
46
46
|
function FilterPills({ checks, value, onChange }) {
|
|
47
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex gap-[6px] flex-wrap px-[15px] py-[11px]", children: [
|
|
47
|
+
return /* @__PURE__ */ jsxs("div", { className: "frseo:flex frseo:gap-[6px] frseo:flex-wrap frseo:px-[15px] frseo:py-[11px]", children: [
|
|
48
48
|
/* @__PURE__ */ jsx(
|
|
49
49
|
Pill,
|
|
50
50
|
{
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
variant?: "primary" | "error";
|
|
4
|
+
"aria-label": string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function IconButton({ variant, children, className, type, ...props }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/ui/IconButton.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiB7D,UAAU,eAAgB,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACvE,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,QAAQ,EACR,SAAS,EACT,IAAe,EACf,GAAG,KAAK,EACT,EAAE,eAAe,2CAMjB"}
|