@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.
- package/NavItemComponent.tsx +11 -0
- package/dist/NavItemComponent.d.ts +0 -1
- package/dist/NavItemComponent.js +0 -1
- package/global.d.ts +3 -1
- package/package.json +1 -1
- package/tsconfig.config.json +1 -1
package/NavItemComponent.tsx
CHANGED
|
@@ -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 = {
|
package/dist/NavItemComponent.js
CHANGED
|
@@ -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
package/tsconfig.config.json
CHANGED