@brillout/docpress 0.15.6 → 0.15.8

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.
@@ -2,15 +2,8 @@ export { RepoLink }
2
2
  export { getRepoHref }
3
3
 
4
4
  import React from 'react'
5
- import { assert } from '../utils/server'
6
5
  import { usePageContext } from '../renderer/usePageContext'
7
6
 
8
- function isRepoLink(href: string) {
9
- return ['/examples/', '/docs/', '/boilerplates/', '.github/', '/test/', '/packages/'].some((start) =>
10
- href.startsWith(start),
11
- )
12
- }
13
-
14
7
  function RepoLink({ path, text }: { path: string; text?: string | React.ReactNode }) {
15
8
  text = text || path
16
9
  const href = getRepoHref(path)
@@ -19,7 +12,6 @@ function RepoLink({ path, text }: { path: string; text?: string | React.ReactNod
19
12
 
20
13
  function getRepoHref(path: string, editMode = false) {
21
14
  const pageContext = usePageContext()
22
- assert(isRepoLink(path), { path })
23
15
  if (!path.startsWith('/')) {
24
16
  path = '/' + path
25
17
  }
@@ -1,13 +1,7 @@
1
1
  export { RepoLink };
2
2
  export { getRepoHref };
3
3
  import React from 'react';
4
- import { assert } from '../utils/server';
5
4
  import { usePageContext } from '../renderer/usePageContext';
6
- function isRepoLink(href) {
7
- return ['/examples/', '/docs/', '/boilerplates/', '.github/', '/test/', '/packages/'].some(function (start) {
8
- return href.startsWith(start);
9
- });
10
- }
11
5
  function RepoLink(_a) {
12
6
  var path = _a.path, text = _a.text;
13
7
  text = text || path;
@@ -17,7 +11,6 @@ function RepoLink(_a) {
17
11
  function getRepoHref(path, editMode) {
18
12
  if (editMode === void 0) { editMode = false; }
19
13
  var pageContext = usePageContext();
20
- assert(isRepoLink(path), { path: path });
21
14
  if (!path.startsWith('/')) {
22
15
  path = '/' + path;
23
16
  }
package/global.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // https://stackoverflow.com/questions/52005083/how-to-define-css-variables-in-style-attribute-in-react-and-typescript/70398145#70398145
2
2
  import 'react'
3
- declare module 'react' {
3
+ module 'react' {
4
4
  interface CSSProperties {
5
5
  [key: `--${string}`]: string | number | undefined
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.15.6",
3
+ "version": "0.15.8",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@brillout/picocolors": "^1.0.10",
@@ -57,7 +57,7 @@
57
57
  }
58
58
  },
59
59
  "devDependencies": {
60
- "@brillout/release-me": "^0.4.7",
60
+ "@brillout/release-me": "^0.4.8",
61
61
  "@types/node": "^22.5.5",
62
62
  "@types/react": "^18.3.8",
63
63
  "@types/react-dom": "^18.3.0"