@jant/core 1.2.0 → 1.3.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.
Files changed (147) hide show
  1. package/bin/commands/site/import.js +2 -1
  2. package/dist/{app-CbOZ2Irh.js → app-C8dETvgL.js} +1429 -681
  3. package/dist/client/.vite/manifest.json +72 -83
  4. package/dist/client/_assets/chunks/{confirm-CMe01lne.js → confirm-BQebcuNB.js} +1 -1
  5. package/dist/client/_assets/chunks/{create-editor-hWapNE40.js → create-editor-B8KuszlS.js} +38 -38
  6. package/dist/client/_assets/chunks/footnote-rail-DUrqz0Py.js +2 -0
  7. package/dist/client/_assets/chunks/{jant-locale-picker-2L4rkDaz.js → jant-locale-picker-CLq0iKDH.js} +1 -1
  8. package/dist/client/_assets/chunks/lit-BN4mrI3j.js +2 -0
  9. package/dist/client/_assets/chunks/{settings-paths-BBVT8zKj.js → settings-paths-_fry4yWW.js} +1 -1
  10. package/dist/client/_assets/chunks/{slug-format-BuCPjSrB.js → slug-format-bcJ2ozr4.js} +1 -1
  11. package/dist/client/_assets/chunks/{sortable-list-DJXwkaOv.js → sortable-list-Bz2Na2E9.js} +2 -2
  12. package/dist/client/_assets/chunks/{unsafe-html-CWos3v6N.js → unsafe-html-OJ9m154w.js} +1 -1
  13. package/dist/client/_assets/chunks/unsafe-svg-DVJ4NPcb.js +1 -0
  14. package/dist/client/_assets/{client-D8Rrsd73.css → client-CoNHvipV.css} +1 -1
  15. package/dist/client/_assets/{client-auth-CsUGM718.js → client-auth-CbnZkLJ6.js} +99 -129
  16. package/dist/client/_assets/client-author-2WYBkgni.css +2 -0
  17. package/dist/client/_assets/{client-compose-BB4U7Wz0.js → client-compose-DYtDlYm-.js} +248 -244
  18. package/dist/client/_assets/{client-manage-CI9-eh-8.js → client-manage-BODyYP5Z.js} +157 -157
  19. package/dist/client/_assets/client-pq6sVS7y.js +354 -0
  20. package/dist/client/_assets/{client-settings-BnGPuqwc.js → client-settings-DDpe_tXJ.js} +166 -166
  21. package/dist/client/_assets/client-share-B9OsXx9p.js +149 -0
  22. package/dist/{constants-DEgyqWDl.js → constants-C2CdWAqt.js} +55 -5
  23. package/dist/index.js +1 -1
  24. package/dist/node.js +2 -2
  25. package/package.json +2 -1
  26. package/src/client/components/compose-types.ts +5 -1
  27. package/src/client/components/jant-compose-dialog.ts +25 -4
  28. package/src/client/components/jant-media-lightbox.ts +18 -3
  29. package/src/client/components/jant-nav-manager.ts +2 -0
  30. package/src/client/components/jant-post-menu.ts +42 -89
  31. package/src/client/components/nav-manager-types.ts +2 -0
  32. package/src/client/components/settings-types.ts +1 -1
  33. package/src/client/list-views.ts +382 -0
  34. package/src/client/media-lightbox-events.ts +12 -0
  35. package/src/client/runtime-paths.ts +12 -0
  36. package/src/client/share-capture.ts +63 -0
  37. package/src/client/share-launch.ts +36 -9
  38. package/src/client/tiptap/create-editor.ts +4 -0
  39. package/src/client/tiptap/embed-node.ts +3 -1
  40. package/src/client/tiptap/html-block-node.ts +3 -1
  41. package/src/client/tiptap/image-node.ts +3 -1
  42. package/src/client/view-confirm.ts +32 -4
  43. package/src/client.ts +1 -0
  44. package/src/db/migrations/0037_round_post.sql +16 -0
  45. package/src/db/migrations/0038_flashy_changeling.sql +15 -0
  46. package/src/db/migrations/0039_mixed_sister_grimm.sql +1 -0
  47. package/src/db/migrations/meta/0037_snapshot.json +2932 -0
  48. package/src/db/migrations/meta/0038_snapshot.json +2924 -0
  49. package/src/db/migrations/meta/0039_snapshot.json +2931 -0
  50. package/src/db/migrations/meta/_journal.json +21 -0
  51. package/src/db/migrations/pg/0035_flimsy_outlaw_kid.sql +3 -0
  52. package/src/db/migrations/pg/0036_milky_wolverine.sql +5 -0
  53. package/src/db/migrations/pg/0037_fuzzy_hammerhead.sql +1 -0
  54. package/src/db/migrations/pg/meta/0035_snapshot.json +3773 -0
  55. package/src/db/migrations/pg/meta/0036_snapshot.json +3766 -0
  56. package/src/db/migrations/pg/meta/0037_snapshot.json +3772 -0
  57. package/src/db/migrations/pg/meta/_journal.json +21 -0
  58. package/src/db/pg/schema.ts +1 -0
  59. package/src/db/post-visibility.ts +37 -6
  60. package/src/db/schema.ts +5 -2
  61. package/src/i18n/locales/glossary.zh-Hans.yml +4 -0
  62. package/src/i18n/locales/glossary.zh-Hant.yml +4 -0
  63. package/src/i18n/locales/public/en.po +21 -7
  64. package/src/i18n/locales/public/en.ts +1 -1
  65. package/src/i18n/locales/public/zh-Hans.po +20 -6
  66. package/src/i18n/locales/public/zh-Hans.ts +1 -1
  67. package/src/i18n/locales/public/zh-Hant.po +20 -6
  68. package/src/i18n/locales/public/zh-Hant.ts +1 -1
  69. package/src/i18n/locales/settings/en.po +10 -0
  70. package/src/i18n/locales/settings/en.ts +1 -1
  71. package/src/i18n/locales/settings/zh-Hans.po +10 -0
  72. package/src/i18n/locales/settings/zh-Hans.ts +1 -1
  73. package/src/i18n/locales/settings/zh-Hant.po +10 -0
  74. package/src/i18n/locales/settings/zh-Hant.ts +1 -1
  75. package/src/lib/api-public-posts.ts +10 -0
  76. package/src/lib/feed-policy.ts +2 -2
  77. package/src/lib/filter-dimensions.ts +11 -4
  78. package/src/lib/hugo-markdown.ts +7 -0
  79. package/src/lib/icons.ts +2 -0
  80. package/src/lib/link-preview.ts +499 -0
  81. package/src/lib/list-views.ts +117 -0
  82. package/src/lib/markdown-manager.ts +40 -1
  83. package/src/lib/navigation.ts +1 -1
  84. package/src/lib/share-card.ts +4 -3
  85. package/src/lib/thread-query.ts +6 -2
  86. package/src/lib/timeline.ts +12 -11
  87. package/src/lib/url-fetch.ts +291 -74
  88. package/src/lib/view-buffer.ts +2 -2
  89. package/src/lib/view-counting.ts +7 -6
  90. package/src/lib/view-token.ts +29 -7
  91. package/src/lib/view.ts +17 -0
  92. package/src/middleware/view-counter.ts +10 -5
  93. package/src/preset.css +5 -3
  94. package/src/routes/api/search.ts +1 -1
  95. package/src/routes/dash/settings.tsx +1 -1
  96. package/src/routes/feed/sitemap.ts +1 -1
  97. package/src/routes/pages/archive.tsx +25 -19
  98. package/src/routes/pages/collection.tsx +3 -3
  99. package/src/routes/pages/page.tsx +16 -4
  100. package/src/routes/pages/search.tsx +3 -3
  101. package/src/routes/view-confirm.ts +23 -15
  102. package/src/services/collection.ts +1 -1
  103. package/src/services/export-theme/assets/client-site.js +19 -19
  104. package/src/services/export-theme/layouts/archive/list.html +4 -2
  105. package/src/services/export-theme/layouts/partials/collection-members.html +4 -3
  106. package/src/services/export-theme/layouts/partials/featured-members.html +3 -3
  107. package/src/services/export-theme/layouts/partials/head.html +2 -0
  108. package/src/services/export-theme/layouts/partials/latest-members.html +4 -4
  109. package/src/services/export-theme/layouts/partials/post-card.html +1 -9
  110. package/src/services/export-theme/layouts/partials/reply.html +1 -9
  111. package/src/services/export-theme/layouts/partials/smart-collection-members.html +4 -3
  112. package/src/services/export-theme/layouts/post/list.html +1 -9
  113. package/src/services/export-theme/styles/main.css +2 -26
  114. package/src/services/export.ts +10 -3
  115. package/src/services/mcp.ts +5 -5
  116. package/src/services/navigation.ts +9 -4
  117. package/src/services/post.ts +102 -112
  118. package/src/services/search.ts +22 -7
  119. package/src/services/smart-collection.ts +3 -3
  120. package/src/services/stats.ts +12 -5
  121. package/src/services/thread.ts +6 -2
  122. package/src/styles/components-author.css +69 -7
  123. package/src/styles/tokens.css +28 -29
  124. package/src/styles/ui-author.css +140 -353
  125. package/src/styles/ui.css +34 -32
  126. package/src/types/constants.ts +68 -4
  127. package/src/types/entities.ts +1 -0
  128. package/src/types/views.ts +2 -0
  129. package/src/ui/compose/ComposeDialog.tsx +20 -1
  130. package/src/ui/dash/StatusBadge.tsx +11 -0
  131. package/src/ui/dash/appearance/FontThemeContent.tsx +1 -1
  132. package/src/ui/dash/appearance/NavigationContent.tsx +8 -0
  133. package/src/ui/dash/settings/StatsContent.tsx +29 -29
  134. package/src/ui/feed/LinkCard.tsx +19 -2
  135. package/src/ui/feed/PostStatusBadges.tsx +19 -3
  136. package/src/ui/feed/TimelineFeed.tsx +3 -0
  137. package/src/ui/font-themes.ts +32 -15
  138. package/src/ui/pages/ArchivePage.tsx +1 -0
  139. package/src/ui/shared/PostFooter.tsx +1 -22
  140. package/src/ui/shared/custom-icons.ts +5 -5
  141. package/dist/client/_assets/chunks/footnote-rail-9zwl6jtV.js +0 -2
  142. package/dist/client/_assets/chunks/lit-Bw_voPoW.js +0 -2
  143. package/dist/client/_assets/chunks/runtime-paths-y0_gHowM.js +0 -1
  144. package/dist/client/_assets/chunks/unsafe-svg-CUrgo4Xg.js +0 -1
  145. package/dist/client/_assets/client-BO8GOFfT.js +0 -354
  146. package/dist/client/_assets/client-author-QPm1whbO.css +0 -2
  147. package/dist/client/_assets/client-share-C59mOLJ1.js +0 -149
@@ -5392,27 +5392,17 @@
5392
5392
  on an empty post, not a reserved shape, so it should follow the type
5393
5393
  instead of a pixel count that goes stale when the leading moves. Every
5394
5394
  compose text surface shares it: a note's body and the "thoughts" under a
5395
- link or a quote all open the same way and grow from there. */
5395
+ link or a quote all open the same way and grow from there.
5396
+ The type itself — family, size, leading, every block and mark inside — is
5397
+ the reader's: the editor element carries `.prose` (see `createTiptapEditor`),
5398
+ so what is written here looks the way it will be read. Only what an
5399
+ editor has and a published post does not is styled in this sheet. */
5396
5400
  .compose-tiptap-body .tiptap {
5397
5401
  outline: none;
5398
5402
  min-height: calc(var(--type-body-leading) * 2em);
5399
5403
  min-width: 0;
5400
5404
  max-width: 100%;
5401
5405
  overflow-x: auto;
5402
- font-size: var(--type-content-body);
5403
- line-height: var(--type-body-leading);
5404
- letter-spacing: var(--type-body-tracking);
5405
- color: var(--site-text-primary);
5406
- font-family: var(--font-body);
5407
- }
5408
-
5409
- .compose-reply-compose-layout .compose-tiptap-body .tiptap {
5410
- font-size: var(--type-content-body);
5411
- line-height: var(--type-body-leading);
5412
- }
5413
-
5414
- .compose-tiptap-link .tiptap {
5415
- color: var(--site-text-primary);
5416
5406
  }
5417
5407
 
5418
5408
  /* Placeholder */
@@ -5425,268 +5415,9 @@
5425
5415
  height: 0;
5426
5416
  }
5427
5417
 
5428
- /* Tiptap prose styling */
5429
- .compose-tiptap-body .tiptap :is(h1, h2, h3, h4) {
5430
- font-family: var(--font-heading);
5431
- font-weight: var(--type-heading-weight);
5432
- letter-spacing: var(--type-heading-tracking);
5433
- line-height: var(--type-heading-leading);
5434
- }
5435
-
5436
- .compose-tiptap-body .tiptap h1 {
5437
- font-size: var(--type-content-display);
5438
- margin-top: 4rem;
5439
- margin-bottom: 1.5rem;
5440
- }
5441
-
5442
- .compose-tiptap-body .tiptap h2 {
5443
- font-size: var(--type-content-title);
5444
- margin-top: 2.1rem;
5445
- margin-bottom: 1.4rem;
5446
- }
5447
-
5448
- .compose-tiptap-body .tiptap h3 {
5449
- font-size: var(--type-content-subtitle);
5450
- margin-top: 2rem;
5451
- margin-bottom: 1.4rem;
5452
- }
5453
-
5454
- .compose-reply-compose-layout
5455
- .compose-tiptap-body
5456
- .tiptap
5457
- :is(h1, h2, h3, h4) {
5458
- font-size: var(--type-secondary);
5459
- line-height: 1.32;
5460
- margin-top: 1.4rem;
5461
- margin-bottom: 0.75rem;
5462
- }
5463
-
5464
- .compose-tiptap-body .tiptap p {
5465
- margin-top: 1.4rem;
5466
- margin-bottom: 1.4rem;
5467
- }
5468
-
5469
- .compose-reply-compose-layout .compose-tiptap-body .tiptap p {
5470
- margin-top: 1rem;
5471
- margin-bottom: 1rem;
5472
- }
5473
-
5474
- /* The first block's 1.4rem top margin is a lead-in that only made sense when
5475
- the body was the first thing in the editor. Every editor now renders a
5476
- format header above it — and notes a title field too — so it reads as a gap
5477
- instead. (This used to be scoped to .compose-editor-row, back when
5478
- standalone new/edit editors did start with the body.) */
5479
- .compose-tiptap-body .tiptap > :first-child {
5480
- margin-top: 0;
5481
- }
5482
-
5483
- .compose-tiptap-body .tiptap ul {
5484
- list-style-type: disc;
5485
- padding-left: 1.4em;
5486
- margin: 1.25em 0;
5487
- }
5488
-
5489
- .compose-tiptap-body .tiptap ol {
5490
- list-style-type: decimal;
5491
- /* Keep multi-digit markers inside the editor's scrollable bounds. */
5492
- padding-left: 2.25em;
5493
- margin: 1.25em 0;
5494
- }
5495
-
5496
- .compose-tiptap-body .tiptap :is(ul, ol) :is(ul, ol) {
5497
- padding-left: 1.5em;
5498
- margin: 0.4em 0;
5499
- }
5500
-
5501
- .compose-tiptap-body .tiptap ul ul {
5502
- list-style-type: circle;
5503
- }
5504
-
5505
- .compose-tiptap-body .tiptap ul ul ul {
5506
- list-style-type: square;
5507
- }
5508
-
5509
- .compose-tiptap-body .tiptap ol ol {
5510
- list-style-type: lower-alpha;
5511
- }
5512
-
5513
- .compose-tiptap-body .tiptap ol ol ol {
5514
- list-style-type: lower-roman;
5515
- }
5516
-
5517
- .compose-tiptap-body .tiptap li {
5518
- margin: 0.5em 0;
5519
- }
5520
-
5521
- .compose-tiptap-body .tiptap li > p:first-child {
5522
- margin-top: 0;
5523
- }
5524
-
5525
- .compose-tiptap-body .tiptap li > p:last-child {
5526
- margin-bottom: 0;
5527
- }
5528
-
5529
- /* A nested list makes its leading paragraph no longer the last child, so
5530
- clear the body-paragraph margin that would otherwise separate the levels. */
5531
- .compose-tiptap-body .tiptap li > p:has(+ :is(ul, ol)),
5532
- .compose-tiptap-body
5533
- .tiptap
5534
- li
5535
- > p:has(+ .ProseMirror-gapcursor + :is(ul, ol)) {
5536
- margin-bottom: 0;
5537
- }
5538
-
5539
- .compose-tiptap-body .tiptap blockquote {
5540
- --_blockquote-bg: var(--compose-blockquote-bg);
5541
- --_blockquote-text: var(--compose-blockquote-text);
5542
- position: relative;
5543
- margin: 1.4rem 0;
5544
- padding: 1.4rem 1rem 0.75rem;
5545
- border: none;
5546
- border-radius: 6px;
5547
- background: var(--_blockquote-bg);
5548
- color: var(--_blockquote-text);
5549
- font-family: var(--font-blockquote);
5550
- font-style: italic;
5551
- font-weight: inherit;
5552
- quotes: none;
5553
- text-wrap: pretty;
5554
- transition:
5555
- background 0.18s ease,
5556
- color 0.18s ease;
5557
- }
5558
-
5559
- /* Reply compose deliberately stays denser than ordinary authored prose. */
5560
- .compose-reply-compose-layout .compose-tiptap-body .tiptap ul {
5561
- padding-left: 1.5em;
5562
- margin: 0.25em 0;
5563
- }
5564
-
5565
- .compose-reply-compose-layout .compose-tiptap-body .tiptap ol {
5566
- padding-left: 2.25em;
5567
- margin: 0.25em 0;
5568
- }
5569
-
5570
- .compose-reply-compose-layout
5571
- .compose-tiptap-body
5572
- .tiptap
5573
- :is(ul, ol)
5574
- :is(ul, ol) {
5575
- padding-left: 1.5em;
5576
- margin: 0.2em 0;
5577
- }
5578
-
5579
- .compose-reply-compose-layout .compose-tiptap-body .tiptap li {
5580
- margin: 0.15em 0;
5581
- }
5582
-
5583
- .compose-reply-compose-layout .compose-tiptap-body .tiptap blockquote {
5584
- margin: 0.72em 0;
5585
- padding: 1.3rem 0.9em 0.76em 1em;
5586
- }
5587
-
5588
- /* CJK: no italic for blockquotes (no true italic glyph) */
5589
- :lang(zh) .compose-tiptap-body .tiptap blockquote,
5590
- :lang(ja) .compose-tiptap-body .tiptap blockquote,
5591
- :lang(ko) .compose-tiptap-body .tiptap blockquote {
5592
- font-style: normal;
5593
- }
5594
-
5595
- .compose-tiptap-body .tiptap blockquote::before {
5596
- content: "";
5597
- display: block;
5598
- width: 1.3rem;
5599
- height: 1.3rem;
5600
- margin-bottom: 0.35rem;
5601
- background: var(--compose-blockquote-rail);
5602
- opacity: 0.6;
5603
- mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 96 96' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24.4 10.5C16.9 17.7 11.5 26.8 8.2 37.7C4.9 48.7 4.8 58.9 7.8 68.2C10.3 75.7 15.4 79.5 22.9 79.5C28 79.5 32.2 77.8 35.4 74.2C38.6 70.7 40.2 66.5 40.2 61.4C40.2 56.5 38.8 52.6 36 49.6C33.3 46.6 29.7 45.1 25.2 45.1C23.4 45.1 21.8 45.3 20.2 45.8C22.2 37.3 26.7 29.2 33.6 21.4L24.4 10.5Z'/%3E%3Cpath d='M60.8 10.5C53.3 17.7 47.9 26.8 44.6 37.7C41.3 48.7 41.2 58.9 44.2 68.2C46.7 75.7 51.8 79.5 59.3 79.5C64.4 79.5 68.6 77.8 71.8 74.2C75 70.7 76.6 66.5 76.6 61.4C76.6 56.5 75.2 52.6 72.4 49.6C69.7 46.6 66.1 45.1 61.6 45.1C59.8 45.1 58.2 45.3 56.6 45.8C58.6 37.3 63.1 29.2 70 21.4L60.8 10.5Z'/%3E%3C/svg%3E");
5604
- mask-size: contain;
5605
- mask-repeat: no-repeat;
5606
- -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 96 96' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24.4 10.5C16.9 17.7 11.5 26.8 8.2 37.7C4.9 48.7 4.8 58.9 7.8 68.2C10.3 75.7 15.4 79.5 22.9 79.5C28 79.5 32.2 77.8 35.4 74.2C38.6 70.7 40.2 66.5 40.2 61.4C40.2 56.5 38.8 52.6 36 49.6C33.3 46.6 29.7 45.1 25.2 45.1C23.4 45.1 21.8 45.3 20.2 45.8C22.2 37.3 26.7 29.2 33.6 21.4L24.4 10.5Z'/%3E%3Cpath d='M60.8 10.5C53.3 17.7 47.9 26.8 44.6 37.7C41.3 48.7 41.2 58.9 44.2 68.2C46.7 75.7 51.8 79.5 59.3 79.5C64.4 79.5 68.6 77.8 71.8 74.2C75 70.7 76.6 66.5 76.6 61.4C76.6 56.5 75.2 52.6 72.4 49.6C69.7 46.6 66.1 45.1 61.6 45.1C59.8 45.1 58.2 45.3 56.6 45.8C58.6 37.3 63.1 29.2 70 21.4L60.8 10.5Z'/%3E%3C/svg%3E");
5607
- -webkit-mask-size: contain;
5608
- -webkit-mask-repeat: no-repeat;
5609
- }
5610
-
5611
- .compose-tiptap-body .tiptap blockquote:focus-within {
5612
- --_blockquote-bg: var(--compose-blockquote-bg-focus);
5613
- color: var(--site-text-primary);
5614
- }
5615
-
5616
- .compose-tiptap-body .tiptap blockquote > :first-child {
5617
- margin-top: 0;
5618
- }
5619
-
5620
- .compose-tiptap-body .tiptap blockquote > :last-child {
5621
- margin-bottom: 0;
5622
- }
5623
-
5624
- .compose-tiptap-body .tiptap blockquote p {
5625
- margin: 0;
5626
- }
5627
-
5628
- .compose-tiptap-body .tiptap blockquote p + p,
5629
- .compose-tiptap-body .tiptap blockquote ul,
5630
- .compose-tiptap-body .tiptap blockquote ol,
5631
- .compose-tiptap-body .tiptap blockquote pre {
5632
- margin-top: 0.6em;
5633
- }
5634
-
5635
- .compose-tiptap-body .tiptap pre {
5636
- background: var(--site-page-bg);
5637
- border-radius: 6px;
5638
- padding: 0.75em 1em;
5639
- margin: 0.5em 0;
5640
- overflow-x: auto;
5641
- font-size: 0.85em;
5642
- }
5643
-
5644
- .compose-tiptap-body .tiptap code {
5645
- background: var(--site-page-bg);
5646
- border-radius: 3px;
5647
- padding: 0.15em 0.3em;
5648
- font-size: 0.9em;
5649
- }
5650
-
5651
- .compose-tiptap-body .tiptap pre code {
5652
- background: none;
5653
- border-radius: 0;
5654
- padding: 0;
5655
- font-size: inherit;
5656
- }
5657
-
5658
- .compose-tiptap-body .tiptap hr {
5659
- border: none;
5660
- border-top: 1px solid var(--site-divider);
5661
- margin: 1em 0;
5662
- }
5663
-
5664
- /* --- Table in editor -------------------------------------------------- */
5665
-
5666
- .compose-tiptap-body .tiptap table {
5667
- border-collapse: collapse;
5668
- width: max-content;
5669
- min-width: 100%;
5670
- margin: 0.75em 0;
5671
- }
5672
-
5673
- .compose-tiptap-body .tiptap td,
5674
- .compose-tiptap-body .tiptap th {
5675
- border: 1px solid var(--site-divider);
5676
- padding: 0.4em 0.6em;
5677
- vertical-align: top;
5678
- min-width: 6rem;
5679
- position: relative;
5680
- }
5681
-
5682
- .compose-tiptap-body .tiptap th {
5683
- font-weight: var(--fw-semibold);
5684
- background: var(--site-page-bg);
5685
- }
5686
-
5687
- .compose-tiptap-body .tiptap .selectedCell {
5688
- background: oklch(from var(--site-accent) l c h / 0.12);
5689
- }
5418
+ /* Blocks and marks take `.prose` as they are. The few places the editor
5419
+ has to differ are in the unlayered block at the end of this sheet, since a
5420
+ rule inside `@layer components` cannot outrank `.prose`. */
5690
5421
 
5691
5422
  /* Contextual table toolbar — deliberately quieter than the text bubble menu. */
5692
5423
  .tiptap-table-controls {
@@ -5886,8 +5617,9 @@
5886
5617
 
5887
5618
  /* --- Image figure in editor ------------------------------------------- */
5888
5619
 
5620
+ /* Margin, measure and corner radius come from the reader's `.prose figure`
5621
+ rules, so an image sits in the draft the way it sits in the post. */
5889
5622
  .tiptap-image-figure {
5890
- margin: 0.75em 0;
5891
5623
  position: relative;
5892
5624
 
5893
5625
  /* Toolbar palette — soft charcoal, not pure black */
@@ -5926,10 +5658,6 @@
5926
5658
  }
5927
5659
 
5928
5660
  .tiptap-image-figure img {
5929
- width: 100%;
5930
- max-height: 500px;
5931
- object-fit: contain;
5932
- border-radius: 4px;
5933
5661
  display: block;
5934
5662
  }
5935
5663
 
@@ -6061,40 +5789,14 @@
6061
5789
  }
6062
5790
  }
6063
5791
 
6064
- /* Layout variants — in compact dialog, wide/full just fill the container */
6065
- .tiptap-image-figure[data-layout="wide"],
6066
- .tiptap-image-figure[data-layout="full"] {
6067
- width: 100%;
6068
- }
6069
-
5792
+ /* Layout variants. The breakout itself is the reader's `.prose figure` rule;
5793
+ only the compact composer holds it back (end of this sheet). */
6070
5794
  .tiptap-image-figure[data-layout="full"] .tiptap-image-container {
6071
5795
  border-radius: 0;
6072
5796
  border-left: none;
6073
5797
  border-right: none;
6074
5798
  }
6075
5799
 
6076
- .tiptap-image-figure[data-layout="full"] img {
6077
- border-radius: 0;
6078
- }
6079
-
6080
- /* Fullscreen editor — enough room for real breakout */
6081
- .compose-fullscreen .tiptap-image-figure[data-layout="wide"] {
6082
- width: 1200px;
6083
- max-width: 100vw;
6084
- margin-left: 50%;
6085
- transform: translateX(-50%);
6086
- }
6087
-
6088
- .compose-fullscreen .tiptap-image-figure[data-layout="full"] {
6089
- width: 100vw;
6090
- margin-left: 50%;
6091
- transform: translateX(-50%);
6092
- }
6093
-
6094
- .tiptap-image-figure[data-layout="full"] img {
6095
- border-radius: 0;
6096
- }
6097
-
6098
5800
  /* Centered toolbar — hidden until selected */
6099
5801
  .tiptap-image-toolbar {
6100
5802
  display: none;
@@ -6190,14 +5892,8 @@
6190
5892
  border-color: transparent;
6191
5893
  }
6192
5894
 
6193
- /* Static figcaption (shown when not selected) */
6194
- .tiptap-image-figcaption {
6195
- text-align: center;
6196
- font-size: var(--type-xs);
6197
- color: var(--site-text-secondary);
6198
- margin-top: 0.4em;
6199
- }
6200
-
5895
+ /* Static figcaption (shown when not selected). Its type is the reader's
5896
+ `.prose figcaption`. */
6201
5897
  .tiptap-image-figcaption:empty {
6202
5898
  display: none;
6203
5899
  }
@@ -6475,33 +6171,11 @@
6475
6171
  display: none;
6476
6172
  }
6477
6173
 
6478
- .compose-tiptap-body .tiptap a {
6479
- color: var(--site-prose-link-color, var(--site-content-link));
6480
- font-weight: inherit;
6481
- text-decoration: underline;
6482
- text-decoration-color: var(
6483
- --site-prose-link-underline,
6484
- var(--site-content-link-underline)
6485
- );
6486
- text-decoration-thickness: 0.05em;
6487
- text-underline-offset: 0.1em;
6488
- transition:
6489
- color 0.18s ease,
6490
- text-decoration-color 0.18s ease;
6491
- }
6492
-
6493
- .compose-tiptap-body .tiptap a:hover {
6494
- color: var(--site-prose-link-hover, var(--site-content-link-hover));
6495
- text-decoration-color: currentColor;
6496
- }
6497
-
6498
- .compose-tiptap-body .tiptap s {
6499
- text-decoration: line-through;
6500
- }
6501
-
6174
+ /* Raised without a line box of its own, like `.footnote-ref` in the post, so
6175
+ a line with a reference keeps the leading of the lines around it. */
6502
6176
  .compose-tiptap-body .tiptap .tiptap-footnote-reference {
6503
6177
  font-size: var(--type-footnote-ref);
6504
- line-height: 1;
6178
+ line-height: 0;
6505
6179
  vertical-align: super;
6506
6180
  color: var(--site-footnote-marker);
6507
6181
  white-space: nowrap;
@@ -6558,14 +6232,6 @@
6558
6232
  border-top: 0;
6559
6233
  }
6560
6234
 
6561
- .compose-tiptap-body .tiptap .tiptap-footnote-definition > :first-child {
6562
- margin-top: 0;
6563
- }
6564
-
6565
- .compose-tiptap-body .tiptap .tiptap-footnote-definition > :last-child {
6566
- margin-bottom: 0;
6567
- }
6568
-
6569
6235
  /* =========================================================================
6570
6236
  * Settings TipTap Editor (site description, footer)
6571
6237
  * ========================================================================= */
@@ -7357,8 +7023,6 @@
7357
7023
  .compose-fullscreen .compose-tiptap-body .tiptap {
7358
7024
  min-height: calc(100dvh - 14rem);
7359
7025
  padding-bottom: max(18vh, 8rem);
7360
- font-size: var(--type-content-body);
7361
- line-height: var(--type-body-leading);
7362
7026
  }
7363
7027
 
7364
7028
  .compose-fullscreen
@@ -7579,3 +7243,126 @@
7579
7243
  width: 100%;
7580
7244
  max-width: none;
7581
7245
  }
7246
+
7247
+ /*
7248
+ * Editor exceptions to `.prose`
7249
+ *
7250
+ * The editor document carries `.prose` (see `createTiptapEditor`), so a draft
7251
+ * is set in the reader's typography: one set of rules for the post as written
7252
+ * and as read. `.prose` is unlayered, and a rule inside `@layer components`
7253
+ * cannot outrank it whatever its specificity, so the few places an editor has
7254
+ * to differ from the published post sit out here. Anything not listed is the
7255
+ * reader's.
7256
+ */
7257
+
7258
+ /* TipTap wraps a list item's text in a paragraph, which the published HTML of
7259
+ a tight list does not have. Left alone, that paragraph's bottom margin opens
7260
+ a gap above a nested list that the post does not show. ProseMirror can put a
7261
+ gap cursor between the two. */
7262
+ .compose-tiptap-body .tiptap li > p:has(+ :is(ul, ol)),
7263
+ .compose-tiptap-body
7264
+ .tiptap
7265
+ li
7266
+ > p:has(+ .ProseMirror-gapcursor + :is(ul, ol)) {
7267
+ margin-bottom: 0;
7268
+ }
7269
+
7270
+ /* The editor scrolls sideways for wide tables, and a scroll box clips what
7271
+ hangs outside it. At the reader's indent the marker of item 10 is cut off;
7272
+ only a list against the left edge is at risk. */
7273
+ .compose-tiptap-body .tiptap > ol {
7274
+ padding-left: 2.25em;
7275
+ }
7276
+
7277
+ /* The post draws rules between rows and none between columns, which leaves an
7278
+ empty table in a draft with no visible cells. The grid is for writing. */
7279
+ .compose-tiptap-body .tiptap table {
7280
+ border-collapse: collapse;
7281
+ }
7282
+
7283
+ .compose-tiptap-body .tiptap :is(td, th) {
7284
+ position: relative;
7285
+ border: 1px solid var(--site-divider);
7286
+ padding: 0.4em 0.6em;
7287
+ }
7288
+
7289
+ .compose-tiptap-body .tiptap .selectedCell {
7290
+ background: oklch(from var(--site-accent) l c h / 0.12);
7291
+ }
7292
+
7293
+ /* TipTap wraps each table in `.tableWrapper`. The reader's rule that a block
7294
+ right after a heading or a rule gives up its top margin then lands on the
7295
+ wrapper, and the table inside keeps its own. */
7296
+ .compose-tiptap-body
7297
+ .tiptap
7298
+ :is(h1, h2, h3, h4, h5, h6, hr)
7299
+ + .tableWrapper
7300
+ > table,
7301
+ .compose-tiptap-body .tiptap > .tableWrapper:first-child > table {
7302
+ margin-top: 0;
7303
+ }
7304
+
7305
+ /* Footnote definitions are shown where they are written, beside their label. */
7306
+ .compose-tiptap-body .tiptap .tiptap-footnote-definition > :first-child {
7307
+ margin-top: 0;
7308
+ }
7309
+
7310
+ .compose-tiptap-body .tiptap .tiptap-footnote-definition > :last-child {
7311
+ margin-bottom: 0;
7312
+ }
7313
+
7314
+ /* Wide and full images break out of the column on the page and in the
7315
+ fullscreen editor, which has the room. Every other composer is a sheet one
7316
+ column wide, so there they fill it. */
7317
+ .compose-tiptap-body:not(.compose-fullscreen *)
7318
+ .tiptap-image-figure:is([data-layout="wide"], [data-layout="full"]) {
7319
+ width: 100%;
7320
+ max-width: none;
7321
+ margin-left: 0;
7322
+ transform: none;
7323
+ }
7324
+
7325
+ /* Reply compose deliberately stays denser than ordinary authored prose. Every
7326
+ level, or an h5 left at the prose size would outrank the compact h1. */
7327
+ .compose-reply-compose-layout
7328
+ .compose-tiptap-body
7329
+ .tiptap
7330
+ :is(h1, h2, h3, h4, h5, h6) {
7331
+ font-size: var(--type-secondary);
7332
+ line-height: 1.32;
7333
+ margin-top: 1.4rem;
7334
+ margin-bottom: 0.75rem;
7335
+ }
7336
+
7337
+ .compose-reply-compose-layout .compose-tiptap-body .tiptap p {
7338
+ margin-top: 1rem;
7339
+ margin-bottom: 1rem;
7340
+ }
7341
+
7342
+ .compose-reply-compose-layout .compose-tiptap-body .tiptap ul {
7343
+ padding-left: 1.5em;
7344
+ margin: 0.25em 0;
7345
+ }
7346
+
7347
+ .compose-reply-compose-layout .compose-tiptap-body .tiptap ol {
7348
+ padding-left: 2.25em;
7349
+ margin: 0.25em 0;
7350
+ }
7351
+
7352
+ .compose-reply-compose-layout
7353
+ .compose-tiptap-body
7354
+ .tiptap
7355
+ :is(ul, ol)
7356
+ :is(ul, ol) {
7357
+ padding-left: 1.5em;
7358
+ margin: 0.2em 0;
7359
+ }
7360
+
7361
+ .compose-reply-compose-layout .compose-tiptap-body .tiptap li {
7362
+ margin: 0.15em 0;
7363
+ }
7364
+
7365
+ .compose-reply-compose-layout .compose-tiptap-body .tiptap blockquote {
7366
+ margin: 0.72em 0;
7367
+ padding: 1.3rem 0.9em 0.76em 1em;
7368
+ }
package/src/styles/ui.css CHANGED
@@ -2392,10 +2392,13 @@
2392
2392
  margin-top: 1.4rem;
2393
2393
  }
2394
2394
 
2395
+ /* Inline text rather than flex, so `vertical-align: middle` can set both
2396
+ icons on the middle of the domain's x-height, where a lowercase domain's
2397
+ letters sit; centering on the line box put them a pixel or two high.
2398
+ Nothing breaks between an icon and the domain, but a long domain still
2399
+ wraps (`overflow-wrap: anywhere` in preset.css). */
2395
2400
  .feed-link-domain {
2396
- display: inline-flex;
2397
- align-items: center;
2398
- gap: 0.25rem;
2401
+ display: inline-block;
2399
2402
  max-width: 100%;
2400
2403
  margin-bottom: 0.65rem;
2401
2404
  padding: 0;
@@ -2407,17 +2410,40 @@
2407
2410
  font-weight: var(--fw-regular);
2408
2411
  line-height: 1.3;
2409
2412
  text-decoration: none;
2413
+ white-space: nowrap;
2410
2414
  transition: color 0.18s ease;
2411
2415
  }
2412
2416
 
2417
+ .feed-link-domain > span {
2418
+ white-space: normal;
2419
+ }
2420
+
2413
2421
  .feed-link-domain:hover {
2414
2422
  color: var(--site-text-primary);
2415
2423
  }
2416
2424
 
2425
+ /* The external-link mark, after the domain. */
2417
2426
  .feed-link-domain-icon {
2427
+ display: inline-block;
2418
2428
  width: 0.72rem;
2419
2429
  height: 0.72rem;
2420
- flex-shrink: 0;
2430
+ margin-left: 0.35rem;
2431
+ vertical-align: middle;
2432
+ }
2433
+
2434
+ /* The linked site's own icon, before the domain: sized to the text rather
2435
+ than to the arrow's thin stroke, and set on a backdrop that only dark
2436
+ mode fills. */
2437
+ .feed-link-domain-favicon {
2438
+ display: inline-block;
2439
+ width: 1rem;
2440
+ height: 1rem;
2441
+ margin-right: 0.4rem;
2442
+ padding: 1px;
2443
+ border-radius: 3px;
2444
+ background: var(--site-link-icon-backdrop);
2445
+ object-fit: contain;
2446
+ vertical-align: middle;
2421
2447
  }
2422
2448
 
2423
2449
  /* The two post titles that do not carry their own heading font: the detail
@@ -3445,6 +3471,7 @@
3445
3471
  article[data-post-pinned] .post-status-badges,
3446
3472
  article[data-post-pinned-in-collection] .post-status-badges,
3447
3473
  article[data-post-draft] .post-status-badges,
3474
+ article[data-post-visibility="unlisted"] .post-status-badges,
3448
3475
  article[data-post-visibility="private"] .post-status-badges {
3449
3476
  display: flex;
3450
3477
  }
@@ -3471,6 +3498,7 @@
3471
3498
  display: none;
3472
3499
  }
3473
3500
 
3501
+ article[data-post-visibility="unlisted"] .post-status-unlisted,
3474
3502
  article[data-post-visibility="private"] .post-status-private {
3475
3503
  display: inline-flex;
3476
3504
  }
@@ -3604,30 +3632,6 @@
3604
3632
  text-decoration: underline;
3605
3633
  }
3606
3634
 
3607
- .post-footer-external-link {
3608
- display: inline-flex;
3609
- align-items: center;
3610
- justify-content: center;
3611
- width: 2rem;
3612
- height: 2rem;
3613
- border-radius: 0.72rem;
3614
- color: var(--site-text-secondary);
3615
- text-decoration: none;
3616
- transition:
3617
- color 0.18s ease,
3618
- background-color 0.16s ease;
3619
- flex-shrink: 0;
3620
- }
3621
-
3622
- .post-footer-external-link:hover {
3623
- color: var(--site-text-primary);
3624
- }
3625
-
3626
- .post-footer-external-link svg {
3627
- width: 1.05rem;
3628
- height: 1.05rem;
3629
- }
3630
-
3631
3635
  .post-collection-tags {
3632
3636
  display: inline-flex;
3633
3637
  align-items: center;
@@ -4769,8 +4773,7 @@
4769
4773
  }
4770
4774
 
4771
4775
  .post-menu-trigger,
4772
- .reply-trigger,
4773
- .post-footer-external-link {
4776
+ .reply-trigger {
4774
4777
  width: 2.2rem;
4775
4778
  height: 2.2rem;
4776
4779
  border-radius: 0.88rem;
@@ -4786,8 +4789,7 @@
4786
4789
  }
4787
4790
 
4788
4791
  .post-menu-trigger svg,
4789
- .reply-trigger svg,
4790
- .post-footer-external-link svg {
4792
+ .reply-trigger svg {
4791
4793
  width: 1.18rem;
4792
4794
  height: 1.18rem;
4793
4795
  }