@weasel-js/text-tools 1.19.1 → 2.0.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/README.md +8 -8
- package/dist/chunk-VLXWRY3D.js +1179 -0
- package/dist/chunk-VLXWRY3D.js.map +1 -0
- package/dist/index.d.ts +33 -398
- package/dist/index.js +9 -1105
- package/dist/index.js.map +1 -1
- package/dist/presets-oTMEI2UF.d.ts +378 -0
- package/dist/presets.d.ts +9 -0
- package/dist/presets.js +3 -0
- package/dist/presets.js.map +1 -0
- package/package.json +23 -18
package/README.md
CHANGED
|
@@ -12,25 +12,25 @@ npm install @weasel-js/text-tools
|
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Core knows no text. A canvas whose scene holds text nodes (data with a string
|
|
15
|
-
`text`) turns them on with `
|
|
15
|
+
`text`) turns them on with `textTools.text`:
|
|
16
16
|
|
|
17
17
|
```tsx
|
|
18
18
|
import { SceneCanvas } from '@weasel-js/core';
|
|
19
|
-
import
|
|
20
|
-
import
|
|
19
|
+
import * as textTools from '@weasel-js/text-tools/presets';
|
|
20
|
+
import * as presets from '@weasel-js/editing/presets';
|
|
21
21
|
|
|
22
|
-
<SceneCanvas scene={scene} features={[
|
|
22
|
+
<SceneCanvas scene={scene} features={[presets.draw, textTools.textTools]} />;
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
| Preset | What it adds |
|
|
26
26
|
|---|---|
|
|
27
|
-
| `
|
|
27
|
+
| `textTools.text` | the `kit:text` painter, whose glyphs are its outline for booleans and Create Outlines; `'text'` routing and properties; the `text` and `sticky` inserts; the canvas's own editor and the `textEdit` dep; `enterTextEdit`, a double-click opening text in place, and a click opening a path effect's hidden text; plain-text paste |
|
|
28
28
|
| `createTextPreset({ editor })` | the same, with the editor configured by `useSceneTextEdit`'s options, or `editor: false` for none |
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
29
|
+
| `textTools.textTools` | the text and sticky-note tools, with `textTools.text` |
|
|
30
|
+
| `textTools.whiteboard` | the pencil, text and the sticky note on an open canvas, with view, pick, move, resize and edit |
|
|
31
31
|
|
|
32
32
|
A canvas taking its tools through `<SceneCanvas tools>` gets the same two from
|
|
33
|
-
`useTextToolsTools()`, beside `
|
|
33
|
+
`useTextToolsTools()`, beside `textTools.text`. A scene drawn with no canvas
|
|
34
34
|
(`renderSceneToPixels`, an export) paints text once `TEXT_PAINTER` is
|
|
35
35
|
registered for it: `nodeShapesOf(scene).register(TEXT_PAINTER)`.
|
|
36
36
|
|