@grafloria/element 0.4.2 → 0.4.4
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/package.json +1 -1
- package/src/lib/dashboard-kit/dashboard.d.ts +147 -1
- package/src/lib/dashboard-kit/dashboard.js +524 -113
- package/src/lib/dashboard-kit/grid-binder.d.ts +43 -0
- package/src/lib/dashboard-kit/grid-binder.js +719 -106
- package/src/lib/dashboard-kit/index.d.ts +2 -0
- package/src/lib/dashboard-kit/index.js +2 -0
- package/src/lib/dashboard-kit/split-binder.d.ts +69 -0
- package/src/lib/dashboard-kit/split-binder.js +1078 -0
- package/src/lib/dashboard-kit/split-layout.d.ts +128 -0
- package/src/lib/dashboard-kit/split-layout.js +425 -0
- package/src/lib/dashboard-kit/styles.js +137 -20
- package/src/lib/dashboard-kit/widgets.d.ts +16 -1
- package/src/lib/dashboard-kit/widgets.js +146 -33
- package/src/lib/diagram-kit/card.d.ts +46 -0
- package/src/lib/diagram-kit/card.js +149 -0
- package/src/lib/diagram-kit/er.js +5 -3
- package/src/lib/diagram-kit/styles.js +40 -5
- package/src/lib/diagram-kit/uml.js +3 -4
- package/src/lib/diagram-kit/update.js +7 -3
- package/src/lib/grafloria.js +4 -4
- package/src/lib/load.d.ts +5 -0
- package/src/lib/load.js +72 -8
|
@@ -189,6 +189,29 @@ export interface DashboardGridOptions {
|
|
|
189
189
|
}) => void;
|
|
190
190
|
/** Inject the hover-revealed corner resize handle into member hosts (default true). */
|
|
191
191
|
resizeHandles?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* FLUID board: the group's frame follows the CANVAS CONTAINER — width
|
|
194
|
+
* always, and height too in 'fit' — so the dashboard is laid out at real CSS
|
|
195
|
+
* pixels like every other grid library, never as a picture the camera scales
|
|
196
|
+
* (review D1: a 900-px viewport drew 30-px KPI figures at 18 px). The binder
|
|
197
|
+
* owns the ResizeObserver; `sync()` re-reads the container as well.
|
|
198
|
+
*/
|
|
199
|
+
fluid?: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* What FIT mode does past its row floor. 'bounded' (default): the design
|
|
202
|
+
* height is a CAPACITY — a drop, resize or add that would need one row too
|
|
203
|
+
* many is refused (the engine's `capacity`), visibly, at design time.
|
|
204
|
+
* 'scroll': no bound; the frame extends to hold the rows at the floor height
|
|
205
|
+
* so nothing paints outside it, and the canvas pans. Either way a fit board
|
|
206
|
+
* never paints past its own edge (review D6: 204 px of tiles below the frame).
|
|
207
|
+
*/
|
|
208
|
+
overflow?: 'bounded' | 'scroll';
|
|
209
|
+
/**
|
|
210
|
+
* STATIC board (gridstack's `staticGrid`): the pointer can neither drag nor
|
|
211
|
+
* resize and no handles are injected; the API (moveTo/resizeTo, adds, undo)
|
|
212
|
+
* still works. The viewer's mode — see `setStatic` for the live switch.
|
|
213
|
+
*/
|
|
214
|
+
static?: boolean;
|
|
192
215
|
}
|
|
193
216
|
export interface DashboardGridHandle {
|
|
194
217
|
/** Rebuild the engine from the group's members + their cells, re-project pixels. */
|
|
@@ -219,6 +242,16 @@ export interface DashboardGridHandle {
|
|
|
219
242
|
/** RTL mirroring, live. Cells never change — only the pixels. */
|
|
220
243
|
setRtl(on: boolean): void;
|
|
221
244
|
getRtl(): boolean;
|
|
245
|
+
/** Static mode, live: pointer gestures off (and handles gone) or back on. */
|
|
246
|
+
setStatic(on: boolean): void;
|
|
247
|
+
getStatic(): boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Move keyboard focus to a member (the roving tabindex lands on it). The
|
|
250
|
+
* host takes DOM focus when it exists; returns false for a non-member.
|
|
251
|
+
*/
|
|
252
|
+
focusWidget(id: string): boolean;
|
|
253
|
+
/** The member the roving tabindex currently rests on. */
|
|
254
|
+
getFocusedWidget(): string | undefined;
|
|
222
255
|
/**
|
|
223
256
|
* The layout to PERSIST — from the engine's LARGEST cached column count, so
|
|
224
257
|
* saving while the board is narrow still saves the wide layout the user
|
|
@@ -236,6 +269,10 @@ export interface DashboardGridHandle {
|
|
|
236
269
|
maxColumns: number;
|
|
237
270
|
rtl: boolean;
|
|
238
271
|
responsive: boolean;
|
|
272
|
+
fluid: boolean;
|
|
273
|
+
static: boolean;
|
|
274
|
+
/** Fit-mode row capacity (undefined when unbounded). */
|
|
275
|
+
capacity: number | undefined;
|
|
239
276
|
gap: number;
|
|
240
277
|
padding: number;
|
|
241
278
|
sizing: 'fit' | 'grow';
|
|
@@ -245,6 +282,12 @@ export interface DashboardGridHandle {
|
|
|
245
282
|
boardHeight: number;
|
|
246
283
|
frame: WorldRect;
|
|
247
284
|
};
|
|
285
|
+
/**
|
|
286
|
+
* Would a w×h tile fit on the board as it is now (gridstack's `willItFit`)?
|
|
287
|
+
* Always true on an unbounded board; on a bounded fit board this is what
|
|
288
|
+
* `addWidget()` asks before creating anything.
|
|
289
|
+
*/
|
|
290
|
+
willItFit(w: number, h: number): boolean;
|
|
248
291
|
/** The engine's cell record for a member (undefined when not a member). */
|
|
249
292
|
cellOf(id: string): CellRect | undefined;
|
|
250
293
|
/** World rect the member's current cells project to. */
|