@commonpub/layer 0.21.16 → 0.21.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.
@@ -432,7 +432,7 @@ async function handleBuild(): Promise<void> {
432
432
 
433
433
  <!-- MAIN CONTENT GRID -->
434
434
  <div class="cpub-page-outer">
435
- <div class="cpub-content-grid" :class="{ 'cpub-has-toc': tocEntries.length > 0 && activeTab === 'overview', 'cpub-has-sidebar': hasSidebar }">
435
+ <div class="cpub-project-grid" :class="{ 'cpub-has-toc': tocEntries.length > 0 && activeTab === 'overview', 'cpub-has-sidebar': hasSidebar }">
436
436
  <!-- LEFT: TABLE OF CONTENTS -->
437
437
  <nav v-if="tocEntries.length > 0 && activeTab === 'overview'" class="cpub-toc-col">
438
438
  <div class="cpub-toc">
@@ -964,20 +964,20 @@ async function handleBuild(): Promise<void> {
964
964
  The sidebar 260px column is reserved ONLY when there's sidebar
965
965
  content to put in it (BOM/parts OR community hub) — otherwise the
966
966
  content column gets the freed width. */
967
- .cpub-content-grid {
967
+ .cpub-project-grid {
968
968
  display: grid;
969
969
  grid-template-columns: minmax(0, 1fr);
970
970
  gap: clamp(16px, 3vw, 32px);
971
971
  align-items: start;
972
972
  padding-bottom: 64px;
973
973
  }
974
- .cpub-content-grid.cpub-has-toc {
974
+ .cpub-project-grid.cpub-has-toc {
975
975
  grid-template-columns: 200px minmax(0, 1fr);
976
976
  }
977
- .cpub-content-grid.cpub-has-sidebar {
977
+ .cpub-project-grid.cpub-has-sidebar {
978
978
  grid-template-columns: minmax(0, 1fr) 260px;
979
979
  }
980
- .cpub-content-grid.cpub-has-toc.cpub-has-sidebar {
980
+ .cpub-project-grid.cpub-has-toc.cpub-has-sidebar {
981
981
  grid-template-columns: 200px minmax(0, 1fr) 260px;
982
982
  }
983
983
 
@@ -1010,13 +1010,30 @@ async function handleBuild(): Promise<void> {
1010
1010
  word-break: break-word;
1011
1011
  }
1012
1012
 
1013
- /* Prevent images and media from overflowing prose */
1013
+ /* Prevent images and media from overflowing prose, AND cap them at a
1014
+ reading-friendly size in wide content columns. Without this cap, body
1015
+ images blew up to 900px+ once the right sidebar was made optional in
1016
+ 0.21.16 (the content column got wider when no BOM/community). 760px
1017
+ for images matches what photographers + technical-writing layouts
1018
+ converge on; videos/iframes get a touch more (880px) for visibility.
1019
+ Cover photo lives OUTSIDE .cpub-prose so it still goes full-width. */
1014
1020
  .cpub-prose :deep(img),
1015
1021
  .cpub-prose :deep(video),
1016
1022
  .cpub-prose :deep(iframe) {
1017
1023
  max-width: 100%;
1018
1024
  height: auto;
1019
1025
  }
1026
+ .cpub-prose :deep(img) {
1027
+ max-width: min(100%, 760px);
1028
+ margin-inline: auto;
1029
+ display: block;
1030
+ }
1031
+ .cpub-prose :deep(video),
1032
+ .cpub-prose :deep(iframe) {
1033
+ max-width: min(100%, 880px);
1034
+ margin-inline: auto;
1035
+ display: block;
1036
+ }
1020
1037
 
1021
1038
  /* Code blocks scroll horizontally instead of overflowing */
1022
1039
  .cpub-prose :deep(pre) {
@@ -1592,10 +1609,10 @@ async function handleBuild(): Promise<void> {
1592
1609
 
1593
1610
  /* 1200px: Drop left TOC column, keep sidebar if it exists */
1594
1611
  @media (max-width: 1200px) {
1595
- .cpub-content-grid.cpub-has-toc {
1612
+ .cpub-project-grid.cpub-has-toc {
1596
1613
  grid-template-columns: minmax(0, 1fr);
1597
1614
  }
1598
- .cpub-content-grid.cpub-has-toc.cpub-has-sidebar {
1615
+ .cpub-project-grid.cpub-has-toc.cpub-has-sidebar {
1599
1616
  grid-template-columns: minmax(0, 1fr) 260px;
1600
1617
  }
1601
1618
  .cpub-toc-col { display: none; }
@@ -1603,10 +1620,10 @@ async function handleBuild(): Promise<void> {
1603
1620
 
1604
1621
  /* 1024px: Single column — sidebar stacks below content */
1605
1622
  @media (max-width: 1024px) {
1606
- .cpub-content-grid,
1607
- .cpub-content-grid.cpub-has-toc,
1608
- .cpub-content-grid.cpub-has-sidebar,
1609
- .cpub-content-grid.cpub-has-toc.cpub-has-sidebar {
1623
+ .cpub-project-grid,
1624
+ .cpub-project-grid.cpub-has-toc,
1625
+ .cpub-project-grid.cpub-has-sidebar,
1626
+ .cpub-project-grid.cpub-has-toc.cpub-has-sidebar {
1610
1627
  grid-template-columns: minmax(0, 1fr);
1611
1628
  }
1612
1629
  .cpub-sidebar { position: static; }
@@ -1627,7 +1644,7 @@ async function handleBuild(): Promise<void> {
1627
1644
  .cpub-sidebar { position: static; }
1628
1645
  .cpub-author-tags .cpub-author-tag { padding: 2px 8px; font-size: 10px; }
1629
1646
  .cpub-author-row { flex-wrap: wrap; gap: 8px; }
1630
- .cpub-content-grid { padding-bottom: 32px; }
1647
+ .cpub-project-grid { padding-bottom: 32px; }
1631
1648
  }
1632
1649
 
1633
1650
  /* 480px: Phone — compact everything */
@@ -1641,6 +1658,6 @@ async function handleBuild(): Promise<void> {
1641
1658
  .cpub-engage-btn { font-size: 11px; padding: 8px 10px; }
1642
1659
  .cpub-author-detail { font-size: 10px; }
1643
1660
  .cpub-toc-item { padding: 6px 0 6px 10px; font-size: 11px; min-height: 36px; display: flex; align-items: center; }
1644
- .cpub-content-grid { gap: 12px; padding-bottom: 24px; }
1661
+ .cpub-project-grid { gap: 12px; padding-bottom: 24px; }
1645
1662
  }
1646
1663
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonpub/layer",
3
- "version": "0.21.16",
3
+ "version": "0.21.18",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "files": [
@@ -51,15 +51,15 @@
51
51
  "vue-router": "^4.3.0",
52
52
  "zod": "^4.3.6",
53
53
  "@commonpub/auth": "0.6.0",
54
- "@commonpub/docs": "0.6.3",
55
- "@commonpub/editor": "0.7.10",
54
+ "@commonpub/config": "0.13.0",
56
55
  "@commonpub/explainer": "0.7.15",
57
- "@commonpub/learning": "0.5.2",
58
- "@commonpub/protocol": "0.12.0",
59
56
  "@commonpub/server": "2.55.0",
60
- "@commonpub/ui": "0.8.5",
57
+ "@commonpub/protocol": "0.12.0",
61
58
  "@commonpub/schema": "0.16.0",
62
- "@commonpub/config": "0.13.0"
59
+ "@commonpub/learning": "0.5.2",
60
+ "@commonpub/editor": "0.7.10",
61
+ "@commonpub/docs": "0.6.3",
62
+ "@commonpub/ui": "0.8.5"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@testing-library/jest-dom": "^6.9.1",