@use-voltra/android 2.2.0 → 2.3.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 (73) hide show
  1. package/build/commonjs/index.js +6 -0
  2. package/build/commonjs/index.js.map +1 -1
  3. package/build/commonjs/jsx/ArcProgressIndicator.js +30 -0
  4. package/build/commonjs/jsx/ArcProgressIndicator.js.map +1 -0
  5. package/build/commonjs/jsx/Chart.js +11 -0
  6. package/build/commonjs/jsx/Chart.js.map +1 -1
  7. package/build/commonjs/jsx/primitives.js +11 -0
  8. package/build/commonjs/jsx/primitives.js.map +1 -1
  9. package/build/commonjs/jsx/props/AndroidArcProgressIndicator.js +6 -0
  10. package/build/commonjs/jsx/props/AndroidArcProgressIndicator.js.map +1 -0
  11. package/build/commonjs/payload/component-ids.js +4 -2
  12. package/build/commonjs/payload/component-ids.js.map +1 -1
  13. package/build/module/index.js +1 -1
  14. package/build/module/index.js.map +1 -1
  15. package/build/module/jsx/ArcProgressIndicator.js +26 -0
  16. package/build/module/jsx/ArcProgressIndicator.js.map +1 -0
  17. package/build/module/jsx/Chart.js +11 -0
  18. package/build/module/jsx/Chart.js.map +1 -1
  19. package/build/module/jsx/primitives.js +1 -0
  20. package/build/module/jsx/primitives.js.map +1 -1
  21. package/build/module/jsx/props/AndroidArcProgressIndicator.js +4 -0
  22. package/build/module/jsx/props/AndroidArcProgressIndicator.js.map +1 -0
  23. package/build/module/payload/component-ids.js +4 -2
  24. package/build/module/payload/component-ids.js.map +1 -1
  25. package/build/typescript/commonjs/index.d.ts +3 -3
  26. package/build/typescript/commonjs/index.d.ts.map +1 -1
  27. package/build/typescript/commonjs/jsx/ArcProgressIndicator.d.ts +7 -0
  28. package/build/typescript/commonjs/jsx/ArcProgressIndicator.d.ts.map +1 -0
  29. package/build/typescript/commonjs/jsx/Chart.d.ts +2 -0
  30. package/build/typescript/commonjs/jsx/Chart.d.ts.map +1 -1
  31. package/build/typescript/commonjs/jsx/chart-types.d.ts +4 -0
  32. package/build/typescript/commonjs/jsx/chart-types.d.ts.map +1 -1
  33. package/build/typescript/commonjs/jsx/primitives.d.ts +1 -0
  34. package/build/typescript/commonjs/jsx/primitives.d.ts.map +1 -1
  35. package/build/typescript/commonjs/jsx/props/AndroidArcProgressIndicator.d.ts +20 -0
  36. package/build/typescript/commonjs/jsx/props/AndroidArcProgressIndicator.d.ts.map +1 -0
  37. package/build/typescript/commonjs/jsx/props/AndroidChart.d.ts +2 -0
  38. package/build/typescript/commonjs/jsx/props/AndroidChart.d.ts.map +1 -1
  39. package/build/typescript/commonjs/payload/component-ids.d.ts.map +1 -1
  40. package/build/typescript/commonjs/types.d.ts +51 -0
  41. package/build/typescript/commonjs/types.d.ts.map +1 -1
  42. package/build/typescript/commonjs/widgets/types.d.ts +16 -2
  43. package/build/typescript/commonjs/widgets/types.d.ts.map +1 -1
  44. package/build/typescript/module/index.d.ts +3 -3
  45. package/build/typescript/module/index.d.ts.map +1 -1
  46. package/build/typescript/module/jsx/ArcProgressIndicator.d.ts +7 -0
  47. package/build/typescript/module/jsx/ArcProgressIndicator.d.ts.map +1 -0
  48. package/build/typescript/module/jsx/Chart.d.ts +2 -0
  49. package/build/typescript/module/jsx/Chart.d.ts.map +1 -1
  50. package/build/typescript/module/jsx/chart-types.d.ts +4 -0
  51. package/build/typescript/module/jsx/chart-types.d.ts.map +1 -1
  52. package/build/typescript/module/jsx/primitives.d.ts +1 -0
  53. package/build/typescript/module/jsx/primitives.d.ts.map +1 -1
  54. package/build/typescript/module/jsx/props/AndroidArcProgressIndicator.d.ts +20 -0
  55. package/build/typescript/module/jsx/props/AndroidArcProgressIndicator.d.ts.map +1 -0
  56. package/build/typescript/module/jsx/props/AndroidChart.d.ts +2 -0
  57. package/build/typescript/module/jsx/props/AndroidChart.d.ts.map +1 -1
  58. package/build/typescript/module/payload/component-ids.d.ts.map +1 -1
  59. package/build/typescript/module/types.d.ts +51 -0
  60. package/build/typescript/module/types.d.ts.map +1 -1
  61. package/build/typescript/module/widgets/types.d.ts +16 -2
  62. package/build/typescript/module/widgets/types.d.ts.map +1 -1
  63. package/package.json +2 -2
  64. package/src/index.ts +6 -2
  65. package/src/jsx/ArcProgressIndicator.tsx +25 -0
  66. package/src/jsx/Chart.tsx +14 -2
  67. package/src/jsx/chart-types.ts +1 -0
  68. package/src/jsx/primitives.ts +1 -0
  69. package/src/jsx/props/AndroidArcProgressIndicator.ts +24 -0
  70. package/src/jsx/props/AndroidChart.ts +2 -0
  71. package/src/payload/component-ids.ts +2 -0
  72. package/src/types.ts +59 -0
  73. package/src/widgets/types.ts +16 -2
@@ -24,8 +24,59 @@ export type PreloadImagesResult = {
24
24
  succeeded: string[];
25
25
  failed: PreloadImageFailure[];
26
26
  };
27
+ /**
28
+ * @deprecated Use `setWidgetServerUpdate` with an `Authorization` header instead. These are
29
+ * stored in the same place and keep the same replace-the-whole-set semantics.
30
+ */
27
31
  export type WidgetServerCredentials = {
28
32
  token: string;
29
33
  headers?: Record<string, string>;
30
34
  };
35
+ /**
36
+ * Runtime overrides for a widget's `serverUpdate` settings — the twin of the `serverUpdate` key
37
+ * in app.json, which supplies the defaults.
38
+ *
39
+ * Every field is optional and replaces the app.json value when set. `headers` and `query` merge
40
+ * per key across layers; everything else takes the value from the most specific layer that sets
41
+ * it. Passing settings without a `widgetId` sets them for every server-driven widget.
42
+ */
43
+ export type WidgetServerUpdateSettings = {
44
+ /** Endpoint to fetch from. Must be https, or http to a local dev host in a debug build. */
45
+ url?: string;
46
+ /** How often to fetch, in minutes. Clamped to at least 15 and at most 24 hours. */
47
+ intervalMinutes?: number;
48
+ /** Set false to stop fetching and drive the widget from the app instead. Defaults to true. */
49
+ enabled?: boolean;
50
+ /** HTTP method. Defaults to GET. A body is dropped on GET and HEAD, with a warning. */
51
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
52
+ /** Extra query parameters. Voltra's own keys are reserved and rejected. */
53
+ query?: Record<string, string>;
54
+ /** Extra request headers, for example `Authorization`. */
55
+ headers?: Record<string, string>;
56
+ /** Request body, sent as `application/json`. */
57
+ body?: WidgetServerUpdateBody;
58
+ };
59
+ /** A JSON value, as accepted for a server-update request body. */
60
+ export type WidgetServerUpdateBody = string | number | boolean | null | WidgetServerUpdateBody[] | {
61
+ [key: string]: WidgetServerUpdateBody;
62
+ };
63
+ /** Options selecting which widget a settings call applies to. */
64
+ export type WidgetServerUpdateOptions = {
65
+ /** Widget id to scope the settings to. Omit to set them for every server-driven widget. */
66
+ widgetId?: string;
67
+ };
68
+ /**
69
+ * Fully resolved settings for one widget: every layer flattened and app.json's defaults applied,
70
+ * exactly what it would fetch with right now.
71
+ */
72
+ export type WidgetServerUpdateSnapshot = {
73
+ /** Absent when the widget is server-driven but has no URL yet. */
74
+ url?: string;
75
+ intervalMinutes: number;
76
+ enabled: boolean;
77
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
78
+ query: Record<string, string>;
79
+ headers: Record<string, string>;
80
+ body?: WidgetServerUpdateBody;
81
+ };
31
82
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAE5G,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAED,KAAK,uBAAuB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,GAAG;IAC7D,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,CAAA;IAC/B,OAAO,CAAC,EAAE,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QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,kEAAkE;IAClE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,MAAM,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAA;IACnD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,IAAI,CAAC,EAAE,sBAAsB,CAAA;CAC9B,CAAA"}
@@ -18,9 +18,23 @@ export type AndroidWidgetSizeVariant = {
18
18
  * Information about an active widget instance on Android
19
19
  */
20
20
  export type WidgetInfo = {
21
- /** The name (ID) of the widget as defined in the config plugin */
21
+ /** The Voltra widget id, as defined in the config plugin (e.g. `"weather"`) */
22
+ widgetType: string;
23
+ /**
24
+ * The Android instance id of this placement. Every placed widget has its own, so the same
25
+ * widget placed twice appears twice with different `appWidgetId`s. Pass it to the per-instance
26
+ * configuration APIs to give one placement its own values.
27
+ */
28
+ appWidgetId: number;
29
+ /**
30
+ * @deprecated Renamed to `widgetType`, which says what this field holds. Same value.
31
+ */
22
32
  name: string;
23
- /** The unique ID for this widget instance (required for updates) */
33
+ /**
34
+ * @deprecated Renamed to `appWidgetId`, which says what this field holds — it is the Android
35
+ * instance id, not the Voltra widget id that `widgetId` names everywhere else in this package.
36
+ * Same value.
37
+ */
24
38
  widgetId: number;
25
39
  /** The class name of the provider (e.g., ".WeatherWidget") */
26
40
  providerClassName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/widgets/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC;;;GAGG;AACH,MAAM,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,CAAA;IACZ;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,8DAA8D;IAC9D,iBAAiB,EAAE,MAAM,CAAA;IACzB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAA;IACb,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,EAAE,CAAA;AAE9D;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA"}
@@ -11,7 +11,7 @@ export type { VoltraAndroidBaseProps } from './jsx/baseProps.js';
11
11
  export type { VoltraAndroidStyleProp, VoltraAndroidTextStyle, VoltraAndroidTextStyleProp, VoltraAndroidViewStyle, } from './styles/types.js';
12
12
  export type { AndroidColorValue, AndroidDynamicColorRole, AndroidDynamicColorToken } from './dynamic-colors.js';
13
13
  export type { AndroidLiveUpdateJson, AndroidLiveUpdateVariants, AndroidLiveUpdateVariantsJson, StartAndroidLiveUpdateOptions, UpdateAndroidLiveUpdateOptions, UseAndroidLiveUpdateOptions, UseAndroidLiveUpdateResult, } from './live-update/types.js';
14
- export type { EventSubscription, PreloadImageFailure, PreloadImageOptions, PreloadImageSvgOptions, PreloadImageUrlOptions, PreloadImagesResult, VoltraElementJson, VoltraElementRef, VoltraNodeJson, VoltraPropValue, WidgetServerCredentials, } from './types.js';
14
+ export type { EventSubscription, PreloadImageFailure, PreloadImageOptions, PreloadImageSvgOptions, PreloadImageUrlOptions, PreloadImagesResult, VoltraElementJson, VoltraElementRef, VoltraNodeJson, VoltraPropValue, WidgetServerCredentials, WidgetServerUpdateBody, WidgetServerUpdateOptions, WidgetServerUpdateSettings, WidgetServerUpdateSnapshot, } from './types.js';
15
15
  export type { AndroidWidgetSize, AndroidWidgetSizeVariant, AndroidWidgetVariants, UpdateAndroidWidgetOptions, WidgetInfo, } from './widgets/types.js';
16
16
  export type { AndroidOngoingNotificationActionPayload, AndroidOngoingNotificationActionProps, AndroidOngoingNotificationBigTextPayload, AndroidOngoingNotificationBigTextProps, AndroidOngoingNotificationCapabilities, AndroidOngoingNotificationCommonDisplayProps, AndroidOngoingNotificationContent, AndroidOngoingNotificationFallbackBehavior, AndroidOngoingNotificationInput, AndroidOngoingNotificationPayload, AndroidOngoingNotificationProgressPayload, AndroidOngoingNotificationProgressPoint, AndroidOngoingNotificationProgressProps, AndroidOngoingNotificationProgressSegment, AndroidOngoingNotificationStartResult, AndroidOngoingNotificationStatus, AndroidOngoingNotificationStopResult, AndroidOngoingNotificationUpdateResult, AndroidOngoingNotificationUpsertResult, StartAndroidOngoingNotificationOptions, UpdateAndroidOngoingNotificationOptions, UseAndroidOngoingNotificationOptions, UseAndroidOngoingNotificationResult, } from './ongoing-notification/types.js';
17
17
  export type { BoxProps } from './jsx/Box.js';
@@ -25,6 +25,6 @@ export type { LinearProgressIndicatorProps } from './jsx/LinearProgressIndicator
25
25
  export type { RowProps } from './jsx/Row.js';
26
26
  export type { SpacerProps } from './jsx/Spacer.js';
27
27
  export type { TextProps } from './jsx/Text.js';
28
- export { isAndroidEnv, isIosEnv } from '@use-voltra/core';
29
- export type { WidgetBuildEnvironment, WidgetEnvironment } from '@use-voltra/core';
28
+ export { getFastRefreshHub, isAndroidEnv, isIosEnv } from '@use-voltra/core';
29
+ export type { FastRefreshHub, WidgetBuildEnvironment, WidgetEnvironment } from '@use-voltra/core';
30
30
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAA;AAEpD,OAAO,EAAE,aAAa,EAAE,CAAA;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,EACL,qBAAqB,EACrB,uB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C,EACrC,gCAAgC,EAChC,oCAAoC,EACpC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,uCAAuC,EACvC,oCAAoC,EACpC,mCAAmC,GACpC,MAAM,iCAAiC,CAAA;AAGxC,YAAY,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,YAAY,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAA;AACxF,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,YAAY,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACtE,YAAY,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAA;AACpF,YAAY,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC5E,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { AndroidArcProgressIndicatorProps as GeneratedArcProgressIndicatorProps } from './props/AndroidArcProgressIndicator.js';
2
+ export type ArcProgressIndicatorProps = Omit<GeneratedArcProgressIndicatorProps, 'gradientColors'> & {
3
+ /** Sweep gradient colors along the filled arc, from `startAngle`. Overrides `color`. */
4
+ gradientColors?: string[];
5
+ };
6
+ export declare const ArcProgressIndicator: import("./createVoltraComponent.js").VoltraComponent<ArcProgressIndicatorProps>;
7
+ //# sourceMappingURL=ArcProgressIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArcProgressIndicator.d.ts","sourceRoot":"","sources":["../../../../src/jsx/ArcProgressIndicator.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,IAAI,kCAAkC,EAAE,MAAM,wCAAwC,CAAA;AAEpI,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,kCAAkC,EAAE,gBAAgB,CAAC,GAAG;IACnG,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,oBAAoB,iFAgB/B,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import type { VoltraAndroidBaseProps } from './baseProps.js';
2
+ import type { YScale } from './chart-types.js';
2
3
  export type AndroidChartProps = VoltraAndroidBaseProps & {
3
4
  xAxisVisibility?: 'automatic' | 'visible' | 'hidden';
4
5
  yAxisVisibility?: 'automatic' | 'visible' | 'hidden';
@@ -11,6 +12,7 @@ export type AndroidChartProps = VoltraAndroidBaseProps & {
11
12
  legendVisibility?: 'automatic' | 'visible' | 'hidden';
12
13
  foregroundStyleScale?: Record<string, string>;
13
14
  chartScrollableAxes?: 'horizontal' | 'vertical';
15
+ yScale?: YScale;
14
16
  };
15
17
  export declare const Chart: import("./createVoltraComponent.js").VoltraComponent<AndroidChartProps>;
16
18
  //# sourceMappingURL=Chart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../../src/jsx/Chart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAa5D,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,GAAG;IACvD,eAAe,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IACpD,eAAe,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IACpD,cAAc,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;IACtC,cAAc,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;IACtC,gBAAgB,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IACrD,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7C,mBAAmB,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;CAChD,CAAA;AA4ED,eAAO,MAAM,KAAK,yEAuBhB,CAAA"}
1
+ {"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../../src/jsx/Chart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAI5D,OAAO,KAAK,EAAmC,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAS/E,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,GAAG;IACvD,eAAe,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IACpD,eAAe,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IACpD,cAAc,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;IACtC,cAAc,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;IACtC,gBAAgB,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IACrD,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7C,mBAAmB,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAmFD,eAAO,MAAM,KAAK,yEA2BhB,CAAA"}
@@ -7,4 +7,8 @@ export type SectorDataPoint = {
7
7
  value: number;
8
8
  category: string;
9
9
  };
10
+ export type YScale = {
11
+ min?: number;
12
+ max?: number;
13
+ };
10
14
  //# sourceMappingURL=chart-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chart-types.d.ts","sourceRoot":"","sources":["../../../../src/jsx/chart-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAC/E,MAAM,MAAM,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAA"}
1
+ {"version":3,"file":"chart-types.d.ts","sourceRoot":"","sources":["../../../../src/jsx/chart-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAC/E,MAAM,MAAM,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAA;AACjE,MAAM,MAAM,MAAM,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA"}
@@ -1,3 +1,4 @@
1
+ export * from './ArcProgressIndicator.js';
1
2
  export * from './AreaMark.js';
2
3
  export * from './BarMark.js';
3
4
  export * from './Box.js';
@@ -1 +1 @@
1
- {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../src/jsx/primitives.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,g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AA;AAC3B,cAAc,uBAAuB,CAAA;AACrC,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA"}
@@ -0,0 +1,20 @@
1
+ import type { VoltraBaseProps } from '../baseProps';
2
+ export type AndroidArcProgressIndicatorProps = VoltraBaseProps & {
3
+ /** Fill fraction from 0 to 1, clamped */
4
+ progress?: number;
5
+ /** Stroke color of the filled arc */
6
+ color?: string;
7
+ /** Stroke color of the unfilled arc; transparent hides the track */
8
+ trackColor?: string;
9
+ /** Stroke width in dp of both arcs */
10
+ strokeWidth?: number;
11
+ /** Angle in degrees where the arc begins; 0 is 3 o'clock, positive is clockwise */
12
+ startAngle?: number;
13
+ /** Total angular length of the track in degrees; 360 makes a closed ring */
14
+ sweepAngle?: number;
15
+ /** End shape of both arcs */
16
+ lineCap?: 'round' | 'butt';
17
+ /** Sweep gradient colors along the filled arc, from startAngle; overrides color */
18
+ gradientColors?: string;
19
+ };
20
+ //# sourceMappingURL=AndroidArcProgressIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AndroidArcProgressIndicator.d.ts","sourceRoot":"","sources":["../../../../../src/jsx/props/AndroidArcProgressIndicator.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEnD,MAAM,MAAM,gCAAgC,GAAG,eAAe,GAAG;IAC/D,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mFAAmF;IACnF,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B,mFAAmF;IACnF,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA"}
@@ -6,6 +6,8 @@ export type AndroidChartProps = VoltraBaseProps & {
6
6
  xAxisVisibility?: 'automatic' | 'visible' | 'hidden';
7
7
  /** Show or hide the y-axis */
8
8
  yAxisVisibility?: 'automatic' | 'visible' | 'hidden';
9
+ /** Pin the y-axis lower and/or upper bound */
10
+ yScale?: Record<string, any>;
9
11
  /** Show or hide the chart legend */
10
12
  legendVisibility?: 'automatic' | 'visible' | 'hidden';
11
13
  /** Map of series name to color string */
@@ -1 +1 @@
1
- {"version":3,"file":"AndroidChart.d.ts","sourceRoot":"","sources":["../../../../../src/jsx/props/AndroidChart.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEnD,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG;IAChD,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8BAA8B;IAC9B,eAAe,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IACpD,8BAA8B;IAC9B,eAAe,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IACpD,oCAAoC;IACpC,gBAAgB,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IACrD,yCAAyC;IACzC,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1C,yCAAyC;IACzC,mBAAmB,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;CAChD,CAAA"}
1
+ {"version":3,"file":"AndroidChart.d.ts","sourceRoot":"","sources":["../../../../../src/jsx/props/AndroidChart.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEnD,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG;IAChD,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8BAA8B;IAC9B,eAAe,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IACpD,8BAA8B;IAC9B,eAAe,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IACpD,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,oCAAoC;IACpC,gBAAgB,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IACrD,yCAAyC;IACzC,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1C,yCAAyC;IACzC,mBAAmB,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;CAChD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"component-ids.d.ts","sourceRoot":"","sources":["../../../../src/payload/component-ids.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsB/D,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsB/D,CAAA;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAU1D;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAQ1D"}
1
+ {"version":3,"file":"component-ids.d.ts","sourceRoot":"","sources":["../../../../src/payload/component-ids.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAuB/D,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAuB/D,CAAA;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAU1D;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAQ1D"}
@@ -24,8 +24,59 @@ export type PreloadImagesResult = {
24
24
  succeeded: string[];
25
25
  failed: PreloadImageFailure[];
26
26
  };
27
+ /**
28
+ * @deprecated Use `setWidgetServerUpdate` with an `Authorization` header instead. These are
29
+ * stored in the same place and keep the same replace-the-whole-set semantics.
30
+ */
27
31
  export type WidgetServerCredentials = {
28
32
  token: string;
29
33
  headers?: Record<string, string>;
30
34
  };
35
+ /**
36
+ * Runtime overrides for a widget's `serverUpdate` settings — the twin of the `serverUpdate` key
37
+ * in app.json, which supplies the defaults.
38
+ *
39
+ * Every field is optional and replaces the app.json value when set. `headers` and `query` merge
40
+ * per key across layers; everything else takes the value from the most specific layer that sets
41
+ * it. Passing settings without a `widgetId` sets them for every server-driven widget.
42
+ */
43
+ export type WidgetServerUpdateSettings = {
44
+ /** Endpoint to fetch from. Must be https, or http to a local dev host in a debug build. */
45
+ url?: string;
46
+ /** How often to fetch, in minutes. Clamped to at least 15 and at most 24 hours. */
47
+ intervalMinutes?: number;
48
+ /** Set false to stop fetching and drive the widget from the app instead. Defaults to true. */
49
+ enabled?: boolean;
50
+ /** HTTP method. Defaults to GET. A body is dropped on GET and HEAD, with a warning. */
51
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
52
+ /** Extra query parameters. Voltra's own keys are reserved and rejected. */
53
+ query?: Record<string, string>;
54
+ /** Extra request headers, for example `Authorization`. */
55
+ headers?: Record<string, string>;
56
+ /** Request body, sent as `application/json`. */
57
+ body?: WidgetServerUpdateBody;
58
+ };
59
+ /** A JSON value, as accepted for a server-update request body. */
60
+ export type WidgetServerUpdateBody = string | number | boolean | null | WidgetServerUpdateBody[] | {
61
+ [key: string]: WidgetServerUpdateBody;
62
+ };
63
+ /** Options selecting which widget a settings call applies to. */
64
+ export type WidgetServerUpdateOptions = {
65
+ /** Widget id to scope the settings to. Omit to set them for every server-driven widget. */
66
+ widgetId?: string;
67
+ };
68
+ /**
69
+ * Fully resolved settings for one widget: every layer flattened and app.json's defaults applied,
70
+ * exactly what it would fetch with right now.
71
+ */
72
+ export type WidgetServerUpdateSnapshot = {
73
+ /** Absent when the widget is server-driven but has no URL yet. */
74
+ url?: string;
75
+ intervalMinutes: number;
76
+ enabled: boolean;
77
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
78
+ query: Record<string, string>;
79
+ headers: Record<string, string>;
80
+ body?: WidgetServerUpdateBody;
81
+ };
31
82
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAE5G,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAED,KAAK,uBAAuB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,GAAG;IAC7D,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,CAAA;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,GAAG;IAC7D,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,GAAG,sBAAsB,CAAA;AAEjF,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,KAA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A;IACnD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,IAAI,CAAC,EAAE,sBAAsB,CAAA;CAC9B,CAAA"}
@@ -18,9 +18,23 @@ export type AndroidWidgetSizeVariant = {
18
18
  * Information about an active widget instance on Android
19
19
  */
20
20
  export type WidgetInfo = {
21
- /** The name (ID) of the widget as defined in the config plugin */
21
+ /** The Voltra widget id, as defined in the config plugin (e.g. `"weather"`) */
22
+ widgetType: string;
23
+ /**
24
+ * The Android instance id of this placement. Every placed widget has its own, so the same
25
+ * widget placed twice appears twice with different `appWidgetId`s. Pass it to the per-instance
26
+ * configuration APIs to give one placement its own values.
27
+ */
28
+ appWidgetId: number;
29
+ /**
30
+ * @deprecated Renamed to `widgetType`, which says what this field holds. Same value.
31
+ */
22
32
  name: string;
23
- /** The unique ID for this widget instance (required for updates) */
33
+ /**
34
+ * @deprecated Renamed to `appWidgetId`, which says what this field holds — it is the Android
35
+ * instance id, not the Voltra widget id that `widgetId` names everywhere else in this package.
36
+ * Same value.
37
+ */
24
38
  widgetId: number;
25
39
  /** The class name of the provider (e.g., ".WeatherWidget") */
26
40
  providerClassName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/widgets/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,iBAAiB,CAAA;IACvB,OAAO,EAAE,SAAS,CAAA;CACnB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,kEAAkE;IAClE,IAAI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B,GAAG,wBAAwB,EAAE,CAAA;AAE9D;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@use-voltra/android",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Voltra for Android",
5
5
  "main": "build/commonjs/index.js",
6
6
  "module": "build/module/index.js",
@@ -50,7 +50,7 @@
50
50
  "README.md"
51
51
  ],
52
52
  "dependencies": {
53
- "@use-voltra/core": "^2.2.0"
53
+ "@use-voltra/core": "^2.3.0"
54
54
  },
55
55
  "keywords": [
56
56
  "react-native",
package/src/index.ts CHANGED
@@ -48,6 +48,10 @@ export type {
48
48
  VoltraNodeJson,
49
49
  VoltraPropValue,
50
50
  WidgetServerCredentials,
51
+ WidgetServerUpdateBody,
52
+ WidgetServerUpdateOptions,
53
+ WidgetServerUpdateSettings,
54
+ WidgetServerUpdateSnapshot,
51
55
  } from './types.js'
52
56
  export type {
53
57
  AndroidWidgetSize,
@@ -95,5 +99,5 @@ export type { LinearProgressIndicatorProps } from './jsx/LinearProgressIndicator
95
99
  export type { RowProps } from './jsx/Row.js'
96
100
  export type { SpacerProps } from './jsx/Spacer.js'
97
101
  export type { TextProps } from './jsx/Text.js'
98
- export { isAndroidEnv, isIosEnv } from '@use-voltra/core'
99
- export type { WidgetBuildEnvironment, WidgetEnvironment } from '@use-voltra/core'
102
+ export { getFastRefreshHub, isAndroidEnv, isIosEnv } from '@use-voltra/core'
103
+ export type { FastRefreshHub, WidgetBuildEnvironment, WidgetEnvironment } from '@use-voltra/core'
@@ -0,0 +1,25 @@
1
+ import { createVoltraComponent } from './createVoltraComponent.js'
2
+ import type { AndroidArcProgressIndicatorProps as GeneratedArcProgressIndicatorProps } from './props/AndroidArcProgressIndicator.js'
3
+
4
+ export type ArcProgressIndicatorProps = Omit<GeneratedArcProgressIndicatorProps, 'gradientColors'> & {
5
+ /** Sweep gradient colors along the filled arc, from `startAngle`. Overrides `color`. */
6
+ gradientColors?: string[]
7
+ }
8
+
9
+ export const ArcProgressIndicator = createVoltraComponent<ArcProgressIndicatorProps>('AndroidArcProgressIndicator', {
10
+ toJSON: ({ gradientColors, ...rest }) => {
11
+ const result: Record<string, unknown> = { ...rest }
12
+ if (gradientColors != null) {
13
+ result.gradientColors = JSON.stringify(gradientColors)
14
+ }
15
+ return result
16
+ },
17
+ validate: ({ children }) => {
18
+ // The arc itself occupies one of the ten child slots a Glance Box allows.
19
+ if (children.length > 9) {
20
+ console.warn(
21
+ `ArcProgressIndicator supports at most 9 direct children in Jetpack Glance, got ${children.length}. The arc itself takes the tenth slot, so extra children will be truncated.`
22
+ )
23
+ }
24
+ },
25
+ })
package/src/jsx/Chart.tsx CHANGED
@@ -4,7 +4,7 @@ import type { VoltraAndroidBaseProps } from './baseProps.js'
4
4
  import type { AreaMarkProps } from './AreaMark.js'
5
5
  import type { BarMarkProps } from './BarMark.js'
6
6
  import { VOLTRA_MARK_TAG } from './BarMark.js'
7
- import type { ChartDataPoint, SectorDataPoint } from './chart-types.js'
7
+ import type { ChartDataPoint, SectorDataPoint, YScale } from './chart-types.js'
8
8
  import { createVoltraComponent } from './createVoltraComponent.js'
9
9
  import type { LineMarkProps } from './LineMark.js'
10
10
  import type { PointMarkProps } from './PointMark.js'
@@ -21,6 +21,7 @@ export type AndroidChartProps = VoltraAndroidBaseProps & {
21
21
  legendVisibility?: 'automatic' | 'visible' | 'hidden'
22
22
  foregroundStyleScale?: Record<string, string>
23
23
  chartScrollableAxes?: 'horizontal' | 'vertical'
24
+ yScale?: YScale
24
25
  }
25
26
 
26
27
  // ---- wire encoding helpers (same as iOS Chart) ----
@@ -34,6 +35,13 @@ const encodeDataPoints = (data: ChartDataPoint[]): CompactDataPoint[] =>
34
35
 
35
36
  const encodeSectorPoints = (data: SectorDataPoint[]): CompactSectorPoint[] => data.map((pt) => [pt.value, pt.category])
36
37
 
38
+ const encodeYScale = (scale: YScale): Record<string, unknown> => {
39
+ const encoded: Record<string, unknown> = {}
40
+ if (scale.min != null) encoded.mn = scale.min
41
+ if (scale.max != null) encoded.mx = scale.max
42
+ return encoded
43
+ }
44
+
37
45
  const encodeBarMark = (props: BarMarkProps): MarkWire => {
38
46
  const p: Record<string, unknown> = {}
39
47
  if (props.color != null) p.c = props.color
@@ -98,7 +106,7 @@ const ENCODERS: Record<string, (props: any) => MarkWire> = {
98
106
  // ---- component ----
99
107
 
100
108
  export const Chart = createVoltraComponent<AndroidChartProps>('AndroidChart', {
101
- toJSON: ({ children, foregroundStyleScale, xAxisGridStyle, yAxisGridStyle, ...rest }) => {
109
+ toJSON: ({ children, foregroundStyleScale, xAxisGridStyle, yAxisGridStyle, yScale, ...rest }) => {
102
110
  const marks: MarkWire[] = []
103
111
 
104
112
  React.Children.forEach(children, (child) => {
@@ -117,6 +125,10 @@ export const Chart = createVoltraComponent<AndroidChartProps>('AndroidChart', {
117
125
  }
118
126
  if (xAxisGridStyle?.visible === false) result.xAxisGridVisible = false
119
127
  if (yAxisGridStyle?.visible === false) result.yAxisGridVisible = false
128
+ if (yScale != null) {
129
+ const encoded = encodeYScale(yScale)
130
+ if (Object.keys(encoded).length > 0) result.yScale = JSON.stringify(encoded)
131
+ }
120
132
 
121
133
  return result
122
134
  },
@@ -1,2 +1,3 @@
1
1
  export type ChartDataPoint = { x: string | number; y: number; series?: string }
2
2
  export type SectorDataPoint = { value: number; category: string }
3
+ export type YScale = { min?: number; max?: number }
@@ -1,3 +1,4 @@
1
+ export * from './ArcProgressIndicator.js'
1
2
  export * from './AreaMark.js'
2
3
  export * from './BarMark.js'
3
4
  export * from './Box.js'
@@ -0,0 +1,24 @@
1
+ // 🤖 AUTO-GENERATED from data/components.json
2
+ // DO NOT EDIT MANUALLY - Changes will be overwritten
3
+ // Schema version: 1.0.0
4
+
5
+ import type { VoltraBaseProps } from '../baseProps'
6
+
7
+ export type AndroidArcProgressIndicatorProps = VoltraBaseProps & {
8
+ /** Fill fraction from 0 to 1, clamped */
9
+ progress?: number
10
+ /** Stroke color of the filled arc */
11
+ color?: string
12
+ /** Stroke color of the unfilled arc; transparent hides the track */
13
+ trackColor?: string
14
+ /** Stroke width in dp of both arcs */
15
+ strokeWidth?: number
16
+ /** Angle in degrees where the arc begins; 0 is 3 o'clock, positive is clockwise */
17
+ startAngle?: number
18
+ /** Total angular length of the track in degrees; 360 makes a closed ring */
19
+ sweepAngle?: number
20
+ /** End shape of both arcs */
21
+ lineCap?: 'round' | 'butt'
22
+ /** Sweep gradient colors along the filled arc, from startAngle; overrides color */
23
+ gradientColors?: string
24
+ }
@@ -11,6 +11,8 @@ export type AndroidChartProps = VoltraBaseProps & {
11
11
  xAxisVisibility?: 'automatic' | 'visible' | 'hidden'
12
12
  /** Show or hide the y-axis */
13
13
  yAxisVisibility?: 'automatic' | 'visible' | 'hidden'
14
+ /** Pin the y-axis lower and/or upper bound */
15
+ yScale?: Record<string, any>
14
16
  /** Show or hide the chart legend */
15
17
  legendVisibility?: 'automatic' | 'visible' | 'hidden'
16
18
  /** Map of series name to color string */
@@ -29,6 +29,7 @@ export const ANDROID_COMPONENT_NAME_TO_ID: Record<string, number> = {
29
29
  AndroidText: 18,
30
30
  AndroidTitleBar: 19,
31
31
  AndroidChart: 20,
32
+ AndroidArcProgressIndicator: 21,
32
33
  }
33
34
 
34
35
  /**
@@ -56,6 +57,7 @@ export const ANDROID_COMPONENT_ID_TO_NAME: Record<number, string> = {
56
57
  18: 'AndroidText',
57
58
  19: 'AndroidTitleBar',
58
59
  20: 'AndroidChart',
60
+ 21: 'AndroidArcProgressIndicator',
59
61
  }
60
62
 
61
63
  /**
package/src/types.ts CHANGED
@@ -32,7 +32,66 @@ export type PreloadImagesResult = {
32
32
  failed: PreloadImageFailure[]
33
33
  }
34
34
 
35
+ /**
36
+ * @deprecated Use `setWidgetServerUpdate` with an `Authorization` header instead. These are
37
+ * stored in the same place and keep the same replace-the-whole-set semantics.
38
+ */
35
39
  export type WidgetServerCredentials = {
36
40
  token: string
37
41
  headers?: Record<string, string>
38
42
  }
43
+
44
+ /**
45
+ * Runtime overrides for a widget's `serverUpdate` settings — the twin of the `serverUpdate` key
46
+ * in app.json, which supplies the defaults.
47
+ *
48
+ * Every field is optional and replaces the app.json value when set. `headers` and `query` merge
49
+ * per key across layers; everything else takes the value from the most specific layer that sets
50
+ * it. Passing settings without a `widgetId` sets them for every server-driven widget.
51
+ */
52
+ export type WidgetServerUpdateSettings = {
53
+ /** Endpoint to fetch from. Must be https, or http to a local dev host in a debug build. */
54
+ url?: string
55
+ /** How often to fetch, in minutes. Clamped to at least 15 and at most 24 hours. */
56
+ intervalMinutes?: number
57
+ /** Set false to stop fetching and drive the widget from the app instead. Defaults to true. */
58
+ enabled?: boolean
59
+ /** HTTP method. Defaults to GET. A body is dropped on GET and HEAD, with a warning. */
60
+ method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
61
+ /** Extra query parameters. Voltra's own keys are reserved and rejected. */
62
+ query?: Record<string, string>
63
+ /** Extra request headers, for example `Authorization`. */
64
+ headers?: Record<string, string>
65
+ /** Request body, sent as `application/json`. */
66
+ body?: WidgetServerUpdateBody
67
+ }
68
+
69
+ /** A JSON value, as accepted for a server-update request body. */
70
+ export type WidgetServerUpdateBody =
71
+ | string
72
+ | number
73
+ | boolean
74
+ | null
75
+ | WidgetServerUpdateBody[]
76
+ | { [key: string]: WidgetServerUpdateBody }
77
+
78
+ /** Options selecting which widget a settings call applies to. */
79
+ export type WidgetServerUpdateOptions = {
80
+ /** Widget id to scope the settings to. Omit to set them for every server-driven widget. */
81
+ widgetId?: string
82
+ }
83
+
84
+ /**
85
+ * Fully resolved settings for one widget: every layer flattened and app.json's defaults applied,
86
+ * exactly what it would fetch with right now.
87
+ */
88
+ export type WidgetServerUpdateSnapshot = {
89
+ /** Absent when the widget is server-driven but has no URL yet. */
90
+ url?: string
91
+ intervalMinutes: number
92
+ enabled: boolean
93
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
94
+ query: Record<string, string>
95
+ headers: Record<string, string>
96
+ body?: WidgetServerUpdateBody
97
+ }
@@ -21,9 +21,23 @@ export type AndroidWidgetSizeVariant = {
21
21
  * Information about an active widget instance on Android
22
22
  */
23
23
  export type WidgetInfo = {
24
- /** The name (ID) of the widget as defined in the config plugin */
24
+ /** The Voltra widget id, as defined in the config plugin (e.g. `"weather"`) */
25
+ widgetType: string
26
+ /**
27
+ * The Android instance id of this placement. Every placed widget has its own, so the same
28
+ * widget placed twice appears twice with different `appWidgetId`s. Pass it to the per-instance
29
+ * configuration APIs to give one placement its own values.
30
+ */
31
+ appWidgetId: number
32
+ /**
33
+ * @deprecated Renamed to `widgetType`, which says what this field holds. Same value.
34
+ */
25
35
  name: string
26
- /** The unique ID for this widget instance (required for updates) */
36
+ /**
37
+ * @deprecated Renamed to `appWidgetId`, which says what this field holds — it is the Android
38
+ * instance id, not the Voltra widget id that `widgetId` names everywhere else in this package.
39
+ * Same value.
40
+ */
27
41
  widgetId: number
28
42
  /** The class name of the provider (e.g., ".WeatherWidget") */
29
43
  providerClassName: string