safe-mdx 0.0.1 → 0.0.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"safe-mdx.test.js","sourceRoot":"","sources":["../src/safe-mdx.test.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,oDAA2B;AAC3B,mCAAqC;AACrC,yCAAuC;AACvC,KAAK,eAAK,CAAA;AAEV,MAAM,UAAU,GAAG;IACf,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;QACvB,OAAO,yCAAK,QAAQ,GAAM,CAAA;IAC9B,CAAC;CACG,CAAA;AAER,SAAS,MAAM,CAAC,IAAI;IAChB,MAAM,OAAO,GAAG,IAAI,qBAAU,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAA;IACpD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;IAC5B,+CAA+C;IAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE,EAAE,CAAA;AACnD,CAAC;AAED,IAAA,aAAI,EAAC,OAAO,EAAE,GAAG,EAAE;IACf,IAAA,eAAM,EACF,MAAM,CAAC,IAAA,gBAAM,EAAA;;;;SAIZ,CAAC,CACL,CAAC,qBAAqB,CAAC;;;;;;;;;;;;KAYvB,CAAC,CAAA;AACN,CAAC,CAAC,CAAA;AAEF,IAAA,aAAI,EAAC,YAAY,EAAE,GAAG,EAAE;IACpB,IAAA,eAAM,EACF,MAAM,CAAC,IAAA,gBAAM,EAAA;;SAEZ,CAAC,CACL,CAAC,qBAAqB,CAAC;;;;;;;;;;;;;KAavB,CAAC,CAAA;AACN,CAAC,CAAC,CAAA;AAEF,IAAA,aAAI,EAAC,WAAW,EAAE,GAAG,EAAE;IACnB,IAAA,eAAM,EACF,MAAM,CAAC,IAAA,gBAAM,EAAA;;;;SAIZ,CAAC,CACL,CAAC,q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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAy6BvB,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,13 +1,21 @@
1
1
  {
2
2
  "name": "safe-mdx",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "private": false,
5
5
  "description": "Render MDX in React without eval",
6
6
  "repository": "https://github.com/holocron-hq/safe-mdx",
7
- "main": "dist/safe-mdx.js",
8
- "types": "dist/safe-mdx.d.ts",
7
+ "type": "module",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/safe-mdx.d.ts",
11
+ "default": "./dist/safe-mdx.js"
12
+ },
13
+ "./src/*": "./src/*.ts",
14
+ "./package.json": "./package.json"
15
+ },
9
16
  "scripts": {
10
17
  "build": "tsc",
18
+ "test": "vitest",
11
19
  "prepublishOnly": "pnpm build"
12
20
  },
13
21
  "files": [
@@ -38,6 +38,133 @@ test('basic', () => {
38
38
  }
39
39
  `)
40
40
  })
41
+ test('table', () => {
42
+ expect(
43
+ render(dedent`
44
+ # Hello
45
+
46
+ | Tables | Are | Cool |
47
+ | ------------- |:-------------:| -----:|
48
+ | col 3 is | right-aligned | $1600 |
49
+ | col 2 is | centered | $12 |
50
+ `),
51
+ ).toMatchInlineSnapshot(`
52
+ {
53
+ "errors": [],
54
+ "result": <React.Fragment>
55
+ <h1>
56
+ Hello
57
+ </h1>
58
+ <table>
59
+ <thead>
60
+ <tr
61
+ className=""
62
+ >
63
+ <td
64
+ className=""
65
+ >
66
+ Tables
67
+ </td>
68
+ <td
69
+ className=""
70
+ >
71
+ Are
72
+ </td>
73
+ <td
74
+ className=""
75
+ >
76
+ Cool
77
+ </td>
78
+ </tr>
79
+ </thead>
80
+ <tbody>
81
+ <tr
82
+ className=""
83
+ >
84
+ <td
85
+ className=""
86
+ >
87
+ col 3 is
88
+ </td>
89
+ <td
90
+ className=""
91
+ >
92
+ right-aligned
93
+ </td>
94
+ <td
95
+ className=""
96
+ >
97
+ $1600
98
+ </td>
99
+ </tr>
100
+ <tr
101
+ className=""
102
+ >
103
+ <td
104
+ className=""
105
+ >
106
+ col 2 is
107
+ </td>
108
+ <td
109
+ className=""
110
+ >
111
+ centered
112
+ </td>
113
+ <td
114
+ className=""
115
+ >
116
+ $12
117
+ </td>
118
+ </tr>
119
+ </tbody>
120
+ </table>
121
+ </React.Fragment>,
122
+ }
123
+ `)
124
+ })
125
+ test('table, only head', () => {
126
+ expect(
127
+ render(dedent`
128
+ # Hello
129
+
130
+ | Tables | Are | Cool |
131
+ | ------------- |:-------------:| -----:|
132
+
133
+ `),
134
+ ).toMatchInlineSnapshot(`
135
+ {
136
+ "errors": [],
137
+ "result": <React.Fragment>
138
+ <h1>
139
+ Hello
140
+ </h1>
141
+ <table>
142
+ <thead>
143
+ <tr
144
+ className=""
145
+ >
146
+ <td
147
+ className=""
148
+ >
149
+ Tables
150
+ </td>
151
+ <td
152
+ className=""
153
+ >
154
+ Are
155
+ </td>
156
+ <td
157
+ className=""
158
+ >
159
+ Cool
160
+ </td>
161
+ </tr>
162
+ </thead>
163
+ </table>
164
+ </React.Fragment>,
165
+ }
166
+ `)
167
+ })
41
168
 
42
169
  test('inline jsx', () => {
43
170
  expect(
@@ -116,6 +243,7 @@ test('props parsing', () => {
116
243
  jsx={<SomeComponent />}
117
244
  undef={undefined}
118
245
  null={null}
246
+ someJson={{"a": 1}}
119
247
  {...{
120
248
  spread: true
121
249
  }}
@@ -144,10 +272,15 @@ test('props parsing', () => {
144
272
  <Heading
145
273
  backTick="some \${expr} value"
146
274
  boolean={false}
147
- doublequote="a \\" string"
275
+ doublequote="a " string"
148
276
  null={null}
149
277
  num={2}
150
- quote="a \\" string"
278
+ quote="a " string"
279
+ someJson={
280
+ {
281
+ "a": 1,
282
+ }
283
+ }
151
284
  >
152
285
  <p>
153
286
  hi
@@ -759,9 +892,7 @@ test('kitchen sink', () => {
759
892
  Headers
760
893
  </h2>
761
894
  <pre>
762
- <code
763
- className="language-no-highlight"
764
- >
895
+ <code>
765
896
  # H1
766
897
  ## H2
767
898
  ### H3
@@ -812,9 +943,7 @@ test('kitchen sink', () => {
812
943
  Emphasis
813
944
  </h2>
814
945
  <pre>
815
- <code
816
- className="language-no-highlight"
817
- >
946
+ <code>
818
947
  Emphasis, aka italics, with *asterisks* or _underscores_.
819
948
 
820
949
  Strong emphasis, aka bold, with **asterisks** or __underscores__.
@@ -872,9 +1001,7 @@ test('kitchen sink', () => {
872
1001
  (In this example, leading and trailing spaces are shown with with dots: ⋅)
873
1002
  </p>
874
1003
  <pre>
875
- <code
876
- className="language-no-highlight"
877
- >
1004
+ <code>
878
1005
  1. First ordered list item
879
1006
  2. Another item
880
1007
  ⋅⋅* Unordered sub-list.
@@ -974,9 +1101,7 @@ test('kitchen sink', () => {
974
1101
  There are two ways to create links.
975
1102
  </p>
976
1103
  <pre>
977
- <code
978
- className="language-no-highlight"
979
- >
1104
+ <code>
980
1105
  [I'm an inline-style link](https://www.google.com)
981
1106
 
982
1107
  [I'm an inline-style link with title](https://www.google.com "Google's Homepage")
@@ -1069,9 +1194,7 @@ test('kitchen sink', () => {
1069
1194
  Images
1070
1195
  </h2>
1071
1196
  <pre>
1072
- <code
1073
- className="language-no-highlight"
1074
- >
1197
+ <code>
1075
1198
  Here's our logo (hover to see the title text):
1076
1199
 
1077
1200
  Inline-style:
@@ -1124,9 +1247,7 @@ test('kitchen sink', () => {
1124
1247
  .
1125
1248
  </p>
1126
1249
  <pre>
1127
- <code
1128
- className="language-no-highlight"
1129
- >
1250
+ <code>
1130
1251
  Inline \`code\` has \`back-ticks around\` it.
1131
1252
  </code>
1132
1253
  </pre>
@@ -1149,49 +1270,37 @@ test('kitchen sink', () => {
1149
1270
  , or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting.
1150
1271
  </p>
1151
1272
  <pre>
1152
- <code
1153
- className="language-javascript"
1154
- >
1273
+ <code>
1155
1274
  var s = "JavaScript syntax highlighting";
1156
1275
  alert(s);
1157
1276
  </code>
1158
1277
  </pre>
1159
1278
  <pre>
1160
- <code
1161
- className="language-python"
1162
- >
1279
+ <code>
1163
1280
  s = "Python syntax highlighting"
1164
1281
  print s
1165
1282
  </code>
1166
1283
  </pre>
1167
1284
  <pre>
1168
- <code
1169
- className="language-"
1170
- >
1285
+ <code>
1171
1286
  No language indicated, so no syntax highlighting.
1172
1287
  But let's throw in a &lt;b&gt;tag&lt;/b&gt;.
1173
1288
  </code>
1174
1289
  </pre>
1175
1290
  <pre>
1176
- <code
1177
- className="language-javascript"
1178
- >
1291
+ <code>
1179
1292
  var s = "JavaScript syntax highlighting";
1180
1293
  alert(s);
1181
1294
  </code>
1182
1295
  </pre>
1183
1296
  <pre>
1184
- <code
1185
- className="language-python"
1186
- >
1297
+ <code>
1187
1298
  s = "Python syntax highlighting"
1188
1299
  print s
1189
1300
  </code>
1190
1301
  </pre>
1191
1302
  <pre>
1192
- <code
1193
- className="language-"
1194
- >
1303
+ <code>
1195
1304
  No language indicated, so no syntax highlighting in Markdown Here (varies on Github).
1196
1305
  But let's throw in a &lt;b&gt;tag&lt;/b&gt;.
1197
1306
  </code>
@@ -1210,9 +1319,7 @@ test('kitchen sink', () => {
1210
1319
  supports them. They are an easy way of adding tables to your email -- a task that would otherwise require copy-pasting from another application.
1211
1320
  </p>
1212
1321
  <pre>
1213
- <code
1214
- className="language-no-highlight"
1215
- >
1322
+ <code>
1216
1323
  Colons can be used to align columns.
1217
1324
 
1218
1325
  | Tables | Are | Cool |
@@ -1235,150 +1342,158 @@ test('kitchen sink', () => {
1235
1342
  Colons can be used to align columns.
1236
1343
  </p>
1237
1344
  <table>
1238
- <tr
1239
- className=""
1240
- >
1241
- <td
1242
- className=""
1243
- >
1244
- Tables
1245
- </td>
1246
- <td
1247
- className=""
1248
- >
1249
- Are
1250
- </td>
1251
- <td
1252
- className=""
1253
- >
1254
- Cool
1255
- </td>
1256
- </tr>
1257
- <tr
1258
- className=""
1259
- >
1260
- <td
1261
- className=""
1262
- >
1263
- col 3 is
1264
- </td>
1265
- <td
1266
- className=""
1267
- >
1268
- right-aligned
1269
- </td>
1270
- <td
1271
- className=""
1272
- >
1273
- $1600
1274
- </td>
1275
- </tr>
1276
- <tr
1277
- className=""
1278
- >
1279
- <td
1280
- className=""
1281
- >
1282
- col 2 is
1283
- </td>
1284
- <td
1345
+ <thead>
1346
+ <tr
1285
1347
  className=""
1286
1348
  >
1287
- centered
1288
- </td>
1289
- <td
1349
+ <td
1350
+ className=""
1351
+ >
1352
+ Tables
1353
+ </td>
1354
+ <td
1355
+ className=""
1356
+ >
1357
+ Are
1358
+ </td>
1359
+ <td
1360
+ className=""
1361
+ >
1362
+ Cool
1363
+ </td>
1364
+ </tr>
1365
+ </thead>
1366
+ <tbody>
1367
+ <tr
1290
1368
  className=""
1291
1369
  >
1292
- $12
1293
- </td>
1294
- </tr>
1295
- <tr
1296
- className=""
1297
- >
1298
- <td
1299
- className=""
1300
- >
1301
- zebra stripes
1302
- </td>
1303
- <td
1370
+ <td
1371
+ className=""
1372
+ >
1373
+ col 3 is
1374
+ </td>
1375
+ <td
1376
+ className=""
1377
+ >
1378
+ right-aligned
1379
+ </td>
1380
+ <td
1381
+ className=""
1382
+ >
1383
+ $1600
1384
+ </td>
1385
+ </tr>
1386
+ <tr
1304
1387
  className=""
1305
1388
  >
1306
- are neat
1307
- </td>
1308
- <td
1389
+ <td
1390
+ className=""
1391
+ >
1392
+ col 2 is
1393
+ </td>
1394
+ <td
1395
+ className=""
1396
+ >
1397
+ centered
1398
+ </td>
1399
+ <td
1400
+ className=""
1401
+ >
1402
+ $12
1403
+ </td>
1404
+ </tr>
1405
+ <tr
1309
1406
  className=""
1310
1407
  >
1311
- $1
1312
- </td>
1313
- </tr>
1408
+ <td
1409
+ className=""
1410
+ >
1411
+ zebra stripes
1412
+ </td>
1413
+ <td
1414
+ className=""
1415
+ >
1416
+ are neat
1417
+ </td>
1418
+ <td
1419
+ className=""
1420
+ >
1421
+ $1
1422
+ </td>
1423
+ </tr>
1424
+ </tbody>
1314
1425
  </table>
1315
1426
  <p>
1316
1427
  There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.
1317
1428
  </p>
1318
1429
  <table>
1319
- <tr
1320
- className=""
1321
- >
1322
- <td
1323
- className=""
1324
- >
1325
- Markdown
1326
- </td>
1327
- <td
1328
- className=""
1329
- >
1330
- Less
1331
- </td>
1332
- <td
1333
- className=""
1334
- >
1335
- Pretty
1336
- </td>
1337
- </tr>
1338
- <tr
1339
- className=""
1340
- >
1341
- <td
1430
+ <thead>
1431
+ <tr
1342
1432
  className=""
1343
1433
  >
1344
- <em>
1345
- Still
1346
- </em>
1347
- </td>
1348
- <td
1434
+ <td
1435
+ className=""
1436
+ >
1437
+ Markdown
1438
+ </td>
1439
+ <td
1440
+ className=""
1441
+ >
1442
+ Less
1443
+ </td>
1444
+ <td
1445
+ className=""
1446
+ >
1447
+ Pretty
1448
+ </td>
1449
+ </tr>
1450
+ </thead>
1451
+ <tbody>
1452
+ <tr
1349
1453
  className=""
1350
1454
  >
1351
- <code>
1352
- renders
1353
- </code>
1354
- </td>
1355
- <td
1455
+ <td
1456
+ className=""
1457
+ >
1458
+ <em>
1459
+ Still
1460
+ </em>
1461
+ </td>
1462
+ <td
1463
+ className=""
1464
+ >
1465
+ <code>
1466
+ renders
1467
+ </code>
1468
+ </td>
1469
+ <td
1470
+ className=""
1471
+ >
1472
+ <strong>
1473
+ nicely
1474
+ </strong>
1475
+ </td>
1476
+ </tr>
1477
+ <tr
1356
1478
  className=""
1357
1479
  >
1358
- <strong>
1359
- nicely
1360
- </strong>
1361
- </td>
1362
- </tr>
1363
- <tr
1364
- className=""
1365
- >
1366
- <td
1367
- className=""
1368
- >
1369
- 1
1370
- </td>
1371
- <td
1372
- className=""
1373
- >
1374
- 2
1375
- </td>
1376
- <td
1377
- className=""
1378
- >
1379
- 3
1380
- </td>
1381
- </tr>
1480
+ <td
1481
+ className=""
1482
+ >
1483
+ 1
1484
+ </td>
1485
+ <td
1486
+ className=""
1487
+ >
1488
+ 2
1489
+ </td>
1490
+ <td
1491
+ className=""
1492
+ >
1493
+ 3
1494
+ </td>
1495
+ </tr>
1496
+ </tbody>
1382
1497
  </table>
1383
1498
  <a
1384
1499
  name="blockquotes"
@@ -1387,9 +1502,7 @@ test('kitchen sink', () => {
1387
1502
  Blockquotes
1388
1503
  </h2>
1389
1504
  <pre>
1390
- <code
1391
- className="language-no-highlight"
1392
- >
1505
+ <code>
1393
1506
  &gt; Blockquotes are very handy in email to emulate reply text.
1394
1507
  &gt; This line is part of the same quote.
1395
1508
 
@@ -1430,9 +1543,7 @@ test('kitchen sink', () => {
1430
1543
  You can also use raw HTML in your Markdown, and it'll mostly work pretty well.
1431
1544
  </p>
1432
1545
  <pre>
1433
- <code
1434
- className="language-no-highlight"
1435
- >
1546
+ <code>
1436
1547
  &lt;dl&gt;
1437
1548
  &lt;dt&gt;Definition list&lt;/dt&gt;
1438
1549
  &lt;dd&gt;Is something people use sometimes.&lt;/dd&gt;
@@ -1449,9 +1560,7 @@ test('kitchen sink', () => {
1449
1560
  Horizontal Rule
1450
1561
  </h2>
1451
1562
  <pre>
1452
- <code
1453
- className="language-"
1454
- >
1563
+ <code>
1455
1564
  Three or more...
1456
1565
 
1457
1566
  ---
@@ -1495,9 +1604,7 @@ test('kitchen sink', () => {
1495
1604
  Here are some things to try out:
1496
1605
  </p>
1497
1606
  <pre>
1498
- <code
1499
- className="language-"
1500
- >
1607
+ <code>
1501
1608
  Here's a line for us to start with.
1502
1609
 
1503
1610
  This line is separated from the one above by two newlines, so it will be a *separate paragraph*.
@@ -1542,9 +1649,7 @@ test('kitchen sink', () => {
1542
1649
  They can't be added directly but you can add an image with a link to the video like this:
1543
1650
  </p>
1544
1651
  <pre>
1545
- <code
1546
- className="language-no-highlight"
1547
- >
1652
+ <code>
1548
1653
  &lt;a href="http://www.youtube.com/watch?feature=player_embedded&v=YOUTUBE_VIDEO_ID_HERE
1549
1654
  " target="_blank"&gt;&lt;img src="http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg"
1550
1655
  alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" /&gt;&lt;/a&gt;
@@ -1554,9 +1659,7 @@ test('kitchen sink', () => {
1554
1659
  Or, in pure Markdown, but losing the image sizing and border:
1555
1660
  </p>
1556
1661
  <pre>
1557
- <code
1558
- className="language-no-highlight"
1559
- >
1662
+ <code>
1560
1663
  [![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)
1561
1664
  </code>
1562
1665
  </pre>