INIT
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m11s

This commit is contained in:
eewing
2026-02-18 15:17:47 -06:00
parent e74c106f85
commit ec317eb17c
11532 changed files with 1631690 additions and 1 deletions
+29
View File
@@ -0,0 +1,29 @@
import { attachRef } from "svelte-toolbelt";
import { createBitsAttrs } from "../../internal/attrs.js";
const aspectRatioAttrs = createBitsAttrs({
component: "aspect-ratio",
parts: ["root"],
});
export class AspectRatioRootState {
static create(opts) {
return new AspectRatioRootState(opts);
}
opts;
attachment;
constructor(opts) {
this.opts = opts;
this.attachment = attachRef(this.opts.ref);
}
props = $derived.by(() => ({
id: this.opts.id.current,
style: {
position: "absolute",
top: 0,
right: 0,
bottom: 0,
left: 0,
},
[aspectRatioAttrs.root]: "",
...this.attachment,
}));
}