@shapesos/clay 0.8.2 → 0.10.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.
@@ -0,0 +1,650 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/components/blocks/index.ts
31
+ var blocks_exports = {};
32
+ __export(blocks_exports, {
33
+ Block: () => Block,
34
+ BlockContext: () => BlockContext,
35
+ BlockServices: () => BlockServices,
36
+ TextBlockService: () => TextBlockService,
37
+ blockTypes: () => blockTypes,
38
+ useBlockContext: () => useBlockContext
39
+ });
40
+ module.exports = __toCommonJS(blocks_exports);
41
+
42
+ // src/components/blocks/text-block/text-block.tsx
43
+ var import_react_markdown = __toESM(require("react-markdown"), 1);
44
+ var import_remark_breaks = __toESM(require("remark-breaks"), 1);
45
+ var import_remark_gfm = __toESM(require("remark-gfm"), 1);
46
+
47
+ // src/components/blocks/block-context/block-context.tsx
48
+ var import_react = require("react");
49
+ var BlockContext = (0, import_react.createContext)(null);
50
+ function useBlockContext() {
51
+ return (0, import_react.useContext)(BlockContext) ?? {};
52
+ }
53
+
54
+ // src/components/blocks/scrollable-table/scrollable-table-styles.ts
55
+ var import_styled_components = __toESM(require("styled-components"), 1);
56
+
57
+ // src/tokens/colors.ts
58
+ var colors = {
59
+ // White
60
+ white: "#FFFFFF",
61
+ "white-alpha-85": "rgba(255, 255, 255, 0.85)",
62
+ "white-alpha-40": "rgba(255, 255, 255, 0.40)",
63
+ // Brown
64
+ "brown-10": "#FAF9F8",
65
+ "brown-20": "#F5F3F0",
66
+ "brown-30": "#EEEBE5",
67
+ "brown-40": "#E6E2DA",
68
+ "brown-50": "#CFCBC4",
69
+ "brown-60": "#A19E99",
70
+ "brown-70": "#73716D",
71
+ "brown-80": "#5C5A57",
72
+ "brown-90": "#2E2D2C",
73
+ "brown-100": "#171716",
74
+ "brown-alpha-12": "rgba(23, 23, 22, 0.12)",
75
+ "brown-alpha-20": "rgba(23, 23, 22, 0.20)",
76
+ "brown-alpha-55": "rgba(23, 23, 22, 0.55)",
77
+ "brown-alpha-70": "rgba(23, 23, 22, 0.70)",
78
+ "brown-alpha-80": "rgba(23, 23, 22, 0.80)",
79
+ "brown-alpha-90": "rgba(23, 23, 22, 0.90)",
80
+ // Fuchsia
81
+ "fuchsia-50": "#FAF5FF",
82
+ "fuchsia-300": "#F0ABFC",
83
+ "fuchsia-500": "#D946EF",
84
+ "fuchsia-600": "#C026D3",
85
+ "fuchsia-800": "#86198F",
86
+ // Pink
87
+ "pink-50": "#FDF2F8",
88
+ "pink-400": "#F472B6",
89
+ "pink-600": "#DB2777",
90
+ "pink-800": "#9D174D",
91
+ // Violet
92
+ "violet-50": "#F5F3FF",
93
+ "violet-400": "#A78BFA",
94
+ "violet-600": "#7C3AED",
95
+ "violet-800": "#5B21B6",
96
+ // Indigo
97
+ "indigo-50": "#EEF2FF",
98
+ "indigo-400": "#818CF8",
99
+ "indigo-500": "#6366F1",
100
+ "indigo-600": "#4F46E5",
101
+ "indigo-800": "#3730A3",
102
+ // Cyan
103
+ "cyan-50": "#E7FEFF",
104
+ "cyan-300": "#67E8F9",
105
+ "cyan-600": "#0891B2",
106
+ "cyan-900": "#164E63",
107
+ // Teal
108
+ "teal-50": "#EBFDF9",
109
+ "teal-300": "#5EEAD4",
110
+ "teal-600": "#0D9488",
111
+ // Rose
112
+ "rose-400": "#FB7185",
113
+ // Purple
114
+ "purple-400": "#C084FC",
115
+ // Blue
116
+ "blue-50": "#EFF6FF",
117
+ "blue-100": "#DBEAFE",
118
+ "blue-300": "#93C5FD",
119
+ "blue-400": "#60A5FA",
120
+ "blue-600": "#2563EB",
121
+ "blue-800": "#1E40AF",
122
+ // Sky
123
+ "sky-300": "#7DD3FC",
124
+ // Green
125
+ "green-50": "#ECF9F0",
126
+ "green-100": "#D4F1D9",
127
+ "green-400": "#3DC269",
128
+ "green-700": "#277C43",
129
+ "green-800": "#1C5930",
130
+ // Orange
131
+ "orange-50": "#FFF7ED",
132
+ "orange-100": "#FFEDD5",
133
+ "orange-200": "#FED7AA",
134
+ "orange-500": "#F97316",
135
+ "orange-600": "#EA580C",
136
+ // Red
137
+ "red-50": "#FEF2F2",
138
+ "red-100": "#FEE2E2",
139
+ "red-200": "#FECACA",
140
+ "red-400": "#F7776C",
141
+ "red-500": "#EF4444",
142
+ "red-600": "#DC2626"
143
+ };
144
+
145
+ // src/components/blocks/scrollable-table/scrollable-table-styles.ts
146
+ var TableContainer = import_styled_components.default.div`
147
+ position: relative;
148
+ margin-block: 8px 16px;
149
+ `;
150
+ var TableScroll = import_styled_components.default.div`
151
+ width: 100%;
152
+ overflow-x: auto;
153
+ overflow-y: hidden;
154
+ `;
155
+ var TableActionsWrapper = import_styled_components.default.div`
156
+ display: flex;
157
+ justify-content: flex-start;
158
+ margin-block: 8px 0;
159
+ `;
160
+ var TableActionsDivider = import_styled_components.default.div`
161
+ height: 1px;
162
+ background: ${colors["brown-40"]};
163
+ margin-block: 8px 0;
164
+ `;
165
+
166
+ // src/components/blocks/scrollable-table/scrollable-table.tsx
167
+ var import_jsx_runtime = require("react/jsx-runtime");
168
+ function ScrollableTable({ node: _node, counter, ...props }) {
169
+ const currentIndex = counter ? counter.value : 0;
170
+ if (counter) {
171
+ counter.value += 1;
172
+ }
173
+ const { TableActions } = useBlockContext();
174
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TableContainer, { children: [
175
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableScroll, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("table", { ...props }) }),
176
+ TableActions && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
177
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableActionsWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableActions, { tableIndex: currentIndex }) }),
178
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableActionsDivider, {})
179
+ ] })
180
+ ] });
181
+ }
182
+
183
+ // src/components/blocks/text-block/sanitize.ts
184
+ function sanitize(text) {
185
+ return text.split("\n").filter((line) => {
186
+ const t = line.trim();
187
+ return !(t.startsWith("<!-- table-title:") && t.endsWith("-->"));
188
+ }).join("\n");
189
+ }
190
+
191
+ // src/components/blocks/text-block/text-block-styles.ts
192
+ var import_styled_components2 = __toESM(require("styled-components"), 1);
193
+
194
+ // src/tokens/typography.ts
195
+ var fontFamilies = {
196
+ /** Geist — primary UI font for body text, labels, headings, and display. */
197
+ GEIST: "Geist",
198
+ /** Crimson Pro — editorial/serif font, always italic. Used for decorative headings and pull quotes. */
199
+ CRIMSON_PRO: "Crimson Pro"
200
+ };
201
+ var typographyTypes = {
202
+ // Geist Label Caption (12px)
203
+ GEIST_LABEL_CAPTION_REGULAR: "GEIST_LABEL_CAPTION_REGULAR",
204
+ GEIST_LABEL_CAPTION_MEDIUM: "GEIST_LABEL_CAPTION_MEDIUM",
205
+ GEIST_LABEL_CAPTION_SEMI_BOLD: "GEIST_LABEL_CAPTION_SEMI_BOLD",
206
+ // Geist Body Extra Small (14px)
207
+ GEIST_BODY_XS_REGULAR: "GEIST_BODY_XS_REGULAR",
208
+ GEIST_BODY_XS_MEDIUM: "GEIST_BODY_XS_MEDIUM",
209
+ GEIST_BODY_XS_BOLD: "GEIST_BODY_XS_BOLD",
210
+ // Geist Body Small (16px)
211
+ GEIST_BODY_S_REGULAR: "GEIST_BODY_S_REGULAR",
212
+ GEIST_BODY_S_MEDIUM: "GEIST_BODY_S_MEDIUM",
213
+ GEIST_BODY_S_SEMI_BOLD: "GEIST_BODY_S_SEMI_BOLD",
214
+ GEIST_BODY_S_BOLD: "GEIST_BODY_S_BOLD",
215
+ // Geist Body Medium (18px)
216
+ GEIST_BODY_M_LIGHT: "GEIST_BODY_M_LIGHT",
217
+ GEIST_BODY_M_REGULAR: "GEIST_BODY_M_REGULAR",
218
+ GEIST_BODY_M_MEDIUM: "GEIST_BODY_M_MEDIUM",
219
+ GEIST_BODY_M_SEMI_BOLD: "GEIST_BODY_M_SEMI_BOLD",
220
+ // Geist Body Large (20px)
221
+ GEIST_BODY_L_REGULAR: "GEIST_BODY_L_REGULAR",
222
+ GEIST_BODY_L_MEDIUM: "GEIST_BODY_L_MEDIUM",
223
+ GEIST_BODY_L_SEMI_BOLD: "GEIST_BODY_L_SEMI_BOLD",
224
+ GEIST_BODY_L_BOLD: "GEIST_BODY_L_BOLD",
225
+ // Geist Heading Small (24px)
226
+ GEIST_HEADING_S_REGULAR: "GEIST_HEADING_S_REGULAR",
227
+ GEIST_HEADING_S_MEDIUM: "GEIST_HEADING_S_MEDIUM",
228
+ GEIST_HEADING_S_BOLD: "GEIST_HEADING_S_BOLD",
229
+ // Geist Heading Medium (28px)
230
+ GEIST_HEADING_M_BOLD: "GEIST_HEADING_M_BOLD",
231
+ // Geist Heading Large (32px)
232
+ GEIST_HEADING_L_REGULAR: "GEIST_HEADING_L_REGULAR",
233
+ GEIST_HEADING_L_MEDIUM: "GEIST_HEADING_L_MEDIUM",
234
+ GEIST_HEADING_L_SEMI_BOLD: "GEIST_HEADING_L_SEMI_BOLD",
235
+ GEIST_HEADING_L_BOLD: "GEIST_HEADING_L_BOLD",
236
+ // Geist Display Large (36px)
237
+ GEIST_DISPLAY_L_MEDIUM: "GEIST_DISPLAY_L_MEDIUM",
238
+ // Crimson Pro Body Small (16px)
239
+ CRIMSON_PRO_BODY_S_LIGHT: "CRIMSON_PRO_BODY_S_LIGHT",
240
+ // Crimson Pro Body Medium (18px)
241
+ CRIMSON_PRO_BODY_M_LIGHT: "CRIMSON_PRO_BODY_M_LIGHT",
242
+ // Crimson Pro Heading Medium (24px)
243
+ CRIMSON_PRO_HEADING_M_MEDIUM: "CRIMSON_PRO_HEADING_M_MEDIUM",
244
+ // Crimson Pro Display Extra Large (46px)
245
+ CRIMSON_PRO_DISPLAY_XL_REGULAR: "CRIMSON_PRO_DISPLAY_XL_REGULAR"
246
+ };
247
+ var typographyStyles = {
248
+ // Geist Label Caption (12px)
249
+ [typographyTypes.GEIST_LABEL_CAPTION_REGULAR]: {
250
+ fontFamily: fontFamilies.GEIST,
251
+ fontSize: 12,
252
+ fontWeight: 400,
253
+ lineHeight: 16
254
+ },
255
+ [typographyTypes.GEIST_LABEL_CAPTION_MEDIUM]: {
256
+ fontFamily: fontFamilies.GEIST,
257
+ fontSize: 12,
258
+ fontWeight: 500,
259
+ lineHeight: 16
260
+ },
261
+ [typographyTypes.GEIST_LABEL_CAPTION_SEMI_BOLD]: {
262
+ fontFamily: fontFamilies.GEIST,
263
+ fontSize: 12,
264
+ fontWeight: 600,
265
+ lineHeight: 16
266
+ },
267
+ // Geist Body Extra Small (14px)
268
+ [typographyTypes.GEIST_BODY_XS_REGULAR]: {
269
+ fontFamily: fontFamilies.GEIST,
270
+ fontSize: 14,
271
+ fontWeight: 400,
272
+ lineHeight: 20
273
+ },
274
+ [typographyTypes.GEIST_BODY_XS_MEDIUM]: {
275
+ fontFamily: fontFamilies.GEIST,
276
+ fontSize: 14,
277
+ fontWeight: 500,
278
+ lineHeight: 20
279
+ },
280
+ [typographyTypes.GEIST_BODY_XS_BOLD]: {
281
+ fontFamily: fontFamilies.GEIST,
282
+ fontSize: 14,
283
+ fontWeight: 600,
284
+ lineHeight: 20
285
+ },
286
+ // Geist Body Small (16px)
287
+ [typographyTypes.GEIST_BODY_S_REGULAR]: {
288
+ fontFamily: fontFamilies.GEIST,
289
+ fontSize: 16,
290
+ fontWeight: 400,
291
+ lineHeight: 24,
292
+ letterSpacing: -0.08
293
+ },
294
+ [typographyTypes.GEIST_BODY_S_MEDIUM]: {
295
+ fontFamily: fontFamilies.GEIST,
296
+ fontSize: 16,
297
+ fontWeight: 500,
298
+ lineHeight: 24,
299
+ letterSpacing: -0.08
300
+ },
301
+ [typographyTypes.GEIST_BODY_S_SEMI_BOLD]: {
302
+ fontFamily: fontFamilies.GEIST,
303
+ fontSize: 16,
304
+ fontWeight: 600,
305
+ lineHeight: 24,
306
+ letterSpacing: -0.08
307
+ },
308
+ [typographyTypes.GEIST_BODY_S_BOLD]: {
309
+ fontFamily: fontFamilies.GEIST,
310
+ fontSize: 16,
311
+ fontWeight: 700,
312
+ lineHeight: 24,
313
+ letterSpacing: -0.08
314
+ },
315
+ // Geist Body Medium (18px)
316
+ [typographyTypes.GEIST_BODY_M_LIGHT]: {
317
+ fontFamily: fontFamilies.GEIST,
318
+ fontSize: 18,
319
+ fontWeight: 300,
320
+ lineHeight: 28,
321
+ letterSpacing: -0.09
322
+ },
323
+ [typographyTypes.GEIST_BODY_M_REGULAR]: {
324
+ fontFamily: fontFamilies.GEIST,
325
+ fontSize: 18,
326
+ fontWeight: 400,
327
+ lineHeight: 28,
328
+ letterSpacing: -0.09
329
+ },
330
+ [typographyTypes.GEIST_BODY_M_MEDIUM]: {
331
+ fontFamily: fontFamilies.GEIST,
332
+ fontSize: 18,
333
+ fontWeight: 500,
334
+ lineHeight: 28,
335
+ letterSpacing: -0.09
336
+ },
337
+ [typographyTypes.GEIST_BODY_M_SEMI_BOLD]: {
338
+ fontFamily: fontFamilies.GEIST,
339
+ fontSize: 18,
340
+ fontWeight: 600,
341
+ lineHeight: 28,
342
+ letterSpacing: -0.09
343
+ },
344
+ // Geist Body Large (20px)
345
+ [typographyTypes.GEIST_BODY_L_REGULAR]: {
346
+ fontFamily: fontFamilies.GEIST,
347
+ fontSize: 20,
348
+ fontWeight: 400,
349
+ lineHeight: 30,
350
+ letterSpacing: -0.2
351
+ },
352
+ [typographyTypes.GEIST_BODY_L_MEDIUM]: {
353
+ fontFamily: fontFamilies.GEIST,
354
+ fontSize: 20,
355
+ fontWeight: 500,
356
+ lineHeight: 30,
357
+ letterSpacing: -0.2
358
+ },
359
+ [typographyTypes.GEIST_BODY_L_SEMI_BOLD]: {
360
+ fontFamily: fontFamilies.GEIST,
361
+ fontSize: 20,
362
+ fontWeight: 600,
363
+ lineHeight: 30,
364
+ letterSpacing: -0.2
365
+ },
366
+ [typographyTypes.GEIST_BODY_L_BOLD]: {
367
+ fontFamily: fontFamilies.GEIST,
368
+ fontSize: 20,
369
+ fontWeight: 700,
370
+ lineHeight: 30,
371
+ letterSpacing: -0.2
372
+ },
373
+ // Geist Heading Small (24px)
374
+ [typographyTypes.GEIST_HEADING_S_REGULAR]: {
375
+ fontFamily: fontFamilies.GEIST,
376
+ fontSize: 24,
377
+ fontWeight: 400,
378
+ lineHeight: 32,
379
+ letterSpacing: -0.48
380
+ },
381
+ [typographyTypes.GEIST_HEADING_S_MEDIUM]: {
382
+ fontFamily: fontFamilies.GEIST,
383
+ fontSize: 24,
384
+ fontWeight: 500,
385
+ lineHeight: 32,
386
+ letterSpacing: -0.48
387
+ },
388
+ [typographyTypes.GEIST_HEADING_S_BOLD]: {
389
+ fontFamily: fontFamilies.GEIST,
390
+ fontSize: 24,
391
+ fontWeight: 700,
392
+ lineHeight: 32,
393
+ letterSpacing: -0.48
394
+ },
395
+ // Geist Heading Medium (28px)
396
+ [typographyTypes.GEIST_HEADING_M_BOLD]: {
397
+ fontFamily: fontFamilies.GEIST,
398
+ fontSize: 28,
399
+ fontWeight: 700,
400
+ lineHeight: 36,
401
+ letterSpacing: -0.6
402
+ },
403
+ // Geist Heading Large (32px)
404
+ [typographyTypes.GEIST_HEADING_L_REGULAR]: {
405
+ fontFamily: fontFamilies.GEIST,
406
+ fontSize: 32,
407
+ fontWeight: 400,
408
+ lineHeight: 40,
409
+ letterSpacing: -0.64
410
+ },
411
+ [typographyTypes.GEIST_HEADING_L_MEDIUM]: {
412
+ fontFamily: fontFamilies.GEIST,
413
+ fontSize: 32,
414
+ fontWeight: 500,
415
+ lineHeight: 40,
416
+ letterSpacing: -0.64
417
+ },
418
+ [typographyTypes.GEIST_HEADING_L_SEMI_BOLD]: {
419
+ fontFamily: fontFamilies.GEIST,
420
+ fontSize: 32,
421
+ fontWeight: 600,
422
+ lineHeight: 40,
423
+ letterSpacing: -0.64
424
+ },
425
+ [typographyTypes.GEIST_HEADING_L_BOLD]: {
426
+ fontFamily: fontFamilies.GEIST,
427
+ fontSize: 32,
428
+ fontWeight: 700,
429
+ lineHeight: 40,
430
+ letterSpacing: -0.64
431
+ },
432
+ // Geist Display Large (36px)
433
+ [typographyTypes.GEIST_DISPLAY_L_MEDIUM]: {
434
+ fontFamily: fontFamilies.GEIST,
435
+ fontSize: 36,
436
+ fontWeight: 500,
437
+ lineHeight: 44,
438
+ letterSpacing: -0.72
439
+ },
440
+ // Crimson Pro Body Small (16px)
441
+ [typographyTypes.CRIMSON_PRO_BODY_S_LIGHT]: {
442
+ fontFamily: fontFamilies.CRIMSON_PRO,
443
+ fontSize: 16,
444
+ fontWeight: 300,
445
+ lineHeight: 20,
446
+ letterSpacing: -0.32,
447
+ fontStyle: "italic"
448
+ },
449
+ // Crimson Pro Body Medium (18px)
450
+ [typographyTypes.CRIMSON_PRO_BODY_M_LIGHT]: {
451
+ fontFamily: fontFamilies.CRIMSON_PRO,
452
+ fontSize: 18,
453
+ fontWeight: 300,
454
+ lineHeight: 28,
455
+ letterSpacing: 0,
456
+ fontStyle: "italic"
457
+ },
458
+ // Crimson Pro Heading Medium (24px)
459
+ [typographyTypes.CRIMSON_PRO_HEADING_M_MEDIUM]: {
460
+ fontFamily: fontFamilies.CRIMSON_PRO,
461
+ fontSize: 24,
462
+ fontWeight: 400,
463
+ lineHeight: 32,
464
+ letterSpacing: -0.48,
465
+ fontStyle: "italic"
466
+ },
467
+ // Crimson Pro Display Extra Large (46px)
468
+ [typographyTypes.CRIMSON_PRO_DISPLAY_XL_REGULAR]: {
469
+ fontFamily: fontFamilies.CRIMSON_PRO,
470
+ fontSize: 46,
471
+ fontWeight: 400,
472
+ lineHeight: 54,
473
+ letterSpacing: -1.38,
474
+ fontStyle: "italic"
475
+ }
476
+ };
477
+ function typographyMixin(type) {
478
+ const style = typographyStyles[type];
479
+ return [
480
+ `font-family: "${style.fontFamily}", sans-serif`,
481
+ `font-size: ${style.fontSize}px`,
482
+ `font-weight: ${style.fontWeight}`,
483
+ `line-height: ${style.lineHeight}px`,
484
+ `letter-spacing: ${style.letterSpacing != null ? `${style.letterSpacing}px` : "inherit"}`,
485
+ `font-style: ${style.fontStyle ?? "normal"}`
486
+ ].join(";\n ");
487
+ }
488
+
489
+ // src/components/blocks/text-block/text-block-styles.ts
490
+ var TextBlockWrapper = import_styled_components2.default.div`
491
+ ${typographyMixin(typographyTypes.GEIST_BODY_S_REGULAR)};
492
+ color: ${colors["brown-100"]};
493
+ word-break: break-word;
494
+
495
+ & h1 {
496
+ ${typographyMixin(typographyTypes.GEIST_HEADING_S_BOLD)};
497
+ margin-block: 20px;
498
+ }
499
+
500
+ & h2 {
501
+ ${typographyMixin(typographyTypes.GEIST_BODY_L_SEMI_BOLD)};
502
+ margin-block: 12px;
503
+ }
504
+
505
+ & h3,
506
+ & h4,
507
+ & h5,
508
+ & h6 {
509
+ ${typographyMixin(typographyTypes.GEIST_BODY_M_SEMI_BOLD)};
510
+ margin-block: 8px;
511
+ }
512
+
513
+ & strong {
514
+ ${typographyMixin(typographyTypes.GEIST_BODY_S_SEMI_BOLD)};
515
+ }
516
+
517
+ & p {
518
+ margin-block: 0px;
519
+ }
520
+
521
+ & p + p {
522
+ margin-block: 8px 0px;
523
+ }
524
+
525
+ & ul,
526
+ & ol {
527
+ margin-block: 16px;
528
+ padding-left: 20px;
529
+ }
530
+
531
+ & li + li {
532
+ margin-block: 4px;
533
+ }
534
+
535
+ & ol {
536
+ list-style-type: decimal;
537
+ }
538
+
539
+ & ol ol {
540
+ list-style-type: lower-alpha;
541
+ }
542
+
543
+ & ol ol ol {
544
+ list-style-type: lower-roman;
545
+ }
546
+
547
+ & a {
548
+ color: inherit;
549
+ text-decoration-line: underline;
550
+ text-decoration-style: dotted;
551
+ text-decoration-thickness: auto;
552
+ text-underline-offset: auto;
553
+ text-underline-position: from-font;
554
+ transition: color 75ms ease-in-out;
555
+
556
+ &:hover {
557
+ color: ${colors["blue-600"]};
558
+ }
559
+ }
560
+
561
+ & hr {
562
+ border: none;
563
+ border-top: 1px solid ${colors["brown-40"]};
564
+ margin-block: 20px;
565
+ }
566
+
567
+ & table {
568
+ margin: 0;
569
+ width: 100%;
570
+ border-collapse: collapse;
571
+ }
572
+
573
+ & th,
574
+ & td {
575
+ border: none;
576
+ border-bottom: 1px solid ${colors["brown-40"]};
577
+ text-align: left;
578
+ }
579
+
580
+ & th {
581
+ ${typographyMixin(typographyTypes.GEIST_LABEL_CAPTION_MEDIUM)};
582
+ padding: 8px;
583
+ }
584
+
585
+ & td {
586
+ ${typographyMixin(typographyTypes.GEIST_BODY_XS_MEDIUM)};
587
+ padding: 16px 8px;
588
+ min-width: 150px;
589
+ width: 1%;
590
+ }
591
+
592
+ & td strong {
593
+ font-weight: inherit;
594
+ font-size: inherit;
595
+ line-height: inherit;
596
+ }
597
+
598
+ & blockquote {
599
+ margin-block: 4px;
600
+ margin-inline: 0px;
601
+ padding-left: 16px;
602
+ border-left: 4px solid ${colors["brown-40"]};
603
+ color: ${colors["brown-80"]};
604
+ }
605
+ `;
606
+
607
+ // src/components/blocks/text-block/text-block.tsx
608
+ var import_jsx_runtime2 = require("react/jsx-runtime");
609
+ function TextBlock({ block }) {
610
+ const counter = { value: 0 };
611
+ const markdownComponents = {
612
+ table: ((tableProps) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ScrollableTable, { ...tableProps, counter }))
613
+ };
614
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TextBlockWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_markdown.default, { remarkPlugins: [import_remark_gfm.default, import_remark_breaks.default], components: markdownComponents, children: sanitize(block.payload.text) }) });
615
+ }
616
+
617
+ // src/components/blocks/types.ts
618
+ var blockTypes = {
619
+ TEXT: "TEXT"
620
+ };
621
+
622
+ // src/components/blocks/block-services/text-block-service.ts
623
+ var TextBlockService = {
624
+ type: blockTypes.TEXT,
625
+ Component: TextBlock
626
+ };
627
+
628
+ // src/components/blocks/block-services/index.ts
629
+ var BlockServices = {
630
+ [TextBlockService.type]: TextBlockService
631
+ };
632
+
633
+ // src/components/blocks/block/block.tsx
634
+ var import_jsx_runtime3 = require("react/jsx-runtime");
635
+ function Block({ block }) {
636
+ const service = BlockServices[block.type];
637
+ if (!service) return null;
638
+ const { Component } = service;
639
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Component, { block });
640
+ }
641
+ // Annotate the CommonJS export names for ESM import in node:
642
+ 0 && (module.exports = {
643
+ Block,
644
+ BlockContext,
645
+ BlockServices,
646
+ TextBlockService,
647
+ blockTypes,
648
+ useBlockContext
649
+ });
650
+ //# sourceMappingURL=blocks.cjs.map