slackblock 2.0.0 → 3.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 CHANGED
@@ -1,5 +1,43 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.0.0-beta.0
4
+
5
+ ### Major Changes
6
+
7
+ - 007f656: - **Validation coverage is materially stricter across the supported surface.**
8
+ - Missing required props now raise validation issues for more components in `strict` mode, including `TextInput`, `Overflow`, `File`, block/layout images, `Input`, `Confirmation`, and other supported validated components.
9
+ - `Section` now rejects payloads that provide neither `text` nor `fields` in `strict` mode.
10
+ - Additional Slack count and length limits are now enforced for supported components such as `Overflow`, `Checkboxes`, `RadioGroup`, `Select`, `Button`, `Input`, `Confirmation`, and `Video`.
11
+ - **Validation error matching should use `rule` + `subcode`.**
12
+ - `SlackblockValidationError.rule` now uses stable top-level categories like `required-field`, `too-long`, `too-many`, `invalid-format`, `invalid-structure`, and `unsupported-child`.
13
+ - Previous granular values now live in `subcode`. Consumers matching directly on older `rule` strings should update their logic.
14
+ - **`Section` API corrected to match supported Slack behavior.**
15
+ - Supports `text`, `fields`, `text + fields`, and `expand`.
16
+ - Fields-only sections are supported through the public API.
17
+ - String `text` is serialized directly into a mrkdwn text object.
18
+ - **Warn-mode validation reporting is now configurable.**
19
+ - `RenderOptions.onValidation` receives the normalized `ValidationIssue` object in warn mode.
20
+ - Default `console.warn` behavior remains unchanged when no reporter is provided.
21
+ - Applies to both `render()` and `renderToBlocks()`.
22
+ - **Coverage is now enforced in CI.**
23
+ - Added `test:coverage` and wired it into the CI workflow.
24
+ - **Packed artifact smoke testing is now part of verification.**
25
+ - The package is built, packed, installed into a fixture project, type-checked, and exercised through the JSX runtime.
26
+ - **Public export coverage was expanded.**
27
+ - Root exports, `block`, `jsx-runtime`, and `jsx-dev-runtime` are now explicitly tested.
28
+ - **Validation conformance coverage was expanded.**
29
+ - Supported validated components now have table-driven minimum, invalid, and boundary coverage.
30
+ - **Support coverage is now explicit.**
31
+ - Added a public support matrix and roadmap so the package no longer implies full Block Kit coverage.
32
+ - **Validation docs were rewritten around the current contract.**
33
+ - Includes mode behavior, error shape, stable rules, subcodes, and common failures.
34
+ - **Security and escaping guidance was added.**
35
+ - Documents that Slack `mrkdwn` is not plain text, that `<Text>` defaults to mrkdwn, and that `escapeMrkdwn()` should be used for untrusted content.
36
+ - **Known differences from raw Slack JSON are now documented.**
37
+ - Covers JSX modeling choices, `camelCase` props, `Message.color` attachment wrapping, and helper limitations such as large `blockKitBuilderUrl()` payloads.
38
+ - **Contributor and maintainer process docs were added.**
39
+ - Added a maintainer checklist, Slack-surface issue template, and updated contribution / PR guidance for support-matrix, validation, and semver discipline.
40
+
3
41
  ## 2.0.0
4
42
 
5
43
  ### Major Changes
package/README.md CHANGED
@@ -9,6 +9,8 @@ JSX-based Slack Block Kit message renderer
9
9
 
10
10
  Build Slack messages with JSX. No React required — SlackBlock ships its own lightweight JSX runtime. Write your blocks as components, call `render()`, and post the result straight to the Slack API.
11
11
 
12
+ SlackBlock supports a documented subset of Slack Block Kit rather than the full surface area. See [docs/support-matrix.md](docs/support-matrix.md) for the current coverage and [docs/roadmap.md](docs/roadmap.md) for the main gaps being tracked.
13
+
12
14
  ---
13
15
 
14
16
  ## Compatibility
@@ -127,7 +129,9 @@ const blocks = renderToBlocks(
127
129
 
128
130
  ### `blockKitBuilderUrl(blocks)`
129
131
 
130
- Returns a [Block Kit Builder](https://app.slack.com/block-kit-builder) URL for the given blocks. Open it in a browser to preview layout and interactivity during development.
132
+ Development helper that returns a [Block Kit Builder](https://app.slack.com/block-kit-builder) URL for the given blocks. Open it in a browser to preview layout and interactivity while working on a payload.
133
+
134
+ Because the payload is encoded into the URL fragment, very large payloads can produce impractically long URLs. Treat it as a debugging convenience, not a transport format.
131
135
 
132
136
  ```ts
133
137
  import { renderToBlocks, blockKitBuilderUrl } from 'slackblock';
@@ -139,7 +143,7 @@ console.log(blockKitBuilderUrl(blocks));
139
143
 
140
144
  ### `escapeMrkdwn(text)`
141
145
 
142
- Escapes Slack mrkdwn special characters (`*`, `_`, `~`, `` ` ``, `>`, `&`, `<`, `>`) in a string. Use this when inserting untrusted user content into a mrkdwn text field.
146
+ Escapes Slack mrkdwn special characters in a string. Use it when inserting untrusted user content into mrkdwn text. SlackBlock does not automatically escape every string for you.
143
147
 
144
148
  ```ts
145
149
  import { escapeMrkdwn } from 'slackblock';
@@ -154,6 +158,7 @@ Both `render` / `renderToMessage` / `renderToBlocks` accept an optional `options
154
158
  ```ts
155
159
  type RenderOptions = {
156
160
  validate?: 'off' | 'warn' | 'strict'; // default: 'warn'
161
+ onValidation?: (issue: ValidationIssue) => void; // optional warn-mode reporter
157
162
  channel?: string; // included in the payload; narrows return type to SlackPostMessagePayload
158
163
  user?: string; // requires channel; narrows return type to SlackPostEphemeralPayload
159
164
  };
@@ -165,34 +170,57 @@ See [docs/validation.md](docs/validation.md) for details.
165
170
 
166
171
  ## Validation
167
172
 
168
- SlackBlock validates your message against Slack's documented limits and required fields. The `validate` option controls what happens when a violation is detected:
173
+ SlackBlock validates the supported surface against required fields, documented limits, supported format checks, and a small number of structural rules.
169
174
 
170
175
  | Mode | Behavior |
171
- |------|----------|
172
- | `'warn'` (default) | Logs a warning to `console.warn`; rendering continues |
173
- | `'strict'` | Throws a `SlackblockValidationError` |
174
- | `'off'` | No validation |
176
+ |---|---|
177
+ | `'warn'` (default) | Logs a warning and continues rendering |
178
+ | `'strict'` | Throws `SlackblockValidationError` |
179
+ | `'off'` | Skips validation entirely |
175
180
 
176
181
  ```tsx
177
- // Throw on any violation — recommended for tests
178
- const message = render(<Message>...</Message>, { validate: 'strict' });
182
+ const message = render(<Message>...</Message>, {validate: 'strict'});
179
183
  ```
180
184
 
185
+ `SlackblockValidationError` exposes a stable contract: `message`, `path`, `rule`, optional `subcode`, optional `component`, optional `field`, and the normalized `issue` object.
186
+
187
+ For structured logging in warn mode, pass `onValidation`:
188
+
181
189
  ```ts
182
- import { SlackblockValidationError } from 'slackblock';
183
-
184
- try {
185
- render(<Message>...</Message>, { validate: 'strict' });
186
- } catch (err) {
187
- if (err instanceof SlackblockValidationError) {
188
- console.error(err.message); // "Message > Header: Header text exceeds 150 characters."
189
- console.error(err.path); // ["Message", "Header"]
190
- console.error(err.rule); // "too-long"
191
- }
192
- }
190
+ render(<Message>...</Message>, {
191
+ validate: 'warn',
192
+ onValidation: issue => logger.warn(issue),
193
+ });
194
+ ```
195
+
196
+ See [docs/validation.md](docs/validation.md) for mode guidance, the error contract, rule categories, and common failures.
197
+
198
+ ---
199
+
200
+ ## Security And Escaping
201
+
202
+ Slack `mrkdwn` is not plain text, and `<Text>` defaults to mrkdwn. SlackBlock does not automatically escape every string you pass into mrkdwn-capable content.
203
+
204
+ Use `escapeMrkdwn()` for untrusted or user-generated values:
205
+
206
+ ```ts
207
+ const safe = escapeMrkdwn(userInput);
193
208
  ```
194
209
 
195
- See [docs/validation.md](docs/validation.md) for the full rule reference.
210
+ Use `plainText` when you want Slack `plain_text` semantics instead of mrkdwn formatting. See [docs/security.md](docs/security.md) for the full guidance.
211
+
212
+ ---
213
+
214
+ ## Known Differences From Slack
215
+
216
+ SlackBlock intentionally differs from raw Slack JSON in a few places:
217
+ - it supports an explicit subset of Block Kit rather than the entire Slack surface
218
+ - it uses JSX with `camelCase` props instead of raw `snake_case` JSON
219
+ - `<Text>` defaults to `mrkdwn`, so untrusted text must be escaped explicitly
220
+ - `validate: 'warn'` is the default; invalid input does not always throw
221
+ - `Message.color` uses a legacy attachment wrapper for colored sidebars
222
+
223
+ See [docs/known-differences.md](docs/known-differences.md) for the longer reference.
196
224
 
197
225
  ---
198
226
 
@@ -214,6 +242,19 @@ See [docs/validation.md](docs/validation.md) for the full rule reference.
214
242
  </Select>
215
243
  ```
216
244
 
245
+ `<Section>` also supports an explicit `fields` prop and Slack's `expand` flag:
246
+
247
+ ```tsx
248
+ <Section
249
+ text="Build status"
250
+ fields={[
251
+ <Text plainText>Commit</Text>,
252
+ <Text>{sha}</Text>,
253
+ ]}
254
+ expand
255
+ />
256
+ ```
257
+
217
258
  **Conditional rendering** — Use `<Container>` to wrap elements that may or may not render, or use standard JS short-circuit expressions:
218
259
 
219
260
  ```tsx
@@ -235,26 +276,26 @@ See [docs/validation.md](docs/validation.md) for the full rule reference.
235
276
 
236
277
  ---
237
278
 
238
- ## Supported components
239
-
240
- **Layout blocks:** `Message`, `Section`, `Actions`, `Context`, `Divider`, `File`, `Header`, `Image` (block), `Input`, `RichText`, `Video`
241
-
242
- **Block elements:** `Text`, `Image` (element), `Button`, `Confirmation`
243
-
244
- **Input elements:** `Select`, `Option`, `OptionGroup`, `Overflow`, `Checkboxes`, `RadioGroup`, `TextInput`, `DatePicker`, `TimePicker`, `DateTimePicker`
279
+ ## Support Coverage
245
280
 
246
- **Rich text helpers:** `RichTextSection`, `RichTextList`, `RichTextQuote`, `RichTextPreformatted`, `RichTextText`, `RichTextLink`, `RichTextUser`, `RichTextChannel`, `RichTextEmoji`, `RichTextDate`, `RichTextBroadcast`, `RichTextUserGroup`
281
+ SlackBlock does not try to mirror every Slack Block Kit primitive immediately. The supported subset is explicit:
247
282
 
248
- **Utility:** `Container`
283
+ - supported coverage: [docs/support-matrix.md](docs/support-matrix.md)
284
+ - public component API: [docs/components.md](docs/components.md)
285
+ - planned gaps: [docs/roadmap.md](docs/roadmap.md)
249
286
 
250
- See [docs/components.md](docs/components.md) for the full props reference.
287
+ If a block, element, or composition object is not listed as `Supported` in the support matrix, do not assume it is available.
251
288
 
252
289
  ---
253
290
 
254
291
  ## Further reading
255
292
 
256
293
  - [Component reference](docs/components.md) — all components with props tables
294
+ - [Support matrix](docs/support-matrix.md) — current Block Kit coverage
295
+ - [Roadmap](docs/roadmap.md) — tracked gaps and likely next additions
257
296
  - [Validation guide](docs/validation.md) — validation modes and error handling
297
+ - [Security and escaping](docs/security.md) — handling untrusted text safely
298
+ - [Known differences](docs/known-differences.md) — behavior that differs from raw Slack JSON
258
299
  - [Migrating from jsx-slack](docs/migrating-from-jsx-slack.md)
259
300
  - [Migrating from slack-block-builder](docs/migrating-from-slack-block-builder.md)
260
301
  - [Slack Block Kit reference](https://api.slack.com/block-kit)
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/block.ts","../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":["export * from './components';\n","\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 channel?: string;\n user?: string;\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, unknown>;\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":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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/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":["export * from './components';\n","\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 channel?: string;\n user?: string;\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, unknown>;\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 | string;\ntype FieldElement = JSX.Element | string;\n\nexport type Props = {\n text?: TextElement;\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- We actually want to handle null fields\n fields?: SingleOrArray<FieldElement | null | undefined | false>;\n blockId?: string;\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- We actually want to handle null children\n children?: SingleOrArray<FieldElement | null | undefined | false>;\n accessory?: BlockElement;\n expand?: boolean;\n};\n\n/**\n * A section block — the most versatile layout block.\n *\n * Displays primary text, optional two-column fields, and an optional\n * accessory element on the right.\n *\n * `fields` is the explicit API for section fields. Children are still\n * supported as a backward-compatible alias for fields.\n *\n * At least one of `text` or non-empty `fields` / children is required.\n *\n * @example\n * ```tsx\n * <Section text=\"Hello *world*\" />\n *\n * <Section\n * text={<Text>Hello *world*</Text>}\n * fields={[<Text plainText>Field A</Text>, <Text plainText>Field B</Text>]}\n * accessory={<Button actionId=\"more\">More</Button>}\n * />\n *\n * <Section expand fields={<Text>Status</Text>} />\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":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAAA;AAAA,E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ArB,MAAuC;AAGvC;AAFE,cADmB,mBACZ,aAAY;","names":["Image","Image"]}
package/dist/block.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as Child, I as InteractiveBlockElement, g as InputBlockElement, h as BlockElement } from './types-DhAVIy-s.cjs';
1
+ import { C as Child, I as InteractiveBlockElement, g as InputBlockElement, h as BlockElement } from './types-DfyTK0D6.cjs';
2
2
  import '@slack/types';
3
3
 
4
4
  type Properties$2 = {
@@ -298,12 +298,15 @@ declare class RichText {
298
298
  props: Props$f;
299
299
  }
300
300
 
301
- type TextElement = JSX.Element;
301
+ type TextElement = JSX.Element | string;
302
+ type FieldElement = JSX.Element | string;
302
303
  type Props$e = {
303
- text: JSX.Element;
304
+ text?: TextElement;
305
+ fields?: SingleOrArray<FieldElement | null | undefined | false>;
304
306
  blockId?: string;
305
- children?: SingleOrArray<TextElement | null | undefined | false>;
307
+ children?: SingleOrArray<FieldElement | null | undefined | false>;
306
308
  accessory?: BlockElement;
309
+ expand?: boolean;
307
310
  };
308
311
  declare class Section {
309
312
  static slackType: string;
package/dist/block.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as Child, I as InteractiveBlockElement, g as InputBlockElement, h as BlockElement } from './types-DhAVIy-s.js';
1
+ import { C as Child, I as InteractiveBlockElement, g as InputBlockElement, h as BlockElement } from './types-DfyTK0D6.js';
2
2
  import '@slack/types';
3
3
 
4
4
  type Properties$2 = {
@@ -298,12 +298,15 @@ declare class RichText {
298
298
  props: Props$f;
299
299
  }
300
300
 
301
- type TextElement = JSX.Element;
301
+ type TextElement = JSX.Element | string;
302
+ type FieldElement = JSX.Element | string;
302
303
  type Props$e = {
303
- text: JSX.Element;
304
+ text?: TextElement;
305
+ fields?: SingleOrArray<FieldElement | null | undefined | false>;
304
306
  blockId?: string;
305
- children?: SingleOrArray<TextElement | null | undefined | false>;
307
+ children?: SingleOrArray<FieldElement | null | undefined | false>;
306
308
  accessory?: BlockElement;
309
+ expand?: boolean;
307
310
  };
308
311
  declare class Section {
309
312
  static slackType: string;
@@ -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":["\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 channel?: string;\n user?: string;\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, unknown>;\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":";;;;;AA0CA,IAAqB,UAArB,MAA6B;AAG7B;AAFE,cADmB,SACZ,aAAY;;;AChBrB,IAAqB,SAArB,MAA4B;AAG5B;AAFE,cADmB,QACZ,aAAY;;;ACGrB,IAAqB,eAArB,MAAkC;AAGlC;AAFE,cADmB,cACZ,aAAY;;;ACZrB,IAAqB,QAArB,MAA2B;AAG3B;AAFE,cADmB,OACZ,aAAY;;;ACDrB,IAAqB,OAArB,MAA0B;AAG1B;AAFE,cADmB,MACZ,aAAY;;;ACArB,IAAqB,aAArB,MAAgC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G3B;AAFE,cADmB,OACZ,aAAY;;;ACVrB,IAAqB,kBAArB,MAAqC;AAGrC;AAFE,cADmB,iBACZ,aAAY;;;ACMrB,IAAqB,eAArB,MAAkC;AAGlC;AAFE,cADmB,cACZ,aAAY;;;ACVrB,IAAqB,gBAArB,MAAmC;AAGnC;AAFE,cADmB,eACZ,aAAY;;;ACDrB,IAAqB,uBAArB,MAA0C;AAG1C;AAFE,cADmB,sBACZ,aAAY;;;ACCrB,IAAqB,eAArB,MAAkC;AAGlC;AAFE,cADmB,cACZ,aAAY;;;ACFrB,IAAqB,eAArB,MAAkC;AAGlC;AAFE,cADmB,cACZ,aAAY;;;ACNrB,IAAqB,eAArB,MAAkC;AAGlC;AAFE,cADmB,cACZ,aAAY;;;ACDrB,IAAqB,kBAArB,MAAqC;AAGrC;AAFE,cADmB,iBACZ,aAAY;;;ACDrB,IAAqB,gBAArB,MAAmC;AAGnC;AAFE,cADmB,eACZ,aAAY;;;ACUrB,IAAqB,eAArB,MAAkC;AAGlC;AAFE,cADmB,cACZ,aAAY;;;ACVrB,IAAqB,oBAArB,MAAuC;AAGvC;AAFE,cADmB,mBACZ,aAAY;;;ACHrB,IAAqB,oBAArB,MAAuC;AAGvC;AAFE,cADmB,mBACZ,aAAY;","names":["Image"]}
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 channel?: string;\n user?: string;\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, unknown>;\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 | string;\ntype FieldElement = JSX.Element | string;\n\nexport type Props = {\n text?: TextElement;\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- We actually want to handle null fields\n fields?: SingleOrArray<FieldElement | null | undefined | false>;\n blockId?: string;\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- We actually want to handle null children\n children?: SingleOrArray<FieldElement | null | undefined | false>;\n accessory?: BlockElement;\n expand?: boolean;\n};\n\n/**\n * A section block — the most versatile layout block.\n *\n * Displays primary text, optional two-column fields, and an optional\n * accessory element on the right.\n *\n * `fields` is the explicit API for section fields. Children are still\n * supported as a backward-compatible alias for fields.\n *\n * At least one of `text` or non-empty `fields` / children is required.\n *\n * @example\n * ```tsx\n * <Section text=\"Hello *world*\" />\n *\n * <Section\n * text={<Text>Hello *world*</Text>}\n * fields={[<Text plainText>Field A</Text>, <Text plainText>Field B</Text>]}\n * accessory={<Button actionId=\"more\">More</Button>}\n * />\n *\n * <Section expand fields={<Text>Status</Text>} />\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":";;;;;AA0CA,IAAqB,UAArB,MAA6B;AAG7B;AAFE,cADmB,SACZ,aAAY;;;AChBrB,IAAqB,SAArB,MAA4B;AAG5B;AAFE,cADmB,QACZ,aAAY;;;ACGrB,IAAqB,eAArB,MAAkC;AAGlC;AAFE,cADmB,cACZ,aAAY;;;ACZrB,IAAqB,QAArB,MAA2B;AAG3B;AAFE,cADmB,OACZ,aAAY;;;ACDrB,IAAqB,OAArB,MAA0B;AAG1B;AAFE,cADmB,MACZ,aAAY;;;ACArB,IAAqB,aAArB,MAAgC;AAGhC;AAFE,cADmB,YACZ,aAAY;;;ACFrB,IAAqB,iBAArB,MAAoC;AAGpC;AAFE,cADmB,gBACZ,aAAY;;;ACGrB,IAAqB,aAArB,MAAgC;AAGhC;AAFE,cADmB,YACZ,aAAY;;;ACPrB,IAAqB,cAArB,MAAiC;AAGjC;AAFE,cADmB,aACZ,aAAY;;;ACD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