@caring-dev/react-notion-x 7.7.8 → 7.8.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caring-dev/react-notion-x",
3
- "version": "7.7.8",
3
+ "version": "7.8.3",
4
4
  "type": "module",
5
5
  "description": "Fast and accurate React renderer for Notion.",
6
6
  "repository": "caring-dev/react-notion-x-caring",
@@ -47,8 +47,7 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@fisch0920/medium-zoom": "^1.0.7",
50
- "@matejmazur/react-katex": "^3.1.3",
51
- "katex": "^0.16.21",
50
+ "katex": "0.16.21",
52
51
  "prismjs": "^1.30.0",
53
52
  "react-fast-compare": "^3.2.0",
54
53
  "react-hotkeys-hook": "^4.5.1",
@@ -56,20 +55,20 @@
56
55
  "react-intersection-observer": "^9.16.0",
57
56
  "react-modal": "^3.16.3",
58
57
  "unionize": "^3.1.0",
59
- "notion-types": "7.7.1",
60
- "notion-utils": "7.7.1"
58
+ "notion-utils": "7.8.3",
59
+ "notion-types": "7.8.3"
61
60
  },
62
61
  "devDependencies": {
63
62
  "@types/lodash.throttle": "^4.1.6",
64
63
  "@types/prismjs": "^1.26.5",
65
- "@types/react": "^19.1.6",
64
+ "@types/react": "^19.2.14",
66
65
  "@types/react-modal": "^3.16.3",
67
66
  "clipboard-copy": "^4.0.1",
68
67
  "date-fns": "^4.1.0",
69
68
  "format-number": "^3.0.0",
70
69
  "lodash.throttle": "^4.1.1",
71
- "react": "^19.1.1",
72
- "react-dom": "^19.1.1",
70
+ "react": "^19.2.4",
71
+ "react-dom": "^19.2.4",
73
72
  "react-pdf": "^9.1.1"
74
73
  },
75
74
  "peerDependencies": {
package/src/styles.css CHANGED
@@ -1278,6 +1278,287 @@ svg.notion-page-icon {
1278
1278
  margin-left: 1.1em;
1279
1279
  }
1280
1280
 
1281
+ .notion-button-block {
1282
+ padding: 4px 0;
1283
+ margin: 4px 0;
1284
+ }
1285
+
1286
+ .notion-button {
1287
+ display: inline-flex;
1288
+ align-items: center;
1289
+ justify-content: center;
1290
+ padding: 6px 12px;
1291
+ border: 1px solid var(--notion-gray);
1292
+ border-radius: 3px;
1293
+ font-size: 14px;
1294
+ font-weight: 400;
1295
+ color: #000;
1296
+ background-color: transparent;
1297
+ cursor: pointer;
1298
+ min-height: 32px;
1299
+ transition: background-color 0.15s ease;
1300
+ }
1301
+
1302
+ .notion-button:hover {
1303
+ background-color: rgba(0, 0, 0, 0.03);
1304
+ }
1305
+
1306
+ .notion-button:active {
1307
+ background-color: rgba(0, 0, 0, 0.06);
1308
+ }
1309
+
1310
+ .notion-button:focus-visible {
1311
+ outline: 2px solid var(--fg-color);
1312
+ outline-offset: 2px;
1313
+ }
1314
+
1315
+ .notion-button:disabled {
1316
+ opacity: 0.4;
1317
+ cursor: not-allowed;
1318
+ }
1319
+
1320
+ /* Button color variants using Notion's item colors */
1321
+ .notion-button-inner {
1322
+ display: inline-flex;
1323
+ align-items: center;
1324
+ justify-content: center;
1325
+ white-space: nowrap;
1326
+ border-radius: 3px;
1327
+ cursor: pointer;
1328
+ font-size: 14px;
1329
+ font-weight: 400;
1330
+ line-height: 1.2;
1331
+ padding: 6px 12px;
1332
+ border: 1px solid transparent;
1333
+ min-height: 32px;
1334
+ transition: background-color 0.15s ease;
1335
+ color: #000;
1336
+ }
1337
+
1338
+ .notion-button-inner:hover {
1339
+ filter: brightness(0.95);
1340
+ }
1341
+
1342
+ .notion-button-inner:active {
1343
+ filter: brightness(0.9);
1344
+ }
1345
+
1346
+ .notion-button-inner:focus-visible {
1347
+ outline: 2px solid var(--fg-color);
1348
+ outline-offset: 2px;
1349
+ }
1350
+
1351
+ .notion-button-inner:disabled {
1352
+ opacity: 0.4;
1353
+ cursor: not-allowed;
1354
+ }
1355
+
1356
+ /* Blue variant */
1357
+ .notion-blue_background .notion-button-inner,
1358
+ .notion-button.notion-blue_background {
1359
+ background-color: var(--notion-item-blue);
1360
+ border-color: var(--notion-item-blue);
1361
+ }
1362
+
1363
+ .notion-button.notion-blue_background:hover {
1364
+ background-color: var(--notion-item-blue);
1365
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.04);
1366
+ }
1367
+
1368
+ .notion-button.notion-blue_background:active {
1369
+ background-color: var(--notion-item-blue);
1370
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.08);
1371
+ }
1372
+
1373
+ /* Red variant */
1374
+ .notion-red_background .notion-button-inner,
1375
+ .notion-button.notion-red_background {
1376
+ background-color: var(--notion-item-red);
1377
+ border-color: var(--notion-item-red);
1378
+ }
1379
+
1380
+ .notion-button.notion-red_background:hover {
1381
+ background-color: var(--notion-item-red);
1382
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.04);
1383
+ }
1384
+
1385
+ .notion-button.notion-red_background:active {
1386
+ background-color: var(--notion-item-red);
1387
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.08);
1388
+ }
1389
+
1390
+ /* Orange variant */
1391
+ .notion-orange_background .notion-button-inner,
1392
+ .notion-button.notion-orange_background {
1393
+ background-color: var(--notion-item-orange);
1394
+ border-color: var(--notion-item-orange);
1395
+ }
1396
+
1397
+ .notion-button.notion-orange_background:hover {
1398
+ background-color: var(--notion-item-orange);
1399
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.04);
1400
+ }
1401
+
1402
+ .notion-button.notion-orange_background:active {
1403
+ background-color: var(--notion-item-orange);
1404
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.08);
1405
+ }
1406
+
1407
+ /* Green/Teal variant */
1408
+ .notion-green_background .notion-button-inner,
1409
+ .notion-teal_background .notion-button-inner,
1410
+ .notion-button.notion-green_background,
1411
+ .notion-button.notion-teal_background {
1412
+ background-color: var(--notion-item-green);
1413
+ border-color: var(--notion-item-green);
1414
+ }
1415
+
1416
+ .notion-button.notion-green_background:hover,
1417
+ .notion-button.notion-teal_background:hover {
1418
+ background-color: var(--notion-item-green);
1419
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.04);
1420
+ }
1421
+
1422
+ .notion-button.notion-green_background:active,
1423
+ .notion-button.notion-teal_background:active {
1424
+ background-color: var(--notion-item-green);
1425
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.08);
1426
+ }
1427
+
1428
+ /* Yellow variant */
1429
+ .notion-yellow_background .notion-button-inner,
1430
+ .notion-button.notion-yellow_background {
1431
+ background-color: var(--notion-item-yellow);
1432
+ border-color: var(--notion-item-yellow);
1433
+ }
1434
+
1435
+ .notion-button.notion-yellow_background:hover {
1436
+ background-color: var(--notion-item-yellow);
1437
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.04);
1438
+ }
1439
+
1440
+ .notion-button.notion-yellow_background:active {
1441
+ background-color: var(--notion-item-yellow);
1442
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.08);
1443
+ }
1444
+
1445
+ /* Purple variant */
1446
+ .notion-purple_background .notion-button-inner,
1447
+ .notion-button.notion-purple_background {
1448
+ background-color: var(--notion-item-purple);
1449
+ border-color: var(--notion-item-purple);
1450
+ }
1451
+
1452
+ .notion-button.notion-purple_background:hover {
1453
+ background-color: var(--notion-item-purple);
1454
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.04);
1455
+ }
1456
+
1457
+ .notion-button.notion-purple_background:active {
1458
+ background-color: var(--notion-item-purple);
1459
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.08);
1460
+ }
1461
+
1462
+ /* Pink variant */
1463
+ .notion-pink_background .notion-button-inner,
1464
+ .notion-button.notion-pink_background {
1465
+ background-color: var(--notion-item-pink);
1466
+ border-color: var(--notion-item-pink);
1467
+ }
1468
+
1469
+ .notion-button.notion-pink_background:hover {
1470
+ background-color: var(--notion-item-pink);
1471
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.04);
1472
+ }
1473
+
1474
+ .notion-button.notion-pink_background:active {
1475
+ background-color: var(--notion-item-pink);
1476
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.08);
1477
+ }
1478
+
1479
+ /* Gray variant */
1480
+ .notion-gray_background .notion-button-inner,
1481
+ .notion-button.notion-gray_background {
1482
+ background-color: var(--notion-item-gray);
1483
+ border-color: var(--notion-item-gray);
1484
+ }
1485
+
1486
+ .notion-button.notion-gray_background:hover {
1487
+ background-color: var(--notion-item-gray);
1488
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.04);
1489
+ }
1490
+
1491
+ .notion-button.notion-gray_background:active {
1492
+ background-color: var(--notion-item-gray);
1493
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.08);
1494
+ }
1495
+
1496
+ /* Brown variant */
1497
+ .notion-brown_background .notion-button-inner,
1498
+ .notion-button.notion-brown_background {
1499
+ background-color: var(--notion-item-brown);
1500
+ border-color: var(--notion-item-brown);
1501
+ }
1502
+
1503
+ .notion-button.notion-brown_background:hover {
1504
+ background-color: var(--notion-item-brown);
1505
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.04);
1506
+ }
1507
+
1508
+ .notion-button.notion-brown_background:active {
1509
+ background-color: var(--notion-item-brown);
1510
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.08);
1511
+ }
1512
+
1513
+ /* Default variant */
1514
+ .notion-button.notion-default {
1515
+ background-color: var(--notion-item-default);
1516
+ border-color: var(--notion-gray);
1517
+ }
1518
+
1519
+ .notion-button.notion-default:hover {
1520
+ background-color: var(--notion-item-default);
1521
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.04);
1522
+ }
1523
+
1524
+ .notion-button.notion-default:active {
1525
+ background-color: var(--notion-item-default);
1526
+ box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.08);
1527
+ }
1528
+
1529
+ /* Success state - darker green */
1530
+ .notion-button.notion-success {
1531
+ background-color: rgb(175, 210, 175) !important;
1532
+ border-color: rgb(175, 210, 175) !important;
1533
+ }
1534
+
1535
+ .notion-button.notion-default:hover {
1536
+ background-color: var(--fg-color-1);
1537
+ }
1538
+
1539
+ /* Success state */
1540
+ .notion-button.notion-success,
1541
+ .notion-button-inner.notion-success {
1542
+ background-color: #0f7b6c !important;
1543
+ color: white !important;
1544
+ }
1545
+
1546
+ .notion-button.notion-success:hover,
1547
+ .notion-button-inner.notion-success:hover {
1548
+ background-color: #0a5f54 !important;
1549
+ }
1550
+
1551
+ /* Dark mode adjustments */
1552
+ .dark-mode .notion-button,
1553
+ .dark-mode .notion-button-inner {
1554
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
1555
+ }
1556
+
1557
+ .dark-mode .notion-button:hover,
1558
+ .dark-mode .notion-button-inner:hover {
1559
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
1560
+ }
1561
+
1281
1562
  .notion-collection {
1282
1563
  align-self: center;
1283
1564
  min-width: 100%;