slackblock 1.1.0 → 2.0.0-beta.1

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