@weaveprotocol/core 0.1.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/README.md +1106 -0
- package/dist/elements/auth-styles.d.ts +18 -0
- package/dist/elements/auth-styles.d.ts.map +1 -0
- package/dist/elements/auth-styles.js +150 -0
- package/dist/elements/auth-styles.js.map +1 -0
- package/dist/elements/dom.d.ts +28 -0
- package/dist/elements/dom.d.ts.map +1 -0
- package/dist/elements/dom.js +74 -0
- package/dist/elements/dom.js.map +1 -0
- package/dist/elements/index.d.ts +13 -0
- package/dist/elements/index.d.ts.map +1 -0
- package/dist/elements/index.js +11 -0
- package/dist/elements/index.js.map +1 -0
- package/dist/elements/weave-auth.d.ts +52 -0
- package/dist/elements/weave-auth.d.ts.map +1 -0
- package/dist/elements/weave-auth.js +427 -0
- package/dist/elements/weave-auth.js.map +1 -0
- package/dist/identity/account-store.d.ts +113 -0
- package/dist/identity/account-store.d.ts.map +1 -0
- package/dist/identity/account-store.js +305 -0
- package/dist/identity/account-store.js.map +1 -0
- package/dist/identity/account-vault.d.ts +199 -0
- package/dist/identity/account-vault.d.ts.map +1 -0
- package/dist/identity/account-vault.js +251 -0
- package/dist/identity/account-vault.js.map +1 -0
- package/dist/identity/agent-note.d.ts +19 -0
- package/dist/identity/agent-note.d.ts.map +1 -0
- package/dist/identity/agent-note.js +29 -0
- package/dist/identity/agent-note.js.map +1 -0
- package/dist/identity/crypto-p256.d.ts +7 -0
- package/dist/identity/crypto-p256.d.ts.map +1 -0
- package/dist/identity/crypto-p256.js +84 -0
- package/dist/identity/crypto-p256.js.map +1 -0
- package/dist/identity/device-key.d.ts +60 -0
- package/dist/identity/device-key.d.ts.map +1 -0
- package/dist/identity/device-key.js +103 -0
- package/dist/identity/device-key.js.map +1 -0
- package/dist/identity/did.d.ts +22 -0
- package/dist/identity/did.d.ts.map +1 -0
- package/dist/identity/did.js +37 -0
- package/dist/identity/did.js.map +1 -0
- package/dist/identity/folder-account.d.ts +65 -0
- package/dist/identity/folder-account.d.ts.map +1 -0
- package/dist/identity/folder-account.js +115 -0
- package/dist/identity/folder-account.js.map +1 -0
- package/dist/identity/identity-manager.d.ts +36 -0
- package/dist/identity/identity-manager.d.ts.map +1 -0
- package/dist/identity/identity-manager.js +115 -0
- package/dist/identity/identity-manager.js.map +1 -0
- package/dist/identity/index.d.ts +10 -0
- package/dist/identity/index.d.ts.map +1 -0
- package/dist/identity/index.js +10 -0
- package/dist/identity/index.js.map +1 -0
- package/dist/identity/keys.d.ts +24 -0
- package/dist/identity/keys.d.ts.map +1 -0
- package/dist/identity/keys.js +38 -0
- package/dist/identity/keys.js.map +1 -0
- package/dist/identity/pairing.d.ts +83 -0
- package/dist/identity/pairing.d.ts.map +1 -0
- package/dist/identity/pairing.js +120 -0
- package/dist/identity/pairing.js.map +1 -0
- package/dist/identity/passkey-diagnostics.d.ts +54 -0
- package/dist/identity/passkey-diagnostics.d.ts.map +1 -0
- package/dist/identity/passkey-diagnostics.js +178 -0
- package/dist/identity/passkey-diagnostics.js.map +1 -0
- package/dist/identity/recovery-code.d.ts +50 -0
- package/dist/identity/recovery-code.d.ts.map +1 -0
- package/dist/identity/recovery-code.js +116 -0
- package/dist/identity/recovery-code.js.map +1 -0
- package/dist/identity/root-signer.d.ts +59 -0
- package/dist/identity/root-signer.d.ts.map +1 -0
- package/dist/identity/root-signer.js +44 -0
- package/dist/identity/root-signer.js.map +1 -0
- package/dist/identity/ucan.d.ts +164 -0
- package/dist/identity/ucan.d.ts.map +1 -0
- package/dist/identity/ucan.js +273 -0
- package/dist/identity/ucan.js.map +1 -0
- package/dist/identity/webauthn.d.ts +87 -0
- package/dist/identity/webauthn.d.ts.map +1 -0
- package/dist/identity/webauthn.js +155 -0
- package/dist/identity/webauthn.js.map +1 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +85 -0
- package/dist/index.js.map +1 -0
- package/dist/network/index.d.ts +17 -0
- package/dist/network/index.d.ts.map +1 -0
- package/dist/network/index.js +10 -0
- package/dist/network/index.js.map +1 -0
- package/dist/network/introductions.d.ts +85 -0
- package/dist/network/introductions.d.ts.map +1 -0
- package/dist/network/introductions.js +94 -0
- package/dist/network/introductions.js.map +1 -0
- package/dist/network/local-transport.d.ts +22 -0
- package/dist/network/local-transport.d.ts.map +1 -0
- package/dist/network/local-transport.js +55 -0
- package/dist/network/local-transport.js.map +1 -0
- package/dist/network/mesh.d.ts +31 -0
- package/dist/network/mesh.d.ts.map +1 -0
- package/dist/network/mesh.js +332 -0
- package/dist/network/mesh.js.map +1 -0
- package/dist/network/multi-signaling.d.ts +29 -0
- package/dist/network/multi-signaling.d.ts.map +1 -0
- package/dist/network/multi-signaling.js +125 -0
- package/dist/network/multi-signaling.js.map +1 -0
- package/dist/network/network-manager.d.ts +37 -0
- package/dist/network/network-manager.d.ts.map +1 -0
- package/dist/network/network-manager.js +64 -0
- package/dist/network/network-manager.js.map +1 -0
- package/dist/network/peer-auth.d.ts +98 -0
- package/dist/network/peer-auth.d.ts.map +1 -0
- package/dist/network/peer-auth.js +86 -0
- package/dist/network/peer-auth.js.map +1 -0
- package/dist/network/rtc-transport.d.ts +18 -0
- package/dist/network/rtc-transport.d.ts.map +1 -0
- package/dist/network/rtc-transport.js +149 -0
- package/dist/network/rtc-transport.js.map +1 -0
- package/dist/network/signaling.d.ts +40 -0
- package/dist/network/signaling.d.ts.map +1 -0
- package/dist/network/signaling.js +124 -0
- package/dist/network/signaling.js.map +1 -0
- package/dist/network/transport.d.ts +50 -0
- package/dist/network/transport.d.ts.map +1 -0
- package/dist/network/transport.js +13 -0
- package/dist/network/transport.js.map +1 -0
- package/dist/network/ws-transport.d.ts +42 -0
- package/dist/network/ws-transport.d.ts.map +1 -0
- package/dist/network/ws-transport.js +194 -0
- package/dist/network/ws-transport.js.map +1 -0
- package/dist/node/actions.d.ts +62 -0
- package/dist/node/actions.d.ts.map +1 -0
- package/dist/node/actions.js +500 -0
- package/dist/node/actions.js.map +1 -0
- package/dist/node/carrier.d.ts +85 -0
- package/dist/node/carrier.d.ts.map +1 -0
- package/dist/node/carrier.js +192 -0
- package/dist/node/carrier.js.map +1 -0
- package/dist/node/copy.d.ts +38 -0
- package/dist/node/copy.d.ts.map +1 -0
- package/dist/node/copy.js +53 -0
- package/dist/node/copy.js.map +1 -0
- package/dist/node/index.d.ts +16 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +11 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/node.d.ts +12 -0
- package/dist/node/node.d.ts.map +1 -0
- package/dist/node/node.js +872 -0
- package/dist/node/node.js.map +1 -0
- package/dist/node/space-runtime.d.ts +144 -0
- package/dist/node/space-runtime.d.ts.map +1 -0
- package/dist/node/space-runtime.js +1221 -0
- package/dist/node/space-runtime.js.map +1 -0
- package/dist/node/stores.d.ts +45 -0
- package/dist/node/stores.d.ts.map +1 -0
- package/dist/node/stores.js +31 -0
- package/dist/node/stores.js.map +1 -0
- package/dist/node/types.d.ts +508 -0
- package/dist/node/types.d.ts.map +1 -0
- package/dist/node/types.js +2 -0
- package/dist/node/types.js.map +1 -0
- package/dist/privacy/index.d.ts +4 -0
- package/dist/privacy/index.d.ts.map +1 -0
- package/dist/privacy/index.js +4 -0
- package/dist/privacy/index.js.map +1 -0
- package/dist/privacy/key-distribution.d.ts +42 -0
- package/dist/privacy/key-distribution.d.ts.map +1 -0
- package/dist/privacy/key-distribution.js +50 -0
- package/dist/privacy/key-distribution.js.map +1 -0
- package/dist/privacy/privacy-guard.d.ts +24 -0
- package/dist/privacy/privacy-guard.d.ts.map +1 -0
- package/dist/privacy/privacy-guard.js +87 -0
- package/dist/privacy/privacy-guard.js.map +1 -0
- package/dist/privacy/space-encryption.d.ts +48 -0
- package/dist/privacy/space-encryption.d.ts.map +1 -0
- package/dist/privacy/space-encryption.js +61 -0
- package/dist/privacy/space-encryption.js.map +1 -0
- package/dist/query/engine.d.ts +27 -0
- package/dist/query/engine.d.ts.map +1 -0
- package/dist/query/engine.js +84 -0
- package/dist/query/engine.js.map +1 -0
- package/dist/query/filter.d.ts +15 -0
- package/dist/query/filter.d.ts.map +1 -0
- package/dist/query/filter.js +207 -0
- package/dist/query/filter.js.map +1 -0
- package/dist/query/types.d.ts +144 -0
- package/dist/query/types.d.ts.map +1 -0
- package/dist/query/types.js +22 -0
- package/dist/query/types.js.map +1 -0
- package/dist/react/context.d.ts +81 -0
- package/dist/react/context.d.ts.map +1 -0
- package/dist/react/context.js +95 -0
- package/dist/react/context.js.map +1 -0
- package/dist/react/index.d.ts +40 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +36 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/use-live.d.ts +16 -0
- package/dist/react/use-live.d.ts.map +1 -0
- package/dist/react/use-live.js +55 -0
- package/dist/react/use-live.js.map +1 -0
- package/dist/react/use-query.d.ts +17 -0
- package/dist/react/use-query.d.ts.map +1 -0
- package/dist/react/use-query.js +23 -0
- package/dist/react/use-query.js.map +1 -0
- package/dist/react/use-space.d.ts +29 -0
- package/dist/react/use-space.d.ts.map +1 -0
- package/dist/react/use-space.js +48 -0
- package/dist/react/use-space.js.map +1 -0
- package/dist/react/use-spaces.d.ts +19 -0
- package/dist/react/use-spaces.d.ts.map +1 -0
- package/dist/react/use-spaces.js +55 -0
- package/dist/react/use-spaces.js.map +1 -0
- package/dist/react/use-weave-auth.d.ts +10 -0
- package/dist/react/use-weave-auth.d.ts.map +1 -0
- package/dist/react/use-weave-auth.js +15 -0
- package/dist/react/use-weave-auth.js.map +1 -0
- package/dist/react/weave-auth.d.ts +17 -0
- package/dist/react/weave-auth.d.ts.map +1 -0
- package/dist/react/weave-auth.js +38 -0
- package/dist/react/weave-auth.js.map +1 -0
- package/dist/records/describe.d.ts +38 -0
- package/dist/records/describe.d.ts.map +1 -0
- package/dist/records/describe.js +101 -0
- package/dist/records/describe.js.map +1 -0
- package/dist/records/links.d.ts +14 -0
- package/dist/records/links.d.ts.map +1 -0
- package/dist/records/links.js +25 -0
- package/dist/records/links.js.map +1 -0
- package/dist/records/rules.d.ts +59 -0
- package/dist/records/rules.d.ts.map +1 -0
- package/dist/records/rules.js +118 -0
- package/dist/records/rules.js.map +1 -0
- package/dist/records/version.d.ts +54 -0
- package/dist/records/version.d.ts.map +1 -0
- package/dist/records/version.js +70 -0
- package/dist/records/version.js.map +1 -0
- package/dist/schema/collection-def.d.ts +96 -0
- package/dist/schema/collection-def.d.ts.map +1 -0
- package/dist/schema/collection-def.js +272 -0
- package/dist/schema/collection-def.js.map +1 -0
- package/dist/schema/expression.d.ts +69 -0
- package/dist/schema/expression.d.ts.map +1 -0
- package/dist/schema/expression.js +92 -0
- package/dist/schema/expression.js.map +1 -0
- package/dist/schema/index.d.ts +4 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +4 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/schema-engine.d.ts +42 -0
- package/dist/schema/schema-engine.d.ts.map +1 -0
- package/dist/schema/schema-engine.js +36 -0
- package/dist/schema/schema-engine.js.map +1 -0
- package/dist/schema/signer.d.ts +27 -0
- package/dist/schema/signer.d.ts.map +1 -0
- package/dist/schema/signer.js +36 -0
- package/dist/schema/signer.js.map +1 -0
- package/dist/schemas/apps.d.ts +88 -0
- package/dist/schemas/apps.d.ts.map +1 -0
- package/dist/schemas/apps.js +168 -0
- package/dist/schemas/apps.js.map +1 -0
- package/dist/schemas/index.d.ts +410 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +208 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/screens.d.ts +67 -0
- package/dist/schemas/screens.d.ts.map +1 -0
- package/dist/schemas/screens.js +242 -0
- package/dist/schemas/screens.js.map +1 -0
- package/dist/session/agent-link.d.ts +79 -0
- package/dist/session/agent-link.d.ts.map +1 -0
- package/dist/session/agent-link.js +251 -0
- package/dist/session/agent-link.js.map +1 -0
- package/dist/session/auth.d.ts +233 -0
- package/dist/session/auth.d.ts.map +1 -0
- package/dist/session/auth.js +783 -0
- package/dist/session/auth.js.map +1 -0
- package/dist/session/connect.d.ts +211 -0
- package/dist/session/connect.d.ts.map +1 -0
- package/dist/session/connect.js +355 -0
- package/dist/session/connect.js.map +1 -0
- package/dist/session/connection.d.ts +70 -0
- package/dist/session/connection.d.ts.map +1 -0
- package/dist/session/connection.js +120 -0
- package/dist/session/connection.js.map +1 -0
- package/dist/session/credentials.d.ts +44 -0
- package/dist/session/credentials.d.ts.map +1 -0
- package/dist/session/credentials.js +60 -0
- package/dist/session/credentials.js.map +1 -0
- package/dist/session/index.d.ts +25 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +18 -0
- package/dist/session/index.js.map +1 -0
- package/dist/session/pairing.d.ts +59 -0
- package/dist/session/pairing.d.ts.map +1 -0
- package/dist/session/pairing.js +144 -0
- package/dist/session/pairing.js.map +1 -0
- package/dist/session/places.d.ts +62 -0
- package/dist/session/places.d.ts.map +1 -0
- package/dist/session/places.js +101 -0
- package/dist/session/places.js.map +1 -0
- package/dist/session/stay-signed-in.d.ts +37 -0
- package/dist/session/stay-signed-in.d.ts.map +1 -0
- package/dist/session/stay-signed-in.js +124 -0
- package/dist/session/stay-signed-in.js.map +1 -0
- package/dist/space/account-registry.d.ts +64 -0
- package/dist/space/account-registry.d.ts.map +1 -0
- package/dist/space/account-registry.js +66 -0
- package/dist/space/account-registry.js.map +1 -0
- package/dist/space/index.d.ts +3 -0
- package/dist/space/index.d.ts.map +1 -0
- package/dist/space/index.js +3 -0
- package/dist/space/index.js.map +1 -0
- package/dist/space/pass.d.ts +63 -0
- package/dist/space/pass.d.ts.map +1 -0
- package/dist/space/pass.js +54 -0
- package/dist/space/pass.js.map +1 -0
- package/dist/space/presets.d.ts +31 -0
- package/dist/space/presets.d.ts.map +1 -0
- package/dist/space/presets.js +24 -0
- package/dist/space/presets.js.map +1 -0
- package/dist/space/roles.d.ts +186 -0
- package/dist/space/roles.d.ts.map +1 -0
- package/dist/space/roles.js +500 -0
- package/dist/space/roles.js.map +1 -0
- package/dist/space/space-access.d.ts +80 -0
- package/dist/space/space-access.d.ts.map +1 -0
- package/dist/space/space-access.js +135 -0
- package/dist/space/space-access.js.map +1 -0
- package/dist/space/space-manager.d.ts +87 -0
- package/dist/space/space-manager.d.ts.map +1 -0
- package/dist/space/space-manager.js +187 -0
- package/dist/space/space-manager.js.map +1 -0
- package/dist/storage/directory-access.d.ts +78 -0
- package/dist/storage/directory-access.d.ts.map +1 -0
- package/dist/storage/directory-access.js +164 -0
- package/dist/storage/directory-access.js.map +1 -0
- package/dist/storage/encrypted-adapter.d.ts +49 -0
- package/dist/storage/encrypted-adapter.d.ts.map +1 -0
- package/dist/storage/encrypted-adapter.js +106 -0
- package/dist/storage/encrypted-adapter.js.map +1 -0
- package/dist/storage/folder-adapter.d.ts +105 -0
- package/dist/storage/folder-adapter.d.ts.map +1 -0
- package/dist/storage/folder-adapter.js +280 -0
- package/dist/storage/folder-adapter.js.map +1 -0
- package/dist/storage/folder-reconcile.d.ts +53 -0
- package/dist/storage/folder-reconcile.d.ts.map +1 -0
- package/dist/storage/folder-reconcile.js +65 -0
- package/dist/storage/folder-reconcile.js.map +1 -0
- package/dist/storage/index.d.ts +10 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +9 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/indexeddb-adapter.d.ts +12 -0
- package/dist/storage/indexeddb-adapter.d.ts.map +1 -0
- package/dist/storage/indexeddb-adapter.js +190 -0
- package/dist/storage/indexeddb-adapter.js.map +1 -0
- package/dist/storage/mst.d.ts +121 -0
- package/dist/storage/mst.d.ts.map +1 -0
- package/dist/storage/mst.js +402 -0
- package/dist/storage/mst.js.map +1 -0
- package/dist/storage/storage-provider.d.ts +85 -0
- package/dist/storage/storage-provider.d.ts.map +1 -0
- package/dist/storage/storage-provider.js +220 -0
- package/dist/storage/storage-provider.js.map +1 -0
- package/dist/sync/anti-entropy.d.ts +49 -0
- package/dist/sync/anti-entropy.d.ts.map +1 -0
- package/dist/sync/anti-entropy.js +62 -0
- package/dist/sync/anti-entropy.js.map +1 -0
- package/dist/sync/index.d.ts +4 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +4 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/sync-engine.d.ts +71 -0
- package/dist/sync/sync-engine.d.ts.map +1 -0
- package/dist/sync/sync-engine.js +309 -0
- package/dist/sync/sync-engine.js.map +1 -0
- package/dist/sync/sync-messages.d.ts +75 -0
- package/dist/sync/sync-messages.d.ts.map +1 -0
- package/dist/sync/sync-messages.js +12 -0
- package/dist/sync/sync-messages.js.map +1 -0
- package/dist/types.d.ts +243 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/encoding.d.ts +63 -0
- package/dist/utils/encoding.d.ts.map +1 -0
- package/dist/utils/encoding.js +130 -0
- package/dist/utils/encoding.js.map +1 -0
- package/dist/utils/errors.d.ts +43 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +28 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/events.d.ts +19 -0
- package/dist/utils/events.d.ts.map +1 -0
- package/dist/utils/events.js +27 -0
- package/dist/utils/events.js.map +1 -0
- package/dist/utils/hash.d.ts +23 -0
- package/dist/utils/hash.d.ts.map +1 -0
- package/dist/utils/hash.js +49 -0
- package/dist/utils/hash.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/validation/capability-gate.d.ts +50 -0
- package/dist/validation/capability-gate.d.ts.map +1 -0
- package/dist/validation/capability-gate.js +71 -0
- package/dist/validation/capability-gate.js.map +1 -0
- package/dist/validation/crypto-gate.d.ts +16 -0
- package/dist/validation/crypto-gate.d.ts.map +1 -0
- package/dist/validation/crypto-gate.js +37 -0
- package/dist/validation/crypto-gate.js.map +1 -0
- package/dist/validation/index.d.ts +6 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +6 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/stateful-gate.d.ts +15 -0
- package/dist/validation/stateful-gate.d.ts.map +1 -0
- package/dist/validation/stateful-gate.js +50 -0
- package/dist/validation/stateful-gate.js.map +1 -0
- package/dist/validation/structural-gate.d.ts +18 -0
- package/dist/validation/structural-gate.d.ts.map +1 -0
- package/dist/validation/structural-gate.js +54 -0
- package/dist/validation/structural-gate.js.map +1 -0
- package/dist/validation/validation-engine.d.ts +28 -0
- package/dist/validation/validation-engine.d.ts.map +1 -0
- package/dist/validation/validation-engine.js +38 -0
- package/dist/validation/validation-engine.js.map +1 -0
- package/package.json +107 -0
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module schemas
|
|
3
|
+
* A standard library of well-known record shapes — reactions, comments, tags,
|
|
4
|
+
* attachments, references. Optional, and nothing special: the protocol knows
|
|
5
|
+
* none of them. Each is an ordinary collection definition, and a space learns
|
|
6
|
+
* one the same way it learns any other, when someone defines it there:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { reaction, comment, useSchemas } from '@weaveprotocol/core/schemas';
|
|
10
|
+
*
|
|
11
|
+
* await useSchemas(node, space.id, [reaction, comment]);
|
|
12
|
+
* await node.records.put(space.id, reaction, { emoji: '👍' }, {
|
|
13
|
+
* links: [{ rel: 'about', to: post.key }],
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* The point of sharing them is agreement, not privilege: two apps that both
|
|
18
|
+
* use `std.reaction` see each other's reactions. An app that prefers its own
|
|
19
|
+
* shape defines its own collection instead, and loses nothing but that.
|
|
20
|
+
*
|
|
21
|
+
* **Two kinds.** Most of these are annotations: they attach to anything
|
|
22
|
+
* (their links point at `'*'`). A few are common nouns — a chat message, a
|
|
23
|
+
* task on a board, a poll — shared so that two chat apps, or a board and a to-do list,
|
|
24
|
+
* read the same records. Nouns say exactly what they point at. Keep both lists
|
|
25
|
+
* small — each entry is only worth it if nearly every app would otherwise
|
|
26
|
+
* invent the same thing.
|
|
27
|
+
*
|
|
28
|
+
* Nouns that keep a hand-made order carry a `position`: a string that sorts
|
|
29
|
+
* where the record goes. {@link positionBetween} makes one between two others,
|
|
30
|
+
* so moving a card rewrites only that card, and two people moving cards at
|
|
31
|
+
* once never renumber each other's. It is optional, so a record made by
|
|
32
|
+
* something that knows nothing of order still counts: it goes at the end.
|
|
33
|
+
*/
|
|
34
|
+
import type { DefineCollection, P2PNode } from '../node/types.js';
|
|
35
|
+
import type { Typed } from '../query/types.js';
|
|
36
|
+
import type { LinkDeclaration } from '../records/links.js';
|
|
37
|
+
/** An emoji reaction to any record. Link it: `{ rel: 'about', to: <key> }`. */
|
|
38
|
+
export declare const reaction: {
|
|
39
|
+
readonly name: "std.reaction";
|
|
40
|
+
readonly title: "Reaction";
|
|
41
|
+
readonly description: "An emoji reaction to any record.";
|
|
42
|
+
readonly schema: {
|
|
43
|
+
readonly type: "object";
|
|
44
|
+
readonly properties: {
|
|
45
|
+
readonly emoji: {
|
|
46
|
+
readonly type: "string";
|
|
47
|
+
readonly minLength: 1;
|
|
48
|
+
readonly maxLength: 16;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
readonly required: readonly ["emoji"];
|
|
52
|
+
};
|
|
53
|
+
readonly links: {
|
|
54
|
+
readonly about: LinkDeclaration;
|
|
55
|
+
};
|
|
56
|
+
readonly rules: {
|
|
57
|
+
readonly edit: "creator";
|
|
58
|
+
readonly delete: "creator";
|
|
59
|
+
readonly onePer: readonly ["@author", "link:about", "emoji"];
|
|
60
|
+
};
|
|
61
|
+
} & Typed<Reaction>;
|
|
62
|
+
export interface Reaction {
|
|
63
|
+
readonly emoji: string;
|
|
64
|
+
}
|
|
65
|
+
/** A comment on any record, optionally a reply to another comment. */
|
|
66
|
+
export declare const comment: {
|
|
67
|
+
readonly name: "std.comment";
|
|
68
|
+
readonly title: "Comment";
|
|
69
|
+
readonly description: "A comment on any record, optionally replying to another comment.";
|
|
70
|
+
readonly schema: {
|
|
71
|
+
readonly type: "object";
|
|
72
|
+
readonly properties: {
|
|
73
|
+
readonly text: {
|
|
74
|
+
readonly type: "string";
|
|
75
|
+
readonly minLength: 1;
|
|
76
|
+
readonly maxLength: 10000;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
readonly required: readonly ["text"];
|
|
80
|
+
};
|
|
81
|
+
readonly links: {
|
|
82
|
+
readonly about: LinkDeclaration;
|
|
83
|
+
readonly replyTo: {
|
|
84
|
+
readonly to: readonly ["std.comment"];
|
|
85
|
+
readonly cardinality: "one";
|
|
86
|
+
readonly description: "The comment this replies to";
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly permissions: readonly ["moderate"];
|
|
90
|
+
readonly rules: {
|
|
91
|
+
readonly edit: "creator";
|
|
92
|
+
readonly delete: readonly ["creator", "can:moderate"];
|
|
93
|
+
};
|
|
94
|
+
} & Typed<Comment>;
|
|
95
|
+
export interface Comment {
|
|
96
|
+
readonly text: string;
|
|
97
|
+
}
|
|
98
|
+
/** A label on one or more records. */
|
|
99
|
+
export declare const tag: {
|
|
100
|
+
readonly name: "std.tag";
|
|
101
|
+
readonly title: "Tag";
|
|
102
|
+
readonly description: "A label on one or more records.";
|
|
103
|
+
readonly schema: {
|
|
104
|
+
readonly type: "object";
|
|
105
|
+
readonly properties: {
|
|
106
|
+
readonly label: {
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
readonly minLength: 1;
|
|
109
|
+
readonly maxLength: 100;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
readonly required: readonly ["label"];
|
|
113
|
+
};
|
|
114
|
+
readonly links: {
|
|
115
|
+
readonly about: {
|
|
116
|
+
readonly to: "*";
|
|
117
|
+
readonly cardinality: "many";
|
|
118
|
+
readonly description: "The records tagged";
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
readonly permissions: readonly ["moderate"];
|
|
122
|
+
readonly rules: {
|
|
123
|
+
readonly edit: "creator";
|
|
124
|
+
readonly delete: readonly ["creator", "can:moderate"];
|
|
125
|
+
};
|
|
126
|
+
} & Typed<Tag>;
|
|
127
|
+
export interface Tag {
|
|
128
|
+
readonly label: string;
|
|
129
|
+
}
|
|
130
|
+
/** A file attached to a record. Describes the file; storing its bytes is separate. */
|
|
131
|
+
export declare const attachment: {
|
|
132
|
+
readonly name: "std.attachment";
|
|
133
|
+
readonly title: "Attachment";
|
|
134
|
+
readonly description: "A file attached to a record. Describes the file; storing its bytes is not part of this.";
|
|
135
|
+
readonly schema: {
|
|
136
|
+
readonly type: "object";
|
|
137
|
+
readonly properties: {
|
|
138
|
+
readonly name: {
|
|
139
|
+
readonly type: "string";
|
|
140
|
+
readonly minLength: 1;
|
|
141
|
+
};
|
|
142
|
+
readonly mime: {
|
|
143
|
+
readonly type: "string";
|
|
144
|
+
readonly minLength: 1;
|
|
145
|
+
};
|
|
146
|
+
readonly size: {
|
|
147
|
+
readonly type: "integer";
|
|
148
|
+
readonly minimum: 0;
|
|
149
|
+
};
|
|
150
|
+
readonly url: {
|
|
151
|
+
readonly type: "string";
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
readonly required: readonly ["name", "mime"];
|
|
155
|
+
};
|
|
156
|
+
readonly links: {
|
|
157
|
+
readonly about: LinkDeclaration;
|
|
158
|
+
};
|
|
159
|
+
readonly permissions: readonly ["moderate"];
|
|
160
|
+
readonly rules: {
|
|
161
|
+
readonly edit: "creator";
|
|
162
|
+
readonly delete: readonly ["creator", "can:moderate"];
|
|
163
|
+
};
|
|
164
|
+
} & Typed<Attachment>;
|
|
165
|
+
export interface Attachment {
|
|
166
|
+
readonly name: string;
|
|
167
|
+
readonly mime: string;
|
|
168
|
+
readonly size?: number;
|
|
169
|
+
readonly url?: string;
|
|
170
|
+
}
|
|
171
|
+
/** A note that one record refers to another. */
|
|
172
|
+
export declare const reference: {
|
|
173
|
+
readonly name: "std.reference";
|
|
174
|
+
readonly title: "Reference";
|
|
175
|
+
readonly description: "A note that one record refers to another.";
|
|
176
|
+
readonly schema: {
|
|
177
|
+
readonly type: "object";
|
|
178
|
+
readonly properties: {
|
|
179
|
+
readonly note: {
|
|
180
|
+
readonly type: "string";
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
readonly links: {
|
|
185
|
+
readonly about: LinkDeclaration;
|
|
186
|
+
readonly to: LinkDeclaration;
|
|
187
|
+
};
|
|
188
|
+
readonly permissions: readonly ["moderate"];
|
|
189
|
+
readonly rules: {
|
|
190
|
+
readonly edit: "creator";
|
|
191
|
+
readonly delete: readonly ["creator", "can:moderate"];
|
|
192
|
+
};
|
|
193
|
+
} & Typed<Reference>;
|
|
194
|
+
export interface Reference {
|
|
195
|
+
readonly note?: string;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* A chat message. The space is the room; order is by when it was written.
|
|
199
|
+
* It can share one record — a poll to vote on, a task — which a chat that
|
|
200
|
+
* knows the record's kind shows in place. The text should still make sense
|
|
201
|
+
* alone ("Poll: Where to?"), for chats that don't.
|
|
202
|
+
*/
|
|
203
|
+
export declare const message: {
|
|
204
|
+
readonly name: "std.message";
|
|
205
|
+
readonly title: "Message";
|
|
206
|
+
readonly description: "A chat message, optionally replying to another, or sharing a record.";
|
|
207
|
+
readonly schema: {
|
|
208
|
+
readonly type: "object";
|
|
209
|
+
readonly properties: {
|
|
210
|
+
readonly text: {
|
|
211
|
+
readonly type: "string";
|
|
212
|
+
readonly minLength: 1;
|
|
213
|
+
readonly maxLength: 10000;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
readonly required: readonly ["text"];
|
|
217
|
+
};
|
|
218
|
+
readonly links: {
|
|
219
|
+
readonly replyTo: {
|
|
220
|
+
readonly to: readonly ["std.message"];
|
|
221
|
+
readonly cardinality: "one";
|
|
222
|
+
readonly description: "The message this replies to";
|
|
223
|
+
};
|
|
224
|
+
readonly shares: {
|
|
225
|
+
readonly to: "*";
|
|
226
|
+
readonly cardinality: "one";
|
|
227
|
+
readonly description: "A record this message shares, like a poll";
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
readonly permissions: readonly ["moderate"];
|
|
231
|
+
readonly rules: {
|
|
232
|
+
readonly edit: "creator";
|
|
233
|
+
readonly delete: readonly ["creator", "can:moderate"];
|
|
234
|
+
};
|
|
235
|
+
} & Typed<Message>;
|
|
236
|
+
export interface Message {
|
|
237
|
+
readonly text: string;
|
|
238
|
+
}
|
|
239
|
+
/** A column on a board — To do, Doing, Done — in the order it sits. */
|
|
240
|
+
export declare const column: {
|
|
241
|
+
readonly name: "std.column";
|
|
242
|
+
readonly title: "Column";
|
|
243
|
+
readonly description: "A column on a board, holding tasks.";
|
|
244
|
+
readonly schema: {
|
|
245
|
+
readonly type: "object";
|
|
246
|
+
readonly properties: {
|
|
247
|
+
readonly name: {
|
|
248
|
+
readonly type: "string";
|
|
249
|
+
readonly minLength: 1;
|
|
250
|
+
readonly maxLength: 200;
|
|
251
|
+
};
|
|
252
|
+
readonly position: {
|
|
253
|
+
readonly type: "string";
|
|
254
|
+
readonly minLength: 1;
|
|
255
|
+
readonly maxLength: 200;
|
|
256
|
+
readonly description: "Sorts where the column goes";
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
readonly required: readonly ["name"];
|
|
260
|
+
};
|
|
261
|
+
} & Typed<Column>;
|
|
262
|
+
export interface Column {
|
|
263
|
+
readonly name: string;
|
|
264
|
+
readonly position?: string;
|
|
265
|
+
}
|
|
266
|
+
/** A task, in the column it sits in and at a place in it. */
|
|
267
|
+
export declare const task: {
|
|
268
|
+
readonly name: "std.task";
|
|
269
|
+
readonly title: "Task";
|
|
270
|
+
readonly description: "A task, placed in a column.";
|
|
271
|
+
readonly schema: {
|
|
272
|
+
readonly type: "object";
|
|
273
|
+
readonly properties: {
|
|
274
|
+
readonly title: {
|
|
275
|
+
readonly type: "string";
|
|
276
|
+
readonly minLength: 1;
|
|
277
|
+
readonly maxLength: 500;
|
|
278
|
+
};
|
|
279
|
+
readonly notes: {
|
|
280
|
+
readonly type: "string";
|
|
281
|
+
readonly maxLength: 10000;
|
|
282
|
+
};
|
|
283
|
+
readonly position: {
|
|
284
|
+
readonly type: "string";
|
|
285
|
+
readonly minLength: 1;
|
|
286
|
+
readonly maxLength: 200;
|
|
287
|
+
readonly description: "Sorts where the task goes in its column";
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
readonly required: readonly ["title"];
|
|
291
|
+
};
|
|
292
|
+
readonly links: {
|
|
293
|
+
readonly column: {
|
|
294
|
+
readonly to: readonly ["std.column"];
|
|
295
|
+
readonly cardinality: "one";
|
|
296
|
+
readonly description: "The column it sits in";
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
} & Typed<Task>;
|
|
300
|
+
export interface Task {
|
|
301
|
+
readonly title: string;
|
|
302
|
+
readonly notes?: string;
|
|
303
|
+
readonly position?: string;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* A question with fixed options. The options cannot change once it is asked —
|
|
307
|
+
* votes point at them by position — but whoever asked can close it.
|
|
308
|
+
*/
|
|
309
|
+
export declare const poll: {
|
|
310
|
+
readonly name: "std.poll";
|
|
311
|
+
readonly title: "Poll";
|
|
312
|
+
readonly description: "A question with options to vote on.";
|
|
313
|
+
readonly schema: {
|
|
314
|
+
readonly type: "object";
|
|
315
|
+
readonly properties: {
|
|
316
|
+
readonly question: {
|
|
317
|
+
readonly type: "string";
|
|
318
|
+
readonly minLength: 1;
|
|
319
|
+
readonly maxLength: 500;
|
|
320
|
+
};
|
|
321
|
+
readonly options: {
|
|
322
|
+
readonly type: "array";
|
|
323
|
+
readonly items: {
|
|
324
|
+
readonly type: "string";
|
|
325
|
+
readonly minLength: 1;
|
|
326
|
+
readonly maxLength: 200;
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
readonly closed: {
|
|
330
|
+
readonly type: "boolean";
|
|
331
|
+
readonly description: "No more votes, as the asker sees it";
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
readonly required: readonly ["question", "options"];
|
|
335
|
+
};
|
|
336
|
+
readonly permissions: readonly ["moderate"];
|
|
337
|
+
readonly rules: {
|
|
338
|
+
readonly edit: "creator";
|
|
339
|
+
readonly delete: readonly ["creator", "can:moderate"];
|
|
340
|
+
readonly fixed: readonly ["options"];
|
|
341
|
+
};
|
|
342
|
+
} & Typed<Poll>;
|
|
343
|
+
export interface Poll {
|
|
344
|
+
readonly question: string;
|
|
345
|
+
readonly options: ReadonlyArray<string>;
|
|
346
|
+
readonly closed?: boolean;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* One person's vote on a poll: the position of their choice in its options.
|
|
350
|
+
* One per person per poll — voting again changes it; deleting takes it back.
|
|
351
|
+
*/
|
|
352
|
+
export declare const vote: {
|
|
353
|
+
readonly name: "std.vote";
|
|
354
|
+
readonly title: "Vote";
|
|
355
|
+
readonly description: "A vote on a poll: one per person, changed by voting again.";
|
|
356
|
+
readonly schema: {
|
|
357
|
+
readonly type: "object";
|
|
358
|
+
readonly properties: {
|
|
359
|
+
readonly choice: {
|
|
360
|
+
readonly type: "integer";
|
|
361
|
+
readonly minimum: 0;
|
|
362
|
+
readonly 'x-choicesFrom': {
|
|
363
|
+
readonly rel: "about";
|
|
364
|
+
readonly field: "options";
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
readonly required: readonly ["choice"];
|
|
369
|
+
};
|
|
370
|
+
readonly links: {
|
|
371
|
+
readonly about: {
|
|
372
|
+
readonly to: readonly ["std.poll"];
|
|
373
|
+
readonly cardinality: "one";
|
|
374
|
+
readonly description: "The poll voted on";
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
readonly rules: {
|
|
378
|
+
readonly edit: "creator";
|
|
379
|
+
readonly delete: "creator";
|
|
380
|
+
readonly onePer: readonly ["@author", "link:about"];
|
|
381
|
+
};
|
|
382
|
+
} & Typed<Vote>;
|
|
383
|
+
export interface Vote {
|
|
384
|
+
readonly choice: number;
|
|
385
|
+
}
|
|
386
|
+
/** Shapes that attach to anything */
|
|
387
|
+
export declare const standardAnnotations: ReadonlyArray<DefineCollection>;
|
|
388
|
+
/** Common nouns apps share */
|
|
389
|
+
export declare const standardNouns: ReadonlyArray<DefineCollection>;
|
|
390
|
+
/** Everything in the library */
|
|
391
|
+
export declare const standardSchemas: ReadonlyArray<DefineCollection>;
|
|
392
|
+
/**
|
|
393
|
+
* A `position` that sorts after `before` and ahead of `after` — either may be
|
|
394
|
+
* missing, for the ends. Positions compare as plain strings and never end in
|
|
395
|
+
* `0`, so there is always room for another between any two. Equal positions
|
|
396
|
+
* (two people dropping in the same spot at once) are fine; sort those by key.
|
|
397
|
+
*/
|
|
398
|
+
export declare function positionBetween(before?: string | null, after?: string | null): string;
|
|
399
|
+
/**
|
|
400
|
+
* Makes sure a space knows these collections: defines the ones it has no
|
|
401
|
+
* definition for, and leaves the rest alone — so calling it every time a
|
|
402
|
+
* space opens is fine, and it never bumps a definition someone else owns.
|
|
403
|
+
* A space you cannot write in is skipped.
|
|
404
|
+
*/
|
|
405
|
+
export declare function useSchemas(node: P2PNode, spaceId: string, schemas: ReadonlyArray<DefineCollection>): Promise<void>;
|
|
406
|
+
export { app, appScreen, checkApp, reviewApp, proposeApp, addApp, copyApp, MAX_APP_COLLECTIONS } from './apps.js';
|
|
407
|
+
export { SCREEN_GUIDE, SCREEN_CLIENT, screenDocument, createScreenBridge } from './screens.js';
|
|
408
|
+
export type { ScreenBridge, ScreenRecord, ScreenViewer } from './screens.js';
|
|
409
|
+
export type { App, AppDefinition, AppReview, AppNeedReview } from './apps.js';
|
|
410
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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M,eAAe,EAAE,aAAa,CAAC,gBAAgB,CAA8C,CAAC;AAI3G;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAoBrF;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAOxH;AAED,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAClH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC/F,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7E,YAAY,EAAE,GAAG,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A definition that also carries its records' type, so querying or writing
|
|
3
|
+
* with it is typed — `include: { votes: { rel: 'about', from: vote } }` gives
|
|
4
|
+
* votes as `Vote`. The schemas here are plain JSON Schema, so the type is said
|
|
5
|
+
* alongside rather than worked out.
|
|
6
|
+
*/
|
|
7
|
+
const typed = () => (definition) => definition;
|
|
8
|
+
const about = (description) => ({ to: '*', cardinality: 'one', description });
|
|
9
|
+
/** An emoji reaction to any record. Link it: `{ rel: 'about', to: <key> }`. */
|
|
10
|
+
export const reaction = typed()({
|
|
11
|
+
name: 'std.reaction',
|
|
12
|
+
title: 'Reaction',
|
|
13
|
+
description: 'An emoji reaction to any record.',
|
|
14
|
+
schema: { type: 'object', properties: { emoji: { type: 'string', minLength: 1, maxLength: 16 } }, required: ['emoji'] },
|
|
15
|
+
links: { about: about('The record reacted to') },
|
|
16
|
+
// One of each emoji per person per record; only yours to take back.
|
|
17
|
+
rules: { edit: 'creator', delete: 'creator', onePer: ['@author', 'link:about', 'emoji'] },
|
|
18
|
+
});
|
|
19
|
+
/** A comment on any record, optionally a reply to another comment. */
|
|
20
|
+
export const comment = typed()({
|
|
21
|
+
name: 'std.comment',
|
|
22
|
+
title: 'Comment',
|
|
23
|
+
description: 'A comment on any record, optionally replying to another comment.',
|
|
24
|
+
schema: { type: 'object', properties: { text: { type: 'string', minLength: 1, maxLength: 10000 } }, required: ['text'] },
|
|
25
|
+
links: {
|
|
26
|
+
about: about('The record commented on'),
|
|
27
|
+
replyTo: { to: ['std.comment'], cardinality: 'one', description: 'The comment this replies to' },
|
|
28
|
+
},
|
|
29
|
+
permissions: ['moderate'],
|
|
30
|
+
rules: { edit: 'creator', delete: ['creator', 'can:moderate'] },
|
|
31
|
+
});
|
|
32
|
+
/** A label on one or more records. */
|
|
33
|
+
export const tag = typed()({
|
|
34
|
+
name: 'std.tag',
|
|
35
|
+
title: 'Tag',
|
|
36
|
+
description: 'A label on one or more records.',
|
|
37
|
+
schema: { type: 'object', properties: { label: { type: 'string', minLength: 1, maxLength: 100 } }, required: ['label'] },
|
|
38
|
+
links: { about: { to: '*', cardinality: 'many', description: 'The records tagged' } },
|
|
39
|
+
permissions: ['moderate'],
|
|
40
|
+
rules: { edit: 'creator', delete: ['creator', 'can:moderate'] },
|
|
41
|
+
});
|
|
42
|
+
/** A file attached to a record. Describes the file; storing its bytes is separate. */
|
|
43
|
+
export const attachment = typed()({
|
|
44
|
+
name: 'std.attachment',
|
|
45
|
+
title: 'Attachment',
|
|
46
|
+
description: 'A file attached to a record. Describes the file; storing its bytes is not part of this.',
|
|
47
|
+
schema: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
properties: {
|
|
50
|
+
name: { type: 'string', minLength: 1 },
|
|
51
|
+
mime: { type: 'string', minLength: 1 },
|
|
52
|
+
size: { type: 'integer', minimum: 0 },
|
|
53
|
+
url: { type: 'string' },
|
|
54
|
+
},
|
|
55
|
+
required: ['name', 'mime'],
|
|
56
|
+
},
|
|
57
|
+
links: { about: about('The record the file is attached to') },
|
|
58
|
+
permissions: ['moderate'],
|
|
59
|
+
rules: { edit: 'creator', delete: ['creator', 'can:moderate'] },
|
|
60
|
+
});
|
|
61
|
+
/** A note that one record refers to another. */
|
|
62
|
+
export const reference = typed()({
|
|
63
|
+
name: 'std.reference',
|
|
64
|
+
title: 'Reference',
|
|
65
|
+
description: 'A note that one record refers to another.',
|
|
66
|
+
schema: { type: 'object', properties: { note: { type: 'string' } } },
|
|
67
|
+
links: { about: about('The record doing the referring'), to: about('The record referred to') },
|
|
68
|
+
permissions: ['moderate'],
|
|
69
|
+
rules: { edit: 'creator', delete: ['creator', 'can:moderate'] },
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* A chat message. The space is the room; order is by when it was written.
|
|
73
|
+
* It can share one record — a poll to vote on, a task — which a chat that
|
|
74
|
+
* knows the record's kind shows in place. The text should still make sense
|
|
75
|
+
* alone ("Poll: Where to?"), for chats that don't.
|
|
76
|
+
*/
|
|
77
|
+
export const message = typed()({
|
|
78
|
+
name: 'std.message',
|
|
79
|
+
title: 'Message',
|
|
80
|
+
description: 'A chat message, optionally replying to another, or sharing a record.',
|
|
81
|
+
schema: { type: 'object', properties: { text: { type: 'string', minLength: 1, maxLength: 10000 } }, required: ['text'] },
|
|
82
|
+
links: {
|
|
83
|
+
replyTo: { to: ['std.message'], cardinality: 'one', description: 'The message this replies to' },
|
|
84
|
+
shares: { to: '*', cardinality: 'one', description: 'A record this message shares, like a poll' },
|
|
85
|
+
},
|
|
86
|
+
permissions: ['moderate'],
|
|
87
|
+
rules: { edit: 'creator', delete: ['creator', 'can:moderate'] },
|
|
88
|
+
});
|
|
89
|
+
/** A column on a board — To do, Doing, Done — in the order it sits. */
|
|
90
|
+
export const column = typed()({
|
|
91
|
+
name: 'std.column',
|
|
92
|
+
title: 'Column',
|
|
93
|
+
description: 'A column on a board, holding tasks.',
|
|
94
|
+
schema: {
|
|
95
|
+
type: 'object',
|
|
96
|
+
properties: {
|
|
97
|
+
name: { type: 'string', minLength: 1, maxLength: 200 },
|
|
98
|
+
position: { type: 'string', minLength: 1, maxLength: 200, description: 'Sorts where the column goes' },
|
|
99
|
+
},
|
|
100
|
+
required: ['name'],
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
/** A task, in the column it sits in and at a place in it. */
|
|
104
|
+
export const task = typed()({
|
|
105
|
+
name: 'std.task',
|
|
106
|
+
title: 'Task',
|
|
107
|
+
description: 'A task, placed in a column.',
|
|
108
|
+
schema: {
|
|
109
|
+
type: 'object',
|
|
110
|
+
properties: {
|
|
111
|
+
title: { type: 'string', minLength: 1, maxLength: 500 },
|
|
112
|
+
notes: { type: 'string', maxLength: 10000 },
|
|
113
|
+
position: { type: 'string', minLength: 1, maxLength: 200, description: 'Sorts where the task goes in its column' },
|
|
114
|
+
},
|
|
115
|
+
required: ['title'],
|
|
116
|
+
},
|
|
117
|
+
links: { column: { to: ['std.column'], cardinality: 'one', description: 'The column it sits in' } },
|
|
118
|
+
});
|
|
119
|
+
/**
|
|
120
|
+
* A question with fixed options. The options cannot change once it is asked —
|
|
121
|
+
* votes point at them by position — but whoever asked can close it.
|
|
122
|
+
*/
|
|
123
|
+
export const poll = typed()({
|
|
124
|
+
name: 'std.poll',
|
|
125
|
+
title: 'Poll',
|
|
126
|
+
description: 'A question with options to vote on.',
|
|
127
|
+
schema: {
|
|
128
|
+
type: 'object',
|
|
129
|
+
properties: {
|
|
130
|
+
question: { type: 'string', minLength: 1, maxLength: 500 },
|
|
131
|
+
options: { type: 'array', items: { type: 'string', minLength: 1, maxLength: 200 } },
|
|
132
|
+
closed: { type: 'boolean', description: 'No more votes, as the asker sees it' },
|
|
133
|
+
},
|
|
134
|
+
required: ['question', 'options'],
|
|
135
|
+
},
|
|
136
|
+
permissions: ['moderate'],
|
|
137
|
+
rules: { edit: 'creator', delete: ['creator', 'can:moderate'], fixed: ['options'] },
|
|
138
|
+
});
|
|
139
|
+
/**
|
|
140
|
+
* One person's vote on a poll: the position of their choice in its options.
|
|
141
|
+
* One per person per poll — voting again changes it; deleting takes it back.
|
|
142
|
+
*/
|
|
143
|
+
export const vote = typed()({
|
|
144
|
+
name: 'std.vote',
|
|
145
|
+
title: 'Vote',
|
|
146
|
+
description: "A vote on a poll: one per person, changed by voting again.",
|
|
147
|
+
schema: {
|
|
148
|
+
type: 'object',
|
|
149
|
+
properties: { choice: { type: 'integer', minimum: 0, 'x-choicesFrom': { rel: 'about', field: 'options' } } },
|
|
150
|
+
required: ['choice'],
|
|
151
|
+
},
|
|
152
|
+
links: { about: { to: ['std.poll'], cardinality: 'one', description: 'The poll voted on' } },
|
|
153
|
+
rules: { edit: 'creator', delete: 'creator', onePer: ['@author', 'link:about'] },
|
|
154
|
+
});
|
|
155
|
+
/** Shapes that attach to anything */
|
|
156
|
+
export const standardAnnotations = [reaction, comment, tag, attachment, reference];
|
|
157
|
+
/** Common nouns apps share */
|
|
158
|
+
export const standardNouns = [message, column, task, poll, vote];
|
|
159
|
+
/** Everything in the library */
|
|
160
|
+
export const standardSchemas = [...standardAnnotations, ...standardNouns];
|
|
161
|
+
const DIGITS = '0123456789abcdefghijklmnopqrstuvwxyz';
|
|
162
|
+
/**
|
|
163
|
+
* A `position` that sorts after `before` and ahead of `after` — either may be
|
|
164
|
+
* missing, for the ends. Positions compare as plain strings and never end in
|
|
165
|
+
* `0`, so there is always room for another between any two. Equal positions
|
|
166
|
+
* (two people dropping in the same spot at once) are fine; sort those by key.
|
|
167
|
+
*/
|
|
168
|
+
export function positionBetween(before, after) {
|
|
169
|
+
const a = before ?? '';
|
|
170
|
+
let b = after && after > a ? after : null;
|
|
171
|
+
let out = '';
|
|
172
|
+
for (let i = 0;; i++) {
|
|
173
|
+
const low = i < a.length ? DIGITS.indexOf(a[i]) : 0;
|
|
174
|
+
const high = b !== null ? (i < b.length ? DIGITS.indexOf(b[i]) : 0) : DIGITS.length;
|
|
175
|
+
if (low === high) {
|
|
176
|
+
out += DIGITS[low];
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
// At an open end, step by one rather than halving, so a list that only
|
|
180
|
+
// ever grows at the end (or the start) keeps short positions.
|
|
181
|
+
const open = i < a.length ? (b === null ? 'after' : null) : b !== null ? 'before' : null;
|
|
182
|
+
const mid = open === 'after' ? low + 1 : open === 'before' ? high - 1 : Math.floor((low + high) / 2);
|
|
183
|
+
if (mid > low && mid < high)
|
|
184
|
+
return out + DIGITS[mid];
|
|
185
|
+
// Adjacent digits: keep the lower one, and anything above the rest of `a` will do.
|
|
186
|
+
out += DIGITS[low];
|
|
187
|
+
b = null;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Makes sure a space knows these collections: defines the ones it has no
|
|
192
|
+
* definition for, and leaves the rest alone — so calling it every time a
|
|
193
|
+
* space opens is fine, and it never bumps a definition someone else owns.
|
|
194
|
+
* A space you cannot write in is skipped.
|
|
195
|
+
*/
|
|
196
|
+
export async function useSchemas(node, spaceId, schemas) {
|
|
197
|
+
const summary = await node.spaces.get(spaceId);
|
|
198
|
+
if (!summary?.writable)
|
|
199
|
+
return;
|
|
200
|
+
const known = new Set((await node.collections.list(spaceId)).filter((c) => c.version !== null).map((c) => c.name));
|
|
201
|
+
for (const schema of schemas) {
|
|
202
|
+
if (!known.has(schema.name))
|
|
203
|
+
await node.collections.define(spaceId, schema);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
export { app, appScreen, checkApp, reviewApp, proposeApp, addApp, copyApp, MAX_APP_COLLECTIONS } from './apps.js';
|
|
207
|
+
export { SCREEN_GUIDE, SCREEN_CLIENT, screenDocument, createScreenBridge } from './screens.js';
|
|
208
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
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