usepilot 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/GUIDE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Pilot guide
2
2
 
3
- How to use Pilot, task by task. This guide is for **usepilot 0.22.0**: it ships with Pilot, so the copy in your project (`node_modules/usepilot/GUIDE.md`, or `npx usepilot guide`) always matches the version you have.
3
+ How to use Pilot, task by task. This guide is for **usepilot 0.23.0**: it ships with Pilot, so the copy in your project (`node_modules/usepilot/GUIDE.md`, or `npx usepilot guide`) always matches the version you have.
4
4
 
5
5
  **Agents:** when someone asks how to do something with Pilot, answer from this file. If it isn't here, Pilot doesn't do it yet: say so rather than guessing.
6
6
 
@@ -14,6 +14,7 @@ How to use Pilot, task by task. This guide is for **usepilot 0.22.0**: it ships
14
14
  - [Variables and tokens](#variables-and-tokens)
15
15
  - [Screen widths (breakpoints)](#screen-widths-breakpoints)
16
16
  - [Hover, focus, dark mode and other states](#hover-focus-dark-mode-and-other-states)
17
+ - [Editing an image](#editing-an-image)
17
18
  - [Editing text](#editing-text)
18
19
  - [Undo, discard and reloads](#undo-discard-and-reloads)
19
20
  - [Sending changes to your agent](#sending-changes-to-your-agent)
@@ -81,7 +82,7 @@ Drag the toolbar by the strip along its top edge; it stays where you put it.
81
82
 
82
83
  Select an element and its **property dialog** opens beside it.
83
84
 
84
- - **With nothing typed**, it lists every property the element sets, grouped (Content, for a `::before` or `::after`; Layout, Position, Appearance, Effects, Transform, Transition, Typography, Interactivity, SVG, Visibility).
85
+ - **With nothing typed**, it lists every property the element sets, grouped (Image, for an image; Content, for a `::before` or `::after`; Layout, Position, Appearance, Effects, Transform, Transition, Typography, Interactivity, SVG, Visibility).
85
86
  - **Search** by CSS name or Tailwind class: `p`, `pt`, `px`, `w`, `min-w`, `gap`, `display`, `items`, `aspect`, `bg`, `font`, `text`, `rounded`, `shadow`… Abbreviations work too (`mxw` is max-width). The search finds properties only: type values in the editor (`pt-4` in the search isn't a value).
86
87
  - **Tab** or **Enter** goes into the editor, **Enter** applies and goes back to the search for the next property: `pt` Tab `24` Enter.
87
88
  - **Values:** type a number (`12` is 12px), any CSS unit, a keyword (`auto`), math (`100% - 20px`), or a [variable](#variables-and-tokens). **↑/↓** step by 1, **Shift** by 10; the scroll wheel does the same on a field being edited. Some fields have a **drag handle** to scrub the value.
@@ -90,7 +91,7 @@ Select an element and its **property dialog** opens beside it.
90
91
  - **Several selected:** each change goes to all of them. A field whose value differs between them says **Mixed**; typing a value sets it on all. If they'd take it at different screen widths (one card has a rule for large screens, the other doesn't), each follows its own, and the footer says so: "Widths differ: from 1024px on 1, Base on 1".
91
92
  - **Clearing a field** (empty it and press Enter) means "this element doesn't set this property": Pilot takes the property off that element, not set to 0.
92
93
  - **Rich properties** (background image, box shadow, filter, backdrop filter, mask image) show their values as chips: click one to edit it in a panel beside the dialog, **+** to add one.
93
- - **Background image** (`bg-image`): **+** adds an image. In its panel, pick the type (an image, a linear or radial gradient, custom CSS, or none). An image takes its url; a gradient has a row per color stop: its position (empty, the browser spreads them; the field shows where; type a percentage, or step it with the arrows and leave the field, and the stop moves to its place in the list), then its color: click it to pick one (and its opacity), or hover it and click the variables button for one of the page's color variables; **×** takes the stop off (a gradient keeps at least two, so there's no × at two). **+** under the stops adds one. Each layer's panel ends with its own **size**, **position** and **repeat** (search `bg-cover`, `bg-center` or `bg-no-repeat` to find them).
94
+ - **Background image** (`bg-image`): **+** adds an image. In its panel, pick the type (an image, a linear or radial gradient, custom CSS, or none). An image takes its url: type it, or hover the field and click the button on its right for the images on the page and in the project's `public` folder (it shows the first 20: type to search them all). A gradient has its **interpolation**, the color space it blends in (sRGB, HSL, OKLab, OKLCH; empty, the browser's), and for HSL and OKLCH which way round the **hue** goes (shorter, longer, increasing, decreasing; longer sweeps through the rainbow); then a row per color stop: its position (empty, the browser spreads them; the field shows where; type a percentage, or step it with the arrows and leave the field, and the stop moves to its place in the list), then its color: click it to pick one (and its opacity), or hover it and click the variables button for one of the page's color variables; **×** takes the stop off (a gradient keeps at least two, so there's no × at two). **+** under the stops adds one. Each layer's panel ends with its own **size**, **position** and **repeat** (search `bg-cover`, `bg-center` or `bg-no-repeat` to find them).
94
95
  - **Background clip** (`bg-clip`): how far the background reaches: the border, the padding, the content, or the text (`text` shows the background through the letters).
95
96
  - **Transform:** one row for everything that moves, turns, sizes or slants the element, its chip saying what's set (× takes it all off). Click it and pick its **type**: **default** has translate, rotate, scale and skew (each one value, or each axis on its own with the button at the right of its row; scale takes a factor, `1.5`, or a percentage), **custom** takes it all as CSS functions in one value (`translate(-50%, -50%) rotate(5deg)`), **none** turns them all off.
96
97
  - **3D:** turning an element around X or Y, or moving it along Z, only looks 3D with a perspective on its parent; without one, the footer says "Add perspective to the parent". Select the parent and set its perspective.
@@ -152,6 +153,10 @@ For a condition no modifier lists, type `/` and describe it right there: "the pa
152
153
  - The `/` menu also lists the conditions your code already has on the element (`group-hover/hero`, `.card:hover &`, `motion-reduce`), even when they don't hold right now. Pick one to see and edit its values.
153
154
  - Backspace at the start of the search removes it, like the other modifiers.
154
155
 
156
+ ## Editing an image
157
+
158
+ Select an image and its dialog starts with an **Image** section: **src**, the image it shows, and **alt**, what a screen reader says for it (search `src` or `alt` to jump there). Type a new address in **src**, or hover it and click the button on its right for the images on the page and in your project's `public` folder (type to narrow the list); the new image shows on the page at once. Type a short description in **alt**, or empty it to mark the image decorative (`alt=""`: screen readers skip it; the field then says *decorative*; type `""` for an image with no alt yet). Emptying **src** changes nothing: press Cmd/Ctrl+Z to take a new image back. Both are for every screen width and state, and are sent, undone and checked like any other change; your agent sets them where the image comes from in your code.
159
+
155
160
  ## Editing text
156
161
 
157
162
  With **Select** on, **double-click** a text to edit it in place. **Enter** is done, **Esc** cancels. In an element with other elements inside, you edit the run of text under the pointer. Text edits are sent and undone like any other change.
@@ -169,7 +174,7 @@ With **Select** on, **double-click** a text to edit it in place. **Enter** is do
169
174
  - A new change or comment on an element with a job on it **waits** ("Queued") and goes once that job is done, so two jobs never edit the same element at once.
170
175
  - **Pilot checks the page** when the agent is done. What landed stops being previewed. What didn't goes back to the agent once; after that, Pilot accepts what the code gives. To insist on a value, edit it again and Send.
171
176
  - The agent writes your changes in the project's own way (Tailwind classes, CSS modules, tokens…), never as inline styles.
172
- - **Sounds**, if you want them: ask your agent to turn Pilot's sounds on, or add `sounds: true` where your app loads Pilot yourself ([options](#commands-and-options)). Pilot then plays a short sound when changes are sent, when a job is done, when the agent replies or asks you something, when something's stuck, and when you mark a comment as solved. Dragging a field's wheel clicks softly as it turns; dragged slowly, it clicks on every value. An angle's dial taps once as you start turning it. After a reload, they play once you've clicked or typed on the page.
177
+ - **Sounds**, if you want them: ask your agent to turn Pilot's sounds on, or add `sounds: true` where your app loads Pilot yourself ([options](#commands-and-options)). Pilot then plays a short sound when changes are sent or discarded, when a job is done, when the agent replies or asks you something, when something's stuck, and when you mark a comment as solved. Dragging a field's wheel clicks softly as it turns; dragged slowly, it clicks on every value. An angle's dial taps once as you start turning it. After a reload, they play once you've clicked or typed on the page.
173
178
 
174
179
  ## Comments
175
180
 
@@ -191,7 +196,7 @@ Type `/` at the start of a word in the comment box:
191
196
  - **Props**, on a component's instance: lists the props that change how it looks. Reply with a line like `tone: dark` to change one.
192
197
  - **pilot-make-responsive** (`/responsive` finds it too): makes the element work at every screen width. Pilot checks the result at a phone width, each breakpoint and a wide desktop, and sends problems back to the agent once.
193
198
  - **pilot-break-and-fix**: makes the element hold up with real-world content. Pilot first puts odd content into a copy of the page (very long text, long words like URLs, many more items, images that fail to load or come in odd shapes) and measures what breaks at each width; the agent fixes exactly that, without changing how it looks with its usual content; Pilot tests again after.
194
- - **pilot-make-accessible**: fixes what Pilot's audit finds: text contrast (in light and dark mode), names for icon buttons, images and fields, a visible focus style, tap targets on phones, and animations for people who prefer reduced motion. The agent also reviews the code for what can't be measured, and changes nothing of your layout: Pilot checks every element's size and position at every width before and after. Its reply lists what it changed.
199
+ - **pilot-make-accessible**: fixes what Pilot's audit finds: text contrast (in light and dark mode), names for icon buttons and fields, an `alt` for every image that has none (a short description, or empty for a decorative one; its reply lists each one so you can check the wording; an image you gave an alt in Pilot is left as you wrote it), a visible focus style, tap targets on phones, and animations for people who prefer reduced motion. The agent also reviews the code for what can't be measured, and changes nothing of your layout: Pilot checks every element's size and position at every width before and after. Its reply lists what it changed.
195
200
 
196
201
  Pilot's three always end their reply with what Pilot measured itself ("**Pilot checked it:** 4 problems before, 0 now"), and send what's left back to the agent once.
197
202
 
@@ -288,7 +293,7 @@ mountPilot({
288
293
  launch: false, // true: open on load
289
294
  nameAttributes: ["data-block"], // attributes your project names elements with
290
295
  project: "my-app", // your package.json's name: npx usepilot runs for its own project's pages
291
- sounds: true, // sounds for sent, done, replies, stuck, solved, and dragging values. Default false
296
+ sounds: true, // sounds for sent, discarded, done, replies, stuck, solved, and dragging values. Default false
292
297
  });
293
298
  ```
294
299
 
package/README.md CHANGED
@@ -75,7 +75,7 @@ mountPilot({
75
75
  launch: false, // true: open on load
76
76
  nameAttributes: ["data-block"], // attributes your project names elements with
77
77
  project: "my-app", // your package.json's name: npx usepilot runs for its own project's pages
78
- sounds: true, // sounds for sent, done, replies, stuck, solved, and dragging values. Default false
78
+ sounds: true, // sounds for sent, discarded, done, replies, stuck, solved, and dragging values. Default false
79
79
  });
80
80
  ```
81
81