@brillout/docpress 0.4.5 → 0.4.6

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.ts CHANGED
@@ -84,11 +84,12 @@ type Config = {
84
84
  i18n?: true;
85
85
  };
86
86
 
87
- declare function Link(props: {
87
+ declare function Link({ href, text, noBreadcrumb, doNotInferSectionTitle, titleNormalCase }: {
88
88
  href: string;
89
89
  text?: string | JSX.Element;
90
90
  noBreadcrumb?: true;
91
91
  doNotInferSectionTitle?: true;
92
+ titleNormalCase?: boolean;
92
93
  }): JSX.Element;
93
94
 
94
95
  declare function isRepoLink(href: string): boolean;
package/dist/index.js CHANGED
@@ -27,28 +27,24 @@ import "./chunk-3QC7HYIF.js";
27
27
 
28
28
  // src/components/Link.tsx
29
29
  import React from "react";
30
- function Link(props) {
31
- if (isRepoLink(props.href)) {
32
- return /* @__PURE__ */ React.createElement(RepoLink, {
33
- path: props.href,
34
- text: props.text
35
- });
36
- } else {
37
- return /* @__PURE__ */ React.createElement(DocLink, {
38
- ...props
39
- });
40
- }
41
- }
42
- function DocLink({
30
+ function Link({
43
31
  href,
44
32
  text,
45
33
  noBreadcrumb,
46
- doNotInferSectionTitle
34
+ doNotInferSectionTitle,
35
+ titleNormalCase
47
36
  }) {
48
- const pageContext = usePageContext();
49
- return /* @__PURE__ */ React.createElement("a", {
50
- href
51
- }, text || getTitle({ href, noBreadcrumb, pageContext, doNotInferSectionTitle }));
37
+ if (isRepoLink(href)) {
38
+ return /* @__PURE__ */ React.createElement(RepoLink, {
39
+ path: href,
40
+ text
41
+ });
42
+ } else {
43
+ const pageContext = usePageContext();
44
+ return /* @__PURE__ */ React.createElement("a", {
45
+ href
46
+ }, text || getTitle({ href, noBreadcrumb, pageContext, doNotInferSectionTitle, titleNormalCase }));
47
+ }
52
48
  }
53
49
  function getTitle({
54
50
  href,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "scripts": {
5
5
  "// Check types while developing": "",
6
6
  "types": "tsc --noEmit --watch",