@guinetik/primitives-ts 0.12.0 → 0.13.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.
@@ -5,6 +5,8 @@ export interface LaunchpadWidgetConfig {
5
5
  export interface ClockWidgetConfig {
6
6
  timeZone: string;
7
7
  preset: string;
8
+ /** Display the time on a 12-hour clock. Defaults to 24-hour when absent. */
9
+ hour12?: boolean;
8
10
  }
9
11
  export interface WebpageWidgetConfig {
10
12
  url: string;
@@ -25,6 +27,6 @@ export declare const HOME_WIDGET_TYPES: readonly HomeWidgetType[];
25
27
  export declare const MAX_HOME_WIDGETS = 30;
26
28
  export declare const CLOCK_DEFAULT_TIMEZONE = "America/Sao_Paulo";
27
29
  export declare const CLOCK_DEFAULT_PRESET = "aurora";
28
- export declare const CLOCK_PRESETS: readonly ["aurora", "grid"];
30
+ export declare const CLOCK_PRESETS: readonly ["aurora", "grid", "binary"];
29
31
  export declare function isHomeWidgetType(value: string): value is HomeWidgetType;
30
32
  //# sourceMappingURL=home-dashboard.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"home-dashboard.types.d.ts","sourceRoot":"","sources":["../src/home-dashboard.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,CAAC;AAE/D,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAE1C,MAAM,WAAW,qBAAqB;CAErC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,gBAAgB,GACxB,qBAAqB,GACrB,iBAAiB,GACjB,mBAAmB,CAAC;AAExB,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE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MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,CAAC,CAAC;IACX,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC;AAED,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAItD,CAAC;AAEF,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAE1D,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C,eAAO,MAAM,aAAa,uCAAwC,CAAC;AAEnE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,cAAc,CAEvE"}
@@ -10,7 +10,7 @@ exports.HOME_WIDGET_TYPES = [
10
10
  exports.MAX_HOME_WIDGETS = 30;
11
11
  exports.CLOCK_DEFAULT_TIMEZONE = 'America/Sao_Paulo';
12
12
  exports.CLOCK_DEFAULT_PRESET = 'aurora';
13
- exports.CLOCK_PRESETS = ['aurora', 'grid'];
13
+ exports.CLOCK_PRESETS = ['aurora', 'grid', 'binary'];
14
14
  function isHomeWidgetType(value) {
15
15
  return exports.HOME_WIDGET_TYPES.includes(value);
16
16
  }
@@ -17,3 +17,18 @@ describe('home dashboard types', () => {
17
17
  expect(home_dashboard_types_1.CLOCK_DEFAULT_PRESET).toBe('aurora');
18
18
  });
19
19
  });
20
+ describe('clock presets', () => {
21
+ it('includes the binary preset', () => {
22
+ expect(home_dashboard_types_1.CLOCK_PRESETS).toContain('binary');
23
+ });
24
+ it('keeps aurora as the default and a member of the list', () => {
25
+ expect(home_dashboard_types_1.CLOCK_DEFAULT_PRESET).toBe('aurora');
26
+ expect(home_dashboard_types_1.CLOCK_PRESETS).toContain(home_dashboard_types_1.CLOCK_DEFAULT_PRESET);
27
+ });
28
+ it('allows an optional hour12 flag on a clock config', () => {
29
+ const twentyFour = { timeZone: 'UTC', preset: 'grid' };
30
+ const twelve = { timeZone: 'UTC', preset: 'grid', hour12: true };
31
+ expect(twentyFour.hour12).toBeUndefined();
32
+ expect(twelve.hour12).toBe(true);
33
+ });
34
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guinetik/primitives-ts",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Shared TypeScript primitives for Guinetik projects",
5
5
  "author": "Guinetik",
6
6
  "license": "MIT",