@cloudgrid-io/ui 0.43.1 → 0.45.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.
Files changed (65) hide show
  1. package/dist/badge/css-live.d.ts +9 -5
  2. package/dist/badge/css-live.d.ts.map +1 -1
  3. package/dist/badge/css-live.js +12 -8
  4. package/dist/badge/css-live.js.map +1 -1
  5. package/dist/badge/css-watermark.d.ts +39 -0
  6. package/dist/badge/css-watermark.d.ts.map +1 -0
  7. package/dist/badge/css-watermark.js +153 -0
  8. package/dist/badge/css-watermark.js.map +1 -0
  9. package/dist/badge/live.d.ts +9 -1
  10. package/dist/badge/live.d.ts.map +1 -1
  11. package/dist/badge/live.js +4 -3
  12. package/dist/badge/live.js.map +1 -1
  13. package/dist/badge/marks.d.ts +8 -0
  14. package/dist/badge/marks.d.ts.map +1 -1
  15. package/dist/badge/marks.js +20 -0
  16. package/dist/badge/marks.js.map +1 -1
  17. package/dist/badge/onboard-marks.d.ts +8 -0
  18. package/dist/badge/onboard-marks.d.ts.map +1 -0
  19. package/dist/badge/onboard-marks.js +15 -0
  20. package/dist/badge/onboard-marks.js.map +1 -0
  21. package/dist/badge/onboard-widget.d.ts +86 -0
  22. package/dist/badge/onboard-widget.d.ts.map +1 -0
  23. package/dist/badge/onboard-widget.js +105 -0
  24. package/dist/badge/onboard-widget.js.map +1 -0
  25. package/dist/badge/palette.d.ts +8 -1
  26. package/dist/badge/palette.d.ts.map +1 -1
  27. package/dist/badge/palette.js +17 -1
  28. package/dist/badge/palette.js.map +1 -1
  29. package/dist/badge/watermark.d.ts +152 -0
  30. package/dist/badge/watermark.d.ts.map +1 -0
  31. package/dist/badge/watermark.js +215 -0
  32. package/dist/badge/watermark.js.map +1 -0
  33. package/dist/blocks/icons.d.ts +19 -1
  34. package/dist/blocks/icons.d.ts.map +1 -1
  35. package/dist/blocks/icons.js +19 -1
  36. package/dist/blocks/icons.js.map +1 -1
  37. package/dist/blocks/onboard-widget-content.d.ts +227 -0
  38. package/dist/blocks/onboard-widget-content.d.ts.map +1 -0
  39. package/dist/blocks/onboard-widget-content.js +237 -0
  40. package/dist/blocks/onboard-widget-content.js.map +1 -0
  41. package/dist/blocks/onboard-widget.d.ts +92 -0
  42. package/dist/blocks/onboard-widget.d.ts.map +1 -0
  43. package/dist/blocks/onboard-widget.js +92 -0
  44. package/dist/blocks/onboard-widget.js.map +1 -0
  45. package/dist/blocks/phosphor-marks.d.ts +12 -0
  46. package/dist/blocks/phosphor-marks.d.ts.map +1 -1
  47. package/dist/blocks/phosphor-marks.js +18 -0
  48. package/dist/blocks/phosphor-marks.js.map +1 -1
  49. package/dist/blocks/request-card.d.ts +117 -0
  50. package/dist/blocks/request-card.d.ts.map +1 -0
  51. package/dist/blocks/request-card.js +99 -0
  52. package/dist/blocks/request-card.js.map +1 -0
  53. package/dist/index.d.ts +3 -0
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +3 -0
  56. package/dist/index.js.map +1 -1
  57. package/dist/lib/cloudgrid-cn.d.ts +1 -1
  58. package/dist/lib/cloudgrid-cn.d.ts.map +1 -1
  59. package/dist/lib/cloudgrid-cn.js +2 -0
  60. package/dist/lib/cloudgrid-cn.js.map +1 -1
  61. package/dist/theme.css +5 -0
  62. package/dist/tokens/base.json +20 -0
  63. package/dist/tokens.css +17 -0
  64. package/dist/tokens.json +2 -0
  65. package/package.json +9 -1
@@ -0,0 +1,105 @@
1
+ /**
2
+ * THE ONBOARD WIDGET, FRAMEWORK-FREE (ui#422): the twin of #419's React
3
+ * `OnboardWidget` (Vlad's "Copy Fetch Widget", Figma 11984:30251), for the
4
+ * watermark overlay the badge draws in a closed shadow root on a customer's app.
5
+ *
6
+ * Same markup shape, same words, same slots, same timings: every one of them is
7
+ * read from `blocks/onboard-widget-content.ts`, the module the React block reads,
8
+ * so the two cannot drift. The marks are `tool-marks.tsx`'s own paths, generated
9
+ * into `onboard-marks.ts`; the colour Gemini star is the content module's art.
10
+ *
11
+ * ## The faces
12
+ *
13
+ * idle three 20px logo slots, the label, a 20px copy icon; hover (real
14
+ * hover only) washes violet, turns the icon solid Primary, and shows
15
+ * the tip after 300ms; keyboard focus shows the tip and the ring
16
+ * copied a green check and "Copied. Paste into your AI coding tool." laid
17
+ * over the content, so the width does not move
18
+ * blocked "Couldn't copy", and the tip open with the prompt in it, selectable
19
+ *
20
+ * The badge sets the face: it copies on `data-action="onboard_copy"` (the value
21
+ * is `data-value`), sets `data-face` to `copied` or `blocked`, back to `idle`
22
+ * after `ONBOARD_WIDGET_TIMING.copiedMs`, and says the matching line in the
23
+ * overlay's live region. A blocked face needs the prompt in the tip, so the badge
24
+ * re-renders the widget with `face: "blocked"` rather than flipping the attribute.
25
+ *
26
+ * ## The motion
27
+ *
28
+ * Each slot holds both marks; `data-set` on the slot says which one shows, and
29
+ * the stylesheet crossfades them over `fadeMs`. `wireOnboardWidget` runs the
30
+ * content module's `createLogoCycle` through `bindLogoCycle`: still on set A
31
+ * under reduced motion, paused while the tab is hidden. Its cleanup stops it;
32
+ * the badge calls it when the overlay closes.
33
+ */
34
+ import { GEMINI_COLOR_ART, ONBOARD_WIDGET_COPY, ONBOARD_WIDGET_SLOTS, bindLogoCycle, createLogoCycle, } from "../blocks/onboard-widget-content.js";
35
+ import { CHECK_BOLD, COPY, COPY_FILL } from "./marks.js";
36
+ import { ONBOARD_MARKS } from "./onboard-marks.js";
37
+ import { esc, glyph } from "./html.js";
38
+ /** The Gemini star in colour: the content module's base and three gradient layers. */
39
+ function geminiColour(id) {
40
+ const { viewBox, path, base, layers } = GEMINI_COLOR_ART;
41
+ return (`<svg viewBox="${viewBox}" aria-hidden="true"><path d="${path}" fill="#${base}"/>` +
42
+ layers.map((_, i) => `<path d="${path}" fill="url(#${id}${i})"/>`).join("") +
43
+ "<defs>" +
44
+ layers
45
+ .map((l, i) => `<linearGradient id="${id}${i}" gradientUnits="userSpaceOnUse" x1="${l.x1}" y1="${l.y1}" x2="${l.x2}" y2="${l.y2}">` +
46
+ `<stop stop-color="#${l.hex}"/><stop offset="${l.fadeAt}" stop-color="#${l.hex}" stop-opacity="0"/></linearGradient>`)
47
+ .join("") +
48
+ "</defs></svg>");
49
+ }
50
+ /** One vendor mark, as ToolLogo draws it: its brand hex where it survives, else currentColor. */
51
+ function vendorMark(name) {
52
+ const m = ONBOARD_MARKS[name];
53
+ if (!m)
54
+ return "";
55
+ const rule = m.evenodd ? ' fill-rule="evenodd" clip-rule="evenodd"' : "";
56
+ return `<svg viewBox="${m.viewBox}" fill="currentColor" aria-hidden="true"${m.hex ? ` style="color:#${m.hex}"` : ""}><path d="${m.path}"${rule}/></svg>`;
57
+ }
58
+ /** One 20px slot: set A over set B, the shown one at full opacity. */
59
+ function slot(index, set, tipId) {
60
+ const s = ONBOARD_WIDGET_SLOTS[index];
61
+ const face = (which) => {
62
+ const name = which === "a" ? s.a : s.b;
63
+ const art = which === "a" && s.aColour ? geminiColour(`${tipId}-g`) : vendorMark(name);
64
+ return `<span class="cgb-ow-mark" data-face-set="${which}" data-logo="${esc(name)}">${art}</span>`;
65
+ };
66
+ return `<span class="cgb-ow-slot" data-set="${set}">${face("a")}${face("b")}</span>`;
67
+ }
68
+ /**
69
+ * The onboard widget: one button that copies `value`, named by its label, with
70
+ * the tip as its description. Action `onboard_copy`, `data-value` = `value`.
71
+ */
72
+ export function onboardWidget({ value, block = false, face = "idle", set = "a", hover = false, tipId = "cgb-ow-tip" }) {
73
+ const tip = face === "blocked"
74
+ ? `<span class="cgb-ow-tip-line">${esc(ONBOARD_WIDGET_COPY.tip)}</span><code class="cgb-ow-prompt">${esc(value)}</code>`
75
+ : `<span class="cgb-ow-tip-line">${esc(ONBOARD_WIDGET_COPY.tip)}</span>`;
76
+ const result = face === "blocked"
77
+ ? `<span>${esc(ONBOARD_WIDGET_COPY.blocked)}</span>`
78
+ : `<span class="cgb-ow-check">${glyph(CHECK_BOLD)}</span><span>${esc(ONBOARD_WIDGET_COPY.copied)}</span>`;
79
+ return (`<span class="cgb-ow-wrap">` +
80
+ `<button class="cgb-ow"${block ? " data-block" : ""}${hover ? " data-hover" : ""} type="button" data-action="onboard_copy" data-value="${esc(value)}" data-face="${face}" aria-describedby="${esc(tipId)}">` +
81
+ `<span class="cgb-ow-default">` +
82
+ `<span class="cgb-ow-logos" aria-hidden="true">${ONBOARD_WIDGET_SLOTS.map((_, i) => slot(i, set, tipId)).join("")}</span>` +
83
+ `<span class="cgb-ow-label">${esc(ONBOARD_WIDGET_COPY.label)}</span>` +
84
+ `<span class="cgb-ow-icon" aria-hidden="true">${glyph(COPY, "cgb-ow-copy")}${glyph(COPY_FILL, "cgb-ow-copy-fill")}</span>` +
85
+ `</span>` +
86
+ `<span class="cgb-ow-result" aria-hidden="true">${result}</span>` +
87
+ `</button>` +
88
+ `<span class="cgb-ow-tip" id="${esc(tipId)}" role="tooltip">${tip}</span>` +
89
+ `</span>`);
90
+ }
91
+ /**
92
+ * Runs the logo cycle on a rendered widget: `root` is the button (or anything
93
+ * holding its `.cgb-ow-slot`s). Returns the cleanup, which stops the timer and
94
+ * removes both listeners; call it when the overlay closes.
95
+ */
96
+ export function wireOnboardWidget(root, { document, reducedMotion, timers }) {
97
+ const slots = Array.from(root.querySelectorAll(".cgb-ow-slot"));
98
+ const cycle = createLogoCycle({
99
+ slots: slots.length,
100
+ onChange: (sets) => sets.forEach((s, i) => slots[i]?.setAttribute("data-set", s)),
101
+ ...(timers ? { timers } : {}),
102
+ });
103
+ return bindLogoCycle(cycle, { document, reducedMotion });
104
+ }
105
+ //# sourceMappingURL=onboard-widget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onboard-widget.js","sourceRoot":"","sources":["../../src/badge/onboard-widget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,eAAe,GAEhB,MAAM,qCAAqC,CAAA;AAC5C,OA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AE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QACjF,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9B,CAAC,CAAA;IACF,OAAO,aAAa,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,CAAA;AAC1D,CAAC"}
@@ -1,7 +1,14 @@
1
1
  /** Every badge token as one declaration list, for the badge root's rule. */
2
- export declare const BADGE_TOKEN_DECLARATIONS = "--cg-primary:#5a47f0;--cg-primary-press:#4b39db;--cg-primary-tint:#eeecfe;--cg-secondary:#b6de68;--cg-secondary-press:#a6cf57;--cg-tertiary:#60e9f0;--cg-tertiary-press:#4dd8e0;--cg-accent:#0061f0;--cg-cyan-200:#dffbfc;--cg-lime-200:#eef7dc;--cg-surface-card:#ffffff;--cg-surface-raised:#f4f6f8;--cg-surface-control:#e3e3e3;--cg-surface-subtle:#f2f1f7;--cg-hover:rgba(34, 34, 34, 0.045);--cg-scrim:rgba(46, 30, 172, 0.46);--cg-text-primary:#222222;--cg-text-secondary:#595959;--cg-text-muted:#858585;--cg-text-muted-strong:#6a6a6a;--cg-text-placeholder:#acacac;--cg-text-accent:#5a47f0;--cg-text-on-primary:#ffffff;--cg-text-on-accent:#222222;--cg-border-hairline:#e6e8ea;--cg-border-control:#e3e3e3;--cg-border-accent:#5a47f0;--cg-focus-ring:rgba(90, 71, 240, 0.28);--cg-online:#00a05c;--cg-online-fill:#e6f7ef;--cg-online-strong:#085d3a;--cg-expired-fill:#fdf3e0;--cg-expired-border:#fedf89;--cg-expired-strong:#7a3d0a;--cg-font-ui:'Manrope Variable', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;--cg-font-body:'Space Grotesk Variable', 'Space Grotesk', 'Manrope Variable', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;--cg-font-mono:'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;--cg-weight-regular:400;--cg-weight-medium:500;--cg-weight-bold:600;--cg-body-18:18px;--cg-body-md:16px;--cg-body-sm:15px;--cg-body-14:14px;--cg-caption:13px;--cg-body-line:1.46;--cg-mono-size:14px;--cg-mono-line:1.7;--cg-radius-xs:8px;--cg-radius-sm:10px;--cg-radius-md:12px;--cg-radius-lg:14px;--cg-radius-xl:16px;--cg-radius-container:20px;--cg-radius-pill:999px;--cg-shadow-card:0 4px 16px rgba(34, 34, 34, 0.04), 0 4px 4px rgba(34, 34, 34, 0.04);--cg-shadow-hover:0 8px 24px rgba(34, 34, 34, 0.08);--cg-shadow-card-hover:0 8px 24px rgba(34, 34, 34, 0.08), 0 4px 6px rgba(34, 34, 34, 0.06);--cg-shadow-panel:0 10px 40px rgba(90, 71, 240, 0.18);--cg-duration-fast:120ms;--cg-duration:180ms;--cg-duration-slow:280ms;--cg-ease-out:cubic-bezier(0, 0, 0.2, 1);--cg-ease-out-expo:cubic-bezier(0.16, 1, 0.3, 1);--cg-ease-out-quint:cubic-bezier(0.22, 1, 0.36, 1);--cg-ease-out-quart:cubic-bezier(0.25, 1, 0.5, 1);--cg-ease-in-out-cubic:cubic-bezier(0.65, 0, 0.35, 1);--cg-ease-in:cubic-bezier(0.5, 0, 0.75, 0);--cg-ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);--cg-ease-spring-damped:linear(0, 0.034, 0.122, 0.244, 0.383, 0.526, 0.662, 0.785, 0.889, 0.974, 1.038, 1.083, 1.111, 1.124, 1.126, 1.119, 1.106, 1.09, 1.072, 1.054, 1.038, 1.023, 1.01, 1, 0.993, 0.988, 0.985, 0.984, 0.984, 0.985, 0.987, 0.989, 0.992, 0.994, 0.996, 0.998, 0.999, 1, 1.001, 1.002, 1);";
2
+ export declare const BADGE_TOKEN_DECLARATIONS = "--cg-primary:#5a47f0;--cg-primary-press:#4b39db;--cg-primary-tint:#eeecfe;--cg-secondary:#b6de68;--cg-secondary-press:#a6cf57;--cg-tertiary:#60e9f0;--cg-tertiary-press:#4dd8e0;--cg-accent:#0061f0;--cg-cyan-200:#dffbfc;--cg-lime-200:#eef7dc;--cg-neutral-25:#f1f1f6;--cg-surface-card:#ffffff;--cg-surface-raised:#f4f6f8;--cg-surface-control:#e3e3e3;--cg-surface-subtle:#f2f1f7;--cg-hover:rgba(34, 34, 34, 0.045);--cg-scrim:rgba(46, 30, 172, 0.46);--cg-text-primary:#222222;--cg-text-secondary:#595959;--cg-text-muted:#858585;--cg-text-muted-strong:#6a6a6a;--cg-text-placeholder:#acacac;--cg-text-accent:#5a47f0;--cg-text-on-primary:#ffffff;--cg-text-on-accent:#222222;--cg-border-hairline:#e6e8ea;--cg-border-control:#e3e3e3;--cg-border-accent:#5a47f0;--cg-focus-ring:rgba(90, 71, 240, 0.28);--cg-online:#00a05c;--cg-online-fill:#e6f7ef;--cg-online-strong:#085d3a;--cg-expired-fill:#fdf3e0;--cg-expired-border:#fedf89;--cg-expired-strong:#7a3d0a;--cg-font-ui:'Manrope Variable', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;--cg-font-body:'Space Grotesk Variable', 'Space Grotesk', 'Manrope Variable', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;--cg-font-mono:'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;--cg-weight-regular:400;--cg-weight-medium:500;--cg-weight-bold:600;--cg-body-18:18px;--cg-body-md:16px;--cg-body-sm:15px;--cg-body-14:14px;--cg-caption:13px;--cg-body-line:1.46;--cg-mono-size:14px;--cg-mono-line:1.7;--cg-radius-xs:8px;--cg-radius-sm:10px;--cg-radius-md:12px;--cg-radius-lg:14px;--cg-radius-xl:16px;--cg-radius-container:20px;--cg-radius-pill:999px;--cg-shadow-card:0 4px 16px rgba(34, 34, 34, 0.04), 0 4px 4px rgba(34, 34, 34, 0.04);--cg-shadow-hover:0 8px 24px rgba(34, 34, 34, 0.08);--cg-shadow-card-hover:0 8px 24px rgba(34, 34, 34, 0.08), 0 4px 6px rgba(34, 34, 34, 0.06);--cg-shadow-panel:0 10px 40px rgba(90, 71, 240, 0.18);--cg-shadow-float:0 4px 12px rgba(34, 34, 34, 0.12), 0 12px 80px rgba(34, 34, 34, 0.12);--cg-duration-fast:120ms;--cg-duration:180ms;--cg-duration-slow:280ms;--cg-ease-out:cubic-bezier(0, 0, 0.2, 1);--cg-ease-out-expo:cubic-bezier(0.16, 1, 0.3, 1);--cg-ease-out-quint:cubic-bezier(0.22, 1, 0.36, 1);--cg-ease-out-quart:cubic-bezier(0.25, 1, 0.5, 1);--cg-ease-in-out-cubic:cubic-bezier(0.65, 0, 0.35, 1);--cg-ease-in:cubic-bezier(0.5, 0, 0.75, 0);--cg-ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);--cg-ease-spring-damped:linear(0, 0.034, 0.122, 0.244, 0.383, 0.526, 0.662, 0.785, 0.889, 0.974, 1.038, 1.083, 1.111, 1.124, 1.126, 1.119, 1.106, 1.09, 1.072, 1.054, 1.038, 1.023, 1.01, 1, 0.993, 0.988, 0.985, 0.984, 0.984, 0.985, 0.987, 0.989, 0.992, 0.994, 0.996, 0.998, 0.999, 1, 1.001, 1.002, 1);";
3
3
  /** The same values as a map, for tests and the gallery. Not needed at runtime. */
4
4
  export declare const BADGE_TOKENS: Readonly<Record<string, string>>;
5
+ /**
6
+ * The watermark overlay's own tokens (ui#422), declared on its root by
7
+ * `BADGE_WATERMARK_CSS` only, so no other badge bundle carries them.
8
+ */
9
+ export declare const BADGE_WATERMARK_TOKEN_DECLARATIONS = "--cg-font-display:'Tanker', 'Manrope Variable', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;--cg-link:#0061f0;--cg-slate-500:#828c98;--cg-kind-inspiration:#f0f8e1;--cg-kind-app:#dffbfc;--cg-kind-agent:#d1c9ff;";
10
+ /** The same values as a map, for tests and the gallery. Not needed at runtime. */
11
+ export declare const BADGE_WATERMARK_TOKENS: Readonly<Record<string, string>>;
5
12
  /** `--cg-font-ui`: Manrope. The tab label and button labels. */
6
13
  export declare const BADGE_FONT_UI = "'Manrope Variable', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif";
7
14
  /** `--cg-font-body`: Space Grotesk. Every other line of text. */
@@ -1 +1 @@
1
- {"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../src/badge/palette.ts"],"names":[],"mappings":"AAMA,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB,8kFACwiF,CAAA;AAE7kF,kFAAkF;AAClF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAuEzD,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,aAAa,6FAA6F,CAAA;AAEvH,iEAAiE;AACjE,eAAO,MAAM,eAAe,wIAAwI,CAAA;AAEpK;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;CACrB,CAGA,CAAA"}
1
+ {"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../src/badge/palette.ts"],"names":[],"mappings":"AAMA,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB,8rFACwpF,CAAA;AAE7rF,kFAAkF;AAClF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAyEzD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,kCAAkC,+OAC+L,CAAA;AAE9O,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOnE,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,aAAa,6FAA6F,CAAA;AAEvH,iEAAiE;AACjE,eAAO,MAAM,eAAe,wIAAwI,CAAA;AAEpK;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;CACrB,CAGA,CAAA"}
@@ -4,7 +4,7 @@
4
4
  // carries its token values with it. Each is the resolved value of the token of
5
5
  // the same name at :root. Retune the token and rebuild; this file follows.
6
6
  /** Every badge token as one declaration list, for the badge root's rule. */
7
- export const BADGE_TOKEN_DECLARATIONS = "--cg-primary:#5a47f0;--cg-primary-press:#4b39db;--cg-primary-tint:#eeecfe;--cg-secondary:#b6de68;--cg-secondary-press:#a6cf57;--cg-tertiary:#60e9f0;--cg-tertiary-press:#4dd8e0;--cg-accent:#0061f0;--cg-cyan-200:#dffbfc;--cg-lime-200:#eef7dc;--cg-surface-card:#ffffff;--cg-surface-raised:#f4f6f8;--cg-surface-control:#e3e3e3;--cg-surface-subtle:#f2f1f7;--cg-hover:rgba(34, 34, 34, 0.045);--cg-scrim:rgba(46, 30, 172, 0.46);--cg-text-primary:#222222;--cg-text-secondary:#595959;--cg-text-muted:#858585;--cg-text-muted-strong:#6a6a6a;--cg-text-placeholder:#acacac;--cg-text-accent:#5a47f0;--cg-text-on-primary:#ffffff;--cg-text-on-accent:#222222;--cg-border-hairline:#e6e8ea;--cg-border-control:#e3e3e3;--cg-border-accent:#5a47f0;--cg-focus-ring:rgba(90, 71, 240, 0.28);--cg-online:#00a05c;--cg-online-fill:#e6f7ef;--cg-online-strong:#085d3a;--cg-expired-fill:#fdf3e0;--cg-expired-border:#fedf89;--cg-expired-strong:#7a3d0a;--cg-font-ui:'Manrope Variable', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;--cg-font-body:'Space Grotesk Variable', 'Space Grotesk', 'Manrope Variable', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;--cg-font-mono:'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;--cg-weight-regular:400;--cg-weight-medium:500;--cg-weight-bold:600;--cg-body-18:18px;--cg-body-md:16px;--cg-body-sm:15px;--cg-body-14:14px;--cg-caption:13px;--cg-body-line:1.46;--cg-mono-size:14px;--cg-mono-line:1.7;--cg-radius-xs:8px;--cg-radius-sm:10px;--cg-radius-md:12px;--cg-radius-lg:14px;--cg-radius-xl:16px;--cg-radius-container:20px;--cg-radius-pill:999px;--cg-shadow-card:0 4px 16px rgba(34, 34, 34, 0.04), 0 4px 4px rgba(34, 34, 34, 0.04);--cg-shadow-hover:0 8px 24px rgba(34, 34, 34, 0.08);--cg-shadow-card-hover:0 8px 24px rgba(34, 34, 34, 0.08), 0 4px 6px rgba(34, 34, 34, 0.06);--cg-shadow-panel:0 10px 40px rgba(90, 71, 240, 0.18);--cg-duration-fast:120ms;--cg-duration:180ms;--cg-duration-slow:280ms;--cg-ease-out:cubic-bezier(0, 0, 0.2, 1);--cg-ease-out-expo:cubic-bezier(0.16, 1, 0.3, 1);--cg-ease-out-quint:cubic-bezier(0.22, 1, 0.36, 1);--cg-ease-out-quart:cubic-bezier(0.25, 1, 0.5, 1);--cg-ease-in-out-cubic:cubic-bezier(0.65, 0, 0.35, 1);--cg-ease-in:cubic-bezier(0.5, 0, 0.75, 0);--cg-ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);--cg-ease-spring-damped:linear(0, 0.034, 0.122, 0.244, 0.383, 0.526, 0.662, 0.785, 0.889, 0.974, 1.038, 1.083, 1.111, 1.124, 1.126, 1.119, 1.106, 1.09, 1.072, 1.054, 1.038, 1.023, 1.01, 1, 0.993, 0.988, 0.985, 0.984, 0.984, 0.985, 0.987, 0.989, 0.992, 0.994, 0.996, 0.998, 0.999, 1, 1.001, 1.002, 1);";
7
+ export const BADGE_TOKEN_DECLARATIONS = "--cg-primary:#5a47f0;--cg-primary-press:#4b39db;--cg-primary-tint:#eeecfe;--cg-secondary:#b6de68;--cg-secondary-press:#a6cf57;--cg-tertiary:#60e9f0;--cg-tertiary-press:#4dd8e0;--cg-accent:#0061f0;--cg-cyan-200:#dffbfc;--cg-lime-200:#eef7dc;--cg-neutral-25:#f1f1f6;--cg-surface-card:#ffffff;--cg-surface-raised:#f4f6f8;--cg-surface-control:#e3e3e3;--cg-surface-subtle:#f2f1f7;--cg-hover:rgba(34, 34, 34, 0.045);--cg-scrim:rgba(46, 30, 172, 0.46);--cg-text-primary:#222222;--cg-text-secondary:#595959;--cg-text-muted:#858585;--cg-text-muted-strong:#6a6a6a;--cg-text-placeholder:#acacac;--cg-text-accent:#5a47f0;--cg-text-on-primary:#ffffff;--cg-text-on-accent:#222222;--cg-border-hairline:#e6e8ea;--cg-border-control:#e3e3e3;--cg-border-accent:#5a47f0;--cg-focus-ring:rgba(90, 71, 240, 0.28);--cg-online:#00a05c;--cg-online-fill:#e6f7ef;--cg-online-strong:#085d3a;--cg-expired-fill:#fdf3e0;--cg-expired-border:#fedf89;--cg-expired-strong:#7a3d0a;--cg-font-ui:'Manrope Variable', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;--cg-font-body:'Space Grotesk Variable', 'Space Grotesk', 'Manrope Variable', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;--cg-font-mono:'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;--cg-weight-regular:400;--cg-weight-medium:500;--cg-weight-bold:600;--cg-body-18:18px;--cg-body-md:16px;--cg-body-sm:15px;--cg-body-14:14px;--cg-caption:13px;--cg-body-line:1.46;--cg-mono-size:14px;--cg-mono-line:1.7;--cg-radius-xs:8px;--cg-radius-sm:10px;--cg-radius-md:12px;--cg-radius-lg:14px;--cg-radius-xl:16px;--cg-radius-container:20px;--cg-radius-pill:999px;--cg-shadow-card:0 4px 16px rgba(34, 34, 34, 0.04), 0 4px 4px rgba(34, 34, 34, 0.04);--cg-shadow-hover:0 8px 24px rgba(34, 34, 34, 0.08);--cg-shadow-card-hover:0 8px 24px rgba(34, 34, 34, 0.08), 0 4px 6px rgba(34, 34, 34, 0.06);--cg-shadow-panel:0 10px 40px rgba(90, 71, 240, 0.18);--cg-shadow-float:0 4px 12px rgba(34, 34, 34, 0.12), 0 12px 80px rgba(34, 34, 34, 0.12);--cg-duration-fast:120ms;--cg-duration:180ms;--cg-duration-slow:280ms;--cg-ease-out:cubic-bezier(0, 0, 0.2, 1);--cg-ease-out-expo:cubic-bezier(0.16, 1, 0.3, 1);--cg-ease-out-quint:cubic-bezier(0.22, 1, 0.36, 1);--cg-ease-out-quart:cubic-bezier(0.25, 1, 0.5, 1);--cg-ease-in-out-cubic:cubic-bezier(0.65, 0, 0.35, 1);--cg-ease-in:cubic-bezier(0.5, 0, 0.75, 0);--cg-ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);--cg-ease-spring-damped:linear(0, 0.034, 0.122, 0.244, 0.383, 0.526, 0.662, 0.785, 0.889, 0.974, 1.038, 1.083, 1.111, 1.124, 1.126, 1.119, 1.106, 1.09, 1.072, 1.054, 1.038, 1.023, 1.01, 1, 0.993, 0.988, 0.985, 0.984, 0.984, 0.985, 0.987, 0.989, 0.992, 0.994, 0.996, 0.998, 0.999, 1, 1.001, 1.002, 1);";
8
8
  /** The same values as a map, for tests and the gallery. Not needed at runtime. */
9
9
  export const BADGE_TOKENS = {
10
10
  "--cg-primary": "#5a47f0",
@@ -17,6 +17,7 @@ export const BADGE_TOKENS = {
17
17
  "--cg-accent": "#0061f0",
18
18
  "--cg-cyan-200": "#dffbfc",
19
19
  "--cg-lime-200": "#eef7dc",
20
+ "--cg-neutral-25": "#f1f1f6",
20
21
  "--cg-surface-card": "#ffffff",
21
22
  "--cg-surface-raised": "#f4f6f8",
22
23
  "--cg-surface-control": "#e3e3e3",
@@ -66,6 +67,7 @@ export const BADGE_TOKENS = {
66
67
  "--cg-shadow-hover": "0 8px 24px rgba(34, 34, 34, 0.08)",
67
68
  "--cg-shadow-card-hover": "0 8px 24px rgba(34, 34, 34, 0.08), 0 4px 6px rgba(34, 34, 34, 0.06)",
68
69
  "--cg-shadow-panel": "0 10px 40px rgba(90, 71, 240, 0.18)",
70
+ "--cg-shadow-float": "0 4px 12px rgba(34, 34, 34, 0.12), 0 12px 80px rgba(34, 34, 34, 0.12)",
69
71
  "--cg-duration-fast": "120ms",
70
72
  "--cg-duration": "180ms",
71
73
  "--cg-duration-slow": "280ms",
@@ -78,6 +80,20 @@ export const BADGE_TOKENS = {
78
80
  "--cg-ease-spring": "cubic-bezier(0.34, 1.56, 0.64, 1)",
79
81
  "--cg-ease-spring-damped": "linear(0, 0.034, 0.122, 0.244, 0.383, 0.526, 0.662, 0.785, 0.889, 0.974, 1.038, 1.083, 1.111, 1.124, 1.126, 1.119, 1.106, 1.09, 1.072, 1.054, 1.038, 1.023, 1.01, 1, 0.993, 0.988, 0.985, 0.984, 0.984, 0.985, 0.987, 0.989, 0.992, 0.994, 0.996, 0.998, 0.999, 1, 1.001, 1.002, 1)",
80
82
  };
83
+ /**
84
+ * The watermark overlay's own tokens (ui#422), declared on its root by
85
+ * `BADGE_WATERMARK_CSS` only, so no other badge bundle carries them.
86
+ */
87
+ export const BADGE_WATERMARK_TOKEN_DECLARATIONS = "--cg-font-display:'Tanker', 'Manrope Variable', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;--cg-link:#0061f0;--cg-slate-500:#828c98;--cg-kind-inspiration:#f0f8e1;--cg-kind-app:#dffbfc;--cg-kind-agent:#d1c9ff;";
88
+ /** The same values as a map, for tests and the gallery. Not needed at runtime. */
89
+ export const BADGE_WATERMARK_TOKENS = {
90
+ "--cg-font-display": "'Tanker', 'Manrope Variable', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
91
+ "--cg-link": "#0061f0",
92
+ "--cg-slate-500": "#828c98",
93
+ "--cg-kind-inspiration": "#f0f8e1",
94
+ "--cg-kind-app": "#dffbfc",
95
+ "--cg-kind-agent": "#d1c9ff",
96
+ };
81
97
  /** `--cg-font-ui`: Manrope. The tab label and button labels. */
82
98
  export const BADGE_FONT_UI = "'Manrope Variable', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif";
83
99
  /** `--cg-font-body`: Space Grotesk. Every other line of text. */
@@ -1 +1 @@
1
- {"version":3,"file":"palette.js","sourceRoot":"","sources":["../../src/badge/palette.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,EAAE;AACF,2EAA2E;AAC3E,+EAA+E;AAC/E,2EAA2E;AAE3E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,wBAAwB,GACnC,2kFAA2kF,CAAA;AAE7kF,kFAAkF;AAClF,MAAM,CAAC,MAAM,YAAY,GAAqC;IAC5D,cAAc,EAAE,SAAS;IACzB,oBAAoB,EAAE,SAAS;IAC/B,mBAAmB,EAAE,SAAS;IAC9B,gBAAgB,EAAE,SAAS;IAC3B,sBAAsB,EAAE,SAAS;IACjC,eAAe,EAAE,SAAS;IAC1B,qBAAqB,EAAE,SAAS;IAChC,aAAa,EAAE,SAAS;IACxB,eAAe,EAAE,SAAS;IAC1B,eAAe,EAAE,SAAS;IAC1B,mBAAmB,EAAE,SAAS;IAC9B,qBAAqB,EAAE,SAAS;IAChC,sBAAsB,EAAE,SAAS;IACjC,qBAAqB,EAAE,SAAS;IAChC,YAAY,EAAE,yBAAyB;IACvC,YAAY,EAAE,yBAAyB;IACvC,mBAAmB,EAAE,SAAS;IAC9B,qBAAqB,EAAE,SAAS;IAChC,iBAAiB,EAAE,SAAS;IAC5B,wBAAwB,EAAE,SAAS;IACnC,u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udgrid#5973).
3
+ *
4
+ * A plain click on the "Live on the grid" pill opens this over the app: a card on
5
+ * a blurred purple scrim, whose content depends on who is viewing. Markup only;
6
+ * the badge draws it in its own closed shadow root (a host above the badge's),
7
+ * fetches the data, and wires the behaviour to the `data-action`s.
8
+ *
9
+ * Design: CloudGrid 2026 Figma 5ouhISIL0mwYGHurvCGoEO, page "UI - Overlay
10
+ * Watermark": 11918:113662 (not signed in), 11983:5627 (signed in, not the
11
+ * owner), 11983:16368 (the owner). Decisions: cloudgrid#5973, "Decided",
12
+ * 2026-11-04.
13
+ *
14
+ * ```ts
15
+ * import { BADGE_BASE_CSS, BADGE_WATERMARK_CSS, badgeRoot, watermarkOverlay } from "@cloudgrid-io/ui/badge/watermark"
16
+ * shadow.innerHTML = `<style>${BADGE_BASE_CSS}${BADGE_WATERMARK_CSS}</style>` + badgeRoot(watermarkOverlay({ state: "loading" }))
17
+ * // then, when GET /api/v2/entities/:id/watermark-overlay answers:
18
+ * root.innerHTML = watermarkOverlay(response)
19
+ * ```
20
+ *
21
+ * ## The options are the response
22
+ *
23
+ * `WatermarkOverlayOptions` is cloudgrid's `WatermarkOverlayResponse` (packages/
24
+ * shared/src/badge/watermark-overlay.ts) plus a few presentation fields, so the
25
+ * badge passes the response straight in: `watermarkOverlay({ ...response })`.
26
+ * The types are restated here, structurally, so the library never imports from
27
+ * the platform.
28
+ *
29
+ * ## Which screen
30
+ *
31
+ * owner, insider View in My Grid + Copy URL
32
+ * outsider, no-grid Pick Up to My Grid, when `can_pick_up` and `links.pick_up`
33
+ * outsider otherwise: Copy URL + Go to My Grid
34
+ * no-grid otherwise: the not-signed-in screen, no sign-in line
35
+ * anonymous the not-signed-in screen, with "Already have an account?
36
+ * Sign in" (decision 7: the viewer may be signed in and not
37
+ * recognised), and the Example Apps when there are any
38
+ * loading the frame, a shimmer for the name, a skeleton for actions
39
+ *
40
+ * ## Actions
41
+ *
42
+ * Every control carries a `data-action` that IS the event's `action` in
43
+ * `watermark.overlay.action` (spec section 10), so the badge emits it as read:
44
+ * `create_grid`, `sign_in`, `onboard_copy`, `onboard_learn`, `pick_up`,
45
+ * `view_in_grid`, `copy_url`, `my_grid`, `example_open` (`data-value` is the
46
+ * tile's 1-based position). Links open in a new tab on their own; the badge only
47
+ * emits. `copy_url` and `onboard_copy` are buttons whose `data-value` is what to
48
+ * copy. `close` (`data-value` = `x` or `scrim`) closes; Escape is the badge's.
49
+ * `select_url` is the read-only field a refused clipboard leaves.
50
+ */
51
+ import { type OnboardWidgetFace } from "./onboard-widget.js";
52
+ export { BADGE_WATERMARK_CSS } from "./css-watermark.js";
53
+ export { BADGE_WATERMARK_TOKEN_DECLARATIONS, BADGE_WATERMARK_TOKENS } from "./palette.js";
54
+ export { BADGE_BASE_CSS } from "./css-base.js";
55
+ export { badgeRoot, type BadgeRootOptions } from "./root.js";
56
+ export { esc, glyph, href } from "./html.js";
57
+ export { onboardWidget, wireOnboardWidget, type OnboardWidgetFace, type OnboardWidgetOptions, type WireOnboardWidgetOptions } from "./onboard-widget.js";
58
+ export type WatermarkEntityKind = "inspiration" | "app" | "agent" | "system";
59
+ /** Who is viewing: cloudgrid's `WatermarkOverlayState`. */
60
+ export type WatermarkViewerState = "anonymous" | "no-grid" | "outsider" | "insider" | "owner";
61
+ /** The app, named. `grid_name` null is the Guest grid; absent (a fallback) draws no grid line. */
62
+ export interface WatermarkNamedApp {
63
+ name: string;
64
+ grid_name?: string | null;
65
+ kind?: WatermarkEntityKind;
66
+ }
67
+ /** A gated app the viewer may not see named: the coarse kind only. */
68
+ export interface WatermarkCoarseApp {
69
+ coarse_kind: WatermarkEntityKind;
70
+ }
71
+ export interface WatermarkExample {
72
+ entity_id: string;
73
+ name: string;
74
+ kind: WatermarkEntityKind;
75
+ url: string;
76
+ image: string;
77
+ }
78
+ export interface WatermarkLinks {
79
+ create: string;
80
+ sign_in: string;
81
+ learn: string;
82
+ pick_up?: string;
83
+ console_entity?: string;
84
+ console_home?: string;
85
+ share?: string;
86
+ }
87
+ /** The Copy URL button's face: Copied for 2s, or Copy failed with the URL in a field. */
88
+ export type WatermarkCopyFace = "idle" | "copied" | "failed";
89
+ /** The server's answer, as the badge passes it in, plus presentation. */
90
+ export interface WatermarkOverlayData {
91
+ state: WatermarkViewerState;
92
+ app: WatermarkNamedApp | WatermarkCoarseApp;
93
+ guest_grid?: true;
94
+ can_pick_up: boolean;
95
+ links: WatermarkLinks;
96
+ onboard_prompt: string;
97
+ examples: readonly WatermarkExample[];
98
+ /**
99
+ * The badge could not tell who is viewing (the call failed or took over 3s,
100
+ * a custom domain, a sandboxed frame). Pass `state: "anonymous"`; with no
101
+ * name, the header reads "An app on CloudGrid".
102
+ */
103
+ fallback?: boolean;
104
+ /** The Copy URL button's face. Default `idle`. */
105
+ copyUrl?: WatermarkCopyFace;
106
+ /** The onboard widget's face. Default `idle`. */
107
+ widget?: OnboardWidgetFace;
108
+ /** What the polite live region says now: "Copied", "Loaded". */
109
+ announce?: string;
110
+ }
111
+ export interface WatermarkOverlayLoading {
112
+ state: "loading";
113
+ /** The app's name, when first paint has it. Absent: a shimmer where it goes. */
114
+ name?: string;
115
+ announce?: string;
116
+ }
117
+ export type WatermarkOverlayOptions = WatermarkOverlayData | WatermarkOverlayLoading;
118
+ /** Every string the overlay says, verbatim from the spec and the frames. */
119
+ export declare const WATERMARK_COPY: Readonly<{
120
+ eyebrow: "You are viewing";
121
+ close: "Close";
122
+ plugged: (grid: string) => string;
123
+ privateGrid: "This app is plugged to a private grid.";
124
+ guestGrid: "This app was dropped without a grid.";
125
+ unnamed: "An app on CloudGrid";
126
+ coarse: Readonly<Record<WatermarkEntityKind, string>>;
127
+ anonymous: "CloudGrid gives your AI creations a public or private link. If you want your own grid to plug all your AI creations, create an account or copy the command below to your AI agent.";
128
+ pickUp: "Feeling creative? Pick it up and create your own version.";
129
+ share: "Share it with others who may find it useful or interesting.";
130
+ owner: "Share it with others who may find it useful or interesting, or check how it is doing on the Grid.";
131
+ create: "Create Your Grid";
132
+ or: "OR";
133
+ learn: "Learn how to onboard your agent";
134
+ signInLead: "Already have an account?";
135
+ signIn: "Sign in";
136
+ pickUpButton: "Pick Up to My Grid";
137
+ copyUrl: "Copy URL";
138
+ copied: "Copied";
139
+ copyFailed: "Copy failed";
140
+ urlField: "App URL";
141
+ myGrid: "Go to My Grid";
142
+ viewInGrid: "View in My Grid";
143
+ examples: "Example Apps";
144
+ loading: "Loading";
145
+ }>;
146
+ /**
147
+ * The overlay: the scrim, then the card (`role="dialog"`, `aria-modal`,
148
+ * labelled by the name, described by the body line), the close x first in it,
149
+ * so focus lands there on open. Render it inside `badgeRoot()`.
150
+ */
151
+ export declare function watermarkOverlay(opts: WatermarkOverlayOptions): string;
152
+ //# sourceMappingURL=watermark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watermark.d.ts","sourceRoot":"","sources":["../../src/badge/watermark.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAIH,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,kCAAkC,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC5D,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,KAAK,oBAAoB,EAAE,KAAK,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAExJ,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAA;AAE5E,2DAA2D;AAC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AO,CAAC,EAAE,iBAAiB,CAAA;IAC3B,iDAAiD;IACjD,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,SAAS,CAAA;IAChB,gFAAgF;IAChF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,GAAG,uBAAuB,CAAA;AAEpF,4EAA4E;AAC5E,eAAO,MAAM,cAAc;;;oBAGT,MAAM;;;;YAI2E,QAAQ,CAAC,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;;;;;;;;;;;;;;;;;;;EAoB9I,CAAA;AAoIF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,uBAAuB,GAAG,MAAM,CA2BtE"}
@@ -0,0 +1,215 @@
1
+ /**
2
+ * THE WATERMARK OVERLAY, FRAMEWORK-FREE (ui#422, cloudgrid#5973).
3
+ *
4
+ * A plain click on the "Live on the grid" pill opens this over the app: a card on
5
+ * a blurred purple scrim, whose content depends on who is viewing. Markup only;
6
+ * the badge draws it in its own closed shadow root (a host above the badge's),
7
+ * fetches the data, and wires the behaviour to the `data-action`s.
8
+ *
9
+ * Design: CloudGrid 2026 Figma 5ouhISIL0mwYGHurvCGoEO, page "UI - Overlay
10
+ * Watermark": 11918:113662 (not signed in), 11983:5627 (signed in, not the
11
+ * owner), 11983:16368 (the owner). Decisions: cloudgrid#5973, "Decided",
12
+ * 2026-11-04.
13
+ *
14
+ * ```ts
15
+ * import { BADGE_BASE_CSS, BADGE_WATERMARK_CSS, badgeRoot, watermarkOverlay } from "@cloudgrid-io/ui/badge/watermark"
16
+ * shadow.innerHTML = `<style>${BADGE_BASE_CSS}${BADGE_WATERMARK_CSS}</style>` + badgeRoot(watermarkOverlay({ state: "loading" }))
17
+ * // then, when GET /api/v2/entities/:id/watermark-overlay answers:
18
+ * root.innerHTML = watermarkOverlay(response)
19
+ * ```
20
+ *
21
+ * ## The options are the response
22
+ *
23
+ * `WatermarkOverlayOptions` is cloudgrid's `WatermarkOverlayResponse` (packages/
24
+ * shared/src/badge/watermark-overlay.ts) plus a few presentation fields, so the
25
+ * badge passes the response straight in: `watermarkOverlay({ ...response })`.
26
+ * The types are restated here, structurally, so the library never imports from
27
+ * the platform.
28
+ *
29
+ * ## Which screen
30
+ *
31
+ * owner, insider View in My Grid + Copy URL
32
+ * outsider, no-grid Pick Up to My Grid, when `can_pick_up` and `links.pick_up`
33
+ * outsider otherwise: Copy URL + Go to My Grid
34
+ * no-grid otherwise: the not-signed-in screen, no sign-in line
35
+ * anonymous the not-signed-in screen, with "Already have an account?
36
+ * Sign in" (decision 7: the viewer may be signed in and not
37
+ * recognised), and the Example Apps when there are any
38
+ * loading the frame, a shimmer for the name, a skeleton for actions
39
+ *
40
+ * ## Actions
41
+ *
42
+ * Every control carries a `data-action` that IS the event's `action` in
43
+ * `watermark.overlay.action` (spec section 10), so the badge emits it as read:
44
+ * `create_grid`, `sign_in`, `onboard_copy`, `onboard_learn`, `pick_up`,
45
+ * `view_in_grid`, `copy_url`, `my_grid`, `example_open` (`data-value` is the
46
+ * tile's 1-based position). Links open in a new tab on their own; the badge only
47
+ * emits. `copy_url` and `onboard_copy` are buttons whose `data-value` is what to
48
+ * copy. `close` (`data-value` = `x` or `scrim`) closes; Escape is the badge's.
49
+ * `select_url` is the read-only field a refused clipboard leaves.
50
+ */
51
+ import { CUBE, LAYOUT, LIGHTBULB_FILAMENT, X } from "./marks.js";
52
+ import { esc, glyph, href } from "./html.js";
53
+ import { onboardWidget } from "./onboard-widget.js";
54
+ export { BADGE_WATERMARK_CSS } from "./css-watermark.js";
55
+ export { BADGE_WATERMARK_TOKEN_DECLARATIONS, BADGE_WATERMARK_TOKENS } from "./palette.js";
56
+ export { BADGE_BASE_CSS } from "./css-base.js";
57
+ export { badgeRoot } from "./root.js";
58
+ export { esc, glyph, href } from "./html.js";
59
+ export { onboardWidget, wireOnboardWidget } from "./onboard-widget.js";
60
+ /** Every string the overlay says, verbatim from the spec and the frames. */
61
+ export const WATERMARK_COPY = Object.freeze({
62
+ eyebrow: "You are viewing",
63
+ close: "Close",
64
+ plugged: (grid) => `This app is plugged to <b>${esc(grid)}</b> grid.`,
65
+ privateGrid: "This app is plugged to a private grid.",
66
+ guestGrid: "This app was dropped without a grid.",
67
+ unnamed: "An app on CloudGrid",
68
+ coarse: { inspiration: "An inspiration", app: "An app", agent: "An agent", system: "An app" },
69
+ anonymous: "CloudGrid gives your AI creations a public or private link. If you want your own grid to plug all your AI creations, create an account or copy the command below to your AI agent.",
70
+ pickUp: "Feeling creative? Pick it up and create your own version.",
71
+ share: "Share it with others who may find it useful or interesting.",
72
+ owner: "Share it with others who may find it useful or interesting, or check how it is doing on the Grid.",
73
+ create: "Create Your Grid",
74
+ or: "OR",
75
+ learn: "Learn how to onboard your agent",
76
+ signInLead: "Already have an account?",
77
+ signIn: "Sign in",
78
+ pickUpButton: "Pick Up to My Grid",
79
+ copyUrl: "Copy URL",
80
+ copied: "Copied",
81
+ copyFailed: "Copy failed",
82
+ urlField: "App URL",
83
+ myGrid: "Go to My Grid",
84
+ viewInGrid: "View in My Grid",
85
+ examples: "Example Apps",
86
+ loading: "Loading",
87
+ });
88
+ const KIND_GLYPH = {
89
+ inspiration: LIGHTBULB_FILAMENT,
90
+ app: LAYOUT,
91
+ agent: CUBE,
92
+ system: LAYOUT,
93
+ };
94
+ const NEW_TAB = ' target="_blank" rel="noopener"';
95
+ /** True when a URL is http(s): anything else would render as `#`, a dead control. */
96
+ const linkable = (url) => !!url && href(url) !== "#";
97
+ const link = (action, url, label, secondary = false) => `<a class="cgb-wm-btn"${secondary ? ' data-variant="secondary"' : ""} href="${href(url)}"${NEW_TAB} data-action="${action}">${esc(label)}</a>`;
98
+ function copyButton(url, face, secondary) {
99
+ const label = face === "copied" ? WATERMARK_COPY.copied : face === "failed" ? WATERMARK_COPY.copyFailed : WATERMARK_COPY.copyUrl;
100
+ return (`<button class="cgb-wm-btn"${secondary ? ' data-variant="secondary"' : ""} type="button" data-action="copy_url" data-value="${esc(url)}"${face === "idle" ? "" : ` data-face="${face}"`}>` +
101
+ `<span>${esc(label)}</span></button>`);
102
+ }
103
+ /** The read-only field a refused clipboard leaves under the buttons, for copying by hand. */
104
+ const urlField = (url) => `<input class="cgb-wm-field" type="text" readonly value="${esc(url)}" aria-label="${esc(WATERMARK_COPY.urlField)}" data-action="select_url">`;
105
+ function header(name, gridLine) {
106
+ return (`<div class="cgb-wm-head">` +
107
+ `<p class="cgb-wm-eyebrow">${esc(WATERMARK_COPY.eyebrow)}</p>` +
108
+ `<h2 class="cgb-wm-name" id="cgb-wm-name">${name}</h2>` +
109
+ `</div>`) + gridLine;
110
+ }
111
+ function appHeader(d) {
112
+ const app = d.app;
113
+ if ("coarse_kind" in app) {
114
+ return header(esc(WATERMARK_COPY.coarse[app.coarse_kind] ?? WATERMARK_COPY.coarse.app), `<p class="cgb-wm-grid">${esc(WATERMARK_COPY.privateGrid)}</p>`);
115
+ }
116
+ const name = app.name?.trim() ? esc(app.name) : esc(WATERMARK_COPY.unnamed);
117
+ const grid = d.guest_grid
118
+ ? `<p class="cgb-wm-grid">${esc(WATERMARK_COPY.guestGrid)}</p>`
119
+ : typeof app.grid_name === "string" && app.grid_name.trim()
120
+ ? `<p class="cgb-wm-grid">${WATERMARK_COPY.plugged(app.grid_name)}</p>`
121
+ : "";
122
+ return header(name, grid);
123
+ }
124
+ const body = (line) => `<p class="cgb-wm-body" id="cgb-wm-body">${esc(line)}</p>`;
125
+ /** The Example Apps row. Only http(s) URLs make a tile; none hides the section. */
126
+ function examples(list) {
127
+ const tiles = list.filter((e) => linkable(e.url));
128
+ if (tiles.length === 0)
129
+ return "";
130
+ return (`<section class="cgb-wm-ex" aria-label="${esc(WATERMARK_COPY.examples)}">` +
131
+ `<h3 class="cgb-wm-ex-title">${esc(WATERMARK_COPY.examples)}</h3>` +
132
+ `<div class="cgb-wm-tiles" role="list">` +
133
+ tiles
134
+ .map((e, i) => {
135
+ const kind = KIND_GLYPH[e.kind] ? e.kind : "app";
136
+ return (`<div class="cgb-wm-tile-item" role="listitem">` +
137
+ `<a class="cgb-wm-tile" href="${href(e.url)}"${NEW_TAB} data-action="example_open" data-value="${i + 1}">` +
138
+ `<span class="cgb-wm-tile-pic">${linkable(e.image) ? `<img class="cgb-wm-tile-img" src="${href(e.image)}" alt="" loading="lazy">` : ""}</span>` +
139
+ `<span class="cgb-wm-tile-title"><span class="cgb-wm-tile-name">${esc(e.name)}</span>` +
140
+ `<span class="cgb-wm-kind" data-kind="${kind}" aria-hidden="true">${glyph(KIND_GLYPH[kind])}</span>` +
141
+ `<span class="cgb-sr">, ${kind === "system" ? "app" : kind}</span></span>` +
142
+ `</a></div>`);
143
+ })
144
+ .join("") +
145
+ `</div></section>`);
146
+ }
147
+ /** The not-signed-in screen's body, panel, optional sign-in line and examples. */
148
+ function anonymousContent(d, signIn) {
149
+ return (body(WATERMARK_COPY.anonymous) +
150
+ `<div class="cgb-wm-panel">` +
151
+ link("create_grid", d.links.create, WATERMARK_COPY.create) +
152
+ `<p class="cgb-wm-or" aria-hidden="true">${esc(WATERMARK_COPY.or)}</p>` +
153
+ onboardWidget({ value: d.onboard_prompt, block: true, face: d.widget }) +
154
+ `<a class="cgb-wm-learn" href="${href(d.links.learn)}"${NEW_TAB} data-action="onboard_learn">${esc(WATERMARK_COPY.learn)}</a>` +
155
+ `</div>` +
156
+ (signIn
157
+ ? `<p class="cgb-wm-signin">${esc(WATERMARK_COPY.signInLead)} <a href="${href(d.links.sign_in)}"${NEW_TAB} data-action="sign_in">${esc(WATERMARK_COPY.signIn)}</a></p>`
158
+ : "") +
159
+ examples(d.examples));
160
+ }
161
+ const actionsRow = (inner) => `<div class="cgb-wm-actions">${inner}</div>`;
162
+ function content(d) {
163
+ const { links, state } = d;
164
+ const face = d.copyUrl ?? "idle";
165
+ const field = face === "failed" && linkable(links.share) ? urlField(links.share) : "";
166
+ const pickUp = d.can_pick_up && linkable(links.pick_up);
167
+ if (state === "owner" || state === "insider") {
168
+ return (body(WATERMARK_COPY.owner) +
169
+ actionsRow((links.console_entity ? link("view_in_grid", links.console_entity, WATERMARK_COPY.viewInGrid) : "") +
170
+ (links.share ? copyButton(links.share, face, true) : "")) +
171
+ field);
172
+ }
173
+ if ((state === "outsider" || state === "no-grid") && pickUp) {
174
+ return body(WATERMARK_COPY.pickUp) + actionsRow(link("pick_up", links.pick_up, WATERMARK_COPY.pickUpButton));
175
+ }
176
+ if (state === "outsider") {
177
+ const copy = links.share ? copyButton(links.share, face, false) : "";
178
+ const home = links.console_home ? link("my_grid", links.console_home, WATERMARK_COPY.myGrid, !!copy) : "";
179
+ return body(WATERMARK_COPY.share) + actionsRow(copy + home) + field;
180
+ }
181
+ return anonymousContent(d, state === "anonymous");
182
+ }
183
+ const liveRegion = (announce = "") => `<p class="cgb-sr" role="status" aria-live="polite">${esc(announce)}</p>`;
184
+ const closeX = () => `<button class="cgb-wm-x" type="button" data-action="close" data-value="x" aria-label="${esc(WATERMARK_COPY.close)}">${glyph(X)}</button>`;
185
+ const scrimEl = () => `<div class="cgb-wm-scrim" data-action="close" data-value="scrim" aria-hidden="true"></div>`;
186
+ /**
187
+ * The overlay: the scrim, then the card (`role="dialog"`, `aria-modal`,
188
+ * labelled by the name, described by the body line), the close x first in it,
189
+ * so focus lands there on open. Render it inside `badgeRoot()`.
190
+ */
191
+ export function watermarkOverlay(opts) {
192
+ if (opts.state === "loading") {
193
+ const name = opts.name?.trim()
194
+ ? esc(opts.name)
195
+ : `<span class="cgb-wm-shimmer" data-shape="name"></span><span class="cgb-sr">${esc(WATERMARK_COPY.loading)}</span>`;
196
+ return (`<div class="cgb-wm" data-state="loading">` +
197
+ scrimEl() +
198
+ `<div class="cgb-wm-card" role="dialog" aria-modal="true" aria-labelledby="cgb-wm-name" aria-busy="true">` +
199
+ closeX() +
200
+ header(name, `<span class="cgb-wm-shimmer" data-shape="line"></span>`) +
201
+ `<div class="cgb-wm-skeleton" aria-hidden="true"><span class="cgb-wm-shimmer" data-shape="body"></span><span class="cgb-wm-shimmer" data-shape="body"></span>` +
202
+ `<span class="cgb-wm-shimmer" data-shape="panel"></span></div>` +
203
+ liveRegion(opts.announce) +
204
+ `</div></div>`);
205
+ }
206
+ return (`<div class="cgb-wm" data-state="${esc(opts.state)}"${opts.fallback ? " data-fallback" : ""}>` +
207
+ scrimEl() +
208
+ `<div class="cgb-wm-card" role="dialog" aria-modal="true" aria-labelledby="cgb-wm-name" aria-describedby="cgb-wm-body">` +
209
+ closeX() +
210
+ appHeader(opts) +
211
+ content(opts) +
212
+ liveRegion(opts.announce) +
213
+ `</div></div>`);
214
+ }
215
+ //# sourceMappingURL=watermark.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watermark.js","sourceRoot":"","sources":["../../src/badge/watermark.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC,EAAE,MAAM,YAAY,CAAA;AAChE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,aAAa,EAA0B,MAAM,qBAAqB,CAAA;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,kCAAkC,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAyB,MAAM,WAAW,CAAA;AAC5D,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,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