@prenta/admin 0.97.2 → 0.97.3
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/CHANGELOG.md +14 -0
- package/dist/components/seo/primitives.d.ts +20 -0
- package/dist/components/seo/primitives.d.ts.map +1 -1
- package/dist/components/seo/primitives.js +20 -0
- package/dist/components/seo/primitives.js.map +1 -1
- package/package.json +3 -3
- package/src/components/seo/primitives.tsx +20 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @actuate-media/cms-admin
|
|
2
2
|
|
|
3
|
+
## 0.97.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a7ea557: Visual coverage for version history and the stacked editor layout
|
|
8
|
+
|
|
9
|
+
Two surfaces the visual suite never had, closing followup 21. It goes from 85 baselines to 91.
|
|
10
|
+
|
|
11
|
+
`page-editor-history` captures the rail overlay, an older version selected, its inline diff, the review bar, and the changed-section outline on a canvas rendering that older version. `page-editor` joins the responsive set, photographing the stacked layout at 375 and 768 where the rail stops being a column and sits above the canvas — the editor's largest layout change, previously asserted only by measurement.
|
|
12
|
+
|
|
13
|
+
The version chain is seeded at absolute dates and the surface pins the browser clock just after them, because the panel's "Today" / "Yesterday" headings are computed from `new Date()` and would otherwise re-photograph differently at every midnight.
|
|
14
|
+
|
|
15
|
+
Worth recording why the surface also _asserts_ those headings: removing the clock freeze to prove it mattered left the screenshot passing. A text probe showed the labels had silently become "JUN 15" / "JUN 14" — two short strings, far under the 1% diff threshold. The baseline cannot see that drift, so the assertion is the guard and the screenshot is the record.
|
|
16
|
+
|
|
3
17
|
## 0.97.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -25,6 +25,26 @@ export declare function gradeMeta(grade: SeoGrade): GradeMeta;
|
|
|
25
25
|
*
|
|
26
26
|
* Both now derive from this function, so settling that question is a one-line
|
|
27
27
|
* change with nowhere to miss.
|
|
28
|
+
*
|
|
29
|
+
* ## Settled: the floor is 60, and the handoff is amended
|
|
30
|
+
*
|
|
31
|
+
* Kept at 60 rather than moved to the handoff's 55, for three reasons:
|
|
32
|
+
*
|
|
33
|
+
* 1. **The fourth band carries information three cannot.** A score of 0 means
|
|
34
|
+
* *never audited*, which is a different claim from *audited and failing* —
|
|
35
|
+
* and the product already leans on it: the Posts and Pages lists show an
|
|
36
|
+
* unaudited page grey, not red. The handoff's three-band scheme cannot say
|
|
37
|
+
* that.
|
|
38
|
+
* 2. **Precedent.** `tokens.json` already records a deliberate deviation from
|
|
39
|
+
* the handoff (`--muted`, darkened for WCAG AA) under the convention that
|
|
40
|
+
* "a documented deviation stays documented instead of decaying into drift".
|
|
41
|
+
* Same situation, same resolution.
|
|
42
|
+
* 3. **Asymmetric cost.** For an SEO product a false "you're fine" is worse
|
|
43
|
+
* than a false "needs work", so the stricter floor is the safer default.
|
|
44
|
+
*
|
|
45
|
+
* The stake is the 55-59 band. If that is ever revisited, change it here and
|
|
46
|
+
* every surface follows — which is the point of the guard in
|
|
47
|
+
* `__tests__/components/seo-score-bands.test.ts`.
|
|
28
48
|
*/
|
|
29
49
|
export declare function gradeFromScore(score: number): SeoGrade;
|
|
30
50
|
export declare function severityMeta(severity: SeoSeverity): GradeMeta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../src/components/seo/primitives.tsx"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAIrE,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,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E,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,2CAeA;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAkB,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,2CAWpE;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,WAAW,EACX,MAAM,GACP,EAAE;IACD,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB,2CAaA;AAED,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,2CAkB5F;AAID,eAAO,MAAM,UAAU,kQAC0O,CAAA;AAEjQ,eAAO,MAAM,YAAY,wQAC8O,CAAA;AAEvQ,eAAO,MAAM,YAAY,iNACuL,CAAA"}
|
|
@@ -38,6 +38,26 @@ export function gradeMeta(grade) {
|
|
|
38
38
|
*
|
|
39
39
|
* Both now derive from this function, so settling that question is a one-line
|
|
40
40
|
* change with nowhere to miss.
|
|
41
|
+
*
|
|
42
|
+
* ## Settled: the floor is 60, and the handoff is amended
|
|
43
|
+
*
|
|
44
|
+
* Kept at 60 rather than moved to the handoff's 55, for three reasons:
|
|
45
|
+
*
|
|
46
|
+
* 1. **The fourth band carries information three cannot.** A score of 0 means
|
|
47
|
+
* *never audited*, which is a different claim from *audited and failing* —
|
|
48
|
+
* and the product already leans on it: the Posts and Pages lists show an
|
|
49
|
+
* unaudited page grey, not red. The handoff's three-band scheme cannot say
|
|
50
|
+
* that.
|
|
51
|
+
* 2. **Precedent.** `tokens.json` already records a deliberate deviation from
|
|
52
|
+
* the handoff (`--muted`, darkened for WCAG AA) under the convention that
|
|
53
|
+
* "a documented deviation stays documented instead of decaying into drift".
|
|
54
|
+
* Same situation, same resolution.
|
|
55
|
+
* 3. **Asymmetric cost.** For an SEO product a false "you're fine" is worse
|
|
56
|
+
* than a false "needs work", so the stricter floor is the safer default.
|
|
57
|
+
*
|
|
58
|
+
* The stake is the 55-59 band. If that is ever revisited, change it here and
|
|
59
|
+
* every surface follows — which is the point of the guard in
|
|
60
|
+
* `__tests__/components/seo-score-bands.test.ts`.
|
|
41
61
|
*/
|
|
42
62
|
export function gradeFromScore(score) {
|
|
43
63
|
if (score >= 80)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../../src/components/seo/primitives.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAQZ,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzF,OAAO,EAAE,WAAW,EAAwB,MAAM,sBAAsB,CAAA;AAYxE,MAAM,UAAU,SAAS,CAAC,KAAe;IACvC,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,MAAM;YACT,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,eAAe,EAAE,GAAG,EAAE,YAAY,EAAE,CAAA;QACxF,KAAK,MAAM;YACT,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,eAAe,EAAE,GAAG,EAAE,YAAY,EAAE,CAAA;QACxF,KAAK,MAAM;YACT,OAAO;gBACL,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,kBAAkB;gBACxB,EAAE,EAAE,mBAAmB;gBACvB,GAAG,EAAE,gBAAgB;aACtB,CAAA;QACH;YACE,OAAO;gBACL,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,kBAAkB;gBACxB,EAAE,EAAE,mBAAmB;gBACvB,GAAG,EAAE,gBAAgB;aACtB,CAAA;IACL,CAAC;AACH,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../../src/components/seo/primitives.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAQZ,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzF,OAAO,EAAE,WAAW,EAAwB,MAAM,sBAAsB,CAAA;AAYxE,MAAM,UAAU,SAAS,CAAC,KAAe;IACvC,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,MAAM;YACT,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,eAAe,EAAE,GAAG,EAAE,YAAY,EAAE,CAAA;QACxF,KAAK,MAAM;YACT,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,eAAe,EAAE,GAAG,EAAE,YAAY,EAAE,CAAA;QACxF,KAAK,MAAM;YACT,OAAO;gBACL,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,kBAAkB;gBACxB,EAAE,EAAE,mBAAmB;gBACvB,GAAG,EAAE,gBAAgB;aACtB,CAAA;QACH;YACE,OAAO;gBACL,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,kBAAkB;gBACxB,EAAE,EAAE,mBAAmB;gBACvB,GAAG,EAAE,gBAAgB;aACtB,CAAA;IACL,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,IAAI,KAAK,IAAI,EAAE;QAAE,OAAO,MAA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AAE,OAAO,EAChB,SAAS,EAAC,qGAAqG,sBAGxG,CACV,IACG,CACP,CAAA;AACH,CAAC;AAED,wEAAwE;AAExE,MAAM,CAAC,MAAM,UAAU,GACrB,+PAA+P,CAAA;AAEjQ,MAAM,CAAC,MAAM,YAAY,GACvB,qQAAqQ,CAAA;AAEvQ,MAAM,CAAC,MAAM,YAAY,GACvB,8MAA8M,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prenta/admin",
|
|
3
|
-
"version": "0.97.
|
|
3
|
+
"version": "0.97.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -98,15 +98,15 @@
|
|
|
98
98
|
"tailwindcss": "^4.0.0",
|
|
99
99
|
"typescript": "^5.7.0",
|
|
100
100
|
"vitest": "^4.1.0",
|
|
101
|
+
"@prenta/component-blocks": "0.3.0",
|
|
101
102
|
"@prenta/core": "0.123.0",
|
|
102
103
|
"@prenta/plugin-ai": "0.6.0",
|
|
103
|
-
"@prenta/component-blocks": "0.3.0",
|
|
104
104
|
"@prenta/plugin-blocks": "0.2.0",
|
|
105
105
|
"@prenta/plugin-commerce": "0.2.0",
|
|
106
106
|
"@prenta/plugin-forms": "0.1.0",
|
|
107
107
|
"@prenta/plugin-media": "0.2.0",
|
|
108
|
-
"@prenta/plugin-seo": "0.1.0",
|
|
109
108
|
"@prenta/plugin-navigation": "0.3.0",
|
|
109
|
+
"@prenta/plugin-seo": "0.1.0",
|
|
110
110
|
"@prenta/sections-react": "0.17.2"
|
|
111
111
|
},
|
|
112
112
|
"scripts": {
|
|
@@ -56,6 +56,26 @@ export function gradeMeta(grade: SeoGrade): GradeMeta {
|
|
|
56
56
|
*
|
|
57
57
|
* Both now derive from this function, so settling that question is a one-line
|
|
58
58
|
* change with nowhere to miss.
|
|
59
|
+
*
|
|
60
|
+
* ## Settled: the floor is 60, and the handoff is amended
|
|
61
|
+
*
|
|
62
|
+
* Kept at 60 rather than moved to the handoff's 55, for three reasons:
|
|
63
|
+
*
|
|
64
|
+
* 1. **The fourth band carries information three cannot.** A score of 0 means
|
|
65
|
+
* *never audited*, which is a different claim from *audited and failing* —
|
|
66
|
+
* and the product already leans on it: the Posts and Pages lists show an
|
|
67
|
+
* unaudited page grey, not red. The handoff's three-band scheme cannot say
|
|
68
|
+
* that.
|
|
69
|
+
* 2. **Precedent.** `tokens.json` already records a deliberate deviation from
|
|
70
|
+
* the handoff (`--muted`, darkened for WCAG AA) under the convention that
|
|
71
|
+
* "a documented deviation stays documented instead of decaying into drift".
|
|
72
|
+
* Same situation, same resolution.
|
|
73
|
+
* 3. **Asymmetric cost.** For an SEO product a false "you're fine" is worse
|
|
74
|
+
* than a false "needs work", so the stricter floor is the safer default.
|
|
75
|
+
*
|
|
76
|
+
* The stake is the 55-59 band. If that is ever revisited, change it here and
|
|
77
|
+
* every surface follows — which is the point of the guard in
|
|
78
|
+
* `__tests__/components/seo-score-bands.test.ts`.
|
|
59
79
|
*/
|
|
60
80
|
export function gradeFromScore(score: number): SeoGrade {
|
|
61
81
|
if (score >= 80) return 'good'
|