@vicinae/api 0.16.2 → 0.16.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vicinae/api",
3
- "version": "0.16.2",
3
+ "version": "0.16.3",
4
4
  "description": "TypeScript SDK to build Vicinae extensions",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
package/types/jsx.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import * as React from "react";
2
-
3
- import type { ListItemDetailProps } from "../api/components/list";
4
- import { ImageLike } from "../api/image";
5
- import { SerializedColorLike } from "../api/color";
6
- import { Keyboard } from "../api/keyboard";
7
- import { Grid } from "../api/components/grid";
8
-
9
- import "react";
10
- import type { Application, DatePickerType, Quicklink } from "../src";
1
+ import type * as React from "react";
2
+ import type {
3
+ DatePickerType,
4
+ Grid,
5
+ Keyboard,
6
+ List,
7
+ Quicklink,
8
+ SerializedColorLike,
9
+ SerializedImageLike,
10
+ } from "../src";
11
11
 
12
12
  type BaseFormField = {
13
13
  onBlur?: Function;
@@ -19,7 +19,7 @@ declare module "react" {
19
19
  namespace JSX {
20
20
  interface IntrinsicElements {
21
21
  view: {
22
- children: ReactNode;
22
+ children: React.ReactNode;
23
23
  };
24
24
  detail: {
25
25
  navigationTitle?: string;
@@ -44,18 +44,24 @@ declare module "react" {
44
44
  title: string;
45
45
  id?: string;
46
46
  subtitle?: string;
47
- icon?: ImageLike;
47
+ icon?:
48
+ | SerializedImageLike
49
+ | {
50
+ value?: SerializedImageLike | null;
51
+ tooltip: string;
52
+ };
48
53
  keywords?: string[];
49
- children?: ReactNode;
54
+ accessories?: List.Item.SerializedAccessory[];
55
+ children?: React.ReactNode;
50
56
  };
51
- "list-item-detail": ListItemDetailProps;
57
+ "list-item-detail": List.Item.Detail.Props;
52
58
  "list-item-detail-metadata": any;
53
59
 
54
60
  grid: {
55
61
  inset?: Grid.Inset;
56
62
  columns?: number;
57
63
  fit: Grid.Fit;
58
- aspectRatio: Grid.AspectRatio;
64
+ aspectRatio: number;
59
65
 
60
66
  children?: React.ReactNode;
61
67
  filtering?: boolean;
@@ -70,7 +76,7 @@ declare module "react" {
70
76
  inset?: Grid.Inset;
71
77
  columns?: number;
72
78
  fit?: Grid.Fit;
73
- aspectRatio?: Grid.AspectRatio;
79
+ aspectRatio?: number;
74
80
 
75
81
  title?: string;
76
82
  subtitle?: string;
@@ -80,18 +86,21 @@ declare module "react" {
80
86
  title?: string;
81
87
  id?: string;
82
88
  subtitle?: string;
83
- content?:
84
- | ImageLike
85
- | { color: ColorLike }
86
- | { value: ImageLike; tooltip?: string };
89
+ content?: SerializedImageLike | { color: SerializedColorLike };
90
+ tooltip?: string;
87
91
  keywords?: string[];
88
- children?: ReactNode;
92
+ accessory?: {
93
+ icon?: SerializedImageLike;
94
+ tooltip?: string | null;
95
+ };
96
+ children?: React.ReactNode;
89
97
  };
90
98
 
91
99
  "empty-view": {
92
100
  description?: string;
93
101
  title?: string;
94
- icon?: ImageLike;
102
+ icon?: SerializedImageLike;
103
+ children?: React.ReactNode;
95
104
  };
96
105
  metadata: {
97
106
  children?: React.ReactNode;
@@ -99,7 +108,7 @@ declare module "react" {
99
108
  "metadata-label": {
100
109
  title: string;
101
110
  text: string;
102
- icon?: ImageLike;
111
+ icon?: SerializedImageLike;
103
112
  };
104
113
  "metadata-separator": {};
105
114
  "metadata-link": {
@@ -113,7 +122,7 @@ declare module "react" {
113
122
  };
114
123
  "action-panel-submenu": {
115
124
  title: string;
116
- icon?: ImageLike;
125
+ icon?: SerializedImageLike;
117
126
  onOpen?: () => void;
118
127
  onSearchTextChange?: (text: string) => void;
119
128
  children?: React.ReactNode;
@@ -126,8 +135,8 @@ declare module "react" {
126
135
  title: string;
127
136
  onAction: () => void;
128
137
  onSubmit?: Function;
129
- shortcut?: Keyboard.Shortcut;
130
- icon?: ImageLike;
138
+ shortcut?: Keyboard.Shortcut | Keyboard.Shortcut.Common;
139
+ icon?: SerializedImageLike;
131
140
  autoFocus?: boolean;
132
141
  type?: string;
133
142
  quicklink?: Quicklink;
@@ -138,7 +147,7 @@ declare module "react" {
138
147
  };
139
148
  "tag-item": {
140
149
  color?: SerializedColorLike;
141
- icon?: ImageLike;
150
+ icon?: SerializedImageLike;
142
151
  text?: string;
143
152
  onAction?: () => void;
144
153
  };
@@ -157,7 +166,7 @@ declare module "react" {
157
166
  "tag-picker-item": {
158
167
  title: string;
159
168
  value: string;
160
- icon?: ImageLike;
169
+ icon?: SerializedImageLike;
161
170
  };
162
171
  "text-area-field": BaseFormField & {};
163
172
  "file-picker-field": BaseFormField & {
@@ -167,7 +176,7 @@ declare module "react" {
167
176
  showHiddenFiles?: boolean;
168
177
  };
169
178
  "dropdown-field": BaseFormField & {
170
- children?: ReactNode;
179
+ children?: React.ReactNode;
171
180
  };
172
181
  "date-picker-field": BaseFormField & {
173
182
  min?: Date;
@@ -181,16 +190,16 @@ declare module "react" {
181
190
  dropdown: {
182
191
  onChange?: Function;
183
192
  onSearchTextChange?: (text: string) => void;
184
- children?: ReactNode;
193
+ children?: React.ReactNode;
185
194
  };
186
195
  "dropdown-section": {
187
196
  title?: string;
188
- children: ReactNode;
197
+ children: React.ReactNode;
189
198
  };
190
199
  "dropdown-item": {
191
200
  title: string;
192
201
  value: string;
193
- icon?: ImageLike;
202
+ icon?: SerializedImageLike;
194
203
  keywords?: string[];
195
204
  };
196
205