@prose-reader/core 1.123.0 → 1.124.0
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.
|
@@ -195,5 +195,10 @@ export declare const createReaderWithEnhancers: (options: Partial<import('./sett
|
|
|
195
195
|
anchorCfi: string | undefined;
|
|
196
196
|
focusCfi: string | undefined;
|
|
197
197
|
};
|
|
198
|
+
getSelection: () => ({
|
|
199
|
+
document: Document;
|
|
200
|
+
selection: Selection;
|
|
201
|
+
itemId: string;
|
|
202
|
+
} | undefined) | undefined;
|
|
198
203
|
};
|
|
199
204
|
};
|
package/dist/index.js
CHANGED
|
@@ -8221,7 +8221,9 @@ const selectionEnhancer = (next) => (options) => {
|
|
|
8221
8221
|
switchMap((container) => fromEvent(container, "pointerdown")),
|
|
8222
8222
|
withLatestFrom(selection$),
|
|
8223
8223
|
map$1(([, selection]) => selection),
|
|
8224
|
-
startWith$1(void 0)
|
|
8224
|
+
startWith$1(void 0),
|
|
8225
|
+
shareReplay$1(1),
|
|
8226
|
+
takeUntil(reader.$.destroy$)
|
|
8225
8227
|
);
|
|
8226
8228
|
return {
|
|
8227
8229
|
...reader,
|
|
@@ -8231,7 +8233,8 @@ const selectionEnhancer = (next) => (options) => {
|
|
|
8231
8233
|
selectionEnd$,
|
|
8232
8234
|
selectionAfterPointerUp$,
|
|
8233
8235
|
lastSelectionOnPointerdown$,
|
|
8234
|
-
generateCfis
|
|
8236
|
+
generateCfis,
|
|
8237
|
+
getSelection: () => selectionSubject.getValue()
|
|
8235
8238
|
},
|
|
8236
8239
|
destroy: () => {
|
|
8237
8240
|
selectionSubject.complete();
|