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/CHANGELOG.md +62 -0
- package/README.md +227 -68
- package/dist/block.cjs +79 -124
- package/dist/block.cjs.map +1 -1
- package/dist/{block.d.mts → block.d.cts} +128 -92
- package/dist/block.d.ts +128 -92
- package/dist/block.mjs +80 -114
- package/dist/block.mjs.map +1 -1
- package/dist/index.cjs +250 -143
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -0
- package/dist/index.d.ts +19 -4
- package/dist/index.mjs +243 -133
- package/dist/index.mjs.map +1 -1
- package/dist/jsx-dev-runtime.cjs +43 -0
- package/dist/jsx-dev-runtime.cjs.map +1 -0
- package/dist/jsx-dev-runtime.d.cts +1 -0
- package/dist/jsx-dev-runtime.d.ts +1 -0
- package/dist/jsx-dev-runtime.mjs +15 -0
- package/dist/jsx-dev-runtime.mjs.map +1 -0
- package/dist/jsx-runtime.cjs +46 -0
- package/dist/jsx-runtime.cjs.map +1 -0
- package/dist/jsx-runtime.d.cts +28 -0
- package/dist/jsx-runtime.d.ts +28 -0
- package/dist/jsx-runtime.mjs +19 -0
- package/dist/jsx-runtime.mjs.map +1 -0
- package/dist/{types.d-0WEt-h92.d.mts → types.d-BHoTwZUO.d.cts} +11 -11
- package/dist/{types.d-0WEt-h92.d.ts → types.d-BHoTwZUO.d.ts} +11 -11
- package/package.json +35 -30
- package/dist/index.d.mts +0 -7
package/dist/block.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
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
|
|
19
|
+
declare class Message {
|
|
21
20
|
static slackType: string;
|
|
21
|
+
props: Properties$2;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
type
|
|
24
|
+
type TopProperties$1 = {
|
|
25
25
|
children: string;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
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
|
|
41
|
+
type TopProperties = {
|
|
35
42
|
title: string;
|
|
36
43
|
confirm: string;
|
|
37
44
|
deny: string;
|
|
38
45
|
};
|
|
39
|
-
type ConfirmationProps = TopProperties
|
|
40
|
-
children:
|
|
46
|
+
type ConfirmationProps = TopProperties & {
|
|
47
|
+
children: JSX.Element;
|
|
41
48
|
};
|
|
42
|
-
type Properties
|
|
43
|
-
declare class Confirmation
|
|
49
|
+
type Properties = ConfirmationProps;
|
|
50
|
+
declare class Confirmation {
|
|
44
51
|
static slackType: string;
|
|
52
|
+
props: Properties;
|
|
45
53
|
}
|
|
46
54
|
|
|
47
|
-
type
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
|
|
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
|
-
|
|
65
|
-
|
|
65
|
+
children: string;
|
|
66
|
+
plainText?: boolean;
|
|
67
|
+
emoji?: boolean;
|
|
68
|
+
verbatim?: boolean;
|
|
66
69
|
};
|
|
67
|
-
declare class
|
|
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?:
|
|
79
|
+
confirm?: JSX.Element;
|
|
76
80
|
focusOnLoad?: boolean;
|
|
77
81
|
};
|
|
78
|
-
declare class DatePicker
|
|
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?:
|
|
90
|
+
confirm?: JSX.Element;
|
|
86
91
|
focusOnLoad?: boolean;
|
|
87
92
|
};
|
|
88
|
-
declare class DateTimePicker
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
101
|
+
actionId: string;
|
|
102
|
+
children: SingleOrArray<JSX.Element>;
|
|
103
|
+
initialOptions?: JSX.Element[];
|
|
104
|
+
confirm?: JSX.Element;
|
|
105
|
+
focusOnLoad?: boolean;
|
|
99
106
|
};
|
|
100
|
-
declare class
|
|
107
|
+
declare class Checkboxes {
|
|
101
108
|
static slackType: string;
|
|
109
|
+
props: Props$u;
|
|
102
110
|
}
|
|
103
111
|
|
|
104
112
|
type Props$t = {
|
|
105
|
-
|
|
106
|
-
children:
|
|
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
|
|
116
|
+
declare class OptionGroup {
|
|
112
117
|
static slackType: string;
|
|
118
|
+
props: Props$t;
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
type Props$s = {
|
|
116
|
-
|
|
117
|
-
|
|
122
|
+
children: string;
|
|
123
|
+
value: string;
|
|
124
|
+
url?: string;
|
|
125
|
+
description?: string;
|
|
118
126
|
};
|
|
119
|
-
declare class
|
|
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<
|
|
126
|
-
confirm?:
|
|
134
|
+
children: SingleOrArray<JSX.Element>;
|
|
135
|
+
confirm?: JSX.Element;
|
|
127
136
|
};
|
|
128
|
-
declare class Overflow
|
|
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<
|
|
135
|
-
initialOption?:
|
|
136
|
-
confirm?:
|
|
144
|
+
children: SingleOrArray<JSX.Element>;
|
|
145
|
+
initialOption?: JSX.Element;
|
|
146
|
+
confirm?: JSX.Element;
|
|
137
147
|
focusOnLoad?: boolean;
|
|
138
148
|
};
|
|
139
|
-
declare class RadioGroup
|
|
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<
|
|
162
|
-
initialOptions?:
|
|
163
|
-
confirm?:
|
|
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
|
|
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
|
|
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?:
|
|
211
|
+
confirm?: JSX.Element;
|
|
199
212
|
focusOnLoad?: boolean;
|
|
200
213
|
};
|
|
201
|
-
declare class TimePicker
|
|
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
|
|
223
|
+
declare class Actions {
|
|
210
224
|
static slackType: string;
|
|
225
|
+
props: Props$m;
|
|
211
226
|
}
|
|
212
227
|
|
|
213
|
-
type ImageOrText =
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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<
|
|
291
|
+
children?: SingleOrArray<JSX.Element | string>;
|
|
271
292
|
blockId?: string;
|
|
272
293
|
};
|
|
273
|
-
declare class RichText
|
|
294
|
+
declare class RichText {
|
|
274
295
|
static slackType: string;
|
|
296
|
+
props: Props$f;
|
|
275
297
|
}
|
|
276
298
|
|
|
277
|
-
type TextElement =
|
|
299
|
+
type TextElement = JSX.Element;
|
|
278
300
|
type Props$e = {
|
|
279
|
-
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
|
|
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
|
|
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
|
|
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<
|
|
337
|
+
children: SingleOrArray<JSX.Element | string>;
|
|
313
338
|
};
|
|
314
|
-
declare class RichTextSection
|
|
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<
|
|
355
|
+
children: SingleOrArray<JSX.Element | string>;
|
|
330
356
|
indent?: number;
|
|
331
357
|
border?: number;
|
|
332
358
|
};
|
|
333
|
-
declare class RichTextList
|
|
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<
|
|
365
|
+
children: SingleOrArray<JSX.Element | string>;
|
|
339
366
|
};
|
|
340
|
-
declare class RichTextQuote
|
|
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<
|
|
373
|
+
children: SingleOrArray<JSX.Element | string>;
|
|
346
374
|
};
|
|
347
|
-
declare class RichTextPreformatted
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 };
|