@rogieking/figui3 2.18.2 → 2.18.3
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/fig.js +18 -4
- package/package.json +1 -1
package/fig.js
CHANGED
|
@@ -3883,14 +3883,22 @@ class FigInputFill extends HTMLElement {
|
|
|
3883
3883
|
);
|
|
3884
3884
|
}
|
|
3885
3885
|
break;
|
|
3886
|
-
case "gradient":
|
|
3886
|
+
case "gradient": {
|
|
3887
3887
|
if (this.#opacityInput) {
|
|
3888
3888
|
this.#opacityInput.setAttribute(
|
|
3889
3889
|
"value",
|
|
3890
3890
|
this.#gradient.stops[0]?.opacity ?? 100
|
|
3891
3891
|
);
|
|
3892
3892
|
}
|
|
3893
|
+
const label = this.querySelector(".fig-input-fill-label");
|
|
3894
|
+
if (label) {
|
|
3895
|
+
const newLabel =
|
|
3896
|
+
this.#gradient.type.charAt(0).toUpperCase() +
|
|
3897
|
+
this.#gradient.type.slice(1);
|
|
3898
|
+
label.textContent = newLabel;
|
|
3899
|
+
}
|
|
3893
3900
|
break;
|
|
3901
|
+
}
|
|
3894
3902
|
case "image":
|
|
3895
3903
|
if (this.#opacityInput) {
|
|
3896
3904
|
this.#opacityInput.setAttribute(
|
|
@@ -6915,10 +6923,12 @@ class FigFillPicker extends HTMLElement {
|
|
|
6915
6923
|
// ============ IMAGE TAB ============
|
|
6916
6924
|
#initImageTab() {
|
|
6917
6925
|
const container = this.#dialog.querySelector('[data-tab="image"]');
|
|
6926
|
+
const experimental = this.getAttribute("experimental");
|
|
6927
|
+
const expAttr = experimental ? `experimental="${experimental}"` : "";
|
|
6918
6928
|
|
|
6919
6929
|
container.innerHTML = `
|
|
6920
6930
|
<div class="fig-fill-picker-media-header">
|
|
6921
|
-
<fig-dropdown class="fig-fill-picker-scale-mode" value="${
|
|
6931
|
+
<fig-dropdown class="fig-fill-picker-scale-mode" ${expAttr} value="${
|
|
6922
6932
|
this.#image.scaleMode
|
|
6923
6933
|
}">
|
|
6924
6934
|
<option value="fill" selected>Fill</option>
|
|
@@ -7067,10 +7077,12 @@ class FigFillPicker extends HTMLElement {
|
|
|
7067
7077
|
// ============ VIDEO TAB ============
|
|
7068
7078
|
#initVideoTab() {
|
|
7069
7079
|
const container = this.#dialog.querySelector('[data-tab="video"]');
|
|
7080
|
+
const experimental = this.getAttribute("experimental");
|
|
7081
|
+
const expAttr = experimental ? `experimental="${experimental}"` : "";
|
|
7070
7082
|
|
|
7071
7083
|
container.innerHTML = `
|
|
7072
7084
|
<div class="fig-fill-picker-media-header">
|
|
7073
|
-
<fig-dropdown class="fig-fill-picker-scale-mode" value="${
|
|
7085
|
+
<fig-dropdown class="fig-fill-picker-scale-mode" ${expAttr} value="${
|
|
7074
7086
|
this.#video.scaleMode
|
|
7075
7087
|
}">
|
|
7076
7088
|
<option value="fill" selected>Fill</option>
|
|
@@ -7156,6 +7168,8 @@ class FigFillPicker extends HTMLElement {
|
|
|
7156
7168
|
// ============ WEBCAM TAB ============
|
|
7157
7169
|
#initWebcamTab() {
|
|
7158
7170
|
const container = this.#dialog.querySelector('[data-tab="webcam"]');
|
|
7171
|
+
const experimental = this.getAttribute("experimental");
|
|
7172
|
+
const expAttr = experimental ? `experimental="${experimental}"` : "";
|
|
7159
7173
|
|
|
7160
7174
|
container.innerHTML = `
|
|
7161
7175
|
<div class="fig-fill-picker-webcam-preview">
|
|
@@ -7166,7 +7180,7 @@ class FigFillPicker extends HTMLElement {
|
|
|
7166
7180
|
</div>
|
|
7167
7181
|
</div>
|
|
7168
7182
|
<div class="fig-fill-picker-webcam-controls">
|
|
7169
|
-
<fig-dropdown class="fig-fill-picker-camera-select" style="display: none;">
|
|
7183
|
+
<fig-dropdown class="fig-fill-picker-camera-select" ${expAttr} style="display: none;">
|
|
7170
7184
|
</fig-dropdown>
|
|
7171
7185
|
<fig-button class="fig-fill-picker-webcam-capture" variant="primary">
|
|
7172
7186
|
Capture
|
package/package.json
CHANGED