astralis-devtools 0.1.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -2,7 +2,58 @@
2
2
 
3
3
  All notable changes to `astralis-devtools`.
4
4
 
5
- ## 0.1.0 (2026-10-01)
5
+ ## 0.3.0 (2026-11-23)
6
+
7
+ Uses astralis-cli 0.8.0, so findings include `unknown-prop` and `unknown-state-prop` (astralis-ui 0.11.0).
8
+
9
+ ### Changed
10
+
11
+ - **A new page starts with the panel folded.** Reloading, or navigating to another page, minimises it to the launcher and ends picking. Reopening it returns to the same screen. A new query or hash, and a hot reload, leave it open.
12
+ - **Creating an issue clears the form** and opens Your issues, with a confirmation that links to it. The list is refreshed, and shows the new issue even while GitHub's own list catches up.
13
+ - **The Report buttons say what they do:** Create issue from here, and Open GitHub's form instead.
14
+ - An unsent report's words are kept when the page changes or reloads, for the browser tab.
15
+
16
+ ### Fixed
17
+
18
+ - A report cannot be sent twice, and the last words typed before sending are included.
19
+
20
+ ## 0.2.0 (2026-11-21)
21
+
22
+ Uses astralis-cli 0.6.0 and reads the prop descriptions astralis-ui 0.10.0 puts in its system spec.
23
+
24
+ ### Added
25
+
26
+ - **Every prop a component takes, on its page.** Under the props it was
27
+ given, the component's page now lists every prop the installed system spec
28
+ says it accepts: its own props first, then its style props by group (Box,
29
+ Placement, Text…). Each shows the values it takes (a long scale shows its
30
+ first few and opens to the rest), whether it is required, its description
31
+ and default where the spec has them, and the value this instance uses. A
32
+ search finds a prop by name, long spelling (`padding` finds `p`) or value.
33
+ Groups other than the first open when asked for. On a trigger wrapping a
34
+ Button, both can be listed.
35
+ - **Minimize.** The panel's header has a minimize button that folds it down
36
+ to the launcher, leaving the page free to click. The launcher's mark,
37
+ `Shift+Alt+A` or Escape from inside the panel do the same, and bringing it
38
+ back returns to the screen it was on. Whether it is open stays for the
39
+ browser tab's session, as before.
40
+
41
+ ### Changed
42
+
43
+ - `Shift+Alt+A` brings the panel back on the screen it was minimized on,
44
+ instead of on Home.
45
+ - After a report is sent, a confirmation shows **Open the issue on GitHub**
46
+ and says how to add a screenshot or a file there. No tab opens by itself.
47
+
48
+ ### Removed
49
+
50
+ - **The Report screen's screenshot.** Capturing the tab could include the
51
+ open panel itself, and GitHub's API cannot attach images anyway. Pictures
52
+ and files are added on GitHub, in the issue. The snapshot DevTools builds
53
+ no longer carries a `screenshot` field; the snapshot format still accepts
54
+ one, so snapshots filed before and `astralis report` are unchanged.
55
+
56
+ ## 0.1.0 (2026-11-19)
6
57
 
7
58
  The first release: a development overlay for Astralis UI. A launcher you can
8
59
  drag anywhere on the page opens a panel with five screens.
package/README.md CHANGED
@@ -1,82 +1,88 @@
1
- # astralis-devtools
2
-
3
- A development overlay for [Astralis UI](https://astralis-ui.com). A small
4
- launcher, which you can drag anywhere on the page, opens a panel with five
5
- screens:
6
-
7
- - **Home.** What is on the page at a glance.
8
- - **Components.** Every Astralis component on the page, grouped by kind. Each
9
- opens a page of its own: its name, the props it was given, how it reaches
10
- the browser (Server Component, client island or Client Component), where it
11
- sits, a link to its documentation, and the findings about it. This includes
12
- Server Components, which React DevTools cannot see because they never
13
- hydrate.
14
- - **Findings.** What `astralis validate` says is broken in your project, kept
15
- current as you save. On Next.js, the files that render the current page are
16
- listed first.
17
- - **Recommendations.** The validator's warnings: what works but could be
18
- better.
19
- - **Report.** Open a problem as a GitHub issue on the Astralis repository,
20
- from your own account, with an issue snapshot: the components under the one
21
- you picked with their props, the versions in use, the validator's findings
22
- and a small reproduction. You see the exact JSON first, page text is
23
- replaced by placeholders unless you include it, and nothing is sent until
24
- you press Send. **Your issues** lists the issues you have opened and where
25
- each stands.
26
-
27
- `Shift+Alt+A` opens and closes it. `Shift+Alt+C` picks a component on the page
28
- and opens its page.
29
-
30
- It runs in development only. Production builds contain none of it, and the
31
- library's production HTML carries no DevTools attributes.
32
-
33
- ## Set up
34
-
35
- ```bash
36
- npx astralis-cli init --devtools
37
- ```
38
-
39
- New projects made with `npm create astralis` have it already. To wire it by hand:
40
-
41
- **Next.js.** Add the component to the root layout:
42
-
43
- ```tsx
44
- import { AstralisDevTools } from "astralis-devtools/next";
45
-
46
- <body>
47
- {children}
48
- <AstralisDevTools />
49
- </body>
50
- ```
51
-
52
- Then add the bridge's route at `app/api/astralis-devtools/[...path]/route.ts`:
53
-
54
- ```ts
55
- export { GET, POST } from "astralis-devtools/next/route";
56
- ```
57
-
58
- **Vite.** Add the plugin:
59
-
60
- ```ts
61
- import { astralisDevtools } from "astralis-devtools/vite";
62
-
63
- export default defineConfig({ plugins: [react(), astralisDevtools()] });
64
- ```
65
-
66
- ## How it works
67
-
68
- In development, every astralis-ui component names itself on the element it
69
- renders (`data-astralis="Card.Body"`), together with the props it was
70
- configured with. The overlay reads those attributes.
71
-
72
- A small bridge runs inside your dev server. It validates your `.tsx` and
73
- `.jsx` files against the installed astralis-ui's `system-spec.json` and
74
- re-validates each file when you save it. It answers requests from your own
75
- machine only. On Next.js it is the route above, and it returns 404 in
76
- production. On Vite it is dev-server middleware that `vite build` never loads.
77
-
78
- The overlay talks only to your own dev server. The bridge talks to GitHub only for you: to sign you in with a code (through the Astralis DevTools GitHub App, which can only read and write issues on the Astralis repository), to open a report you have read and sent, and, while you are signed in, to list your issues. The token is kept in a file in your user config directory that only you can read, never in the page, and `astralis report` shares it.
79
-
80
- ## License
81
-
82
- MIT
1
+ # astralis-devtools
2
+
3
+ A development overlay for [Astralis UI](https://astralis-ui.com). A small
4
+ launcher, which you can drag anywhere on the page, opens a panel with five
5
+ screens:
6
+
7
+ - **Home.** What is on the page at a glance.
8
+ - **Components.** Every Astralis component on the page, grouped by kind. Each
9
+ opens a page of its own: its name, the props it was given, every prop it
10
+ takes with the values each accepts (searchable by name or value), how it
11
+ reaches the browser (Server Component, client island or Client Component), where it
12
+ sits, a link to its documentation, and the findings about it. This includes
13
+ Server Components, which React DevTools cannot see because they never
14
+ hydrate.
15
+ - **Findings.** What `astralis validate` says is broken in your project, kept
16
+ current as you save. On Next.js, the files that render the current page are
17
+ listed first.
18
+ - **Recommendations.** The validator's warnings: what works but could be
19
+ better.
20
+ - **Report.** Open a problem as a GitHub issue on the Astralis repository,
21
+ from your own account, with an issue snapshot: the components under the one
22
+ you picked with their props, the versions in use, the validator's findings
23
+ and a small reproduction. You see the exact JSON first, page text is
24
+ replaced by placeholders unless you include it, and nothing is sent until
25
+ you press **Create issue from here**, which creates it without leaving the
26
+ DevTools and shows it under **Your issues**, with the others you have opened
27
+ and where each stands. To add a screenshot or a file, open the issue on
28
+ GitHub and drop it in there. **Open GitHub's form instead** needs no sign-in.
29
+
30
+ The minimize button in the panel's header, `Shift+Alt+A`, or Escape from
31
+ inside the panel fold it down to the launcher, so the page is free to use; the
32
+ launcher or `Shift+Alt+A` brings it back where it was. Refreshing or going to
33
+ another page folds it too, and keeps a report you have not sent. `Shift+Alt+C` picks a
34
+ component on the page and opens its page.
35
+
36
+ It runs in development only. Production builds contain none of it, and the
37
+ library's production HTML carries no DevTools attributes.
38
+
39
+ ## Set up
40
+
41
+ ```bash
42
+ npx astralis-cli init --devtools
43
+ ```
44
+
45
+ New projects made with `npm create astralis` have it already. To wire it by hand:
46
+
47
+ **Next.js.** Add the component to the root layout:
48
+
49
+ ```tsx
50
+ import { AstralisDevTools } from "astralis-devtools/next";
51
+
52
+ <body>
53
+ {children}
54
+ <AstralisDevTools />
55
+ </body>
56
+ ```
57
+
58
+ Then add the bridge's route at `app/api/astralis-devtools/[...path]/route.ts`:
59
+
60
+ ```ts
61
+ export { GET, POST } from "astralis-devtools/next/route";
62
+ ```
63
+
64
+ **Vite.** Add the plugin:
65
+
66
+ ```ts
67
+ import { astralisDevtools } from "astralis-devtools/vite";
68
+
69
+ export default defineConfig({ plugins: [react(), astralisDevtools()] });
70
+ ```
71
+
72
+ ## How it works
73
+
74
+ In development, every astralis-ui component names itself on the element it
75
+ renders (`data-astralis="Card.Body"`), together with the props it was
76
+ configured with. The overlay reads those attributes.
77
+
78
+ A small bridge runs inside your dev server. It validates your `.tsx` and
79
+ `.jsx` files against the installed astralis-ui's `system-spec.json` and
80
+ re-validates each file when you save it. It answers requests from your own
81
+ machine only. On Next.js it is the route above, and it returns 404 in
82
+ production. On Vite it is dev-server middleware that `vite build` never loads.
83
+
84
+ The overlay talks only to your own dev server. The bridge talks to GitHub only for you: to sign you in with a code (through the Astralis DevTools GitHub App, which can only read and write issues on the Astralis repository), to open a report you have read and sent, and, while you are signed in, to list your issues. The token is kept in a file in your user config directory that only you can read, never in the page.
85
+
86
+ ## License
87
+
88
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astralis-devtools",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Development overlay for Astralis UI: inspect any component on the page (Server Components included) and see the validator's findings live as you edit. Next.js and Vite.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -48,7 +48,7 @@
48
48
  "node": "^22.18.0 || >=24.11.0"
49
49
  },
50
50
  "dependencies": {
51
- "astralis-cli": "^0.5.0"
51
+ "astralis-cli": "^0.8.0"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": "^19.1.1"
@@ -19,8 +19,8 @@ import {
19
19
  /** How long a search for similar issues is reused: typing in the form must not search GitHub per keystroke. */
20
20
  const SIMILAR_TTL_MS = 60_000;
21
21
 
22
- /* The bridge's GitHub session: signing in with a code, the saved sign-in
23
- (shared with `astralis report`), and the reporter's issues. The token stays
22
+ /* The bridge's GitHub session: signing in with a code, the saved sign-in,
23
+ and the reporter's issues. The token stays
24
24
  in this process and in the user's config file; the page only ever learns
25
25
  the login, the code to enter, and the issues. */
26
26