@zuilib/text-editor 0.7.1 → 0.7.2
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/CHANGELOG.md +16 -0
- package/DRAWING_FORMAT.md +3 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2088 -2111
- package/dist/styles.css +17 -29
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog — @zuilib/text-editor
|
|
2
2
|
|
|
3
|
+
## 0.7.2
|
|
4
|
+
|
|
5
|
+
- Canvas properties are one **color** setting (outline plus its matching
|
|
6
|
+
fill on boxes: plain (no outline), black, gray, red, green, blue, orange,
|
|
7
|
+
purple) shown inline in the tools row, only while the canvas is focused;
|
|
8
|
+
the header keeps a single row. Text on dark or borderless cards picks a
|
|
9
|
+
readable color automatically. The same names work as `color` in
|
|
10
|
+
` ```diagram ` skeletons
|
|
11
|
+
- Table settings and the canvas share three **layout presets**: compact
|
|
12
|
+
(shrinks to the content; tables also get compact rows), comfortable (the
|
|
13
|
+
text column; comfortable rows), full (the editor container; comfortable
|
|
14
|
+
rows). They replace the separate width and density buttons; the
|
|
15
|
+
markdown markers are unchanged
|
|
16
|
+
- The floating table settings use the theme tokens (`--popover`,
|
|
17
|
+
`--border`, `--shadow-medium`) instead of fixed light/dark colors
|
|
18
|
+
|
|
3
19
|
## 0.7.1
|
|
4
20
|
|
|
5
21
|
- Fix: free `text` shapes could not be typed into. The text tool's editor
|
package/DRAWING_FORMAT.md
CHANGED
|
@@ -181,6 +181,8 @@ inverts colors Excalidraw-style in dark themes):
|
|
|
181
181
|
|
|
182
182
|
| Name | Stroke | Fill |
|
|
183
183
|
|--------|-----------|---------------|
|
|
184
|
+
| plain | `transparent` (no outline) | `#f1f3f5` |
|
|
185
|
+
| black | `#1e1e1e` | `#1e1e1e` (text renders white) |
|
|
184
186
|
| gray | `#1e1e1e` | `transparent` |
|
|
185
187
|
| red | `#e03131` | `#ffc9c9` |
|
|
186
188
|
| green | `#2f9e44` | `#b2f2bb` |
|
|
@@ -205,7 +207,7 @@ one-way: once opened, the document stores the concrete ```drawing block.
|
|
|
205
207
|
"boxes": [ { "id", "type"?: <box type, default rect>, "label"?, "text"?, "footer"?,
|
|
206
208
|
"x"?, "y"?, // omitted: auto layout by connector rank
|
|
207
209
|
"w"?, "h"?, // omitted: sized to fit the text
|
|
208
|
-
"color"?: "gray"|"red"|"green"|"blue"|"orange"|"purple", //
|
|
210
|
+
"color"?: "plain"|"black"|"gray"|"red"|"green"|"blue"|"orange"|"purple", // outline + fill preset
|
|
209
211
|
"stroke"?, "fill"? } ],
|
|
210
212
|
"connectors"?: [ { "id"?, "type"?: "arrow"|"line", "from": "<id>" | {"id","side"?}, "to": same,
|
|
211
213
|
"text"?, "bidirectional"?, "routing"?: "elbow"|"straight", "color"?, "stroke"? } ],
|
package/dist/index.d.ts
CHANGED
|
@@ -678,7 +678,7 @@ declare const BOX_DEFINITIONS: Record<BoxType, BoxDefinition>;
|
|
|
678
678
|
* derived, so a generator only needs to say *what* is on the canvas.
|
|
679
679
|
*/
|
|
680
680
|
|
|
681
|
-
type ColorName = 'gray' | 'red' | 'green' | 'blue' | 'orange' | 'purple';
|
|
681
|
+
type ColorName = 'plain' | 'black' | 'gray' | 'red' | 'green' | 'blue' | 'orange' | 'purple';
|
|
682
682
|
declare const COLOR_PRESETS: Record<ColorName, {
|
|
683
683
|
stroke: string;
|
|
684
684
|
fill: string;
|
|
@@ -840,7 +840,7 @@ declare const DRAWING_SKELETON_JSON_SCHEMA: {
|
|
|
840
840
|
};
|
|
841
841
|
readonly color: {
|
|
842
842
|
readonly enum: readonly ColorName[];
|
|
843
|
-
readonly description: "Named color preset.
|
|
843
|
+
readonly description: "Named color preset: outline plus, for boxes, a matching fill. `plain` has no outline and a light fill, `black` is a dark card with light text, `gray` is a dark outline on transparent (the default); the rest pair a colored outline with its pastel fill.";
|
|
844
844
|
};
|
|
845
845
|
readonly stroke: {
|
|
846
846
|
readonly type: "string";
|
|
@@ -921,7 +921,7 @@ declare const DRAWING_SKELETON_JSON_SCHEMA: {
|
|
|
921
921
|
};
|
|
922
922
|
readonly color: {
|
|
923
923
|
readonly enum: readonly ColorName[];
|
|
924
|
-
readonly description: "Named color preset.
|
|
924
|
+
readonly description: "Named color preset: outline plus, for boxes, a matching fill. `plain` has no outline and a light fill, `black` is a dark card with light text, `gray` is a dark outline on transparent (the default); the rest pair a colored outline with its pastel fill.";
|
|
925
925
|
};
|
|
926
926
|
readonly stroke: {
|
|
927
927
|
readonly type: "string";
|
|
@@ -952,7 +952,7 @@ declare const DRAWING_SKELETON_JSON_SCHEMA: {
|
|
|
952
952
|
};
|
|
953
953
|
readonly color: {
|
|
954
954
|
readonly enum: readonly ColorName[];
|
|
955
|
-
readonly description: "Named color preset.
|
|
955
|
+
readonly description: "Named color preset: outline plus, for boxes, a matching fill. `plain` has no outline and a light fill, `black` is a dark card with light text, `gray` is a dark outline on transparent (the default); the rest pair a colored outline with its pastel fill.";
|
|
956
956
|
};
|
|
957
957
|
readonly stroke: {
|
|
958
958
|
readonly type: "string";
|