@brillout/docpress 0.15.8 → 0.15.10

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.
@@ -8,7 +8,18 @@ import React from 'react'
8
8
  import { assert, assertWarning, jsxToTextContent } from './utils/server'
9
9
  import './NavItemComponent.css'
10
10
  import { parseMarkdownMini } from './parseMarkdownMini'
11
+
12
+ /*
13
+ // We cannot do that: we must use `import type` otherwise Vite will transpile global.d.ts and throw:
14
+ // ```console
15
+ // [11:55:47.528][/docs/.test-dev.test.ts][pnpm run dev][stderr] 11:55:47 AM [vite] Failed to transpile /home/runner/work/telefunc/telefunc/node_modules/.pnpm/@brillout+docpress@0.15.7_@algolia+client-search@5.31.0_@types+react@19.1.8_@vitejs+plugin-re_lcm3fspejcg3ebrmr3gvb5i3se/node_modules/@brillout/docpress/global.d.ts because:
16
+ // x `declare` modifier not allowed for code already in an ambient context
17
+ // ```
11
18
  import './global.d.ts'
19
+ /*/
20
+ // The only purpose of `FakeExport` is to be able to use `import type`
21
+ import type { FakeExport } from './global.d.ts'
22
+ //*/
12
23
 
13
24
  type NavItemComputed = ReturnType<typeof getNavItemsWithComputed>[number]
14
25
  type NavItem = {
@@ -5,7 +5,6 @@ export type { NavItemComputed };
5
5
  export type { ColumnMap };
6
6
  import React from 'react';
7
7
  import './NavItemComponent.css';
8
- import './global.d.ts';
9
8
  type NavItemComputed = ReturnType<typeof getNavItemsWithComputed>[number];
10
9
  type NavItem = {
11
10
  level: number;
@@ -15,7 +15,6 @@ import React from 'react';
15
15
  import { assert, assertWarning, jsxToTextContent } from './utils/server';
16
16
  import './NavItemComponent.css';
17
17
  import { parseMarkdownMini } from './parseMarkdownMini';
18
- import './global.d.ts';
19
18
  function NavItemComponent(_a) {
20
19
  var _b;
21
20
  var _c;
package/global.d.ts CHANGED
@@ -1,7 +1,9 @@
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
- module 'react' {
3
+ declare module 'react' {
4
4
  interface CSSProperties {
5
5
  [key: `--${string}`]: string | number | undefined
6
6
  }
7
7
  }
8
+ // The only purpose of `FakeExport` is to be able to use `import type`
9
+ export type FakeExport = never
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.15.8",
3
+ "version": "0.15.10",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@brillout/picocolors": "^1.0.10",
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "extends": "./tsconfig.json",
3
- "files": ["vite.config.ts", "+config.ts"]
3
+ "files": ["vite.config.ts", "+config.ts", "global.d.ts"]
4
4
  }