@jxsuite/studio 1.4.0 → 1.5.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/canvas.html +51 -0
- package/dist/iframe-entry.js +4 -1
- package/dist/iframe-entry.js.map +3 -3
- package/dist/studio.js +115 -25
- package/dist/studio.js.map +9 -9
- package/fonts/OFL.txt +93 -0
- package/fonts/jetbrains-mono-400.woff2 +0 -0
- package/fonts/jetbrains-mono-500.woff2 +0 -0
- package/fonts/jetbrains-mono-700.woff2 +0 -0
- package/index.html +4631 -0
- package/package.json +13 -10
- package/src/editor/convert-to-component.ts +1 -1
- package/src/editor/convert-to-repeater.ts +1 -1
- package/src/new-project/add-repo-modal.ts +75 -14
- package/src/new-project/new-project-modal.ts +45 -18
- package/src/panels/welcome-screen.ts +15 -1
- package/src/platforms/cloud.ts +5 -3
- package/src/studio.ts +20 -3
- package/src/types.ts +8 -0
package/dist/studio.js
CHANGED
|
@@ -194278,6 +194278,7 @@ var init_schema = __esm(() => {
|
|
|
194278
194278
|
"resolvePaths",
|
|
194279
194279
|
"lower",
|
|
194280
194280
|
"emit",
|
|
194281
|
+
"assets",
|
|
194281
194282
|
"mount",
|
|
194282
194283
|
"dialect",
|
|
194283
194284
|
"deploySchema",
|
|
@@ -227456,6 +227457,9 @@ function renderNode(def3, state, options) {
|
|
|
227456
227457
|
return renderCustomElementWithProps(def3, localState, options, path);
|
|
227457
227458
|
}
|
|
227458
227459
|
if (def3.$props) {
|
|
227460
|
+
if (tagName.includes("-")) {
|
|
227461
|
+
return renderCustomElementWithProps(def3, localState, options, path);
|
|
227462
|
+
}
|
|
227459
227463
|
const { $props: _$props, ...rest } = def3;
|
|
227460
227464
|
return renderNode(rest, mergeProps(def3, localState), options);
|
|
227461
227465
|
}
|
|
@@ -231127,7 +231131,7 @@ var init_ensure_deps = __esm(() => {
|
|
|
231127
231131
|
});
|
|
231128
231132
|
|
|
231129
231133
|
// src/version.ts
|
|
231130
|
-
var APP_NAME = "Jx Studio", VERSION = "1.
|
|
231134
|
+
var APP_NAME = "Jx Studio", VERSION = "1.5.0", BUILD_DATE = "2026-07-24T17:03:27.940Z", GIT_COMMIT = "82d8aa9", LINKS;
|
|
231131
231135
|
var init_version = __esm(() => {
|
|
231132
231136
|
LINKS = {
|
|
231133
231137
|
github: "https://github.com/jxsuite/jx",
|
|
@@ -249428,7 +249432,7 @@ function promptComponentName(defaultName) {
|
|
|
249428
249432
|
<sp-textfield
|
|
249429
249433
|
placeholder="my-component"
|
|
249430
249434
|
value=${value}
|
|
249431
|
-
?
|
|
249435
|
+
?invalid=${Boolean(error)}
|
|
249432
249436
|
@input=${onInput2}
|
|
249433
249437
|
@keydown=${onKeydown2}
|
|
249434
249438
|
${ref2((el) => {
|
|
@@ -262281,7 +262285,7 @@ async function promptRepeaterConfig(defs) {
|
|
|
262281
262285
|
size="s"
|
|
262282
262286
|
placeholder="myItems"
|
|
262283
262287
|
.value=${newDefName2}
|
|
262284
|
-
?
|
|
262288
|
+
?invalid=${Boolean(error)}
|
|
262285
262289
|
@input=${(e) => {
|
|
262286
262290
|
newDefName2 = e.target.value || "";
|
|
262287
262291
|
error = "";
|
|
@@ -295447,6 +295451,7 @@ init_parse();
|
|
|
295447
295451
|
init_platform3();
|
|
295448
295452
|
init_layers();
|
|
295449
295453
|
var _handle2 = null;
|
|
295454
|
+
var _mode = "add";
|
|
295450
295455
|
var _repos = null;
|
|
295451
295456
|
var _filter = "";
|
|
295452
295457
|
var _error = "";
|
|
@@ -295456,10 +295461,20 @@ function platformSupportsAddRepo() {
|
|
|
295456
295461
|
const platform3 = getPlatform();
|
|
295457
295462
|
return typeof platform3.listRepos === "function" && typeof platform3.importProject === "function";
|
|
295458
295463
|
}
|
|
295464
|
+
function platformUsesRepoPicker() {
|
|
295465
|
+
return getPlatform().openProjectPicker === "repo-list" && platformSupportsAddRepo();
|
|
295466
|
+
}
|
|
295459
295467
|
function openAddRepoModal() {
|
|
295468
|
+
return openPicker("add");
|
|
295469
|
+
}
|
|
295470
|
+
function openProjectPickerModal() {
|
|
295471
|
+
return openPicker("open");
|
|
295472
|
+
}
|
|
295473
|
+
function openPicker(mode) {
|
|
295460
295474
|
if (_handle2) {
|
|
295461
295475
|
return Promise.resolve(null);
|
|
295462
295476
|
}
|
|
295477
|
+
_mode = mode;
|
|
295463
295478
|
_repos = null;
|
|
295464
295479
|
_filter = "";
|
|
295465
295480
|
_error = "";
|
|
@@ -295521,7 +295536,11 @@ async function chooseRepo(repo) {
|
|
|
295521
295536
|
}
|
|
295522
295537
|
function visibleRepos() {
|
|
295523
295538
|
const query = _filter.trim().toLowerCase();
|
|
295524
|
-
|
|
295539
|
+
let repos = _repos ?? [];
|
|
295540
|
+
if (_mode === "open") {
|
|
295541
|
+
const writable = repos.filter((r) => r.permission === "admin" || r.permission === "write");
|
|
295542
|
+
repos = [...writable.filter((r) => r.isJxProject), ...writable.filter((r) => !r.isJxProject)];
|
|
295543
|
+
}
|
|
295525
295544
|
return query ? repos.filter((r) => r.fullName.toLowerCase().includes(query)) : repos;
|
|
295526
295545
|
}
|
|
295527
295546
|
function repoRowTpl(repo) {
|
|
@@ -295542,15 +295561,42 @@ function repoRowTpl(repo) {
|
|
|
295542
295561
|
</button>
|
|
295543
295562
|
`;
|
|
295544
295563
|
}
|
|
295564
|
+
function emptyTpl() {
|
|
295565
|
+
if (_filter) {
|
|
295566
|
+
return html3`<div class="add-repo-empty">No repositories match the filter.</div>`;
|
|
295567
|
+
}
|
|
295568
|
+
if (_mode === "open" && (_repos ?? []).length > 0) {
|
|
295569
|
+
return html3`<div class="add-repo-empty">
|
|
295570
|
+
No repositories with write access. Widen the Jx Suite GitHub App's repository access, or ask a
|
|
295571
|
+
repository admin for write access.
|
|
295572
|
+
</div>`;
|
|
295573
|
+
}
|
|
295574
|
+
if (needsAppInstall()) {
|
|
295575
|
+
return html3`<div class="add-repo-empty">
|
|
295576
|
+
No repositories are reachable yet.
|
|
295577
|
+
<a
|
|
295578
|
+
class="add-repo-install"
|
|
295579
|
+
href=${getAccountStatus()?.appInstallUrl ?? "#"}
|
|
295580
|
+
target="_blank"
|
|
295581
|
+
rel="noreferrer"
|
|
295582
|
+
>
|
|
295583
|
+
Install the Jx Suite GitHub App
|
|
295584
|
+
</a>
|
|
295585
|
+
to grant repository access, then reopen this dialog.
|
|
295586
|
+
</div>`;
|
|
295587
|
+
}
|
|
295588
|
+
return html3`<div class="add-repo-empty">
|
|
295589
|
+
No repositories are reachable. Install the GitHub App (or widen its repository access) and try
|
|
295590
|
+
again.
|
|
295591
|
+
</div>`;
|
|
295592
|
+
}
|
|
295545
295593
|
function bodyTpl() {
|
|
295546
295594
|
if (_repos === null) {
|
|
295547
295595
|
return html3`<div class="add-repo-empty">Loading repositories…</div>`;
|
|
295548
295596
|
}
|
|
295549
295597
|
const repos = visibleRepos();
|
|
295550
295598
|
if (repos.length === 0) {
|
|
295551
|
-
return
|
|
295552
|
-
${_filter ? "No repositories match the filter." : "No repositories are reachable. Install the GitHub App (or widen its repository access) and try again."}
|
|
295553
|
-
</div>`;
|
|
295599
|
+
return emptyTpl();
|
|
295554
295600
|
}
|
|
295555
295601
|
return html3`<div class="add-repo-list">${repos.map((repo) => repoRowTpl(repo))}</div>`;
|
|
295556
295602
|
}
|
|
@@ -295566,7 +295612,9 @@ function renderModal2() {
|
|
|
295566
295612
|
}}
|
|
295567
295613
|
>
|
|
295568
295614
|
<div class="new-project-modal-header">
|
|
295569
|
-
<h2 class="new-project-modal-title">
|
|
295615
|
+
<h2 class="new-project-modal-title">
|
|
295616
|
+
${_mode === "open" ? "Open Project" : "Add existing repository"}
|
|
295617
|
+
</h2>
|
|
295570
295618
|
<sp-action-button quiet size="s" @click=${closeAddRepoModal} title="Close">
|
|
295571
295619
|
<sp-icon-close slot="icon"></sp-icon-close>
|
|
295572
295620
|
</sp-action-button>
|
|
@@ -295629,6 +295677,20 @@ function renderWelcome(host) {
|
|
|
295629
295677
|
</svg>
|
|
295630
295678
|
New Project...
|
|
295631
295679
|
</button>
|
|
295680
|
+
<button class="welcome-action" @click=${() => ctx.openNewProject({ tab: "starter" })}>
|
|
295681
|
+
<svg
|
|
295682
|
+
class="welcome-action-icon"
|
|
295683
|
+
width="16"
|
|
295684
|
+
height="16"
|
|
295685
|
+
viewBox="0 0 16 16"
|
|
295686
|
+
fill="currentColor"
|
|
295687
|
+
>
|
|
295688
|
+
<path
|
|
295689
|
+
d="M1 1h6v6H1V1zm1 1v4h4V2H2zm7-1h6v6H9V1zm1 1v4h4V2h-4zM1 9h6v6H1V9zm1 1v4h4v-4H2zm7-1h6v6H9V9zm1 1v4h4v-4h-4z"
|
|
295690
|
+
/>
|
|
295691
|
+
</svg>
|
|
295692
|
+
Start from an Example...
|
|
295693
|
+
</button>
|
|
295632
295694
|
<button class="welcome-action" @click=${() => ctx.openProject()}>
|
|
295633
295695
|
<svg
|
|
295634
295696
|
class="welcome-action-icon"
|
|
@@ -344862,11 +344924,19 @@ var _starter = "";
|
|
|
344862
344924
|
var _agentPrompt = "";
|
|
344863
344925
|
var _paramsSeededFor = "";
|
|
344864
344926
|
var _error3 = "";
|
|
344927
|
+
var _nameError = "";
|
|
344865
344928
|
var _errorInstallUrl = "";
|
|
344866
344929
|
function captureError(error) {
|
|
344867
344930
|
_error3 = errorMessage(error);
|
|
344868
344931
|
_errorInstallUrl = installUrlOf(error) ?? "";
|
|
344869
344932
|
}
|
|
344933
|
+
function focusNameField() {
|
|
344934
|
+
requestAnimationFrame(() => {
|
|
344935
|
+
const body3 = document.querySelector(".new-project-modal-body");
|
|
344936
|
+
body3?.scrollTo?.(0, 0);
|
|
344937
|
+
body3?.querySelector("sp-textfield")?.focus?.();
|
|
344938
|
+
});
|
|
344939
|
+
}
|
|
344870
344940
|
var _creating = false;
|
|
344871
344941
|
var _starters = [];
|
|
344872
344942
|
var _resolve2 = null;
|
|
@@ -344886,7 +344956,7 @@ function credsForm2() {
|
|
|
344886
344956
|
});
|
|
344887
344957
|
return _credsForm;
|
|
344888
344958
|
}
|
|
344889
|
-
function openNewProjectModal() {
|
|
344959
|
+
function openNewProjectModal(options) {
|
|
344890
344960
|
if (_handle6) {
|
|
344891
344961
|
return Promise.resolve(null);
|
|
344892
344962
|
}
|
|
@@ -344897,13 +344967,14 @@ function openNewProjectModal() {
|
|
|
344897
344967
|
name: "",
|
|
344898
344968
|
url: ""
|
|
344899
344969
|
};
|
|
344900
|
-
_tab = "template";
|
|
344970
|
+
_tab = options?.tab ?? "template";
|
|
344901
344971
|
_step = "source";
|
|
344902
344972
|
_template = "blank";
|
|
344903
344973
|
_starter = "";
|
|
344904
344974
|
_agentPrompt = "";
|
|
344905
344975
|
_paramsSeededFor = "";
|
|
344906
344976
|
_error3 = "";
|
|
344977
|
+
_nameError = "";
|
|
344907
344978
|
_errorInstallUrl = "";
|
|
344908
344979
|
_creating = false;
|
|
344909
344980
|
_starters = [];
|
|
@@ -344978,6 +345049,9 @@ function renderModal4() {
|
|
|
344978
345049
|
};
|
|
344979
345050
|
const onInput3 = (field) => (e20) => {
|
|
344980
345051
|
_form2[field] = e20.target.value;
|
|
345052
|
+
if (field === "name") {
|
|
345053
|
+
_nameError = "";
|
|
345054
|
+
}
|
|
344981
345055
|
if (field === "name" && !_form2.directory) {
|
|
344982
345056
|
_dirDerived = true;
|
|
344983
345057
|
}
|
|
@@ -345051,12 +345125,14 @@ function renderModal4() {
|
|
|
345051
345125
|
}
|
|
345052
345126
|
_step = "source";
|
|
345053
345127
|
_error3 = "";
|
|
345128
|
+
_nameError = "";
|
|
345054
345129
|
renderModal4();
|
|
345055
345130
|
};
|
|
345056
345131
|
const onSubmit = async () => {
|
|
345057
345132
|
if (!_form2.name.trim()) {
|
|
345058
|
-
|
|
345133
|
+
_nameError = "Project name is required";
|
|
345059
345134
|
renderModal4();
|
|
345135
|
+
focusNameField();
|
|
345060
345136
|
return;
|
|
345061
345137
|
}
|
|
345062
345138
|
if (!_form2.directory.trim()) {
|
|
@@ -345064,6 +345140,7 @@ function renderModal4() {
|
|
|
345064
345140
|
}
|
|
345065
345141
|
_creating = true;
|
|
345066
345142
|
_error3 = "";
|
|
345143
|
+
_nameError = "";
|
|
345067
345144
|
renderModal4();
|
|
345068
345145
|
try {
|
|
345069
345146
|
const design = collectDesign();
|
|
@@ -345081,8 +345158,9 @@ function renderModal4() {
|
|
|
345081
345158
|
};
|
|
345082
345159
|
const onAgentSubmit = async () => {
|
|
345083
345160
|
if (!_form2.name.trim()) {
|
|
345084
|
-
|
|
345161
|
+
_nameError = "Project name is required";
|
|
345085
345162
|
renderModal4();
|
|
345163
|
+
focusNameField();
|
|
345086
345164
|
return;
|
|
345087
345165
|
}
|
|
345088
345166
|
if (!_form2.directory.trim()) {
|
|
@@ -345090,6 +345168,7 @@ function renderModal4() {
|
|
|
345090
345168
|
}
|
|
345091
345169
|
_creating = true;
|
|
345092
345170
|
_error3 = "";
|
|
345171
|
+
_nameError = "";
|
|
345093
345172
|
renderModal4();
|
|
345094
345173
|
try {
|
|
345095
345174
|
const design = collectDesign();
|
|
@@ -345193,9 +345272,12 @@ function renderModal4() {
|
|
|
345193
345272
|
<sp-textfield
|
|
345194
345273
|
placeholder="My Site"
|
|
345195
345274
|
.value=${_form2.name}
|
|
345275
|
+
?invalid=${Boolean(_nameError)}
|
|
345196
345276
|
@input=${onInput3("name")}
|
|
345197
345277
|
style="width: 100%"
|
|
345198
|
-
|
|
345278
|
+
>
|
|
345279
|
+
${_nameError ? html3`<sp-help-text slot="negative-help-text">${_nameError}</sp-help-text>` : ""}
|
|
345280
|
+
</sp-textfield>
|
|
345199
345281
|
</label>
|
|
345200
345282
|
|
|
345201
345283
|
<label class="new-project-field">
|
|
@@ -345311,15 +345393,13 @@ function renderModal4() {
|
|
|
345311
345393
|
</sp-tabs>
|
|
345312
345394
|
</div>
|
|
345313
345395
|
` : ""}
|
|
345314
|
-
<div class="new-project-modal-body">
|
|
345315
|
-
|
|
345316
|
-
|
|
345317
|
-
|
|
345318
|
-
|
|
345319
|
-
|
|
345320
|
-
|
|
345321
|
-
</div>` : ""}
|
|
345322
|
-
</div>
|
|
345396
|
+
<div class="new-project-modal-body">${bodyTpl3()}</div>
|
|
345397
|
+
${_tab !== "import" && _error3 ? html3`<div class="new-project-error new-project-error--global">
|
|
345398
|
+
${_error3}
|
|
345399
|
+
${_errorInstallUrl ? html3`<a href=${_errorInstallUrl} target="_blank" rel="noreferrer">
|
|
345400
|
+
Install the Jx Suite GitHub App →
|
|
345401
|
+
</a>` : ""}
|
|
345402
|
+
</div>` : ""}
|
|
345323
345403
|
<div class="new-project-modal-footer">${footerTpl()}</div>
|
|
345324
345404
|
</div>
|
|
345325
345405
|
`;
|
|
@@ -352082,8 +352162,8 @@ initWelcome({
|
|
|
352082
352162
|
}
|
|
352083
352163
|
},
|
|
352084
352164
|
cloneRepository: () => cloneRepository({ openRecentProject }),
|
|
352085
|
-
openNewProject: async () => {
|
|
352086
|
-
const result = await openNewProjectModal();
|
|
352165
|
+
openNewProject: async (options) => {
|
|
352166
|
+
const result = await openNewProjectModal(options);
|
|
352087
352167
|
if (result) {
|
|
352088
352168
|
openRecentProject(result.root);
|
|
352089
352169
|
}
|
|
@@ -352339,6 +352419,16 @@ function loadProject2() {
|
|
|
352339
352419
|
return loadProject();
|
|
352340
352420
|
}
|
|
352341
352421
|
async function openProject2() {
|
|
352422
|
+
if (platformUsesRepoPicker()) {
|
|
352423
|
+
const picked = await openProjectPickerModal();
|
|
352424
|
+
if (picked) {
|
|
352425
|
+
hydrateProjectList().then(() => {
|
|
352426
|
+
render3();
|
|
352427
|
+
});
|
|
352428
|
+
openRecentProject(picked.root);
|
|
352429
|
+
}
|
|
352430
|
+
return;
|
|
352431
|
+
}
|
|
352342
352432
|
const result = await openProject({
|
|
352343
352433
|
renderActivityBar: () => renderActivityBar(),
|
|
352344
352434
|
renderLeftPanel
|
|
@@ -352440,5 +352530,5 @@ export {
|
|
|
352440
352530
|
hasUnsavedTabs
|
|
352441
352531
|
};
|
|
352442
352532
|
|
|
352443
|
-
//# debugId=
|
|
352533
|
+
//# debugId=BBAFA6ECC427CD4564756E2164756E21
|
|
352444
352534
|
//# sourceMappingURL=studio.js.map
|