teallemur 0.0.0-stage → 0.15.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/LICENSE ADDED
@@ -0,0 +1,110 @@
1
+ # Functional Source License, Version 1.1, MIT Future License
2
+
3
+ ## Abbreviation
4
+
5
+ FSL-1.1-MIT
6
+
7
+ ## Notice
8
+
9
+ Copyright 2026 Betalgo Up Ltd
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the MIT license that is effective on the second anniversary of the date we make
91
+ the Software available. On or after that date, you may use the Software under
92
+ the MIT license, in which case the following will apply:
93
+
94
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
95
+ this software and associated documentation files (the "Software"), to deal in
96
+ the Software without restriction, including without limitation the rights to
97
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
98
+ of the Software, and to permit persons to whom the Software is furnished to do
99
+ so, subject to the following conditions:
100
+
101
+ The above copyright notice and this permission notice shall be included in all
102
+ copies or substantial portions of the Software.
103
+
104
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
105
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
106
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
107
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
108
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
109
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
110
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,193 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <img src="src/viewer/design/assets/mark.svg" width="72" height="72" alt="">
3
+ </p>
2
4
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
5
+ <h1 align="center">Teal Lemur</h1>
6
+
7
+ <p align="center"><strong>Review design the way you review code.</strong></p>
8
+
9
+ <p align="center">
10
+ Keep your product's design in your own repository, as plain HTML and CSS.<br>
11
+ Teal Lemur checks it, lays every screen out on one board,<br>
12
+ and gives each change a before-and-after preview anyone can open.
13
+ </p>
14
+
15
+ Prefer not to run it yourself? [Hosted Teal Lemur](https://teallemur.com) builds your boards and previews for you: 14 days free, no card.
16
+
17
+ ![A Teal Lemur board: a notes app's screens at phone size, each with a note on what it is for](docs/images/board.png)
18
+
19
+ ## With Teal Lemur, your team
20
+
21
+ - **Always knows which design is current.** It's the one on `main`, next to
22
+ the code, with its whole history in git. Nobody asks "is this the latest
23
+ version?" again.
24
+ - **Approves design in a pull request.** Each change gets its own preview
25
+ page. A founder, a client or a teammate opens it, compares before and after,
26
+ and approves by merging. They don't need a design tool or an account.
27
+ - **Lets AI agents design without losing the style.** Agents already write
28
+ good HTML and CSS. The check keeps them inside your design system: every
29
+ colour and font comes from your tokens, and every screen sits where it
30
+ belongs. Agents can read the [agent skill](skills/teallemur/SKILL.md) to
31
+ learn the rules.
32
+ - **Owns all of it.** There's no lock-in and no server, and nothing tracks
33
+ you. The output is static files you can host anywhere, and its pages load
34
+ nothing from outside your own site.
35
+
36
+ ## See every change before you approve it
37
+
38
+ ![A preview of one pull request: the notes list before and after pinned notes moved to the top](docs/images/preview.png)
39
+
40
+ Build a preview for a pull request, and Teal Lemur shows what changed, screen by
41
+ screen. It shows before and after side by side or as an overlay, along with
42
+ every token whose value changed.
43
+
44
+ ## Your design system on one page
45
+
46
+ ![The design system overview: every colour grouped by role, with contrast ratios for text](docs/images/overview.png)
47
+
48
+ Teal Lemur reads your `tokens.css` and draws every colour, font, size and
49
+ spacing value. Each text colour shows its contrast ratio, so you can spot
50
+ unreadable text before anyone ships it.
51
+
52
+ ## Try it in a minute
53
+
54
+ You need Node.js 24 or later. This builds the board for the example notes app:
55
+
56
+ ```sh
57
+ git clone --depth 1 https://github.com/betalgo/teallemur.git
58
+ cd teallemur
59
+ npm ci # installs and builds the tool
60
+ node dist/cli.js build examples/harbor --out site
61
+ python3 -m http.server 8000 --directory site # or any static file server
62
+ ```
63
+
64
+ Then open <http://localhost:8000/harbor/>.
65
+
66
+ ## Use it on your own design
67
+
68
+ Add it to the project that holds your design:
69
+
70
+ ```sh
71
+ npm install --save-dev teallemur
72
+ ```
73
+
74
+ Or install a release straight from GitHub, picking its tag from the
75
+ [tags page](https://github.com/betalgo/teallemur/tags):
76
+
77
+ ```sh
78
+ npm install --save-dev github:betalgo/teallemur#<tag>
79
+ ```
80
+
81
+ ```sh
82
+ npx teallemur check my-design # find problems, one per line
83
+ npx teallemur build my-design --out site # write the board to site/<product>/
84
+ npx teallemur hub --out site --title "Our designs" # one home page for every product in site/
85
+ ```
86
+
87
+ To preview a pull request, build it with `--base` pointing at a checkout of
88
+ the base branch:
89
+
90
+ ```sh
91
+ npx teallemur build my-design --base base-checkout --out site --label "PR 14: pinned notes"
92
+ ```
93
+
94
+ `check` says exactly what's wrong and where:
95
+
96
+ ```text
97
+ screens/_shared/app.css:145: tokens/colour-literal: colour literal "#2a55c9" outside design-system/tokens.css; use a var(--...) token
98
+ screens/notes/inbox--empty.html:1: html/missing-title: page has no <title>
99
+ teallemur: 2 errors
100
+ ```
101
+
102
+ ## Run it in GitHub Actions
103
+
104
+ Two example workflows in [examples/ci](examples/ci/) run these commands for
105
+ you. Copy the one you need. Each run uploads the site as an artifact you can
106
+ download; where you host it is up to you.
107
+
108
+ - **[design-repo.yml](examples/ci/design-repo.yml)**, for the repo that holds
109
+ your design. Each pull request gets checked and gets a before-and-after
110
+ preview, and `main` gets the board. Copy it to `.github/workflows/design.yml`.
111
+ It needs no secrets.
112
+ - **[design-hub.yml](examples/ci/design-hub.yml)**, for one site with the
113
+ boards of several design repos and a hub page. Put it in a repo of its own
114
+ and list your design repos in it.
115
+
116
+ If those design repos are private, the hub needs read access to them. Set up
117
+ one of these in the hub repo's **Settings → Secrets and variables → Actions**:
118
+
119
+ - **A token.** Create a
120
+ [fine-grained personal access token](https://github.com/settings/personal-access-tokens/new)
121
+ for the design repos, with **Contents: Read-only**. Save it as the secret
122
+ `DESIGN_REPOS_TOKEN`.
123
+ - **Your own GitHub App.**
124
+ [Register an app](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app)
125
+ with **Contents: Read-only** (it needs no webhook, so untick **Active**) and
126
+ install it on the design repos. Save its Client ID as the variable
127
+ `DESIGN_APP_CLIENT_ID`, and a private key you generate on its settings page
128
+ as the secret `DESIGN_APP_PRIVATE_KEY`. Each run turns them into a token
129
+ that expires within the hour.
130
+
131
+ Teal Lemur itself never signs in to anything: it only reads the folders the
132
+ workflow checks out.
133
+
134
+ ## A design repo is just files
135
+
136
+ ```text
137
+ design.json the product's name, screen sizes and flows
138
+ design-system/tokens.css every colour, font and size, in one file
139
+ design-system/components.css shared styles, built from the tokens
140
+ design-system/components/button.html one page per component
141
+ screens/notes/inbox--default.html one HTML file per screen and state
142
+ screens/notes/inbox--empty.html
143
+ ```
144
+
145
+ A screen is a normal web page that uses your tokens and components:
146
+
147
+ ```html
148
+ <!doctype html>
149
+ <html lang="en">
150
+ <head>
151
+ <meta charset="utf-8">
152
+ <title>Inbox · empty</title>
153
+ <meta name="design:note" content="A new account before its first note.">
154
+ <link rel="stylesheet" href="../../design-system/tokens.css">
155
+ <link rel="stylesheet" href="../../design-system/components.css">
156
+ </head>
157
+ <body>
158
+ <h1>Your first note</h1>
159
+ <a class="button button--primary" href="note--default.html">Write a note</a>
160
+ </body>
161
+ </html>
162
+ ```
163
+
164
+ To start your own, copy [`examples/harbor`](examples/harbor/).
165
+
166
+ ## Learn more
167
+
168
+ The [docs](docs/README.md) cover the design repo layout, every check rule,
169
+ every command and option, the viewer, and hosting the output. What changed in
170
+ each release is in the [changelog](CHANGELOG.md).
171
+
172
+ ## Contributing
173
+
174
+ Bug reports and fixes are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) to
175
+ get set up and for the terms a contribution comes in under. To report a
176
+ security problem privately, follow [SECURITY.md](SECURITY.md).
177
+
178
+ ## Licence
179
+
180
+ Teal Lemur is source-available under the Functional Source License
181
+ (FSL-1.1-MIT). In plain words:
182
+
183
+ - You may use it, change it and host it yourself, for free.
184
+ - You may not sell it as a competing product or hosted service.
185
+ - Each version becomes MIT open source two years after its release.
186
+
187
+ The exact terms are in [LICENSE](LICENSE).
188
+
189
+ The fonts in the viewer keep their own SIL Open Font License.
190
+
191
+ The licence covers the code. It doesn't cover the Teal Lemur name or logo,
192
+ which belong to Betalgo Up Ltd. Please don't use them for a fork or for a
193
+ service of your own.