@lvce-editor/renderer-process 30.82.1 → 30.82.3
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/dist/rendererProcessMain.js +17 -3
- package/package.json +1 -1
|
@@ -11213,12 +11213,21 @@ const removeWorkspaceUri = () => {
|
|
|
11213
11213
|
const isChatPath = pathName => {
|
|
11214
11214
|
return /(?:^|\/)chat\/?$/.test(pathName);
|
|
11215
11215
|
};
|
|
11216
|
+
const isBoardPath = pathName => {
|
|
11217
|
+
return /(?:^|\/)board\/?$/.test(pathName);
|
|
11218
|
+
};
|
|
11219
|
+
const executeExtensionCommand = command => {
|
|
11220
|
+
send$1('ExtensionHost.executeCommand', command);
|
|
11221
|
+
};
|
|
11216
11222
|
const handlePopState = () => {
|
|
11217
11223
|
const pathName = getPathName();
|
|
11218
|
-
if (
|
|
11224
|
+
if (isBoardPath(pathName)) {
|
|
11225
|
+
executeExtensionCommand('chat2.showBoardLayout');
|
|
11226
|
+
} else if (isChatPath(pathName)) {
|
|
11219
11227
|
send$1('Layout.enterAiNativeLayout');
|
|
11220
|
-
|
|
11221
|
-
|
|
11228
|
+
executeExtensionCommand('chat2.show');
|
|
11229
|
+
} else if (isChatPath(state$3.lastPathName) || isBoardPath(state$3.lastPathName)) {
|
|
11230
|
+
executeExtensionCommand('chat2.showIdeLayout');
|
|
11222
11231
|
}
|
|
11223
11232
|
state$3.lastPathName = pathName;
|
|
11224
11233
|
};
|
|
@@ -11278,6 +11287,7 @@ const measureTextBlockHeight = (text, fontSize, fontFamily, lineHeight, width) =
|
|
|
11278
11287
|
string(lineHeight);
|
|
11279
11288
|
const $Measure = document.createElement('textarea');
|
|
11280
11289
|
$Measure.style.width = `${width}px`;
|
|
11290
|
+
$Measure.style.boxSizing = 'border-box';
|
|
11281
11291
|
$Measure.style.contain = 'content';
|
|
11282
11292
|
// @ts-ignore
|
|
11283
11293
|
$Measure.style.fieldSizing = 'content';
|
|
@@ -11285,7 +11295,11 @@ const measureTextBlockHeight = (text, fontSize, fontFamily, lineHeight, width) =
|
|
|
11285
11295
|
$Measure.style.top = '-9999px';
|
|
11286
11296
|
$Measure.style.left = '-9999px';
|
|
11287
11297
|
$Measure.style.fontSize = `${fontSize}px`;
|
|
11298
|
+
$Measure.style.fontFamily = fontFamily;
|
|
11288
11299
|
$Measure.style.lineHeight = lineHeight;
|
|
11300
|
+
$Measure.style.margin = '0';
|
|
11301
|
+
$Measure.style.padding = '0';
|
|
11302
|
+
$Measure.style.border = '0';
|
|
11289
11303
|
$Measure.value = text;
|
|
11290
11304
|
$Measure.name = 'measureTextBlockHeight';
|
|
11291
11305
|
const height = getElementHeight($Measure);
|