@publier/shell 4.3.0 → 4.3.2

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/README.md CHANGED
@@ -48,11 +48,15 @@ fragments, HTTP(S), mail and telephone links; executable URL schemes are omitted
48
48
  `external: true` opens a new tab with `noopener noreferrer`.
49
49
 
50
50
  Documentation selectors open on click or keyboard activation. Their labels stay
51
- stationary; the disclosure arrow changes orientation without an entrance animation.
51
+ stationary while the disclosure arrow rotates smoothly. The menu itself opens
52
+ without an entrance animation.
52
53
 
53
54
  Outside the `docs` variant, desktop groups also open on hover for fine pointers.
54
- Their wider panels arrange destinations in two columns, with a brief Motion
55
- entrance. Reduced-motion preferences disable the animation. Touch uses tap;
55
+ Their panels span the header width and arrange destinations in two columns, with
56
+ a brief Motion entrance. Corners and shadow follow the theme’s `--radius-box`,
57
+ `--radius-selector` and `--shadow-lg` tokens; `--publier-page-max-width` aligns
58
+ the inner content with the page. Reduced motion disables panel and arrow
59
+ animation. Touch uses tap;
56
60
  keyboard opening, selection and Escape remain owned by details-menu. Pointer
57
61
  opening informs that element's mouse-modality listener so hover does not steal
58
62
  focus. Moving into the panel keeps it open; leaving dismisses after a short grace
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@publier/shell",
3
- "version": "4.3.0",
3
+ "version": "4.3.2",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Qwik + Astro docs layout for Publier sites.",
6
6
  "type": "module",
@@ -119,7 +119,7 @@
119
119
  "@github/details-menu-element": "^1.0.13",
120
120
  "@github/relative-time-element": "^5.3.1",
121
121
  "@github/tab-container-element": "^4.9.0",
122
- "@publier/native": "6.0.0",
122
+ "@publier/native": "6.0.1",
123
123
  "@tailwindcss/typography": "^0.5.20",
124
124
  "astro-pagefind": "^2.0.1",
125
125
  "daisyui": "^5.7.22",
@@ -14,7 +14,14 @@ export async function getStaticPaths() {
14
14
  const { entry } = Astro.props;
15
15
  const { Content, headings } = await render(entry);
16
16
  const all = await getCollection('docs');
17
- const plan = JSON.parse(shellPlanDocsSlug(JSON.stringify({ entry_id: entry.id, title: entry.data.title, description: entry.data.description ?? null, tab_sections: docsConfig.tabSections, all_entry_ids: all.map((e) => e.id) }))) as { breadcrumbs: BreadcrumbItem[]; section_entry_ids: string[]; scope: string; current_path: string; sidebar_persist_key: string };
17
+ const configuredNav = navConfig.variants.docs;
18
+ const tabSections = [...new Set([
19
+ ...docsConfig.tabSections,
20
+ ...(configuredNav?.products ?? []).flatMap((product) => (product.tabs ?? []).flatMap((tab) =>
21
+ tab.href?.startsWith('/docs/') ? [tab.href.slice('/docs/'.length).replace(/\/$/, '')] : [],
22
+ )),
23
+ ])];
24
+ const plan = JSON.parse(shellPlanDocsSlug(JSON.stringify({ entry_id: entry.id, title: entry.data.title, description: entry.data.description ?? null, tab_sections: tabSections, all_entry_ids: all.map((e) => e.id) }))) as { breadcrumbs: BreadcrumbItem[]; section_entry_ids: string[]; scope: string; current_path: string; sidebar_persist_key: string };
18
25
  const pages = all.map((e) => entryToPage({ slug: e.id.replace(/\.(mdx?|md)$/, ''), data: e.data, headings: [] }, { urlPrefix: '/docs' }));
19
26
  const sections = [
20
27
  ...(pages.some((page) => page.url === '/docs') ? [{ label: 'All documentation', href: '/docs' }] : []),
@@ -25,7 +32,6 @@ const sections = [
25
32
  }),
26
33
  ];
27
34
 
28
- const configuredNav = navConfig.variants.docs;
29
35
  const docsNav: NavVariant = { ...(configuredNav ?? { brand: site.name, logo: site.logo, tabs: sections, links: [], cta: null }) };
30
36
 
31
37
  if (!docsNav.products?.length && docsConfig.versions.length > 0) {
@@ -172,6 +172,7 @@ h6 {
172
172
  border-right: 1.5px solid currentColor;
173
173
  border-bottom: 1.5px solid currentColor;
174
174
  transform: translateY(-0.1rem) rotate(45deg);
175
+ transition: transform 150ms ease;
175
176
  }
176
177
 
177
178
  [data-publier-top-nav] details[data-publier-nav-group].dropdown[open] > summary::after {
@@ -730,6 +731,7 @@ body:has([data-publier-docs-header]) :is(h2, h3, h4)[id] {
730
731
  border-right: 1.5px solid currentColor;
731
732
  border-bottom: 1.5px solid currentColor;
732
733
  transform: rotate(45deg);
734
+ transition: transform 150ms ease;
733
735
  }
734
736
  [data-publier-docs-selector][open] > summary > span[aria-hidden="true"] {
735
737
  transform: rotate(225deg);
@@ -740,9 +742,12 @@ body:has([data-publier-docs-header]) :is(h2, h3, h4)[id] {
740
742
  scale: 1;
741
743
  }
742
744
 
743
- /* Marketing uses the existing menu surface, expanded into an airy link grid.
745
+ /* Marketing uses the existing menu surface, expanded across the header into an airy link grid.
744
746
  * Native disclosure still works without JavaScript; Motion enhances entrance. */
745
747
  @media (width >= 64rem) {
748
+ [data-publier-top-nav]:not([data-publier-docs-header]) > .navbar {
749
+ position: static;
750
+ }
746
751
  [data-publier-top-nav]:not([data-publier-docs-header])
747
752
  details.dropdown[data-publier-nav-group]:not([data-publier-docs-selector]) {
748
753
  position: static;
@@ -755,24 +760,20 @@ body:has([data-publier-docs-header]) :is(h2, h3, h4)[id] {
755
760
  box-shadow: none;
756
761
  transition: color 150ms ease;
757
762
  }
758
- [data-publier-top-nav]:not([data-publier-docs-header])
759
- details.dropdown[data-publier-nav-group]
760
- > summary::after {
761
- transition: transform 150ms ease;
762
- }
763
763
  [data-publier-top-nav]:not([data-publier-docs-header])
764
764
  details.dropdown[data-publier-nav-group]:not([data-publier-docs-selector])
765
765
  > [data-publier-nav-menu] {
766
766
  inset-inline: 0;
767
767
  top: 100%;
768
- width: min(56rem, calc(100vw - 3rem));
768
+ width: 100%;
769
769
  max-width: none;
770
770
  max-height: calc(100dvh - 6rem);
771
771
  margin-inline: auto;
772
- padding: 1.5rem;
772
+ padding-block: 2.5rem;
773
+ padding-inline: max(2rem, calc((100% - var(--publier-page-max-width, 80rem)) / 2));
773
774
  overflow-y: auto;
774
- border-radius: 0 0 0.75rem 0.75rem;
775
- box-shadow: 0 18px 32px -16px rgb(0 0 0 / 0.2);
775
+ border-radius: 0 0 var(--radius-box) var(--radius-box);
776
+ box-shadow: var(--shadow-lg);
776
777
  scale: 1;
777
778
  animation: none;
778
779
  transition: none;
@@ -781,13 +782,13 @@ body:has([data-publier-docs-header]) :is(h2, h3, h4)[id] {
781
782
  [data-publier-top-nav]:not([data-publier-docs-header]) [data-publier-nav-menu] > ul {
782
783
  display: grid;
783
784
  grid-template-columns: repeat(2, minmax(0, 1fr));
784
- gap: 0.5rem 1.5rem;
785
+ gap: 1rem 3rem;
785
786
  }
786
787
  [data-publier-top-nav]:not([data-publier-docs-header]) [data-publier-nav-menu] > ul > li > a {
787
788
  height: 100%;
788
789
  padding: 1rem;
789
- border-radius: 0.375rem;
790
- font-size: 1.0625rem;
790
+ border-radius: var(--radius-selector);
791
+ font-size: 1.25rem;
791
792
  line-height: 1.4;
792
793
  }
793
794
  [data-publier-top-nav]:not([data-publier-docs-header]) [data-publier-nav-description] {
@@ -797,7 +798,8 @@ body:has([data-publier-docs-header]) :is(h2, h3, h4)[id] {
797
798
  }
798
799
  }
799
800
  @media (prefers-reduced-motion: reduce) {
800
- [data-publier-top-nav] details[data-publier-nav-group] > summary::after {
801
+ [data-publier-top-nav] details[data-publier-nav-group] > summary::after,
802
+ [data-publier-docs-selector] > summary > span[aria-hidden="true"] {
801
803
  transition: none;
802
804
  }
803
805
  }
@@ -176,9 +176,9 @@ declare module 'virtual:publier-docs-config' {
176
176
  /** Sidebar levels expanded by default, from sidebar.defaultOpenLevel. */
177
177
  defaultOpenLevel?: number;
178
178
  /**
179
- * Top-level folders under `src/content/docs/` that render as their own
180
- * tab-scoped sidebars. Empty array → single flat sidebar for every
181
- * docs page.
179
+ * Paths under `src/content/docs/` that render as tab-scoped sidebars.
180
+ * Nested paths use the longest match. Product tab destinations also
181
+ * supply scopes; an empty array without product tabs uses one sidebar.
182
182
  */
183
183
  tabSections: string[];
184
184
  /** Display + ordering overrides keyed by group path. */