@lightdash/query-sdk 0.3487.0 → 1.0.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.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.0";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by scripts/generateSdkVersion.mjs (prebuild) — do not edit.
|
|
2
|
-
export const SDK_VERSION = '0.
|
|
2
|
+
export const SDK_VERSION = '1.0.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
|
-
|
|
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
|
}
|