@geekity/cms 0.45.0 → 0.47.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 (158) hide show
  1. package/admin/pages/federation/followers.njk +1 -1
  2. package/admin/pages/settings/discussion.njk +78 -0
  3. package/admin/pages/users/edit.njk +1 -1
  4. package/admin/static/editor.js +24 -24
  5. package/dist/admin/federation.d.ts +1 -1
  6. package/dist/admin/federation.d.ts.map +1 -1
  7. package/dist/admin/federation.js +1 -1
  8. package/dist/admin/federation.js.map +1 -1
  9. package/dist/admin/index.d.ts +1 -1
  10. package/dist/admin/index.d.ts.map +1 -1
  11. package/dist/admin/index.js +1 -1
  12. package/dist/admin/index.js.map +1 -1
  13. package/dist/admin/settings-discussion.d.ts +9 -0
  14. package/dist/admin/settings-discussion.d.ts.map +1 -1
  15. package/dist/admin/settings-discussion.js +147 -2
  16. package/dist/admin/settings-discussion.js.map +1 -1
  17. package/dist/cli/help.js +2 -2
  18. package/dist/cms/app.d.ts.map +1 -1
  19. package/dist/cms/app.js +4 -1
  20. package/dist/cms/app.js.map +1 -1
  21. package/dist/cms/boot.d.ts.map +1 -1
  22. package/dist/cms/boot.js +4 -3
  23. package/dist/cms/boot.js.map +1 -1
  24. package/dist/cms/services.d.ts.map +1 -1
  25. package/dist/cms/services.js +11 -0
  26. package/dist/cms/services.js.map +1 -1
  27. package/dist/comments/form.d.ts +10 -0
  28. package/dist/comments/form.d.ts.map +1 -1
  29. package/dist/comments/form.js +2 -1
  30. package/dist/comments/form.js.map +1 -1
  31. package/dist/comments/hcaptcha.d.ts +26 -0
  32. package/dist/comments/hcaptcha.d.ts.map +1 -0
  33. package/dist/comments/hcaptcha.js +118 -0
  34. package/dist/comments/hcaptcha.js.map +1 -0
  35. package/dist/comments/index.d.ts +3 -0
  36. package/dist/comments/index.d.ts.map +1 -1
  37. package/dist/comments/index.js +1 -0
  38. package/dist/comments/index.js.map +1 -1
  39. package/dist/comments/intake.d.ts +2 -0
  40. package/dist/comments/intake.d.ts.map +1 -1
  41. package/dist/comments/intake.js +1 -1
  42. package/dist/comments/intake.js.map +1 -1
  43. package/dist/comments/page-form.d.ts +3 -1
  44. package/dist/comments/page-form.d.ts.map +1 -1
  45. package/dist/comments/page-form.js +4 -3
  46. package/dist/comments/page-form.js.map +1 -1
  47. package/dist/comments/submission.d.ts +3 -0
  48. package/dist/comments/submission.d.ts.map +1 -1
  49. package/dist/comments/submission.js +7 -0
  50. package/dist/comments/submission.js.map +1 -1
  51. package/dist/config.d.ts +20 -0
  52. package/dist/config.d.ts.map +1 -1
  53. package/dist/config.js +1 -0
  54. package/dist/config.js.map +1 -1
  55. package/dist/contact/form.d.ts +8 -0
  56. package/dist/contact/form.d.ts.map +1 -1
  57. package/dist/contact/form.js +2 -1
  58. package/dist/contact/form.js.map +1 -1
  59. package/dist/contact/submission.d.ts +3 -0
  60. package/dist/contact/submission.d.ts.map +1 -1
  61. package/dist/contact/submission.js +16 -2
  62. package/dist/contact/submission.js.map +1 -1
  63. package/dist/exports.d.ts +1 -1
  64. package/dist/exports.d.ts.map +1 -1
  65. package/dist/exports.js.map +1 -1
  66. package/dist/federation/actor.d.ts.map +1 -1
  67. package/dist/federation/actor.js +2 -1
  68. package/dist/federation/actor.js.map +1 -1
  69. package/dist/federation/forgotten-deliveries.d.ts +15 -0
  70. package/dist/federation/forgotten-deliveries.d.ts.map +1 -0
  71. package/dist/federation/forgotten-deliveries.js +16 -0
  72. package/dist/federation/forgotten-deliveries.js.map +1 -0
  73. package/dist/federation/retry-job.d.ts.map +1 -1
  74. package/dist/federation/retry-job.js +4 -2
  75. package/dist/federation/retry-job.js.map +1 -1
  76. package/dist/forms/challenge.d.ts +86 -0
  77. package/dist/forms/challenge.d.ts.map +1 -0
  78. package/dist/forms/challenge.js +44 -0
  79. package/dist/forms/challenge.js.map +1 -0
  80. package/dist/mcp/inspect/schemas.d.ts +3 -3
  81. package/dist/mcp/repair/retry.js +2 -2
  82. package/dist/mcp/repair/retry.js.map +1 -1
  83. package/dist/settings/hcaptcha.d.ts +10 -0
  84. package/dist/settings/hcaptcha.d.ts.map +1 -0
  85. package/dist/settings/hcaptcha.js +38 -0
  86. package/dist/settings/hcaptcha.js.map +1 -0
  87. package/dist/settings/names.d.ts +1 -1
  88. package/dist/settings/names.d.ts.map +1 -1
  89. package/dist/settings/names.js +1 -0
  90. package/dist/settings/names.js.map +1 -1
  91. package/dist/settings/registry.d.ts.map +1 -1
  92. package/dist/settings/registry.js +2 -1
  93. package/dist/settings/registry.js.map +1 -1
  94. package/dist/site/authors.d.ts +5 -1
  95. package/dist/site/authors.d.ts.map +1 -1
  96. package/dist/site/authors.js +4 -1
  97. package/dist/site/authors.js.map +1 -1
  98. package/dist/site/bio.d.ts +5 -0
  99. package/dist/site/bio.d.ts.map +1 -0
  100. package/dist/site/bio.js +32 -0
  101. package/dist/site/bio.js.map +1 -0
  102. package/dist/store/deliveries.d.ts +18 -2
  103. package/dist/store/deliveries.d.ts.map +1 -1
  104. package/dist/store/deliveries.js +35 -4
  105. package/dist/store/deliveries.js.map +1 -1
  106. package/dist/store/queue-database.d.ts +6 -0
  107. package/dist/store/queue-database.d.ts.map +1 -1
  108. package/dist/store/queue-database.js +34 -7
  109. package/dist/store/queue-database.js.map +1 -1
  110. package/dist/web/comment-routes.d.ts.map +1 -1
  111. package/dist/web/comment-routes.js +6 -3
  112. package/dist/web/comment-routes.js.map +1 -1
  113. package/dist/web/contact-routes.d.ts.map +1 -1
  114. package/dist/web/contact-routes.js +5 -1
  115. package/dist/web/contact-routes.js.map +1 -1
  116. package/dist/web/document-render.d.ts.map +1 -1
  117. package/dist/web/document-render.js +12 -1
  118. package/dist/web/document-render.js.map +1 -1
  119. package/dist/web/env.d.ts +6 -0
  120. package/dist/web/env.d.ts.map +1 -1
  121. package/dist/web/markdown-chrome.d.ts.map +1 -1
  122. package/dist/web/markdown-chrome.js +27 -4
  123. package/dist/web/markdown-chrome.js.map +1 -1
  124. package/dist/web/markdown-environment.d.ts +3 -0
  125. package/dist/web/markdown-environment.d.ts.map +1 -1
  126. package/dist/web/markdown-environment.js +31 -7
  127. package/dist/web/markdown-environment.js.map +1 -1
  128. package/dist/web/markdown-representation.d.ts.map +1 -1
  129. package/dist/web/markdown-representation.js +49 -9
  130. package/dist/web/markdown-representation.js.map +1 -1
  131. package/dist/web/page-sources.d.ts.map +1 -1
  132. package/dist/web/page-sources.js +3 -1
  133. package/dist/web/page-sources.js.map +1 -1
  134. package/dist/web/render-scope.d.ts +3 -0
  135. package/dist/web/render-scope.d.ts.map +1 -1
  136. package/dist/web/render-scope.js +3 -0
  137. package/dist/web/render-scope.js.map +1 -1
  138. package/dist/web/render.d.ts +19 -0
  139. package/dist/web/render.d.ts.map +1 -1
  140. package/dist/web/render.js.map +1 -1
  141. package/dist/web/theme-templates.d.ts +3 -1
  142. package/dist/web/theme-templates.d.ts.map +1 -1
  143. package/dist/web/theme-templates.js +18 -7
  144. package/dist/web/theme-templates.js.map +1 -1
  145. package/package.json +10 -10
  146. package/templates/site/content/pages/privacy.md +15 -1
  147. package/themes/default/layouts/base.njk +3 -0
  148. package/themes/default/partials/bio.njk +2 -2
  149. package/themes/default/partials/comment-form.njk +4 -1
  150. package/themes/default/partials/contact-form.njk +4 -1
  151. package/themes/default/partials/form-challenge.njk +9 -0
  152. package/themes/default/partials/jsonld.njk +1 -1
  153. package/themes/default/partials/markdown-bio.md.njk +20 -0
  154. package/themes/default/partials/markdown-header.md.njk +7 -12
  155. package/themes/default/partials/markdown-post-list.md.njk +15 -0
  156. package/themes/default/src/style.css +13 -0
  157. package/themes/default/static/hcaptcha.js +31 -0
  158. package/themes/default/static/style.css +16 -0
@@ -0,0 +1,20 @@
1
+ {#
2
+ The person a page speaks for, in Markdown: what they wrote about themselves,
3
+ then their links, one list item each. Prints nothing when the context has no
4
+ `bio`. The note is Markdown already, so it is printed as written, with
5
+ `markdownLinks` giving this site's links their `.md` URLs.
6
+
7
+ `bio` is on an author archive and on the homepage of a site whose author is
8
+ a user: `name`, `url`, `note` and `links` (each a `label` and a `url`). The
9
+ header includes this file where the HTML draws the card, and a layout
10
+ Markdown template may include it anywhere, such as a static front page's.
11
+ -#}
12
+ {% if bio %}
13
+ {% if bio.note %}
14
+ {{ bio.note | markdownLinks }}
15
+
16
+ {% endif %}
17
+ {% for link in bio.links %}
18
+ - [{{ link.label | escapeMarkdown }}]({{ link.url | markdownUrl }})
19
+ {% endfor %}
20
+ {% endif %}
@@ -11,10 +11,11 @@
11
11
 
12
12
  `title` is the heading, absent when the page's own Markdown opens with one.
13
13
  `bio` is the person the page speaks for, on an author archive and on a solo
14
- author site's homepage: `name`, `url`, `note` and `links` (each a `label`
15
- and a `url`). `staticFrontPage` is true on a homepage that is a page. This
16
- theme prints the bio there only when the homepage lists posts, as its HTML
17
- does (decision-45); a site theme may print it on a static homepage too.
14
+ author site's homepage, which `partials/markdown-bio.md.njk` prints.
15
+ `staticFrontPage` is true on a homepage that is a page. This theme prints
16
+ the bio there only when the homepage lists posts, as its HTML does
17
+ (decision-45); a site theme may print it on a static homepage too, from a
18
+ `layouts/front-page.md.njk` of its own.
18
19
 
19
20
  A post then says what kind it is, with the data its HTML partials read.
20
21
  `event` is an event's `start`, its `end` and its `location`, printed in the
@@ -100,14 +101,8 @@ Other versions:
100
101
  ![{{ photo.alt | escapeMarkdown }}]({{ photo.url | markdownUrl }})
101
102
 
102
103
  {% endfor %}
103
- {% if bio and not staticFrontPage %}
104
- {% if bio.note %}
105
- {{ bio.note | escapeMarkdown }}
106
-
107
- {% endif %}
108
- {% for link in bio.links %}
109
- - [{{ link.label | escapeMarkdown }}]({{ link.url | markdownUrl }})
110
- {% endfor %}
104
+ {% if not staticFrontPage %}
105
+ {% include "partials/markdown-bio.md.njk" %}
111
106
  {% endif %}
112
107
  {% if thread %}
113
108
  On [{{ thread.post.label | escapeMarkdown }}]({{ thread.post.url | markdownUrl }}){{ (" by " + conversing.named(thread.post.author)) if thread.post.author }}{{ (", " + (thread.post.date | date)) if thread.post.date }}
@@ -0,0 +1,15 @@
1
+ {#
2
+ Posts as a Markdown list, one line each in the shape a listing's Markdown
3
+ has: `- [YYYY-MM-DD Title](url)`, with the description after a colon when
4
+ the post has one.
5
+
6
+ Set `postList` before including it. Each entry is a `label`, a `url`, a
7
+ `date` (a `Date`, written in the site's timezone) and a `description`, the
8
+ shape `newestPosts(count)` gives on a static front page:
9
+
10
+ {% set postList = newestPosts(5) %}
11
+ {% include "partials/markdown-post-list.md.njk" %}
12
+ -#}
13
+ {% for entry in postList %}
14
+ - [{{ ((((entry.date | date("html")) + " ") if entry.date) + entry.label) | escapeMarkdown }}]({{ entry.url | markdownUrl }}){{ (": " + (entry.description | escapeMarkdown)) if entry.description }}
15
+ {% endfor %}
@@ -1187,6 +1187,10 @@
1187
1187
  @apply mt-1 text-[0.95rem] text-muted;
1188
1188
  }
1189
1189
 
1190
+ .bio-note p + p {
1191
+ @apply mt-2;
1192
+ }
1193
+
1190
1194
  .bio-links {
1191
1195
  @apply mt-1 gap-x-4 font-sans text-sm;
1192
1196
  }
@@ -1486,6 +1490,15 @@
1486
1490
  @apply flex items-center gap-2;
1487
1491
  }
1488
1492
 
1493
+ /* hCaptcha's checkbox is 78px tall; holding it keeps the button from jumping. */
1494
+ .form-challenge-label {
1495
+ @apply mb-1 block font-sans text-sm;
1496
+ }
1497
+
1498
+ .form-challenge .h-captcha {
1499
+ min-block-size: 78px;
1500
+ }
1501
+
1489
1502
  .comment-check label {
1490
1503
  @apply mb-0;
1491
1504
  }
@@ -0,0 +1,31 @@
1
+ (function () {
2
+ var widgets = document.querySelectorAll('.h-captcha[data-sitekey]');
3
+ var source = document.currentScript && document.currentScript.dataset.script;
4
+ if (widgets.length === 0 || !source) return;
5
+
6
+ var root = document.documentElement;
7
+ var mode = root.dataset.mode;
8
+ var dark =
9
+ mode === 'dark' ||
10
+ (mode !== 'light' && window.matchMedia('(prefers-color-scheme: dark)').matches);
11
+
12
+ window.geekityDrawChallenge = function () {
13
+ for (var index = 0; index < widgets.length; index += 1) {
14
+ var widget = widgets[index];
15
+ window.hcaptcha.render(widget, {
16
+ sitekey: widget.dataset.sitekey,
17
+ theme: dark ? 'dark' : 'light',
18
+ });
19
+ }
20
+ };
21
+
22
+ var url = new URL(source);
23
+ url.searchParams.set('render', 'explicit');
24
+ url.searchParams.set('onload', 'geekityDrawChallenge');
25
+ if (root.lang) url.searchParams.set('hl', root.lang);
26
+
27
+ var script = document.createElement('script');
28
+ script.src = url.href;
29
+ script.async = true;
30
+ document.head.append(script);
31
+ })();
@@ -1625,6 +1625,10 @@
1625
1625
  font-size: .95rem;
1626
1626
  }
1627
1627
 
1628
+ .bio-note p + p {
1629
+ margin-top: calc(var(--spacing) * 2);
1630
+ }
1631
+
1628
1632
  .bio-links {
1629
1633
  margin-top: var(--spacing);
1630
1634
  column-gap: calc(var(--spacing) * 4);
@@ -2261,6 +2265,18 @@
2261
2265
  display: flex;
2262
2266
  }
2263
2267
 
2268
+ .form-challenge-label {
2269
+ margin-bottom: var(--spacing);
2270
+ font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
2271
+ font-size: var(--text-sm);
2272
+ line-height: var(--tw-leading, var(--text-sm--line-height));
2273
+ display: block;
2274
+ }
2275
+
2276
+ .form-challenge .h-captcha {
2277
+ min-block-size: 78px;
2278
+ }
2279
+
2264
2280
  .comment-check label {
2265
2281
  margin-bottom: 0;
2266
2282
  }