@fairfox/polly 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/client/index.js +2 -2
- package/dist/src/client/index.js.map +2 -2
- package/dist/src/elysia/index.js +37 -35
- package/dist/src/elysia/index.js.map +3 -3
- package/dist/src/peer.js +7 -5
- package/dist/src/peer.js.map +3 -3
- package/dist/src/polly-ui/Badge.d.ts +17 -0
- package/dist/src/polly-ui/Button.d.ts +47 -0
- package/dist/src/polly-ui/Checkbox.d.ts +20 -0
- package/dist/src/polly-ui/Collapsible.d.ts +17 -0
- package/dist/src/polly-ui/Dropdown.d.ts +23 -0
- package/dist/src/polly-ui/Layout.d.ts +2 -0
- package/dist/src/polly-ui/Select.d.ts +26 -0
- package/dist/src/polly-ui/Skeleton.d.ts +18 -0
- package/dist/src/polly-ui/Tabs.d.ts +24 -0
- package/dist/src/polly-ui/Toggle.d.ts +20 -0
- package/dist/src/polly-ui/index.css +541 -41
- package/dist/src/polly-ui/index.d.ts +9 -0
- package/dist/src/polly-ui/index.js +756 -128
- package/dist/src/polly-ui/index.js.map +14 -5
- package/dist/src/polly-ui/markdown.d.ts +19 -0
- package/dist/src/polly-ui/theme.css +54 -0
- package/dist/src/shared/lib/peer-repo-server.d.ts +8 -8
- package/dist/tools/verify/src/cli.js +3 -3
- package/dist/tools/verify/src/cli.js.map +1 -1
- package/package.json +17 -3
package/dist/src/peer.js.map
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"/**\n * peer-relay-adapter — Phase 1 client helper for connecting a Polly $peerState\n * application to an Automerge-Repo relay server over WebSocket.\n *\n * The Phase 0 base $crdtState and the Phase 1 $peerState wrapper both consume\n * a caller-supplied `Repo` via `configurePeerState`. This module provides the\n * one-call factory that builds a Repo wired to the relay transport: a\n * `WebSocketClientAdapter` from `@automerge/automerge-repo-network-websocket`\n * pointed at the server URL, an `IndexedDBStorageAdapter` for client-side\n * persistence, and a Polly-shaped connection-state signal that the application\n * can render as a diagnostic UI or feed into reconnection logic.\n *\n * The mirror server-side factory is in {@link peer-repo-server}.\n *\n * @example\n * ```ts\n * import { configurePeerState } from \"@fairfox/polly\";\n * import { createPeerStateClient } from \"@fairfox/polly\";\n *\n * const { repo, connectionState } = await createPeerStateClient({\n * url: \"wss://yourapp.example.com/polly/peer\",\n * });\n * configurePeerState(repo);\n *\n * // connectionState is a Signal<\"connecting\" | \"connected\" | \"disconnected\">\n * ```\n */\n\nimport { type NetworkAdapterInterface, Repo } from \"@automerge/automerge-repo/slim\";\nimport { WebSocketClientAdapter } from \"@automerge/automerge-repo-network-websocket\";\nimport { type Signal, signal } from \"@preact/signals\";\nimport { type MeshKeyring, MeshNetworkAdapter } from \"./mesh-network-adapter\";\n\nexport type PeerRelayConnectionState = \"connecting\" | \"connected\" | \"disconnected\";\n\nexport interface CreatePeerStateClientOptions {\n /** WebSocket URL of the Polly peer-relay server. Use `ws://` for local\n * development and `wss://` for any deployment that terminates TLS. */\n url: string;\n /** Reconnect interval in milliseconds. Defaults to Automerge-Repo's own\n * default (5 seconds at the time of writing). */\n retryInterval?: number;\n /** Optional storage adapter. Applications running in a browser typically\n * pass an `IndexedDBStorageAdapter`; tests pass nothing for a local-only\n * Repo. The default is no storage, which keeps the client purely in-memory. */\n storage?: ConstructorParameters<typeof Repo>[0] extends infer C\n ? C extends { storage?: infer S }\n ? S\n : never\n : never;\n /** Enable Ed25519 signing on every sync message. Adds Byzantine defence:\n * a compromised client cannot push unsigned writes through the relay.\n * Requires a keyring with the local peer's signing identity and the\n * public keys of peers whose ops should be accepted. The server can\n * still read and mutate document contents because the payload is\n * signed, not encrypted. */\n sign?: boolean;\n /** Keyring for the signing layer. Required when `sign` is true. */\n keyring?: MeshKeyring;\n}\n\nexport interface PeerStateClient {\n /** A configured Repo backed by the WebSocket relay. Pass to\n * {@link configurePeerState}. */\n repo: Repo;\n /** Reactive connection state. Updates as the underlying WebSocket opens,\n * closes, and reconnects. */\n connectionState: Signal<PeerRelayConnectionState>;\n /** The underlying network adapter, exposed for advanced use. */\n adapter: WebSocketClientAdapter;\n /** True if the client was constructed with `sign: true`. Used by\n * $peerState primitives to validate per-primitive sign options. */\n signEnabled: boolean;\n /** Disconnect from the relay and tear down the Repo. Awaiting the\n * returned promise drains the Repo's subsystems cleanly. */\n close: () => Promise<void>;\n}\n\n/**\n * Construct a Polly-flavoured client for the peer-relay transport.\n *\n * The returned object includes the Repo, a connection-state signal, the\n * underlying network adapter, and a close function. Production code typically\n * passes the Repo to {@link configurePeerState} and renders the connection\n * state somewhere visible.\n */\nexport function createPeerStateClient(options: CreatePeerStateClientOptions): PeerStateClient {\n if (options.sign && !options.keyring) {\n throw new Error(\n \"Polly createPeerStateClient: { sign: true } requires a keyring. Pass { keyring: { identity, knownPeers, documentKeys: new Map(), revokedPeers: new Set() } } to enable signing.\"\n );\n }\n\n const adapter = new WebSocketClientAdapter(options.url, options.retryInterval);\n const connectionState = signal<PeerRelayConnectionState>(\"connecting\");\n\n // The WebSocketClientAdapter is itself an EventEmitter (via Automerge's\n // NetworkAdapter base class) and emits 'peer-candidate' / 'peer-disconnected'\n // events. We track the simpler open/close lifecycle by listening to those.\n adapter.on(\"peer-candidate\", () => {\n connectionState.value = \"connected\";\n });\n adapter.on(\"peer-disconnected\", () => {\n connectionState.value = \"disconnected\";\n });\n adapter.on(\"close\", () => {\n connectionState.value = \"disconnected\";\n });\n\n // When signing is enabled, wrap the WebSocket adapter with a sign-only\n // MeshNetworkAdapter. This signs every outgoing message but does NOT\n // encrypt, so the relay server can still parse Automerge sync messages\n // and participate as a full peer (cron, HTTP handlers, etc.).\n const networkAdapter: NetworkAdapterInterface =\n options.sign && options.keyring\n ? new MeshNetworkAdapter({\n base: adapter,\n keyring: options.keyring,\n encryptionEnabled: false,\n })\n : adapter;\n\n const repo = new Repo({\n network: [networkAdapter],\n ...(options.storage !== undefined && { storage: options.storage }),\n });\n\n return {\n repo,\n connectionState,\n adapter,\n signEnabled: options.sign === true,\n close: async () => {\n await repo.shutdown();\n },\n };\n}\n",
|
|
13
13
|
"/**\n * mesh-network-adapter — Phase 2 wrapping NetworkAdapter that adds Polly's\n * mesh-transport semantics on top of any underlying Automerge NetworkAdapter.\n *\n * The mesh transport's job is to make every message between peers signed\n * and encrypted before it reaches the wire. Rather than reimplementing the\n * Automerge sync protocol, this adapter takes a base adapter (in production\n * a real WebRTC or WebSocket adapter; in tests an in-memory loopback) and\n * applies the crypto envelope to every message that flows through.\n *\n * Outgoing path (Repo → wire):\n * 1. The Repo's NetworkSubsystem calls send(message) on this adapter.\n * 2. We serialise the message to bytes, encrypt them under the local\n * keyring's document key, sign the resulting blob with the local\n * identity's secret key, and pack the pair into a MeshFrame.\n * 3. We hand the MeshFrame off to the base adapter, which puts it on\n * whatever wire it owns.\n *\n * Incoming path (wire → Repo):\n * 1. The base adapter emits a 'message' event with bytes from the wire.\n * 2. We unpack the MeshFrame, look up the sender's public key in the\n * keyring, verify the signature, look up the document key, decrypt\n * the payload, and deserialise it back to the original message.\n * 3. We re-emit the 'message' event upward to the Repo's NetworkSubsystem\n * with the decrypted message.\n *\n * The keyring is an injected dependency. In production it's backed by\n * persistent storage and populated through the pairing flow. For tests it\n * is just a Map of publicly-known fixtures that both sides share.\n *\n * Caveat for the Phase 2 first cut: Automerge sync messages don't have a\n * stable \"what document does this belong to\" field at the wire level (the\n * documentId is part of the message contents). The mesh adapter therefore\n * uses a single per-Repo encryption key for now rather than per-document\n * keys, and stores the key once in the keyring under the well-known id\n * \"polly-mesh-default\". The plan describes per-document keys as the right\n * end state; that requires either parsing the message to extract the\n * documentId before encrypting (peeking inside the binary protocol) or\n * threading the document context through the network subsystem (which\n * needs upstream support). A follow-up will address this.\n */\n\nimport {\n type Message,\n NetworkAdapter,\n type PeerId,\n type PeerMetadata,\n} from \"@automerge/automerge-repo/slim\";\nimport {\n decodeEncryptedEnvelope,\n encodeEncryptedEnvelope,\n openEnvelope as openEncryptedEnvelope,\n sealEnvelope as sealEncryptedEnvelope,\n} from \"./encryption\";\nimport {\n decodeSignedEnvelope,\n encodeSignedEnvelope,\n openEnvelope as openSignedEnvelope,\n type SigningKeyPair,\n signEnvelope,\n} from \"./signing\";\n\n/** The well-known document id used for the Phase 2 first-cut single-key\n * encryption mode. See the file-level comment for the per-document key\n * follow-up. */\nexport const DEFAULT_MESH_KEY_ID = \"polly-mesh-default\";\n\n/**\n * A mesh keyring holds the local peer's signing identity, the public keys\n * of every peer the local node will accept messages from, the symmetric\n * encryption keys for documents the local node has access to, and the set\n * of peers whose keys have been revoked.\n */\nexport interface MeshKeyring {\n /** The local peer's signing keypair. The secret never leaves this\n * keyring; the public key is gossiped through the access set. */\n identity: SigningKeyPair;\n /** Map from peer id (string) to that peer's signing public key. The\n * mesh adapter rejects messages from peers not present in this map. */\n knownPeers: Map<string, Uint8Array>;\n /** Map from document key id (typically the documentId, or the well-known\n * default for the single-key first cut) to the symmetric encryption key. */\n documentKeys: Map<string, Uint8Array>;\n /** Set of peer ids whose keys have been revoked. The mesh adapter drops\n * incoming messages from any peer in this set, even if the peer is still\n * present in {@link knownPeers}. Revocation is applied via the revocation\n * module; the set is kept separate from knownPeers so that an application\n * can audit who was once authorised without losing the revocation record. */\n revokedPeers: Set<string>;\n /** Optional set of peer ids authorised to issue revocations. When present\n * and non-empty, `decodeRevocation` accepts a signed record only if the\n * issuer is in this set. When undefined or empty, any signed revocation\n * from a known peer is accepted (the Phase 2 first-cut default). This\n * field layers a \"who can revoke whom\" check on top of the signature\n * layer without breaking existing callers. */\n revocationAuthority?: Set<string>;\n}\n\n/**\n * Constructor options for {@link MeshNetworkAdapter}.\n */\nexport interface MeshNetworkAdapterOptions {\n /** The underlying NetworkAdapter that puts crypto-wrapped bytes on the\n * wire. In production this is a WebRTC or WebSocket adapter; in tests\n * it's an in-memory loopback. */\n base: NetworkAdapter;\n /** The local node's keyring. The adapter signs every outgoing message\n * with `identity.secretKey` and verifies every incoming message against\n * the public keys in `knownPeers`. */\n keyring: MeshKeyring;\n /** When false, the adapter signs but does not encrypt. Outgoing messages\n * carry a signature envelope but the payload is plaintext; incoming\n * messages are verified against the sender's public key without a\n * decryption step. This mode is used by $peerState's `sign: true`\n * option, where the server must still be able to parse Automerge sync\n * messages. Defaults to true (encrypt + sign, the full $meshState\n * posture). */\n encryptionEnabled?: boolean;\n}\n\n/**\n * NetworkAdapter that wraps another adapter with Polly's mesh-transport\n * crypto envelope. Every outgoing message is encrypted then signed; every\n * incoming message is verified then decrypted before being forwarded to\n * the Repo's network subsystem.\n *\n * The adapter delegates lifecycle (connect, disconnect, isReady, peer\n * discovery) to the base adapter unchanged. Only the message body is\n * intercepted.\n */\nexport class MeshNetworkAdapter extends NetworkAdapter {\n readonly base: NetworkAdapter;\n readonly keyring: MeshKeyring;\n readonly encryptionEnabled: boolean;\n\n constructor(options: MeshNetworkAdapterOptions) {\n super();\n this.base = options.base;\n this.keyring = options.keyring;\n this.encryptionEnabled = options.encryptionEnabled ?? true;\n\n // Forward lifecycle and peer events from the base adapter.\n this.base.on(\"close\", () => this.emit(\"close\"));\n this.base.on(\"peer-candidate\", (payload) => this.emit(\"peer-candidate\", payload));\n this.base.on(\"peer-disconnected\", (payload) => this.emit(\"peer-disconnected\", payload));\n\n // Intercept incoming messages: the base adapter will surface them as\n // 'message' events with crypto-wrapped payloads. We unwrap and re-emit.\n this.base.on(\"message\", (rawMessage) => {\n const unwrapped = this.tryUnwrap(rawMessage);\n if (unwrapped) {\n this.emit(\"message\", unwrapped);\n }\n // Silently drop messages that fail verification or decryption. A\n // production adapter would surface this through a diagnostic channel\n // so the application could prompt the user; the Phase 2 first cut\n // logs through the standard \"drop unknown\" semantics of the network\n // subsystem.\n });\n }\n\n isReady(): boolean {\n return this.base.isReady();\n }\n\n whenReady(): Promise<void> {\n return this.base.whenReady();\n }\n\n connect(peerId: PeerId, peerMetadata?: PeerMetadata): void {\n this.peerId = peerId;\n if (peerMetadata !== undefined) {\n this.peerMetadata = peerMetadata;\n }\n this.base.connect(peerId, peerMetadata);\n }\n\n disconnect(): void {\n this.base.disconnect();\n }\n\n send(message: Message): void {\n const wrapped = this.wrap(message);\n this.base.send(wrapped);\n }\n\n /**\n * Wrap an outgoing Automerge message in an encrypt-then-sign envelope.\n * The wrapped payload is returned as a Message with the original sender\n * and target ids and the crypto blob in the `data` field.\n */\n private wrap(message: Message): Message {\n const serialised = serialiseMessage(message);\n\n let payloadToSign: Uint8Array;\n if (this.encryptionEnabled) {\n const docKey = this.keyring.documentKeys.get(DEFAULT_MESH_KEY_ID);\n if (!docKey) {\n throw new Error(\n `MeshNetworkAdapter: missing document encryption key under id \"${DEFAULT_MESH_KEY_ID}\". Provision the key in the keyring before sending.`\n );\n }\n const encrypted = sealEncryptedEnvelope(serialised, DEFAULT_MESH_KEY_ID, docKey);\n payloadToSign = encodeEncryptedEnvelope(encrypted);\n } else {\n payloadToSign = serialised;\n }\n\n const signed = signEnvelope(payloadToSign, message.senderId, this.keyring.identity.secretKey);\n const signedBytes = encodeSignedEnvelope(signed);\n\n return {\n type: message.type,\n senderId: message.senderId,\n targetId: message.targetId,\n data: signedBytes,\n } as unknown as Message;\n }\n\n /**\n * Try to unwrap an incoming crypto-wrapped message. Returns the original\n * Message on success, undefined on verification or decryption failure.\n */\n private tryUnwrap(message: Message): Message | undefined {\n if (!message.data) return undefined;\n\n let signed: ReturnType<typeof decodeSignedEnvelope>;\n try {\n signed = decodeSignedEnvelope(message.data);\n } catch {\n return undefined;\n }\n\n // Drop messages from peers whose keys have been revoked, even if the\n // public key is still present in knownPeers. The revocation set is the\n // authoritative \"this peer is no longer trusted\" marker.\n if (this.keyring.revokedPeers.has(signed.senderId)) {\n return undefined;\n }\n\n const senderKey = this.keyring.knownPeers.get(signed.senderId);\n if (!senderKey) {\n return undefined;\n }\n\n let verifiedPayload: Uint8Array;\n try {\n verifiedPayload = openSignedEnvelope(signed, senderKey);\n } catch {\n return undefined;\n }\n\n if (!this.encryptionEnabled) {\n // Sign-only mode: the verified payload IS the serialised message.\n return deserialiseMessage(verifiedPayload);\n }\n\n // Full encrypt+sign mode: unwrap the encryption envelope.\n let encrypted: ReturnType<typeof decodeEncryptedEnvelope>;\n try {\n encrypted = decodeEncryptedEnvelope(verifiedPayload);\n } catch {\n return undefined;\n }\n\n const docKey = this.keyring.documentKeys.get(encrypted.documentId);\n if (!docKey) {\n return undefined;\n }\n\n let plaintext: Uint8Array;\n try {\n plaintext = openEncryptedEnvelope(encrypted, docKey);\n } catch {\n return undefined;\n }\n\n return deserialiseMessage(plaintext);\n }\n}\n\n// ─── message serialisation ─────────────────────────────────────────────────\n\n/**\n * Serialise an Automerge sync message to a binary blob suitable for\n * encryption. The format is a length-prefixed JSON header (carrying the\n * non-binary fields) followed by the raw `data` bytes (which Automerge's\n * sync messages carry as Uint8Array). This avoids round-tripping the\n * binary payload through JSON, which would balloon its size.\n */\nfunction serialiseMessage(message: Message): Uint8Array {\n const headerObj: Record<string, unknown> = {\n type: message.type,\n senderId: message.senderId,\n targetId: message.targetId,\n };\n if (\"documentId\" in message && message.documentId !== undefined) {\n headerObj[\"documentId\"] = message.documentId;\n }\n if (\"count\" in message && message.count !== undefined) {\n headerObj[\"count\"] = message.count;\n }\n if (\"sessionId\" in message && message.sessionId !== undefined) {\n headerObj[\"sessionId\"] = message.sessionId;\n }\n const headerBytes = new TextEncoder().encode(JSON.stringify(headerObj));\n const dataBytes: Uint8Array =\n \"data\" in message && message.data instanceof Uint8Array ? message.data : new Uint8Array(0);\n\n const out = new Uint8Array(4 + headerBytes.length + dataBytes.length);\n const view = new DataView(out.buffer);\n view.setUint32(0, headerBytes.length, false);\n out.set(headerBytes, 4);\n out.set(dataBytes, 4 + headerBytes.length);\n return out;\n}\n\n/**\n * Inverse of {@link serialiseMessage}.\n */\nfunction deserialiseMessage(bytes: Uint8Array): Message {\n if (bytes.length < 4) {\n throw new Error(\"MeshNetworkAdapter: message too short to deserialise.\");\n }\n const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n const headerLen = view.getUint32(0, false);\n if (bytes.length < 4 + headerLen) {\n throw new Error(\"MeshNetworkAdapter: message header truncated.\");\n }\n const header = JSON.parse(new TextDecoder().decode(bytes.subarray(4, 4 + headerLen)));\n const data = bytes.slice(4 + headerLen);\n return { ...header, data } as unknown as Message;\n}\n",
|
|
14
14
|
"/**\n * signing — Ed25519 signing and verification for Polly's $meshState\n * primitive (Phase 2). Wraps tweetnacl with a small Polly-flavoured API\n * so the rest of the codebase never imports tweetnacl directly.\n *\n * Every operation that flows through a $meshState transport is signed by\n * the originating peer's private key before transmission and verified by\n * every receiving peer against a known public-key set before being applied.\n * This is the Byzantine-tolerance mechanism: a peer whose private key is\n * compromised can be revoked through a further signed operation, after\n * which honest peers reject anything signed by the revoked key.\n *\n * tweetnacl uses the Ed25519 curve. Public keys and signatures are 32 and\n * 64 bytes respectively, which keeps the per-op overhead small enough that\n * signing every Automerge sync message is feasible even on mobile.\n *\n * The shape of the wrapper:\n *\n * - {@link generateSigningKeyPair} produces a new Ed25519 keypair. The\n * private key never leaves the device that generated it; the public\n * key is gossiped through the access set.\n *\n * - {@link sign} produces a 64-byte detached signature over a payload.\n *\n * - {@link verify} checks a payload against a signature and a public\n * key. Returns boolean rather than throwing so call sites can handle\n * verification failure as a normal control-flow case.\n *\n * - {@link signEnvelope} and {@link openEnvelope} package payload + sender\n * id + signature into a single binary envelope, which is what the mesh\n * network adapter actually puts on the wire.\n */\n\nimport nacl from \"tweetnacl\";\n\n/** Length in bytes of an Ed25519 public key. */\nexport const PUBLIC_KEY_BYTES = 32;\n/** Length in bytes of an Ed25519 secret (private) key. */\nexport const SECRET_KEY_BYTES = 64;\n/** Length in bytes of an Ed25519 detached signature. */\nexport const SIGNATURE_BYTES = 64;\n\n/**\n * An Ed25519 keypair. The {@link publicKey} is safe to share with peers;\n * the {@link secretKey} must never leave the device.\n */\nexport interface SigningKeyPair {\n publicKey: Uint8Array;\n secretKey: Uint8Array;\n}\n\n/**\n * A signed envelope. The wire format is the concatenation of the sender id\n * length, the sender id bytes, the signature, and the payload. Callers\n * shouldn't rely on the exact layout — use {@link signEnvelope} and\n * {@link openEnvelope} to round-trip.\n */\nexport interface SignedEnvelope {\n /** Stable sender peer identifier (UTF-8 string). The receiving side uses\n * this to look up the sender's public key in the document's access set. */\n senderId: string;\n /** The original payload bytes, untouched. */\n payload: Uint8Array;\n /** 64-byte Ed25519 signature over the payload. */\n signature: Uint8Array;\n}\n\n/** Errors thrown by the signing subsystem. */\nexport class SigningError extends Error {\n readonly code:\n | \"invalid-secret-key\"\n | \"invalid-public-key\"\n | \"invalid-signature-length\"\n | \"envelope-malformed\";\n\n constructor(message: string, code: SigningError[\"code\"]) {\n super(message);\n this.name = \"SigningError\";\n this.code = code;\n }\n}\n\n/**\n * Generate a fresh Ed25519 keypair. Calls into tweetnacl's CSPRNG.\n */\nexport function generateSigningKeyPair(): SigningKeyPair {\n const pair = nacl.sign.keyPair();\n return {\n publicKey: pair.publicKey,\n secretKey: pair.secretKey,\n };\n}\n\n/**\n * Reconstruct a keypair from an existing 64-byte secret key. Useful for\n * loading keys from persistent storage. Throws if the key is the wrong size.\n */\nexport function signingKeyPairFromSecret(secretKey: Uint8Array): SigningKeyPair {\n if (secretKey.length !== SECRET_KEY_BYTES) {\n throw new SigningError(\n `Ed25519 secret key must be ${SECRET_KEY_BYTES} bytes, got ${secretKey.length}.`,\n \"invalid-secret-key\"\n );\n }\n const pair = nacl.sign.keyPair.fromSecretKey(secretKey);\n return {\n publicKey: pair.publicKey,\n secretKey: pair.secretKey,\n };\n}\n\n/**\n * Produce a 64-byte detached signature over the given payload using the\n * supplied secret key.\n */\nexport function sign(payload: Uint8Array, secretKey: Uint8Array): Uint8Array {\n if (secretKey.length !== SECRET_KEY_BYTES) {\n throw new SigningError(\n `Ed25519 secret key must be ${SECRET_KEY_BYTES} bytes, got ${secretKey.length}.`,\n \"invalid-secret-key\"\n );\n }\n return nacl.sign.detached(payload, secretKey);\n}\n\n/**\n * Verify a detached signature against a payload and a public key. Returns\n * true if the signature is valid, false otherwise. Wrong-length keys or\n * signatures throw {@link SigningError} so callers can distinguish a bad\n * signature from a misshapen input.\n */\nexport function verify(payload: Uint8Array, signature: Uint8Array, publicKey: Uint8Array): boolean {\n if (publicKey.length !== PUBLIC_KEY_BYTES) {\n throw new SigningError(\n `Ed25519 public key must be ${PUBLIC_KEY_BYTES} bytes, got ${publicKey.length}.`,\n \"invalid-public-key\"\n );\n }\n if (signature.length !== SIGNATURE_BYTES) {\n throw new SigningError(\n `Ed25519 signature must be ${SIGNATURE_BYTES} bytes, got ${signature.length}.`,\n \"invalid-signature-length\"\n );\n }\n return nacl.sign.detached.verify(payload, signature, publicKey);\n}\n\n/**\n * Sign a payload and pack it into a {@link SignedEnvelope} along with the\n * sender id. The mesh network adapter calls this on every outgoing message\n * before handing it to the transport.\n */\nexport function signEnvelope(\n payload: Uint8Array,\n senderId: string,\n secretKey: Uint8Array\n): SignedEnvelope {\n const signature = sign(payload, secretKey);\n return { senderId, payload, signature };\n}\n\n/**\n * Verify a {@link SignedEnvelope} against the sender's known public key.\n * Returns the inner payload on success, throws on failure. The mesh\n * network adapter calls this on every incoming message before forwarding\n * the payload to the underlying Automerge sync subsystem.\n */\nexport function openEnvelope(envelope: SignedEnvelope, publicKey: Uint8Array): Uint8Array {\n const ok = verify(envelope.payload, envelope.signature, publicKey);\n if (!ok) {\n throw new SigningError(\n `Signature verification failed for envelope from ${envelope.senderId}.`,\n \"envelope-malformed\"\n );\n }\n return envelope.payload;\n}\n\n/**\n * Serialise a {@link SignedEnvelope} to a single binary blob suitable for\n * transmission over a network adapter. Wire format:\n *\n * [4 bytes BE: senderId byte length]\n * [N bytes: senderId UTF-8]\n * [64 bytes: signature]\n * [remaining: payload]\n *\n * Callers should not depend on the exact bytes — they should round-trip\n * through {@link encodeSignedEnvelope} / {@link decodeSignedEnvelope}.\n */\nexport function encodeSignedEnvelope(envelope: SignedEnvelope): Uint8Array {\n const senderBytes = new TextEncoder().encode(envelope.senderId);\n const total = 4 + senderBytes.length + SIGNATURE_BYTES + envelope.payload.length;\n const out = new Uint8Array(total);\n const view = new DataView(out.buffer);\n view.setUint32(0, senderBytes.length, false);\n out.set(senderBytes, 4);\n out.set(envelope.signature, 4 + senderBytes.length);\n out.set(envelope.payload, 4 + senderBytes.length + SIGNATURE_BYTES);\n return out;\n}\n\n/**\n * Deserialise a binary envelope produced by {@link encodeSignedEnvelope}.\n * Throws on malformed input.\n */\nexport function decodeSignedEnvelope(bytes: Uint8Array): SignedEnvelope {\n if (bytes.length < 4 + SIGNATURE_BYTES) {\n throw new SigningError(\n `Envelope too short: ${bytes.length} bytes, need at least ${4 + SIGNATURE_BYTES}.`,\n \"envelope-malformed\"\n );\n }\n const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n const senderLen = view.getUint32(0, false);\n if (bytes.length < 4 + senderLen + SIGNATURE_BYTES) {\n throw new SigningError(\n `Envelope truncated: declared sender length ${senderLen}, total ${bytes.length}.`,\n \"envelope-malformed\"\n );\n }\n const senderId = new TextDecoder().decode(bytes.subarray(4, 4 + senderLen));\n const signature = bytes.slice(4 + senderLen, 4 + senderLen + SIGNATURE_BYTES);\n const payload = bytes.slice(4 + senderLen + SIGNATURE_BYTES);\n return { senderId, payload, signature };\n}\n",
|
|
15
|
-
"/**\n * peer-repo-server — Phase 1 server-side factory for the Polly peer-relay\n * transport. Constructs an Automerge-Repo `Repo` wired to a WebSocket server\n * and a NodeFS storage backend, ready to relay sync messages between\n * connected $peerState clients.\n *\n * The \"always-on peer\" role for $peerState lives here. The server holds a\n * full Automerge replica of every document, participates in the sync protocol\n * as an ordinary peer, and persists state to disk so the next process restart\n * picks up where the previous one left off. Server-side cron, HTTP handlers,\n * and other compute can open document handles on the returned Repo and mutate\n * them; mutations propagate to connected clients through the same sync\n * protocol that handles client-to-client traffic.\n *\n * The plan originally called this an \"Elysia plugin,\" but Automerge's\n * `WebSocketServerAdapter` requires an `isomorphic-ws` `WebSocketServer`\n * instance — not Elysia's native WebSocket — so the cleanest first cut is a\n * standalone factory that runs its own `ws` server. Elysia integration for\n * authenticated upgrades is a Phase 1.1 follow-up that wraps this factory.\n *\n * @example\n * ```ts\n * import { createPeerRepoServer } from \"@fairfox/polly\";\n *\n * const server = await createPeerRepoServer({\n * port: 3030,\n * storagePath: \"./data/polly-peer\",\n * });\n *\n * // Open a document handle on the server's Repo for cron or compute work.\n * const handle = server.repo.create({ counter: 0 });\n *\n * // On shutdown:\n * await server.close();\n * ```\n */\n\nimport { Repo } from \"@automerge/automerge-repo/slim\";\nimport { WebSocketServerAdapter } from \"@automerge/automerge-repo-network-websocket\";\nimport { NodeFSStorageAdapter } from \"@automerge/automerge-repo-storage-nodefs\";\nimport * as
|
|
15
|
+
"/**\n * peer-repo-server — Phase 1 server-side factory for the Polly peer-relay\n * transport. Constructs an Automerge-Repo `Repo` wired to a WebSocket server\n * and a NodeFS storage backend, ready to relay sync messages between\n * connected $peerState clients.\n *\n * The \"always-on peer\" role for $peerState lives here. The server holds a\n * full Automerge replica of every document, participates in the sync protocol\n * as an ordinary peer, and persists state to disk so the next process restart\n * picks up where the previous one left off. Server-side cron, HTTP handlers,\n * and other compute can open document handles on the returned Repo and mutate\n * them; mutations propagate to connected clients through the same sync\n * protocol that handles client-to-client traffic.\n *\n * The plan originally called this an \"Elysia plugin,\" but Automerge's\n * `WebSocketServerAdapter` requires an `isomorphic-ws` `WebSocketServer`\n * instance — not Elysia's native WebSocket — so the cleanest first cut is a\n * standalone factory that runs its own `ws` server. Elysia integration for\n * authenticated upgrades is a Phase 1.1 follow-up that wraps this factory.\n *\n * @example\n * ```ts\n * import { createPeerRepoServer } from \"@fairfox/polly\";\n *\n * const server = await createPeerRepoServer({\n * port: 3030,\n * storagePath: \"./data/polly-peer\",\n * });\n *\n * // Open a document handle on the server's Repo for cron or compute work.\n * const handle = server.repo.create({ counter: 0 });\n *\n * // On shutdown:\n * await server.close();\n * ```\n */\n\n// Heavy peer-relay dependencies (@automerge/automerge-repo, ws) are dynamic\n// imports loaded only when createPeerRepoServer is actually called. Static\n// imports at this file's top level were hoisted into @fairfox/polly/elysia's\n// module-init chain, breaking Elysia apps that don't use peer state and\n// don't install the automerge peer deps. Types come from the static package\n// references — TypeScript only reads them for shape, so no runtime cost is\n// incurred.\nimport type { Repo as RepoType } from \"@automerge/automerge-repo/slim\";\nimport type { WebSocketServerAdapter as WebSocketServerAdapterType } from \"@automerge/automerge-repo-network-websocket\";\nimport type { NodeFSStorageAdapter as NodeFSStorageAdapterType } from \"@automerge/automerge-repo-storage-nodefs\";\nimport type * as wsType from \"ws\";\n\n// `@types/ws` uses CJS `export = WebSocket` with WebSocketServer hanging off\n// the namespace. Under the project's bundler module resolution, the namespace\n// import gives us access to both the constructor and the type.\ntype WebSocketServer = wsType.WebSocketServer;\n\nexport interface CreatePeerRepoServerOptions {\n /** Port to listen on. The factory creates its own `WebSocketServer` and\n * binds to this port. */\n port: number;\n /** Filesystem directory for the NodeFS storage adapter. The directory is\n * created on demand. Defaults to `./automerge-repo-data` (Automerge's own\n * default). */\n storagePath?: string;\n /** Hostname interface to bind to. Defaults to all interfaces. */\n host?: string;\n /** Override the `WebSocketServer` instance entirely. When provided, `port`\n * and `host` are ignored and the caller is responsible for the lifecycle.\n * Useful for tests that want to bind to a random port. */\n webSocketServer?: WebSocketServer;\n}\n\nexport interface PeerRepoServer {\n /** A configured Repo participating as the always-on peer. Server-side\n * cron and HTTP handlers can open document handles on this directly. */\n repo: RepoType;\n /** The underlying WebSocket server. Exposed for advanced use such as\n * health checks or graceful shutdown coordination. */\n webSocketServer: WebSocketServer;\n /** The Automerge network adapter wrapping the WebSocket server. */\n adapter: WebSocketServerAdapterType;\n /** The NodeFS storage adapter writing to {@link CreatePeerRepoServerOptions.storagePath}. */\n storage: NodeFSStorageAdapterType;\n /** Tear down the server: disconnect peers, flush storage, close the\n * underlying WebSocket server. Returns a promise that resolves once the\n * tear-down is complete. */\n close: () => Promise<void>;\n}\n\n/**\n * Construct a Polly peer-relay server. Returns a Repo that participates as\n * the always-on peer, the underlying WebSocket server and storage adapter\n * for advanced use, and a close function for orderly shutdown.\n *\n * Applications typically call this once at startup, hold the returned\n * `repo` reference for cron and compute work, and wire the close function\n * into their process shutdown signal handlers.\n */\nexport async function createPeerRepoServer(\n options: CreatePeerRepoServerOptions\n): Promise<PeerRepoServer> {\n // Dynamic imports keep automerge-repo and ws out of the static module\n // graph. Apps that never call this function — which is most of them —\n // never pay the dependency cost and don't need the peer packages\n // installed at all.\n const [{ Repo }, { WebSocketServerAdapter }, { NodeFSStorageAdapter }, ws] = await Promise.all([\n import(\"@automerge/automerge-repo/slim\"),\n import(\"@automerge/automerge-repo-network-websocket\"),\n import(\"@automerge/automerge-repo-storage-nodefs\"),\n import(\"ws\"),\n ]);\n\n // Construct the WebSocket server first and wait until it is actually\n // listening before wiring up the Repo. Using the constructor callback\n // avoids the race where the 'listening' event fires before our listener\n // is attached (the callback form is reliable across Node and Bun).\n const wss = await (options.webSocketServer\n ? Promise.resolve(options.webSocketServer)\n : new Promise<WebSocketServer>((resolve, reject) => {\n const created: WebSocketServer = new ws.WebSocketServer(\n {\n port: options.port,\n ...(options.host !== undefined && { host: options.host }),\n },\n () => resolve(created)\n );\n created.once(\"error\", reject);\n }));\n\n // The cast bridges a @types/ws identity quirk: Automerge's adapter type\n // expects WebSocketServer with options.WebSocket typed via isomorphic-ws's\n // CJS-style namespace, and our direct `ws` import resolves through a\n // different path with the same runtime shape but a structurally distinct\n // TypeScript type. The runtime is identical, the cast names that fact.\n const adapter = new WebSocketServerAdapter(\n wss as unknown as ConstructorParameters<typeof WebSocketServerAdapter>[0]\n );\n const storage = new NodeFSStorageAdapter(options.storagePath);\n\n const repo = new Repo({\n network: [adapter],\n storage,\n });\n\n // Force the storage subsystem to finish initialising before returning. The\n // Repo constructor is synchronous, but its NetworkSubsystem holds back the\n // peer-metadata JOIN until storageSubsystem.id() resolves. If a client\n // connects before that resolution lands, the handshake stalls indefinitely.\n // Awaiting storageId() drains the relevant microtask chain and guarantees\n // the server is ready to accept peers when this factory returns.\n await repo.storageId();\n\n return {\n repo,\n webSocketServer: wss,\n adapter,\n storage,\n close: async () => {\n // Forcibly terminate any still-open client sockets before closing the\n // server, otherwise wss.close() can hang waiting for orderly drain when\n // a peer disappeared without a clean disconnect. We then fire the\n // server close without awaiting its callback — the underlying socket\n // is released immediately by terminate(), and waiting for the close\n // callback can hang under Bun even after every client is gone.\n for (const client of wss.clients) {\n try {\n client.terminate();\n } catch {\n // best effort\n }\n }\n try {\n await repo.shutdown();\n } catch {\n // best effort — automerge-repo's xstate DocHandle machine can\n // throw \"Cycle detected\" during teardown when sync messages are\n // still in flight.\n }\n try {\n wss.close();\n } catch {\n // best effort\n }\n },\n };\n}\n",
|
|
16
16
|
"/**\n * peer-state — Phase 1 wrappers exposing $peerState, $peerText, $peerCounter,\n * and $peerList. These are the application-facing constructors for the middle\n * resilience tier in RFC-041: every device is a full Automerge replica, the\n * server included, and server-side code can read and mutate document contents\n * because the server participates in the data plane as an ordinary peer.\n *\n * Each primitive wraps the corresponding Phase 0 base ($crdtState, $crdtText,\n * $crdtCounter, $crdtList) with three additions:\n *\n * 1. The `primitive` label is hard-coded to \"peerState\" so the\n * primitive-registry collision detection knows which family the key\n * belongs to.\n *\n * 2. A handle factory that resolves the application's logical key to an\n * Automerge DocumentId via a per-Repo key map. The first time a key is\n * registered, the factory creates a new document on the configured Repo\n * and records the mapping. On subsequent constructions of the same key,\n * the factory looks up the existing DocumentId and finds the handle.\n *\n * 3. The `sign` option field validates that the configured Repo was\n * created with signing enabled (via createPeerStateClient with\n * `sign: true`). Signing adds Byzantine defence at the transport\n * level without preventing the server from reading document\n * contents. Encryption is not offered on $peerState because it\n * would prevent the server from participating as an Automerge\n * peer; applications that want encrypted state should use $meshState.\n *\n * The Repo itself is supplied by the application via {@link configurePeerState}\n * or per-call via the `repo` option. There is no transport in this Phase 1\n * cut — applications use a local-only Repo and document operations stay\n * inside the calling process. Phase 1's WebSocket relay adapter will plug in\n * via the same configuration path; Phase 2's mesh adapter does the same for\n * $meshState.\n */\n\nimport type { DocHandle, DocumentId, Repo } from \"@automerge/automerge-repo/slim\";\nimport type { Access } from \"./access\";\nimport {\n $crdtCounter,\n $crdtList,\n $crdtText,\n type CounterDoc,\n type ListDoc,\n type SpecialisedPrimitive,\n type TextDoc,\n} from \"./crdt-specialised\";\nimport { $crdtState, type CrdtPrimitive } from \"./crdt-state\";\nimport type { Migrations, VersionedDoc } from \"./schema-version\";\n\n/** Common option shape across all four $peer* primitives. */\nexport interface PeerStateOptions<T> {\n /** Override the default Repo for this primitive. Useful for tests and for\n * applications that maintain multiple Repos (rare). */\n repo?: Repo;\n /** Request per-op Ed25519 signing for this primitive. Signing is a\n * transport-level concern: pass `sign: true` to `createPeerStateClient`\n * to enable it for all primitives on that Repo. Passing `sign: true`\n * here validates that the configured Repo was created with signing\n * enabled and throws if it was not. */\n sign?: boolean;\n /** Schema version target for the application. Migrations run on load. */\n schemaVersion?: number;\n /** Migration table keyed by target version. Required if schemaVersion is set. */\n migrations?: Migrations;\n /** Declarative read/write access. Compiled into a server share policy\n * once the relay transport is wired in. */\n access?: Access;\n /** Initial value used when this primitive's key has not been registered\n * before. Phase 0 callers passed this positionally; Phase 1 application\n * code does the same. */\n initialValue?: T;\n}\n\n/** Internal: per-Repo key → DocumentId map. Cleared by configurePeerState. */\nconst keyMapsByRepo = new WeakMap<Repo, Map<string, DocumentId>>();\n/** Internal: set of Repos configured with signing enabled. */\nconst signingEnabledRepos = new WeakSet<Repo>();\nlet defaultRepo: Repo | undefined;\n\n/**\n * Set the default Repo that the $peer* primitives use when no `repo` option\n * is supplied. Calling this with a new Repo clears the per-Repo key map so\n * that tests start each scenario with a fresh document space.\n *\n * Production code typically calls this once at application startup with a\n * Repo configured for the relay transport. Tests call it before each scenario\n * with an in-memory Repo.\n */\nexport function configurePeerState(repo: Repo, options?: { signEnabled?: boolean }): void {\n defaultRepo = repo;\n keyMapsByRepo.set(repo, new Map());\n if (options?.signEnabled) {\n signingEnabledRepos.add(repo);\n }\n}\n\n/**\n * Reset the peer-state subsystem to its initial unconfigured state. Intended\n * for tests; production code should not call this.\n */\nexport function resetPeerState(): void {\n defaultRepo = undefined;\n}\n\nfunction resolveRepo(option: Repo | undefined): Repo {\n const repo = option ?? defaultRepo;\n if (!repo) {\n throw new Error(\n \"Polly $peerState: no Repo configured. Call configurePeerState(repo) at startup or pass { repo } in the primitive options.\"\n );\n }\n return repo;\n}\n\nfunction getKeyMap(repo: Repo): Map<string, DocumentId> {\n let map = keyMapsByRepo.get(repo);\n if (!map) {\n map = new Map();\n keyMapsByRepo.set(repo, map);\n }\n return map;\n}\n\nfunction validateSignOption(options: PeerStateOptions<unknown>, repo: Repo): void {\n if (!options.sign) return;\n if (!signingEnabledRepos.has(repo)) {\n throw new Error(\n \"Polly $peerState: { sign: true } was passed to the primitive but the configured Repo does not have signing enabled. \" +\n \"Pass { sign: true, keyring: ... } to createPeerStateClient to enable signing at the transport level, \" +\n \"then call configurePeerState(client.repo, { signEnabled: true }).\"\n );\n }\n}\n\n/**\n * Build a getHandle factory that resolves a logical key to a DocHandle on\n * the supplied Repo. The first call creates a new document seeded with the\n * given initial value and records the (key → DocumentId) mapping; subsequent\n * calls look up the existing DocumentId and find the handle.\n */\nfunction buildHandleFactory<D>(\n repo: Repo,\n key: string,\n initialDoc: D\n): () => Promise<DocHandle<D>> {\n return async () => {\n const map = getKeyMap(repo);\n const existingId = map.get(key);\n if (existingId !== undefined) {\n return repo.find<D>(existingId);\n }\n const handle = repo.create<D>(initialDoc);\n map.set(key, handle.documentId);\n return handle;\n };\n}\n\n// ─── $peerState ─────────────────────────────────────────────────────────────\n\n/**\n * Create a peer-replicated state primitive backed by Automerge. Every device\n * holds a full replica; the server, when one is configured via the relay\n * transport, holds one too and participates in the sync protocol as an\n * ordinary peer. Server-side code can read and mutate document contents.\n *\n * @example\n * ```ts\n * const settings = $peerState<Settings>(\"settings\", { theme: \"dark\" });\n * await settings.loaded;\n * settings.value = { theme: \"light\" };\n * ```\n */\nexport function $peerState<T extends VersionedDoc>(\n key: string,\n initialValue: T,\n options: PeerStateOptions<T> = {}\n): CrdtPrimitive<T> {\n const repo = resolveRepo(options.repo);\n validateSignOption(options, repo);\n return $crdtState<T>({\n key,\n primitive: \"peerState\",\n initialValue,\n getHandle: buildHandleFactory<T>(repo, key, initialValue),\n schemaVersion: options.schemaVersion,\n migrations: options.migrations,\n access: options.access,\n });\n}\n\n// ─── $peerText ──────────────────────────────────────────────────────────────\n\nexport interface PeerTextOptions extends Omit<PeerStateOptions<unknown>, \"initialValue\"> {}\n\n/**\n * Create a peer-replicated text primitive. Concurrent character-level edits\n * from peers merge cleanly via Automerge's updateText splicing.\n */\nexport function $peerText(\n key: string,\n initialValue: string,\n options: PeerTextOptions = {}\n): SpecialisedPrimitive<string> {\n const repo = resolveRepo(options.repo);\n validateSignOption(options, repo);\n return $crdtText(key, initialValue, {\n primitive: \"peerState\",\n getHandle: buildHandleFactory<TextDoc>(repo, key, { text: initialValue }),\n schemaVersion: options.schemaVersion,\n migrations: options.migrations,\n access: options.access,\n });\n}\n\n// ─── $peerCounter ───────────────────────────────────────────────────────────\n\nexport interface PeerCounterOptions extends Omit<PeerStateOptions<unknown>, \"initialValue\"> {}\n\n/**\n * Create a peer-replicated counter primitive. Concurrent increments from\n * peers commute, so two clients each adding 1 to a counter at 5 produce a\n * counter at 7 after merging.\n */\nexport function $peerCounter(\n key: string,\n initialValue: number,\n options: PeerCounterOptions = {}\n): SpecialisedPrimitive<number> {\n const repo = resolveRepo(options.repo);\n validateSignOption(options, repo);\n return $crdtCounter(key, initialValue, {\n primitive: \"peerState\",\n getHandle: buildHandleFactory<CounterDoc>(repo, key, {}),\n schemaVersion: options.schemaVersion,\n migrations: options.migrations,\n access: options.access,\n });\n}\n\n// ─── $peerList ──────────────────────────────────────────────────────────────\n\nexport interface PeerListOptions extends Omit<PeerStateOptions<unknown>, \"initialValue\"> {}\n\n/**\n * Create a peer-replicated list primitive. The Phase 0 base uses naive\n * whole-array replacement; Phase 1.1 will refine the write path with\n * structural diff-to-splice for concurrent insert/remove preservation.\n */\nexport function $peerList<T>(\n key: string,\n initialValue: T[],\n options: PeerListOptions = {}\n): SpecialisedPrimitive<T[]> {\n const repo = resolveRepo(options.repo);\n validateSignOption(options, repo);\n return $crdtList<T>(key, initialValue, {\n primitive: \"peerState\",\n getHandle: buildHandleFactory<ListDoc<T>>(repo, key, { items: initialValue }),\n schemaVersion: options.schemaVersion,\n migrations: options.migrations,\n access: options.access,\n });\n}\n"
|
|
17
17
|
],
|
|
18
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA;AA+BO,SAAS,mBAAmB,GAAe;AAAA,EAChD,OAAO,KAAK,YAAY,SAAS;AAAA;AAQ5B,SAAS,OAAO,CAAC,SAAqB,KAA8B;AAAA,EACzE,IAAI,IAAI,WAAW,WAAW;AAAA,IAC5B,MAAM,IAAI,gBACR,yBAAyB,wBAAwB,IAAI,WACrD,oBACF;AAAA,EACF;AAAA,EACA,MAAM,QAAQ,KAAK,YAAY,WAAW;AAAA,EAC1C,MAAM,aAAa,KAAK,UAAU,SAAS,OAAO,GAAG;AAAA,EACrD,MAAM,MAAM,IAAI,WAAW,cAAc,WAAW,MAAM;AAAA,EAC1D,IAAI,IAAI,OAAO,CAAC;AAAA,EAChB,IAAI,IAAI,YAAY,WAAW;AAAA,EAC/B,OAAO;AAAA;AAcF,SAAS,OAAO,CAAC,QAAqB,KAAyC;AAAA,EACpF,IAAI,IAAI,WAAW,WAAW;AAAA,IAC5B,MAAM,IAAI,gBACR,yBAAyB,wBAAwB,IAAI,WACrD,oBACF;AAAA,EACF;AAAA,EACA,IAAI,OAAO,SAAS,cAAc,WAAW;AAAA,IAC3C;AAAA,EACF;AAAA,EACA,MAAM,QAAQ,OAA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AAC;AAAA,IACxE,eAAe,QAAQ;AAAA,IACvB,YAAY,QAAQ;AAAA,IACpB,QAAQ,QAAQ;AAAA,EAClB,CAAC;AAAA;AAYI,SAAS,YAAY,CAC1B,KACA,cACA,UAA8B,CAAC,GACD;AAAA,EAC9B,MAAM,OAAO,YAAY,QAAQ,IAAI;AAAA,EACrC,mBAAmB,SAAS,IAAI;AAAA,EAChC,OAAO,aAAa,KAAK,cAAc;AAAA,IACrC,WAAW;AAAA,IACX,WAAW,mBAA+B,MAAM,KAAK,CAAC,CAAC;AAAA,IACvD,eAAe,QAAQ;AAAA,IACvB,YAAY,QAAQ;AAAA,IACpB,QAAQ,QAAQ;AAAA,EAClB,CAAC;AAAA;AAYI,SAAS,SAAY,CAC1B,KACA,cACA,UAA2B,CAAC,GACD;AAAA,EAC3B,MAAM,OAAO,YAAY,QAAQ,IAAI;AAAA,EACrC,mBAAmB,SAAS,IAAI;AAAA,EAChC,OAAO,UAAa,KAAK,cAAc;AAAA,IACrC,WAAW;AAAA,IACX,WAAW,mBAA+B,MAAM,KAAK,EAAE,OAAO,aAAa,CAAC;AAAA,IAC5E,eAAe,QAAQ;AAAA,IACvB,YAAY,QAAQ;AAAA,IACpB,QAAQ,QAAQ;AAAA,EAClB,CAAC;AAAA;",
|
|
19
|
+
"debugId": "E758423470D8955364756E2164756E21",
|
|
20
20
|
"names": []
|
|
21
21
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Badge — small inline status chip.
|
|
3
|
+
*
|
|
4
|
+
* Renders as a passive <span> with tinted background and on-tint text
|
|
5
|
+
* from the `--polly-status-*` token family. The default variant uses
|
|
6
|
+
* surface-sunken + muted text for a neutral pill. Consumers style
|
|
7
|
+
* placement via className; the primitive owns size, shape, and colour.
|
|
8
|
+
*/
|
|
9
|
+
import type { ComponentChildren, JSX } from "preact";
|
|
10
|
+
export type BadgeVariant = "default" | "info" | "success" | "warning" | "danger";
|
|
11
|
+
export type BadgeProps = {
|
|
12
|
+
children: ComponentChildren;
|
|
13
|
+
variant?: BadgeVariant;
|
|
14
|
+
className?: string;
|
|
15
|
+
id?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function Badge(props: BadgeProps): JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Button — interactive control with tier, semantic colour, and size.
|
|
3
|
+
*
|
|
4
|
+
* Renders as a <button> by default; switches to an <a> when given an
|
|
5
|
+
* `href`. Tier sets visual importance (primary/secondary/tertiary),
|
|
6
|
+
* color overlays semantic meaning (info/success/warning/danger),
|
|
7
|
+
* size picks the padding + font scale (small/normal/large). Icon +
|
|
8
|
+
* label are arranged with a nested inline <Layout>.
|
|
9
|
+
*
|
|
10
|
+
* Action wiring is declared via data-* attributes consumed by the
|
|
11
|
+
* global event delegator in @fairfox/polly/actions — Button does not
|
|
12
|
+
* accept an onClick prop.
|
|
13
|
+
*/
|
|
14
|
+
import type { ComponentChildren, JSX, VNode } from "preact";
|
|
15
|
+
export type ButtonTier = "primary" | "secondary" | "tertiary";
|
|
16
|
+
export type ButtonColor = "default" | "info" | "success" | "warning" | "danger";
|
|
17
|
+
export type ButtonSize = "small" | "normal" | "large";
|
|
18
|
+
type BaseButtonProps = {
|
|
19
|
+
id?: string;
|
|
20
|
+
tier?: ButtonTier;
|
|
21
|
+
color?: ButtonColor;
|
|
22
|
+
size?: ButtonSize;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
fullWidth?: boolean;
|
|
25
|
+
circle?: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
title?: string;
|
|
28
|
+
icon?: VNode;
|
|
29
|
+
label: ComponentChildren;
|
|
30
|
+
"data-action"?: string;
|
|
31
|
+
"aria-label"?: string;
|
|
32
|
+
};
|
|
33
|
+
type ButtonAsButton = BaseButtonProps & {
|
|
34
|
+
href?: never;
|
|
35
|
+
target?: never;
|
|
36
|
+
rel?: never;
|
|
37
|
+
type?: "button" | "submit" | "reset";
|
|
38
|
+
};
|
|
39
|
+
type ButtonAsLink = BaseButtonProps & {
|
|
40
|
+
href: string;
|
|
41
|
+
target?: string;
|
|
42
|
+
rel?: string;
|
|
43
|
+
type?: never;
|
|
44
|
+
};
|
|
45
|
+
export type ButtonProps = ButtonAsButton | ButtonAsLink;
|
|
46
|
+
export declare function Button(props: ButtonProps): JSX.Element;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkbox — native checkbox wrapped in a label.
|
|
3
|
+
*
|
|
4
|
+
* Pass a plain boolean for controlled use (caller listens elsewhere),
|
|
5
|
+
* or a Signal<boolean> to have the primitive bind its own change
|
|
6
|
+
* listener and mutate the signal directly. The label wraps the input
|
|
7
|
+
* so clicks anywhere in the target area toggle it.
|
|
8
|
+
*/
|
|
9
|
+
import type { Signal } from "@preact/signals";
|
|
10
|
+
import type { JSX } from "preact";
|
|
11
|
+
export type CheckboxProps = {
|
|
12
|
+
checked?: boolean | Signal<boolean>;
|
|
13
|
+
defaultChecked?: boolean;
|
|
14
|
+
name?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
label?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
id?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function Checkbox(props: CheckboxProps): JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collapsible — native <details>/<summary> wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Uses the browser's built-in disclosure semantics so keyboard and
|
|
5
|
+
* screen-reader behaviour come free. A ::before arrow rotates on open.
|
|
6
|
+
* Colors, spacing, and motion come from tokens; `prefers-reduced-motion`
|
|
7
|
+
* zeroes the rotation via the motion token.
|
|
8
|
+
*/
|
|
9
|
+
import type { ComponentChildren, JSX } from "preact";
|
|
10
|
+
export type CollapsibleProps = {
|
|
11
|
+
summary: string;
|
|
12
|
+
children: ComponentChildren;
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
id?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function Collapsible(props: CollapsibleProps): JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dropdown — trigger button + popover menu using the native Popover API.
|
|
3
|
+
*
|
|
4
|
+
* The menu element gets `popover="auto"` and a unique `data-overlay-id`.
|
|
5
|
+
* `closeTopOverlay()` from @fairfox/polly/actions finds the topmost
|
|
6
|
+
* `[data-overlay-id]` element and dispatches `overlay:close` — the
|
|
7
|
+
* Dropdown listens for that event and mirrors it onto the `isOpen`
|
|
8
|
+
* signal. In single-select mode, clicking the menu closes it; in
|
|
9
|
+
* multi-select mode, the menu stays open so the consumer can pick
|
|
10
|
+
* several items.
|
|
11
|
+
*/
|
|
12
|
+
import { type Signal } from "@preact/signals";
|
|
13
|
+
import type { ComponentChildren, JSX } from "preact";
|
|
14
|
+
export type DropdownProps = {
|
|
15
|
+
isOpen: Signal<boolean>;
|
|
16
|
+
trigger: ComponentChildren;
|
|
17
|
+
children: ComponentChildren;
|
|
18
|
+
align?: "left" | "right";
|
|
19
|
+
multiSelect?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
id?: string;
|
|
22
|
+
};
|
|
23
|
+
export declare function Dropdown(props: DropdownProps): JSX.Element;
|
|
@@ -38,6 +38,8 @@ export type LayoutProps = {
|
|
|
38
38
|
alignSelf?: string;
|
|
39
39
|
/** Collapse to a single column at ≤640px. */
|
|
40
40
|
stackOnMobile?: boolean;
|
|
41
|
+
/** Render as display: inline-grid so the Layout flows inline with surrounding text/controls. */
|
|
42
|
+
inline?: boolean;
|
|
41
43
|
className?: string;
|
|
42
44
|
onClick?: JSX.MouseEventHandler<HTMLElement>;
|
|
43
45
|
onKeyDown?: JSX.KeyboardEventHandler<HTMLElement>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Select — dropdown of options with single- or multi-select semantics.
|
|
3
|
+
*
|
|
4
|
+
* Composes Dropdown for the menu and a native checkbox in each option
|
|
5
|
+
* row for multi-select. The `selected` state is a Signal<Set<T>>;
|
|
6
|
+
* single-select replaces the set, multi-select toggles membership.
|
|
7
|
+
* Multi-select mode also shows Select All / Clear action buttons at
|
|
8
|
+
* the top of the menu.
|
|
9
|
+
*/
|
|
10
|
+
import { type Signal } from "@preact/signals";
|
|
11
|
+
import type { JSX } from "preact";
|
|
12
|
+
export type SelectOption<T = string> = {
|
|
13
|
+
value: T;
|
|
14
|
+
label: string;
|
|
15
|
+
};
|
|
16
|
+
export type SelectProps<T = string> = {
|
|
17
|
+
options: SelectOption<T>[];
|
|
18
|
+
selected: Signal<Set<T>>;
|
|
19
|
+
label?: string;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
multiSelect?: boolean;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
className?: string;
|
|
24
|
+
id?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare function Select<T = string>(props: SelectProps<T>): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skeleton — shimmering placeholder for loading states.
|
|
3
|
+
*
|
|
4
|
+
* Three variants: text (full-width, 1em tall), rect (full-width, 100px
|
|
5
|
+
* tall), circle (40x40). A CSS gradient animates left-to-right over
|
|
6
|
+
* 1.5s. `prefers-reduced-motion` zeroes the animation via the token
|
|
7
|
+
* system. Consumers size via width/height props (px numbers or CSS
|
|
8
|
+
* strings); default sizing comes from the variant.
|
|
9
|
+
*/
|
|
10
|
+
import type { JSX } from "preact";
|
|
11
|
+
export type SkeletonVariant = "text" | "rect" | "circle";
|
|
12
|
+
export type SkeletonProps = {
|
|
13
|
+
variant?: SkeletonVariant;
|
|
14
|
+
width?: string | number;
|
|
15
|
+
height?: string | number;
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function Skeleton(props: SkeletonProps): JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tabs — horizontal nav with active-tab accent.
|
|
3
|
+
*
|
|
4
|
+
* Each button carries `data-action` (the consumer-provided action name)
|
|
5
|
+
* and `data-action-id={tab.id}` so the event delegator resolves the
|
|
6
|
+
* activated tab. The active tab gets `aria-current="page"` and a
|
|
7
|
+
* bottom-border accent. The nav scrolls horizontally with a hidden
|
|
8
|
+
* scrollbar for overflow. Internal arrangement uses <Layout>.
|
|
9
|
+
*/
|
|
10
|
+
import type { JSX } from "preact";
|
|
11
|
+
export type Tab = {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type TabsProps = {
|
|
17
|
+
tabs: Tab[];
|
|
18
|
+
activeTab: string;
|
|
19
|
+
action?: string;
|
|
20
|
+
className?: string;
|
|
21
|
+
id?: string;
|
|
22
|
+
"aria-label"?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function Tabs(props: TabsProps): JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toggle — switch-role checkbox.
|
|
3
|
+
*
|
|
4
|
+
* A visually-hidden <input role="switch"> paired with a styled track
|
|
5
|
+
* and thumb inside a <label>. Passive: the caller drives `checked` and
|
|
6
|
+
* handles state changes via the action registry (wrap the Toggle in a
|
|
7
|
+
* <label data-action="..."> or bind a parent form's submit). a11y
|
|
8
|
+
* attributes come from the native input; the label wraps so clicks
|
|
9
|
+
* anywhere in the control toggle the input.
|
|
10
|
+
*/
|
|
11
|
+
import type { JSX } from "preact";
|
|
12
|
+
export type ToggleProps = {
|
|
13
|
+
checked?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
label?: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
id?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function Toggle(props: ToggleProps): JSX.Element;
|