@portel/photon 1.17.3 → 1.17.4
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/beam-form.bundle.js +21 -8
- package/dist/beam-form.bundle.js.map +2 -2
- package/dist/beam.bundle.js +47 -16
- package/dist/beam.bundle.js.map +2 -2
- package/package.json +2 -2
package/dist/beam.bundle.js
CHANGED
|
@@ -18147,6 +18147,7 @@ var theme = i`
|
|
|
18147
18147
|
border: 1px solid var(--border-glass);
|
|
18148
18148
|
border-radius: var(--radius-md);
|
|
18149
18149
|
box-shadow: var(--shadow-sm);
|
|
18150
|
+
color: inherit;
|
|
18150
18151
|
}
|
|
18151
18152
|
|
|
18152
18153
|
.text-gradient {
|
|
@@ -18188,21 +18189,25 @@ var theme = i`
|
|
|
18188
18189
|
border-radius: var(--radius-xs);
|
|
18189
18190
|
}
|
|
18190
18191
|
|
|
18191
|
-
/* Scrollbar */
|
|
18192
|
+
/* Scrollbar — thin, translucent, doesn't crowd content */
|
|
18193
|
+
* {
|
|
18194
|
+
scrollbar-width: thin;
|
|
18195
|
+
scrollbar-color: color-mix(in srgb, var(--t-muted, #888) 30%, transparent) transparent;
|
|
18196
|
+
}
|
|
18192
18197
|
::-webkit-scrollbar {
|
|
18193
|
-
width:
|
|
18194
|
-
height:
|
|
18198
|
+
width: 6px;
|
|
18199
|
+
height: 6px;
|
|
18195
18200
|
}
|
|
18196
18201
|
::-webkit-scrollbar-track {
|
|
18197
18202
|
background: transparent;
|
|
18203
|
+
margin: 4px 0;
|
|
18198
18204
|
}
|
|
18199
18205
|
::-webkit-scrollbar-thumb {
|
|
18200
|
-
background: var(--
|
|
18201
|
-
border-radius: var(--radius-
|
|
18206
|
+
background: color-mix(in srgb, var(--t-muted) 30%, transparent);
|
|
18207
|
+
border-radius: var(--radius-full);
|
|
18202
18208
|
}
|
|
18203
18209
|
::-webkit-scrollbar-thumb:hover {
|
|
18204
|
-
background: var(--t-muted);
|
|
18205
|
-
opacity: 0.5;
|
|
18210
|
+
background: color-mix(in srgb, var(--t-muted) 60%, transparent);
|
|
18206
18211
|
}
|
|
18207
18212
|
/* Toggle Switch */
|
|
18208
18213
|
.switch {
|
|
@@ -26501,7 +26506,9 @@ ${photon.errorMessage || "Unknown error"}</pre
|
|
|
26501
26506
|
_renderMethodBody(opts) {
|
|
26502
26507
|
const hasParams = !!opts.method?.params?.properties && Object.keys(opts.method.params.properties).length > 0;
|
|
26503
26508
|
return b2`
|
|
26504
|
-
<div
|
|
26509
|
+
<div
|
|
26510
|
+
style="display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable;"
|
|
26511
|
+
>
|
|
26505
26512
|
${opts.appSurface ? "" : this._renderDescription(opts.method.description)}
|
|
26506
26513
|
${opts.appSurface && !hasParams ? "" : b2`
|
|
26507
26514
|
<invoke-form
|
|
@@ -26518,8 +26525,9 @@ ${photon.errorMessage || "Unknown error"}</pre
|
|
|
26518
26525
|
<div class="form-chrome">
|
|
26519
26526
|
${hasParams ? b2`<button
|
|
26520
26527
|
class="btn-secondary"
|
|
26521
|
-
@click=${() => {
|
|
26522
|
-
const
|
|
26528
|
+
@click=${(e8) => {
|
|
26529
|
+
const panel = e8.target.closest(".method-detail");
|
|
26530
|
+
const form = panel?.querySelector("invoke-form");
|
|
26523
26531
|
form?.handleCancel();
|
|
26524
26532
|
}}
|
|
26525
26533
|
?disabled=${opts.executing}
|
|
@@ -26528,8 +26536,9 @@ ${photon.errorMessage || "Unknown error"}</pre
|
|
|
26528
26536
|
</button>` : ""}
|
|
26529
26537
|
<button
|
|
26530
26538
|
class="btn-primary"
|
|
26531
|
-
@click=${() => {
|
|
26532
|
-
const
|
|
26539
|
+
@click=${(e8) => {
|
|
26540
|
+
const panel = e8.target.closest(".method-detail");
|
|
26541
|
+
const form = panel?.querySelector("invoke-form");
|
|
26533
26542
|
form?.handleSubmit();
|
|
26534
26543
|
}}
|
|
26535
26544
|
?disabled=${opts.executing}
|
|
@@ -28825,6 +28834,7 @@ BeamApp.styles = [
|
|
|
28825
28834
|
overflow-y: auto;
|
|
28826
28835
|
overflow-x: hidden;
|
|
28827
28836
|
padding: var(--space-lg);
|
|
28837
|
+
scrollbar-gutter: stable;
|
|
28828
28838
|
}
|
|
28829
28839
|
|
|
28830
28840
|
/* Page transition when switching photons */
|
|
@@ -31190,6 +31200,8 @@ BeamSidebar.styles = [
|
|
|
31190
31200
|
.sidebar-content {
|
|
31191
31201
|
flex: 1;
|
|
31192
31202
|
overflow-y: auto;
|
|
31203
|
+
padding-right: 4px;
|
|
31204
|
+
scrollbar-gutter: stable;
|
|
31193
31205
|
}
|
|
31194
31206
|
|
|
31195
31207
|
.empty-state {
|
|
@@ -32975,7 +32987,15 @@ var InvokeForm = class extends i4 {
|
|
|
32975
32987
|
return b2`<div class="form-container"></div>`;
|
|
32976
32988
|
}
|
|
32977
32989
|
return b2`
|
|
32978
|
-
<div
|
|
32990
|
+
<div
|
|
32991
|
+
class="form-container"
|
|
32992
|
+
@keydown=${(e8) => {
|
|
32993
|
+
if (e8.key === "Enter" && !e8.shiftKey && !e8.target?.matches("textarea")) {
|
|
32994
|
+
e8.preventDefault();
|
|
32995
|
+
this.handleSubmit();
|
|
32996
|
+
}
|
|
32997
|
+
}}
|
|
32998
|
+
>
|
|
32979
32999
|
${this._viewMode === "form" ? this._renderFields() : this._renderJsonEditor()}
|
|
32980
33000
|
</div>
|
|
32981
33001
|
`;
|
|
@@ -36397,7 +36417,7 @@ var ResultViewer = class extends i4 {
|
|
|
36397
36417
|
case "mermaid":
|
|
36398
36418
|
return typeof data === "string";
|
|
36399
36419
|
case "markdown":
|
|
36400
|
-
return typeof data === "string";
|
|
36420
|
+
return typeof data === "string" || Array.isArray(data) && data.every((i7) => typeof i7 === "string");
|
|
36401
36421
|
case "slides":
|
|
36402
36422
|
return typeof data === "string";
|
|
36403
36423
|
case "checklist":
|
|
@@ -36431,8 +36451,10 @@ var ResultViewer = class extends i4 {
|
|
|
36431
36451
|
return this._renderChips(filteredData);
|
|
36432
36452
|
case "tree":
|
|
36433
36453
|
return this._renderTree(filteredData);
|
|
36434
|
-
case "markdown":
|
|
36435
|
-
|
|
36454
|
+
case "markdown": {
|
|
36455
|
+
const mdData = Array.isArray(filteredData) ? filteredData.join("\n\n---\n\n") : filteredData;
|
|
36456
|
+
return this._renderMarkdown(mdData);
|
|
36457
|
+
}
|
|
36436
36458
|
case "html":
|
|
36437
36459
|
return this._renderHtml(filteredData);
|
|
36438
36460
|
case "text":
|
|
@@ -42976,15 +42998,24 @@ ResultViewer.styles = [
|
|
|
42976
42998
|
|
|
42977
42999
|
.dashboard-panel-content {
|
|
42978
43000
|
padding: var(--space-xs);
|
|
43001
|
+
display: flex;
|
|
43002
|
+
align-items: center;
|
|
43003
|
+
justify-content: center;
|
|
43004
|
+
text-align: center;
|
|
42979
43005
|
}
|
|
42980
43006
|
|
|
42981
43007
|
.dashboard-panel .chart-container {
|
|
42982
43008
|
max-height: 250px;
|
|
43009
|
+
width: 100%;
|
|
42983
43010
|
display: flex;
|
|
42984
43011
|
justify-content: center;
|
|
42985
43012
|
align-items: center;
|
|
42986
43013
|
}
|
|
42987
43014
|
|
|
43015
|
+
.dashboard-panel .table-wrapper {
|
|
43016
|
+
width: 100%;
|
|
43017
|
+
}
|
|
43018
|
+
|
|
42988
43019
|
.dashboard-panel .chart-container canvas {
|
|
42989
43020
|
max-width: 100%;
|
|
42990
43021
|
max-height: 230px;
|