Skip to content

Commit b45ee2a

Browse files
committed
Remove demo, change pnpm to npm, support react 18 & 19
1 parent c2adea3 commit b45ee2a

22 files changed

Lines changed: 5177 additions & 4539 deletions

.github/workflows/ci.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,31 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v4
1616

17-
- uses: pnpm/action-setup@v4
17+
- uses: actions/setup-node@v4
1818
with:
19-
version: 10.30.3
19+
node-version: 22
20+
cache: npm
21+
22+
- run: npm ci
23+
- run: npm run verify
24+
25+
react-compat:
26+
runs-on: ubuntu-latest
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
react-major: [18, 19]
31+
32+
steps:
33+
- uses: actions/checkout@v4
2034

2135
- uses: actions/setup-node@v4
2236
with:
2337
node-version: 22
24-
cache: pnpm
38+
cache: npm
2539

26-
- run: pnpm install --frozen-lockfile
27-
- run: pnpm verify
40+
- run: npm ci
41+
- run: npm install -w @protohiro/state-layers --no-save -D react@^${{ matrix.react-major }} react-dom@^${{ matrix.react-major }} @types/react@^${{ matrix.react-major }} @types/react-dom@^${{ matrix.react-major }}
42+
- run: npm run -w @protohiro/state-layers typecheck
43+
- run: npm run -w @protohiro/state-layers test
44+
- run: npm run -w @protohiro/state-layers build

.github/workflows/release.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,13 @@ jobs:
1919
id-token: write
2020
steps:
2121
- uses: actions/checkout@v4
22-
- uses: pnpm/action-setup@v4
23-
with:
24-
version: 10.30.3
2522
- uses: actions/setup-node@v4
2623
with:
2724
node-version: 20
28-
cache: pnpm
25+
cache: npm
2926
registry-url: 'https://registry.npmjs.org'
30-
- run: pnpm install --no-frozen-lockfile
31-
- run: pnpm build
27+
- run: npm ci
28+
- run: npm run build
3229
- name: Force npm auth file
3330
run: |
3431
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
@@ -44,7 +41,7 @@ jobs:
4441
- name: Create release PR or publish
4542
uses: changesets/action@v1
4643
with:
47-
publish: pnpm changeset publish
44+
publish: npx changeset publish
4845
env:
4946
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5047
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

AGENTS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ Each state layer must verify:
108108
## Repo Shape
109109

110110
- `packages/react` publishes `@protohiro/state-layers`
111-
- `apps/demo` exists to prove the hooks on real elements, not to justify API experiments
112111
- shared runtime logic should stay small and live in the React package until duplication demands otherwise
113112

114113
## Current Foundation Expectations

Dockerfile.demo

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Protohiro State Layers is a small React library for visual state layers on existing elements. It focuses on the narrow problem of rendering states like focus, invalid, and loading without wrapper components or runtime geometry work.
44

5+
Supported React versions: `18.x` and `19.x`.
6+
57
This library is for design systems and product surfaces that already have real elements, existing class names, forwarded refs, and their own business state. It is not a component kit, not a validation engine, and not another state-management abstraction.
68

79
## Principles
@@ -17,9 +19,6 @@ This library is for design systems and product surfaces that already have real e
1719
## Workspace
1820

1921
- [`packages/react`](./packages/react) publishes `@protohiro/state-layers`
20-
- [`apps/demo`](./apps/demo) is a Vite demo app
21-
22-
Production demo URL: [libs.protohiro.com/state-layers](http://libs.protohiro.com/state-layers/)
2322

2423
## Included first-pass hooks
2524

@@ -106,10 +105,9 @@ Notes:
106105
## Development
107106

108107
```bash
109-
pnpm install
110-
pnpm test
111-
pnpm build
112-
pnpm dev
108+
npm install
109+
npm run test
110+
npm run build
113111
```
114112

115113
## Tradeoffs in this first pass

apps/demo/CHANGELOG.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

apps/demo/index.html

Lines changed: 0 additions & 12 deletions
This file was deleted.

apps/demo/package.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)