@manta-eu/horns-kit 0.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.
- package/LICENSE +21 -0
- package/dist/catalog/manta-react.json +914 -0
- package/dist/catalog.d.ts +21 -0
- package/dist/catalog.js +7 -0
- package/dist/embed/client.d.ts +15 -0
- package/dist/embed/client.js +45 -0
- package/dist/embed/horn-snapshot-view.d.ts +64 -0
- package/dist/embed/horn-snapshot-view.js +142 -0
- package/dist/embed/plan-strip.d.ts +49 -0
- package/dist/embed/plan-strip.js +141 -0
- package/dist/embed/server.d.ts +10 -0
- package/dist/embed/server.js +17 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +5 -0
- package/dist/look/chrome.d.ts +11 -0
- package/dist/look/chrome.js +7 -0
- package/dist/look/format.d.ts +15 -0
- package/dist/look/format.js +44 -0
- package/dist/look/index.d.ts +4 -0
- package/dist/look/index.js +5 -0
- package/dist/look/palette.d.ts +21 -0
- package/dist/look/palette.js +46 -0
- package/dist/look/types.d.ts +7 -0
- package/dist/look/types.js +1 -0
- package/dist/shape-views/attio.json +21 -0
- package/dist/shape-views/coresignal.json +28 -0
- package/dist/shape-views/generated.json +3535 -0
- package/dist/shape-views/google.json +22 -0
- package/dist/shape-views/index.d.ts +2 -0
- package/dist/shape-views/index.js +13 -0
- package/dist/shape-views/linkedin.json +23 -0
- package/dist/shape-views/meta.json +19 -0
- package/dist/shape-views/slack.json +12 -0
- package/dist/written/index.d.ts +2 -0
- package/dist/written/index.js +4 -0
- package/dist/written/runtime.d.ts +43 -0
- package/dist/written/runtime.js +83 -0
- package/dist/written/written-view.d.ts +23 -0
- package/dist/written/written-view.js +47 -0
- package/package.json +72 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { HornAccent, HornStyle } from "@manta-eu/horns";
|
|
2
|
+
import type { ChartTheme } from "./types.ts";
|
|
3
|
+
export type ChartPalette = {
|
|
4
|
+
surface: string;
|
|
5
|
+
ink: string;
|
|
6
|
+
secondary: string;
|
|
7
|
+
muted: string;
|
|
8
|
+
grid: string;
|
|
9
|
+
baseline: string;
|
|
10
|
+
tooltipSurface: string;
|
|
11
|
+
tooltipInk: string;
|
|
12
|
+
other: string;
|
|
13
|
+
/** A value on the wrong side of a threshold, and the line it crossed. Not a series slot, so no accent moves it. */
|
|
14
|
+
alert: string;
|
|
15
|
+
series: readonly string[];
|
|
16
|
+
};
|
|
17
|
+
export declare const chartPalettes: Record<ChartTheme, ChartPalette>;
|
|
18
|
+
export declare function seriesColor(palette: ChartPalette, index: number): string;
|
|
19
|
+
export declare function accentPalette(palette: ChartPalette, accent: HornAccent | undefined): ChartPalette;
|
|
20
|
+
/** The colours a Horn's views draw with: the theme's, with the Horn's own accent leading. */
|
|
21
|
+
export declare function chartPalette(theme: ChartTheme, style?: HornStyle): ChartPalette;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { hornAccents } from "@manta-eu/horns";
|
|
2
|
+
// Concrete hex rather than CSS variables: captured PNGs and email clients never see the host stylesheet.
|
|
3
|
+
// Categorical slots keep their validated order; dark mode is the same hues stepped for the dark surface.
|
|
4
|
+
export const chartPalettes = {
|
|
5
|
+
light: {
|
|
6
|
+
surface: "#fcfcfb",
|
|
7
|
+
ink: "#0b0b0b",
|
|
8
|
+
secondary: "#52514e",
|
|
9
|
+
muted: "#898781",
|
|
10
|
+
grid: "#e1e0d9",
|
|
11
|
+
baseline: "#c3c2b7",
|
|
12
|
+
tooltipSurface: "#0b0b0b",
|
|
13
|
+
tooltipInk: "#ffffff",
|
|
14
|
+
other: "#898781",
|
|
15
|
+
alert: "#e34948",
|
|
16
|
+
series: ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#008300", "#4a3aa7", "#e34948"],
|
|
17
|
+
},
|
|
18
|
+
dark: {
|
|
19
|
+
surface: "#1a1a19",
|
|
20
|
+
ink: "#ffffff",
|
|
21
|
+
secondary: "#c3c2b7",
|
|
22
|
+
muted: "#898781",
|
|
23
|
+
grid: "#2c2c2a",
|
|
24
|
+
baseline: "#383835",
|
|
25
|
+
tooltipSurface: "#ffffff",
|
|
26
|
+
tooltipInk: "#0b0b0b",
|
|
27
|
+
other: "#898781",
|
|
28
|
+
alert: "#e66767",
|
|
29
|
+
series: ["#3987e5", "#d95926", "#199e70", "#c98500", "#d55181", "#008300", "#9085e9", "#e66767"],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
export function seriesColor(palette, index) {
|
|
33
|
+
return palette.series[index] ?? palette.other;
|
|
34
|
+
}
|
|
35
|
+
// A Horn's accent is a slot, not a colour: rotating the categorical list keeps every hue the validated one
|
|
36
|
+
// and makes the accent lead, so the first series and the metric value take it in either theme.
|
|
37
|
+
export function accentPalette(palette, accent) {
|
|
38
|
+
const at = accent === undefined ? -1 : hornAccents.indexOf(accent);
|
|
39
|
+
if (at <= 0)
|
|
40
|
+
return palette;
|
|
41
|
+
return { ...palette, series: [...palette.series.slice(at), ...palette.series.slice(0, at)] };
|
|
42
|
+
}
|
|
43
|
+
/** The colours a Horn's views draw with: the theme's, with the Horn's own accent leading. */
|
|
44
|
+
export function chartPalette(theme, style) {
|
|
45
|
+
return accentPalette(chartPalettes[theme], style?.accent);
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"schema": "AttioCompanySchema",
|
|
4
|
+
"classCurie": "attio:Company",
|
|
5
|
+
"status": "curated",
|
|
6
|
+
"fields": [
|
|
7
|
+
{ "name": "name", "path": "attio:name", "type": "string" },
|
|
8
|
+
{ "name": "categories", "path": "attio:categories", "type": "string" },
|
|
9
|
+
{ "name": "domains", "path": "attio:domains", "type": "string" },
|
|
10
|
+
{ "name": "employeeRange", "path": "attio:employeeRange", "type": "string" },
|
|
11
|
+
{ "name": "foundationDate", "path": "attio:foundationDate", "type": "date" },
|
|
12
|
+
{ "name": "description", "path": "attio:description", "type": "string" }
|
|
13
|
+
],
|
|
14
|
+
"record": {
|
|
15
|
+
"type": "record",
|
|
16
|
+
"title": "name",
|
|
17
|
+
"subtitle": "categories",
|
|
18
|
+
"fields": ["domains", "employeeRange", "foundationDate", "description"]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"schema": "CoresignalCompanySchema",
|
|
4
|
+
"classCurie": "coresignal:Company",
|
|
5
|
+
"status": "drafted",
|
|
6
|
+
"fields": [
|
|
7
|
+
{ "name": "name", "path": "schema:name", "type": "string" },
|
|
8
|
+
{ "name": "industry", "path": "schema:industry", "type": "string" },
|
|
9
|
+
{ "name": "url", "path": "schema:url", "type": "iri" },
|
|
10
|
+
{ "name": "hqCity", "path": "coresignal:hqCity", "type": "string" },
|
|
11
|
+
{ "name": "hqCountry", "path": "coresignal:hqCountry", "type": "string" },
|
|
12
|
+
{ "name": "numberOfEmployees", "path": "schema:numberOfEmployees", "type": "number" },
|
|
13
|
+
{ "name": "foundingDate", "path": "schema:foundingDate", "type": "date" },
|
|
14
|
+
{ "name": "sizeRange", "path": "coresignal:sizeRange", "type": "string" },
|
|
15
|
+
{ "name": "lastFundingRoundName", "path": "coresignal:lastFundingRoundName", "type": "string" },
|
|
16
|
+
{ "name": "websiteDomain", "path": "coresignal:websiteDomain", "type": "string" }
|
|
17
|
+
],
|
|
18
|
+
"record": {
|
|
19
|
+
"type": "record",
|
|
20
|
+
"title": "name",
|
|
21
|
+
"subtitle": "industry",
|
|
22
|
+
"link": "url",
|
|
23
|
+
"fields": ["hqCity", "hqCountry", "numberOfEmployees", "foundingDate", "lastFundingRoundName", "websiteDomain"],
|
|
24
|
+
"badges": ["sizeRange"],
|
|
25
|
+
"format": "integer"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
]
|