@apify/ui-library 0.67.1 → 0.67.3-fixactorreadmeinlinecodeover-4ecb5d.23
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/CHANGELOG.md +11 -0
- package/dist/src/components/code/code_block/utils.d.ts.map +1 -1
- package/dist/src/components/code/code_block/utils.js +7 -4
- package/dist/src/components/code/code_block/utils.js.map +1 -1
- package/dist/src/components/to_consolidate/markdown.d.ts.map +1 -1
- package/dist/src/components/to_consolidate/markdown.js +6 -0
- package/dist/src/components/to_consolidate/markdown.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/code/code_block/utils.tsx +18 -4
- package/src/components/to_consolidate/markdown.tsx +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apify/ui-library",
|
|
3
|
-
"version": "0.67.
|
|
3
|
+
"version": "0.67.3-fixactorreadmeinlinecodeover-4ecb5d.23+5cbc5775c48",
|
|
4
4
|
"description": "React UI library used by apify.com",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"typescript": "^5.1.6",
|
|
66
66
|
"typescript-eslint": "^8.24.0"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "5cbc5775c48fd61c63a7f703418c2fa1446fbb28"
|
|
69
69
|
}
|
|
@@ -27,18 +27,29 @@ export const getBashLinePrefixes = (
|
|
|
27
27
|
|
|
28
28
|
if (bashCommandsStart.includes(i + 1)) {
|
|
29
29
|
return (
|
|
30
|
-
<CodeHighlighterLineBashPrefix
|
|
30
|
+
<CodeHighlighterLineBashPrefix
|
|
31
|
+
$isOneLine={isOneLine}
|
|
32
|
+
color={theme.color.lavender.base}
|
|
33
|
+
key={`code-highlighter-line-bash-prefix-${i}`}
|
|
34
|
+
>$</CodeHighlighterLineBashPrefix>
|
|
31
35
|
);
|
|
32
36
|
}
|
|
33
37
|
|
|
34
38
|
if (isEmptyLine) {
|
|
35
39
|
return (
|
|
36
|
-
<CodeHighlighterLineBashPrefix
|
|
40
|
+
<CodeHighlighterLineBashPrefix
|
|
41
|
+
$isOneLine={isOneLine}
|
|
42
|
+
key={`code-highlighter-line-bash-prefix-${i}`}
|
|
43
|
+
/>
|
|
37
44
|
);
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
return (
|
|
41
|
-
<CodeHighlighterLineBashPrefix
|
|
48
|
+
<CodeHighlighterLineBashPrefix
|
|
49
|
+
$isOneLine={isOneLine}
|
|
50
|
+
color={theme.color.lavender.base}
|
|
51
|
+
key={`code-highlighter-line-bash-prefix-${i}`}
|
|
52
|
+
><</CodeHighlighterLineBashPrefix>
|
|
42
53
|
);
|
|
43
54
|
});
|
|
44
55
|
|
|
@@ -49,5 +60,8 @@ export const getNumberLinePrefixes = (code: string): Record<number, ReactNode> =
|
|
|
49
60
|
const numberOfLines = code.split('\n').length;
|
|
50
61
|
const numbersArray = Array.from({ length: numberOfLines }, (_, i) => i + 1);
|
|
51
62
|
|
|
52
|
-
return Object.fromEntries(numbersArray.map((number) => [
|
|
63
|
+
return Object.fromEntries(numbersArray.map((number) => [
|
|
64
|
+
number,
|
|
65
|
+
<CodeHighlighterLinePrefix key={`code-highlighter-line-prefix-${number}`}>{number}</CodeHighlighterLinePrefix>,
|
|
66
|
+
]));
|
|
53
67
|
};
|
|
@@ -259,12 +259,18 @@ const StyledMarkdown = styled(ReactMarkdown) <StyledReadmeProps>`
|
|
|
259
259
|
.${markdownClassNames.INLINE_CODE} {
|
|
260
260
|
${inlineCodeStyles}
|
|
261
261
|
${theme.typography.content.mobile.snippet}
|
|
262
|
+
/* prevents long URLs from overflowing its container */
|
|
263
|
+
hyphens: auto;
|
|
264
|
+
overflow-wrap: break-word;
|
|
265
|
+
|
|
262
266
|
@media (min-width: ${theme.layout.tablet}) {
|
|
263
267
|
${theme.typography.content.tablet.snippet}
|
|
264
268
|
}
|
|
269
|
+
|
|
265
270
|
@media (min-width: ${theme.layout.desktop}) {
|
|
266
271
|
${theme.typography.content.desktop.snippet}
|
|
267
272
|
}
|
|
273
|
+
|
|
268
274
|
b, strong{
|
|
269
275
|
font-size: inherit !important;
|
|
270
276
|
line-height: inherit !important;
|