@cloudgrid-io/ui 0.30.0 → 0.31.1
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/README.md +82 -0
- package/dist/blocks/agent-prompt.d.ts.map +1 -1
- package/dist/blocks/agent-prompt.js +6 -1
- package/dist/blocks/agent-prompt.js.map +1 -1
- package/dist/blocks/cloudgrid-install.d.ts +67 -0
- package/dist/blocks/cloudgrid-install.d.ts.map +1 -0
- package/dist/blocks/cloudgrid-install.js +200 -0
- package/dist/blocks/cloudgrid-install.js.map +1 -0
- package/dist/blocks/command-field.d.ts +37 -6
- package/dist/blocks/command-field.d.ts.map +1 -1
- package/dist/blocks/command-field.js +43 -7
- package/dist/blocks/command-field.js.map +1 -1
- package/dist/blocks/empty-creations-previews.d.ts +6 -0
- package/dist/blocks/empty-creations-previews.d.ts.map +1 -0
- package/dist/blocks/empty-creations-previews.js +17 -0
- package/dist/blocks/empty-creations-previews.js.map +1 -0
- package/dist/blocks/empty-creations.d.ts +84 -0
- package/dist/blocks/empty-creations.d.ts.map +1 -0
- package/dist/blocks/empty-creations.js +106 -0
- package/dist/blocks/empty-creations.js.map +1 -0
- package/dist/blocks/entity-card.d.ts +81 -24
- package/dist/blocks/entity-card.d.ts.map +1 -1
- package/dist/blocks/entity-card.js +235 -126
- package/dist/blocks/entity-card.js.map +1 -1
- package/dist/blocks/icons.d.ts +10 -1
- package/dist/blocks/icons.d.ts.map +1 -1
- package/dist/blocks/icons.js +10 -1
- package/dist/blocks/icons.js.map +1 -1
- package/dist/blocks/install-content.d.ts +228 -0
- package/dist/blocks/install-content.d.ts.map +1 -0
- package/dist/blocks/install-content.js +464 -0
- package/dist/blocks/install-content.js.map +1 -0
- package/dist/blocks/logo.d.ts +70 -1
- package/dist/blocks/logo.d.ts.map +1 -1
- package/dist/blocks/logo.js +75 -2
- package/dist/blocks/logo.js.map +1 -1
- package/dist/blocks/phosphor-marks.d.ts +2 -0
- package/dist/blocks/phosphor-marks.d.ts.map +1 -1
- package/dist/blocks/phosphor-marks.js +3 -0
- package/dist/blocks/phosphor-marks.js.map +1 -1
- package/dist/blocks/prompt-block.d.ts +13 -5
- package/dist/blocks/prompt-block.d.ts.map +1 -1
- package/dist/blocks/prompt-block.js +29 -11
- package/dist/blocks/prompt-block.js.map +1 -1
- package/dist/blocks/stage-panel.d.ts +19 -0
- package/dist/blocks/stage-panel.d.ts.map +1 -1
- package/dist/blocks/stage-panel.js +2 -4
- package/dist/blocks/stage-panel.js.map +1 -1
- package/dist/blocks/step-item.d.ts.map +1 -1
- package/dist/blocks/step-item.js +1 -1
- package/dist/blocks/step-item.js.map +1 -1
- package/dist/blocks/tool-logo.d.ts.map +1 -1
- package/dist/blocks/tool-logo.js +10 -6
- package/dist/blocks/tool-logo.js.map +1 -1
- package/dist/blocks/tool-setup.d.ts +12 -6
- package/dist/blocks/tool-setup.d.ts.map +1 -1
- package/dist/blocks/tool-setup.js.map +1 -1
- package/dist/brand/creations/1.webp +0 -0
- package/dist/brand/creations/2.webp +0 -0
- package/dist/brand/creations/3.webp +0 -0
- package/dist/brand/creations/4.webp +0 -0
- package/dist/brand/mark-180.png +0 -0
- package/dist/brand/mark-192.png +0 -0
- package/dist/brand/mark-32.png +0 -0
- package/dist/brand/mark-512.png +0 -0
- package/dist/brand/mark-inverted-180.png +0 -0
- package/dist/brand/mark-inverted-192.png +0 -0
- package/dist/brand/mark-inverted-32.png +0 -0
- package/dist/brand/mark-inverted-512.png +0 -0
- package/dist/brand/mark-inverted.svg +8 -0
- package/dist/brand/mark.svg +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -93,6 +93,29 @@ what `text-ink` is doing above. Borders and backgrounds flip on their own. Text
|
|
|
93
93
|
There is no dark mode here, and this is not a substitute for one. Dark surfaces are a
|
|
94
94
|
property of a container, never a page-level theme.
|
|
95
95
|
|
|
96
|
+
## The install panel
|
|
97
|
+
|
|
98
|
+
Every CloudGrid install panel comes from this package, content and design both. Nothing is
|
|
99
|
+
fetched.
|
|
100
|
+
|
|
101
|
+
```tsx
|
|
102
|
+
import { CloudGridInstall, INSTALL_PRESETS, installToolPreset } from "@cloudgrid-io/ui"
|
|
103
|
+
|
|
104
|
+
<CloudGridInstall /> // the whole panel
|
|
105
|
+
<CloudGridInstall preset={INSTALL_PRESETS.onboarding} onValueChange={recordTool} />
|
|
106
|
+
<CloudGridInstall preset={installToolPreset("cursor")} />
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
There are no props for the words. A page chooses what is on screen (`tools`, `methods`,
|
|
110
|
+
`defaultTool`, `defaultMethod`, `showFetchPrompt`, `showFooter`, or a `preset`) and what only
|
|
111
|
+
it can know (the selected tool and method, the heading level, a Continue action). Tool values
|
|
112
|
+
are stable identifiers, safe to record: `claude-code`, `cursor`, `codex`, `antigravity`,
|
|
113
|
+
`gemini`, `chatgpt`, `claude-web`.
|
|
114
|
+
|
|
115
|
+
`CloudGridFetchPrompt` and `CloudGridInstallFooter` render on their own. Without React, take the
|
|
116
|
+
strings from `@cloudgrid-io/ui/install-content` (`INSTALL_TOOLS`, `INSTALL_COMMANDS` and the
|
|
117
|
+
rest).
|
|
118
|
+
|
|
96
119
|
## Entry points
|
|
97
120
|
|
|
98
121
|
| | |
|
|
@@ -104,9 +127,68 @@ property of a container, never a page-level theme.
|
|
|
104
127
|
| `@cloudgrid-io/ui/fonts.css` | the three self-hosted families |
|
|
105
128
|
| `@cloudgrid-io/ui/prose.css` | long-form text |
|
|
106
129
|
| `@cloudgrid-io/ui/tokens.json` | the same values, machine-readable |
|
|
130
|
+
| `@cloudgrid-io/ui/install-content` | the install content as plain data, no React |
|
|
107
131
|
|
|
108
132
|
The JSON sets under `tokens/` are DTCG and are the source the CSS is compiled from.
|
|
109
133
|
|
|
134
|
+
## The CloudGrid sign as files
|
|
135
|
+
|
|
136
|
+
The socket glyph in a rounded square, as static files for a browser tab, a home screen or
|
|
137
|
+
a web manifest. Two colourways: `mark` is the brand sign (purple square, white glyph, what
|
|
138
|
+
the site uses) and `mark-inverted` is white with a purple glyph (what the Console's tab uses).
|
|
139
|
+
|
|
140
|
+
| | |
|
|
141
|
+
|---|---|
|
|
142
|
+
| `@cloudgrid-io/ui/brand/mark.svg` | SVG favicon, purple |
|
|
143
|
+
| `@cloudgrid-io/ui/brand/mark-inverted.svg` | SVG favicon, white |
|
|
144
|
+
| `@cloudgrid-io/ui/brand/mark-32.png`, `mark-inverted-32.png` | PNG favicon fallback |
|
|
145
|
+
| `@cloudgrid-io/ui/brand/mark-180.png`, `mark-inverted-180.png` | `apple-touch-icon`, full bleed: iOS rounds it |
|
|
146
|
+
| `@cloudgrid-io/ui/brand/mark-192.png`, `mark-inverted-192.png` | web manifest |
|
|
147
|
+
| `@cloudgrid-io/ui/brand/mark-512.png`, `mark-inverted-512.png` | web manifest |
|
|
148
|
+
|
|
149
|
+
A browser needs a URL, so copy them into your public folder or import them through your
|
|
150
|
+
bundler:
|
|
151
|
+
|
|
152
|
+
```tsx
|
|
153
|
+
// Next.js app router, e.g. app/layout.tsx
|
|
154
|
+
import favicon from "@cloudgrid-io/ui/brand/mark-inverted.svg"
|
|
155
|
+
import appleTouch from "@cloudgrid-io/ui/brand/mark-inverted-180.png"
|
|
156
|
+
|
|
157
|
+
export const metadata = {
|
|
158
|
+
title: "CloudGrid",
|
|
159
|
+
icons: { icon: favicon.src, apple: appleTouch.src },
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
```html
|
|
164
|
+
<link rel="icon" href="/mark-inverted.svg" type="image/svg+xml">
|
|
165
|
+
<link rel="icon" href="/mark-inverted-32.png" sizes="32x32" type="image/png">
|
|
166
|
+
<link rel="apple-touch-icon" href="/mark-inverted-180.png">
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Inside a page, use the component instead: `<LogoMark tone="inverted" size={32} />`. It draws
|
|
170
|
+
the same glyph from the same constant as `Logo`, and the files are generated from that
|
|
171
|
+
constant and the brand token by `scripts/generate-brand-mark.mjs`, so the three cannot drift.
|
|
172
|
+
|
|
173
|
+
## The empty creations state
|
|
174
|
+
|
|
175
|
+
The new-user empty state for a list of someone's creations: a dashed box, a fan of
|
|
176
|
+
thumbnails around a "+" tile, "No creations yet", one line and an Add button.
|
|
177
|
+
|
|
178
|
+
```tsx
|
|
179
|
+
import Link from "next/link"
|
|
180
|
+
import { EmptyCreations } from "@cloudgrid-io/ui"
|
|
181
|
+
|
|
182
|
+
<EmptyCreations href="/drop" linkComponent={Link} level={3} />
|
|
183
|
+
<EmptyCreations onAdd={openComposer} />
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
The words and the four thumbnails come from the package; `addLabel` and `previews` override
|
|
187
|
+
them. It lays out by container query, so it fits whatever width it is given. The thumbnails
|
|
188
|
+
are inlined in the component, and also ship as files for any other use:
|
|
189
|
+
`@cloudgrid-io/ui/brand/creations/1.webp` to `4.webp` (164x94, 2 to 5KB each). After
|
|
190
|
+
replacing a file, run `node scripts/generate-creation-previews.mjs`.
|
|
191
|
+
|
|
110
192
|
## Versioning
|
|
111
193
|
|
|
112
194
|
Semver. Token value changes are minor; removals are major.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-prompt.d.ts","sourceRoot":"","sources":["../../src/blocks/agent-prompt.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,iBAAS,WAAW,CAAC,EACnB,OAAO,EACP,KAAK,EACL,SAAkB,EAClB,OAAmB,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG;IAC5C,OAAO,EAAE,MAAM,CAAA;IACf,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAChC,
|
|
1
|
+
{"version":3,"file":"agent-prompt.d.ts","sourceRoot":"","sources":["../../src/blocks/agent-prompt.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,iBAAS,WAAW,CAAC,EACnB,OAAO,EACP,KAAK,EACL,SAAkB,EAClB,OAAmB,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG;IAC5C,OAAO,EAAE,MAAM,CAAA;IACf,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAChC,qBAoHA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -72,7 +72,12 @@ function AgentPrompt({ command, label, copyLabel = "Copy", variant = "default",
|
|
|
72
72
|
setCopied(false);
|
|
73
73
|
}, 1600);
|
|
74
74
|
}
|
|
75
|
-
return (_jsxs("div", { "data-slot": "agent-prompt", "data-variant": variant,
|
|
75
|
+
return (_jsxs("div", { "data-slot": "agent-prompt", "data-variant": variant,
|
|
76
|
+
// `min-w-0` for the reason `CloudGridInstall` gives (#275): the outline
|
|
77
|
+
// pill truncates, and a truncated line still reports its full width as
|
|
78
|
+
// min-content, so a grid track or flex row holding this would otherwise
|
|
79
|
+
// refuse to be narrower than the whole command.
|
|
80
|
+
className: cn("flex min-w-0 flex-col gap-2", outline && "items-center", className), ...props, children: [label ? (_jsx("p", { className: cn("m-0 text-body-sm text-body", outline && "text-caption text-faint"), children: label })) : null, _jsxs("div", { ...(outline ? {} : { "data-cg-surface": "ink" }), className: cn("flex items-center gap-3 rounded-pill px-4 py-2.5", outline
|
|
76
81
|
// See PromptBlock's FIELD note: --cg-surface-subtle is :root-only and
|
|
77
82
|
// freezes to a near-white lavender on ink, --cg-hover is declared in
|
|
78
83
|
// all three scopes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-prompt.js","sourceRoot":"","sources":["../../src/blocks/agent-prompt.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEzD,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,SAAS,WAAW,CAAC,EACnB,OAAO,EACP,KAAK,EACL,SAAS,GAAG,MAAM,EAClB,OAAO,GAAG,SAAS,EACnB,SAAS,EACT,GAAG,KAAK,EAQT;IACC,MAAM,OAAO,GAAG,OAAO,KAAK,SAAS,CAAA;IACrC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAgB,IAAI,CAAC,CAAA;IACnE,2EAA2E;IAC3E,2EAA2E;IAC3E,iDAAiD;IACjD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IACjD,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAA4C,SAAS,CAAC,CAAA;IAEhF,+EAA+E;IAC/E,mDAAmD;IACnD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAA;IAE5D,KAAK,U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AE,CAAC,EACjD,SAAS,EAAE,EAAE,CACX,kDAAkD,EAClD,OAAO;oBACL,sEAAsE;oBACtE,qEAAqE;oBACrE,oBAAoB;oBACpB,CAAC,CAAC,+CAA+C;oBACjD,CAAC,CAAC,kBAAkB,CACvB,aAED,8BACc,MAAM,EAClB,SAAS,EAAC,gCAAgC,kBAGrC,EAEP,gBACE,SAAS,EAAE,EAAE,CACX,4DAA4D,EAC5D,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,WAAW,CAC5C,aAEA,OAAO,EAGP,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAChB,8BACc,MAAM,EAClB,SAAS,EAAC,4EAA4E,GACtF,CACH,IACI,EAEN,OAAO,CAAC,CAAC,CAAC,CACT,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,EACb,SAAS,EAAC,uJAAuJ,gBAIrJ,SAAS,YAEpB,MAAM,CAAC,CAAC,CAAC,KAAC,SAAS,IAAC,SAAS,EAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,KAAC,QAAQ,IAAC,SAAS,EAAC,QAAQ,GAAG,GACrE,CACV,CAAC,CAAC,CAAC,CACF,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,EACb,SAAS,EAAC,mLAAmL,YAE5L,QAAQ,IAAI,SAAS,GACf,CACV,IACG,EAIN,4BAAgB,QAAQ,EAAC,SAAS,EAAC,SAAS,YACzC,QAAQ,GACJ,IACH,CACP,CAAA;AACH,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type InstallFilter, type InstallMethodValue, type InstallToolValue } from "./install-content.js";
|
|
3
|
+
import { PageHeading } from "./page-heading.js";
|
|
4
|
+
import { type ToolSetupGroup, type ToolSetupTool } from "./tool-setup.js";
|
|
5
|
+
/**
|
|
6
|
+
* The content's tools as `ToolSetup` takes them, in the order asked for, with
|
|
7
|
+
* every vendor mark and every body rendered.
|
|
8
|
+
*
|
|
9
|
+
* Exported for a page that composes `ToolSetup` itself, which is what the
|
|
10
|
+
* library gallery's `ToolSetup` specimens do. A method missing from `methods`
|
|
11
|
+
* is dropped from each tool, so a tool with nothing left leaves the strip.
|
|
12
|
+
*
|
|
13
|
+
* 15px marks, which is what the strip draws. A mark carries no size of its own,
|
|
14
|
+
* so every call site states one.
|
|
15
|
+
*/
|
|
16
|
+
export declare function installSetupTools(tools?: readonly InstallToolValue[], methods?: readonly InstallMethodValue[]): ToolSetupTool[];
|
|
17
|
+
/** The two runs, each drawn as its glyph and named by its words. */
|
|
18
|
+
export declare function installSetupGroups(): ToolSetupGroup[];
|
|
19
|
+
/**
|
|
20
|
+
* "Not sure? Copy this prompt and paste it to your AI agent." over the one
|
|
21
|
+
* command an agent can act on.
|
|
22
|
+
*
|
|
23
|
+
* The outline pill, as the Console drew it under the panel, so it reads the
|
|
24
|
+
* surface it sits on. `showIntro={false}` is the standalone pill, which is what
|
|
25
|
+
* the old `fetch-prompt` block was.
|
|
26
|
+
*/
|
|
27
|
+
declare function CloudGridFetchPrompt({ showIntro, ...props }: Omit<React.ComponentProps<"div">, "ref" | "children"> & {
|
|
28
|
+
/** The "Not sure?" line over the pill. */
|
|
29
|
+
showIntro?: boolean;
|
|
30
|
+
}): React.JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* The source line: one sentence, then the two repositories.
|
|
33
|
+
*
|
|
34
|
+
* `text-body` and not `text-faint`: faint is large-text-legal only (#232), and
|
|
35
|
+
* this is 15px. Every colour is a token, so it flips on the panel and on ink with
|
|
36
|
+
* the rest of the block; a container that sets `data-cg-surface` still owes its
|
|
37
|
+
* own `text-ink` (rule 3).
|
|
38
|
+
*/
|
|
39
|
+
declare function CloudGridInstallFooter({ className, ...props }: Omit<React.ComponentProps<"footer">, "ref" | "children">): React.JSX.Element;
|
|
40
|
+
declare function CloudGridInstall({ preset, tools, methods, defaultTool, defaultMethod, showFetchPrompt, showFooter, value, onValueChange, method, onMethodChange, level, headingSize, continueLabel, onContinue, canContinue, className, ...props }: Omit<React.ComponentProps<"div">, "ref" | "children" | "defaultValue" | "onChange"> & InstallFilter & {
|
|
41
|
+
/**
|
|
42
|
+
* A named configuration: `INSTALL_PRESETS.hub`, `.onboarding`, `.console`,
|
|
43
|
+
* `.makeGame`, `.makeAppAgent`, `.makeDeckPage`, or `installToolPreset(tool)`.
|
|
44
|
+
* Any filter prop passed alongside overrides that field of it.
|
|
45
|
+
*/
|
|
46
|
+
preset?: InstallFilter;
|
|
47
|
+
/** The selected tool, controlled. Pair with `onValueChange`. */
|
|
48
|
+
value?: InstallToolValue;
|
|
49
|
+
/** Reports the tool on screen, in the content's slugs (`gemini`, `claude-web`). */
|
|
50
|
+
onValueChange?: (value: InstallToolValue) => void;
|
|
51
|
+
/** The selected method, controlled. Pair with `onMethodChange`. */
|
|
52
|
+
method?: InstallMethodValue;
|
|
53
|
+
onMethodChange?: (method: InstallMethodValue) => void;
|
|
54
|
+
/** `2` for a section inside a larger page. */
|
|
55
|
+
level?: 1 | 2;
|
|
56
|
+
headingSize?: React.ComponentProps<typeof PageHeading>["size"];
|
|
57
|
+
/**
|
|
58
|
+
* A Continue button under the panel, for a flow. `null`, the default, draws
|
|
59
|
+
* none: with no handler a button is a dead end, and neither surface that
|
|
60
|
+
* renders this today has anything to continue to from inside it.
|
|
61
|
+
*/
|
|
62
|
+
continueLabel?: string | null;
|
|
63
|
+
onContinue?: () => void;
|
|
64
|
+
canContinue?: boolean;
|
|
65
|
+
}): React.JSX.Element;
|
|
66
|
+
export { CloudGridFetchPrompt, CloudGridInstall, CloudGridInstallFooter };
|
|
67
|
+
//# sourceMappingURL=cloudgrid-install.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudgrid-install.d.ts","sourceRoot":"","sources":["../../src/blocks/cloudgrid-install.tsx"],"names":[],"mappings":"AAAA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AU,CAAC,GACpF,aAAa,GAAG;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,gEAAgE;IAChE,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACxB,mFAAmF;IACnF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAA;IACjD,mEAAmE;IACnE,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;IACrD,8CAA8C;IAC9C,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IACb,WAAW,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;IAC9D;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,qBA4EF;AAED,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,CAAA"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { AgentPrompt } from "./agent-prompt.js";
|
|
4
|
+
import { Button } from "../ui/button.js";
|
|
5
|
+
import { ChatAppIcon, DownloadIcon, GithubIcon, OpenLiveIcon, TerminalIcon, } from "./icons.js";
|
|
6
|
+
import { INSTALL_FETCH_PROMPT, INSTALL_FOOTER, INSTALL_GROUPS, INSTALL_HEADING, INSTALL_METHODS, INSTALL_PRESETS, INSTALL_TOOLS, } from "./install-content.js";
|
|
7
|
+
import { PageHeading } from "./page-heading.js";
|
|
8
|
+
import { ToolLogo } from "./tool-logo.js";
|
|
9
|
+
import { TOOL_MARKS } from "./tool-marks.js";
|
|
10
|
+
import { ToolSetup, } from "./tool-setup.js";
|
|
11
|
+
import { cn } from "../lib/cloudgrid-cn.js";
|
|
12
|
+
/**
|
|
13
|
+
* THE INSTALL PANEL, COMPLETE. Content and design both from this library (#266).
|
|
14
|
+
*
|
|
15
|
+
* `<CloudGridInstall />` with no props renders the whole thing: the heading, the
|
|
16
|
+
* method pills, the grouped tool strip, every pane, the "Not sure?" fetch prompt
|
|
17
|
+
* and the source footer. Nothing is fetched and nothing is passed in, because the
|
|
18
|
+
* content is `install-content.ts` and ships in the same package.
|
|
19
|
+
*
|
|
20
|
+
* Founder ruling, 2026-10-05: every install panel on every surface takes its
|
|
21
|
+
* content and its design from here. The Console's `/drop` page and onboarding
|
|
22
|
+
* step, and later the landing site, drop this in and choose a configuration.
|
|
23
|
+
*
|
|
24
|
+
* ## Configurations, not content props
|
|
25
|
+
*
|
|
26
|
+
* What a surface MAY choose is which part of the content is on screen: the
|
|
27
|
+
* tools, the methods, the defaults, and whether the fetch prompt and footer show.
|
|
28
|
+
* Pass a named `preset` (`INSTALL_PRESETS.onboarding`, `installToolPreset("cursor")`)
|
|
29
|
+
* and override any field of it with the same-named prop.
|
|
30
|
+
*
|
|
31
|
+
* What a surface may NOT choose is the words. There is no `title`, `sub`, `tools`
|
|
32
|
+
* array or step override, deliberately: a prop that replaces content is a second
|
|
33
|
+
* source of content, and two sources is how the old panel and the library came
|
|
34
|
+
* to say different things about the same setup.
|
|
35
|
+
*
|
|
36
|
+
* ## What a page still passes
|
|
37
|
+
*
|
|
38
|
+
* The things only the page can know. Which tool is selected (`value` /
|
|
39
|
+
* `onValueChange`: onboarding records it as `tool_selected`, in the snapshot's
|
|
40
|
+
* slugs), which method (`method` / `onMethodChange`), the heading's level and
|
|
41
|
+
* size for where it sits, and a Continue action when the panel is a step.
|
|
42
|
+
*
|
|
43
|
+
* ## Not a client module, on purpose
|
|
44
|
+
*
|
|
45
|
+
* Nothing here holds state; `ToolSetup` and `AgentPrompt` carry their own
|
|
46
|
+
* `"use client"`. So a React Server Component can render this with a preset, and
|
|
47
|
+
* the gallery, which is a server module, can call `installSetupTools` below
|
|
48
|
+
* rather than keeping a second copy of the mapping.
|
|
49
|
+
*/
|
|
50
|
+
// Every mark name the content uses is a real key in the vendor-mark set. The
|
|
51
|
+
// content module spells them out so it can stay free of React types; this is the
|
|
52
|
+
// compile-time half of that bargain.
|
|
53
|
+
const MARKS = TOOL_MARKS;
|
|
54
|
+
const ICONS = {
|
|
55
|
+
terminal: TerminalIcon,
|
|
56
|
+
chat: ChatAppIcon,
|
|
57
|
+
github: GithubIcon,
|
|
58
|
+
download: DownloadIcon,
|
|
59
|
+
external: OpenLiveIcon,
|
|
60
|
+
};
|
|
61
|
+
function Glyph({ icon, className }) {
|
|
62
|
+
const Mark = ICONS[icon];
|
|
63
|
+
return _jsx(Mark, { className: className });
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Body runs to nodes. A bold run is a menu path or a folder and reads at medium
|
|
67
|
+
* weight in the ink colour; a code run is a command typed inline and reads in
|
|
68
|
+
* the mono face at the size around it. Both are tokens, so both flip per surface.
|
|
69
|
+
*/
|
|
70
|
+
function Body({ runs }) {
|
|
71
|
+
return (_jsx(_Fragment, { children: runs.map((run, i) => typeof run === "string" ? (_jsx(React.Fragment, { children: run }, i)) : "bold" in run ? (_jsx("b", { className: "font-medium text-ink", children: run.bold }, i)) : (_jsx("code", { "data-slot": "cloudgrid-install-code", className: "font-mono text-ink", children: run.code }, i))) }));
|
|
72
|
+
}
|
|
73
|
+
function toSetupStep(step) {
|
|
74
|
+
return {
|
|
75
|
+
...(step.label ? { label: step.label } : {}),
|
|
76
|
+
title: step.title,
|
|
77
|
+
...(step.body ? { body: _jsx(Body, { runs: step.body }) } : {}),
|
|
78
|
+
...(step.prompt ? { prompt: step.prompt } : {}),
|
|
79
|
+
...(step.code ? { code: step.code } : {}),
|
|
80
|
+
...(step.link
|
|
81
|
+
? {
|
|
82
|
+
link: {
|
|
83
|
+
label: step.link.label,
|
|
84
|
+
href: step.link.href,
|
|
85
|
+
...(step.link.icon ? { icon: _jsx(Glyph, { icon: step.link.icon }) } : {}),
|
|
86
|
+
...(step.link.primary ? { primary: true } : {}),
|
|
87
|
+
},
|
|
88
|
+
}
|
|
89
|
+
: {}),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The content's tools as `ToolSetup` takes them, in the order asked for, with
|
|
94
|
+
* every vendor mark and every body rendered.
|
|
95
|
+
*
|
|
96
|
+
* Exported for a page that composes `ToolSetup` itself, which is what the
|
|
97
|
+
* library gallery's `ToolSetup` specimens do. A method missing from `methods`
|
|
98
|
+
* is dropped from each tool, so a tool with nothing left leaves the strip.
|
|
99
|
+
*
|
|
100
|
+
* 15px marks, which is what the strip draws. A mark carries no size of its own,
|
|
101
|
+
* so every call site states one.
|
|
102
|
+
*/
|
|
103
|
+
export function installSetupTools(tools = INSTALL_TOOLS.map((t) => t.value), methods = INSTALL_METHODS.map((m) => m.value)) {
|
|
104
|
+
return tools.flatMap((value) => {
|
|
105
|
+
const tool = INSTALL_TOOLS.find((t) => t.value === value);
|
|
106
|
+
if (!tool)
|
|
107
|
+
return [];
|
|
108
|
+
const steps = {};
|
|
109
|
+
for (const method of methods) {
|
|
110
|
+
const pane = tool.steps[method];
|
|
111
|
+
if (pane?.length)
|
|
112
|
+
steps[method] = pane.map(toSetupStep);
|
|
113
|
+
}
|
|
114
|
+
if (Object.keys(steps).length === 0)
|
|
115
|
+
return [];
|
|
116
|
+
const { Mark, hex } = MARKS[tool.mark];
|
|
117
|
+
return [
|
|
118
|
+
{
|
|
119
|
+
value: tool.value,
|
|
120
|
+
label: tool.label,
|
|
121
|
+
group: tool.group,
|
|
122
|
+
mark: _jsx(ToolLogo, { name: tool.mark, hex: hex, mark: _jsx(Mark, {}), size: 15 }),
|
|
123
|
+
steps,
|
|
124
|
+
},
|
|
125
|
+
];
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/** The two runs, each drawn as its glyph and named by its words. */
|
|
129
|
+
export function installSetupGroups() {
|
|
130
|
+
return INSTALL_GROUPS.map((group) => ({
|
|
131
|
+
value: group.value,
|
|
132
|
+
label: group.label,
|
|
133
|
+
icon: _jsx(Glyph, { icon: group.icon }),
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* "Not sure? Copy this prompt and paste it to your AI agent." over the one
|
|
138
|
+
* command an agent can act on.
|
|
139
|
+
*
|
|
140
|
+
* The outline pill, as the Console drew it under the panel, so it reads the
|
|
141
|
+
* surface it sits on. `showIntro={false}` is the standalone pill, which is what
|
|
142
|
+
* the old `fetch-prompt` block was.
|
|
143
|
+
*/
|
|
144
|
+
function CloudGridFetchPrompt({ showIntro = true, ...props }) {
|
|
145
|
+
return (_jsx(AgentPrompt, { "data-part": "cloudgrid-fetch-prompt", variant: "outline", ...(showIntro ? { label: INSTALL_FETCH_PROMPT.intro } : {}), command: INSTALL_FETCH_PROMPT.command, copyLabel: "Copy fetch prompt", ...props }));
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The source line: one sentence, then the two repositories.
|
|
149
|
+
*
|
|
150
|
+
* `text-body` and not `text-faint`: faint is large-text-legal only (#232), and
|
|
151
|
+
* this is 15px. Every colour is a token, so it flips on the panel and on ink with
|
|
152
|
+
* the rest of the block; a container that sets `data-cg-surface` still owes its
|
|
153
|
+
* own `text-ink` (rule 3).
|
|
154
|
+
*/
|
|
155
|
+
function CloudGridInstallFooter({ className, ...props }) {
|
|
156
|
+
return (_jsxs("footer", { "data-slot": "cloudgrid-install-footer", className: cn("flex flex-wrap items-center justify-center gap-x-6 gap-y-2 text-body-sm text-body", className), ...props, children: [_jsx("span", { children: INSTALL_FOOTER.note }), INSTALL_FOOTER.links.map((link) => (_jsxs("a", { href: link.href, target: "_blank", rel: "noopener noreferrer", "data-slot": "cloudgrid-install-footer-link", className: "inline-flex items-center gap-1.5 text-body underline underline-offset-4 hover:text-ink focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", children: [link.icon ? _jsx(Glyph, { icon: link.icon, className: "size-4 shrink-0" }) : null, link.label] }, link.href)))] }));
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Keep the caller's order and drop what does not exist, so a preset naming a
|
|
160
|
+
* method or tool this content does not have cannot put an empty tab on screen.
|
|
161
|
+
*/
|
|
162
|
+
function known(asked, all) {
|
|
163
|
+
return asked ? asked.filter((v) => all.includes(v)) : [...all];
|
|
164
|
+
}
|
|
165
|
+
function CloudGridInstall({ preset, tools, methods, defaultTool, defaultMethod, showFetchPrompt, showFooter, value, onValueChange, method, onMethodChange, level = 1, headingSize, continueLabel = null, onContinue, canContinue = true, className, ...props }) {
|
|
166
|
+
const base = { ...INSTALL_PRESETS.hub, ...preset };
|
|
167
|
+
const toolValues = known(tools ?? base.tools, INSTALL_TOOLS.map((t) => t.value));
|
|
168
|
+
const methodValues = known(methods ?? base.methods, INSTALL_METHODS.map((m) => m.value));
|
|
169
|
+
const withFetchPrompt = showFetchPrompt ?? base.showFetchPrompt ?? true;
|
|
170
|
+
const withFooter = showFooter ?? base.showFooter ?? true;
|
|
171
|
+
const setupTools = installSetupTools(toolValues, methodValues);
|
|
172
|
+
// A default the filter has removed is dropped rather than passed on. Handed
|
|
173
|
+
// through, `ToolSetup` would fall back to the first tab AND report that
|
|
174
|
+
// fallback, which would reach an analytics handler as a selection nobody made.
|
|
175
|
+
const askedTool = defaultTool ?? base.defaultTool;
|
|
176
|
+
const firstTool = setupTools.some((t) => t.value === askedTool) ? askedTool : undefined;
|
|
177
|
+
const askedMethod = defaultMethod ?? base.defaultMethod;
|
|
178
|
+
const firstMethod = askedMethod && methodValues.includes(askedMethod) ? askedMethod : undefined;
|
|
179
|
+
const setupMethods = INSTALL_METHODS.filter((m) => methodValues.includes(m.value))
|
|
180
|
+
// The caller's order, not the content's.
|
|
181
|
+
.sort((a, b) => methodValues.indexOf(a.value) - methodValues.indexOf(b.value));
|
|
182
|
+
return (_jsxs("div", { "data-slot": "cloudgrid-install",
|
|
183
|
+
// `min-w-0` is load-bearing (#275). The fetch prompt's pill truncates its
|
|
184
|
+
// one line, and a truncated line still reports its FULL width as
|
|
185
|
+
// min-content. A page that puts this panel in a grid track or a flex row
|
|
186
|
+
// gives it an automatic minimum of that min-content, so at 390px the whole
|
|
187
|
+
// panel was 427px wide and ran off a phone's screen, Copy controls and
|
|
188
|
+
// all. Zero lets the host's track decide the width; the pill truncates
|
|
189
|
+
// inside it as designed.
|
|
190
|
+
className: cn("flex min-w-0 flex-col gap-6", className), ...props, children: [_jsx(ToolSetup, { title: INSTALL_HEADING.title, sub: INSTALL_HEADING.sub, level: level, ...(headingSize ? { headingSize } : {}), tools: setupTools, methods: setupMethods, groups: installSetupGroups(), ...(value !== undefined ? { value } : {}), ...(firstTool ? { defaultValue: firstTool } : {}), ...(onValueChange
|
|
191
|
+
? { onValueChange: (next) => onValueChange(next) }
|
|
192
|
+
: {}), ...(method !== undefined ? { method } : {}), ...(firstMethod ? { defaultMethod: firstMethod } : {}), ...(onMethodChange
|
|
193
|
+
? { onMethodChange: (next) => onMethodChange(next) }
|
|
194
|
+
: {}),
|
|
195
|
+
// The panel's own action row sits under the fetch prompt and the footer,
|
|
196
|
+
// below, so the step's primary action is the last thing on it.
|
|
197
|
+
continueLabel: null }), withFetchPrompt ? _jsx(CloudGridFetchPrompt, {}) : null, withFooter ? _jsx(CloudGridInstallFooter, {}) : null, continueLabel !== null ? (_jsx("div", { "data-slot": "cloudgrid-install-actions", className: "flex flex-col items-start gap-4", children: _jsx(Button, { type: "button", size: "lg", "data-slot": "cloudgrid-install-continue", onClick: onContinue, disabled: !canContinue, children: continueLabel }) })) : null] }));
|
|
198
|
+
}
|
|
199
|
+
export { CloudGridFetchPrompt, CloudGridInstall, CloudGridInstallFooter };
|
|
200
|
+
//# sourceMappingURL=cloudgrid-install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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ED,eAAe,CAAC,CAAC,CAAC,KAAC,oBAAoB,KAAG,CAAC,CAAC,CAAC,IAAI,EACjD,UAAU,CAAC,CAAC,CAAC,KAAC,sBAAsB,KAAG,CAAC,CAAC,CAAC,IAAI,EAE9C,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC,CACxB,2BAAe,2BAA2B,EAAC,SAAS,EAAC,iCAAiC,YACpF,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,IAAI,eACC,4BAA4B,EACtC,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,CAAC,WAAW,YAErB,aAAa,GACP,GACL,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAA;AACH,CAAC;AAED,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,CAAA"}
|
|
@@ -15,13 +15,44 @@ import * as React from "react";
|
|
|
15
15
|
* that is a form control, it takes input, and a field the user cannot type into
|
|
16
16
|
* should not be announced as one.
|
|
17
17
|
*
|
|
18
|
-
* ##
|
|
18
|
+
* ## A long value wraps, and the whole of it stays on screen (#275)
|
|
19
19
|
*
|
|
20
|
-
*
|
|
21
|
-
* and
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
20
|
+
* It used to scroll. The reasoning was that a JSON blob is one token to the
|
|
21
|
+
* reader and three wrapped lines read as three commands, so the field scrolled
|
|
22
|
+
* sideways with its scrollbar hidden. Founder ruling 2026-10-06 reversed it: a
|
|
23
|
+
* value whose end is out of sight is a value nobody can check before pasting,
|
|
24
|
+
* and a hidden scrollbar means nothing on screen says there is an end to find.
|
|
25
|
+
*
|
|
26
|
+
* Two properties do the work, and both are needed.
|
|
27
|
+
*
|
|
28
|
+
* `whitespace-pre-wrap` keeps every space the command has (a JSON blob's
|
|
29
|
+
* indentation, a double space) and allows a break
|
|
30
|
+
* AT a space, so `codex mcp add cloudgrid -- npx`
|
|
31
|
+
* wraps between words.
|
|
32
|
+
* `overflow-wrap: anywhere` lets an unbroken token (a connector URL) break
|
|
33
|
+
* between any two characters, but only when it does
|
|
34
|
+
* not fit a line on its own. Unlike `break-word` it
|
|
35
|
+
* also counts those breaks when the browser works
|
|
36
|
+
* out the field's MIN-CONTENT width. That is the
|
|
37
|
+
* half that matters: with `whitespace-pre` or
|
|
38
|
+
* `break-word`, the min-content was the whole URL,
|
|
39
|
+
* and any ancestor sizing itself to fit its content
|
|
40
|
+
* grew to that width and ran out of its column.
|
|
41
|
+
* Not `break-all`, which breaks inside words that
|
|
42
|
+
* would have fitted after the next space.
|
|
43
|
+
*
|
|
44
|
+
* Written as an arbitrary property, not Tailwind's `wrap-anywhere`: that utility
|
|
45
|
+
* arrived in Tailwind 4.1, and a consumer on an earlier v4 would scan the class
|
|
46
|
+
* and emit nothing, which looks exactly like a working build.
|
|
47
|
+
*
|
|
48
|
+
* Wrapping is paint. The clipboard gets `command` itself, never the text as laid
|
|
49
|
+
* out, so a wrapped URL pastes with no break or space in it.
|
|
50
|
+
*
|
|
51
|
+
* The control aligns to the FIRST line, not to the middle of the block: on a
|
|
52
|
+
* three-line value a centred button floats beside nothing. The value's vertical
|
|
53
|
+
* padding is computed so that one line of mono sits centred on the 28px control
|
|
54
|
+
* (`Button` `size="sm"` is `h-7`), from the same two tokens `PromptBlock` builds
|
|
55
|
+
* its clip from, so a change to the mono ramp moves this with it.
|
|
25
56
|
*
|
|
26
57
|
* ## Copy feedback is announced, not merely shown
|
|
27
58
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-field.d.ts","sourceRoot":"","sources":["../../src/blocks/command-field.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B
|
|
1
|
+
{"version":3,"file":"command-field.d.ts","sourceRoot":"","sources":["../../src/blocks/command-field.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,iBAAS,YAAY,CAAC,EACpB,OAAO,EACP,SAAkB,EAClB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG;IAC5C,OAAO,EAAE,MAAM,CAAA;IACf,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,qBA0EA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -19,13 +19,44 @@ import { cn } from "../lib/cloudgrid-cn.js";
|
|
|
19
19
|
* that is a form control, it takes input, and a field the user cannot type into
|
|
20
20
|
* should not be announced as one.
|
|
21
21
|
*
|
|
22
|
-
* ##
|
|
22
|
+
* ## A long value wraps, and the whole of it stays on screen (#275)
|
|
23
23
|
*
|
|
24
|
-
*
|
|
25
|
-
* and
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
24
|
+
* It used to scroll. The reasoning was that a JSON blob is one token to the
|
|
25
|
+
* reader and three wrapped lines read as three commands, so the field scrolled
|
|
26
|
+
* sideways with its scrollbar hidden. Founder ruling 2026-10-06 reversed it: a
|
|
27
|
+
* value whose end is out of sight is a value nobody can check before pasting,
|
|
28
|
+
* and a hidden scrollbar means nothing on screen says there is an end to find.
|
|
29
|
+
*
|
|
30
|
+
* Two properties do the work, and both are needed.
|
|
31
|
+
*
|
|
32
|
+
* `whitespace-pre-wrap` keeps every space the command has (a JSON blob's
|
|
33
|
+
* indentation, a double space) and allows a break
|
|
34
|
+
* AT a space, so `codex mcp add cloudgrid -- npx`
|
|
35
|
+
* wraps between words.
|
|
36
|
+
* `overflow-wrap: anywhere` lets an unbroken token (a connector URL) break
|
|
37
|
+
* between any two characters, but only when it does
|
|
38
|
+
* not fit a line on its own. Unlike `break-word` it
|
|
39
|
+
* also counts those breaks when the browser works
|
|
40
|
+
* out the field's MIN-CONTENT width. That is the
|
|
41
|
+
* half that matters: with `whitespace-pre` or
|
|
42
|
+
* `break-word`, the min-content was the whole URL,
|
|
43
|
+
* and any ancestor sizing itself to fit its content
|
|
44
|
+
* grew to that width and ran out of its column.
|
|
45
|
+
* Not `break-all`, which breaks inside words that
|
|
46
|
+
* would have fitted after the next space.
|
|
47
|
+
*
|
|
48
|
+
* Written as an arbitrary property, not Tailwind's `wrap-anywhere`: that utility
|
|
49
|
+
* arrived in Tailwind 4.1, and a consumer on an earlier v4 would scan the class
|
|
50
|
+
* and emit nothing, which looks exactly like a working build.
|
|
51
|
+
*
|
|
52
|
+
* Wrapping is paint. The clipboard gets `command` itself, never the text as laid
|
|
53
|
+
* out, so a wrapped URL pastes with no break or space in it.
|
|
54
|
+
*
|
|
55
|
+
* The control aligns to the FIRST line, not to the middle of the block: on a
|
|
56
|
+
* three-line value a centred button floats beside nothing. The value's vertical
|
|
57
|
+
* padding is computed so that one line of mono sits centred on the 28px control
|
|
58
|
+
* (`Button` `size="sm"` is `h-7`), from the same two tokens `PromptBlock` builds
|
|
59
|
+
* its clip from, so a change to the mono ramp moves this with it.
|
|
29
60
|
*
|
|
30
61
|
* ## Copy feedback is announced, not merely shown
|
|
31
62
|
*
|
|
@@ -54,7 +85,12 @@ function CommandField({ command, copyLabel = "Copy", className, ...props }) {
|
|
|
54
85
|
// becomes a near-white slab with white text in it. --cg-hover is the one
|
|
55
86
|
// ground token declared in all three scopes. `PromptBlock`'s FIELD note
|
|
56
87
|
// has the full version, including why it has no generated utility.
|
|
57
|
-
|
|
88
|
+
//
|
|
89
|
+
// `items-start`, not `items-center`: the control belongs to the first
|
|
90
|
+
// line of a wrapped value. See the header.
|
|
91
|
+
"flex items-start gap-2 rounded-xs border border-line bg-(--cg-hover) py-2 pr-2 pl-3", className), ...props, children: [_jsx("code", { "data-slot": "command-field-value", className: cn("min-w-0 flex-1 font-mono text-mono whitespace-pre-wrap text-ink [overflow-wrap:anywhere]",
|
|
92
|
+
// One line of mono centred on the 28px control: (28px - line) / 2.
|
|
93
|
+
"py-[calc((1.75rem_-_var(--cg-mono-size)_*_var(--cg-mono-line))_/_2)]"), children: command }), _jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: copy, "data-slot": "command-field-copy", "data-state": state,
|
|
58
94
|
// `bg-transparent` is not cosmetic, and `CodeBlock` carries the same
|
|
59
95
|
// override with the same reasoning (#20): the outline variant sets
|
|
60
96
|
// `bg-background`, which maps to `--cg-surface-page` and is deliberately
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-field.js","sourceRoot":"","sources":["../../src/blocks/command-field.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC
|
|
1
|
+
{"version":3,"file":"command-field.js","sourceRoot":"","sources":["../../src/blocks/command-field.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,SAAS,YAAY,CAAC,EACpB,OAAO,EACP,SAAS,GAAG,MAAM,EAClB,SAAS,EACT,GAAG,KAAK,EAKT;IACC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAgC,MAAM,CAAC,CAAA;IAC/E,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAA4C,SAAS,CAAC,CAAA;IAEhF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,YAAY,CAA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C,KAAK,KAAK,QAAQ;oBACjB,CAAC,CAAC,yBAAyB;oBAC3B,CAAC,CAAC,KAAK,KAAK,SAAS;wBACnB,CAAC,CAAC,8BAA8B;wBAChC,CAAC,CAAC,EAAE,GACH,IACH,CACP,CAAA;AACH,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The default thumbnails `EmptyCreations` fans out, left to right, as data URIs.
|
|
3
|
+
* The same bytes ship as files under `@cloudgrid-io/ui/brand/creations/*`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const EMPTY_CREATIONS_PREVIEWS: readonly string[];
|
|
6
|
+
//# sourceMappingURL=empty-creations-previews.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-creations-previews.d.ts","sourceRoot":"","sources":["../../src/blocks/empty-creations-previews.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EASrD,CAAA"}
|