@lvce-editor/extension-search-view 2.4.0 → 2.6.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.
|
@@ -1083,7 +1083,7 @@ const sortExtensions = extensions => {
|
|
|
1083
1083
|
return toSorted(extensions, compareExtension);
|
|
1084
1084
|
};
|
|
1085
1085
|
|
|
1086
|
-
const getExtensions = async (extensions, parsedValue, platform, assetDir
|
|
1086
|
+
const getExtensions = async (extensions, parsedValue, platform, assetDir) => {
|
|
1087
1087
|
const filteredExtensions = [];
|
|
1088
1088
|
for (const extension of extensions) {
|
|
1089
1089
|
if (matchesParsedValue(extension, parsedValue)) {
|
|
@@ -1191,32 +1191,32 @@ const set$1 = (uid, oldState, newState) => {
|
|
|
1191
1191
|
};
|
|
1192
1192
|
};
|
|
1193
1193
|
|
|
1194
|
-
const create = (id, uri, x, y, width, height, platform) => {
|
|
1194
|
+
const create = (id, uri, x, y, width, height, platform, assetDir) => {
|
|
1195
1195
|
const state = {
|
|
1196
|
-
searchValue: '',
|
|
1197
|
-
minLineY: 0,
|
|
1198
|
-
maxLineY: 0,
|
|
1199
|
-
itemHeight: 0,
|
|
1200
|
-
items: [],
|
|
1201
|
-
height,
|
|
1202
|
-
message: '',
|
|
1203
1196
|
allExtensions: [],
|
|
1204
|
-
|
|
1205
|
-
|
|
1197
|
+
assetDir,
|
|
1198
|
+
deltaY: 0,
|
|
1206
1199
|
finalDeltaY: 0,
|
|
1207
1200
|
focusedIndex: 0,
|
|
1201
|
+
handleOffset: 0,
|
|
1202
|
+
headerHeight: 41,
|
|
1203
|
+
height,
|
|
1204
|
+
itemHeight: 72,
|
|
1205
|
+
items: [],
|
|
1206
|
+
maxLineY: 0,
|
|
1207
|
+
message: '',
|
|
1208
1208
|
minimumSliderSize: 0,
|
|
1209
|
-
|
|
1210
|
-
headerHeight: 0,
|
|
1211
|
-
scrollBarHeight: 0,
|
|
1212
|
-
width,
|
|
1213
|
-
size: 0,
|
|
1209
|
+
minLineY: 0,
|
|
1214
1210
|
negativeMargin: 0,
|
|
1211
|
+
placeholder: '',
|
|
1212
|
+
platform,
|
|
1215
1213
|
scrollBarActive: false,
|
|
1214
|
+
scrollBarHeight: 0,
|
|
1215
|
+
searchValue: '',
|
|
1216
|
+
size: 0,
|
|
1217
|
+
width,
|
|
1216
1218
|
x,
|
|
1217
|
-
y
|
|
1218
|
-
handleOffset: 0,
|
|
1219
|
-
assetDir: ''
|
|
1219
|
+
y
|
|
1220
1220
|
};
|
|
1221
1221
|
set$1(id, state, state);
|
|
1222
1222
|
};
|
|
@@ -1410,6 +1410,12 @@ const getActions = () => {
|
|
|
1410
1410
|
}];
|
|
1411
1411
|
};
|
|
1412
1412
|
|
|
1413
|
+
const commandIds = ['clearSearchResults', 'closeSuggest', 'closeSuggest', 'focusFirst', 'focusLast', 'focusNext', 'focusNextPage', 'focusPrevious', 'focusPreviousPage', 'handleBlur', 'handleBlur', 'handleBlur', 'handleContextMenu', 'handleDisable', 'handleFocus', 'handleFocus', 'handleInput', 'handleInstall', 'handleScrollBarCaptureLost', 'handleScrollBarClick', 'handleScrollBarMove', 'handleUninstall', 'handleWheel', 'openSuggest', 'openSuggest', 'render', 'saveState', 'scrollDown', 'selectIndex', 'setDeltaY', 'toggleSuggest', 'toggleSuggest'];
|
|
1414
|
+
|
|
1415
|
+
const getCommandIds = () => {
|
|
1416
|
+
return commandIds;
|
|
1417
|
+
};
|
|
1418
|
+
|
|
1413
1419
|
const Enter = 3;
|
|
1414
1420
|
const Space = 9;
|
|
1415
1421
|
const PageUp = 10;
|
|
@@ -2196,6 +2202,14 @@ const doRender = (oldState, newState) => {
|
|
|
2196
2202
|
return commands;
|
|
2197
2203
|
};
|
|
2198
2204
|
|
|
2205
|
+
const render2 = uid => {
|
|
2206
|
+
const {
|
|
2207
|
+
oldState,
|
|
2208
|
+
newState
|
|
2209
|
+
} = get$1(uid);
|
|
2210
|
+
return doRender(oldState, newState);
|
|
2211
|
+
};
|
|
2212
|
+
|
|
2199
2213
|
const getIconVirtualDom = (icon, type = Div$1) => {
|
|
2200
2214
|
return {
|
|
2201
2215
|
type,
|
|
@@ -2317,24 +2331,27 @@ const commandMap = {
|
|
|
2317
2331
|
'SearchExtensions.getActions': getActions,
|
|
2318
2332
|
'SearchExtensions.getKeyBindings': getKeyBindings,
|
|
2319
2333
|
'SearchExtensions.handleBlur': wrapCommand(handleBlur),
|
|
2320
|
-
'SearchExtensions.
|
|
2334
|
+
'SearchExtensions.handleInput': wrapCommand(handleInput),
|
|
2321
2335
|
'SearchExtensions.handleClick': wrapCommand(handleClick),
|
|
2322
2336
|
'SearchExtensions.handleClickCurrent': wrapCommand(handleClickCurrent),
|
|
2323
2337
|
'SearchExtensions.handleClickCurrentButKeepFocus': wrapCommand(handleClickCurrentButKeepFocus),
|
|
2324
|
-
'SearchExtensions.renderActions': renderActions,
|
|
2325
2338
|
'SearchExtensions.handleContextMenu': wrapCommand(handleContextMenu),
|
|
2326
2339
|
'SearchExtensions.handleDisable': wrapCommand(handleDisable),
|
|
2327
2340
|
'SearchExtensions.handleEnable': wrapCommand(handleEnable),
|
|
2328
2341
|
'SearchExtensions.handleFocus': wrapCommand(handleFocus),
|
|
2329
2342
|
'SearchExtensions.handleInstall': wrapCommand(handleInstall),
|
|
2330
|
-
'SearchExtensions.
|
|
2343
|
+
'SearchExtensions.handleScrollBarCaptureLost': wrapCommand(handleScrollBarCaptureLost),
|
|
2331
2344
|
'SearchExtensions.handleScrollBarClick': wrapCommand(handleScrollBarClick),
|
|
2332
2345
|
'SearchExtensions.handleScrollBarMove': wrapCommand(handleScrollBarMove),
|
|
2333
2346
|
'SearchExtensions.handleUninstall': wrapCommand(handleUninstall),
|
|
2334
2347
|
'SearchExtensions.handleWheel': wrapCommand(handleWheel),
|
|
2335
2348
|
'SearchExtensions.loadContent': loadContent,
|
|
2349
|
+
'SearchExtensions.getCommandIds': getCommandIds,
|
|
2336
2350
|
'SearchExtensions.openSuggest': wrapCommand(openSuggest),
|
|
2337
2351
|
'SearchExtensions.render': doRender,
|
|
2352
|
+
'SearchExtensions.render2': render2,
|
|
2353
|
+
'SearchExtensions.renderActions': renderActions,
|
|
2354
|
+
'SearchExtensions.renderEventListeners': renderEventListeners,
|
|
2338
2355
|
'SearchExtensions.saveState': saveState,
|
|
2339
2356
|
'SearchExtensions.scrollDown': wrapCommand(scrollDown),
|
|
2340
2357
|
'SearchExtensions.searchExtensions': searchExtensions,
|