@graphysdk/telemetry 1.9.0-beta.1792505847409 → 1.9.0-beta.1792510459918

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/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var m="1.9.0-beta.1792505847409",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;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var m="1.9.0-beta.1792510459918",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:A(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.visible).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 v(e,n,s){e&&e.emit({...p(e),type:"command.applied",commandType:n.type,transient:s})}var c=e=>e.map(n=>n.code),A=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=v;exports.emitCompileEvents=S;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- var p = "1.9.0-beta.1792505847409", g = 0;
2
- function A(e = {}) {
1
+ var p = "1.9.0-beta.1792510459918", g = 0;
2
+ function v(e = {}) {
3
3
  b();
4
4
  const { chartInstanceId: n = u(), engineVersion: t = p, enabled: i = !0 } = e, r = /* @__PURE__ */ new Set();
5
5
  return {
@@ -47,14 +47,14 @@ function y(e) {
47
47
  features: {
48
48
  headline: r.headline !== null,
49
49
  legend: r.legends.drawn.length > 0,
50
- visibleAxes: r.axes.filter((s) => s.isVisible).length,
50
+ visibleAxes: r.axes.filter((s) => s.visible).length,
51
51
  dataLabels: n.some((s) => s.dataLabels.showDataLabels),
52
52
  highlights: d.highlights.length,
53
53
  annotations: S(l)
54
54
  }
55
55
  };
56
56
  }
57
- function v(e, n, t) {
57
+ function A(e, n, t) {
58
58
  if (!e) return;
59
59
  const i = m(e);
60
60
  if (n.ok) {
@@ -99,8 +99,8 @@ var c = (e) => e.map((n) => n.code), f = (e) => [...new Set(e)], S = (e) => ({
99
99
  });
100
100
  export {
101
101
  p as PACKAGE_VERSION,
102
- A as createTelemetryEmitter,
102
+ v as createTelemetryEmitter,
103
103
  y as deriveChartShape,
104
104
  w as emitCommandApplied,
105
- v as emitCompileEvents
105
+ A as emitCompileEvents
106
106
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "chart",
12
12
  "events"
13
13
  ],
14
- "version": "1.9.0-beta.1792505847409",
14
+ "version": "1.9.0-beta.1792510459918",
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.1792505847409"
32
+ "@graphysdk/viz-engine": "^1.9.0-beta.1792510459918"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@rollup/plugin-replace": "^6.0.3",
@@ -38,11 +38,11 @@
38
38
  "vite": "^8.1.5",
39
39
  "vite-plugin-dts": "^4.5.4",
40
40
  "vitest": "^4.1.11",
41
- "@graphysdk/viz-engine": "1.9.0-beta.1792505847409",
42
- "@graphytools/eslint-config": "0.0.1",
41
+ "@graphysdk/viz-engine": "1.9.0-beta.1792510459918",
43
42
  "@graphytools/eslint-plugin-graphy": "1.0.0",
44
43
  "@graphytools/typescript-config": "0.0.1",
45
- "@graphytools/vitest-config": "1.0.0"
44
+ "@graphytools/vitest-config": "1.0.0",
45
+ "@graphytools/eslint-config": "0.0.1"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"