@jant/core 1.0.1 → 1.2.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/bin/lib/site-snapshot.js +10 -0
- package/dist/{app-Gt7_skt6.js → app-CbOZ2Irh.js} +8704 -5180
- package/dist/client/.vite/manifest.json +125 -85
- package/dist/client/_assets/chunks/{confirm-D7GrwsCN.js → confirm-CMe01lne.js} +1 -1
- package/dist/client/_assets/chunks/{create-editor-5Y49x7h5.js → create-editor-hWapNE40.js} +26 -26
- package/dist/client/_assets/chunks/footnote-rail-9zwl6jtV.js +2 -0
- package/dist/client/_assets/chunks/{jant-locale-picker-DL6mIOT5.js → jant-locale-picker-2L4rkDaz.js} +1 -1
- package/dist/client/_assets/chunks/lit-Bw_voPoW.js +2 -0
- package/dist/client/_assets/chunks/preload-helper-Czpn1I53.js +1 -0
- package/dist/client/_assets/chunks/runtime-paths-y0_gHowM.js +1 -0
- package/dist/client/_assets/chunks/{settings-paths-h6RjIe3C.js → settings-paths-BBVT8zKj.js} +1 -1
- package/dist/client/_assets/chunks/slug-format-BuCPjSrB.js +1 -0
- package/dist/client/_assets/chunks/sortable-list-DJXwkaOv.js +2 -0
- package/dist/client/_assets/chunks/types-DrYFqJH2.js +1 -0
- package/dist/client/_assets/chunks/{unsafe-html-B5ZEXaxg.js → unsafe-html-CWos3v6N.js} +1 -1
- package/dist/client/_assets/chunks/unsafe-svg-CUrgo4Xg.js +1 -0
- package/dist/client/_assets/client-BO8GOFfT.js +354 -0
- package/dist/client/_assets/client-D8Rrsd73.css +2 -0
- package/dist/client/_assets/client-auth-CsUGM718.js +859 -0
- package/dist/client/_assets/client-author-QPm1whbO.css +2 -0
- package/dist/client/_assets/client-compose-BB4U7Wz0.js +2004 -0
- package/dist/client/_assets/{client-manage-C1eDB1Rc.js → client-manage-CI9-eh-8.js} +176 -176
- package/dist/client/_assets/{client-settings-DIM44Zqh.js → client-settings-BnGPuqwc.js} +166 -166
- package/dist/client/_assets/client-share-0DICJjAc.css +1 -0
- package/dist/client/_assets/client-share-C59mOLJ1.js +149 -0
- package/dist/index.js +1 -1
- package/dist/node.js +3 -2
- package/package.json +2 -1
- package/src/app.tsx +9 -0
- package/src/client/components/compose-types.ts +1 -0
- package/src/client/components/jant-compose-dialog.ts +1 -0
- package/src/client/components/jant-compose-editor.ts +30 -0
- package/src/client/components/jant-compose-fullscreen.ts +1 -0
- package/src/client/components/jant-post-menu.ts +80 -13
- package/src/client/components/jant-share-dialog.ts +422 -0
- package/src/client/components/jant-share-menu.ts +188 -0
- package/src/client/compose-bridge.ts +61 -1
- package/src/client/feed-video-player.ts +6 -0
- package/src/client/lazy-entries.ts +21 -1
- package/src/client/post-menu-shared.ts +100 -0
- package/src/client/share-capture.ts +443 -0
- package/src/client/share-launch.ts +133 -0
- package/src/client/tiptap/bubble-menu.ts +25 -2
- package/src/client/tiptap/create-editor.ts +2 -0
- package/src/client/tiptap/extensions.ts +4 -0
- package/src/client/video-processor.ts +106 -52
- package/src/client/view-confirm.ts +108 -0
- package/src/client-share.ts +8 -0
- package/src/client.ts +2 -0
- package/src/db/migrations/0035_brainy_next_avengers.sql +9 -0
- package/src/db/migrations/0036_gorgeous_smasher.sql +7 -0
- package/src/db/migrations/meta/0035_snapshot.json +2877 -0
- package/src/db/migrations/meta/0036_snapshot.json +2924 -0
- package/src/db/migrations/meta/_journal.json +14 -0
- package/src/db/migrations/pg/0033_cute_magdalene.sql +10 -0
- package/src/db/migrations/pg/0034_material_agent_brand.sql +8 -0
- package/src/db/migrations/pg/meta/0033_snapshot.json +3719 -0
- package/src/db/migrations/pg/meta/0034_snapshot.json +3766 -0
- package/src/db/migrations/pg/meta/_journal.json +14 -0
- package/src/db/pg/schema.ts +40 -0
- package/src/db/schema.ts +61 -0
- package/src/i18n/locales/public/en.po +5 -0
- package/src/i18n/locales/public/en.ts +1 -1
- package/src/i18n/locales/public/zh-Hans.po +5 -0
- package/src/i18n/locales/public/zh-Hans.ts +1 -1
- package/src/i18n/locales/public/zh-Hant.po +5 -0
- package/src/i18n/locales/public/zh-Hant.ts +1 -1
- package/src/i18n/locales/settings/en.po +149 -0
- package/src/i18n/locales/settings/en.ts +1 -1
- package/src/i18n/locales/settings/zh-Hans.po +149 -0
- package/src/i18n/locales/settings/zh-Hans.ts +1 -1
- package/src/i18n/locales/settings/zh-Hant.po +149 -0
- package/src/i18n/locales/settings/zh-Hant.ts +1 -1
- package/src/lib/discover.ts +31 -0
- package/src/lib/env.ts +20 -0
- package/src/lib/github-app-state.ts +1 -1
- package/src/lib/github-app.ts +183 -1
- package/src/lib/markdown-manager.ts +129 -1
- package/src/lib/post-meta.ts +13 -3
- package/src/lib/referrer-aliases.ts +311 -0
- package/src/lib/render.tsx +10 -0
- package/src/lib/resolve-config.ts +14 -0
- package/src/lib/share-card.ts +653 -0
- package/src/lib/summary.ts +152 -54
- package/src/lib/tiptap-render.ts +1 -0
- package/src/lib/upload.ts +21 -1
- package/src/lib/version.ts +2 -0
- package/src/lib/video-playback.ts +55 -0
- package/src/lib/view-buffer.ts +201 -0
- package/src/lib/view-counting.ts +539 -0
- package/src/lib/view-token.ts +177 -0
- package/src/lib/view.ts +13 -1
- package/src/middleware/view-counter.ts +140 -0
- package/src/node/runtime.ts +4 -0
- package/src/preset.css +31 -14
- package/src/routes/api/media.ts +21 -3
- package/src/routes/auth/setup.tsx +37 -1
- package/src/routes/dash/settings.tsx +433 -168
- package/src/routes/pages/archive.tsx +1 -0
- package/src/routes/pages/collection.tsx +6 -0
- package/src/routes/pages/collections.tsx +1 -0
- package/src/routes/pages/featured.tsx +1 -0
- package/src/routes/pages/home.tsx +1 -0
- package/src/routes/pages/page.tsx +3 -0
- package/src/routes/pages/partials.tsx +23 -0
- package/src/routes/pages/smart-collection.tsx +2 -0
- package/src/routes/pages/subscribe.tsx +1 -0
- package/src/routes/view-confirm.ts +63 -0
- package/src/services/export-theme/assets/client-site.js +1 -1
- package/src/services/export-theme/styles/main.css +39 -21
- package/src/services/export.ts +2 -0
- package/src/services/index.ts +17 -0
- package/src/services/mcp.ts +31 -1
- package/src/services/media.ts +63 -0
- package/src/services/stats.ts +1130 -0
- package/src/style-share.css +16 -0
- package/src/styles/components-author.css +177 -0
- package/src/styles/components.css +25 -3
- package/src/styles/share.css +1103 -0
- package/src/styles/tokens.css +65 -30
- package/src/styles/ui.css +62 -13
- package/src/types/app-context.ts +9 -0
- package/src/types/bindings.ts +5 -0
- package/src/types/config.ts +54 -0
- package/src/types/views.ts +6 -0
- package/src/ui/compose/ComposeDialog.tsx +6 -0
- package/src/ui/dash/settings/SettingsRootContent.tsx +24 -6
- package/src/ui/dash/settings/StatsContent.tsx +855 -0
- package/src/ui/font-themes.ts +39 -6
- package/src/ui/layouts/BaseLayout.tsx +11 -2
- package/src/ui/layouts/SiteLayout.tsx +9 -3
- package/src/ui/share/ShareCard.tsx +298 -0
- package/src/ui/shared/Icon.tsx +23 -3
- package/src/ui/shared/MediaGallery.tsx +31 -4
- package/src/ui/shared/PostFooter.tsx +20 -4
- package/src/ui/shared/icon-collector.ts +28 -0
- package/src/ui/shared/post-article-attributes.ts +3 -0
- package/dist/client/_assets/chunks/footnote-rail-BJwswtVQ.js +0 -1
- package/dist/client/_assets/chunks/lit-DW8VmJAT.js +0 -2
- package/dist/client/_assets/chunks/slug-format-Dsi0e9Xn.js +0 -1
- package/dist/client/_assets/chunks/sortable-list-DWNKv782.js +0 -2
- package/dist/client/_assets/chunks/types-D5iF3H1a.js +0 -1
- package/dist/client/_assets/chunks/unsafe-svg-DTZZEvLU.js +0 -2
- package/dist/client/_assets/client-BaqmpPQ-.css +0 -2
- package/dist/client/_assets/client-C6melOtG.js +0 -296
- package/dist/client/_assets/client-auth-Ccq8kSqq.js +0 -828
- package/dist/client/_assets/client-author-CGVvrNZ8.css +0 -2
- package/dist/client/_assets/client-compose-oxzPb3SS.js +0 -2004
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Share stylesheet: the "Share as image" dialog and the card it captures.
|
|
3
|
+
*
|
|
4
|
+
* Linked on demand by `client/share-launch.ts`, never from the page head:
|
|
5
|
+
* `<html data-share-stylesheet>` names it, and a post menu that offers
|
|
6
|
+
* sharing loads it when it opens.
|
|
7
|
+
*
|
|
8
|
+
* Like `style-author.css`, no `@import "tailwindcss"`: `client.css` is
|
|
9
|
+
* already on the page with the layers and every design token these rules
|
|
10
|
+
* reference. The layer order below is the one `client.css` establishes, so
|
|
11
|
+
* `@layer components` here joins the existing components layer.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
@layer properties, theme, base, components, utilities;
|
|
15
|
+
|
|
16
|
+
@import "./styles/share.css";
|
|
@@ -535,7 +535,10 @@
|
|
|
535
535
|
opacity: 0.5;
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
+
/* The current page's name is the one piece that can be long (a post's
|
|
539
|
+
derived title); it takes the rest of the line and is cut, never wrapped. */
|
|
538
540
|
.dash-breadcrumb-current {
|
|
541
|
+
@apply flex-1 min-w-0 truncate;
|
|
539
542
|
color: var(--color-foreground);
|
|
540
543
|
font-weight: var(--fw-medium);
|
|
541
544
|
}
|
|
@@ -1619,4 +1622,178 @@
|
|
|
1619
1622
|
.skel-section-lg {
|
|
1620
1623
|
min-height: 300px;
|
|
1621
1624
|
}
|
|
1625
|
+
|
|
1626
|
+
/* ---------------------------------------------------------------------- */
|
|
1627
|
+
/* Stats page: a window switch, a bar chart, two lists, one switch */
|
|
1628
|
+
/* ---------------------------------------------------------------------- */
|
|
1629
|
+
|
|
1630
|
+
.settings-stats {
|
|
1631
|
+
@apply flex flex-col;
|
|
1632
|
+
gap: 2rem;
|
|
1633
|
+
max-width: var(--form-max-width);
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
.settings-stats-header {
|
|
1637
|
+
@apply flex flex-wrap items-baseline justify-between;
|
|
1638
|
+
gap: 0.75rem 1.5rem;
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
.settings-stats-title {
|
|
1642
|
+
@apply flex flex-wrap items-baseline;
|
|
1643
|
+
gap: 0.5rem;
|
|
1644
|
+
margin: 0;
|
|
1645
|
+
font-size: var(--type-title);
|
|
1646
|
+
font-weight: var(--fw-semibold);
|
|
1647
|
+
line-height: var(--type-heading-leading);
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
/* A page's name on its own stats page: at most two lines, then cut. An
|
|
1651
|
+
untitled note is named by its opening words, which can run long. */
|
|
1652
|
+
.settings-stats-title-name {
|
|
1653
|
+
display: -webkit-box;
|
|
1654
|
+
-webkit-box-orient: vertical;
|
|
1655
|
+
-webkit-line-clamp: 2;
|
|
1656
|
+
overflow: hidden;
|
|
1657
|
+
overflow-wrap: anywhere;
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
.settings-stats-windows {
|
|
1661
|
+
@apply flex;
|
|
1662
|
+
gap: 0.25rem;
|
|
1663
|
+
font-family: var(--font-ui);
|
|
1664
|
+
font-size: var(--type-sm);
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
.settings-stats-window {
|
|
1668
|
+
padding: 0.25rem 0.6rem;
|
|
1669
|
+
border-radius: 999px;
|
|
1670
|
+
color: var(--site-text-secondary);
|
|
1671
|
+
text-decoration: none;
|
|
1672
|
+
transition:
|
|
1673
|
+
color 150ms ease,
|
|
1674
|
+
background-color 150ms ease;
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
.settings-stats-window:hover {
|
|
1678
|
+
color: var(--foreground);
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
.settings-stats-window[aria-current="page"] {
|
|
1682
|
+
color: var(--foreground);
|
|
1683
|
+
background: var(--muted);
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
.settings-stats-total {
|
|
1687
|
+
margin: 0;
|
|
1688
|
+
font-family: var(--font-ui);
|
|
1689
|
+
font-size: var(--type-subtitle);
|
|
1690
|
+
font-weight: var(--fw-medium);
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
.settings-stats-figure {
|
|
1694
|
+
margin: 0;
|
|
1695
|
+
color: var(--primary);
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
.settings-stats-chart {
|
|
1699
|
+
display: block;
|
|
1700
|
+
width: 100%;
|
|
1701
|
+
height: 9rem;
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
.settings-stats-bar {
|
|
1705
|
+
fill: currentColor;
|
|
1706
|
+
opacity: 0.8;
|
|
1707
|
+
transition: opacity 150ms ease;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
.settings-stats-bar:hover {
|
|
1711
|
+
opacity: 1;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
/* The baseline under the bars. It starts where the record does: the chart
|
|
1715
|
+
sets `--stats-start` to the share of the window that was never counted. */
|
|
1716
|
+
.settings-stats-axis {
|
|
1717
|
+
@apply flex justify-between;
|
|
1718
|
+
margin-left: var(--stats-start, 0%);
|
|
1719
|
+
padding-top: 0.35rem;
|
|
1720
|
+
border-top: 1px solid var(--border);
|
|
1721
|
+
font-family: var(--font-ui);
|
|
1722
|
+
font-size: var(--type-xs);
|
|
1723
|
+
color: var(--site-text-secondary);
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
.settings-stats-axis > span {
|
|
1727
|
+
white-space: nowrap;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
/* Today's date alone, under the end of the baseline. */
|
|
1731
|
+
.settings-stats-axis-single {
|
|
1732
|
+
@apply justify-end;
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
.settings-stats-section {
|
|
1736
|
+
@apply flex flex-col;
|
|
1737
|
+
gap: 0.5rem;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
.settings-stats-heading {
|
|
1741
|
+
margin: 0;
|
|
1742
|
+
font-family: var(--font-ui);
|
|
1743
|
+
font-size: var(--type-xs);
|
|
1744
|
+
font-weight: var(--fw-medium);
|
|
1745
|
+
letter-spacing: 0.02em;
|
|
1746
|
+
color: var(--site-text-secondary);
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
.settings-stats-list {
|
|
1750
|
+
@apply flex flex-col;
|
|
1751
|
+
gap: 0.125rem;
|
|
1752
|
+
margin: 0;
|
|
1753
|
+
padding: 0;
|
|
1754
|
+
list-style: none;
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
/* A ranked row. The bar behind it is its share of the window's total,
|
|
1758
|
+
set by the row as `--stats-share`; the text sits on top of it. */
|
|
1759
|
+
.settings-stats-row {
|
|
1760
|
+
@apply flex items-center;
|
|
1761
|
+
gap: 0.75rem;
|
|
1762
|
+
padding: 0.45rem 0.625rem;
|
|
1763
|
+
border-radius: var(--radius-sm, 0.375rem);
|
|
1764
|
+
background: linear-gradient(
|
|
1765
|
+
to right,
|
|
1766
|
+
var(--muted) var(--stats-share, 0%),
|
|
1767
|
+
transparent var(--stats-share, 0%)
|
|
1768
|
+
);
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
.settings-stats-rank {
|
|
1772
|
+
flex: none;
|
|
1773
|
+
min-width: 1.25rem;
|
|
1774
|
+
font-family: var(--font-ui);
|
|
1775
|
+
font-size: var(--type-sm);
|
|
1776
|
+
font-variant-numeric: tabular-nums;
|
|
1777
|
+
text-align: right;
|
|
1778
|
+
color: var(--site-text-secondary);
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
.settings-stats-label {
|
|
1782
|
+
@apply flex-1 min-w-0 truncate;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
.settings-stats-link {
|
|
1786
|
+
color: inherit;
|
|
1787
|
+
text-decoration: none;
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
.settings-stats-link:hover {
|
|
1791
|
+
text-decoration: underline;
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
.settings-stats-count {
|
|
1795
|
+
font-family: var(--font-ui);
|
|
1796
|
+
font-variant-numeric: tabular-nums;
|
|
1797
|
+
color: var(--site-text-secondary);
|
|
1798
|
+
}
|
|
1622
1799
|
}
|
|
@@ -10,14 +10,22 @@
|
|
|
10
10
|
* see the note in `style-author.css`.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
/*
|
|
13
|
+
/* Highlighted text in a post */
|
|
14
14
|
mark {
|
|
15
|
-
background-color: var(--site-
|
|
16
|
-
color: var(--site-
|
|
15
|
+
background-color: var(--site-highlight-bg);
|
|
16
|
+
color: var(--site-highlight-color);
|
|
17
17
|
border-radius: 2px;
|
|
18
18
|
padding: 0 2px;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
/* Search result highlight. The search page renders snippets, never post
|
|
22
|
+
HTML, so every mark on it is a match. */
|
|
23
|
+
.search-page mark,
|
|
24
|
+
.search-snippet mark {
|
|
25
|
+
background-color: var(--site-search-mark-bg);
|
|
26
|
+
color: var(--site-search-mark-color);
|
|
27
|
+
}
|
|
28
|
+
|
|
21
29
|
/* Config Editor — a quiet utility list, not a stack of nested cards. */
|
|
22
30
|
@layer components {
|
|
23
31
|
jant-config-editor {
|
|
@@ -70,6 +78,20 @@ svg[stroke-width].icon-fine {
|
|
|
70
78
|
top: 1rem;
|
|
71
79
|
right: 1rem;
|
|
72
80
|
}
|
|
81
|
+
|
|
82
|
+
/* While a modal dialog is open, toast.ts mounts the container inside
|
|
83
|
+
it, where BaseCoat's `.dialog > *` styles it as the dialog's panel:
|
|
84
|
+
full width, translated to the centre, shadowed. */
|
|
85
|
+
.dialog > & {
|
|
86
|
+
width: auto;
|
|
87
|
+
max-width: none;
|
|
88
|
+
max-height: none;
|
|
89
|
+
translate: none;
|
|
90
|
+
scale: none;
|
|
91
|
+
border-radius: 0;
|
|
92
|
+
box-shadow: none;
|
|
93
|
+
transition: none;
|
|
94
|
+
}
|
|
73
95
|
}
|
|
74
96
|
|
|
75
97
|
.toast {
|