@gravitee/gamma-lib-observability 1.39.0 → 1.39.1-found-166.37aced5
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/INTEGRATION.md +21 -0
- package/dist/dashboards/renderers/doughnut-center-stat.d.ts.map +1 -1
- package/dist/dashboards/renderers/facet-value-format.d.ts +10 -0
- package/dist/dashboards/renderers/facet-value-format.d.ts.map +1 -1
- package/dist/index.js +1456 -1451
- package/dist/styles/observability.css +1 -1
- package/package.json +1 -1
package/INTEGRATION.md
CHANGED
|
@@ -68,6 +68,27 @@ import '@gravitee/gamma-lib-observability/styles';
|
|
|
68
68
|
|
|
69
69
|
This ships all required Tailwind utilities and graphene theme tokens. No additional Tailwind configuration is needed. The stylesheet is self-contained: it includes the utility classes used by the `@gravitee/graphene-charts` and `@gravitee/graphene-core` components this library renders, so you do **not** need to scan those packages in your own Tailwind config.
|
|
70
70
|
|
|
71
|
+
> **Declare the cascade layer (recommended).** The utility classes in this stylesheet live in
|
|
72
|
+
> a dedicated `observability` cascade layer. To make sure they never override your own styles,
|
|
73
|
+
> declare that layer **before any other stylesheet** in your host entry point:
|
|
74
|
+
>
|
|
75
|
+
> ```css
|
|
76
|
+
> /* layer-order.css — must be the first CSS the app loads */
|
|
77
|
+
> @layer observability;
|
|
78
|
+
> ```
|
|
79
|
+
>
|
|
80
|
+
> ```ts
|
|
81
|
+
> import './styles/layer-order.css'; // must stay first
|
|
82
|
+
> import '@gravitee/graphene-core/styles';
|
|
83
|
+
> ```
|
|
84
|
+
>
|
|
85
|
+
> Layer order is fixed by each layer's _first_ declaration, and a layer discovered later sorts
|
|
86
|
+
> after — meaning it wins. Declaring `observability` up front makes it the lowest-priority
|
|
87
|
+
> layer, so this library can never arbitrate a conflict against your own classes. Skipping
|
|
88
|
+
> this is safe but leaves the previous behaviour: because this stylesheet re-emits utilities
|
|
89
|
+
> your graphene build also ships (see the `@source` note above), its copy wins on load order,
|
|
90
|
+
> and an override you write on a graphene component may silently have no effect.
|
|
91
|
+
|
|
71
92
|
> **No global resets (preflight-free).** This stylesheet intentionally ships **without** Tailwind preflight (the `@layer base` global reset). It therefore only adds scoped utility classes and theme tokens — importing it never alters your host's base element styling (box-sizing, table borders, margins, etc.). Your host app is expected to provide its own base layer through its Tailwind setup or `@gravitee/graphene-core/styles`. Standalone consumers with no Tailwind base of their own can import `tailwindcss/preflight.css` (or graphene-core's styles) separately.
|
|
72
93
|
|
|
73
94
|
> **Fonts:** this stylesheet does **not** embed the DM Sans font (doing so would reference font files not shipped in the package). Load the font from the host via `@gravitee/graphene-core/fonts` (or your own `@fontsource/dm-sans` import):
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doughnut-center-stat.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/doughnut-center-stat.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"doughnut-center-stat.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/doughnut-center-stat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAkBzD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,SAAS;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,GACjC,kBAAkB,GAAG,SAAS,CAMhC"}
|
|
@@ -18,6 +18,16 @@ export declare function humanizeAnalyticsToken(token: string): string;
|
|
|
18
18
|
export declare function resolveFacetValueLabel(input: FacetValueLabelInput): string;
|
|
19
19
|
/** Sums facet bucket values to obtain the total used to compute each share %. */
|
|
20
20
|
export declare function computeFacetTotal(values: readonly number[]): number;
|
|
21
|
+
/**
|
|
22
|
+
* Formats a facet total for display in a confined spot (the doughnut center
|
|
23
|
+
* hole). `compactTick` alone is not enough: it is an axis tick formatter that
|
|
24
|
+
* only compacts from 1 000 upward and returns smaller values verbatim, so a
|
|
25
|
+
* fractional total would render with full float precision. Below 1 000 the
|
|
26
|
+
* total is capped at 2 decimals instead; a non-zero total that would round
|
|
27
|
+
* down to `0` (or `-0` for negatives) renders as `<0.01` / `>-0.01` so it
|
|
28
|
+
* does not read as no total at all.
|
|
29
|
+
*/
|
|
30
|
+
export declare function formatFacetTotal(total: number): string;
|
|
21
31
|
/**
|
|
22
32
|
* Builds a tooltip value formatter that appends each value's share of the facet
|
|
23
33
|
* total, e.g. `4 (44%)`. Falls back to the formatted value alone when the total
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facet-value-format.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/facet-value-format.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"facet-value-format.d.ts","sourceRoot":"","sources":["../../../src/dashboards/renderers/facet-value-format.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAO5D;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAK1E;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMtD;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,SAAS,CAU5F"}
|