feat(writekit): rename @robonen/editor to @robonen/writekit

Rename the rich-text editor package and all Editor* exports to Writekit*;
remove the old vue/editor tree.
This commit is contained in:
2026-06-15 16:54:06 +07:00
parent 55e78786d6
commit 263c32002f
149 changed files with 1563 additions and 1748 deletions
+13
View File
@@ -0,0 +1,13 @@
/**
* Stable, collision-resistant identifier for blocks. Block ids survive
* split/merge/move and are how positions, selections, and the CRDT address a
* block — so they must be unique and never reused.
*/
export function createId(): string {
if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function')
return crypto.randomUUID();
// Fallback for exotic runtimes without WebCrypto (Node >= 19 and all target
// browsers provide `crypto.randomUUID`, so this is effectively dead code).
return `b-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`;
}