JSXSlackTemplateTag
type now accepts pure readonly string array (#312)- Fix
JSXSlack.Children.toArray
to make flatten children correctly even if caused dual import of<Fragment>
(#319, #320)
- Upgrade Node.js and dependent packages (#313)
- Broken ESM build by wrong extension (#308, #309 by @nihalgonsalves)
- Upgrade Node.js and dependent packages (#303)
- Avoid using
node_modules
directory for pre-bundled external modules in ESM output (#308 by @nihalgonsalves)
- Test against Node.js 14 (#303)
- URLs in
<a>
tags have no longer been encoded byencodeURI()
implicitly, excluding some characters that have conflicted with Slack's mrkdwn format (#288, #289 by @nholden)
For keeping to get the compatible output with v5, wrap the value of
href
attribute withencodeURI()
explicitly.<Mrkdwn> - <a href={'https://example.com/?regex=<([^/]+?)>'}>Link</a> + <a href={encodeURI('https://example.com/?regex=<([^/]+?)>')}>Link</a> </Mrkdwn>
- Removed deprecated types:
VoidFunctionComponent
,VFC
,JSXSlack.FunctionalComponent
,JSXSlack.VoidFunctionalComponent
, andJSXSlack.Props
(#293)
- Upgrade Node.js and dependent packages (#291)
- Improve compatibility with npm support for Deno (#283)
<DateTimePicker>
interactive component (#276, #278)- New
type
variants for<Input>
:url
,email
, andnumber
(#277, #279) - Support Node.js 18 (#280)
- Upgrade dependent packages to the latest version (#281)
- Make stable documentation anchor links (#274)
-
Dropped EoL Node.js 12 support (#271)
-
Removed implicit
children
prop fromFunctionComponent
to make compatible types with React 18 (UsePropsWithChildren<P>
to includechildren
prop) (#270)-JSXSlack.FunctionComponent<P> +JSXSlack.FunctionComponent<JSXSlack.PropsWithChildren<P>> -JSXSlack.FunctionComponent +JSXSlack.FunctionComponent<JSXSlack.PropsWithChildren<{}>>
-
VoidFunctionComponent
,VFC
,FunctionalComponent
,VoidFunctionalComponent
, andProps
type (#270)Depreacted Replace to VoidFunctionComponent
/VFC
FunctionComponent
/FC
FunctionalComponent
FunctionComponent
/FC
VoidFunctionalComponent
FunctionComponent
/FC
Props<P>
P
- Upgrade Node and dependent packages to the latest version (#271)
- Upgrade development Node and dependent packages to the latest version (#268)
- Upgrade dependent packages to the latest version (#263)
- Make build size of JSX runtime smaller (#264)
- Fix esm.sh resolution error by adding JSX runtimes with
.mjs
extension (#260)
- Add documentation of Deno import maps (#257)
- CVE-2021-43843: Prevent catastrophic backtracking in blockquote escape replacers (GHSA-hp68-xhvj-x6j6)
- CVE-2021-43838: Fix performance issues of tags in
<blockquote>
(GHSA-55xv-f85c-248q)
autoFocus
prop for supported interactive elements (#253, #254)- Guide for setting up jsx-slack in Deno (Slack CLI) and esbuild (#245, #252)
- Upgrade dependent packages to the latest version (#255)
- Avoid using namespace alias and use isomorphic namespace in JSX runtime (#249)
- Direct dependencies to
hast-util-to-mdast
andhe
(#247)
- Upgrade development Node version to v16 LTS (#246)
- Upgrade dependent packages to the latest version (#246)
- Setup esbuild transpile and prebundling (#247)
- Support assigning
submit_disabled
field by settingsubmit
prop asfalse
in<Modal type="workflow_step">
(#233, #234)
- Broken JSDoc links in some IDEs (#235)
- Upgrade dependent packages to the latest version (#236)
- Upgrade Node and dependent packages to the latest version (#228)
- Rename
master
branch tomain
(#229)
- Added type exports that are similar to
@types/react
(#226)FunctionCompnent
/FC
(Alias to same types inJSXSlack
namespace)VoidFunctionComponent
/VFC
(Alias to same types inJSXSlack
namespace)Node
(Similar toReactNode
but for jsx-slack. Alias toJSXSlack.ChildElements
)
- Upgrade dependent packages to the latest version (#225)
- Dropped Node 10 support (#219)
- Allow containing
<Input>
and input components in<Blocks>
(#218, #220) - Upgrade dependent packages to the latest version (#219)
- Remove deprecated
jsxslack.raw
(#221)
The package name has renamed from @speee-js/jsx-slack
to jsx-slack
.
- Rename package from
@speee-js/jsx-slack
tojsx-slack
(#213, #215) - GitHub repository has transferred to yhatt/jsx-slack (#215)
- Configurable
dispatchAction
prop for<Input type="text">
and<Textarea>
(equivalent todispatch_action_config
for the plain-text input) (#204, #205) <Mrkdwn raw>
to bypass HTML-like formatting and auto-escaping (#161, #207)
- Upgrade dependent packages to the latest version (#208)
- Update demo schema for
dispatchAction
prop (#201)
<Input>
and input components are available in home tab container<Home>
(#195, #200)- Allow using
<RadioButtonGroup>
and<CheckboxGroup>
in message container<Blocks>
(#196, #197) - Upgrade dependent packages to the latest version (#191, #198)
dispatchAction
prop for<Input>
layout block and input components (#200)- Docs:
jsxFragmentFactory
compiler option for TypeScript v4 (#173, #191)
<Header>
component for layout block (#184, #185)
type
prop andworkflow_step
type for<Modal>
(#176, #177)- React-compatible camelCased
dateTime
prop for<time>
(#179, #182) - Test against Node 14 (#181)
datetime
prop for<time>
is now aliasing into added camelCased prop (#179, #182)- Upgrade dependent packages to the latest version (#178)
- Fix wrong extension for the path of type definition:
.js
->.d.ts
(#171) - Update how to generate Block Kit Builder URL in demo page (#168, #172)
- Upgrade Node and dependent packages to the latest version (#175)
<Call>
layout block component to show a card of registered call (#164, #165)
- Upgrade dependent packages to the latest version (#166)
- Accept special initial conversation
current
in<ConversationsSelect>
(#154, #155)
- Upgrade Node and dependent packages to the latest version (#158)
- Refactor special link detection (#159)
- Update demo REPL (#157)
- Move template examples on README into REPL demo
- Use Web fonts to get better rendering
- Disable preview button if Slack may return 414 error due to too long URL
jsx-slack v2 has improved JSX structure and built-in components to output the real JSON from JSX!
▶︎ See highlight of v2 updates
- Checked states defined in
<CheckboxGroup values>
and<Checkbox checked>
do no longer merge
- Breaking for TypeScript
- Require TypeScript >= 3.7 when using jsx-slack through TypeScript
- Container components have strict type checking for its children
- Exported type
JSXSlack.Child
andJSXSlack.Children
have been renamed intoJSXSlack.ChildElement
andJSXSlack.ChildElements
and no longer provided generics
- Fully rewrote JSX structure to render from JSX to JSON directly (#128)
- All built-in components can render the partial JSON of Block Kit
<Home>
container now accepts<Input type="hidden" />
and custom transformer to store private metadatavalue
prop for<Option>
has made optional to follow HTML specificationconfirm
prop for interactive block elements accepts the raw confirm composition object<a>
tag renders short syntax for hyperlink if possible- Throws error with more helpful message and stacktrace when there is invalid JSX structure (#143)
- Bundle modules through rollup (#144)
- React-compatible public APIs:
JSXSlack.createElement
,JSXSlack.isValidElement
, andJSXSlack.Children
helpers - HTML-compatible
<Option selected>
and<RadioButton checked>
value
prop as an alias intoinitialXXX
prop in some interactive components- Added JSDoc to many public APIs and components
- Support new JSX transpile via
automatic
runtime in Babel >= 7.9 (experimental) (#142) - REPL demo now generates the permalink to specific JSX (#149)
- Dark mode for REPL demo (#150)
- New logo and logo type (#152)
- Suggest string literals on IDE when typing the kind of conversation in
<ConversationsSelect include>
(#145) - Fix typo in
README.md
(#146 by @BLNCinema)
- Deprecated features in v1:
JSXSlack.legacyParser()
andjsxslack.fragment
jsxslack.raw
template literal tag (It has become just an alias tojsxslack
in v2)
style
prop for<Confirm>
composition object component (#114, #139)<Button>
inherits its style to assigned confirm composition object if<Confirm>
has not defined style (#139)
- All props of
<Confirm>
component have made optional (#138, #139) - Upgrade dependent packages to the latest version (#137, #140)
responseUrlEnabled
property for modal's input component to<ConversationsSelect>
and<ChannelsSelect>
(#134, #135)- Experimental filter properties to
<ConversationsSelect>
:include
,excludeExternalSharedChannels
, andexcludeBotUsers
(#133, #136)
value
attribute for<li>
element (#130)
- Fix mention detection to match to longer Slack ID (#129)
- Upgrade deep dependencies (#131)
- Improve escaping special characters to keep original character as possible (#124, #125)
- Make JSX element for passing to Slack API serializable to JSON directly (#126)
jsxslack
template literal tag now returns raw JSX element, or JSON if serializable (#127)
jsxslack.raw
template literal tag to generate JSX element always (#127)
- Confusable
jsxslack.fragment
template literal tag has deprecated (Usejsxslack
orjsxslack.raw
instead) (#127)
- Support
type
attribute for<ol>
element (#117)
- Allow text formatting through mrkdwn and HTML-like elements in
<RadioButton>
(#119, #122) - Change spaces for indenting lists into unicode spaces that were based on measured width in Slack's font (#117)
- Upgrade development Node and dependent packages to the latest version (#123)
- Mark the legacy parser as deprecated (#121)
- Fix regression about not rendered special spaces around the content (#113)
- Fully-rewrite HTML parser to reduce bundle size drastically (x43 smaller) (#112)
legacyParser()
for switching into legacy parser (#112)
<CheckboxGroup>
and<Checkbox>
interactive component (#108, #109)- Redirect the content of
<small>
element intodescription
in<Checkbox>
and<RadioButton>
(#109) - Add the build for ES modules to make tree-shakable (#110)
- Upgrade dependent packages to the latest version (#107)
- Upgrade development Node to 12.15.0
- Custom transformer for modal's private metadata (#106)
- Mark
<Home>
container as stable (#105)
- Components for the outdated dialog provided in
jsx-slack/dialog
can no longer use (#84) - Drop Node 8 support (#100)
- Upgrade dependent packages to the latest version (#92, #104)
- Upgrade development Node to 12.14.1 (#104)
- Radio buttons for modal (#88, #91)
<RadioButtonGroup>
now can use in<Modal>
container and acts as input component for modal
- Upgrade dependent packages to the latest version (#90)
- Don't throw error even if
<Overflow>
has only one<OverflowItem>
(#85, #86) - Fix 413 error from Block Kit Builder when translated huge JSON on REPL demo (#82)
- Improve internal type definitions for overloaded props (#83)
- Upgrade dependent packages to the latest version (#87)
- Add (an experimental)
<Home>
container component for home tab (#75, #78) <RadioButtonGroup>
and<RadioButton>
interactive component for home tab (#74, #80)- "Copy to clipboard" button on REPL demo (#77)
- Upgrade Node for development to v12 LTS (#79)
- Throw an error when using
<File>
in<Modal>
(#76) - REPL demo can transfer the complete modal JSON to Block Kit Builder (#77)
- Output warning about deprecated dialog components (#72)
- Make interpolated fragments in template literal work correctly (#71)
- Fix invalid array children in template literal (#69)
- Upgrade Node and dependent packages to the latest version (#70)
- Multi-select menus (#56, #58)
- Modals support (#57)
<Modal>
container component (#60)<Input>
layout block and component (#61)<Textarea>
component (#62)- Input-compatible props to select-like elements and
<DatePicker>
(#63) - Intrinsic HTML elements of input components (#65)
- Add extra types for
<Input>
component (#66) - Update REPL demo to support Modals (#68)
- Bump dependent packages to the latest version (#59)
- Check invalid elements in
<Blocks>
and<Input>
strictly (#64) - Split test cases for Block Kit components into multiple files (#66)
- Organize documentation (#20, #67)
- Mark
<Dialog>
as soft-deprecated in favor of Slack Modals (#60)
- Update dependent packages to the latest version (#52)
- Update dependent packages to the latest version (#50)
- Disabled heuristic detection for HTML entities (Escaping works just as same as React JSX) (#33)
- Some raw characters for mrkdwn link,
<
,>
, and&
will always escape to entities (#45)
- Improve html entity decoding in JSX and template literal tag (#33, #45, #47)
- Allow links in the inside of
<code>
and<pre>
element (#16, #46)
- Better dialog support for
jsxslack
template literal (#42, #43) - Update REPL demo to add dialog example (#43)
- Coerce number-expected prop to integer (#44)
- Don't prevent generating
<SelectFragment>
with no options (#41)
<File>
block component (#34, #35)jsxslack.fragment
template literal tag (#32)- Codecov integration and coverage badge (#36)
- Update dependent packages to the latest version (#37)
- Support mention to global user ID for Enterprise Grid (#25)
- Update dependent packages to the latest version (#28)
- Support Node.js 12 (#23)
- Make interchangeable with
<Image>
component and intrinsic<img>
tag (#21) - Upgrade dependent packages to the latest version (#24)
- Remove deprecated
<Block>
component (#22)
- Upgrade dependent packages to the latest version (#18)
<Blocks>
container component (#12)
- Support nested list (#10)
- Add
<SelectFragment>
component (#9)
- Right-aligned number in ordered list (#8)
- Initial release.