|
|
|
|
@ -113,7 +113,7 @@ export class DrawerProvider {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
readonly opts: DrawerOpts;
|
|
|
|
|
readonly soma = Soma.get();
|
|
|
|
|
readonly soma: Soma;
|
|
|
|
|
readonly runtime: SomaRuntime;
|
|
|
|
|
readonly runtimePart: SomaRuntimePart;
|
|
|
|
|
|
|
|
|
|
@ -138,7 +138,7 @@ export class DrawerProvider {
|
|
|
|
|
private overlayRef = state<HTMLElement | null>(null);
|
|
|
|
|
|
|
|
|
|
readonly resolvedSide = $derived.by((): DrawerSide => {
|
|
|
|
|
const dir = this.soma?.prefs.getDir() ?? 'ltr';
|
|
|
|
|
const dir = this.soma.prefs.getDir();
|
|
|
|
|
return resolveDirection(this.opts.direction.current, dir);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@ -195,8 +195,8 @@ export class DrawerProvider {
|
|
|
|
|
// `data-dragging` on Content props.
|
|
|
|
|
const noop = () => {};
|
|
|
|
|
|
|
|
|
|
const soma = Soma.require();
|
|
|
|
|
this.runtime = soma.runtime(drawerMorfo, {
|
|
|
|
|
this.soma = Soma.require();
|
|
|
|
|
this.runtime = this.soma.runtime(drawerMorfo, {
|
|
|
|
|
// 'persistent' forces open=true so eidos can render the layout
|
|
|
|
|
// drawer without the consumer needing to bind `open`. The morfo
|
|
|
|
|
// state is read once per tick so the override is reactive.
|
|
|
|
|
@ -480,7 +480,7 @@ export class DrawerContentProvider {
|
|
|
|
|
// ── Text selection ───────────────────────────────────────────────────
|
|
|
|
|
this.textSelection = TextSelection.use({
|
|
|
|
|
ref: readableActive(() => opts.ref.current),
|
|
|
|
|
dom: Soma.require().dom,
|
|
|
|
|
dom: this.provider.soma.dom,
|
|
|
|
|
enabled: readableActive(() => this.provider.opts.open.current),
|
|
|
|
|
onPointerDown: readableActive(() => () => {}),
|
|
|
|
|
onPointerUp: readableActive(() => () => {})
|
|
|
|
|
|