@graphysdk/telemetry 2.0.0-beta.1787130761469 → 2.0.0-beta.1787253424098

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 CHANGED
@@ -32,3 +32,14 @@ subscription.unsubscribe();
32
32
  ## Docs
33
33
 
34
34
  - [Quickstart](https://docs.graphy.dev/sdk-next/quickstart)
35
+
36
+ In a React host, subscribe to a `GraphHandle` (`handle.subscribe()` + `handle.getCompiled()`) and
37
+ call `deriveChartShape` / `emitCompileEvents` from the listener.
38
+
39
+ ## Licence
40
+
41
+ This package is available under PolyForm Noncommercial, Small Business, or a 32-day Free Trial. Free Trial is local or internal evaluation only — it does not cover a public page. See [what you can do under the trial](https://docs.graphy.dev/licence/evaluation).
42
+
43
+ ## Support
44
+
45
+ Questions and community help: [Discord](https://discord.gg/yGmYCjkSr).
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var m="2.0.0-beta.1787130761469",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.1787253424098",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.1787130761469", g = 0;
1
+ var p = "2.0.0-beta.1787253424098", 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.1787130761469",
14
+ "version": "2.0.0-beta.1787253424098",
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": "2.0.0-beta.1787130761469"
32
+ "@graphysdk/viz-engine": "2.0.0-beta.1787253424098"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@rollup/plugin-replace": "^6.0.3",
@@ -38,12 +38,15 @@
38
38
  "vite": "^8.1.5",
39
39
  "vite-plugin-dts": "^4.5.4",
40
40
  "vitest": "^4.1.0",
41
- "@graphysdk/viz-engine": "2.0.0-beta.1787130761469",
41
+ "@graphysdk/viz-engine": "2.0.0-beta.1787253424098",
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",
45
45
  "@graphytools/vitest-config": "1.0.0"
46
46
  },
47
+ "publishConfig": {
48
+ "access": "public"
49
+ },
47
50
  "lint-staged": {
48
51
  "*.{ts,tsx,js,jsx,json,css,md}": [
49
52
  "prettier --write"