= React.memo(
}
let children: React.ReactNode = (
- el?.(element)} style={{position: 'relative'}}>{elements.length ? elements : Char.ZeroLengthSpace}
+ el?.(element)} style={{position: 'relative'}}>
+ {elements.length ? elements : Char.ZeroLengthSpace}
+
);
for (const map of plugins) children = map.block?.(props, children) ?? children;
return children;
diff --git a/src/json-crdt-peritext-ui/react/PeritextView.tsx b/src/json-crdt-peritext-ui/react/PeritextView.tsx
index bfdf49d3b0..00cb36b7d8 100644
--- a/src/json-crdt-peritext-ui/react/PeritextView.tsx
+++ b/src/json-crdt-peritext-ui/react/PeritextView.tsx
@@ -46,7 +46,7 @@ export const PeritextView: React.FC = React.memo((props) => {
const {peritext, plugins = [new CursorPlugin(), defaultPlugin], onRender} = props;
const [, setTick] = React.useState(0);
const [dom, setDom] = React.useState(undefined);
-
+
// biome-ignore lint: lint/correctness/useExhaustiveDependencies
const rerender = React.useCallback(() => {
peritext.refresh();
diff --git a/src/json-crdt-peritext-ui/react/state.ts b/src/json-crdt-peritext-ui/react/state.ts
index fc5568ef36..c743368e80 100644
--- a/src/json-crdt-peritext-ui/react/state.ts
+++ b/src/json-crdt-peritext-ui/react/state.ts
@@ -6,7 +6,7 @@ import type {PeritextEventDefaults} from '../events/PeritextEventDefaults';
export class PeritextSurfaceState {
public dom?: DomController = void 0;
- constructor (
+ constructor(
public readonly peritext: Peritext,
public readonly events: PeritextEventDefaults,
public readonly rerender: () => void,
diff --git a/src/json-crdt-peritext-ui/react/types.ts b/src/json-crdt-peritext-ui/react/types.ts
index 6504b21e8e..d6ba4ed362 100644
--- a/src/json-crdt-peritext-ui/react/types.ts
+++ b/src/json-crdt-peritext-ui/react/types.ts
@@ -11,11 +11,7 @@ import type {Inline} from '../../json-crdt-extensions/peritext/block/Inline';
export interface PeritextPlugin {
// --------------------------------------------------- Block-level formatting
- peritext?: (
- props: PeritextViewProps,
- children: React.ReactNode,
- surface: PeritextSurfaceState,
- ) => React.ReactNode;
+ peritext?: (props: PeritextViewProps, children: React.ReactNode, surface: PeritextSurfaceState) => React.ReactNode;
block?: (props: BlockViewProps, children: React.ReactNode) => React.ReactNode;
// -------------------------------------------------------- Inline formatting
diff --git a/src/json-crdt/__demos__/issue-801.ts b/src/json-crdt/__demos__/issue-801.ts
index 62ff82c2cd..dbe0da902a 100644
--- a/src/json-crdt/__demos__/issue-801.ts
+++ b/src/json-crdt/__demos__/issue-801.ts
@@ -4,7 +4,7 @@
* Run this demo with:
*
* npx nodemon -q -x ts-node src/json-crdt/__demos__/issue-801.ts
- *
+ *
* @see issue: https://github.com/streamich/json-joy/issues/801
*/
@@ -27,10 +27,9 @@
// function foo(_node: ObjApi) {}
// foo(model.api.node)
-
-import {JsonNodeView, Model} from '..';
+import {type JsonNodeView, Model} from '..';
import {s} from '../../json-crdt-patch';
-import {SchemaToJsonNode} from '../schema/types';
+import type {SchemaToJsonNode} from '../schema/types';
const SimpleObjectSchema = s.obj({
text: s.con('foo'),
diff --git a/src/util/events/TypedEventTarget.ts b/src/util/events/TypedEventTarget.ts
index 17c3565e0a..4950e8d704 100644
--- a/src/util/events/TypedEventTarget.ts
+++ b/src/util/events/TypedEventTarget.ts
@@ -59,7 +59,7 @@ export interface TypedEventTarget {
}
export class SubscriptionEventTarget extends TypedEventTarget {
- public subscribe(type: K, listener: (ev: EventMap[K]) => void): (() => void) {
+ public subscribe(type: K, listener: (ev: EventMap[K]) => void): () => void {
this.addEventListener(type, listener);
return () => this.removeEventListener(type, listener);
}