@almadar/ui 4.51.0 → 4.51.2
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/avl/index.cjs
CHANGED
|
@@ -58888,7 +58888,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
|
|
|
58888
58888
|
persistence
|
|
58889
58889
|
}
|
|
58890
58890
|
),
|
|
58891
|
-
/* @__PURE__ */ jsxRuntime.jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "h-full p-4", children: /* @__PURE__ */ jsxRuntime.jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
|
|
58891
|
+
/* @__PURE__ */ jsxRuntime.jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "min-h-full p-4", children: /* @__PURE__ */ jsxRuntime.jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
|
|
58892
58892
|
]
|
|
58893
58893
|
}
|
|
58894
58894
|
) });
|
|
@@ -59158,13 +59158,19 @@ function defaultEmit(eventBus, drop) {
|
|
|
59158
59158
|
}
|
|
59159
59159
|
log18.debug("default-emit:unhandled-kind", { kind: payload.kind });
|
|
59160
59160
|
}
|
|
59161
|
-
function CanvasDndProvider({
|
|
59161
|
+
function CanvasDndProvider({
|
|
59162
|
+
children,
|
|
59163
|
+
onDrop,
|
|
59164
|
+
renderOverlay
|
|
59165
|
+
}) {
|
|
59162
59166
|
const eventBus = useEventBus();
|
|
59163
59167
|
const sensors = useAlmadarDndSensors(false);
|
|
59168
|
+
const [activePayload, setActivePayload] = React93__namespace.default.useState(null);
|
|
59164
59169
|
const handleDragStart = React93__namespace.default.useCallback((e) => {
|
|
59165
59170
|
const data = e.active.data.current;
|
|
59166
59171
|
const payload = data?.payload;
|
|
59167
59172
|
if (payload) {
|
|
59173
|
+
setActivePayload(payload);
|
|
59168
59174
|
eventBus.emit("UI:DRAG_START", { kind: payload.kind, data: payload.data });
|
|
59169
59175
|
log18.info("dragStart", { id: e.active.id, kind: payload.kind });
|
|
59170
59176
|
} else {
|
|
@@ -59172,6 +59178,7 @@ function CanvasDndProvider({ children, onDrop }) {
|
|
|
59172
59178
|
}
|
|
59173
59179
|
}, [eventBus]);
|
|
59174
59180
|
const handleDragEnd = React93__namespace.default.useCallback((e) => {
|
|
59181
|
+
setActivePayload(null);
|
|
59175
59182
|
const activeData = e.active.data.current;
|
|
59176
59183
|
const payload = activeData?.payload;
|
|
59177
59184
|
const overData = e.over?.data.current;
|
|
@@ -59199,14 +59206,22 @@ function CanvasDndProvider({ children, onDrop }) {
|
|
|
59199
59206
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
59200
59207
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
59201
59208
|
}, [eventBus, onDrop]);
|
|
59202
|
-
|
|
59209
|
+
const handleDragCancel = React93__namespace.default.useCallback(() => {
|
|
59210
|
+
setActivePayload(null);
|
|
59211
|
+
log18.info("dragCancel");
|
|
59212
|
+
}, []);
|
|
59213
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
59203
59214
|
core$1.DndContext,
|
|
59204
59215
|
{
|
|
59205
59216
|
sensors,
|
|
59206
59217
|
collisionDetection: almadarDndCollisionDetection,
|
|
59207
59218
|
onDragStart: handleDragStart,
|
|
59208
59219
|
onDragEnd: handleDragEnd,
|
|
59209
|
-
|
|
59220
|
+
onDragCancel: handleDragCancel,
|
|
59221
|
+
children: [
|
|
59222
|
+
children,
|
|
59223
|
+
renderOverlay ? /* @__PURE__ */ jsxRuntime.jsx(core$1.DragOverlay, { dropAnimation: null, children: activePayload ? renderOverlay(activePayload) : null }) : null
|
|
59224
|
+
]
|
|
59210
59225
|
}
|
|
59211
59226
|
);
|
|
59212
59227
|
}
|
package/dist/avl/index.d.cts
CHANGED
|
@@ -1312,13 +1312,24 @@ interface CanvasDndProviderProps {
|
|
|
1312
1312
|
* `false`/`undefined` to fall through to defaults after running your code.
|
|
1313
1313
|
*/
|
|
1314
1314
|
onDrop?: (drop: CanvasDropEvent) => boolean | void;
|
|
1315
|
+
/**
|
|
1316
|
+
* Renders the floating preview that follows the cursor during a drag.
|
|
1317
|
+
* @dnd-kit moves the source DOM node via CSS transform, which gets clipped
|
|
1318
|
+
* by any ancestor with `overflow: hidden|auto|scroll` (e.g. a scrollable
|
|
1319
|
+
* palette column). Returning a node here mounts a portal-attached overlay
|
|
1320
|
+
* outside the clip so the user always sees what they're dragging.
|
|
1321
|
+
*
|
|
1322
|
+
* Receives the active payload (or null between drags) and returns the
|
|
1323
|
+
* preview element — typically the same JSX the tile renders inline.
|
|
1324
|
+
*/
|
|
1325
|
+
renderOverlay?: (payload: CanvasDragPayload | null) => React__default.ReactNode;
|
|
1315
1326
|
}
|
|
1316
1327
|
/**
|
|
1317
1328
|
* Wraps a canvas subtree in one DndContext + sensors + collision waterfall.
|
|
1318
1329
|
* Every `useCanvasDraggable` / `useCanvasDroppable` inside this provider
|
|
1319
1330
|
* participates in the same drag session.
|
|
1320
1331
|
*/
|
|
1321
|
-
declare function CanvasDndProvider({ children, onDrop }: CanvasDndProviderProps): React__default.ReactElement;
|
|
1332
|
+
declare function CanvasDndProvider({ children, onDrop, renderOverlay, }: CanvasDndProviderProps): React__default.ReactElement;
|
|
1322
1333
|
|
|
1323
1334
|
/**
|
|
1324
1335
|
* OrbInspector
|
package/dist/avl/index.js
CHANGED
|
@@ -34,7 +34,7 @@ import langToml from 'react-syntax-highlighter/dist/esm/languages/prism/toml.js'
|
|
|
34
34
|
import langGo from 'react-syntax-highlighter/dist/esm/languages/prism/go.js';
|
|
35
35
|
import langGraphql from 'react-syntax-highlighter/dist/esm/languages/prism/graphql.js';
|
|
36
36
|
import { FieldTypeSchema, isInlineTrait, isEntityCall, schemaToIR, getPage, isCircuitEvent } from '@almadar/core';
|
|
37
|
-
import { useDroppable, useDraggable, DndContext, useSensors, useSensor, PointerSensor, KeyboardSensor, pointerWithin, rectIntersection, closestCorners } from '@dnd-kit/core';
|
|
37
|
+
import { useDroppable, useDraggable, DndContext, DragOverlay, useSensors, useSensor, PointerSensor, KeyboardSensor, pointerWithin, rectIntersection, closestCorners } from '@dnd-kit/core';
|
|
38
38
|
import { sortableKeyboardCoordinates, useSortable, arrayMove, SortableContext, rectSortingStrategy, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
39
39
|
import { CSS } from '@dnd-kit/utilities';
|
|
40
40
|
import { useThree, useFrame, Canvas } from '@react-three/fiber';
|
|
@@ -58842,7 +58842,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
|
|
|
58842
58842
|
persistence
|
|
58843
58843
|
}
|
|
58844
58844
|
),
|
|
58845
|
-
/* @__PURE__ */ jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsx(Box, { className: "h-full p-4", children: /* @__PURE__ */ jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
|
|
58845
|
+
/* @__PURE__ */ jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsx(Box, { className: "min-h-full p-4", children: /* @__PURE__ */ jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
|
|
58846
58846
|
]
|
|
58847
58847
|
}
|
|
58848
58848
|
) });
|
|
@@ -59112,13 +59112,19 @@ function defaultEmit(eventBus, drop) {
|
|
|
59112
59112
|
}
|
|
59113
59113
|
log18.debug("default-emit:unhandled-kind", { kind: payload.kind });
|
|
59114
59114
|
}
|
|
59115
|
-
function CanvasDndProvider({
|
|
59115
|
+
function CanvasDndProvider({
|
|
59116
|
+
children,
|
|
59117
|
+
onDrop,
|
|
59118
|
+
renderOverlay
|
|
59119
|
+
}) {
|
|
59116
59120
|
const eventBus = useEventBus();
|
|
59117
59121
|
const sensors = useAlmadarDndSensors(false);
|
|
59122
|
+
const [activePayload, setActivePayload] = React93__default.useState(null);
|
|
59118
59123
|
const handleDragStart = React93__default.useCallback((e) => {
|
|
59119
59124
|
const data = e.active.data.current;
|
|
59120
59125
|
const payload = data?.payload;
|
|
59121
59126
|
if (payload) {
|
|
59127
|
+
setActivePayload(payload);
|
|
59122
59128
|
eventBus.emit("UI:DRAG_START", { kind: payload.kind, data: payload.data });
|
|
59123
59129
|
log18.info("dragStart", { id: e.active.id, kind: payload.kind });
|
|
59124
59130
|
} else {
|
|
@@ -59126,6 +59132,7 @@ function CanvasDndProvider({ children, onDrop }) {
|
|
|
59126
59132
|
}
|
|
59127
59133
|
}, [eventBus]);
|
|
59128
59134
|
const handleDragEnd = React93__default.useCallback((e) => {
|
|
59135
|
+
setActivePayload(null);
|
|
59129
59136
|
const activeData = e.active.data.current;
|
|
59130
59137
|
const payload = activeData?.payload;
|
|
59131
59138
|
const overData = e.over?.data.current;
|
|
@@ -59153,14 +59160,22 @@ function CanvasDndProvider({ children, onDrop }) {
|
|
|
59153
59160
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
59154
59161
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
59155
59162
|
}, [eventBus, onDrop]);
|
|
59156
|
-
|
|
59163
|
+
const handleDragCancel = React93__default.useCallback(() => {
|
|
59164
|
+
setActivePayload(null);
|
|
59165
|
+
log18.info("dragCancel");
|
|
59166
|
+
}, []);
|
|
59167
|
+
return /* @__PURE__ */ jsxs(
|
|
59157
59168
|
DndContext,
|
|
59158
59169
|
{
|
|
59159
59170
|
sensors,
|
|
59160
59171
|
collisionDetection: almadarDndCollisionDetection,
|
|
59161
59172
|
onDragStart: handleDragStart,
|
|
59162
59173
|
onDragEnd: handleDragEnd,
|
|
59163
|
-
|
|
59174
|
+
onDragCancel: handleDragCancel,
|
|
59175
|
+
children: [
|
|
59176
|
+
children,
|
|
59177
|
+
renderOverlay ? /* @__PURE__ */ jsx(DragOverlay, { dropAnimation: null, children: activePayload ? renderOverlay(activePayload) : null }) : null
|
|
59178
|
+
]
|
|
59164
59179
|
}
|
|
59165
59180
|
);
|
|
59166
59181
|
}
|
|
@@ -135,10 +135,21 @@ export interface CanvasDndProviderProps {
|
|
|
135
135
|
* `false`/`undefined` to fall through to defaults after running your code.
|
|
136
136
|
*/
|
|
137
137
|
onDrop?: (drop: CanvasDropEvent) => boolean | void;
|
|
138
|
+
/**
|
|
139
|
+
* Renders the floating preview that follows the cursor during a drag.
|
|
140
|
+
* @dnd-kit moves the source DOM node via CSS transform, which gets clipped
|
|
141
|
+
* by any ancestor with `overflow: hidden|auto|scroll` (e.g. a scrollable
|
|
142
|
+
* palette column). Returning a node here mounts a portal-attached overlay
|
|
143
|
+
* outside the clip so the user always sees what they're dragging.
|
|
144
|
+
*
|
|
145
|
+
* Receives the active payload (or null between drags) and returns the
|
|
146
|
+
* preview element — typically the same JSX the tile renders inline.
|
|
147
|
+
*/
|
|
148
|
+
renderOverlay?: (payload: CanvasDragPayload | null) => React.ReactNode;
|
|
138
149
|
}
|
|
139
150
|
/**
|
|
140
151
|
* Wraps a canvas subtree in one DndContext + sensors + collision waterfall.
|
|
141
152
|
* Every `useCanvasDraggable` / `useCanvasDroppable` inside this provider
|
|
142
153
|
* participates in the same drag session.
|
|
143
154
|
*/
|
|
144
|
-
export declare function CanvasDndProvider({ children, onDrop }: CanvasDndProviderProps): React.ReactElement;
|
|
155
|
+
export declare function CanvasDndProvider({ children, onDrop, renderOverlay, }: CanvasDndProviderProps): React.ReactElement;
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -46779,7 +46779,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
|
|
|
46779
46779
|
persistence
|
|
46780
46780
|
}
|
|
46781
46781
|
),
|
|
46782
|
-
/* @__PURE__ */ jsxRuntime.jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "h-full p-4", children: /* @__PURE__ */ jsxRuntime.jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
|
|
46782
|
+
/* @__PURE__ */ jsxRuntime.jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "min-h-full p-4", children: /* @__PURE__ */ jsxRuntime.jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
|
|
46783
46783
|
]
|
|
46784
46784
|
}
|
|
46785
46785
|
) });
|
package/dist/runtime/index.js
CHANGED
|
@@ -46733,7 +46733,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
|
|
|
46733
46733
|
persistence
|
|
46734
46734
|
}
|
|
46735
46735
|
),
|
|
46736
|
-
/* @__PURE__ */ jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsx(Box, { className: "h-full p-4", children: /* @__PURE__ */ jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
|
|
46736
|
+
/* @__PURE__ */ jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsx(Box, { className: "min-h-full p-4", children: /* @__PURE__ */ jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
|
|
46737
46737
|
]
|
|
46738
46738
|
}
|
|
46739
46739
|
) });
|