@weaveprotocol/core 0.2.1 → 0.2.3
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/README.md +67 -46
- package/dist/doors/doors.d.ts +1 -1
- package/dist/elements/auth-styles.d.ts +1 -1
- package/dist/elements/auth-styles.d.ts.map +1 -1
- package/dist/elements/auth-styles.js +13 -0
- package/dist/elements/auth-styles.js.map +1 -1
- package/dist/elements/weave-auth.d.ts +2 -2
- package/dist/elements/weave-auth.d.ts.map +1 -1
- package/dist/elements/weave-auth.js +251 -119
- package/dist/elements/weave-auth.js.map +1 -1
- package/dist/identity/account-vault.d.ts +10 -3
- package/dist/identity/account-vault.d.ts.map +1 -1
- package/dist/identity/account-vault.js +10 -3
- package/dist/identity/account-vault.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/network/mailbox.d.ts +1 -1
- package/dist/network/mailbox.js +1 -1
- package/dist/network/peer-auth.d.ts +19 -0
- package/dist/network/peer-auth.d.ts.map +1 -1
- package/dist/network/peer-auth.js +22 -8
- package/dist/network/peer-auth.js.map +1 -1
- package/dist/node/actions.d.ts.map +1 -1
- package/dist/node/actions.js +9 -2
- package/dist/node/actions.js.map +1 -1
- package/dist/node/carrier.d.ts +16 -0
- package/dist/node/carrier.d.ts.map +1 -1
- package/dist/node/carrier.js +12 -0
- package/dist/node/carrier.js.map +1 -1
- package/dist/node/host.d.ts +2 -2
- package/dist/node/host.d.ts.map +1 -1
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/node.js +1 -1
- package/dist/node/node.js.map +1 -1
- package/dist/node/space-runtime.d.ts.map +1 -1
- package/dist/node/space-runtime.js +9 -1
- package/dist/node/space-runtime.js.map +1 -1
- package/dist/node/types.d.ts +6 -2
- package/dist/node/types.d.ts.map +1 -1
- package/dist/records/describe.d.ts +2 -0
- package/dist/records/describe.d.ts.map +1 -1
- package/dist/records/describe.js +5 -0
- package/dist/records/describe.js.map +1 -1
- package/dist/schema/collection-def.d.ts +16 -0
- package/dist/schema/collection-def.d.ts.map +1 -1
- package/dist/schema/collection-def.js +30 -0
- package/dist/schema/collection-def.js.map +1 -1
- package/dist/schemas/apps.d.ts +4 -1
- package/dist/schemas/apps.d.ts.map +1 -1
- package/dist/schemas/apps.js +8 -2
- package/dist/schemas/apps.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/screens.d.ts +16 -4
- package/dist/schemas/screens.d.ts.map +1 -1
- package/dist/schemas/screens.js +49 -6
- package/dist/schemas/screens.js.map +1 -1
- package/dist/session/auth.d.ts +56 -10
- package/dist/session/auth.d.ts.map +1 -1
- package/dist/session/auth.js +247 -69
- package/dist/session/auth.js.map +1 -1
- package/dist/session/connect.d.ts +57 -3
- package/dist/session/connect.d.ts.map +1 -1
- package/dist/session/connect.js +49 -6
- package/dist/session/connect.js.map +1 -1
- package/dist/session/connection.d.ts +8 -1
- package/dist/session/connection.d.ts.map +1 -1
- package/dist/session/connection.js +6 -1
- package/dist/session/connection.js.map +1 -1
- package/dist/session/credentials.d.ts +22 -6
- package/dist/session/credentials.d.ts.map +1 -1
- package/dist/session/credentials.js +35 -6
- package/dist/session/credentials.js.map +1 -1
- package/dist/session/hosting.d.ts +1 -1
- package/dist/session/index.d.ts +5 -5
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js +3 -3
- package/dist/session/index.js.map +1 -1
- package/dist/space/notify.d.ts +59 -1
- package/dist/space/notify.d.ts.map +1 -1
- package/dist/space/notify.js +91 -0
- package/dist/space/notify.js.map +1 -1
- package/dist/storage/blob/s3.js +1 -1
- package/package.json +52 -42
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ written-down code, keep your data in signed records that sync directly between
|
|
|
5
5
|
devices, and every app is a view onto that data rather than its owner.
|
|
6
6
|
|
|
7
7
|
> **Building a client, or an agent that needs the architecture?** The
|
|
8
|
-
> protocol is specified in [
|
|
8
|
+
> protocol is specified in [spec](spec/README.md): wire formats,
|
|
9
9
|
> what is signed, and what every peer must check. The tests are its
|
|
10
10
|
> executable half.
|
|
11
11
|
|
|
@@ -40,7 +40,7 @@ devices, and every app is a view onto that data rather than its owner.
|
|
|
40
40
|
- **Local-first.** Works offline, syncs when peers are reachable.
|
|
41
41
|
- **Few, boring dependencies.** Native browser APIs first. Where a problem is
|
|
42
42
|
hard and already solved — elliptic-curve arithmetic, for one — a very stable,
|
|
43
|
-
widely used library instead of our own. See [
|
|
43
|
+
widely used library instead of our own. See [CLAUDE.md](CLAUDE.md#dependencies).
|
|
44
44
|
- **Isomorphic.** Runs in browsers, Node and Bun via `globalThis`.
|
|
45
45
|
- **Functional.** Plain functions and frozen data, no class hierarchies.
|
|
46
46
|
- **Standard Schema.** Bring your own validator (Zod, Valibot, ArkType, …).
|
|
@@ -225,7 +225,7 @@ await calls.answer(ringing.id); calls.setMuted(true); await calls.shareScreen(
|
|
|
225
225
|
servers a relay hands out (see the relay, below), with passwords fresh for
|
|
226
226
|
a while. A call asks for them when it starts.
|
|
227
227
|
|
|
228
|
-
The messages, and the reasoning, are at the top of `src/calls/calls.ts`.
|
|
228
|
+
The messages, and the reasoning, are at the top of `packages/core/src/calls/calls.ts`.
|
|
229
229
|
|
|
230
230
|
### Contacts
|
|
231
231
|
|
|
@@ -323,8 +323,8 @@ await anna.doors.close(door.id); // the code leads nowhere now
|
|
|
323
323
|
by its owner (`clear`), so its code keeps working.
|
|
324
324
|
|
|
325
325
|
Next: handles that lead to a door, so `@anna.bsky.social` works where a code
|
|
326
|
-
does (planned in [07 — Doors](
|
|
327
|
-
[
|
|
326
|
+
does (planned in [07 — Doors](spec/07-doors.md), Names). The full design is
|
|
327
|
+
[spec/07-doors.md](spec/07-doors.md).
|
|
328
328
|
|
|
329
329
|
## Signing in — the element, and React
|
|
330
330
|
|
|
@@ -347,7 +347,7 @@ The protocol ships it, so an app does not write it:
|
|
|
347
347
|
The element fits whatever it is put in — a page, a modal, a side panel — by
|
|
348
348
|
sizing to its container, and draws nothing once someone is in. It renders into
|
|
349
349
|
the page rather than a shadow root, because password managers fill forms there
|
|
350
|
-
reliably and the
|
|
350
|
+
reliably and the everyday password living in one is much of the point. Colours, font and
|
|
351
351
|
radius are custom properties (`--weave-accent`, `--weave-font`, …).
|
|
352
352
|
|
|
353
353
|
Underneath it is `createWeaveAuth` (`@weaveprotocol/core/session`): the same flow as
|
|
@@ -403,10 +403,10 @@ An app connected to an account home passes its node instead:
|
|
|
403
403
|
|
|
404
404
|
An app does not have to sign anyone in at all. It can ask an **account home** —
|
|
405
405
|
a page, at an address the person chose, that holds their account — for access,
|
|
406
|
-
and never see the seed. `home/` is one, ready to deploy as your own:
|
|
406
|
+
and never see the seed. `apps/home/` is one, ready to deploy as your own:
|
|
407
407
|
|
|
408
|
-
[](https://app.netlify.com/start/deploy?repository=https://github.com/leifriksheim/weave&base=home)
|
|
409
|
-
[](https://vercel.com/new/clone?repository-url=https://github.com/leifriksheim/weave&root-directory=home)
|
|
408
|
+
[](https://app.netlify.com/start/deploy?repository=https://github.com/leifriksheim/weave&base=apps/home)
|
|
409
|
+
[](https://vercel.com/new/clone?repository-url=https://github.com/leifriksheim/weave&root-directory=apps/home)
|
|
410
410
|
|
|
411
411
|
An app connects with `createWeaveConnection` — the twin of `createWeaveAuth`,
|
|
412
412
|
for apps:
|
|
@@ -447,8 +447,8 @@ relays still meet. Underneath are
|
|
|
447
447
|
|
|
448
448
|
1. The app makes its own key, kept in its own site's storage and never
|
|
449
449
|
exportable (`appKey()`).
|
|
450
|
-
2. The home opens in a popup. The person unlocks there —
|
|
451
|
-
|
|
450
|
+
2. The home opens in a popup. The person unlocks there — a passkey, or the
|
|
451
|
+
password their password manager keeps — and picks which spaces the app
|
|
452
452
|
gets.
|
|
453
453
|
3. The home signs a note from the account to the app's key: these spaces, read
|
|
454
454
|
or change, for seven days. It hands the note back with invites for those
|
|
@@ -471,7 +471,7 @@ still never holds the seed: it cannot sign in anywhere as the account, change
|
|
|
471
471
|
its password or passkeys, or keep access past the note's date.
|
|
472
472
|
|
|
473
473
|
The home side is `receiveConnectRequest()` and `auth.grant(…)`; see
|
|
474
|
-
[home/README.md](home/README.md).
|
|
474
|
+
[apps/home/README.md](apps/home/README.md).
|
|
475
475
|
|
|
476
476
|
### Apps hold what they use — keepers hold the rest
|
|
477
477
|
|
|
@@ -914,8 +914,8 @@ Browser-to-browser communication via WebRTC.
|
|
|
914
914
|
|
|
915
915
|
#### Signaling relay
|
|
916
916
|
|
|
917
|
-
`
|
|
918
|
-
dependencies of its own. It runs on its own as `
|
|
917
|
+
`packages/relay/relay.mjs` is a dumb relay in a couple hundred lines of Node with no
|
|
918
|
+
dependencies of its own. It runs on its own as `packages/relay/signaling-server.mjs`
|
|
919
919
|
(an HTTP server and the `ws` library around it), and inside every always-on
|
|
920
920
|
node (`weave serve`), so the two are the same relay. A peer holds one socket and joins a room on it for
|
|
921
921
|
each space, and the relay passes join notices and WebRTC offers, answers and
|
|
@@ -949,8 +949,8 @@ tell a Weave peer from anyone else, so set coturn's own quotas (`user-quota`,
|
|
|
949
949
|
`total-quota`, `max-bps`). TURN only forwards encrypted packets; it can't
|
|
950
950
|
see or hear a call.
|
|
951
951
|
|
|
952
|
-
The relay's Docker image (`
|
|
953
|
-
`TURN_SECRET` is set, already capped that way: `
|
|
952
|
+
The relay's Docker image (`packages/relay/`, deployed to Fly) runs coturn beside it when
|
|
953
|
+
`TURN_SECRET` is set, already capped that way: `packages/relay/fly.toml` says how.
|
|
954
954
|
|
|
955
955
|
Only peers already in a room hear about a newcomer, so exactly one side creates
|
|
956
956
|
the offer and the two never collide.
|
|
@@ -1050,7 +1050,7 @@ interface StorageAdapter {
|
|
|
1050
1050
|
- `createIndexedDBAdapter(name)` — works in every browser. Origin-scoped.
|
|
1051
1051
|
- `createFolderAdapter(directory, namespace)` — a directory the user picked, via the File System Access API. **Not** origin-scoped. Chrome, Edge and Opera on the desktop.
|
|
1052
1052
|
|
|
1053
|
-
The always-on node (`weave run`) uses the folder adapter on disk, in the same layout. **Planned**: mirrors, which keep a space in storage the user already pays for (a Dropbox app folder, Drive, S3) and sync with it like a peer — see [05 — Sync and storage](
|
|
1053
|
+
The always-on node (`weave run`) uses the folder adapter on disk, in the same layout. **Planned**: mirrors, which keep a space in storage the user already pays for (a Dropbox app folder, Drive, S3) and sync with it like a peer — see [05 — Sync and storage](spec/05-sync-and-storage.md). OPFS is not on the list: it is origin-private, so it would inherit exactly the limitation a data folder exists to avoid.
|
|
1054
1054
|
|
|
1055
1055
|
### Data folders — storage that outlives the origin
|
|
1056
1056
|
|
|
@@ -1125,7 +1125,7 @@ const wrap = await wrapSeedWithDeviceKey(seed, deviceKey, { rpId, credentialId }
|
|
|
1125
1125
|
await accounts.write(account, withWrap(vault, wrap));
|
|
1126
1126
|
```
|
|
1127
1127
|
|
|
1128
|
-
`deviceWrapsFor(vault, rpId)` says which wraps this origin can even attempt; the rest name keys it cannot reach. The gate is enforced in application code rather than by cryptography — see `src/identity/device-key.ts` for what that does and does not protect against. The recovery code needs no wrap, because it *is* the seed in printable form — it opens the folder anywhere, including on a phone or in a browser with no File System Access API, and it is shown once and stored nowhere.
|
|
1128
|
+
`deviceWrapsFor(vault, rpId)` says which wraps this origin can even attempt; the rest name keys it cannot reach. The gate is enforced in application code rather than by cryptography — see `packages/core/src/identity/device-key.ts` for what that does and does not protect against. The recovery code needs no wrap, because it *is* the seed in printable form — it opens the folder anywhere, including on a phone or in a browser with no File System Access API, and it is shown once and stored nowhere.
|
|
1129
1129
|
|
|
1130
1130
|
`createEncryptedAdapter` seals `space:`, `spacekey:`, `spaceinvite:` and `spacerole:` values under the vault key, which is what makes a private space genuinely unreadable to someone holding the folder. It is scoped deliberately narrowly: expressions and index entries pass through, so what stays legible is each record's author, timestamp and collection, plus anything in a space its owner made public. Sealing those too would mean an opaque blob store, which would cost the property that makes a folder worth having.
|
|
1131
1131
|
|
|
@@ -1199,7 +1199,7 @@ Both sides of a new pair learn of each other at once, so the lower identifier
|
|
|
1199
1199
|
offers and the other waits — otherwise every introduction would open two
|
|
1200
1200
|
connections. After that the mesh introduces itself and the relay can go away.
|
|
1201
1201
|
|
|
1202
|
-
`
|
|
1202
|
+
`packages/relay/` has a Dockerfile and a `fly.toml` for running one.
|
|
1203
1203
|
|
|
1204
1204
|
### Pairing a phone
|
|
1205
1205
|
|
|
@@ -1283,11 +1283,11 @@ schema.registerCollection({ name: 'app.example.post', schema: PostSchema });
|
|
|
1283
1283
|
|
|
1284
1284
|
## Command line, always-on node, and agents
|
|
1285
1285
|
|
|
1286
|
-
`cli/` is `weave`: every node operation from a terminal, `weave run` to keep an
|
|
1286
|
+
`packages/cli/` is `weave`: every node operation from a terminal, `weave run` to keep an
|
|
1287
1287
|
account's spaces syncing on a server (browsers connect to it over WebSocket, and
|
|
1288
1288
|
it doubles as a relay), and `weave mcp` to hand the same operations to an agent.
|
|
1289
1289
|
It reads and writes the same data folder layout a browser does. See
|
|
1290
|
-
[cli/README.md](cli/README.md).
|
|
1290
|
+
[packages/cli/README.md](packages/cli/README.md).
|
|
1291
1291
|
|
|
1292
1292
|
**Hosting.** `weave host` keeps many accounts' spaces online without being able
|
|
1293
1293
|
to read them: it is the extension's carrier (`createCarrierNode`) with one carry
|
|
@@ -1296,7 +1296,7 @@ members pay for it. A subscription is a key the account makes and keeps in its
|
|
|
1296
1296
|
registry (`sys.hosting`), so every device signs as it; `node.hosting.use(url)`
|
|
1297
1297
|
starts one, and whichever device notices it is paid hands the host the carry
|
|
1298
1298
|
space. Every call to the host is signed over method, path, time and body.
|
|
1299
|
-
The home knows nothing about payment ([06 — Nodes, sessions and apps](
|
|
1299
|
+
The home knows nothing about payment ([06 — Nodes, sessions and apps](spec/06-nodes-and-sessions.md), Hosts): a host describes itself at
|
|
1300
1300
|
`/.well-known/weave-host` (like a Nostr relay's NIP-11 document), signs every
|
|
1301
1301
|
status it gives — the home keeps the latest in the registry as the person's
|
|
1302
1302
|
proof — and takes payments on its own pay page, which `node.hosting.payPage(url)`
|
|
@@ -1312,13 +1312,13 @@ has **Keep my spaces online**.
|
|
|
1312
1312
|
|
|
1313
1313
|
## Example app
|
|
1314
1314
|
|
|
1315
|
-
`example/` is the Weave website — a
|
|
1316
|
-
|
|
1317
|
-
the protocol straight from `src/`. It knows no kinds of data in advance: every
|
|
1315
|
+
`apps/example/` is the Weave website — a front page for communities at `/`, and
|
|
1316
|
+
one for developers at `/developers` — and, at `/app`, a general-purpose app for your spaces — Vite + React, consuming
|
|
1317
|
+
the protocol straight from `packages/core/src/`. It knows no kinds of data in advance: every
|
|
1318
1318
|
screen is worked out from what a space says about itself (see *Derived UI* below):
|
|
1319
1319
|
|
|
1320
1320
|
```bash
|
|
1321
|
-
npm install
|
|
1321
|
+
npm install # one install for the whole workspace: core, CLI, relay and the apps
|
|
1322
1322
|
npm run dev
|
|
1323
1323
|
```
|
|
1324
1324
|
|
|
@@ -1328,13 +1328,13 @@ That starts everything, with coloured output per part, and Ctrl-C stops it all:
|
|
|
1328
1328
|
|---|---|---|
|
|
1329
1329
|
| app | http://localhost:5173 | The example app |
|
|
1330
1330
|
| home | http://localhost:5174 | The account home it connects to |
|
|
1331
|
-
| node | port 8787 | An always-on node that is also the relay; a throwaway identity on first run (`cli/.env.dev`, data in `.weave-dev/`) |
|
|
1332
|
-
| host | http://localhost:8788 | `weave host`, what "Keep my spaces online" uses, with its pay page at `/pay`; settings in `cli/.env.host.dev` |
|
|
1331
|
+
| node | port 8787 | An always-on node that is also the relay; a throwaway identity on first run (`packages/cli/.env.dev`, data in `.weave-dev/`) |
|
|
1332
|
+
| host | http://localhost:8788 | `weave host`, what "Keep my spaces online" uses, with its pay page at `/pay`; settings in `packages/cli/.env.host.dev` |
|
|
1333
1333
|
| stripe | — | Only when you add a Stripe test key (below): forwards Stripe's webhooks to the host |
|
|
1334
1334
|
|
|
1335
|
-
`example/.env.development` and `home/.env.development` point the app and home
|
|
1335
|
+
`apps/example/.env.development` and `apps/home/.env.development` point the app and home
|
|
1336
1336
|
at the rest. Override any of them in a `.env.local`, and the host in
|
|
1337
|
-
`cli/.env.host.local`.
|
|
1337
|
+
`packages/cli/.env.host.local`.
|
|
1338
1338
|
|
|
1339
1339
|
**Trying hosting and payments.** In the home: Settings, **Keep my spaces
|
|
1340
1340
|
online**, **Keep online** (the dev host is filled in), then **Payment**, which
|
|
@@ -1346,8 +1346,8 @@ opens the host's pay page in a new tab. What you can pay with there:
|
|
|
1346
1346
|
USDC from faucet.circle.com (choose Base Sepolia). Pay, and the pay page
|
|
1347
1347
|
says "Payment received"; back in the home's tab, the host shows "paid until"
|
|
1348
1348
|
and takes your spaces. To see payments arrive, set your own address as
|
|
1349
|
-
`WEAVE_WALLET_ADDRESS` in `cli/.env.host.local`.
|
|
1350
|
-
- **A card, in Stripe's test mode.** In `cli/.env.host.local`, add
|
|
1349
|
+
`WEAVE_WALLET_ADDRESS` in `packages/cli/.env.host.local`.
|
|
1350
|
+
- **A card, in Stripe's test mode.** In `packages/cli/.env.host.local`, add
|
|
1351
1351
|
`STRIPE_SECRET_KEY=sk_test_…` and the price ids of a monthly and a yearly
|
|
1352
1352
|
recurring test price (`STRIPE_PRICE_MONTHLY`, `STRIPE_PRICE_YEARLY`, from the Stripe
|
|
1353
1353
|
dashboard in test mode). With the Stripe CLI installed, `npm run dev`
|
|
@@ -1355,7 +1355,7 @@ opens the host's pay page in a new tab. What you can pay with there:
|
|
|
1355
1355
|
4242 4242 4242 4242, any future date, any CVC.
|
|
1356
1356
|
- **Phone wallets, by QR code.** Add `WEAVE_WALLETCONNECT_PROJECT_ID` (free at
|
|
1357
1357
|
dashboard.reown.com, with localhost allowed in the project) to
|
|
1358
|
-
`cli/.env.host.local`; `npm run dev` builds what the pay page needs. The
|
|
1358
|
+
`packages/cli/.env.host.local`; `npm run dev` builds what the pay page needs. The
|
|
1359
1359
|
wallet has to be on Base Sepolia too.
|
|
1360
1360
|
|
|
1361
1361
|
`npm test` covers the same paths without any of this: a fake network, fake
|
|
@@ -1374,7 +1374,7 @@ npm run weave -- records list --space <id>
|
|
|
1374
1374
|
|
|
1375
1375
|
Close every browser holding the space, open the link somewhere else, and the
|
|
1376
1376
|
records come from the node. Or make the node your own account's — see
|
|
1377
|
-
[cli/README.md](cli/README.md) — and it serves every space you make, unasked.
|
|
1377
|
+
[packages/cli/README.md](packages/cli/README.md) — and it serves every space you make, unasked.
|
|
1378
1378
|
|
|
1379
1379
|
Between them they exercise the stack end to end. At the home: choose where
|
|
1380
1380
|
your data lives (a pod, or this browser), create an account (a password your
|
|
@@ -1402,7 +1402,7 @@ for fixed ones, and `x-choicesFrom: { rel: 'about', field: 'options' }` for a
|
|
|
1402
1402
|
field that picks from a list in the linked record — so a vote stored as `1`
|
|
1403
1403
|
shows as "Lisbon", its form offers the poll's options, and the poll shows a
|
|
1404
1404
|
tally. The helpers that work this out are pure functions
|
|
1405
|
-
(`example/src/derive/schema-ui.ts`), with nothing DOM-specific in them. An
|
|
1405
|
+
(`apps/example/src/derive/schema-ui.ts`), with nothing DOM-specific in them. An
|
|
1406
1406
|
empty space offers a small "define a collection" form; an agent can do the
|
|
1407
1407
|
same over WebMCP.
|
|
1408
1408
|
|
|
@@ -1419,7 +1419,7 @@ above everything that changes as you move around.
|
|
|
1419
1419
|
|
|
1420
1420
|
**Agents in the browser (WebMCP).** When `/app` loads, it registers
|
|
1421
1421
|
every node operation as a WebMCP tool on `document.modelContext`
|
|
1422
|
-
(`example/src/webmcp.ts`, with `@mcp-b/webmcp-polyfill`: Chrome's own WebMCP
|
|
1422
|
+
(`apps/example/src/webmcp.ts`, with `@mcp-b/webmcp-polyfill`: Chrome's own WebMCP
|
|
1423
1423
|
when present, a polyfill otherwise). A browser agent or extension sees the same
|
|
1424
1424
|
tools as the CLI and `weave mcp` — `spaces_list`, `records_query`,
|
|
1425
1425
|
`records_put`, `apps_propose`… — and works as the person, with nothing to
|
|
@@ -1430,8 +1430,7 @@ them. Anything that changes a space's people, or hands out its key, asks the
|
|
|
1430
1430
|
person first. An app may bring its own screen: a collection definition's
|
|
1431
1431
|
`screen`, one HTML document, which the example runs in a sandboxed frame with
|
|
1432
1432
|
no network, talking to the space only through a message port
|
|
1433
|
-
(`createScreenBridge`, `apps_screen_guide`).
|
|
1434
|
-
an agent wrote.
|
|
1433
|
+
(`createScreenBridge`, `apps_screen_guide`).
|
|
1435
1434
|
|
|
1436
1435
|
**Agents on your computer (Claude Code, Claude Desktop, Cursor).** "Connect an
|
|
1437
1436
|
agent", in the account menu, shows one command:
|
|
@@ -1439,16 +1438,16 @@ agent", in the account menu, shows one command:
|
|
|
1439
1438
|
the tab through the relay, and the person allows it at their account home,
|
|
1440
1439
|
which signs an agent's note for the whole account, for as long as they chose.
|
|
1441
1440
|
Everything said on the way is sealed with a key from the code, so the relay
|
|
1442
|
-
learns nothing (`src/session/agent-link.ts`). The command then adds `weave` to
|
|
1441
|
+
learns nothing (`packages/core/src/session/agent-link.ts`). The command then adds `weave` to
|
|
1443
1442
|
the agents it finds, and they start `weave mcp` themselves: a node of its own,
|
|
1444
1443
|
over WebRTC (`node-datachannel`), that follows the account and keeps working
|
|
1445
1444
|
with every tab closed. What it writes shows "via agent", and every peer
|
|
1446
1445
|
ignores an agent changing collections, who may do what, or the account's own
|
|
1447
|
-
list of spaces. See [06 — Nodes, sessions and apps](
|
|
1446
|
+
list of spaces. See [06 — Nodes, sessions and apps](spec/06-nodes-and-sessions.md), Agents.
|
|
1448
1447
|
|
|
1449
1448
|
## Still to do in the library
|
|
1450
1449
|
|
|
1451
|
-
What the protocol still has planned is in [the spec](
|
|
1450
|
+
What the protocol still has planned is in [the spec](spec/README.md), under
|
|
1452
1451
|
**Planned** in each part. Library work that isn't protocol:
|
|
1453
1452
|
|
|
1454
1453
|
- **Typed queries, further.** Typed field paths and operator values in
|
|
@@ -1458,14 +1457,35 @@ What the protocol still has planned is in [the spec](docs/spec/README.md), under
|
|
|
1458
1457
|
- **Typed collections.** One TypeScript builder that emits the schema, the
|
|
1459
1458
|
rules and the types, and typed handles (`node.use(space, Poll)`).
|
|
1460
1459
|
- **Definitions that update themselves.** `useSchemas` and `addApp` applying
|
|
1461
|
-
harmless changes, with `differences()` in `src/schemas/apps.ts` replaced by
|
|
1462
|
-
the planned `compare` ([02](
|
|
1460
|
+
harmless changes, with `differences()` in `packages/core/src/schemas/apps.ts` replaced by
|
|
1461
|
+
the planned `compare` ([02](spec/02-records.md), compatible definitions).
|
|
1463
1462
|
- **Web components** for the standard schemas.
|
|
1464
1463
|
|
|
1464
|
+
## Repository layout
|
|
1465
|
+
|
|
1466
|
+
One npm workspace, installed once at the root (`npm install`):
|
|
1467
|
+
|
|
1468
|
+
| Folder | Package | |
|
|
1469
|
+
|---|---|---|
|
|
1470
|
+
| `packages/core` | `@weaveprotocol/core` (published) | The protocol library, and its tests |
|
|
1471
|
+
| `packages/cli` | `@weaveprotocol/cli` (published) | `weave`: the always-on node, hosting, agents, MCP |
|
|
1472
|
+
| `packages/relay` | `@weaveprotocol/relay` (private) | The signaling relay and its mailbox, run alone on Fly and inside every node |
|
|
1473
|
+
| `apps/home` | — | The account home |
|
|
1474
|
+
| `apps/example` | — | The website and the example app |
|
|
1475
|
+
| `apps/extension` | — | The Chrome extension |
|
|
1476
|
+
| `spec` | — | The protocol specification |
|
|
1477
|
+
|
|
1478
|
+
Everything imports the protocol by name, `@weaveprotocol/core`, and only
|
|
1479
|
+
through what it exports. Inside the workspace, the `@weaveprotocol/source`
|
|
1480
|
+
export condition resolves those imports to `packages/core/src`, so the apps,
|
|
1481
|
+
the CLI and the tests run on the source with no build step; published copies
|
|
1482
|
+
use `dist`. The CLI bundles the protocol and the relay into one file, so
|
|
1483
|
+
`npx @weaveprotocol/cli` and the single-file binaries need nothing else.
|
|
1484
|
+
|
|
1465
1485
|
## Releasing
|
|
1466
1486
|
|
|
1467
|
-
`@weaveprotocol/core` (
|
|
1468
|
-
|
|
1487
|
+
`@weaveprotocol/core` (`packages/core/`) and `@weaveprotocol/cli`
|
|
1488
|
+
(`packages/cli/`) are released together, always with the same version:
|
|
1469
1489
|
|
|
1470
1490
|
```bash
|
|
1471
1491
|
npm run release
|
|
@@ -1487,7 +1507,8 @@ yet and publishes what's missing, instead of bumping again. `npm run release
|
|
|
1487
1507
|
## Tests
|
|
1488
1508
|
|
|
1489
1509
|
```bash
|
|
1490
|
-
npm test
|
|
1510
|
+
npm test # every workspace: core's tests, then the CLI's
|
|
1511
|
+
npm run typecheck
|
|
1491
1512
|
```
|
|
1492
1513
|
|
|
1493
1514
|
Covers key derivation — checked against the public keys Web Crypto generates
|
package/dist/doors/doors.d.ts
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* ```
|
|
30
30
|
*
|
|
31
31
|
* The relay sees a topic and a sealed blob: not whose door it is, not who
|
|
32
|
-
* knocked, not what they said. See `
|
|
32
|
+
* knocked, not what they said. See `spec/07-doors.md`.
|
|
33
33
|
*/
|
|
34
34
|
import type { CryptoProvider } from '../types.js';
|
|
35
35
|
/** A door names at most this many relays: enough that one going away doesn't matter */
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* not a media query — so the same element fits a full page, a modal or a side
|
|
15
15
|
* panel without being told which.
|
|
16
16
|
*/
|
|
17
|
-
export declare const AUTH_CSS = "\nweave-auth {\n --weave-ink: #000;\n --weave-body: #171717;\n --weave-muted: #666;\n --weave-faint: #8f8f8f;\n --weave-surface: #fff;\n --weave-sunken: #fafafa;\n --weave-line: #eaeaea;\n --weave-line-strong: #d4d4d4;\n --weave-accent: #000;\n --weave-accent-hover: #383838;\n --weave-on-accent: #fff;\n --weave-danger: #e5484d;\n --weave-danger-soft: #fff0f0;\n --weave-radius: 6px;\n --weave-font: \"Geist\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;\n --weave-mono: \"Geist Mono\", ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;\n\n display: block;\n container-type: inline-size;\n color: var(--weave-body);\n font-family: var(--weave-font);\n font-size: 14px;\n letter-spacing: -0.006em;\n -webkit-font-smoothing: antialiased;\n}\nweave-auth[hidden] { display: none; }\nweave-auth *, weave-auth *::before, weave-auth *::after { box-sizing: border-box; }\nweave-auth :is(h1, p) { margin: 0; }\n\nweave-auth .wa-card { width: 100%; max-width: 380px; margin: 0 auto; }\nweave-auth .wa-wordmark { display: flex; align-items: center; gap: 8px; margin-bottom: 40px; color: var(--weave-ink); font-weight: 600; font-size: 16px; letter-spacing: -0.03em; }\nweave-auth .wa-title { font-size: 28px; font-weight: 600; letter-spacing: -0.04em; color: var(--weave-ink); margin-bottom: 8px; line-height: 1.2; }\nweave-auth .wa-subtitle { font-size: 15px; color: var(--weave-muted); margin-bottom: 32px; line-height: 1.5; }\nweave-auth .wa-hint { font-size: 14px; color: var(--weave-muted); margin-bottom: 20px; line-height: 1.6; }\nweave-auth .wa-small { font-size: 13px; color: var(--weave-muted); margin-top: 8px; line-height: 1.6; }\nweave-auth .wa-error { color: var(--weave-danger); font-size: 14px; font-weight: 500; }\nweave-auth .wa-error-box { margin-top: 16px; padding: 12px 14px; border-radius: var(--weave-radius); background: var(--weave-danger-soft); }\n\nweave-auth .wa-form { display: flex; flex-direction: column; gap: 8px; }\nweave-auth .wa-form + .wa-form { margin-top: 10px; }\nweave-auth input {\n width: 100%; height: 40px; padding: 0 12px;\n border-radius: var(--weave-radius); border: 1px solid var(--weave-line-strong);\n background: var(--weave-surface); color: var(--weave-ink);\n font: inherit; font-size: 14px; outline: none;\n transition: border-color .15s ease, box-shadow .15s ease;\n}\nweave-auth input::placeholder { color: var(--weave-faint); }\nweave-auth input:focus { border-color: var(--weave-muted); box-shadow: 0 0 0 3px rgba(0, 0, 0, .06); }\nweave-auth .wa-offscreen {\n position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;\n overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;\n}\n\nweave-auth button { font: inherit; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }\nweave-auth button:not(:disabled) { cursor: pointer; }\nweave-auth button:disabled { opacity: .5; cursor: not-allowed; }\nweave-auth :focus-visible { outline: 2px solid var(--weave-ink); outline-offset: 2px; }\nweave-auth button:focus:not(:focus-visible) { outline: none; }\n\nweave-auth .wa-button {\n width: 100%; height: 40px; padding: 0 16px;\n border-radius: var(--weave-radius); border: 1px solid transparent;\n background: var(--weave-accent); color: var(--weave-on-accent);\n font-size: 14px; font-weight: 500;\n}\nweave-auth .wa-button:not(:disabled):hover { background: var(--weave-accent-hover); }\nweave-auth .wa-link {\n background: none; border: none; padding: 4px 0; margin-right: 12px;\n color: var(--weave-muted); font-size: 13px; font-weight: 500; text-align: left;\n}\nweave-auth .wa-link:not(:disabled):hover { color: var(--weave-ink); }\nweave-auth .wa-links { display: flex; flex-wrap: wrap; margin-top: 10px; }\n\nweave-auth .wa-options { display: flex; flex-direction: column; gap: 12px; }\nweave-auth .wa-option {\n display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 16px;\n text-align: left; border-radius: var(--weave-radius);\n border: 1px solid var(--weave-line); background: var(--weave-surface); color: var(--weave-body);\n}\nweave-auth .wa-option:not(:disabled):hover { background: var(--weave-sunken); border-color: var(--weave-line-strong); }\nweave-auth .wa-option-title { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--weave-ink); }\nweave-auth .wa-option-text { color: var(--weave-muted); font-size: 13px; line-height: 1.5; }\nweave-auth .wa-badge {\n font-size: 11px; font-weight: 500; padding: 1px 8px; border-radius: 999px;\n background: var(--weave-sunken); border: 1px solid var(--weave-line); color: var(--weave-muted);\n}\n\nweave-auth .wa-account { padding: 12px 0; border-top: 1px solid var(--weave-line); }\nweave-auth .wa-account:last-of-type { border-bottom: 1px solid var(--weave-line); margin-bottom: 8px; }\nweave-auth .wa-account-row {\n display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; margin: 0 -8px;\n width: calc(100% + 16px); text-align: left;\n background: none; border: 1px solid transparent; border-radius: var(--weave-radius); color: var(--weave-body);\n}\nweave-auth .wa-account-row:not(:disabled):hover { background: var(--weave-sunken); }\nweave-auth .wa-account-name { display: block; font-weight: 600; color: var(--weave-ink); }\nweave-auth .wa-account-did { display: block; font-size: 12px; color: var(--weave-faint); font-family: var(--weave-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\nweave-auth .wa-account-body { margin-top: 10px; }\nweave-auth .wa-avatar { flex-shrink: 0; display: block; border-radius: 8px; }\n\nweave-auth .wa-code {\n display: block; margin-top: 16px; padding: 12px; border-radius: var(--weave-radius);\n background: var(--weave-sunken); border: 1px solid var(--weave-line);\n font-family: var(--weave-mono); font-size: 13px; color: var(--weave-ink);\n word-break: break-all; user-select: all;\n}\n\nweave-auth .wa-info { position: relative; display: inline; }\nweave-auth .wa-info-button {\n display: inline-flex; align-items: center; justify-content: center;\n width: 16px; height: 16px; padding: 0; margin-left: 6px; vertical-align: text-bottom;\n border-radius: 999px; border: 1px solid var(--weave-line-strong); background: none;\n color: var(--weave-faint); font-size: 10px; font-weight: 700; line-height: 1;\n}\nweave-auth .wa-popover {\n position: absolute; z-index: 30; top: 22px; left: 0; width: min(260px, 80cqi);\n padding: 12px 14px; border-radius: var(--weave-radius);\n background: var(--weave-surface); border: 1px solid var(--weave-line);\n box-shadow: 0 12px 28px -12px rgba(15, 17, 21, .22);\n font-size: 12.5px; line-height: 1.6; color: var(--weave-muted); font-weight: 400;\n}\nweave-auth .wa-popover[hidden] { display: none; }\n\n@container (max-width: 340px) {\n weave-auth .wa-title { font-size: 24px; }\n weave-auth .wa-subtitle { margin-bottom: 24px; }\n weave-auth .wa-wordmark { margin-bottom: 28px; }\n weave-auth .wa-popover { left: auto; right: -8px; }\n}\n";
|
|
17
|
+
export declare const AUTH_CSS = "\nweave-auth {\n --weave-ink: #000;\n --weave-body: #171717;\n --weave-muted: #666;\n --weave-faint: #8f8f8f;\n --weave-surface: #fff;\n --weave-sunken: #fafafa;\n --weave-line: #eaeaea;\n --weave-line-strong: #d4d4d4;\n --weave-accent: #000;\n --weave-accent-hover: #383838;\n --weave-on-accent: #fff;\n --weave-danger: #e5484d;\n --weave-danger-soft: #fff0f0;\n --weave-radius: 6px;\n --weave-font: \"Geist\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;\n --weave-mono: \"Geist Mono\", ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;\n\n display: block;\n container-type: inline-size;\n color: var(--weave-body);\n font-family: var(--weave-font);\n font-size: 14px;\n letter-spacing: -0.006em;\n -webkit-font-smoothing: antialiased;\n}\nweave-auth[hidden] { display: none; }\nweave-auth *, weave-auth *::before, weave-auth *::after { box-sizing: border-box; }\nweave-auth :is(h1, p) { margin: 0; }\n\nweave-auth .wa-card { width: 100%; max-width: 380px; margin: 0 auto; }\nweave-auth .wa-wordmark { display: flex; align-items: center; gap: 8px; margin-bottom: 40px; color: var(--weave-ink); font-weight: 600; font-size: 16px; letter-spacing: -0.03em; }\nweave-auth .wa-title { font-size: 28px; font-weight: 600; letter-spacing: -0.04em; color: var(--weave-ink); margin-bottom: 8px; line-height: 1.2; }\nweave-auth .wa-subtitle { font-size: 15px; color: var(--weave-muted); margin-bottom: 32px; line-height: 1.5; }\nweave-auth .wa-hint { font-size: 14px; color: var(--weave-muted); margin-bottom: 20px; line-height: 1.6; }\nweave-auth .wa-small { font-size: 13px; color: var(--weave-muted); margin-top: 8px; line-height: 1.6; }\nweave-auth .wa-error { color: var(--weave-danger); font-size: 14px; font-weight: 500; }\nweave-auth .wa-error-box { margin-top: 16px; padding: 12px 14px; border-radius: var(--weave-radius); background: var(--weave-danger-soft); }\n\nweave-auth .wa-form { display: flex; flex-direction: column; gap: 8px; }\nweave-auth .wa-form + .wa-form { margin-top: 10px; }\nweave-auth input {\n width: 100%; height: 40px; padding: 0 12px;\n border-radius: var(--weave-radius); border: 1px solid var(--weave-line-strong);\n background: var(--weave-surface); color: var(--weave-ink);\n font: inherit; font-size: 14px; outline: none;\n transition: border-color .15s ease, box-shadow .15s ease;\n}\nweave-auth input::placeholder { color: var(--weave-faint); }\nweave-auth input:focus { border-color: var(--weave-muted); box-shadow: 0 0 0 3px rgba(0, 0, 0, .06); }\nweave-auth .wa-offscreen {\n position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;\n overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;\n}\n\nweave-auth button { font: inherit; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }\nweave-auth button:not(:disabled) { cursor: pointer; }\nweave-auth button:disabled { opacity: .5; cursor: not-allowed; }\nweave-auth :focus-visible { outline: 2px solid var(--weave-ink); outline-offset: 2px; }\nweave-auth button:focus:not(:focus-visible) { outline: none; }\n\nweave-auth .wa-button {\n width: 100%; height: 40px; padding: 0 16px;\n border-radius: var(--weave-radius); border: 1px solid transparent;\n background: var(--weave-accent); color: var(--weave-on-accent);\n font-size: 14px; font-weight: 500;\n}\nweave-auth .wa-button:not(:disabled):hover { background: var(--weave-accent-hover); }\nweave-auth .wa-link {\n background: none; border: none; padding: 4px 0; margin-right: 12px;\n color: var(--weave-muted); font-size: 13px; font-weight: 500; text-align: left;\n}\nweave-auth .wa-link:not(:disabled):hover { color: var(--weave-ink); }\nweave-auth .wa-links { display: flex; flex-wrap: wrap; margin-top: 10px; }\n\nweave-auth .wa-options { display: flex; flex-direction: column; gap: 12px; }\nweave-auth .wa-option {\n display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 16px;\n text-align: left; border-radius: var(--weave-radius);\n border: 1px solid var(--weave-line); background: var(--weave-surface); color: var(--weave-body);\n}\nweave-auth .wa-option:not(:disabled):hover { background: var(--weave-sunken); border-color: var(--weave-line-strong); }\nweave-auth .wa-option-title { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--weave-ink); }\nweave-auth .wa-option-text { color: var(--weave-muted); font-size: 13px; line-height: 1.5; }\nweave-auth .wa-badge {\n font-size: 11px; font-weight: 500; padding: 1px 8px; border-radius: 999px;\n background: var(--weave-sunken); border: 1px solid var(--weave-line); color: var(--weave-muted);\n}\n\nweave-auth .wa-account { padding: 12px 0; border-top: 1px solid var(--weave-line); }\nweave-auth .wa-account:last-of-type { border-bottom: 1px solid var(--weave-line); margin-bottom: 8px; }\nweave-auth .wa-account-row {\n display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; margin: 0 -8px;\n width: calc(100% + 16px); text-align: left;\n background: none; border: 1px solid transparent; border-radius: var(--weave-radius); color: var(--weave-body);\n}\nweave-auth .wa-account-row:not(:disabled):hover { background: var(--weave-sunken); }\nweave-auth .wa-account-name { display: block; font-weight: 600; color: var(--weave-ink); }\nweave-auth .wa-account-did { display: block; font-size: 12px; color: var(--weave-faint); font-family: var(--weave-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\nweave-auth .wa-account-body { margin-top: 10px; }\nweave-auth .wa-avatar { flex-shrink: 0; display: block; border-radius: 8px; }\n\nweave-auth .wa-code {\n display: block; margin-top: 16px; padding: 12px; border-radius: var(--weave-radius);\n background: var(--weave-sunken); border: 1px solid var(--weave-line);\n font-family: var(--weave-mono); font-size: 13px; color: var(--weave-ink);\n word-break: break-all; user-select: all;\n}\n\nweave-auth .wa-code-large { font-size: 17px; letter-spacing: 0.04em; text-align: center; padding: 16px 12px; margin-top: 0; }\nweave-auth .wa-row { display: flex; gap: 8px; margin-top: 10px; }\nweave-auth .wa-secondary {\n flex: 1; height: 36px; padding: 0 12px;\n border-radius: var(--weave-radius); border: 1px solid var(--weave-line-strong);\n background: var(--weave-surface); color: var(--weave-ink); font-size: 13px; font-weight: 500;\n}\nweave-auth .wa-secondary:not(:disabled):hover { background: var(--weave-sunken); }\nweave-auth .wa-check { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 16px; font-size: 14px; line-height: 1.5; color: var(--weave-body); cursor: pointer; }\nweave-auth .wa-check input { width: 16px; height: 16px; margin: 3px 0 0; padding: 0; flex-shrink: 0; accent-color: var(--weave-accent); box-shadow: none; }\nweave-auth .wa-label { font-size: 13px; color: var(--weave-muted); }\nweave-auth .wa-steps { margin: 0 0 20px; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--weave-body); }\n\nweave-auth .wa-info { position: relative; display: inline; }\nweave-auth .wa-info-button {\n display: inline-flex; align-items: center; justify-content: center;\n width: 16px; height: 16px; padding: 0; margin-left: 6px; vertical-align: text-bottom;\n border-radius: 999px; border: 1px solid var(--weave-line-strong); background: none;\n color: var(--weave-faint); font-size: 10px; font-weight: 700; line-height: 1;\n}\nweave-auth .wa-popover {\n position: absolute; z-index: 30; top: 22px; left: 0; width: min(260px, 80cqi);\n padding: 12px 14px; border-radius: var(--weave-radius);\n background: var(--weave-surface); border: 1px solid var(--weave-line);\n box-shadow: 0 12px 28px -12px rgba(15, 17, 21, .22);\n font-size: 12.5px; line-height: 1.6; color: var(--weave-muted); font-weight: 400;\n}\nweave-auth .wa-popover[hidden] { display: none; }\n\n@container (max-width: 340px) {\n weave-auth .wa-title { font-size: 24px; }\n weave-auth .wa-subtitle { margin-bottom: 24px; }\n weave-auth .wa-wordmark { margin-bottom: 28px; }\n weave-auth .wa-popover { left: auto; right: -8px; }\n}\n";
|
|
18
18
|
//# sourceMappingURL=auth-styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-styles.d.ts","sourceRoot":"","sources":["../../src/elements/auth-styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"auth-styles.d.ts","sourceRoot":"","sources":["../../src/elements/auth-styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,QAAQ,i+PAiJpB,CAAC"}
|
|
@@ -124,6 +124,19 @@ weave-auth .wa-code {
|
|
|
124
124
|
word-break: break-all; user-select: all;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
weave-auth .wa-code-large { font-size: 17px; letter-spacing: 0.04em; text-align: center; padding: 16px 12px; margin-top: 0; }
|
|
128
|
+
weave-auth .wa-row { display: flex; gap: 8px; margin-top: 10px; }
|
|
129
|
+
weave-auth .wa-secondary {
|
|
130
|
+
flex: 1; height: 36px; padding: 0 12px;
|
|
131
|
+
border-radius: var(--weave-radius); border: 1px solid var(--weave-line-strong);
|
|
132
|
+
background: var(--weave-surface); color: var(--weave-ink); font-size: 13px; font-weight: 500;
|
|
133
|
+
}
|
|
134
|
+
weave-auth .wa-secondary:not(:disabled):hover { background: var(--weave-sunken); }
|
|
135
|
+
weave-auth .wa-check { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 16px; font-size: 14px; line-height: 1.5; color: var(--weave-body); cursor: pointer; }
|
|
136
|
+
weave-auth .wa-check input { width: 16px; height: 16px; margin: 3px 0 0; padding: 0; flex-shrink: 0; accent-color: var(--weave-accent); box-shadow: none; }
|
|
137
|
+
weave-auth .wa-label { font-size: 13px; color: var(--weave-muted); }
|
|
138
|
+
weave-auth .wa-steps { margin: 0 0 20px; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--weave-body); }
|
|
139
|
+
|
|
127
140
|
weave-auth .wa-info { position: relative; display: inline; }
|
|
128
141
|
weave-auth .wa-info-button {
|
|
129
142
|
display: inline-flex; align-items: center; justify-content: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-styles.js","sourceRoot":"","sources":["../../src/elements/auth-styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG
|
|
1
|
+
{"version":3,"file":"auth-styles.js","sourceRoot":"","sources":["../../src/elements/auth-styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiJvB,CAAC"}
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
*
|
|
19
19
|
* It draws into its own light DOM, not a shadow root, on purpose: password
|
|
20
20
|
* managers find and fill forms in the page far more reliably than forms inside
|
|
21
|
-
* a shadow root, and the
|
|
22
|
-
*
|
|
21
|
+
* a shadow root, and the everyday password living in a password manager is
|
|
22
|
+
* much of the point. Its styles are scoped to the element instead.
|
|
23
23
|
*
|
|
24
24
|
* It fills whatever box it is put in — a page, a modal, a panel — and draws
|
|
25
25
|
* nothing once signed in; the host decides what happens then.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"weave-auth.d.ts","sourceRoot":"","sources":["../../src/elements/weave-auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"weave-auth.d.ts","sourceRoot":"","sources":["../../src/elements/weave-auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAwE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAO7I,mCAAmC;AACnC,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;CACvC;AAED,QAAA,MAAM,IAAI,EAA2C,OAAO,WAAW,CAAC;AAmHxE,qBAAa,gBAAiB,SAAQ,IAAI;;IAgBxC,6HAA6H;IAC7H,IAAI,IAAI,IAAI,SAAS,CASpB;IAED,IAAI,IAAI,CAAC,IAAI,EAAE,SAAS,EAIvB;IAED,iBAAiB,IAAI,IAAI;IAazB,oBAAoB,IAAI,IAAI;CAusB7B;AAED,6EAA6E;AAC7E,wBAAgB,eAAe,CAAC,GAAG,SAAe,GAAG,IAAI,CAGxD;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,gBAAgB,CAAC;KAChC;IACD,UAAU,mBAAmB;QAC3B,eAAe,EAAE,WAAW,CAAC,uBAAuB,CAAC,CAAC;KACvD;CACF"}
|