@commonpub/layer 0.46.0 → 0.47.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.
|
@@ -303,6 +303,12 @@ function formatCount(n: number | undefined): string {
|
|
|
303
303
|
.cpub-cc-av {
|
|
304
304
|
width: 18px;
|
|
305
305
|
height: 18px;
|
|
306
|
+
/* Hard-lock square so a portrait/non-square photo can't render as an oval
|
|
307
|
+
(intrinsic-ratio fallback if a dimension is dropped). See ArticleView.vue. */
|
|
308
|
+
min-width: 18px;
|
|
309
|
+
max-width: 18px;
|
|
310
|
+
min-height: 18px;
|
|
311
|
+
max-height: 18px;
|
|
306
312
|
background: var(--accent-bg);
|
|
307
313
|
border: var(--border-width-default) solid var(--accent-border);
|
|
308
314
|
color: var(--accent);
|
|
@@ -435,8 +435,18 @@ useJsonLd({
|
|
|
435
435
|
* Fix: scope display:flex centering to the div variant only.
|
|
436
436
|
*/
|
|
437
437
|
.cpub-av {
|
|
438
|
-
|
|
439
|
-
|
|
438
|
+
--cpub-av-size: 28px;
|
|
439
|
+
width: var(--cpub-av-size);
|
|
440
|
+
height: var(--cpub-av-size);
|
|
441
|
+
/* Hard-lock to a square. Without min/max clamps, a global img reset or a
|
|
442
|
+
dropped dimension lets the <img> fall back to its intrinsic aspect ratio,
|
|
443
|
+
so a portrait photo renders as a tall oval (the deveco blog-avatar bug —
|
|
444
|
+
visible even on wide viewports, so it's not flex compression). min/max on
|
|
445
|
+
BOTH axes clamp the used size regardless of what sets width/height. */
|
|
446
|
+
min-width: var(--cpub-av-size);
|
|
447
|
+
max-width: var(--cpub-av-size);
|
|
448
|
+
min-height: var(--cpub-av-size);
|
|
449
|
+
max-height: var(--cpub-av-size);
|
|
440
450
|
border-radius: 50%;
|
|
441
451
|
background: var(--surface3);
|
|
442
452
|
border: var(--border-width-default) solid var(--border);
|
|
@@ -459,8 +469,8 @@ img.cpub-av {
|
|
|
459
469
|
object-fit: cover;
|
|
460
470
|
}
|
|
461
471
|
|
|
462
|
-
.cpub-av-lg {
|
|
463
|
-
.cpub-av-xl {
|
|
472
|
+
.cpub-av-lg { --cpub-av-size: 44px; font-size: 14px; }
|
|
473
|
+
.cpub-av-xl { --cpub-av-size: 64px; font-size: 18px; }
|
|
464
474
|
|
|
465
475
|
/* ── AUTHOR ROW ── */
|
|
466
476
|
.cpub-author-row {
|
|
@@ -767,8 +767,16 @@ async function handleBuild(): Promise<void> {
|
|
|
767
767
|
* to the div-variant only — stops img-variant from squishing portrait
|
|
768
768
|
* avatars (object-fit:cover gets dropped on flex-set replaced elements). */
|
|
769
769
|
.cpub-av {
|
|
770
|
-
|
|
771
|
-
|
|
770
|
+
--cpub-av-size: 28px;
|
|
771
|
+
width: var(--cpub-av-size);
|
|
772
|
+
height: var(--cpub-av-size);
|
|
773
|
+
/* Hard-lock to a square (min/max on both axes) so a portrait photo can't
|
|
774
|
+
render as an oval if a global reset or dropped dimension lets the <img>
|
|
775
|
+
take its intrinsic aspect ratio. See ArticleView.vue. */
|
|
776
|
+
min-width: var(--cpub-av-size);
|
|
777
|
+
max-width: var(--cpub-av-size);
|
|
778
|
+
min-height: var(--cpub-av-size);
|
|
779
|
+
max-height: var(--cpub-av-size);
|
|
772
780
|
border-radius: 50%;
|
|
773
781
|
background: var(--surface3);
|
|
774
782
|
border: var(--border-width-default) solid var(--border);
|
|
@@ -789,7 +797,7 @@ img.cpub-av {
|
|
|
789
797
|
object-fit: cover;
|
|
790
798
|
}
|
|
791
799
|
|
|
792
|
-
.cpub-av-lg {
|
|
800
|
+
.cpub-av-lg { --cpub-av-size: 36px; font-size: 12px; }
|
|
793
801
|
|
|
794
802
|
.cpub-author-name {
|
|
795
803
|
font-size: 13px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commonpub/layer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"files": [
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"vue-router": "^4.3.0",
|
|
55
55
|
"zod": "^4.3.6",
|
|
56
56
|
"@commonpub/auth": "0.8.0",
|
|
57
|
-
"@commonpub/docs": "0.6.3",
|
|
58
57
|
"@commonpub/config": "0.18.0",
|
|
59
58
|
"@commonpub/editor": "0.7.11",
|
|
59
|
+
"@commonpub/docs": "0.6.3",
|
|
60
60
|
"@commonpub/explainer": "0.7.15",
|
|
61
|
-
"@commonpub/protocol": "0.13.0",
|
|
62
61
|
"@commonpub/learning": "0.5.2",
|
|
62
|
+
"@commonpub/protocol": "0.13.0",
|
|
63
63
|
"@commonpub/schema": "0.26.0",
|
|
64
64
|
"@commonpub/server": "2.73.0",
|
|
65
65
|
"@commonpub/ui": "0.9.2"
|