@podlite/editor-react 0.0.32 → 0.0.33
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/CHANGELOG.md +4 -0
- package/esm/Editor.css +55 -0
- package/esm/Editor.d.ts +28 -0
- package/esm/Editor.js +401 -0
- package/esm/Editor.js.map +1 -0
- package/esm/Editor.old.css +428 -0
- package/esm/Wrapper.d.ts +6 -0
- package/esm/Wrapper.js +146 -0
- package/esm/Wrapper.js.map +1 -0
- package/esm/dict.d.ts +7 -0
- package/esm/dict.js +253 -0
- package/esm/dict.js.map +1 -0
- package/esm/helpers.d.ts +15 -0
- package/esm/helpers.js +49 -0
- package/esm/helpers.js.map +1 -0
- package/esm/index.d.ts +5 -0
- package/esm/index.js +6 -0
- package/esm/index.js.map +1 -0
- package/esm/podlite-vars.css +213 -0
- package/esm/podlite.d.ts +3 -0
- package/esm/podlite.js +500 -0
- package/esm/podlite.js.map +1 -0
- package/esm/simple-mode.d.ts +19 -0
- package/esm/simple-mode.js +185 -0
- package/esm/simple-mode.js.map +1 -0
- package/esm/theme.d.ts +1 -0
- package/esm/theme.js +59 -0
- package/esm/theme.js.map +1 -0
- package/package.json +10 -6
package/esm/dict.js
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
const dict = [
|
|
2
|
+
{
|
|
3
|
+
displayText: 'head1',
|
|
4
|
+
text: `=head1 #{}`,
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
displayText: 'head2',
|
|
8
|
+
text: `=head2 `,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
displayText: 'head3',
|
|
12
|
+
text: `=head3 `,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
displayText: 'item1 *',
|
|
16
|
+
text: `=item1 `,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayText: 'item1 1.)',
|
|
20
|
+
text: `=item1 # `,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
displayText: 'item (1., 2.) 🏷',
|
|
24
|
+
text: `=item1 # item
|
|
25
|
+
=item2 # item level 2
|
|
26
|
+
=item2 # item level 2
|
|
27
|
+
=item1 # item
|
|
28
|
+
=item2 # item
|
|
29
|
+
=item2 # item level 2
|
|
30
|
+
`,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
displayText: 'item (*, *) 🏷',
|
|
34
|
+
text: `=item1 item
|
|
35
|
+
=item2 item level 2
|
|
36
|
+
=item2 item level 2
|
|
37
|
+
=item1 item
|
|
38
|
+
=item2 item
|
|
39
|
+
=item3 item level 2
|
|
40
|
+
`,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
displayText: 'picture 🏷',
|
|
44
|
+
text: `=picture #{https://github.com/zag/podlite-desktop/blob/master/dist-assets/linux-icon/256x256.png?raw=true}
|
|
45
|
+
`,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
displayText: 'table simple 🏷',
|
|
49
|
+
text: `=for table
|
|
50
|
+
mouse | mice
|
|
51
|
+
horse | horses
|
|
52
|
+
elephant | elephants
|
|
53
|
+
`,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
displayText: 'table 2x 🏷',
|
|
57
|
+
text: `=begin table :caption('#{Caption of table}')
|
|
58
|
+
Constants 1
|
|
59
|
+
Variables 10
|
|
60
|
+
Subroutines 33
|
|
61
|
+
Everything else 57
|
|
62
|
+
=end table
|
|
63
|
+
`,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayText: 'table 3x 🏷',
|
|
67
|
+
text: `=for table :caption('#{Caption of table}')
|
|
68
|
+
Animal | Legs | Eats
|
|
69
|
+
=======================
|
|
70
|
+
Zebra + 4 + Cookies
|
|
71
|
+
Human + 2 + Pizza
|
|
72
|
+
Shark + 0 + Fish
|
|
73
|
+
`,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
displayText: 'Mermaid diagram simple 🏷',
|
|
77
|
+
text: `=begin Mermaid :caption('#{Caption of diagram}')
|
|
78
|
+
graph LR
|
|
79
|
+
A-->B
|
|
80
|
+
B-->C
|
|
81
|
+
C-->A
|
|
82
|
+
D-->C
|
|
83
|
+
=end Mermaid
|
|
84
|
+
`,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
displayText: 'Mermaid diagram Sequence 🏷',
|
|
88
|
+
text: `=for Mermaid :caption('#{Caption of diagram}')
|
|
89
|
+
sequenceDiagram
|
|
90
|
+
autonumber
|
|
91
|
+
Student->>Admin: Can I enrol this semester?
|
|
92
|
+
loop enrolmentCheck
|
|
93
|
+
Admin->>Admin: Check previous results
|
|
94
|
+
end
|
|
95
|
+
Note right of Admin: Exam results may <br> be delayed
|
|
96
|
+
Admin-->>Student: Enrolment success
|
|
97
|
+
Admin->>Professor: Assign student to tutor
|
|
98
|
+
Professor-->>Admin: Student is assigned
|
|
99
|
+
|
|
100
|
+
`,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
displayText: 'Mermaid flowchart 🏷',
|
|
104
|
+
text: `=for Mermaid :caption('#{Caption of diagram}')
|
|
105
|
+
graph LR
|
|
106
|
+
A[Square Rect] -- Link text --> B((Circle))
|
|
107
|
+
A --> C(Round Rect)
|
|
108
|
+
B --> D{Rhombus}
|
|
109
|
+
C --> D
|
|
110
|
+
|
|
111
|
+
`,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
displayText: 'Mermaid class 🏷',
|
|
115
|
+
text: `=for Mermaid :caption('#{Caption of diagram}')
|
|
116
|
+
classDiagram
|
|
117
|
+
Person <|-- Student
|
|
118
|
+
Person <|-- Professor
|
|
119
|
+
Person : +String name
|
|
120
|
+
Person : +String phoneNumber
|
|
121
|
+
Person : +String emailAddress
|
|
122
|
+
Person: +purchaseParkingPass()
|
|
123
|
+
Address "1" <-- "0..1" Person:lives at
|
|
124
|
+
class Student{
|
|
125
|
+
+int studentNumber
|
|
126
|
+
+int averageMark
|
|
127
|
+
+isEligibleToEnrol()
|
|
128
|
+
+getSeminarsTaken()
|
|
129
|
+
}
|
|
130
|
+
class Professor{
|
|
131
|
+
+int salary
|
|
132
|
+
}
|
|
133
|
+
class Address{
|
|
134
|
+
+String street
|
|
135
|
+
+String city
|
|
136
|
+
+String state
|
|
137
|
+
+int postalCode
|
|
138
|
+
+String country
|
|
139
|
+
-validate()
|
|
140
|
+
+outputAsLabel()
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
`,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
displayText: 'code block with formatting 🏷',
|
|
147
|
+
text: `=begin code :allow<I B Z>
|
|
148
|
+
#{}
|
|
149
|
+
=end code
|
|
150
|
+
`,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
displayText: 'toc head1, head2, head3',
|
|
154
|
+
text: `=toc head1, head2, head3
|
|
155
|
+
`,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
displayText: 'toc (with :title) 🏷',
|
|
159
|
+
text: `=for toc :title('Table of contents')
|
|
160
|
+
head1, head2, head3
|
|
161
|
+
|
|
162
|
+
`,
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
displayText: 'toc ( picture, Mermaid ) + tables 🏷',
|
|
166
|
+
text: `=for toc :title('List of media')
|
|
167
|
+
picture, Mermaid
|
|
168
|
+
=for toc :title('List of tables')
|
|
169
|
+
table
|
|
170
|
+
|
|
171
|
+
`,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
displayText: 'markdown',
|
|
175
|
+
text: `=begin markdown
|
|
176
|
+
#{}
|
|
177
|
+
=end markdown
|
|
178
|
+
`,
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
displayText: 'formula with caption 🏷',
|
|
182
|
+
text: `=for formula :caption('The Cauchy-Schwarz Inequality')
|
|
183
|
+
\\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right)
|
|
184
|
+
{}
|
|
185
|
+
`,
|
|
186
|
+
},
|
|
187
|
+
// markdown mode
|
|
188
|
+
{
|
|
189
|
+
displayText: 'head1',
|
|
190
|
+
text: `# `,
|
|
191
|
+
lang: 'md',
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
displayText: 'head2',
|
|
195
|
+
text: `## `,
|
|
196
|
+
lang: 'md',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
displayText: 'head3',
|
|
200
|
+
text: `### `,
|
|
201
|
+
lang: 'md',
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
displayText: 'item1 *',
|
|
205
|
+
text: `* `,
|
|
206
|
+
lang: 'md',
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
displayText: 'item1 1.)',
|
|
210
|
+
text: `1. `,
|
|
211
|
+
lang: 'md',
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
displayText: 'picture 🏷',
|
|
215
|
+
text: `
|
|
216
|
+
|
|
217
|
+
`,
|
|
218
|
+
lang: 'md',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
displayText: 'Table',
|
|
222
|
+
text: `| Syntax | Description |
|
|
223
|
+
| ----------- | ----------- |
|
|
224
|
+
| Header | Title |
|
|
225
|
+
| Paragraph | Text |
|
|
226
|
+
|
|
227
|
+
`,
|
|
228
|
+
lang: 'md',
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
displayText: 'Mermaid simple 🏷',
|
|
232
|
+
text: `\`\`\`mermaid
|
|
233
|
+
graph LR
|
|
234
|
+
A-->B
|
|
235
|
+
B-->C
|
|
236
|
+
C-->A
|
|
237
|
+
D-->C
|
|
238
|
+
\`\`\``,
|
|
239
|
+
lang: 'md',
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
displayText: 'formula 🏷',
|
|
243
|
+
text: `
|
|
244
|
+
$$
|
|
245
|
+
\\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right)
|
|
246
|
+
$$
|
|
247
|
+
{}
|
|
248
|
+
`,
|
|
249
|
+
lang: 'md',
|
|
250
|
+
},
|
|
251
|
+
];
|
|
252
|
+
export default dict;
|
|
253
|
+
//# sourceMappingURL=dict.js.map
|
package/esm/dict.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dict.js","sourceRoot":"","sources":["../src/dict.ts"],"names":[],"mappings":"AAMA,MAAM,IAAI,GAAW;IACnB;QACE,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,YAAY;KACnB;IACD;QACE,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,SAAS;KAChB;IAED;QACE,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,SAAS;KAChB;IACD;QACE,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;KAChB;IACD;QACE,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;KAClB;IACD;QACE,WAAW,EAAE,kBAAkB;QAC/B,IAAI,EAAE;;;;;;CAMT;KACE;IACD;QACE,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE;;;;;;CAMT;KACE;IACD;QACE,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE;CACT;KACE;IACD;QACE,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE;;;;CAIT;KACE;IACD;QACE,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE;;;;;;CAMT;KACE;IACD;QACE,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE;;;;;;CAMT;KACE;IACD;QACE,WAAW,EAAE,2BAA2B;QACxC,IAAI,EAAE;;;;;;;CAOT;KACE;IACD;QACE,WAAW,EAAE,6BAA6B;QAC1C,IAAI,EAAE;;;;;;;;;;;;CAYT;KACE;IACD;QACE,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE;;;;;;;CAOT;K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e,IAAI,CAAA"}
|
package/esm/helpers.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PodliteDocument } from '@podlite/schema';
|
|
2
|
+
export declare const parse: (str: string) => PodliteDocument;
|
|
3
|
+
export declare const getSuggestionContextForLine: (pod: string, line: number) => 'pod6' | 'md';
|
|
4
|
+
interface Pos {
|
|
5
|
+
line: number;
|
|
6
|
+
offset: number;
|
|
7
|
+
}
|
|
8
|
+
interface Selection {
|
|
9
|
+
start: Pos;
|
|
10
|
+
end: Pos;
|
|
11
|
+
text?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const templateGetSelectionPos: (pod: string) => Selection | null;
|
|
14
|
+
export declare const addVMargin: (count: number, pod: string) => string;
|
|
15
|
+
export {};
|
package/esm/helpers.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { getFromTree, podlitePluggable } from '@podlite/schema';
|
|
2
|
+
export const parse = (str) => {
|
|
3
|
+
let podlite = podlitePluggable();
|
|
4
|
+
let tree = podlite.parse(str);
|
|
5
|
+
const asAst = podlite.toAstResult(tree);
|
|
6
|
+
return asAst.interator;
|
|
7
|
+
};
|
|
8
|
+
export const getSuggestionContextForLine = (pod, line) => {
|
|
9
|
+
const tree = parse(pod);
|
|
10
|
+
// TODO:: deprecate named block =Markdown
|
|
11
|
+
const markdownBlocks = getFromTree(tree, 'Markdown', 'markdown'); // TODO: remove `any`
|
|
12
|
+
const isMd = markdownBlocks.findIndex(({ location: { start: { line: lineStart }, end: { line: lineEnd }, }, }) => {
|
|
13
|
+
return line > lineStart && line < lineEnd;
|
|
14
|
+
}) !== -1;
|
|
15
|
+
if (isMd)
|
|
16
|
+
return 'md';
|
|
17
|
+
return 'pod6';
|
|
18
|
+
};
|
|
19
|
+
export const templateGetSelectionPos = (pod) => {
|
|
20
|
+
// if empty selection
|
|
21
|
+
const EMPTY_SELECTION = new RegExp(/\{\}/);
|
|
22
|
+
const lineNumEmptySel = pod.split('\n').findIndex(str => str.match(EMPTY_SELECTION));
|
|
23
|
+
if (lineNumEmptySel > -1) {
|
|
24
|
+
const line = pod.split('\n')[lineNumEmptySel];
|
|
25
|
+
const matchResult = line.match(EMPTY_SELECTION);
|
|
26
|
+
const start = { line: lineNumEmptySel, offset: matchResult.index };
|
|
27
|
+
const end = { line: lineNumEmptySel, offset: matchResult.index };
|
|
28
|
+
return { start, end, text: pod.replace(EMPTY_SELECTION, '') };
|
|
29
|
+
}
|
|
30
|
+
const SELECTION = new RegExp(/\{[^}]+\}/);
|
|
31
|
+
const lineNum = pod.split('\n').findIndex(str => str.match(SELECTION));
|
|
32
|
+
if (lineNum > -1) {
|
|
33
|
+
const line = pod.split('\n')[lineNum];
|
|
34
|
+
const matchResult = line.match(SELECTION);
|
|
35
|
+
const start = { line: lineNum, offset: matchResult.index };
|
|
36
|
+
const end = {
|
|
37
|
+
line: lineNum,
|
|
38
|
+
offset: matchResult.index + matchResult[0].length,
|
|
39
|
+
};
|
|
40
|
+
return { start, end, text: pod };
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
};
|
|
44
|
+
export const addVMargin = (count, pod) => {
|
|
45
|
+
const addString = ' '.repeat(count);
|
|
46
|
+
const [firstLine, ...restLines] = pod.split('\n');
|
|
47
|
+
return [firstLine, ...[].concat(restLines).map(str => `${addString}${str}`)].join('\n');
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAChF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAW,EAAmB,EAAE;IACpD,IAAI,OAAO,GAAG,gBAAgB,EAAE,CAAA;IAChC,IAAI,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC7B,MAAM,KA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,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACjD,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzF,CAAC,CAAA"}
|
package/esm/index.d.ts
ADDED
package/esm/index.js
ADDED
package/esm/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,UAAU,CAAA;AAC9B,OAAO,aAAa,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,CAAA;AAC7B,OAAO,EAAE,aAAa,IAAI,aAAa,EAAE,CAAA;AACzC,eAAe,OAAO,CAAA"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/* -----------------------------------
|
|
2
|
+
Variables
|
|
3
|
+
-------------------------------------- */
|
|
4
|
+
@media (prefers-color-scheme: dark) {
|
|
5
|
+
.podlite-content,
|
|
6
|
+
.podlite-var {
|
|
7
|
+
color-scheme: dark;
|
|
8
|
+
--color-prettylights-syntax-comment: #8b949e;
|
|
9
|
+
--color-prettylights-syntax-constant: #79c0ff;
|
|
10
|
+
--color-prettylights-syntax-entity: #d2a8ff;
|
|
11
|
+
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
|
|
12
|
+
--color-prettylights-syntax-entity-tag: #7ee787;
|
|
13
|
+
--color-prettylights-syntax-keyword: #ff7b72;
|
|
14
|
+
--color-prettylights-syntax-string: #a5d6ff;
|
|
15
|
+
--color-prettylights-syntax-variable: #ffa657;
|
|
16
|
+
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
|
|
17
|
+
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
|
|
18
|
+
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
|
|
19
|
+
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
|
|
20
|
+
--color-prettylights-syntax-carriage-return-bg: #b62324;
|
|
21
|
+
--color-prettylights-syntax-string-regexp: #7ee787;
|
|
22
|
+
--color-prettylights-syntax-markup-list: #f2cc60;
|
|
23
|
+
--color-prettylights-syntax-markup-heading: #1f6feb;
|
|
24
|
+
--color-prettylights-syntax-markup-italic: #c9d1d9;
|
|
25
|
+
--color-prettylights-syntax-markup-bold: #c9d1d9;
|
|
26
|
+
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
|
|
27
|
+
--color-prettylights-syntax-markup-deleted-bg: #67060c;
|
|
28
|
+
--color-prettylights-syntax-markup-inserted-text: #aff5b4;
|
|
29
|
+
--color-prettylights-syntax-markup-inserted-bg: #033a16;
|
|
30
|
+
--color-prettylights-syntax-markup-changed-text: #ffdfb6;
|
|
31
|
+
--color-prettylights-syntax-markup-changed-bg: #5a1e02;
|
|
32
|
+
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
|
|
33
|
+
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
|
|
34
|
+
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
|
|
35
|
+
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
|
|
36
|
+
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
|
|
37
|
+
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
|
|
38
|
+
--color-fg-default: #c9d1d9;
|
|
39
|
+
--color-fg-muted: #8b949e;
|
|
40
|
+
--color-fg-subtle: #484f58;
|
|
41
|
+
--color-canvas-default: #0d1117;
|
|
42
|
+
--color-canvas-subtle: #161b22;
|
|
43
|
+
--color-border-default: #30363d;
|
|
44
|
+
--color-border-muted: #21262d;
|
|
45
|
+
--color-neutral-muted: rgba(110, 118, 129, 0.4);
|
|
46
|
+
--color-accent-fg: #58a6ff;
|
|
47
|
+
--color-accent-emphasis: #1f6feb;
|
|
48
|
+
--color-attention-subtle: rgba(187, 128, 9, 0.15);
|
|
49
|
+
--color-danger-fg: #f85149;
|
|
50
|
+
--color-danger-emphasis: #da3633;
|
|
51
|
+
--color-attention-fg: #d29922;
|
|
52
|
+
--color-attention-emphasis: #9e6a03;
|
|
53
|
+
--color-done-fg: #a371f7;
|
|
54
|
+
--color-done-emphasis: #8957e5;
|
|
55
|
+
--color-success-fg: #3fb950;
|
|
56
|
+
--color-success-emphasis: #238636;
|
|
57
|
+
--color-copied-active-bg: #2e9b33;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
@media (prefers-color-scheme: light) {
|
|
61
|
+
.podlite-content,
|
|
62
|
+
.podlite-var {
|
|
63
|
+
color-scheme: light;
|
|
64
|
+
--color-prettylights-syntax-comment: #6e7781;
|
|
65
|
+
--color-prettylights-syntax-constant: #0550ae;
|
|
66
|
+
--color-prettylights-syntax-entity: #8250df;
|
|
67
|
+
--color-prettylights-syntax-storage-modifier-import: #24292f;
|
|
68
|
+
--color-prettylights-syntax-entity-tag: #116329;
|
|
69
|
+
--color-prettylights-syntax-keyword: #cf222e;
|
|
70
|
+
--color-prettylights-syntax-string: #0a3069;
|
|
71
|
+
--color-prettylights-syntax-variable: #953800;
|
|
72
|
+
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
|
|
73
|
+
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
|
|
74
|
+
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
|
|
75
|
+
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
|
|
76
|
+
--color-prettylights-syntax-carriage-return-bg: #cf222e;
|
|
77
|
+
--color-prettylights-syntax-string-regexp: #116329;
|
|
78
|
+
--color-prettylights-syntax-markup-list: #3b2300;
|
|
79
|
+
--color-prettylights-syntax-markup-heading: #0550ae;
|
|
80
|
+
--color-prettylights-syntax-markup-italic: #24292f;
|
|
81
|
+
--color-prettylights-syntax-markup-bold: #24292f;
|
|
82
|
+
--color-prettylights-syntax-markup-deleted-text: #82071e;
|
|
83
|
+
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
|
|
84
|
+
--color-prettylights-syntax-markup-inserted-text: #116329;
|
|
85
|
+
--color-prettylights-syntax-markup-inserted-bg: #dafbe1;
|
|
86
|
+
--color-prettylights-syntax-markup-changed-text: #953800;
|
|
87
|
+
--color-prettylights-syntax-markup-changed-bg: #ffd8b5;
|
|
88
|
+
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
|
|
89
|
+
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
|
|
90
|
+
--color-prettylights-syntax-meta-diff-range: #8250df;
|
|
91
|
+
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
|
|
92
|
+
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
|
|
93
|
+
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
|
|
94
|
+
--color-fg-default: #24292f;
|
|
95
|
+
--color-fg-muted: #57606a;
|
|
96
|
+
--color-fg-subtle: #6e7781;
|
|
97
|
+
--color-canvas-default: #ffffff;
|
|
98
|
+
--color-canvas-subtle: #f6f8fa;
|
|
99
|
+
--color-border-default: #d0d7de;
|
|
100
|
+
--color-border-muted: hsl(210, 18%, 87%);
|
|
101
|
+
--color-neutral-muted: rgba(175, 184, 193, 0.2);
|
|
102
|
+
--color-accent-fg: #0969da;
|
|
103
|
+
--color-accent-emphasis: #0969da;
|
|
104
|
+
--color-attention-subtle: #fff8c5;
|
|
105
|
+
--color-danger-fg: #d1242f;
|
|
106
|
+
--color-danger-emphasis: #cf222e;
|
|
107
|
+
--color-attention-fg: #9a6700;
|
|
108
|
+
--color-attention-emphasis: #9a6700;
|
|
109
|
+
--color-done-fg: #8250df;
|
|
110
|
+
--color-done-emphasis: #8250df;
|
|
111
|
+
--color-success-fg: #1a7f37;
|
|
112
|
+
--color-success-emphasis: #1f883d;
|
|
113
|
+
--color-copied-active-bg: #2e9b33;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
[data-color-mode*='dark'] .podlite-content,
|
|
117
|
+
[data-color-mode*='dark'] .podlite-var,
|
|
118
|
+
.podlite-var[data-color-mode*='dark'],
|
|
119
|
+
.podlite-content[data-color-mode*='dark'],
|
|
120
|
+
body[data-color-mode*='dark'] {
|
|
121
|
+
color-scheme: dark;
|
|
122
|
+
--color-prettylights-syntax-comment: #8b949e;
|
|
123
|
+
--color-prettylights-syntax-constant: #79c0ff;
|
|
124
|
+
--color-prettylights-syntax-entity: #d2a8ff;
|
|
125
|
+
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
|
|
126
|
+
--color-prettylights-syntax-entity-tag: #7ee787;
|
|
127
|
+
--color-prettylights-syntax-keyword: #ff7b72;
|
|
128
|
+
--color-prettylights-syntax-string: #a5d6ff;
|
|
129
|
+
--color-prettylights-syntax-variable: #ffa657;
|
|
130
|
+
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
|
|
131
|
+
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
|
|
132
|
+
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
|
|
133
|
+
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
|
|
134
|
+
--color-prettylights-syntax-carriage-return-bg: #b62324;
|
|
135
|
+
--color-prettylights-syntax-string-regexp: #7ee787;
|
|
136
|
+
--color-prettylights-syntax-markup-list: #f2cc60;
|
|
137
|
+
--color-prettylights-syntax-markup-heading: #1f6feb;
|
|
138
|
+
--color-prettylights-syntax-markup-italic: #c9d1d9;
|
|
139
|
+
--color-prettylights-syntax-markup-bold: #c9d1d9;
|
|
140
|
+
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
|
|
141
|
+
--color-prettylights-syntax-markup-deleted-bg: #67060c;
|
|
142
|
+
--color-prettylights-syntax-markup-inserted-text: #aff5b4;
|
|
143
|
+
--color-prettylights-syntax-markup-inserted-bg: #033a16;
|
|
144
|
+
--color-prettylights-syntax-markup-changed-text: #ffdfb6;
|
|
145
|
+
--color-prettylights-syntax-markup-changed-bg: #5a1e02;
|
|
146
|
+
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
|
|
147
|
+
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
|
|
148
|
+
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
|
|
149
|
+
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
|
|
150
|
+
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
|
|
151
|
+
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
|
|
152
|
+
--color-fg-default: #c9d1d9;
|
|
153
|
+
--color-fg-muted: #8b949e;
|
|
154
|
+
--color-fg-subtle: #484f58;
|
|
155
|
+
--color-canvas-default: #0d1117;
|
|
156
|
+
--color-canvas-subtle: #161b22;
|
|
157
|
+
--color-border-default: #30363d;
|
|
158
|
+
--color-border-muted: #21262d;
|
|
159
|
+
--color-neutral-muted: rgba(110, 118, 129, 0.4);
|
|
160
|
+
--color-accent-fg: #58a6ff;
|
|
161
|
+
--color-accent-emphasis: #1f6feb;
|
|
162
|
+
--color-attention-subtle: rgba(187, 128, 9, 0.15);
|
|
163
|
+
--color-danger-fg: #f85149;
|
|
164
|
+
}
|
|
165
|
+
[data-color-mode*='light'] .podlite-content,
|
|
166
|
+
[data-color-mode*='light'] .podlite-var,
|
|
167
|
+
.podlite-var[data-color-mode*='light'],
|
|
168
|
+
.podlite-content[data-color-mode*='light'],
|
|
169
|
+
body[data-color-mode*='light'] {
|
|
170
|
+
color-scheme: light;
|
|
171
|
+
--color-prettylights-syntax-comment: #6e7781;
|
|
172
|
+
--color-prettylights-syntax-constant: #0550ae;
|
|
173
|
+
--color-prettylights-syntax-entity: #8250df;
|
|
174
|
+
--color-prettylights-syntax-storage-modifier-import: #24292f;
|
|
175
|
+
--color-prettylights-syntax-entity-tag: #116329;
|
|
176
|
+
--color-prettylights-syntax-keyword: #cf222e;
|
|
177
|
+
--color-prettylights-syntax-string: #0a3069;
|
|
178
|
+
--color-prettylights-syntax-variable: #953800;
|
|
179
|
+
--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
|
|
180
|
+
--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
|
|
181
|
+
--color-prettylights-syntax-invalid-illegal-bg: #82071e;
|
|
182
|
+
--color-prettylights-syntax-carriage-return-text: #f6f8fa;
|
|
183
|
+
--color-prettylights-syntax-carriage-return-bg: #cf222e;
|
|
184
|
+
--color-prettylights-syntax-string-regexp: #116329;
|
|
185
|
+
--color-prettylights-syntax-markup-list: #3b2300;
|
|
186
|
+
--color-prettylights-syntax-markup-heading: #0550ae;
|
|
187
|
+
--color-prettylights-syntax-markup-italic: #24292f;
|
|
188
|
+
--color-prettylights-syntax-markup-bold: #24292f;
|
|
189
|
+
--color-prettylights-syntax-markup-deleted-text: #82071e;
|
|
190
|
+
--color-prettylights-syntax-markup-deleted-bg: #ffebe9;
|
|
191
|
+
--color-prettylights-syntax-markup-inserted-text: #116329;
|
|
192
|
+
--color-prettylights-syntax-markup-inserted-bg: #dafbe1;
|
|
193
|
+
--color-prettylights-syntax-markup-changed-text: #953800;
|
|
194
|
+
--color-prettylights-syntax-markup-changed-bg: #ffd8b5;
|
|
195
|
+
--color-prettylights-syntax-markup-ignored-text: #eaeef2;
|
|
196
|
+
--color-prettylights-syntax-markup-ignored-bg: #0550ae;
|
|
197
|
+
--color-prettylights-syntax-meta-diff-range: #8250df;
|
|
198
|
+
--color-prettylights-syntax-brackethighlighter-angle: #57606a;
|
|
199
|
+
--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
|
|
200
|
+
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
|
|
201
|
+
--color-fg-default: #24292f;
|
|
202
|
+
--color-fg-muted: #57606a;
|
|
203
|
+
--color-fg-subtle: #6e7781;
|
|
204
|
+
--color-canvas-default: #ffffff;
|
|
205
|
+
--color-canvas-subtle: #f6f8fa;
|
|
206
|
+
--color-border-default: #d0d7de;
|
|
207
|
+
--color-border-muted: hsl(210, 18%, 87%);
|
|
208
|
+
--color-neutral-muted: rgba(175, 184, 193, 0.2);
|
|
209
|
+
--color-accent-fg: #0969da;
|
|
210
|
+
--color-accent-emphasis: #0969da;
|
|
211
|
+
--color-attention-subtle: #fff8c5;
|
|
212
|
+
--color-danger-fg: #cf222e;
|
|
213
|
+
}
|
package/esm/podlite.d.ts
ADDED