@zuilib/text-editor 0.7.0 → 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 CHANGED
@@ -1,5 +1,33 @@
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
+
19
+ ## 0.7.1
20
+
21
+ - Fix: free `text` shapes could not be typed into. The text tool's editor
22
+ opened on pointerdown and was blurred by the same click; it now opens on
23
+ pointerup like the card editors
24
+ - Fix: selecting a shape no longer shifts the drawing. The properties row
25
+ is always rendered (showing the defaults for the next shape when nothing
26
+ is selected) with a fixed minimum height, so click-to-edit lands where
27
+ the pointer is
28
+ - Fix: keyboard shortcuts keep working after committing text (the canvas
29
+ regains focus); `Home`/`End` work inside the inline text editor
30
+
3
31
  ## 0.7.0
4
32
 
5
33
  **Themed drawing canvas.** The canvas chrome now follows the host theme
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", // stroke + pastel fill
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. Sets the stroke (outline + text) and, for boxes, a matching pastel fill. Omit for the default gray on transparent";
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. Sets the stroke (outline + text) and, for boxes, a matching pastel fill. Omit for the default gray on transparent";
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. Sets the stroke (outline + text) and, for boxes, a matching pastel fill. Omit for the default gray on transparent";
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";