@kyro-cms/admin 0.11.1 → 0.11.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/dist/index.cjs +7 -7
- package/dist/index.js +7 -7
- package/package.json +1 -1
- package/src/components/fields/BlocksField.tsx +9 -2
package/package.json
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
DndContext,
|
|
19
19
|
closestCenter,
|
|
20
20
|
PointerSensor,
|
|
21
|
+
TouchSensor,
|
|
21
22
|
useSensor,
|
|
22
23
|
useSensors,
|
|
23
24
|
KeyboardSensor,
|
|
@@ -131,7 +132,7 @@ const SortableBlockComponent = ({
|
|
|
131
132
|
}`}
|
|
132
133
|
>
|
|
133
134
|
<div
|
|
134
|
-
className="absolute left-0.5 top-1/2 -translate-y-1/2 p-0.5 cursor-grab active:cursor-grabbing text-[var(--kyro-text-muted)] opacity-0 group-hover:opacity-100 transition-opacity hover:bg-[var(--kyro-surface-accent)] rounded"
|
|
135
|
+
className="absolute left-0.5 top-1/2 -translate-y-1/2 p-0.5 cursor-grab active:cursor-grabbing text-[var(--kyro-text-muted)] opacity-0 group-hover:opacity-100 transition-opacity hover:bg-[var(--kyro-surface-accent)] rounded touch-none"
|
|
135
136
|
{...attributes}
|
|
136
137
|
{...listeners}
|
|
137
138
|
onClick={(e) => e.stopPropagation()}
|
|
@@ -244,7 +245,7 @@ const SortableBlockComponent = ({
|
|
|
244
245
|
}`}
|
|
245
246
|
>
|
|
246
247
|
<div
|
|
247
|
-
className="p-1 cursor-grab active:cursor-grabbing text-[var(--kyro-text-muted)] hover:bg-[var(--kyro-surface-accent)] rounded flex-shrink-0"
|
|
248
|
+
className="p-1 cursor-grab active:cursor-grabbing text-[var(--kyro-text-muted)] hover:bg-[var(--kyro-surface-accent)] rounded flex-shrink-0 touch-none"
|
|
248
249
|
{...attributes}
|
|
249
250
|
{...listeners}
|
|
250
251
|
onClick={(e) => e.stopPropagation()}
|
|
@@ -549,6 +550,12 @@ export const BlocksField: React.FC<BlocksFieldProps> = ({
|
|
|
549
550
|
distance: 3,
|
|
550
551
|
},
|
|
551
552
|
}),
|
|
553
|
+
useSensor(TouchSensor, {
|
|
554
|
+
activationConstraint: {
|
|
555
|
+
delay: 250,
|
|
556
|
+
tolerance: 5,
|
|
557
|
+
},
|
|
558
|
+
}),
|
|
552
559
|
useSensor(KeyboardSensor),
|
|
553
560
|
);
|
|
554
561
|
|