@publier/shell 3.5.1 → 3.6.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.
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{integration-CiX7_JNh.d.mts → integration-BHNGso70.d.mts} +1 -0
- package/dist/{integration-B0arJ8Mq.mjs → integration-DgDVMttc.mjs} +1 -1
- package/dist/integration.d.mts +1 -1
- package/dist/integration.mjs +1 -1
- package/dist/search/index.d.mts +2 -0
- package/dist/themes/neutral.css +65 -19
- package/package.json +2 -2
- package/src/layouts/base-layout.astro +3 -2
- package/src/routes/docs-slug.astro +1 -1
- package/src/virtual-modules.d.ts +6 -0
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,i as t,t as n}from"./integration-
|
|
1
|
+
import{a as e,i as t,t as n}from"./integration-DgDVMttc.mjs";export{t as HASHED_ASSET_RE,n as docsShell,e as publierCacheControl};
|
|
@@ -37,7 +37,7 @@ mdx.
|
|
|
37
37
|
]
|
|
38
38
|
|
|
39
39
|
Missing:\n ${C.map(e=>e.pkg).join(`
|
|
40
|
-
`)}\n`);let T=n.prefetch;ie(T===void 0?void 0:JSON.stringify(T),p)&&r({prefetch:{prefetchAll:!0,defaultStrategy:`viewport`}});let{entries:E,familyOnlyCss:D,slots:O}=_?De(_,u):{entries:[],familyOnlyCss:``,slots:[]},k=m.snippets??null,se=k==null?null:k===!1?`false`:JSON.stringify(k),ce=ae(p,se??void 0,w(A.join(u,`content/snippets`))),N=JSON.parse(ce),P={...e,snippets:N===null?void 0:N},F=JSON.stringify(P),I=e.math!==!1,L=I?pe(f,l):null,R=re(F,!!(g&&Object.keys(g).length>0),N!==null&&N!==!1,I&&L!==null),z=ne(p,I&&L!==null),B=he(R,g,L),V=ge(z,L),H=me(f,l);await _e(e,n.integrations,u,r);let U=ye({root:u,mathEnabled:I}),W=Ee({searchEnabled:e.search!==!1}),G=JSON.stringify({docs:$(u,`docs`),blog:$(u,`blog`),changelog:$(u,`changelog`)}),K=JSON.parse(te(p,x,G)),q=K.filter(e=>e.pattern.endsWith(`/rss.xml`)).map(e=>({title:e.pattern===`/blog/rss.xml`?`Blog feed`:e.pattern===`/changelog/rss.xml`?`Changelog feed`:e.pattern,href:e.pattern}));if(H){let e=n.markdown?.processor,t=e?.options?.hastPlugins;e?.name!==`unified`&&Array.isArray(t)&&t.length>0&&l.warn(`[@publier/shell] docsShell() is replacing the configured "${e?.name}" Markdown processor, discarding ${t.length} HAST plugin(s) another integration already registered on it — typically astro-expressive-code >=0.43, which registers into the processor it finds at its own setup. Code fences will silently lose ALL processing (plain <pre><code>, no syntax highlighting). Fix: move docsShell() BEFORE expressiveCode() (and any other Markdown-processor-touching integration) in astro.config.ts integrations[] so they register into docsShell's unified() processor instead.`)}r({markdown:H?{processor:H({remarkPlugins:B,rehypePlugins:V})}:{remarkPlugins:[...B],rehypePlugins:[...V]},vite:{ssr:{noExternal:[`@publier/shell`],external:[`@publier/native`]},build:{rollupOptions:{external:[`@publier/native`]}},optimizeDeps:{exclude:[`@publier/shell`,`@publier/native`]},plugins:[...be(f,l,n.vite?.plugins??[]),s({root:u}),o({root:u}),Q(`virtual:publier-nav-config`,`navConfig`,v),xe({entryPath:U}),Ce(),Q(`virtual:publier-announcement`,`announcement`,y),Q(`virtual:publier-site`,`site`,h),Q(`virtual:publier-docs-config`,`docsConfig`,b),Q(`virtual:publier-feeds`,`feeds`,q),Q(`virtual:publier-fonts`,`fonts`,{slots:O}),we()]}}),r({fonts:[{name:`Inter Variable`,cssVariable:`--publier-font-builtin-sans`,provider:M.npm({remote:!1}),fallbacks:[`system-ui`,`sans-serif`],weights:[`100 900`],styles:[`normal`],subsets:[`latin`],options:{package:`@fontsource-variable/inter`}},{name:`JetBrains Mono Variable`,cssVariable:`--publier-font-builtin-mono`,provider:M.npm({remote:!1}),fallbacks:[`monospace`],weights:[`100 800`],styles:[`normal`],subsets:[`latin`],options:{package:`@fontsource-variable/jetbrains-mono`}},...E]}),i(`page-ssr`,[`import ${JSON.stringify(U)};`,`import 'virtual:publier-theme-css';`,`import 'virtual:publier-custom-css';`,`import '@publier/shell/styles/base.css';`].join(`
|
|
40
|
+
`)}\n`);let T=n.prefetch;ie(T===void 0?void 0:JSON.stringify(T),p)&&r({prefetch:{prefetchAll:!0,defaultStrategy:`viewport`}});let{entries:E,familyOnlyCss:D,slots:O}=_?De(_,u):{entries:[],familyOnlyCss:``,slots:[]},k=m.snippets??null,se=k==null?null:k===!1?`false`:JSON.stringify(k),ce=ae(p,se??void 0,w(A.join(u,`content/snippets`))),N=JSON.parse(ce),P={...e,snippets:N===null?void 0:N},F=JSON.stringify(P),I=e.math!==!1,L=I?pe(f,l):null,R=re(F,!!(g&&Object.keys(g).length>0),N!==null&&N!==!1,I&&L!==null),z=ne(p,I&&L!==null),B=he(R,g,L),V=ge(z,L),H=me(f,l);await _e(e,n.integrations,u,r);let U=ye({root:u,mathEnabled:I}),W=Ee({searchEnabled:e.search!==!1}),G=JSON.stringify({docs:$(u,`docs`),blog:$(u,`blog`),changelog:$(u,`changelog`)}),K=JSON.parse(te(p,x,G)),q=K.filter(e=>e.pattern.endsWith(`/rss.xml`)).map(e=>({title:e.pattern===`/blog/rss.xml`?`Blog feed`:e.pattern===`/changelog/rss.xml`?`Changelog feed`:e.pattern,href:e.pattern}));if(H){let e=n.markdown?.processor,t=e?.options?.hastPlugins;e?.name!==`unified`&&Array.isArray(t)&&t.length>0&&l.warn(`[@publier/shell] docsShell() is replacing the configured "${e?.name}" Markdown processor, discarding ${t.length} HAST plugin(s) another integration already registered on it — typically astro-expressive-code >=0.43, which registers into the processor it finds at its own setup. Code fences will silently lose ALL processing (plain <pre><code>, no syntax highlighting). Fix: move docsShell() BEFORE expressiveCode() (and any other Markdown-processor-touching integration) in astro.config.ts integrations[] so they register into docsShell's unified() processor instead.`)}r({markdown:H?{processor:H({remarkPlugins:B,rehypePlugins:V})}:{remarkPlugins:[...B],rehypePlugins:[...V]},vite:{ssr:{noExternal:[`@publier/shell`],external:[`@publier/native`]},build:{rollupOptions:{external:[`@publier/native`]}},optimizeDeps:{exclude:[`@publier/shell`,`@publier/native`]},plugins:[...be(f,l,n.vite?.plugins??[]),s({root:u}),o({root:u}),Q(`virtual:publier-nav-config`,`navConfig`,v),xe({entryPath:U}),Ce(),Q(`virtual:publier-announcement`,`announcement`,y),Q(`virtual:publier-site`,`site`,h),Q(`virtual:publier-docs-config`,`docsConfig`,b),Q(`virtual:publier-appearance`,`appearance`,m.appearance),Q(`virtual:publier-feeds`,`feeds`,q),Q(`virtual:publier-fonts`,`fonts`,{slots:O}),we()]}}),r({fonts:[{name:`Inter Variable`,cssVariable:`--publier-font-builtin-sans`,provider:M.npm({remote:!1}),fallbacks:[`system-ui`,`sans-serif`],weights:[`100 900`],styles:[`normal`],subsets:[`latin`],options:{package:`@fontsource-variable/inter`}},{name:`JetBrains Mono Variable`,cssVariable:`--publier-font-builtin-mono`,provider:M.npm({remote:!1}),fallbacks:[`monospace`],weights:[`100 800`],styles:[`normal`],subsets:[`latin`],options:{package:`@fontsource-variable/jetbrains-mono`}},...E]}),i(`page-ssr`,[`import ${JSON.stringify(U)};`,`import 'virtual:publier-theme-css';`,`import 'virtual:publier-custom-css';`,`import '@publier/shell/styles/base.css';`].join(`
|
|
41
41
|
`)),i(`page`,W),i(`head-inline`,`(function(){
|
|
42
42
|
if (typeof window === 'undefined' || !window.sessionStorage || !window.fetch) return;
|
|
43
43
|
var store = window.sessionStorage;
|
package/dist/integration.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DocsSidebarMetaOverride, c as NavCta, d as NavVariant, f as SidebarAnchorConfig, g as publierCascadeHoistPlugin, h as hoistMediaOutOfUtilitiesLayer, i as DocsShellOptions, l as NavLink, m as docsShell, n as DocVersionConfig, o as LlmsConfig, p as SiteConfig, r as DocsConfig, s as NavConfig, t as AnnouncementConfig, u as NavPathRule } from "./integration-
|
|
1
|
+
import { a as DocsSidebarMetaOverride, c as NavCta, d as NavVariant, f as SidebarAnchorConfig, g as publierCascadeHoistPlugin, h as hoistMediaOutOfUtilitiesLayer, i as DocsShellOptions, l as NavLink, m as docsShell, n as DocVersionConfig, o as LlmsConfig, p as SiteConfig, r as DocsConfig, s as NavConfig, t as AnnouncementConfig, u as NavPathRule } from "./integration-BHNGso70.mjs";
|
|
2
2
|
export { AnnouncementConfig, DocVersionConfig, DocsConfig, DocsShellOptions, DocsSidebarMetaOverride, LlmsConfig, NavConfig, NavCta, NavLink, NavPathRule, NavVariant, SidebarAnchorConfig, SiteConfig, docsShell, hoistMediaOutOfUtilitiesLayer, publierCascadeHoistPlugin };
|
package/dist/integration.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./integration-
|
|
1
|
+
import{n as e,r as t,t as n}from"./integration-DgDVMttc.mjs";export{n as docsShell,e as hoistMediaOutOfUtilitiesLayer,t as publierCascadeHoistPlugin};
|
package/dist/search/index.d.mts
CHANGED
|
@@ -51,6 +51,8 @@ interface SidebarMetaOverride {
|
|
|
51
51
|
pages?: string[];
|
|
52
52
|
}
|
|
53
53
|
interface BuildSidebarOptions {
|
|
54
|
+
/** When set, folders stay collapsible regardless of child count. */
|
|
55
|
+
defaultOpenLevel?: number;
|
|
54
56
|
meta?: Record<string, SidebarMetaOverride>;
|
|
55
57
|
urlPrefix?: string;
|
|
56
58
|
}
|
package/dist/themes/neutral.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[data-theme="light"] {
|
|
1
|
+
:root, [data-theme="light"] {
|
|
2
2
|
color-scheme: light;
|
|
3
3
|
|
|
4
4
|
--color-base-100: oklch(98.51% 0 0);
|
|
@@ -24,14 +24,38 @@ color-scheme: light;
|
|
|
24
24
|
[data-theme="dark"] {
|
|
25
25
|
color-scheme: dark;
|
|
26
26
|
|
|
27
|
-
--color-base-100: oklch(
|
|
28
|
-
--color-base-200: oklch(
|
|
29
|
-
--color-base-300: oklch(
|
|
30
|
-
--color-base-content: oklch(
|
|
31
|
-
--color-primary: oklch(
|
|
32
|
-
--color-primary-content: oklch(
|
|
33
|
-
--color-accent: oklch(
|
|
34
|
-
--color-accent-content: oklch(
|
|
27
|
+
--color-base-100: oklch(20.46% 0 0);
|
|
28
|
+
--color-base-200: oklch(25.2% 0 0);
|
|
29
|
+
--color-base-300: oklch(31.2% 0 0);
|
|
30
|
+
--color-base-content: oklch(92.19% 0 0);
|
|
31
|
+
--color-primary: oklch(76.5% 0 0);
|
|
32
|
+
--color-primary-content: oklch(20.46% 0 0);
|
|
33
|
+
--color-accent: oklch(70.8% 0 0);
|
|
34
|
+
--color-accent-content: oklch(20.46% 0 0);
|
|
35
|
+
--color-success: oklch(72.27% 0.192 149.58);
|
|
36
|
+
--color-error: oklch(57.71% 0.215 27.33);
|
|
37
|
+
--color-error-content: oklch(100.00% 0 0);
|
|
38
|
+
|
|
39
|
+
--radius-selector: 0.5rem;
|
|
40
|
+
--radius-field: 0.5rem;
|
|
41
|
+
--radius-box: 0.75rem;
|
|
42
|
+
--border: 1px;
|
|
43
|
+
--depth: 1;
|
|
44
|
+
--noise: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@media (prefers-color-scheme: dark) {
|
|
48
|
+
:root:not([data-theme]) {
|
|
49
|
+
color-scheme: dark;
|
|
50
|
+
|
|
51
|
+
--color-base-100: oklch(20.46% 0 0);
|
|
52
|
+
--color-base-200: oklch(25.2% 0 0);
|
|
53
|
+
--color-base-300: oklch(31.2% 0 0);
|
|
54
|
+
--color-base-content: oklch(92.19% 0 0);
|
|
55
|
+
--color-primary: oklch(76.5% 0 0);
|
|
56
|
+
--color-primary-content: oklch(20.46% 0 0);
|
|
57
|
+
--color-accent: oklch(70.8% 0 0);
|
|
58
|
+
--color-accent-content: oklch(20.46% 0 0);
|
|
35
59
|
--color-success: oklch(72.27% 0.192 149.58);
|
|
36
60
|
--color-error: oklch(57.71% 0.215 27.33);
|
|
37
61
|
--color-error-content: oklch(100.00% 0 0);
|
|
@@ -43,6 +67,7 @@ color-scheme: dark;
|
|
|
43
67
|
--depth: 1;
|
|
44
68
|
--noise: 0;
|
|
45
69
|
}
|
|
70
|
+
}
|
|
46
71
|
|
|
47
72
|
:root {
|
|
48
73
|
--publier-nav-height: 4rem;
|
|
@@ -52,17 +77,18 @@ color-scheme: dark;
|
|
|
52
77
|
--publier-layout-width: 1400px;
|
|
53
78
|
}
|
|
54
79
|
|
|
55
|
-
:root
|
|
80
|
+
:root,
|
|
81
|
+
:root[data-theme="light"] {
|
|
56
82
|
|
|
57
|
-
--color-pl-muted: oklch(42% 0
|
|
58
|
-
--color-pl-muted-bg: oklch(95% 0
|
|
59
|
-
--color-pl-subtle: oklch(55% 0
|
|
60
|
-
--color-pl-card: oklch(99.5% 0
|
|
61
|
-
--color-pl-card-hover: oklch(97% 0
|
|
62
|
-
--color-pl-popover: oklch(99.5% 0
|
|
63
|
-
--color-pl-border: oklch(90% 0
|
|
64
|
-
--color-pl-border-strong: oklch(82% 0
|
|
65
|
-
--color-pl-sidebar-accent: oklch(95% 0
|
|
83
|
+
--color-pl-muted: oklch(42% 0 0);
|
|
84
|
+
--color-pl-muted-bg: oklch(95% 0 0);
|
|
85
|
+
--color-pl-subtle: oklch(55% 0 0);
|
|
86
|
+
--color-pl-card: oklch(99.5% 0 0);
|
|
87
|
+
--color-pl-card-hover: oklch(97% 0 0);
|
|
88
|
+
--color-pl-popover: oklch(99.5% 0 0);
|
|
89
|
+
--color-pl-border: oklch(90% 0 0);
|
|
90
|
+
--color-pl-border-strong: oklch(82% 0 0);
|
|
91
|
+
--color-pl-sidebar-accent: oklch(95% 0 0);
|
|
66
92
|
--color-pl-sidebar-active: color-mix(in oklch, var(--color-primary) 10%, transparent);
|
|
67
93
|
--color-pl-sidebar-active-fg: var(--color-primary);
|
|
68
94
|
|
|
@@ -71,3 +97,23 @@ color-scheme: dark;
|
|
|
71
97
|
--menu-hover-bg: var(--color-pl-sidebar-accent);
|
|
72
98
|
--menu-hover-color: var(--color-pl-sidebar-accent-fg);
|
|
73
99
|
}
|
|
100
|
+
|
|
101
|
+
:root[data-theme="dark"],
|
|
102
|
+
.dark {
|
|
103
|
+
--color-pl-muted: oklch(72% 0 0);
|
|
104
|
+
--color-pl-muted-bg: oklch(22.5% 0 0);
|
|
105
|
+
--color-pl-subtle: oklch(65% 0 0);
|
|
106
|
+
--color-pl-card: oklch(20.5% 0 0);
|
|
107
|
+
--color-pl-card-hover: oklch(26% 0 0);
|
|
108
|
+
--color-pl-popover: oklch(20.5% 0 0);
|
|
109
|
+
--color-pl-border: oklch(28% 0 0);
|
|
110
|
+
--color-pl-border-strong: oklch(36% 0 0);
|
|
111
|
+
--color-pl-sidebar-accent: oklch(26% 0 0);
|
|
112
|
+
--color-pl-sidebar-active: color-mix(in oklch, var(--color-primary) 14%, transparent);
|
|
113
|
+
--color-pl-sidebar-active-fg: var(--color-primary);
|
|
114
|
+
|
|
115
|
+
--menu-active-bg: var(--color-pl-sidebar-active);
|
|
116
|
+
--menu-active-color: var(--color-pl-sidebar-active-fg);
|
|
117
|
+
--menu-hover-bg: var(--color-pl-sidebar-accent);
|
|
118
|
+
--menu-hover-color: var(--color-pl-sidebar-accent-fg);
|
|
119
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@publier/shell",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Qwik + Astro docs layout for Publier sites.",
|
|
6
6
|
"type": "module",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"@github/details-menu-element": "^1.0.13",
|
|
116
116
|
"@github/relative-time-element": "^5.3.1",
|
|
117
117
|
"@github/tab-container-element": "^4.9.0",
|
|
118
|
-
"@publier/native": "
|
|
118
|
+
"@publier/native": "3.0.0",
|
|
119
119
|
"@tailwindcss/typography": "^0.5.20",
|
|
120
120
|
"astro-pagefind": "^2.0.1",
|
|
121
121
|
"daisyui": "^5.7.22",
|
|
@@ -7,6 +7,7 @@ import ThemeToggle from '../components/theme-toggle.astro';
|
|
|
7
7
|
import TopNavMobile from '../components/top-nav-mobile.astro';
|
|
8
8
|
import { TopNav } from '../components/index.ts';
|
|
9
9
|
import { announcement } from 'virtual:publier-announcement';
|
|
10
|
+
import { appearance } from 'virtual:publier-appearance';
|
|
10
11
|
import { feeds } from 'virtual:publier-feeds';
|
|
11
12
|
import { fonts } from 'virtual:publier-fonts';
|
|
12
13
|
import { navConfig } from 'virtual:publier-nav-config';
|
|
@@ -29,7 +30,7 @@ if (navProp !== undefined) {
|
|
|
29
30
|
const storageKey = announcement?.storageKey ?? 'publier-announcement';
|
|
30
31
|
|
|
31
32
|
const [head, bodyOpen, bodyClose] = JSON.parse(shellRenderBaseLayout(JSON.stringify({
|
|
32
|
-
title, description, className, favicon: site.favicon, footer: site.footer, serviceWorker: !!site.serviceWorker,
|
|
33
|
+
title, description, className, defaultScheme: appearance.default, strictScheme: appearance.strict, favicon: site.favicon, footer: site.footer, serviceWorker: !!site.serviceWorker,
|
|
33
34
|
announcement: announcement && { ...announcement, variant: announcement.variant ?? 'info', storageKey, dismissible: true },
|
|
34
35
|
}))) as [string, string, string];
|
|
35
36
|
---
|
|
@@ -55,7 +56,7 @@ const [head, bodyOpen, bodyClose] = JSON.parse(shellRenderBaseLayout(JSON.string
|
|
|
55
56
|
{navVariant !== false && (
|
|
56
57
|
<TopNav variant={navVariant} currentPath={currentPath}>
|
|
57
58
|
{navConfig.searchEnabled && <SearchButton slot="search" />}
|
|
58
|
-
<ThemeToggle slot="theme" />
|
|
59
|
+
<ThemeToggle slot="theme" default={appearance.default} strict={appearance.strict} />
|
|
59
60
|
<TopNavMobile slot="mobile" variant={navVariant} currentPath={currentPath} />
|
|
60
61
|
</TopNav>
|
|
61
62
|
)}
|
|
@@ -27,7 +27,7 @@ const breadcrumbs = plan.breadcrumbs.map((crumb) => {
|
|
|
27
27
|
return page && crumb.href !== '/docs' ? { ...crumb, label: page.frontmatter.title } : crumb;
|
|
28
28
|
});
|
|
29
29
|
const ids = new Set(plan.section_entry_ids);
|
|
30
|
-
const sidebarItems = buildSidebar(pages.filter((_, index) => ids.has(all[index].id)), { urlPrefix: '/docs', meta: docsConfig.sidebarMeta });
|
|
30
|
+
const sidebarItems = buildSidebar(pages.filter((_, index) => ids.has(all[index].id)), { urlPrefix: '/docs', meta: docsConfig.sidebarMeta, defaultOpenLevel: docsConfig.defaultOpenLevel });
|
|
31
31
|
const [bodyHead, bodyTail] = shellRenderDocsSlug(JSON.stringify({ title: entry.data.title, description: entry.data.description ?? null })).split('<!--publier-content-slot-->');
|
|
32
32
|
const lastUpdated = entry.data.lastUpdated instanceof Date ? entry.data.lastUpdated : null;
|
|
33
33
|
---
|
package/src/virtual-modules.d.ts
CHANGED
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
* imports them directly.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
declare module 'virtual:publier-appearance' {
|
|
20
|
+
export const appearance: { default: 'system' | 'light' | 'dark'; strict: boolean };
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
declare module 'virtual:publier-theme-css';
|
|
20
24
|
declare module 'virtual:publier-custom-css';
|
|
21
25
|
|
|
@@ -146,6 +150,8 @@ declare module 'virtual:publier-docs-config' {
|
|
|
146
150
|
import type { SidebarMetaOverride } from '@publier/shell/search';
|
|
147
151
|
|
|
148
152
|
export interface DocsConfig {
|
|
153
|
+
/** Sidebar levels expanded by default, from sidebar.defaultOpenLevel. */
|
|
154
|
+
defaultOpenLevel?: number;
|
|
149
155
|
/**
|
|
150
156
|
* Top-level folders under `src/content/docs/` that render as their own
|
|
151
157
|
* tab-scoped sidebars. Empty array → single flat sidebar for every
|