@turnipxenon/pineapple 5.1.0 → 5.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.
Files changed (45) hide show
  1. package/dist/remoteIndex.remote.d.ts +1 -0
  2. package/dist/remoteIndex.remote.d.ts.map +1 -1
  3. package/dist/remoteIndex.remote.js +1 -0
  4. package/dist/styles/color-tokens.css +2 -0
  5. package/dist/svelteIndex.svelte.d.ts +3 -0
  6. package/dist/svelteIndex.svelte.d.ts.map +1 -0
  7. package/dist/svelteIndex.svelte.js +13 -0
  8. package/dist/ui/components/index.d.ts +2 -0
  9. package/dist/ui/components/index.d.ts.map +1 -1
  10. package/dist/ui/components/index.js +2 -0
  11. package/dist/ui/components/project-date-badge/ProjectDateBadge.svelte +160 -0
  12. package/dist/ui/components/project-date-badge/ProjectDateBadge.svelte.d.ts +5 -0
  13. package/dist/ui/components/project-date-badge/ProjectDateBadge.svelte.d.ts.map +1 -0
  14. package/dist/ui/components/project-date-badge/ProjectDateBageProps.d.ts +8 -0
  15. package/dist/ui/components/project-date-badge/ProjectDateBageProps.d.ts.map +1 -0
  16. package/dist/ui/components/project-date-badge/ProjectDateBageProps.js +1 -0
  17. package/dist/ui/modules/projects/Hepcat.svelte +11 -1
  18. package/dist/ui/modules/projects/Hepcat.svelte.d.ts +2 -1
  19. package/dist/ui/modules/projects/Hepcat.svelte.d.ts.map +1 -1
  20. package/dist/ui/modules/projects/ObsidianPublisher.svelte +73 -0
  21. package/dist/ui/modules/projects/ObsidianPublisher.svelte.d.ts +26 -0
  22. package/dist/ui/modules/projects/ObsidianPublisher.svelte.d.ts.map +1 -0
  23. package/dist/ui/modules/projects/Pengi.svelte +14 -3
  24. package/dist/ui/modules/projects/Pengi.svelte.d.ts +5 -3
  25. package/dist/ui/modules/projects/Pengi.svelte.d.ts.map +1 -1
  26. package/dist/ui/modules/projects/Soulwork.svelte +14 -4
  27. package/dist/ui/modules/projects/Soulwork.svelte.d.ts +4 -3
  28. package/dist/ui/modules/projects/Soulwork.svelte.d.ts.map +1 -1
  29. package/dist/ui/modules/projects/ThisWebpage.svelte +18 -6
  30. package/dist/ui/modules/projects/ThisWebpage.svelte.d.ts +4 -2
  31. package/dist/ui/modules/projects/ThisWebpage.svelte.d.ts.map +1 -1
  32. package/dist/ui/modules/projects/index.d.ts.map +1 -1
  33. package/dist/ui/templates/SeaweedLayout/EntryGroup.svelte +52 -6
  34. package/dist/ui/templates/SeaweedLayout/EntryGroup.svelte.d.ts.map +1 -1
  35. package/dist/ui/templates/SeaweedLayout/ProjectComponentProps.d.ts +2 -0
  36. package/dist/ui/templates/SeaweedLayout/ProjectComponentProps.d.ts.map +1 -1
  37. package/dist/ui/templates/SeaweedLayout/props.d.ts +5 -0
  38. package/dist/ui/templates/SeaweedLayout/props.d.ts.map +1 -1
  39. package/dist/util/getCommitDate.d.ts +14 -0
  40. package/dist/util/getCommitDate.d.ts.map +1 -0
  41. package/dist/util/getCommitDate.js +143 -0
  42. package/dist/util/getCommitDate.remote.d.ts +14 -0
  43. package/dist/util/getCommitDate.remote.d.ts.map +1 -0
  44. package/dist/util/getCommitDate.remote.js +133 -0
  45. package/package.json +7 -1
@@ -1,2 +1,3 @@
1
1
  export * from "./util/getParsnipData.remote";
2
+ export * from "./util/getCommitDate.remote";
2
3
  //# sourceMappingURL=remoteIndex.remote.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"remoteIndex.remote.d.ts","sourceRoot":"","sources":["../src/lib/remoteIndex.remote.ts"],"names":[],"mappings":"AAEA,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"remoteIndex.remote.d.ts","sourceRoot":"","sources":["../src/lib/remoteIndex.remote.ts"],"names":[],"mappings":"AAEA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC"}
@@ -1,2 +1,3 @@
1
1
  // noinspection JSUnusedGlobalSymbols
2
2
  export * from "./util/getParsnipData.remote";
3
+ export * from "./util/getCommitDate.remote";
@@ -8,6 +8,7 @@ html {
8
8
  --color-warning-700-400: var(--color-warning-700);
9
9
  --color-surface-50-950: var(--color-surface-50);
10
10
  --color-surface-700-600: var(--color-surface-700);
11
+ --color-surface-900-100: var(--color-surface-900);
11
12
  }
12
13
 
13
14
  html.dark {
@@ -20,4 +21,5 @@ html.dark {
20
21
  --color-warning-700-400: var(--color-warning-400);
21
22
  --color-surface-50-950: var(--color-surface-950);
22
23
  --color-surface-700-600: var(--color-surface-600);
24
+ --color-surface-900-100: var(--color-surface-100);
23
25
  }
@@ -0,0 +1,3 @@
1
+ import type { SnippetMeta } from "./ui/templates/index";
2
+ export declare const projectList: SnippetMeta[];
3
+ //# sourceMappingURL=svelteIndex.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svelteIndex.svelte.d.ts","sourceRoot":"","sources":["../src/lib/svelteIndex.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAM3D,eAAO,MAAM,WAAW,EAAE,WAAW,EAMpC,CAAC"}
@@ -0,0 +1,13 @@
1
+ // noinspection JSUnusedGlobalSymbols
2
+ import * as ObsidianPublisher from "./ui/modules/projects/ObsidianPublisher.svelte";
3
+ import * as Hepcat from "./ui/modules/projects/Hepcat.svelte";
4
+ import * as Pengi from "./ui/modules/projects/Pengi.svelte";
5
+ import * as Soulwork from "./ui/modules/projects/Soulwork.svelte";
6
+ import * as ThisWebpage from "./ui/modules/projects/ThisWebpage.svelte";
7
+ export const projectList = [
8
+ ThisWebpage,
9
+ Hepcat,
10
+ Pengi,
11
+ Soulwork,
12
+ ObsidianPublisher
13
+ ];
@@ -2,4 +2,6 @@ export * from "./accordion";
2
2
  export { default as ModalBase } from "./ModalBase.svelte";
3
3
  export { default as FourPartCard } from "./FourPartCard.svelte";
4
4
  export { default as SocialSection } from "./SocialSection.svelte";
5
+ export { default as ProjectDateBadge } from "./project-date-badge/ProjectDateBadge.svelte";
6
+ export * from "./project-date-badge/ProjectDateBageProps";
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,cAAc,2CAA2C,CAAC"}
@@ -2,3 +2,5 @@ export * from "./accordion";
2
2
  export { default as ModalBase } from "./ModalBase.svelte";
3
3
  export { default as FourPartCard } from "./FourPartCard.svelte";
4
4
  export { default as SocialSection } from "./SocialSection.svelte";
5
+ export { default as ProjectDateBadge } from "./project-date-badge/ProjectDateBadge.svelte";
6
+ export * from "./project-date-badge/ProjectDateBageProps";
@@ -0,0 +1,160 @@
1
+ <script lang="ts">
2
+ import { slide } from 'svelte/transition';
3
+ import type { ProjectDateBageProps } from "./ProjectDateBageProps";
4
+ import { TextLink } from "../../elements/index";
5
+
6
+ let {
7
+ dateStarted,
8
+ dateFinished,
9
+ isOngoing = false,
10
+ commitCount,
11
+ gitRepoLink
12
+ }: ProjectDateBageProps = $props();
13
+
14
+ function formatDate(date: Date | string): string {
15
+ const d = date instanceof Date ? date : new Date(date);
16
+ return d.toLocaleDateString("en-US", { month: "short", year: "numeric" });
17
+ }
18
+
19
+ function getDurationText(start: Date | string, end?: Date | string): string {
20
+ const startDate = start instanceof Date ? start : new Date(start);
21
+ const endDate = end ? (end instanceof Date ? end : new Date(end)) : new Date();
22
+
23
+ const totalMonths =
24
+ (endDate.getFullYear() - startDate.getFullYear()) * 12 +
25
+ (endDate.getMonth() - startDate.getMonth());
26
+
27
+ if (totalMonths < 1) {
28
+ const days = Math.max(1, Math.round((endDate.getTime() - startDate.getTime()) / (1000 * 60 * 60 * 24)));
29
+ return `${days} day${days !== 1 ? "s" : ""}`;
30
+ }
31
+
32
+ const years = Math.floor(totalMonths / 12);
33
+ const months = totalMonths % 12;
34
+
35
+ if (years === 0) return `${months} mo${months !== 1 ? "s" : ""}`;
36
+ if (months === 0) return `${years} yr${years !== 1 ? "s" : ""}`;
37
+ return `${years} yr${years !== 1 ? "s" : ""} ${months} mo${months !== 1 ? "s" : ""}`;
38
+ }
39
+
40
+ const hasData = $derived(!!dateStarted);
41
+ </script>
42
+
43
+ {#if hasData}
44
+ <section transition:slide class="project-date-badge">
45
+ <div class="badge-row">
46
+ <span class="date-info">
47
+ {formatDate(dateStarted!)}
48
+ <span class="separator">→</span>
49
+ {#if isOngoing}
50
+ <span class="ongoing-label">Present</span>
51
+ {:else if dateFinished}
52
+ {formatDate(dateFinished)}
53
+ {:else}
54
+ <span class="unknown-label">?</span>
55
+ {/if}
56
+ </span>
57
+
58
+ {#if dateStarted}
59
+ <span class="duration">
60
+ {getDurationText(dateStarted, isOngoing ? undefined : dateFinished)}
61
+ </span>
62
+ {/if}
63
+ </div>
64
+
65
+ {#if commitCount != null || isOngoing}
66
+ <div class="badge-row secondary-row">
67
+ {#if isOngoing}
68
+ <span class="ongoing-badge">ongoing</span>
69
+ {/if}
70
+ {#if commitCount != null && gitRepoLink}
71
+ <TextLink href={gitRepoLink} target="_blank" rel="noopener noreferrer" class="commit-count">
72
+ {commitCount} commit{commitCount !== 1 ? "s" : ""}
73
+ </TextLink>
74
+ {:else if commitCount != null}
75
+ <span class="commit-count">{commitCount} commit{commitCount !== 1 ? "s" : ""}</span>
76
+ {/if}
77
+ </div>
78
+ {/if}
79
+ </section>
80
+ {/if}
81
+
82
+ <style>
83
+ .project-date-badge {
84
+ display: flex;
85
+ flex-direction: column;
86
+ gap: 0.375rem;
87
+ padding: 0.75rem 0;
88
+ margin-top: 0.75rem;
89
+ border-top: 1px solid var(--color-surface-900-100);
90
+ font-size: 0.8125rem;
91
+ line-height: 1.4;
92
+ }
93
+
94
+ .badge-row {
95
+ display: flex;
96
+ align-items: center;
97
+ justify-content: space-between;
98
+ flex-wrap: wrap;
99
+ gap: 0.5rem;
100
+ }
101
+
102
+ .date-info {
103
+ color: var(--color-surface-900-100);
104
+ }
105
+
106
+ .separator {
107
+ margin: 0 0.25rem;
108
+ color: var(--color-surface-900-100);
109
+ }
110
+
111
+ .ongoing-label {
112
+ color: var(--color-primary-400-600);
113
+ font-weight: 600;
114
+ }
115
+
116
+ .unknown-label {
117
+ color: var(--color-surface-900-100);
118
+ font-style: italic;
119
+ }
120
+
121
+ .duration {
122
+ color: var(--color-surface-900-100);
123
+ font-weight: 500;
124
+ }
125
+
126
+ .secondary-row {
127
+ justify-content: flex-start;
128
+ gap: 0.5rem;
129
+ }
130
+
131
+ .ongoing-badge {
132
+ display: inline-block;
133
+ padding: 0.125rem 0.5rem;
134
+ border-radius: var(--radius-md, 0.375rem);
135
+ background-color: var(--color-primary-50-900);
136
+ color: var(--color-primary-700);
137
+ font-size: 0.75rem;
138
+ font-weight: 600;
139
+ text-transform: uppercase;
140
+ letter-spacing: 0.025em;
141
+ }
142
+
143
+ :global(html.dark) .ongoing-badge {
144
+ color: var(--color-primary-300);
145
+ }
146
+
147
+ .commit-count {
148
+ font-size: 0.75rem;
149
+ color: var(--color-surface-900-100);
150
+ }
151
+
152
+ a.commit-count {
153
+ text-decoration: none;
154
+ }
155
+
156
+ a.commit-count:hover {
157
+ text-decoration: underline;
158
+ color: var(--color-primary-400-600);
159
+ }
160
+ </style>
@@ -0,0 +1,5 @@
1
+ import type { ProjectDateBageProps } from "./ProjectDateBageProps";
2
+ declare const ProjectDateBadge: import("svelte").Component<ProjectDateBageProps, {}, "">;
3
+ type ProjectDateBadge = ReturnType<typeof ProjectDateBadge>;
4
+ export default ProjectDateBadge;
5
+ //# sourceMappingURL=ProjectDateBadge.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectDateBadge.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/components/project-date-badge/ProjectDateBadge.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4DAA4D,CAAC;AAwFvG,QAAA,MAAM,gBAAgB,0DAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export interface ProjectDateBageProps {
2
+ dateStarted?: Date | string;
3
+ dateFinished?: Date | string;
4
+ isOngoing?: boolean;
5
+ commitCount?: number;
6
+ gitRepoLink?: string;
7
+ }
8
+ //# sourceMappingURL=ProjectDateBageProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectDateBageProps.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/components/project-date-badge/ProjectDateBageProps.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACpC,WAAW,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -3,6 +3,7 @@
3
3
  <script module lang="ts">
4
4
  import HeaderHepCat from "../../../assets/temp/header-hep-cat.mp4";
5
5
  import BitbucketIcon from "../../../assets/icons/bitbucket-icon.svg";
6
+ import ProjectDateBadge from "../../components/project-date-badge/ProjectDateBadge.svelte";
6
7
  import type { ProjectComponentProps } from "../../templates/SeaweedLayout/ProjectComponentProps";
7
8
  import { default as FourPartCard } from "../../components/FourPartCard.svelte";
8
9
  import { default as ImageIcon } from "../../elements/ImageIcon.svelte";
@@ -13,9 +14,10 @@
13
14
  const key = "Hepcat";
14
15
  const dateStarted = "2020-01-01";
15
16
  const dateFinished = "2020-04-15";
17
+ const priority = 100;
16
18
  const tags = ["unity", "csharp", "game", "rhythm", "rpgmaker"];
17
19
  // type SnippetMeta at src/lib/ui/templates/SeaweedLayout/props.ts:6
18
- export { component, key, dateStarted, dateFinished, tags };
20
+ export { component, key, dateStarted, dateFinished, tags, priority };
19
21
  </script>
20
22
 
21
23
  {#snippet component(props: ProjectComponentProps)}
@@ -52,6 +54,13 @@
52
54
  files.
53
55
  </p>
54
56
 
57
+ <ProjectDateBadge
58
+ dateStarted={props.snippetMeta?.dateStarted}
59
+ dateFinished={props.snippetMeta?.dateFinished}
60
+ isOngoing={props.snippetMeta?.tags?.includes("ongoing") ?? false}
61
+ commitCount={props.snippetMeta?.commitCount}
62
+ gitRepoLink={props.snippetMeta?.gitRepoLink}
63
+ />
55
64
 
56
65
  <section class="game-link-section">
57
66
  <PinyaButton
@@ -67,6 +76,7 @@
67
76
  <ImageIcon alt="itch.io icon" src={ItchLogoHotLink}></ImageIcon>
68
77
  </PinyaButton>
69
78
  </section>
79
+
70
80
  </FourPartCard>
71
81
  {/snippet}
72
82
 
@@ -3,8 +3,9 @@ declare const component: (props: ProjectComponentProps) => ReturnType<import("sv
3
3
  declare const key = "Hepcat";
4
4
  declare const dateStarted = "2020-01-01";
5
5
  declare const dateFinished = "2020-04-15";
6
+ declare const priority = 100;
6
7
  declare const tags: string[];
7
- export { component, key, dateStarted, dateFinished, tags };
8
+ export { component, key, dateStarted, dateFinished, tags, priority };
8
9
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
9
10
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
10
11
  $$bindings?: Bindings;
@@ -1 +1 @@
1
- {"version":3,"file":"Hepcat.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/modules/projects/Hepcat.svelte.ts"],"names":[],"mappings":"AAKC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAMnG,QAAA,MAAM,SAAS,GAAyB,OAAO,qBAAqB,KAAqB,UAAU,CAAC,OAAO,QAAQ,EAAE,OAAO,CAwChG,CAAC;AAE7B,QAAA,MAAM,GAAG,WAAW,CAAC;AACrB,QAAA,MAAM,WAAW,eAAe,CAAC;AACjC,QAAA,MAAM,YAAY,eAAe,CAAC;AAClC,QAAA,MAAM,IAAI,UAAoD,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AAY5D,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE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BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IACtG,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAKD,QAAA,MAAM,MAAM;;kBAA+E,CAAC;AAC1E,KAAK,MAAM,GAAG,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC;AAC5C,eAAe,MAAM,CAAC"}
@@ -0,0 +1,73 @@
1
+ <!-- TODO: Documentation: consider documentation showcase -->
2
+
3
+ <script module lang="ts">
4
+ import GithubIcon from "../../../assets/icons/github-mark.svg";
5
+ import LinkIcon from "../../../assets/icons/link-icon.svg";
6
+ import { default as FourPartCard } from "../../components/FourPartCard.svelte";
7
+ import ProjectDateBadge from "../../components/project-date-badge/ProjectDateBadge.svelte";
8
+ import { default as ImageIcon } from "../../elements/ImageIcon.svelte";
9
+ import { default as PinyaButton } from "../../elements/PinyaButton/PinyaButton.svelte";
10
+ import { ButtonVariant } from "../../elements/PinyaButtonCommon/ButtonVariant";
11
+ import { default as TextChip } from "../../elements/TextChip/TextChip.svelte";
12
+ import type { ProjectComponentProps } from "../../templates/SeaweedLayout/ProjectComponentProps";
13
+
14
+ const key = "ObsidianPublisher";
15
+ const startCommit = "https://github.com/TurnipXenon/obsidian-blog-publisher/commit/d8eaecacc3703a57c16b400d3bea6428b0dbfaee"; // fill in GitHub commit URL to auto-resolve dateStarted
16
+ const gitRepoLink = "https://github.com/TurnipXenon/obsidian-blog-publisher";
17
+ const tags = ["plugin", "typescript", "obsidian"];
18
+ export { component, key, startCommit, gitRepoLink, tags };
19
+ </script>
20
+ <script>
21
+ import { TextLink } from "../../elements/index";
22
+ </script>
23
+
24
+ {#snippet component(props: ProjectComponentProps)}
25
+ <FourPartCard>
26
+
27
+ {#snippet headerCover()}
28
+ <img
29
+ class="game-video-cover"
30
+ alt="Screenshot showing the blog on the left and the source Obsidian page on the right with a UI on top prompting the user which selection or webpage to push"
31
+ src="https://github.com/TurnipXenon/obsidian-blog-publisher/raw/main/docs/showcase.png" />
32
+ {/snippet}
33
+
34
+ {#snippet header()}
35
+ <h3>Blog Publisher Plugin</h3>
36
+ {/snippet}
37
+
38
+ <p>
39
+ An Obsidian plugin that publishes my blog to a selected website.
40
+ It generates AST of the Markdown files, which it then publishes to a git repo.
41
+ The plugin follows it up with a Cloudflare rebuild of the website, which would read the contents of the repo.
42
+ A module in the website called
43
+ <TextLink href="https://github.com/TurnipXenon/pineapple/pull/152">Parsnip</TextLink>
44
+ generates custom pages based on these AST files.
45
+ </p>
46
+
47
+ <ProjectDateBadge
48
+ dateStarted={props.snippetMeta?.dateStarted}
49
+ dateFinished={props.snippetMeta?.dateFinished}
50
+ isOngoing={props.snippetMeta?.tags?.includes("ongoing") ?? false}
51
+ commitCount={props.snippetMeta?.commitCount}
52
+ gitRepoLink={props.snippetMeta?.gitRepoLink}
53
+ />
54
+
55
+ <section class="game-link-section">
56
+ <PinyaButton
57
+ buttonVariant={ButtonVariant.Image}
58
+ title="https://github.com/TurnipXenon/obsidian-blog-publisher"
59
+ onclick={() => window.open("https://github.com/TurnipXenon/obsidian-blog-publisher")}>
60
+ <ImageIcon src={GithubIcon} class="long-btn-image" alt="github icon" />
61
+ </PinyaButton>
62
+ <PinyaButton
63
+ data-nosnippet
64
+ buttonVariant={ButtonVariant.SmallIcon}
65
+ title="https://www.turnipxenon.com/blogs"
66
+ onclick={() => window.open("https://www.turnipxenon.com/blogs")}>
67
+ <ImageIcon src={LinkIcon} aria-hidden />
68
+ <span>turnipxenon.com/blogs</span>
69
+ </PinyaButton>
70
+ </section>
71
+
72
+ </FourPartCard>
73
+ {/snippet}
@@ -0,0 +1,26 @@
1
+ import type { ProjectComponentProps } from "../../templates/SeaweedLayout/ProjectComponentProps";
2
+ declare const key = "ObsidianPublisher";
3
+ declare const startCommit = "https://github.com/TurnipXenon/obsidian-blog-publisher/commit/d8eaecacc3703a57c16b400d3bea6428b0dbfaee";
4
+ declare const gitRepoLink = "https://github.com/TurnipXenon/obsidian-blog-publisher";
5
+ declare const tags: string[];
6
+ export { component, key, startCommit, gitRepoLink, tags };
7
+ declare const component: (props: ProjectComponentProps) => ReturnType<import("svelte").Snippet>;
8
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
9
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
10
+ $$bindings?: Bindings;
11
+ } & Exports;
12
+ (internal: unknown, props: {
13
+ $$events?: Events;
14
+ $$slots?: Slots;
15
+ }): Exports & {
16
+ $set?: any;
17
+ $on?: any;
18
+ };
19
+ z_$$bindings?: Bindings;
20
+ }
21
+ declare const ObsidianPublisher: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
22
+ [evt: string]: CustomEvent<any>;
23
+ }, {}, {}, string>;
24
+ type ObsidianPublisher = InstanceType<typeof ObsidianPublisher>;
25
+ export default ObsidianPublisher;
26
+ //# sourceMappingURL=ObsidianPublisher.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObsidianPublisher.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/modules/projects/ObsidianPublisher.svelte.ts"],"names":[],"mappings":"AAWC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAEnG,QAAA,MAAM,GAAG,sBAAsB,CAAC;AAChC,QAAA,MAAM,WAAW,2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ets/temp/header-pengi.mp4";
5
5
  import GithubIcon from "../../../assets/icons/github-mark.svg";
6
+ import ProjectDateBadge from "../../components/project-date-badge/ProjectDateBadge.svelte";
6
7
  import type { ProjectComponentProps } from "../../templates/SeaweedLayout/ProjectComponentProps";
7
8
  import { default as FourPartCard } from "../../components/FourPartCard.svelte";
8
9
  import { default as ImageIcon } from "../../elements/ImageIcon.svelte";
@@ -11,10 +12,12 @@
11
12
  import { ButtonVariant } from "../../elements/PinyaButtonCommon/ButtonVariant";
12
13
 
13
14
  const key = "Pengi";
14
- const dateStarted = "2020-08-01";
15
- const dateFinished = "2020-12-15";
15
+ const priority = 80;
16
+ const startCommit = "https://github.com/GreenTea-M/ProjectPengi/commit/401cbf7448374109f1a330bba11db87326034801"; // fill in GitHub commit URL to auto-resolve dateStarted
17
+ const endCommit = "https://github.com/GreenTea-M/ProjectPengi/commit/0175ec669a3c935a798fdb3c85fb37506d4b5557"; // fill in GitHub commit URL to auto-resolve dateFinished
18
+ const gitRepoLink = "https://github.com/GreenTea-M/ProjectPengi";
16
19
  const tags = ["unity", "csharp", "game", "narrative", "yarnspinner"];
17
- export { component, key, dateStarted, dateFinished, tags };
20
+ export { component, key, startCommit, endCommit, gitRepoLink, tags, priority };
18
21
  </script>
19
22
 
20
23
  {#snippet component(props: ProjectComponentProps)}
@@ -44,6 +47,14 @@
44
47
  to use to create expressive stage directions in the script.
45
48
  </p>
46
49
 
50
+ <ProjectDateBadge
51
+ dateStarted={props.snippetMeta?.dateStarted}
52
+ dateFinished={props.snippetMeta?.dateFinished}
53
+ isOngoing={props.snippetMeta?.tags?.includes("ongoing") ?? false}
54
+ commitCount={props.snippetMeta?.commitCount}
55
+ gitRepoLink={props.snippetMeta?.gitRepoLink}
56
+ />
57
+
47
58
  <section class="game-link-section">
48
59
  <PinyaButton
49
60
  buttonVariant={ButtonVariant.Image}
@@ -1,10 +1,12 @@
1
1
  import type { ProjectComponentProps } from "../../templates/SeaweedLayout/ProjectComponentProps";
2
2
  declare const component: (props: ProjectComponentProps) => ReturnType<import("svelte").Snippet>;
3
3
  declare const key = "Pengi";
4
- declare const dateStarted = "2020-08-01";
5
- declare const dateFinished = "2020-12-15";
4
+ declare const priority = 80;
5
+ declare const startCommit = "https://github.com/GreenTea-M/ProjectPengi/commit/401cbf7448374109f1a330bba11db87326034801";
6
+ declare const endCommit = "https://github.com/GreenTea-M/ProjectPengi/commit/0175ec669a3c935a798fdb3c85fb37506d4b5557";
7
+ declare const gitRepoLink = "https://github.com/GreenTea-M/ProjectPengi";
6
8
  declare const tags: string[];
7
- export { component, key, dateStarted, dateFinished, tags };
9
+ export { component, key, startCommit, endCommit, gitRepoLink, tags, priority };
8
10
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
9
11
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
10
12
  $$bindings?: Bindings;
@@ -1 +1 @@
1
- {"version":3,"file":"Pengi.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/modules/projects/Pengi.svelte.ts"],"names":[],"mappings":"AAKC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAMnG,QAAA,MAAM,SAAS,GAAyB,OAAO,qBAAqB,KAAqB,UAAU,CAAC,OAAO,QAAQ,EAAE,OAAO,CAoChG,CAAC;AAE7B,QAAA,MAAM,GAAG,UAAU,CAAC;AACpB,QAAA,MAAM,WAAW,eAAe,CAAC;AACjC,QAAA,MAAM,YAAY,eAAe,CAAC;AAClC,QAAA,MAAM,IAAI,UAA0D,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AAS5D,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,M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ACjE,QAAA,MAAM,IAAI,UAA0D,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAShF,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IACtG,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAKD,QAAA,MAAM,KAAK;;kBAA+E,CAAC;AACzE,KAAK,KAAK,GAAG,YAAY,CAAC,OAAO,KAAK,CAAC,CAAC;AAC1C,eAAe,KAAK,CAAC"}
@@ -3,6 +3,7 @@
3
3
  <script module lang="ts">
4
4
  import HeaderSoulwork from "../../../assets/temp/header-soulwork.mp4";
5
5
  import GithubIcon from "../../../assets/icons/github-mark.svg";
6
+ import ProjectDateBadge from "../../components/project-date-badge/ProjectDateBadge.svelte";
6
7
  import type { ProjectComponentProps } from "../../templates/SeaweedLayout";
7
8
  import { default as FourPartCard } from "../../components/FourPartCard.svelte";
8
9
  import { default as ImageIcon } from "../../elements/ImageIcon.svelte";
@@ -11,10 +12,11 @@
11
12
  import { ButtonVariant } from "../../elements/PinyaButtonCommon/ButtonVariant";
12
13
 
13
14
  const key = "Soulwork";
14
- const dateStarted = "2019-11-09";
15
- const dateFinished = "2019-11-10";
16
- const tags = ["unity", "csharp", "game", "gamejam", "physics"];
17
- export { component, key, dateStarted, dateFinished, tags };
15
+ const startCommit = "https://github.com/Zeyu-Li/Clockwork/commit/b033be1b2e6cd3ff8cb706f2860a22456e911acb"; // fill in GitHub commit URL to auto-resolve dateStarted
16
+ const endCommit = "https://github.com/Zeyu-Li/Clockwork/commit/7dbfef1fe64b45b2eac4b6555747e18f7b5f8848"; // fill in GitHub commit URL to auto-resolve dateFinished
17
+ const gitRepoLink = "https://github.com/Zeyu-Li/Clockwork";
18
+ const tags = ["unity", "csharp", "game", "game-jam", "physics"];
19
+ export { component, key, startCommit, endCommit, gitRepoLink, tags };
18
20
  </script>
19
21
 
20
22
  {#snippet component(props: ProjectComponentProps)}
@@ -43,6 +45,13 @@
43
45
  was made in <span class="qt-unity">Unity</span> written using <span class="qt-cs">C#</span>.
44
46
  </p>
45
47
 
48
+ <ProjectDateBadge
49
+ dateStarted={props.snippetMeta?.dateStarted}
50
+ dateFinished={props.snippetMeta?.dateFinished}
51
+ isOngoing={props.snippetMeta?.tags?.includes("ongoing") ?? false}
52
+ commitCount={props.snippetMeta?.commitCount}
53
+ gitRepoLink={props.snippetMeta?.gitRepoLink}
54
+ />
46
55
 
47
56
  <section class="game-link-section">
48
57
  <PinyaButton
@@ -58,5 +67,6 @@
58
67
  <ImageIcon alt="itch.io icon" src={ItchLogoHotLink} />
59
68
  </PinyaButton>
60
69
  </section>
70
+
61
71
  </FourPartCard>
62
72
  {/snippet}
@@ -1,10 +1,11 @@
1
1
  import type { ProjectComponentProps } from "../../templates/SeaweedLayout";
2
2
  declare const component: (props: ProjectComponentProps) => ReturnType<import("svelte").Snippet>;
3
3
  declare const key = "Soulwork";
4
- declare const dateStarted = "2019-11-09";
5
- declare const dateFinished = "2019-11-10";
4
+ declare const startCommit = "https://github.com/Zeyu-Li/Clockwork/commit/b033be1b2e6cd3ff8cb706f2860a22456e911acb";
5
+ declare const endCommit = "https://github.com/Zeyu-Li/Clockwork/commit/7dbfef1fe64b45b2eac4b6555747e18f7b5f8848";
6
+ declare const gitRepoLink = "https://github.com/Zeyu-Li/Clockwork";
6
7
  declare const tags: string[];
7
- export { component, key, dateStarted, dateFinished, tags };
8
+ export { component, key, startCommit, endCommit, gitRepoLink, tags };
8
9
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
9
10
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
10
11
  $$bindings?: Bindings;
@@ -1 +1 @@
1
- {"version":3,"file":"Soulwork.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/modules/projects/Soulwork.svelte.ts"],"names":[],"mappings":"AAKC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAM7E,QAAA,MAAM,SAAS,GAAyB,OAAO,qBAAqB,KAAqB,UAAU,CAAC,OAAO,QAAQ,EAAE,OAAO,CAiChG,CAAC;AAE7B,QAAA,MAAM,GAAG,aAAa,CAAC;AACvB,QAAA,MAAM,WAAW,eAAe,CAAC;AACjC,QAAA,MAAM,YAAY,eAAe,CAAC;AAClC,QAAA,MAAM,IAAI,UAAoD,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AAS5D,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EA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EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AAStE,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IACtG,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAKD,QAAA,MAAM,QAAQ;;kBAA+E,CAAC;AAC5E,KAAK,QAAQ,GAAG,YAAY,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChD,eAAe,QAAQ,CAAC"}
@@ -2,19 +2,22 @@
2
2
 
3
3
  <script module lang="ts">
4
4
  import GithubIcon from "../../../assets/icons/github-mark.svg";
5
- import ThisWebsiteFootage from "../../../assets/others/seaweed-showcase.mp4";
6
5
  import LinkIcon from "../../../assets/icons/link-icon.svg";
7
- import type { ProjectComponentProps } from "../../templates/SeaweedLayout/ProjectComponentProps";
6
+ import ThisWebsiteFootage from "../../../assets/others/seaweed-showcase.mp4";
8
7
  import { default as FourPartCard } from "../../components/FourPartCard.svelte";
8
+ import ProjectDateBadge from "../../components/project-date-badge/ProjectDateBadge.svelte";
9
9
  import { default as ImageIcon } from "../../elements/ImageIcon.svelte";
10
10
  import { default as PinyaButton } from "../../elements/PinyaButton/PinyaButton.svelte";
11
- import { default as TextChip } from "../../elements/TextChip/TextChip.svelte";
12
11
  import { ButtonVariant } from "../../elements/PinyaButtonCommon/ButtonVariant";
12
+ import { default as TextChip } from "../../elements/TextChip/TextChip.svelte";
13
+ import type { ProjectComponentProps } from "../../templates/SeaweedLayout/ProjectComponentProps";
13
14
 
14
15
  const key = "This Webpage";
15
- const dateStarted = "2023-06-01";
16
+ const priority = 70;
17
+ const startCommit = "https://github.com/TurnipXenon/pineapple/commit/b16aa69b9f5ad224871e80c09aa4cca067dc2a52"; // fill in GitHub commit URL to auto-resolve dateStarted
18
+ const gitRepoLink = "https://github.com/TurnipXenon/pineapple";
16
19
  const tags = ["svelte", "typescript", "web", "tailwind", "postgres", "prisma", "ongoing", "database"];
17
- export { component, key, dateStarted, tags };
20
+ export { component, key, startCommit, gitRepoLink, tags, priority };
18
21
  </script>
19
22
 
20
23
  {#snippet component(props: ProjectComponentProps)}
@@ -58,6 +61,14 @@
58
61
  <TextChip queryClass="qt-rest">RESTful API</TextChip>
59
62
  </div>
60
63
 
64
+ <ProjectDateBadge
65
+ dateStarted={props.snippetMeta?.dateStarted}
66
+ dateFinished={props.snippetMeta?.dateFinished}
67
+ isOngoing={props.snippetMeta?.tags?.includes("ongoing") ?? false}
68
+ commitCount={props.snippetMeta?.commitCount}
69
+ gitRepoLink={props.snippetMeta?.gitRepoLink}
70
+ />
71
+
61
72
  <section class="game-link-section">
62
73
  <PinyaButton
63
74
  buttonVariant={ButtonVariant.Image}
@@ -71,8 +82,9 @@
71
82
  title="https://pineapple.turnipxenon.com/documentation"
72
83
  onclick={() => window.open("https://pineapple.turnipxenon.com/documentation")}>
73
84
  <ImageIcon src={LinkIcon} aria-hidden />
74
- <span>pineapple.turnipxenon.com</span>
85
+ <span>pineapple.turnipxenon.com</span>
75
86
  </PinyaButton>
76
87
  </section>
88
+
77
89
  </FourPartCard>
78
90
  {/snippet}
@@ -1,9 +1,11 @@
1
1
  import type { ProjectComponentProps } from "../../templates/SeaweedLayout/ProjectComponentProps";
2
2
  declare const component: (props: ProjectComponentProps) => ReturnType<import("svelte").Snippet>;
3
3
  declare const key = "This Webpage";
4
- declare const dateStarted = "2023-06-01";
4
+ declare const priority = 70;
5
+ declare const startCommit = "https://github.com/TurnipXenon/pineapple/commit/b16aa69b9f5ad224871e80c09aa4cca067dc2a52";
6
+ declare const gitRepoLink = "https://github.com/TurnipXenon/pineapple";
5
7
  declare const tags: string[];
6
- export { component, key, dateStarted, tags };
8
+ export { component, key, startCommit, gitRepoLink, tags, priority };
7
9
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
8
10
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
9
11
  $$bindings?: Bindings;
@@ -1 +1 @@
1
- {"version":3,"file":"ThisWebpage.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/modules/projects/ThisWebpage.svelte.ts"],"names":[],"mappings":"AAMC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAMnG,QAAA,MAAM,SAAS,GAAyB,OAAO,qBAAqB,KAAqB,UAAU,CAAC,OAAO,QAAQ,EAAE,OAAO,CAgDhG,CAAC;AAE7B,QAAA,MAAM,GAAG,iBAAiB,CAAC;AAC3B,QAAA,MAAM,WAAW,eAAe,CAAC;AACjC,QAAA,MAAM,IAAI,UAA2F,CAAC;AACtG,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AAS9C,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC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AACzC,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/modules/projects/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC"}
@@ -6,6 +6,8 @@
6
6
  import { PinyaCard } from "../../elements/PinyaCard";
7
7
  import type { ProjectGroup, SnippetMeta } from "./";
8
8
  import { SectionType } from "./props";
9
+ import { getCommitDate } from "../../../util/getCommitDate";
10
+ import { onMount } from "svelte";
9
11
 
10
12
  let {
11
13
  title,
@@ -18,18 +20,48 @@
18
20
  showMoreLimit = 0
19
21
  }: ProjectGroup = $props();
20
22
 
21
- // State
23
+ // State — resolvedEntryList allows date overrides after fetching from GitHub
24
+ let resolvedEntryList = $state<SnippetMeta[]>([...entryList]);
22
25
  let selectedTags = $state<string[]>([]);
23
26
  let sortBy = $state<string[]>(["default"]);
24
27
  let isExpanded = $state(false);
25
28
 
29
+ onMount(async () => {
30
+ const refs = entryList
31
+ .filter(e => e.startCommit || e.endCommit || e.gitRepoLink)
32
+ .map(e => ({
33
+ key: e.key,
34
+ startCommit: e.startCommit,
35
+ endCommit: e.endCommit,
36
+ gitRepoLink: e.gitRepoLink
37
+ }));
38
+
39
+ if (refs.length === 0) return;
40
+
41
+ try {
42
+ const dates = await getCommitDate(refs);
43
+ resolvedEntryList = entryList.map(e => {
44
+ const d = dates[e.key];
45
+ if (!d) return e;
46
+ return {
47
+ ...e,
48
+ ...(d.dateStarted ? { dateStarted: d.dateStarted } : {}),
49
+ ...(d.dateFinished ? { dateFinished: d.dateFinished } : {}),
50
+ ...(d.commitCount != null ? { commitCount: d.commitCount } : {})
51
+ };
52
+ });
53
+ } catch {
54
+ // Keep original entryList on failure
55
+ }
56
+ });
57
+
26
58
  // Derived values
27
- const allTags = $derived([...new Set(entryList.flatMap(e => e.tags ?? []))]);
59
+ const allTags = $derived([...new Set(resolvedEntryList.flatMap(e => e.tags ?? []))]);
28
60
 
29
61
  const filteredList = $derived(
30
62
  selectedTags.length === 0
31
- ? entryList
32
- : entryList.filter(e => e.tags?.some(t => selectedTags.includes(t)))
63
+ ? resolvedEntryList
64
+ : resolvedEntryList.filter(e => e.tags?.some(t => selectedTags.includes(t)))
33
65
  );
34
66
 
35
67
  function sortEntries(list: SnippetMeta[], sort: string): SnippetMeta[] {
@@ -68,7 +100,18 @@
68
100
  return durationA - durationB;
69
101
  });
70
102
  default:
71
- return sorted;
103
+ return sorted.sort((a, b) => {
104
+ const priorityDiff = (b.priority ?? 0) - (a.priority ?? 0);
105
+
106
+ if (priorityDiff !== 0) {
107
+ return priorityDiff;
108
+ }
109
+
110
+ // Entries without dateFinished go to the bottom
111
+ if (!a.dateFinished) return 1;
112
+ if (!b.dateFinished) return -1;
113
+ return new Date(b.dateFinished).getTime() - new Date(a.dateFinished).getTime();
114
+ });
72
115
  }
73
116
  }
74
117
 
@@ -115,7 +158,10 @@
115
158
  {:else}
116
159
  <div class="normal-project-container">
117
160
  {#each visibleList as ui (ui.key)}
118
- {@render ui.component(projectComponentProps ?? {})}
161
+ {@render ui.component(projectComponentProps ? {
162
+ ...projectComponentProps,
163
+ snippetMeta: ui
164
+ } : { snippetMeta: ui })}
119
165
  {/each}
120
166
  </div>
121
167
 
@@ -1 +1 @@
1
- {"version":3,"file":"EntryGroup.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/templates/SeaweedLayout/EntryGroup.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,iCAAiC,CAAC;AAwIjF,QAAA,MAAM,UAAU,kDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"EntryGroup.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/templates/SeaweedLayout/EntryGroup.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,iCAAiC,CAAC;AAwLjF,QAAA,MAAM,UAAU,kDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
@@ -1,6 +1,8 @@
1
+ import type { SnippetMeta } from "../index";
1
2
  import type { Snippet } from 'svelte';
2
3
  export interface ProjectComponentProps {
3
4
  isPineapple?: boolean;
5
+ snippetMeta?: SnippetMeta;
4
6
  }
5
7
  export type ComponentSnippet = Snippet<[ProjectComponentProps]>;
6
8
  //# sourceMappingURL=ProjectComponentProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectComponentProps.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/templates/SeaweedLayout/ProjectComponentProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,WAAW,qBAAqB;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"ProjectComponentProps.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/templates/SeaweedLayout/ProjectComponentProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,WAAW,qBAAqB;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC"}
@@ -13,6 +13,11 @@ export interface SnippetMeta {
13
13
  dateStarted?: Date | string;
14
14
  dateFinished?: Date | string;
15
15
  tags?: string[];
16
+ startCommit?: string;
17
+ endCommit?: string;
18
+ gitRepoLink?: string;
19
+ commitCount?: number;
20
+ priority?: number;
16
21
  }
17
22
  export interface ProjectGroup {
18
23
  key: string;
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/templates/SeaweedLayout/props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AACzF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE7E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,KAAK,gBAAgB,GAAG,OAAO,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC;AAEzD,oBAAY,WAAW;IACtB,UAAU,eAAe;IACzB,QAAQ,aAAa;CACrB;AAED,MAAM,WAAW,WAAW;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,gBAAgB,CAAC;IAE5B,WAAW,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,WAAW,EAAE,CAAC;IACzB,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAE9C,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,UAAU,CAAC,EAAE,OAA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+ key: string;
3
+ startCommit?: string;
4
+ endCommit?: string;
5
+ gitRepoLink?: string;
6
+ }
7
+ interface ResolvedDates {
8
+ dateStarted?: string;
9
+ dateFinished?: string;
10
+ commitCount?: number;
11
+ }
12
+ export declare function getCommitDate(refs: CommitDateRequest[]): Promise<Record<string, ResolvedDates>>;
13
+ export {};
14
+ //# sourceMappingURL=getCommitDate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCommitDate.d.ts","sourceRoot":"","sources":["../../src/lib/util/getCommitDate.ts"],"names":[],"mappings":"AAAA,UAAU,iBAAiB;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,aAAa;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAgFD,wBAAsB,aAAa,CAClC,IAAI,EAAE,iBAAiB,EAAE,GACvB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAgExC"}
@@ -0,0 +1,143 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ // localStorage cache to avoid hitting GitHub's 60 req/hr unauthenticated rate limit.
11
+ // Specific commit SHAs are immutable, so cache for 24h. Dynamic queries (latest commit,
12
+ // commit count) can change, so cache for 24h (staleness is acceptable for a portfolio).
13
+ // Safe to use localStorage here since this is only ever called from onMount (client-only).
14
+ const CACHE_PREFIX = "pineapple:github:";
15
+ const IMMUTABLE_TTL = 24 * 60 * 60 * 1000;
16
+ const DYNAMIC_TTL = 24 * 60 * 60 * 1000;
17
+ function githubFetch(url, ttlMs) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ const cacheKey = CACHE_PREFIX + url;
20
+ try {
21
+ const raw = localStorage.getItem(cacheKey);
22
+ if (raw) {
23
+ const cached = JSON.parse(raw);
24
+ if (Date.now() < cached.expiresAt) {
25
+ return cached.data;
26
+ }
27
+ }
28
+ }
29
+ catch (_a) {
30
+ // localStorage unavailable or parse error — proceed with fetch
31
+ }
32
+ try {
33
+ const res = yield fetch(url, { headers: { Accept: "application/vnd.github.v3+json" } });
34
+ if (!res.ok)
35
+ return null;
36
+ const data = yield res.json();
37
+ try {
38
+ localStorage.setItem(cacheKey, JSON.stringify({ data, expiresAt: Date.now() + ttlMs }));
39
+ }
40
+ catch (_b) {
41
+ // localStorage write failed (e.g. storage full) — ignore
42
+ }
43
+ return data;
44
+ }
45
+ catch (_c) {
46
+ return null;
47
+ }
48
+ });
49
+ }
50
+ function parseGithubCommitUrl(url) {
51
+ const match = url.match(/github\.com\/([^/]+)\/([^/]+)\/commit\/([a-f0-9]+)/i);
52
+ if (!match)
53
+ return null;
54
+ return { owner: match[1], repo: match[2], sha: match[3] };
55
+ }
56
+ function parseGithubRepoUrl(url) {
57
+ const match = url.match(/github\.com\/([^/]+)\/([^/]+)/i);
58
+ if (!match)
59
+ return null;
60
+ return { owner: match[1], repo: match[2].replace(/\.git$/, "") };
61
+ }
62
+ function fetchCommitDate(owner, repo, sha) {
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ var _a, _b, _c;
65
+ const data = yield githubFetch(`https://api.github.com/repos/${owner}/${repo}/commits/${sha}`, IMMUTABLE_TTL);
66
+ return (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.commit) === null || _a === void 0 ? void 0 : _a.committer) === null || _b === void 0 ? void 0 : _b.date) !== null && _c !== void 0 ? _c : null;
67
+ });
68
+ }
69
+ function fetchLatestCommitDate(owner, repo) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ var _a, _b, _c;
72
+ const data = yield githubFetch(`https://api.github.com/repos/${owner}/${repo}/commits?sha=main&per_page=1`, DYNAMIC_TTL);
73
+ if (!Array.isArray(data) || data.length === 0)
74
+ return null;
75
+ return (_c = (_b = (_a = data[0].commit) === null || _a === void 0 ? void 0 : _a.committer) === null || _b === void 0 ? void 0 : _b.date) !== null && _c !== void 0 ? _c : null;
76
+ });
77
+ }
78
+ function fetchCommitCount(owner, repo, baseSha, headSha) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ var _a;
81
+ const data = yield githubFetch(`https://api.github.com/repos/${owner}/${repo}/compare/${baseSha}...${headSha}`, DYNAMIC_TTL);
82
+ return (_a = data === null || data === void 0 ? void 0 : data.total_commits) !== null && _a !== void 0 ? _a : null;
83
+ });
84
+ }
85
+ export function getCommitDate(refs) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ const result = {};
88
+ const promises = [];
89
+ for (const ref of refs) {
90
+ const dates = {};
91
+ result[ref.key] = dates;
92
+ if (ref.startCommit) {
93
+ const parsed = parseGithubCommitUrl(ref.startCommit);
94
+ if (parsed) {
95
+ promises.push(fetchCommitDate(parsed.owner, parsed.repo, parsed.sha).then((d) => {
96
+ if (d)
97
+ dates.dateStarted = d;
98
+ }));
99
+ }
100
+ }
101
+ if (ref.endCommit) {
102
+ const parsed = parseGithubCommitUrl(ref.endCommit);
103
+ if (parsed) {
104
+ promises.push(fetchCommitDate(parsed.owner, parsed.repo, parsed.sha).then((d) => {
105
+ if (d)
106
+ dates.dateFinished = d;
107
+ }));
108
+ }
109
+ }
110
+ else if (ref.gitRepoLink) {
111
+ const parsed = parseGithubRepoUrl(ref.gitRepoLink);
112
+ if (parsed) {
113
+ promises.push(fetchLatestCommitDate(parsed.owner, parsed.repo).then((d) => {
114
+ if (d)
115
+ dates.dateFinished = d;
116
+ }));
117
+ }
118
+ }
119
+ if (ref.startCommit) {
120
+ const startParsed = parseGithubCommitUrl(ref.startCommit);
121
+ if (startParsed) {
122
+ if (ref.endCommit) {
123
+ const endParsed = parseGithubCommitUrl(ref.endCommit);
124
+ if (endParsed && endParsed.owner === startParsed.owner && endParsed.repo === startParsed.repo) {
125
+ promises.push(fetchCommitCount(startParsed.owner, startParsed.repo, startParsed.sha, endParsed.sha).then((c) => {
126
+ if (c != null)
127
+ dates.commitCount = c;
128
+ }));
129
+ }
130
+ }
131
+ else if (ref.gitRepoLink) {
132
+ promises.push(fetchCommitCount(startParsed.owner, startParsed.repo, startParsed.sha, "main").then((c) => {
133
+ if (c != null)
134
+ dates.commitCount = c;
135
+ }));
136
+ }
137
+ }
138
+ }
139
+ }
140
+ yield Promise.all(promises);
141
+ return result;
142
+ });
143
+ }
@@ -0,0 +1,14 @@
1
+ interface CommitDateRequest {
2
+ key: string;
3
+ startCommit?: string;
4
+ endCommit?: string;
5
+ gitRepoLink?: string;
6
+ }
7
+ interface ResolvedDates {
8
+ dateStarted?: string;
9
+ dateFinished?: string;
10
+ commitCount?: number;
11
+ }
12
+ export declare const getCommitDateRemote: import("@sveltejs/kit").RemoteQueryFunction<CommitDateRequest[], Record<string, ResolvedDates>>;
13
+ export {};
14
+ //# sourceMappingURL=getCommitDate.remote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCommitDate.remote.d.ts","sourceRoot":"","sources":["../../src/lib/util/getCommitDate.remote.ts"],"names":[],"mappings":"AAEA,UAAU,iBAAiB;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,aAAa;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AA0ID,eAAO,MAAM,mBAAmB,iGAAyC,CAAC"}
@@ -0,0 +1,133 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { query } from "$app/server";
11
+ // Module-level cache to avoid hitting GitHub's 60 req/hr unauthenticated rate limit.
12
+ // Specific commit SHAs are immutable, so cache for 24h. Dynamic queries (latest commit,
13
+ // commit count) can change, so cache for 1h.
14
+ const fetchCache = new Map();
15
+ const IMMUTABLE_TTL = 24 * 60 * 60 * 1000;
16
+ // nah we're making it 24 hours it's okay to be stale
17
+ const DYNAMIC_TTL = 24 * 60 * 60 * 1000;
18
+ function githubFetch(url, ttlMs) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ const cached = fetchCache.get(url);
21
+ if (cached && Date.now() < cached.expiresAt) {
22
+ return cached.data;
23
+ }
24
+ try {
25
+ const res = yield fetch(url, { headers: { Accept: "application/vnd.github.v3+json" } });
26
+ if (!res.ok)
27
+ return null;
28
+ const data = yield res.json();
29
+ fetchCache.set(url, { data, expiresAt: Date.now() + ttlMs });
30
+ return data;
31
+ }
32
+ catch (_a) {
33
+ return null;
34
+ }
35
+ });
36
+ }
37
+ function parseGithubCommitUrl(url) {
38
+ const match = url.match(/github\.com\/([^/]+)\/([^/]+)\/commit\/([a-f0-9]+)/i);
39
+ if (!match)
40
+ return null;
41
+ return { owner: match[1], repo: match[2], sha: match[3] };
42
+ }
43
+ function parseGithubRepoUrl(url) {
44
+ const match = url.match(/github\.com\/([^/]+)\/([^/]+)/i);
45
+ if (!match)
46
+ return null;
47
+ return { owner: match[1], repo: match[2].replace(/\.git$/, "") };
48
+ }
49
+ function fetchCommitDate(owner, repo, sha) {
50
+ return __awaiter(this, void 0, void 0, function* () {
51
+ var _a, _b, _c;
52
+ const data = yield githubFetch(`https://api.github.com/repos/${owner}/${repo}/commits/${sha}`, IMMUTABLE_TTL);
53
+ return (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.commit) === null || _a === void 0 ? void 0 : _a.committer) === null || _b === void 0 ? void 0 : _b.date) !== null && _c !== void 0 ? _c : null;
54
+ });
55
+ }
56
+ function fetchLatestCommitDate(owner, repo) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ var _a, _b, _c;
59
+ const data = yield githubFetch(`https://api.github.com/repos/${owner}/${repo}/commits?sha=main&per_page=1`, DYNAMIC_TTL);
60
+ if (!Array.isArray(data) || data.length === 0)
61
+ return null;
62
+ return (_c = (_b = (_a = data[0].commit) === null || _a === void 0 ? void 0 : _a.committer) === null || _b === void 0 ? void 0 : _b.date) !== null && _c !== void 0 ? _c : null;
63
+ });
64
+ }
65
+ function fetchCommitCount(owner, repo, baseSha, headSha) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ var _a;
68
+ const data = yield githubFetch(`https://api.github.com/repos/${owner}/${repo}/compare/${baseSha}...${headSha}`, DYNAMIC_TTL);
69
+ return (_a = data === null || data === void 0 ? void 0 : data.total_commits) !== null && _a !== void 0 ? _a : null;
70
+ });
71
+ }
72
+ function resolveCommitDates(refs) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ const result = {};
75
+ const promises = [];
76
+ for (const ref of refs) {
77
+ const dates = {};
78
+ result[ref.key] = dates;
79
+ if (ref.startCommit) {
80
+ const parsed = parseGithubCommitUrl(ref.startCommit);
81
+ if (parsed) {
82
+ promises.push(fetchCommitDate(parsed.owner, parsed.repo, parsed.sha).then((d) => {
83
+ if (d)
84
+ dates.dateStarted = d;
85
+ }));
86
+ }
87
+ }
88
+ if (ref.endCommit) {
89
+ const parsed = parseGithubCommitUrl(ref.endCommit);
90
+ if (parsed) {
91
+ promises.push(fetchCommitDate(parsed.owner, parsed.repo, parsed.sha).then((d) => {
92
+ if (d)
93
+ dates.dateFinished = d;
94
+ }));
95
+ }
96
+ }
97
+ else if (ref.gitRepoLink) {
98
+ const parsed = parseGithubRepoUrl(ref.gitRepoLink);
99
+ if (parsed) {
100
+ promises.push(fetchLatestCommitDate(parsed.owner, parsed.repo).then((d) => {
101
+ if (d)
102
+ dates.dateFinished = d;
103
+ }));
104
+ }
105
+ }
106
+ // Fetch commit count between start and end commits
107
+ if (ref.startCommit) {
108
+ const startParsed = parseGithubCommitUrl(ref.startCommit);
109
+ if (startParsed) {
110
+ if (ref.endCommit) {
111
+ const endParsed = parseGithubCommitUrl(ref.endCommit);
112
+ if (endParsed && endParsed.owner === startParsed.owner && endParsed.repo === startParsed.repo) {
113
+ promises.push(fetchCommitCount(startParsed.owner, startParsed.repo, startParsed.sha, endParsed.sha).then((c) => {
114
+ if (c != null)
115
+ dates.commitCount = c;
116
+ }));
117
+ }
118
+ }
119
+ else if (ref.gitRepoLink) {
120
+ // Compare start commit to HEAD of main
121
+ promises.push(fetchCommitCount(startParsed.owner, startParsed.repo, startParsed.sha, "main").then((c) => {
122
+ if (c != null)
123
+ dates.commitCount = c;
124
+ }));
125
+ }
126
+ }
127
+ }
128
+ }
129
+ yield Promise.all(promises);
130
+ return result;
131
+ });
132
+ }
133
+ export const getCommitDateRemote = query("unchecked", resolveCommitDates);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turnipxenon/pineapple",
3
3
  "description": "personal package for base styling for other personal projects",
4
- "version": "5.1.0",
4
+ "version": "5.2.0",
5
5
  "devDependencies": {
6
6
  "@commitlint/cli": "^19.8.1",
7
7
  "@commitlint/config-conventional": "^19.8.1",
@@ -67,6 +67,12 @@
67
67
  "import": "./dist/remoteIndex.remote.js",
68
68
  "default": "./dist/remoteIndex.remote.js"
69
69
  },
70
+ "./svelte": {
71
+ "types": "./dist/svelteIndex.svelte.d.ts",
72
+ "svelte": "./dist/svelteIndex.svelte.js",
73
+ "import": "./dist/svelteIndex.svelte.js",
74
+ "default": "./dist/svelteIndex.svelte.js"
75
+ },
70
76
  "./components": {
71
77
  "types": "./dist/ui/components/index.d.ts",
72
78
  "svelte": "./dist/ui/components/index.js",