@portel/photon 1.10.0 → 1.11.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/beam.bundle.js +49 -42
- package/dist/beam.bundle.js.map +4 -4
- package/dist/loader.d.ts +17 -0
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +92 -0
- package/dist/loader.js.map +1 -1
- package/package.json +1 -1
package/dist/beam.bundle.js
CHANGED
|
@@ -15825,42 +15825,6 @@ var iconPaths = {
|
|
|
15825
15825
|
clone: `<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>`
|
|
15826
15826
|
};
|
|
15827
15827
|
|
|
15828
|
-
// src/auto-ui/frontend/utils/format-label.ts
|
|
15829
|
-
function formatLabel(name2) {
|
|
15830
|
-
if (!name2) return name2;
|
|
15831
|
-
let cleaned = name2.replace(/^_+/, "");
|
|
15832
|
-
let spaced = cleaned.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2");
|
|
15833
|
-
spaced = spaced.replace(/[_-]+/g, " ");
|
|
15834
|
-
let result = spaced.split(/\s+/).map((word) => {
|
|
15835
|
-
if (!word) return "";
|
|
15836
|
-
const upper = word.toUpperCase();
|
|
15837
|
-
if ([
|
|
15838
|
-
"AI",
|
|
15839
|
-
"ID",
|
|
15840
|
-
"IDS",
|
|
15841
|
-
"URL",
|
|
15842
|
-
"API",
|
|
15843
|
-
"UI",
|
|
15844
|
-
"IP",
|
|
15845
|
-
"HTTP",
|
|
15846
|
-
"HTTPS",
|
|
15847
|
-
"JSON",
|
|
15848
|
-
"XML",
|
|
15849
|
-
"HTML",
|
|
15850
|
-
"CSS",
|
|
15851
|
-
"SQL",
|
|
15852
|
-
"MCP",
|
|
15853
|
-
"SSH",
|
|
15854
|
-
"CLI"
|
|
15855
|
-
].includes(upper)) {
|
|
15856
|
-
if (upper === "IDS") return "IDs";
|
|
15857
|
-
return upper;
|
|
15858
|
-
}
|
|
15859
|
-
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
15860
|
-
}).join(" ");
|
|
15861
|
-
return result;
|
|
15862
|
-
}
|
|
15863
|
-
|
|
15864
15828
|
// node_modules/@portel/photon-core/dist/design-system/oklch.js
|
|
15865
15829
|
function oklchToSRGB(L3, C3, H3) {
|
|
15866
15830
|
const hRad = H3 * Math.PI / 180;
|
|
@@ -20888,7 +20852,7 @@ ${photon.errorMessage || "Unknown error"}</pre
|
|
|
20888
20852
|
label: this._currentInstance !== "default" ? `${this._selectedPhoton.name}:${this._currentInstance}` : this._selectedPhoton.name,
|
|
20889
20853
|
action: "back"
|
|
20890
20854
|
},
|
|
20891
|
-
{ label:
|
|
20855
|
+
{ label: this._selectedMethod.name }
|
|
20892
20856
|
]}
|
|
20893
20857
|
.live=${this._currentCollectionName !== null}
|
|
20894
20858
|
.showEdit=${false}
|
|
@@ -20916,7 +20880,7 @@ ${photon.errorMessage || "Unknown error"}</pre
|
|
|
20916
20880
|
label: this._currentInstance !== "default" ? `${this._selectedPhoton.name}:${this._currentInstance}` : this._selectedPhoton.name,
|
|
20917
20881
|
action: "back"
|
|
20918
20882
|
},
|
|
20919
|
-
{ label:
|
|
20883
|
+
{ label: this._selectedMethod.name }
|
|
20920
20884
|
]}
|
|
20921
20885
|
.live=${this._currentCollectionName !== null}
|
|
20922
20886
|
.showEdit=${false}
|
|
@@ -21250,7 +21214,7 @@ ${photon.errorMessage || "Unknown error"}</pre
|
|
|
21250
21214
|
}
|
|
21251
21215
|
return b2`
|
|
21252
21216
|
<div class="glass-panel method-detail">
|
|
21253
|
-
<h2>${
|
|
21217
|
+
<h2>${this._selectedMethod.name}</h2>
|
|
21254
21218
|
${this._renderDescription(this._selectedMethod.description)}
|
|
21255
21219
|
<invoke-form
|
|
21256
21220
|
.params=${this._selectedMethod.params}
|
|
@@ -25791,6 +25755,7 @@ var MethodCard = class extends i4 {
|
|
|
25791
25755
|
const isThrottled = !!this.method.throttled;
|
|
25792
25756
|
const isDebounced = !!this.method.debounced;
|
|
25793
25757
|
const isQueued = !!this.method.queued;
|
|
25758
|
+
const emitsEvent = !!this.method.emitsEvent;
|
|
25794
25759
|
const isTyped = isAutorun || isWebhook || isCron || isLocked || isDeprecated;
|
|
25795
25760
|
const typeAccent = isDeprecated ? "hsl(0, 0%, 50%)" : isWebhook ? "hsl(45, 80%, 50%)" : isCron ? "hsl(215, 80%, 60%)" : isLocked ? "hsl(0, 65%, 55%)" : isAutorun ? "hsl(160, 60%, 45%)" : "";
|
|
25796
25761
|
return b2`
|
|
@@ -25817,8 +25782,7 @@ var MethodCard = class extends i4 {
|
|
|
25817
25782
|
` : ""}
|
|
25818
25783
|
<span class="editable">
|
|
25819
25784
|
<h3 class="title">
|
|
25820
|
-
<span class="title-name">${
|
|
25821
|
-
>${this._renderParamSignature()}
|
|
25785
|
+
<span class="title-name">${this.method.name}</span>${this._renderParamSignature()}
|
|
25822
25786
|
</h3>
|
|
25823
25787
|
<span
|
|
25824
25788
|
class="edit-pencil"
|
|
@@ -25859,6 +25823,12 @@ var MethodCard = class extends i4 {
|
|
|
25859
25823
|
style="background:hsla(200,70%,50%,0.15);color:hsl(200,70%,60%)"
|
|
25860
25824
|
>Queued</span
|
|
25861
25825
|
>` : ""}
|
|
25826
|
+
${emitsEvent ? b2`<span
|
|
25827
|
+
class="badge"
|
|
25828
|
+
style="background:hsla(100,70%,50%,0.15);color:hsl(100,70%,60%)"
|
|
25829
|
+
title="Automatically emits event: ${this.method.eventName}"
|
|
25830
|
+
>📡 Event</span
|
|
25831
|
+
>` : ""}
|
|
25862
25832
|
</div>
|
|
25863
25833
|
${this._editingDescription ? b2`
|
|
25864
25834
|
<div class="description editing" @click=${(e8) => e8.stopPropagation()}>
|
|
@@ -26466,6 +26436,42 @@ MethodCard = __decorateClass([
|
|
|
26466
26436
|
// node_modules/lit-html/directives/if-defined.js
|
|
26467
26437
|
var o8 = (o9) => o9 ?? A;
|
|
26468
26438
|
|
|
26439
|
+
// src/auto-ui/frontend/utils/format-label.ts
|
|
26440
|
+
function formatLabel(name2) {
|
|
26441
|
+
if (!name2) return name2;
|
|
26442
|
+
let cleaned = name2.replace(/^_+/, "");
|
|
26443
|
+
let spaced = cleaned.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2");
|
|
26444
|
+
spaced = spaced.replace(/[_-]+/g, " ");
|
|
26445
|
+
let result = spaced.split(/\s+/).map((word) => {
|
|
26446
|
+
if (!word) return "";
|
|
26447
|
+
const upper = word.toUpperCase();
|
|
26448
|
+
if ([
|
|
26449
|
+
"AI",
|
|
26450
|
+
"ID",
|
|
26451
|
+
"IDS",
|
|
26452
|
+
"URL",
|
|
26453
|
+
"API",
|
|
26454
|
+
"UI",
|
|
26455
|
+
"IP",
|
|
26456
|
+
"HTTP",
|
|
26457
|
+
"HTTPS",
|
|
26458
|
+
"JSON",
|
|
26459
|
+
"XML",
|
|
26460
|
+
"HTML",
|
|
26461
|
+
"CSS",
|
|
26462
|
+
"SQL",
|
|
26463
|
+
"MCP",
|
|
26464
|
+
"SSH",
|
|
26465
|
+
"CLI"
|
|
26466
|
+
].includes(upper)) {
|
|
26467
|
+
if (upper === "IDS") return "IDs";
|
|
26468
|
+
return upper;
|
|
26469
|
+
}
|
|
26470
|
+
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
26471
|
+
}).join(" ");
|
|
26472
|
+
return result;
|
|
26473
|
+
}
|
|
26474
|
+
|
|
26469
26475
|
// src/auto-ui/frontend/components/invoke-form.ts
|
|
26470
26476
|
function capitalizeEnumValue(val) {
|
|
26471
26477
|
return formatLabel(val);
|
|
@@ -27974,6 +27980,7 @@ InvokeForm.styles = [
|
|
|
27974
27980
|
text-align: right;
|
|
27975
27981
|
font-size: var(--text-sm);
|
|
27976
27982
|
padding: 4px 8px;
|
|
27983
|
+
border: 1px solid rgba(255, 255, 255, 0.08) !important;
|
|
27977
27984
|
}
|
|
27978
27985
|
|
|
27979
27986
|
.range-labels {
|
|
@@ -84519,7 +84526,7 @@ var InstancePanel = class extends i4 {
|
|
|
84519
84526
|
return b2`
|
|
84520
84527
|
<button
|
|
84521
84528
|
class="instance-pill"
|
|
84522
|
-
@click=${() => this._toggle()}
|
|
84529
|
+
@click=${(e8) => this._toggle(e8)}
|
|
84523
84530
|
title="Instances are separate data containers — like multiple accounts in the same app. Click to switch."
|
|
84524
84531
|
aria-label="Current instance: ${display}"
|
|
84525
84532
|
aria-haspopup="true"
|