@folijs/react 0.2.0 → 0.4.0

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/styles.css CHANGED
@@ -10,9 +10,6 @@
10
10
  --foli-border-color: #e2e2df;
11
11
  --foli-text-color: #1d1d1b;
12
12
  --foli-selection-color: rgb(35 103 220 / 0.22);
13
- --foli-font-family: Georgia, "Times New Roman", serif;
14
- --foli-font-size: 11pt;
15
- --foli-line-height: 1.5;
16
13
  --foli-page-gap: 24px;
17
14
  --foli-toolbar-background: #ffffff;
18
15
  --foli-toolbar-color: #1d1d1b;
@@ -20,10 +17,6 @@
20
17
  --foli-toolbar-hover: #f0f0ee;
21
18
  --foli-focus-ring: #2367dc;
22
19
  --foli-error-color: #b3261e;
23
- --foli-link-color: #1f5fbf;
24
- --foli-marker-color: currentColor;
25
- --foli-rule-color: #8c8c87;
26
- --foli-rule-thickness: 1px;
27
20
  }
28
21
 
29
22
  .foli-canvas {
@@ -37,9 +30,6 @@
37
30
  background: var(--foli-page-background);
38
31
  box-shadow: var(--foli-page-shadow);
39
32
  color: var(--foli-text-color);
40
- font-family: var(--foli-font-family);
41
- font-size: var(--foli-font-size);
42
- line-height: var(--foli-line-height);
43
33
  }
44
34
 
45
35
  .foli-page + .foli-page {
@@ -54,35 +44,7 @@
54
44
  background: var(--foli-selection-color);
55
45
  }
56
46
 
57
- /* Links and list markers in the document. */
58
- .foli-page a {
59
- color: var(--foli-link-color);
60
- }
61
-
62
- .foli-page li::marker {
63
- color: var(--foli-marker-color);
64
- }
65
-
66
- /*
67
- * A horizontal rule: a line in the middle of a taller box, so it is easy to click (a click
68
- * selects it). Drawn with a border, which prints (backgrounds may not).
69
- */
70
- .foli-page hr {
71
- position: relative;
72
- height: 12px;
73
- margin: 6px 0;
74
- border: 0;
75
- overflow: visible;
76
- }
77
-
78
- .foli-page hr::after {
79
- content: "";
80
- position: absolute;
81
- inset: 50% 0 auto;
82
- border-top: var(--foli-rule-thickness) solid var(--foli-rule-color);
83
- }
84
-
85
- /* A node-selected block (a horizontal rule): the view adds the class. */
47
+ /* A node-selected block (an opaque block, a table): the view adds the class. */
86
48
  .foli-content .foli-selected-node {
87
49
  outline: 2px solid var(--foli-focus-ring);
88
50
  outline-offset: 2px;
@@ -298,6 +260,104 @@
298
260
  background: var(--foli-border-color);
299
261
  }
300
262
 
263
+ /* The pages and the comments pane (FoliEditor) side by side. */
264
+ .foli-editor-body {
265
+ display: flex;
266
+ align-items: flex-start;
267
+ background: var(--foli-canvas-background);
268
+ }
269
+
270
+ .foli-editor-body > .foli-canvas {
271
+ flex: 1 1 auto;
272
+ min-width: 0;
273
+ }
274
+
275
+ /* Comments pane (FoliComments): threads beside their text. */
276
+ .foli-comments {
277
+ position: relative;
278
+ flex: 0 0 18rem;
279
+ margin: 32px 16px 32px 0;
280
+ color: var(--foli-text-color);
281
+ font:
282
+ 13px / 1.4 system-ui,
283
+ sans-serif;
284
+ }
285
+
286
+ .foli-comments-empty {
287
+ margin: 0;
288
+ opacity: 0.7;
289
+ }
290
+
291
+ .foli-comment-thread {
292
+ position: absolute;
293
+ inset-inline: 0;
294
+ padding: 8px;
295
+ border: 1px solid var(--foli-border-color);
296
+ border-radius: 6px;
297
+ background: var(--foli-page-background);
298
+ box-shadow: var(--foli-page-shadow);
299
+ }
300
+
301
+ .foli-comment-thread[data-active],
302
+ .foli-comment-thread:focus-within {
303
+ border-color: var(--foli-focus-ring);
304
+ }
305
+
306
+ .foli-comment-thread[data-done] {
307
+ opacity: 0.7;
308
+ }
309
+
310
+ .foli-comment + .foli-comment {
311
+ margin-top: 8px;
312
+ padding-top: 8px;
313
+ border-top: 1px solid var(--foli-border-color);
314
+ }
315
+
316
+ .foli-comment-meta,
317
+ .foli-comment-text p {
318
+ margin: 0;
319
+ }
320
+
321
+ .foli-comment-actions {
322
+ display: flex;
323
+ flex-wrap: wrap;
324
+ gap: 4px;
325
+ margin-top: 6px;
326
+ }
327
+
328
+ .foli-comment-actions button {
329
+ height: 28px;
330
+ padding: 0 8px;
331
+ border: 1px solid var(--foli-border-color);
332
+ border-radius: 4px;
333
+ background: none;
334
+ color: inherit;
335
+ font: inherit;
336
+ cursor: pointer;
337
+ }
338
+
339
+ .foli-comment-form label {
340
+ display: block;
341
+ margin-top: 6px;
342
+ }
343
+
344
+ .foli-comment-form textarea {
345
+ box-sizing: border-box;
346
+ width: 100%;
347
+ font: inherit;
348
+ }
349
+
350
+ .foli-comments :focus-visible {
351
+ outline: 2px solid var(--foli-focus-ring);
352
+ outline-offset: 1px;
353
+ }
354
+
355
+ /* The text of the comment that has the focus. */
356
+ .foli-content .foli-comment-active {
357
+ outline: 2px solid var(--foli-focus-ring);
358
+ outline-offset: 1px;
359
+ }
360
+
301
361
  /*
302
362
  * The view prints one sheet per page (size from the document settings); this drops the chrome.
303
363
  * Hide the rest of your page in print: anything printed before the pages adds sheets.
@@ -311,7 +371,12 @@
311
371
  box-shadow: none;
312
372
  }
313
373
  .foli-toolbar,
314
- .foli-link-dialog {
374
+ .foli-link-dialog,
375
+ .foli-comments {
315
376
  display: none;
316
377
  }
378
+ .foli-editor-body {
379
+ display: block;
380
+ background: none;
381
+ }
317
382
  }