stream-monaco 0.0.12 → 0.0.13
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/index.cjs +0 -4
- package/dist/index.js +0 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2343,14 +2343,12 @@ function useMonaco(monacoOptions = {}) {
|
|
|
2343
2343
|
if (token !== globalThemeRequestSeq) return;
|
|
2344
2344
|
try {
|
|
2345
2345
|
monaco_shim_exports.editor.setTheme(themeName);
|
|
2346
|
-
lastAppliedTheme = themeName;
|
|
2347
2346
|
globalAppliedThemeName = themeName;
|
|
2348
2347
|
} catch {
|
|
2349
2348
|
try {
|
|
2350
2349
|
const maybeHighlighter = await registerMonacoThemes(themes, languages$1);
|
|
2351
2350
|
if (token !== globalThemeRequestSeq) return;
|
|
2352
2351
|
monaco_shim_exports.editor.setTheme(themeName);
|
|
2353
|
-
lastAppliedTheme = themeName;
|
|
2354
2352
|
globalAppliedThemeName = themeName;
|
|
2355
2353
|
await tryLoadAndSetShikiTheme(maybeHighlighter, themeName).catch(() => void 0);
|
|
2356
2354
|
} catch (err2) {
|
|
@@ -2414,7 +2412,6 @@ function useMonaco(monacoOptions = {}) {
|
|
|
2414
2412
|
await ensureThemeRegistered(initialThemeName);
|
|
2415
2413
|
editorMgr = new EditorManager(monacoOptions, maxHeightValue, maxHeightCSS, autoScrollOnUpdate, autoScrollInitial, autoScrollThresholdPx, autoScrollThresholdLines, monacoOptions.revealDebounceMs);
|
|
2416
2414
|
editorView = await editorMgr.createEditor(container, code, language, initialThemeName);
|
|
2417
|
-
lastAppliedTheme = initialThemeName;
|
|
2418
2415
|
if (pendingUpdate && editorMgr) {
|
|
2419
2416
|
const { code: queuedCode, lang: queuedLang } = pendingUpdate;
|
|
2420
2417
|
pendingUpdate = null;
|
|
@@ -2446,7 +2443,6 @@ function useMonaco(monacoOptions = {}) {
|
|
|
2446
2443
|
await ensureThemeRegistered(initialThemeName);
|
|
2447
2444
|
try {
|
|
2448
2445
|
monaco_shim_exports.editor.setTheme(initialThemeName);
|
|
2449
|
-
lastAppliedTheme = initialThemeName;
|
|
2450
2446
|
} catch {}
|
|
2451
2447
|
diffMgr = new DiffEditorManager(monacoOptions, maxHeightValue, maxHeightCSS, autoScrollOnUpdate, autoScrollInitial, autoScrollThresholdPx, autoScrollThresholdLines, diffAutoScroll, monacoOptions.revealDebounceMs);
|
|
2452
2448
|
diffEditorView = await diffMgr.createDiffEditor(container, originalCode, modifiedCode, language, initialThemeName);
|
package/dist/index.js
CHANGED
|
@@ -2315,14 +2315,12 @@ function useMonaco(monacoOptions = {}) {
|
|
|
2315
2315
|
if (token !== globalThemeRequestSeq) return;
|
|
2316
2316
|
try {
|
|
2317
2317
|
monaco_shim_exports.editor.setTheme(themeName);
|
|
2318
|
-
lastAppliedTheme = themeName;
|
|
2319
2318
|
globalAppliedThemeName = themeName;
|
|
2320
2319
|
} catch {
|
|
2321
2320
|
try {
|
|
2322
2321
|
const maybeHighlighter = await registerMonacoThemes(themes, languages$1);
|
|
2323
2322
|
if (token !== globalThemeRequestSeq) return;
|
|
2324
2323
|
monaco_shim_exports.editor.setTheme(themeName);
|
|
2325
|
-
lastAppliedTheme = themeName;
|
|
2326
2324
|
globalAppliedThemeName = themeName;
|
|
2327
2325
|
await tryLoadAndSetShikiTheme(maybeHighlighter, themeName).catch(() => void 0);
|
|
2328
2326
|
} catch (err2) {
|
|
@@ -2386,7 +2384,6 @@ function useMonaco(monacoOptions = {}) {
|
|
|
2386
2384
|
await ensureThemeRegistered(initialThemeName);
|
|
2387
2385
|
editorMgr = new EditorManager(monacoOptions, maxHeightValue, maxHeightCSS, autoScrollOnUpdate, autoScrollInitial, autoScrollThresholdPx, autoScrollThresholdLines, monacoOptions.revealDebounceMs);
|
|
2388
2386
|
editorView = await editorMgr.createEditor(container, code, language, initialThemeName);
|
|
2389
|
-
lastAppliedTheme = initialThemeName;
|
|
2390
2387
|
if (pendingUpdate && editorMgr) {
|
|
2391
2388
|
const { code: queuedCode, lang: queuedLang } = pendingUpdate;
|
|
2392
2389
|
pendingUpdate = null;
|
|
@@ -2418,7 +2415,6 @@ function useMonaco(monacoOptions = {}) {
|
|
|
2418
2415
|
await ensureThemeRegistered(initialThemeName);
|
|
2419
2416
|
try {
|
|
2420
2417
|
monaco_shim_exports.editor.setTheme(initialThemeName);
|
|
2421
|
-
lastAppliedTheme = initialThemeName;
|
|
2422
2418
|
} catch {}
|
|
2423
2419
|
diffMgr = new DiffEditorManager(monacoOptions, maxHeightValue, maxHeightCSS, autoScrollOnUpdate, autoScrollInitial, autoScrollThresholdPx, autoScrollThresholdLines, diffAutoScroll, monacoOptions.revealDebounceMs);
|
|
2424
2420
|
diffEditorView = await diffMgr.createDiffEditor(container, originalCode, modifiedCode, language, initialThemeName);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-monaco",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"description": "A framework-agnostic library for integrating Monaco Editor with Shiki highlighting, optimized for streaming updates.",
|
|
6
6
|
"author": "Simon He",
|
|
7
7
|
"license": "MIT",
|