You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/figma-studio-runner.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
1
# Figma to WordPress Studio
2
2
3
-
`plugins/figma-to-wordpress-studio` moves a Figma file into WordPress by preparing a Studio CLI source for `studio create --from <source>`. Studio creates the site and imports the result with Static Site Importer and Blocks Engine.
3
+
`plugins/figma-to-wordpress-studio` moves a Figma file into WordPress by posting a Studio import source to the local WordPress Studio app. Studio creates the site and imports the result with Static Site Importer and Blocks Engine.
4
4
5
5
## Architecture
6
6
7
7
```text
8
8
Figma plugin UI
9
9
-> Figma document scene data
10
10
-> Studio import artifact JSON
11
-
-> studio create --from <artifact-json>
11
+
-> local WordPress Studio handoff endpoint
12
12
-> WordPress Studio site
13
13
-> Static Site Importer / Blocks Engine inside WordPress
14
14
```
15
15
16
-
The TypeScript boundary stops at artifact construction and a user-facing CLI command. WordPress, PHP, Static Site Importer, Blocks Engine, and Studio site orchestration remain Studio runtime concerns.
16
+
The TypeScript boundary stops at artifact construction and a local handoff request. WordPress, PHP, Static Site Importer, Blocks Engine, and Studio site orchestration remain Studio runtime concerns.
17
17
18
18
## Figma Iframe Limits
19
19
@@ -27,7 +27,7 @@ Practical constraints for this browser-based flow:
27
27
- Clipboard access can require user activation.
28
28
- Local file URLs can behave differently between desktop Figma, browser Figma, and development builds.
29
29
30
-
Because of those constraints, the primary integration shape is a CLI handoff: the plugin saves an artifact JSON source and presents/copies `studio create --from <source>`. If a native bridge or deeper Studio integration exists later, it can consume the same artifact source.
30
+
Because of those constraints, the integration shape is a local Studio handoff: the plugin posts an artifact JSON source to Studio's loopback endpoint. If Studio is not running, the plugin surfaces the connection error.
31
31
32
32
## Studio And PHP Role
33
33
@@ -41,7 +41,7 @@ Implemented now:
41
41
42
42
-`GeneratedWebsiteArtifact` for static generated files from Figma.
43
43
-`blocks-engine/php-transformer/site-artifact/v1` for the Studio CLI artifact handoff.
44
-
- A Figma UI client that downloads the artifact JSON and copies `studio create --from ./<artifact>.studio-import.json`.
44
+
- A Figma UI client that posts the artifact JSON to local Studio.
45
45
46
46
Not implemented yet:
47
47
@@ -62,8 +62,9 @@ Figma development test:
62
62
1. Run `npm run build --prefix plugins/figma-to-wordpress-studio`.
63
63
2. Load `plugins/figma-to-wordpress-studio/manifest.json` as a Figma development plugin.
64
64
3. Run the plugin.
65
-
4. Use `Save Studio import payload`.
66
-
5. Run the copied `studio create --from ./<artifact>.studio-import.json` command from a terminal, adjusting the path to the saved artifact if needed.
65
+
4. Start a compatible WordPress Studio build.
66
+
5. Use `Open in WordPress Studio`.
67
+
6. Studio creates the site and opens the local site URL in your browser. If Studio is not reachable, the plugin reports the connection error.
Copy file name to clipboardExpand all lines: plugins/figma-to-wordpress-studio/README.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
# Figma to WordPress Studio
2
2
3
-
This plugin moves a Figma file into WordPress by preparing a Studio CLI import payload for `studio create --from <source>`.
3
+
This plugin moves a Figma file into WordPress by sending a Studio import payload to the local WordPress Studio app.
4
4
5
-
It does not port Static Site Importer, Blocks Engine, WordPress, PHP, or Studio internals to TypeScript. The TypeScript code extracts Figma scene data, prepares an artifact JSON source, and gives the user the `studio create --from ...` command. Studio owns site creation, import through Static Site Importer, and cleanup after a successful import.
5
+
It does not port Static Site Importer, Blocks Engine, WordPress, PHP, or Studio internals to TypeScript. The TypeScript code extracts Figma scene data, prepares an artifact JSON source, and posts it to Studio's local handoff endpoint. Studio owns site creation, import through Static Site Importer, and cleanup after a successful import. If Studio is not running, the plugin surfaces the connection error.
6
6
7
7
## Flow
8
8
9
9
```text
10
10
Figma plugin controller + UI
11
11
-> whole Figma document scene data
12
12
-> Studio import artifact JSON
13
-
-> studio create --from <artifact-json>
13
+
-> local WordPress Studio handoff endpoint
14
14
-> WordPress Studio site
15
15
-> Static Site Importer imports through Blocks Engine
16
16
```
@@ -19,7 +19,7 @@ Figma plugin controller + UI
19
19
20
20
- Implemented: a Figma Desktop-loadable plugin shell with whole-file export.
21
21
- Implemented: a reusable scene-to-HTML/CSS artifact generator with diagnostics and tests for the current local handoff.
22
-
- Implemented: a Studio CLI import payload and copyable `studio create --from ...` command.
22
+
- Implemented: a Studio local handoff request.
23
23
- Not implemented: running Static Site Importer from TypeScript.
24
24
- Not implemented: automated visual parity/block validation after import.
25
25
@@ -36,8 +36,9 @@ Figma plugin controller + UI
36
36
37
37
1. Run `npm run build --prefix plugins/figma-to-wordpress-studio`.
38
38
2. In Figma Desktop, use Plugins -> Development -> Import plugin from manifest, then select `plugins/figma-to-wordpress-studio/manifest.json`.
39
-
3. Open the plugin and choose `Save Studio import payload`.
40
-
4. Run the copied `studio create --from ./<artifact>.studio-import.json` command from a terminal, adjusting the path to the saved artifact if needed.
39
+
3. Start a compatible WordPress Studio build.
40
+
4. Open the plugin and choose `Open in WordPress Studio`.
41
+
5. Studio creates the site and opens the local site URL in your browser. If Studio is not reachable, the plugin reports the connection error.
41
42
42
43
For quick syntax verification without a full Figma build pipeline:
43
44
@@ -47,8 +48,8 @@ npm run build --prefix plugins/figma-to-wordpress-studio
47
48
npm test --prefix plugins/figma-to-wordpress-studio
48
49
```
49
50
50
-
## Studio CLI Boundary
51
+
## Studio Handoff Boundary
51
52
52
-
Figma plugin UIs run in a constrained iframe-like environment and cannot spawn local shell commands. The supported boundary is a CLI handoff: the plugin saves the import artifact and presents/copies `studio create --from <source>`. Studio accepts the artifact source, creates the site, runs Static Site Importer, and removes SSI after a successful import.
53
+
Figma plugin UIs run in a constrained iframe-like environment and cannot spawn local shell commands. The supported boundary is a local Studio handoff: the plugin posts the import artifact to Studio's loopback endpoint. Studio accepts the artifact source, creates the site, runs Static Site Importer, and removes SSI after a successful import.
53
54
54
55
See [`../../docs/figma-studio-runner.md`](../../docs/figma-studio-runner.md) for the integration notes.
0 commit comments