drawui-react 0.4.1 → 0.5.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/dist/styles.css CHANGED
@@ -1405,3 +1405,94 @@
1405
1405
  overflow: hidden;
1406
1406
  resize: none;
1407
1407
  }
1408
+ .drawui-context-menu {
1409
+ position: absolute;
1410
+ display: flex;
1411
+ flex-direction: column;
1412
+ min-width: 224px;
1413
+ padding: 6px;
1414
+ background: var(--dw-panel-bg);
1415
+ backdrop-filter: blur(16px);
1416
+ -webkit-backdrop-filter: blur(16px);
1417
+ border-radius: 12px;
1418
+ box-shadow: var(--dw-shadow-xl);
1419
+ border: 1px solid var(--dw-panel-border);
1420
+ z-index: 500;
1421
+ user-select: none;
1422
+ animation: drawui-context-menu-in 0.18s cubic-bezier(0.4, 0, 0.2, 1);
1423
+ }
1424
+ @keyframes drawui-context-menu-in {
1425
+ from {
1426
+ opacity: 0;
1427
+ transform: scale(0.96);
1428
+ }
1429
+ to {
1430
+ opacity: 1;
1431
+ transform: scale(1);
1432
+ }
1433
+ }
1434
+ .drawui-context-item {
1435
+ display: flex;
1436
+ align-items: center;
1437
+ justify-content: space-between;
1438
+ gap: 24px;
1439
+ width: 100%;
1440
+ padding: 7px 10px;
1441
+ border: none;
1442
+ border-radius: 10px;
1443
+ background: transparent;
1444
+ font-size: 13px;
1445
+ font-family: inherit;
1446
+ color: var(--dw-text-ink);
1447
+ text-align: left;
1448
+ cursor: pointer;
1449
+ white-space: nowrap;
1450
+ }
1451
+ .drawui-context-item:hover {
1452
+ background: var(--dw-hover-bg);
1453
+ }
1454
+ .drawui-context-item.is-danger:hover {
1455
+ background: rgba(239, 68, 68, 0.08);
1456
+ color: var(--dw-danger);
1457
+ }
1458
+ .drawui-context-item:disabled {
1459
+ opacity: 0.38;
1460
+ cursor: default;
1461
+ }
1462
+ .drawui-context-item:disabled:hover {
1463
+ background: transparent;
1464
+ }
1465
+ .drawui-context-kbd {
1466
+ font-size: 11px;
1467
+ color: var(--dw-text-faint);
1468
+ font-family: inherit;
1469
+ }
1470
+ .drawui-context-caret {
1471
+ color: var(--dw-text-faint);
1472
+ flex-shrink: 0;
1473
+ }
1474
+ .drawui-context-sep {
1475
+ height: 1px;
1476
+ margin: 4px 8px;
1477
+ background: var(--dw-panel-border);
1478
+ }
1479
+ .drawui-context-sub {
1480
+ position: relative;
1481
+ }
1482
+ .drawui-context-submenu {
1483
+ position: absolute;
1484
+ left: calc(100% + 4px);
1485
+ top: -6px;
1486
+ display: flex;
1487
+ flex-direction: column;
1488
+ min-width: 148px;
1489
+ padding: 6px;
1490
+ background: var(--dw-panel-bg);
1491
+ backdrop-filter: blur(16px);
1492
+ -webkit-backdrop-filter: blur(16px);
1493
+ border-radius: 12px;
1494
+ box-shadow: var(--dw-shadow-xl);
1495
+ border: 1px solid var(--dw-panel-border);
1496
+ z-index: 500;
1497
+ animation: drawui-context-menu-in 0.18s cubic-bezier(0.4, 0, 0.2, 1);
1498
+ }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "drawui-react",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
- "description": "React wrapper for drawui-core canvas drawing (PNG / SVG / PDF export, table, UML, mind map)",
5
+ "description": "React wrapper for drawui-core canvas drawing (PNG / SVG / PDF export, table, UML, mind map, context menu, group lock)",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "dist"
@@ -30,7 +30,7 @@
30
30
  "access": "public"
31
31
  },
32
32
  "dependencies": {
33
- "drawui-core": "0.4.1"
33
+ "drawui-core": "0.5.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": "^18.3.1"