slackblock 1.0.1 → 2.0.0-beta.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.
@@ -1,7 +1,5 @@
1
- import React from 'react';
2
- import { C as Child, I as InteractiveBlockElement, a as InputBlockElement, B as BlockElement } from './types.d-uPVIHLKj.mjs';
3
- import '@slack/web-api';
4
- import '@slack/web-api/dist/types/request/chat';
1
+ import { C as Child, I as InteractiveBlockElement, a as InputBlockElement, b as BlockElement } from './types.d-BHoTwZUO.cjs';
2
+ import '@slack/types';
5
3
 
6
4
  type Properties$2 = {
7
5
  children: Child;
@@ -18,127 +16,139 @@ type Properties$2 = {
18
16
  username?: string;
19
17
  color?: string;
20
18
  };
21
- declare class Message extends React.Component<Properties$2> {
19
+ declare class Message {
22
20
  static slackType: string;
21
+ props: Properties$2;
23
22
  }
24
23
 
25
- type Props$y = {
24
+ type TopProperties$1 = {
26
25
  children: string;
27
- plainText?: boolean;
28
- emoji?: boolean;
29
- verbatim?: boolean;
26
+ actionId: string;
27
+ url?: string;
28
+ value?: string;
29
+ style?: 'primary' | 'danger';
30
+ accessibilityLabel?: string;
31
+ };
32
+ type ButtonProps = TopProperties$1 & {
33
+ confirm?: JSX.Element;
30
34
  };
31
- declare class Text extends React.Component<Props$y> {
35
+ type Properties$1 = ButtonProps;
36
+ declare class Button {
32
37
  static slackType: string;
38
+ props: Properties$1;
33
39
  }
34
40
 
35
- type TopProperties$1 = {
41
+ type TopProperties = {
36
42
  title: string;
37
43
  confirm: string;
38
44
  deny: string;
39
45
  };
40
- type ConfirmationProps = TopProperties$1 & {
41
- children: React.ReactElement<Text>;
46
+ type ConfirmationProps = TopProperties & {
47
+ children: JSX.Element;
42
48
  };
43
- type Properties$1 = ConfirmationProps;
44
- declare class Confirmation extends React.Component<Properties$1> {
49
+ type Properties = ConfirmationProps;
50
+ declare class Confirmation {
45
51
  static slackType: string;
52
+ props: Properties;
46
53
  }
47
54
 
48
- type TopProperties = {
49
- children: string;
50
- actionId: string;
51
- url?: string;
52
- value?: string;
53
- style?: 'primary' | 'danger';
54
- accessibilityLabel?: string;
55
- };
56
- type ButtonProps = TopProperties & {
57
- confirm?: React.ReactElement<Confirmation>;
55
+ type Props$y = {
56
+ url: string;
57
+ alt: string;
58
58
  };
59
- type Properties = ButtonProps;
60
- declare class Button extends React.Component<Properties> {
59
+ declare class Image$1 {
61
60
  static slackType: string;
61
+ props: Props$y;
62
62
  }
63
63
 
64
64
  type Props$x = {
65
- url: string;
66
- alt: string;
65
+ children: string;
66
+ plainText?: boolean;
67
+ emoji?: boolean;
68
+ verbatim?: boolean;
67
69
  };
68
- declare class Image$1 extends React.Component<Props$x> {
70
+ declare class Text {
69
71
  static slackType: string;
72
+ props: Props$x;
70
73
  }
71
74
 
72
75
  type Props$w = {
73
76
  actionId: string;
74
77
  placeholder?: string;
75
78
  initialDate?: string;
76
- confirm?: React.ReactElement<Confirmation>;
79
+ confirm?: JSX.Element;
77
80
  focusOnLoad?: boolean;
78
81
  };
79
- declare class DatePicker extends React.Component<Props$w> {
82
+ declare class DatePicker {
80
83
  static slackType: string;
84
+ props: Props$w;
81
85
  }
82
86
 
83
87
  type Props$v = {
84
88
  actionId: string;
85
89
  initialDateTime?: number;
86
- confirm?: React.ReactElement<Confirmation>;
90
+ confirm?: JSX.Element;
87
91
  focusOnLoad?: boolean;
88
92
  };
89
- declare class DateTimePicker extends React.Component<Props$v> {
93
+ declare class DateTimePicker {
90
94
  static slackType: string;
95
+ props: Props$v;
91
96
  }
92
97
 
93
98
  type SingleOrArray<T> = T | T[];
94
99
 
95
100
  type Props$u = {
96
- children: string;
97
- value: string;
98
- url?: string;
99
- description?: string;
101
+ actionId: string;
102
+ children: SingleOrArray<JSX.Element>;
103
+ initialOptions?: JSX.Element[];
104
+ confirm?: JSX.Element;
105
+ focusOnLoad?: boolean;
100
106
  };
101
- declare class Option extends React.Component<Props$u> {
107
+ declare class Checkboxes {
102
108
  static slackType: string;
109
+ props: Props$u;
103
110
  }
104
111
 
105
112
  type Props$t = {
106
- actionId: string;
107
- children: SingleOrArray<React.ReactElement<Option>>;
108
- initialOptions?: Array<React.ReactElement<Option>>;
109
- confirm?: React.ReactElement<Confirmation>;
110
- focusOnLoad?: boolean;
113
+ label: string;
114
+ children: JSX.Element | JSX.Element[];
111
115
  };
112
- declare class Checkboxes extends React.Component<Props$t> {
116
+ declare class OptionGroup {
113
117
  static slackType: string;
118
+ props: Props$t;
114
119
  }
115
120
 
116
121
  type Props$s = {
117
- label: string;
118
- children: React.ReactElement<Option> | Array<React.ReactElement<Option>>;
122
+ children: string;
123
+ value: string;
124
+ url?: string;
125
+ description?: string;
119
126
  };
120
- declare class OptionGroup extends React.Component<Props$s> {
127
+ declare class Option {
121
128
  static slackType: string;
129
+ props: Props$s;
122
130
  }
123
131
 
124
132
  type Props$r = {
125
133
  actionId: string;
126
- children: SingleOrArray<React.ReactElement<Option>>;
127
- confirm?: React.ReactElement<Confirmation>;
134
+ children: SingleOrArray<JSX.Element>;
135
+ confirm?: JSX.Element;
128
136
  };
129
- declare class Overflow extends React.Component<Props$r> {
137
+ declare class Overflow {
130
138
  static slackType: string;
139
+ props: Props$r;
131
140
  }
132
141
 
133
142
  type Props$q = {
134
143
  actionId: string;
135
- children: SingleOrArray<React.ReactElement<Option>>;
136
- initialOption?: React.ReactElement<Option>;
137
- confirm?: React.ReactElement<Confirmation>;
144
+ children: SingleOrArray<JSX.Element>;
145
+ initialOption?: JSX.Element;
146
+ confirm?: JSX.Element;
138
147
  focusOnLoad?: boolean;
139
148
  };
140
- declare class RadioGroup extends React.Component<Props$q> {
149
+ declare class RadioGroup {
141
150
  static slackType: string;
151
+ props: Props$q;
142
152
  }
143
153
 
144
154
  declare const selectTypes: {
@@ -159,9 +169,9 @@ type Props$p = {
159
169
  actionId: string;
160
170
  type?: SelectType;
161
171
  multi?: boolean;
162
- children?: SingleOrArray<React.ReactElement<Option>> | SingleOrArray<React.ReactElement<OptionGroup>>;
163
- initialOptions?: Array<React.ReactElement<Option>>;
164
- confirm?: React.ReactElement<Confirmation>;
172
+ children?: SingleOrArray<JSX.Element>;
173
+ initialOptions?: JSX.Element[];
174
+ confirm?: JSX.Element;
165
175
  maxSelectedItems?: number;
166
176
  minQueryLength?: number;
167
177
  focusOnLoad?: boolean;
@@ -172,8 +182,9 @@ type Props$p = {
172
182
  responseUrlEnabled?: boolean;
173
183
  filter?: ConversationFilter;
174
184
  };
175
- declare class Select extends React.Component<Props$p> {
185
+ declare class Select {
176
186
  static slackType: string;
187
+ props: Props$p;
177
188
  }
178
189
 
179
190
  type Props$o = {
@@ -188,51 +199,57 @@ type Props$o = {
188
199
  triggerActionsOn: Array<'on_enter_pressed' | 'on_character_entered'>;
189
200
  };
190
201
  };
191
- declare class TextInput extends React.Component<Props$o> {
202
+ declare class TextInput {
192
203
  static slackType: string;
204
+ props: Props$o;
193
205
  }
194
206
 
195
207
  type Props$n = {
196
208
  actionId: string;
197
209
  placeholder?: string;
198
210
  initialTime?: string;
199
- confirm?: React.ReactElement<Confirmation>;
211
+ confirm?: JSX.Element;
200
212
  focusOnLoad?: boolean;
201
213
  };
202
- declare class TimePicker extends React.Component<Props$n> {
214
+ declare class TimePicker {
203
215
  static slackType: string;
216
+ props: Props$n;
204
217
  }
205
218
 
206
219
  type Props$m = {
207
220
  children: InteractiveBlockElement | InteractiveBlockElement[];
208
221
  blockId?: string;
209
222
  };
210
- declare class Actions extends React.Component<Props$m> {
223
+ declare class Actions {
211
224
  static slackType: string;
225
+ props: Props$m;
212
226
  }
213
227
 
214
- type ImageOrText = React.ReactElement<Text> | React.ReactElement<Image$1>;
228
+ type ImageOrText = JSX.Element;
215
229
  type Props$l = {
216
230
  children: ImageOrText | ImageOrText[];
217
231
  blockId?: string;
218
232
  };
219
- declare class Context extends React.Component<Props$l> {
233
+ declare class Context {
220
234
  static slackType: string;
235
+ props: Props$l;
221
236
  }
222
237
 
223
238
  type Props$k = {
224
239
  blockId?: string;
225
240
  };
226
- declare class Divider extends React.Component<Props$k> {
241
+ declare class Divider {
227
242
  static slackType: string;
243
+ props: Props$k;
228
244
  }
229
245
 
230
246
  type Props$j = {
231
247
  externalId: string;
232
248
  blockId?: string;
233
249
  };
234
- declare class File extends React.Component<Props$j> {
250
+ declare class File {
235
251
  static slackType: string;
252
+ props: Props$j;
236
253
  }
237
254
 
238
255
  type Props$i = {
@@ -240,8 +257,9 @@ type Props$i = {
240
257
  blockId?: string;
241
258
  emoji?: boolean;
242
259
  };
243
- declare class Header extends React.Component<Props$i> {
260
+ declare class Header {
244
261
  static slackType: string;
262
+ props: Props$i;
245
263
  }
246
264
 
247
265
  type Props$h = {
@@ -250,8 +268,9 @@ type Props$h = {
250
268
  title?: string;
251
269
  blockId?: string;
252
270
  };
253
- declare class Image extends React.Component<Props$h> {
271
+ declare class Image {
254
272
  static slackType: string;
273
+ props: Props$h;
255
274
  }
256
275
 
257
276
  type Props$g = {
@@ -261,36 +280,40 @@ type Props$g = {
261
280
  optional?: boolean;
262
281
  blockId?: string;
263
282
  };
264
- declare class Input extends React.Component<Props$g> {
283
+ declare class Input {
265
284
  static slackType: string;
285
+ props: Props$g;
266
286
  }
267
287
 
268
288
  type RichTextElement = Record<string, any>;
269
289
  type Props$f = {
270
290
  elements?: RichTextElement[];
271
- children?: SingleOrArray<React.ReactElement | string>;
291
+ children?: SingleOrArray<JSX.Element | string>;
272
292
  blockId?: string;
273
293
  };
274
- declare class RichText extends React.Component<Props$f> {
294
+ declare class RichText {
275
295
  static slackType: string;
296
+ props: Props$f;
276
297
  }
277
298
 
278
- type TextElement = React.ReactElement<Text>;
299
+ type TextElement = JSX.Element;
279
300
  type Props$e = {
280
- text: React.ReactElement<Text>;
301
+ text: JSX.Element;
281
302
  blockId?: string;
282
303
  children?: SingleOrArray<TextElement | null | undefined | false>;
283
304
  accessory?: BlockElement;
284
305
  };
285
- declare class Section extends React.Component<Props$e> {
306
+ declare class Section {
286
307
  static slackType: string;
308
+ props: Props$e;
287
309
  }
288
310
 
289
311
  type Props$d = {
290
312
  children: SingleOrArray<Child>;
291
313
  };
292
- declare class Container extends React.Component<Props$d> {
314
+ declare class Container {
293
315
  static slackType: string;
316
+ props: Props$d;
294
317
  }
295
318
 
296
319
  type Props$c = {
@@ -305,15 +328,17 @@ type Props$c = {
305
328
  providerIconUrl?: string;
306
329
  blockId?: string;
307
330
  };
308
- declare class Video extends React.Component<Props$c> {
331
+ declare class Video {
309
332
  static slackType: string;
333
+ props: Props$c;
310
334
  }
311
335
 
312
336
  type Props$b = {
313
- children: SingleOrArray<React.ReactElement | string>;
337
+ children: SingleOrArray<JSX.Element | string>;
314
338
  };
315
- declare class RichTextSection extends React.Component<Props$b> {
339
+ declare class RichTextSection {
316
340
  static slackType: string;
341
+ props: Props$b;
317
342
  }
318
343
 
319
344
  type RichTextStyle = {
@@ -327,34 +352,38 @@ type RichTextBroadcastRange = 'here' | 'channel' | 'everyone';
327
352
 
328
353
  type Props$a = {
329
354
  style: RichTextListStyle;
330
- children: SingleOrArray<React.ReactElement | string>;
355
+ children: SingleOrArray<JSX.Element | string>;
331
356
  indent?: number;
332
357
  border?: number;
333
358
  };
334
- declare class RichTextList extends React.Component<Props$a> {
359
+ declare class RichTextList {
335
360
  static slackType: string;
361
+ props: Props$a;
336
362
  }
337
363
 
338
364
  type Props$9 = {
339
- children: SingleOrArray<React.ReactElement | string>;
365
+ children: SingleOrArray<JSX.Element | string>;
340
366
  };
341
- declare class RichTextQuote extends React.Component<Props$9> {
367
+ declare class RichTextQuote {
342
368
  static slackType: string;
369
+ props: Props$9;
343
370
  }
344
371
 
345
372
  type Props$8 = {
346
- children: SingleOrArray<React.ReactElement | string>;
373
+ children: SingleOrArray<JSX.Element | string>;
347
374
  };
348
- declare class RichTextPreformatted extends React.Component<Props$8> {
375
+ declare class RichTextPreformatted {
349
376
  static slackType: string;
377
+ props: Props$8;
350
378
  }
351
379
 
352
380
  type Props$7 = {
353
381
  children: string;
354
382
  style?: RichTextStyle;
355
383
  };
356
- declare class RichTextText extends React.Component<Props$7> {
384
+ declare class RichTextText {
357
385
  static slackType: string;
386
+ props: Props$7;
358
387
  }
359
388
 
360
389
  type Props$6 = {
@@ -362,53 +391,59 @@ type Props$6 = {
362
391
  children?: string;
363
392
  style?: RichTextStyle;
364
393
  };
365
- declare class RichTextLink extends React.Component<Props$6> {
394
+ declare class RichTextLink {
366
395
  static slackType: string;
396
+ props: Props$6;
367
397
  }
368
398
 
369
399
  type Props$5 = {
370
400
  userId: string;
371
401
  };
372
- declare class RichTextUser extends React.Component<Props$5> {
402
+ declare class RichTextUser {
373
403
  static slackType: string;
404
+ props: Props$5;
374
405
  }
375
406
 
376
407
  type Props$4 = {
377
408
  channelId: string;
378
409
  };
379
- declare class RichTextChannel extends React.Component<Props$4> {
410
+ declare class RichTextChannel {
380
411
  static slackType: string;
412
+ props: Props$4;
381
413
  }
382
414
 
383
415
  type Props$3 = {
384
416
  name: string;
385
417
  };
386
- declare class RichTextEmoji extends React.Component<Props$3> {
418
+ declare class RichTextEmoji {
387
419
  static slackType: string;
420
+ props: Props$3;
388
421
  }
389
422
 
390
423
  type Props$2 = {
391
424
  timestamp: number;
392
425
  format: string;
393
426
  fallback: string;
394
- link?: string;
395
427
  };
396
- declare class RichTextDate extends React.Component<Props$2> {
428
+ declare class RichTextDate {
397
429
  static slackType: string;
430
+ props: Props$2;
398
431
  }
399
432
 
400
433
  type Props$1 = {
401
434
  range: RichTextBroadcastRange;
402
435
  };
403
- declare class RichTextBroadcast extends React.Component<Props$1> {
436
+ declare class RichTextBroadcast {
404
437
  static slackType: string;
438
+ props: Props$1;
405
439
  }
406
440
 
407
441
  type Props = {
408
442
  usergroupId: string;
409
443
  };
410
- declare class RichTextUserGroup extends React.Component<Props> {
444
+ declare class RichTextUserGroup {
411
445
  static slackType: string;
446
+ props: Props;
412
447
  }
413
448
 
414
449
  export { Actions, Button, Checkboxes, Confirmation, Container, Context, DatePicker, DateTimePicker, Divider, File, Header, Image$1 as Image, Image as ImageLayout, Input, Message, Option, OptionGroup, Overflow, RadioGroup, RichText, RichTextBroadcast, RichTextChannel, RichTextDate, RichTextEmoji, RichTextLink, RichTextList, RichTextPreformatted, RichTextQuote, RichTextSection, RichTextText, RichTextUser, RichTextUserGroup, Section, Select, Text, TextInput, TimePicker, Video };