@jant/core 0.6.2 → 0.6.3

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 (28) hide show
  1. package/dist/app-BX2XKxq0.js +6 -0
  2. package/dist/{app-Ct9c4zYF.js → app-CyysIxj_.js} +183 -205
  3. package/dist/client/.vite/manifest.json +3 -3
  4. package/dist/client/_assets/client-BMPMuwvV.css +2 -0
  5. package/dist/client/_assets/{client-Bp2IPjDe.js → client-CTrEFM5W.js} +1 -1
  6. package/dist/client/_assets/{client-auth-C4hQWqH1.js → client-auth-LBSZxqNC.js} +21 -21
  7. package/dist/{export-O2w3AsZX.js → export-CzuQyg5h.js} +28 -15
  8. package/dist/{github-sync-BUzIYouS.js → github-sync-CerNYCAn.js} +2 -2
  9. package/dist/{github-sync-D49RADci.js → github-sync-Dbrb1DS5.js} +5 -2
  10. package/dist/index.js +3 -3
  11. package/dist/node.js +4 -4
  12. package/package.json +1 -1
  13. package/src/__tests__/export-service.test.ts +127 -0
  14. package/src/client/components/__tests__/jant-collection-directory.test.ts +0 -42
  15. package/src/client/components/collection-manager-types.ts +0 -2
  16. package/src/client/components/jant-collection-directory.ts +0 -23
  17. package/src/i18n/locales/public/en.po +0 -12
  18. package/src/i18n/locales/public/zh-Hans.po +0 -12
  19. package/src/i18n/locales/public/zh-Hant.po +0 -12
  20. package/src/lib/github-sync-site-config.ts +4 -2
  21. package/src/services/export-theme/styles/main.css +4 -3
  22. package/src/services/export.ts +47 -17
  23. package/src/services/github-sync.ts +8 -2
  24. package/src/styles/ui.css +23 -46
  25. package/src/ui/pages/CollectionsPage.tsx +0 -22
  26. package/src/ui/shared/CollectionsManager.tsx +6 -41
  27. package/dist/app-CUZaVgsC.js +0 -6
  28. package/dist/client/_assets/client-YVrRjAid.css +0 -2
@@ -11,37 +11,18 @@ import type { CollectionsPageProps } from "../../types.js";
11
11
  import { CollectionDirectory } from "../shared/CollectionDirectory.js";
12
12
  import { CollectionsManager } from "../shared/CollectionsManager.js";
13
13
 
14
- const countCollections = (items: CollectionsPageProps["items"]) =>
15
- items.filter((item) => item.type === "collection" && item.collection).length;
16
-
17
14
  export const CollectionsPage: FC<CollectionsPageProps> = ({
18
15
  items,
19
16
  isAuthenticated,
20
17
  sitePathPrefix = "",
21
18
  }) => {
22
19
  const { i18n } = useLingui();
23
- const collectionCount = countCollections(items);
24
20
  const emptyMessage = i18n._(
25
21
  msg({
26
22
  message: "No collections yet. Start one to organize posts by topic.",
27
23
  comment: "@context: Empty state message on collections page",
28
24
  }),
29
25
  );
30
- const collectionCountLabel = `${collectionCount} ${
31
- collectionCount === 1
32
- ? i18n._(
33
- msg({
34
- message: "collection",
35
- comment: "@context: Singular collection count label",
36
- }),
37
- )
38
- : i18n._(
39
- msg({
40
- message: "collections",
41
- comment: "@context: Plural collection count label",
42
- }),
43
- )
44
- }`;
45
26
 
46
27
  if (isAuthenticated) {
47
28
  return (
@@ -66,9 +47,6 @@ export const CollectionsPage: FC<CollectionsPageProps> = ({
66
47
  )}
67
48
  </h1>
68
49
  </div>
69
- <div class="page-intro-meta-row">
70
- <p class="page-intro-meta">{collectionCountLabel}</p>
71
- </div>
72
50
  </div>
73
51
  </header>
74
52
 
@@ -13,9 +13,6 @@ import { getCollectionMutationLabels } from "./collection-management-labels.js";
13
13
  const escapeJson = (data: unknown) =>
14
14
  JSON.stringify(data).replace(/</g, "\\u003c");
15
15
 
16
- const countCollections = (items: CollectionDirectoryItem[]) =>
17
- items.filter((item) => item.type === "collection" && item.collection).length;
18
-
19
16
  export interface CollectionsManagerProps {
20
17
  items: CollectionDirectoryItem[];
21
18
  sitePathPrefix?: string;
@@ -34,22 +31,6 @@ export const CollectionsManager: FC<CollectionsManagerProps> = ({
34
31
  `${getNewCollectionPath()}?returnTo=${encodeURIComponent(collectionsHref)}`,
35
32
  sitePathPrefix,
36
33
  );
37
- const collectionCount = countCollections(items);
38
- const collectionCountLabel = `${collectionCount} ${
39
- collectionCount === 1
40
- ? i18n._(
41
- msg({
42
- message: "collection",
43
- comment: "@context: Singular collection count label",
44
- }),
45
- )
46
- : i18n._(
47
- msg({
48
- message: "collections",
49
- comment: "@context: Plural collection count label",
50
- }),
51
- )
52
- }`;
53
34
  const mutationLabels = getCollectionMutationLabels(i18n);
54
35
 
55
36
  const labels = {
@@ -59,18 +40,6 @@ export const CollectionsManager: FC<CollectionsManagerProps> = ({
59
40
  comment: "@context: Collections page heading",
60
41
  }),
61
42
  ),
62
- collectionSingular: i18n._(
63
- msg({
64
- message: "collection",
65
- comment: "@context: Singular collection count label",
66
- }),
67
- ),
68
- collectionPlural: i18n._(
69
- msg({
70
- message: "collections",
71
- comment: "@context: Plural collection count label",
72
- }),
73
- ),
74
43
  organize: i18n._(
75
44
  msg({
76
45
  message: "Organize",
@@ -164,11 +133,6 @@ export const CollectionsManager: FC<CollectionsManagerProps> = ({
164
133
  <div class="collections-page-heading page-intro">
165
134
  <div class="page-intro-title-row">
166
135
  <h1 class="page-intro-title">{labels.collectionsTitle}</h1>
167
- </div>
168
- <div class="page-intro-meta-row">
169
- <p class="page-intro-meta" data-collections-count>
170
- {collectionCountLabel}
171
- </p>
172
136
  <div class="collections-page-actions">
173
137
  <div
174
138
  class="collections-page-action-group"
@@ -202,14 +166,15 @@ export const CollectionsManager: FC<CollectionsManagerProps> = ({
202
166
  >
203
167
  <svg
204
168
  xmlns="http://www.w3.org/2000/svg"
205
- width="16"
206
- height="16"
169
+ width="18"
170
+ height="18"
207
171
  viewBox="0 0 24 24"
208
172
  fill="none"
209
173
  stroke="currentColor"
210
174
  stroke-width="2"
211
175
  stroke-linecap="round"
212
176
  stroke-linejoin="round"
177
+ aria-hidden="true"
213
178
  >
214
179
  <path d="M12 5v14" />
215
180
  <path d="M5 12h14" />
@@ -218,7 +183,7 @@ export const CollectionsManager: FC<CollectionsManagerProps> = ({
218
183
  <div class="relative">
219
184
  <button
220
185
  type="button"
221
- class="collections-page-toolbar-button collections-page-more-btn"
186
+ class="collections-page-toolbar-button"
222
187
  aria-label={labels.moreActions}
223
188
  aria-expanded="false"
224
189
  aria-haspopup="menu"
@@ -227,8 +192,8 @@ export const CollectionsManager: FC<CollectionsManagerProps> = ({
227
192
  >
228
193
  <svg
229
194
  xmlns="http://www.w3.org/2000/svg"
230
- width="16"
231
- height="16"
195
+ width="18"
196
+ height="18"
232
197
  viewBox="0 0 24 24"
233
198
  fill="currentColor"
234
199
  >
@@ -1,6 +0,0 @@
1
- import "./url-XF0GbKGO.js";
2
- import { t as createApp } from "./app-Ct9c4zYF.js";
3
- import "./export-O2w3AsZX.js";
4
- import "./env-CoSe-1y4.js";
5
- import "./github-sync-D49RADci.js";
6
- export { createApp };