@brillout/docpress 0.5.0 → 0.5.2
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 +12 -1
- package/dist/index.js +27 -8
- package/dist/renderer/_default.page.client.css +5 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -116,6 +116,17 @@ declare function Warning({ children }: {
|
|
|
116
116
|
declare function Construction({ children }: {
|
|
117
117
|
children: JSX.Element;
|
|
118
118
|
}): JSX.Element;
|
|
119
|
+
declare function Danger({ children }: {
|
|
120
|
+
children: JSX.Element;
|
|
121
|
+
}): JSX.Element;
|
|
122
|
+
declare function NoteWithoutIcon({ children }: {
|
|
123
|
+
children: JSX.Element;
|
|
124
|
+
}): JSX.Element;
|
|
125
|
+
type CustomIcon = JSX.Element | string;
|
|
126
|
+
declare function NoteWithCustomIcon({ icon, children }: {
|
|
127
|
+
children: JSX.Element;
|
|
128
|
+
icon: CustomIcon;
|
|
129
|
+
}): JSX.Element;
|
|
119
130
|
|
|
120
131
|
declare function ImportMeta({ prop }: {
|
|
121
132
|
prop: string;
|
|
@@ -151,4 +162,4 @@ declare function CodeBlockTransformer({ children, lineBreak }: {
|
|
|
151
162
|
lineBreak: LineBreak;
|
|
152
163
|
}): JSX.Element;
|
|
153
164
|
|
|
154
|
-
export { CodeBlockTransformer, Config, Construction, Emoji, EmojiName, HeadingDefinition, HeadingDetachedDefinition, HorizontalLine, ImportMeta, Info, Link, P, ReadingRecommendation, RepoLink, Sponsor, Sponsors, Warning, assert, assertUsage, assertWarning, crawlAllFiles, determineSectionTitle, determineSectionUrlHash, filter, isBrowser, isRepoLink, jsxToTextContent, objectAssign };
|
|
165
|
+
export { CodeBlockTransformer, Config, Construction, Danger, Emoji, EmojiName, HeadingDefinition, HeadingDetachedDefinition, HorizontalLine, ImportMeta, Info, Link, NoteWithCustomIcon, NoteWithoutIcon, P, ReadingRecommendation, RepoLink, Sponsor, Sponsors, Warning, assert, assertUsage, assertWarning, crawlAllFiles, determineSectionTitle, determineSectionUrlHash, filter, isBrowser, isRepoLink, jsxToTextContent, objectAssign };
|
package/dist/index.js
CHANGED
|
@@ -190,32 +190,48 @@ function Construction({ children }) {
|
|
|
190
190
|
type: "construction"
|
|
191
191
|
}, children);
|
|
192
192
|
}
|
|
193
|
+
function Danger({ children }) {
|
|
194
|
+
return /* @__PURE__ */ React5.createElement(Note, {
|
|
195
|
+
type: "danger"
|
|
196
|
+
}, children);
|
|
197
|
+
}
|
|
198
|
+
function NoteWithoutIcon({ children }) {
|
|
199
|
+
return /* @__PURE__ */ React5.createElement(Note, {
|
|
200
|
+
icon: null
|
|
201
|
+
}, children);
|
|
202
|
+
}
|
|
203
|
+
function NoteWithCustomIcon({ icon, children }) {
|
|
204
|
+
return /* @__PURE__ */ React5.createElement(Note, {
|
|
205
|
+
icon
|
|
206
|
+
}, children);
|
|
207
|
+
}
|
|
193
208
|
function Note({
|
|
194
209
|
type,
|
|
195
210
|
icon,
|
|
196
211
|
children
|
|
197
212
|
}) {
|
|
213
|
+
assert(icon === null || icon || type);
|
|
198
214
|
let className = "custom-icon";
|
|
199
215
|
if (type) {
|
|
200
216
|
className = `${className} type-${type}`;
|
|
201
217
|
}
|
|
202
|
-
if (!icon) {
|
|
218
|
+
if (!icon && type) {
|
|
203
219
|
let classColor = "";
|
|
204
|
-
if (type === "
|
|
220
|
+
if (type === "danger") {
|
|
205
221
|
icon = ":no_entry:";
|
|
206
|
-
classColor = "color-
|
|
222
|
+
classColor = "note-color-red";
|
|
207
223
|
}
|
|
208
224
|
if (type === "warning") {
|
|
209
225
|
icon = ":warning:";
|
|
210
|
-
classColor = "color-
|
|
226
|
+
classColor = "note-color-yellow";
|
|
211
227
|
}
|
|
212
228
|
if (type === "construction") {
|
|
213
229
|
icon = ":construction:";
|
|
214
|
-
classColor = "color-
|
|
215
|
-
}
|
|
216
|
-
if (classColor) {
|
|
217
|
-
className = `${className} ${classColor}`;
|
|
230
|
+
classColor = "note-color-yellow";
|
|
218
231
|
}
|
|
232
|
+
assert(icon);
|
|
233
|
+
assert(classColor);
|
|
234
|
+
className = `${className} ${classColor}`;
|
|
219
235
|
}
|
|
220
236
|
return /* @__PURE__ */ React5.createElement("blockquote", {
|
|
221
237
|
className
|
|
@@ -602,12 +618,15 @@ function CodeBlockTransformer({ children, lineBreak }) {
|
|
|
602
618
|
export {
|
|
603
619
|
CodeBlockTransformer,
|
|
604
620
|
Construction,
|
|
621
|
+
Danger,
|
|
605
622
|
Emoji,
|
|
606
623
|
FeatureList,
|
|
607
624
|
HorizontalLine,
|
|
608
625
|
ImportMeta,
|
|
609
626
|
Info,
|
|
610
627
|
Link,
|
|
628
|
+
NoteWithCustomIcon,
|
|
629
|
+
NoteWithoutIcon,
|
|
611
630
|
P,
|
|
612
631
|
ReadingRecommendation,
|
|
613
632
|
RepoLink,
|
|
@@ -271,7 +271,7 @@ blockquote {
|
|
|
271
271
|
margin-right: 0;
|
|
272
272
|
padding: 4px 16px;
|
|
273
273
|
}
|
|
274
|
-
blockquote.color-
|
|
274
|
+
blockquote.note-color-red {
|
|
275
275
|
--color-strengh-bg: 1.7;
|
|
276
276
|
--color-strengh-border: 6;
|
|
277
277
|
--color:
|
|
@@ -279,7 +279,7 @@ blockquote.color-error {
|
|
|
279
279
|
25,
|
|
280
280
|
49;
|
|
281
281
|
}
|
|
282
|
-
blockquote.color-
|
|
282
|
+
blockquote.note-color-yellow {
|
|
283
283
|
--color-strengh-bg: 4;
|
|
284
284
|
--color-strengh-border: 8;
|
|
285
285
|
--color:
|
|
@@ -301,6 +301,9 @@ blockquote.type-warning img[src^="https://twemoji."] {
|
|
|
301
301
|
top: -1px;
|
|
302
302
|
margin-right: 2px;
|
|
303
303
|
}
|
|
304
|
+
blockquote.type-danger img[src^="https://twemoji."] {
|
|
305
|
+
margin-right: 2px;
|
|
306
|
+
}
|
|
304
307
|
blockquote > p:first-child::before,
|
|
305
308
|
blockquote > div.paragraph:first-child::before {
|
|
306
309
|
font-family: emoji;
|