figmatk 0.0.11 → 0.0.13
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/package.json
CHANGED
|
@@ -6,7 +6,7 @@ description: >
|
|
|
6
6
|
clone or remove slides, or produce a .deck file for Figma Slides.
|
|
7
7
|
Powered by FigmaTK under the hood.
|
|
8
8
|
metadata:
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.13"
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
# FigmaTK Skill
|
|
@@ -34,10 +34,21 @@ To let the user view the result: tell them to **open the file in Figma Desktop**
|
|
|
34
34
|
|
|
35
35
|
Use this when the user wants a new presentation. Write a Node.js script and execute it.
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
### Setup (required before running any script)
|
|
38
|
+
|
|
39
|
+
The plugin cache does not include `node_modules`. Always install figmatk into a local workspace first:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
mkdir -p /tmp/figmatk-ws && cd /tmp/figmatk-ws && npm init -y && npm install figmatk
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Then write your script inside `/tmp/figmatk-ws/` and run it from there:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
node /tmp/figmatk-ws/my-deck.mjs
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
> **Import:** always use the bare specifier `import { Deck } from 'figmatk'` — Node will resolve it from the local `node_modules` in the workspace.
|
|
41
52
|
|
|
42
53
|
```javascript
|
|
43
54
|
import { Deck } from 'figmatk';
|
|
@@ -91,13 +102,17 @@ function hex(h) {
|
|
|
91
102
|
| `Body 3` | 24pt | Regular | Captions, labels |
|
|
92
103
|
| `Note` | 20pt | Regular | Footnotes, sources |
|
|
93
104
|
|
|
94
|
-
###
|
|
105
|
+
### Colors for `setBackground()`
|
|
95
106
|
|
|
96
|
-
|
|
107
|
+
Accepts named colors, hex strings, or designer aliases — **when using figmatk 0.0.12+ from the workspace install**.
|
|
108
|
+
|
|
109
|
+
**Named colors** (case-sensitive, from the Light Slides theme):
|
|
97
110
|
|
|
98
111
|
`'Black'`, `'White'`, `'Grey'`, `'Blue'`, `'Red'`, `'Yellow'`, `'Green'`, `'Orange'`, `'Pink'`, `'Purple'`, `'Teal'`, `'Violet'`, `'Persimmon'`, `'Pale Pink'`, `'Pale Blue'`, `'Pale Green'`, `'Pale Teal'`, `'Pale Purple'`, `'Pale Persimmon'`, `'Pale Violet'`, `'Pale Red'`, `'Pale Yellow'`
|
|
99
112
|
|
|
100
|
-
|
|
113
|
+
**Hex strings** (0.0.12+): `slide.setBackground('#C8102E')`
|
|
114
|
+
|
|
115
|
+
**Designer aliases** (0.0.12+): `slide.setBackground('navy')`, `slide.setBackground('coral')`, `slide.setBackground('terracotta')` etc.
|
|
101
116
|
|
|
102
117
|
### Slide dimensions
|
|
103
118
|
|