@lvce-editor/source-control-worker 1.20.0 → 1.22.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.
@@ -1615,16 +1615,17 @@ const create2 = (id, uri, x, y, width, height, workspacePath) => {
1615
1615
  inputPlaceholder: '',
1616
1616
  inputSource: 0,
1617
1617
  maxInputLines: 5,
1618
- inputFontFamily: '"Fira Code"',
1619
- inputFontSize: 15,
1618
+ inputFontFamily: 'system-ui, Ubuntu, "Droid Sans", sans-serif',
1619
+ inputFontSize: 13,
1620
1620
  inputFontWeight: 400,
1621
- inputLetterSpacing: 0.5
1621
+ inputLetterSpacing: 0,
1622
+ inputLineHeight: 14.95
1622
1623
  };
1623
1624
  set$1(id, state, state);
1624
1625
  };
1625
1626
 
1626
1627
  const isEqual$2 = (oldState, newState) => {
1627
- return newState.inputBoxHeight === newState.inputBoxHeight;
1628
+ return oldState.inputBoxHeight === newState.inputBoxHeight;
1628
1629
  };
1629
1630
 
1630
1631
  const RenderItems = 4;
@@ -2086,6 +2087,7 @@ const getIndex = (state, eventX, eventY) => {
2086
2087
  };
2087
2088
 
2088
2089
  const warn = (...args) => {
2090
+ // @ts-ignore
2089
2091
  console.warn(...args);
2090
2092
  };
2091
2093
 
@@ -2199,12 +2201,12 @@ const handleClickDirectoryExpanded = async (state, item) => {
2199
2201
  };
2200
2202
 
2201
2203
  const readFile = async (uri, encoding = 'utf8') => {
2202
- const content = await invoke('FileSystem.readFile', uri);
2204
+ const content = await readFile$1(uri);
2203
2205
  return content;
2204
2206
  };
2205
2207
 
2206
2208
  const openUri = uri => {
2207
- return invoke('Main.openUri', uri);
2209
+ return openUri$1(uri);
2208
2210
  };
2209
2211
 
2210
2212
  const openDiffEditor = async (before, afterPath, width) => {
@@ -2244,7 +2246,7 @@ const selectIndex = async (state, index) => {
2244
2246
  case File:
2245
2247
  return handleClickFile(state, item);
2246
2248
  default:
2247
- console.warn(`unknown item type: ${item.type}`);
2249
+ warn(`unknown item type: ${item.type}`);
2248
2250
  return state;
2249
2251
  }
2250
2252
  };
@@ -2299,10 +2301,10 @@ const handleInput = async (state, value, inputSource = User) => {
2299
2301
  inputFontFamily,
2300
2302
  inputFontSize,
2301
2303
  inputFontWeight,
2302
- inputLetterSpacing
2304
+ inputLetterSpacing,
2305
+ inputLineHeight
2303
2306
  } = state;
2304
- const lineHeight = 30;
2305
- const inputBoxHeight = await getInputHeight(value, width, inputFontFamily, inputFontWeight, inputFontSize, inputLetterSpacing, lineHeight);
2307
+ const inputBoxHeight = await getInputHeight(value, width, inputFontFamily, inputFontWeight, inputFontSize, inputLetterSpacing, inputLineHeight);
2306
2308
  return {
2307
2309
  ...state,
2308
2310
  inputValue: value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/source-control-worker",
3
- "version": "1.20.0",
3
+ "version": "1.22.0",
4
4
  "description": "Source Control Worker",
5
5
  "keywords": [
6
6
  "Lvce Editor"