@foblex/m-render 3.0.5 → 4.0.1
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/assets/styles/_alert.scss +9 -4
- package/assets/styles/_badge.scss +27 -13
- package/assets/styles/_button.scss +13 -4
- package/assets/styles/_code-group.scss +36 -0
- package/assets/styles/_code-highlight.scss +16 -36
- package/assets/styles/_code-view.scss +213 -37
- package/assets/styles/_doc-text.scss +94 -69
- package/assets/styles/_icons.scss +4 -3
- package/assets/styles/_link.scss +50 -0
- package/assets/styles/_preview-group.scss +2 -2
- package/assets/styles/_table.scss +43 -31
- package/assets/styles/_variables.scss +313 -159
- package/assets/styles/styles.scss +5 -1
- package/fesm2022/foblex-m-render.mjs +166 -67
- package/fesm2022/foblex-m-render.mjs.map +1 -1
- package/package.json +1 -1
- package/types/foblex-m-render.d.ts +46 -8
|
@@ -1,89 +1,76 @@
|
|
|
1
|
-
.m-render {
|
|
1
|
+
.m-render .doc-content {
|
|
2
|
+
overflow-wrap: anywhere;
|
|
2
3
|
|
|
3
4
|
h1, h2, h3, h4, h5, h6 {
|
|
4
|
-
margin: 0;
|
|
5
5
|
position: relative;
|
|
6
6
|
font-weight: 600;
|
|
7
7
|
outline: none;
|
|
8
|
+
color: var(--primary-text);
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
h1 {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
margin-bottom: 0.5rem;
|
|
13
|
+
font-size: 1.75em;
|
|
14
|
+
letter-spacing: -0.04rem;
|
|
15
|
+
line-height: 1.222;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
h2 {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
line-height:
|
|
22
|
-
font-size: 24px;
|
|
19
|
+
border-top: 1px solid var(--doc-divider-color);
|
|
20
|
+
padding-top: 2rem;
|
|
21
|
+
margin-bottom: 1rem;
|
|
22
|
+
font-size: 1.5em;
|
|
23
|
+
line-height: 1.222;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
h3 {
|
|
26
|
-
margin:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
margin-top: 1.125rem;
|
|
28
|
+
margin-bottom: 0.625rem;
|
|
29
|
+
font-size: 1.25em;
|
|
30
|
+
line-height: 1.3;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
h4 {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
line-height: 24px;
|
|
36
|
-
font-size: 18px;
|
|
33
|
+
h4, h5, h6 {
|
|
34
|
+
font-size: 1em;
|
|
35
|
+
line-height: 1.5;
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
line-height: 40px;
|
|
43
|
-
font-size: 32px;
|
|
44
|
-
}
|
|
38
|
+
h4, h5 {
|
|
39
|
+
margin-top: 1rem;
|
|
40
|
+
margin-bottom: 0.5rem;
|
|
45
41
|
}
|
|
46
42
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
43
|
+
h6 {
|
|
44
|
+
margin-top: 0.75rem;
|
|
45
|
+
margin-bottom: 0.5rem;
|
|
51
46
|
}
|
|
52
47
|
|
|
53
|
-
p {
|
|
54
|
-
|
|
48
|
+
p, summary {
|
|
49
|
+
margin: 1em 0;
|
|
50
|
+
line-height: 1.5;
|
|
55
51
|
}
|
|
56
52
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
border-left: 2px solid var(--divider-color);
|
|
60
|
-
padding-left: 16px;
|
|
61
|
-
color: var(--secondary-text);
|
|
53
|
+
strong {
|
|
54
|
+
font-weight: 600;
|
|
62
55
|
}
|
|
63
56
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
font-size: 16px;
|
|
57
|
+
em {
|
|
58
|
+
font-style: italic;
|
|
67
59
|
}
|
|
68
60
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
text-decoration: underline;
|
|
73
|
-
text-underline-offset: 2px;
|
|
61
|
+
ul, ol {
|
|
62
|
+
margin: 0.5em 0 1em;
|
|
63
|
+
padding-left: 1.625em;
|
|
74
64
|
|
|
75
|
-
|
|
76
|
-
|
|
65
|
+
> li > :first-child {
|
|
66
|
+
margin-top: 0;
|
|
67
|
+
margin-bottom: 0;
|
|
77
68
|
}
|
|
78
|
-
}
|
|
79
69
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
ul, ol {
|
|
85
|
-
padding-left: 1.25rem;
|
|
86
|
-
margin: 16px 0;
|
|
70
|
+
> li ul,
|
|
71
|
+
> li ol {
|
|
72
|
+
margin-top: 0.25em !important;
|
|
73
|
+
}
|
|
87
74
|
}
|
|
88
75
|
|
|
89
76
|
ul {
|
|
@@ -94,31 +81,69 @@
|
|
|
94
81
|
list-style: decimal;
|
|
95
82
|
}
|
|
96
83
|
|
|
97
|
-
|
|
98
|
-
|
|
84
|
+
ul > li,
|
|
85
|
+
ol > li {
|
|
86
|
+
padding-left: 0.375em;
|
|
87
|
+
margin: 0.5em 0;
|
|
88
|
+
|
|
89
|
+
&::marker {
|
|
90
|
+
color: var(--secondary-text);
|
|
91
|
+
font-size: 1em;
|
|
92
|
+
font-weight: 500;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
li {
|
|
97
|
+
min-height: 1.5em;
|
|
98
|
+
margin: 0.5em 0;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
blockquote {
|
|
102
|
+
position: relative;
|
|
103
|
+
margin: 1.5em 0;
|
|
104
|
+
padding: 0.25em 0 0.25rem 1.5rem;
|
|
105
|
+
color: var(--secondary-text);
|
|
106
|
+
font-weight: 400;
|
|
107
|
+
|
|
108
|
+
&::before {
|
|
109
|
+
position: absolute;
|
|
110
|
+
top: 0;
|
|
111
|
+
bottom: 0;
|
|
112
|
+
left: 0;
|
|
113
|
+
display: block;
|
|
114
|
+
width: 0.25rem;
|
|
115
|
+
border-radius: 2px;
|
|
116
|
+
background: var(--doc-blockquote-bar-color);
|
|
117
|
+
content: "";
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
p {
|
|
121
|
+
margin: 0.5em 0 0;
|
|
122
|
+
|
|
123
|
+
&:first-child {
|
|
124
|
+
margin-top: 0;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
103
127
|
}
|
|
104
128
|
|
|
105
129
|
hr {
|
|
106
|
-
margin:
|
|
130
|
+
margin: 2em 0;
|
|
107
131
|
border: none;
|
|
108
|
-
border-top: 1px solid var(--divider-color);
|
|
132
|
+
border-top: 1px solid var(--doc-divider-color);
|
|
109
133
|
}
|
|
110
134
|
|
|
111
135
|
:not(pre) > code {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
border-radius: var(--border-radius);
|
|
115
|
-
padding: 3px 6px;
|
|
136
|
+
padding: 1px 0.3rem;
|
|
137
|
+
border-radius: 0.25rem;
|
|
116
138
|
background-color: var(--not-pre-code-background);
|
|
117
|
-
|
|
139
|
+
box-shadow: inset 0 0 0 1px var(--not-pre-code-border-color);
|
|
140
|
+
color: inherit;
|
|
141
|
+
font-family: var(--font-family-mono);
|
|
142
|
+
font-size: var(--not-pre-code-font-size);
|
|
143
|
+
font-weight: 500;
|
|
144
|
+
line-height: inherit;
|
|
145
|
+
white-space: pre-wrap;
|
|
118
146
|
word-wrap: break-word;
|
|
119
147
|
word-break: break-word;
|
|
120
|
-
white-space: pre-wrap;
|
|
121
148
|
}
|
|
122
149
|
}
|
|
123
|
-
|
|
124
|
-
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--copy-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='
|
|
3
|
-
--
|
|
4
|
-
--fullscreen-
|
|
2
|
+
--copy-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E");
|
|
3
|
+
--check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
|
|
4
|
+
--fullscreen-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M8 3H5a2 2 0 0 0-2 2v3M16 3h3a2 2 0 0 1 2 2v3M8 21H5a2 2 0 0 1-2-2v-3M16 21h3a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E");
|
|
5
|
+
--fullscreen-exit-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M8 3v3a2 2 0 0 1-2 2H3M21 8h-3a2 2 0 0 1-2-2V3M3 16h3a2 2 0 0 1 2 2v3M21 16h-3a2 2 0 0 0-2 2v3'/%3E%3C/svg%3E");
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
.f-icon {
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
.m-render .doc-content a,
|
|
2
|
+
.f-text-link {
|
|
3
|
+
border-radius: var(--f-link-radius);
|
|
4
|
+
color: currentcolor;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
font-weight: var(--f-link-font-weight);
|
|
7
|
+
overflow-wrap: anywhere;
|
|
8
|
+
transition:
|
|
9
|
+
color 0.15s ease,
|
|
10
|
+
opacity 0.15s ease,
|
|
11
|
+
box-shadow 0.15s ease,
|
|
12
|
+
text-decoration-color 0.15s ease;
|
|
13
|
+
|
|
14
|
+
&:focus-visible {
|
|
15
|
+
outline: 2px solid var(--f-link-focus-color);
|
|
16
|
+
outline-offset: 1px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.m-render .doc-content a {
|
|
21
|
+
text-decoration: underline;
|
|
22
|
+
text-decoration-color: color-mix(in srgb, currentcolor 70%, transparent);
|
|
23
|
+
text-underline-offset: var(--f-link-underline-offset);
|
|
24
|
+
|
|
25
|
+
&:hover {
|
|
26
|
+
color: color-mix(in srgb, currentcolor 80%, transparent);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.f-text-link {
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
gap: 4px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.f-text-link-primary {
|
|
37
|
+
color: var(--f-link-primary-color);
|
|
38
|
+
font-weight: 500;
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
|
|
41
|
+
&:hover {
|
|
42
|
+
color: var(--f-link-primary-hover-color);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&[data-underline] {
|
|
46
|
+
text-decoration: underline;
|
|
47
|
+
text-decoration-color: color-mix(in srgb, currentcolor 70%, transparent);
|
|
48
|
+
text-underline-offset: var(--f-link-underline-offset);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -1,51 +1,63 @@
|
|
|
1
|
-
.m-render {
|
|
2
|
-
|
|
1
|
+
.m-render .doc-content {
|
|
3
2
|
table {
|
|
4
3
|
width: 100%;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
margin: 2em 0;
|
|
5
|
+
border: 0;
|
|
6
|
+
border-collapse: separate;
|
|
7
|
+
border-spacing: 0;
|
|
8
|
+
table-layout: auto;
|
|
9
|
+
font-size: 0.875em;
|
|
10
|
+
line-height: 1.7142857;
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
th {
|
|
13
|
+
border: 0;
|
|
14
|
+
border-bottom: 1px solid var(--dark-divider-color);
|
|
15
|
+
padding-block: 8px;
|
|
16
|
+
padding-inline: 8px;
|
|
12
17
|
color: var(--primary-text);
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
line-height: 20px;
|
|
20
|
+
text-align: start;
|
|
21
|
+
|
|
22
|
+
&:first-child {
|
|
23
|
+
padding-inline-start: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:last-child {
|
|
27
|
+
padding-inline-end: 0;
|
|
28
|
+
}
|
|
13
29
|
}
|
|
14
30
|
|
|
15
|
-
th,
|
|
16
31
|
td {
|
|
17
|
-
|
|
18
|
-
text-align: left;
|
|
32
|
+
border: 0;
|
|
19
33
|
border-bottom: 1px solid var(--divider-color);
|
|
34
|
+
padding-block: 10px;
|
|
35
|
+
padding-inline: 8px;
|
|
20
36
|
color: var(--primary-text);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
th {
|
|
24
|
-
font-weight: 600;
|
|
25
|
-
}
|
|
37
|
+
background: none;
|
|
26
38
|
|
|
27
|
-
|
|
28
|
-
|
|
39
|
+
&:first-child {
|
|
40
|
+
padding-inline-start: 0;
|
|
41
|
+
}
|
|
29
42
|
|
|
30
|
-
&:
|
|
31
|
-
|
|
43
|
+
&:last-child {
|
|
44
|
+
padding-inline-end: 0;
|
|
32
45
|
}
|
|
33
46
|
}
|
|
34
47
|
|
|
48
|
+
tbody tr:last-child td {
|
|
49
|
+
border-bottom: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
35
52
|
code {
|
|
36
53
|
font-family: var(--font-family-mono);
|
|
37
|
-
font-size:
|
|
54
|
+
font-size: var(--not-pre-code-font-size);
|
|
38
55
|
background-color: var(--not-pre-code-background);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
56
|
+
box-shadow: inset 0 0 0 1px var(--not-pre-code-border-color);
|
|
57
|
+
color: inherit;
|
|
58
|
+
padding: 1px 0.3rem;
|
|
59
|
+
border-radius: 0.25rem;
|
|
60
|
+
font-weight: 500;
|
|
42
61
|
}
|
|
43
62
|
}
|
|
44
|
-
|
|
45
|
-
table:not([class]) {
|
|
46
|
-
display: table;
|
|
47
|
-
width: 100%;
|
|
48
|
-
overflow-x: auto;
|
|
49
|
-
max-width: 100%;
|
|
50
|
-
}
|
|
51
63
|
}
|