From ca21a363ef15b03df40919d7f7a96f3122c7442f Mon Sep 17 00:00:00 2001 From: Per Lytkemeyer Date: Sat, 13 Jun 2026 22:22:24 +0200 Subject: [PATCH 1/6] Initial push --- plugins/draw/draw.png | Bin 0 -> 2039 bytes plugins/draw/index.html | 2109 ++++++++++++++++++++++++++++++++++++++ plugins/draw/plugin.json | 9 + 3 files changed, 2118 insertions(+) create mode 100644 plugins/draw/draw.png create mode 100644 plugins/draw/index.html create mode 100644 plugins/draw/plugin.json diff --git a/plugins/draw/draw.png b/plugins/draw/draw.png new file mode 100644 index 0000000000000000000000000000000000000000..8cc39dca2ec78c49f75243ba65bcd92c093b032a GIT binary patch literal 2039 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D2aHKXK~!i%?U-p) zROcOspL_2N42;aE0n}j`Oxq~?Km-+3P^?N~+Gxb4r|0BT5^LN-jG~Rkv^{NOdX6V; zVxmQ469H{Jk|5gDxJ0WgnrK{5z_@@cu|)-!VdlvA5G1ncIr)8?`@Z*op6CDG zZC-(_dK-^%MCSvKTYePittbT>qfg|c{@^9NHvN{-HAfHy=UE*iJPP-KyJ$ndeFfzO znYg&PV6j*Ln6!KyUk3dOOBaL#z5?!|75{B1low<&CC-C}Z#_AC{Ac+2YB;zynMr5z zP;{{p11jJyTJg_Y&bd#sNQn2KaJ!Mgnp&QE@*Mk%6!`mVIj}aFiKlasI*}MK0kvqw zKW`c53b&9D@4;u=jJT=Ht>XcH*Emq5AV5EugMVGh_)~f9&cBxd5m1X(d~=s^t}q9H z__!e4R2^Ha_r1pcA_aPXEv4@-C*bZ?=PCU!pcbw8Zhe#UyKP1(PMYp=`Vkz*$M)m5Q^tC=>*E zd-K-YhxpUFC~Rm+Srf#2>%Jn;FowY^axmID;`aHAY>;R{mz_+-zqTaHNlz-R2#0drt9X>%|#26GQ`J6JTol8Ss3k(u0=(3kk z@%cYV3=SbfRH0}CKdYgdTe8e%ot{Li{VDWcFHgo_uAs58k)X&Z#O3*%Hn}@h{yrVo zq?cmv{NgU*Z_6_2x`0-An@YupuA&1z8Zl*Cm+x+*N5;e{a|A5P;ZF)_>Ly#GkzJSUvcJf?k7-_g5-M9%3_}TT<7%djEeDqAS ze=TEkb7R$zL3~_tl#rrwX zfJTtJszy`C}+W9gEyll0xRTt0-Z&kUnOrs+0SSjH#akM0F={0zMh`>l!8PC*L zDcxH{k|BbR%>tsM^JS7iQvDSyHXB=YdL}vcK`f%k8+V&XKUPY3Y#hedvpH|<_^+!c z>6XBgt}>n*U#4tt5pxX@eAEJBQ!@ailE9og2mA;<6CLnYQDmunm+Y(67-HivF6n)E zx+CDPG&6ML%arZg!(2lo>rEgw+u=(jfuy=C*ysqKEZ-%&wi?5P$=vB9c)BB?EqIq> z`}U9!7{vM(TWjY_B!Rhgm$6|Zw+*~S6nR~~%a+<|3=^ktXK@x4eFV>g1hfhp-yPTi zz|l(=IjWQZD3&0p?lJ&*BlN_!fnOruA*Z&Qh=~c@UX)3NQQ4+q@25+FfQD~qsIMbo z%2SAv#EX?@_(-c}Zrv3Ca&>xQoZxe7YlxVXz^z3YRQ54E4-(*b5ddpeYS^CAfCDkm19hAU672Vxx=My)y`n#sjM) zVHrFa09h1SWWGaQT@8_OKc{Iy29-vIbGbfCrvjsztEjznftiUuh(aR(u~8-L-WiBO zso=%)r`hj0goWnYEtoC z*Ini5$`;mj*hB+fAK(yvYIEL2dm=ORr_O$dU3@5rArWZVo|A`+?diKIz( zuF!wEuRy?|OYB);xX`C>5XZu{<&U zS(?HVx$HU&lVd00QObPs#n~}J!c=X}vOyF_Kj{*ao{{w}T VDvpg8+M@sf002ovPDHLkV1hl6*VO<3 literal 0 HcmV?d00001 diff --git a/plugins/draw/index.html b/plugins/draw/index.html new file mode 100644 index 0000000..8325c7b --- /dev/null +++ b/plugins/draw/index.html @@ -0,0 +1,2109 @@ + + + + + + Draw - FigUI Plugin + + + + +
+ + + + +
+ +

+ +
+ +
+

Job Settings

+
+ Not configured + +
+ +

Design elements

+
+
+ + + + + +
+ +

Machine Settings

+
+ Default + +
+ +

Tools

+
+
+
+ + + +
+
+
+ + +
+

Preview

+ +
+ +
+ +
+
+ + +
+

Shape

+ + + + + + + + + + + + + + + + +
+
+ + +
+

Job Settings

+ + + + + + + + +
+
+ + +
+

Machine Settings

+ + + + + + + + + + + + + + +
+
+ + +
+

Tool

+ + + + + + + + + + + +
+
+ + +
+

Save Drawing

+ + + + + +
+
+ + + + + diff --git a/plugins/draw/plugin.json b/plugins/draw/plugin.json new file mode 100644 index 0000000..dff11d3 --- /dev/null +++ b/plugins/draw/plugin.json @@ -0,0 +1,9 @@ +{ + "name": "Draw", + "description": "Create simple shapes and generate LinuxCNC G-code in FigUI.", + "version": "1.0.0", + "entry": "index.html", + "layout": "workspace", + "icon": "draw.png", + "files": ["index.html", "plugin.json", "settings.json"] +} From 52fd584418ef0083f8dd27b06874fa01129f56c6 Mon Sep 17 00:00:00 2001 From: Per Lytkemeyer Date: Sat, 13 Jun 2026 23:01:45 +0200 Subject: [PATCH 2/6] Update PluginFrame.tsx --- src/components/PluginFrame.tsx | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/components/PluginFrame.tsx b/src/components/PluginFrame.tsx index d1db005..e31df77 100644 --- a/src/components/PluginFrame.tsx +++ b/src/components/PluginFrame.tsx @@ -166,8 +166,26 @@ export function PluginFrame({ plugin, onClose, inline }: { plugin: Plugin; onClo reply(useMachineStore.getState().controllerSettings); break case 'getSettings': { const fs = plugin.fs - fetchFileContent(`/plugins/${plugin.id}/settings.json`, fs) - .then(text => reply(JSON.parse(text))) + const paths = fs === 'sd' + ? [`/sd/plugins/${plugin.id}/settings.json`, `/plugins/${plugin.id}/settings.json`] + : [`/plugins/${plugin.id}/settings.json`] + + const tryRead = async () => { + for (const path of paths) { + try { + const text = await fetchFileContent(path, fs) + const trimmed = text.replace(/^\uFEFF/, '').trim() + if (!trimmed) return {} + return JSON.parse(trimmed) + } catch { + // Try next path variant. + } + } + return {} + } + + tryRead() + .then(data => reply(data)) .catch(() => reply({})) break } From e03020007e260a55a2fe0b187ec670008f313080 Mon Sep 17 00:00:00 2001 From: Per Lytkemeyer Date: Sun, 14 Jun 2026 01:22:18 +0200 Subject: [PATCH 3/6] colors and file handling fixed --- plugins/draw/index.html | 748 ++++++++++++++++++++++++--------------- plugins/draw/plugin.json | 6 +- 2 files changed, 459 insertions(+), 295 deletions(-) diff --git a/plugins/draw/index.html b/plugins/draw/index.html index 8325c7b..0947172 100644 --- a/plugins/draw/index.html +++ b/plugins/draw/index.html @@ -5,49 +5,119 @@ Draw - FigUI Plugin -
- - - - +
+
+ + + +

+
-

-
@@ -86,7 +156,9 @@

Tools

-

Preview

+
+

Preview Drawing:New Drawing

+
+ + @@ -292,12 +376,41 @@

Save Drawing

+ +
+

Load Drawing

+ + +
+ +
+ +

+ + + + +
+
+ diff --git a/plugins/draw/plugin.json b/plugins/draw/plugin.json index dff11d3..83d371d 100644 --- a/plugins/draw/plugin.json +++ b/plugins/draw/plugin.json @@ -1,9 +1,9 @@ { "name": "Draw", "description": "Create simple shapes and generate LinuxCNC G-code in FigUI.", - "version": "1.0.0", + "version": "1.0.1", "entry": "index.html", - "layout": "workspace", + "layout": "full", "icon": "draw.png", - "files": ["index.html", "plugin.json", "settings.json"] + "files": ["index.html", "plugin.json", "draw.png"] } From 178e363e61fd93bbd231eef1f6a06ab17b7b39cb Mon Sep 17 00:00:00 2001 From: Per Lytkemeyer Date: Tue, 23 Jun 2026 22:44:34 +0200 Subject: [PATCH 4/6] Update index.html --- plugins/draw/index.html | 132 ++++++++++++++++++++++++++++++---------- 1 file changed, 99 insertions(+), 33 deletions(-) diff --git a/plugins/draw/index.html b/plugins/draw/index.html index 0947172..5c36bab 100644 --- a/plugins/draw/index.html +++ b/plugins/draw/index.html @@ -105,6 +105,55 @@ .settings-label { font-weight: 600; display: block; margin-right: 0.5rem; margin-bottom: 0.25rem; font-size: 0.9rem; word-break: break-word; } .gcode-toggle { margin: 0.25rem 0; flex-shrink: 0; } .section-title { margin: 0.75rem 0 0.25rem; flex-shrink: 0; font-size: 0.95rem; } + .section-heading { display: flex; align-items: center; gap: 0.4rem; } + .section-heading .section-title { margin-bottom: 0.25rem; } + .help-trigger { + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + width: 1.2rem; + height: 1.2rem; + border-radius: 999px; + border: 1px solid var(--control-border); + background: var(--control-bg); + color: var(--control-text); + font-size: 0.78rem; + font-weight: 700; + cursor: help; + flex-shrink: 0; + padding: 0; + } + .help-trigger:hover, + .help-trigger:focus-visible { + background: var(--control-hover); + } + .help-tooltip { + position: absolute; + left: calc(100% + 0.45rem); + top: 0; + width: min(18rem, 55vw); + padding: 0.55rem 0.65rem; + border-radius: 0.45rem; + border: 1px solid var(--panel-border); + background: var(--panel-bg); + color: var(--ui-text); + box-shadow: 0 0.5rem 1.2rem rgb(0 0 0 / 0.16); + font-size: 0.82rem; + font-weight: 400; + line-height: 1.35; + text-align: left; + opacity: 0; + visibility: hidden; + pointer-events: none; + transition: opacity 120ms ease, visibility 120ms ease; + z-index: 10; + } + .help-trigger:hover .help-tooltip, + .help-trigger:focus-visible .help-tooltip { + opacity: 1; + visibility: visible; + } @@ -121,13 +170,33 @@
-

Job Settings

+
+

How to use Draw

+ +
+ +
+

Job Settings

+ +
Not configured
-

Design elements

+
+

Design elements

+ +
@@ -137,13 +206,25 @@

Design elements

-

Machine Settings

+
+

Machine Settings

+ +
Default
-

Tools

+
+

Tools

+ +
@@ -158,6 +239,10 @@

Tools

Preview Drawing:New Drawing

+
@@ -179,7 +264,6 @@

Shape

- - -
@@ -182,7 +191,7 @@

How to use Draw

Job Settings

@@ -194,7 +203,7 @@

Job Settings

Design elements

@@ -210,7 +219,7 @@

Design elements

Machine Settings

@@ -222,11 +231,11 @@

Machine Settings

Tools

-
+
@@ -241,7 +250,7 @@

Tools

Preview Drawing:New Drawing

@@ -257,7 +266,13 @@

Preview Drawing:
-

Shape

+
+

Shape

+ +
-