@brillout/docpress 0.9.6 → 0.9.7

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/Layout.tsx CHANGED
@@ -448,7 +448,7 @@ function NavHeaderLeftFullWidthBackground() {
448
448
 
449
449
  function NavLogo({ className }: { className: string }) {
450
450
  const pageContext = usePageContext()
451
- const iconSize = 39
451
+ const iconSize = pageContext.config.navLogoSize ?? 39
452
452
  const { projectName } = pageContext.meta
453
453
  return (
454
454
  <a
@@ -477,6 +477,7 @@ function NavLogo({ className }: { className: string }) {
477
477
  style={{
478
478
  marginLeft: `calc(var(--icon-text-padding) + 2px)`,
479
479
  fontSize: isProjectNameShort(projectName) ? '1.65em' : '1.3em',
480
+ ...pageContext.config.navLogoTextStyle,
480
481
  }}
481
482
  >
482
483
  {projectName}
package/dist/Layout.js CHANGED
@@ -260,9 +260,10 @@ function NavHeaderLeftFullWidthBackground() {
260
260
  css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n@container container-viewport (min-width: 0px) {\n .nav-bg {\n width: 100cqw;\n }\n}\n"], ["\n@container container-viewport (min-width: 0px) {\n .nav-bg {\n width: 100cqw;\n }\n}\n"]))))));
261
261
  }
262
262
  function NavLogo(_a) {
263
+ var _b;
263
264
  var className = _a.className;
264
265
  var pageContext = usePageContext();
265
- var iconSize = 39;
266
+ var iconSize = (_b = pageContext.config.navLogoSize) !== null && _b !== void 0 ? _b : 39;
266
267
  var projectName = pageContext.meta.projectName;
267
268
  return (React.createElement("a", { className: cls(['nav-logo', className]), style: {
268
269
  display: 'flex',
@@ -279,10 +280,7 @@ function NavLogo(_a) {
279
280
  ev.preventDefault();
280
281
  navigate('/press#logo');
281
282
  } }),
282
- React.createElement("span", { style: {
283
- marginLeft: "calc(var(--icon-text-padding) + 2px)",
284
- fontSize: isProjectNameShort(projectName) ? '1.65em' : '1.3em',
285
- } }, projectName)));
283
+ React.createElement("span", { style: __assign({ marginLeft: "calc(var(--icon-text-padding) + 2px)", fontSize: isProjectNameShort(projectName) ? '1.65em' : '1.3em' }, pageContext.config.navLogoTextStyle) }, projectName)));
286
284
  }
287
285
  function isProjectNameShort(projectName) {
288
286
  return projectName.length <= 4;
@@ -28,4 +28,6 @@ type Config = {
28
28
  pressKit?: true;
29
29
  sponsorGithubAccount?: string;
30
30
  navMaxWidth?: number;
31
+ navLogoSize?: number;
32
+ navLogoTextStyle?: React.CSSProperties;
31
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@brillout/picocolors": "^1.0.10",
package/types/Config.ts CHANGED
@@ -30,4 +30,6 @@ type Config = {
30
30
  pressKit?: true
31
31
  sponsorGithubAccount?: string
32
32
  navMaxWidth?: number
33
+ navLogoSize?: number
34
+ navLogoTextStyle?: React.CSSProperties
33
35
  }