@mcp-b/interactive-components 0.3.12 → 0.4.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/{code-editor-hnbxw8Xk.js → code-editor-De07yhYp.js} +1 -1
- package/dist/{code-preview-Pq2CFfK9.js → code-preview-B6HCxIaD.js} +23 -22
- package/dist/components/code-editor/code-editor.d.ts +2 -4
- package/dist/components/code-editor/code-editor.js +1 -1
- package/dist/components/code-preview/code-preview.d.ts +4 -3
- package/dist/components/code-preview/code-preview.js +1 -1
- package/dist/components/interactive-editor/interactive-editor.d.ts +7 -3
- package/dist/components/interactive-editor/interactive-editor.js +1 -1
- package/dist/components/r-editor/r-editor.d.ts +7 -3
- package/dist/components/r-editor/r-editor.js +1 -1
- package/dist/components/sql-editor/sql-editor.d.ts +7 -3
- package/dist/components/sql-editor/sql-editor.js +1 -1
- package/dist/{decorate-DcF3lt7P.js → decorate-BkO8ArQg.js} +1 -1
- package/dist/index.js +5 -5
- package/dist/{interactive-editor-DQfrcGUo.js → interactive-editor-ZCU39FQY.js} +130 -125
- package/dist/lib/runner-channel.d.ts +10 -11
- package/dist/lib/runner-url.d.ts +4 -5
- package/dist/lib/transform.d.ts +11 -12
- package/dist/{r-editor-CkKexaUb.js → r-editor-B9tPupAX.js} +20 -19
- package/dist/{sql-editor-Az-vOWO0.js → sql-editor-CTGDNBns.js} +13 -13
- package/dist/vite.d.ts +3 -5
- package/dist/vite.js +12 -6
- package/package.json +24 -24
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __decorate } from "./decorate-
|
|
1
|
+
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
2
2
|
import { css, html } from "lit";
|
|
3
3
|
import { property, query } from "lit/decorators.js";
|
|
4
4
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __decorate } from "./decorate-
|
|
1
|
+
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
2
2
|
import { RUNNER_CONNECT_TYPE, bindRunnerUrl, connectRunner, createRunnerChannelId, isRecord, parseRunnerConsoleMessage } from "./lib/runner-channel.js";
|
|
3
3
|
import { buildHtmlPreview, buildModulePreview, buildPythonPayload, detectLanguage } from "./lib/transform.js";
|
|
4
4
|
import { getRunnerUrl } from "./lib/runner-url.js";
|
|
@@ -246,28 +246,29 @@ var SigveloCodePreview = class SigveloCodePreview extends SigveloElement {
|
|
|
246
246
|
return html`
|
|
247
247
|
${this._loading ? html` <div class="loading"><sigvelo-spinner label="Building…"></sigvelo-spinner></div> ` : ""}
|
|
248
248
|
${this._error ? html`
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
249
|
+
<div class="error">
|
|
250
|
+
<sigvelo-callout color="destructive">
|
|
251
|
+
<sigvelo-icon slot="icon" name="alert-triangle"></sigvelo-icon>
|
|
252
|
+
<pre
|
|
253
|
+
style="margin:0; white-space:pre-wrap; word-break:break-word; font-size:12px;"
|
|
254
|
+
>
|
|
255
|
+
${this._error}</pre>
|
|
256
|
+
</sigvelo-callout>
|
|
257
|
+
</div>
|
|
258
|
+
` : ""}
|
|
258
259
|
${this._pyRunnerSrc ? html`<iframe
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
260
|
+
class="preview-iframe"
|
|
261
|
+
sandbox="allow-scripts allow-modals allow-forms"
|
|
262
|
+
title="Code preview"
|
|
263
|
+
.src=${this._pyRunnerSrc}
|
|
264
|
+
@load=${this._connectRunner}
|
|
265
|
+
></iframe>` : html`<iframe
|
|
266
|
+
class="preview-iframe"
|
|
267
|
+
sandbox="allow-scripts allow-modals allow-forms"
|
|
268
|
+
title="Code preview"
|
|
269
|
+
.srcdoc=${this._srcdoc}
|
|
270
|
+
@load=${this._connectRunner}
|
|
271
|
+
></iframe>`}
|
|
271
272
|
`;
|
|
272
273
|
}
|
|
273
274
|
};
|
|
@@ -2,7 +2,6 @@ import { FileLanguage } from "../../lib/transform.js";
|
|
|
2
2
|
import { CSSResultGroup, PropertyValues } from "lit";
|
|
3
3
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
4
4
|
import { EditorView } from "@codemirror/view";
|
|
5
|
-
|
|
6
5
|
//#region src/components/code-editor/code-editor.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* `<sigvelo-code-editor>`
|
|
@@ -18,7 +17,7 @@ import { EditorView } from "@codemirror/view";
|
|
|
18
17
|
*
|
|
19
18
|
* @event sigvelo-change - Fires when the document content changes. Read the new content from the element’s `value` property.
|
|
20
19
|
*/
|
|
21
|
-
declare class SigveloCodeEditor extends SigveloElement {
|
|
20
|
+
export declare class SigveloCodeEditor extends SigveloElement {
|
|
22
21
|
static styles: CSSResultGroup;
|
|
23
22
|
/** The document content. */
|
|
24
23
|
value: string;
|
|
@@ -54,5 +53,4 @@ declare global {
|
|
|
54
53
|
"sigvelo-code-editor": SigveloCodeEditor;
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
|
-
//#endregion
|
|
58
|
-
export { SigveloCodeEditor };
|
|
56
|
+
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SigveloCodeEditor } from "../../code-editor-
|
|
1
|
+
import { t as SigveloCodeEditor } from "../../code-editor-De07yhYp.js";
|
|
2
2
|
export { SigveloCodeEditor };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { EditorFile } from "../../lib/transform.js";
|
|
2
2
|
import { CSSResultGroup } from "lit";
|
|
3
3
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
4
|
+
import "@mcp-b/web-components/components/callout/callout.js";
|
|
5
|
+
import "@mcp-b/web-components/components/spinner/spinner.js";
|
|
4
6
|
//#region src/components/code-preview/code-preview.d.ts
|
|
5
7
|
/**
|
|
6
8
|
* `<sigvelo-code-preview>`
|
|
@@ -17,7 +19,7 @@ import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
|
17
19
|
* @event sigvelo-error - Fires when a build or runtime error occurs. `event.detail.message` has the error text.
|
|
18
20
|
* @event sigvelo-console - Fires for validated console output from the isolated preview.
|
|
19
21
|
*/
|
|
20
|
-
declare class SigveloCodePreview extends SigveloElement {
|
|
22
|
+
export declare class SigveloCodePreview extends SigveloElement {
|
|
21
23
|
static styles: CSSResultGroup;
|
|
22
24
|
/** The file set to render. */
|
|
23
25
|
files: EditorFile[];
|
|
@@ -57,5 +59,4 @@ declare global {
|
|
|
57
59
|
"sigvelo-code-preview": SigveloCodePreview;
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
|
-
//#endregion
|
|
61
|
-
export { SigveloCodePreview };
|
|
62
|
+
//#endregion
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { EditorFile } from "../../lib/transform.js";
|
|
2
|
+
import "../code-preview/code-preview.js";
|
|
2
3
|
import { CSSResultGroup, PropertyValues } from "lit";
|
|
3
4
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
5
|
+
import "@mcp-b/web-components/components/splitter/splitter.js";
|
|
6
|
+
import "@mcp-b/web-components/components/button/button.js";
|
|
7
|
+
import "@mcp-b/web-components/components/button-group/button-group.js";
|
|
8
|
+
import "@mcp-b/web-components/components/tooltip/tooltip.js";
|
|
4
9
|
//#region src/components/interactive-editor/interactive-editor.d.ts
|
|
5
10
|
/**
|
|
6
11
|
* `<sigvelo-interactive-editor>`
|
|
@@ -14,7 +19,7 @@ import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
|
14
19
|
* @since 0.1
|
|
15
20
|
* @cssproperty [--sigvelo-interactive-editor-height=30rem] - The editor's block size.
|
|
16
21
|
*/
|
|
17
|
-
declare class SigveloInteractiveEditor extends SigveloElement {
|
|
22
|
+
export declare class SigveloInteractiveEditor extends SigveloElement {
|
|
18
23
|
static styles: CSSResultGroup;
|
|
19
24
|
files: EditorFile[];
|
|
20
25
|
entryFile: string;
|
|
@@ -74,5 +79,4 @@ declare global {
|
|
|
74
79
|
"sigvelo-interactive-editor": SigveloInteractiveEditor;
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
|
-
//#endregion
|
|
78
|
-
export { SigveloInteractiveEditor };
|
|
82
|
+
//#endregion
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { CSSResultGroup } from "lit";
|
|
2
2
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
3
|
+
import "@mcp-b/web-components/components/spinner/spinner.js";
|
|
4
|
+
import "@mcp-b/web-components/components/splitter/splitter.js";
|
|
5
|
+
import "@mcp-b/web-components/components/button/button.js";
|
|
6
|
+
import "@mcp-b/web-components/components/button-group/button-group.js";
|
|
7
|
+
import "@mcp-b/web-components/components/tooltip/tooltip.js";
|
|
3
8
|
//#region src/components/r-editor/r-editor.d.ts
|
|
4
9
|
/**
|
|
5
10
|
* `<sigvelo-r-editor>`
|
|
@@ -13,7 +18,7 @@ import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
|
13
18
|
* @status experimental
|
|
14
19
|
* @since 0.1
|
|
15
20
|
*/
|
|
16
|
-
declare class SigveloREditor extends SigveloElement {
|
|
21
|
+
export declare class SigveloREditor extends SigveloElement {
|
|
17
22
|
static styles: CSSResultGroup;
|
|
18
23
|
/** Initial R code to display in the editor. */
|
|
19
24
|
code: string;
|
|
@@ -64,5 +69,4 @@ declare global {
|
|
|
64
69
|
"sigvelo-r-editor": SigveloREditor;
|
|
65
70
|
}
|
|
66
71
|
}
|
|
67
|
-
//#endregion
|
|
68
|
-
export { SigveloREditor };
|
|
72
|
+
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SigveloREditor } from "../../r-editor-
|
|
1
|
+
import { t as SigveloREditor } from "../../r-editor-B9tPupAX.js";
|
|
2
2
|
export { SigveloREditor };
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { CSSResultGroup } from "lit";
|
|
2
2
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
3
|
+
import "@mcp-b/web-components/components/spinner/spinner.js";
|
|
4
|
+
import "@mcp-b/web-components/components/splitter/splitter.js";
|
|
5
|
+
import "@mcp-b/web-components/components/button/button.js";
|
|
6
|
+
import "@mcp-b/web-components/components/button-group/button-group.js";
|
|
7
|
+
import "@mcp-b/web-components/components/tooltip/tooltip.js";
|
|
3
8
|
//#region src/components/sql-editor/sql-editor.d.ts
|
|
4
9
|
/**
|
|
5
10
|
* `<sigvelo-sql-editor>`
|
|
@@ -13,7 +18,7 @@ import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
|
13
18
|
* @status experimental
|
|
14
19
|
* @since 0.1
|
|
15
20
|
*/
|
|
16
|
-
declare class SigveloSqlEditor extends SigveloElement {
|
|
21
|
+
export declare class SigveloSqlEditor extends SigveloElement {
|
|
17
22
|
static styles: CSSResultGroup;
|
|
18
23
|
/** SQL to execute on database initialization (CREATE TABLE, INSERT, etc.). */
|
|
19
24
|
setupSql: string;
|
|
@@ -74,5 +79,4 @@ declare global {
|
|
|
74
79
|
"sigvelo-sql-editor": SigveloSqlEditor;
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
|
-
//#endregion
|
|
78
|
-
export { SigveloSqlEditor };
|
|
82
|
+
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SigveloSqlEditor } from "../../sql-editor-
|
|
1
|
+
import { t as SigveloSqlEditor } from "../../sql-editor-CTGDNBns.js";
|
|
2
2
|
export { SigveloSqlEditor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.148.0/helpers/esm/decorate.js
|
|
2
2
|
function __decorate(decorators, target, key, desc) {
|
|
3
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as SigveloCodeEditor } from "./code-editor-
|
|
1
|
+
import { t as SigveloCodeEditor } from "./code-editor-De07yhYp.js";
|
|
2
2
|
import { detectLanguage } from "./lib/transform.js";
|
|
3
3
|
import { getRunnerUrl, setRunnerBaseUrl } from "./lib/runner-url.js";
|
|
4
|
-
import { t as SigveloCodePreview } from "./code-preview-
|
|
5
|
-
import { t as SigveloInteractiveEditor } from "./interactive-editor-
|
|
6
|
-
import { t as SigveloREditor } from "./r-editor-
|
|
7
|
-
import { t as SigveloSqlEditor } from "./sql-editor-
|
|
4
|
+
import { t as SigveloCodePreview } from "./code-preview-B6HCxIaD.js";
|
|
5
|
+
import { t as SigveloInteractiveEditor } from "./interactive-editor-ZCU39FQY.js";
|
|
6
|
+
import { t as SigveloREditor } from "./r-editor-B9tPupAX.js";
|
|
7
|
+
import { t as SigveloSqlEditor } from "./sql-editor-CTGDNBns.js";
|
|
8
8
|
export { SigveloCodeEditor, SigveloCodePreview, SigveloInteractiveEditor, SigveloREditor, SigveloSqlEditor, detectLanguage, getRunnerUrl, setRunnerBaseUrl };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as SigveloCodeEditor } from "./code-editor-
|
|
2
|
-
import { t as __decorate } from "./decorate-
|
|
1
|
+
import { t as SigveloCodeEditor } from "./code-editor-De07yhYp.js";
|
|
2
|
+
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
3
3
|
import { detectLanguage } from "./lib/transform.js";
|
|
4
|
-
import "./code-preview-
|
|
4
|
+
import "./code-preview-B6HCxIaD.js";
|
|
5
5
|
import { css, html } from "lit";
|
|
6
6
|
import { property, query, state } from "lit/decorators.js";
|
|
7
7
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
@@ -1119,10 +1119,10 @@ var SigveloInteractiveEditor = class extends SigveloElement {
|
|
|
1119
1119
|
<span class="sidebar__item-name">${node.name}</span>
|
|
1120
1120
|
</button>
|
|
1121
1121
|
${expanded ? html`
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1122
|
+
<ul class="sidebar__subtree">
|
|
1123
|
+
${this._renderTreeNodes(node.children, depth + 1)}
|
|
1124
|
+
</ul>
|
|
1125
|
+
` : ""}
|
|
1126
1126
|
</li>`;
|
|
1127
1127
|
}
|
|
1128
1128
|
const lang = node.file?.language ?? detectLanguage(node.fullPath);
|
|
@@ -1145,15 +1145,15 @@ var SigveloInteractiveEditor = class extends SigveloElement {
|
|
|
1145
1145
|
<span class="sidebar__item-name">${node.name}</span>
|
|
1146
1146
|
</button>
|
|
1147
1147
|
${this.files.length > 1 ? html`
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1148
|
+
<button
|
|
1149
|
+
class="sidebar__item-remove"
|
|
1150
|
+
type="button"
|
|
1151
|
+
aria-label="Remove ${node.name}"
|
|
1152
|
+
@click=${() => this._removeFile(node.fullPath)}
|
|
1153
|
+
>
|
|
1154
|
+
×
|
|
1155
|
+
</button>
|
|
1156
|
+
` : ""}
|
|
1157
1157
|
</li>`;
|
|
1158
1158
|
});
|
|
1159
1159
|
}
|
|
@@ -1167,66 +1167,68 @@ var SigveloInteractiveEditor = class extends SigveloElement {
|
|
|
1167
1167
|
})}
|
|
1168
1168
|
>
|
|
1169
1169
|
${this._sidebarOpen ? html`
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1170
|
+
<div class="sidebar__header">
|
|
1171
|
+
<span class="sidebar__title">Files</span>
|
|
1172
|
+
<button
|
|
1173
|
+
class="sidebar__icon-btn"
|
|
1174
|
+
aria-label="New file"
|
|
1175
|
+
@click=${() => {
|
|
1176
1176
|
this._showAddFile = !this._showAddFile;
|
|
1177
1177
|
this._fileError = "";
|
|
1178
1178
|
}}
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1179
|
+
>
|
|
1180
|
+
${ICON_PLUS}
|
|
1181
|
+
</button>
|
|
1182
|
+
<button
|
|
1183
|
+
class="sidebar__icon-btn sidebar__collapse-btn"
|
|
1184
|
+
aria-label="Collapse sidebar"
|
|
1185
|
+
@click=${() => {
|
|
1186
1186
|
this._sidebarOpen = false;
|
|
1187
1187
|
}}
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1188
|
+
>
|
|
1189
|
+
${ICON_CHEVRON_LEFT}
|
|
1190
|
+
</button>
|
|
1191
|
+
</div>
|
|
1192
1192
|
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1193
|
+
<ul class="sidebar__list">
|
|
1194
|
+
${this._renderTreeNodes(tree, 0)}
|
|
1195
|
+
</ul>
|
|
1196
1196
|
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1197
|
+
${this._showAddFile ? html`
|
|
1198
|
+
<div class="sidebar__add-form">
|
|
1199
|
+
<input
|
|
1200
|
+
class=${classMap({
|
|
1201
1201
|
"sidebar__add-input": true,
|
|
1202
1202
|
"sidebar__add-input--error": !!this._fileError
|
|
1203
1203
|
})}
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1204
|
+
type="text"
|
|
1205
|
+
placeholder="src/App.tsx"
|
|
1206
|
+
autofocus
|
|
1207
|
+
.value=${this._newFileName}
|
|
1208
|
+
@input=${this._onNewFileNameInput}
|
|
1209
|
+
@keydown=${(e) => {
|
|
1210
1210
|
if (e.key === "Enter") this._confirmAddFile();
|
|
1211
1211
|
if (e.key === "Escape") this._dismissAddFile();
|
|
1212
1212
|
}}
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1213
|
+
/>
|
|
1214
|
+
${this._fileError ? html`<div class="sidebar__add-error">${this._fileError}</div>` : ""}
|
|
1215
|
+
</div>
|
|
1216
|
+
` : ""}
|
|
1217
|
+
` : html`
|
|
1218
|
+
<button
|
|
1219
|
+
id="sidebar-expand-btn"
|
|
1220
|
+
class="sidebar__expand-btn"
|
|
1221
|
+
aria-label="Expand file explorer"
|
|
1222
|
+
@click=${() => {
|
|
1223
1223
|
this._sidebarOpen = true;
|
|
1224
1224
|
}}
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1225
|
+
>
|
|
1226
|
+
${ICON_FOLDER}
|
|
1227
|
+
</button>
|
|
1228
|
+
<sigvelo-tooltip for="sidebar-expand-btn" placement="right">
|
|
1229
|
+
Files
|
|
1230
|
+
</sigvelo-tooltip>
|
|
1231
|
+
`}
|
|
1230
1232
|
</div>
|
|
1231
1233
|
`;
|
|
1232
1234
|
}
|
|
@@ -1264,25 +1266,25 @@ var SigveloInteractiveEditor = class extends SigveloElement {
|
|
|
1264
1266
|
>
|
|
1265
1267
|
</sigvelo-button-group>
|
|
1266
1268
|
${this._rightPane === "console" ? html` <sigvelo-button
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1269
|
+
size="xs"
|
|
1270
|
+
variant="ghost"
|
|
1271
|
+
icon-label="Clear console"
|
|
1272
|
+
@click=${() => this._clearConsole()}
|
|
1273
|
+
>
|
|
1274
|
+
${ICON_TRASH}
|
|
1275
|
+
</sigvelo-button>` : ""}
|
|
1274
1276
|
${!this.hidePreview ? html` <sigvelo-button size="xs" color="primary" @click=${() => void this._runCode()}>
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
+
${ICON_PLAY} Run
|
|
1278
|
+
</sigvelo-button>` : ""}
|
|
1277
1279
|
</div>
|
|
1278
1280
|
${this._rightPane === "preview" ? html`
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1281
|
+
<div class="preview-pane__content">
|
|
1282
|
+
<sigvelo-code-preview
|
|
1283
|
+
capture-console
|
|
1284
|
+
@sigvelo-console=${this._onConsoleMessage}
|
|
1285
|
+
></sigvelo-code-preview>
|
|
1286
|
+
</div>
|
|
1287
|
+
` : this._renderConsoleView()}
|
|
1286
1288
|
`;
|
|
1287
1289
|
return slot ? html`<div class="preview-pane" slot=${slot}>${content}</div>` : html`<div class="preview-pane">${content}</div>`;
|
|
1288
1290
|
}
|
|
@@ -1290,11 +1292,11 @@ var SigveloInteractiveEditor = class extends SigveloElement {
|
|
|
1290
1292
|
return html`
|
|
1291
1293
|
<div class="console-view">
|
|
1292
1294
|
${this._consoleLogs.length === 0 ? html` <div class="console-empty">No console output yet.</div> ` : this._consoleLogs.map((entry) => html`
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1295
|
+
<div class="console-entry console-entry--${entry.level}">
|
|
1296
|
+
<span class="console-entry__level">${entry.level}</span>
|
|
1297
|
+
<span class="console-entry__text">${entry.args.join(" ")}</span>
|
|
1298
|
+
</div>
|
|
1299
|
+
`)}
|
|
1298
1300
|
</div>
|
|
1299
1301
|
`;
|
|
1300
1302
|
}
|
|
@@ -1314,13 +1316,13 @@ var SigveloInteractiveEditor = class extends SigveloElement {
|
|
|
1314
1316
|
${!this.hidePreview ? btn("console", "Console", this._unreadConsoleCount) : ""}
|
|
1315
1317
|
</sigvelo-button-group>
|
|
1316
1318
|
${!this.hidePreview ? html` <sigvelo-button
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1319
|
+
size="xs"
|
|
1320
|
+
color="primary"
|
|
1321
|
+
icon-label="Run"
|
|
1322
|
+
@click=${() => void this._runCode()}
|
|
1323
|
+
>
|
|
1324
|
+
${ICON_PLAY}
|
|
1325
|
+
</sigvelo-button>` : ""}
|
|
1324
1326
|
</div>
|
|
1325
1327
|
`;
|
|
1326
1328
|
}
|
|
@@ -1348,44 +1350,47 @@ var SigveloInteractiveEditor = class extends SigveloElement {
|
|
|
1348
1350
|
<span class="mobile-file__name">${f.name}</span>
|
|
1349
1351
|
</button>
|
|
1350
1352
|
${this.files.length > 1 ? html`<button
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1353
|
+
class="mobile-file__close"
|
|
1354
|
+
type="button"
|
|
1355
|
+
aria-label="Remove ${f.name}"
|
|
1356
|
+
@click=${() => this._removeFile(f.name)}
|
|
1357
|
+
>
|
|
1358
|
+
×
|
|
1359
|
+
</button>` : ""}
|
|
1358
1360
|
</li>`;
|
|
1359
1361
|
})}
|
|
1360
1362
|
<li>
|
|
1361
1363
|
${this._showAddFile ? html`<div style="padding: 6px;">
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1364
|
+
<div class="add-file-form">
|
|
1365
|
+
<div class="add-file-row">
|
|
1366
|
+
<input
|
|
1367
|
+
class="add-file-input ${this._fileError ? "add-file-input--error" : ""}"
|
|
1368
|
+
type="text"
|
|
1369
|
+
placeholder="filename.ts"
|
|
1370
|
+
.value=${this._newFileName}
|
|
1371
|
+
@input=${this._onNewFileNameInput}
|
|
1372
|
+
@keydown=${(e) => {
|
|
1371
1373
|
if (e.key === "Enter") this._confirmAddFile();
|
|
1372
1374
|
if (e.key === "Escape") this._dismissAddFile();
|
|
1373
1375
|
}}
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1376
|
+
/>
|
|
1377
|
+
<sigvelo-button
|
|
1378
|
+
size="xs"
|
|
1379
|
+
color="primary"
|
|
1380
|
+
@click=${() => this._confirmAddFile()}
|
|
1381
|
+
>Add</sigvelo-button
|
|
1382
|
+
>
|
|
1383
|
+
</div>
|
|
1384
|
+
${this._fileError ? html`<div class="add-file-error">${this._fileError}</div>` : ""}
|
|
1378
1385
|
</div>
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
class="mobile-add-btn"
|
|
1383
|
-
@click=${() => {
|
|
1386
|
+
</div>` : html`<button
|
|
1387
|
+
class="mobile-add-btn"
|
|
1388
|
+
@click=${() => {
|
|
1384
1389
|
this._showAddFile = true;
|
|
1385
1390
|
}}
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1391
|
+
>
|
|
1392
|
+
+ New file
|
|
1393
|
+
</button>`}
|
|
1389
1394
|
</li>
|
|
1390
1395
|
</ul>
|
|
1391
1396
|
`;
|
|
@@ -1406,15 +1411,15 @@ var SigveloInteractiveEditor = class extends SigveloElement {
|
|
|
1406
1411
|
${this._renderMobileNav()}
|
|
1407
1412
|
<div class="single-pane">
|
|
1408
1413
|
${this._compactView === "files" ? this._renderMobileFileList() : this._compactView === "code" ? this._renderEditorPane() : this._compactView === "console" ? this._renderConsoleView() : html`
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1414
|
+
<div class="preview-pane">
|
|
1415
|
+
<div class="preview-pane__content">
|
|
1416
|
+
<sigvelo-code-preview
|
|
1417
|
+
capture-console
|
|
1418
|
+
@sigvelo-console=${this._onConsoleMessage}
|
|
1419
|
+
></sigvelo-code-preview>
|
|
1420
|
+
</div>
|
|
1415
1421
|
</div>
|
|
1416
|
-
|
|
1417
|
-
`}
|
|
1422
|
+
`}
|
|
1418
1423
|
</div>
|
|
1419
1424
|
`;
|
|
1420
1425
|
return html` <div class="content">${this._renderContent()}</div> `;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
//#region src/lib/runner-channel.d.ts
|
|
2
|
-
declare const RUNNER_CONNECT_TYPE = "sigvelo-runner-connect-v1";
|
|
3
|
-
declare const RUNNER_CHANNEL_PARAM = "sigvelo-channel";
|
|
4
|
-
declare const RUNNER_PARENT_ORIGIN_PARAM = "sigvelo-parent-origin";
|
|
2
|
+
export declare const RUNNER_CONNECT_TYPE = "sigvelo-runner-connect-v1";
|
|
3
|
+
export declare const RUNNER_CHANNEL_PARAM = "sigvelo-channel";
|
|
4
|
+
export declare const RUNNER_PARENT_ORIGIN_PARAM = "sigvelo-parent-origin";
|
|
5
5
|
/** Creates a 128-bit runner capability without requiring a secure context. */
|
|
6
|
-
declare function createRunnerChannelId(): string;
|
|
7
|
-
interface RunnerConsoleMessage {
|
|
6
|
+
export declare function createRunnerChannelId(): string;
|
|
7
|
+
export interface RunnerConsoleMessage {
|
|
8
8
|
__sigvelo_console: true;
|
|
9
9
|
level: "log" | "warn" | "error" | "info";
|
|
10
10
|
args: string[];
|
|
11
11
|
ts: number;
|
|
12
12
|
}
|
|
13
|
-
declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
14
|
-
declare function parseRunnerConsoleMessage(value: unknown): RunnerConsoleMessage | null;
|
|
15
|
-
declare function bindRunnerUrl(url: URL, channelId: string): URL;
|
|
13
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
14
|
+
export declare function parseRunnerConsoleMessage(value: unknown): RunnerConsoleMessage | null;
|
|
15
|
+
export declare function bindRunnerUrl(url: URL, channelId: string): URL;
|
|
16
16
|
/**
|
|
17
17
|
* Gives one sandboxed runner a private channel. An opaque-origin iframe cannot
|
|
18
18
|
* be named by `targetOrigin`, so the one wildcard send is restricted to its
|
|
@@ -20,6 +20,5 @@ declare function bindRunnerUrl(url: URL, channelId: string): URL;
|
|
|
20
20
|
* sender window, sender origin, protocol marker, and transferred port before
|
|
21
21
|
* accepting it; all subsequent traffic stays off the global `message` event.
|
|
22
22
|
*/
|
|
23
|
-
declare function connectRunner(iframe: HTMLIFrameElement, channelId: string, onMessage: (data: unknown) => void): MessagePort | null;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { RUNNER_CHANNEL_PARAM, RUNNER_CONNECT_TYPE, RUNNER_PARENT_ORIGIN_PARAM, RunnerConsoleMessage, bindRunnerUrl, connectRunner, createRunnerChannelId, isRecord, parseRunnerConsoleMessage };
|
|
23
|
+
export declare function connectRunner(iframe: HTMLIFrameElement, channelId: string, onMessage: (data: unknown) => void): MessagePort | null;
|
|
24
|
+
//#endregion
|
package/dist/lib/runner-url.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/lib/runner-url.d.ts
|
|
2
|
-
type RunnerName = "pglite" | "pyscript" | "webr";
|
|
2
|
+
export type RunnerName = "pglite" | "pyscript" | "webr";
|
|
3
3
|
/**
|
|
4
4
|
* Overrides the same-origin mount where the complete `dist/runners/` tree is served.
|
|
5
5
|
*
|
|
@@ -8,8 +8,7 @@ type RunnerName = "pglite" | "pyscript" | "webr";
|
|
|
8
8
|
* opaque sandbox origins, so their module and runtime fetches require CORS. The
|
|
9
9
|
* PGlite module worker requires the mount to share the application's origin.
|
|
10
10
|
*/
|
|
11
|
-
declare function setRunnerBaseUrl(url: URL): void;
|
|
11
|
+
export declare function setRunnerBaseUrl(url: URL): void;
|
|
12
12
|
/** Returns the runner shipped beside this package's compiled modules. */
|
|
13
|
-
declare function getRunnerUrl(name: RunnerName): URL;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { RunnerName, getRunnerUrl, setRunnerBaseUrl };
|
|
13
|
+
export declare function getRunnerUrl(name: RunnerName): URL;
|
|
14
|
+
//#endregion
|
package/dist/lib/transform.d.ts
CHANGED
|
@@ -6,34 +6,34 @@
|
|
|
6
6
|
* - Blob URLs for inter-file module resolution
|
|
7
7
|
* - Import rewriting for npm packages via esm.sh CDN
|
|
8
8
|
*/
|
|
9
|
-
type FileLanguage = "javascript" | "typescript" | "jsx" | "tsx" | "html" | "css" | "python" | "r" | "sql";
|
|
10
|
-
interface EditorFile {
|
|
9
|
+
export type FileLanguage = "javascript" | "typescript" | "jsx" | "tsx" | "html" | "css" | "python" | "r" | "sql";
|
|
10
|
+
export interface EditorFile {
|
|
11
11
|
name: string;
|
|
12
12
|
content: string;
|
|
13
13
|
language?: FileLanguage;
|
|
14
14
|
}
|
|
15
|
-
declare function detectLanguage(filename: string): FileLanguage;
|
|
16
|
-
declare function needsTransform(lang: FileLanguage): boolean;
|
|
17
|
-
declare function transformCode(code: string, filename: string): Promise<string>;
|
|
15
|
+
export declare function detectLanguage(filename: string): FileLanguage;
|
|
16
|
+
export declare function needsTransform(lang: FileLanguage): boolean;
|
|
17
|
+
export declare function transformCode(code: string, filename: string): Promise<string>;
|
|
18
18
|
/** Rewrites bare npm specifiers (`from 'react'`) to esm.sh CDN URLs. */
|
|
19
|
-
declare function rewriteNpmImports(code: string): string;
|
|
19
|
+
export declare function rewriteNpmImports(code: string): string;
|
|
20
20
|
/**
|
|
21
21
|
* Builds a preview for HTML-entry projects. Inlines referenced CSS and JS
|
|
22
22
|
* files, transforming TS/JSX as needed.
|
|
23
23
|
*/
|
|
24
|
-
declare function buildHtmlPreview(files: Map<string, EditorFile>): Promise<string>;
|
|
24
|
+
export declare function buildHtmlPreview(files: Map<string, EditorFile>): Promise<string>;
|
|
25
25
|
/**
|
|
26
26
|
* Builds a preview for module-entry projects (TS/TSX/JS). Transforms each
|
|
27
27
|
* file, creates Blob URLs for inter-file imports, and wraps in HTML.
|
|
28
28
|
*
|
|
29
29
|
* Returns `{ html, blobUrls }` — caller should revoke blob URLs on cleanup.
|
|
30
30
|
*/
|
|
31
|
-
declare function buildModulePreview(files: Map<string, EditorFile>, entryName: string): Promise<{
|
|
31
|
+
export declare function buildModulePreview(files: Map<string, EditorFile>, entryName: string): Promise<{
|
|
32
32
|
html: string;
|
|
33
33
|
blobUrls: string[];
|
|
34
34
|
}>;
|
|
35
35
|
/** Payload sent to the pyscript-runner.html page via postMessage. */
|
|
36
|
-
interface PyScriptRunPayload {
|
|
36
|
+
export interface PyScriptRunPayload {
|
|
37
37
|
type: "pyscript-run";
|
|
38
38
|
code: string;
|
|
39
39
|
bodyHtml: string;
|
|
@@ -48,6 +48,5 @@ interface PyScriptRunPayload {
|
|
|
48
48
|
* invalid base URLs. Instead, we load a static `pyscript-runner.html`
|
|
49
49
|
* page (served at a real HTTP URL) and send code to it via postMessage.
|
|
50
50
|
*/
|
|
51
|
-
declare function buildPythonPayload(files: Map<string, EditorFile>, entryName: string): PyScriptRunPayload;
|
|
52
|
-
//#endregion
|
|
53
|
-
export { EditorFile, FileLanguage, PyScriptRunPayload, buildHtmlPreview, buildModulePreview, buildPythonPayload, detectLanguage, needsTransform, rewriteNpmImports, transformCode };
|
|
51
|
+
export declare function buildPythonPayload(files: Map<string, EditorFile>, entryName: string): PyScriptRunPayload;
|
|
52
|
+
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as SigveloCodeEditor } from "./code-editor-
|
|
2
|
-
import { t as __decorate } from "./decorate-
|
|
1
|
+
import { t as SigveloCodeEditor } from "./code-editor-De07yhYp.js";
|
|
2
|
+
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
3
3
|
import { bindRunnerUrl, connectRunner, createRunnerChannelId, isRecord, parseRunnerConsoleMessage } from "./lib/runner-channel.js";
|
|
4
4
|
import { getRunnerUrl } from "./lib/runner-url.js";
|
|
5
5
|
import { css, html } from "lit";
|
|
@@ -572,10 +572,11 @@ var SigveloREditor = class extends SigveloElement {
|
|
|
572
572
|
</div>
|
|
573
573
|
</div>
|
|
574
574
|
`;
|
|
575
|
+
const plot = this._plots[this._currentPlotIndex];
|
|
575
576
|
return html`
|
|
576
577
|
<div class="plot-viewer">
|
|
577
578
|
<div class="plot-viewer__canvas">
|
|
578
|
-
<img src=${
|
|
579
|
+
<img src=${plot?.dataUrl ?? ""} alt="R plot ${this._currentPlotIndex + 1}" />
|
|
579
580
|
</div>
|
|
580
581
|
<div class="plot-viewer__nav">
|
|
581
582
|
<sigvelo-button
|
|
@@ -623,13 +624,13 @@ var SigveloREditor = class extends SigveloElement {
|
|
|
623
624
|
return html`
|
|
624
625
|
<div class="console-view">
|
|
625
626
|
${this._consoleLogs.length === 0 ? html`<div class="console-empty">No console output yet.</div>` : this._consoleLogs.map((entry) => html`
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
627
|
+
<div class="console-entry console-entry--${entry.level}">
|
|
628
|
+
<span class="console-entry__level"
|
|
629
|
+
>${entry.level === "error" ? "E" : entry.level === "warn" ? "W" : ">"}</span
|
|
630
|
+
>
|
|
631
|
+
<span class="console-entry__text">${entry.args.join(" ")}</span>
|
|
632
|
+
</div>
|
|
633
|
+
`)}
|
|
633
634
|
</div>
|
|
634
635
|
`;
|
|
635
636
|
}
|
|
@@ -655,15 +656,15 @@ var SigveloREditor = class extends SigveloElement {
|
|
|
655
656
|
</sigvelo-button>
|
|
656
657
|
</sigvelo-button-group>
|
|
657
658
|
${this._rightPane === "console" ? html`
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
659
|
+
<sigvelo-button
|
|
660
|
+
size="xs"
|
|
661
|
+
variant="ghost"
|
|
662
|
+
icon-label="Clear console"
|
|
663
|
+
@click=${() => this._clearConsole()}
|
|
664
|
+
>
|
|
665
|
+
${ICON_TRASH}
|
|
666
|
+
</sigvelo-button>
|
|
667
|
+
` : ""}
|
|
667
668
|
</div>
|
|
668
669
|
<div class="right-pane__content">
|
|
669
670
|
${this._rightPane === "plots" ? this._renderPlotViewer() : this._renderConsoleView()}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as SigveloCodeEditor } from "./code-editor-
|
|
2
|
-
import { t as __decorate } from "./decorate-
|
|
1
|
+
import { t as SigveloCodeEditor } from "./code-editor-De07yhYp.js";
|
|
2
|
+
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
3
3
|
import { isRecord } from "./lib/runner-channel.js";
|
|
4
4
|
import { getRunnerUrl } from "./lib/runner-url.js";
|
|
5
5
|
import { css, html, nothing } from "lit";
|
|
@@ -781,8 +781,8 @@ var SigveloSqlEditor = class extends SigveloElement {
|
|
|
781
781
|
@click=${() => this._toggleSort(f.name)}
|
|
782
782
|
>
|
|
783
783
|
${f.name}${this._sortColumn === f.name ? html`<span class="sort-indicator" aria-hidden="true"
|
|
784
|
-
|
|
785
|
-
|
|
784
|
+
>${this._sortDirection === "asc" ? "▲" : "▼"}</span
|
|
785
|
+
>` : nothing}
|
|
786
786
|
</button>
|
|
787
787
|
</th>
|
|
788
788
|
`)}
|
|
@@ -843,15 +843,15 @@ var SigveloSqlEditor = class extends SigveloElement {
|
|
|
843
843
|
</button>
|
|
844
844
|
</div>
|
|
845
845
|
${expanded ? html`
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
846
|
+
<div class="schema-columns">
|
|
847
|
+
${table.columns.map((col) => html`
|
|
848
|
+
<div class="schema-column">
|
|
849
|
+
<span class="schema-column__name">${col.name}</span>
|
|
850
|
+
<span class="schema-column__type">${col.type}</span>
|
|
851
|
+
</div>
|
|
852
|
+
`)}
|
|
853
|
+
</div>
|
|
854
|
+
` : nothing}
|
|
855
855
|
</div>
|
|
856
856
|
`;
|
|
857
857
|
})}
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { viteStaticCopy } from "vite-plugin-static-copy";
|
|
2
|
-
|
|
3
2
|
//#region src/vite.d.ts
|
|
4
|
-
interface InteractiveRuntimeAssetsOptions {
|
|
3
|
+
export interface InteractiveRuntimeAssetsOptions {
|
|
5
4
|
/** Output directory relative to Vite's public/build root. */
|
|
6
5
|
destination?: string;
|
|
7
6
|
}
|
|
@@ -9,6 +8,5 @@ interface InteractiveRuntimeAssetsOptions {
|
|
|
9
8
|
* Copies the sandbox runner entry points and installed engine assets into a
|
|
10
9
|
* Vite application's public output without embedding them in this package.
|
|
11
10
|
*/
|
|
12
|
-
declare function interactiveRuntimeAssets(options?: InteractiveRuntimeAssetsOptions): ReturnType<typeof viteStaticCopy>;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { InteractiveRuntimeAssetsOptions, interactiveRuntimeAssets };
|
|
11
|
+
export declare function interactiveRuntimeAssets(options?: InteractiveRuntimeAssetsOptions): ReturnType<typeof viteStaticCopy>;
|
|
12
|
+
//#endregion
|
package/dist/vite.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { dirname, join, posix, resolve } from "node:path";
|
|
2
|
+
import { dirname, join, posix, relative, resolve } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { viteStaticCopy } from "vite-plugin-static-copy";
|
|
5
5
|
//#region src/vite.ts
|
|
@@ -43,20 +43,26 @@ function interactiveRuntimeAssets(options = {}) {
|
|
|
43
43
|
...packageRuntime("webr", "LICENSE.md")
|
|
44
44
|
}
|
|
45
45
|
];
|
|
46
|
-
|
|
46
|
+
const targets = [{
|
|
47
47
|
src: join(runnerRoot, "*.{html,js}"),
|
|
48
|
-
dest: destination
|
|
48
|
+
dest: destination,
|
|
49
|
+
rename: { stripBase: true }
|
|
49
50
|
}, ...runtimes.flatMap(({ directory, dist, license }) => {
|
|
50
51
|
const runtimeDestination = posix.join(destination, directory);
|
|
51
52
|
return [{
|
|
52
53
|
src: dist,
|
|
53
54
|
dest: runtimeDestination,
|
|
54
|
-
rename:
|
|
55
|
+
rename: (_name, _extension, fullPath) => ({
|
|
56
|
+
stripBase: true,
|
|
57
|
+
name: relative(dist, fullPath)
|
|
58
|
+
})
|
|
55
59
|
}, {
|
|
56
60
|
src: license,
|
|
57
|
-
dest: runtimeDestination
|
|
61
|
+
dest: runtimeDestination,
|
|
62
|
+
rename: { stripBase: true }
|
|
58
63
|
}];
|
|
59
|
-
})]
|
|
64
|
+
})];
|
|
65
|
+
return viteStaticCopy({ targets });
|
|
60
66
|
}
|
|
61
67
|
//#endregion
|
|
62
68
|
export { interactiveRuntimeAssets };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-b/interactive-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Sigvelo interactive code editor components built with Lit.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"code-editor",
|
|
@@ -41,41 +41,41 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@codemirror/autocomplete": "^6.20.3",
|
|
44
|
-
"@codemirror/commands": "^6.
|
|
44
|
+
"@codemirror/commands": "^6.11.0",
|
|
45
45
|
"@codemirror/lang-css": "^6.3.1",
|
|
46
46
|
"@codemirror/lang-html": "^6.4.12",
|
|
47
47
|
"@codemirror/lang-javascript": "^6.2.5",
|
|
48
48
|
"@codemirror/lang-python": "^6.2.1",
|
|
49
49
|
"@codemirror/lang-sql": "^6.10.0",
|
|
50
50
|
"@codemirror/language": "^6.12.4",
|
|
51
|
-
"@codemirror/legacy-modes": "^6.5.
|
|
52
|
-
"@codemirror/search": "^6.7.
|
|
53
|
-
"@codemirror/state": "^6.7.
|
|
54
|
-
"@codemirror/view": "^6.43.
|
|
55
|
-
"@electric-sql/pglite": "0.
|
|
56
|
-
"@electric-sql/pglite-postgis": "0.
|
|
51
|
+
"@codemirror/legacy-modes": "^6.5.4",
|
|
52
|
+
"@codemirror/search": "^6.7.2",
|
|
53
|
+
"@codemirror/state": "^6.7.4",
|
|
54
|
+
"@codemirror/view": "^6.43.11",
|
|
55
|
+
"@electric-sql/pglite": "0.5.8",
|
|
56
|
+
"@electric-sql/pglite-postgis": "0.2.8",
|
|
57
57
|
"@lezer/highlight": "^1.2.3",
|
|
58
|
-
"@pyscript/core": "0.7.
|
|
59
|
-
"vite-plugin-static-copy": "^
|
|
60
|
-
"webr": "0.
|
|
61
|
-
"@mcp-b/wc-support": "0.3.
|
|
62
|
-
"@mcp-b/web-components": "0.
|
|
58
|
+
"@pyscript/core": "0.7.31",
|
|
59
|
+
"vite-plugin-static-copy": "^4.1.1",
|
|
60
|
+
"webr": "0.6.0",
|
|
61
|
+
"@mcp-b/wc-support": "0.3.13",
|
|
62
|
+
"@mcp-b/web-components": "0.4.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@custom-elements-manifest/analyzer": "^0.
|
|
66
|
-
"@storybook/addon-a11y": "
|
|
67
|
-
"@storybook/addon-docs": "
|
|
68
|
-
"@storybook/addon-vitest": "
|
|
65
|
+
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
66
|
+
"@storybook/addon-a11y": "10.5.7",
|
|
67
|
+
"@storybook/addon-docs": "10.5.7",
|
|
68
|
+
"@storybook/addon-vitest": "10.5.7",
|
|
69
69
|
"@storybook/web-components-vite": "10.5.7",
|
|
70
|
-
"@vitest/browser-playwright": "^4.1.
|
|
71
|
-
"@vitest/coverage-v8": "^4.1.
|
|
72
|
-
"playwright": "
|
|
73
|
-
"storybook": "
|
|
70
|
+
"@vitest/browser-playwright": "^4.1.11",
|
|
71
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
72
|
+
"playwright": "1.61.1",
|
|
73
|
+
"storybook": "10.5.7",
|
|
74
74
|
"tinyglobby": "^0.2.17",
|
|
75
75
|
"typescript": "^6.0.3",
|
|
76
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.
|
|
77
|
-
"vite-plugin-static-copy": "^
|
|
78
|
-
"vitest": "^4.1.
|
|
76
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.1",
|
|
77
|
+
"vite-plugin-static-copy": "^4.1.1",
|
|
78
|
+
"vitest": "^4.1.11"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"lit": "^3.0.0",
|