@caspeco/casper-ui-library 8.2.2 → 8.4.0
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/components/modal/modal.spec.d.ts +0 -1
- package/dist/components/modal/modal.spec.d.ts.map +1 -1
- package/dist/components/paginator/paginator.composition.d.ts +1 -0
- package/dist/components/paginator/paginator.composition.d.ts.map +1 -1
- package/dist/components/paginator/paginator.d.ts +3 -1
- package/dist/components/paginator/paginator.d.ts.map +1 -1
- package/dist/components/paginator/paginator.js +12 -11
- package/dist/components/table/helper.d.ts +2 -0
- package/dist/components/table/helper.d.ts.map +1 -0
- package/dist/components/table/helper.js +7 -0
- package/dist/components/table/table-content.d.ts.map +1 -1
- package/dist/components/table/table-content.js +93 -80
- package/dist/components/table/table-context-provider.d.ts +10 -2
- package/dist/components/table/table-context-provider.d.ts.map +1 -1
- package/dist/components/table/table-context-provider.js +149 -110
- package/dist/components/table/table-header-row.d.ts.map +1 -1
- package/dist/components/table/table-header-row.js +170 -121
- package/dist/components/table/table-row.js +11 -11
- package/dist/components/table/table.d.ts +1 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +16 -8
- package/dist/components/table/table.spec.d.ts +0 -1
- package/dist/components/table/table.spec.d.ts.map +1 -1
- package/dist/components/table/types.d.ts +21 -0
- package/dist/components/table/types.d.ts.map +1 -1
- package/dist/components/toggle-button/toggle-button.spec.d.ts +0 -1
- package/dist/components/toggle-button/toggle-button.spec.d.ts.map +1 -1
- package/dist/node_modules/@dnd-kit/abstract/index.js +1142 -0
- package/dist/node_modules/@dnd-kit/collision/dist/index.js +91 -0
- package/dist/node_modules/@dnd-kit/dom/index.js +1554 -0
- package/dist/node_modules/@dnd-kit/dom/sortable.js +631 -0
- package/dist/node_modules/@dnd-kit/dom/utilities.js +943 -0
- package/dist/node_modules/@dnd-kit/geometry/dist/index.js +200 -0
- package/dist/node_modules/@dnd-kit/react/hooks.js +69 -0
- package/dist/node_modules/@dnd-kit/react/index.js +235 -0
- package/dist/node_modules/@dnd-kit/react/sortable.js +129 -0
- package/dist/node_modules/@dnd-kit/react/utilities.js +11 -0
- package/dist/node_modules/@dnd-kit/state/dist/index.js +181 -0
- package/dist/node_modules/@preact/signals-core/dist/signals-core.module.js +265 -0
- package/dist/test-utils/hooks/setup-mock-resize-observer.d.ts +1 -1
- package/dist/test-utils/hooks/setup-mock-resize-observer.d.ts.map +1 -1
- package/dist/theme/theme-config/components/paginator-theme.d.ts +5 -19
- package/dist/theme/theme-config/components/paginator-theme.d.ts.map +1 -1
- package/dist/theme/theme-config/components/paginator-theme.js +34 -18
- package/package.json +3 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { CollisionPriority as l, CollisionType as u } from "../../abstract/index.js";
|
|
2
|
+
import { Point as s, Rectangle as h } from "../../geometry/dist/index.js";
|
|
3
|
+
var m = ({
|
|
4
|
+
dragOperation: t,
|
|
5
|
+
droppable: n
|
|
6
|
+
}) => {
|
|
7
|
+
const e = t.position.current;
|
|
8
|
+
if (!e)
|
|
9
|
+
return null;
|
|
10
|
+
const { id: r } = n;
|
|
11
|
+
if (!n.shape)
|
|
12
|
+
return null;
|
|
13
|
+
if (n.shape.containsPoint(e)) {
|
|
14
|
+
const i = s.distance(n.shape.center, e);
|
|
15
|
+
return {
|
|
16
|
+
id: r,
|
|
17
|
+
value: 1 / i,
|
|
18
|
+
type: u.PointerIntersection,
|
|
19
|
+
priority: l.High
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return null;
|
|
23
|
+
}, y = ({
|
|
24
|
+
dragOperation: t,
|
|
25
|
+
droppable: n
|
|
26
|
+
}) => {
|
|
27
|
+
const { shape: e } = t;
|
|
28
|
+
if (!n.shape || !e?.current)
|
|
29
|
+
return null;
|
|
30
|
+
const r = e.current.intersectionArea(n.shape);
|
|
31
|
+
if (r) {
|
|
32
|
+
const { position: i } = t, o = s.distance(n.shape.center, i.current), a = r / (e.current.area + n.shape.area - r) / o;
|
|
33
|
+
return {
|
|
34
|
+
id: n.id,
|
|
35
|
+
value: a,
|
|
36
|
+
type: u.ShapeIntersection,
|
|
37
|
+
priority: l.Normal
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
}, C = (t) => {
|
|
42
|
+
var n;
|
|
43
|
+
return (n = m(t)) != null ? n : y(t);
|
|
44
|
+
}, I = (t) => {
|
|
45
|
+
const { dragOperation: n, droppable: e } = t, { shape: r, position: i } = n;
|
|
46
|
+
if (!e.shape)
|
|
47
|
+
return null;
|
|
48
|
+
const o = r ? h.from(r.current.boundingRectangle).corners : void 0, a = h.from(
|
|
49
|
+
e.shape.boundingRectangle
|
|
50
|
+
).corners.reduce(
|
|
51
|
+
(p, v, f) => {
|
|
52
|
+
var d;
|
|
53
|
+
return p + s.distance(
|
|
54
|
+
s.from(v),
|
|
55
|
+
(d = o?.[f]) != null ? d : i.current
|
|
56
|
+
);
|
|
57
|
+
},
|
|
58
|
+
0
|
|
59
|
+
) / 4;
|
|
60
|
+
return {
|
|
61
|
+
id: e.id,
|
|
62
|
+
value: 1 / a,
|
|
63
|
+
type: u.Collision,
|
|
64
|
+
priority: l.Normal
|
|
65
|
+
};
|
|
66
|
+
}, P = (t) => {
|
|
67
|
+
var n;
|
|
68
|
+
const { dragOperation: e, droppable: r } = t, { shape: i, position: o } = e;
|
|
69
|
+
if (!r.shape)
|
|
70
|
+
return null;
|
|
71
|
+
const c = C(t);
|
|
72
|
+
if (c)
|
|
73
|
+
return c;
|
|
74
|
+
const p = 1 / s.distance(
|
|
75
|
+
r.shape.center,
|
|
76
|
+
(n = i?.current.center) != null ? n : o.current
|
|
77
|
+
);
|
|
78
|
+
return {
|
|
79
|
+
id: r.id,
|
|
80
|
+
value: p,
|
|
81
|
+
type: u.Collision,
|
|
82
|
+
priority: l.Normal
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export {
|
|
86
|
+
P as closestCenter,
|
|
87
|
+
I as closestCorners,
|
|
88
|
+
C as defaultCollisionDetection,
|
|
89
|
+
m as pointerIntersection,
|
|
90
|
+
y as shapeIntersection
|
|
91
|
+
};
|