@brillout/docpress 0.4.15 → 0.4.16
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 +4 -3
- package/dist/index.js +8 -16
- package/dist/renderer/_default.page.client.css +11 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -150,9 +150,10 @@ type DivSize = {
|
|
|
150
150
|
};
|
|
151
151
|
declare function Sponsors(): JSX.Element;
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
type LineBreak = 'white-space' | 'break-word';
|
|
154
|
+
declare function CodeBlockTransformer({ children, lineBreak }: {
|
|
154
155
|
children: any;
|
|
155
|
-
lineBreak
|
|
156
|
+
lineBreak: LineBreak;
|
|
156
157
|
}): JSX.Element;
|
|
157
158
|
|
|
158
|
-
export {
|
|
159
|
+
export { CodeBlockTransformer, 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
|
@@ -582,28 +582,20 @@ function isIndividual(sponsor) {
|
|
|
582
582
|
return "username" in sponsor;
|
|
583
583
|
}
|
|
584
584
|
|
|
585
|
-
// src/components/
|
|
585
|
+
// src/components/CodeBlockTransformer.tsx
|
|
586
586
|
import React9 from "react";
|
|
587
|
-
function
|
|
587
|
+
function CodeBlockTransformer({ children, lineBreak }) {
|
|
588
588
|
assert(
|
|
589
589
|
lineBreak === "white-space" || lineBreak === "break-word",
|
|
590
|
-
"`lineBreak` is currently the only use case for <
|
|
590
|
+
"`lineBreak` is currently the only use case for <CodeBlockTransformer>"
|
|
591
591
|
);
|
|
592
|
-
const
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
if (lineBreak === "break-word") {
|
|
597
|
-
style.wordWrap = "break-word";
|
|
598
|
-
style.wordBreak = "break-all";
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
return /* @__PURE__ */ React9.createElement("pre", null, /* @__PURE__ */ React9.createElement("code", {
|
|
602
|
-
style
|
|
603
|
-
}, children));
|
|
592
|
+
const className = `with-line-break_${lineBreak}`;
|
|
593
|
+
return /* @__PURE__ */ React9.createElement("div", {
|
|
594
|
+
className
|
|
595
|
+
}, children);
|
|
604
596
|
}
|
|
605
597
|
export {
|
|
606
|
-
|
|
598
|
+
CodeBlockTransformer,
|
|
607
599
|
Construction,
|
|
608
600
|
Emoji,
|
|
609
601
|
FeatureList,
|
|
@@ -300,4 +300,15 @@ blockquote > div.paragraph:first-child::before {
|
|
|
300
300
|
margin-right: 4px;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
+
/* src/components/CodeBlockTransformer.css */
|
|
304
|
+
.with-line-break_white-space code,
|
|
305
|
+
.with-line-break_break-word code {
|
|
306
|
+
white-space: break-spaces;
|
|
307
|
+
padding-right: 16px !important;
|
|
308
|
+
}
|
|
309
|
+
.with-line-break_break-word code {
|
|
310
|
+
word-wrap: break-word;
|
|
311
|
+
word-break: break-all;
|
|
312
|
+
}
|
|
313
|
+
|
|
303
314
|
/* src/css/index.css */
|