@graphysdk/telemetry 2.0.0-beta.1786389736654 → 2.0.0-beta.1786440210947

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="2.0.0-beta.1786389736654",u=0;function y(e={}){f();const{chartInstanceId:t=b(),engineVersion:s=m,enabled:i=!0}=e,r=new Set;return{chartInstanceId:t,engineVersion:s,emit:a=>{if(!i||r.size===0)return;const o=[...r];for(const n of o)try{n(a)}catch{}},subscribe:a=>{r.add(a);let o=!1;const n=()=>{o||(o=!0,r.delete(a))};return{get closed(){return o},unsubscribe:n,[Symbol.dispose]:n}}}}var b=()=>`${Math.random().toString(36).slice(2,6)}${(u+=1).toString(36)}`,f=()=>{Symbol.dispose??=Symbol.for("Symbol.dispose")};function p(e){const{layers:t,coordSystem:s,scales:i,guides:r,annotations:l,spec:d}=e,a=r.colorGroups.length>0?r.colorGroups.length:null,o=t.reduce((n,g)=>n+g.data.size(),0);return{layerCount:t.length,geoms:t.map(n=>n.geom),positions:v(t.map(n=>n.position)),coordSystem:s.type,...s.type==="cartesian"?{mainAxis:s.mainAxis}:{},scaleAesthetics:Object.keys(i),seriesCount:a,observationCount:o,hasSecondaryAxis:t.some(n=>n.yScaleType==="secondary"),features:{headline:r.headline!==null,legend:r.legends.drawn.length>0,visibleAxes:r.axes.filter(n=>n.isVisible).length,dataLabels:t.some(n=>n.dataLabels.showDataLabels),highlights:d.highlights.length,annotations:C(l)}}}function S(e,t,s){if(!e)return;const i=h(e);if(t.ok){e.emit({...i,type:"chart.compiled",trigger:s,chart:p(t.compiled),warningCodes:c(t.warnings)});return}e.emit({...i,type:"chart.compile_failed",trigger:s,errorCodes:c(t.errors),warningCodes:c(t.warnings)})}function A(e,t,s){e&&e.emit({...h(e),type:"command.applied",commandType:t.type,transient:s})}var c=e=>e.map(t=>t.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}),h=e=>({timestamp:Date.now(),engineVersion:e.engineVersion,chartInstanceId:e.chartInstanceId});exports.PACKAGE_VERSION=m;exports.createTelemetryEmitter=y;exports.deriveChartShape=p;exports.emitCommandApplied=A;exports.emitCompileEvents=S;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var m="2.0.0-beta.1786440210947",u=0;function y(e={}){f();const{chartInstanceId:t=b(),engineVersion:s=m,enabled:i=!0}=e,r=new Set;return{chartInstanceId:t,engineVersion:s,emit:a=>{if(!i||r.size===0)return;const o=[...r];for(const n of o)try{n(a)}catch{}},subscribe:a=>{r.add(a);let o=!1;const n=()=>{o||(o=!0,r.delete(a))};return{get closed(){return o},unsubscribe:n,[Symbol.dispose]:n}}}}var b=()=>`${Math.random().toString(36).slice(2,6)}${(u+=1).toString(36)}`,f=()=>{Symbol.dispose??=Symbol.for("Symbol.dispose")};function p(e){const{layers:t,coordSystem:s,scales:i,guides:r,annotations:l,spec:d}=e,a=r.colorGroups.length>0?r.colorGroups.length:null,o=t.reduce((n,g)=>n+g.data.size(),0);return{layerCount:t.length,geoms:t.map(n=>n.geom),positions:v(t.map(n=>n.position)),coordSystem:s.type,...s.type==="cartesian"?{mainAxis:s.mainAxis}:{},scaleAesthetics:Object.keys(i),seriesCount:a,observationCount:o,hasSecondaryAxis:t.some(n=>n.yScaleType==="secondary"),features:{headline:r.headline!==null,legend:r.legends.drawn.length>0,visibleAxes:r.axes.filter(n=>n.isVisible).length,dataLabels:t.some(n=>n.dataLabels.showDataLabels),highlights:d.highlights.length,annotations:C(l)}}}function S(e,t,s){if(!e)return;const i=h(e);if(t.ok){e.emit({...i,type:"chart.compiled",trigger:s,chart:p(t.compiled),warningCodes:c(t.warnings)});return}e.emit({...i,type:"chart.compile_failed",trigger:s,errorCodes:c(t.errors),warningCodes:c(t.warnings)})}function A(e,t,s){e&&e.emit({...h(e),type:"command.applied",commandType:t.type,transient:s})}var c=e=>e.map(t=>t.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}),h=e=>({timestamp:Date.now(),engineVersion:e.engineVersion,chartInstanceId:e.chartInstanceId});exports.PACKAGE_VERSION=m;exports.createTelemetryEmitter=y;exports.deriveChartShape=p;exports.emitCommandApplied=A;exports.emitCompileEvents=S;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var p = "2.0.0-beta.1786389736654", g = 0;
1
+ var p = "2.0.0-beta.1786440210947", 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();
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "chart",
12
12
  "events"
13
13
  ],
14
- "version": "2.0.0-beta.1786389736654",
14
+ "version": "2.0.0-beta.1786440210947",
15
15
  "type": "module",
16
16
  "sideEffects": false,
17
17
  "types": "./dist/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  }
29
29
  },
30
30
  "peerDependencies": {
31
- "@graphysdk/viz-engine": "2.0.0-beta.1786389736654"
31
+ "@graphysdk/viz-engine": "2.0.0-beta.1786440210947"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@rollup/plugin-replace": "^6.0.3",
@@ -37,7 +37,7 @@
37
37
  "vite": "^8.1.5",
38
38
  "vite-plugin-dts": "^4.5.4",
39
39
  "vitest": "^4.1.0",
40
- "@graphysdk/viz-engine": "2.0.0-beta.1786389736654",
40
+ "@graphysdk/viz-engine": "2.0.0-beta.1786440210947",
41
41
  "@graphytools/eslint-config": "0.0.1",
42
42
  "@graphytools/eslint-plugin-graphy": "1.0.0",
43
43
  "@graphytools/typescript-config": "0.0.1",