slackblock 0.4.0 → 1.0.0-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.
Files changed (139) hide show
  1. package/CHANGELOG.md +33 -26
  2. package/LICENSE +21 -21
  3. package/README.md +95 -85
  4. package/dist/block.cjs +341 -0
  5. package/dist/block.cjs.map +1 -0
  6. package/dist/block.d.mts +412 -0
  7. package/dist/block.d.ts +412 -0
  8. package/dist/block.mjs +268 -0
  9. package/dist/block.mjs.map +1 -0
  10. package/dist/index.cjs +1202 -0
  11. package/dist/index.cjs.map +1 -0
  12. package/dist/index.d.mts +6 -0
  13. package/dist/index.d.ts +6 -0
  14. package/dist/index.mjs +1170 -0
  15. package/dist/index.mjs.map +1 -0
  16. package/dist/types.d-DgQXbJte.d.mts +296 -0
  17. package/dist/types.d-DgQXbJte.d.ts +296 -0
  18. package/package.json +85 -135
  19. package/blocks.js +0 -12
  20. package/index.js +0 -7
  21. package/lib/components/block/button.js +0 -27
  22. package/lib/components/block/confirmation.js +0 -27
  23. package/lib/components/block/image.js +0 -27
  24. package/lib/components/block/text.js +0 -27
  25. package/lib/components/index.js +0 -42
  26. package/lib/components/input/date-picker.js +0 -27
  27. package/lib/components/input/option-group.js +0 -27
  28. package/lib/components/input/option.js +0 -27
  29. package/lib/components/input/overflow.js +0 -27
  30. package/lib/components/input/radio-group.js +0 -27
  31. package/lib/components/input/select.js +0 -34
  32. package/lib/components/input/text.js +0 -27
  33. package/lib/components/layout/actions.js +0 -27
  34. package/lib/components/layout/container.js +0 -27
  35. package/lib/components/layout/context.js +0 -27
  36. package/lib/components/layout/divider.js +0 -27
  37. package/lib/components/layout/file.js +0 -27
  38. package/lib/components/layout/image.js +0 -27
  39. package/lib/components/layout/input.js +0 -27
  40. package/lib/components/layout/section.js +0 -27
  41. package/lib/components/message.js +0 -27
  42. package/lib/index.js +0 -7
  43. package/lib/parser/index.js +0 -32
  44. package/lib/renderer/index.js +0 -71
  45. package/lib/transformers/block/button.js +0 -29
  46. package/lib/transformers/block/confirmation.js +0 -18
  47. package/lib/transformers/block/image.js +0 -10
  48. package/lib/transformers/block/text.js +0 -16
  49. package/lib/transformers/index.js +0 -54
  50. package/lib/transformers/input/date-picker.js +0 -30
  51. package/lib/transformers/input/option-group.js +0 -19
  52. package/lib/transformers/input/option.js +0 -19
  53. package/lib/transformers/input/overflow.js +0 -19
  54. package/lib/transformers/input/radio-group.js +0 -22
  55. package/lib/transformers/input/select.js +0 -84
  56. package/lib/transformers/input/text.js +0 -31
  57. package/lib/transformers/layout/actions.js +0 -18
  58. package/lib/transformers/layout/container.js +0 -11
  59. package/lib/transformers/layout/context.js +0 -18
  60. package/lib/transformers/layout/divider.js +0 -10
  61. package/lib/transformers/layout/file.js +0 -14
  62. package/lib/transformers/layout/image.js +0 -23
  63. package/lib/transformers/layout/input.js +0 -26
  64. package/lib/transformers/layout/section.js +0 -31
  65. package/lib/utils/get-type.js +0 -16
  66. package/lib/utils/type-helpers.js +0 -2
  67. package/src/components/block/button.tsx +0 -20
  68. package/src/components/block/confirmation.tsx +0 -19
  69. package/src/components/block/image.tsx +0 -8
  70. package/src/components/block/text.tsx +0 -10
  71. package/src/components/index.ts +0 -23
  72. package/src/components/input/date-picker.tsx +0 -11
  73. package/src/components/input/option-group.tsx +0 -9
  74. package/src/components/input/option.tsx +0 -9
  75. package/src/components/input/overflow.tsx +0 -12
  76. package/src/components/input/radio-group.tsx +0 -13
  77. package/src/components/input/select.tsx +0 -36
  78. package/src/components/input/text.tsx +0 -12
  79. package/src/components/layout/actions.tsx +0 -9
  80. package/src/components/layout/container.tsx +0 -9
  81. package/src/components/layout/context.tsx +0 -12
  82. package/src/components/layout/divider.tsx +0 -7
  83. package/src/components/layout/file.tsx +0 -8
  84. package/src/components/layout/image.tsx +0 -10
  85. package/src/components/layout/input.tsx +0 -12
  86. package/src/components/layout/section.tsx +0 -15
  87. package/src/components/message.tsx +0 -20
  88. package/src/constants/types.d.ts +0 -93
  89. package/src/index.ts +0 -3
  90. package/src/parser/index.ts +0 -32
  91. package/src/renderer/index.ts +0 -75
  92. package/src/transformers/block/button.tsx +0 -47
  93. package/src/transformers/block/confirmation.tsx +0 -26
  94. package/src/transformers/block/image.ts +0 -18
  95. package/src/transformers/block/text.ts +0 -34
  96. package/src/transformers/index.ts +0 -65
  97. package/src/transformers/input/date-picker.tsx +0 -43
  98. package/src/transformers/input/option-group.tsx +0 -26
  99. package/src/transformers/input/option.tsx +0 -27
  100. package/src/transformers/input/overflow.ts +0 -33
  101. package/src/transformers/input/radio-group.ts +0 -38
  102. package/src/transformers/input/select.tsx +0 -136
  103. package/src/transformers/input/text.tsx +0 -47
  104. package/src/transformers/layout/actions.ts +0 -29
  105. package/src/transformers/layout/container.ts +0 -16
  106. package/src/transformers/layout/context.ts +0 -35
  107. package/src/transformers/layout/divider.ts +0 -20
  108. package/src/transformers/layout/file.ts +0 -24
  109. package/src/transformers/layout/image.tsx +0 -34
  110. package/src/transformers/layout/input.tsx +0 -39
  111. package/src/transformers/layout/section.ts +0 -53
  112. package/src/tsconfig.json +0 -11
  113. package/src/utils/get-type.ts +0 -20
  114. package/src/utils/type-helpers.ts +0 -1
  115. package/test/index.test.tsx +0 -11
  116. package/test/parser/parser.test.tsx +0 -67
  117. package/test/renderer/renderer.test.tsx +0 -138
  118. package/test/transformers/block/button.test.tsx +0 -63
  119. package/test/transformers/block/confirmation.test.tsx +0 -37
  120. package/test/transformers/block/image.test.tsx +0 -20
  121. package/test/transformers/block/text.test.tsx +0 -32
  122. package/test/transformers/input/date-picker.test.tsx +0 -66
  123. package/test/transformers/input/option-group.test.tsx +0 -26
  124. package/test/transformers/input/option.test.tsx +0 -36
  125. package/test/transformers/input/overflow.test.tsx +0 -57
  126. package/test/transformers/input/radio-group.test.tsx +0 -81
  127. package/test/transformers/input/select.test.tsx +0 -249
  128. package/test/transformers/input/text.test.tsx +0 -42
  129. package/test/transformers/layout/actions.test.tsx +0 -33
  130. package/test/transformers/layout/container.test.tsx +0 -34
  131. package/test/transformers/layout/context.test.tsx +0 -43
  132. package/test/transformers/layout/divider.test.tsx +0 -20
  133. package/test/transformers/layout/file.test.tsx +0 -26
  134. package/test/transformers/layout/image.test.tsx +0 -43
  135. package/test/transformers/layout/input.test.tsx +0 -59
  136. package/test/transformers/layout/section.test.tsx +0 -89
  137. package/test/tsconfig.json +0 -9
  138. package/test/utils/get-type.test.tsx +0 -21
  139. package/tsconfig.json +0 -14
@@ -0,0 +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","import React from 'react';\n\nimport {type Element} from '../constants/types';\n\ntype Properties = {\n children: string | Element | Element[];\n text?: string;\n asUser?: boolean;\n iconEmoji?: string;\n iconUrl?: string;\n markdown?: boolean;\n parse?: 'full' | 'none';\n replyBroadcast?: boolean;\n replyTo?: string;\n unfurlLinks?: boolean;\n unfurlMedia?: boolean;\n username?: string;\n color?: string;\n};\n\nexport default class Message extends React.Component<Properties> {\n static slackType = 'Message';\n}\n","import React from 'react';\n\nimport type Confirmation from './confirmation';\n\ntype TopProperties = {\n children: string;\n actionId: string;\n url?: string;\n value?: string;\n style?: 'primary' | 'danger';\n accessibilityLabel?: string;\n};\n\nexport type ButtonProps = TopProperties & {\n confirm?: React.ReactElement<Confirmation>;\n};\n\ntype Properties = ButtonProps;\n\nexport default class Button extends React.Component<Properties> {\n static slackType = 'Button';\n}\n","import React from 'react';\n\nimport type Text from './text';\n\ntype TopProperties = {\n title: string;\n confirm: string;\n deny: string;\n};\n\n/* This is a dumb workaround to merging props */\nexport type ConfirmationProps = TopProperties & {\n children: React.ReactElement<Text>;\n};\n\ntype Properties = ConfirmationProps;\n\nexport default class Confirmation extends React.Component<Properties> {\n static slackType = 'Confirmation';\n}\n","import React from 'react';\n\nexport type Props = {\n url: string;\n alt: string;\n};\n\nexport default class Image extends React.Component<Props> {\n static slackType = 'Image';\n}\n","import React from 'react';\n\nexport type Props = {\n children: string;\n plainText?: boolean;\n emoji?: boolean;\n verbatim?: boolean;\n};\n\nexport default class Text extends React.Component<Props> {\n static slackType = 'Text';\n}\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\n\nexport type Props = {\n actionId: string;\n placeholder?: string;\n initialDate?: string;\n confirm?: React.ReactElement<Confirmation>;\n focusOnLoad?: boolean;\n};\n\nexport default class DatePicker extends React.Component<Props> {\n static slackType = 'DatePicker';\n}\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\n\nexport type Props = {\n actionId: string;\n initialDateTime?: number;\n confirm?: React.ReactElement<Confirmation>;\n focusOnLoad?: boolean;\n};\n\nexport default class DateTimePicker extends React.Component<Props> {\n static slackType = 'DateTimePicker';\n}\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nimport type Option from './option';\n\nexport type Props = {\n actionId: string;\n children: SingleOrArray<React.ReactElement<Option>>;\n initialOptions?: Array<React.ReactElement<Option>>;\n confirm?: React.ReactElement<Confirmation>;\n focusOnLoad?: boolean;\n};\n\nexport default class Checkboxes extends React.Component<Props> {\n static slackType = 'Checkboxes';\n}\n","import React from 'react';\n\nimport type Option from './option';\n\nexport type Props = {\n label: string;\n children: React.ReactElement<Option> | Array<React.ReactElement<Option>>;\n};\n\nexport default class OptionGroup extends React.Component<Props> {\n static slackType = 'OptionGroup';\n}\n","import React from 'react';\n\nexport type Props = {\n children: string;\n value: string;\n url?: string;\n description?: string;\n};\n\nexport default class Option extends React.Component<Props> {\n static slackType = 'Option';\n}\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nimport type Option from './option';\n\nexport type Props = {\n actionId: string;\n children: SingleOrArray<React.ReactElement<Option>>;\n confirm?: React.ReactElement<Confirmation>;\n};\n\nexport default class Overflow extends React.Component<Props> {\n static slackType = 'Overflow';\n}\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nimport type Option from './option';\n\nexport type Props = {\n actionId: string;\n children: SingleOrArray<React.ReactElement<Option>>;\n initialOption?: React.ReactElement<Option>;\n confirm?: React.ReactElement<Confirmation>;\n focusOnLoad?: boolean;\n};\n\nexport default class RadioGroup extends React.Component<Props> {\n static slackType = 'RadioGroup';\n}\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nimport type Option from './option';\nimport type OptionGroup from './option-group';\n\nexport const selectTypes = {\n STATIC: 'static',\n EXTERNAL: 'external',\n USER: 'user',\n CONVERSATION: 'conversation',\n CHANNEL: 'channel',\n} as const;\n\ntype SelectType = typeof selectTypes[keyof typeof selectTypes];\n\ntype ConversationFilter = {\n include?: Array<'im' | 'mpim' | 'private' | 'public'>;\n excludeExternalSharedChannels?: boolean;\n excludeBotUsers?: boolean;\n};\n\nexport type Props = {\n placeholder: string;\n actionId: string;\n type?: SelectType;\n multi?: boolean;\n children?: SingleOrArray<React.ReactElement<Option>> | SingleOrArray<React.ReactElement<OptionGroup>>;\n initialOptions?: Array<React.ReactElement<Option>>;\n confirm?: React.ReactElement<Confirmation>;\n maxSelectedItems?: number;\n minQueryLength?: number;\n focusOnLoad?: boolean;\n initialUsers?: string[];\n initialConversations?: string[];\n initialChannels?: string[];\n defaultToCurrentConversation?: boolean;\n responseUrlEnabled?: boolean;\n filter?: ConversationFilter;\n};\n\nexport default class Select extends React.Component<Props> {\n static slackType = 'Select';\n}\n","import React from 'react';\n\nexport type Props = {\n actionId: string;\n placeholder?: string;\n initial?: string;\n multiline?: boolean;\n minLength?: number;\n maxLength?: number;\n focusOnLoad?: boolean;\n dispatchActionConfig?: {\n triggerActionsOn: Array<'on_enter_pressed' | 'on_character_entered'>;\n };\n};\n\nexport default class TextInput extends React.Component<Props> {\n static slackType = 'TextInput';\n}\n","import React from 'react';\n\nimport type Confirmation from '../block/confirmation';\n\nexport type Props = {\n actionId: string;\n placeholder?: string;\n initialTime?: string;\n confirm?: React.ReactElement<Confirmation>;\n focusOnLoad?: boolean;\n};\n\nexport default class TimePicker extends React.Component<Props> {\n static slackType = 'TimePicker';\n}\n","import React from 'react';\n\nimport {type InteractiveBlockElement} from '../../constants/types';\n\nexport type Props = {\n children: InteractiveBlockElement | InteractiveBlockElement[];\n blockId?: string;\n};\n\nexport default class Actions extends React.Component<Props> {\n static slackType = 'Actions';\n}\n","import React from 'react';\n\nimport type Text from '../block/text';\nimport type Image from '../block/image';\n\nexport type ImageOrText = React.ReactElement<Text> | React.ReactElement<Image>;\n\nexport type Props = {\n children: ImageOrText | ImageOrText[];\n blockId?: string;\n};\n\nexport default class Context extends React.Component<Props> {\n static slackType = 'Context';\n}\n","import React from 'react';\n\nexport type Props = {\n blockId?: string;\n};\n\nexport default class Divider extends React.Component<Props> {\n static slackType = 'Divider';\n}\n","import React from 'react';\n\nexport type Props = {\n externalId: string;\n blockId?: string;\n};\n\nexport default class File extends React.Component<Props> {\n static slackType = 'File';\n}\n","import React from 'react';\n\nexport type Props = {\n text: string;\n blockId?: string;\n emoji?: boolean;\n};\n\nexport default class Header extends React.Component<Props> {\n static slackType = 'Header';\n}\n","import React from 'react';\n\nexport type Props = {\n url: string;\n alt: string;\n title?: string;\n blockId?: string;\n};\n\nexport default class Image extends React.Component<Props> {\n static slackType = 'ImageLayout';\n}\n","import React from 'react';\n\nimport {type InputBlockElement} from '../../constants/types';\n\nexport type Props = {\n label: string;\n element: InputBlockElement;\n hint?: string;\n optional?: boolean;\n blockId?: string;\n};\n\nexport default class Input extends React.Component<Props> {\n static slackType = 'Input';\n}\n","import React from 'react';\n\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type RichTextElement = Record<string, any>;\n\nexport type Props = {\n elements?: RichTextElement[];\n children?: SingleOrArray<React.ReactElement | string>;\n blockId?: string;\n};\n\nexport default class RichText extends React.Component<Props> {\n static slackType = 'RichText';\n}\n","import React from 'react';\n\nimport type Text from '../block/text';\nimport {type BlockElement} from '../../constants/types';\n\ntype TextElement = React.ReactElement<Text>;\n\nexport type Props = {\n text: React.ReactElement<Text>;\n blockId?: string;\n children?: TextElement | TextElement[];\n accessory?: BlockElement;\n};\n\nexport default class Section extends React.Component<Props> {\n static slackType = 'Section';\n}\n\n","import React from 'react';\n\nimport {type SingleOrArray} from '../../utils/type-helpers';\nimport {type Child} from '../../constants/types';\n\nexport type Props = {\n children: SingleOrArray<Child>;\n};\n\nexport default class Container extends React.Component<Props> {\n static slackType = 'Container';\n}\n","import React from 'react';\n\nexport type Props = {\n title: string;\n videoUrl: string;\n thumbnailUrl: string;\n altText: string;\n titleUrl?: string;\n description?: string;\n authorName?: string;\n providerName?: string;\n providerIconUrl?: string;\n blockId?: string;\n};\n\nexport default class Video extends React.Component<Props> {\n static slackType = 'Video';\n}\n","import React from 'react';\n\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type Props = {\n children: SingleOrArray<React.ReactElement | string>;\n};\n\nexport default class RichTextSection extends React.Component<Props> {\n static slackType = 'RichTextSection';\n}\n","import React from 'react';\n\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nimport {type RichTextListStyle} from './types';\n\nexport type Props = {\n style: RichTextListStyle;\n children: SingleOrArray<React.ReactElement | string>;\n indent?: number;\n border?: number;\n};\n\nexport default class RichTextList extends React.Component<Props> {\n static slackType = 'RichTextList';\n}\n","import React from 'react';\n\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type Props = {\n children: SingleOrArray<React.ReactElement | string>;\n};\n\nexport default class RichTextQuote extends React.Component<Props> {\n static slackType = 'RichTextQuote';\n}\n","import React from 'react';\n\nimport {type SingleOrArray} from '../../utils/type-helpers';\n\nexport type Props = {\n children: SingleOrArray<React.ReactElement | string>;\n};\n\nexport default class RichTextPreformatted extends React.Component<Props> {\n static slackType = 'RichTextPreformatted';\n}\n","import React from 'react';\n\nimport {type RichTextStyle} from './types';\n\nexport type Props = {\n children: string;\n style?: RichTextStyle;\n};\n\nexport default class RichTextText extends React.Component<Props> {\n static slackType = 'RichTextText';\n}\n","import React from 'react';\n\nimport {type RichTextStyle} from './types';\n\nexport type Props = {\n url: string;\n children?: string;\n style?: RichTextStyle;\n};\n\nexport default class RichTextLink extends React.Component<Props> {\n static slackType = 'RichTextLink';\n}\n","import React from 'react';\n\nexport type Props = {\n userId: string;\n};\n\nexport default class RichTextUser extends React.Component<Props> {\n static slackType = 'RichTextUser';\n}\n","import React from 'react';\n\nexport type Props = {\n channelId: string;\n};\n\nexport default class RichTextChannel extends React.Component<Props> {\n static slackType = 'RichTextChannel';\n}\n","import React from 'react';\n\nexport type Props = {\n name: string;\n};\n\nexport default class RichTextEmoji extends React.Component<Props> {\n static slackType = 'RichTextEmoji';\n}\n","import React from 'react';\n\nexport type Props = {\n timestamp: number;\n format: string;\n fallback: string;\n link?: string;\n};\n\nexport default class RichTextDate extends React.Component<Props> {\n static slackType = 'RichTextDate';\n}\n","import React from 'react';\n\nimport {type RichTextBroadcastRange} from './types';\n\nexport type Props = {\n range: RichTextBroadcastRange;\n};\n\nexport default class RichTextBroadcast extends React.Component<Props> {\n static slackType = 'RichTextBroadcast';\n}\n","import React from 'react';\n\nexport type Props = {\n usergroupId: string;\n};\n\nexport default class RichTextUserGroup extends React.Component<Props> {\n static slackType = 'RichTextUserGroup';\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkB;AAoBlB,IAAqB,UAArB,cAAqC,aAAAC,QAAM,UAAsB;AAEjE;AAFqB,QACZ,YAAY;;;ACrBrB,IAAAC,gBAAkB;AAmBlB,IAAqB,SAArB,cAAoC,cAAAC,QAAM,UAAsB;AAEhE;AAFqB,OACZ,YAAY;;;ACpBrB,IAAAC,gBAAkB;AAiBlB,IAAqB,eAArB,cAA0C,cAAAC,QAAM,UAAsB;AAEtE;AAFqB,aACZ,YAAY;;;AClBrB,IAAAC,gBAAkB;AAOlB,IAAqB,QAArB,cAAmC,cAAAC,QAAM,UAAiB;AAE1D;AAFqB,MACZ,YAAY;;;ACRrB,IAAAC,gBAAkB;AASlB,IAAqB,OAArB,cAAkC,cAAAC,QAAM,UAAiB;AAEzD;AAFqB,KACZ,YAAY;;;ACVrB,IAAAC,gBAAkB;AAYlB,IAAqB,aAArB,cAAwC,cAAAC,QAAM,UAAiB;AAE/D;AAFqB,WACZ,YAAY;;;ACbrB,IAAAC,gBAAkB;AAWlB,IAAqB,iBAArB,cAA4C,cAAAC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IAAqB,eAArB,cAA0C,eAAAC,QAAM,UAAiB;AAEjE;AAFqB,aACZ,YAAY;;;ACXrB,IAAAC,iBAAkB;AAMlB,IAAqB,eAArB,cAA0C,eAAAC,QAAM,UAAiB;AAEjE;AAFqB,aACZ,YAAY;;;ACPrB,IAAAC,iBAAkB;AAMlB,IAAqB,kBAArB,cAA6C,eAAAC,QAAM,UAAiB;AAEpE;AAFqB,gBACZ,YAAY;;;ACPrB,IAAAC,iBAAkB;AAMlB,IAAqB,gBAArB,cAA2C,eAAAC,QAAM,UAAiB;AAElE;AAFqB,cACZ,YAAY;;;ACPrB,IAAAC,iBAAkB;AASlB,IAAqB,eAArB,cAA0C,eAAAC,QAAM,UAAiB;AAEjE;AAFqB,aACZ,YAAY;;;ACVrB,IAAAC,iBAAkB;AAQlB,IAAqB,oBAArB,cAA+C,eAAAC,QAAM,UAAiB;AAEtE;AAFqB,kBACZ,YAAY;;;ACTrB,IAAAC,iBAAkB;AAMlB,IAAqB,oBAArB,cAA+C,eAAAC,QAAM,UAAiB;AAEtE;AAFqB,kBACZ,YAAY;","names":["Image","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","Image","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React","import_react","React"]}
@@ -0,0 +1,412 @@
1
+ import React from 'react';
2
+ import { E as Element, I as InteractiveBlockElement, a as InputBlockElement, B as BlockElement, C as Child } from './types.d-DgQXbJte.mjs';
3
+
4
+ type Properties$2 = {
5
+ children: string | Element | Element[];
6
+ text?: string;
7
+ asUser?: boolean;
8
+ iconEmoji?: string;
9
+ iconUrl?: string;
10
+ markdown?: boolean;
11
+ parse?: 'full' | 'none';
12
+ replyBroadcast?: boolean;
13
+ replyTo?: string;
14
+ unfurlLinks?: boolean;
15
+ unfurlMedia?: boolean;
16
+ username?: string;
17
+ color?: string;
18
+ };
19
+ declare class Message extends React.Component<Properties$2> {
20
+ static slackType: string;
21
+ }
22
+
23
+ type Props$y = {
24
+ children: string;
25
+ plainText?: boolean;
26
+ emoji?: boolean;
27
+ verbatim?: boolean;
28
+ };
29
+ declare class Text extends React.Component<Props$y> {
30
+ static slackType: string;
31
+ }
32
+
33
+ type TopProperties$1 = {
34
+ title: string;
35
+ confirm: string;
36
+ deny: string;
37
+ };
38
+ type ConfirmationProps = TopProperties$1 & {
39
+ children: React.ReactElement<Text>;
40
+ };
41
+ type Properties$1 = ConfirmationProps;
42
+ declare class Confirmation extends React.Component<Properties$1> {
43
+ static slackType: string;
44
+ }
45
+
46
+ type TopProperties = {
47
+ children: string;
48
+ actionId: string;
49
+ url?: string;
50
+ value?: string;
51
+ style?: 'primary' | 'danger';
52
+ accessibilityLabel?: string;
53
+ };
54
+ type ButtonProps = TopProperties & {
55
+ confirm?: React.ReactElement<Confirmation>;
56
+ };
57
+ type Properties = ButtonProps;
58
+ declare class Button extends React.Component<Properties> {
59
+ static slackType: string;
60
+ }
61
+
62
+ type Props$x = {
63
+ url: string;
64
+ alt: string;
65
+ };
66
+ declare class Image$1 extends React.Component<Props$x> {
67
+ static slackType: string;
68
+ }
69
+
70
+ type Props$w = {
71
+ actionId: string;
72
+ placeholder?: string;
73
+ initialDate?: string;
74
+ confirm?: React.ReactElement<Confirmation>;
75
+ focusOnLoad?: boolean;
76
+ };
77
+ declare class DatePicker extends React.Component<Props$w> {
78
+ static slackType: string;
79
+ }
80
+
81
+ type Props$v = {
82
+ actionId: string;
83
+ initialDateTime?: number;
84
+ confirm?: React.ReactElement<Confirmation>;
85
+ focusOnLoad?: boolean;
86
+ };
87
+ declare class DateTimePicker extends React.Component<Props$v> {
88
+ static slackType: string;
89
+ }
90
+
91
+ type SingleOrArray<T> = T | T[];
92
+
93
+ type Props$u = {
94
+ children: string;
95
+ value: string;
96
+ url?: string;
97
+ description?: string;
98
+ };
99
+ declare class Option extends React.Component<Props$u> {
100
+ static slackType: string;
101
+ }
102
+
103
+ type Props$t = {
104
+ actionId: string;
105
+ children: SingleOrArray<React.ReactElement<Option>>;
106
+ initialOptions?: Array<React.ReactElement<Option>>;
107
+ confirm?: React.ReactElement<Confirmation>;
108
+ focusOnLoad?: boolean;
109
+ };
110
+ declare class Checkboxes extends React.Component<Props$t> {
111
+ static slackType: string;
112
+ }
113
+
114
+ type Props$s = {
115
+ label: string;
116
+ children: React.ReactElement<Option> | Array<React.ReactElement<Option>>;
117
+ };
118
+ declare class OptionGroup extends React.Component<Props$s> {
119
+ static slackType: string;
120
+ }
121
+
122
+ type Props$r = {
123
+ actionId: string;
124
+ children: SingleOrArray<React.ReactElement<Option>>;
125
+ confirm?: React.ReactElement<Confirmation>;
126
+ };
127
+ declare class Overflow extends React.Component<Props$r> {
128
+ static slackType: string;
129
+ }
130
+
131
+ type Props$q = {
132
+ actionId: string;
133
+ children: SingleOrArray<React.ReactElement<Option>>;
134
+ initialOption?: React.ReactElement<Option>;
135
+ confirm?: React.ReactElement<Confirmation>;
136
+ focusOnLoad?: boolean;
137
+ };
138
+ declare class RadioGroup extends React.Component<Props$q> {
139
+ static slackType: string;
140
+ }
141
+
142
+ declare const selectTypes: {
143
+ readonly STATIC: "static";
144
+ readonly EXTERNAL: "external";
145
+ readonly USER: "user";
146
+ readonly CONVERSATION: "conversation";
147
+ readonly CHANNEL: "channel";
148
+ };
149
+ type SelectType = typeof selectTypes[keyof typeof selectTypes];
150
+ type ConversationFilter = {
151
+ include?: Array<'im' | 'mpim' | 'private' | 'public'>;
152
+ excludeExternalSharedChannels?: boolean;
153
+ excludeBotUsers?: boolean;
154
+ };
155
+ type Props$p = {
156
+ placeholder: string;
157
+ actionId: string;
158
+ type?: SelectType;
159
+ multi?: boolean;
160
+ children?: SingleOrArray<React.ReactElement<Option>> | SingleOrArray<React.ReactElement<OptionGroup>>;
161
+ initialOptions?: Array<React.ReactElement<Option>>;
162
+ confirm?: React.ReactElement<Confirmation>;
163
+ maxSelectedItems?: number;
164
+ minQueryLength?: number;
165
+ focusOnLoad?: boolean;
166
+ initialUsers?: string[];
167
+ initialConversations?: string[];
168
+ initialChannels?: string[];
169
+ defaultToCurrentConversation?: boolean;
170
+ responseUrlEnabled?: boolean;
171
+ filter?: ConversationFilter;
172
+ };
173
+ declare class Select extends React.Component<Props$p> {
174
+ static slackType: string;
175
+ }
176
+
177
+ type Props$o = {
178
+ actionId: string;
179
+ placeholder?: string;
180
+ initial?: string;
181
+ multiline?: boolean;
182
+ minLength?: number;
183
+ maxLength?: number;
184
+ focusOnLoad?: boolean;
185
+ dispatchActionConfig?: {
186
+ triggerActionsOn: Array<'on_enter_pressed' | 'on_character_entered'>;
187
+ };
188
+ };
189
+ declare class TextInput extends React.Component<Props$o> {
190
+ static slackType: string;
191
+ }
192
+
193
+ type Props$n = {
194
+ actionId: string;
195
+ placeholder?: string;
196
+ initialTime?: string;
197
+ confirm?: React.ReactElement<Confirmation>;
198
+ focusOnLoad?: boolean;
199
+ };
200
+ declare class TimePicker extends React.Component<Props$n> {
201
+ static slackType: string;
202
+ }
203
+
204
+ type Props$m = {
205
+ children: InteractiveBlockElement | InteractiveBlockElement[];
206
+ blockId?: string;
207
+ };
208
+ declare class Actions extends React.Component<Props$m> {
209
+ static slackType: string;
210
+ }
211
+
212
+ type ImageOrText = React.ReactElement<Text> | React.ReactElement<Image$1>;
213
+ type Props$l = {
214
+ children: ImageOrText | ImageOrText[];
215
+ blockId?: string;
216
+ };
217
+ declare class Context extends React.Component<Props$l> {
218
+ static slackType: string;
219
+ }
220
+
221
+ type Props$k = {
222
+ blockId?: string;
223
+ };
224
+ declare class Divider extends React.Component<Props$k> {
225
+ static slackType: string;
226
+ }
227
+
228
+ type Props$j = {
229
+ externalId: string;
230
+ blockId?: string;
231
+ };
232
+ declare class File extends React.Component<Props$j> {
233
+ static slackType: string;
234
+ }
235
+
236
+ type Props$i = {
237
+ text: string;
238
+ blockId?: string;
239
+ emoji?: boolean;
240
+ };
241
+ declare class Header extends React.Component<Props$i> {
242
+ static slackType: string;
243
+ }
244
+
245
+ type Props$h = {
246
+ url: string;
247
+ alt: string;
248
+ title?: string;
249
+ blockId?: string;
250
+ };
251
+ declare class Image extends React.Component<Props$h> {
252
+ static slackType: string;
253
+ }
254
+
255
+ type Props$g = {
256
+ label: string;
257
+ element: InputBlockElement;
258
+ hint?: string;
259
+ optional?: boolean;
260
+ blockId?: string;
261
+ };
262
+ declare class Input extends React.Component<Props$g> {
263
+ static slackType: string;
264
+ }
265
+
266
+ type RichTextElement = Record<string, any>;
267
+ type Props$f = {
268
+ elements?: RichTextElement[];
269
+ children?: SingleOrArray<React.ReactElement | string>;
270
+ blockId?: string;
271
+ };
272
+ declare class RichText extends React.Component<Props$f> {
273
+ static slackType: string;
274
+ }
275
+
276
+ type TextElement = React.ReactElement<Text>;
277
+ type Props$e = {
278
+ text: React.ReactElement<Text>;
279
+ blockId?: string;
280
+ children?: TextElement | TextElement[];
281
+ accessory?: BlockElement;
282
+ };
283
+ declare class Section extends React.Component<Props$e> {
284
+ static slackType: string;
285
+ }
286
+
287
+ type Props$d = {
288
+ children: SingleOrArray<Child>;
289
+ };
290
+ declare class Container extends React.Component<Props$d> {
291
+ static slackType: string;
292
+ }
293
+
294
+ type Props$c = {
295
+ title: string;
296
+ videoUrl: string;
297
+ thumbnailUrl: string;
298
+ altText: string;
299
+ titleUrl?: string;
300
+ description?: string;
301
+ authorName?: string;
302
+ providerName?: string;
303
+ providerIconUrl?: string;
304
+ blockId?: string;
305
+ };
306
+ declare class Video extends React.Component<Props$c> {
307
+ static slackType: string;
308
+ }
309
+
310
+ type Props$b = {
311
+ children: SingleOrArray<React.ReactElement | string>;
312
+ };
313
+ declare class RichTextSection extends React.Component<Props$b> {
314
+ static slackType: string;
315
+ }
316
+
317
+ type RichTextStyle = {
318
+ bold?: boolean;
319
+ italic?: boolean;
320
+ strike?: boolean;
321
+ code?: boolean;
322
+ };
323
+ type RichTextListStyle = 'ordered' | 'bullet';
324
+ type RichTextBroadcastRange = 'here' | 'channel' | 'everyone';
325
+
326
+ type Props$a = {
327
+ style: RichTextListStyle;
328
+ children: SingleOrArray<React.ReactElement | string>;
329
+ indent?: number;
330
+ border?: number;
331
+ };
332
+ declare class RichTextList extends React.Component<Props$a> {
333
+ static slackType: string;
334
+ }
335
+
336
+ type Props$9 = {
337
+ children: SingleOrArray<React.ReactElement | string>;
338
+ };
339
+ declare class RichTextQuote extends React.Component<Props$9> {
340
+ static slackType: string;
341
+ }
342
+
343
+ type Props$8 = {
344
+ children: SingleOrArray<React.ReactElement | string>;
345
+ };
346
+ declare class RichTextPreformatted extends React.Component<Props$8> {
347
+ static slackType: string;
348
+ }
349
+
350
+ type Props$7 = {
351
+ children: string;
352
+ style?: RichTextStyle;
353
+ };
354
+ declare class RichTextText extends React.Component<Props$7> {
355
+ static slackType: string;
356
+ }
357
+
358
+ type Props$6 = {
359
+ url: string;
360
+ children?: string;
361
+ style?: RichTextStyle;
362
+ };
363
+ declare class RichTextLink extends React.Component<Props$6> {
364
+ static slackType: string;
365
+ }
366
+
367
+ type Props$5 = {
368
+ userId: string;
369
+ };
370
+ declare class RichTextUser extends React.Component<Props$5> {
371
+ static slackType: string;
372
+ }
373
+
374
+ type Props$4 = {
375
+ channelId: string;
376
+ };
377
+ declare class RichTextChannel extends React.Component<Props$4> {
378
+ static slackType: string;
379
+ }
380
+
381
+ type Props$3 = {
382
+ name: string;
383
+ };
384
+ declare class RichTextEmoji extends React.Component<Props$3> {
385
+ static slackType: string;
386
+ }
387
+
388
+ type Props$2 = {
389
+ timestamp: number;
390
+ format: string;
391
+ fallback: string;
392
+ link?: string;
393
+ };
394
+ declare class RichTextDate extends React.Component<Props$2> {
395
+ static slackType: string;
396
+ }
397
+
398
+ type Props$1 = {
399
+ range: RichTextBroadcastRange;
400
+ };
401
+ declare class RichTextBroadcast extends React.Component<Props$1> {
402
+ static slackType: string;
403
+ }
404
+
405
+ type Props = {
406
+ usergroupId: string;
407
+ };
408
+ declare class RichTextUserGroup extends React.Component<Props> {
409
+ static slackType: string;
410
+ }
411
+
412
+ export { Actions, Button, Checkboxes, Confirmation, Container, Context, DatePicker, DateTimePicker, Divider, File, Header, Image$1 as Image, Image as ImageLayout, Input, Message, Option, OptionGroup, Overflow, RadioGroup, RichText, RichTextBroadcast, RichTextChannel, RichTextDate, RichTextEmoji, RichTextLink, RichTextList, RichTextPreformatted, RichTextQuote, RichTextSection, RichTextText, RichTextUser, RichTextUserGroup, Section, Select, Text, TextInput, TimePicker, Video };