@lvce-editor/renderer-process 17.1.0 → 18.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 +36 -4
- 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,7 +9706,11 @@ const commandMap = {
|
|
|
9686
9706
|
'WindowTitle.set': set$1
|
|
9687
9707
|
};
|
|
9688
9708
|
|
|
9689
|
-
const
|
|
9709
|
+
const getConfiguredEditorWorkerUrl = () => {
|
|
9710
|
+
return getConfiguredWorkerUrl('editorWorkerUrl');
|
|
9711
|
+
};
|
|
9712
|
+
|
|
9713
|
+
const editorWorkerUrl = getConfiguredEditorWorkerUrl() || `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/editor-worker/dist/editorWorkerMain.js`;
|
|
9690
9714
|
|
|
9691
9715
|
const launchEditorWorker = async port => {
|
|
9692
9716
|
const ipc = await create$A({
|
|
@@ -9709,7 +9733,11 @@ const hydrate$2 = async () => {
|
|
|
9709
9733
|
await promise;
|
|
9710
9734
|
};
|
|
9711
9735
|
|
|
9712
|
-
const
|
|
9736
|
+
const getConfiguredExtensionHostWorkerUrl = () => {
|
|
9737
|
+
return getConfiguredWorkerUrl('extensionHostWorkerUrl');
|
|
9738
|
+
};
|
|
9739
|
+
|
|
9740
|
+
const extensionHostWorkerUrl = getConfiguredExtensionHostWorkerUrl() || `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/extension-host-worker/dist/extensionHostWorkerMain.js`;
|
|
9713
9741
|
|
|
9714
9742
|
const launchExtensionHostWorker = async port => {
|
|
9715
9743
|
const name = isElectron ? 'Extension Host (Electron)' : 'Extension Host';
|
|
@@ -9734,7 +9762,11 @@ const hydrate$1 = async () => {
|
|
|
9734
9762
|
await promise;
|
|
9735
9763
|
};
|
|
9736
9764
|
|
|
9737
|
-
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`;
|
|
9738
9770
|
|
|
9739
9771
|
const launchSyntaxHighlightingWorker = async port => {
|
|
9740
9772
|
const ipc = await create$A({
|