drawui-react 0.5.3 → 0.6.1

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
@@ -1663,3 +1663,56 @@
1663
1663
  z-index: 500;
1664
1664
  animation: drawui-context-menu-in 0.18s cubic-bezier(0.4, 0, 0.2, 1);
1665
1665
  }
1666
+ /* —— 模板库面板(复用图标面板的搜索/分类结构,只补卡片网格) —— */
1667
+ .drawui-template-panel {
1668
+ width: 520px;
1669
+ }
1670
+ .drawui-template-grid {
1671
+ display: grid;
1672
+ grid-template-columns: repeat(3, 1fr);
1673
+ gap: 10px;
1674
+ padding: 10px;
1675
+ max-height: 340px;
1676
+ overflow-y: auto;
1677
+ }
1678
+ .drawui-template-card {
1679
+ display: flex;
1680
+ flex-direction: column;
1681
+ gap: 6px;
1682
+ padding: 8px;
1683
+ border: 1px solid var(--dw-panel-border);
1684
+ border-radius: 10px;
1685
+ background: var(--dw-panel-bg-solid);
1686
+ cursor: pointer;
1687
+ transition: border-color 0.12s ease, box-shadow 0.12s ease;
1688
+ }
1689
+ .drawui-template-card:hover {
1690
+ border-color: var(--dw-primary);
1691
+ box-shadow: 0 0 0 3px var(--dw-primary-weak);
1692
+ }
1693
+ .drawui-template-thumb {
1694
+ display: flex;
1695
+ align-items: center;
1696
+ justify-content: center;
1697
+ aspect-ratio: 4 / 3;
1698
+ border-radius: 6px;
1699
+ background: #f8fafc;
1700
+ overflow: hidden;
1701
+ }
1702
+ .drawui-template-thumb img {
1703
+ width: 100%;
1704
+ height: 100%;
1705
+ object-fit: contain;
1706
+ }
1707
+ .drawui-template-name {
1708
+ font-size: 12px;
1709
+ color: var(--dw-text, #1f2937);
1710
+ text-align: center;
1711
+ }
1712
+ .drawui-template-empty {
1713
+ grid-column: 1 / -1;
1714
+ padding: 24px;
1715
+ text-align: center;
1716
+ font-size: 12px;
1717
+ color: var(--dw-text-faint, #94a3b8);
1718
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drawui-react",
3
- "version": "0.5.3",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
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",
@@ -37,7 +37,7 @@
37
37
  "access": "public"
38
38
  },
39
39
  "dependencies": {
40
- "drawui-core": "0.5.3"
40
+ "drawui-core": "0.6.1"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "react": "^18.3.1"