@jxsuite/studio 2.4.3 → 4.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/README.md +5 -5
- package/dist/chunks/Overlay.dev-723bv0df.js +23 -0
- package/dist/chunks/cf-settings-45fgyx8y.js +21 -0
- package/dist/chunks/{components-z6cnkyy1.js → components-zmx10t62.js} +6 -5
- package/dist/chunks/content-source-t88vb2dr.js +49 -0
- package/dist/chunks/{convert-to-repeater-k10dvcc7.js → convert-to-repeater-dhw1nrz9.js} +27 -18
- package/dist/chunks/entry-commands-6z6bhxg0.js +46 -0
- package/dist/chunks/{extension-sections-0ada0xcw.js → extension-sections-3ydgjbdy.js} +32 -23
- package/dist/chunks/file-ops-rskmhxyq.js +48 -0
- package/dist/chunks/files-0cratsr0.js +92 -0
- package/dist/chunks/{format-host-wewba4nq.js → format-host-tgcmfs4p.js} +3 -3
- package/dist/chunks/fs-events-hrrg328g.js +21 -0
- package/dist/chunks/{git-panel-2dh1aw50.js → git-panel-0yywyk76.js} +21 -15
- package/dist/chunks/{jx-validate-jj9rnt4n.js → jx-validate-8q2g05x1.js} +6 -4
- package/dist/chunks/layers-panel-z3tqe5cd.js +67 -0
- package/dist/chunks/layers-q75tj2mf.js +45 -0
- package/dist/chunks/lit-html-j055mkh8.js +22 -0
- package/dist/chunks/monaco-buffer-dqw0xxpx.js +25 -0
- package/dist/chunks/{monaco-setup-a5wkmbgh.js → monaco-setup-rws7k4br.js} +4 -4
- package/dist/chunks/notify-yjm79n4s.js +30 -0
- package/dist/chunks/parse-24d0gay3.js +19 -0
- package/dist/chunks/platform-ba1j1gbh.js +16 -0
- package/dist/chunks/publish-panel-54jvhskq.js +28 -0
- package/dist/chunks/quick-search-cgfmjwq5.js +65 -0
- package/dist/chunks/references-3qx8fkyp.js +29 -0
- package/dist/chunks/right-panel-cqp8bc4v.js +46 -0
- package/dist/chunks/sp-overlay.dev-yztmtrs1.js +18 -0
- package/dist/chunks/sp-popover.dev-n2etmqdp.js +9 -0
- package/dist/chunks/sp-progress-circle.dev-hryhj0es.js +15 -0
- package/dist/chunks/sp-tooltip.dev-xcvpnqr0.js +15 -0
- package/dist/chunks/{sp-tray.dev-64v4pxw8.js → sp-tray.dev-tkbscm06.js} +5 -5
- package/dist/chunks/{studio-f5yyvqxv.js → studio-1hbqnt19.js} +37 -31
- package/dist/chunks/studio-2zkz8evn.js +3163 -0
- package/dist/chunks/{studio-0b6fs05q.js → studio-4pqqxbrt.js} +23 -15
- package/dist/chunks/{studio-kvfx9z2c.js → studio-4rzyrtjz.js} +70 -31
- package/dist/chunks/{studio-ef8t53vc.js → studio-5q69gfag.js} +60 -56
- package/dist/chunks/{studio-v2c5pmjj.js → studio-5rywrkxz.js} +565 -133
- package/dist/chunks/{studio-6kv3apa9.js → studio-68n67094.js} +25 -9
- package/dist/chunks/{studio-0rqqhrdy.js → studio-7nte2hj4.js} +2 -2
- package/dist/chunks/{studio-hyn3vhwr.js → studio-8swrjbny.js} +31 -18
- package/dist/chunks/studio-92ab2jqe.js +282 -0
- package/dist/chunks/{studio-sas7mt3k.js → studio-9ab8gqsm.js} +2 -2
- package/dist/chunks/{studio-28xc8ws4.js → studio-9c4k4vhv.js} +14 -10
- package/dist/chunks/studio-9n4mrmnb.js +184 -0
- package/dist/chunks/{studio-tr20m8g8.js → studio-9r6j5ev1.js} +37 -2
- package/dist/chunks/{studio-aweyr4v1.js → studio-ahjfdy6e.js} +9 -7
- package/dist/chunks/{studio-s519zc99.js → studio-bgxt93ga.js} +3 -3
- package/dist/chunks/{studio-26sv44br.js → studio-cb12yz9w.js} +8543 -8784
- package/dist/chunks/studio-cft9r4r7.js +119 -0
- package/dist/chunks/{studio-rqemfhz6.js → studio-eenfkt4e.js} +6 -6
- package/dist/chunks/studio-eesa1myv.js +498 -0
- package/dist/chunks/{studio-ay8wcr2b.js → studio-eqq1w638.js} +7 -9
- package/dist/chunks/{studio-ke244pam.js → studio-ex8zyp98.js} +51 -25
- package/dist/chunks/studio-gv8vvshc.js +118 -0
- package/dist/chunks/studio-hbtp0eh1.js +1315 -0
- package/dist/chunks/{studio-cz2j1c0g.js → studio-htsf0w6m.js} +75 -123
- package/dist/chunks/{studio-pyrw8h0w.js → studio-kjjsjak4.js} +528 -212
- package/dist/chunks/{studio-5x5774ak.js → studio-kryvsw6j.js} +3 -3
- package/dist/chunks/studio-kyh9avvv.js +28 -0
- package/dist/chunks/{studio-jnakhg87.js → studio-kyk2v92a.js} +14 -14
- package/dist/chunks/{studio-twsafr1e.js → studio-m3hwn7y1.js} +3 -3
- package/dist/chunks/{studio-tzx3xmvx.js → studio-mmv72a27.js} +8 -8
- package/dist/chunks/{studio-vhk5fmfv.js → studio-n8b9wqwy.js} +5 -5
- package/dist/chunks/{studio-cjm7fdjf.js → studio-p4ngc046.js} +8 -104
- package/dist/chunks/{studio-sccge2wf.js → studio-p8j86wag.js} +2 -2
- package/dist/chunks/{studio-v1va0vhd.js → studio-pdfjntbk.js} +75 -139
- package/dist/chunks/studio-q43a5y9h.js +394 -0
- package/dist/chunks/studio-q7v10cg2.js +106 -0
- package/dist/chunks/{studio-2w11grav.js → studio-qq6jym04.js} +3 -3
- package/dist/chunks/studio-r1r7afxx.js +1066 -0
- package/dist/chunks/{studio-3fk1ac9z.js → studio-rdx8jcxy.js} +4 -4
- package/dist/chunks/{studio-4mqb9a0j.js → studio-rn9ta2mz.js} +4 -4
- package/dist/chunks/studio-sf7zjgv1.js +91 -0
- package/dist/chunks/studio-t7qb9db8.js +665 -0
- package/dist/chunks/studio-tmc5emrw.js +8 -0
- package/dist/chunks/{studio-wdt9y92a.js → studio-txwkm6p9.js} +2 -2
- package/dist/chunks/{studio-dgj7gq44.js → studio-v38hmvx1.js} +7 -7
- package/dist/chunks/{studio-7ejemhej.js → studio-vadzgkrz.js} +6 -6
- package/dist/chunks/studio-wcy8trfx.js +263 -0
- package/dist/chunks/{studio-hb7c46jy.js → studio-wx5609xd.js} +21 -15
- package/dist/chunks/studio-xrapxwwc.js +1539 -0
- package/dist/chunks/{studio-ws6ef6js.js → studio-yxrkyv8a.js} +41 -29
- package/dist/chunks/{studio-xm3dbxvn.js → studio-zczps70q.js} +2 -2
- package/dist/chunks/workspace-xpres40v.js +89 -0
- package/dist/iframe-entry.js +450 -48
- package/dist/studio.js +2455 -1761
- package/package.json +16 -15
- package/src/browse/library-layouts.ts +3 -3
- package/src/browse/library-pane.ts +59 -5
- package/src/browse/library-preview.ts +19 -3
- package/src/canvas/asset-refs.ts +119 -0
- package/src/canvas/asset-resolve.ts +256 -0
- package/src/canvas/canvas-live-render.ts +23 -15
- package/src/canvas/canvas-render.ts +23 -1
- package/src/canvas/iframe-entry.ts +1 -0
- package/src/canvas/iframe-host.ts +4 -0
- package/src/canvas/iframe-patch.ts +47 -21
- package/src/canvas/iframe-protocol.ts +9 -0
- package/src/canvas/iframe-render.ts +50 -16
- package/src/commands/app-commands.ts +4 -0
- package/src/commands/command-args.ts +29 -0
- package/src/commands/context.ts +15 -1
- package/src/commands/defaults.ts +29 -1
- package/src/commands/levels.ts +16 -0
- package/src/commands/live-context.ts +3 -0
- package/src/content/collection-match.ts +267 -0
- package/src/content/entry-commands.ts +38 -29
- package/src/content/entry-fields.ts +6 -0
- package/src/editor/file-drop-action.ts +2 -1
- package/src/editor/shortcuts.ts +5 -0
- package/src/files/file-ops.ts +10 -42
- package/src/files/files.ts +487 -61
- package/src/files/fs-events.ts +9 -0
- package/src/files/gitignore.ts +432 -0
- package/src/files/media-paths.ts +37 -14
- package/src/files/media-upload.ts +47 -6
- package/src/files/serialize-document.ts +60 -0
- package/src/format/convert-file.ts +511 -0
- package/src/format/format-choices.ts +199 -0
- package/src/grid/grid-idle.ts +45 -0
- package/src/grid/grid-view.ts +35 -0
- package/src/grid/schema-columns.ts +2 -1
- package/src/grid/sources/content-source.ts +24 -3
- package/src/media/media-open.ts +58 -0
- package/src/media/media-pane.ts +310 -0
- package/src/new-project/import-tab.ts +333 -160
- package/src/new-project/new-project-modal.ts +27 -34
- package/src/packages/ensure-deps.ts +14 -7
- package/src/packages/jxsuite-update.ts +11 -11
- package/src/page-params.ts +10 -46
- package/src/panels/activity-bar.ts +45 -16
- package/src/panels/ai-chat/attached-context.ts +6 -1
- package/src/panels/ai-chat/chat-view.ts +255 -13
- package/src/panels/ai-chat/composer.ts +21 -80
- package/src/panels/ai-panel.ts +116 -2
- package/src/panels/frontmatter-fields.ts +6 -2
- package/src/panels/navigator-panels.ts +7 -6
- package/src/panels/properties-panel.ts +8 -2
- package/src/panels/seo-modal.ts +5 -6
- package/src/panels/settings-menu.ts +799 -0
- package/src/panels/signals-panel.ts +2 -1
- package/src/panels/toolbar.ts +135 -15
- package/src/platforms/cloud.ts +34 -3
- package/src/platforms/devserver.ts +72 -34
- package/src/preview/preview-overlay.ts +226 -0
- package/src/services/ai-ask.ts +247 -0
- package/src/services/ai-import-tools.ts +494 -0
- package/src/services/ai-models.ts +101 -11
- package/src/services/ai-project-tools.ts +20 -26
- package/src/services/ai-settings.ts +69 -71
- package/src/services/ai-system-prompt.ts +88 -2
- package/src/services/ai-turn-signal.ts +70 -0
- package/src/services/cf-settings.ts +19 -37
- package/src/services/connection.ts +74 -0
- package/src/services/context-manager.ts +89 -0
- package/src/services/document-assistant.ts +49 -7
- package/src/services/idle.ts +6 -1
- package/src/services/import-client.ts +33 -6
- package/src/services/import-run.ts +158 -0
- package/src/services/import-seed.ts +120 -0
- package/src/services/jx-validate.ts +58 -6
- package/src/services/project-adoption.ts +71 -0
- package/src/services/references.ts +0 -0
- package/src/services/settings/definitions.ts +181 -0
- package/src/services/settings/kernel.ts +335 -0
- package/src/services/settings/write-queue.ts +116 -0
- package/src/services/tool-executor.ts +34 -2
- package/src/settings/contexts-section.ts +45 -3
- package/src/settings/dependencies-editor.ts +43 -23
- package/src/settings/general-settings.ts +30 -12
- package/src/settings/preferences-accounts.ts +6 -19
- package/src/settings/preferences-dialog.ts +18 -41
- package/src/settings/preferences-keymap.ts +8 -18
- package/src/settings/preferences-sections.ts +57 -0
- package/src/settings/schema-field-ui.ts +2 -2
- package/src/settings/settings-document.ts +65 -9
- package/src/shell.ts +6 -14
- package/src/studio.ts +65 -7
- package/src/tabs/transact.ts +42 -19
- package/src/types.ts +164 -8
- package/src/ui/ai-credentials-form.ts +52 -27
- package/src/ui/ai-model-picker.ts +162 -0
- package/src/ui/choice-field.ts +72 -0
- package/src/ui/layers.ts +83 -5
- package/src/ui/media-picker.ts +6 -11
- package/src/utils/studio-utils.ts +43 -31
- package/styles/forced-colors.css +7 -0
- package/styles/overlays.css +256 -0
- package/styles/panels.css +13 -1
- package/styles/shell.css +111 -0
- package/dist/chunks/Overlay.dev-d2ajy6sj.js +0 -23
- package/dist/chunks/cf-settings-g5fbf2zp.js +0 -17
- package/dist/chunks/content-source-k9724vcv.js +0 -39
- package/dist/chunks/files-yew27sn9.js +0 -69
- package/dist/chunks/layers-panel-qnsghwwd.js +0 -59
- package/dist/chunks/publish-panel-a0pdft5w.js +0 -21
- package/dist/chunks/quick-search-9avyc4pc.js +0 -54
- package/dist/chunks/right-panel-kcnhtc5j.js +0 -38
- package/dist/chunks/sp-overlay.dev-s18hymn9.js +0 -18
- package/dist/chunks/sp-popover.dev-dj9x7e7a.js +0 -9
- package/dist/chunks/sp-progress-circle.dev-0zxcyz3r.js +0 -15
- package/dist/chunks/sp-tooltip.dev-5c6d1kjz.js +0 -15
- package/dist/chunks/studio-a7pzveq1.js +0 -110
- package/dist/chunks/studio-c31yb4t6.js +0 -55
- package/dist/chunks/studio-ra7ar50f.js +0 -6682
- package/src/canvas/content-assets.ts +0 -263
- package/src/canvas/site-style-css.ts +0 -121
- package/src/services/settings-store.ts +0 -99
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getCfToken,
|
|
3
3
|
setCfToken
|
|
4
|
-
} from "./studio-
|
|
4
|
+
} from "./studio-kyh9avvv.js";
|
|
5
5
|
import {
|
|
6
6
|
connectDeploy,
|
|
7
7
|
currentDeploy,
|
|
@@ -10,20 +10,20 @@ import {
|
|
|
10
10
|
noteDeployment,
|
|
11
11
|
platformSupportsPublish,
|
|
12
12
|
writeDeployConfig
|
|
13
|
-
} from "./studio-
|
|
13
|
+
} from "./studio-ahjfdy6e.js";
|
|
14
14
|
import {
|
|
15
15
|
activeRegistry,
|
|
16
16
|
openModal
|
|
17
|
-
} from "./studio-
|
|
17
|
+
} from "./studio-t7qb9db8.js";
|
|
18
18
|
import {
|
|
19
19
|
html
|
|
20
|
-
} from "./studio-
|
|
20
|
+
} from "./studio-kryvsw6j.js";
|
|
21
21
|
import {
|
|
22
22
|
projectState
|
|
23
|
-
} from "./studio-
|
|
23
|
+
} from "./studio-p4ngc046.js";
|
|
24
24
|
import {
|
|
25
25
|
getPlatform
|
|
26
|
-
} from "./studio-
|
|
26
|
+
} from "./studio-9ab8gqsm.js";
|
|
27
27
|
|
|
28
28
|
// src/publish/publish-panel.ts
|
|
29
29
|
var PAGES_APP_INSTALL_URL = "https://github.com/apps/cloudflare-pages/installations/new";
|
|
@@ -387,4 +387,4 @@ function openPublishPanel() {
|
|
|
387
387
|
export { seedPublishConnected, openPublishPanel };
|
|
388
388
|
|
|
389
389
|
//# debugId=32DE20DAF46B08AA64756E2164756E21
|
|
390
|
-
//# sourceMappingURL=studio-
|
|
390
|
+
//# sourceMappingURL=studio-v38hmvx1.js.map
|
|
@@ -8,16 +8,16 @@ import {
|
|
|
8
8
|
SpectrumElement,
|
|
9
9
|
property,
|
|
10
10
|
query
|
|
11
|
-
} from "./studio-
|
|
11
|
+
} from "./studio-zczps70q.js";
|
|
12
12
|
import {
|
|
13
13
|
css
|
|
14
|
-
} from "./studio-
|
|
14
|
+
} from "./studio-7nte2hj4.js";
|
|
15
15
|
import {
|
|
16
16
|
ifDefined
|
|
17
|
-
} from "./studio-
|
|
17
|
+
} from "./studio-m3hwn7y1.js";
|
|
18
18
|
import {
|
|
19
19
|
html
|
|
20
|
-
} from "./studio-
|
|
20
|
+
} from "./studio-kryvsw6j.js";
|
|
21
21
|
import {
|
|
22
22
|
__require
|
|
23
23
|
} from "./studio-a0tswy0w.js";
|
|
@@ -240,7 +240,7 @@ class Tooltip extends SpectrumElement {
|
|
|
240
240
|
`;
|
|
241
241
|
if (this.selfManaged) {
|
|
242
242
|
this.dependencyManager.add("sp-overlay");
|
|
243
|
-
import("./sp-overlay.dev-
|
|
243
|
+
import("./sp-overlay.dev-yztmtrs1.js");
|
|
244
244
|
return html`
|
|
245
245
|
<sp-overlay
|
|
246
246
|
?open=${this.open && !this.disabled && this.dependencyManager.loaded}
|
|
@@ -315,4 +315,4 @@ defineElement("sp-tooltip", Tooltip);
|
|
|
315
315
|
export { DependencyManagerController };
|
|
316
316
|
|
|
317
317
|
//# debugId=B26C538C82CA430D64756E2164756E21
|
|
318
|
-
//# sourceMappingURL=studio-
|
|
318
|
+
//# sourceMappingURL=studio-vadzgkrz.js.map
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import {
|
|
2
|
+
notify,
|
|
3
|
+
toRaw
|
|
4
|
+
} from "./studio-xrapxwwc.js";
|
|
5
|
+
|
|
6
|
+
// src/view.ts
|
|
7
|
+
var view = {
|
|
8
|
+
functionEditor: null,
|
|
9
|
+
blockActionBarEl: null,
|
|
10
|
+
selDragCleanup: null,
|
|
11
|
+
dndCleanups: [],
|
|
12
|
+
elementsCollapsed: new Set,
|
|
13
|
+
elementsFilter: "",
|
|
14
|
+
_currentDropTargetRow: null,
|
|
15
|
+
layerDragSourceHeight: 0,
|
|
16
|
+
_completionRegistered: false,
|
|
17
|
+
_layersCollapsed: null
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/canvas/surface-registry.ts
|
|
21
|
+
var STAGE_CLASS = "pane-stage";
|
|
22
|
+
var _nextGen = 0;
|
|
23
|
+
function nextRenderGeneration() {
|
|
24
|
+
_nextGen += 1;
|
|
25
|
+
return _nextGen;
|
|
26
|
+
}
|
|
27
|
+
var _surfaces = new Map;
|
|
28
|
+
function surfaceForPane(paneId) {
|
|
29
|
+
let surface = _surfaces.get(paneId);
|
|
30
|
+
if (!surface) {
|
|
31
|
+
surface = freshSurface(paneId);
|
|
32
|
+
_surfaces.set(paneId, surface);
|
|
33
|
+
}
|
|
34
|
+
return surface;
|
|
35
|
+
}
|
|
36
|
+
function freshSurface(paneId) {
|
|
37
|
+
return {
|
|
38
|
+
centerObserver: null,
|
|
39
|
+
monacoEditor: null,
|
|
40
|
+
needsCenter: true,
|
|
41
|
+
panX: 0,
|
|
42
|
+
panY: 0,
|
|
43
|
+
panels: [],
|
|
44
|
+
paneId,
|
|
45
|
+
panzoomWrap: null,
|
|
46
|
+
prevCanvasMode: null,
|
|
47
|
+
prevStylebookCustomizedOnly: null,
|
|
48
|
+
prevStylebookFilter: null,
|
|
49
|
+
renderGeneration: 0,
|
|
50
|
+
sourceCollabCleanup: null,
|
|
51
|
+
wrap: null
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function allCanvasSurfaces() {
|
|
55
|
+
return [..._surfaces.values()];
|
|
56
|
+
}
|
|
57
|
+
function stageContaining(node) {
|
|
58
|
+
if (!node) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
for (const surface of _surfaces.values()) {
|
|
62
|
+
if (surface.wrap?.contains(node)) {
|
|
63
|
+
return surface;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
function releaseMountedPanels(surface) {
|
|
69
|
+
for (const panel of surface.panels) {
|
|
70
|
+
panel.renderScope?.stop();
|
|
71
|
+
panel.renderScope = null;
|
|
72
|
+
}
|
|
73
|
+
surface.panels.length = 0;
|
|
74
|
+
surface.prevCanvasMode = null;
|
|
75
|
+
}
|
|
76
|
+
function registerCanvasSurface(paneId, wrap) {
|
|
77
|
+
const surface = surfaceForPane(paneId);
|
|
78
|
+
surface.wrap = wrap;
|
|
79
|
+
releaseMountedPanels(surface);
|
|
80
|
+
return surface;
|
|
81
|
+
}
|
|
82
|
+
function createPaneSurface(paneId) {
|
|
83
|
+
const existing = _surfaces.get(paneId);
|
|
84
|
+
if (existing) {
|
|
85
|
+
disposePaneSurface(paneId);
|
|
86
|
+
}
|
|
87
|
+
const surface = freshSurface(paneId);
|
|
88
|
+
_surfaces.set(paneId, surface);
|
|
89
|
+
return surface;
|
|
90
|
+
}
|
|
91
|
+
var _teardown = null;
|
|
92
|
+
function setSurfaceTeardown(fn) {
|
|
93
|
+
_teardown = fn;
|
|
94
|
+
}
|
|
95
|
+
function disposePaneSurface(paneId) {
|
|
96
|
+
const surface = _surfaces.get(paneId);
|
|
97
|
+
if (!surface) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
_teardown?.(surface);
|
|
101
|
+
releaseMountedPanels(surface);
|
|
102
|
+
unregisterCanvasSurface(paneId);
|
|
103
|
+
}
|
|
104
|
+
function unregisterCanvasSurface(paneId) {
|
|
105
|
+
_surfaces.delete(paneId);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// src/services/monaco-buffer.ts
|
|
109
|
+
var BUFFER_COMMIT = "commit";
|
|
110
|
+
function bufferWrites(buffer) {
|
|
111
|
+
const timers = new Map;
|
|
112
|
+
const runs = new Map;
|
|
113
|
+
const inFlight = new Map;
|
|
114
|
+
let isAhead = false;
|
|
115
|
+
let isTyped = false;
|
|
116
|
+
let isShared = false;
|
|
117
|
+
function track(key, result) {
|
|
118
|
+
if (typeof result?.then !== "function") {
|
|
119
|
+
return result;
|
|
120
|
+
}
|
|
121
|
+
const promise = result.finally(() => {
|
|
122
|
+
if (inFlight.get(key) === promise) {
|
|
123
|
+
inFlight.delete(key);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
inFlight.set(key, promise);
|
|
127
|
+
return promise;
|
|
128
|
+
}
|
|
129
|
+
const writes = {
|
|
130
|
+
arm(key, ms, run) {
|
|
131
|
+
clearTimeout(timers.get(key));
|
|
132
|
+
runs.set(key, run);
|
|
133
|
+
timers.set(key, setTimeout(() => {
|
|
134
|
+
timers.delete(key);
|
|
135
|
+
runs.delete(key);
|
|
136
|
+
track(key, run());
|
|
137
|
+
}, ms));
|
|
138
|
+
},
|
|
139
|
+
cancel() {
|
|
140
|
+
for (const timer of timers.values()) {
|
|
141
|
+
clearTimeout(timer);
|
|
142
|
+
}
|
|
143
|
+
timers.clear();
|
|
144
|
+
runs.clear();
|
|
145
|
+
},
|
|
146
|
+
flush(key) {
|
|
147
|
+
const run = runs.get(key);
|
|
148
|
+
if (!run) {
|
|
149
|
+
return inFlight.get(key);
|
|
150
|
+
}
|
|
151
|
+
clearTimeout(timers.get(key));
|
|
152
|
+
timers.delete(key);
|
|
153
|
+
runs.delete(key);
|
|
154
|
+
return track(key, run());
|
|
155
|
+
},
|
|
156
|
+
ahead: () => isAhead,
|
|
157
|
+
markAhead() {
|
|
158
|
+
isAhead = true;
|
|
159
|
+
},
|
|
160
|
+
typed: () => isTyped,
|
|
161
|
+
markTyped() {
|
|
162
|
+
isAhead = true;
|
|
163
|
+
isTyped = true;
|
|
164
|
+
},
|
|
165
|
+
markSettled() {
|
|
166
|
+
isAhead = false;
|
|
167
|
+
isTyped = false;
|
|
168
|
+
},
|
|
169
|
+
shared: () => isShared,
|
|
170
|
+
markShared() {
|
|
171
|
+
isShared = true;
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
buffer._writes = writes;
|
|
175
|
+
return writes;
|
|
176
|
+
}
|
|
177
|
+
var SURFACE = {
|
|
178
|
+
logic: { holds: "The handler you were typing", reached: "written into", source: "Logic" },
|
|
179
|
+
source: { holds: "The source you were typing", reached: "parsed into", source: "Editor" }
|
|
180
|
+
};
|
|
181
|
+
function reportDiscarded(buffer, surface, failure) {
|
|
182
|
+
const writes = buffer._writes;
|
|
183
|
+
if (writes?.typed() !== true) {
|
|
184
|
+
return true;
|
|
185
|
+
}
|
|
186
|
+
const tab = buffer._editingTab ?? null;
|
|
187
|
+
const where = tab?.documentPath ?? "Untitled";
|
|
188
|
+
const { holds, reached, source } = SURFACE[surface];
|
|
189
|
+
notify.warn(`${holds} was discarded — it was never ${reached} "${where}".`, {
|
|
190
|
+
...failure ? { detail: describeCommitFailure(failure.error) } : {},
|
|
191
|
+
key: `buffer-discarded:${surface}:${tab?.id ?? "none"}`,
|
|
192
|
+
source,
|
|
193
|
+
...tab?.documentPath ? { path: tab.documentPath } : {}
|
|
194
|
+
});
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
function describeCommitFailure(error) {
|
|
198
|
+
return error instanceof Error ? error.stack ?? error.message : String(error);
|
|
199
|
+
}
|
|
200
|
+
function commitBufferWrites(buffer, surface) {
|
|
201
|
+
const writes = buffer?._writes;
|
|
202
|
+
if (!buffer || !writes) {
|
|
203
|
+
return true;
|
|
204
|
+
}
|
|
205
|
+
let pending;
|
|
206
|
+
try {
|
|
207
|
+
pending = writes.flush(BUFFER_COMMIT);
|
|
208
|
+
} catch (error) {
|
|
209
|
+
writes.cancel();
|
|
210
|
+
return reportDiscarded(buffer, surface, { error });
|
|
211
|
+
}
|
|
212
|
+
writes.cancel();
|
|
213
|
+
if (typeof pending?.then === "function") {
|
|
214
|
+
pending.then(() => reportDiscarded(buffer, surface, null), (error) => reportDiscarded(buffer, surface, { error }));
|
|
215
|
+
return true;
|
|
216
|
+
}
|
|
217
|
+
return reportDiscarded(buffer, surface, null);
|
|
218
|
+
}
|
|
219
|
+
function cancelBufferWrites(buffer) {
|
|
220
|
+
buffer?._writes?.cancel();
|
|
221
|
+
}
|
|
222
|
+
function bufferIsLive(buffer) {
|
|
223
|
+
return Boolean(buffer?.getModel());
|
|
224
|
+
}
|
|
225
|
+
function bufferMovedOn(buffer, expected) {
|
|
226
|
+
if (!bufferIsLive(buffer) || buffer.hasTextFocus() || buffer._writes?.ahead() || buffer._writes?.shared()) {
|
|
227
|
+
return true;
|
|
228
|
+
}
|
|
229
|
+
return expected !== undefined && buffer.getValue() !== expected;
|
|
230
|
+
}
|
|
231
|
+
function buffersForTab(tab) {
|
|
232
|
+
const raw = toRaw(tab);
|
|
233
|
+
const mounted = [
|
|
234
|
+
...allCanvasSurfaces().map((surface) => surface.monacoEditor),
|
|
235
|
+
view.functionEditor
|
|
236
|
+
];
|
|
237
|
+
return mounted.filter((buffer) => buffer != null && buffer._editingTab != null && toRaw(buffer._editingTab) === raw && bufferIsLive(buffer));
|
|
238
|
+
}
|
|
239
|
+
async function commitTabBuffers(tab) {
|
|
240
|
+
for (const buffer of buffersForTab(tab)) {
|
|
241
|
+
if (!bufferIsLive(buffer)) {
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
try {
|
|
245
|
+
await buffer._writes?.flush(BUFFER_COMMIT);
|
|
246
|
+
} catch (error) {
|
|
247
|
+
notify.error(`Could not save the editor's contents into "${tab.documentPath ?? "Untitled"}".`, {
|
|
248
|
+
detail: error instanceof Error ? error.stack ?? error.message : String(error),
|
|
249
|
+
key: `buffer-commit:${tab.id}`,
|
|
250
|
+
source: "Editor",
|
|
251
|
+
...tab.documentPath ? { path: tab.documentPath } : {}
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
function tabBufferUnsaved(tab) {
|
|
257
|
+
return buffersForTab(tab).some((buffer) => buffer._writes?.typed() === true);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export { view, STAGE_CLASS, nextRenderGeneration, surfaceForPane, allCanvasSurfaces, stageContaining, registerCanvasSurface, createPaneSurface, setSurfaceTeardown, disposePaneSurface, BUFFER_COMMIT, bufferWrites, commitBufferWrites, cancelBufferWrites, bufferIsLive, bufferMovedOn, commitTabBuffers, tabBufferUnsaved };
|
|
261
|
+
|
|
262
|
+
//# debugId=19DB9325F890591F64756E2164756E21
|
|
263
|
+
//# sourceMappingURL=studio-wcy8trfx.js.map
|
|
@@ -1,33 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
validateProjectConfig
|
|
3
|
+
} from "./studio-68n67094.js";
|
|
1
4
|
import {
|
|
2
5
|
renderForm,
|
|
3
6
|
resolveContextPointer
|
|
4
|
-
} from "./studio-
|
|
5
|
-
import {
|
|
6
|
-
validateProjectConfig
|
|
7
|
-
} from "./studio-6kv3apa9.js";
|
|
7
|
+
} from "./studio-5q69gfag.js";
|
|
8
8
|
import {
|
|
9
9
|
deriveSecretEnvName
|
|
10
|
-
} from "./studio-
|
|
10
|
+
} from "./studio-4pqqxbrt.js";
|
|
11
11
|
import {
|
|
12
12
|
paneOfContainer
|
|
13
|
-
} from "./studio-
|
|
13
|
+
} from "./studio-kjjsjak4.js";
|
|
14
|
+
import {
|
|
15
|
+
commitProjectConfig
|
|
16
|
+
} from "./studio-hbtp0eh1.js";
|
|
14
17
|
import {
|
|
15
|
-
commitProjectConfig,
|
|
16
|
-
errorMessage,
|
|
17
|
-
notify,
|
|
18
18
|
paneRegion
|
|
19
|
-
} from "./studio-
|
|
19
|
+
} from "./studio-t7qb9db8.js";
|
|
20
|
+
import {
|
|
21
|
+
errorMessage
|
|
22
|
+
} from "./studio-9n4mrmnb.js";
|
|
23
|
+
import {
|
|
24
|
+
notify
|
|
25
|
+
} from "./studio-xrapxwwc.js";
|
|
20
26
|
import {
|
|
21
27
|
html,
|
|
22
28
|
nothing,
|
|
23
29
|
render
|
|
24
|
-
} from "./studio-
|
|
30
|
+
} from "./studio-kryvsw6j.js";
|
|
25
31
|
import {
|
|
26
32
|
projectState
|
|
27
|
-
} from "./studio-
|
|
33
|
+
} from "./studio-p4ngc046.js";
|
|
28
34
|
import {
|
|
29
35
|
getPlatform
|
|
30
|
-
} from "./studio-
|
|
36
|
+
} from "./studio-9ab8gqsm.js";
|
|
31
37
|
|
|
32
38
|
// src/settings/contributed-section.ts
|
|
33
39
|
var selectedEntries = new Map;
|
|
@@ -331,5 +337,5 @@ function renderMapLayout(contribution, opts, rerender, paneId) {
|
|
|
331
337
|
|
|
332
338
|
export { selectContributedEntry, renderContributedSection };
|
|
333
339
|
|
|
334
|
-
//# debugId=
|
|
335
|
-
//# sourceMappingURL=studio-
|
|
340
|
+
//# debugId=1F1C350DE28120E764756E2164756E21
|
|
341
|
+
//# sourceMappingURL=studio-wx5609xd.js.map
|