@commonpub/layer 0.7.16 → 0.7.18

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.
@@ -317,10 +317,14 @@ useJsonLd({
317
317
  }
318
318
 
319
319
  /* ── ARTICLE WRAP ── */
320
+ .cpub-article-view {
321
+ overflow-x: clip;
322
+ }
323
+
320
324
  .cpub-article-wrap {
321
325
  max-width: 720px;
322
326
  margin: 0 auto;
323
- padding: 40px 24px 80px;
327
+ padding: 40px clamp(12px, 4vw, 24px) 80px;
324
328
  }
325
329
 
326
330
  /* ── TYPE BADGE ── */
@@ -771,23 +775,27 @@ useJsonLd({
771
775
  gap: 6px;
772
776
  }
773
777
 
778
+ /* Global overflow protection for content */
779
+ .cpub-article-wrap :deep(img),
780
+ .cpub-article-wrap :deep(video),
781
+ .cpub-article-wrap :deep(iframe) { max-width: 100%; height: auto; }
782
+ .cpub-article-wrap :deep(pre) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
783
+ .cpub-article-wrap { overflow-wrap: break-word; word-break: break-word; }
784
+
774
785
  /* ── COVER PHOTO (in-body) ── */
775
786
  .cpub-cover-photo {
776
787
  margin-bottom: 24px;
777
- border: var(--border-width-default) solid var(--border);
778
- overflow: hidden;
779
788
  }
780
789
  .cpub-cover-photo-img {
781
- max-width: 100%;
782
- max-height: 500px;
790
+ width: 100%;
783
791
  height: auto;
784
792
  display: block;
785
- margin: 0 auto;
793
+ border-radius: var(--radius, 0);
786
794
  }
787
795
 
788
796
  /* ── RESPONSIVE ── */
789
797
  @media (max-width: 768px) {
790
- .cpub-article-wrap { padding: 24px 16px 48px; }
798
+ .cpub-article-wrap { padding-top: 24px; padding-bottom: 48px; }
791
799
  .cpub-article-title { font-size: 22px; }
792
800
  .cpub-article-lead { font-size: 14px; margin-bottom: 16px; }
793
801
  .cpub-related-grid { grid-template-columns: 1fr 1fr; }
@@ -798,7 +806,7 @@ useJsonLd({
798
806
  }
799
807
 
800
808
  @media (max-width: 480px) {
801
- .cpub-article-wrap { padding: 16px 12px 40px; }
809
+ .cpub-article-wrap { padding-top: 16px; padding-bottom: 40px; }
802
810
  .cpub-article-title { font-size: 20px; }
803
811
  .cpub-article-lead { font-size: 13px; }
804
812
  .cpub-related-grid { grid-template-columns: 1fr; }
@@ -216,12 +216,24 @@ const hasSeries = computed(() => !!seriesTitle.value && seriesTotalParts.value >
216
216
  }
217
217
 
218
218
  /* ── BLOG WRAP ── */
219
+ .cpub-blog-view {
220
+ overflow-x: clip;
221
+ }
222
+
219
223
  .cpub-blog-wrap {
220
224
  max-width: 720px;
221
225
  margin: 0 auto;
222
- padding: 40px 24px 80px;
226
+ padding: 40px clamp(12px, 4vw, 24px) 80px;
227
+ overflow-wrap: break-word;
228
+ word-break: break-word;
223
229
  }
224
230
 
231
+ /* Global overflow protection for content */
232
+ .cpub-blog-wrap :deep(img),
233
+ .cpub-blog-wrap :deep(video),
234
+ .cpub-blog-wrap :deep(iframe) { max-width: 100%; height: auto; }
235
+ .cpub-blog-wrap :deep(pre) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
236
+
225
237
  /* ── TYPE BADGE ── */
226
238
  .cpub-content-type-badge {
227
239
  display: inline-flex;
@@ -334,15 +346,12 @@ const hasSeries = computed(() => !!seriesTitle.value && seriesTotalParts.value >
334
346
  /* ── COVER PHOTO (in-body) ── */
335
347
  .cpub-cover-photo {
336
348
  margin-bottom: 24px;
337
- border: var(--border-width-default) solid var(--border);
338
- overflow: hidden;
339
349
  }
340
350
  .cpub-cover-photo-img {
341
- max-width: 100%;
342
- max-height: 500px;
351
+ width: 100%;
343
352
  height: auto;
344
353
  display: block;
345
- margin: 0 auto;
354
+ border-radius: var(--radius, 0);
346
355
  }
347
356
 
348
357
  /* ── ENGAGEMENT ROW ── */
@@ -705,7 +714,7 @@ const hasSeries = computed(() => !!seriesTitle.value && seriesTotalParts.value >
705
714
 
706
715
  /* ── RESPONSIVE ── */
707
716
  @media (max-width: 768px) {
708
- .cpub-blog-wrap { padding: 24px 16px 48px; }
717
+ .cpub-blog-wrap { padding-top: 24px; padding-bottom: 48px; }
709
718
  .cpub-blog-title { font-size: 22px; }
710
719
  .cpub-engagement-row { flex-wrap: wrap; gap: 6px; }
711
720
  .cpub-engage-btn { padding: 8px 12px; min-height: 36px; }
@@ -716,7 +725,7 @@ const hasSeries = computed(() => !!seriesTitle.value && seriesTotalParts.value >
716
725
  }
717
726
 
718
727
  @media (max-width: 480px) {
719
- .cpub-blog-wrap { padding: 16px 12px 40px; }
728
+ .cpub-blog-wrap { padding-top: 16px; padding-bottom: 40px; }
720
729
  .cpub-blog-title { font-size: 20px; }
721
730
  .cpub-blog-lead { font-size: 13px; }
722
731
  .cpub-author-card { flex-direction: column; gap: 12px; }
@@ -590,6 +590,11 @@ async function handleBuild(): Promise<void> {
590
590
 
591
591
  <style scoped>
592
592
  /* ── HERO COVER ── */
593
+ .cpub-project-view {
594
+ /* Prevent any child from creating horizontal scroll */
595
+ overflow-x: clip;
596
+ }
597
+
593
598
  .cpub-hero-cover {
594
599
  position: relative;
595
600
  height: 280px;
@@ -675,7 +680,7 @@ async function handleBuild(): Promise<void> {
675
680
  .cpub-page-outer {
676
681
  max-width: 1160px;
677
682
  margin: 0 auto;
678
- padding: 0 32px;
683
+ padding: 0 clamp(12px, 3vw, 32px);
679
684
  }
680
685
 
681
686
  /* ── BREADCRUMB ── */
@@ -920,28 +925,33 @@ async function handleBuild(): Promise<void> {
920
925
  /* ── CONTENT GRID ── */
921
926
  .cpub-content-grid {
922
927
  display: grid;
923
- grid-template-columns: 1fr 260px;
924
- gap: 32px;
928
+ grid-template-columns: minmax(0, 1fr) 260px;
929
+ gap: clamp(16px, 3vw, 32px);
925
930
  align-items: start;
926
931
  padding-bottom: 64px;
927
932
  }
928
933
  .cpub-content-grid.cpub-has-toc {
929
- grid-template-columns: 200px 1fr 260px;
934
+ grid-template-columns: 200px minmax(0, 1fr) 260px;
935
+ }
936
+
937
+ /* Prevent grid children from overflowing */
938
+ .cpub-content-col,
939
+ .cpub-sidebar,
940
+ .cpub-toc-col {
941
+ min-width: 0;
942
+ overflow-wrap: break-word;
930
943
  }
931
944
 
932
945
  /* ── COVER PHOTO (in-body) ── */
933
946
  .cpub-cover-photo {
934
947
  margin-bottom: 24px;
935
- border: var(--border-width-default) solid var(--border);
936
- overflow: hidden;
937
948
  }
938
949
 
939
950
  .cpub-cover-photo-img {
940
- max-width: 100%;
941
- max-height: 500px;
951
+ width: 100%;
942
952
  height: auto;
943
953
  display: block;
944
- margin: 0 auto;
954
+ border-radius: var(--radius, 0);
945
955
  }
946
956
 
947
957
  /* ── PROSE ── */
@@ -949,6 +959,22 @@ async function handleBuild(): Promise<void> {
949
959
  font-size: 13px;
950
960
  line-height: 1.8;
951
961
  color: var(--text-dim);
962
+ overflow-wrap: break-word;
963
+ word-break: break-word;
964
+ }
965
+
966
+ /* Prevent images and media from overflowing prose */
967
+ .cpub-prose :deep(img),
968
+ .cpub-prose :deep(video),
969
+ .cpub-prose :deep(iframe) {
970
+ max-width: 100%;
971
+ height: auto;
972
+ }
973
+
974
+ /* Code blocks scroll horizontally instead of overflowing */
975
+ .cpub-prose :deep(pre) {
976
+ overflow-x: auto;
977
+ -webkit-overflow-scrolling: touch;
952
978
  }
953
979
 
954
980
  .cpub-prose :deep(h2),
@@ -1516,48 +1542,53 @@ async function handleBuild(): Promise<void> {
1516
1542
  }
1517
1543
 
1518
1544
  /* ── RESPONSIVE ── */
1545
+
1546
+ /* 1200px: Drop left TOC column, keep sidebar */
1519
1547
  @media (max-width: 1200px) {
1520
1548
  .cpub-content-grid.cpub-has-toc {
1521
- grid-template-columns: 1fr 260px;
1549
+ grid-template-columns: minmax(0, 1fr) 260px;
1522
1550
  }
1523
1551
  .cpub-toc-col { display: none; }
1524
1552
  }
1553
+
1554
+ /* 1024px: Single column — sidebar stacks below content */
1525
1555
  @media (max-width: 1024px) {
1526
1556
  .cpub-content-grid,
1527
1557
  .cpub-content-grid.cpub-has-toc {
1528
- grid-template-columns: 1fr;
1558
+ grid-template-columns: minmax(0, 1fr);
1529
1559
  }
1530
1560
  .cpub-sidebar { position: static; }
1531
1561
  .cpub-toc-col { display: none; }
1532
1562
  }
1533
1563
 
1564
+ /* 768px: Tablet — reduce sizes, wrap engagement, scroll tabs */
1534
1565
  @media (max-width: 768px) {
1535
- .cpub-page-outer { padding: 0 16px; }
1536
1566
  .cpub-hero-cover { height: 200px; }
1537
1567
  .cpub-project-title { font-size: 18px; }
1538
1568
  .cpub-project-desc { font-size: 13px; }
1539
- .cpub-tabs-strip { padding: 0 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
1540
- .cpub-tabs-inner { max-width: none; padding: 0; }
1569
+ .cpub-tabs-strip { overflow-x: auto; -webkit-overflow-scrolling: touch; }
1570
+ .cpub-tabs-inner { max-width: none; padding: 0 clamp(12px, 3vw, 32px); }
1541
1571
  .cpub-tab { padding: 10px 12px; font-size: 11px; white-space: nowrap; }
1542
1572
  .cpub-engagement-row { flex-wrap: wrap; gap: 6px; }
1543
1573
  .cpub-engage-btn { padding: 8px 12px; min-height: 36px; }
1544
1574
  .cpub-engage-sep { display: none; }
1545
- .cpub-content-area { padding: 0 16px; }
1546
1575
  .cpub-sidebar { position: static; }
1547
1576
  .cpub-author-tags .cpub-author-tag { padding: 2px 8px; font-size: 10px; }
1577
+ .cpub-author-row { flex-wrap: wrap; gap: 8px; }
1578
+ .cpub-content-grid { padding-bottom: 32px; }
1548
1579
  }
1549
1580
 
1581
+ /* 480px: Phone — compact everything */
1550
1582
  @media (max-width: 480px) {
1551
- .cpub-page-outer { padding: 0 12px; }
1552
1583
  .cpub-hero-cover { height: 160px; }
1553
1584
  .cpub-project-title { font-size: 16px; }
1554
1585
  .cpub-project-desc { font-size: 12px; line-height: 1.5; }
1555
- .cpub-project-meta { padding: 16px 0 0; }
1556
- .cpub-breadcrumbs { font-size: 10px; padding: 10px 0 8px; }
1586
+ .cpub-project-meta { padding: 12px 0 0; }
1587
+ .cpub-breadcrumb { font-size: 10px; padding: 10px 0 8px; }
1557
1588
  .cpub-tab { padding: 8px 10px; font-size: 10px; }
1558
1589
  .cpub-engage-btn { font-size: 11px; padding: 8px 10px; }
1559
- .cpub-author-row { gap: 8px; }
1560
1590
  .cpub-author-detail { font-size: 10px; }
1561
1591
  .cpub-toc-item { padding: 6px 0 6px 10px; font-size: 11px; min-height: 36px; display: flex; align-items: center; }
1592
+ .cpub-content-grid { gap: 12px; padding-bottom: 24px; }
1562
1593
  }
1563
1594
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonpub/layer",
3
- "version": "0.7.16",
3
+ "version": "0.7.18",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "files": [
@@ -50,16 +50,16 @@
50
50
  "vue": "^3.4.0",
51
51
  "vue-router": "^4.3.0",
52
52
  "zod": "^4.3.6",
53
- "@commonpub/auth": "0.5.0",
54
53
  "@commonpub/editor": "0.7.5",
55
- "@commonpub/docs": "0.6.2",
56
- "@commonpub/learning": "0.5.0",
57
54
  "@commonpub/config": "0.9.0",
58
- "@commonpub/server": "2.27.7",
55
+ "@commonpub/auth": "0.5.0",
56
+ "@commonpub/docs": "0.6.2",
59
57
  "@commonpub/explainer": "0.7.6",
60
- "@commonpub/ui": "0.8.5",
58
+ "@commonpub/schema": "0.9.5",
61
59
  "@commonpub/protocol": "0.9.7",
62
- "@commonpub/schema": "0.9.5"
60
+ "@commonpub/learning": "0.5.0",
61
+ "@commonpub/ui": "0.8.5",
62
+ "@commonpub/server": "2.27.7"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@testing-library/jest-dom": "^6.9.1",