@focus-reactive/payload-plugin-seo 1.10.2 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -2
- package/dist/components/SeoButton/ScoreBadge.d.ts.map +1 -1
- package/dist/components/SeoButton/ScoreBadge.js +10 -1
- package/dist/components/SeoButton/ScoreBadge.js.map +1 -1
- package/dist/components/SeoButton/SeoButtonInner.d.ts.map +1 -1
- package/dist/components/SeoButton/SeoButtonInner.js +4 -2
- package/dist/components/SeoButton/SeoButtonInner.js.map +1 -1
- package/dist/components/SeoDrawer/TabsNav/constants.js +6 -6
- package/dist/components/SeoDrawer/TabsNav/constants.js.map +1 -1
- package/dist/components/SeoDrawer/TabsNav/index.d.ts.map +1 -1
- package/dist/components/SeoDrawer/TabsNav/index.js +4 -2
- package/dist/components/SeoDrawer/TabsNav/index.js.map +1 -1
- package/dist/components/SeoDrawer/TabsNav/types.d.ts +2 -1
- package/dist/components/SeoDrawer/TabsNav/types.d.ts.map +1 -1
- package/dist/components/SeoDrawer/components/Header.d.ts.map +1 -1
- package/dist/components/SeoDrawer/components/Header.js +4 -2
- package/dist/components/SeoDrawer/components/Header.js.map +1 -1
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingIssueBanner.d.ts.map +1 -1
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingIssueBanner.js +4 -2
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingIssueBanner.js.map +1 -1
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingIssuePills.d.ts.map +1 -1
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingIssuePills.js +4 -5
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingIssuePills.js.map +1 -1
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingTree/HeadingTreeRow.d.ts.map +1 -1
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingTree/HeadingTreeRow.js +5 -3
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingTree/HeadingTreeRow.js.map +1 -1
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingTree/index.d.ts.map +1 -1
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingTree/index.js +5 -3
- package/dist/components/SeoDrawer/components/HeadingsSection/HeadingTree/index.js.map +1 -1
- package/dist/components/SeoDrawer/components/HeadingsSection/headingIssueCopy.d.ts +3 -2
- package/dist/components/SeoDrawer/components/HeadingsSection/headingIssueCopy.d.ts.map +1 -1
- package/dist/components/SeoDrawer/components/HeadingsSection/headingIssueCopy.js +5 -5
- package/dist/components/SeoDrawer/components/HeadingsSection/headingIssueCopy.js.map +1 -1
- package/dist/components/SeoDrawer/components/HeadingsSection/index.d.ts.map +1 -1
- package/dist/components/SeoDrawer/components/HeadingsSection/index.js +4 -2
- package/dist/components/SeoDrawer/components/HeadingsSection/index.js.map +1 -1
- package/dist/components/SeoDrawer/index.d.ts.map +1 -1
- package/dist/components/SeoDrawer/index.js +3 -1
- package/dist/components/SeoDrawer/index.js.map +1 -1
- package/dist/components/SeoDrawer/languagePacks.d.ts.map +1 -1
- package/dist/components/SeoDrawer/languagePacks.js +8 -2
- package/dist/components/SeoDrawer/languagePacks.js.map +1 -1
- package/dist/components/SeoDrawer/tabs/InclusiveTab.d.ts.map +1 -1
- package/dist/components/SeoDrawer/tabs/InclusiveTab.js +36 -32
- package/dist/components/SeoDrawer/tabs/InclusiveTab.js.map +1 -1
- package/dist/components/SeoDrawer/tabs/KeyphraseTab.js +3 -3
- package/dist/components/SeoDrawer/tabs/KeyphraseTab.js.map +1 -1
- package/dist/components/SeoDrawer/tabs/OnPageTab.d.ts.map +1 -1
- package/dist/components/SeoDrawer/tabs/OnPageTab.js +16 -12
- package/dist/components/SeoDrawer/tabs/OnPageTab.js.map +1 -1
- package/dist/components/SeoDrawer/tabs/ReadabilityTab.d.ts.map +1 -1
- package/dist/components/SeoDrawer/tabs/ReadabilityTab.js +16 -12
- package/dist/components/SeoDrawer/tabs/ReadabilityTab.js.map +1 -1
- package/dist/components/SeoDrawer/tabs/SerpTab.d.ts.map +1 -1
- package/dist/components/SeoDrawer/tabs/SerpTab.js +6 -4
- package/dist/components/SeoDrawer/tabs/SerpTab.js.map +1 -1
- package/dist/components/SeoDrawer/tabs/VitalsTab.d.ts.map +1 -1
- package/dist/components/SeoDrawer/tabs/VitalsTab.js +18 -9
- package/dist/components/SeoDrawer/tabs/VitalsTab.js.map +1 -1
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseCard.d.ts.map +1 -1
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseCard.js +4 -2
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseCard.js.map +1 -1
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseDetail.d.ts +2 -1
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseDetail.d.ts.map +1 -1
- package/dist/components/SeoDrawer/tabs/keyphrase/KeyphraseDetail.js +26 -23
- 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 +10 -7
- package/dist/components/SeoDrawer/tabs/keyphrase/SynonymsField.js.map +1 -1
- package/dist/components/SeoField/Meter.d.ts +3 -2
- package/dist/components/SeoField/Meter.d.ts.map +1 -1
- package/dist/components/SeoField/Meter.js +8 -6
- package/dist/components/SeoField/Meter.js.map +1 -1
- package/dist/components/SeoField/index.d.ts.map +1 -1
- package/dist/components/SeoField/index.js +16 -13
- package/dist/components/SeoField/index.js.map +1 -1
- package/dist/components/SeoField/useGenerate.d.ts.map +1 -1
- package/dist/components/SeoField/useGenerate.js +5 -3
- package/dist/components/SeoField/useGenerate.js.map +1 -1
- package/dist/constants/checkIds.d.ts +1 -0
- package/dist/constants/checkIds.d.ts.map +1 -1
- package/dist/constants/checkIds.js +2 -0
- package/dist/constants/checkIds.js.map +1 -1
- package/dist/constants/statuses.d.ts +2 -1
- package/dist/constants/statuses.d.ts.map +1 -1
- package/dist/constants/statuses.js +5 -5
- package/dist/constants/statuses.js.map +1 -1
- package/dist/engine/inclusiveScore.d.ts +4 -4
- package/dist/engine/inclusiveScore.d.ts.map +1 -1
- package/dist/engine/inclusiveScore.js +3 -3
- package/dist/engine/inclusiveScore.js.map +1 -1
- package/dist/engine/recommendations.d.ts +2 -1
- package/dist/engine/recommendations.d.ts.map +1 -1
- package/dist/engine/recommendations.js +20 -20
- package/dist/engine/recommendations.js.map +1 -1
- package/dist/engine/researcherAdapter.d.ts +3 -0
- package/dist/engine/researcherAdapter.d.ts.map +1 -1
- package/dist/engine/researcherAdapter.js +17 -2
- package/dist/engine/researcherAdapter.js.map +1 -1
- package/dist/engine/runAnalysis/services/derive-inclusive.d.ts.map +1 -1
- package/dist/engine/runAnalysis/services/derive-inclusive.js +15 -13
- package/dist/engine/runAnalysis/services/derive-inclusive.js.map +1 -1
- package/dist/engine/types/analysis.d.ts +5 -3
- package/dist/engine/types/analysis.d.ts.map +1 -1
- package/dist/engine/types/visualization.d.ts +4 -2
- package/dist/engine/types/visualization.d.ts.map +1 -1
- package/dist/engine/visualization/resolveVisualization/index.js +4 -4
- package/dist/engine/visualization/resolveVisualization/index.js.map +1 -1
- package/dist/engine/visualization/resolveVisualization/resolves/resolveDrilldown.d.ts +2 -2
- package/dist/engine/visualization/resolveVisualization/resolves/resolveDrilldown.d.ts.map +1 -1
- package/dist/engine/visualization/resolveVisualization/resolves/resolveDrilldown.js +2 -6
- package/dist/engine/visualization/resolveVisualization/resolves/resolveDrilldown.js.map +1 -1
- package/dist/engine/visualization/resolveVisualization/resolves/resolveLinks.js +2 -2
- package/dist/engine/visualization/resolveVisualization/resolves/resolveLinks.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +2 -2
- package/dist/plugin.js.map +1 -1
- package/dist/translations/index.d.ts +9 -0
- package/dist/translations/index.d.ts.map +1 -0
- package/dist/translations/index.js +27 -0
- package/dist/translations/index.js.map +1 -0
- package/dist/translations/messages/cs.d.ts +3 -0
- package/dist/translations/messages/cs.d.ts.map +1 -0
- package/dist/translations/messages/cs.js +197 -0
- package/dist/translations/messages/cs.js.map +1 -0
- package/dist/translations/messages/en.d.ts +189 -0
- package/dist/translations/messages/en.d.ts.map +1 -0
- package/dist/translations/messages/en.js +192 -0
- package/dist/translations/messages/en.js.map +1 -0
- package/dist/translations/translate.d.ts +7 -0
- package/dist/translations/translate.d.ts.map +1 -0
- package/dist/translations/translate.js +43 -0
- package/dist/translations/translate.js.map +1 -0
- package/dist/translations/types.d.ts +17 -1
- package/dist/translations/types.d.ts.map +1 -1
- package/dist/translations/useSeoTranslation.d.ts +6 -0
- package/dist/translations/useSeoTranslation.d.ts.map +1 -0
- package/dist/translations/useSeoTranslation.js +15 -0
- package/dist/translations/useSeoTranslation.js.map +1 -0
- package/dist/ui/CheckRow/CheckVisualization/visualizations/DistributionBar.d.ts.map +1 -1
- package/dist/ui/CheckRow/CheckVisualization/visualizations/DistributionBar.js +5 -3
- package/dist/ui/CheckRow/CheckVisualization/visualizations/DistributionBar.js.map +1 -1
- package/dist/ui/CheckRow/CheckVisualization/visualizations/DrillDown.d.ts +1 -1
- package/dist/ui/CheckRow/CheckVisualization/visualizations/DrillDown.d.ts.map +1 -1
- package/dist/ui/CheckRow/CheckVisualization/visualizations/DrillDown.js +6 -3
- package/dist/ui/CheckRow/CheckVisualization/visualizations/DrillDown.js.map +1 -1
- package/dist/ui/CheckRow/CheckVisualization/visualizations/SegmentBar.d.ts.map +1 -1
- package/dist/ui/CheckRow/CheckVisualization/visualizations/SegmentBar.js +4 -2
- package/dist/ui/CheckRow/CheckVisualization/visualizations/SegmentBar.js.map +1 -1
- package/dist/ui/CheckRow/index.d.ts.map +1 -1
- package/dist/ui/CheckRow/index.js +8 -8
- package/dist/ui/CheckRow/index.js.map +1 -1
- package/dist/ui/FilterPills.d.ts.map +1 -1
- package/dist/ui/FilterPills.js +6 -4
- package/dist/ui/FilterPills.js.map +1 -1
- package/dist/ui/TabHeader.d.ts.map +1 -1
- package/dist/ui/TabHeader.js +4 -2
- package/dist/ui/TabHeader.js.map +1 -1
- package/dist/utils/config/mergeTranslations.d.ts +3 -2
- package/dist/utils/config/mergeTranslations.d.ts.map +1 -1
- package/dist/utils/config/mergeTranslations.js +10 -2
- package/dist/utils/config/mergeTranslations.js.map +1 -1
- package/package.json +1 -1
- package/dist/engine/visualization/resolveVisualization/utils/pluralize.d.ts +0 -2
- package/dist/engine/visualization/resolveVisualization/utils/pluralize.d.ts.map +0 -1
- package/dist/engine/visualization/resolveVisualization/utils/pluralize.js +0 -5
- package/dist/engine/visualization/resolveVisualization/utils/pluralize.js.map +0 -1
- package/dist/translations/en.d.ts +0 -3
- package/dist/translations/en.d.ts.map +0 -1
- package/dist/translations/en.js +0 -17
- package/dist/translations/en.js.map +0 -1
- package/dist/ui/CheckRow/constants/labels.d.ts +0 -6
- package/dist/ui/CheckRow/constants/labels.d.ts.map +0 -1
- package/dist/ui/CheckRow/constants/labels.js +0 -103
- package/dist/ui/CheckRow/constants/labels.js.map +0 -1
package/README.md
CHANGED
|
@@ -223,7 +223,7 @@ interface SeoPluginConfig {
|
|
|
223
223
|
site?: SeoSiteConfig;
|
|
224
224
|
/** Locale codes whose Yoast language packs may be loaded. Default: ['en'] */
|
|
225
225
|
supportedLocales?: string[];
|
|
226
|
-
/** Override
|
|
226
|
+
/** Override or add UI strings per admin language (see "Admin language"). */
|
|
227
227
|
translations?: Translations;
|
|
228
228
|
}
|
|
229
229
|
```
|
|
@@ -700,13 +700,47 @@ seoPlugin({
|
|
|
700
700
|
|
|
701
701
|
The active locale is taken from the admin and normalized to Yoast's `xx_XX` form (e.g. `en` → `en_EN`). The locale is passed to your extractor as `ctx.locale` and to `resolveDocs` (so projected fetches are locale-correct). A locale not listed in `supportedLocales` falls back to English processing.
|
|
702
702
|
|
|
703
|
+
### Admin language
|
|
704
|
+
|
|
705
|
+
The drawer and the generated fields speak the admin's language (Payload's `i18n`, the user's language switch), independently of the content locale above. English and Czech ship with the plugin; any other admin language falls back to English string by string.
|
|
706
|
+
|
|
707
|
+
Payload only offers the admin languages your config enables, so add Czech to `i18n.supportedLanguages` to get the Czech UI:
|
|
708
|
+
|
|
709
|
+
```ts
|
|
710
|
+
import { cs } from "@payloadcms/translations/languages/cs";
|
|
711
|
+
import { en } from "@payloadcms/translations/languages/en";
|
|
712
|
+
|
|
713
|
+
export default buildConfig({
|
|
714
|
+
i18n: { supportedLanguages: { en, cs } },
|
|
715
|
+
// ...
|
|
716
|
+
});
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
The strings are registered as Payload custom translations under the `seo` namespace, so they can be overridden — or a whole language added — with `translations`. Keys are the ones in [`src/translations/messages/en.ts`](./src/translations/messages/en.ts):
|
|
720
|
+
|
|
721
|
+
```ts
|
|
722
|
+
seoPlugin({
|
|
723
|
+
// ...
|
|
724
|
+
translations: {
|
|
725
|
+
de: {
|
|
726
|
+
title: "SEO-Analyse",
|
|
727
|
+
"tab.keyphrase": "Fokus-Keyphrase",
|
|
728
|
+
"viz.show.link_one": "{{count}} Link anzeigen",
|
|
729
|
+
"viz.show.link_other": "{{count}} Links anzeigen",
|
|
730
|
+
},
|
|
731
|
+
},
|
|
732
|
+
});
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
`{{name}}` placeholders are interpolated. Plurals are separate keys suffixed `_zero`, `_one`, `_two`, `_few`, `_many` or `_other`, chosen with `Intl.PluralRules` for the admin language; `_other` is required, the rest only where the language has that form (Czech uses `_one`, `_few` and `_other`). Keys are type-checked against the English set (the `Translations` type is exported). The `seo:` prefix and the colon-separated tab keys of earlier versions (`"seo:tab:keyphrase"`) are still accepted. Strings from this option take precedence over `i18n.translations.<language>.seo` in your Payload config.
|
|
736
|
+
|
|
703
737
|
---
|
|
704
738
|
|
|
705
739
|
## Exports Reference
|
|
706
740
|
|
|
707
741
|
| Import path | Exports |
|
|
708
742
|
| -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
709
|
-
| `@focus-reactive/payload-plugin-seo` | `seoPlugin`, `seoTextField`; types `SeoPluginConfig`, `SeoCollectionConfig`, `SeoFieldPaths`, `SeoSiteConfig`, `ContentExtractor`, `SeoGenerationConfig`
|
|
743
|
+
| `@focus-reactive/payload-plugin-seo` | `seoPlugin`, `seoTextField`; types `SeoPluginConfig`, `SeoCollectionConfig`, `SeoFieldPaths`, `SeoSiteConfig`, `ContentExtractor`, `SeoGenerationConfig`, `Translations`, `MessageKey` |
|
|
710
744
|
| `@focus-reactive/payload-plugin-seo/content` | Builder helpers `heading`, `paragraph`, `link`, `image`, `video`, `richText`, `html`, `compact`; `registerContentExtractors`, `resolveContentExtractor`; types `ContentNode`, `HeadingLevel`, `ContentExtractor`, `ExtractContext`, `ExtractToolkit`, `DocQuery`, `DocStore`, `ContentHelpers` |
|
|
711
745
|
| `@focus-reactive/payload-plugin-seo/fields` | `seoTextField`; type `SeoTextFieldOptions` |
|
|
712
746
|
| `@focus-reactive/payload-plugin-seo/admin.css` | Compiled admin styles for the drawer & button |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScoreBadge.d.ts","sourceRoot":"","sources":["../../../src/components/SeoButton/ScoreBadge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"ScoreBadge.d.ts","sourceRoot":"","sources":["../../../src/components/SeoButton/ScoreBadge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAkB1D,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,eAAe,2CAUvE"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { cn } from "../../utils/style";
|
|
5
|
+
import { useSeoTranslation } from "../../translations/useSeoTranslation";
|
|
5
6
|
const badgeVariants = cva(
|
|
6
7
|
"frseo:absolute frseo:-top-1 frseo:-right-1 frseo:min-w-[14px] frseo:h-[14px] frseo:px-[3px] frseo:rounded-full frseo:text-seo-badge-fg frseo:text-[9px] frseo:font-semibold frseo:leading-[14px] frseo:text-center frseo:pointer-events-none frseo:select-none",
|
|
7
8
|
{
|
|
@@ -15,7 +16,15 @@ const badgeVariants = cva(
|
|
|
15
16
|
}
|
|
16
17
|
);
|
|
17
18
|
function ScoreBadge({ score, status, className }) {
|
|
18
|
-
|
|
19
|
+
const { t } = useSeoTranslation();
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
"span",
|
|
22
|
+
{
|
|
23
|
+
"aria-label": t("scoreBadge", { score }),
|
|
24
|
+
className: cn(badgeVariants({ status }), className),
|
|
25
|
+
children: score
|
|
26
|
+
}
|
|
27
|
+
);
|
|
19
28
|
}
|
|
20
29
|
export {
|
|
21
30
|
ScoreBadge
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SeoButton/ScoreBadge.tsx"],"sourcesContent":["\"use client\";\n\nimport type { Status } from \"../../engine/types/analysis\";\nimport { cva } from \"class-variance-authority\";\nimport { cn } from \"../../utils/style\";\n\nconst badgeVariants = cva(\n \"absolute -top-1 -right-1 min-w-[14px] h-[14px] px-[3px] rounded-full text-seo-badge-fg text-[9px] font-semibold leading-[14px] text-center pointer-events-none select-none\",\n {\n variants: {\n status: {\n good: \"bg-seo-good\",\n warn: \"bg-seo-warn\",\n bad: \"bg-seo-bad\",\n },\n },\n }\n);\n\ninterface ScoreBadgeProps {\n score: number;\n status: Status;\n className?: string;\n}\n\nexport function ScoreBadge({ score, status, className }: ScoreBadgeProps) {\n return (\n <span
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SeoButton/ScoreBadge.tsx"],"sourcesContent":["\"use client\";\n\nimport type { Status } from \"../../engine/types/analysis\";\nimport { cva } from \"class-variance-authority\";\nimport { cn } from \"../../utils/style\";\nimport { useSeoTranslation } from \"../../translations/useSeoTranslation\";\n\nconst badgeVariants = cva(\n \"absolute -top-1 -right-1 min-w-[14px] h-[14px] px-[3px] rounded-full text-seo-badge-fg text-[9px] font-semibold leading-[14px] text-center pointer-events-none select-none\",\n {\n variants: {\n status: {\n good: \"bg-seo-good\",\n warn: \"bg-seo-warn\",\n bad: \"bg-seo-bad\",\n },\n },\n }\n);\n\ninterface ScoreBadgeProps {\n score: number;\n status: Status;\n className?: string;\n}\n\nexport function ScoreBadge({ score, status, className }: ScoreBadgeProps) {\n const { t } = useSeoTranslation();\n return (\n <span\n aria-label={t(\"scoreBadge\", { score })}\n className={cn(badgeVariants({ status }), className)}\n >\n {score}\n </span>\n );\n}\n"],"mappings":";AA6BI;AA1BJ,SAAS,WAAW;AACpB,SAAS,UAAU;AACnB,SAAS,yBAAyB;AAElC,MAAM,gBAAgB;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,KAAK;AAAA,MACP;AAAA,IACF;AAAA,EACF;AACF;AAQO,SAAS,WAAW,EAAE,OAAO,QAAQ,UAAU,GAAoB;AACxE,QAAM,EAAE,EAAE,IAAI,kBAAkB;AAChC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAY,EAAE,cAAc,EAAE,MAAM,CAAC;AAAA,MACrC,WAAW,GAAG,cAAc,EAAE,OAAO,CAAC,GAAG,SAAS;AAAA,MAEjD;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeoButtonInner.d.ts","sourceRoot":"","sources":["../../../src/components/SeoButton/SeoButtonInner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SeoButtonInner.d.ts","sourceRoot":"","sources":["../../../src/components/SeoButton/SeoButtonInner.tsx"],"names":[],"mappings":"AAYA,MAAM,WAAW,cAAc;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B;AAID,wBAAgB,cAAc,CAAC,EAC7B,cAAc,EACd,MAAM,EACN,IAAI,EACJ,gBAAgB,EAChB,kBAAkB,GACnB,EAAE,cAAc,2CAsFhB"}
|
|
@@ -8,6 +8,7 @@ import { SeoDrawer } from "../SeoDrawer";
|
|
|
8
8
|
import { useAnalysis } from "../SeoDrawer/useAnalysis";
|
|
9
9
|
import { useKeyphrases } from "../SeoDrawer/useKeyphrases";
|
|
10
10
|
import { useLiveDocument } from "../SeoDrawer/useLiveDocument";
|
|
11
|
+
import { useSeoTranslation } from "../../translations/useSeoTranslation";
|
|
11
12
|
const DRAWER_SLUG = "seo-analytics-drawer";
|
|
12
13
|
function SeoButtonInner({
|
|
13
14
|
collectionSlug,
|
|
@@ -16,6 +17,7 @@ function SeoButtonInner({
|
|
|
16
17
|
supportedLocales,
|
|
17
18
|
extractContentPath
|
|
18
19
|
}) {
|
|
20
|
+
const { t } = useSeoTranslation();
|
|
19
21
|
const { openModal } = useModal();
|
|
20
22
|
const { id } = useDocumentInfo();
|
|
21
23
|
const locale = useLocale();
|
|
@@ -64,7 +66,7 @@ function SeoButtonInner({
|
|
|
64
66
|
/* @__PURE__ */ jsx(
|
|
65
67
|
Button,
|
|
66
68
|
{
|
|
67
|
-
"aria-label": "
|
|
69
|
+
"aria-label": t("title"),
|
|
68
70
|
buttonStyle: "none",
|
|
69
71
|
className: "frseo-doc-btn frseo:m-0 frseo:w-[calc(var(--base)*1.6)] frseo:h-[calc(var(--base)*1.6)] frseo:inline-flex frseo:items-center frseo:justify-center frseo:border frseo:border-[var(--theme-elevation-100)] frseo:rounded-rs frseo:bg-transparent frseo:text-neutral-800 frseo:transition-[border-color,background-color] frseo:duration-100 frseo:hover:border-neutral-300 frseo:hover:bg-neutral-100",
|
|
70
72
|
extraButtonProps: { title: void 0 },
|
|
@@ -73,7 +75,7 @@ function SeoButtonInner({
|
|
|
73
75
|
margin: false,
|
|
74
76
|
onClick: open,
|
|
75
77
|
size: "small",
|
|
76
|
-
tooltip: "
|
|
78
|
+
tooltip: t("title")
|
|
77
79
|
}
|
|
78
80
|
),
|
|
79
81
|
overall && /* @__PURE__ */ jsx(ScoreBadge, { score: overall.seoScore, status: overall.status }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SeoButton/SeoButtonInner.tsx"],"sourcesContent":["\"use client\";\n\nimport { Button, useDocumentInfo, useLocale, useModal } from \"@payloadcms/ui\";\nimport { Gauge } from \"lucide-react\";\nimport { useCallback, useState } from \"react\";\nimport { ScoreBadge } from \"./ScoreBadge\";\nimport { SeoDrawer } from \"../SeoDrawer\";\nimport { useAnalysis } from \"../SeoDrawer/useAnalysis\";\nimport { useKeyphrases } from \"../SeoDrawer/useKeyphrases\";\nimport { useLiveDocument } from \"../SeoDrawer/useLiveDocument\";\n\nexport interface SeoButtonProps {\n collectionSlug: string;\n fields: Record<string, string>;\n extractContentPath: string;\n site: { name: string; baseUrl: string; faviconUrl: string };\n supportedLocales: string[];\n}\n\nconst DRAWER_SLUG = \"seo-analytics-drawer\";\n\nexport function SeoButtonInner({\n collectionSlug,\n fields,\n site,\n supportedLocales,\n extractContentPath,\n}: SeoButtonProps) {\n const { openModal } = useModal();\n const { id } = useDocumentInfo();\n const locale = useLocale();\n\n const docId = id == null ? \"\" : String(id);\n const localeCode = locale?.code ?? \"en\";\n\n const {\n addRelated,\n addSynonym,\n isDuplicate,\n keyphrases,\n remove: removeKeyphrase,\n removeSynonym,\n setFocus,\n updateText,\n } = useKeyphrases({ collectionSlug, docId, localeCode });\n const [selectedId, setSelectedId] = useState<string | null>(null);\n const { signature, getInput } = useLiveDocument({\n collectionSlug,\n fields,\n site: {\n name: site.name,\n baseUrl: site.baseUrl,\n },\n keyphrases,\n extractContentPath,\n });\n const { result, analyzing, analyzeNow } = useAnalysis({ getInput, signature, supportedLocales });\n\n const overall = result?.overall ?? null;\n\n const open = useCallback(() => {\n analyzeNow();\n openModal(DRAWER_SLUG);\n }, [analyzeNow, openModal]);\n\n const handleAddRelated = useCallback(() => {\n const newId = addRelated();\n if (newId) setSelectedId(newId);\n }, [addRelated]);\n\n const handleRemove = useCallback(\n (id: string) => {\n removeKeyphrase(id);\n setSelectedId((current) => (current === id ? null : current));\n },\n [removeKeyphrase]\n );\n\n return (\n <span className=\"relative inline-flex\">\n <Button\n aria-label
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SeoButton/SeoButtonInner.tsx"],"sourcesContent":["\"use client\";\n\nimport { Button, useDocumentInfo, useLocale, useModal } from \"@payloadcms/ui\";\nimport { Gauge } from \"lucide-react\";\nimport { useCallback, useState } from \"react\";\nimport { ScoreBadge } from \"./ScoreBadge\";\nimport { SeoDrawer } from \"../SeoDrawer\";\nimport { useAnalysis } from \"../SeoDrawer/useAnalysis\";\nimport { useKeyphrases } from \"../SeoDrawer/useKeyphrases\";\nimport { useLiveDocument } from \"../SeoDrawer/useLiveDocument\";\nimport { useSeoTranslation } from \"../../translations/useSeoTranslation\";\n\nexport interface SeoButtonProps {\n collectionSlug: string;\n fields: Record<string, string>;\n extractContentPath: string;\n site: { name: string; baseUrl: string; faviconUrl: string };\n supportedLocales: string[];\n}\n\nconst DRAWER_SLUG = \"seo-analytics-drawer\";\n\nexport function SeoButtonInner({\n collectionSlug,\n fields,\n site,\n supportedLocales,\n extractContentPath,\n}: SeoButtonProps) {\n const { t } = useSeoTranslation();\n const { openModal } = useModal();\n const { id } = useDocumentInfo();\n const locale = useLocale();\n\n const docId = id == null ? \"\" : String(id);\n const localeCode = locale?.code ?? \"en\";\n\n const {\n addRelated,\n addSynonym,\n isDuplicate,\n keyphrases,\n remove: removeKeyphrase,\n removeSynonym,\n setFocus,\n updateText,\n } = useKeyphrases({ collectionSlug, docId, localeCode });\n const [selectedId, setSelectedId] = useState<string | null>(null);\n const { signature, getInput } = useLiveDocument({\n collectionSlug,\n fields,\n site: {\n name: site.name,\n baseUrl: site.baseUrl,\n },\n keyphrases,\n extractContentPath,\n });\n const { result, analyzing, analyzeNow } = useAnalysis({ getInput, signature, supportedLocales });\n\n const overall = result?.overall ?? null;\n\n const open = useCallback(() => {\n analyzeNow();\n openModal(DRAWER_SLUG);\n }, [analyzeNow, openModal]);\n\n const handleAddRelated = useCallback(() => {\n const newId = addRelated();\n if (newId) setSelectedId(newId);\n }, [addRelated]);\n\n const handleRemove = useCallback(\n (id: string) => {\n removeKeyphrase(id);\n setSelectedId((current) => (current === id ? null : current));\n },\n [removeKeyphrase]\n );\n\n return (\n <span className=\"relative inline-flex\">\n <Button\n aria-label={t(\"title\")}\n buttonStyle=\"none\"\n className=\"frseo-doc-btn m-0 w-[calc(var(--base)*1.6)] h-[calc(var(--base)*1.6)] inline-flex items-center justify-center border border-[var(--theme-elevation-100)] rounded-rs bg-transparent text-neutral-800 transition-[border-color,background-color] duration-100 hover:border-neutral-300 hover:bg-neutral-100\"\n extraButtonProps={{ title: undefined }}\n icon={<Gauge />}\n iconStyle=\"without-border\"\n margin={false}\n onClick={open}\n size=\"small\"\n tooltip={t(\"title\")}\n />\n {overall && <ScoreBadge score={overall.seoScore} status={overall.status} />}\n\n <SeoDrawer\n drawerSlug={DRAWER_SLUG}\n keyphrases={keyphrases}\n selectedId={selectedId}\n onSelect={setSelectedId}\n result={result}\n analyzing={analyzing}\n onAddRelated={handleAddRelated}\n onTextChange={updateText}\n onAddSynonym={addSynonym}\n onRemoveSynonym={removeSynonym}\n onRemove={handleRemove}\n onSetFocus={setFocus}\n isDuplicate={isDuplicate}\n site={site}\n />\n </span>\n );\n}\n"],"mappings":";AAiFI,SAMU,KANV;AA/EJ,SAAS,QAAQ,iBAAiB,WAAW,gBAAgB;AAC7D,SAAS,aAAa;AACtB,SAAS,aAAa,gBAAgB;AACtC,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAUlC,MAAM,cAAc;AAEb,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAmB;AACjB,QAAM,EAAE,EAAE,IAAI,kBAAkB;AAChC,QAAM,EAAE,UAAU,IAAI,SAAS;AAC/B,QAAM,EAAE,GAAG,IAAI,gBAAgB;AAC/B,QAAM,SAAS,UAAU;AAEzB,QAAM,QAAQ,MAAM,OAAO,KAAK,OAAO,EAAE;AACzC,QAAM,aAAa,QAAQ,QAAQ;AAEnC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,cAAc,EAAE,gBAAgB,OAAO,WAAW,CAAC;AACvD,QAAM,CAAC,YAAY,aAAa,IAAI,SAAwB,IAAI;AAChE,QAAM,EAAE,WAAW,SAAS,IAAI,gBAAgB;AAAA,IAC9C;AAAA,IACA;AAAA,IACA,MAAM;AAAA,MACJ,MAAM,KAAK;AAAA,MACX,SAAS,KAAK;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,EAAE,QAAQ,WAAW,WAAW,IAAI,YAAY,EAAE,UAAU,WAAW,iBAAiB,CAAC;AAE/F,QAAM,UAAU,QAAQ,WAAW;AAEnC,QAAM,OAAO,YAAY,MAAM;AAC7B,eAAW;AACX,cAAU,WAAW;AAAA,EACvB,GAAG,CAAC,YAAY,SAAS,CAAC;AAE1B,QAAM,mBAAmB,YAAY,MAAM;AACzC,UAAM,QAAQ,WAAW;AACzB,QAAI;AAAO,oBAAc,KAAK;AAAA,EAChC,GAAG,CAAC,UAAU,CAAC;AAEf,QAAM,eAAe;AAAA,IACnB,CAACA,QAAe;AACd,sBAAgBA,GAAE;AAClB,oBAAc,CAAC,YAAa,YAAYA,MAAK,OAAO,OAAQ;AAAA,IAC9D;AAAA,IACA,CAAC,eAAe;AAAA,EAClB;AAEA,SACE,qBAAC,UAAK,WAAU,wBACd;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,cAAY,EAAE,OAAO;AAAA,QACrB,aAAY;AAAA,QACZ,WAAU;AAAA,QACV,kBAAkB,EAAE,OAAO,OAAU;AAAA,QACrC,MAAM,oBAAC,SAAM;AAAA,QACb,WAAU;AAAA,QACV,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,MAAK;AAAA,QACL,SAAS,EAAE,OAAO;AAAA;AAAA,IACpB;AAAA,IACC,WAAW,oBAAC,cAAW,OAAO,QAAQ,UAAU,QAAQ,QAAQ,QAAQ;AAAA,IAEzE;AAAA,MAAC;AAAA;AAAA,QACC,YAAY;AAAA,QACZ;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACA,cAAc;AAAA,QACd,cAAc;AAAA,QACd,cAAc;AAAA,QACd,iBAAiB;AAAA,QACjB,UAAU;AAAA,QACV,YAAY;AAAA,QACZ;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":["id"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BarChart3, BookOpen, Crosshair, FileText, Search, Users } from "lucide-react";
|
|
2
2
|
const TABS = [
|
|
3
|
-
{ key: "keyphrase",
|
|
4
|
-
{ key: "onpage",
|
|
5
|
-
{ key: "readability",
|
|
6
|
-
{ key: "inclusive",
|
|
7
|
-
{ key: "vitals",
|
|
8
|
-
{ key: "serp",
|
|
3
|
+
{ key: "keyphrase", labelKey: "tab.keyphrase", icon: Crosshair },
|
|
4
|
+
{ key: "onpage", labelKey: "tab.onpage", icon: FileText },
|
|
5
|
+
{ key: "readability", labelKey: "tab.readability", icon: BookOpen },
|
|
6
|
+
{ key: "inclusive", labelKey: "tab.inclusive", icon: Users },
|
|
7
|
+
{ key: "vitals", labelKey: "tab.vitals", icon: BarChart3 },
|
|
8
|
+
{ key: "serp", labelKey: "tab.serp", icon: Search }
|
|
9
9
|
];
|
|
10
10
|
export {
|
|
11
11
|
TABS
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/SeoDrawer/TabsNav/constants.ts"],"sourcesContent":["import type { Tab } from \"./types\";\nimport { BarChart3, BookOpen, Crosshair, FileText, Search, Users } from \"lucide-react\";\n\nexport const TABS: Tab[] = [\n { key: \"keyphrase\",
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/SeoDrawer/TabsNav/constants.ts"],"sourcesContent":["import type { Tab } from \"./types\";\nimport { BarChart3, BookOpen, Crosshair, FileText, Search, Users } from \"lucide-react\";\n\nexport const TABS: Tab[] = [\n { key: \"keyphrase\", labelKey: \"tab.keyphrase\", icon: Crosshair },\n { key: \"onpage\", labelKey: \"tab.onpage\", icon: FileText },\n { key: \"readability\", labelKey: \"tab.readability\", icon: BookOpen },\n { key: \"inclusive\", labelKey: \"tab.inclusive\", icon: Users },\n { key: \"vitals\", labelKey: \"tab.vitals\", icon: BarChart3 },\n { key: \"serp\", labelKey: \"tab.serp\", icon: Search },\n];\n"],"mappings":"AACA,SAAS,WAAW,UAAU,WAAW,UAAU,QAAQ,aAAa;AAEjE,MAAM,OAAc;AAAA,EACzB,EAAE,KAAK,aAAa,UAAU,iBAAiB,MAAM,UAAU;AAAA,EAC/D,EAAE,KAAK,UAAU,UAAU,cAAc,MAAM,SAAS;AAAA,EACxD,EAAE,KAAK,eAAe,UAAU,mBAAmB,MAAM,SAAS;AAAA,EAClE,EAAE,KAAK,aAAa,UAAU,iBAAiB,MAAM,MAAM;AAAA,EAC3D,EAAE,KAAK,UAAU,UAAU,cAAc,MAAM,UAAU;AAAA,EACzD,EAAE,KAAK,QAAQ,UAAU,YAAY,MAAM,OAAO;AACpD;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SeoDrawer/TabsNav/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SeoDrawer/TabsNav/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAItC,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED,wBAAgB,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,YAAY,2CAsBzD"}
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { TABS } from "./constants";
|
|
4
4
|
import { tabVariants } from "./variants";
|
|
5
|
+
import { useSeoTranslation } from "../../../translations/useSeoTranslation";
|
|
5
6
|
function TabsNav({ active, onChange }) {
|
|
7
|
+
const { t } = useSeoTranslation();
|
|
6
8
|
return /* @__PURE__ */ jsx(
|
|
7
9
|
"nav",
|
|
8
10
|
{
|
|
9
11
|
role: "tablist",
|
|
10
12
|
className: "frseo:flex frseo:shrink-0 frseo:gap-[20px] frseo:border-b frseo:border-neutral-200 frseo:overflow-x-auto",
|
|
11
|
-
children: TABS.map(({ key,
|
|
13
|
+
children: TABS.map(({ key, labelKey, icon: Icon }) => /* @__PURE__ */ jsxs(
|
|
12
14
|
"button",
|
|
13
15
|
{
|
|
14
16
|
type: "button",
|
|
@@ -18,7 +20,7 @@ function TabsNav({ active, onChange }) {
|
|
|
18
20
|
onClick: () => onChange(key),
|
|
19
21
|
children: [
|
|
20
22
|
/* @__PURE__ */ jsx(Icon, { size: 14, "aria-hidden": "true" }),
|
|
21
|
-
/* @__PURE__ */ jsx("span", { children:
|
|
23
|
+
/* @__PURE__ */ jsx("span", { children: t(labelKey) })
|
|
22
24
|
]
|
|
23
25
|
},
|
|
24
26
|
key
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/SeoDrawer/TabsNav/index.tsx"],"sourcesContent":["\"use client\";\n\nimport { TABS } from \"./constants\";\nimport type { TabKey } from \"./types\";\nimport { tabVariants } from \"./variants\";\n\nexport type { TabKey } from \"./types\";\n\nexport interface TabsNavProps {\n active: TabKey;\n onChange: (next: TabKey) => void;\n}\n\nexport function TabsNav({ active, onChange }: TabsNavProps) {\n return (\n <nav\n role=\"tablist\"\n className=\"flex shrink-0 gap-[20px] border-b border-neutral-200 overflow-x-auto\"\n >\n {TABS.map(({ key,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/SeoDrawer/TabsNav/index.tsx"],"sourcesContent":["\"use client\";\n\nimport { TABS } from \"./constants\";\nimport type { TabKey } from \"./types\";\nimport { tabVariants } from \"./variants\";\nimport { useSeoTranslation } from \"../../../translations/useSeoTranslation\";\n\nexport type { TabKey } from \"./types\";\n\nexport interface TabsNavProps {\n active: TabKey;\n onChange: (next: TabKey) => void;\n}\n\nexport function TabsNav({ active, onChange }: TabsNavProps) {\n const { t } = useSeoTranslation();\n return (\n <nav\n role=\"tablist\"\n className=\"flex shrink-0 gap-[20px] border-b border-neutral-200 overflow-x-auto\"\n >\n {TABS.map(({ key, labelKey, icon: Icon }) => (\n <button\n key={key}\n type=\"button\"\n role=\"tab\"\n aria-selected={active === key}\n className={tabVariants({ active: active === key })}\n onClick={() => onChange(key)}\n >\n <Icon size={14} aria-hidden=\"true\" />\n <span>{t(labelKey)}</span>\n </button>\n ))}\n </nav>\n );\n}\n"],"mappings":";AAsBQ,SAQE,KARF;AApBR,SAAS,YAAY;AAErB,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAS3B,SAAS,QAAQ,EAAE,QAAQ,SAAS,GAAiB;AAC1D,QAAM,EAAE,EAAE,IAAI,kBAAkB;AAChC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,WAAU;AAAA,MAET,eAAK,IAAI,CAAC,EAAE,KAAK,UAAU,MAAM,KAAK,MACrC;AAAA,QAAC;AAAA;AAAA,UAEC,MAAK;AAAA,UACL,MAAK;AAAA,UACL,iBAAe,WAAW;AAAA,UAC1B,WAAW,YAAY,EAAE,QAAQ,WAAW,IAAI,CAAC;AAAA,UACjD,SAAS,MAAM,SAAS,GAAG;AAAA,UAE3B;AAAA,gCAAC,QAAK,MAAM,IAAI,eAAY,QAAO;AAAA,YACnC,oBAAC,UAAM,YAAE,QAAQ,GAAE;AAAA;AAAA;AAAA,QARd;AAAA,MASP,CACD;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { LucideIcon } from "lucide-react";
|
|
2
|
+
import type { TranslationKey } from "../../../translations/types";
|
|
2
3
|
export type TabKey = "keyphrase" | "onpage" | "readability" | "inclusive" | "vitals" | "serp";
|
|
3
4
|
export interface Tab {
|
|
4
5
|
key: TabKey;
|
|
5
|
-
|
|
6
|
+
labelKey: TranslationKey;
|
|
6
7
|
icon: LucideIcon;
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/SeoDrawer/TabsNav/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/SeoDrawer/TabsNav/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,MAAM,MAAM,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE9F,MAAM,WAAW,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,cAAc,CAAC;IACzB,IAAI,EAAE,UAAU,CAAC;CAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/SeoDrawer/components/Header.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/SeoDrawer/components/Header.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAMlE,UAAU,WAAW;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,MAAM,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,WAAW,2CAgCrE"}
|
|
@@ -4,17 +4,19 @@ import { useModal, XIcon } from "@payloadcms/ui";
|
|
|
4
4
|
import { cn } from "../../../utils/style";
|
|
5
5
|
import { statusVar } from "../variants";
|
|
6
6
|
import { Pill } from "../../../ui/Pill";
|
|
7
|
+
import { useSeoTranslation } from "../../../translations/useSeoTranslation";
|
|
7
8
|
function Header({ drawerSlug, total, totalStatus }) {
|
|
8
9
|
const { closeModal } = useModal();
|
|
10
|
+
const { t } = useSeoTranslation();
|
|
9
11
|
return /* @__PURE__ */ jsxs("div", { className: "frseo:relative frseo:flex frseo:items-center frseo:justify-between frseo:px-[4px] frseo:py-[16px]", children: [
|
|
10
12
|
/* @__PURE__ */ jsxs("div", { className: "frseo:flex frseo:items-center frseo:gap-[11px]", children: [
|
|
11
|
-
/* @__PURE__ */ jsx("h2", { className: "frseo:text-[16px] frseo:font-semibold frseo:m-0", children: "
|
|
13
|
+
/* @__PURE__ */ jsx("h2", { className: "frseo:text-[16px] frseo:font-semibold frseo:m-0", children: t("title") }),
|
|
12
14
|
totalStatus === "idle" ? null : /* @__PURE__ */ jsx(Pill, { variant: totalStatus, children: total })
|
|
13
15
|
] }),
|
|
14
16
|
/* @__PURE__ */ jsx(
|
|
15
17
|
"button",
|
|
16
18
|
{
|
|
17
|
-
"aria-label": "
|
|
19
|
+
"aria-label": t("close"),
|
|
18
20
|
className: "frseo:drawer__header__close",
|
|
19
21
|
onClick: () => closeModal(drawerSlug),
|
|
20
22
|
type: "button",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/SeoDrawer/components/Header.tsx"],"sourcesContent":["\"use client\";\n\nimport { useModal, XIcon } from \"@payloadcms/ui\";\nimport type { TotalStatus } from \"../../../engine/types/analysis\";\nimport { cn } from \"../../../utils/style\";\nimport { statusVar } from \"../variants\";\nimport { Pill } from \"../../../ui/Pill\";\n\ninterface HeaderProps {\n drawerSlug: string;\n total: number;\n totalStatus: TotalStatus;\n}\n\nexport function Header({ drawerSlug, total, totalStatus }: HeaderProps) {\n const { closeModal } = useModal();\n\n return (\n <div className=\"relative flex items-center justify-between px-[4px] py-[16px]\">\n <div className=\"flex items-center gap-[11px]\">\n <h2 className=\"text-[16px] font-semibold m-0\">
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/SeoDrawer/components/Header.tsx"],"sourcesContent":["\"use client\";\n\nimport { useModal, XIcon } from \"@payloadcms/ui\";\nimport type { TotalStatus } from \"../../../engine/types/analysis\";\nimport { cn } from \"../../../utils/style\";\nimport { statusVar } from \"../variants\";\nimport { Pill } from \"../../../ui/Pill\";\nimport { useSeoTranslation } from \"../../../translations/useSeoTranslation\";\n\ninterface HeaderProps {\n drawerSlug: string;\n total: number;\n totalStatus: TotalStatus;\n}\n\nexport function Header({ drawerSlug, total, totalStatus }: HeaderProps) {\n const { closeModal } = useModal();\n const { t } = useSeoTranslation();\n\n return (\n <div className=\"relative flex items-center justify-between px-[4px] py-[16px]\">\n <div className=\"flex items-center gap-[11px]\">\n <h2 className=\"text-[16px] font-semibold m-0\">{t(\"title\")}</h2>\n\n {totalStatus === \"idle\" ? null : <Pill variant={totalStatus}>{total}</Pill>}\n </div>\n\n <button\n aria-label={t(\"close\")}\n className=\"drawer__header__close\"\n onClick={() => closeModal(drawerSlug)}\n type=\"button\"\n >\n <XIcon />\n </button>\n\n <div className=\"absolute inset-x-0 bottom-0 h-[2px] bg-neutral-150\">\n <i\n className={cn(\n \"block h-full\",\n totalStatus === \"idle\" ? undefined : statusVar({ status: totalStatus })\n )}\n style={{ width: `${total}%`, background: \"var(--seo-c)\" }}\n />\n </div>\n </div>\n );\n}\n"],"mappings":";AAqBM,SACE,KADF;AAnBN,SAAS,UAAU,aAAa;AAEhC,SAAS,UAAU;AACnB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,yBAAyB;AAQ3B,SAAS,OAAO,EAAE,YAAY,OAAO,YAAY,GAAgB;AACtE,QAAM,EAAE,WAAW,IAAI,SAAS;AAChC,QAAM,EAAE,EAAE,IAAI,kBAAkB;AAEhC,SACE,qBAAC,SAAI,WAAU,iEACb;AAAA,yBAAC,SAAI,WAAU,gCACb;AAAA,0BAAC,QAAG,WAAU,iCAAiC,YAAE,OAAO,GAAE;AAAA,MAEzD,gBAAgB,SAAS,OAAO,oBAAC,QAAK,SAAS,aAAc,iBAAM;AAAA,OACtE;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,cAAY,EAAE,OAAO;AAAA,QACrB,WAAU;AAAA,QACV,SAAS,MAAM,WAAW,UAAU;AAAA,QACpC,MAAK;AAAA,QAEL,8BAAC,SAAM;AAAA;AAAA,IACT;AAAA,IAEA,oBAAC,SAAI,WAAU,sDACb;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,gBAAgB,SAAS,SAAY,UAAU,EAAE,QAAQ,YAAY,CAAC;AAAA,QACxE;AAAA,QACA,OAAO,EAAE,OAAO,GAAG,KAAK,KAAK,YAAY,eAAe;AAAA;AAAA,IAC1D,GACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingIssueBanner.d.ts","sourceRoot":"","sources":["../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingIssueBanner.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"HeadingIssueBanner.d.ts","sourceRoot":"","sources":["../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingIssueBanner.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAIzE,UAAU,uBAAuB;IAC/B,KAAK,EAAE,eAAe,CAAC;CACxB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE,uBAAuB,2CAsBpE"}
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { TriangleAlert } from "lucide-react";
|
|
4
4
|
import { describeDocIssue } from "./headingIssueCopy";
|
|
5
|
+
import { useSeoTranslation } from "../../../../translations/useSeoTranslation";
|
|
5
6
|
function HeadingIssueBanner({ issue }) {
|
|
7
|
+
const { t } = useSeoTranslation();
|
|
6
8
|
const { title, body } = describeDocIssue(issue);
|
|
7
9
|
return /* @__PURE__ */ jsxs("div", { className: "frseo:mx-[15px] frseo:mt-[12px] frseo:flex frseo:items-start frseo:gap-[9px] frseo:rounded-rs frseo:border frseo:border-seo-bad/25 frseo:bg-seo-bad-100 frseo:px-[11px] frseo:py-[9px]", children: [
|
|
8
10
|
/* @__PURE__ */ jsx(
|
|
@@ -15,8 +17,8 @@ function HeadingIssueBanner({ issue }) {
|
|
|
15
17
|
}
|
|
16
18
|
),
|
|
17
19
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
18
|
-
/* @__PURE__ */ jsx("div", { className: "frseo:text-[12px] frseo:font-bold frseo:leading-[1.35] frseo:text-seo-bad", children: title }),
|
|
19
|
-
/* @__PURE__ */ jsx("div", { className: "frseo:mt-[2px] frseo:text-[11.5px] frseo:leading-[1.4] frseo:text-neutral-700", children: body })
|
|
20
|
+
/* @__PURE__ */ jsx("div", { className: "frseo:text-[12px] frseo:font-bold frseo:leading-[1.35] frseo:text-seo-bad", children: t(title.key, title.vars) }),
|
|
21
|
+
/* @__PURE__ */ jsx("div", { className: "frseo:mt-[2px] frseo:text-[11.5px] frseo:leading-[1.4] frseo:text-neutral-700", children: t(body.key, body.vars) })
|
|
20
22
|
] })
|
|
21
23
|
] });
|
|
22
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingIssueBanner.tsx"],"sourcesContent":["\"use client\";\n\nimport { TriangleAlert } from \"lucide-react\";\nimport type { HeadingDocIssue } from \"../../../../engine/types/analysis\";\nimport { describeDocIssue } from \"./headingIssueCopy\";\n\ninterface HeadingIssueBannerProps {\n issue: HeadingDocIssue;\n}\n\nexport function HeadingIssueBanner({ issue }: HeadingIssueBannerProps) {\n const { title, body } = describeDocIssue(issue);\n\n return (\n <div className=\"mx-[15px] mt-[12px] flex items-start gap-[9px] rounded-rs border border-seo-bad/25 bg-seo-bad-100 px-[11px] py-[9px]\">\n <TriangleAlert\n size={15}\n strokeWidth={2.2}\n aria-hidden=\"true\"\n className=\"mt-[1px] flex-none text-seo-bad\"\n />\n <div>\n <div className=\"text-[12px] font-bold leading-[1.35] text-seo-bad\"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingIssueBanner.tsx"],"sourcesContent":["\"use client\";\n\nimport { TriangleAlert } from \"lucide-react\";\nimport type { HeadingDocIssue } from \"../../../../engine/types/analysis\";\nimport { describeDocIssue } from \"./headingIssueCopy\";\nimport { useSeoTranslation } from \"../../../../translations/useSeoTranslation\";\n\ninterface HeadingIssueBannerProps {\n issue: HeadingDocIssue;\n}\n\nexport function HeadingIssueBanner({ issue }: HeadingIssueBannerProps) {\n const { t } = useSeoTranslation();\n const { title, body } = describeDocIssue(issue);\n\n return (\n <div className=\"mx-[15px] mt-[12px] flex items-start gap-[9px] rounded-rs border border-seo-bad/25 bg-seo-bad-100 px-[11px] py-[9px]\">\n <TriangleAlert\n size={15}\n strokeWidth={2.2}\n aria-hidden=\"true\"\n className=\"mt-[1px] flex-none text-seo-bad\"\n />\n <div>\n <div className=\"text-[12px] font-bold leading-[1.35] text-seo-bad\">\n {t(title.key, title.vars)}\n </div>\n <div className=\"mt-[2px] text-[11.5px] leading-[1.4] text-neutral-700\">\n {t(body.key, body.vars)}\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";AAiBM,cAMA,YANA;AAfN,SAAS,qBAAqB;AAE9B,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAM3B,SAAS,mBAAmB,EAAE,MAAM,GAA4B;AACrE,QAAM,EAAE,EAAE,IAAI,kBAAkB;AAChC,QAAM,EAAE,OAAO,KAAK,IAAI,iBAAiB,KAAK;AAE9C,SACE,qBAAC,SAAI,WAAU,wHACb;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM;AAAA,QACN,aAAa;AAAA,QACb,eAAY;AAAA,QACZ,WAAU;AAAA;AAAA,IACZ;AAAA,IACA,qBAAC,SACC;AAAA,0BAAC,SAAI,WAAU,qDACZ,YAAE,MAAM,KAAK,MAAM,IAAI,GAC1B;AAAA,MACA,oBAAC,SAAI,WAAU,yDACZ,YAAE,KAAK,KAAK,KAAK,IAAI,GACxB;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingIssuePills.d.ts","sourceRoot":"","sources":["../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingIssuePills.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HeadingIssuePills.d.ts","sourceRoot":"","sources":["../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingIssuePills.tsx"],"names":[],"mappings":"AAKA,UAAU,sBAAsB;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,sBAAsB,2CAWpF"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Pill } from "../../../../ui/Pill";
|
|
4
|
-
|
|
5
|
-
return count === 1 ? `1 ${noun}` : `${count} ${noun}s`;
|
|
6
|
-
}
|
|
4
|
+
import { useSeoTranslation } from "../../../../translations/useSeoTranslation";
|
|
7
5
|
function HeadingIssuePills({ errors, warnings, total }) {
|
|
6
|
+
const { t } = useSeoTranslation();
|
|
8
7
|
return /* @__PURE__ */ jsxs("div", { className: "frseo:flex frseo:items-center frseo:gap-[6px]", children: [
|
|
9
|
-
errors > 0 ? /* @__PURE__ */ jsx(Pill, { variant: "bad", children:
|
|
10
|
-
warnings > 0 ? /* @__PURE__ */ jsx(Pill, { variant: "warn", children:
|
|
8
|
+
errors > 0 ? /* @__PURE__ */ jsx(Pill, { variant: "bad", children: t("headings.errors", { count: errors }) }) : null,
|
|
9
|
+
warnings > 0 ? /* @__PURE__ */ jsx(Pill, { variant: "warn", children: t("headings.warnings", { count: warnings }) }) : null,
|
|
11
10
|
/* @__PURE__ */ jsx(Pill, { variant: "neutral", children: total })
|
|
12
11
|
] });
|
|
13
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingIssuePills.tsx"],"sourcesContent":["\"use client\";\n\nimport { Pill } from \"../../../../ui/Pill\";\n\ninterface HeadingIssuePillsProps {\n errors: number;\n warnings: number;\n total: number;\n}\n\
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingIssuePills.tsx"],"sourcesContent":["\"use client\";\n\nimport { Pill } from \"../../../../ui/Pill\";\nimport { useSeoTranslation } from \"../../../../translations/useSeoTranslation\";\n\ninterface HeadingIssuePillsProps {\n errors: number;\n warnings: number;\n total: number;\n}\n\nexport function HeadingIssuePills({ errors, warnings, total }: HeadingIssuePillsProps) {\n const { t } = useSeoTranslation();\n return (\n <div className=\"flex items-center gap-[6px]\">\n {errors > 0 ? <Pill variant=\"bad\">{t(\"headings.errors\", { count: errors })}</Pill> : null}\n {warnings > 0 ? (\n <Pill variant=\"warn\">{t(\"headings.warnings\", { count: warnings })}</Pill>\n ) : null}\n <Pill variant=\"neutral\">{total}</Pill>\n </div>\n );\n}\n"],"mappings":";AAcI,SACgB,KADhB;AAZJ,SAAS,YAAY;AACrB,SAAS,yBAAyB;AAQ3B,SAAS,kBAAkB,EAAE,QAAQ,UAAU,MAAM,GAA2B;AACrF,QAAM,EAAE,EAAE,IAAI,kBAAkB;AAChC,SACE,qBAAC,SAAI,WAAU,+BACZ;AAAA,aAAS,IAAI,oBAAC,QAAK,SAAQ,OAAO,YAAE,mBAAmB,EAAE,OAAO,OAAO,CAAC,GAAE,IAAU;AAAA,IACpF,WAAW,IACV,oBAAC,QAAK,SAAQ,QAAQ,YAAE,qBAAqB,EAAE,OAAO,SAAS,CAAC,GAAE,IAChE;AAAA,IACJ,oBAAC,QAAK,SAAQ,WAAW,iBAAM;AAAA,KACjC;AAEJ;","names":[]}
|
package/dist/components/SeoDrawer/components/HeadingsSection/HeadingTree/HeadingTreeRow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingTreeRow.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingTree/HeadingTreeRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"HeadingTreeRow.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingTree/HeadingTreeRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAMxE,UAAU,mBAAmB;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC;CACjC;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,KAAK,EACL,OAAO,EACP,MAAM,EACN,WAAW,EACX,QAAQ,EACR,MAAM,EACN,QAAQ,GACT,EAAE,mBAAmB,2CAgErB"}
|
|
@@ -2,6 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { cn } from "../../../../../utils/style";
|
|
3
3
|
import { formatSkippedLevels } from "../headingIssueCopy";
|
|
4
4
|
import { Chevron } from "./Chevron";
|
|
5
|
+
import { useSeoTranslation } from "../../../../../translations/useSeoTranslation";
|
|
5
6
|
function HeadingTreeRow({
|
|
6
7
|
node,
|
|
7
8
|
depth,
|
|
@@ -12,6 +13,7 @@ function HeadingTreeRow({
|
|
|
12
13
|
rowRef,
|
|
13
14
|
badgeRef
|
|
14
15
|
}) {
|
|
16
|
+
const { t } = useSeoTranslation();
|
|
15
17
|
return /* @__PURE__ */ jsxs(
|
|
16
18
|
"div",
|
|
17
19
|
{
|
|
@@ -31,7 +33,7 @@ function HeadingTreeRow({
|
|
|
31
33
|
onToggle(node.id);
|
|
32
34
|
}
|
|
33
35
|
} : void 0,
|
|
34
|
-
title: hasKids ? isOpen ? "
|
|
36
|
+
title: hasKids ? t(isOpen ? "headings.collapse" : "headings.expand") : void 0,
|
|
35
37
|
children: [
|
|
36
38
|
/* @__PURE__ */ jsxs(
|
|
37
39
|
"span",
|
|
@@ -59,8 +61,8 @@ function HeadingTreeRow({
|
|
|
59
61
|
title: node.text,
|
|
60
62
|
children: node.text
|
|
61
63
|
}
|
|
62
|
-
) : /* @__PURE__ */ jsx("span", { className: "frseo:flex-1 frseo:min-w-0 frseo:truncate frseo:text-[12px] frseo:font-medium frseo:italic frseo:text-neutral-400", children: "
|
|
63
|
-
node.issue ? /* @__PURE__ */ jsx("span", { className: "frseo:flex-none frseo:inline-flex frseo:items-center frseo:rounded-[20px] frseo:bg-seo-warn-100 frseo:px-[8px] frseo:py-[2px] frseo:text-[9.5px] frseo:font-bold frseo:tracking-[0.02em] frseo:text-seo-warn", children: formatSkippedLevels(node.issue.skipped) }) : null,
|
|
64
|
+
) : /* @__PURE__ */ jsx("span", { className: "frseo:flex-1 frseo:min-w-0 frseo:truncate frseo:text-[12px] frseo:font-medium frseo:italic frseo:text-neutral-400", children: t("headings.emptyHeading") }),
|
|
65
|
+
node.issue ? /* @__PURE__ */ jsx("span", { className: "frseo:flex-none frseo:inline-flex frseo:items-center frseo:rounded-[20px] frseo:bg-seo-warn-100 frseo:px-[8px] frseo:py-[2px] frseo:text-[9.5px] frseo:font-bold frseo:tracking-[0.02em] frseo:text-seo-warn", children: t("headings.skipped", { levels: formatSkippedLevels(node.issue.skipped) }) }) : null,
|
|
64
66
|
hasKids ? /* @__PURE__ */ jsx(Chevron, { open: isOpen }) : null
|
|
65
67
|
]
|
|
66
68
|
}
|
package/dist/components/SeoDrawer/components/HeadingsSection/HeadingTree/HeadingTreeRow.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingTree/HeadingTreeRow.tsx"],"sourcesContent":["import type { Ref } from \"react\";\nimport type { HeadingNode } from \"../../../../../engine/types/analysis\";\nimport { cn } from \"../../../../../utils/style\";\nimport { formatSkippedLevels } from \"../headingIssueCopy\";\nimport { Chevron } from \"./Chevron\";\n\ninterface HeadingTreeRowProps {\n node: HeadingNode;\n depth: number;\n hasKids: boolean;\n isOpen: boolean;\n globalFirst: boolean;\n onToggle: (id: string) => void;\n rowRef?: Ref<HTMLDivElement>;\n badgeRef?: Ref<HTMLSpanElement>;\n}\n\nexport function HeadingTreeRow({\n node,\n depth,\n hasKids,\n isOpen,\n globalFirst,\n onToggle,\n rowRef,\n badgeRef,\n}: HeadingTreeRowProps) {\n return (\n <div\n ref={rowRef}\n className={cn(\n \"relative flex items-center gap-[9px] h-[34px] box-border\",\n hasKids &&\n \"cursor-pointer focus-visible:outline-2 focus-visible:outline-neutral-400 focus-visible:-outline-offset-2\"\n )}\n style={{ paddingLeft: depth * 20 }}\n role={hasKids ? \"button\" : undefined}\n tabIndex={hasKids ? 0 : undefined}\n aria-expanded={hasKids ? isOpen : undefined}\n onClick={hasKids ? () => onToggle(node.id) : undefined}\n onKeyDown={\n hasKids\n ? (e) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onToggle(node.id);\n }\n }\n : undefined\n }\n title={hasKids ? (isOpen ? \"
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingTree/HeadingTreeRow.tsx"],"sourcesContent":["import type { Ref } from \"react\";\nimport type { HeadingNode } from \"../../../../../engine/types/analysis\";\nimport { cn } from \"../../../../../utils/style\";\nimport { formatSkippedLevels } from \"../headingIssueCopy\";\nimport { Chevron } from \"./Chevron\";\nimport { useSeoTranslation } from \"../../../../../translations/useSeoTranslation\";\n\ninterface HeadingTreeRowProps {\n node: HeadingNode;\n depth: number;\n hasKids: boolean;\n isOpen: boolean;\n globalFirst: boolean;\n onToggle: (id: string) => void;\n rowRef?: Ref<HTMLDivElement>;\n badgeRef?: Ref<HTMLSpanElement>;\n}\n\nexport function HeadingTreeRow({\n node,\n depth,\n hasKids,\n isOpen,\n globalFirst,\n onToggle,\n rowRef,\n badgeRef,\n}: HeadingTreeRowProps) {\n const { t } = useSeoTranslation();\n\n return (\n <div\n ref={rowRef}\n className={cn(\n \"relative flex items-center gap-[9px] h-[34px] box-border\",\n hasKids &&\n \"cursor-pointer focus-visible:outline-2 focus-visible:outline-neutral-400 focus-visible:-outline-offset-2\"\n )}\n style={{ paddingLeft: depth * 20 }}\n role={hasKids ? \"button\" : undefined}\n tabIndex={hasKids ? 0 : undefined}\n aria-expanded={hasKids ? isOpen : undefined}\n onClick={hasKids ? () => onToggle(node.id) : undefined}\n onKeyDown={\n hasKids\n ? (e) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onToggle(node.id);\n }\n }\n : undefined\n }\n title={hasKids ? t(isOpen ? \"headings.collapse\" : \"headings.expand\") : undefined}\n >\n <span\n ref={badgeRef}\n className=\"flex-none font-mono text-[9px] font-bold leading-[100%] text-neutral-1000 bg-neutral-150 rounded-rs px-[6px] py-[3px] min-w-[22px] text-center\"\n >\n H{node.level}\n </span>\n\n <div\n className={cn(\n \"flex-1 min-w-0 flex items-center gap-[9px] h-full\",\n !globalFirst && \"border-t border-neutral-150\"\n )}\n >\n {node.text ? (\n <span\n className=\"flex-1 min-w-0 truncate text-[12px] font-medium text-neutral-800\"\n title={node.text}\n >\n {node.text}\n </span>\n ) : (\n <span className=\"flex-1 min-w-0 truncate text-[12px] font-medium italic text-neutral-400\">\n {t(\"headings.emptyHeading\")}\n </span>\n )}\n\n {node.issue ? (\n <span className=\"flex-none inline-flex items-center rounded-[20px] bg-seo-warn-100 px-[8px] py-[2px] text-[9.5px] font-bold tracking-[0.02em] text-seo-warn\">\n {t(\"headings.skipped\", { levels: formatSkippedLevels(node.issue.skipped) })}\n </span>\n ) : null}\n\n {hasKids ? <Chevron open={isOpen} /> : null}\n </div>\n </div>\n );\n}\n"],"mappings":"AAuDM,SAcI,KAdJ;AArDN,SAAS,UAAU;AACnB,SAAS,2BAA2B;AACpC,SAAS,eAAe;AACxB,SAAS,yBAAyB;AAa3B,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAwB;AACtB,QAAM,EAAE,EAAE,IAAI,kBAAkB;AAEhC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,WAAW;AAAA,QACT;AAAA,QACA,WACE;AAAA,MACJ;AAAA,MACA,OAAO,EAAE,aAAa,QAAQ,GAAG;AAAA,MACjC,MAAM,UAAU,WAAW;AAAA,MAC3B,UAAU,UAAU,IAAI;AAAA,MACxB,iBAAe,UAAU,SAAS;AAAA,MAClC,SAAS,UAAU,MAAM,SAAS,KAAK,EAAE,IAAI;AAAA,MAC7C,WACE,UACI,CAAC,MAAM;AACL,YAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,KAAK;AACtC,YAAE,eAAe;AACjB,mBAAS,KAAK,EAAE;AAAA,QAClB;AAAA,MACF,IACA;AAAA,MAEN,OAAO,UAAU,EAAE,SAAS,sBAAsB,iBAAiB,IAAI;AAAA,MAEvE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,KAAK;AAAA,YACL,WAAU;AAAA,YACX;AAAA;AAAA,cACG,KAAK;AAAA;AAAA;AAAA,QACT;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,CAAC,eAAe;AAAA,YAClB;AAAA,YAEC;AAAA,mBAAK,OACJ;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,OAAO,KAAK;AAAA,kBAEX,eAAK;AAAA;AAAA,cACR,IAEA,oBAAC,UAAK,WAAU,2EACb,YAAE,uBAAuB,GAC5B;AAAA,cAGD,KAAK,QACJ,oBAAC,UAAK,WAAU,8IACb,YAAE,oBAAoB,EAAE,QAAQ,oBAAoB,KAAK,MAAM,OAAO,EAAE,CAAC,GAC5E,IACE;AAAA,cAEH,UAAU,oBAAC,WAAQ,MAAM,QAAQ,IAAK;AAAA;AAAA;AAAA,QACzC;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingTree/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingTree/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAMxE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,WAAW,EAAE,CAAC;CACrB;AAID,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE,gBAAgB,2CA2CrD"}
|
|
@@ -4,8 +4,10 @@ import { useMemo, useState } from "react";
|
|
|
4
4
|
import { cn } from "../../../../../utils/style";
|
|
5
5
|
import { collectParentIds } from "./headingTreeView";
|
|
6
6
|
import { HeadingTreeGroup } from "./HeadingTreeGroup";
|
|
7
|
+
import { useSeoTranslation } from "../../../../../translations/useSeoTranslation";
|
|
7
8
|
const SUB_LABEL = cn("frseo:text-[9.5px] frseo:font-semibold frseo:uppercase frseo:tracking-[0.05em] frseo:text-neutral-500");
|
|
8
9
|
function HeadingTree({ tree }) {
|
|
10
|
+
const { t } = useSeoTranslation();
|
|
9
11
|
const parentIds = useMemo(() => collectParentIds(tree), [tree]);
|
|
10
12
|
const [collapsed, setCollapsed] = useState(() => /* @__PURE__ */ new Set());
|
|
11
13
|
const empty = tree.length === 0;
|
|
@@ -21,18 +23,18 @@ function HeadingTree({ tree }) {
|
|
|
21
23
|
});
|
|
22
24
|
return /* @__PURE__ */ jsxs("div", { className: "frseo:px-[15px] frseo:pt-[11px] frseo:border-t frseo:border-neutral-150", children: [
|
|
23
25
|
/* @__PURE__ */ jsxs("div", { className: cn(SUB_LABEL, "frseo:flex frseo:items-center frseo:justify-between"), children: [
|
|
24
|
-
/* @__PURE__ */ jsx("span", { children: "
|
|
26
|
+
/* @__PURE__ */ jsx("span", { children: t("headings.structure") }),
|
|
25
27
|
!empty && /* @__PURE__ */ jsx(
|
|
26
28
|
"button",
|
|
27
29
|
{
|
|
28
30
|
type: "button",
|
|
29
31
|
onClick: toggleAll,
|
|
30
32
|
className: "frseo:text-[11px] frseo:font-medium frseo:normal-case frseo:tracking-normal frseo:text-neutral-600 frseo:hover:text-neutral-1000 frseo:hover:underline frseo:underline-offset-2 frseo:bg-transparent frseo:border-0 frseo:p-0 frseo:cursor-pointer",
|
|
31
|
-
children: allCollapsed ? "
|
|
33
|
+
children: t(allCollapsed ? "headings.expandAll" : "headings.collapseAll")
|
|
32
34
|
}
|
|
33
35
|
)
|
|
34
36
|
] }),
|
|
35
|
-
empty ? /* @__PURE__ */ jsx("div", { className: "frseo:px-[15px] frseo:pt-[20px] frseo:pb-[24px] frseo:text-center frseo:text-[12px] frseo:text-neutral-500", children: "
|
|
37
|
+
empty ? /* @__PURE__ */ jsx("div", { className: "frseo:px-[15px] frseo:pt-[20px] frseo:pb-[24px] frseo:text-center frseo:text-[12px] frseo:text-neutral-500", children: t("headings.empty") }) : /* @__PURE__ */ jsx("div", { className: "frseo:relative frseo:pt-[5px] frseo:pb-[7px]", children: /* @__PURE__ */ jsx(HeadingTreeGroup, { nodes: tree, depth: 0, collapsed, onToggle: toggle }) })
|
|
36
38
|
] });
|
|
37
39
|
}
|
|
38
40
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingTree/index.tsx"],"sourcesContent":["\"use client\";\n\nimport { useMemo, useState } from \"react\";\nimport type { HeadingNode } from \"../../../../../engine/types/analysis\";\nimport { cn } from \"../../../../../utils/style\";\nimport { collectParentIds } from \"./headingTreeView\";\nimport { HeadingTreeGroup } from \"./HeadingTreeGroup\";\n\nexport interface HeadingTreeProps {\n tree: HeadingNode[];\n}\n\nconst SUB_LABEL = cn(\"text-[9.5px] font-semibold uppercase tracking-[0.05em] text-neutral-500\");\n\nexport function HeadingTree({ tree }: HeadingTreeProps) {\n const parentIds = useMemo(() => collectParentIds(tree), [tree]);\n const [collapsed, setCollapsed] = useState<Set<string>>(() => new Set());\n\n const empty = tree.length === 0;\n const allCollapsed = parentIds.length > 0 && parentIds.every((id) => collapsed.has(id));\n\n const toggleAll = () => setCollapsed(allCollapsed ? new Set() : new Set(parentIds));\n const toggle = (id: string) =>\n setCollapsed((prev) => {\n const next = new Set(prev);\n if (next.has(id)) next.delete(id);\n else next.add(id);\n return next;\n });\n\n return (\n <div className=\"px-[15px] pt-[11px] border-t border-neutral-150\">\n <div className={cn(SUB_LABEL, \"flex items-center justify-between\")}>\n <span>
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/components/SeoDrawer/components/HeadingsSection/HeadingTree/index.tsx"],"sourcesContent":["\"use client\";\n\nimport { useMemo, useState } from \"react\";\nimport type { HeadingNode } from \"../../../../../engine/types/analysis\";\nimport { cn } from \"../../../../../utils/style\";\nimport { collectParentIds } from \"./headingTreeView\";\nimport { HeadingTreeGroup } from \"./HeadingTreeGroup\";\nimport { useSeoTranslation } from \"../../../../../translations/useSeoTranslation\";\n\nexport interface HeadingTreeProps {\n tree: HeadingNode[];\n}\n\nconst SUB_LABEL = cn(\"text-[9.5px] font-semibold uppercase tracking-[0.05em] text-neutral-500\");\n\nexport function HeadingTree({ tree }: HeadingTreeProps) {\n const { t } = useSeoTranslation();\n const parentIds = useMemo(() => collectParentIds(tree), [tree]);\n const [collapsed, setCollapsed] = useState<Set<string>>(() => new Set());\n\n const empty = tree.length === 0;\n const allCollapsed = parentIds.length > 0 && parentIds.every((id) => collapsed.has(id));\n\n const toggleAll = () => setCollapsed(allCollapsed ? new Set() : new Set(parentIds));\n const toggle = (id: string) =>\n setCollapsed((prev) => {\n const next = new Set(prev);\n if (next.has(id)) next.delete(id);\n else next.add(id);\n return next;\n });\n\n return (\n <div className=\"px-[15px] pt-[11px] border-t border-neutral-150\">\n <div className={cn(SUB_LABEL, \"flex items-center justify-between\")}>\n <span>{t(\"headings.structure\")}</span>\n\n {!empty && (\n <button\n type=\"button\"\n onClick={toggleAll}\n className=\"text-[11px] font-medium normal-case tracking-normal text-neutral-600 hover:text-neutral-1000 hover:underline underline-offset-2 bg-transparent border-0 p-0 cursor-pointer\"\n >\n {t(allCollapsed ? \"headings.expandAll\" : \"headings.collapseAll\")}\n </button>\n )}\n </div>\n {empty ? (\n <div className=\"px-[15px] pt-[20px] pb-[24px] text-center text-[12px] text-neutral-500\">\n {t(\"headings.empty\")}\n </div>\n ) : (\n <div className=\"relative pt-[5px] pb-[7px]\">\n <HeadingTreeGroup nodes={tree} depth={0} collapsed={collapsed} onToggle={toggle} />\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";AAkCM,SACE,KADF;AAhCN,SAAS,SAAS,gBAAgB;AAElC,SAAS,UAAU;AACnB,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAMlC,MAAM,YAAY,GAAG,yEAAyE;AAEvF,SAAS,YAAY,EAAE,KAAK,GAAqB;AACtD,QAAM,EAAE,EAAE,IAAI,kBAAkB;AAChC,QAAM,YAAY,QAAQ,MAAM,iBAAiB,IAAI,GAAG,CAAC,IAAI,CAAC;AAC9D,QAAM,CAAC,WAAW,YAAY,IAAI,SAAsB,MAAM,oBAAI,IAAI,CAAC;AAEvE,QAAM,QAAQ,KAAK,WAAW;AAC9B,QAAM,eAAe,UAAU,SAAS,KAAK,UAAU,MAAM,CAAC,OAAO,UAAU,IAAI,EAAE,CAAC;AAEtF,QAAM,YAAY,MAAM,aAAa,eAAe,oBAAI,IAAI,IAAI,IAAI,IAAI,SAAS,CAAC;AAClF,QAAM,SAAS,CAAC,OACd,aAAa,CAAC,SAAS;AACrB,UAAM,OAAO,IAAI,IAAI,IAAI;AACzB,QAAI,KAAK,IAAI,EAAE;AAAG,WAAK,OAAO,EAAE;AAAA;AAC3B,WAAK,IAAI,EAAE;AAChB,WAAO;AAAA,EACT,CAAC;AAEH,SACE,qBAAC,SAAI,WAAU,mDACb;AAAA,yBAAC,SAAI,WAAW,GAAG,WAAW,mCAAmC,GAC/D;AAAA,0BAAC,UAAM,YAAE,oBAAoB,GAAE;AAAA,MAE9B,CAAC,SACA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAS;AAAA,UACT,WAAU;AAAA,UAET,YAAE,eAAe,uBAAuB,sBAAsB;AAAA;AAAA,MACjE;AAAA,OAEJ;AAAA,IACC,QACC,oBAAC,SAAI,WAAU,0EACZ,YAAE,gBAAgB,GACrB,IAEA,oBAAC,SAAI,WAAU,8BACb,8BAAC,oBAAiB,OAAO,MAAM,OAAO,GAAG,WAAsB,UAAU,QAAQ,GACnF;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { HeadingDocIssue, HeadingLevel } from "../../../../engine/types/analysis";
|
|
2
|
+
import type { Message } from "../../../../translations/types";
|
|
2
3
|
export declare function describeDocIssue(issue: HeadingDocIssue): {
|
|
3
|
-
title:
|
|
4
|
-
body:
|
|
4
|
+
title: Message;
|
|
5
|
+
body: Message;
|
|
5
6
|
};
|
|
6
7
|
export declare function formatSkippedLevels(skipped: HeadingLevel[]): string;
|
|
7
8
|
//# sourceMappingURL=headingIssueCopy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headingIssueCopy.d.ts","sourceRoot":"","sources":["../../../../../src/components/SeoDrawer/components/HeadingsSection/headingIssueCopy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"headingIssueCopy.d.ts","sourceRoot":"","sources":["../../../../../src/components/SeoDrawer/components/HeadingsSection/headingIssueCopy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAE9D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAiB1F;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,CAEnE"}
|
|
@@ -2,13 +2,13 @@ function describeDocIssue(issue) {
|
|
|
2
2
|
switch (issue.type) {
|
|
3
3
|
case "missing-h1":
|
|
4
4
|
return {
|
|
5
|
-
title:
|
|
6
|
-
body:
|
|
5
|
+
title: { key: "headings.missingH1.title" },
|
|
6
|
+
body: { key: "headings.missingH1.body" }
|
|
7
7
|
};
|
|
8
8
|
case "multiple-h1":
|
|
9
9
|
return {
|
|
10
|
-
title:
|
|
11
|
-
body:
|
|
10
|
+
title: { key: "headings.multipleH1.title", vars: { count: issue.count } },
|
|
11
|
+
body: { key: "headings.multipleH1.body" }
|
|
12
12
|
};
|
|
13
13
|
default: {
|
|
14
14
|
const _exhaustive = issue;
|
|
@@ -17,7 +17,7 @@ function describeDocIssue(issue) {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
function formatSkippedLevels(skipped) {
|
|
20
|
-
return
|
|
20
|
+
return skipped.map((level) => `H${level}`).join("\xB7");
|
|
21
21
|
}
|
|
22
22
|
export {
|
|
23
23
|
describeDocIssue,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/SeoDrawer/components/HeadingsSection/headingIssueCopy.ts"],"sourcesContent":["import type { HeadingDocIssue, HeadingLevel } from \"../../../../engine/types/analysis\";\n\nexport function describeDocIssue(issue: HeadingDocIssue): { title:
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/SeoDrawer/components/HeadingsSection/headingIssueCopy.ts"],"sourcesContent":["import type { HeadingDocIssue, HeadingLevel } from \"../../../../engine/types/analysis\";\nimport type { Message } from \"../../../../translations/types\";\n\nexport function describeDocIssue(issue: HeadingDocIssue): { title: Message; body: Message } {\n switch (issue.type) {\n case \"missing-h1\":\n return {\n title: { key: \"headings.missingH1.title\" },\n body: { key: \"headings.missingH1.body\" },\n };\n case \"multiple-h1\":\n return {\n title: { key: \"headings.multipleH1.title\", vars: { count: issue.count } },\n body: { key: \"headings.multipleH1.body\" },\n };\n default: {\n const _exhaustive: never = issue;\n throw new Error(`Unhandled heading doc issue: ${JSON.stringify(_exhaustive)}`);\n }\n }\n}\n\nexport function formatSkippedLevels(skipped: HeadingLevel[]): string {\n return skipped.map((level) => `H${level}`).join(\"·\");\n}\n"],"mappings":"AAGO,SAAS,iBAAiB,OAA2D;AAC1F,UAAQ,MAAM,MAAM;AAAA,IAClB,KAAK;AACH,aAAO;AAAA,QACL,OAAO,EAAE,KAAK,2BAA2B;AAAA,QACzC,MAAM,EAAE,KAAK,0BAA0B;AAAA,MACzC;AAAA,IACF,KAAK;AACH,aAAO;AAAA,QACL,OAAO,EAAE,KAAK,6BAA6B,MAAM,EAAE,OAAO,MAAM,MAAM,EAAE;AAAA,QACxE,MAAM,EAAE,KAAK,2BAA2B;AAAA,MAC1C;AAAA,IACF,SAAS;AACP,YAAM,cAAqB;AAC3B,YAAM,IAAI,MAAM,gCAAgC,KAAK,UAAU,WAAW,CAAC,EAAE;AAAA,IAC/E;AAAA,EACF;AACF;AAEO,SAAS,oBAAoB,SAAiC;AACnE,SAAO,QAAQ,IAAI,CAAC,UAAU,IAAI,KAAK,EAAE,EAAE,KAAK,MAAG;AACrD;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/SeoDrawer/components/HeadingsSection/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/SeoDrawer/components/HeadingsSection/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAS1E,UAAU,oBAAoB;IAC5B,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE,oBAAoB,2CAsB7D"}
|