@podlite/editor-react 0.0.85 → 0.0.87

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/lib/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export { Editor2 as Editor2 };
5
5
  export { WindowWrapper as WindowWrapper };
6
6
  export { HighlightedCode as HighlightedCode };
7
7
  export type { EditorSessionState } from './types';
8
+ export type { PlaceOutcome } from './sessionPlace';
8
9
  export type { ConverterResult, IPodliteEditor, PodliteEditorRef, IncludeReader, ExpandPaths, IncludeSource, } from './Editor';
9
10
  export type { SaveAssetCallback, SaveAssetSource } from './imagePaste';
10
11
  export default Editor2;
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;AAAA,8DAA8B;AAGV,kBAHb,gBAAO,CAGa;AAF3B,gEAAqC;AAGX,wBAHnB,iBAAa,CAGmB;AAFvC,kDAAoD;AAGxB,gGAHnB,2BAAe,OAGmB;AAW3C,kBAAe,gBAAO,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;AAAA,8DAA8B;AAGV,kBAHb,gBAAO,CAGa;AAF3B,gEAAqC;AAGX,wBAHnB,iBAAa,CAGmB;AAFvC,kDAAoD;AAGxB,gGAHnB,2BAAe,OAGmB;AAY3C,kBAAe,gBAAO,CAAA"}
@@ -0,0 +1,36 @@
1
+ import { EditorView } from '@codemirror/view';
2
+ import type { EditorSessionState } from './types';
3
+ export type PlaceOutcome = 'reached' | 'cancelled' | 'replaced';
4
+ export declare const RESTORE_MARGIN = 7.5;
5
+ export declare const CANCEL_EVENTS: readonly ["keydown", "beforeinput", "compositionstart", "paste", "drop", "cut", "mousedown", "touchstart"];
6
+ export declare const KEEP_EVENTS: readonly ["focus", "blur", "scroll", "copy", "contextmenu", "dragstart", "dragend", "compositionupdate", "compositionend", "input", "wheel", "mousewheel", "touchmove", "touchend", "keyup", "mouseleave", "click", "dragover", "dragleave"];
7
+ export declare const SCROLLER_CANCEL_EVENTS: readonly ["wheel", "touchstart", "pointerdown"];
8
+ export declare const scrollerOf: (view: EditorView, wrapper: HTMLElement | null | undefined) => HTMLElement;
9
+ export type PlaceHooks = {
10
+ report: () => void;
11
+ restored: (outcome: PlaceOutcome) => void;
12
+ };
13
+ export declare class PlaceRestore {
14
+ private readonly view;
15
+ private readonly wrapper;
16
+ private readonly hooks;
17
+ private intention;
18
+ private targetSent;
19
+ private removers;
20
+ constructor(view: EditorView, wrapper: () => HTMLElement | null | undefined, hooks: PlaceHooks);
21
+ begin(place: EditorSessionState): void;
22
+ drop(): void;
23
+ apply(): void;
24
+ scrollTopToReport(): number | undefined;
25
+ isOwnTarget(options: {
26
+ y?: string;
27
+ yMargin?: number;
28
+ }): boolean;
29
+ scrollOwnTarget(pos: number): true;
30
+ retryLater(): void;
31
+ retry(): void;
32
+ cancel(): void;
33
+ dispose(): void;
34
+ private finish;
35
+ private lineTop;
36
+ }
@@ -0,0 +1,200 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlaceRestore = exports.scrollerOf = exports.SCROLLER_CANCEL_EVENTS = exports.KEEP_EVENTS = exports.CANCEL_EVENTS = exports.RESTORE_MARGIN = void 0;
4
+ const view_1 = require("@codemirror/view");
5
+ // The margin marks the scroll target the restore sends: a target sent by typing
6
+ // or by the default of CodeMirror is 'nearest' with a margin of its own. Our hook
7
+ // moves the view itself for this target, so the value is never used as a margin.
8
+ exports.RESTORE_MARGIN = 7.5;
9
+ // What CodeMirror 6.43 and the extensions of this editor listen to on the content,
10
+ // in two columns. Taking the input of a person ends the restore; the other events
11
+ // come from the program, or do not move the place, or follow an event of the first
12
+ // column. A new listener after an update of CodeMirror or of an extension is sorted
13
+ // here by hand; a test compares the list with what the editor listens to.
14
+ exports.CANCEL_EVENTS = [
15
+ 'keydown',
16
+ 'beforeinput',
17
+ 'compositionstart',
18
+ 'paste',
19
+ 'drop',
20
+ 'cut',
21
+ 'mousedown',
22
+ 'touchstart',
23
+ ];
24
+ exports.KEEP_EVENTS = [
25
+ 'focus',
26
+ 'blur',
27
+ 'scroll',
28
+ 'copy',
29
+ 'contextmenu',
30
+ 'dragstart',
31
+ 'dragend',
32
+ 'compositionupdate',
33
+ 'compositionend',
34
+ 'input',
35
+ 'wheel',
36
+ 'mousewheel',
37
+ 'touchmove',
38
+ 'touchend',
39
+ 'keyup',
40
+ 'mouseleave',
41
+ 'click',
42
+ 'dragover',
43
+ 'dragleave',
44
+ ];
45
+ // a person scrolls with the wheel, a finger or the scroll bar, with or without focus
46
+ exports.SCROLLER_CANCEL_EVENTS = ['wheel', 'touchstart', 'pointerdown'];
47
+ const scrolls = (el) => Boolean(el) &&
48
+ el.scrollHeight > el.clientHeight &&
49
+ /^(auto|scroll)$/.test(el.ownerDocument.defaultView?.getComputedStyle(el).overflowY || '');
50
+ // The element that scrolls in the layout of the editor now: CodeMirror's own when
51
+ // it is given a height, the wrapper when CodeMirror grows with its content. Asked
52
+ // at every read and write, since the full screen mode changes the answer.
53
+ const scrollerOf = (view, wrapper) => [view.scrollDOM, wrapper].find(scrolls) || view.scrollDOM;
54
+ exports.scrollerOf = scrollerOf;
55
+ class PlaceRestore {
56
+ view;
57
+ wrapper;
58
+ hooks;
59
+ intention = null;
60
+ targetSent = false;
61
+ removers = [];
62
+ constructor(view, wrapper, hooks) {
63
+ this.view = view;
64
+ this.wrapper = wrapper;
65
+ this.hooks = hooks;
66
+ const cancel = () => this.cancel();
67
+ const listen = (target, type) => {
68
+ // only watching: the event still reaches CodeMirror and the default action
69
+ target.addEventListener(type, cancel, { capture: true, passive: true });
70
+ this.removers.push(() => target.removeEventListener(type, cancel, { capture: true }));
71
+ };
72
+ exports.CANCEL_EVENTS.forEach(type => listen(view.contentDOM, type));
73
+ const scrollers = [view.scrollDOM, wrapper()].filter(Boolean);
74
+ scrollers.forEach(el => exports.SCROLLER_CANCEL_EVENTS.forEach(type => listen(el, type)));
75
+ const doc = view.dom.ownerDocument;
76
+ const visible = () => this.retry();
77
+ doc.addEventListener('visibilitychange', visible);
78
+ this.removers.push(() => doc.removeEventListener('visibilitychange', visible));
79
+ const Observer = doc.defaultView?.ResizeObserver;
80
+ const box = wrapper();
81
+ if (Observer && box) {
82
+ const observer = new Observer(() => this.retry());
83
+ observer.observe(box);
84
+ this.removers.push(() => observer.disconnect());
85
+ }
86
+ }
87
+ // A new opening: what was pending for the last one is replaced. Called before
88
+ // the cursor and the folds are put back, so their messages carry the intention.
89
+ begin(place) {
90
+ if (this.intention)
91
+ this.finish('replaced');
92
+ this.targetSent = false;
93
+ this.intention =
94
+ place.scrollTop != null
95
+ ? { kind: 'scroll', top: place.scrollTop }
96
+ : place.cursorOffset != null
97
+ ? { kind: 'cursor' }
98
+ : null;
99
+ }
100
+ // A document opened with no place: what was pending for the last one must not
101
+ // move the new one.
102
+ drop() {
103
+ if (this.intention)
104
+ this.finish('replaced');
105
+ }
106
+ // After the cursor and the folds: an opening with nothing to scroll to is done.
107
+ apply() {
108
+ if (!this.intention)
109
+ return this.hooks.restored('reached');
110
+ this.retry();
111
+ }
112
+ // The scroll a message carries: the intended one while it is pending, none while
113
+ // the cursor line is pending (a saved 0 would win over the cursor next time).
114
+ scrollTopToReport() {
115
+ if (this.intention?.kind === 'scroll')
116
+ return this.intention.top;
117
+ if (this.intention?.kind === 'cursor')
118
+ return undefined;
119
+ return (0, exports.scrollerOf)(this.view, this.wrapper()).scrollTop;
120
+ }
121
+ isOwnTarget(options) {
122
+ return options.y === 'center' && options.yMargin === exports.RESTORE_MARGIN;
123
+ }
124
+ // The scroll hook for our own target: the line of the cursor goes to the middle
125
+ // of the element that scrolls, and nothing above the editor moves.
126
+ scrollOwnTarget(pos) {
127
+ if (!this.targetSent || this.intention?.kind !== 'cursor')
128
+ return true;
129
+ this.targetSent = false;
130
+ const el = (0, exports.scrollerOf)(this.view, this.wrapper());
131
+ const line = this.view.lineBlockAt(pos);
132
+ const top = this.lineTop(el, line.top);
133
+ el.scrollTop = Math.max(0, top - (el.clientHeight - line.height) / 2);
134
+ const at = this.lineTop(el, line.top);
135
+ if (at >= el.scrollTop - 1 && at + line.height <= el.scrollTop + el.clientHeight + 1)
136
+ this.finish('reached');
137
+ return true;
138
+ }
139
+ // From inside an update of the view, where a new transaction is not allowed.
140
+ retryLater() {
141
+ if (!this.intention)
142
+ return;
143
+ queueMicrotask(() => {
144
+ if (this.removers.length)
145
+ this.retry();
146
+ });
147
+ }
148
+ // Apply the intention again: on a change of the layout, a picture that came, the
149
+ // window shown again.
150
+ retry() {
151
+ const intention = this.intention;
152
+ if (!intention)
153
+ return;
154
+ if (intention.kind === 'cursor') {
155
+ this.targetSent = true;
156
+ const head = this.view.state.selection.main.head;
157
+ this.view.dispatch({ effects: view_1.EditorView.scrollIntoView(head, { y: 'center', yMargin: exports.RESTORE_MARGIN }) });
158
+ return;
159
+ }
160
+ this.view.requestMeasure({
161
+ key: this,
162
+ read: () => null,
163
+ write: () => {
164
+ if (this.intention !== intention)
165
+ return;
166
+ const el = (0, exports.scrollerOf)(this.view, this.wrapper());
167
+ el.scrollTop = intention.top;
168
+ const reachable = el.scrollHeight - el.clientHeight;
169
+ // a document shorter than the place keeps the intention until it grows
170
+ if (Math.abs(el.scrollTop - intention.top) <= 1 && intention.top <= reachable + 1)
171
+ this.finish('reached');
172
+ },
173
+ });
174
+ }
175
+ // The person acted before the place was reached: their place stays, and the host
176
+ // hears where the editor is now.
177
+ cancel() {
178
+ if (!this.intention)
179
+ return;
180
+ this.finish('cancelled');
181
+ this.hooks.report();
182
+ }
183
+ dispose() {
184
+ this.intention = null;
185
+ this.targetSent = false;
186
+ this.removers.forEach(remove => remove());
187
+ this.removers = [];
188
+ }
189
+ finish(outcome) {
190
+ this.intention = null;
191
+ this.targetSent = false;
192
+ this.hooks.restored(outcome);
193
+ }
194
+ lineTop(el, lineTop) {
195
+ const box = el.getBoundingClientRect();
196
+ return el.scrollTop + this.view.documentTop - box.top - el.clientTop + lineTop;
197
+ }
198
+ }
199
+ exports.PlaceRestore = PlaceRestore;
200
+ //# sourceMappingURL=sessionPlace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sessionPlace.js","sourceRoot":"","sources":["../src/sessionPlace.ts"],"names":[],"mappings":";;;AAAA,2CAA6C;AAY7C,gFAAgF;AAChF,kFAAkF;AAClF,iFAAiF;AACpE,QAAA,cAAc,GAAG,GAAG,CAAA;AAEjC,mFAAmF;AACnF,kFAAkF;AAClF,mFAAmF;AACnF,oFAAoF;AACpF,0EAA0E;AAC7D,QAAA,aAAa,GAAG;IAC3B,SAAS;IACT,aAAa;IACb,kBAAkB;IAClB,OAAO;IACP,MAAM;IACN,KAAK;IACL,WAAW;IACX,YAAY;CACJ,CAAA;AACG,QAAA,WAAW,GAAG;IACzB,OAAO;IACP,MAAM;IACN,QAAQ;IACR,MAAM;IACN,aAAa;IACb,WAAW;IACX,SAAS;IACT,mBAAmB;IACnB,gBAAgB;IAChB,OAAO;IACP,OAAO;IACP,YAAY;IACZ,WAAW;IACX,UAAU;IACV,OAAO;IACP,YAAY;IACZ,OAAO;IACP,UAAU;IACV,WAAW;CACH,CAAA;AACV,qFAAqF;AACxE,QAAA,sBAAsB,GAAG,CAAC,OAAO,EAAE,YAAY,EAAE,aAAa,CAAU,CAAA;AAErF,MAAM,OAAO,GAAG,CAAC,EAAkC,EAAqB,EAAE,CACxE,OAAO,CAAC,EAAE,CAAC;IACX,EAAG,CAAC,YAAY,GAAG,EAAG,CAAC,YAAY;IACnC,iBAAiB,CAAC,IAAI,CAAC,EAAG,CAAC,aAAa,CAAC,WAAW,EAAE,gBAAgB,CAAC,EAAG,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,CAAA;AAE9F,kFAAkF;AAClF,kFAAkF;AAClF,0EAA0E;AACnE,MAAM,UAAU,GAAG,CAAC,IAAgB,EAAE,OAAuC,EAAe,EAAE,CACnG,CAA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AAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC9B,CAAC;IAEO,OAAO,CAAC,EAAe,EAAE,OAAe;QAC9C,MAAM,GAAG,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAA;QACtC,OAAO,EAAE,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,GAAG,OAAO,CAAA;IAChF,CAAC;CACF;AA7ID,oCA6IC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@podlite/editor-react",
3
- "version": "0.0.85",
3
+ "version": "0.0.87",
4
4
  "description": "Rich text editor React component for Podlite — syntax highlighting, live preview, CodeMirror 6",
5
5
  "main": "./lib/index.js",
6
6
  "exports": {
@@ -88,14 +88,14 @@
88
88
  "@lezer/common": "^1.5.0",
89
89
  "@lezer/highlight": "^1.2.1",
90
90
  "@lezer/markdown": "^1.0.0",
91
- "@podlite/highlight": "0.0.13",
92
- "@podlite/schema": "0.0.79",
93
- "@podlite/to-jsx": "0.0.83",
91
+ "@podlite/highlight": "0.0.15",
92
+ "@podlite/schema": "0.0.81",
93
+ "@podlite/to-jsx": "0.0.85",
94
94
  "@uiw/codemirror-extensions-basic-setup": "^4.23.8",
95
95
  "@uiw/codemirror-extensions-events": "^4.23.8",
96
96
  "@uiw/codemirror-themes": "^4.23.8",
97
97
  "dom-to-image-more": "^3.7.2",
98
- "podlite": "0.0.92",
98
+ "podlite": "0.0.94",
99
99
  "react-is": "^18.0.0",
100
100
  "shiki": "^3.21.0",
101
101
  "tslib": "^2.8.1"