@playcanvas/splat-transform 2.0.0 → 2.0.1

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.
@@ -18,3 +18,4 @@ export type { WriteVoxelOptions, VoxelMetadata } from './writers';
18
18
  export { carve, fillExterior, fillFloor, filterCluster, filterFloaters, findClusterVoxelFlood, voxelizeToBuffer } from './voxel';
19
19
  export type { NavSeed, NavSimplifyResult } from './voxel';
20
20
  export type { Options, Param, DeviceCreator } from './types';
21
+ export { version, revision } from './version';
@@ -18,3 +18,4 @@ export type { WriteVoxelOptions, VoxelMetadata } from './writers';
18
18
  export { carve, fillExterior, fillFloor, filterCluster, filterFloaters, findClusterVoxelFlood, voxelizeToBuffer } from './voxel';
19
19
  export type { NavSeed, NavSimplifyResult } from './voxel';
20
20
  export type { Options, Param, DeviceCreator } from './types';
21
+ export { version, revision } from './version';
@@ -69,10 +69,19 @@ type LogEvent = {
69
69
  text: string;
70
70
  };
71
71
  /**
72
- * Renderer interface. Receives semantic events (already filtered by the
73
- * active verbosity inside {@link LoggerCore}) and decides how to display
74
- * them. Renderers are pure presentation - they never need to consult or
75
- * track verbosity themselves.
72
+ * Renderer interface. Receives the full stream of semantic lifecycle
73
+ * events ({@link LogEvent}) and decides how to display them. The core
74
+ * does not filter scope/bar events by verbosity, so renderers see a
75
+ * faithful record of every scope open/close and bar progress update -
76
+ * embedders consuming the event stream can rely on this for progress
77
+ * UIs that must close themselves on completion. Visibility decisions
78
+ * (e.g. hiding successful `scopeEnd` footers at non-`verbose`
79
+ * verbosity) are the renderer's responsibility; {@link logger.getVerbosity}
80
+ * is available to consult.
81
+ *
82
+ * `message` events for `info`, `warn` and `debug` are gated by verbosity
83
+ * at the façade (see {@link LoggerCore.isLevelVisible}) before reaching
84
+ * the renderer; `error` is always delivered.
76
85
  */
77
86
  interface Renderer {
78
87
  /**
@@ -144,6 +153,7 @@ interface Group {
144
153
  /** Dispose hook so `using` syntax closes the group on scope exit. */
145
154
  [Symbol.dispose](): void;
146
155
  }
156
+ declare const verbosityRank: Record<Verbosity, number>;
147
157
  /**
148
158
  * Public logger surface.
149
159
  *
@@ -224,7 +234,10 @@ declare const logger: {
224
234
  output(text: string): void;
225
235
  /**
226
236
  * Replace the active renderer. Embedders install their own renderer here
227
- * to consume `LogEvent`s; the default renderer is a no-op.
237
+ * to consume `LogEvent`s; the default renderer is a no-op. Renderers
238
+ * receive every scope/bar lifecycle event regardless of verbosity, so
239
+ * progress UIs can rely on `scopeStart`/`scopeEnd` and `barStart`/`barEnd`
240
+ * to manage their state.
228
241
  * @param r - The renderer to install.
229
242
  */
230
243
  setRenderer(r: Renderer): void;
@@ -253,5 +266,5 @@ declare const logger: {
253
266
  * this to inject a configured logger.
254
267
  */
255
268
  type Logger = typeof logger;
256
- export { logger };
269
+ export { logger, verbosityRank };
257
270
  export type { Bar, Group, LogEvent, Logger, MessageKind, Renderer, Verbosity };
@@ -1,4 +1,4 @@
1
- import type { LogEvent, Renderer } from './logger';
1
+ import { type LogEvent, type Renderer } from './logger';
2
2
  /**
3
3
  * Output streams and optional memory-usage probe for {@link TextRenderer}.
4
4
  */
@@ -29,20 +29,27 @@ interface TextRendererOptions {
29
29
  }
30
30
  /**
31
31
  * Default human-readable text renderer. Emits one event per line - no
32
- * carriage-return rewriting, no TTY detection, no buffering. Scope starts
33
- * always emit a header line; successful `scopeEnd` footers are filtered
34
- * out at `normal` verbosity by `LoggerCore` (kept at `verbose`, and always
35
- * shown when `failed`), so default-mode runs see headers without timing
36
- * footers and `--verbose` adds the matching `done in ...` lines. Bars
37
- * render as `[#### ...... ] duration`, with `#` appended incrementally on
38
- * each `barTick` and the remainder padded with `.` on `barEnd`. `output`
32
+ * carriage-return rewriting, no TTY detection, no buffering. Bars render
33
+ * as `[#### ...... ] duration`, with `#` appended incrementally on each
34
+ * `barTick` and the remainder padded with `.` on `barEnd`. `output`
39
35
  * events are treated as line-oriented: their text is written to the
40
36
  * pipeable sink with a trailing `\n` appended (callers should not include
41
37
  * one themselves).
42
38
  *
43
- * Verbosity filtering is handled centrally by `LoggerCore` - this renderer
44
- * receives only events that have already passed the visibility gate, so it
45
- * is pure presentation.
39
+ * Verbosity is consulted directly from the shared {@link logger} on each
40
+ * event, so this renderer alone decides what to display - the core
41
+ * delivers every scope/bar lifecycle event so embedders consuming the
42
+ * event stream see a faithful record. The display rules are:
43
+ *
44
+ * - `quiet` - suppresses every scope/bar lifecycle line (start, tick,
45
+ * end - including failed ends). Errors, warnings and `output` still
46
+ * show.
47
+ * - `normal` (default) - shows scope/bar headers and bar progress;
48
+ * shows failed `scopeEnd` / `barEnd` footers (the "failed in ..."
49
+ * cascade from `logger.error` / `unwindAll(true)`); hides successful
50
+ * `scopeEnd` footers.
51
+ * - `verbose` - shows everything, including successful `scopeEnd`
52
+ * footers ("done in ...").
46
53
  *
47
54
  * Sinks are injected (no `process` reference here) so the renderer works in
48
55
  * both Node CLI and browser/bundle contexts: the CLI passes
@@ -61,6 +68,7 @@ declare class TextRenderer implements Renderer {
61
68
  */
62
69
  private barFilled;
63
70
  constructor(options: TextRendererOptions);
71
+ private rank;
64
72
  handle(event: LogEvent): void;
65
73
  /**
66
74
  * Terminate any in-progress bar line so subsequent output starts on a
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The splat-transform version (semver MAJOR.MINOR.PATCH).
3
+ */
4
+ export declare const version: string;
5
+ /**
6
+ * The splat-transform revision (short Git hash of HEAD at build time).
7
+ */
8
+ export declare const revision: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcanvas/splat-transform",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "author": "PlayCanvas<support@playcanvas.com>",
5
5
  "homepage": "https://playcanvas.com",
6
6
  "description": "Library and CLI tool for 3D Gaussian splat format conversion and transformation",
@@ -52,6 +52,7 @@
52
52
  "@playcanvas/supersplat-viewer": "1.20.2",
53
53
  "@rollup/plugin-json": "6.1.0",
54
54
  "@rollup/plugin-node-resolve": "16.0.3",
55
+ "@rollup/plugin-replace": "6.0.3",
55
56
  "@rollup/plugin-typescript": "12.3.0",
56
57
  "@types/node": "24.12.2",
57
58
  "@typescript-eslint/eslint-plugin": "8.59.0",