bits-ui 1.4.5 → 1.4.7
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.
|
@@ -615,7 +615,7 @@ class CommandGroupContainerState {
|
|
|
615
615
|
constructor(opts, root) {
|
|
616
616
|
this.opts = opts;
|
|
617
617
|
this.root = root;
|
|
618
|
-
this.trueValue = opts.value.current;
|
|
618
|
+
this.trueValue = opts.value.current ?? opts.id.current;
|
|
619
619
|
useRefById({
|
|
620
620
|
...opts,
|
|
621
621
|
deps: () => this.shouldRender,
|
|
@@ -15,10 +15,9 @@
|
|
|
15
15
|
|
|
16
16
|
useTextSelectionLayer({
|
|
17
17
|
id: box.with(() => id),
|
|
18
|
-
preventOverflowTextSelection: box.with(() => preventOverflowTextSelection),
|
|
19
18
|
onPointerDown: box.with(() => onPointerDown),
|
|
20
19
|
onPointerUp: box.with(() => onPointerUp),
|
|
21
|
-
enabled: box.with(() => enabled),
|
|
20
|
+
enabled: box.with(() => enabled && preventOverflowTextSelection),
|
|
22
21
|
});
|
|
23
22
|
</script>
|
|
24
23
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { TextSelectionLayerImplProps } from "./types.js";
|
|
2
2
|
import type { ReadableBoxedValues } from "../../../internal/box.svelte.js";
|
|
3
|
-
type
|
|
3
|
+
type TextSelectionLayerStateProps = ReadableBoxedValues<Required<Omit<TextSelectionLayerImplProps, "children" | "preventOverflowTextSelection">>>;
|
|
4
4
|
export declare class TextSelectionLayerState {
|
|
5
5
|
#private;
|
|
6
|
-
readonly opts:
|
|
7
|
-
constructor(opts:
|
|
6
|
+
readonly opts: TextSelectionLayerStateProps;
|
|
7
|
+
constructor(opts: TextSelectionLayerStateProps);
|
|
8
8
|
}
|
|
9
|
-
export declare function useTextSelectionLayer(props:
|
|
9
|
+
export declare function useTextSelectionLayer(props: TextSelectionLayerStateProps): TextSelectionLayerState;
|
|
10
10
|
export {};
|