@datalayer/design 1.0.10 → 1.0.12

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.
@@ -0,0 +1,82 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2026 Datalayer, Inc.
4
+ *
5
+ * CC BY 4.0 License
6
+ */
7
+ /**
8
+ * Poppy 1.0: the card of the outbound that says Datalayer's SDK speaks
9
+ * version 1.0 of Poppy, the Personal Agent Protocol (the user, 19 November
10
+ * 2026).
11
+ *
12
+ * 1200×630, the Open Graph size, so LinkedIn, X, Bluesky and the blog draw
13
+ * it large and uncropped.
14
+ *
15
+ * The Datalayer square logo, with a red poppy grown over its corner. The red
16
+ * poppy is the remembrance flower of the First World War, from the fields of
17
+ * Flanders, in Belgium, where poppies came up over the churned earth and
18
+ * where John McCrae wrote "In Flanders Fields". The SDK is built in Belgium:
19
+ * the protocol's nickname and the place meet in one flower.
20
+ *
21
+ * Text is set in a system stack and the logo is drawn from rectangles, so
22
+ * the card rasterises the same wherever it is exported.
23
+ */
24
+ import { useId } from 'react';
25
+ import { DatalayerLogo, getColorPalette, getLogoColors, useThemeStore, } from '@datalayer/primer-addons';
26
+ const WIDTH = 1200;
27
+ const HEIGHT = 630;
28
+ /* The square logo, on the left third. */
29
+ const LOGO_X = 110;
30
+ const LOGO_Y = 170;
31
+ const LOGO_SIZE = 290;
32
+ /* The poppy's head sits over the logo's top-right corner. */
33
+ const FLOWER_X = LOGO_X + LOGO_SIZE + 4;
34
+ const FLOWER_Y = LOGO_Y - 14;
35
+ const PETAL = 108;
36
+ /* The text column. */
37
+ const TEXT_X = 578;
38
+ const FONT = "system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif";
39
+ /* Poppy reds, fixed: the flower is the subject and must stay red in every theme. */
40
+ const RED_DEEP = '#7d0a14';
41
+ const RED = '#c8102e';
42
+ const RED_BRIGHT = '#e8343a';
43
+ const STEM = '#3f6b2a';
44
+ const STEM_LIGHT = '#6f9a3c';
45
+ const HEART = '#16110f';
46
+ /** One petal, pointing up from the flower's centre: a broad fan, length `r`. */
47
+ const petalPath = (r) => [
48
+ 'M0,0',
49
+ `C${-r * 0.62},${-r * 0.12} ${-r * 0.86},${-r * 0.82} ${-r * 0.26},${-r * 0.99}`,
50
+ `C${-r * 0.08},${-r * 1.05} ${r * 0.08},${-r * 1.02} ${r * 0.22},${-r * 0.98}`,
51
+ `C${r * 0.84},${-r * 0.84} ${r * 0.6},${-r * 0.1} 0,0`,
52
+ 'Z',
53
+ ].join(' ');
54
+ /** The faint creases a poppy petal carries, fanning from the heart. */
55
+ const creasePaths = (r) => [-0.42, -0.18, 0.06, 0.3].map((t) => `M0,${-r * 0.18} Q${r * t * 0.6},${-r * 0.55} ${r * t},${-r * 0.88}`);
56
+ export function SvgPoppy1_0({ title = 'Poppy 1.0', subtitle = 'Our open-source SDK speaks it.', palette: paletteProp, variant, colorMode: colorModeProp, } = {}) {
57
+ const stored = useThemeStore();
58
+ const theme = variant ?? stored.theme;
59
+ const colorMode = colorModeProp ?? stored.colorMode;
60
+ const effectiveColorMode = colorMode === 'auto'
61
+ ? (typeof window !== 'undefined' && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light')
62
+ : colorMode;
63
+ const logoColors = getLogoColors(theme, effectiveColorMode);
64
+ const p = paletteProp ?? getColorPalette(theme, effectiveColorMode);
65
+ const uid = useId().replace(/:/g, '');
66
+ const id = (name) => `poppy10-${uid}-${name}`;
67
+ /* Four petals, two behind and two in front, the flower turned a little. */
68
+ const petals = [
69
+ { angle: -62, scale: 1.04, fill: `url(#${id('petal-back')})` },
70
+ { angle: 118, scale: 0.96, fill: `url(#${id('petal-back')})` },
71
+ { angle: 22, scale: 1.0, fill: `url(#${id('petal-front')})` },
72
+ { angle: 202, scale: 0.92, fill: `url(#${id('petal-front')})` },
73
+ ];
74
+ /* The stamens, a ring of dark dots around the seed head. */
75
+ const stamens = Array.from({ length: 22 }, (_, i) => {
76
+ const a = (i / 22) * Math.PI * 2;
77
+ const r = 25 + (i % 3) * 4;
78
+ return { x: Math.cos(a) * r, y: Math.sin(a) * r, s: 3.2 - (i % 3) * 0.6 };
79
+ });
80
+ return (_jsxs("svg", { viewBox: `0 0 ${WIDTH} ${HEIGHT}`, xmlns: "http://www.w3.org/2000/svg", style: { width: '100%', height: 'auto', display: 'block' }, role: "img", "aria-label": `Datalayer — ${title}. ${subtitle} Built in Belgium.`, children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: id('bg'), x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [_jsx("stop", { offset: "0%", stopColor: p.bg }), _jsx("stop", { offset: "100%", stopColor: p.bgAlt })] }), _jsxs("radialGradient", { id: id('halo'), cx: FLOWER_X / WIDTH, cy: FLOWER_Y / HEIGHT, r: "0.55", children: [_jsx("stop", { offset: "0%", stopColor: RED, stopOpacity: p.isLight ? '0.16' : '0.26' }), _jsx("stop", { offset: "100%", stopColor: RED, stopOpacity: "0" })] }), _jsx("pattern", { id: id('dots'), width: "40", height: "40", patternUnits: "userSpaceOnUse", children: _jsx("circle", { cx: "20", cy: "20", r: "1", fill: p.primary, opacity: p.isLight ? '0.14' : '0.10' }) }), _jsxs("radialGradient", { id: id('petal-back'), cx: "0", cy: "0", r: PETAL, gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { offset: "0%", stopColor: RED_DEEP }), _jsx("stop", { offset: "55%", stopColor: RED }), _jsx("stop", { offset: "100%", stopColor: "#a50d22" })] }), _jsxs("radialGradient", { id: id('petal-front'), cx: "0", cy: "0", r: PETAL, gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { offset: "0%", stopColor: RED_DEEP }), _jsx("stop", { offset: "40%", stopColor: RED }), _jsx("stop", { offset: "100%", stopColor: RED_BRIGHT })] }), _jsxs("linearGradient", { id: id('stem'), x1: "0", y1: "0", x2: "1", y2: "0", children: [_jsx("stop", { offset: "0%", stopColor: STEM }), _jsx("stop", { offset: "100%", stopColor: STEM_LIGHT })] }), _jsx("filter", { id: id('shadow'), x: "-30%", y: "-30%", width: "160%", height: "160%", children: _jsx("feDropShadow", { dx: "0", dy: "6", stdDeviation: "8", floodColor: "#000", floodOpacity: p.isLight ? '0.18' : '0.4' }) })] }), _jsx("rect", { width: WIDTH, height: HEIGHT, fill: `url(#${id('bg')})` }), _jsx("rect", { width: WIDTH, height: HEIGHT, fill: `url(#${id('dots')})` }), _jsx("rect", { width: WIDTH, height: HEIGHT, fill: `url(#${id('halo')})` }), _jsx("path", { d: `M0,${HEIGHT - 34} C120,${HEIGHT - 50} 220,${HEIGHT - 24} 340,${HEIGHT - 40} S560,${HEIGHT - 22} 700,${HEIGHT - 38} S960,${HEIGHT - 26} ${WIDTH},${HEIGHT - 44} L${WIDTH},${HEIGHT} L0,${HEIGHT} Z`, fill: p.textMuted, opacity: p.isLight ? 0.1 : 0.14 }), _jsx(DatalayerLogo, { x: LOGO_X, y: LOGO_Y, size: LOGO_SIZE, variant: theme, colorMode: effectiveColorMode, primaryColor: logoColors.primary, secondaryColor: logoColors.secondary }), _jsx("path", { d: `M${FLOWER_X + 70},${HEIGHT - 30} C${FLOWER_X + 92},${HEIGHT - 170} ${FLOWER_X + 30},${FLOWER_Y + 240} ${FLOWER_X + 6},${FLOWER_Y + 30}`, stroke: `url(#${id('stem')})`, strokeWidth: "9", strokeLinecap: "round", fill: "none" }), _jsx("path", { d: `M${FLOWER_X + 74},${HEIGHT - 120} c26,-18 40,-30 62,-34 c-10,10 -8,16 4,18 c-14,8 -18,14 -10,20 c-18,2 -26,6 -26,14 c-12,-8 -22,-12 -30,-18 Z`, fill: STEM, opacity: "0.92" }), _jsx("path", { d: `M${FLOWER_X + 82},${HEIGHT - 70} C${FLOWER_X + 120},${HEIGHT - 150} ${FLOWER_X + 150},${HEIGHT - 200} ${FLOWER_X + 136},${HEIGHT - 236}`, stroke: `url(#${id('stem')})`, strokeWidth: "5", strokeLinecap: "round", fill: "none" }), _jsx("ellipse", { cx: FLOWER_X + 136, cy: HEIGHT - 252, rx: "13", ry: "20", transform: `rotate(24 ${FLOWER_X + 136} ${HEIGHT - 252})`, fill: STEM_LIGHT }), _jsx("path", { d: `M${FLOWER_X + 131},${HEIGHT - 270} q8,-6 14,2`, stroke: RED, strokeWidth: "4", strokeLinecap: "round", fill: "none" }), _jsxs("g", { transform: `translate(${FLOWER_X} ${FLOWER_Y}) rotate(-12)`, filter: `url(#${id('shadow')})`, children: [petals.map(({ angle, scale, fill }) => (_jsxs("g", { transform: `rotate(${angle}) scale(${scale})`, children: [_jsx("path", { d: petalPath(PETAL), fill: fill }), creasePaths(PETAL).map((d) => (_jsx("path", { d: d, stroke: RED_DEEP, strokeWidth: "1.4", opacity: "0.28", fill: "none" }, d)))] }, angle))), _jsx("circle", { r: "30", fill: HEART, opacity: "0.92" }), stamens.map(({ x, y, s }, i) => (_jsx("circle", { cx: x, cy: y, r: s, fill: HEART }, i))), _jsx("circle", { r: "15", fill: "#4c5a2c" }), Array.from({ length: 8 }, (_, i) => (_jsx("line", { x1: "0", y1: "0", x2: Math.cos((i / 8) * Math.PI * 2) * 13, y2: Math.sin((i / 8) * Math.PI * 2) * 13, stroke: HEART, strokeWidth: "2", strokeLinecap: "round" }, i)))] }), _jsx("text", { x: TEXT_X, y: "250", fill: p.textMuted, fontSize: "26", fontWeight: "600", letterSpacing: "3", fontFamily: FONT, children: "PERSONAL AGENT PROTOCOL" }), _jsx("text", { x: TEXT_X - 4, y: "352", fill: p.textLight, fontSize: "100", fontWeight: "800", letterSpacing: "-2", fontFamily: FONT, children: title }), _jsx("text", { x: TEXT_X, y: "408", fill: p.textLight, fontSize: "32", fontWeight: "600", fontFamily: FONT, children: subtitle }), _jsx("text", { x: TEXT_X, y: "454", fill: p.textMuted, fontSize: "27", fontWeight: "500", fontFamily: FONT, children: "Python \u00B7 TypeScript \u00B7 built in Belgium" }), _jsx("text", { x: TEXT_X, y: "540", fill: p.textMuted, fontSize: "22", fontStyle: "italic", opacity: "0.85", fontFamily: "Georgia, 'Times New Roman', serif", children: "In Flanders fields the poppies blow" })] }));
81
+ }
82
+ export default SvgPoppy1_0;
@@ -1,2 +1,2 @@
1
- export declare const DATALAYER_SVG_GALLERY: readonly ["SvgJupyterEmbed", "SvgAgentRuntimes", "SvgVSCodeExtension", "SvgBlogHero", "SvgPricingHero", "SvgContactHero", "SvgAgentsHomeHero", "SvgLoginHero", "SvgUsecasesHero", "SvgIntegrationsHero", "SvgPartnersHero", "SvgChangelogHero", "SvgAboutHero", "SvgCareersHero", "SvgCommunityHero", "SvgJoin", "SvgJoinConfirm", "SvgInvites", "SvgDiscord", "SvgTutorialsHero", "SvgResearchHero", "SvgEvalsHero", "SvgEventsHero", "SvgStarsHero", "SvgSpitfire", "SvgBlackSnake", "SvgLinesLogo", "SvgOrganizationsAtScale", "SvgIndividualsAndTeams", "SvgAgentsHero", "SvgLibraryHero", "SvgEarthHero", "SvgOg", "SvgOgStacked", "SvgLightHouse", "SvgDaytonaStartupGrid", "SvgFastA2ADonation", "SvgJupyterMcp", "SvgJupyterMcp2", "SvgOSAContributions", "SvgRadar", "SvgNotebookArtifact", "SvgDocumentArtifact", "SvgDeckArtifact", "SvgCellArtifact", "SvgCellOutputshotPlaceholder", "SvgLessonArtifact", "SvgExerciseArtifact", "SvgAssignmentArtifact", "SvgDataset", "SvgLines", "SvgPublication", "SvgPixel1", "SvgPixel2", "SvgSkubble", "SvgEricCharles", "SvgPrivacyHero", "SvgTermsHero", "SvgNotFound", "SvgUnauthorized", "SvgAI", "SvgAI2", "SvgAI3", "SvgDI", "SvgDla"];
1
+ export declare const DATALAYER_SVG_GALLERY: readonly ["SvgJupyterEmbed", "SvgAgentRuntimes", "SvgVSCodeExtension", "SvgBlogHero", "SvgPricingHero", "SvgContactHero", "SvgAgentsHomeHero", "SvgLoginHero", "SvgUsecasesHero", "SvgIntegrationsHero", "SvgPartnersHero", "SvgChangelogHero", "SvgAboutHero", "SvgCareersHero", "SvgCommunityHero", "SvgJoin", "SvgJoinConfirm", "SvgInvites", "SvgDiscord", "SvgTutorialsHero", "SvgResearchHero", "SvgEvalsHero", "SvgEventsHero", "SvgStarsHero", "SvgSpitfire", "SvgBlackSnake", "SvgKingKong", "SvgKingKong2", "SvgLinesLogo", "SvgOrganizationsAtScale", "SvgIndividualsAndTeams", "SvgAgentsHero", "SvgHorizonHero", "SvgLibraryHero", "SvgEarthHero", "SvgOg", "SvgPoppy1_0", "SvgOgStacked", "SvgLightHouse", "SvgDaytonaStartupGrid", "SvgFastA2ADonation", "SvgJupyterMcp", "SvgJupyterMcp2", "SvgOSAContributions", "SvgRadar", "SvgNotebookArtifact", "SvgDocumentArtifact", "SvgDeckArtifact", "SvgCellArtifact", "SvgCellOutputshotPlaceholder", "SvgLessonArtifact", "SvgExerciseArtifact", "SvgAssignmentArtifact", "SvgDataset", "SvgLines", "SvgPublication", "SvgPixel1", "SvgPixel2", "SvgSkubble", "SvgEricCharles", "SvgPrivacyHero", "SvgTermsHero", "SvgNotFound", "SvgUnauthorized", "SvgAI", "SvgAI2", "SvgAI3", "SvgDI", "SvgDla"];
2
2
  export type DatalayerSvgGalleryName = (typeof DATALAYER_SVG_GALLERY)[number];
@@ -30,13 +30,17 @@ export const DATALAYER_SVG_GALLERY = [
30
30
  'SvgStarsHero',
31
31
  'SvgSpitfire',
32
32
  'SvgBlackSnake',
33
+ 'SvgKingKong',
34
+ 'SvgKingKong2',
33
35
  'SvgLinesLogo',
34
36
  'SvgOrganizationsAtScale',
35
37
  'SvgIndividualsAndTeams',
36
38
  'SvgAgentsHero',
39
+ 'SvgHorizonHero',
37
40
  'SvgLibraryHero',
38
41
  'SvgEarthHero',
39
42
  'SvgOg',
43
+ 'SvgPoppy1_0',
40
44
  'SvgOgStacked',
41
45
  'SvgLightHouse',
42
46
  'SvgDaytonaStartupGrid',