edytor 0.1.0-next.21 → 0.1.0-next.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/collaboration/awarenessSelection.d.ts +7 -1
- package/dist/collaboration/awarenessSelection.js +7 -1
- package/dist/collaboration/index.d.ts +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/components/Edytor.svelte +5 -2
- package/dist/components/Edytor.svelte.d.ts +1 -1
- package/dist/crdt/data.d.ts +3 -1
- package/dist/crdt/data.js +42 -32
- package/dist/crdt/document.d.ts +17 -8
- package/dist/crdt/document.js +35 -13
- package/dist/crdt/edytor-doc.d.ts +15 -3
- package/dist/crdt/edytor-doc.js +107 -14
- package/dist/crdt/flow.d.ts +2 -0
- package/dist/crdt/flow.js +2 -2
- package/dist/crdt/index.d.ts +6 -4
- package/dist/crdt/index.js +1 -1
- package/dist/crdt/placement/model.d.ts +9 -1
- package/dist/crdt/placement/model.js +29 -10
- package/dist/crdt/placement/rank.d.ts +20 -0
- package/dist/crdt/placement/rank.js +79 -0
- package/dist/crdt/structs.d.ts +17 -0
- package/dist/crdt/structs.js +41 -0
- package/dist/crdt/text/model.d.ts +9 -1
- package/dist/crdt/text/model.js +24 -14
- package/dist/crdt/text/rows.d.ts +94 -0
- package/dist/crdt/text/rows.js +193 -0
- package/dist/crdt/text/runs.d.ts +30 -10
- package/dist/crdt/text/runs.js +1235 -264
- package/dist/edytor.svelte.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins.d.ts +11 -0
- package/package.json +1 -1
package/dist/edytor.svelte.js
CHANGED
|
@@ -323,9 +323,9 @@ export class Edytor {
|
|
|
323
323
|
// ANYTHING is applied, so a failed view cannot half-seed semantics.
|
|
324
324
|
const blocks = Array.from(this.blocks);
|
|
325
325
|
this.document.adoptSemantics({
|
|
326
|
-
roles: Object.fromEntries(blocks.map(([type, { void: v, island, lines, layout }]) => [
|
|
326
|
+
roles: Object.fromEntries(blocks.map(([type, { void: v, island, lines, layout, atomic }]) => [
|
|
327
327
|
type,
|
|
328
|
-
{ void: v, island, lines, layout }
|
|
328
|
+
{ void: v, island, lines, layout, atomic }
|
|
329
329
|
])),
|
|
330
330
|
rendersContent: Object.fromEntries(blocks.map(([type, definition]) => [type, definition.rendersContent !== false])),
|
|
331
331
|
defaultChild
|
package/dist/index.d.ts
CHANGED
|
@@ -41,4 +41,4 @@ export type { Suggestion, Suggestions, SuggestionAt, SuggestionContent, Suggesti
|
|
|
41
41
|
export { textToBlocks, type TextToBlocksOptions } from './clipboard/textBlocks.js';
|
|
42
42
|
export * from './plugins/index.js';
|
|
43
43
|
export * from './crdt/index.js';
|
|
44
|
-
export { createIndexeddbSync, createWebsocketSync, clearDocument, storeState, IndexeddbPersistence, WebsocketProvider, PresenceWriter, type PresenceOptions, type PresenceShare } from './collaboration/index.js';
|
|
44
|
+
export { createIndexeddbSync, createWebsocketSync, clearDocument, storeState, IndexeddbPersistence, WebsocketProvider, PresenceWriter, DEFAULT_PRESENCE_THROTTLE, type PresenceOptions, type PresenceShare } from './collaboration/index.js';
|
package/dist/index.js
CHANGED
|
@@ -39,4 +39,4 @@ export * from './crdt/index.js';
|
|
|
39
39
|
// needs no `edytor/crdt` import for the common IndexedDB/websocket cases.
|
|
40
40
|
// The `EdytorSync*`/`IndexeddbSyncOptions`/`WebsocketSyncOptions` types are
|
|
41
41
|
// already re-exported through `./crdt/index.js` above.
|
|
42
|
-
export { createIndexeddbSync, createWebsocketSync, clearDocument, storeState, IndexeddbPersistence, WebsocketProvider, PresenceWriter } from './collaboration/index.js';
|
|
42
|
+
export { createIndexeddbSync, createWebsocketSync, clearDocument, storeState, IndexeddbPersistence, WebsocketProvider, PresenceWriter, DEFAULT_PRESENCE_THROTTLE } from './collaboration/index.js';
|
package/dist/plugins.d.ts
CHANGED
|
@@ -246,6 +246,17 @@ export type BlockDefinition = {
|
|
|
246
246
|
* in the delete contract). Adopted by the document as a role.
|
|
247
247
|
*/
|
|
248
248
|
layout?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* Data paths written as one value (`data.atomic`): a top-level key, or an
|
|
251
|
+
* array of keys for a nested one. Setting `block.data.link`, or a key
|
|
252
|
+
* inside it, writes the whole `link` as one property, so two people
|
|
253
|
+
* setting it at once never merge into a value neither wrote (one wins
|
|
254
|
+
* whole); elsewhere each key merges on its own. Adopted by the document as
|
|
255
|
+
* part of the kind's role: every view of a document, a headless one and
|
|
256
|
+
* the room must declare the same paths (`semanticsOf({ embed: { atomic:
|
|
257
|
+
* ['link'] } })`).
|
|
258
|
+
*/
|
|
259
|
+
atomic?: readonly (string | readonly string[])[];
|
|
249
260
|
/**
|
|
250
261
|
* Whether the snippet renders the block's own content (`content()`).
|
|
251
262
|
* Defaults to `true`; containers that render only their children
|