@flipova/foundation 3.1.1 → 3.2.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/CHANGES.md +10 -0
- package/README.md +25 -0
- package/package.json +7 -3
package/CHANGES.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- **The showroom: a living page for all the components.** `npm run showroom:dev` / `showroom:build`. For each of the 57
|
|
6
|
+
components of the contract: the real component rendered with the provider (flipova, gluestack, reusables, paper, tamagui)
|
|
7
|
+
and the theme (light/dark, every variant) you pick, a playground whose controls are generated from its props, an
|
|
8
|
+
example whose code is the file that runs, the props table, the sources of the flipova implementation and of its
|
|
9
|
+
recipe, and how each provider covers it. The catalogue is generated from the contract (`npm run showroom:gen`,
|
|
10
|
+
guarded by `showroom:gen:check` in the `codegen` step of CI); sources and coverage are read from the real files and
|
|
11
|
+
adapters at build time. A component added to the contract fails the check until it has a family and an example, and
|
|
12
|
+
every example is rendered by `showroom/showroom.test.tsx`. Each preview runs in its own iframe (a provider injects global
|
|
13
|
+
styles). The docs job builds the showroom into `website/static/showroom` and the Pages job publishes it under
|
|
14
|
+
`/showroom/`, with a link in the navbar. The website lockfile is synchronised (`npm ci` was failing on it).
|
|
5
15
|
- **Release system, one branch.** The pipeline (`.github/workflows/release.yml`) is now the Corral model (fingerprinted, no
|
|
6
16
|
repository-specific step); what proves foundation fit to ship lives in `package.json`: `ci:verify` (`scripts/ci-verify.js`) and
|
|
7
17
|
`ci:deliver`. The version is the git tag, stamped into the manifest inside the runner. DOCS.md sections 7 and 8 describe
|
package/README.md
CHANGED
|
@@ -194,10 +194,35 @@ outside its own provider; the flipova provider importing anything but `react` an
|
|
|
194
194
|
- The package no longer ships the `spring` theme; add your own with the GUI.
|
|
195
195
|
- `@flipova/foundation/tokens` is unchanged.
|
|
196
196
|
|
|
197
|
+
## The showroom
|
|
198
|
+
|
|
199
|
+
A living page for every component of the contract: the real component rendered with the provider and the theme you
|
|
200
|
+
pick, a playground whose controls come from its props, the code of an example, the props table, the sources of the
|
|
201
|
+
flipova implementation and of its recipe, and how each provider covers it (native, React Native, or the flipova
|
|
202
|
+
fallback). It is published with the documentation, under `/showroom/`.
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
npm run showroom:dev # the showroom on http://localhost:5173, live
|
|
206
|
+
npm run showroom:build # builds it into website/static/showroom (the docs build does it for you)
|
|
207
|
+
npm run showroom:gen # rewrites the catalogue from the contract (and the stub of a new example)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Nothing is copied by hand: `showroom/src/generated/catalog.json` is read from `components/contract/types.ts` (props, types,
|
|
211
|
+
the options of each union) and the page shows the sources and the coverage of the real files and adapters, so they cannot
|
|
212
|
+
drift. Adding a component to the contract fails `npm run showroom:gen:check` (CI) until the catalogue is regenerated, the
|
|
213
|
+
component has a family in `scripts/gen-showroom.js` and an example in `showroom/examples/<Name>.example.tsx`; the example
|
|
214
|
+
is the code the page shows, and it must render (`showroom/showroom.test.tsx`).
|
|
215
|
+
|
|
216
|
+
Each preview runs in a page of its own (an iframe), because a provider brings global styles of its own (tamagui) or
|
|
217
|
+
needs its own CSS (gluestack and reusables are styled by Tailwind classes, compiled here with `tailwind.config.js`).
|
|
218
|
+
On the web the showroom puts those classes on the DOM node itself instead of NativeWind: the look is the one of an app,
|
|
219
|
+
not a proof of NativeWind.
|
|
220
|
+
|
|
197
221
|
## Documentation
|
|
198
222
|
|
|
199
223
|
- [DOCS.md](DOCS.md): the maintainer guide (setup, architecture, tests, releasing, conformity).
|
|
200
224
|
- [COMPONENTS.md](COMPONENTS.md): the generated coverage table of the five providers.
|
|
225
|
+
- [The showroom](#the-showroom): every component, live, with its code, props and sources.
|
|
201
226
|
- Public documentation: `documentation/v1.0/` (French, written from the public templates of `flipova.assets` with
|
|
202
227
|
`corral docs`) published as a Docusaurus site from `website/` (`corral docs docusaurus --repo foundation`).
|
|
203
228
|
- `npm run docs:check` keeps all of the above consistent with the code (see [DOCS.md](DOCS.md#11-public-documentation)).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flipova/foundation",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Foundation of the Flipova design system: a provider-agnostic UI contract (57 components), five providers (flipova, gluestack, reusables, paper, tamagui), and a registry-driven theming toolchain with a local GUI.",
|
|
5
5
|
"author": "Flipova",
|
|
6
6
|
"license": "MIT",
|
|
@@ -138,7 +138,11 @@
|
|
|
138
138
|
"design:test": "node --test design/tools/test/*.test.js",
|
|
139
139
|
"components:doc": "UPDATE_COMPONENTS_DOC=1 vitest run components/alignment.test.ts",
|
|
140
140
|
"ci:verify": "node scripts/ci-verify.js",
|
|
141
|
-
"ci:deliver": "npm run deploy --"
|
|
141
|
+
"ci:deliver": "npm run deploy --",
|
|
142
|
+
"showroom:gen": "node scripts/gen-showroom.js",
|
|
143
|
+
"showroom:gen:check": "node scripts/gen-showroom.js --check",
|
|
144
|
+
"showroom:dev": "vite --config showroom/vite.config.ts",
|
|
145
|
+
"showroom:build": "vite build --config showroom/vite.config.ts"
|
|
142
146
|
},
|
|
143
147
|
"peerDependencies": {
|
|
144
148
|
"@rn-primitives/switch": ">=1.0.0",
|
|
@@ -203,7 +207,7 @@
|
|
|
203
207
|
"happy-dom": "21.0.4",
|
|
204
208
|
"js-yaml": "^5.2.1",
|
|
205
209
|
"jsdom": "^29.1.1",
|
|
206
|
-
"lottie-react": "^
|
|
210
|
+
"lottie-react": "^3.1.2",
|
|
207
211
|
"nativewind": "^4.2.7",
|
|
208
212
|
"postcss": "^8.5.28",
|
|
209
213
|
"prettier": "^3.3.0",
|