@brillout/docpress 0.4.14 → 0.4.15
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/dist/index.d.ts +1 -1
- package/dist/index.js +10 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -152,7 +152,7 @@ declare function Sponsors(): JSX.Element;
|
|
|
152
152
|
|
|
153
153
|
declare function CodeBlock({ children, lineBreak }: {
|
|
154
154
|
children: any;
|
|
155
|
-
lineBreak?:
|
|
155
|
+
lineBreak?: 'white-space' | 'break-word';
|
|
156
156
|
}): JSX.Element;
|
|
157
157
|
|
|
158
158
|
export { CodeBlock, Config, Construction, Emoji, EmojiName, HeadingDefinition, HeadingDetachedDefinition, HorizontalLine, ImportMeta, Info, Link, Note, P, ReadingRecommendation, RepoLink, Sponsor, Sponsors, Warning, assert, assertUsage, assertWarning, crawlAllFiles, determineSectionTitle, determineSectionUrlHash, filter, isBrowser, isRepoLink, jsxToTextContent, objectAssign };
|
package/dist/index.js
CHANGED
|
@@ -585,15 +585,18 @@ function isIndividual(sponsor) {
|
|
|
585
585
|
// src/components/CodeBlock.tsx
|
|
586
586
|
import React9 from "react";
|
|
587
587
|
function CodeBlock({ children, lineBreak }) {
|
|
588
|
-
assert(
|
|
588
|
+
assert(
|
|
589
|
+
lineBreak === "white-space" || lineBreak === "break-word",
|
|
590
|
+
"`lineBreak` is currently the only use case for <CodeBlock>"
|
|
591
|
+
);
|
|
589
592
|
const style = {};
|
|
590
593
|
if (lineBreak) {
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
}
|
|
594
|
+
style.whiteSpace = "break-spaces";
|
|
595
|
+
style.paddingRight = "16px !important";
|
|
596
|
+
if (lineBreak === "break-word") {
|
|
597
|
+
style.wordWrap = "break-word";
|
|
598
|
+
style.wordBreak = "break-all";
|
|
599
|
+
}
|
|
597
600
|
}
|
|
598
601
|
return /* @__PURE__ */ React9.createElement("pre", null, /* @__PURE__ */ React9.createElement("code", {
|
|
599
602
|
style
|