@sienci/gviewer 0.1.23 → 0.1.25

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/dist/react.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),F=require("./GCodeSVGRenderer-BvaXifw1.cjs");function C(a){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const s in a)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(a,s);Object.defineProperty(d,s,i.get?i:{enumerable:!0,get:()=>a[s]})}}return d.default=a,Object.freeze(d)}const o=C(w),G=o.forwardRef(function(d,s){const{id:i,options:l,callbacks:c,className:m,style:f}=d,u=o.useRef(null),r=o.useRef(null);return o.useEffect(()=>{const e=u.current;if(!e)return;const p=new F.GCodeViewer({id:i,container:e,options:l,callbacks:c});return r.current=p,()=>{r.current=null,p.dispose()}},[i]),o.useEffect(()=>{var e;(e=r.current)==null||e.setOptions(l??{})},[l]),o.useEffect(()=>{var e;(e=r.current)==null||e.setCallbacks(c??{})},[c]),o.useImperativeHandle(s,()=>{const e=()=>{const t=r.current;if(!t)throw new Error("GCodeViewer is not ready.");return t};return{get id(){return i},setCallbacks(t){e().setCallbacks(t)},snapCameraToView(t,n){e().snapCameraToView(t,n)},setRotateEnabled(t){e().setRotateEnabled(t)},setCameraFollowEnabled(t){e().setCameraFollowEnabled(t)},screenToWorld(t,n,V){return e().screenToWorld(t,n,V)},setBitPosition(t,n){e().setBitPosition(t,n)},setBitVisible(t){e().setBitVisible(t)},setBitSpinning(t){e().setBitSpinning(t)},setToolpathRotationA(t){e().setToolpathRotationA(t)},hideUntilLine(t,n){e().hideUntilLine(t,n)},seekToLine(t,n){e().seekToLine(t,n)},showAll(){e().showAll()},resetColors(){e().resetColors()},loadFromUrl(t,n){return e().loadFromUrl(t,n)},loadFromFile(t){return e().loadFromFile(t)},loadFromText(t){return e().loadFromText(t)},loadFromLines(t){return e().loadFromLines(t)},loadFromWorkerData(t){return e().loadFromWorkerData(t)},unload(){e().unload()},setOptions(t){e().setOptions(t)},getOptions(){return e().getOptions()},resize(){e().resize()},focusToModel(){e().focusToModel()},resetCamera(){e().resetCamera()},getBounds(){return e().getBounds()},dispose(){e().dispose()}}},[i]),o.createElement("div",{ref:u,className:m,style:f})}),b=o.forwardRef(function(d,s){const{id:i,options:l,className:c,style:m}=d,f=o.useRef(null),u=o.useRef(null);return o.useEffect(()=>{const r=f.current;if(!r)return;const e=new F.GCodeSVGRenderer(r,l);return u.current=e,()=>{u.current=null,e.dispose()}},[]),o.useEffect(()=>{var r;l&&((r=u.current)==null||r.setOptions(l))},[l]),o.useImperativeHandle(s,()=>{const r=()=>{const e=u.current;if(!e)throw new Error("GCodeSVGRenderer is not ready.");return e};return{loadFromLines:e=>r().loadFromLines(e),loadFromFile:e=>r().loadFromFile(e),loadFromText:e=>r().loadFromText(e),loadFromWorkerData:e=>r().loadFromWorkerData(e),loadFromPrecomputedGroups:e=>r().loadFromPrecomputedGroups(e),clear:()=>r().clear(),resetView:()=>r().resetView(),setOptions:e=>r().setOptions(e),setProjectionMode:e=>r().setProjectionMode(e),setBitPosition:e=>r().setBitPosition(e),setBitVisible:e=>r().setBitVisible(e),getSVGElement:()=>r().getSVGElement(),dispose:()=>r().dispose()}},[]),o.createElement("div",{ref:f,className:c,style:{width:"100%",height:"100%",...m}})});exports.GCodeSVGVisualizer=b;exports.GCodeVisualizer=G;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("react"),F=require("./GCodeSVGRenderer-BsWhrQaK.cjs");function C(a){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const s in a)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(a,s);Object.defineProperty(d,s,i.get?i:{enumerable:!0,get:()=>a[s]})}}return d.default=a,Object.freeze(d)}const o=C(V),G=o.forwardRef(function(d,s){const{id:i,options:l,callbacks:c,className:p,style:m}=d,u=o.useRef(null),r=o.useRef(null);return o.useEffect(()=>{const e=u.current;if(!e)return;const f=new F.GCodeViewer({id:i,container:e,options:l,callbacks:c});return r.current=f,()=>{r.current=null,f.dispose()}},[i]),o.useEffect(()=>{var e;(e=r.current)==null||e.setOptions(l??{})},[l]),o.useEffect(()=>{var e;(e=r.current)==null||e.setCallbacks(c??{})},[c]),o.useImperativeHandle(s,()=>{const e=()=>{const t=r.current;if(!t)throw new Error("GCodeViewer is not ready.");return t};return{get id(){return i},setCallbacks(t){e().setCallbacks(t)},snapCameraToView(t,n){e().snapCameraToView(t,n)},setRotateEnabled(t){e().setRotateEnabled(t)},setCameraFollowEnabled(t){e().setCameraFollowEnabled(t)},screenToWorld(t,n,w){return e().screenToWorld(t,n,w)},worldToScreen(t,n,w){return e().worldToScreen(t,n,w)},setBitPosition(t,n){e().setBitPosition(t,n)},setBitVisible(t){e().setBitVisible(t)},setBitSpinning(t){e().setBitSpinning(t)},setToolpathRotationA(t){e().setToolpathRotationA(t)},hideUntilLine(t,n){e().hideUntilLine(t,n)},seekToLine(t,n){e().seekToLine(t,n)},showAll(){e().showAll()},resetColors(){e().resetColors()},loadFromUrl(t,n){return e().loadFromUrl(t,n)},loadFromFile(t){return e().loadFromFile(t)},loadFromText(t){return e().loadFromText(t)},loadFromLines(t){return e().loadFromLines(t)},loadFromWorkerData(t){return e().loadFromWorkerData(t)},unload(){e().unload()},setOptions(t){e().setOptions(t)},getOptions(){return e().getOptions()},resize(){e().resize()},focusToModel(){e().focusToModel()},resetCamera(){e().resetCamera()},getBounds(){return e().getBounds()},dispose(){e().dispose()}}},[i]),o.createElement("div",{ref:u,className:p,style:m})}),b=o.forwardRef(function(d,s){const{id:i,options:l,className:c,style:p}=d,m=o.useRef(null),u=o.useRef(null);return o.useEffect(()=>{const r=m.current;if(!r)return;const e=new F.GCodeSVGRenderer(r,l);return u.current=e,()=>{u.current=null,e.dispose()}},[]),o.useEffect(()=>{var r;l&&((r=u.current)==null||r.setOptions(l))},[l]),o.useImperativeHandle(s,()=>{const r=()=>{const e=u.current;if(!e)throw new Error("GCodeSVGRenderer is not ready.");return e};return{loadFromLines:e=>r().loadFromLines(e),loadFromFile:e=>r().loadFromFile(e),loadFromText:e=>r().loadFromText(e),loadFromWorkerData:e=>r().loadFromWorkerData(e),loadFromPrecomputedGroups:(e,f)=>r().loadFromPrecomputedGroups(e,f),clear:()=>r().clear(),resetView:()=>r().resetView(),setOptions:e=>r().setOptions(e),setProjectionMode:e=>r().setProjectionMode(e),setBitPosition:e=>r().setBitPosition(e),setBitVisible:e=>r().setBitVisible(e),getSVGElement:()=>r().getSVGElement(),dispose:()=>r().dispose()}},[]),o.createElement("div",{ref:m,className:c,style:{width:"100%",height:"100%",...p}})});exports.GCodeSVGVisualizer=b;exports.GCodeVisualizer=G;
package/dist/react.js CHANGED
@@ -1,67 +1,70 @@
1
1
  import * as o from "react";
2
- import { a as w, G as V } from "./GCodeSVGRenderer-BMoDX03w.js";
2
+ import { a as w, G as V } from "./GCodeSVGRenderer-BhyNQYf7.js";
3
3
  const G = o.forwardRef(
4
- function(u, c) {
5
- const { id: a, options: n, callbacks: l, className: m, style: d } = u, i = o.useRef(null), r = o.useRef(null);
4
+ function(c, m) {
5
+ const { id: l, options: n, callbacks: a, className: f, style: u } = c, i = o.useRef(null), t = o.useRef(null);
6
6
  return o.useEffect(() => {
7
7
  const e = i.current;
8
8
  if (!e)
9
9
  return;
10
- const f = new w({ id: a, container: e, options: n, callbacks: l });
11
- return r.current = f, () => {
12
- r.current = null, f.dispose();
10
+ const d = new w({ id: l, container: e, options: n, callbacks: a });
11
+ return t.current = d, () => {
12
+ t.current = null, d.dispose();
13
13
  };
14
- }, [a]), o.useEffect(() => {
14
+ }, [l]), o.useEffect(() => {
15
15
  var e;
16
- (e = r.current) == null || e.setOptions(n ?? {});
16
+ (e = t.current) == null || e.setOptions(n ?? {});
17
17
  }, [n]), o.useEffect(() => {
18
18
  var e;
19
- (e = r.current) == null || e.setCallbacks(l ?? {});
20
- }, [l]), o.useImperativeHandle(
21
- c,
19
+ (e = t.current) == null || e.setCallbacks(a ?? {});
20
+ }, [a]), o.useImperativeHandle(
21
+ m,
22
22
  () => {
23
23
  const e = () => {
24
- const t = r.current;
25
- if (!t)
24
+ const r = t.current;
25
+ if (!r)
26
26
  throw new Error("GCodeViewer is not ready.");
27
- return t;
27
+ return r;
28
28
  };
29
29
  return {
30
30
  get id() {
31
- return a;
31
+ return l;
32
32
  },
33
- setCallbacks(t) {
34
- e().setCallbacks(t);
33
+ setCallbacks(r) {
34
+ e().setCallbacks(r);
35
35
  },
36
- snapCameraToView(t, s) {
37
- e().snapCameraToView(t, s);
36
+ snapCameraToView(r, s) {
37
+ e().snapCameraToView(r, s);
38
38
  },
39
- setRotateEnabled(t) {
40
- e().setRotateEnabled(t);
39
+ setRotateEnabled(r) {
40
+ e().setRotateEnabled(r);
41
41
  },
42
- setCameraFollowEnabled(t) {
43
- e().setCameraFollowEnabled(t);
42
+ setCameraFollowEnabled(r) {
43
+ e().setCameraFollowEnabled(r);
44
44
  },
45
- screenToWorld(t, s, F) {
46
- return e().screenToWorld(t, s, F);
45
+ screenToWorld(r, s, p) {
46
+ return e().screenToWorld(r, s, p);
47
47
  },
48
- setBitPosition(t, s) {
49
- e().setBitPosition(t, s);
48
+ worldToScreen(r, s, p) {
49
+ return e().worldToScreen(r, s, p);
50
50
  },
51
- setBitVisible(t) {
52
- e().setBitVisible(t);
51
+ setBitPosition(r, s) {
52
+ e().setBitPosition(r, s);
53
53
  },
54
- setBitSpinning(t) {
55
- e().setBitSpinning(t);
54
+ setBitVisible(r) {
55
+ e().setBitVisible(r);
56
56
  },
57
- setToolpathRotationA(t) {
58
- e().setToolpathRotationA(t);
57
+ setBitSpinning(r) {
58
+ e().setBitSpinning(r);
59
59
  },
60
- hideUntilLine(t, s) {
61
- e().hideUntilLine(t, s);
60
+ setToolpathRotationA(r) {
61
+ e().setToolpathRotationA(r);
62
62
  },
63
- seekToLine(t, s) {
64
- e().seekToLine(t, s);
63
+ hideUntilLine(r, s) {
64
+ e().hideUntilLine(r, s);
65
+ },
66
+ seekToLine(r, s) {
67
+ e().seekToLine(r, s);
65
68
  },
66
69
  showAll() {
67
70
  e().showAll();
@@ -69,26 +72,26 @@ const G = o.forwardRef(
69
72
  resetColors() {
70
73
  e().resetColors();
71
74
  },
72
- loadFromUrl(t, s) {
73
- return e().loadFromUrl(t, s);
75
+ loadFromUrl(r, s) {
76
+ return e().loadFromUrl(r, s);
74
77
  },
75
- loadFromFile(t) {
76
- return e().loadFromFile(t);
78
+ loadFromFile(r) {
79
+ return e().loadFromFile(r);
77
80
  },
78
- loadFromText(t) {
79
- return e().loadFromText(t);
81
+ loadFromText(r) {
82
+ return e().loadFromText(r);
80
83
  },
81
- loadFromLines(t) {
82
- return e().loadFromLines(t);
84
+ loadFromLines(r) {
85
+ return e().loadFromLines(r);
83
86
  },
84
- loadFromWorkerData(t) {
85
- return e().loadFromWorkerData(t);
87
+ loadFromWorkerData(r) {
88
+ return e().loadFromWorkerData(r);
86
89
  },
87
90
  unload() {
88
91
  e().unload();
89
92
  },
90
- setOptions(t) {
91
- e().setOptions(t);
93
+ setOptions(r) {
94
+ e().setOptions(r);
92
95
  },
93
96
  getOptions() {
94
97
  return e().getOptions();
@@ -110,47 +113,47 @@ const G = o.forwardRef(
110
113
  }
111
114
  };
112
115
  },
113
- [a]
114
- ), o.createElement("div", { ref: i, className: m, style: d });
116
+ [l]
117
+ ), o.createElement("div", { ref: i, className: f, style: u });
115
118
  }
116
119
  ), R = o.forwardRef(
117
- function(u, c) {
118
- const { id: a, options: n, className: l, style: m } = u, d = o.useRef(null), i = o.useRef(null);
120
+ function(c, m) {
121
+ const { id: l, options: n, className: a, style: f } = c, u = o.useRef(null), i = o.useRef(null);
119
122
  return o.useEffect(() => {
120
- const r = d.current;
121
- if (!r) return;
122
- const e = new V(r, n);
123
+ const t = u.current;
124
+ if (!t) return;
125
+ const e = new V(t, n);
123
126
  return i.current = e, () => {
124
127
  i.current = null, e.dispose();
125
128
  };
126
129
  }, []), o.useEffect(() => {
127
- var r;
128
- n && ((r = i.current) == null || r.setOptions(n));
129
- }, [n]), o.useImperativeHandle(c, () => {
130
- const r = () => {
130
+ var t;
131
+ n && ((t = i.current) == null || t.setOptions(n));
132
+ }, [n]), o.useImperativeHandle(m, () => {
133
+ const t = () => {
131
134
  const e = i.current;
132
135
  if (!e) throw new Error("GCodeSVGRenderer is not ready.");
133
136
  return e;
134
137
  };
135
138
  return {
136
- loadFromLines: (e) => r().loadFromLines(e),
137
- loadFromFile: (e) => r().loadFromFile(e),
138
- loadFromText: (e) => r().loadFromText(e),
139
- loadFromWorkerData: (e) => r().loadFromWorkerData(e),
140
- loadFromPrecomputedGroups: (e) => r().loadFromPrecomputedGroups(e),
141
- clear: () => r().clear(),
142
- resetView: () => r().resetView(),
143
- setOptions: (e) => r().setOptions(e),
144
- setProjectionMode: (e) => r().setProjectionMode(e),
145
- setBitPosition: (e) => r().setBitPosition(e),
146
- setBitVisible: (e) => r().setBitVisible(e),
147
- getSVGElement: () => r().getSVGElement(),
148
- dispose: () => r().dispose()
139
+ loadFromLines: (e) => t().loadFromLines(e),
140
+ loadFromFile: (e) => t().loadFromFile(e),
141
+ loadFromText: (e) => t().loadFromText(e),
142
+ loadFromWorkerData: (e) => t().loadFromWorkerData(e),
143
+ loadFromPrecomputedGroups: (e, d) => t().loadFromPrecomputedGroups(e, d),
144
+ clear: () => t().clear(),
145
+ resetView: () => t().resetView(),
146
+ setOptions: (e) => t().setOptions(e),
147
+ setProjectionMode: (e) => t().setProjectionMode(e),
148
+ setBitPosition: (e) => t().setBitPosition(e),
149
+ setBitVisible: (e) => t().setBitVisible(e),
150
+ getSVGElement: () => t().getSVGElement(),
151
+ dispose: () => t().dispose()
149
152
  };
150
153
  }, []), o.createElement("div", {
151
- ref: d,
152
- className: l,
153
- style: { width: "100%", height: "100%", ...m }
154
+ ref: u,
155
+ className: a,
156
+ style: { width: "100%", height: "100%", ...f }
154
157
  });
155
158
  }
156
159
  );
@@ -11,11 +11,15 @@ export type GCodeSVGRendererHandle = {
11
11
  opacity: number;
12
12
  positionsBuffer: ArrayBuffer;
13
13
  positionsLen: number;
14
- }[]): void;
14
+ stride?: 4 | 6;
15
+ }[], meta?: {
16
+ minZ?: number;
17
+ maxZ?: number;
18
+ }): void;
15
19
  clear(): void;
16
20
  resetView(): void;
17
21
  setOptions(opts: Partial<GCodeSVGOptions>): void;
18
- setProjectionMode(mode: 'perspective' | 'isometric'): void;
22
+ setProjectionMode(mode: 'perspective' | 'isometric' | 'top'): void;
19
23
  setBitPosition(pos: {
20
24
  x: number;
21
25
  y: number;
@@ -92,6 +92,22 @@ export declare class GCodeViewer implements GCodeViewerHandle {
92
92
  y: number;
93
93
  z: number;
94
94
  } | null;
95
+ /**
96
+ * Project a point in world/scene space to a viewport pixel (clientX/clientY),
97
+ * the inverse of screenToWorld and in the same coordinate space it consumes.
98
+ *
99
+ * The point is projected through the camera to normalized device coordinates
100
+ * and mapped back onto the laid-out canvas rect, so overlays drawn in fixed
101
+ * (viewport) coordinates line up with picked scene points and track pan/zoom.
102
+ *
103
+ * `z` is the point's height in scene space (default 0); it changes the
104
+ * projected pixel under the perspective camera, so callers placing markers
105
+ * off the Z=0 plane should pass it. Returns null when the canvas has no layout.
106
+ */
107
+ worldToScreen(x: number, y: number, z?: number): {
108
+ x: number;
109
+ y: number;
110
+ } | null;
95
111
  private startSnapToView;
96
112
  private startCameraLerp;
97
113
  loadFromUrl(url: string, args?: {
@@ -34,6 +34,7 @@ export declare class GCodeSVGRenderer {
34
34
  private rapidVerts;
35
35
  private cutVerts;
36
36
  private bounds;
37
+ private hasZInfo;
37
38
  constructor(container: HTMLElement, options?: Partial<GCodeSVGOptions>);
38
39
  loadFromLines(lines: string[]): void;
39
40
  loadFromFile(file: File): Promise<void>;
@@ -45,11 +46,15 @@ export declare class GCodeSVGRenderer {
45
46
  opacity: number;
46
47
  positionsBuffer: ArrayBuffer;
47
48
  positionsLen: number;
48
- }[]): void;
49
+ stride?: 4 | 6;
50
+ }[], meta?: {
51
+ minZ?: number;
52
+ maxZ?: number;
53
+ }): void;
49
54
  private syncSegmentGroupsFromLines;
50
55
  resetView(): void;
51
56
  setOptions(opts: Partial<GCodeSVGOptions>): void;
52
- setProjectionMode(mode: 'perspective' | 'isometric'): void;
57
+ setProjectionMode(mode: 'perspective' | 'isometric' | 'top'): void;
53
58
  getSVGElement(): SVGSVGElement;
54
59
  setBitPosition(pos: {
55
60
  x: number;
@@ -5,7 +5,7 @@ export type GCodeSVGOptions = {
5
5
  strokeWidth: number;
6
6
  arcSegments: number;
7
7
  padding: number;
8
- projectionMode: 'perspective' | 'isometric';
8
+ projectionMode: 'perspective' | 'isometric' | 'top';
9
9
  showOrigin: boolean;
10
10
  originColor: string;
11
11
  crosshairColor: string;
@@ -183,6 +183,10 @@ export type GCodeViewerHandle = {
183
183
  y: number;
184
184
  z: number;
185
185
  } | null;
186
+ worldToScreen(x: number, y: number, z?: number): {
187
+ x: number;
188
+ y: number;
189
+ } | null;
186
190
  setBitPosition(position: GCodeViewerBitPosition, options?: {
187
191
  immediate?: boolean;
188
192
  }): void;
package/dist/viewer.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./GCodeSVGRenderer-BvaXifw1.cjs"),a={dark:{background:"#111827",opacity:.9,rapidOpacity:.3,colors:{rapid:"#0ef6ae",cutting:"#3e85c7",laser:"#a855f7",processed:"#6b7280",boundingBox:"#e2e8f0",machineBed:"#f5a623",machineBedKeepout:"#df3b3b",grid:{major:"#77a9d7",minor:"#3e6e9e"},axes:{x:"#df3b3b",y:"#06b881",z:"#295d8d"}}},light:{background:"#e5e7eb",opacity:.9,rapidOpacity:.3,colors:{rapid:"#295d8d",cutting:"#111827",laser:"#FF0000",processed:"#9ca3af",boundingBox:"#4b5563",machineBed:"#b45309",machineBedKeepout:"#df3b3b",grid:{major:"#295d8d",minor:"#5191cc"},axes:{x:"#df3b3b",y:"#06b881",z:"#295d8d"}}},"flexoki-dark":{background:"#100f0f",opacity:.9,rapidOpacity:.3,colors:{rapid:"#DA702C",cutting:"#3AA99F",laser:"#8B7EC8",processed:"#6f6e69",boundingBox:"#cecdc3",machineBed:"#ffcc66",machineBedKeepout:"#d14d41",grid:{major:"#a89984",minor:"#6f6e69"},axes:{x:"#d14d41",y:"#879a39",z:"#4385be"}}},"tokyo-night":{background:"#1a1b26",opacity:.9,rapidOpacity:.3,colors:{rapid:"#ff9e64",cutting:"#7dcfff",laser:"#bb9af7",processed:"#565f89",boundingBox:"#c0caf5",machineBed:"#e0af68",machineBedKeepout:"#f7768e",grid:{major:"#7aa2f7",minor:"#414868"},axes:{x:"#f7768e",y:"#9ece6a",z:"#7aa2f7"}}},"gruvbox-light":{background:"#fbf1c7",opacity:.9,rapidOpacity:.3,colors:{rapid:"#d65d0e",cutting:"#3c3836",laser:"#b16286",processed:"#928374",boundingBox:"#7c6f64",machineBed:"#d79921",machineBedKeepout:"#cc241d",grid:{major:"#7c6f64",minor:"#a89984"},axes:{x:"#cc241d",y:"#98971a",z:"#458588"}}},"ayu-dark":{background:"#0b0e14",opacity:.9,rapidOpacity:.3,colors:{rapid:"#FFA659",cutting:"#73D0FF",laser:"#DFBFFF",processed:"#6E7C8F",boundingBox:"#CBCCC6",machineBed:"#FFD173",machineBedKeepout:"#F28779",grid:{major:"#77a9d7",minor:"#3e6590"},axes:{x:"#F28779",y:"#D5FF80",z:"#5CCFE6"}}},"ayu-light":{background:"#fafafa",opacity:.9,rapidOpacity:.3,colors:{rapid:"#FA8D3E",cutting:"#22A4E6",laser:"#A37ACC",processed:"#ADAEB1",boundingBox:"#5C6773",machineBed:"#F2AE49",machineBedKeepout:"#F07171",grid:{major:"#5c6773",minor:"#9aacba"},axes:{x:"#F07171",y:"#86B300",z:"#55B4D4"}}}};exports.GCodeSVGRenderer=e.GCodeSVGRenderer;exports.GCodeViewer=e.GCodeViewer;exports.ViewCube=e.ViewCube;exports.defaultGCodeViewerOptions=e.defaultGCodeViewerOptions;exports.defaultGCodeViewerTheme=e.defaultGCodeViewerTheme;exports.gCodeViewerThemePresets=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./GCodeSVGRenderer-BsWhrQaK.cjs"),a={dark:{background:"#111827",opacity:.9,rapidOpacity:.3,colors:{rapid:"#0ef6ae",cutting:"#3e85c7",laser:"#a855f7",processed:"#6b7280",boundingBox:"#e2e8f0",machineBed:"#f5a623",machineBedKeepout:"#df3b3b",grid:{major:"#77a9d7",minor:"#3e6e9e"},axes:{x:"#df3b3b",y:"#06b881",z:"#295d8d"}}},light:{background:"#e5e7eb",opacity:.9,rapidOpacity:.3,colors:{rapid:"#295d8d",cutting:"#111827",laser:"#FF0000",processed:"#9ca3af",boundingBox:"#4b5563",machineBed:"#b45309",machineBedKeepout:"#df3b3b",grid:{major:"#295d8d",minor:"#5191cc"},axes:{x:"#df3b3b",y:"#06b881",z:"#295d8d"}}},"flexoki-dark":{background:"#100f0f",opacity:.9,rapidOpacity:.3,colors:{rapid:"#DA702C",cutting:"#3AA99F",laser:"#8B7EC8",processed:"#6f6e69",boundingBox:"#cecdc3",machineBed:"#ffcc66",machineBedKeepout:"#d14d41",grid:{major:"#a89984",minor:"#6f6e69"},axes:{x:"#d14d41",y:"#879a39",z:"#4385be"}}},"tokyo-night":{background:"#1a1b26",opacity:.9,rapidOpacity:.3,colors:{rapid:"#ff9e64",cutting:"#7dcfff",laser:"#bb9af7",processed:"#565f89",boundingBox:"#c0caf5",machineBed:"#e0af68",machineBedKeepout:"#f7768e",grid:{major:"#7aa2f7",minor:"#414868"},axes:{x:"#f7768e",y:"#9ece6a",z:"#7aa2f7"}}},"gruvbox-light":{background:"#fbf1c7",opacity:.9,rapidOpacity:.3,colors:{rapid:"#d65d0e",cutting:"#3c3836",laser:"#b16286",processed:"#928374",boundingBox:"#7c6f64",machineBed:"#d79921",machineBedKeepout:"#cc241d",grid:{major:"#7c6f64",minor:"#a89984"},axes:{x:"#cc241d",y:"#98971a",z:"#458588"}}},"ayu-dark":{background:"#0b0e14",opacity:.9,rapidOpacity:.3,colors:{rapid:"#FFA659",cutting:"#73D0FF",laser:"#DFBFFF",processed:"#6E7C8F",boundingBox:"#CBCCC6",machineBed:"#FFD173",machineBedKeepout:"#F28779",grid:{major:"#77a9d7",minor:"#3e6590"},axes:{x:"#F28779",y:"#D5FF80",z:"#5CCFE6"}}},"ayu-light":{background:"#fafafa",opacity:.9,rapidOpacity:.3,colors:{rapid:"#FA8D3E",cutting:"#22A4E6",laser:"#A37ACC",processed:"#ADAEB1",boundingBox:"#5C6773",machineBed:"#F2AE49",machineBedKeepout:"#F07171",grid:{major:"#5c6773",minor:"#9aacba"},axes:{x:"#F07171",y:"#86B300",z:"#55B4D4"}}}};exports.GCodeSVGRenderer=e.GCodeSVGRenderer;exports.GCodeViewer=e.GCodeViewer;exports.ViewCube=e.ViewCube;exports.defaultGCodeViewerOptions=e.defaultGCodeViewerOptions;exports.defaultGCodeViewerTheme=e.defaultGCodeViewerTheme;exports.gCodeViewerThemePresets=a;
package/dist/viewer.js CHANGED
@@ -1,4 +1,4 @@
1
- import { G as o, a as i, V as c, d as r, b as n } from "./GCodeSVGRenderer-BMoDX03w.js";
1
+ import { G as o, a as i, V as c, d as r, b as n } from "./GCodeSVGRenderer-BhyNQYf7.js";
2
2
  const e = {
3
3
  dark: {
4
4
  background: "#111827",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sienci/gviewer",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "description": "GCode visualization library using Three.js",
5
5
  "repository": {
6
6
  "type": "git",