@jant/core 0.3.44 → 0.3.46

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 (62) hide show
  1. package/bin/commands/import-site.js +40 -39
  2. package/dist/app-CM7sb3xO.js +5 -0
  3. package/dist/{app-CtJDxZBb.js → app-DB-P66E5.js} +147 -203
  4. package/dist/client/.vite/manifest.json +3 -3
  5. package/dist/client/_assets/client-DDs6NzB3.css +2 -0
  6. package/dist/client/_assets/{client-auth-CXILhW1b.js → client-auth-BLCUje4M.js} +193 -174
  7. package/dist/client/_assets/{client-D95FNDg5.js → client-dSfWfMe9.js} +7 -7
  8. package/dist/{github-sync-7y_nTXx1.js → github-sync-CQ1x271f.js} +3 -0
  9. package/dist/index.js +4 -87
  10. package/dist/node.js +3 -3
  11. package/package.json +1 -1
  12. package/src/__tests__/import-site-command.test.ts +18 -0
  13. package/src/client/components/jant-compose-dialog.ts +94 -15
  14. package/src/client/components/jant-compose-editor.ts +11 -6
  15. package/src/client/components/jant-post-menu.ts +23 -5
  16. package/src/client/compose-bridge.ts +2 -1
  17. package/src/client/random-uuid.ts +23 -0
  18. package/src/client/toast.ts +29 -2
  19. package/src/client/upload-session.ts +1 -1
  20. package/src/db/migrations/0020_free_zaladane.sql +1 -0
  21. package/src/db/migrations/meta/0020_snapshot.json +2129 -0
  22. package/src/db/migrations/meta/_journal.json +7 -0
  23. package/src/db/migrations/pg/0018_red_warlock.sql +1 -0
  24. package/src/db/migrations/pg/meta/0018_snapshot.json +2739 -0
  25. package/src/db/migrations/pg/meta/_journal.json +7 -0
  26. package/src/db/pg/schema.ts +0 -30
  27. package/src/db/schema.ts +0 -39
  28. package/src/i18n/locales/public/en.po +10 -5
  29. package/src/i18n/locales/public/en.ts +1 -1
  30. package/src/i18n/locales/public/zh-Hans.po +10 -5
  31. package/src/i18n/locales/public/zh-Hans.ts +1 -1
  32. package/src/i18n/locales/public/zh-Hant.po +10 -5
  33. package/src/i18n/locales/public/zh-Hant.ts +1 -1
  34. package/src/index.ts +0 -3
  35. package/src/lib/__tests__/resolve-config.test.ts +4 -4
  36. package/src/lib/__tests__/startup-config.test.ts +27 -2
  37. package/src/lib/constants.ts +1 -0
  38. package/src/lib/github-sync-trigger.ts +7 -51
  39. package/src/lib/startup-config.ts +53 -6
  40. package/src/routes/api/github-sync.tsx +36 -14
  41. package/src/routes/pages/home.tsx +2 -0
  42. package/src/routes/pages/latest.tsx +2 -0
  43. package/src/runtime/__tests__/readiness.test.ts +34 -0
  44. package/src/runtime/readiness.ts +8 -4
  45. package/src/services/__tests__/collection.test.ts +13 -11
  46. package/src/services/github-sync.ts +6 -0
  47. package/src/styles/components.css +14 -0
  48. package/src/styles/ui.css +97 -0
  49. package/src/types/bindings.ts +0 -2
  50. package/src/types/config.ts +1 -1
  51. package/src/types/props.ts +2 -0
  52. package/src/ui/__tests__/font-themes.test.ts +2 -2
  53. package/src/ui/dash/settings/SettingsRootContent.tsx +17 -17
  54. package/src/ui/font-themes.ts +17 -17
  55. package/src/ui/pages/HomePage.tsx +18 -5
  56. package/dist/app-BI9bnCkO.js +0 -5
  57. package/dist/client/_assets/client-BQH7AQ24.css +0 -2
  58. package/src/lib/github-sync-queue-handler.ts +0 -69
  59. package/src/lib/github-sync-worker.ts +0 -72
  60. package/src/lib/job-queue-cf.ts +0 -18
  61. package/src/lib/job-queue-db.ts +0 -149
  62. package/src/lib/job-queue.ts +0 -35
@@ -97,6 +97,23 @@ export function SettingsRootContent({
97
97
  }),
98
98
  )}
99
99
  />
100
+ <SettingsDirectoryLink
101
+ href={toPublicPath("/settings/custom-urls", sitePathPrefix)}
102
+ icon={ICONS.arrowRightLeft}
103
+ tone="subtle"
104
+ name={i18n._(
105
+ msg({
106
+ message: "Custom URLs",
107
+ comment: "@context: Settings item — custom URL settings",
108
+ }),
109
+ )}
110
+ description={i18n._(
111
+ msg({
112
+ message: "Redirects, vanity paths, and URL control",
113
+ comment: "@context: Settings item description for custom URLs",
114
+ }),
115
+ )}
116
+ />
100
117
  </SettingsDirectorySection>
101
118
 
102
119
  <SettingsDirectorySection
@@ -227,23 +244,6 @@ export function SettingsRootContent({
227
244
  }),
228
245
  )}
229
246
  >
230
- <SettingsDirectoryLink
231
- href={toPublicPath("/settings/custom-urls", sitePathPrefix)}
232
- icon={ICONS.arrowRightLeft}
233
- tone="subtle"
234
- name={i18n._(
235
- msg({
236
- message: "Custom URLs",
237
- comment: "@context: Settings item — custom URL settings",
238
- }),
239
- )}
240
- description={i18n._(
241
- msg({
242
- message: "Redirects, vanity paths, and URL control",
243
- comment: "@context: Settings item description for custom URLs",
244
- }),
245
- )}
246
- />
247
247
  <SettingsDirectoryLink
248
248
  href={toPublicPath("/settings/code-injection", sitePathPrefix)}
249
249
  icon={ICONS.terminal}
@@ -138,23 +138,6 @@ export function getCjkSerifCssVariables(
138
138
  export const DEFAULT_FONT_CJK_SERIF_FALLBACK = DEFAULT_CJK_SERIF_FALLBACK;
139
139
 
140
140
  export const BUILTIN_FONT_THEMES: FontTheme[] = [
141
- {
142
- id: "tufte",
143
- name: {
144
- id: "Tufte",
145
- message: "Tufte",
146
- comment: "@context: Font theme name",
147
- },
148
- headingFontFamily: TUFTE_SERIF,
149
- bodyFontFamily: TUFTE_SERIF,
150
- cssVariables: {},
151
- description: {
152
- id: "Palatino-based old-style serif matching Tufte CSS proportions",
153
- message: "Palatino-based old-style serif matching Tufte CSS proportions",
154
- comment: "@context: Font theme description",
155
- },
156
- },
157
-
158
141
  {
159
142
  id: "classic",
160
143
  name: {
@@ -177,6 +160,23 @@ export const BUILTIN_FONT_THEMES: FontTheme[] = [
177
160
  },
178
161
  },
179
162
 
163
+ {
164
+ id: "tufte",
165
+ name: {
166
+ id: "Tufte",
167
+ message: "Tufte",
168
+ comment: "@context: Font theme name",
169
+ },
170
+ headingFontFamily: TUFTE_SERIF,
171
+ bodyFontFamily: TUFTE_SERIF,
172
+ cssVariables: {},
173
+ description: {
174
+ id: "Palatino-based old-style serif matching Tufte CSS proportions",
175
+ message: "Palatino-based old-style serif matching Tufte CSS proportions",
176
+ comment: "@context: Font theme description",
177
+ },
178
+ },
179
+
180
180
  {
181
181
  id: "system-sans",
182
182
  name: {
@@ -16,6 +16,8 @@ export const HomePage: FC<HomePageProps> = ({
16
16
  baseUrl,
17
17
  currentPage,
18
18
  totalPages,
19
+ isAuthenticated,
20
+ signinUrl,
19
21
  }) => {
20
22
  const { i18n } = useLingui();
21
23
 
@@ -37,16 +39,27 @@ export const HomePage: FC<HomePageProps> = ({
37
39
  <div data-feed>
38
40
  <div id="timeline-feed">
39
41
  <div id="timeline-items" class="flex flex-col">
40
- <p
41
- id="empty-timeline"
42
- class="py-12 text-center text-muted-foreground"
43
- >
42
+ <p id="empty-timeline" class="py-8 text-muted-foreground">
44
43
  {i18n._(
45
44
  msg({
46
- message: "Nothing here yet.",
45
+ message: "Quiet here for now.",
47
46
  comment: "@context: Empty state message on home page",
48
47
  }),
49
48
  )}
49
+ {!isAuthenticated && (
50
+ <>
51
+ {" "}
52
+ <a href={signinUrl} class="underline underline-offset-2">
53
+ {i18n._(
54
+ msg({
55
+ message: "Sign in if this is your space.",
56
+ comment:
57
+ "@context: Sign-in nudge shown to visitors on an empty home page, hinting that the site owner can sign in to start writing",
58
+ }),
59
+ )}
60
+ </a>
61
+ </>
62
+ )}
50
63
  </p>
51
64
  </div>
52
65
  </div>
@@ -1,5 +0,0 @@
1
- import "./url-umUptr5z.js";
2
- import { t as createApp } from "./app-CtJDxZBb.js";
3
- import "./github-sync-7y_nTXx1.js";
4
- import "./env-CgaH9Mut.js";
5
- export { createApp };