Skip to content

Commit a0dc6a2

Browse files
committed
feat: 🎸 bring back ESM builds
1 parent 67a25ca commit a0dc6a2

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@
7373
},
7474
"files": [
7575
"LICENSE",
76-
"lib/"
76+
"bin/",
77+
"lib/",
78+
"esm/"
7779
],
7880
"scripts": {
7981
"format": "biome format ./src",
@@ -82,7 +84,8 @@
8284
"lint:fix": "biome lint --apply ./src",
8385
"clean": "npx [email protected] lib es6 es2019 es2020 esm typedocs coverage gh-pages yarn-error.log src/**/__bench__/node_modules src/**/__bench__/yarn-error.log",
8486
"build:es2020": "tsc --project tsconfig.build.json --module commonjs --target es2020 --outDir lib",
85-
"build:all": "npx [email protected] \"yarn build:es2020\"",
87+
"build:esm": "tsc --project tsconfig.build.json --module ESNext --target ESNEXT --outDir esm",
88+
"build:all": "npx [email protected] \"yarn build:es2020\" \"yarn build:esm\"",
8689
"build": "yarn build:es2020",
8790
"jest": "jest",
8891
"test": "jest --maxWorkers 7",

src/json-crdt-peritext-ui/dom/CursorController.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@ export interface CursorControllerOpts {
2727
export class CursorController implements UiLifeCycles, Printable {
2828
public readonly caretId: string;
2929

30+
private readonly _cursor: [fn: PeritextEventTarget['cursor'], stop: () => void];
31+
3032
public constructor(public readonly opts: CursorControllerOpts) {
3133
this.caretId = 'jsonjoy.com-peritext-caret-' + opts.et.id;
34+
this._cursor = throttle(opts.et.cursor.bind(opts.et), 25)
3235
}
3336

3437
/** The position where user started to scrub the text. */
3538
protected selAnchor: number = -1;
3639

37-
private readonly _cursor = throttle(this.opts.et.cursor.bind(this.opts.et), 25);
3840

3941
/**
4042
* String position at coordinate, or -1, if unknown.

0 commit comments

Comments
 (0)