@semigarden/synthetic-md 0.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/dist/index.css ADDED
@@ -0,0 +1,371 @@
1
+ @charset "UTF-8";
2
+ :host {
3
+ width: 100%;
4
+ height: 100%;
5
+ }
6
+
7
+ .element {
8
+ --color-background: #110f16;
9
+ --color-background-area: #181424;
10
+ --color-border: #2a2340;
11
+ --color-text: #d4cfee;
12
+ --color-muted: #8b85a3;
13
+ --color-accent: #4a9eff;
14
+ --color-code-bg: #1a1625;
15
+ --color-blockquote-border: #4a9eff;
16
+ --color-selection-bg: #2a2340;
17
+ position: relative;
18
+ width: 100%;
19
+ height: 100%;
20
+ align-items: stretch;
21
+ justify-content: flex-start;
22
+ resize: none;
23
+ border: none;
24
+ outline: none;
25
+ white-space: pre-wrap;
26
+ font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
27
+ font-size: 16px;
28
+ line-height: 1.6;
29
+ }
30
+
31
+ .selection {
32
+ background: var(--color-selection-bg);
33
+ }
34
+
35
+ .block {
36
+ margin: 0;
37
+ padding: 0;
38
+ min-height: 1.2em;
39
+ }
40
+
41
+ .inline {
42
+ position: relative;
43
+ white-space: pre-wrap;
44
+ word-break: break-word;
45
+ word-wrap: break-word;
46
+ overflow-wrap: break-word;
47
+ text-overflow: ellipsis;
48
+ max-width: 100%;
49
+ height: auto;
50
+ display: inline-block;
51
+ text-align: left;
52
+ outline: none;
53
+ }
54
+ .inline .symbolic {
55
+ position: relative;
56
+ }
57
+ .inline .semantic {
58
+ pointer-events: none;
59
+ user-select: none;
60
+ opacity: 1;
61
+ }
62
+ .inline:not(.focused) .symbolic {
63
+ position: absolute;
64
+ inset: 0;
65
+ color: transparent;
66
+ caret-color: transparent;
67
+ }
68
+ .inline:not(.focused) .semantic {
69
+ position: relative;
70
+ }
71
+ .inline.focused .symbolic {
72
+ position: relative;
73
+ color: inherit;
74
+ caret-color: auto;
75
+ cursor: text;
76
+ }
77
+ .inline.focused .semantic {
78
+ position: absolute;
79
+ inset: 0;
80
+ opacity: 0;
81
+ user-select: none;
82
+ pointer-events: none;
83
+ }
84
+ .inline.focused .image {
85
+ display: none;
86
+ }
87
+
88
+ .paragraph {
89
+ margin: 0;
90
+ }
91
+
92
+ .heading {
93
+ font-weight: 600;
94
+ margin: 0.75em 0 0.25em;
95
+ line-height: 1.3;
96
+ }
97
+
98
+ .h1 {
99
+ font-size: 2em;
100
+ border-bottom: 1px solid var(--color-border);
101
+ padding-bottom: 0.25em;
102
+ margin: 0;
103
+ }
104
+
105
+ .h2 {
106
+ font-size: 1.5em;
107
+ border-bottom: 1px solid var(--color-border);
108
+ padding-bottom: 0.2em;
109
+ }
110
+
111
+ .h3 {
112
+ font-size: 1.25em;
113
+ }
114
+
115
+ .h4 {
116
+ font-size: 1.1em;
117
+ }
118
+
119
+ .h5 {
120
+ font-size: 1em;
121
+ }
122
+
123
+ .h6 {
124
+ font-size: 0.9em;
125
+ color: var(--color-muted);
126
+ }
127
+
128
+ .blockQuote {
129
+ border-left: 3px solid var(--color-blockquote-border);
130
+ padding-left: 1em;
131
+ margin: 0.5em 0;
132
+ color: var(--color-muted);
133
+ font-style: italic;
134
+ }
135
+
136
+ .codeBlock {
137
+ background: var(--color-code-bg);
138
+ border: 1px solid var(--color-border);
139
+ border-radius: 6px;
140
+ padding: 0 1em;
141
+ margin: 0.5em 0;
142
+ overflow-x: auto;
143
+ position: relative;
144
+ transition: border-color 0.15s ease;
145
+ }
146
+ .codeBlock code {
147
+ display: flex;
148
+ flex-direction: column;
149
+ font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
150
+ font-size: 0.9em;
151
+ line-height: 1.5;
152
+ color: var(--color-text);
153
+ }
154
+ .codeBlock .marker {
155
+ opacity: 0;
156
+ }
157
+ .codeBlock .marker.focused {
158
+ opacity: 1;
159
+ }
160
+ .codeBlock .marker .symbolic {
161
+ position: relative;
162
+ color: inherit;
163
+ }
164
+ .codeBlock .inline[data-type=text] {
165
+ white-space: pre-wrap;
166
+ word-break: break-all;
167
+ }
168
+ .codeBlock .inline[data-type=text].focused {
169
+ background: transparent;
170
+ outline: none;
171
+ }
172
+ .codeBlock .inline[data-type=text] .symbolic {
173
+ position: relative;
174
+ color: inherit;
175
+ }
176
+ .codeBlock .inline[data-type=text] .semantic {
177
+ display: none;
178
+ }
179
+ .codeBlock[data-language]::before {
180
+ content: attr(data-language);
181
+ position: absolute;
182
+ top: 0.5em;
183
+ right: 0.75em;
184
+ font-size: 0.75em;
185
+ text-transform: uppercase;
186
+ letter-spacing: 0.05em;
187
+ pointer-events: none;
188
+ }
189
+
190
+ .list {
191
+ margin: 0;
192
+ padding-left: 1.5em;
193
+ }
194
+ .list[start] {
195
+ list-style-type: decimal;
196
+ }
197
+
198
+ .listItem {
199
+ display: list-item;
200
+ margin: 0;
201
+ }
202
+ .listItem .markerAnchor {
203
+ display: inline;
204
+ width: 0;
205
+ height: 0;
206
+ pointer-events: none;
207
+ }
208
+
209
+ .taskListItem {
210
+ list-style: none;
211
+ margin-left: -1.5em;
212
+ display: flex;
213
+ align-items: center;
214
+ gap: 0.1em;
215
+ }
216
+
217
+ .taskCheckbox {
218
+ margin-top: 0.35em;
219
+ margin-left: 0.5em;
220
+ width: 1em;
221
+ height: 1em;
222
+ accent-color: var(--color-accent);
223
+ cursor: pointer;
224
+ }
225
+
226
+ .taskContent {
227
+ flex: 1;
228
+ }
229
+
230
+ .thematicBreak {
231
+ position: relative;
232
+ border: none;
233
+ }
234
+ .thematicBreak::after {
235
+ content: "";
236
+ position: absolute;
237
+ top: 0;
238
+ bottom: 0;
239
+ left: 0;
240
+ margin: auto;
241
+ width: 100%;
242
+ height: 1px;
243
+ background-color: var(--color-border);
244
+ }
245
+ .thematicBreak.focused::after {
246
+ display: none;
247
+ }
248
+
249
+ .table {
250
+ width: 100%;
251
+ table-layout: fixed;
252
+ border-collapse: collapse;
253
+ margin: 0.5em 0;
254
+ border: 1px solid var(--color-border);
255
+ }
256
+
257
+ .tableRow,
258
+ .tableCell {
259
+ border: 1px solid var(--color-border);
260
+ padding: 0.5em 1em;
261
+ text-align: left;
262
+ }
263
+
264
+ .htmlBlock {
265
+ margin: 0.5em 0;
266
+ }
267
+
268
+ .footnote {
269
+ font-size: 0.9em;
270
+ color: var(--color-muted);
271
+ margin: 0.25em 0;
272
+ padding-left: 2em;
273
+ position: relative;
274
+ }
275
+
276
+ .footnoteLabel {
277
+ position: absolute;
278
+ left: 0;
279
+ color: var(--color-accent);
280
+ }
281
+
282
+ .footnoteContent {
283
+ display: inline;
284
+ }
285
+
286
+ .blankLine {
287
+ height: 1.2em;
288
+ user-select: none;
289
+ }
290
+
291
+ .link, .autolink {
292
+ cursor: pointer;
293
+ }
294
+
295
+ .caret {
296
+ position: absolute;
297
+ width: 1px;
298
+ height: 1em;
299
+ background-color: #fff;
300
+ animation: blink 1s step-end infinite;
301
+ pointer-events: none;
302
+ z-index: 10;
303
+ }
304
+
305
+ .inline {
306
+ outline: none;
307
+ white-space: pre-wrap;
308
+ word-break: break-word;
309
+ }
310
+ .inline.focus {
311
+ background: rgba(0, 120, 255, 0.1);
312
+ border-radius: 3px;
313
+ padding: 0 2px;
314
+ min-height: 1.2em;
315
+ outline: 1px solid var(--color-accent);
316
+ }
317
+ .inline[data-type=strong]:not(.focus) {
318
+ font-weight: bold;
319
+ }
320
+ .inline[data-type=emphasis]:not(.focus) {
321
+ font-style: italic;
322
+ }
323
+ .inline[data-type=codeSpan]:not(.focus) {
324
+ font-family: "JetBrains Mono", "Fira Code", monospace;
325
+ font-size: 0.9em;
326
+ background: var(--color-code-bg);
327
+ padding: 0.15em 0.4em;
328
+ border-radius: 3px;
329
+ }
330
+ .inline[data-type=link]:not(.focus) {
331
+ color: var(--color-accent);
332
+ text-decoration: underline;
333
+ cursor: pointer;
334
+ }
335
+ .inline[data-type=autolink]:not(.focus) {
336
+ color: var(--color-accent);
337
+ text-decoration: underline;
338
+ }
339
+ .inline[data-type=strikethrough]:not(.focus) {
340
+ text-decoration: line-through;
341
+ color: var(--color-muted);
342
+ }
343
+ .inline[data-type=image]:not(.focus) {
344
+ color: var(--color-accent);
345
+ }
346
+ .inline[data-type=image]:not(.focus)::before {
347
+ content: "🖼️ ";
348
+ }
349
+ .inline[data-type=footnoteRef]:not(.focus) {
350
+ color: var(--color-accent);
351
+ font-size: 0.8em;
352
+ vertical-align: super;
353
+ }
354
+ .inline[data-type=hardBreak], .inline[data-type=softBreak] {
355
+ display: inline;
356
+ }
357
+ .inline[data-type=rawHTML]:not(.focus) {
358
+ font-family: monospace;
359
+ color: var(--color-muted);
360
+ font-size: 0.9em;
361
+ }
362
+
363
+ .blink {
364
+ animation: blink 1s step-end infinite;
365
+ }
366
+
367
+ @keyframes blink {
368
+ 50% {
369
+ opacity: 0;
370
+ }
371
+ }
@@ -0,0 +1,28 @@
1
+ declare class Element extends HTMLElement {
2
+ private shadowRootElement;
3
+ private rootElement?;
4
+ private ast;
5
+ private render;
6
+ private caret;
7
+ private select;
8
+ private interaction;
9
+ private editor;
10
+ private input;
11
+ private intent;
12
+ private styled;
13
+ private hasAcceptedExternalValue;
14
+ constructor();
15
+ connectedCallback(): void;
16
+ disconnectedCallback(): void;
17
+ set value(value: string);
18
+ get value(): string;
19
+ private renderDOM;
20
+ private getCssUrl;
21
+ private addStyles;
22
+ private addDOM;
23
+ private emitChange;
24
+ }
25
+
26
+ declare function defineElement(): void;
27
+
28
+ export { Element, Element as default, defineElement };
@@ -0,0 +1,28 @@
1
+ declare class Element extends HTMLElement {
2
+ private shadowRootElement;
3
+ private rootElement?;
4
+ private ast;
5
+ private render;
6
+ private caret;
7
+ private select;
8
+ private interaction;
9
+ private editor;
10
+ private input;
11
+ private intent;
12
+ private styled;
13
+ private hasAcceptedExternalValue;
14
+ constructor();
15
+ connectedCallback(): void;
16
+ disconnectedCallback(): void;
17
+ set value(value: string);
18
+ get value(): string;
19
+ private renderDOM;
20
+ private getCssUrl;
21
+ private addStyles;
22
+ private addDOM;
23
+ private emitChange;
24
+ }
25
+
26
+ declare function defineElement(): void;
27
+
28
+ export { Element, Element as default, defineElement };