@minca/core 0.1.18 → 0.3.1
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 +1 -1
- package/dist/identity/abilities.d.ts +0 -2
- package/dist/identity/abilities.d.ts.map +1 -1
- package/dist/identity/abilities.js +2 -2
- package/dist/identity/abilities.js.map +1 -1
- package/dist/identity/account-vault.d.ts +0 -2
- package/dist/identity/account-vault.d.ts.map +1 -1
- package/dist/identity/account-vault.js +1 -1
- package/dist/identity/account-vault.js.map +1 -1
- package/dist/identity/crypto-p256.d.ts +1 -1
- package/dist/identity/crypto-p256.d.ts.map +1 -1
- package/dist/identity/ucan.d.ts +2 -1
- package/dist/identity/ucan.d.ts.map +1 -1
- package/dist/identity/ucan.js +1 -1
- package/dist/identity/ucan.js.map +1 -1
- package/dist/inbox/inbox.d.ts +0 -21
- package/dist/inbox/inbox.d.ts.map +1 -1
- package/dist/inbox/inbox.js +4 -4
- package/dist/inbox/inbox.js.map +1 -1
- package/dist/inbox/index.d.ts +4 -5
- package/dist/inbox/index.d.ts.map +1 -1
- package/dist/inbox/index.js +2 -3
- package/dist/inbox/index.js.map +1 -1
- package/dist/inbox/names.d.ts +0 -4
- package/dist/inbox/names.d.ts.map +1 -1
- package/dist/inbox/names.js +2 -2
- package/dist/inbox/names.js.map +1 -1
- package/dist/index.d.ts +45 -71
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -53
- package/dist/index.js.map +1 -1
- package/dist/network/mesh.d.ts.map +1 -1
- package/dist/network/mesh.js +10 -0
- package/dist/network/mesh.js.map +1 -1
- package/dist/network/rendezvous.d.ts +2 -0
- package/dist/network/rendezvous.d.ts.map +1 -1
- package/dist/network/rendezvous.js +5 -0
- package/dist/network/rendezvous.js.map +1 -1
- package/dist/network/rtc-transport.d.ts.map +1 -1
- package/dist/network/rtc-transport.js +8 -3
- package/dist/network/rtc-transport.js.map +1 -1
- package/dist/node/carrier.d.ts +1 -33
- package/dist/node/carrier.d.ts.map +1 -1
- package/dist/node/carrier.js +38 -68
- package/dist/node/carrier.js.map +1 -1
- package/dist/node/index.d.ts +7 -14
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +4 -8
- package/dist/node/index.js.map +1 -1
- package/dist/node/node-carriers.d.ts.map +1 -1
- package/dist/node/node-carriers.js +21 -52
- package/dist/node/node-carriers.js.map +1 -1
- package/dist/node/node-context.d.ts +0 -2
- package/dist/node/node-context.d.ts.map +1 -1
- package/dist/node/node-context.js.map +1 -1
- package/dist/node/node-hosting.d.ts.map +1 -1
- package/dist/node/node-hosting.js +13 -4
- package/dist/node/node-hosting.js.map +1 -1
- package/dist/node/node-records.js +1 -1
- package/dist/node/node-records.js.map +1 -1
- package/dist/node/node.d.ts.map +1 -1
- package/dist/node/node.js +134 -36
- package/dist/node/node.js.map +1 -1
- package/dist/node/space-checks.d.ts +3 -1
- package/dist/node/space-checks.d.ts.map +1 -1
- package/dist/node/space-checks.js +7 -3
- package/dist/node/space-checks.js.map +1 -1
- package/dist/node/space-holding.d.ts +5 -0
- package/dist/node/space-holding.d.ts.map +1 -1
- package/dist/node/space-holding.js +90 -5
- package/dist/node/space-holding.js.map +1 -1
- package/dist/node/space-lines.d.ts +3 -0
- package/dist/node/space-lines.d.ts.map +1 -1
- package/dist/node/space-lines.js +13 -1
- package/dist/node/space-lines.js.map +1 -1
- package/dist/node/space-membership.js +4 -4
- package/dist/node/space-membership.js.map +1 -1
- package/dist/node/space-peers.d.ts +5 -2
- package/dist/node/space-peers.d.ts.map +1 -1
- package/dist/node/space-peers.js +3 -2
- package/dist/node/space-peers.js.map +1 -1
- package/dist/node/space-runtime.d.ts +3 -1
- package/dist/node/space-runtime.d.ts.map +1 -1
- package/dist/node/space-runtime.js +29 -8
- package/dist/node/space-runtime.js.map +1 -1
- package/dist/node/space-standing.d.ts +1 -1
- package/dist/node/space-standing.d.ts.map +1 -1
- package/dist/node/space-standing.js +11 -4
- package/dist/node/space-standing.js.map +1 -1
- package/dist/node/space-writing.d.ts.map +1 -1
- package/dist/node/space-writing.js +9 -0
- package/dist/node/space-writing.js.map +1 -1
- package/dist/node/stores.d.ts +9 -1
- package/dist/node/stores.d.ts.map +1 -1
- package/dist/node/stores.js +4 -2
- package/dist/node/stores.js.map +1 -1
- package/dist/node/types.d.ts +16 -5
- package/dist/node/types.d.ts.map +1 -1
- package/dist/node/worker.d.ts +14 -6
- package/dist/node/worker.d.ts.map +1 -1
- package/dist/node/worker.js +59 -20
- package/dist/node/worker.js.map +1 -1
- package/dist/node/writer-keys.d.ts +2 -2
- package/dist/node/writer-keys.d.ts.map +1 -1
- package/dist/node/writer-keys.js +12 -14
- package/dist/node/writer-keys.js.map +1 -1
- package/dist/privacy/direct.d.ts +0 -7
- package/dist/privacy/direct.d.ts.map +1 -1
- package/dist/privacy/direct.js +2 -2
- package/dist/privacy/direct.js.map +1 -1
- package/dist/query/filter.d.ts +0 -2
- package/dist/query/filter.d.ts.map +1 -1
- package/dist/query/filter.js +1 -1
- package/dist/query/filter.js.map +1 -1
- package/dist/query/types.d.ts +2 -6
- package/dist/query/types.d.ts.map +1 -1
- package/dist/query/types.js.map +1 -1
- package/dist/records/key.d.ts +2 -0
- package/dist/records/key.d.ts.map +1 -1
- package/dist/records/key.js +4 -0
- package/dist/records/key.js.map +1 -1
- package/dist/records/links.js +1 -1
- package/dist/schemas/direct.d.ts +70 -0
- package/dist/schemas/direct.d.ts.map +1 -0
- package/dist/schemas/direct.js +39 -0
- package/dist/schemas/direct.js.map +1 -0
- package/dist/schemas/index.d.ts +10 -73
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +8 -66
- package/dist/schemas/index.js.map +1 -1
- package/dist/session/account-hint.d.ts +2 -2
- package/dist/session/account-hint.d.ts.map +1 -1
- package/dist/session/account-hint.js +3 -3
- package/dist/session/account-hint.js.map +1 -1
- package/dist/session/connect.d.ts +12 -5
- package/dist/session/connect.d.ts.map +1 -1
- package/dist/session/connect.js +25 -21
- package/dist/session/connect.js.map +1 -1
- package/dist/session/connection.d.ts +26 -2
- package/dist/session/connection.d.ts.map +1 -1
- package/dist/session/connection.js +151 -11
- package/dist/session/connection.js.map +1 -1
- package/dist/session/hosting.d.ts +1 -7
- package/dist/session/hosting.d.ts.map +1 -1
- package/dist/session/hosting.js +3 -3
- package/dist/session/hosting.js.map +1 -1
- package/dist/session/index.d.ts +9 -14
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js +8 -11
- package/dist/session/index.js.map +1 -1
- package/dist/session/stay-signed-in.d.ts +0 -1
- package/dist/session/stay-signed-in.d.ts.map +1 -1
- package/dist/session/stay-signed-in.js +1 -1
- package/dist/session/stay-signed-in.js.map +1 -1
- package/dist/space/account-registry.d.ts +0 -3
- package/dist/space/account-registry.d.ts.map +1 -1
- package/dist/space/account-registry.js.map +1 -1
- package/dist/space/own-automations.d.ts +51 -95
- package/dist/space/own-automations.d.ts.map +1 -1
- package/dist/space/own-automations.js +100 -295
- package/dist/space/own-automations.js.map +1 -1
- package/dist/space/pass.d.ts +8 -3
- package/dist/space/pass.d.ts.map +1 -1
- package/dist/space/pass.js +4 -3
- package/dist/space/pass.js.map +1 -1
- package/dist/space/space-manager.d.ts +1 -3
- package/dist/space/space-manager.d.ts.map +1 -1
- package/dist/space/space-manager.js +5 -7
- package/dist/space/space-manager.js.map +1 -1
- package/dist/storage/body-cache.d.ts +26 -0
- package/dist/storage/body-cache.d.ts.map +1 -0
- package/dist/storage/body-cache.js +41 -0
- package/dist/storage/body-cache.js.map +1 -0
- package/dist/storage/encrypted-adapter.d.ts +0 -5
- package/dist/storage/encrypted-adapter.d.ts.map +1 -1
- package/dist/storage/encrypted-adapter.js +1 -1
- package/dist/storage/encrypted-adapter.js.map +1 -1
- package/dist/storage/folder-adapter.d.ts +8 -2
- package/dist/storage/folder-adapter.d.ts.map +1 -1
- package/dist/storage/folder-adapter.js +43 -26
- package/dist/storage/folder-adapter.js.map +1 -1
- package/dist/storage/indexeddb-adapter.js +27 -2
- package/dist/storage/indexeddb-adapter.js.map +1 -1
- package/dist/storage/sqlite-adapter.d.ts +57 -0
- package/dist/storage/sqlite-adapter.d.ts.map +1 -0
- package/dist/storage/sqlite-adapter.js +213 -0
- package/dist/storage/sqlite-adapter.js.map +1 -0
- package/dist/storage/storage-provider.d.ts +21 -2
- package/dist/storage/storage-provider.d.ts.map +1 -1
- package/dist/storage/storage-provider.js +149 -56
- package/dist/storage/storage-provider.js.map +1 -1
- package/dist/sync/sync-engine.d.ts +10 -4
- package/dist/sync/sync-engine.d.ts.map +1 -1
- package/dist/sync/sync-engine.js +120 -38
- package/dist/sync/sync-engine.js.map +1 -1
- package/dist/sync/sync-messages.d.ts +4 -0
- package/dist/sync/sync-messages.d.ts.map +1 -1
- package/dist/sync/sync-messages.js.map +1 -1
- package/dist/types.d.ts +0 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/step.d.ts +8 -0
- package/dist/utils/step.d.ts.map +1 -0
- package/dist/utils/step.js +15 -0
- package/dist/utils/step.js.map +1 -0
- package/docs/README.md +1 -1
- package/docs/actions.md +41 -2
- package/docs/agents.md +13 -10
- package/docs/automations.md +16 -48
- package/docs/blueprints-and-guides.md +2 -2
- package/docs/bots.md +3 -3
- package/docs/building-an-app.md +16 -0
- package/docs/collections.md +2 -4
- package/docs/computed.md +1 -2
- package/docs/node.md +112 -39
- package/docs/proposing-collections.md +3 -3
- package/docs/sign-in.md +45 -52
- package/docs/spaces.md +0 -5
- package/docs/standard-library.md +20 -8
- package/docs/storage.md +78 -12
- package/docs/usernames.md +3 -3
- package/package.json +7 -13
- package/dist/elements/auth-styles.d.ts +0 -18
- package/dist/elements/auth-styles.d.ts.map +0 -1
- package/dist/elements/auth-styles.js +0 -206
- package/dist/elements/auth-styles.js.map +0 -1
- package/dist/elements/dom.d.ts +0 -29
- package/dist/elements/dom.d.ts.map +0 -1
- package/dist/elements/dom.js +0 -91
- package/dist/elements/dom.js.map +0 -1
- package/dist/elements/index.d.ts +0 -13
- package/dist/elements/index.d.ts.map +0 -1
- package/dist/elements/index.js +0 -11
- package/dist/elements/index.js.map +0 -1
- package/dist/elements/minca-auth.d.ts +0 -55
- package/dist/elements/minca-auth.d.ts.map +0 -1
- package/dist/elements/minca-auth.js +0 -768
- package/dist/elements/minca-auth.js.map +0 -1
- package/dist/node/actions.d.ts +0 -85
- package/dist/node/actions.d.ts.map +0 -1
- package/dist/node/actions.js +0 -921
- package/dist/node/actions.js.map +0 -1
- package/dist/node/host.d.ts +0 -187
- package/dist/node/host.d.ts.map +0 -1
- package/dist/node/host.js +0 -818
- package/dist/node/host.js.map +0 -1
- package/dist/node/usage.d.ts +0 -32
- package/dist/node/usage.d.ts.map +0 -1
- package/dist/node/usage.js +0 -217
- package/dist/node/usage.js.map +0 -1
- package/dist/node/watch-notifications.d.ts +0 -19
- package/dist/node/watch-notifications.d.ts.map +0 -1
- package/dist/node/watch-notifications.js +0 -128
- package/dist/node/watch-notifications.js.map +0 -1
- package/dist/schemas/automations.d.ts +0 -390
- package/dist/schemas/automations.d.ts.map +0 -1
- package/dist/schemas/automations.js +0 -619
- package/dist/schemas/automations.js.map +0 -1
- package/dist/schemas/blueprints.d.ts +0 -122
- package/dist/schemas/blueprints.d.ts.map +0 -1
- package/dist/schemas/blueprints.js +0 -337
- package/dist/schemas/blueprints.js.map +0 -1
- package/dist/schemas/choosing.d.ts +0 -19
- package/dist/schemas/choosing.d.ts.map +0 -1
- package/dist/schemas/choosing.js +0 -69
- package/dist/schemas/choosing.js.map +0 -1
- package/dist/schemas/connectors.d.ts +0 -202
- package/dist/schemas/connectors.d.ts.map +0 -1
- package/dist/schemas/connectors.js +0 -140
- package/dist/schemas/connectors.js.map +0 -1
- package/dist/schemas/cron.d.ts +0 -14
- package/dist/schemas/cron.d.ts.map +0 -1
- package/dist/schemas/cron.js +0 -75
- package/dist/schemas/cron.js.map +0 -1
- package/dist/schemas/geo.d.ts +0 -63
- package/dist/schemas/geo.d.ts.map +0 -1
- package/dist/schemas/geo.js +0 -131
- package/dist/schemas/geo.js.map +0 -1
- package/dist/schemas/guides.d.ts +0 -26
- package/dist/schemas/guides.d.ts.map +0 -1
- package/dist/schemas/guides.js +0 -33
- package/dist/schemas/guides.js.map +0 -1
- package/dist/schemas/library/annotations.d.ts +0 -616
- package/dist/schemas/library/annotations.d.ts.map +0 -1
- package/dist/schemas/library/annotations.js +0 -156
- package/dist/schemas/library/annotations.js.map +0 -1
- package/dist/schemas/library/collections.d.ts +0 -211
- package/dist/schemas/library/collections.d.ts.map +0 -1
- package/dist/schemas/library/collections.js +0 -57
- package/dist/schemas/library/collections.js.map +0 -1
- package/dist/schemas/library/community.d.ts +0 -1136
- package/dist/schemas/library/community.d.ts.map +0 -1
- package/dist/schemas/library/community.js +0 -315
- package/dist/schemas/library/community.js.map +0 -1
- package/dist/schemas/library/life.d.ts +0 -1440
- package/dist/schemas/library/life.d.ts.map +0 -1
- package/dist/schemas/library/life.js +0 -202
- package/dist/schemas/library/life.js.map +0 -1
- package/dist/schemas/library/media.d.ts +0 -1002
- package/dist/schemas/library/media.d.ts.map +0 -1
- package/dist/schemas/library/media.js +0 -110
- package/dist/schemas/library/media.js.map +0 -1
- package/dist/schemas/library/money.d.ts +0 -1221
- package/dist/schemas/library/money.d.ts.map +0 -1
- package/dist/schemas/library/money.js +0 -168
- package/dist/schemas/library/money.js.map +0 -1
- package/dist/schemas/library/planning.d.ts +0 -1107
- package/dist/schemas/library/planning.d.ts.map +0 -1
- package/dist/schemas/library/planning.js +0 -214
- package/dist/schemas/library/planning.js.map +0 -1
- package/dist/schemas/library/publishing.d.ts +0 -1499
- package/dist/schemas/library/publishing.d.ts.map +0 -1
- package/dist/schemas/library/publishing.js +0 -285
- package/dist/schemas/library/publishing.js.map +0 -1
- package/dist/schemas/library/social.d.ts +0 -1257
- package/dist/schemas/library/social.d.ts.map +0 -1
- package/dist/schemas/library/social.js +0 -147
- package/dist/schemas/library/social.js.map +0 -1
- package/dist/schemas/standard.d.ts +0 -21
- package/dist/schemas/standard.d.ts.map +0 -1
- package/dist/schemas/standard.js +0 -39
- package/dist/schemas/standard.js.map +0 -1
- package/dist/session/auth.d.ts +0 -411
- package/dist/session/auth.d.ts.map +0 -1
- package/dist/session/auth.js +0 -1529
- package/dist/session/auth.js.map +0 -1
- package/dist/session/credentials.d.ts +0 -30
- package/dist/session/credentials.d.ts.map +0 -1
- package/dist/session/credentials.js +0 -63
- package/dist/session/credentials.js.map +0 -1
- package/dist/session/password-strength.d.ts +0 -22
- package/dist/session/password-strength.d.ts.map +0 -1
- package/dist/session/password-strength.js +0 -130
- package/dist/session/password-strength.js.map +0 -1
package/docs/storage.md
CHANGED
|
@@ -312,26 +312,71 @@ names a version that isn't there.
|
|
|
312
312
|
|
|
313
313
|
The library's adapters are IndexedDB ([above](#indexeddb)), a directory
|
|
314
314
|
(`directoryStores`, for a data folder's registry and a node's stores on
|
|
315
|
-
disk), a sealing wrapper, and one
|
|
315
|
+
disk), SQLite (`sqliteStores`, [below](#sqlite)), a sealing wrapper, and one
|
|
316
|
+
in memory for tests.
|
|
317
|
+
|
|
318
|
+
A directory store keeps its versions and its entries' keys in memory, so a
|
|
319
|
+
query or a listing reads no directory. It reads the keys again when the node
|
|
320
|
+
reloads it. The values stay on disk, since they include file chunks. A data
|
|
321
|
+
folder's registry is written by every app of the account and reloaded by
|
|
322
|
+
none, so it reads the disk each time instead (`shared`).
|
|
323
|
+
|
|
324
|
+
Since the keys are in memory, one process writes a directory store, or the
|
|
325
|
+
node that has it open watches it: the daemon finds a command's writes to a
|
|
326
|
+
space's store when it reloads, every two seconds. Until then a key another
|
|
327
|
+
writer deleted is still listed, though it reads as missing.
|
|
328
|
+
|
|
329
|
+
### SQLite
|
|
330
|
+
|
|
331
|
+
`sqliteStores(db)` keeps every store of a node in one SQLite database. A
|
|
332
|
+
host keeps its stores this way. Pass it a connection: `DatabaseSync` from
|
|
333
|
+
`node:sqlite` in Node, or `Database` from `bun:sqlite` in Bun. The library
|
|
334
|
+
imports no driver, so it runs wherever one does.
|
|
335
|
+
|
|
336
|
+
```ts
|
|
337
|
+
import { sqliteStores, type SqliteDatabase } from '@minca/core';
|
|
338
|
+
declare const DatabaseSync: new (file: string) => SqliteDatabase;
|
|
339
|
+
// ---cut---
|
|
340
|
+
// import { DatabaseSync } from 'node:sqlite';
|
|
341
|
+
const stores = sqliteStores(new DatabaseSync('node.sqlite'));
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Each store is a path, and its entries and version bodies are rows. Every
|
|
345
|
+
write is one transaction, and listing a prefix reads an index. A key may not
|
|
346
|
+
hold U+0000. It keeps
|
|
347
|
+
nothing in memory between calls, so there is nothing to reload, and nothing
|
|
348
|
+
polls it. One process writes the database. `stores.size(path)` gives what a
|
|
349
|
+
store takes, in bytes.
|
|
350
|
+
|
|
351
|
+
Closing a store leaves the database open, since the other stores share it.
|
|
352
|
+
Close the connection when the node is done.
|
|
316
353
|
|
|
317
354
|
## The store in memory
|
|
318
355
|
|
|
319
356
|
A store reads its entries once, then keeps what it needs in memory: each
|
|
320
357
|
collection's set of records, and the entries it read or wrote. It also keeps
|
|
321
|
-
|
|
358
|
+
version bodies, letting the one used longest ago go first. A body never
|
|
322
359
|
changes, so this is always safe. An entry read while a change was landing is
|
|
323
360
|
not kept.
|
|
324
361
|
|
|
362
|
+
Each store keeps up to 50,000 bodies of its own, unless its store factory
|
|
363
|
+
has a `cache`. Then all the stores share that one. The SQLite stores share
|
|
364
|
+
4,000, since reading a body again is cheap: the bodies a node keeps then
|
|
365
|
+
take the same memory however many spaces it holds. Each open space still
|
|
366
|
+
keeps its sets and entries.
|
|
367
|
+
|
|
325
368
|
When another writer changes the same store, the node reads all of it again
|
|
326
369
|
(`invalidate`):
|
|
327
370
|
|
|
328
|
-
- **Tabs in one browser.**
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
371
|
+
- **Tabs in one browser.** The app in this repository runs one node for all
|
|
372
|
+
of a site's tabs in a `SharedWorker`, one per account and key. Its stores
|
|
373
|
+
have that one writer, so there's nothing to tell, and a tab the browser
|
|
374
|
+
freezes holds nothing another waits on. The account home does the same.
|
|
375
|
+
- **In a browser without shared workers** each tab runs its node in a worker
|
|
376
|
+
of its own. Tabs tell each other through a
|
|
377
|
+
`BroadcastChannel` named `minca-node:<root DID>:<space id>`. Only the tab
|
|
378
|
+
in view runs its node, one at a time per account, so a frozen tab holds no
|
|
379
|
+
store another is waiting on.
|
|
335
380
|
- **Writers on a shared folder** are found by reading it again
|
|
336
381
|
([data folders](#data-folders)).
|
|
337
382
|
|
|
@@ -339,6 +384,23 @@ The store's fingerprint, in `spaces.status`, is the Negentropy fingerprint
|
|
|
339
384
|
of every collection together, as hex. Two nodes with the same fingerprint
|
|
340
385
|
hold the same data.
|
|
341
386
|
|
|
387
|
+
### Planned: stores that scale with what is in use
|
|
388
|
+
|
|
389
|
+
> **Planned.** Not built yet.
|
|
390
|
+
|
|
391
|
+
- **Sync sets that don't rebuild.** Today a write to a collection drops its
|
|
392
|
+
sorted set, and the next sync sorts it again. Kept in blocks, each with its
|
|
393
|
+
sum, a write would change one block, and a sync in progress would keep the
|
|
394
|
+
blocks it started with.
|
|
395
|
+
- **Files beside the database.** File chunks are 256 KiB, past the size SQLite
|
|
396
|
+
reads faster than separate files. A host would keep them as files under a
|
|
397
|
+
budget, with its bucket holding them all, and the database would know which
|
|
398
|
+
files each version names, so deleting what nothing names is one query.
|
|
399
|
+
- **Spaces open while used.** A host would close a space that has been idle,
|
|
400
|
+
and open it again when a peer asks for it.
|
|
401
|
+
- **The same store in the browser.** IndexedDB answering what SQLite does,
|
|
402
|
+
before deciding whether a browser needs SQLite at all.
|
|
403
|
+
|
|
342
404
|
## Pacing sync
|
|
343
405
|
|
|
344
406
|
The spec says which sync messages go, and when a peer must answer. How often
|
|
@@ -354,9 +416,13 @@ a node speaks, and how much it asks for at once, is its own choice:
|
|
|
354
416
|
| Versions waiting | 1,000 | Versions held back for later wait in memory. Past 1,000 the oldest go |
|
|
355
417
|
| Refusals remembered | 10,000 | A refused version isn't asked of that peer again. Past 10,000 the oldest are forgotten |
|
|
356
418
|
|
|
357
|
-
The
|
|
358
|
-
|
|
359
|
-
|
|
419
|
+
The side that starts reconciling begins with the space's own records
|
|
420
|
+
(`sys.*`, profiles among them), then the rest from the collection it holds
|
|
421
|
+
fewest versions of to the most, so a long log goes last. Which side starts is
|
|
422
|
+
down to the peers' ids. A new device that starts holds nothing yet, so past
|
|
423
|
+
`sys.*` it goes in the order the peer named the collections. The node asks
|
|
424
|
+
first for `sys.*` too, and for earlier versions a waiting version needs.
|
|
425
|
+
Everything else waits its turn. An id already asked for is not asked again.
|
|
360
426
|
|
|
361
427
|
A session with a peer that is running and has heard something in the last
|
|
362
428
|
30 s isn't started again. It runs once more when it ends.
|
package/docs/usernames.md
CHANGED
|
@@ -53,11 +53,11 @@ within a month of the name lapsing, so this is rare.
|
|
|
53
53
|
|
|
54
54
|
## At sign-up
|
|
55
55
|
|
|
56
|
-
Pass `usernames` to `createMincaAuth`, and the
|
|
57
|
-
|
|
56
|
+
Pass `usernames` to `createMincaAuth`, and the account is made with a
|
|
57
|
+
username: the create screen asks for one.
|
|
58
58
|
|
|
59
59
|
```ts
|
|
60
|
-
import { createMincaAuth } from '@minca/
|
|
60
|
+
import { createMincaAuth } from '@minca/auth';
|
|
61
61
|
|
|
62
62
|
const auth = createMincaAuth({ usernames: 'minca.social' });
|
|
63
63
|
```
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minca/core",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Self-sovereign P2P protocol for the browser
|
|
5
|
+
"description": "Self-sovereign P2P protocol for the browser \u2014 identity, schemas, storage, networking, and gossip sync",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/leifriksheim/minca.git",
|
|
@@ -31,11 +31,6 @@
|
|
|
31
31
|
"types": "./dist/node-worker.d.ts",
|
|
32
32
|
"import": "./dist/node-worker.js"
|
|
33
33
|
},
|
|
34
|
-
"./node": {
|
|
35
|
-
"@minca/source": "./src/node/index.ts",
|
|
36
|
-
"types": "./dist/node/index.d.ts",
|
|
37
|
-
"import": "./dist/node/index.js"
|
|
38
|
-
},
|
|
39
34
|
"./schemas": {
|
|
40
35
|
"@minca/source": "./src/schemas/index.ts",
|
|
41
36
|
"types": "./dist/schemas/index.d.ts",
|
|
@@ -46,11 +41,6 @@
|
|
|
46
41
|
"types": "./dist/session/index.d.ts",
|
|
47
42
|
"import": "./dist/session/index.js"
|
|
48
43
|
},
|
|
49
|
-
"./elements": {
|
|
50
|
-
"@minca/source": "./src/elements/index.ts",
|
|
51
|
-
"types": "./dist/elements/index.d.ts",
|
|
52
|
-
"import": "./dist/elements/index.js"
|
|
53
|
-
},
|
|
54
44
|
"./inbox": {
|
|
55
45
|
"@minca/source": "./src/inbox/index.ts",
|
|
56
46
|
"types": "./dist/inbox/index.d.ts",
|
|
@@ -60,13 +50,17 @@
|
|
|
60
50
|
"scripts": {
|
|
61
51
|
"build": "rm -rf dist && tsc",
|
|
62
52
|
"typecheck": "tsc --noEmit && tsc -p tests",
|
|
63
|
-
"test": "node --experimental-vm-modules --import tsx --test --test-concurrency=8 --test-timeout=60000 --test-force-exit tests/*.test.ts",
|
|
53
|
+
"test": "node --experimental-vm-modules --conditions=@minca/source --import tsx --test --test-concurrency=8 --test-timeout=60000 --test-force-exit tests/*.test.ts",
|
|
64
54
|
"prepack": "node ../../scripts/npm-readme.mjs",
|
|
65
55
|
"postpack": "rm -f README.md",
|
|
66
56
|
"prepublishOnly": "npm run build"
|
|
67
57
|
},
|
|
68
58
|
"devDependencies": {
|
|
59
|
+
"@minca/actions": "*",
|
|
60
|
+
"@minca/auth": "*",
|
|
61
|
+
"@minca/std": "*",
|
|
69
62
|
"@types/ws": "^8.18.2",
|
|
63
|
+
"esbuild": "^0.28.2",
|
|
70
64
|
"tsx": "^4.19.0",
|
|
71
65
|
"typescript": "^7.0.2",
|
|
72
66
|
"ws": "^8.22.0",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module elements/auth-styles
|
|
3
|
-
* How `<minca-auth>` looks.
|
|
4
|
-
*
|
|
5
|
-
* Black and white, hairline borders, one accent. Every colour, the font and
|
|
6
|
-
* the corner radius are custom properties on the element, so a host page
|
|
7
|
-
* restyles it without reaching inside:
|
|
8
|
-
*
|
|
9
|
-
* ```css
|
|
10
|
-
* minca-auth { --minca-accent: #4f46e5; --minca-font: 'Inter', sans-serif; }
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* It sizes itself to its container rather than the window — a container query,
|
|
14
|
-
* not a media query — so the same element fits a full page, a modal or a side
|
|
15
|
-
* panel without being told which.
|
|
16
|
-
*/
|
|
17
|
-
export declare const AUTH_CSS = "\nminca-auth {\n --minca-ink: #000;\n --minca-body: #171717;\n --minca-muted: #666;\n --minca-faint: #8f8f8f;\n --minca-surface: #fff;\n --minca-sunken: #fafafa;\n --minca-line: #eaeaea;\n --minca-line-strong: #d4d4d4;\n --minca-accent: #000;\n --minca-accent-hover: #383838;\n --minca-on-accent: #fff;\n --minca-danger: #e5484d;\n --minca-danger-soft: #fff0f0;\n --minca-warn: #9a5a0b;\n --minca-good: #2f7a52;\n --minca-radius: 6px;\n --minca-font: \"Geist\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;\n --minca-mono: \"Geist Mono\", ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;\n\n display: block;\n container-type: inline-size;\n color: var(--minca-body);\n font-family: var(--minca-font);\n font-size: 14px;\n letter-spacing: -0.006em;\n -webkit-font-smoothing: antialiased;\n}\nminca-auth[hidden] { display: none; }\nminca-auth *, minca-auth *::before, minca-auth *::after { box-sizing: border-box; }\nminca-auth :is(h1, p) { margin: 0; }\n\nminca-auth .wa-card { width: 100%; max-width: 380px; margin: 0 auto; }\nminca-auth .wa-wordmark { display: flex; align-items: center; gap: 8px; margin-bottom: 40px; color: var(--minca-ink); font-weight: 600; font-size: 16px; letter-spacing: -0.03em; }\nminca-auth .wa-title { font-size: 28px; font-weight: 600; letter-spacing: -0.04em; color: var(--minca-ink); margin-bottom: 8px; line-height: 1.2; }\nminca-auth .wa-subtitle { font-size: 15px; color: var(--minca-muted); margin-bottom: 32px; line-height: 1.5; }\nminca-auth .wa-hint { font-size: 14px; color: var(--minca-muted); margin-bottom: 20px; line-height: 1.6; }\nminca-auth .wa-small { font-size: 13px; color: var(--minca-muted); margin-top: 8px; line-height: 1.6; }\nminca-auth .wa-meter { display: flex; gap: 4px; margin-top: 2px; }\nminca-auth .wa-meter > span { flex: 1; height: 4px; border-radius: 2px; background: var(--minca-line); transition: background-color .15s ease; }\nminca-auth .wa-meter[data-strength=\"weak\"] > span:first-child { background: var(--minca-danger); }\nminca-auth .wa-meter[data-strength=\"fair\"] > span:not(:last-child) { background: var(--minca-warn); }\nminca-auth .wa-meter[data-strength=\"strong\"] > span { background: var(--minca-good); }\nminca-auth .wa-small[data-strength] { margin-top: 0; }\nminca-auth .wa-small[data-strength=\"weak\"] { color: var(--minca-danger); }\nminca-auth .wa-error { color: var(--minca-danger); font-size: 14px; font-weight: 500; }\nminca-auth .wa-error-box { margin-top: 16px; padding: 12px 14px; border-radius: var(--minca-radius); background: var(--minca-danger-soft); }\n\nminca-auth .wa-form { display: flex; flex-direction: column; gap: 8px; }\nminca-auth .wa-form + .wa-form { margin-top: 10px; }\nminca-auth input {\n width: 100%; height: 40px; padding: 0 12px;\n border-radius: var(--minca-radius); border: 1px solid var(--minca-line-strong);\n background: var(--minca-surface); color: var(--minca-ink);\n font: inherit; font-size: 14px; outline: none;\n transition: border-color .15s ease, box-shadow .15s ease;\n}\nminca-auth input::placeholder { color: var(--minca-faint); }\nminca-auth .wa-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--minca-ink); margin-top: 10px; }\nminca-auth .wa-optional { font-weight: 400; color: var(--minca-faint); }\nminca-auth .wa-under { margin-top: -2px; font-size: 12px; }\nminca-auth .wa-username {\n display: flex; align-items: center; height: 40px;\n border-radius: var(--minca-radius); border: 1px solid var(--minca-line-strong); background: var(--minca-surface);\n transition: border-color .15s ease, box-shadow .15s ease;\n}\nminca-auth .wa-username:focus-within { border-color: var(--minca-muted); box-shadow: 0 0 0 3px rgba(0, 0, 0, .06); }\nminca-auth .wa-username input, minca-auth .wa-username input:focus { flex: 1; min-width: 0; height: 100%; border: none; box-shadow: none; background: transparent; }\nminca-auth .wa-username > span { padding-right: 12px; color: var(--minca-muted); white-space: nowrap; }\nminca-auth .wa-domain { all: unset; padding: 0 12px 0 0; color: var(--minca-muted); white-space: nowrap; cursor: pointer; }\nminca-auth .wa-domain:hover, minca-auth .wa-domain:focus-visible { color: var(--minca-ink); text-decoration: underline; text-underline-offset: 3px; }\nminca-auth .wa-domain[hidden] { display: none; }\nminca-auth .wa-under a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }\nminca-auth .wa-mark { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin: 0 10px 0 -4px; padding: 0 !important; border-radius: 50%; font-size: 11px; font-weight: 700; }\nminca-auth .wa-mark:empty { display: none; }\nminca-auth .wa-mark[data-name=\"free\"] { background: var(--minca-good); color: #fff !important; }\nminca-auth .wa-mark[data-name=\"taken\"] { background: var(--minca-danger); color: #fff !important; }\nminca-auth .wa-small[data-name=\"taken\"] { color: var(--minca-danger); }\nminca-auth .wa-small[data-name=\"free\"]:not(.wa-under) { color: var(--minca-good); }\nminca-auth input:focus { border-color: var(--minca-muted); box-shadow: 0 0 0 3px rgba(0, 0, 0, .06); }\nminca-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\nminca-auth button { font: inherit; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }\nminca-auth button:not(:disabled) { cursor: pointer; }\nminca-auth button:disabled { opacity: .5; cursor: not-allowed; }\nminca-auth :focus-visible { outline: 2px solid var(--minca-ink); outline-offset: 2px; }\nminca-auth button:focus:not(:focus-visible) { outline: none; }\n\nminca-auth .wa-button {\n width: 100%; height: 40px; padding: 0 16px;\n border-radius: var(--minca-radius); border: 1px solid transparent;\n background: var(--minca-accent); color: var(--minca-on-accent);\n font-size: 14px; font-weight: 500;\n}\nminca-auth .wa-button:not(:disabled):hover { background: var(--minca-accent-hover); }\nminca-auth .wa-link {\n background: none; border: none; padding: 4px 0; margin-right: 12px;\n color: var(--minca-muted); font-size: 13px; font-weight: 500; text-align: left;\n}\nminca-auth .wa-link:not(:disabled):hover { color: var(--minca-ink); }\nminca-auth .wa-links { display: flex; flex-wrap: wrap; margin-top: 10px; }\n\n/* Choices are one list: a box, a hairline between each. */\nminca-auth .wa-options {\n display: flex; flex-direction: column; overflow: hidden;\n border: 1px solid var(--minca-line); border-radius: var(--minca-radius); background: var(--minca-surface);\n}\nminca-auth .wa-option {\n display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px;\n text-align: left; border: none; border-radius: 0; background: none; color: var(--minca-body);\n}\nminca-auth .wa-option:not(:disabled):hover { background: var(--minca-sunken); }\n/* After .wa-option, which has no border of its own, and as specific: the line between rows wins. */\nminca-auth .wa-options > :not(:first-child) { border-top: 1px solid var(--minca-line); }\nminca-auth .wa-option-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }\n/* Where a page draws each kind of choice's icon, by its data-option; empty, it takes no room. */\nminca-auth .wa-option-icon { display: none; flex-shrink: 0; width: 36px; height: 36px; background: center / contain no-repeat; }\nminca-auth .wa-options > .wa-steps { margin: 0; padding: 12px 16px 14px 36px; }\nminca-auth .wa-option-title { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--minca-ink); }\nminca-auth .wa-option-text { color: var(--minca-muted); font-size: 13px; line-height: 1.5; }\nminca-auth .wa-badge {\n font-size: 11px; font-weight: 500; padding: 1px 8px; border-radius: 999px;\n background: var(--minca-sunken); border: 1px solid var(--minca-line); color: var(--minca-muted);\n}\n\nminca-auth .wa-accounts { display: flex; flex-direction: column; gap: 8px; }\nminca-auth .wa-account { border: 1px solid var(--minca-line); border-radius: var(--minca-radius); background: var(--minca-surface); }\nminca-auth .wa-account-open { padding: 20px; border-color: var(--minca-line-strong); }\nminca-auth .wa-account-head { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 20px; }\nminca-auth .wa-account-head .wa-account-name { font-size: 17px; }\nminca-auth .wa-account-row {\n display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px;\n text-align: left; color: var(--minca-body);\n}\nminca-auth .wa-account-row:not(:disabled):hover { background: var(--minca-sunken); }\nminca-auth .wa-account-name { display: block; font-weight: 600; color: var(--minca-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\nminca-auth .wa-chevron { color: var(--minca-faint); font-size: 18px; }\nminca-auth .wa-small .wa-link { padding: 0; margin: 0 8px 0 0; font-size: 13px; }\nminca-auth .wa-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--minca-line); }\nminca-auth .wa-footer .wa-links { margin-top: 0; }\nminca-auth .wa-avatar { flex-shrink: 0; display: block; border-radius: 8px; }\nminca-auth .wa-avatar-round { border-radius: 50% !important; }\n\nminca-auth .wa-code {\n display: block; margin-top: 16px; padding: 12px; border-radius: var(--minca-radius);\n background: var(--minca-sunken); border: 1px solid var(--minca-line);\n font-family: var(--minca-mono); font-size: 13px; color: var(--minca-ink);\n word-break: break-all; user-select: all;\n}\n\nminca-auth .wa-code-large { font-size: 17px; letter-spacing: 0.04em; text-align: center; padding: 16px 12px; margin-top: 0; }\nminca-auth .wa-row { display: flex; gap: 8px; margin-top: 10px; }\nminca-auth .wa-secondary {\n flex: 1; height: 36px; padding: 0 12px;\n border-radius: var(--minca-radius); border: 1px solid var(--minca-line-strong);\n background: var(--minca-surface); color: var(--minca-ink); font-size: 13px; font-weight: 500;\n}\nminca-auth .wa-secondary:not(:disabled):hover { background: var(--minca-sunken); }\nminca-auth .wa-check { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 16px; font-size: 14px; line-height: 1.5; color: var(--minca-body); cursor: pointer; }\nminca-auth .wa-check input { width: 16px; height: 16px; margin: 3px 0 0; padding: 0; flex-shrink: 0; accent-color: var(--minca-accent); box-shadow: none; }\nminca-auth .wa-steps { margin: 0 0 20px; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--minca-body); }\n\nminca-auth .wa-info { position: relative; display: inline; }\nminca-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(--minca-line-strong); background: none;\n color: var(--minca-faint); font-size: 10px; font-weight: 700; line-height: 1;\n}\nminca-auth .wa-popover {\n position: absolute; z-index: 30; top: 22px; left: 0; width: min(260px, 80cqi);\n padding: 12px 14px; border-radius: var(--minca-radius);\n background: var(--minca-surface); border: 1px solid var(--minca-line);\n box-shadow: 0 12px 28px -12px rgba(15, 17, 21, .22);\n font-size: 12.5px; line-height: 1.6; color: var(--minca-muted); font-weight: 400;\n}\nminca-auth .wa-popover[hidden] { display: none; }\n\n@container (max-width: 340px) {\n minca-auth .wa-title { font-size: 24px; }\n minca-auth .wa-subtitle { margin-bottom: 24px; }\n minca-auth .wa-wordmark { margin-bottom: 28px; }\n minca-auth .wa-popover { left: auto; right: -8px; }\n}\n";
|
|
18
|
-
//# sourceMappingURL=auth-styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-styles.d.ts","sourceRoot":"","sources":["../../src/elements/auth-styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,QAAQ,wkXA4LpB,CAAC"}
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module elements/auth-styles
|
|
3
|
-
* How `<minca-auth>` looks.
|
|
4
|
-
*
|
|
5
|
-
* Black and white, hairline borders, one accent. Every colour, the font and
|
|
6
|
-
* the corner radius are custom properties on the element, so a host page
|
|
7
|
-
* restyles it without reaching inside:
|
|
8
|
-
*
|
|
9
|
-
* ```css
|
|
10
|
-
* minca-auth { --minca-accent: #4f46e5; --minca-font: 'Inter', sans-serif; }
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* It sizes itself to its container rather than the window — a container query,
|
|
14
|
-
* not a media query — so the same element fits a full page, a modal or a side
|
|
15
|
-
* panel without being told which.
|
|
16
|
-
*/
|
|
17
|
-
export const AUTH_CSS = `
|
|
18
|
-
minca-auth {
|
|
19
|
-
--minca-ink: #000;
|
|
20
|
-
--minca-body: #171717;
|
|
21
|
-
--minca-muted: #666;
|
|
22
|
-
--minca-faint: #8f8f8f;
|
|
23
|
-
--minca-surface: #fff;
|
|
24
|
-
--minca-sunken: #fafafa;
|
|
25
|
-
--minca-line: #eaeaea;
|
|
26
|
-
--minca-line-strong: #d4d4d4;
|
|
27
|
-
--minca-accent: #000;
|
|
28
|
-
--minca-accent-hover: #383838;
|
|
29
|
-
--minca-on-accent: #fff;
|
|
30
|
-
--minca-danger: #e5484d;
|
|
31
|
-
--minca-danger-soft: #fff0f0;
|
|
32
|
-
--minca-warn: #9a5a0b;
|
|
33
|
-
--minca-good: #2f7a52;
|
|
34
|
-
--minca-radius: 6px;
|
|
35
|
-
--minca-font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
36
|
-
--minca-mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
37
|
-
|
|
38
|
-
display: block;
|
|
39
|
-
container-type: inline-size;
|
|
40
|
-
color: var(--minca-body);
|
|
41
|
-
font-family: var(--minca-font);
|
|
42
|
-
font-size: 14px;
|
|
43
|
-
letter-spacing: -0.006em;
|
|
44
|
-
-webkit-font-smoothing: antialiased;
|
|
45
|
-
}
|
|
46
|
-
minca-auth[hidden] { display: none; }
|
|
47
|
-
minca-auth *, minca-auth *::before, minca-auth *::after { box-sizing: border-box; }
|
|
48
|
-
minca-auth :is(h1, p) { margin: 0; }
|
|
49
|
-
|
|
50
|
-
minca-auth .wa-card { width: 100%; max-width: 380px; margin: 0 auto; }
|
|
51
|
-
minca-auth .wa-wordmark { display: flex; align-items: center; gap: 8px; margin-bottom: 40px; color: var(--minca-ink); font-weight: 600; font-size: 16px; letter-spacing: -0.03em; }
|
|
52
|
-
minca-auth .wa-title { font-size: 28px; font-weight: 600; letter-spacing: -0.04em; color: var(--minca-ink); margin-bottom: 8px; line-height: 1.2; }
|
|
53
|
-
minca-auth .wa-subtitle { font-size: 15px; color: var(--minca-muted); margin-bottom: 32px; line-height: 1.5; }
|
|
54
|
-
minca-auth .wa-hint { font-size: 14px; color: var(--minca-muted); margin-bottom: 20px; line-height: 1.6; }
|
|
55
|
-
minca-auth .wa-small { font-size: 13px; color: var(--minca-muted); margin-top: 8px; line-height: 1.6; }
|
|
56
|
-
minca-auth .wa-meter { display: flex; gap: 4px; margin-top: 2px; }
|
|
57
|
-
minca-auth .wa-meter > span { flex: 1; height: 4px; border-radius: 2px; background: var(--minca-line); transition: background-color .15s ease; }
|
|
58
|
-
minca-auth .wa-meter[data-strength="weak"] > span:first-child { background: var(--minca-danger); }
|
|
59
|
-
minca-auth .wa-meter[data-strength="fair"] > span:not(:last-child) { background: var(--minca-warn); }
|
|
60
|
-
minca-auth .wa-meter[data-strength="strong"] > span { background: var(--minca-good); }
|
|
61
|
-
minca-auth .wa-small[data-strength] { margin-top: 0; }
|
|
62
|
-
minca-auth .wa-small[data-strength="weak"] { color: var(--minca-danger); }
|
|
63
|
-
minca-auth .wa-error { color: var(--minca-danger); font-size: 14px; font-weight: 500; }
|
|
64
|
-
minca-auth .wa-error-box { margin-top: 16px; padding: 12px 14px; border-radius: var(--minca-radius); background: var(--minca-danger-soft); }
|
|
65
|
-
|
|
66
|
-
minca-auth .wa-form { display: flex; flex-direction: column; gap: 8px; }
|
|
67
|
-
minca-auth .wa-form + .wa-form { margin-top: 10px; }
|
|
68
|
-
minca-auth input {
|
|
69
|
-
width: 100%; height: 40px; padding: 0 12px;
|
|
70
|
-
border-radius: var(--minca-radius); border: 1px solid var(--minca-line-strong);
|
|
71
|
-
background: var(--minca-surface); color: var(--minca-ink);
|
|
72
|
-
font: inherit; font-size: 14px; outline: none;
|
|
73
|
-
transition: border-color .15s ease, box-shadow .15s ease;
|
|
74
|
-
}
|
|
75
|
-
minca-auth input::placeholder { color: var(--minca-faint); }
|
|
76
|
-
minca-auth .wa-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--minca-ink); margin-top: 10px; }
|
|
77
|
-
minca-auth .wa-optional { font-weight: 400; color: var(--minca-faint); }
|
|
78
|
-
minca-auth .wa-under { margin-top: -2px; font-size: 12px; }
|
|
79
|
-
minca-auth .wa-username {
|
|
80
|
-
display: flex; align-items: center; height: 40px;
|
|
81
|
-
border-radius: var(--minca-radius); border: 1px solid var(--minca-line-strong); background: var(--minca-surface);
|
|
82
|
-
transition: border-color .15s ease, box-shadow .15s ease;
|
|
83
|
-
}
|
|
84
|
-
minca-auth .wa-username:focus-within { border-color: var(--minca-muted); box-shadow: 0 0 0 3px rgba(0, 0, 0, .06); }
|
|
85
|
-
minca-auth .wa-username input, minca-auth .wa-username input:focus { flex: 1; min-width: 0; height: 100%; border: none; box-shadow: none; background: transparent; }
|
|
86
|
-
minca-auth .wa-username > span { padding-right: 12px; color: var(--minca-muted); white-space: nowrap; }
|
|
87
|
-
minca-auth .wa-domain { all: unset; padding: 0 12px 0 0; color: var(--minca-muted); white-space: nowrap; cursor: pointer; }
|
|
88
|
-
minca-auth .wa-domain:hover, minca-auth .wa-domain:focus-visible { color: var(--minca-ink); text-decoration: underline; text-underline-offset: 3px; }
|
|
89
|
-
minca-auth .wa-domain[hidden] { display: none; }
|
|
90
|
-
minca-auth .wa-under a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
|
|
91
|
-
minca-auth .wa-mark { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin: 0 10px 0 -4px; padding: 0 !important; border-radius: 50%; font-size: 11px; font-weight: 700; }
|
|
92
|
-
minca-auth .wa-mark:empty { display: none; }
|
|
93
|
-
minca-auth .wa-mark[data-name="free"] { background: var(--minca-good); color: #fff !important; }
|
|
94
|
-
minca-auth .wa-mark[data-name="taken"] { background: var(--minca-danger); color: #fff !important; }
|
|
95
|
-
minca-auth .wa-small[data-name="taken"] { color: var(--minca-danger); }
|
|
96
|
-
minca-auth .wa-small[data-name="free"]:not(.wa-under) { color: var(--minca-good); }
|
|
97
|
-
minca-auth input:focus { border-color: var(--minca-muted); box-shadow: 0 0 0 3px rgba(0, 0, 0, .06); }
|
|
98
|
-
minca-auth .wa-offscreen {
|
|
99
|
-
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
100
|
-
overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
minca-auth button { font: inherit; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
|
|
104
|
-
minca-auth button:not(:disabled) { cursor: pointer; }
|
|
105
|
-
minca-auth button:disabled { opacity: .5; cursor: not-allowed; }
|
|
106
|
-
minca-auth :focus-visible { outline: 2px solid var(--minca-ink); outline-offset: 2px; }
|
|
107
|
-
minca-auth button:focus:not(:focus-visible) { outline: none; }
|
|
108
|
-
|
|
109
|
-
minca-auth .wa-button {
|
|
110
|
-
width: 100%; height: 40px; padding: 0 16px;
|
|
111
|
-
border-radius: var(--minca-radius); border: 1px solid transparent;
|
|
112
|
-
background: var(--minca-accent); color: var(--minca-on-accent);
|
|
113
|
-
font-size: 14px; font-weight: 500;
|
|
114
|
-
}
|
|
115
|
-
minca-auth .wa-button:not(:disabled):hover { background: var(--minca-accent-hover); }
|
|
116
|
-
minca-auth .wa-link {
|
|
117
|
-
background: none; border: none; padding: 4px 0; margin-right: 12px;
|
|
118
|
-
color: var(--minca-muted); font-size: 13px; font-weight: 500; text-align: left;
|
|
119
|
-
}
|
|
120
|
-
minca-auth .wa-link:not(:disabled):hover { color: var(--minca-ink); }
|
|
121
|
-
minca-auth .wa-links { display: flex; flex-wrap: wrap; margin-top: 10px; }
|
|
122
|
-
|
|
123
|
-
/* Choices are one list: a box, a hairline between each. */
|
|
124
|
-
minca-auth .wa-options {
|
|
125
|
-
display: flex; flex-direction: column; overflow: hidden;
|
|
126
|
-
border: 1px solid var(--minca-line); border-radius: var(--minca-radius); background: var(--minca-surface);
|
|
127
|
-
}
|
|
128
|
-
minca-auth .wa-option {
|
|
129
|
-
display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px;
|
|
130
|
-
text-align: left; border: none; border-radius: 0; background: none; color: var(--minca-body);
|
|
131
|
-
}
|
|
132
|
-
minca-auth .wa-option:not(:disabled):hover { background: var(--minca-sunken); }
|
|
133
|
-
/* After .wa-option, which has no border of its own, and as specific: the line between rows wins. */
|
|
134
|
-
minca-auth .wa-options > :not(:first-child) { border-top: 1px solid var(--minca-line); }
|
|
135
|
-
minca-auth .wa-option-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
|
|
136
|
-
/* Where a page draws each kind of choice's icon, by its data-option; empty, it takes no room. */
|
|
137
|
-
minca-auth .wa-option-icon { display: none; flex-shrink: 0; width: 36px; height: 36px; background: center / contain no-repeat; }
|
|
138
|
-
minca-auth .wa-options > .wa-steps { margin: 0; padding: 12px 16px 14px 36px; }
|
|
139
|
-
minca-auth .wa-option-title { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--minca-ink); }
|
|
140
|
-
minca-auth .wa-option-text { color: var(--minca-muted); font-size: 13px; line-height: 1.5; }
|
|
141
|
-
minca-auth .wa-badge {
|
|
142
|
-
font-size: 11px; font-weight: 500; padding: 1px 8px; border-radius: 999px;
|
|
143
|
-
background: var(--minca-sunken); border: 1px solid var(--minca-line); color: var(--minca-muted);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
minca-auth .wa-accounts { display: flex; flex-direction: column; gap: 8px; }
|
|
147
|
-
minca-auth .wa-account { border: 1px solid var(--minca-line); border-radius: var(--minca-radius); background: var(--minca-surface); }
|
|
148
|
-
minca-auth .wa-account-open { padding: 20px; border-color: var(--minca-line-strong); }
|
|
149
|
-
minca-auth .wa-account-head { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 20px; }
|
|
150
|
-
minca-auth .wa-account-head .wa-account-name { font-size: 17px; }
|
|
151
|
-
minca-auth .wa-account-row {
|
|
152
|
-
display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px;
|
|
153
|
-
text-align: left; color: var(--minca-body);
|
|
154
|
-
}
|
|
155
|
-
minca-auth .wa-account-row:not(:disabled):hover { background: var(--minca-sunken); }
|
|
156
|
-
minca-auth .wa-account-name { display: block; font-weight: 600; color: var(--minca-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
157
|
-
minca-auth .wa-chevron { color: var(--minca-faint); font-size: 18px; }
|
|
158
|
-
minca-auth .wa-small .wa-link { padding: 0; margin: 0 8px 0 0; font-size: 13px; }
|
|
159
|
-
minca-auth .wa-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--minca-line); }
|
|
160
|
-
minca-auth .wa-footer .wa-links { margin-top: 0; }
|
|
161
|
-
minca-auth .wa-avatar { flex-shrink: 0; display: block; border-radius: 8px; }
|
|
162
|
-
minca-auth .wa-avatar-round { border-radius: 50% !important; }
|
|
163
|
-
|
|
164
|
-
minca-auth .wa-code {
|
|
165
|
-
display: block; margin-top: 16px; padding: 12px; border-radius: var(--minca-radius);
|
|
166
|
-
background: var(--minca-sunken); border: 1px solid var(--minca-line);
|
|
167
|
-
font-family: var(--minca-mono); font-size: 13px; color: var(--minca-ink);
|
|
168
|
-
word-break: break-all; user-select: all;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
minca-auth .wa-code-large { font-size: 17px; letter-spacing: 0.04em; text-align: center; padding: 16px 12px; margin-top: 0; }
|
|
172
|
-
minca-auth .wa-row { display: flex; gap: 8px; margin-top: 10px; }
|
|
173
|
-
minca-auth .wa-secondary {
|
|
174
|
-
flex: 1; height: 36px; padding: 0 12px;
|
|
175
|
-
border-radius: var(--minca-radius); border: 1px solid var(--minca-line-strong);
|
|
176
|
-
background: var(--minca-surface); color: var(--minca-ink); font-size: 13px; font-weight: 500;
|
|
177
|
-
}
|
|
178
|
-
minca-auth .wa-secondary:not(:disabled):hover { background: var(--minca-sunken); }
|
|
179
|
-
minca-auth .wa-check { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 16px; font-size: 14px; line-height: 1.5; color: var(--minca-body); cursor: pointer; }
|
|
180
|
-
minca-auth .wa-check input { width: 16px; height: 16px; margin: 3px 0 0; padding: 0; flex-shrink: 0; accent-color: var(--minca-accent); box-shadow: none; }
|
|
181
|
-
minca-auth .wa-steps { margin: 0 0 20px; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--minca-body); }
|
|
182
|
-
|
|
183
|
-
minca-auth .wa-info { position: relative; display: inline; }
|
|
184
|
-
minca-auth .wa-info-button {
|
|
185
|
-
display: inline-flex; align-items: center; justify-content: center;
|
|
186
|
-
width: 16px; height: 16px; padding: 0; margin-left: 6px; vertical-align: text-bottom;
|
|
187
|
-
border-radius: 999px; border: 1px solid var(--minca-line-strong); background: none;
|
|
188
|
-
color: var(--minca-faint); font-size: 10px; font-weight: 700; line-height: 1;
|
|
189
|
-
}
|
|
190
|
-
minca-auth .wa-popover {
|
|
191
|
-
position: absolute; z-index: 30; top: 22px; left: 0; width: min(260px, 80cqi);
|
|
192
|
-
padding: 12px 14px; border-radius: var(--minca-radius);
|
|
193
|
-
background: var(--minca-surface); border: 1px solid var(--minca-line);
|
|
194
|
-
box-shadow: 0 12px 28px -12px rgba(15, 17, 21, .22);
|
|
195
|
-
font-size: 12.5px; line-height: 1.6; color: var(--minca-muted); font-weight: 400;
|
|
196
|
-
}
|
|
197
|
-
minca-auth .wa-popover[hidden] { display: none; }
|
|
198
|
-
|
|
199
|
-
@container (max-width: 340px) {
|
|
200
|
-
minca-auth .wa-title { font-size: 24px; }
|
|
201
|
-
minca-auth .wa-subtitle { margin-bottom: 24px; }
|
|
202
|
-
minca-auth .wa-wordmark { margin-bottom: 28px; }
|
|
203
|
-
minca-auth .wa-popover { left: auto; right: -8px; }
|
|
204
|
-
}
|
|
205
|
-
`;
|
|
206
|
-
//# sourceMappingURL=auth-styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-styles.js","sourceRoot":"","sources":["../../src/elements/auth-styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4LvB,CAAC"}
|
package/dist/elements/dom.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module elements/dom
|
|
3
|
-
* Just enough DOM building for the elements to stay readable without a
|
|
4
|
-
* framework: `h('button', { onclick }, 'Save')`.
|
|
5
|
-
*/
|
|
6
|
-
export type Child = Node | string | number | false | null | undefined | ReadonlyArray<Child>;
|
|
7
|
-
type Props = Record<string, unknown> & {
|
|
8
|
-
class?: string;
|
|
9
|
-
style?: string;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Makes an element. Props starting with `on` become listeners, `class` and
|
|
13
|
-
* `style` are set as attributes, booleans toggle attributes, anything else is
|
|
14
|
-
* set as a property when the element has one and an attribute otherwise.
|
|
15
|
-
*/
|
|
16
|
-
export declare function h<K extends keyof HTMLElementTagNameMap>(tag: K, props?: Props | null, ...children: Child[]): HTMLElementTagNameMap[K];
|
|
17
|
-
export declare function h(tag: string, props?: Props | null, ...children: Child[]): HTMLElement;
|
|
18
|
-
/** Markup from trusted, constant strings — an icon, never anything a person typed. */
|
|
19
|
-
export declare function svg(markup: string): Element;
|
|
20
|
-
/**
|
|
21
|
-
* Adds a stylesheet to the document once, by id.
|
|
22
|
-
*
|
|
23
|
-
* A constructed stylesheet where the browser has them — it needs no inline
|
|
24
|
-
* `<style>`, so a strict Content-Security-Policy is no obstacle — and a style
|
|
25
|
-
* element otherwise.
|
|
26
|
-
*/
|
|
27
|
-
export declare function adoptStyles(id: string, css: string): void;
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/elements/dom.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAE7F,KAAK,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAK1E;;;;GAIG;AACH,wBAAgB,CAAC,CAAC,CAAC,SAAS,MAAM,qBAAqB,EACrD,GAAG,EAAE,CAAC,EACN,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,EACpB,GAAG,QAAQ,EAAE,KAAK,EAAE,GACnB,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAC5B,wBAAgB,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,QAAQ,EAAE,KAAK,EAAE,GAAG,WAAW,CAAC;AAwCxF,sFAAsF;AACtF,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAI3C;AAWD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAoBzD"}
|
package/dist/elements/dom.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module elements/dom
|
|
3
|
-
* Just enough DOM building for the elements to stay readable without a
|
|
4
|
-
* framework: `h('button', { onclick }, 'Save')`.
|
|
5
|
-
*/
|
|
6
|
-
/** Always set as attributes: their properties want other types, or do not exist on every element */
|
|
7
|
-
const ATTRIBUTES = new Set(['class', 'style', 'role', 'spellcheck', 'autocomplete', 'tabindex', 'for']);
|
|
8
|
-
export function h(tag, props = null, ...children) {
|
|
9
|
-
const element = globalThis.document.createElement(tag);
|
|
10
|
-
for (const [name, value] of Object.entries(props ?? {})) {
|
|
11
|
-
if (value === undefined || value === null || value === false)
|
|
12
|
-
continue;
|
|
13
|
-
if (name.startsWith('on') && typeof value === 'function') {
|
|
14
|
-
element.addEventListener(name.slice(2), (event) => {
|
|
15
|
-
Reflect.apply(value, element, [event]);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
else if (value === true) {
|
|
19
|
-
element.setAttribute(name, '');
|
|
20
|
-
}
|
|
21
|
-
else if (ATTRIBUTES.has(name) ||
|
|
22
|
-
name.startsWith('data-') ||
|
|
23
|
-
name.startsWith('aria-') ||
|
|
24
|
-
!(name in element)) {
|
|
25
|
-
// What setAttribute would make of it anyway; props hold text and numbers.
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/no-base-to-string -- the DOM's own conversion
|
|
27
|
-
element.setAttribute(name, String(value));
|
|
28
|
-
}
|
|
29
|
-
else if (!Reflect.set(element, name, value)) {
|
|
30
|
-
throw new TypeError(`Cannot set ${name} on <${tag}>`);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
append(element, children);
|
|
34
|
-
return element;
|
|
35
|
-
}
|
|
36
|
-
// Array.isArray does not narrow a readonly array out of a union.
|
|
37
|
-
const isChildList = (child) => Array.isArray(child);
|
|
38
|
-
function append(parent, children) {
|
|
39
|
-
for (const child of children) {
|
|
40
|
-
if (child === null || child === undefined || child === false)
|
|
41
|
-
continue;
|
|
42
|
-
if (isChildList(child))
|
|
43
|
-
append(parent, child);
|
|
44
|
-
else if (typeof child === 'object')
|
|
45
|
-
parent.appendChild(child);
|
|
46
|
-
else
|
|
47
|
-
parent.appendChild(globalThis.document.createTextNode(String(child)));
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
/** Markup from trusted, constant strings — an icon, never anything a person typed. */
|
|
51
|
-
export function svg(markup) {
|
|
52
|
-
const template = globalThis.document.createElement('template');
|
|
53
|
-
template.innerHTML = markup.trim();
|
|
54
|
-
return template.content.firstElementChild;
|
|
55
|
-
}
|
|
56
|
-
/** Kept on the document itself, so two copies of this library on one page still add each sheet once */
|
|
57
|
-
function adoptedIds(doc) {
|
|
58
|
-
const found = Reflect.get(doc, '__mincaStyles');
|
|
59
|
-
if (found instanceof Set)
|
|
60
|
-
return found;
|
|
61
|
-
const ids = new Set();
|
|
62
|
-
Reflect.set(doc, '__mincaStyles', ids);
|
|
63
|
-
return ids;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Adds a stylesheet to the document once, by id.
|
|
67
|
-
*
|
|
68
|
-
* A constructed stylesheet where the browser has them — it needs no inline
|
|
69
|
-
* `<style>`, so a strict Content-Security-Policy is no obstacle — and a style
|
|
70
|
-
* element otherwise.
|
|
71
|
-
*/
|
|
72
|
-
export function adoptStyles(id, css) {
|
|
73
|
-
const doc = globalThis.document;
|
|
74
|
-
const adopted = adoptedIds(doc);
|
|
75
|
-
if (adopted.has(id))
|
|
76
|
-
return;
|
|
77
|
-
adopted.add(id);
|
|
78
|
-
if ('adoptedStyleSheets' in doc &&
|
|
79
|
-
typeof CSSStyleSheet === 'function' &&
|
|
80
|
-
'replaceSync' in CSSStyleSheet.prototype) {
|
|
81
|
-
const sheet = new CSSStyleSheet();
|
|
82
|
-
sheet.replaceSync(css);
|
|
83
|
-
doc.adoptedStyleSheets = [...doc.adoptedStyleSheets, sheet];
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
const style = doc.createElement('style');
|
|
87
|
-
style.id = id;
|
|
88
|
-
style.textContent = css;
|
|
89
|
-
doc.head.appendChild(style);
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingURL=dom.js.map
|
package/dist/elements/dom.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dom.js","sourceRoot":"","sources":["../../src/elements/dom.ts"],"names":[],"mappings":"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"}
|
package/dist/elements/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module elements
|
|
3
|
-
* Web components for Minca, usable from any framework or none. Importing this
|
|
4
|
-
* registers them.
|
|
5
|
-
*
|
|
6
|
-
* - `<minca-auth>` — the sign-in flow: where the data lives, which account,
|
|
7
|
-
* the ways into it. Fires `minca-session` when someone signs in or out.
|
|
8
|
-
*/
|
|
9
|
-
export { MincaAuthElement, defineMincaAuth } from './minca-auth.js';
|
|
10
|
-
export type { MincaSessionEventDetail } from './minca-auth.js';
|
|
11
|
-
export { createMincaAuth } from '../session/auth.js';
|
|
12
|
-
export type { MincaAuth, MincaAuthConfig, AuthState, MincaSession } from '../session/auth.js';
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/elements/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACpE,YAAY,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/elements/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module elements
|
|
3
|
-
* Web components for Minca, usable from any framework or none. Importing this
|
|
4
|
-
* registers them.
|
|
5
|
-
*
|
|
6
|
-
* - `<minca-auth>` — the sign-in flow: where the data lives, which account,
|
|
7
|
-
* the ways into it. Fires `minca-session` when someone signs in or out.
|
|
8
|
-
*/
|
|
9
|
-
export { MincaAuthElement, defineMincaAuth } from './minca-auth.js';
|
|
10
|
-
export { createMincaAuth } from '../session/auth.js';
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/elements/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|