@difizen/libro-search-code-cell 0.1.9 → 0.1.11
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.
|
@@ -4,8 +4,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
|
|
|
4
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
5
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
-
function _toPropertyKey(
|
|
8
|
-
function _toPrimitive(
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
9
|
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
10
10
|
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
|
|
11
11
|
import { LibroCodeCellView } from '@difizen/libro-code-cell';
|
|
@@ -7,8 +7,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
|
|
|
7
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
8
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
9
9
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
10
|
-
function _toPropertyKey(
|
|
11
|
-
function _toPrimitive(
|
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
11
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
12
12
|
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
13
13
|
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
14
14
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
@@ -123,7 +123,7 @@ export var CodeCellSearchProvider = (_dec = transient(), _dec2 = prop(), _dec3 =
|
|
|
123
123
|
*/
|
|
124
124
|
}, {
|
|
125
125
|
key: "clearHighlight",
|
|
126
|
-
value: function () {
|
|
126
|
+
value: (function () {
|
|
127
127
|
var _clearHighlight = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
128
128
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
129
129
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -149,6 +149,7 @@ export var CodeCellSearchProvider = (_dec = transient(), _dec2 = prop(), _dec3 =
|
|
|
149
149
|
/**
|
|
150
150
|
* Dispose the search provider
|
|
151
151
|
*/
|
|
152
|
+
)
|
|
152
153
|
}, {
|
|
153
154
|
key: "dispose",
|
|
154
155
|
value: function dispose() {
|
|
@@ -169,7 +170,7 @@ export var CodeCellSearchProvider = (_dec = transient(), _dec2 = prop(), _dec3 =
|
|
|
169
170
|
*/
|
|
170
171
|
}, {
|
|
171
172
|
key: "highlightNext",
|
|
172
|
-
value: function () {
|
|
173
|
+
value: (function () {
|
|
173
174
|
var _highlightNext = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
174
175
|
var match, provider, _match;
|
|
175
176
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
@@ -245,9 +246,10 @@ export var CodeCellSearchProvider = (_dec = transient(), _dec2 = prop(), _dec3 =
|
|
|
245
246
|
*
|
|
246
247
|
* @returns The previous match if there is one.
|
|
247
248
|
*/
|
|
249
|
+
)
|
|
248
250
|
}, {
|
|
249
251
|
key: "highlightPrevious",
|
|
250
|
-
value: function () {
|
|
252
|
+
value: (function () {
|
|
251
253
|
var _highlightPrevious = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
252
254
|
var provider, _match2, match;
|
|
253
255
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
@@ -322,9 +324,10 @@ export var CodeCellSearchProvider = (_dec = transient(), _dec2 = prop(), _dec3 =
|
|
|
322
324
|
* @param query A RegExp to be use to perform the search
|
|
323
325
|
* @param filters Filter parameters to pass to provider
|
|
324
326
|
*/
|
|
327
|
+
)
|
|
325
328
|
}, {
|
|
326
329
|
key: "startQuery",
|
|
327
|
-
value: function () {
|
|
330
|
+
value: (function () {
|
|
328
331
|
var _startQuery = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(query, filters) {
|
|
329
332
|
var _this2 = this;
|
|
330
333
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
@@ -351,7 +354,7 @@ export var CodeCellSearchProvider = (_dec = transient(), _dec2 = prop(), _dec3 =
|
|
|
351
354
|
return _startQuery.apply(this, arguments);
|
|
352
355
|
}
|
|
353
356
|
return startQuery;
|
|
354
|
-
}()
|
|
357
|
+
}())
|
|
355
358
|
}, {
|
|
356
359
|
key: "endQuery",
|
|
357
360
|
value: function () {
|
|
@@ -7,8 +7,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
|
|
|
7
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
8
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
9
9
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
10
|
-
function _toPropertyKey(
|
|
11
|
-
function _toPrimitive(
|
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
11
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
12
12
|
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
13
13
|
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
|
|
14
14
|
import { searchText } from '@difizen/libro-search';
|
|
@@ -86,7 +86,6 @@ export var CodeEditorCellSearchProvider = (_dec = transient(), _dec2 = prop(), _
|
|
|
86
86
|
_this.currentIndex = undefined;
|
|
87
87
|
// this.cell.model.setSource(`${finalSrc}${src.slice(lastEnd)}`);
|
|
88
88
|
}
|
|
89
|
-
|
|
90
89
|
return Promise.resolve(occurred);
|
|
91
90
|
};
|
|
92
91
|
this.updateMatches = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
@@ -289,7 +288,7 @@ export var CodeEditorCellSearchProvider = (_dec = transient(), _dec2 = prop(), _
|
|
|
289
288
|
*/
|
|
290
289
|
}, {
|
|
291
290
|
key: "setIsActive",
|
|
292
|
-
value: function () {
|
|
291
|
+
value: (function () {
|
|
293
292
|
var _setIsActive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(v) {
|
|
294
293
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
295
294
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -331,9 +330,10 @@ export var CodeEditorCellSearchProvider = (_dec = transient(), _dec2 = prop(), _
|
|
|
331
330
|
* @param query A RegExp to be use to perform the search
|
|
332
331
|
* @param filters Filter parameters to pass to provider
|
|
333
332
|
*/
|
|
333
|
+
)
|
|
334
334
|
}, {
|
|
335
335
|
key: "startQuery",
|
|
336
|
-
value: function () {
|
|
336
|
+
value: (function () {
|
|
337
337
|
var _startQuery = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(query, filters) {
|
|
338
338
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
339
339
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -365,9 +365,10 @@ export var CodeEditorCellSearchProvider = (_dec = transient(), _dec2 = prop(), _
|
|
|
365
365
|
/**
|
|
366
366
|
* Stop the search and clean any UI elements.
|
|
367
367
|
*/
|
|
368
|
+
)
|
|
368
369
|
}, {
|
|
369
370
|
key: "endQuery",
|
|
370
|
-
value: function () {
|
|
371
|
+
value: (function () {
|
|
371
372
|
var _endQuery = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
372
373
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
373
374
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -392,9 +393,10 @@ export var CodeEditorCellSearchProvider = (_dec = transient(), _dec2 = prop(), _
|
|
|
392
393
|
*
|
|
393
394
|
* @returns The next match if there is one.
|
|
394
395
|
*/
|
|
396
|
+
)
|
|
395
397
|
}, {
|
|
396
398
|
key: "highlightNext",
|
|
397
|
-
value: function () {
|
|
399
|
+
value: (function () {
|
|
398
400
|
var _highlightNext = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
399
401
|
var _this$cell$editor2, match;
|
|
400
402
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
@@ -442,9 +444,10 @@ export var CodeEditorCellSearchProvider = (_dec = transient(), _dec2 = prop(), _
|
|
|
442
444
|
*
|
|
443
445
|
* @returns The previous match if there is one.
|
|
444
446
|
*/
|
|
447
|
+
)
|
|
445
448
|
}, {
|
|
446
449
|
key: "highlightPrevious",
|
|
447
|
-
value: function () {
|
|
450
|
+
value: (function () {
|
|
448
451
|
var _highlightPrevious = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
449
452
|
var match;
|
|
450
453
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
@@ -489,6 +492,7 @@ export var CodeEditorCellSearchProvider = (_dec = transient(), _dec2 = prop(), _
|
|
|
489
492
|
* @param newText The replacement text.
|
|
490
493
|
* @returns Whether a replace occurred.
|
|
491
494
|
*/
|
|
495
|
+
)
|
|
492
496
|
}, {
|
|
493
497
|
key: "replaceCurrentMatch",
|
|
494
498
|
value: function replaceCurrentMatch(newText) {
|
package/es/search-highlighter.js
CHANGED
|
@@ -4,8 +4,8 @@ function _initializerDefineProperty(target, property, descriptor, context) { if
|
|
|
4
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
5
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
-
function _toPropertyKey(
|
|
8
|
-
function _toPrimitive(
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
9
|
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
10
10
|
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
|
|
11
11
|
/* eslint-disable no-param-reassign */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@difizen/libro-search-code-cell",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"libro",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"src"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@difizen/libro-common": "^0.1.
|
|
36
|
-
"@difizen/libro-code-editor": "^0.1.
|
|
37
|
-
"@difizen/libro-code-cell": "^0.1.
|
|
38
|
-
"@difizen/libro-search": "^0.1.
|
|
39
|
-
"@difizen/libro-core": "^0.1.
|
|
35
|
+
"@difizen/libro-common": "^0.1.11",
|
|
36
|
+
"@difizen/libro-code-editor": "^0.1.11",
|
|
37
|
+
"@difizen/libro-code-cell": "^0.1.11",
|
|
38
|
+
"@difizen/libro-search": "^0.1.11",
|
|
39
|
+
"@difizen/libro-core": "^0.1.11",
|
|
40
40
|
"@difizen/mana-app": "latest",
|
|
41
41
|
"@codemirror/state": "^6.0.0",
|
|
42
42
|
"@codemirror/view": "^6.2.2"
|