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.
@@ -13,7 +13,7 @@
13
13
  {
14
14
  "name": "figmatk",
15
15
  "description": "Swiss Army Knife for Figma Files (.deck)",
16
- "version": "0.0.11",
16
+ "version": "0.0.13",
17
17
  "author": {
18
18
  "name": "FigmaTK Contributors"
19
19
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "figmatk",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "Create and edit Figma Slides .deck files programmatically — no Figma API required",
5
5
  "author": {
6
6
  "name": "FigmaTK Contributors"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "figmatk",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "Figma Toolkit — Swiss-army knife CLI for Figma .deck and .fig files",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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.11"
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
- > **Import path:** `figmatk` is an npm package. Import from the installed package:
38
- > ```javascript
39
- > import { Deck } from 'figmatk';
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
- ### Named colors for `setBackground()`
105
+ ### Colors for `setBackground()`
95
106
 
96
- > **Case-sensitive.** `'Black'` works, `'black'` does not.
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
- Use `'Black'` for dark backgrounds, `'White'` for light. For custom slide backgrounds, use the closest named color — **not hex**.
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