@brillout/docpress 0.12.3 → 0.12.5
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/components/Algolia/Hit.tsx +1 -1
- package/css/code/block.css +18 -11
- package/dist/utils/assert.js +1 -1
- package/docsearch/DocSearchInstall.tsx +8 -0
- package/package.json +1 -1
- package/utils/assert.ts +1 -1
|
@@ -14,7 +14,7 @@ type HierarchyType = Exclude<DocSearchHit['type'], 'content'>
|
|
|
14
14
|
|
|
15
15
|
function Hit({ hit }: HitProps) {
|
|
16
16
|
return (
|
|
17
|
-
<a href={hit.
|
|
17
|
+
<a href={hit.url}>
|
|
18
18
|
<div className="DocSearch-Hit-Container">
|
|
19
19
|
{(hit as InternalDocSearchHit).__docsearch_parent && (
|
|
20
20
|
<svg className="DocSearch-Hit-Tree" viewBox="0 0 24 54">
|
package/css/code/block.css
CHANGED
|
@@ -32,18 +32,25 @@ figure[data-rehype-pretty-code-figure] {
|
|
|
32
32
|
font-size: 0.8em !important;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
/* `@media (pointer: fine)`
|
|
36
|
+
* - Further reduce code block font size only on mobile.
|
|
37
|
+
* - https://github.com/vikejs/vike/issues/2369#issuecomment-2803046966
|
|
38
|
+
* - https://stackoverflow.com/questions/23885255/how-to-remove-ignore-hover-css-style-on-touch-devices/64553121#64553121
|
|
39
|
+
*/
|
|
40
|
+
@media not all and (hover: hover) and (pointer: fine) {
|
|
41
|
+
@container container-viewport (max-width: 620px) {
|
|
42
|
+
pre > code {
|
|
43
|
+
font-size: 0.7em !important;
|
|
44
|
+
}
|
|
38
45
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
@container container-viewport (max-width: 550px) {
|
|
47
|
+
pre > code {
|
|
48
|
+
font-size: 0.6em !important;
|
|
49
|
+
}
|
|
43
50
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
@container container-viewport (max-width: 450px) {
|
|
52
|
+
pre > code {
|
|
53
|
+
font-size: 0.5em !important;
|
|
54
|
+
}
|
|
48
55
|
}
|
|
49
56
|
}
|
package/dist/utils/assert.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { assert };
|
|
2
2
|
export { assertUsage };
|
|
3
3
|
export { assertWarning };
|
|
4
|
-
import { getGlobalObject } from './getGlobalObject';
|
|
4
|
+
import { getGlobalObject } from './getGlobalObject.js';
|
|
5
5
|
var devModeKey = '__docpress_dev_mode';
|
|
6
6
|
var globalObject = getGlobalObject('utils/assert.ts', {
|
|
7
7
|
alreadyLogged: new Set(),
|
|
@@ -21,6 +21,14 @@ function DocSearchInstall() {
|
|
|
21
21
|
searchParameters={{
|
|
22
22
|
filters: 'is_available:true',
|
|
23
23
|
}}
|
|
24
|
+
transformItems={(hits) => {
|
|
25
|
+
hits.map((hit) => {
|
|
26
|
+
if (hit.type === 'lvl1') {
|
|
27
|
+
hit.url = hit.url.split('#')[0]
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
return hits
|
|
31
|
+
}}
|
|
24
32
|
/>
|
|
25
33
|
</div>
|
|
26
34
|
)
|
package/package.json
CHANGED
package/utils/assert.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { assert }
|
|
|
2
2
|
export { assertUsage }
|
|
3
3
|
export { assertWarning }
|
|
4
4
|
|
|
5
|
-
import { getGlobalObject } from './getGlobalObject'
|
|
5
|
+
import { getGlobalObject } from './getGlobalObject.js'
|
|
6
6
|
const devModeKey = '__docpress_dev_mode'
|
|
7
7
|
const globalObject = getGlobalObject('utils/assert.ts', {
|
|
8
8
|
alreadyLogged: new Set<string>(),
|