@charisol/plexo-sdk 1.0.41 → 1.0.43
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/{compiler-DDrxFhGt.js → compiler-BEQo1civ.js} +155 -143
- package/dist/compiler.js +1 -1
- package/dist/compilerClient.js +16 -16
- package/dist/components/editor/dnd/DragOverContext.d.ts +14 -0
- package/dist/{iconSvgStatic-DOyb-nIf.js → iconSvgStatic-DubpApuZ.js} +62 -46
- package/dist/index.js +14149 -14109
- package/dist/utilities/dndCollision.d.ts +18 -0
- package/dist/utilities/elementResolvers.d.ts +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type CollisionDetection } from '@dnd-kit/core';
|
|
2
|
+
/**
|
|
3
|
+
* The canvas nests droppables inside each other several levels deep — canvas > row >
|
|
4
|
+
* column > element, and column > nested row > column > element again — so the pointer
|
|
5
|
+
* is frequently over several valid droppables at once (an element sits inside its
|
|
6
|
+
* column, which sits inside its row, which sits inside the canvas). dnd-kit's default
|
|
7
|
+
* `rectIntersection` has no notion of "most specific" among those overlapping ties, so
|
|
8
|
+
* it would often resolve a drop to an ancestor container (e.g. the row) instead of the
|
|
9
|
+
* innermost one actually under the cursor (e.g. the column or element) — which is what
|
|
10
|
+
* made nested row-in-column / column-in-row drops feel unreliable.
|
|
11
|
+
*
|
|
12
|
+
* Preferring pointer-contained collisions (so a drop always targets whatever the cursor
|
|
13
|
+
* is actually over, not just whatever rect happens to overlap the dragged item's
|
|
14
|
+
* bounding box), then breaking ties by picking the smallest — and therefore deepest —
|
|
15
|
+
* rect, reliably resolves to the innermost droppable under the pointer at every level of
|
|
16
|
+
* nesting.
|
|
17
|
+
*/
|
|
18
|
+
export declare const nestedAwareCollisionDetection: CollisionDetection;
|
|
@@ -36,6 +36,17 @@ export interface ResolvedImageBox {
|
|
|
36
36
|
* switched back to auto kept reappearing stretched on publish.
|
|
37
37
|
*/
|
|
38
38
|
export declare function resolveImageBox(elem: ElementJSON): ResolvedImageBox;
|
|
39
|
+
/**
|
|
40
|
+
* Resolves one side of a padding/margin box from an explicit per-side value, or by parsing
|
|
41
|
+
* a CSS shorthand string (1-4 space-separated values) for that side. Longhand style
|
|
42
|
+
* properties (paddingTop, etc) don't accept shorthand syntax — passing a shorthand string
|
|
43
|
+
* straight through as a longhand value (e.g. paddingTop: '10px 20px') is invalid CSS and
|
|
44
|
+
* gets silently dropped by the browser, which is why a shorthand-only default appeared to
|
|
45
|
+
* do nothing until a per-side value was set directly. Shared by SortableElement.tsx (canvas)
|
|
46
|
+
* and compiler.ts (publish) so a button/form's padding and margin resolve identically on
|
|
47
|
+
* both surfaces instead of drifting out of sync.
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolveBoxSide(perSideValue: string | undefined, shorthand: string | undefined, side: 'top' | 'right' | 'bottom' | 'left', fallback?: string): string | undefined;
|
|
39
50
|
export interface ResolvedButtonBox {
|
|
40
51
|
width: string;
|
|
41
52
|
height: string;
|
package/package.json
CHANGED