foss-design 0.1.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 (66) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +43 -0
  3. package/dist/cli.js +3064 -0
  4. package/dist/runtime/base.css +8 -0
  5. package/dist/runtime/index.js +357 -0
  6. package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  7. package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  8. package/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
  9. package/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
  10. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  11. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  12. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
  13. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
  14. package/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  15. package/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  16. package/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
  17. package/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  18. package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  19. package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  20. package/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
  21. package/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
  22. package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  23. package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  24. package/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
  25. package/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
  26. package/dist/viewer/assets/ibm-plex-sans-cyrillic-400-normal-BTotfTJu.woff +0 -0
  27. package/dist/viewer/assets/ibm-plex-sans-cyrillic-400-normal-DZqxrq2p.woff2 +0 -0
  28. package/dist/viewer/assets/ibm-plex-sans-cyrillic-500-normal-ByOcLdNv.woff +0 -0
  29. package/dist/viewer/assets/ibm-plex-sans-cyrillic-500-normal-CocWQlwt.woff2 +0 -0
  30. package/dist/viewer/assets/ibm-plex-sans-cyrillic-600-normal-71GNu3SW.woff2 +0 -0
  31. package/dist/viewer/assets/ibm-plex-sans-cyrillic-600-normal-BGq0mW3O.woff +0 -0
  32. package/dist/viewer/assets/ibm-plex-sans-cyrillic-ext-400-normal-Dsrv2Tcn.woff +0 -0
  33. package/dist/viewer/assets/ibm-plex-sans-cyrillic-ext-400-normal-g30qAdWV.woff2 +0 -0
  34. package/dist/viewer/assets/ibm-plex-sans-cyrillic-ext-500-normal-Cs5J6C77.woff2 +0 -0
  35. package/dist/viewer/assets/ibm-plex-sans-cyrillic-ext-500-normal-DB5PtV2g.woff +0 -0
  36. package/dist/viewer/assets/ibm-plex-sans-cyrillic-ext-600-normal-Bz0x94Yp.woff +0 -0
  37. package/dist/viewer/assets/ibm-plex-sans-cyrillic-ext-600-normal-DUMzJB7m.woff2 +0 -0
  38. package/dist/viewer/assets/ibm-plex-sans-greek-400-normal-D9ESIMu3.woff +0 -0
  39. package/dist/viewer/assets/ibm-plex-sans-greek-400-normal-_efipK4i.woff2 +0 -0
  40. package/dist/viewer/assets/ibm-plex-sans-greek-500-normal-CuWXN6rf.woff +0 -0
  41. package/dist/viewer/assets/ibm-plex-sans-greek-500-normal-JMMifIXV.woff2 +0 -0
  42. package/dist/viewer/assets/ibm-plex-sans-greek-600-normal-D-CqTdkO.woff +0 -0
  43. package/dist/viewer/assets/ibm-plex-sans-greek-600-normal-DzTrcv_p.woff2 +0 -0
  44. package/dist/viewer/assets/ibm-plex-sans-latin-400-normal-CDDApCn2.woff2 +0 -0
  45. package/dist/viewer/assets/ibm-plex-sans-latin-400-normal-CYLoc0-x.woff +0 -0
  46. package/dist/viewer/assets/ibm-plex-sans-latin-500-normal-6ng42L7E.woff2 +0 -0
  47. package/dist/viewer/assets/ibm-plex-sans-latin-500-normal-BgVn5rGT.woff +0 -0
  48. package/dist/viewer/assets/ibm-plex-sans-latin-600-normal-Cu4Hd6ag.woff +0 -0
  49. package/dist/viewer/assets/ibm-plex-sans-latin-600-normal-CuJfVYMP.woff2 +0 -0
  50. package/dist/viewer/assets/ibm-plex-sans-latin-ext-400-normal-C5H60-Va.woff2 +0 -0
  51. package/dist/viewer/assets/ibm-plex-sans-latin-ext-400-normal-RBey6euL.woff +0 -0
  52. package/dist/viewer/assets/ibm-plex-sans-latin-ext-500-normal-D0aIdm-b.woff +0 -0
  53. package/dist/viewer/assets/ibm-plex-sans-latin-ext-500-normal-DakdToA3.woff2 +0 -0
  54. package/dist/viewer/assets/ibm-plex-sans-latin-ext-600-normal-DIrixKbi.woff +0 -0
  55. package/dist/viewer/assets/ibm-plex-sans-latin-ext-600-normal-DOrvGEcy.woff2 +0 -0
  56. package/dist/viewer/assets/ibm-plex-sans-vietnamese-400-normal-DG4YqDda.woff2 +0 -0
  57. package/dist/viewer/assets/ibm-plex-sans-vietnamese-400-normal-fK1oJ5dG.woff +0 -0
  58. package/dist/viewer/assets/ibm-plex-sans-vietnamese-500-normal-BEb3_waV.woff +0 -0
  59. package/dist/viewer/assets/ibm-plex-sans-vietnamese-500-normal-e4dixQRQ.woff2 +0 -0
  60. package/dist/viewer/assets/ibm-plex-sans-vietnamese-600-normal-DgdngZtN.woff +0 -0
  61. package/dist/viewer/assets/ibm-plex-sans-vietnamese-600-normal-DpPYBSTl.woff2 +0 -0
  62. package/dist/viewer/assets/index-Blh90C72.css +2 -0
  63. package/dist/viewer/assets/index-CN6gdSK-.js +166 -0
  64. package/dist/viewer/favicon.svg +1 -0
  65. package/dist/viewer/index.html +23 -0
  66. package/package.json +87 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Wiolett Industries
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # foss-design
2
+
3
+ Design canvases and design systems on your machine: live, animated, clickable screens on an infinite canvas, served locally from a gitignored `.design` folder. Built for coding agents (Claude Code, Codex and other Agent Skills clients), usable by hand.
4
+
5
+ ```bash
6
+ npx -y foss-design init # .design/ + .gitignore entry
7
+ npx -y foss-design system init # starter design system
8
+ npx -y foss-design new onboarding # a canvas with one screen
9
+ npx -y foss-design preview # the local viewer; prints its URL
10
+ ```
11
+
12
+ Or install the `design` command globally: `npm i -g foss-design`.
13
+
14
+ ![A canvas in the foss-design viewer: four live phone screens of an onboarding flow](https://raw.githubusercontent.com/wiolett-industries/foss-design/main/docs/images/canvas.png)
15
+
16
+ ![The inspector: a button selected on a live screen, with its box model and design tokens](https://raw.githubusercontent.com/wiolett-industries/foss-design/main/docs/images/inspector.png)
17
+
18
+ ## What you get
19
+
20
+ - **Canvases.** `.design/canvas/<id>/canvas.json` lays out pages → sections → screens, URL frames, notes and images. Screens are React components (`.tsx`, default export) or HTML pages, each rendered live in its own frame with hot reload: animations, forms and navigation work. Frames use device presets (`phone`, `tablet`, `desktop`…) or any size, and `"height": "auto"` for long pages.
21
+ - **A design system.** `.design/system/` holds `tokens.css` (light and dark CSS variables mapped to Tailwind v4 utilities), components importable as `@system/components/…`, specimens, guidelines and assets. The viewer renders it as a style guide at `/system`.
22
+ - **Batteries.** Every screen gets Tailwind v4 with the tokens, React, `motion`, `lucide-react`, `clsx` and `tailwind-merge`, even in projects without them; the project's own packages and `design.json` aliases work too. `import { go, useTheme, useScreen } from '@design/runtime'` links screens into prototypes.
23
+ - **Checks for agents.** `design check --render` loads every screen in Chrome and reports errors; `design shot` writes PNGs an agent can look at.
24
+ - **Sharing.** `design build --tar` produces a static site of the canvases and the system for any static host.
25
+
26
+ ## Commands
27
+
28
+ | Command | What it does |
29
+ | --- | --- |
30
+ | `init [--name] [--no-gitignore]` | Create `.design` and ignore it in git. |
31
+ | `system init [--name] [--empty]` | Scaffold `.design/system`. |
32
+ | `new <canvas> [--title] [--empty]` | Scaffold a canvas. |
33
+ | `preview [--open [path]] [--port] [--restart] [--foreground]` | Start or reuse the viewer and print its URL. |
34
+ | `stop`, `status` | Stop the viewer; show its state and a project summary. |
35
+ | `check [canvas…] [--render] [--json]` | Validate the project; `--render` also loads every screen in Chrome. |
36
+ | `shot <canvas>[/<screen>] [--page] [--theme] [--out] [--overview]` | Screenshot screens or whole pages. |
37
+ | `build [canvas…] [--out] [--tar]` | Static site. |
38
+
39
+ Requirements: Node.js 20.19+. `check --render` and `shot` need an installed Chrome, Chromium, Edge or Brave, or `DESIGN_CHROME` pointing at one.
40
+
41
+ Formats, agent skills and plugins: https://github.com/wiolett-industries/foss-design
42
+
43
+ MIT © Wiolett Industries