edytor 3.0.0 → 5.0.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 +2 -2
- package/dist/block/block.svelte.js +6 -21
- package/dist/block/inlineBlock.svelte.js +4 -6
- package/dist/clipboard/moveText.js +6 -8
- package/dist/cloudflare/DocumentRoom.d.ts +23 -12
- package/dist/cloudflare/DocumentRoom.js +10 -6
- package/dist/cloudflare/index.d.ts +1 -1
- package/dist/cloudflare/room/access.d.ts +8 -3
- package/dist/cloudflare/room/access.js +44 -20
- package/dist/cloudflare/room/admission.js +28 -5
- package/dist/cloudflare/room/comments.js +28 -1
- package/dist/cloudflare/room/context.d.ts +139 -129
- package/dist/cloudflare/room/context.js +11 -4
- package/dist/cloudflare/room/forged.d.ts +14 -0
- package/dist/cloudflare/room/forged.js +30 -2
- package/dist/cloudflare/room/frames.d.ts +4 -0
- package/dist/cloudflare/room/frames.js +5 -1
- package/dist/cloudflare/room/purge.d.ts +6 -3
- package/dist/cloudflare/room/purge.js +45 -19
- package/dist/cloudflare/room/replicas.d.ts +4 -2
- package/dist/cloudflare/room/replicas.js +8 -3
- package/dist/cloudflare/room/suggest.d.ts +7 -0
- package/dist/cloudflare/room/suggest.js +143 -0
- package/dist/cloudflare/room/updates.d.ts +3 -4
- package/dist/cloudflare/room/updates.js +6 -8
- package/dist/cloudflare/routeDocumentSocket.d.ts +10 -1
- package/dist/cloudflare/routeDocumentSocket.js +5 -3
- package/dist/components/Content.svelte +9 -1
- package/dist/crdt/anchors.js +3 -2
- package/dist/crdt/attribution/attribution.d.ts +34 -12
- package/dist/crdt/attribution/attribution.js +59 -21
- package/dist/crdt/attribution/block.d.ts +3 -3
- package/dist/crdt/attribution/block.js +7 -8
- package/dist/crdt/attribution/index.d.ts +1 -1
- package/dist/crdt/attribution/index.js +1 -1
- package/dist/crdt/data.d.ts +62 -31
- package/dist/crdt/data.js +211 -103
- package/dist/crdt/doc/capability.js +9 -13
- package/dist/crdt/doc/delete.d.ts +1 -1
- package/dist/crdt/doc/delete.js +13 -30
- package/dist/crdt/doc/funnel.d.ts +1 -1
- package/dist/crdt/doc/funnel.js +34 -26
- package/dist/crdt/doc/gate.d.ts +3 -3
- package/dist/crdt/doc/history.d.ts +31 -9
- package/dist/crdt/doc/history.js +204 -73
- package/dist/crdt/doc/layout.js +16 -27
- package/dist/crdt/doc/meta.js +17 -23
- package/dist/crdt/doc/moves.d.ts +1 -1
- package/dist/crdt/doc/moves.js +52 -32
- package/dist/crdt/doc/reads.d.ts +2 -2
- package/dist/crdt/doc/reads.js +20 -30
- package/dist/crdt/doc/seed.js +2 -2
- package/dist/crdt/doc/split-merge.js +12 -15
- package/dist/crdt/doc/steps.d.ts +25 -13
- package/dist/crdt/doc/steps.js +55 -125
- package/dist/crdt/doc/suggest.d.ts +167 -0
- package/dist/crdt/doc/suggest.js +579 -0
- package/dist/crdt/doc/types.d.ts +21 -9
- package/dist/crdt/document.d.ts +26 -6
- package/dist/crdt/document.js +40 -15
- package/dist/crdt/edytor-doc.d.ts +410 -390
- package/dist/crdt/edytor-doc.js +143 -95
- package/dist/crdt/engine-api.d.ts +39 -1
- package/dist/crdt/engine.d.ts +2 -2
- package/dist/crdt/engine.js +4 -5
- package/dist/crdt/flow.d.ts +2 -2
- package/dist/crdt/flow.js +29 -37
- package/dist/crdt/index.d.ts +134 -127
- package/dist/crdt/index.js +4 -1
- package/dist/crdt/operations.d.ts +12 -3
- package/dist/crdt/parts.d.ts +43 -0
- package/dist/crdt/parts.js +44 -0
- package/dist/crdt/placement/display.d.ts +6 -31
- package/dist/crdt/placement/display.js +41 -146
- package/dist/crdt/placement/keys.d.ts +63 -0
- package/dist/crdt/placement/keys.js +95 -0
- package/dist/crdt/placement/model.d.ts +119 -118
- package/dist/crdt/placement/model.js +242 -142
- package/dist/crdt/placement/resolve.d.ts +123 -35
- package/dist/crdt/placement/resolve.js +188 -153
- package/dist/crdt/placement/slots.d.ts +134 -0
- package/dist/crdt/placement/slots.js +152 -0
- package/dist/crdt/protocol.d.ts +1 -1
- package/dist/crdt/protocol.js +1 -1
- package/dist/crdt/protocols/auth.d.ts +11 -1
- package/dist/crdt/protocols/auth.js +17 -1
- package/dist/crdt/protocols/comments.d.ts +16 -1
- package/dist/crdt/protocols/comments.js +9 -1
- package/dist/crdt/providers/index.d.ts +6 -4
- package/dist/crdt/providers/index.js +3 -1
- package/dist/crdt/providers/room.d.ts +16 -2
- package/dist/crdt/providers/room.js +64 -17
- package/dist/crdt/providers/websocket.d.ts +6 -4
- package/dist/crdt/providers/websocket.js +14 -7
- package/dist/crdt/purge.d.ts +24 -9
- package/dist/crdt/purge.js +266 -126
- package/dist/crdt/restore.d.ts +4 -3
- package/dist/crdt/restore.js +27 -34
- package/dist/crdt/schema.d.ts +30 -21
- package/dist/crdt/schema.js +39 -23
- package/dist/crdt/storage.d.ts +1 -1
- package/dist/crdt/storage.js +1 -1
- package/dist/crdt/structs.d.ts +17 -15
- package/dist/crdt/structs.js +10 -22
- package/dist/crdt/text/index/cache.js +4 -0
- package/dist/crdt/text/index/claims.js +13 -23
- package/dist/crdt/text/index/fold.d.ts +2 -3
- package/dist/crdt/text/index/fold.js +194 -44
- package/dist/crdt/text/index/layout.d.ts +2 -4
- package/dist/crdt/text/index/layout.js +14 -30
- package/dist/crdt/text/index/placement.d.ts +26 -18
- package/dist/crdt/text/index/placement.js +420 -157
- package/dist/crdt/text/index/records.d.ts +3 -3
- package/dist/crdt/text/index/records.js +24 -31
- package/dist/crdt/text/index/shared.d.ts +11 -3
- package/dist/crdt/text/index/shared.js +29 -17
- package/dist/crdt/text/index/state.d.ts +21 -17
- package/dist/crdt/text/index/state.js +15 -17
- package/dist/crdt/text/index/streams.d.ts +10 -5
- package/dist/crdt/text/index/streams.js +78 -27
- package/dist/crdt/text/items.d.ts +10 -3
- package/dist/crdt/text/items.js +7 -0
- package/dist/crdt/text/model.d.ts +87 -62
- package/dist/crdt/text/model.js +91 -169
- package/dist/crdt/text/ranges.d.ts +1 -1
- package/dist/crdt/text/ranges.js +3 -3
- package/dist/crdt/text/rows.d.ts +13 -7
- package/dist/crdt/text/rows.js +24 -7
- package/dist/crdt/text/runs.d.ts +51 -42
- package/dist/crdt/text/runs.js +24 -7
- package/dist/crdt/text/streams.d.ts +26 -13
- package/dist/crdt/text/streams.js +41 -14
- package/dist/crdt/vendor/yjs/UPSTREAM.md +651 -21
- package/dist/crdt/vendor/yjs/dts/global.d.ts +2 -0
- package/dist/crdt/vendor/yjs/dts/index.d.ts +1 -1
- package/dist/crdt/vendor/yjs/dts/structs/AbstractStruct.d.ts +7 -0
- package/dist/crdt/vendor/yjs/dts/structs/Item.d.ts +197 -10
- package/dist/crdt/vendor/yjs/dts/utils/Doc.d.ts +6 -3
- package/dist/crdt/vendor/yjs/dts/utils/StructStore.d.ts +5 -18
- package/dist/crdt/vendor/yjs/dts/utils/Transaction.d.ts +15 -1
- package/dist/crdt/vendor/yjs/dts/utils/UpdateDecoder.d.ts +14 -6
- package/dist/crdt/vendor/yjs/dts/utils/UpdateEncoder.d.ts +33 -6
- package/dist/crdt/vendor/yjs/dts/utils/ids.d.ts +1 -65
- package/dist/crdt/vendor/yjs/dts/utils/marks.d.ts +6 -1
- package/dist/crdt/vendor/yjs/dts/ynode.d.ts +54 -7
- package/dist/crdt/vendor/yjs/global.d.ts +2 -0
- package/dist/crdt/vendor/yjs/src/index.js +1 -1
- package/dist/crdt/vendor/yjs/src/structs/AbstractStruct.js +10 -0
- package/dist/crdt/vendor/yjs/src/structs/Item.js +649 -51
- package/dist/crdt/vendor/yjs/src/utils/BlockSet.js +18 -9
- package/dist/crdt/vendor/yjs/src/utils/Doc.js +5 -3
- package/dist/crdt/vendor/yjs/src/utils/StructStore.js +5 -0
- package/dist/crdt/vendor/yjs/src/utils/Transaction.js +36 -13
- package/dist/crdt/vendor/yjs/src/utils/UpdateDecoder.js +88 -18
- package/dist/crdt/vendor/yjs/src/utils/UpdateEncoder.js +119 -32
- package/dist/crdt/vendor/yjs/src/utils/encoding.js +13 -1
- package/dist/crdt/vendor/yjs/src/utils/ids.js +7 -7
- package/dist/crdt/vendor/yjs/src/utils/marks.js +193 -8
- package/dist/crdt/vendor/yjs/src/utils/redo.js +1 -1
- package/dist/crdt/vendor/yjs/src/utils/transaction-helpers.js +1 -1
- package/dist/crdt/vendor/yjs/src/utils/updates.js +3 -3
- package/dist/crdt/vendor/yjs/src/ynode.js +199 -12
- package/dist/edytor.svelte.d.ts +1 -1
- package/dist/edytor.svelte.js +103 -75
- package/dist/events/beforeInputCommands.d.ts +2 -2
- package/dist/events/beforeInputCommands.js +2 -2
- package/dist/events/nativeInteractiveControl.d.ts +11 -1
- package/dist/events/nativeInteractiveControl.js +41 -1
- package/dist/events/onBeforeInput.js +3 -3
- package/dist/events/onFocus.js +9 -11
- package/dist/events/onPageHide.d.ts +3 -0
- package/dist/events/onPageHide.js +16 -0
- package/dist/export/forms.d.ts +50 -50
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1 -1
- package/dist/labels.d.ts +8 -0
- package/dist/labels.js +6 -1
- package/dist/plugins/comments/CommentsController.svelte.d.ts +5 -1
- package/dist/plugins/comments/CommentsController.svelte.js +14 -4
- package/dist/plugins/find/search.js +2 -2
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.js +1 -0
- package/dist/plugins/suggestions/SuggestionBars.svelte +40 -23
- package/dist/plugins/suggestions/SuggestionBars.svelte.d.ts +3 -1
- package/dist/plugins/suggestions/SuggestionRuns.svelte +77 -0
- package/dist/plugins/suggestions/SuggestionRuns.svelte.d.ts +9 -0
- package/dist/plugins/suggestions/shared.svelte.d.ts +58 -0
- package/dist/plugins/suggestions/shared.svelte.js +421 -0
- package/dist/plugins/suggestions/suggestionsPlugin.d.ts +15 -4
- package/dist/selection/domSelection.d.ts +2 -0
- package/dist/selection/domSelection.js +6 -2
- package/dist/selection/pointer.svelte.js +75 -48
- package/dist/selection/replaceSelection.js +2 -6
- package/dist/selection/selection.svelte.d.ts +3 -3
- package/dist/selection/selection.svelte.js +39 -32
- package/dist/selection/selection.utils.d.ts +14 -0
- package/dist/selection/selection.utils.js +28 -3
- package/dist/session/commands.js +21 -11
- package/dist/session/composition.svelte.d.ts +5 -3
- package/dist/session/composition.svelte.js +21 -17
- package/dist/session/handles.d.ts +4 -17
- package/dist/session/handles.js +11 -37
- package/dist/session/navigation.js +6 -9
- package/dist/session/selection.d.ts +11 -5
- package/dist/session/selection.js +14 -48
- package/dist/session/suggestions.svelte.d.ts +38 -9
- package/dist/session/suggestions.svelte.js +37 -18
- package/dist/session/virtual.d.ts +1 -1
- package/dist/surface/attributes.d.ts +5 -0
- package/dist/surface/attributes.js +2 -2
- package/dist/surface/cells.d.ts +2 -26
- package/dist/surface/cells.js +2 -33
- package/dist/surface/observer.svelte.d.ts +6 -1
- package/dist/surface/observer.svelte.js +130 -83
- package/dist/surface/pin.svelte.d.ts +9 -9
- package/dist/surface/pin.svelte.js +15 -22
- package/dist/surface/projector.svelte.d.ts +15 -3
- package/dist/surface/projector.svelte.js +67 -22
- package/dist/text/text.svelte.js +14 -19
- package/dist/themes/notion.css +29 -0
- package/package.json +4 -2
- package/dist/crdt/placement/rank.d.ts +0 -87
- package/dist/crdt/placement/rank.js +0 -332
- package/dist/crdt/placement/source.d.ts +0 -43
- package/dist/crdt/placement/source.js +0 -66
- package/dist/crdt/text/delete-index.d.ts +0 -129
- package/dist/crdt/text/delete-index.js +0 -365
- package/dist/crdt/text/deletes.d.ts +0 -76
- package/dist/crdt/text/deletes.js +0 -362
- package/dist/crdt/text/index/anchored.d.ts +0 -17
- package/dist/crdt/text/index/anchored.js +0 -197
|
@@ -7,6 +7,8 @@ export type WebsocketProviderEvents = {
|
|
|
7
7
|
status: (event: {
|
|
8
8
|
status: 'connected' | 'disconnected' | 'connecting';
|
|
9
9
|
}) => void;
|
|
10
|
+
/** What the room says this connection's user may do, as it joins (and at a change in place). */
|
|
11
|
+
access: (access: 'write' | 'suggest' | 'comment' | 'read', provider: unknown) => void;
|
|
10
12
|
synced: (state: boolean) => void;
|
|
11
13
|
'connection-close': (event: CloseEvent | null, provider: unknown) => void;
|
|
12
14
|
'connection-error': (event: Event, provider: unknown) => void;
|
|
@@ -221,11 +223,11 @@ export declare const bindWebsocketProvider: (Y: EngineApi) => {
|
|
|
221
223
|
destroy(): void;
|
|
222
224
|
disconnect(): void;
|
|
223
225
|
connect(): void;
|
|
224
|
-
emit<N extends "refused" | "status" | "failed" | "schema-mismatch" | "message-error" | "protocol-mismatch" | "synced" | "connection-close" | "connection-error" | "saved" | "permission-denied" | "expired" | "unreachable">(name: N, args: Parameters<WebsocketProviderEvents[N]>): void;
|
|
226
|
+
emit<N extends "refused" | "status" | "failed" | "schema-mismatch" | "message-error" | "protocol-mismatch" | "synced" | "access" | "connection-close" | "connection-error" | "saved" | "permission-denied" | "expired" | "unreachable">(name: N, args: Parameters<WebsocketProviderEvents[N]>): void;
|
|
225
227
|
_observers: Map<string, Set<any>>;
|
|
226
|
-
on<NAME extends "refused" | "status" | "failed" | "schema-mismatch" | "message-error" | "protocol-mismatch" | "synced" | "connection-close" | "connection-error" | "saved" | "permission-denied" | "expired" | "unreachable">(name: NAME, f: WebsocketProviderEvents[NAME]): WebsocketProviderEvents[NAME];
|
|
227
|
-
once<NAME extends "refused" | "status" | "failed" | "schema-mismatch" | "message-error" | "protocol-mismatch" | "synced" | "connection-close" | "connection-error" | "saved" | "permission-denied" | "expired" | "unreachable">(name: NAME, f: WebsocketProviderEvents[NAME]): void;
|
|
228
|
-
off<NAME extends "refused" | "status" | "failed" | "schema-mismatch" | "message-error" | "protocol-mismatch" | "synced" | "connection-close" | "connection-error" | "saved" | "permission-denied" | "expired" | "unreachable">(name: NAME, f: WebsocketProviderEvents[NAME]): void;
|
|
228
|
+
on<NAME extends "refused" | "status" | "failed" | "schema-mismatch" | "message-error" | "protocol-mismatch" | "synced" | "access" | "connection-close" | "connection-error" | "saved" | "permission-denied" | "expired" | "unreachable">(name: NAME, f: WebsocketProviderEvents[NAME]): WebsocketProviderEvents[NAME];
|
|
229
|
+
once<NAME extends "refused" | "status" | "failed" | "schema-mismatch" | "message-error" | "protocol-mismatch" | "synced" | "access" | "connection-close" | "connection-error" | "saved" | "permission-denied" | "expired" | "unreachable">(name: NAME, f: WebsocketProviderEvents[NAME]): void;
|
|
230
|
+
off<NAME extends "refused" | "status" | "failed" | "schema-mismatch" | "message-error" | "protocol-mismatch" | "synced" | "access" | "connection-close" | "connection-error" | "saved" | "permission-denied" | "expired" | "unreachable">(name: NAME, f: WebsocketProviderEvents[NAME]): void;
|
|
229
231
|
};
|
|
230
232
|
};
|
|
231
233
|
watchComments: (server: string | null, roomName: string, listener: (message: CommentMessage) => void) => (() => void);
|
|
@@ -52,14 +52,14 @@ import * as math from 'lib0-v14/math';
|
|
|
52
52
|
import * as url from 'lib0-v14/url';
|
|
53
53
|
import { Awareness, removeAwarenessStates } from '../protocols/awareness.js';
|
|
54
54
|
import { IsolatedObservable } from '../protocols/observable.js';
|
|
55
|
-
import { messagePermissionDenied, messageReadOnly, READ_ONLY_DENIAL, readAuthMessage } from '../protocols/auth.js';
|
|
55
|
+
import { messagePermissionDenied, messageAccess, messageReadOnly, READ_ONLY_DENIAL, SUGGEST_ONLY_DENIAL, readAuthMessage } from '../protocols/auth.js';
|
|
56
56
|
import { bindSync } from '../protocols/sync.js';
|
|
57
57
|
import { readCommentsMessage, writeCommentsSubscribe } from '../protocols/comments.js';
|
|
58
58
|
import { frame } from '../protocols/envelope.js';
|
|
59
59
|
import { assertRoomId, beginDestroy, bindRoomProtocol, tabs, chunkFrame, CLOSE, createChunkReader, emitFailed, initLifecycle, isRefusal, LOCAL_PRESENCE_LOSS, markSynced, messageAuth, messageChunk, messageComments, messageSaved, messageSync, MAX_FRAME_BYTES, SyncRefusedError } from './room.js';
|
|
60
60
|
import { asEngineDoc } from '../structs.js';
|
|
61
61
|
import { ATTRIBUTION_ROOT } from '../schema.js';
|
|
62
|
-
import { ATTRIBUTION_ORIGIN } from '../attribution/attribution.js';
|
|
62
|
+
import { ATTRIBUTION_ORIGIN, writerOf } from '../attribution/attribution.js';
|
|
63
63
|
// @todo - this should depend on awareness.outdatedTime
|
|
64
64
|
const messageReconnectTimeout = 30000;
|
|
65
65
|
/** Silence after which the socket is sent one text `ping` (a room auto-answers `pong`). */
|
|
@@ -122,12 +122,17 @@ export const bindWebsocketProvider = (Y) => {
|
|
|
122
122
|
if (readOnly)
|
|
123
123
|
provider._writes.deny();
|
|
124
124
|
provider.emit('permission-denied', [reason, provider]);
|
|
125
|
-
|
|
125
|
+
// What a suggest-only socket may not write is stripped: the socket stays.
|
|
126
|
+
if (!readOnly && reason !== SUGGEST_ONLY_DENIAL)
|
|
126
127
|
emitFailed(provider, new Error(`permission denied: ${reason}`));
|
|
127
128
|
},
|
|
128
129
|
// The room's notice at the join: a state, not a refusal (no event).
|
|
129
|
-
() => provider._writes.deny()
|
|
130
|
-
|
|
130
|
+
() => provider._writes.deny(),
|
|
131
|
+
// The room's word at the join, and at a change in place (`read`).
|
|
132
|
+
(access) => provider.emit('access', [access, provider]));
|
|
133
|
+
if (authType !== messagePermissionDenied &&
|
|
134
|
+
authType !== messageReadOnly &&
|
|
135
|
+
authType !== messageAccess) {
|
|
131
136
|
// An auth type we do not speak inside a valid v14 envelope is
|
|
132
137
|
// protocol skew — reported, never dropped silently.
|
|
133
138
|
provider.emit('message-error', [
|
|
@@ -262,10 +267,12 @@ export const bindWebsocketProvider = (Y) => {
|
|
|
262
267
|
* reload, its other tabs), and a seed writer (content any replica may
|
|
263
268
|
* write, never stripped). Another actor's structs are not this replica's
|
|
264
269
|
* to save: a room restored from a lagging snapshot strips them for good.
|
|
265
|
-
*
|
|
270
|
+
* The actor is the binding of the doc's own id, written with its first
|
|
271
|
+
* write, and before it the actor the document attached (`writerOf`). A
|
|
272
|
+
* raw doc, with neither, owns all.
|
|
266
273
|
*/
|
|
267
274
|
const ownerOf = (doc) => {
|
|
268
|
-
const actor =
|
|
275
|
+
const actor = writerOf(asEngineDoc(doc));
|
|
269
276
|
return (client) => actor === undefined ||
|
|
270
277
|
client === doc.clientID ||
|
|
271
278
|
client < seedBand ||
|
package/dist/crdt/purge.d.ts
CHANGED
|
@@ -9,12 +9,16 @@
|
|
|
9
9
|
* The horizon is a state vector: an item whose clock is below it was
|
|
10
10
|
* stored by the room before the horizon's time (`room.purge.timing`). A
|
|
11
11
|
* deletion's time is the struct that made it: a block's oldest live delete
|
|
12
|
-
* mark (a withdrawn block: its withdraw mark, and the
|
|
13
|
-
* held), a text
|
|
12
|
+
* mark (a withdrawn block: its withdraw mark, and the records of what it last
|
|
13
|
+
* held), a text hold record, a move record. A delete of a session whose
|
|
14
|
+
* history ended (a release record, `hist.release.end`) is past the horizon
|
|
15
|
+
* whatever its time: a delete or withdraw mark, a text hold record of that
|
|
16
|
+
* writer below the record's clock. A move or a merge waits for the horizon.
|
|
14
17
|
*/
|
|
15
18
|
import type { EngineApi, EngineDoc } from './engine-api.js';
|
|
16
19
|
import { type PlacementModel } from './placement/model.js';
|
|
17
20
|
import { type TextEngine } from './text/model.js';
|
|
21
|
+
import { type SuggestFacade } from './doc/suggest.js';
|
|
18
22
|
/** The horizon: the time and encoded state vector of the room's epoch (`room.purge.timing`). */
|
|
19
23
|
export type Horizon = {
|
|
20
24
|
at: number;
|
|
@@ -24,14 +28,12 @@ export type Horizon = {
|
|
|
24
28
|
export type PurgeReport = {
|
|
25
29
|
/** Blocks removed: registry entry deleted, node collected. */
|
|
26
30
|
removed: number;
|
|
27
|
-
/** Deleted blocks kept (
|
|
31
|
+
/** Deleted blocks kept (a live block streams in their text, two boundaries name them, or a block is placed under them) whose stream, data and claims were deleted. */
|
|
28
32
|
emptied: number;
|
|
29
|
-
/** Text
|
|
33
|
+
/** Text hold records deleted (what they held deleted with them). */
|
|
30
34
|
marks: number;
|
|
31
|
-
/**
|
|
35
|
+
/** Move records dropped: old ones no block shows at any more (a lost move, a move of removed blocks). */
|
|
32
36
|
records: number;
|
|
33
|
-
/** Placement candidates dropped (runner-ups of an old, accepted winner). */
|
|
34
|
-
candidates: number;
|
|
35
37
|
/** Claims naming a removed block, deleted from the blocks that hold them. */
|
|
36
38
|
claims: number;
|
|
37
39
|
/**
|
|
@@ -40,13 +42,26 @@ export type PurgeReport = {
|
|
|
40
42
|
* contributors at the merge): deleted, their registry entries kept.
|
|
41
43
|
*/
|
|
42
44
|
merged: number;
|
|
45
|
+
/** Release records the horizon covers (`hist.release.end`): deleted. */
|
|
46
|
+
released: number;
|
|
47
|
+
/**
|
|
48
|
+
* Suggestions decided before the horizon (`sugg.purge`): nothing of them
|
|
49
|
+
* pending, their records' entries older than it: their records deleted.
|
|
50
|
+
*/
|
|
51
|
+
suggestions: number;
|
|
43
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* The ended histories a document holds (`hist.release.end`): per writer,
|
|
55
|
+
* the clock its latest live release record ended at (what it wrote below
|
|
56
|
+
* it is released).
|
|
57
|
+
*/
|
|
58
|
+
export declare const releasesOf: (doc: EngineDoc) => Map<number, number>;
|
|
44
59
|
/** The horizon a document holds (`null`: never purged). */
|
|
45
60
|
export declare const readHorizon: (doc: EngineDoc) => Horizon | null;
|
|
46
61
|
export declare const bindPurge: (Y: EngineApi) => {
|
|
47
|
-
purge: (doc: EngineDoc, facade: {
|
|
62
|
+
purge: (doc: EngineDoc, facade: Partial<SuggestFacade> & {
|
|
48
63
|
model: PlacementModel;
|
|
49
64
|
text: TextEngine;
|
|
50
|
-
}, horizon: Horizon) => PurgeReport;
|
|
65
|
+
}, horizon: Horizon | null) => PurgeReport;
|
|
51
66
|
};
|
|
52
67
|
export type PurgeBinding = ReturnType<typeof bindPurge>;
|