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.
- package/CHANGELOG.md +66 -0
- package/README.md +228 -69
- package/dist/block.cjs +79 -124
- package/dist/block.cjs.map +1 -1
- package/dist/{block.d.mts → block.d.cts} +129 -94
- package/dist/block.d.ts +129 -94
- package/dist/block.mjs +80 -114
- package/dist/block.mjs.map +1 -1
- package/dist/index.cjs +283 -184
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -0
- package/dist/index.d.ts +20 -6
- package/dist/index.mjs +276 -174
- package/dist/index.mjs.map +1 -1
- package/dist/types.d-BHoTwZUO.d.cts +124 -0
- package/dist/types.d-BHoTwZUO.d.ts +124 -0
- package/package.json +20 -33
- package/dist/index.d.mts +0 -8
- package/dist/types.d-uPVIHLKj.d.mts +0 -57
- package/dist/types.d-uPVIHLKj.d.ts +0 -57
package/dist/block.mjs
CHANGED
|
@@ -1,230 +1,196 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
|
|
1
5
|
// src/components/message.tsx
|
|
2
|
-
|
|
3
|
-
var Message = class extends React.Component {
|
|
6
|
+
var Message = class {
|
|
4
7
|
};
|
|
5
|
-
Message
|
|
8
|
+
__publicField(Message, "slackType", "Message");
|
|
6
9
|
|
|
7
10
|
// src/components/block/button.tsx
|
|
8
|
-
|
|
9
|
-
var Button = class extends React2.Component {
|
|
11
|
+
var Button = class {
|
|
10
12
|
};
|
|
11
|
-
Button
|
|
13
|
+
__publicField(Button, "slackType", "Button");
|
|
12
14
|
|
|
13
15
|
// src/components/block/confirmation.tsx
|
|
14
|
-
|
|
15
|
-
var Confirmation = class extends React3.Component {
|
|
16
|
+
var Confirmation = class {
|
|
16
17
|
};
|
|
17
|
-
Confirmation
|
|
18
|
+
__publicField(Confirmation, "slackType", "Confirmation");
|
|
18
19
|
|
|
19
20
|
// src/components/block/image.tsx
|
|
20
|
-
|
|
21
|
-
var Image = class extends React4.Component {
|
|
21
|
+
var Image = class {
|
|
22
22
|
};
|
|
23
|
-
Image
|
|
23
|
+
__publicField(Image, "slackType", "Image");
|
|
24
24
|
|
|
25
25
|
// src/components/block/text.tsx
|
|
26
|
-
|
|
27
|
-
var Text = class extends React5.Component {
|
|
26
|
+
var Text = class {
|
|
28
27
|
};
|
|
29
|
-
Text
|
|
28
|
+
__publicField(Text, "slackType", "Text");
|
|
30
29
|
|
|
31
30
|
// src/components/input/date-picker.tsx
|
|
32
|
-
|
|
33
|
-
var DatePicker = class extends React6.Component {
|
|
31
|
+
var DatePicker = class {
|
|
34
32
|
};
|
|
35
|
-
DatePicker
|
|
33
|
+
__publicField(DatePicker, "slackType", "DatePicker");
|
|
36
34
|
|
|
37
35
|
// src/components/input/date-time-picker.tsx
|
|
38
|
-
|
|
39
|
-
var DateTimePicker = class extends React7.Component {
|
|
36
|
+
var DateTimePicker = class {
|
|
40
37
|
};
|
|
41
|
-
DateTimePicker
|
|
38
|
+
__publicField(DateTimePicker, "slackType", "DateTimePicker");
|
|
42
39
|
|
|
43
40
|
// src/components/input/checkboxes.tsx
|
|
44
|
-
|
|
45
|
-
var Checkboxes = class extends React8.Component {
|
|
41
|
+
var Checkboxes = class {
|
|
46
42
|
};
|
|
47
|
-
Checkboxes
|
|
43
|
+
__publicField(Checkboxes, "slackType", "Checkboxes");
|
|
48
44
|
|
|
49
45
|
// src/components/input/option-group.tsx
|
|
50
|
-
|
|
51
|
-
var OptionGroup = class extends React9.Component {
|
|
46
|
+
var OptionGroup = class {
|
|
52
47
|
};
|
|
53
|
-
OptionGroup
|
|
48
|
+
__publicField(OptionGroup, "slackType", "OptionGroup");
|
|
54
49
|
|
|
55
50
|
// src/components/input/option.tsx
|
|
56
|
-
|
|
57
|
-
var Option = class extends React10.Component {
|
|
51
|
+
var Option = class {
|
|
58
52
|
};
|
|
59
|
-
Option
|
|
53
|
+
__publicField(Option, "slackType", "Option");
|
|
60
54
|
|
|
61
55
|
// src/components/input/overflow.tsx
|
|
62
|
-
|
|
63
|
-
var Overflow = class extends React11.Component {
|
|
56
|
+
var Overflow = class {
|
|
64
57
|
};
|
|
65
|
-
Overflow
|
|
58
|
+
__publicField(Overflow, "slackType", "Overflow");
|
|
66
59
|
|
|
67
60
|
// src/components/input/radio-group.tsx
|
|
68
|
-
|
|
69
|
-
var RadioGroup = class extends React12.Component {
|
|
61
|
+
var RadioGroup = class {
|
|
70
62
|
};
|
|
71
|
-
RadioGroup
|
|
63
|
+
__publicField(RadioGroup, "slackType", "RadioGroup");
|
|
72
64
|
|
|
73
65
|
// src/components/input/select.tsx
|
|
74
|
-
|
|
75
|
-
var Select = class extends React13.Component {
|
|
66
|
+
var Select = class {
|
|
76
67
|
};
|
|
77
|
-
Select
|
|
68
|
+
__publicField(Select, "slackType", "Select");
|
|
78
69
|
|
|
79
70
|
// src/components/input/text.tsx
|
|
80
|
-
|
|
81
|
-
var TextInput = class extends React14.Component {
|
|
71
|
+
var TextInput = class {
|
|
82
72
|
};
|
|
83
|
-
TextInput
|
|
73
|
+
__publicField(TextInput, "slackType", "TextInput");
|
|
84
74
|
|
|
85
75
|
// src/components/input/time-picker.tsx
|
|
86
|
-
|
|
87
|
-
var TimePicker = class extends React15.Component {
|
|
76
|
+
var TimePicker = class {
|
|
88
77
|
};
|
|
89
|
-
TimePicker
|
|
78
|
+
__publicField(TimePicker, "slackType", "TimePicker");
|
|
90
79
|
|
|
91
80
|
// src/components/layout/actions.tsx
|
|
92
|
-
|
|
93
|
-
var Actions = class extends React16.Component {
|
|
81
|
+
var Actions = class {
|
|
94
82
|
};
|
|
95
|
-
Actions
|
|
83
|
+
__publicField(Actions, "slackType", "Actions");
|
|
96
84
|
|
|
97
85
|
// src/components/layout/context.tsx
|
|
98
|
-
|
|
99
|
-
var Context = class extends React17.Component {
|
|
86
|
+
var Context = class {
|
|
100
87
|
};
|
|
101
|
-
Context
|
|
88
|
+
__publicField(Context, "slackType", "Context");
|
|
102
89
|
|
|
103
90
|
// src/components/layout/divider.tsx
|
|
104
|
-
|
|
105
|
-
var Divider = class extends React18.Component {
|
|
91
|
+
var Divider = class {
|
|
106
92
|
};
|
|
107
|
-
Divider
|
|
93
|
+
__publicField(Divider, "slackType", "Divider");
|
|
108
94
|
|
|
109
95
|
// src/components/layout/file.tsx
|
|
110
|
-
|
|
111
|
-
var File = class extends React19.Component {
|
|
96
|
+
var File = class {
|
|
112
97
|
};
|
|
113
|
-
File
|
|
98
|
+
__publicField(File, "slackType", "File");
|
|
114
99
|
|
|
115
100
|
// src/components/layout/header.tsx
|
|
116
|
-
|
|
117
|
-
var Header = class extends React20.Component {
|
|
101
|
+
var Header = class {
|
|
118
102
|
};
|
|
119
|
-
Header
|
|
103
|
+
__publicField(Header, "slackType", "Header");
|
|
120
104
|
|
|
121
105
|
// src/components/layout/image.tsx
|
|
122
|
-
|
|
123
|
-
var Image2 = class extends React21.Component {
|
|
106
|
+
var Image2 = class {
|
|
124
107
|
};
|
|
125
|
-
Image2
|
|
108
|
+
__publicField(Image2, "slackType", "ImageLayout");
|
|
126
109
|
|
|
127
110
|
// src/components/layout/input.tsx
|
|
128
|
-
|
|
129
|
-
var Input = class extends React22.Component {
|
|
111
|
+
var Input = class {
|
|
130
112
|
};
|
|
131
|
-
Input
|
|
113
|
+
__publicField(Input, "slackType", "Input");
|
|
132
114
|
|
|
133
115
|
// src/components/layout/rich-text.tsx
|
|
134
|
-
|
|
135
|
-
var RichText = class extends React23.Component {
|
|
116
|
+
var RichText = class {
|
|
136
117
|
};
|
|
137
|
-
RichText
|
|
118
|
+
__publicField(RichText, "slackType", "RichText");
|
|
138
119
|
|
|
139
120
|
// src/components/layout/section.tsx
|
|
140
|
-
|
|
141
|
-
var Section = class extends React24.Component {
|
|
121
|
+
var Section = class {
|
|
142
122
|
};
|
|
143
|
-
Section
|
|
123
|
+
__publicField(Section, "slackType", "Section");
|
|
144
124
|
|
|
145
125
|
// src/components/layout/container.tsx
|
|
146
|
-
|
|
147
|
-
var Container = class extends React25.Component {
|
|
126
|
+
var Container = class {
|
|
148
127
|
};
|
|
149
|
-
Container
|
|
128
|
+
__publicField(Container, "slackType", "Container");
|
|
150
129
|
|
|
151
130
|
// src/components/layout/video.tsx
|
|
152
|
-
|
|
153
|
-
var Video = class extends React26.Component {
|
|
131
|
+
var Video = class {
|
|
154
132
|
};
|
|
155
|
-
Video
|
|
133
|
+
__publicField(Video, "slackType", "Video");
|
|
156
134
|
|
|
157
135
|
// src/components/rich-text/section.tsx
|
|
158
|
-
|
|
159
|
-
var RichTextSection = class extends React27.Component {
|
|
136
|
+
var RichTextSection = class {
|
|
160
137
|
};
|
|
161
|
-
RichTextSection
|
|
138
|
+
__publicField(RichTextSection, "slackType", "RichTextSection");
|
|
162
139
|
|
|
163
140
|
// src/components/rich-text/list.tsx
|
|
164
|
-
|
|
165
|
-
var RichTextList = class extends React28.Component {
|
|
141
|
+
var RichTextList = class {
|
|
166
142
|
};
|
|
167
|
-
RichTextList
|
|
143
|
+
__publicField(RichTextList, "slackType", "RichTextList");
|
|
168
144
|
|
|
169
145
|
// src/components/rich-text/quote.tsx
|
|
170
|
-
|
|
171
|
-
var RichTextQuote = class extends React29.Component {
|
|
146
|
+
var RichTextQuote = class {
|
|
172
147
|
};
|
|
173
|
-
RichTextQuote
|
|
148
|
+
__publicField(RichTextQuote, "slackType", "RichTextQuote");
|
|
174
149
|
|
|
175
150
|
// src/components/rich-text/preformatted.tsx
|
|
176
|
-
|
|
177
|
-
var RichTextPreformatted = class extends React30.Component {
|
|
151
|
+
var RichTextPreformatted = class {
|
|
178
152
|
};
|
|
179
|
-
RichTextPreformatted
|
|
153
|
+
__publicField(RichTextPreformatted, "slackType", "RichTextPreformatted");
|
|
180
154
|
|
|
181
155
|
// src/components/rich-text/text.tsx
|
|
182
|
-
|
|
183
|
-
var RichTextText = class extends React31.Component {
|
|
156
|
+
var RichTextText = class {
|
|
184
157
|
};
|
|
185
|
-
RichTextText
|
|
158
|
+
__publicField(RichTextText, "slackType", "RichTextText");
|
|
186
159
|
|
|
187
160
|
// src/components/rich-text/link.tsx
|
|
188
|
-
|
|
189
|
-
var RichTextLink = class extends React32.Component {
|
|
161
|
+
var RichTextLink = class {
|
|
190
162
|
};
|
|
191
|
-
RichTextLink
|
|
163
|
+
__publicField(RichTextLink, "slackType", "RichTextLink");
|
|
192
164
|
|
|
193
165
|
// src/components/rich-text/user.tsx
|
|
194
|
-
|
|
195
|
-
var RichTextUser = class extends React33.Component {
|
|
166
|
+
var RichTextUser = class {
|
|
196
167
|
};
|
|
197
|
-
RichTextUser
|
|
168
|
+
__publicField(RichTextUser, "slackType", "RichTextUser");
|
|
198
169
|
|
|
199
170
|
// src/components/rich-text/channel.tsx
|
|
200
|
-
|
|
201
|
-
var RichTextChannel = class extends React34.Component {
|
|
171
|
+
var RichTextChannel = class {
|
|
202
172
|
};
|
|
203
|
-
RichTextChannel
|
|
173
|
+
__publicField(RichTextChannel, "slackType", "RichTextChannel");
|
|
204
174
|
|
|
205
175
|
// src/components/rich-text/emoji.tsx
|
|
206
|
-
|
|
207
|
-
var RichTextEmoji = class extends React35.Component {
|
|
176
|
+
var RichTextEmoji = class {
|
|
208
177
|
};
|
|
209
|
-
RichTextEmoji
|
|
178
|
+
__publicField(RichTextEmoji, "slackType", "RichTextEmoji");
|
|
210
179
|
|
|
211
180
|
// src/components/rich-text/date.tsx
|
|
212
|
-
|
|
213
|
-
var RichTextDate = class extends React36.Component {
|
|
181
|
+
var RichTextDate = class {
|
|
214
182
|
};
|
|
215
|
-
RichTextDate
|
|
183
|
+
__publicField(RichTextDate, "slackType", "RichTextDate");
|
|
216
184
|
|
|
217
185
|
// src/components/rich-text/broadcast.tsx
|
|
218
|
-
|
|
219
|
-
var RichTextBroadcast = class extends React37.Component {
|
|
186
|
+
var RichTextBroadcast = class {
|
|
220
187
|
};
|
|
221
|
-
RichTextBroadcast
|
|
188
|
+
__publicField(RichTextBroadcast, "slackType", "RichTextBroadcast");
|
|
222
189
|
|
|
223
190
|
// src/components/rich-text/user-group.tsx
|
|
224
|
-
|
|
225
|
-
var RichTextUserGroup = class extends React38.Component {
|
|
191
|
+
var RichTextUserGroup = class {
|
|
226
192
|
};
|
|
227
|
-
RichTextUserGroup
|
|
193
|
+
__publicField(RichTextUserGroup, "slackType", "RichTextUserGroup");
|
|
228
194
|
export {
|
|
229
195
|
Actions,
|
|
230
196
|
Button,
|
package/dist/block.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/message.tsx","../src/components/block/button.tsx","../src/components/block/confirmation.tsx","../src/components/block/image.tsx","../src/components/block/text.tsx","../src/components/input/date-picker.tsx","../src/components/input/date-time-picker.tsx","../src/components/input/checkboxes.tsx","../src/components/input/option-group.tsx","../src/components/input/option.tsx","../src/components/input/overflow.tsx","../src/components/input/radio-group.tsx","../src/components/input/select.tsx","../src/components/input/text.tsx","../src/components/input/time-picker.tsx","../src/components/layout/actions.tsx","../src/components/layout/context.tsx","../src/components/layout/divider.tsx","../src/components/layout/file.tsx","../src/components/layout/header.tsx","../src/components/layout/image.tsx","../src/components/layout/input.tsx","../src/components/layout/rich-text.tsx","../src/components/layout/section.tsx","../src/components/layout/container.tsx","../src/components/layout/video.tsx","../src/components/rich-text/section.tsx","../src/components/rich-text/list.tsx","../src/components/rich-text/quote.tsx","../src/components/rich-text/preformatted.tsx","../src/components/rich-text/text.tsx","../src/components/rich-text/link.tsx","../src/components/rich-text/user.tsx","../src/components/rich-text/channel.tsx","../src/components/rich-text/emoji.tsx","../src/components/rich-text/date.tsx","../src/components/rich-text/broadcast.tsx","../src/components/rich-text/user-group.tsx"],"sourcesContent":["import React from 'react';\n\nimport {type Child} from '../constants/types';\n\ntype Properties = {\n children: Child;\n text?: string;\n asUser?: boolean;\n iconEmoji?: string;\n iconUrl?: string;\n markdown?: boolean;\n parse?: 'full' | 'none';\n replyBroadcast?: boolean;\n replyTo?: string;\n unfurlLinks?: boolean;\n unfurlMedia?: boolean;\n username?: string;\n color?: string;\n};\n\nexport default class Message extends React.Component<Properties> {\n static slackType = 'Message';\n}\n","import React from 'react';\n\nimport type Confirmation from './confirmation';\n\ntype TopProperties = {\n children: string;\n actionId: string;\n url?: string;\n value?: string;\n style?: 'primary' | 'danger';\n accessibilityLabel?: string;\n};\n\nexport type ButtonProps = TopProperties & {\n confirm?: React.ReactElement<Confirmation>;\n};\n\ntype Properties = ButtonProps;\n\nexport default class Button extends React.Component<Properties> {\n static slackType = 'Button';\n}\n","import React from 'react';\n\nimport type Text from './text';\n\ntype TopProperties = {\n title: string;\n confirm: string;\n deny: string;\n};\n\n/* This is a dumb workaround to merging props */\nexport type ConfirmationProps = TopProperties & {\n children: React.ReactElement<Text>;\n};\n\ntype Properties = ConfirmationProps;\n\nexport default class Confirmation extends React.Component<Properties> {\n static slackType = 'Confirmation';\n}\n","import React from 'react';\n\nexport type Props = {\n url: string;\n alt: string;\n};\n\nexport default class Image extends React.Component<Props> {\n static slackType = 'Image';\n}\n","import React from 'react';\n\nexport type Props = {\n children: string;\n plainText?: boolean;\n emoji?: boolean;\n verbatim?: boolean;\n};\n\nexport default class Text extends React.Component<Props> {\n static slackType = 'Text';\n}\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\n\nexport type Props = {\n actionId: string;\n placeholder?: string;\n initialDate?: string;\n confirm?: React.ReactElement<Confirmation>;\n focusOnLoad?: boolean;\n};\n\nexport default class DatePicker extends React.Component<Props> {\n static slackType = 'DatePicker';\n}\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\n\nexport type Props = {\n actionId: string;\n initialDateTime?: number;\n confirm?: React.ReactElement<Confirmation>;\n focusOnLoad?: boolean;\n};\n\nexport default class DateTimePicker extends React.Component<Props> {\n static slackType = 'DateTimePicker';\n}\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nimport type Option from './option';\n\nexport type Props = {\n actionId: string;\n children: SingleOrArray<React.ReactElement<Option>>;\n initialOptions?: Array<React.ReactElement<Option>>;\n confirm?: React.ReactElement<Confirmation>;\n focusOnLoad?: boolean;\n};\n\nexport default class Checkboxes extends React.Component<Props> {\n static slackType = 'Checkboxes';\n}\n","import React from 'react';\n\nimport type Option from './option';\n\nexport type Props = {\n label: string;\n children: React.ReactElement<Option> | Array<React.ReactElement<Option>>;\n};\n\nexport default class OptionGroup extends React.Component<Props> {\n static slackType = 'OptionGroup';\n}\n","import React from 'react';\n\nexport type Props = {\n children: string;\n value: string;\n url?: string;\n description?: string;\n};\n\nexport default class Option extends React.Component<Props> {\n static slackType = 'Option';\n}\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nimport type Option from './option';\n\nexport type Props = {\n actionId: string;\n children: SingleOrArray<React.ReactElement<Option>>;\n confirm?: React.ReactElement<Confirmation>;\n};\n\nexport default class Overflow extends React.Component<Props> {\n static slackType = 'Overflow';\n}\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nimport type Option from './option';\n\nexport type Props = {\n actionId: string;\n children: SingleOrArray<React.ReactElement<Option>>;\n initialOption?: React.ReactElement<Option>;\n confirm?: React.ReactElement<Confirmation>;\n focusOnLoad?: boolean;\n};\n\nexport default class RadioGroup extends React.Component<Props> {\n static slackType = 'RadioGroup';\n}\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nimport type Option from './option';\nimport type OptionGroup from './option-group';\n\nexport const selectTypes = {\n STATIC: 'static',\n EXTERNAL: 'external',\n USER: 'user',\n CONVERSATION: 'conversation',\n CHANNEL: 'channel',\n} as const;\n\ntype SelectType = typeof selectTypes[keyof typeof selectTypes];\n\ntype ConversationFilter = {\n include?: Array<'im' | 'mpim' | 'private' | 'public'>;\n excludeExternalSharedChannels?: boolean;\n excludeBotUsers?: boolean;\n};\n\nexport type Props = {\n placeholder: string;\n actionId: string;\n type?: SelectType;\n multi?: boolean;\n children?: SingleOrArray<React.ReactElement<Option>> | SingleOrArray<React.ReactElement<OptionGroup>>;\n initialOptions?: Array<React.ReactElement<Option>>;\n confirm?: React.ReactElement<Confirmation>;\n maxSelectedItems?: number;\n minQueryLength?: number;\n focusOnLoad?: boolean;\n initialUsers?: string[];\n initialConversations?: string[];\n initialChannels?: string[];\n defaultToCurrentConversation?: boolean;\n responseUrlEnabled?: boolean;\n filter?: ConversationFilter;\n};\n\nexport default class Select extends React.Component<Props> {\n static slackType = 'Select';\n}\n","import React from 'react';\n\nexport type Props = {\n actionId: string;\n placeholder?: string;\n initial?: string;\n multiline?: boolean;\n minLength?: number;\n maxLength?: number;\n focusOnLoad?: boolean;\n dispatchActionConfig?: {\n triggerActionsOn: Array<'on_enter_pressed' | 'on_character_entered'>;\n };\n};\n\nexport default class TextInput extends React.Component<Props> {\n static slackType = 'TextInput';\n}\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\n\nexport type Props = {\n actionId: string;\n placeholder?: string;\n initialTime?: string;\n confirm?: React.ReactElement<Confirmation>;\n focusOnLoad?: boolean;\n};\n\nexport default class TimePicker extends React.Component<Props> {\n static slackType = 'TimePicker';\n}\n","import React from 'react';\n\nimport {type InteractiveBlockElement} from '../../constants/types';\n\nexport type Props = {\n children: InteractiveBlockElement | InteractiveBlockElement[];\n blockId?: string;\n};\n\nexport default class Actions extends React.Component<Props> {\n static slackType = 'Actions';\n}\n","import React from 'react';\n\nimport type Text from '../block/text';\nimport type Image from '../block/image';\n\nexport type ImageOrText = React.ReactElement<Text> | React.ReactElement<Image>;\n\nexport type Props = {\n children: ImageOrText | ImageOrText[];\n blockId?: string;\n};\n\nexport default class Context extends React.Component<Props> {\n static slackType = 'Context';\n}\n","import React from 'react';\n\nexport type Props = {\n blockId?: string;\n};\n\nexport default class Divider extends React.Component<Props> {\n static slackType = 'Divider';\n}\n","import React from 'react';\n\nexport type Props = {\n externalId: string;\n blockId?: string;\n};\n\nexport default class File extends React.Component<Props> {\n static slackType = 'File';\n}\n","import React from 'react';\n\nexport type Props = {\n text: string;\n blockId?: string;\n emoji?: boolean;\n};\n\nexport default class Header extends React.Component<Props> {\n static slackType = 'Header';\n}\n","import React from 'react';\n\nexport type Props = {\n url: string;\n alt: string;\n title?: string;\n blockId?: string;\n};\n\nexport default class Image extends React.Component<Props> {\n static slackType = 'ImageLayout';\n}\n","import React from 'react';\n\nimport {type InputBlockElement} from '../../constants/types';\n\nexport type Props = {\n label: string;\n element: InputBlockElement;\n hint?: string;\n optional?: boolean;\n blockId?: string;\n};\n\nexport default class Input extends React.Component<Props> {\n static slackType = 'Input';\n}\n","import React from 'react';\n\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type RichTextElement = Record<string, any>;\n\nexport type Props = {\n elements?: RichTextElement[];\n children?: SingleOrArray<React.ReactElement | string>;\n blockId?: string;\n};\n\nexport default class RichText extends React.Component<Props> {\n static slackType = 'RichText';\n}\n","import React from 'react';\n\nimport type Text from '../block/text';\nimport {type BlockElement} from '../../constants/types';\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\ntype TextElement = React.ReactElement<Text>;\n\nexport type Props = {\n text: React.ReactElement<Text>;\n blockId?: string;\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- We actually want to handle null children\n children?: SingleOrArray<TextElement | null | undefined | false>;\n accessory?: BlockElement;\n};\n\nexport default class Section extends React.Component<Props> {\n static slackType = 'Section';\n}\n","import React from 'react';\n\nimport {type SingleOrArray} from '../../utils/type-helpers';\nimport {type Child} from '../../constants/types';\n\nexport type Props = {\n children: SingleOrArray<Child>;\n};\n\nexport default class Container extends React.Component<Props> {\n static slackType = 'Container';\n}\n","import React from 'react';\n\nexport type Props = {\n title: string;\n videoUrl: string;\n thumbnailUrl: string;\n altText: string;\n titleUrl?: string;\n description?: string;\n authorName?: string;\n providerName?: string;\n providerIconUrl?: string;\n blockId?: string;\n};\n\nexport default class Video extends React.Component<Props> {\n static slackType = 'Video';\n}\n","import React from 'react';\n\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type Props = {\n children: SingleOrArray<React.ReactElement | string>;\n};\n\nexport default class RichTextSection extends React.Component<Props> {\n static slackType = 'RichTextSection';\n}\n","import React from 'react';\n\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nimport {type RichTextListStyle} from './types';\n\nexport type Props = {\n style: RichTextListStyle;\n children: SingleOrArray<React.ReactElement | string>;\n indent?: number;\n border?: number;\n};\n\nexport default class RichTextList extends React.Component<Props> {\n static slackType = 'RichTextList';\n}\n","import React from 'react';\n\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type Props = {\n children: SingleOrArray<React.ReactElement | string>;\n};\n\nexport default class RichTextQuote extends React.Component<Props> {\n static slackType = 'RichTextQuote';\n}\n","import React from 'react';\n\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type Props = {\n children: SingleOrArray<React.ReactElement | string>;\n};\n\nexport default class RichTextPreformatted extends React.Component<Props> {\n static slackType = 'RichTextPreformatted';\n}\n","import React from 'react';\n\nimport {type RichTextStyle} from './types';\n\nexport type Props = {\n children: string;\n style?: RichTextStyle;\n};\n\nexport default class RichTextText extends React.Component<Props> {\n static slackType = 'RichTextText';\n}\n","import React from 'react';\n\nimport {type RichTextStyle} from './types';\n\nexport type Props = {\n url: string;\n children?: string;\n style?: RichTextStyle;\n};\n\nexport default class RichTextLink extends React.Component<Props> {\n static slackType = 'RichTextLink';\n}\n","import React from 'react';\n\nexport type Props = {\n userId: string;\n};\n\nexport default class RichTextUser extends React.Component<Props> {\n static slackType = 'RichTextUser';\n}\n","import React from 'react';\n\nexport type Props = {\n channelId: string;\n};\n\nexport default class RichTextChannel extends React.Component<Props> {\n static slackType = 'RichTextChannel';\n}\n","import React from 'react';\n\nexport type Props = {\n name: string;\n};\n\nexport default class RichTextEmoji extends React.Component<Props> {\n static slackType = 'RichTextEmoji';\n}\n","import React from 'react';\n\nexport type Props = {\n timestamp: number;\n format: string;\n fallback: string;\n link?: string;\n};\n\nexport default class RichTextDate extends React.Component<Props> {\n static slackType = 'RichTextDate';\n}\n","import React from 'react';\n\nimport {type RichTextBroadcastRange} from './types';\n\nexport type Props = {\n range: RichTextBroadcastRange;\n};\n\nexport default class RichTextBroadcast extends React.Component<Props> {\n static slackType = 'RichTextBroadcast';\n}\n","import React from 'react';\n\nexport type Props = {\n usergroupId: string;\n};\n\nexport default class RichTextUserGroup extends React.Component<Props> {\n static slackType = 'RichTextUserGroup';\n}\n"],"mappings":";AAAA,OAAO,WAAW;AAoBlB,IAAqB,UAArB,cAAqC,MAAM,UAAsB;AAEjE;AAFqB,QACZ,YAAY;;;ACrBrB,OAAOA,YAAW;AAmBlB,IAAqB,SAArB,cAAoCA,OAAM,UAAsB;AAEhE;AAFqB,OACZ,YAAY;;;ACpBrB,OAAOC,YAAW;AAiBlB,IAAqB,eAArB,cAA0CA,OAAM,UAAsB;AAEtE;AAFqB,aACZ,YAAY;;;AClBrB,OAAOC,YAAW;AAOlB,IAAqB,QAArB,cAAmCA,OAAM,UAAiB;AAE1D;AAFqB,MACZ,YAAY;;;ACRrB,OAAOC,YAAW;AASlB,IAAqB,OAArB,cAAkCA,OAAM,UAAiB;AAEzD;AAFqB,KACZ,YAAY;;;ACVrB,OAAOC,YAAW;AAYlB,IAAqB,aAArB,cAAwCA,OAAM,UAAiB;AAE/D;AAFqB,WACZ,YAAY;;;ACbrB,OAAOC,YAAW;AAWlB,IAAqB,iBAArB,cAA4CA,OAAM,UAAiB;AAEnE;AAFqB,eACZ,YAAY;;;ACZrB,OAAOC,YAAW;AAelB,IAAqB,aAArB,cAAwCA,OAAM,UAAiB;AAE/D;AAFqB,WACZ,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cACZ,YAAY;;;ACPrB,OAAOC,aAAW;AASlB,IAAqB,eAArB,cAA0CA,QAAM,UAAiB;AAEjE;AAFqB,aACZ,YAAY;;;ACVrB,OAAOC,aAAW;AAQlB,IAAqB,oBAArB,cAA+CA,QAAM,UAAiB;AAEtE;AAFqB,kBACZ,YAAY;;;ACTrB,OAAOC,aAAW;AAMlB,IAAqB,oBAArB,cAA+CA,QAAM,UAAiB;AAEtE;AAFqB,kBACZ,YAAY;","names":["React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","Image","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/message.tsx","../src/components/block/button.tsx","../src/components/block/confirmation.tsx","../src/components/block/image.tsx","../src/components/block/text.tsx","../src/components/input/date-picker.tsx","../src/components/input/date-time-picker.tsx","../src/components/input/checkboxes.tsx","../src/components/input/option-group.tsx","../src/components/input/option.tsx","../src/components/input/overflow.tsx","../src/components/input/radio-group.tsx","../src/components/input/select.tsx","../src/components/input/text.tsx","../src/components/input/time-picker.tsx","../src/components/layout/actions.tsx","../src/components/layout/context.tsx","../src/components/layout/divider.tsx","../src/components/layout/file.tsx","../src/components/layout/header.tsx","../src/components/layout/image.tsx","../src/components/layout/input.tsx","../src/components/layout/rich-text.tsx","../src/components/layout/section.tsx","../src/components/layout/container.tsx","../src/components/layout/video.tsx","../src/components/rich-text/section.tsx","../src/components/rich-text/list.tsx","../src/components/rich-text/quote.tsx","../src/components/rich-text/preformatted.tsx","../src/components/rich-text/text.tsx","../src/components/rich-text/link.tsx","../src/components/rich-text/user.tsx","../src/components/rich-text/channel.tsx","../src/components/rich-text/emoji.tsx","../src/components/rich-text/date.tsx","../src/components/rich-text/broadcast.tsx","../src/components/rich-text/user-group.tsx"],"sourcesContent":["\nimport {type Child} from '../constants/types';\n\n/**\n * Props for the `<Message>` component.\n *\n * The top-level element required by `render()` / `renderToMessage()`.\n * Add blocks as children; use `text` as a fallback for notifications.\n */\nexport type Properties = {\n children: Child;\n text?: string;\n asUser?: boolean;\n iconEmoji?: string;\n iconUrl?: string;\n markdown?: boolean;\n parse?: 'full' | 'none';\n replyBroadcast?: boolean;\n replyTo?: string;\n unfurlLinks?: boolean;\n unfurlMedia?: boolean;\n username?: string;\n color?: string;\n};\n\n/**\n * Root element for a Slack chat message.\n *\n * Must be the top-level element passed to `render()`.\n * Add layout blocks as children.\n *\n * @example\n * ```tsx\n * render(\n * <Message text=\"Fallback\">\n * <Header text=\"Hello\" />\n * </Message>\n * );\n * ```\n */\nexport default class Message {\n static slackType = 'Message';\n declare props: Properties;\n}\n","\ntype TopProperties = {\n children: string;\n actionId: string;\n url?: string;\n value?: string;\n style?: 'primary' | 'danger';\n accessibilityLabel?: string;\n};\n\nexport type ButtonProps = TopProperties & {\n confirm?: JSX.Element;\n};\n\ntype Properties = ButtonProps;\n\n/**\n * A button element — clickable button used in `<Actions>` blocks or as a\n * `<Section>` accessory.\n *\n * @example\n * ```tsx\n * <Button actionId=\"submit\" style=\"primary\" value=\"yes\">Submit</Button>\n * <Button actionId=\"delete\" style=\"danger\" confirm={confirmDialog}>Delete</Button>\n * <Button actionId=\"docs\" url=\"https://example.com\">View docs</Button>\n * ```\n */\nexport default class Button {\n static slackType = 'Button';\n declare props: Properties;\n}\n","\ntype TopProperties = {\n title: string;\n confirm: string;\n deny: string;\n};\n\n/* This is a dumb workaround to merging props */\nexport type ConfirmationProps = TopProperties & {\n children: JSX.Element;\n};\n\ntype Properties = ConfirmationProps;\n\n/**\n * A confirmation dialog — shown before an interactive action is triggered.\n *\n * Pass a `<Confirmation>` element to the `confirm` prop of interactive\n * elements such as `<Button>`, `<Select>`, `<Overflow>`, etc.\n *\n * @example\n * ```tsx\n * const dialog = (\n * <Confirmation title=\"Are you sure?\" confirm=\"Yes, delete\" deny=\"Cancel\">\n * <Text plainText>This action cannot be undone.</Text>\n * </Confirmation>\n * );\n *\n * <Button actionId=\"delete\" confirm={dialog} style=\"danger\">Delete</Button>\n * ```\n */\nexport default class Confirmation {\n static slackType = 'Confirmation';\n declare props: Properties;\n}\n","\nexport type Props = {\n url: string;\n alt: string;\n};\n\n/**\n * An image element — displays an inline image inside `<Context>` or as a\n * `<Section>` accessory.\n *\n * For a full-width image block, use `<ImageLayout>` instead.\n *\n * @example\n * ```tsx\n * <Context>\n * <Image url=\"https://example.com/icon.png\" alt=\"icon\" />\n * <Text>Some context</Text>\n * </Context>\n * ```\n */\nexport default class Image {\n static slackType = 'Image';\n declare props: Props;\n}\n","\nexport type Props = {\n children: string;\n plainText?: boolean;\n emoji?: boolean;\n verbatim?: boolean;\n};\n\n/**\n * A text object — renders as `mrkdwn` (default) or `plain_text`.\n *\n * Used as the `text` prop on `<Section>`, `<Header>`, inside `<Context>`,\n * and as a child of `<Section>` for fields.\n *\n * @example\n * ```tsx\n * <Text>Hello *world*</Text>\n * <Text plainText emoji>Hello :wave:</Text>\n * ```\n */\nexport default class Text {\n static slackType = 'Text';\n declare props: Props;\n}\n","\nexport type Props = {\n actionId: string;\n placeholder?: string;\n initialDate?: string;\n confirm?: JSX.Element;\n focusOnLoad?: boolean;\n};\n\n/**\n * A date picker — a calendar-style date selector.\n *\n * `initialDate` must be in `YYYY-MM-DD` format.\n *\n * @example\n * ```tsx\n * <Input label=\"Due date\" element={\n * <DatePicker actionId=\"due_date\" initialDate=\"2024-12-31\" />\n * } />\n * ```\n */\nexport default class DatePicker {\n static slackType = 'DatePicker';\n declare props: Props;\n}\n","\nexport type Props = {\n actionId: string;\n initialDateTime?: number;\n confirm?: JSX.Element;\n focusOnLoad?: boolean;\n};\n\n/**\n * A combined date and time picker.\n *\n * `initialDateTime` is a Unix timestamp (seconds since epoch).\n *\n * @example\n * ```tsx\n * <Input label=\"Scheduled at\" element={\n * <DateTimePicker actionId=\"scheduled_at\" initialDateTime={1700000000} />\n * } />\n * ```\n */\nexport default class DateTimePicker {\n static slackType = 'DateTimePicker';\n declare props: Props;\n}\n","\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type Props = {\n actionId: string;\n children: SingleOrArray<JSX.Element>;\n initialOptions?: JSX.Element[];\n confirm?: JSX.Element;\n focusOnLoad?: boolean;\n};\n\n/**\n * A checkbox group — allows multiple selections from a list of options.\n *\n * Pass `<Option>` elements as children. Pre-check options via `initialOptions`.\n *\n * @example\n * ```tsx\n * <Checkboxes actionId=\"prefs\" initialOptions={[slackOption]}>\n * <Option value=\"emails\">Emails</Option>\n * <Option value=\"slack\">Slack</Option>\n * </Checkboxes>\n * ```\n */\nexport default class Checkboxes {\n static slackType = 'Checkboxes';\n declare props: Props;\n}\n","\nexport type Props = {\n label: string;\n children: JSX.Element | JSX.Element[];\n};\n\n/**\n * Groups options under a labeled heading inside a `<Select>`.\n *\n * @example\n * ```tsx\n * <Select placeholder=\"Pick one\" actionId=\"grouped\">\n * <OptionGroup label=\"Fruits\">\n * <Option value=\"apple\">Apple</Option>\n * </OptionGroup>\n * </Select>\n * ```\n */\nexport default class OptionGroup {\n static slackType = 'OptionGroup';\n declare props: Props;\n}\n","\nexport type Props = {\n children: string;\n value: string;\n url?: string;\n description?: string;\n};\n\n/**\n * An option item for `<Select>`, `<Checkboxes>`, `<RadioGroup>`, or `<Overflow>`.\n *\n * The children (text) is the display label; `value` is sent in the action payload.\n *\n * @example\n * ```tsx\n * <Option value=\"opt_a\" description=\"The first option\">Option A</Option>\n * ```\n */\nexport default class Option {\n static slackType = 'Option';\n declare props: Props;\n}\n","\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type Props = {\n actionId: string;\n children: SingleOrArray<JSX.Element>;\n confirm?: JSX.Element;\n};\n\n/**\n * An overflow menu — the \"⋯\" button that reveals a list of options.\n *\n * Requires at least 2 `<Option>` children. Options can include a `url` to open a link.\n *\n * @example\n * ```tsx\n * <Overflow actionId=\"more\">\n * <Option value=\"edit\">Edit</Option>\n * <Option value=\"delete\">Delete</Option>\n * <Option value=\"docs\" url=\"https://example.com/docs\">View docs</Option>\n * </Overflow>\n * ```\n */\nexport default class Overflow {\n static slackType = 'Overflow';\n declare props: Props;\n}\n","\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type Props = {\n actionId: string;\n children: SingleOrArray<JSX.Element>;\n initialOption?: JSX.Element;\n confirm?: JSX.Element;\n focusOnLoad?: boolean;\n};\n\n/**\n * A radio button group — allows exactly one selection from a list of options.\n *\n * Pass `<Option>` elements as children. Pre-select an option via `initialOption`.\n *\n * @example\n * ```tsx\n * <RadioGroup actionId=\"size\" initialOption={<Option value=\"m\">Medium</Option>}>\n * <Option value=\"s\">Small</Option>\n * <Option value=\"m\">Medium</Option>\n * <Option value=\"l\">Large</Option>\n * </RadioGroup>\n * ```\n */\nexport default class RadioGroup {\n static slackType = 'RadioGroup';\n declare props: Props;\n}\n","\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport const selectTypes = {\n STATIC: 'static',\n EXTERNAL: 'external',\n USER: 'user',\n CONVERSATION: 'conversation',\n CHANNEL: 'channel',\n} as const;\n\ntype SelectType = typeof selectTypes[keyof typeof selectTypes];\n\ntype ConversationFilter = {\n include?: Array<'im' | 'mpim' | 'private' | 'public'>;\n excludeExternalSharedChannels?: boolean;\n excludeBotUsers?: boolean;\n};\n\nexport type Props = {\n placeholder: string;\n actionId: string;\n type?: SelectType;\n multi?: boolean;\n children?: SingleOrArray<JSX.Element>;\n initialOptions?: JSX.Element[];\n confirm?: JSX.Element;\n maxSelectedItems?: number;\n minQueryLength?: number;\n focusOnLoad?: boolean;\n initialUsers?: string[];\n initialConversations?: string[];\n initialChannels?: string[];\n defaultToCurrentConversation?: boolean;\n responseUrlEnabled?: boolean;\n filter?: ConversationFilter;\n};\n\n/**\n * A select menu — supports static options, external data sources, and user /\n * channel / conversation lists. Can be single or multi-select.\n *\n * Use the `type` prop to switch data sources (default: `'static'`).\n * Pass `<Option>` or `<OptionGroup>` children for static selects.\n *\n * @example\n * ```tsx\n * // Static single-select\n * <Select placeholder=\"Pick one\" actionId=\"color\">\n * <Option value=\"red\">Red</Option>\n * <Option value=\"blue\">Blue</Option>\n * </Select>\n *\n * // User multi-select\n * <Select type=\"user\" multi placeholder=\"Pick users\" actionId=\"mentions\" />\n * ```\n */\nexport default class Select {\n static slackType = 'Select';\n declare props: Props;\n}\n","\nexport type Props = {\n actionId: string;\n placeholder?: string;\n initial?: string;\n multiline?: boolean;\n minLength?: number;\n maxLength?: number;\n focusOnLoad?: boolean;\n dispatchActionConfig?: {\n triggerActionsOn: Array<'on_enter_pressed' | 'on_character_entered'>;\n };\n};\n\n/**\n * A plain-text input field — used as the `element` prop inside `<Input>`.\n *\n * @example\n * ```tsx\n * <Input label=\"Your name\" element={\n * <TextInput\n * actionId=\"name\"\n * placeholder=\"Jane Doe\"\n * maxLength={80}\n * focusOnLoad\n * />\n * } />\n * ```\n */\nexport default class TextInput {\n static slackType = 'TextInput';\n declare props: Props;\n}\n","\nexport type Props = {\n actionId: string;\n placeholder?: string;\n initialTime?: string;\n confirm?: JSX.Element;\n focusOnLoad?: boolean;\n};\n\n/**\n * A time picker — a clock-style time selector.\n *\n * `initialTime` must be in `HH:mm` (24-hour) format.\n *\n * @example\n * ```tsx\n * <Input label=\"Meeting time\" element={\n * <TimePicker actionId=\"meeting_time\" initialTime=\"09:00\" />\n * } />\n * ```\n */\nexport default class TimePicker {\n static slackType = 'TimePicker';\n declare props: Props;\n}\n","\nimport {type InteractiveBlockElement} from '../../constants/types';\n\nexport type Props = {\n children: InteractiveBlockElement | InteractiveBlockElement[];\n blockId?: string;\n};\n\n/**\n * An actions block — displays interactive elements in a horizontal row.\n *\n * Accepts up to 25 interactive elements as children: `<Button>`, `<Select>`,\n * `<Overflow>`, `<DatePicker>`, `<TimePicker>`, `<DateTimePicker>`.\n *\n * @example\n * ```tsx\n * <Actions>\n * <Button actionId=\"approve\" style=\"primary\">Approve</Button>\n * <Button actionId=\"deny\" style=\"danger\">Deny</Button>\n * </Actions>\n * ```\n */\nexport default class Actions {\n static slackType = 'Actions';\n declare props: Props;\n}\n","\nexport type ImageOrText = JSX.Element;\n\nexport type Props = {\n children: ImageOrText | ImageOrText[];\n blockId?: string;\n};\n\n/**\n * A context block — displays small text and images in a horizontal row.\n *\n * Accepts up to 10 `<Text>` or `<Image>` elements as children.\n *\n * @example\n * ```tsx\n * <Context>\n * <Image url=\"https://example.com/avatar.png\" alt=\"avatar\" />\n * <Text>Posted by *Jane Doe*</Text>\n * </Context>\n * ```\n */\nexport default class Context {\n static slackType = 'Context';\n declare props: Props;\n}\n","\nexport type Props = {\n blockId?: string;\n};\n\n/**\n * A divider block — renders a horizontal rule between blocks.\n *\n * @example\n * ```tsx\n * <Divider />\n * ```\n */\nexport default class Divider {\n static slackType = 'Divider';\n declare props: Props;\n}\n","\nexport type Props = {\n externalId: string;\n blockId?: string;\n};\n\n/**\n * A file block — embeds a remote file that has been shared in Slack.\n *\n * @example\n * ```tsx\n * <File externalId=\"my-report-id\" />\n * ```\n */\nexport default class File {\n static slackType = 'File';\n declare props: Props;\n}\n","\nexport type Props = {\n text: string;\n blockId?: string;\n emoji?: boolean;\n};\n\n/**\n * A header block — displays large, bold plain text at the top of a section.\n *\n * Maximum 150 characters.\n *\n * @example\n * ```tsx\n * <Header text=\"Deploy complete\" emoji />\n * ```\n */\nexport default class Header {\n static slackType = 'Header';\n declare props: Props;\n}\n","\nexport type Props = {\n url: string;\n alt: string;\n title?: string;\n blockId?: string;\n};\n\n/**\n * An image layout block — displays a full-width image.\n *\n * Imported as `ImageLayout` to avoid ambiguity with the `<Image>` element.\n *\n * @example\n * ```tsx\n * import { ImageLayout } from 'slackblock/block';\n *\n * <ImageLayout\n * url=\"https://example.com/chart.png\"\n * alt=\"Sales chart\"\n * title=\"Q4 Results\"\n * />\n * ```\n */\nexport default class Image {\n static slackType = 'ImageLayout';\n declare props: Props;\n}\n","\nimport {type InputBlockElement} from '../../constants/types';\n\nexport type Props = {\n label: string;\n element: InputBlockElement;\n hint?: string;\n optional?: boolean;\n blockId?: string;\n};\n\n/**\n * An input block — wraps a single interactive input element with a label.\n *\n * Pass the input element via the `element` prop (not as a child).\n *\n * @example\n * ```tsx\n * <Input\n * label=\"Your name\"\n * hint=\"Use your full name\"\n * element={<TextInput actionId=\"name\" placeholder=\"Jane Doe\" />}\n * />\n * ```\n */\nexport default class Input {\n static slackType = 'Input';\n declare props: Props;\n}\n","\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type RichTextElement = Record<string, any>;\n\nexport type Props = {\n elements?: RichTextElement[];\n children?: SingleOrArray<JSX.Element | string>;\n blockId?: string;\n};\n\n/**\n * A rich text block — contains formatted text with inline styling, lists,\n * quotes, and preformatted code.\n *\n * Accepts `<RichTextSection>`, `<RichTextList>`, `<RichTextQuote>`, and\n * `<RichTextPreformatted>` as children.\n *\n * @example\n * ```tsx\n * <RichText>\n * <RichTextSection>\n * <RichTextText style={{ bold: true }}>Hello</RichTextText>\n * </RichTextSection>\n * </RichText>\n * ```\n */\nexport default class RichText {\n static slackType = 'RichText';\n declare props: Props;\n}\n","\nimport {type BlockElement} from '../../constants/types';\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\ntype TextElement = JSX.Element;\n\nexport type Props = {\n text: JSX.Element;\n blockId?: string;\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- We actually want to handle null children\n children?: SingleOrArray<TextElement | null | undefined | false>;\n accessory?: BlockElement;\n};\n\n/**\n * A section block — the most versatile layout block.\n *\n * Displays a primary text label, optional two-column fields (children),\n * and an optional accessory element on the right.\n *\n * @example\n * ```tsx\n * <Section\n * text={<Text>Hello *world*</Text>}\n * accessory={<Button actionId=\"more\">More</Button>}\n * >\n * <Text plainText>Field A</Text>\n * <Text plainText>Field B</Text>\n * </Section>\n * ```\n */\nexport default class Section {\n static slackType = 'Section';\n declare props: Props;\n}\n","\nimport {type SingleOrArray} from '../../utils/type-helpers';\nimport {type Child} from '../../constants/types';\n\nexport type Props = {\n children: SingleOrArray<Child>;\n};\n\n/**\n * A pass-through utility component that renders its children without adding\n * any wrapper block. Useful for conditional rendering and mapping arrays\n * without introducing an extra layout layer.\n *\n * @example\n * ```tsx\n * <Message text=\"Hello\">\n * {isAdmin && (\n * <Container>\n * <Section text={<Text>Admin section</Text>} />\n * <Divider />\n * </Container>\n * )}\n * </Message>\n * ```\n */\nexport default class Container {\n static slackType = 'Container';\n declare props: Props;\n}\n","\nexport type Props = {\n title: string;\n videoUrl: string;\n thumbnailUrl: string;\n altText: string;\n titleUrl?: string;\n description?: string;\n authorName?: string;\n providerName?: string;\n providerIconUrl?: string;\n blockId?: string;\n};\n\n/**\n * A video block — embeds an external video with a thumbnail, title, and metadata.\n *\n * @example\n * ```tsx\n * <Video\n * title=\"Product Demo\"\n * videoUrl=\"https://example.com/demo.mp4\"\n * thumbnailUrl=\"https://example.com/thumb.png\"\n * altText=\"Product demo video\"\n * authorName=\"Product Team\"\n * />\n * ```\n */\nexport default class Video {\n static slackType = 'Video';\n declare props: Props;\n}\n","\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type Props = {\n children: SingleOrArray<JSX.Element | string>;\n};\n\n/**\n * An inline container for rich text content within a `<RichText>` block.\n * Also used as individual list items inside `<RichTextList>`.\n *\n * @example\n * ```tsx\n * <RichTextSection>\n * <RichTextText style={{ bold: true }}>Hello</RichTextText>\n * {' world'}\n * </RichTextSection>\n * ```\n */\nexport default class RichTextSection {\n static slackType = 'RichTextSection';\n declare props: Props;\n}\n","\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nimport {type RichTextListStyle} from './types';\n\nexport type Props = {\n style: RichTextListStyle;\n children: SingleOrArray<JSX.Element | string>;\n indent?: number;\n border?: number;\n};\n\n/**\n * A bulleted or numbered list in rich text.\n *\n * Each list item should be a `<RichTextSection>` child.\n * Supports indentation (`indent` 0–6) and border styling.\n *\n * @example\n * ```tsx\n * <RichTextList style=\"bullet\" indent={1}>\n * <RichTextSection><RichTextText>Item one</RichTextText></RichTextSection>\n * <RichTextSection><RichTextText>Item two</RichTextText></RichTextSection>\n * </RichTextList>\n * ```\n */\nexport default class RichTextList {\n static slackType = 'RichTextList';\n declare props: Props;\n}\n","\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type Props = {\n children: SingleOrArray<JSX.Element | string>;\n};\n\n/**\n * A blockquote in rich text — displays content with a visual left-border indent.\n *\n * @example\n * ```tsx\n * <RichTextQuote>\n * <RichTextText>This is a quoted passage.</RichTextText>\n * </RichTextQuote>\n * ```\n */\nexport default class RichTextQuote {\n static slackType = 'RichTextQuote';\n declare props: Props;\n}\n","\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type Props = {\n children: SingleOrArray<JSX.Element | string>;\n};\n\n/**\n * A preformatted code block in rich text — monospaced, no line wrapping.\n *\n * @example\n * ```tsx\n * <RichTextPreformatted>\n * <RichTextText style={{ code: true }}>const x = 1;</RichTextText>\n * </RichTextPreformatted>\n * ```\n */\nexport default class RichTextPreformatted {\n static slackType = 'RichTextPreformatted';\n declare props: Props;\n}\n","\nimport {type RichTextStyle} from './types';\n\nexport type Props = {\n children: string;\n style?: RichTextStyle;\n};\n\n/**\n * Styled text within a rich text block.\n *\n * Apply bold, italic, strikethrough, or inline code styling via `style`.\n *\n * @example\n * ```tsx\n * <RichTextText style={{ bold: true, italic: true }}>Bold italic</RichTextText>\n * <RichTextText style={{ code: true }}>inline code</RichTextText>\n * ```\n */\nexport default class RichTextText {\n static slackType = 'RichTextText';\n declare props: Props;\n}\n","\nimport {type RichTextStyle} from './types';\n\nexport type Props = {\n url: string;\n children?: string;\n style?: RichTextStyle;\n};\n\n/**\n * A hyperlink within rich text. Displays `children` as the link text,\n * or falls back to the URL if `children` is omitted.\n *\n * @example\n * ```tsx\n * <RichTextLink url=\"https://example.com\" style={{ bold: true }}>Visit us</RichTextLink>\n * ```\n */\nexport default class RichTextLink {\n static slackType = 'RichTextLink';\n declare props: Props;\n}\n","\nexport type Props = {\n userId: string;\n};\n\n/**\n * Mentions a Slack user by ID in rich text (renders as `@username`).\n *\n * @example\n * ```tsx\n * <RichTextUser userId=\"U123456\" />\n * ```\n */\nexport default class RichTextUser {\n static slackType = 'RichTextUser';\n declare props: Props;\n}\n","\nexport type Props = {\n channelId: string;\n};\n\n/**\n * Mentions a Slack channel by ID in rich text (renders as `#channel-name`).\n *\n * @example\n * ```tsx\n * <RichTextChannel channelId=\"C123456\" />\n * ```\n */\nexport default class RichTextChannel {\n static slackType = 'RichTextChannel';\n declare props: Props;\n}\n","\nexport type Props = {\n name: string;\n};\n\n/**\n * Renders an emoji by name in rich text.\n *\n * @example\n * ```tsx\n * <RichTextEmoji name=\"wave\" />\n * ```\n */\nexport default class RichTextEmoji {\n static slackType = 'RichTextEmoji';\n declare props: Props;\n}\n","\nexport type Props = {\n timestamp: number;\n format: string;\n fallback: string;\n};\n\n/**\n * Renders a formatted date that adapts to each viewer's local timezone.\n *\n * `timestamp` is a Unix timestamp. `format` uses Slack's date format tokens\n * (e.g. `\"{date_long} at {time}\"`). `fallback` is shown if rendering fails.\n *\n * @see https://api.slack.com/reference/surfaces/formatting#date-formatting\n *\n * @example\n * ```tsx\n * <RichTextDate\n * timestamp={1700000000}\n * format=\"{date_long} at {time}\"\n * fallback=\"Nov 14, 2023 at 22:13\"\n * />\n * ```\n */\nexport default class RichTextDate {\n static slackType = 'RichTextDate';\n declare props: Props;\n}\n","\nimport {type RichTextBroadcastRange} from './types';\n\nexport type Props = {\n range: RichTextBroadcastRange;\n};\n\n/**\n * A `@here`, `@channel`, or `@everyone` broadcast mention in rich text.\n *\n * @example\n * ```tsx\n * <RichTextBroadcast range=\"here\" />\n * ```\n */\nexport default class RichTextBroadcast {\n static slackType = 'RichTextBroadcast';\n declare props: Props;\n}\n","\nexport type Props = {\n usergroupId: string;\n};\n\n/**\n * Mentions a Slack user group by ID in rich text.\n *\n * @example\n * ```tsx\n * <RichTextUserGroup usergroupId=\"S123456\" />\n * ```\n */\nexport default class RichTextUserGroup {\n static slackType = 'RichTextUserGroup';\n declare props: Props;\n}\n"],"mappings":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