@nuxtseo/pro-indexing 0.1.11 → 0.1.12
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.
|
@@ -3,6 +3,7 @@ import type { IndexingSite } from '../../shared/source'
|
|
|
3
3
|
import type { IndexingSubmissionEvent } from '../../shared/submissions'
|
|
4
4
|
import { fillCopy } from '@nuxtseo/pro-shell/shared/copy'
|
|
5
5
|
import { computed } from 'vue'
|
|
6
|
+
import { coverageStateLabel } from '../../shared/copy'
|
|
6
7
|
import { formatSubmissionDate, submissionTimeline } from '../../shared/submissions'
|
|
7
8
|
import { useIndexingSource } from '../composables/useIndexingSource'
|
|
8
9
|
import { useProIndexingCopy } from '../composables/useProIndexingCopy'
|
|
@@ -42,7 +43,7 @@ const DOT = {
|
|
|
42
43
|
} as const
|
|
43
44
|
|
|
44
45
|
function reasonLabel(reason: string): string {
|
|
45
|
-
return copy.urls.coverageStates
|
|
46
|
+
return coverageStateLabel(copy.urls.coverageStates, reason) ?? reason
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
function eventLabel(event: IndexingSubmissionEvent): { title: string, detail: string | null, tone: string } {
|
|
@@ -5,6 +5,7 @@ import { formatGroupedNumber } from '@nuxtseo/design-system/app/composables/form
|
|
|
5
5
|
import { fillCopy } from '@nuxtseo/pro-shell/shared/copy'
|
|
6
6
|
import { computed, useId } from 'vue'
|
|
7
7
|
import { UiHelpLabel, UiWidgetState } from '#components'
|
|
8
|
+
import { coverageStateLabel } from '../../shared/copy'
|
|
8
9
|
import { formatSubmissionDate, submissionTotals } from '../../shared/submissions'
|
|
9
10
|
import { useIndexingSource } from '../composables/useIndexingSource'
|
|
10
11
|
import { useProIndexingCopy } from '../composables/useProIndexingCopy'
|
|
@@ -78,7 +79,7 @@ const afterwardsFacts = computed(() => {
|
|
|
78
79
|
})
|
|
79
80
|
|
|
80
81
|
function reasonLabel(reason: string): string {
|
|
81
|
-
return copy.urls.coverageStates
|
|
82
|
+
return coverageStateLabel(copy.urls.coverageStates, reason) ?? reason.replaceAll('_', ' ')
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
const automaticState = computed(() => {
|
|
@@ -14,6 +14,7 @@ import { navigateTo, useRoute } from 'nuxt/app'
|
|
|
14
14
|
import { computed, h, onMounted, ref, useTemplateRef, watch } from 'vue'
|
|
15
15
|
import { UiButton, UiChip, UiDataList, UiIcon, UiMetricLabel as UiMetricLabelCell, UiPopover, UiSeverityDot, UiSkeleton, UiSyncDot } from '#components'
|
|
16
16
|
import { useToast } from '#imports'
|
|
17
|
+
import { coverageStateLabel } from '../../shared/copy'
|
|
17
18
|
import { issueIcons } from '../../shared/issue-display'
|
|
18
19
|
import { parseIndexingUrlsQuery } from '../../shared/urls-query'
|
|
19
20
|
import { useIndexingSource } from '../composables/useIndexingSource'
|
|
@@ -490,13 +491,11 @@ const robotsTxtStateLabels: Readonly<Record<string, string>> = copy.robotsTxtSta
|
|
|
490
491
|
const pageFetchStateLabels: Readonly<Record<string, string>> = copy.pageFetchStates
|
|
491
492
|
const crawlerLabels: Readonly<Record<string, string>> = copy.crawlers
|
|
492
493
|
const verdictLabels: Readonly<Record<string, string>> = copy.verdicts
|
|
493
|
-
// Short labels for verbose GSC coverage state strings
|
|
494
|
-
const coverageShortLabels: Readonly<Record<string, string>> = copy.coverageStates
|
|
495
494
|
|
|
496
495
|
function shortCoverage(raw: string | null | undefined): string {
|
|
497
496
|
if (!raw)
|
|
498
497
|
return copy.noValue
|
|
499
|
-
return
|
|
498
|
+
return coverageStateLabel(copy.coverageStates, raw) || raw
|
|
500
499
|
}
|
|
501
500
|
|
|
502
501
|
function humanize(raw: string | null | undefined, labels: Readonly<Record<string, string>>) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxtseo/pro-indexing",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.12",
|
|
5
5
|
"description": "Nuxt SEO Pro indexing layer: the dashboard indexing sections (Portfolio overview, issues and changes, the per-Site diagnosis panel, coverage trend, Index cohorts, and the indexing URLs table) over one IndexingSource adapter and a route map. Extends @nuxtseo/pro-shell.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://nuxtseo.com",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@gscdump/contracts": "^7.13.0",
|
|
38
38
|
"@gscdump/sdk": "^7.13.0",
|
|
39
39
|
"@nuxt/ui": "^4.11.1",
|
|
40
|
-
"@nuxtseo/design-system": "^0.1.
|
|
41
|
-
"@nuxtseo/pro-shell": "^0.1.
|
|
40
|
+
"@nuxtseo/design-system": "^0.1.12",
|
|
41
|
+
"@nuxtseo/pro-shell": "^0.1.12",
|
|
42
42
|
"@vueuse/core": "^14.0.0 || ^15.0.0",
|
|
43
43
|
"nuxt": "^4.6.0",
|
|
44
44
|
"typescript": ">=5.8.0 <7",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@gscdump/contracts": "7.18.0",
|
|
53
53
|
"@gscdump/sdk": "7.18.0",
|
|
54
54
|
"@nuxt/ui": "^4.11.1",
|
|
55
|
-
"@nuxtseo/design-system": "0.1.
|
|
56
|
-
"@nuxtseo/pro-shell": "0.1.
|
|
55
|
+
"@nuxtseo/design-system": "0.1.12",
|
|
56
|
+
"@nuxtseo/pro-shell": "0.1.12",
|
|
57
57
|
"@vueuse/core": "^14.4.0",
|
|
58
58
|
"nuxt": "4.6.1",
|
|
59
59
|
"site-typecheck": "0.0.0",
|
package/shared/copy.ts
CHANGED
|
@@ -285,6 +285,8 @@ const DEFAULTS = {
|
|
|
285
285
|
MOBILE: 'Mobile',
|
|
286
286
|
CRAWLING_USER_AGENT_UNSPECIFIED: 'Unknown',
|
|
287
287
|
},
|
|
288
|
+
// Keys use ASCII quotes. Read them through `coverageStateLabel`, which
|
|
289
|
+
// also matches Google's typographic quotes.
|
|
288
290
|
coverageStates: {
|
|
289
291
|
'Submitted and indexed': 'Indexed',
|
|
290
292
|
'Indexed, not submitted in sitemap': 'Indexed (no sitemap)',
|
|
@@ -357,3 +359,17 @@ function mergeCopy<T>(defaults: T, overrides: unknown): T {
|
|
|
357
359
|
export function resolveProIndexingCopy(overrides: ProIndexingCopyOverrides | undefined): ProIndexingCopy {
|
|
358
360
|
return mergeCopy(PRO_INDEXING_COPY, overrides)
|
|
359
361
|
}
|
|
362
|
+
|
|
363
|
+
const SINGLE_QUOTES = /[‘’]/g
|
|
364
|
+
const DOUBLE_QUOTES = /[“”]/g
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* The short label for a Google coverage state from `urls.coverageStates`, or
|
|
368
|
+
* undefined when the state has none. Google's URL Inspection API sends
|
|
369
|
+
* typographic quotes ("Excluded by ‘noindex’ tag"), so the lookup reads them
|
|
370
|
+
* as ASCII quotes.
|
|
371
|
+
*/
|
|
372
|
+
export function coverageStateLabel(labels: Readonly<Record<string, string>>, state: string): string | undefined {
|
|
373
|
+
const key = state.replace(SINGLE_QUOTES, '\'').replace(DOUBLE_QUOTES, '"')
|
|
374
|
+
return Object.hasOwn(labels, key) ? labels[key] : undefined
|
|
375
|
+
}
|