@lightdash/query-sdk 0.3487.0 → 1.1.0

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.
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.3487.0";
1
+ export declare const SDK_VERSION = "1.1.0";
@@ -1,2 +1,2 @@
1
1
  // Generated by scripts/generateSdkVersion.mjs (prebuild) — do not edit.
2
- export const SDK_VERSION = '0.3487.0';
2
+ export const SDK_VERSION = '1.1.0';
package/dist/lineage.d.ts CHANGED
@@ -17,6 +17,10 @@ export type LineageSelectedMessage = {
17
17
  };
18
18
  export type LineageAvailableMessage = {
19
19
  type: 'lightdash:lineage:available';
20
+ /** Number of stamped elements at announce time. Always ≥ 1 — the parent
21
+ * treats announces without it as legacy SDKs that announced with zero
22
+ * stamps, and keeps the Inspect-data toggle disabled. */
23
+ stampCount: number;
20
24
  };
21
25
  /** queryUuid of the nearest stamped ancestor of `el`, or null. */
22
26
  export declare function resolveLineageTarget(el: Element | null): string | null;
package/dist/lineage.js CHANGED
@@ -49,11 +49,13 @@ let stampObserver = null;
49
49
  function announceIfStamped() {
50
50
  if (availabilityAnnounced)
51
51
  return true;
52
- if (!document.querySelector('[data-ld-query]'))
52
+ const stampCount = document.querySelectorAll('[data-ld-query]').length;
53
+ if (stampCount === 0)
53
54
  return false;
54
55
  availabilityAnnounced = true;
55
56
  parentWindow?.postMessage({
56
57
  type: 'lightdash:lineage:available',
58
+ stampCount,
57
59
  }, '*');
58
60
  return true;
59
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/query-sdk",
3
- "version": "0.3487.0",
3
+ "version": "1.1.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "SDK for building custom data apps against the Lightdash semantic layer",
@@ -34,7 +34,8 @@
34
34
  "jsdom": "26.1.0",
35
35
  "typescript": "npm:@typescript/typescript6@6.0.1",
36
36
  "typescript-7": "npm:typescript@7.0.1-rc",
37
- "vitest": "4.1.6"
37
+ "vitest": "4.1.6",
38
+ "@lightdash/common": "1.1.0"
38
39
  },
39
40
  "scripts": {
40
41
  "prebuild": "node ./scripts/generateSdkVersion.mjs",