@chestnutlabs/gcode-preview-vue 0.14.0 → 0.16.0

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.
@@ -10,7 +10,7 @@
10
10
  * and staying pure TypeScript keeps the package on the plain tsc build with typed props/emits.
11
11
  */
12
12
  import { type PropType } from 'vue';
13
- import type { BuildVolumeDef, CameraMode, CameraState, CameraView, ColorMode, QualityMode, QualityPolicy, Theme, TubeOptions } from '@chestnutlabs/gcode-renderer-three';
13
+ import type { BuildVolumeDef, CameraMode, CameraState, CameraView, ColorMode, QualityMode, ProgressivePreview, PreparationStage, QualityPolicy, Theme, TubeOptions } from '@chestnutlabs/gcode-renderer-three';
14
14
  import type { Confidence, DialectMetadata, Warning } from '@chestnutlabs/toolpath-core';
15
15
  import type { MachineGeometry, ProgressObservation } from '@chestnutlabs/toolpath-core';
16
16
  import type { WireParseOptions, WorkerLike } from '@chestnutlabs/gcode-parser';
@@ -49,6 +49,11 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
49
49
  type: PropType<QualityPolicy>;
50
50
  default: undefined;
51
51
  };
52
+ /** #60 curtain: 'lines' (default, stream the preview), 'hold' (reveal only the final build), or 'off'. */
53
+ progressivePreview: {
54
+ type: PropType<ProgressivePreview>;
55
+ default: undefined;
56
+ };
52
57
  /** #150 (DD-009 D3): camera projection. */
53
58
  cameraMode: {
54
59
  type: PropType<CameraMode>;
@@ -134,7 +139,7 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
134
139
  };
135
140
  /** Advanced/test renderer injectables (pass-throughs of the renderer contract). */
136
141
  rendererOptions: {
137
- type: PropType<Omit<NonNullable<UseGcodePreviewOptions["renderer"]>, "buildVolume" | "quality" | "qualityMode" | "cameraMode" | "frameContent" | "interactionQuality" | "theme" | "colorMode" | "tube">>;
142
+ type: PropType<Omit<NonNullable<UseGcodePreviewOptions["renderer"]>, "buildVolume" | "quality" | "qualityMode" | "progressivePreview" | "cameraMode" | "frameContent" | "interactionQuality" | "theme" | "colorMode" | "tube">>;
138
143
  default: undefined;
139
144
  };
140
145
  }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -158,6 +163,14 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
158
163
  bytesProcessed: number;
159
164
  totalBytes: number;
160
165
  }) => true;
166
+ stage: (_e: {
167
+ stage: PreparationStage;
168
+ progress?: number;
169
+ detail?: {
170
+ built: number;
171
+ total: number;
172
+ };
173
+ }) => true;
161
174
  'build-complete': (_e: {
162
175
  segments: number;
163
176
  quality: QualityMode;
@@ -211,6 +224,11 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
211
224
  type: PropType<QualityPolicy>;
212
225
  default: undefined;
213
226
  };
227
+ /** #60 curtain: 'lines' (default, stream the preview), 'hold' (reveal only the final build), or 'off'. */
228
+ progressivePreview: {
229
+ type: PropType<ProgressivePreview>;
230
+ default: undefined;
231
+ };
214
232
  /** #150 (DD-009 D3): camera projection. */
215
233
  cameraMode: {
216
234
  type: PropType<CameraMode>;
@@ -296,7 +314,7 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
296
314
  };
297
315
  /** Advanced/test renderer injectables (pass-throughs of the renderer contract). */
298
316
  rendererOptions: {
299
- type: PropType<Omit<NonNullable<UseGcodePreviewOptions["renderer"]>, "buildVolume" | "quality" | "qualityMode" | "cameraMode" | "frameContent" | "interactionQuality" | "theme" | "colorMode" | "tube">>;
317
+ type: PropType<Omit<NonNullable<UseGcodePreviewOptions["renderer"]>, "buildVolume" | "quality" | "qualityMode" | "progressivePreview" | "cameraMode" | "frameContent" | "interactionQuality" | "theme" | "colorMode" | "tube">>;
300
318
  default: undefined;
301
319
  };
302
320
  }>> & Readonly<{
@@ -323,6 +341,14 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
323
341
  bytesProcessed: number;
324
342
  totalBytes: number;
325
343
  }) => any) | undefined;
344
+ onStage?: ((_e: {
345
+ stage: PreparationStage;
346
+ progress?: number;
347
+ detail?: {
348
+ built: number;
349
+ total: number;
350
+ };
351
+ }) => any) | undefined;
326
352
  "onBuild-complete"?: ((_e: {
327
353
  segments: number;
328
354
  quality: QualityMode;
@@ -344,6 +370,7 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
344
370
  buildVolume: BuildVolumeDef | MachineGeometry;
345
371
  quality: QualityMode | "auto";
346
372
  qualityMode: QualityPolicy;
373
+ progressivePreview: ProgressivePreview;
347
374
  cameraMode: CameraMode;
348
375
  frameContent: "object" | "all";
349
376
  interactionQuality: "auto" | "off";
@@ -368,6 +395,7 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
368
395
  buildVolume?: BuildVolumeDef;
369
396
  quality?: QualityMode | "auto";
370
397
  qualityMode?: QualityPolicy;
398
+ progressivePreview?: ProgressivePreview;
371
399
  cameraMode?: CameraMode;
372
400
  frameContent?: "object" | "all";
373
401
  interactionQuality?: "off" | "auto";
@@ -376,9 +404,11 @@ export declare const GcodePreview: import("vue").DefineComponent<import("vue").E
376
404
  theme?: Theme;
377
405
  adjacentLayers?: number;
378
406
  ghostOpacity?: number;
407
+ geometryConcurrency?: "auto" | "off" | number;
408
+ geometryMemoryBudgetBytes?: number;
379
409
  createRenderer?: (canvas: import("@chestnutlabs/gcode-renderer-three").RenderTargetCanvas) => import("@chestnutlabs/gcode-renderer-three").GLRendererLike;
380
410
  scheduleFrame?: (cb: () => void) => void;
381
411
  chunksPerTick?: number;
382
- }, "buildVolume" | "quality" | "qualityMode" | "cameraMode" | "frameContent" | "interactionQuality" | "theme" | "colorMode" | "tube">;
412
+ }, "buildVolume" | "quality" | "qualityMode" | "progressivePreview" | "cameraMode" | "frameContent" | "interactionQuality" | "theme" | "colorMode" | "tube">;
383
413
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
384
414
  //# sourceMappingURL=gcode-preview-component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gcode-preview-component.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,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;IAChD,uEAAuE;;cAC1C,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;IAEpD,2DAA2D;;;;;IAE3D,gEAAgE;;;;;IAEhE,kGAAkG;;;;;IAElG,gEAAgE;;cACpC,QAAQ,CAAC,mBAAmB,GAAG,IAAI,CAAC;;;IAChE;sFACkF;;cAE9D,QAAQ,CAAC,MAAM,UAAU,CAAC;;;IAG9C,mFAAmF;;cAEjE,QAAQ,CACtB,IAAI,CACF,WAAW,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC,EAC7C,aAAa,GACb,SAAS,GACT,aAAa,GACb,oBAAoB,GACpB,YAAY,GACZ,cAAc,GACd,oBAAoB,GACpB,OAAO,GACP,WAAW,GACX,MAAM,CACT,CACF;;;;;;cAyBiB,MAAM;iBAAW,MAAM;;;kBAlB/B,MAAM;gBACR,MAAM;kBACJ,OAAO;sBACH,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;kBAC9B,SAAS,OAAO,EAAE;kBAClB,eAAe,GAAG,SAAS;;;;cAGX,MAAM;iBAAW,MAAM;;;;wBAEV,MAAM;oBAAc,MAAM;;;eAC9C,gBAAgB;mBAAa,MAAM;iBAAW;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE;;;kBAChE,MAAM;iBAAW,WAAW;;;cAC9B,WAAW;YAAM,WAAW;gBAAU,MAAM;;;;;cAG/B,MAAM;iBAAW,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA1ClC,UAAU;;;;;;;;;;;;;;;;;;;;;4EA6Q/C,CAAC"}
@@ -25,6 +25,8 @@ export const GcodePreview = defineComponent({
25
25
  buildVolume: { type: Object, default: undefined },
26
26
  quality: { type: String, default: 'auto' },
27
27
  qualityMode: { type: String, default: undefined },
28
+ /** #60 curtain: 'lines' (default, stream the preview), 'hold' (reveal only the final build), or 'off'. */
29
+ progressivePreview: { type: String, default: undefined },
28
30
  /** #150 (DD-009 D3): camera projection. */
29
31
  cameraMode: { type: String, default: 'perspective' },
30
32
  /** #306/#6: frame the printed 'object' (excl. skirt/prime) or 'all' extrusion. Default 'all'. */
@@ -73,6 +75,7 @@ export const GcodePreview = defineComponent({
73
75
  'parse-error': (_e) => true,
74
76
  'parse-cancelled': () => true,
75
77
  'parse-progress': (_p) => true,
78
+ stage: (_e) => true,
76
79
  'build-complete': (_e) => true,
77
80
  'quality-fallback': (_e) => true,
78
81
  'machine-geometry-mismatch': (_message) => true,
@@ -90,6 +93,7 @@ export const GcodePreview = defineComponent({
90
93
  buildVolume: 'bed' in (props.buildVolume ?? {}) ? undefined : props.buildVolume,
91
94
  quality: props.quality,
92
95
  qualityMode: props.qualityMode,
96
+ progressivePreview: props.progressivePreview,
93
97
  cameraMode: props.cameraMode,
94
98
  frameContent: props.frameContent,
95
99
  interactionQuality: props.interactionQuality,
@@ -131,6 +135,9 @@ export const GcodePreview = defineComponent({
131
135
  case 'parse-progress':
132
136
  emit('parse-progress', { bytesProcessed: e.progress.bytesProcessed, totalBytes: e.progress.totalBytes });
133
137
  break;
138
+ case 'stage':
139
+ emit('stage', { stage: e.stage, progress: e.progress, detail: e.detail });
140
+ break;
134
141
  case 'buildComplete':
135
142
  emit('build-complete', { segments: e.segments, quality: e.quality });
136
143
  emit('disclosure', preview.state.disclosure);
@@ -191,6 +198,10 @@ export const GcodePreview = defineComponent({
191
198
  if (mode !== undefined)
192
199
  preview.controls.setQualityMode(mode);
193
200
  });
201
+ watch(() => props.progressivePreview, (mode) => {
202
+ if (mode !== undefined)
203
+ preview.controls.setProgressivePreview(mode);
204
+ });
194
205
  watch(() => props.cameraMode, (mode) => preview.controls.setCameraMode(mode));
195
206
  watch(() => props.frameContent, (mode) => preview.controls.setFrameContent(mode));
196
207
  watch(() => props.interactionQuality, (mode) => preview.controls.setInteractionQuality(mode));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chestnutlabs/gcode-preview-vue",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "description": "Thin Vue 3 integration for the Chestnut Labs G-code viewer (DD-007): useGcodePreview composable + GcodePreview component over the framework-neutral parser/renderer/progress packages.",
5
5
  "keywords": [
6
6
  "gcode",
@@ -50,10 +50,10 @@
50
50
  "test": "vitest run"
51
51
  },
52
52
  "dependencies": {
53
- "@chestnutlabs/gcode-parser": "0.14.0",
54
- "@chestnutlabs/gcode-renderer-three": "0.14.0",
55
- "@chestnutlabs/toolpath-core": "0.14.0",
56
- "@chestnutlabs/gcode-preview-core": "0.14.0"
53
+ "@chestnutlabs/gcode-parser": "0.16.0",
54
+ "@chestnutlabs/gcode-renderer-three": "0.16.0",
55
+ "@chestnutlabs/toolpath-core": "0.16.0",
56
+ "@chestnutlabs/gcode-preview-core": "0.16.0"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "vue": "^3.4.0"