@whzxc/agent-design-gallery 0.10.0 → 0.13.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.
Files changed (52) hide show
  1. package/README.md +3 -3
  2. package/package.json +1 -1
  3. package/public/annotations.js +816 -0
  4. package/public/app.js +245 -12
  5. package/public/assets.js +4 -13
  6. package/public/frame-identity.js +223 -0
  7. package/public/icons.js +1 -0
  8. package/public/index.html +3 -0
  9. package/public/selection.js +1 -1
  10. package/public/style.css +72 -2
  11. package/src/annotations.mjs +238 -0
  12. package/src/cli-output.mjs +25 -2
  13. package/src/cli.mjs +46 -7
  14. package/src/http.mjs +2 -1
  15. package/src/hub/instances.mjs +1 -1
  16. package/src/hub/registry.mjs +1 -1
  17. package/src/hub.mjs +2 -2
  18. package/src/server.mjs +59 -11
  19. package/src/service.mjs +1 -1
  20. package/src/toolkit/arch-overlay.mjs +1 -1
  21. package/src/toolkit/asset-rules.mjs +42 -3
  22. package/src/toolkit/build-store.mjs +1 -1
  23. package/src/toolkit/build-worker.mjs +1 -1
  24. package/src/toolkit/build.mjs +27 -11
  25. package/src/toolkit/commands.mjs +60 -8
  26. package/src/toolkit/config.mjs +2 -1
  27. package/src/toolkit/diff.mjs +4 -1
  28. package/src/toolkit/document.mjs +6 -6
  29. package/src/toolkit/frame-document.mjs +1 -1
  30. package/src/toolkit/frame-facets.mjs +167 -0
  31. package/src/toolkit/frame-identity.mjs +100 -0
  32. package/src/toolkit/frame-observation.mjs +147 -0
  33. package/src/toolkit/frame-primitives.mjs +85 -0
  34. package/src/toolkit/html.mjs +1 -0
  35. package/src/toolkit/impact-inputs.mjs +2 -21
  36. package/src/toolkit/impact.mjs +3 -24
  37. package/src/toolkit/input-generation.mjs +51 -0
  38. package/src/toolkit/inspect-encoding.mjs +459 -0
  39. package/src/toolkit/inspect-observation.mjs +56 -0
  40. package/src/toolkit/inspect-output.mjs +169 -0
  41. package/src/toolkit/inspect-styles.mjs +34 -0
  42. package/src/toolkit/inspect.d.ts +118 -0
  43. package/src/toolkit/inspect.mjs +125 -0
  44. package/src/toolkit/owner-observation.mjs +23 -189
  45. package/src/toolkit/owner-search.mjs +2 -2
  46. package/src/toolkit/owner.mjs +33 -4
  47. package/src/toolkit/part-diff.mjs +2 -0
  48. package/src/toolkit/part-snapshot.mjs +15 -23
  49. package/src/toolkit/project-index.mjs +22 -5
  50. package/src/toolkit/project.mjs +52 -6
  51. package/src/toolkit/runtime.d.ts +7 -5
  52. package/src/toolkit/runtime.mjs +20 -7
package/README.md CHANGED
@@ -31,7 +31,7 @@ On macOS, `adg service migrate` stops `org.svg-design-gallery.hub`, moves its en
31
31
  `svg-design-gallery` to `agent-design-gallery`, and replaces the LaunchAgent with `org.agent-design-gallery.hub`
32
32
  using the current Node and CLI paths and the previous port. It resolves the source from the old LaunchAgent's
33
33
  `--state-dir`, or `$XDG_STATE_HOME/svg-design-gallery` (default `~/.local/state/svg-design-gallery`). The destination
34
- is `$XDG_STATE_HOME/agent-design-gallery` by default; `--state-dir` selects a different destination. It refuses an
34
+ is `~/.agent-design-gallery` by default; `--state-dir` selects a different destination. It refuses an
35
35
  existing target directory or new LaunchAgent. It prints steps and then lists other LaunchAgents still referencing
36
36
  the old state path without editing them or printing keys. Registry, preferences, caches and logs move together.
37
37
  The stored key prefix changes to `adg_`; update browser access with the new key through `adg serve --print-key`.
@@ -73,7 +73,7 @@ Design sources are TSX files directly in `design/components/`, `design/modules/`
73
73
 
74
74
  Choose the **Tokens** tab to inspect the current project's `design/tokens.css`. Filter by category in Contents or search the table by name or value from the toolbar, compare light and dark declarations side by side, and click a token name to copy it. Colors show swatches, and pixel values for spacing, sizes, and radii show a visual sample. Share `?scope=tokens` to open the catalog directly.
75
75
 
76
- Follow the [design asset rules](docs/asset-rules.md) for placement, ownership, states, frame names, fidelity, lifecycle and studies. The [adoption guide](docs/asset-rules.md#adopting-an-existing-project) covers inventory, a read-only audit with `file / problem / suggested fix` findings, review batches, and the mappings/governance each consumer keeps locally. `sources` orders production layers from lower to higher; `check` reports upward imports. Set `check: { importDirection: false }` to opt out of that lint while keeping frame checks.
76
+ Follow the [design asset rules](docs/asset-rules.md) for placement, ownership, states, frame names, fidelity, lifecycle and studies. The [adoption guide](docs/asset-rules.md#adopting-an-existing-project) covers inventory, a read-only audit with `file / problem / suggested fix` findings, check-decided governance steps, the implementation checks a consumer adds, and the mappings/governance each consumer keeps locally. `sources` orders production layers from lower to higher; `check` reports upward imports. Set `check: { importDirection: false }` to opt out of that lint while keeping frame checks.
77
77
 
78
78
  A component source is one set: frames run in source order with 32px gaps, wrap before 1600px, and have 48px between rows. Sets pad forms by 24px at the sides and bottom and 36px at the top. A surface source is one flow: each frame receives 16px padding and follows the flow layout. Frame notes appear in the inspector, outside the drawing. Full sheet has been removed; choose a declared form or frame.
79
79
 
@@ -92,7 +92,7 @@ Files group by directory unless `gallery.json` supplies project groups. Entries
92
92
  }
93
93
  ```
94
94
 
95
- Unlisted assets remain in directory groups. Projects own their TSX sources, artwork, tokens, configuration, and Git history. Theme, sidebar, inspector, and per-directory camera and selection preferences stay in `$XDG_STATE_HOME/agent-design-gallery/state.json`, defaulting to `~/.local/state/agent-design-gallery/state.json`. Refreshing or reopening a directory restores its zoom, position, selected component and form. Canvas asset headings show the source's last modification time in local time; hover for the complete timestamp. `--state-dir` isolates preferences.
95
+ Unlisted assets remain in directory groups. Projects own their TSX sources, artwork, tokens, configuration, and Git history. Theme, sidebar, inspector, and per-directory camera and selection preferences stay in `~/.agent-design-gallery/state.json`, defaulting to `~/.agent-design-gallery/state.json`. Refreshing or reopening a directory restores its zoom, position, selected component and form. Canvas asset headings show the source's last modification time in local time; hover for the complete timestamp. `--state-dir` isolates preferences.
96
96
 
97
97
  ## Design toolkit
98
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whzxc/agent-design-gallery",
3
- "version": "0.10.0",
3
+ "version": "0.13.1",
4
4
  "description": "Local TSX design toolkit and SVG viewer",
5
5
  "type": "module",
6
6
  "license": "MIT",