@rogieking/figui3 6.9.5 → 6.9.6
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/README.md +34 -0
- package/components.css +19 -5
- package/dist/components.css +1 -1
- package/dist/fig-lab.css +1 -1
- package/dist/fig-lab.js +41 -5
- package/dist/fig.css +1 -1
- package/dist/fig.js +11 -11
- package/fig-lab.css +161 -9
- package/fig-lab.js +821 -0
- package/fig.js +13 -5
- package/package.json +1 -1
package/fig.js
CHANGED
|
@@ -11060,7 +11060,14 @@ class FigMedia extends HTMLElement {
|
|
|
11060
11060
|
}
|
|
11061
11061
|
|
|
11062
11062
|
#ensureControls() {
|
|
11063
|
-
|
|
11063
|
+
const generatedControls = Array.from(
|
|
11064
|
+
this.querySelectorAll(":scope > fig-media-controls[data-generated]"),
|
|
11065
|
+
);
|
|
11066
|
+
const existingControls = generatedControls[0];
|
|
11067
|
+
generatedControls.slice(1).forEach((controls) => controls.remove());
|
|
11068
|
+
|
|
11069
|
+
if (existingControls) {
|
|
11070
|
+
this.#controlsEl = existingControls;
|
|
11064
11071
|
this.#wireControlsToMedia();
|
|
11065
11072
|
return;
|
|
11066
11073
|
}
|
|
@@ -11157,10 +11164,9 @@ class FigMedia extends HTMLElement {
|
|
|
11157
11164
|
|
|
11158
11165
|
#removeControls() {
|
|
11159
11166
|
this.#unwireControls();
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
}
|
|
11167
|
+
this.querySelectorAll(":scope > fig-media-controls[data-generated]").forEach((controls) => {
|
|
11168
|
+
controls.remove();
|
|
11169
|
+
});
|
|
11164
11170
|
this.#controlsEl = null;
|
|
11165
11171
|
}
|
|
11166
11172
|
|
|
@@ -12944,6 +12950,7 @@ class FigEasingCurve extends HTMLElement {
|
|
|
12944
12950
|
#startSpringDrag(e, handleType) {
|
|
12945
12951
|
e.preventDefault();
|
|
12946
12952
|
this.#isDragging = handleType;
|
|
12953
|
+
this.classList.toggle("spring-bounce-dragging", handleType === "bounce");
|
|
12947
12954
|
|
|
12948
12955
|
const startDamping = this.#spring.damping;
|
|
12949
12956
|
const startStiffness = this.#spring.stiffness;
|
|
@@ -12981,6 +12988,7 @@ class FigEasingCurve extends HTMLElement {
|
|
|
12981
12988
|
|
|
12982
12989
|
const onUp = () => {
|
|
12983
12990
|
this.#isDragging = null;
|
|
12991
|
+
this.classList.remove("spring-bounce-dragging");
|
|
12984
12992
|
document.removeEventListener("pointermove", onMove);
|
|
12985
12993
|
document.removeEventListener("pointerup", onUp);
|
|
12986
12994
|
this.#emit("change");
|
package/package.json
CHANGED