@tsdraw/react 0.5.0 → 0.6.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/index.cjs +305 -91
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -5
- package/dist/index.d.ts +24 -5
- package/dist/index.js +306 -92
- package/dist/index.js.map +1 -1
- package/dist/tsdraw.css +43 -22
- package/package.json +2 -2
package/dist/tsdraw.css
CHANGED
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.tsdraw.tsdraw-darkmode {
|
|
28
|
-
--tsdraw-color-bg: #
|
|
29
|
-
--tsdraw-color-panel: #
|
|
30
|
-
--tsdraw-color-muted: #
|
|
31
|
-
--tsdraw-color-selected: #
|
|
32
|
-
--tsdraw-color-selected-text: #
|
|
33
|
-
--tsdraw-color-border: #
|
|
34
|
-
--tsdraw-color-text: #
|
|
35
|
-
--tsdraw-color-active-surface: #
|
|
36
|
-
--tsdraw-color-preview: #
|
|
28
|
+
--tsdraw-color-bg: #0f0f0f;
|
|
29
|
+
--tsdraw-color-panel: #171717;
|
|
30
|
+
--tsdraw-color-muted: #232323;
|
|
31
|
+
--tsdraw-color-selected: #f2f2f2;
|
|
32
|
+
--tsdraw-color-selected-text: #151515;
|
|
33
|
+
--tsdraw-color-border: #2f2f2f;
|
|
34
|
+
--tsdraw-color-text: #ececec;
|
|
35
|
+
--tsdraw-color-active-surface: #2b2b2b;
|
|
36
|
+
--tsdraw-color-preview: #ececec;
|
|
37
37
|
--tsdraw-color-panel-highlight: rgba(255, 255, 255, 0.06);
|
|
38
38
|
--tsdraw-color-panel-shadow: rgba(0, 0, 0, 0.35);
|
|
39
39
|
--tsdraw-color-panel-shadow-strong: rgba(0, 0, 0, 0.28);
|
|
40
40
|
--tsdraw-color-selection-contrast: rgba(255, 255, 255, 0.15);
|
|
41
|
-
--tsdraw-color-handle-fill: #
|
|
41
|
+
--tsdraw-color-handle-fill: #171717;
|
|
42
42
|
--tsdraw-color-tool-dot-outline: rgba(255, 255, 255, 0.2);
|
|
43
43
|
--tsdraw-color-tool-ring-border: rgba(255, 255, 255, 0.75);
|
|
44
44
|
--tsdraw-color-tool-ring-fill: rgba(255, 255, 255, 0.08);
|
|
@@ -47,8 +47,9 @@
|
|
|
47
47
|
.tsdraw-toolbar {
|
|
48
48
|
position: absolute;
|
|
49
49
|
display: flex;
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: 0;
|
|
52
|
+
padding: 4.5px;
|
|
52
53
|
background: var(--tsdraw-color-panel);
|
|
53
54
|
border-radius: var(--tsdraw-radius);
|
|
54
55
|
border: 1px solid var(--tsdraw-color-border);
|
|
@@ -57,11 +58,25 @@
|
|
|
57
58
|
pointer-events: all;
|
|
58
59
|
}
|
|
59
60
|
|
|
61
|
+
.tsdraw-toolbar-part {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: 2px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.tsdraw-toolbar-separator {
|
|
68
|
+
width: 1px;
|
|
69
|
+
height: 24px;
|
|
70
|
+
margin: 0 5px;
|
|
71
|
+
background: var(--tsdraw-color-border);
|
|
72
|
+
opacity: 0.9;
|
|
73
|
+
}
|
|
74
|
+
|
|
60
75
|
.tsdraw-toolbar button {
|
|
61
|
-
width:
|
|
62
|
-
height:
|
|
76
|
+
width: 44px;
|
|
77
|
+
height: 44px;
|
|
63
78
|
border: none;
|
|
64
|
-
border-radius:
|
|
79
|
+
border-radius: 9px;
|
|
65
80
|
background: transparent;
|
|
66
81
|
color: var(--tsdraw-color-text);
|
|
67
82
|
cursor: pointer;
|
|
@@ -70,6 +85,13 @@
|
|
|
70
85
|
.tsdraw-toolbar button:hover {
|
|
71
86
|
background: var(--tsdraw-color-muted);
|
|
72
87
|
}
|
|
88
|
+
.tsdraw-toolbar button:disabled {
|
|
89
|
+
opacity: 0.42;
|
|
90
|
+
cursor: default;
|
|
91
|
+
}
|
|
92
|
+
.tsdraw-toolbar button:disabled:hover {
|
|
93
|
+
background: transparent;
|
|
94
|
+
}
|
|
73
95
|
.tsdraw-toolbar button[data-active="true"],
|
|
74
96
|
.tsdraw-toolbar .tsdraw-toolbar-btn[data-active="true"] {
|
|
75
97
|
background: var(--tsdraw-color-selected);
|
|
@@ -77,22 +99,21 @@
|
|
|
77
99
|
}
|
|
78
100
|
|
|
79
101
|
.tsdraw-toolbar-btn {
|
|
80
|
-
width:
|
|
81
|
-
min-width:
|
|
82
|
-
height:
|
|
102
|
+
width: 44px;
|
|
103
|
+
min-width: 44px;
|
|
104
|
+
height: 44px;
|
|
83
105
|
padding: 0;
|
|
84
106
|
display: grid;
|
|
85
107
|
place-items: center;
|
|
86
108
|
}
|
|
87
109
|
|
|
88
110
|
.tsdraw-toolbar-btn svg {
|
|
89
|
-
width:
|
|
90
|
-
height:
|
|
111
|
+
width: 24px;
|
|
112
|
+
height: 24px;
|
|
91
113
|
}
|
|
92
114
|
|
|
93
115
|
.tsdraw-style-panel {
|
|
94
116
|
position: absolute;
|
|
95
|
-
width: 148px;
|
|
96
117
|
background: var(--tsdraw-color-panel);
|
|
97
118
|
border: 1px solid var(--tsdraw-color-border);
|
|
98
119
|
border-radius: var(--tsdraw-radius);
|
|
@@ -182,7 +203,7 @@
|
|
|
182
203
|
}
|
|
183
204
|
|
|
184
205
|
.tsdraw.tsdraw-darkmode .tsdraw-style-preview-line--draw {
|
|
185
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath d='M0 5 C2 1 4 9 6 5 C8 1 10 9 12 5' stroke='%
|
|
206
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath d='M0 5 C2 1 4 9 6 5 C8 1 10 9 12 5' stroke='%23ececec' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
186
207
|
}
|
|
187
208
|
|
|
188
209
|
.tsdraw-style-preview-line--solid {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsdraw/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "@tsdraw/react - React components and hooks for tsdraw",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@tabler/icons-react": "^3.40.0",
|
|
48
|
-
"@tsdraw/core": "0.
|
|
48
|
+
"@tsdraw/core": "0.6.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"react": "^18.0.0 || ^19.0.0",
|