react-blockkit 0.1.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/LICENSE +21 -0
- package/README.md +203 -0
- package/dist/Block.d.ts +13 -0
- package/dist/Block.d.ts.map +1 -0
- package/dist/BlockKit.d.ts +13 -0
- package/dist/BlockKit.d.ts.map +1 -0
- package/dist/assert-never.d.ts +2 -0
- package/dist/assert-never.d.ts.map +1 -0
- package/dist/blocks/AdvancedBlocks.d.ts +21 -0
- package/dist/blocks/AdvancedBlocks.d.ts.map +1 -0
- package/dist/blocks/BasicBlocks.d.ts +21 -0
- package/dist/blocks/BasicBlocks.d.ts.map +1 -0
- package/dist/blocks/Charts.d.ts +4 -0
- package/dist/blocks/Charts.d.ts.map +1 -0
- package/dist/blocks/InteractiveBlocks.d.ts +6 -0
- package/dist/blocks/InteractiveBlocks.d.ts.map +1 -0
- package/dist/constants.d.ts +54 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/context.d.ts +17 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/elements/Elements.d.ts +51 -0
- package/dist/elements/Elements.d.ts.map +1 -0
- package/dist/errors.d.ts +12 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/index.cjs +6 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4707 -0
- package/dist/index.js.map +1 -0
- package/dist/runtime.d.ts +6 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/safe-url.d.ts +2 -0
- package/dist/safe-url.d.ts.map +1 -0
- package/dist/styles.css +1502 -0
- package/dist/styles.d.ts +21 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/text/Markdown.d.ts +34 -0
- package/dist/text/Markdown.d.ts.map +1 -0
- package/dist/text/Mrkdwn.d.ts +37 -0
- package/dist/text/Mrkdwn.d.ts.map +1 -0
- package/dist/text/RichText.d.ts +9 -0
- package/dist/text/RichText.d.ts.map +1 -0
- package/dist/text/Text.d.ts +10 -0
- package/dist/text/Text.d.ts.map +1 -0
- package/dist/text/date.d.ts +6 -0
- package/dist/text/date.d.ts.map +1 -0
- package/dist/text/emoji.d.ts +3 -0
- package/dist/text/emoji.d.ts.map +1 -0
- package/dist/tokens.stylex.d.ts +8 -0
- package/dist/tokens.stylex.d.ts.map +1 -0
- package/dist/types.d.ts +221 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/validation.d.ts +11 -0
- package/dist/validation.d.ts.map +1 -0
- package/docs/coverage-matrix.md +80 -0
- package/docs/parity/chart-bar-3-w580-dark.png +0 -0
- package/docs/parity/chart-bar-3-w580-light.png +0 -0
- package/docs/parity/chart-line-3-w580-light.png +0 -0
- package/docs/parity/chart-pie-12-w400-light.png +0 -0
- package/docs/parity/chart-pie-5-w580-light.png +0 -0
- package/docs/parity/data-table-w580-dark.png +0 -0
- package/docs/parity/data-table-w580-light.png +0 -0
- package/docs/parity/headers-levels-w580-light.png +0 -0
- package/docs/parity/rich-text-full-w580-light.png +0 -0
- package/docs/parity/spacing-rhythm-w580-light.png +0 -0
- package/docs/parity/table-align-wrap-w580-light.png +0 -0
- package/docs/parity/table-basic-w580-light.png +0 -0
- package/docs/slack-style-baseline.md +260 -0
- package/package.json +83 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# react-blockkit Slack Builder style baseline
|
|
2
|
+
|
|
3
|
+
Observed July 20, 2026 in the authenticated
|
|
4
|
+
[Block Kit Builder](https://app.slack.com/block-kit-builder/) desktop message
|
|
5
|
+
preview. The fixture contained sections, section image accessories, dividers,
|
|
6
|
+
mrkdwn, and action buttons.
|
|
7
|
+
|
|
8
|
+
These are measurements for `react-blockkit`, not estimates.
|
|
9
|
+
|
|
10
|
+
## Message content
|
|
11
|
+
|
|
12
|
+
| Target | Light | Dark |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| Body font | `Slack-Lato, Slack-Fractions, appleLogo, sans-serif` | same |
|
|
15
|
+
| Body size / weight | `15px` / `400` | same |
|
|
16
|
+
| Body line height | `22.0002px` | same |
|
|
17
|
+
| Body color | `rgb(29, 28, 29)` | `rgb(209, 210, 211)` |
|
|
18
|
+
| Renderer width in Builder fixture | `580px` | `580px` |
|
|
19
|
+
|
|
20
|
+
The renderer root itself is transparent inside Slack's message preview card.
|
|
21
|
+
|
|
22
|
+
## Block geometry
|
|
23
|
+
|
|
24
|
+
| Target | Computed values |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| Section | `display:flex`; `margin: 0 0 4px`; no padding or border |
|
|
27
|
+
| Divider | `height:1px`; `border-bottom:1px solid`; `margin:4px 0 8px` |
|
|
28
|
+
| Actions | `display:flex`; `margin:0 0 8px`; no padding |
|
|
29
|
+
| Section accessory wrapper | `margin:0 0 4px 8px`; width `92px` |
|
|
30
|
+
| Section image | `88px × 88px`; radius `8px`; internal inline margin `4px` |
|
|
31
|
+
|
|
32
|
+
## Outline button
|
|
33
|
+
|
|
34
|
+
| Property | Light | Dark |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| Height | `28px` | `28px` |
|
|
37
|
+
| Font | `13px`, weight `700` | same |
|
|
38
|
+
| Padding | `0 8px 1px` | same |
|
|
39
|
+
| Radius | `4px` | `4px` |
|
|
40
|
+
| Background | `rgb(255, 255, 255)` | `rgb(26, 29, 33)` |
|
|
41
|
+
| Foreground | `rgb(29, 28, 29)` | `rgb(248, 248, 248)` |
|
|
42
|
+
| Border | `rgba(94, 93, 96, 0.45)` | `rgba(121, 124, 129, 0.5)` |
|
|
43
|
+
|
|
44
|
+
## Builder design tokens
|
|
45
|
+
|
|
46
|
+
Relevant computed CSS custom properties:
|
|
47
|
+
|
|
48
|
+
| Token | Light | Dark |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| `--dt_color-content-pry` | `#1d1c1d` | `#f8f8f8` |
|
|
51
|
+
| `--dt_color-content-sec` | `#454447` | `#b9babd` |
|
|
52
|
+
| `--dt_color-content-hgl-1` | `#1264a3` | `#2ba5ce` |
|
|
53
|
+
| `--dt_color-ctr-pry` | `#fff` | `#212428` |
|
|
54
|
+
| `--dt_color-ctr-sec` | `#f8f8f8` | `#212428` |
|
|
55
|
+
| `--dt_color-otl-sec` | `#5e5d6073` | `#797c8180` |
|
|
56
|
+
| `--dt_static_radius-xlarge` | `12px` | `12px` |
|
|
57
|
+
| `--dt_static_type-size-caption` | `13px` | `13px` |
|
|
58
|
+
| `--dt_static_type-weight-bold` | `700` | `700` |
|
|
59
|
+
|
|
60
|
+
## DOM landmarks
|
|
61
|
+
|
|
62
|
+
The Builder's preview structure at this point was:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
.p-bkb_preview__message
|
|
66
|
+
.p-bkb_preview__app_icon
|
|
67
|
+
.p-bkb_preview__content
|
|
68
|
+
.p-bkb_preview__app
|
|
69
|
+
.p-block_kit_renderer
|
|
70
|
+
.p-block_kit_renderer__block_wrapper
|
|
71
|
+
.p-section_block | .p-divider_block | .p-actions_block
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Slack's generated class names are observation landmarks only. The package uses
|
|
75
|
+
semantic StyleX tokens and does not copy those names.
|
|
76
|
+
|
|
77
|
+
## Charts, tables, and spacing (observed July 21, 2026)
|
|
78
|
+
|
|
79
|
+
Harvested from the authenticated Builder desktop message preview in Chrome 150
|
|
80
|
+
at renderer widths 380px, 580px, and 900px (900px forced with a CSS override
|
|
81
|
+
on the Builder preview column; Slack's chart component reflows to whatever
|
|
82
|
+
container it is given, so the responsive behavior is still Slack's own).
|
|
83
|
+
Fixtures: pie charts with 2/5/12 segments, bar/line/area charts with 1/3/6
|
|
84
|
+
series over six categories, `table` with alignment and wrap settings,
|
|
85
|
+
`data_table` with pagination, a header→rich_text→table→section→divider→
|
|
86
|
+
section→chart→context spacing sequence, header levels 1–4, rich-text lists,
|
|
87
|
+
quote, preformatted, and context. 100 captures total (50 per theme). All
|
|
88
|
+
values below are computed-style observations unless marked inferred.
|
|
89
|
+
|
|
90
|
+
### data_visualization card
|
|
91
|
+
|
|
92
|
+
| Target | Light | Dark |
|
|
93
|
+
| --- | --- | --- |
|
|
94
|
+
| Card border | `1px solid rgba(94, 93, 96, 0.13)` | `1px solid rgba(121, 124, 129, 0.3)` |
|
|
95
|
+
| Card radius | `12px` | same |
|
|
96
|
+
| Card background | `rgb(255, 255, 255)` | `rgb(26, 29, 33)` |
|
|
97
|
+
| Card width rule | `clamp(400px, container, 624px)`; horizontal scroll below 400 | same |
|
|
98
|
+
| Content padding / layout | `12px` all sides; flex column; `gap: 8px` | same |
|
|
99
|
+
| Title | `h3`, `18px/24px`, weight `900`, body font | same, `rgb(248, 248, 248)` |
|
|
100
|
+
| Block margin (scroll wrapper) | `8px 0` | same |
|
|
101
|
+
|
|
102
|
+
### Chart plot geometry (SVG, no viewBox — redrawn per width)
|
|
103
|
+
|
|
104
|
+
| Target | Observed |
|
|
105
|
+
| --- | --- |
|
|
106
|
+
| Drawing tech | Inline SVG, absolute pixel coordinates, `width = card − 26`, `height: 360` fixed |
|
|
107
|
+
| Responsiveness | Reflow: coordinates recomputed per width; tick count and legend unchanged at 380/580/900; no label rotation or truncation with short labels |
|
|
108
|
+
| Plot x-range | `[74, svgWidth]` (74px left gutter for y ticks + y label) |
|
|
109
|
+
| Plot y-range | `[9, 334]`; grid lines drawn at `round(y) + 0.5` |
|
|
110
|
+
| Gridlines | Horizontal only, `#5e5d6021` light / `#797c814d` dark, from `x=74` to `svgWidth` |
|
|
111
|
+
| Y ticks | ~5 "nice" ticks (0/20/40/60/80 for max 83); labels right-anchored at `x=66`, vertically centered |
|
|
112
|
+
| X ticks | Bar charts: one per category at band centers of `[74, svgWidth]`. Line/area charts: at the point positions themselves. Baseline `y=351`; anchor middle |
|
|
113
|
+
| Tick text | `13px`, `Lato, Slack-Lato, appleLogo, sans-serif`, fill `#5e5d60` light / `#9a9b9e` dark |
|
|
114
|
+
| X axis label | Below ticks: `text-align: center`, `13px` weight `700`, content color, `padding: 8px 0 0 74px`. Cartesian charts always reserve this strip (8px tall when `x_label` is absent) |
|
|
115
|
+
| Y axis label | Absolute strip `left: 0, top: 8, width: 18px, height: 326px`, flex-centered, text rotated to read bottom-up, `13px` weight `700` |
|
|
116
|
+
| Bars | Rounded top corners `4px`; flat bottom at `y=334`; grouped per category |
|
|
117
|
+
| Bar group padding | Outer margin per band: `12.4px` (1 series), `9.2px` (3), `6px` (6) of an 80px band; gap between bars `= 0.1 × bar width`. Interpolation for other counts is inferred: `outer = band × clamp(0.175 − 0.02 × series, 0.075, 0.155)` |
|
|
118
|
+
| Lines | `stroke-width: 2`, `stroke-linejoin: bevel`, no fill; smooth cubic curve with zeroed end tangents (exact spline formula not identified — see open questions); points span `[74, svgWidth − 13]` |
|
|
119
|
+
| Areas | Same curve closed to the baseline; fill is a per-series pastel tint at `fill-opacity: 0.7`, plus the 2px stroke on top |
|
|
120
|
+
| Pie | Center `(svgWidth/2, 180)`, radius `144`; slices clockwise from 12 o'clock in data order; slice stroke `2px` in card background color, `stroke-linejoin: round`; no data labels |
|
|
121
|
+
| Legend | Below plot; flex, wrap, `justify-content: center`, `gap: 8px`, `padding: 8px 0 0 74px` (cartesian) / `8px 0 0 0` (pie) |
|
|
122
|
+
| Legend item | Swatch `10px × 10px`, fully rounded; label `13px/18px`; swatch–label gap `8px`; 12 segments wrap to 2 rows at 580px |
|
|
123
|
+
|
|
124
|
+
### Chart series palette (fill/stroke by series index)
|
|
125
|
+
|
|
126
|
+
| Index | Light | Dark | Area tint light | Area tint dark |
|
|
127
|
+
| --- | --- | --- | --- | --- |
|
|
128
|
+
| 1 | `rgb(233, 104, 37)` | `rgb(213, 106, 55)` | `rgb(255, 237, 229)` | `rgb(56, 16, 0)` |
|
|
129
|
+
| 2 | `rgb(32, 162, 113)` | `rgb(37, 155, 105)` | `rgb(227, 255, 243)` | `rgb(5, 36, 27)` |
|
|
130
|
+
| 3 | `rgb(196, 116, 211)` | `rgb(178, 110, 195)` | `rgb(249, 237, 255)` | `rgb(32, 2, 33)` |
|
|
131
|
+
| 4 | `rgb(14, 157, 211)` | `rgb(22, 153, 202)` | `rgb(227, 248, 255)` | `rgb(0, 26, 45)` |
|
|
132
|
+
| 5 | `rgb(239, 62, 117)` | `rgb(217, 76, 117)` | `rgb(255, 232, 239)` | `rgb(48, 0, 5)` |
|
|
133
|
+
| 6 | `rgb(72, 100, 210)` | `rgb(77, 101, 197)` | `rgb(240, 243, 252)` | `rgb(4, 11, 61)` |
|
|
134
|
+
| 7 | `rgb(200, 70, 0)` | `rgb(228, 160, 127)` | not observed | not observed |
|
|
135
|
+
| 8 | `rgb(14, 103, 77)` | `rgb(141, 210, 181)` | not observed | not observed |
|
|
136
|
+
| 9 | `rgb(97, 31, 105)` | `rgb(216, 186, 225)` | not observed | not observed |
|
|
137
|
+
| 10 | `rgb(0, 113, 164)` | `rgb(88, 189, 222)` | not observed | not observed |
|
|
138
|
+
| 11 | `rgb(158, 11, 46)` | `rgb(230, 167, 186)` | not observed | not observed |
|
|
139
|
+
| 12 | `rgb(40, 64, 169)` | `rgb(137, 155, 220)` | not observed | not observed |
|
|
140
|
+
|
|
141
|
+
Area tints 7–12 were not observable (max 6 series captured); the renderer
|
|
142
|
+
falls back to the stroke color at low opacity for those indices (inferred).
|
|
143
|
+
|
|
144
|
+
### table block
|
|
145
|
+
|
|
146
|
+
| Target | Light | Dark |
|
|
147
|
+
| --- | --- | --- |
|
|
148
|
+
| Table sizing | Auto layout, content width (not stretched); horizontal scroll wrapper when overflowing | same |
|
|
149
|
+
| Table vertical padding | `4px 0` on the table box | same |
|
|
150
|
+
| Grid lines | Every cell `border-right` + `border-bottom`; header adds `border-top`; first column adds `border-left`; all `1px solid rgba(94, 93, 96, 0.13)` | `rgba(121, 124, 129, 0.3)` |
|
|
151
|
+
| Cell padding | `2px 12px 0` with cell height `28px` acting as a min-height (single line renders 28px tall; wrapped content grows to `2px + N × 22px + 1px`) | same |
|
|
152
|
+
| Cell font | `15px/22px`; header weight `700`, body `400` | same |
|
|
153
|
+
| Header background | none (transparent — no fill) | same |
|
|
154
|
+
| Row striping | none | same |
|
|
155
|
+
| Alignment | `column_settings[].align` maps to `text-align` | same |
|
|
156
|
+
| Wrapping | default `white-space: nowrap`; `is_wrapped: true` → `normal` (no min-width) | same |
|
|
157
|
+
| Corner radius | none | same |
|
|
158
|
+
|
|
159
|
+
### data_table block
|
|
160
|
+
|
|
161
|
+
| Target | Light | Dark |
|
|
162
|
+
| --- | --- | --- |
|
|
163
|
+
| Outer margin | `4px 0` | same |
|
|
164
|
+
| Header bar | flex, `gap: 8px`, `padding: 8px 4px`; title `15px` weight `900` | same |
|
|
165
|
+
| Filter input | `28px` tall, radius `8px`, border `rgba(94, 93, 96, 0.45)`, background `#fff`, `13px`, ~`188px` wide, search icon | border `rgba(121, 124, 129, 0.5)`, bg `rgb(26, 29, 33)` |
|
|
166
|
+
| Icon buttons | `28px × 28px`, radius `8px`, border same as filter input, transparent bg | same |
|
|
167
|
+
| Grid container | radius `12px`, background `rgba(29, 28, 29, 0.06)`, `padding: 0 4px` | `rgba(248, 248, 248, 0.06)` |
|
|
168
|
+
| Header row | `36px` tall, transparent on container band; cells `13px/18px` weight `700`, color `rgb(69, 68, 71)`; sort buttons `padding: 0 12px`, radius `8px` | color `rgb(185, 186, 189)` |
|
|
169
|
+
| Body rows | `48px` tall; cells on `#fff` card | `rgb(26, 29, 33)` |
|
|
170
|
+
| Body row card | first row top corners / last row bottom corners radius `8px`; rows separated by `1px solid rgba(94, 93, 96, 0.45)` top borders | `rgba(121, 124, 129, 0.5)` |
|
|
171
|
+
| Pagination | inside container: chevron buttons `20px`, radius `8px`; page buttons `20px`, radius `4px`, `padding: 0 6px`, `13px`; active page `background: rgb(0, 122, 90)`, white text; inactive `rgba(29, 28, 29, 0.7)` | inactive `rgba(232, 232, 232, 0.7)` |
|
|
172
|
+
| Unpaginated | a `4px` strip remains under the last row when no pagination renders (container `136px` for a header plus two rows) | same |
|
|
173
|
+
|
|
174
|
+
### Inter-block spacing rhythm
|
|
175
|
+
|
|
176
|
+
The Builder separates consecutive block wrappers by exactly `4px` (its drag
|
|
177
|
+
wrapper applies `padding: 4px 0; margin: -4px 0`, which the renderer already
|
|
178
|
+
mirrors via the shared block frame). On top of that rhythm each block type
|
|
179
|
+
carries its own margins:
|
|
180
|
+
|
|
181
|
+
| Block | Margin (within wrapper) |
|
|
182
|
+
| --- | --- |
|
|
183
|
+
| header | `15px 0 4px`; first block in payload: `4px 0 4px` |
|
|
184
|
+
| rich_text | `0` |
|
|
185
|
+
| table | `0` (the `4px 0` lives on the table box) |
|
|
186
|
+
| section | `8px 0 4px` (first block: top `0`, per earlier baseline) |
|
|
187
|
+
| divider | `4px 0 8px` |
|
|
188
|
+
| data_visualization | `8px 0 8px` |
|
|
189
|
+
| data_table | `4px 0 4px` |
|
|
190
|
+
| context | `4px 0 4px` |
|
|
191
|
+
|
|
192
|
+
### header block levels
|
|
193
|
+
|
|
194
|
+
| Level | Element | Font | Weight |
|
|
195
|
+
| --- | --- | --- | --- |
|
|
196
|
+
| none (default) | `h2` (flat scale) | `15px/22px` | `900` |
|
|
197
|
+
| 1 | `h1` | `18px/24px` | `900` |
|
|
198
|
+
| 2 | `h2` | `15px/22px` | `900` |
|
|
199
|
+
| 3 | `h3` | `15px/22px` | `700` |
|
|
200
|
+
| 4 | `h4` | `15px/22px` | `700` |
|
|
201
|
+
|
|
202
|
+
### Rich text details
|
|
203
|
+
|
|
204
|
+
| Target | Light | Dark |
|
|
205
|
+
| --- | --- | --- |
|
|
206
|
+
| Bullet list | `ul` has no padding; `li` margin-left `28px`; bullets are "Slack v2" icon-font glyphs in an inline-block `::before` (`22px × 15px`, `margin: 0 6px 0 -28px`); measured glyphs: `6.5px` disc, `7.5px` ring, `7px` square, cycling by depth. The renderer reproduces them with background gradients | same |
|
|
207
|
+
| Ordered list | `li` margin-left `20px` + padding-left `8px`; native markers decimal/lower-alpha/lower-roman by depth | same |
|
|
208
|
+
| Adjacent lists | no vertical gap between sibling lists | same |
|
|
209
|
+
| Quote | `padding-left: 16px`, margin `4px 0`; `::before` bar `4px` wide, full height, radius `8px`, background `rgb(221, 221, 221)` | bar `rgb(185, 186, 189)` |
|
|
210
|
+
| Preformatted | `padding: 8px`, radius `4px`, border `1px solid rgba(29, 28, 29, 0.13)`, background `rgba(29, 28, 29, 0.04)`, `12px/18px` mono, margin `4px 0`, `tab-size: 4` | border `rgba(232, 232, 232, 0.13)`, bg `rgba(232, 232, 232, 0.04)` |
|
|
211
|
+
| Context text | `13px/18px`, `rgb(97, 96, 97)`; element row is a `22px` line box; `16px` spacer between elements | `rgb(209, 210, 211)` wrapper color (text tone unchanged) |
|
|
212
|
+
|
|
213
|
+
### Builder-vs-client divergences (observed; renderer keeps documented Slack semantics)
|
|
214
|
+
|
|
215
|
+
- `table` block `raw_number` cells render blank in the Builder (its table
|
|
216
|
+
renderer only knows `raw_text`/`rich_text`, matching the docs); the
|
|
217
|
+
renderer intentionally keeps showing the number.
|
|
218
|
+
- Adjacent `rich_text_list` elements are merged by the Builder into a single
|
|
219
|
+
list using the first list's style, and the documented ordered `offset`
|
|
220
|
+
field never produces a `start`; the renderer keeps separate lists and
|
|
221
|
+
honors `offset`.
|
|
222
|
+
- The Builder's dark message surface is `rgb(26, 29, 33)` (`#1a1d21`), one
|
|
223
|
+
digit off the earlier `#1b1d21` estimate; button/raised surfaces measured
|
|
224
|
+
the same value.
|
|
225
|
+
- Overflowing tables composite at half-pixel offsets in the Builder page
|
|
226
|
+
(anti-aliased hairlines split across rows) and show a subtle rounded
|
|
227
|
+
corner on the outer grid; the wrapped-table parity fixture carries a small
|
|
228
|
+
diff budget for this and geometry was verified equal in the DOM.
|
|
229
|
+
- Scrollbar rendering (macOS overlay vs classic) flips between sessions, so
|
|
230
|
+
the renderer hides scroller scrollbars and the goldens are captured with
|
|
231
|
+
scrollbars hidden.
|
|
232
|
+
|
|
233
|
+
### Open questions (not measurable in this pass)
|
|
234
|
+
|
|
235
|
+
- `container` block: the Builder preview fails to mount for any payload
|
|
236
|
+
containing `type: "container"` (renderer never appears). Container chrome
|
|
237
|
+
remains unmeasured; current styling is retained as-is. The same applies to
|
|
238
|
+
the workflow-button, multi-select, file/rich-text-input, video/file media,
|
|
239
|
+
and agent-block fixtures.
|
|
240
|
+
- Chart line/area spline: control points show zeroed end tangents and
|
|
241
|
+
non-uniform interior tangent factors (~0.21–0.29 of the neighbor chord);
|
|
242
|
+
the exact algorithm was not identified. The renderer approximates it with a
|
|
243
|
+
cardinal-style curve; chart parity fixtures allow a small diff budget for
|
|
244
|
+
this.
|
|
245
|
+
- Area tints for series 7–12 (max 6 series captured).
|
|
246
|
+
- Bar group outer padding for series counts other than 1/3/6 (formula above
|
|
247
|
+
is a fit through the three observed counts).
|
|
248
|
+
- Y-axis gutter width with no `y_label`, very wide tick values, long/rotated
|
|
249
|
+
category labels, hover states, and `data_table` sort affordances (hover
|
|
250
|
+
interactions were out of scope).
|
|
251
|
+
- Ordered-list `offset` produced no `start` attribute in the Builder DOM; the
|
|
252
|
+
renderer keeps honoring the documented `offset` field.
|
|
253
|
+
|
|
254
|
+
## Next harvest slices
|
|
255
|
+
|
|
256
|
+
The baseline does not establish pixel parity for every permutation. Continue
|
|
257
|
+
with isolated fixtures for text styles, all interactive elements, remaining
|
|
258
|
+
rich text inline elements, cards/carousels, containers, agent blocks,
|
|
259
|
+
modal/Home chrome, and every interaction state. Follow the repository
|
|
260
|
+
`block-kit-style-harvest` skill for each slice.
|
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-blockkit",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React components that render Slack Block Kit JSON exactly as Slack does.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"block kit",
|
|
7
|
+
"blockkit",
|
|
8
|
+
"gfm",
|
|
9
|
+
"markdown",
|
|
10
|
+
"mrkdwn",
|
|
11
|
+
"react",
|
|
12
|
+
"renderer",
|
|
13
|
+
"slack",
|
|
14
|
+
"slack-blocks"
|
|
15
|
+
],
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"author": "Siraj",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/SirajChokshi/slackmark.git",
|
|
21
|
+
"directory": "packages/react-renderer"
|
|
22
|
+
},
|
|
23
|
+
"style": "./dist/styles.css",
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"docs",
|
|
27
|
+
"LICENSE",
|
|
28
|
+
"README.md"
|
|
29
|
+
],
|
|
30
|
+
"type": "module",
|
|
31
|
+
"sideEffects": [
|
|
32
|
+
"**/*.css"
|
|
33
|
+
],
|
|
34
|
+
"main": "./dist/index.cjs",
|
|
35
|
+
"module": "./dist/index.js",
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
37
|
+
"exports": {
|
|
38
|
+
".": {
|
|
39
|
+
"import": {
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
41
|
+
"default": "./dist/index.js"
|
|
42
|
+
},
|
|
43
|
+
"require": {
|
|
44
|
+
"types": "./dist/index.d.ts",
|
|
45
|
+
"default": "./dist/index.cjs"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"./styles.css": "./dist/styles.css"
|
|
49
|
+
},
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@slack/types": "^3.0.0",
|
|
55
|
+
"@stylexjs/stylex": "^0.19.0"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@stylexjs/unplugin": "^0.19.0",
|
|
59
|
+
"@testing-library/react": "^16.3.2",
|
|
60
|
+
"@types/react": "^19.2.10",
|
|
61
|
+
"@types/react-dom": "^19.2.3",
|
|
62
|
+
"@vitejs/plugin-react": "^6.0.3",
|
|
63
|
+
"jsdom": "^29.1.1",
|
|
64
|
+
"react": "^19.2.7",
|
|
65
|
+
"react-dom": "^19.2.7",
|
|
66
|
+
"vite": "^8.1.5",
|
|
67
|
+
"vitest": "^4.1.7",
|
|
68
|
+
"slackmark": "0.1.0"
|
|
69
|
+
},
|
|
70
|
+
"peerDependencies": {
|
|
71
|
+
"react": ">=18.2.0 <20",
|
|
72
|
+
"react-dom": ">=18.2.0 <20"
|
|
73
|
+
},
|
|
74
|
+
"engines": {
|
|
75
|
+
"node": ">=20"
|
|
76
|
+
},
|
|
77
|
+
"scripts": {
|
|
78
|
+
"build": "vite build && tsc -p tsconfig.build.json",
|
|
79
|
+
"test": "vitest run",
|
|
80
|
+
"test:watch": "vitest",
|
|
81
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit"
|
|
82
|
+
}
|
|
83
|
+
}
|