@bravotango/circadian-current-conditions 0.1.6 → 0.1.7
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.
- package/dist/index.d.ts +1 -1
- package/dist/maps/current-conditions.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/time-of-day.d.ts +1 -1
- package/dist/utils/time-of-day.js +2 -2
- package/dist/utils/weather-color.d.ts +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/maps/current-conditions.ts +1 -1
- package/src/types/index.ts +1 -1
- package/src/utils/time-of-day.ts +1 -1
- package/src/utils/weather-color.ts +1 -1
- package/tests/maps/current-conditions.ts +4 -2
- package/tests/utils/weather-color.test.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { CircadianTokens } from "@bravotango/circadian-
|
|
1
|
+
import type { CircadianTokens } from "@bravotango/circadian-tokens";
|
|
2
2
|
export declare const applyCircadianSkin: (tokens: CircadianTokens) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CircadianTokens } from "@bravotango/circadian-
|
|
1
|
+
import { CircadianTokens } from "@bravotango/circadian-tokens";
|
|
2
2
|
export declare const currentConditions: (tokens: CircadianTokens) => Record<string, string>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export const TIME_OF_DAY_COLOR_MAP = {
|
|
2
|
-
day: { clear: "
|
|
2
|
+
day: { clear: "lightskyblue", default: "steelblue" },
|
|
3
3
|
night: { clear: "#0a2b4d", default: "#141414" },
|
|
4
4
|
sunrise: { clear: "#d64400", default: "#bb7758" },
|
|
5
|
-
sunset: { clear: "#6f00d6", default: "
|
|
5
|
+
sunset: { clear: "#6f00d6", default: "lightslategray" },
|
|
6
6
|
};
|
|
7
7
|
export const getTimeOfDayColor = (timeOfDay, condition) => {
|
|
8
8
|
const entry = TIME_OF_DAY_COLOR_MAP[timeOfDay];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Condition } from "@bravotango/circadian-
|
|
1
|
+
import { Condition } from "@bravotango/circadian-tokens";
|
|
2
2
|
export declare const getWeatherColor: (condition: Condition) => string;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// circadian-current-conditions/src/index.ts
|
|
2
|
-
import type { CircadianTokens } from "@bravotango/circadian-
|
|
2
|
+
import type { CircadianTokens } from "@bravotango/circadian-tokens";
|
|
3
3
|
import { currentConditionsSkin } from "./skin/";
|
|
4
4
|
export const applyCircadianSkin = (tokens: CircadianTokens) => {
|
|
5
5
|
currentConditionsSkin.apply(tokens);
|
package/src/types/index.ts
CHANGED
package/src/utils/time-of-day.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CircadianTokens } from "@bravotango/circadian-
|
|
1
|
+
import type { CircadianTokens } from "@bravotango/circadian-tokens";
|
|
2
2
|
import { currentConditions } from "../../src/maps/current-conditions";
|
|
3
3
|
|
|
4
4
|
const baseTokens: CircadianTokens = {
|
|
@@ -14,6 +14,8 @@ const baseTokens: CircadianTokens = {
|
|
|
14
14
|
timezone: {
|
|
15
15
|
offsetSeconds: -28800,
|
|
16
16
|
offsetHours: -8,
|
|
17
|
+
observedAtLocal: "2024-01-01T00:00:00Z",
|
|
18
|
+
utcSeconds: 1704067200,
|
|
17
19
|
},
|
|
18
20
|
},
|
|
19
21
|
current: {
|
|
@@ -58,7 +60,7 @@ describe("currentConditions", () => {
|
|
|
58
60
|
'url("/circadian-assets/weather/clear.png")',
|
|
59
61
|
);
|
|
60
62
|
expect(cssVars["--circadian-current-condition-time-of-day-color"]).toBe(
|
|
61
|
-
"
|
|
63
|
+
"lightskyblue",
|
|
62
64
|
);
|
|
63
65
|
});
|
|
64
66
|
|