@trafica/editor 1.0.16 → 1.0.18

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.
@@ -297,6 +297,92 @@
297
297
  min-width: 0;
298
298
  }
299
299
 
300
+ /* ─── Todo List (frontend display — .todo-list class from HTMLSerializer) ─── */
301
+ /*
302
+ * These styles apply to the serialized HTML output when displayed outside the
303
+ * editor. Include @trafica/editor/styles in your app to get these automatically.
304
+ * The .todo-list class is produced by HTMLSerializer for check_list nodes.
305
+ */
306
+
307
+ .todo-list {
308
+ list-style: none;
309
+ padding-left: 0;
310
+ margin: 0.5em 0;
311
+ }
312
+
313
+ .todo-list .todo-list__item {
314
+ display: flex;
315
+ align-items: baseline;
316
+ gap: 0.55em;
317
+ margin: 0.15em 0;
318
+ min-height: 1.5em;
319
+ padding: 0;
320
+ }
321
+
322
+ .todo-list .todo-list__label {
323
+ display: flex;
324
+ align-items: baseline;
325
+ gap: 0.55em;
326
+ cursor: default;
327
+ flex: 1;
328
+ min-width: 0;
329
+ font: inherit;
330
+ }
331
+
332
+ /* Hide the browser native checkbox — render custom styled one */
333
+ .todo-list .todo-list__label input[type="checkbox"] {
334
+ appearance: none;
335
+ -webkit-appearance: none;
336
+ flex-shrink: 0;
337
+ width: 1.1em;
338
+ height: 1.1em;
339
+ border: 1.5px solid #b0b8c1;
340
+ border-radius: 3px;
341
+ background: #fff;
342
+ position: relative;
343
+ top: 0.15em;
344
+ cursor: default;
345
+ box-sizing: border-box;
346
+ transition: border-color 0.15s, background 0.15s;
347
+ margin: 0;
348
+ }
349
+
350
+ .todo-list .todo-list__label input[type="checkbox"]:checked {
351
+ background: #2563eb;
352
+ border-color: #2563eb;
353
+ }
354
+
355
+ /* Checkmark via pseudo-element */
356
+ .todo-list .todo-list__label input[type="checkbox"]:checked::after {
357
+ content: '';
358
+ display: block;
359
+ position: absolute;
360
+ top: 50%;
361
+ left: 50%;
362
+ width: 0.45em;
363
+ height: 0.25em;
364
+ border-left: 1.5px solid #fff;
365
+ border-bottom: 1.5px solid #fff;
366
+ transform: translate(-50%, -65%) rotate(-45deg);
367
+ }
368
+
369
+ .todo-list .todo-list__label__description {
370
+ flex: 1;
371
+ min-width: 0;
372
+ word-break: break-word;
373
+ }
374
+
375
+ /* Strikethrough text on checked items */
376
+ .todo-list .todo-list__item_checked .todo-list__label__description {
377
+ text-decoration: line-through;
378
+ color: #9ca3af;
379
+ }
380
+
381
+ /* Nested todo lists */
382
+ .todo-list .todo-list {
383
+ margin: 0.15em 0 0.15em 1.5em;
384
+ }
385
+
300
386
  /* ─── Focus styles ────────────────────────────────────────────────────────── */
301
387
 
302
388
  .editor-canvas:focus {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trafica/editor",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "Production-grade rich text editor for React",
5
5
  "keywords": [
6
6
  "rich-text-editor",