@brillout/docpress 0.4.14 → 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 +11 -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,25 +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
|
|
588
|
-
assert(
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
});
|
|
597
|
-
}
|
|
598
|
-
return /* @__PURE__ */ React9.createElement("pre", null, /* @__PURE__ */ React9.createElement("code", {
|
|
599
|
-
style
|
|
600
|
-
}, children));
|
|
587
|
+
function CodeBlockTransformer({ children, lineBreak }) {
|
|
588
|
+
assert(
|
|
589
|
+
lineBreak === "white-space" || lineBreak === "break-word",
|
|
590
|
+
"`lineBreak` is currently the only use case for <CodeBlockTransformer>"
|
|
591
|
+
);
|
|
592
|
+
const className = `with-line-break_${lineBreak}`;
|
|
593
|
+
return /* @__PURE__ */ React9.createElement("div", {
|
|
594
|
+
className
|
|
595
|
+
}, children);
|
|
601
596
|
}
|
|
602
597
|
export {
|
|
603
|
-
|
|
598
|
+
CodeBlockTransformer,
|
|
604
599
|
Construction,
|
|
605
600
|
Emoji,
|
|
606
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 */
|