@lvce-editor/renderer-process 16.2.0 → 17.0.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.
- package/dist/rendererProcessMain.js +26 -18
- package/package.json +1 -1
|
@@ -2621,7 +2621,27 @@ const getAssetDir = () => {
|
|
|
2621
2621
|
};
|
|
2622
2622
|
const assetDir = getAssetDir();
|
|
2623
2623
|
|
|
2624
|
-
const
|
|
2624
|
+
const getConfiguredWorkerUrl = key => {
|
|
2625
|
+
if (typeof location === 'undefined' || typeof document === 'undefined') {
|
|
2626
|
+
return '';
|
|
2627
|
+
}
|
|
2628
|
+
const configElement = document.getElementById('Config');
|
|
2629
|
+
if (!configElement) {
|
|
2630
|
+
return '';
|
|
2631
|
+
}
|
|
2632
|
+
const text = configElement.textContent;
|
|
2633
|
+
if (!text) {
|
|
2634
|
+
return '';
|
|
2635
|
+
}
|
|
2636
|
+
const config = JSON.parse(text);
|
|
2637
|
+
return config[key] || '';
|
|
2638
|
+
};
|
|
2639
|
+
|
|
2640
|
+
const getConfiguredRendererWorkerUrl = () => {
|
|
2641
|
+
return getConfiguredWorkerUrl('rendererWorkerUrl');
|
|
2642
|
+
};
|
|
2643
|
+
|
|
2644
|
+
const rendererWorkerUrl = getConfiguredRendererWorkerUrl() || `${assetDir}/packages/renderer-worker/src/rendererWorkerMain.ts`;
|
|
2625
2645
|
|
|
2626
2646
|
const getName = platform => {
|
|
2627
2647
|
switch (platform) {
|
|
@@ -9686,22 +9706,6 @@ const commandMap = {
|
|
|
9686
9706
|
'WindowTitle.set': set$1
|
|
9687
9707
|
};
|
|
9688
9708
|
|
|
9689
|
-
const getConfiguredWorkerUrl = key => {
|
|
9690
|
-
if (typeof location === 'undefined' || typeof document === 'undefined') {
|
|
9691
|
-
return '';
|
|
9692
|
-
}
|
|
9693
|
-
const configElement = document.getElementById('Config');
|
|
9694
|
-
if (!configElement) {
|
|
9695
|
-
return '';
|
|
9696
|
-
}
|
|
9697
|
-
const text = configElement.textContent;
|
|
9698
|
-
if (!text) {
|
|
9699
|
-
return '';
|
|
9700
|
-
}
|
|
9701
|
-
const config = JSON.parse(text);
|
|
9702
|
-
return config[key] || '';
|
|
9703
|
-
};
|
|
9704
|
-
|
|
9705
9709
|
const getConfiguredEditorWorkerUrl = () => {
|
|
9706
9710
|
return getConfiguredWorkerUrl('editorWorkerUrl');
|
|
9707
9711
|
};
|
|
@@ -9758,7 +9762,11 @@ const hydrate$1 = async () => {
|
|
|
9758
9762
|
await promise;
|
|
9759
9763
|
};
|
|
9760
9764
|
|
|
9761
|
-
const
|
|
9765
|
+
const getConfiguredSyntaxHighlightingWorkerUrl = () => {
|
|
9766
|
+
return getConfiguredWorkerUrl('syntaxHighlightingWorkerUrl');
|
|
9767
|
+
};
|
|
9768
|
+
|
|
9769
|
+
const syntaxHighlightingWorkerUrl = getConfiguredSyntaxHighlightingWorkerUrl() || `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/syntax-highlighting-worker/dist/syntaxHighlightingWorkerMain.js`;
|
|
9762
9770
|
|
|
9763
9771
|
const launchSyntaxHighlightingWorker = async port => {
|
|
9764
9772
|
const ipc = await create$A({
|