@graphysdk/telemetry 1.9.0-beta.1789467548664 → 1.9.0-beta.1789480282040
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/README.md +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ subscription.unsubscribe();
|
|
|
35
35
|
|
|
36
36
|
- [Quickstart](https://docs.graphy.dev/sdk-next/quickstart)
|
|
37
37
|
|
|
38
|
-
In a React host, subscribe to a `GraphHandle` (`handle.subscribe()` + `handle.
|
|
38
|
+
In a React host, subscribe to a `GraphHandle` (`handle.subscribe()` + `handle.getScene()`) and
|
|
39
39
|
call `deriveChartShape` / `emitCompileEvents` from the listener.
|
|
40
40
|
|
|
41
41
|
## Agent skills
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var m="1.9.0-beta.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var m="1.9.0-beta.1789480282040",u=0;function y(e={}){f();const{chartInstanceId:n=b(),engineVersion:s=m,enabled:i=!0}=e,r=new Set;return{chartInstanceId:n,engineVersion:s,emit:a=>{if(!i||r.size===0)return;const o=[...r];for(const t of o)try{t(a)}catch{}},subscribe:a=>{r.add(a);let o=!1;const t=()=>{o||(o=!0,r.delete(a))};return{get closed(){return o},unsubscribe:t,[Symbol.dispose]:t}}}}var b=()=>`${Math.random().toString(36).slice(2,6)}${(u+=1).toString(36)}`,f=()=>{Symbol.dispose??=Symbol.for("Symbol.dispose")};function h(e){const{layers:n,coordSystem:s,scales:i,guides:r,annotations:l,spec:d}=e,a=r.colorGroups.length>0?r.colorGroups.length:null,o=n.reduce((t,g)=>t+g.data.size(),0);return{layerCount:n.length,geoms:n.map(t=>t.geom),positions:v(n.map(t=>t.position)),coordSystem:s.type,...s.type==="cartesian"?{mainAxis:s.mainAxis}:{},scaleAesthetics:Object.keys(i),seriesCount:a,observationCount:o,hasSecondaryAxis:n.some(t=>t.yScaleType==="secondary"),features:{headline:r.headline!==null,legend:r.legends.drawn.length>0,visibleAxes:r.axes.filter(t=>t.isVisible).length,dataLabels:n.some(t=>t.dataLabels.showDataLabels),highlights:d.highlights.length,annotations:C(l)}}}function S(e,n,s){if(!e)return;const i=p(e);if(n.ok){e.emit({...i,type:"chart.compiled",trigger:s,chart:h(n.scene),warningCodes:c(n.warnings)});return}e.emit({...i,type:"chart.compile_failed",trigger:s,errorCodes:c(n.errors),warningCodes:c(n.warnings)})}function A(e,n,s){e&&e.emit({...p(e),type:"command.applied",commandType:n.type,transient:s})}var c=e=>e.map(n=>n.code),v=e=>[...new Set(e)],C=e=>({differenceArrows:e.differenceArrows.length,shapes:e.shapes.length,freeformArrows:e.arrows.length,textAnnotations:e.textAnnotations.length,images:e.images.length,stickers:e.stickers.length,pinnedNumbers:e.pinnedNumbers.length,comments:e.comments.length}),p=e=>({timestamp:Date.now(),engineVersion:e.engineVersion,chartInstanceId:e.chartInstanceId});exports.PACKAGE_VERSION=m;exports.createTelemetryEmitter=y;exports.deriveChartShape=h;exports.emitCommandApplied=A;exports.emitCompileEvents=S;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Command } from '@graphysdk/viz-engine';
|
|
2
|
-
import { CompiledSpec } from '@graphysdk/viz-engine';
|
|
3
2
|
import { CompileResult } from '@graphysdk/viz-engine';
|
|
3
|
+
import { Scene } from '@graphysdk/viz-engine';
|
|
4
4
|
import { VizErrorCode } from '@graphysdk/viz-engine';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Per-kind annotation counts, mirroring `
|
|
7
|
+
* Per-kind annotation counts, mirroring `SceneAnnotations`' groups. Counts only — annotation
|
|
8
8
|
* content (text, images, positions) never enters telemetry.
|
|
9
9
|
*/
|
|
10
10
|
export declare interface ChartAnnotationCounts {
|
|
@@ -27,7 +27,7 @@ export declare interface ChartCompiledEvent extends VizTelemetryEventBase {
|
|
|
27
27
|
warningCodes: VizErrorCode[];
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
/** A compile failed. Carries error and warning codes only; no shape, since there is no
|
|
30
|
+
/** A compile failed. Carries error and warning codes only; no shape, since there is no scene. */
|
|
31
31
|
export declare interface ChartCompileFailedEvent extends VizTelemetryEventBase {
|
|
32
32
|
type: 'chart.compile_failed';
|
|
33
33
|
trigger: CompileTrigger;
|
|
@@ -48,7 +48,7 @@ export declare interface ChartFeatureUsage {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* Anonymised "shape" of a compiled chart — counts, enums, and booleans derived from `
|
|
51
|
+
* Anonymised "shape" of a compiled chart — counts, enums, and booleans derived from `Scene`.
|
|
52
52
|
* Never carries data values, variable names/labels, or formatted output, so it is safe to beacon.
|
|
53
53
|
*/
|
|
54
54
|
export declare interface ChartShape {
|
|
@@ -104,10 +104,10 @@ export declare interface CreateTelemetryEmitterOptions {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
|
-
* Project a {@link
|
|
107
|
+
* Project a {@link Scene} down to its anonymised {@link ChartShape}. Reads only counts, enums,
|
|
108
108
|
* and booleans — no data values, variable names/labels, or formatted output ever cross into the shape.
|
|
109
109
|
*/
|
|
110
|
-
export declare function deriveChartShape(
|
|
110
|
+
export declare function deriveChartShape(scene: Scene): ChartShape;
|
|
111
111
|
|
|
112
112
|
/** Emit `command.applied` for an applied {@link Command}. A no-op when no `emitter` is wired. */
|
|
113
113
|
export declare function emitCommandApplied(emitter: VizTelemetryEmitter | undefined, command: Command, transient: boolean): void;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var p = "1.9.0-beta.
|
|
1
|
+
var p = "1.9.0-beta.1789480282040", g = 0;
|
|
2
2
|
function A(e = {}) {
|
|
3
3
|
b();
|
|
4
4
|
const { chartInstanceId: n = u(), engineVersion: t = p, enabled: i = !0 } = e, r = /* @__PURE__ */ new Set();
|
|
@@ -62,7 +62,7 @@ function v(e, n, t) {
|
|
|
62
62
|
...i,
|
|
63
63
|
type: "chart.compiled",
|
|
64
64
|
trigger: t,
|
|
65
|
-
chart: y(n.
|
|
65
|
+
chart: y(n.scene),
|
|
66
66
|
warningCodes: c(n.warnings)
|
|
67
67
|
});
|
|
68
68
|
return;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"chart",
|
|
12
12
|
"events"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.9.0-beta.
|
|
14
|
+
"version": "1.9.0-beta.1789480282040",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@graphysdk/viz-engine": "^1.9.0-beta.
|
|
32
|
+
"@graphysdk/viz-engine": "^1.9.0-beta.1789480282040"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@rollup/plugin-replace": "^6.0.3",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"vite": "^8.1.5",
|
|
39
39
|
"vite-plugin-dts": "^4.5.4",
|
|
40
40
|
"vitest": "^4.1.0",
|
|
41
|
-
"@graphysdk/viz-engine": "1.9.0-beta.
|
|
41
|
+
"@graphysdk/viz-engine": "1.9.0-beta.1789480282040",
|
|
42
42
|
"@graphytools/eslint-config": "0.0.1",
|
|
43
43
|
"@graphytools/eslint-plugin-graphy": "1.0.0",
|
|
44
44
|
"@graphytools/typescript-config": "0.0.1",
|