@tnotesjs/ui 0.1.2 → 0.1.4
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/code/highlight.js +1 -0
- package/package.json +1 -1
- package/src/code/highlight.ts +1 -0
- package/src/styles/prose.css +7 -1
package/dist/code/highlight.js
CHANGED
|
@@ -85,6 +85,7 @@ async function prepareCodeHighlighter(languages = []) {
|
|
|
85
85
|
let pending = loading.get(language);
|
|
86
86
|
if (!pending) {
|
|
87
87
|
const loader = bundledLanguages[language] ?? bundledLanguagesAlias[language];
|
|
88
|
+
if (!loader) return;
|
|
88
89
|
pending = highlighter.loadLanguage(loader).then(() => void 0);
|
|
89
90
|
loading.set(language, pending);
|
|
90
91
|
pending.catch(() => loading.delete(language));
|
package/package.json
CHANGED
package/src/code/highlight.ts
CHANGED
|
@@ -118,6 +118,7 @@ export async function prepareCodeHighlighter(
|
|
|
118
118
|
const loader =
|
|
119
119
|
bundledLanguages[language as keyof typeof bundledLanguages] ??
|
|
120
120
|
bundledLanguagesAlias[language as keyof typeof bundledLanguagesAlias];
|
|
121
|
+
if (!loader) return;
|
|
121
122
|
pending = highlighter.loadLanguage(loader).then(() => undefined);
|
|
122
123
|
loading.set(language, pending);
|
|
123
124
|
pending.catch(() => loading.delete(language));
|
package/src/styles/prose.css
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
font-optical-sizing: auto;
|
|
7
7
|
font-synthesis: style;
|
|
8
8
|
line-height: 1.5;
|
|
9
|
+
overflow-wrap: anywhere;
|
|
10
|
+
word-break: break-word;
|
|
9
11
|
-webkit-font-smoothing: antialiased;
|
|
10
12
|
}
|
|
11
13
|
:is(.tn-prose, .vp-doc) :where(p) {
|
|
@@ -48,6 +50,8 @@
|
|
|
48
50
|
color: var(--tn-c-brand);
|
|
49
51
|
text-decoration: none;
|
|
50
52
|
font-weight: 500;
|
|
53
|
+
overflow-wrap: anywhere;
|
|
54
|
+
word-break: break-word;
|
|
51
55
|
}
|
|
52
56
|
:is(.tn-prose, .vp-doc) :where(a:hover) {
|
|
53
57
|
color: var(--tn-c-brand-hover);
|
|
@@ -125,7 +129,9 @@
|
|
|
125
129
|
width: 100%;
|
|
126
130
|
height: auto;
|
|
127
131
|
}
|
|
128
|
-
:is(.tn-prose, .vp-doc) :where(figure.tn-image > figcaption)
|
|
132
|
+
:is(.tn-prose, .vp-doc) :where(figure.tn-image > figcaption),
|
|
133
|
+
:is(.tn-prose, .vp-doc) :where(figcaption) {
|
|
134
|
+
display: block;
|
|
129
135
|
margin: 8px 0 0;
|
|
130
136
|
color: var(--tn-c-text-2);
|
|
131
137
|
font-size: 13px;
|