@grafloria/element 0.4.8 → 0.4.10
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/README.md +3 -6
- package/package.json +5 -3
- package/src/index.d.ts +16 -16
- package/src/index.js +9 -9
- package/src/lib/dashboard-kit/dashboard.d.ts +9 -3
- package/src/lib/dashboard-kit/dashboard.js +10 -5
- package/src/lib/dashboard-kit/grid-binder.d.ts +1 -1
- package/src/lib/dashboard-kit/grid-binder.js +27 -4
- package/src/lib/dashboard-kit/index.d.ts +7 -7
- package/src/lib/dashboard-kit/index.js +7 -7
- package/src/lib/dashboard-kit/split-binder.d.ts +2 -2
- package/src/lib/dashboard-kit/split-binder.js +23 -6
- package/src/lib/dashboard-kit/split-layout.d.ts +1 -1
- package/src/lib/dashboard-kit/styles.js +37 -8
- package/src/lib/dashboard-kit/widgets.d.ts +1 -1
- package/src/lib/dashboard-kit/widgets.js +1 -1
- package/src/lib/diagram-kit/card.d.ts +2 -2
- package/src/lib/diagram-kit/editing.js +1 -1
- package/src/lib/diagram-kit/er.d.ts +1 -1
- package/src/lib/diagram-kit/er.js +5 -5
- package/src/lib/diagram-kit/handles.d.ts +4 -4
- package/src/lib/diagram-kit/handles.js +1 -1
- package/src/lib/diagram-kit/index.d.ts +10 -10
- package/src/lib/diagram-kit/index.js +10 -10
- package/src/lib/diagram-kit/uml.js +4 -4
- package/src/lib/diagram-kit/update.d.ts +1 -1
- package/src/lib/diagram-kit/update.js +1 -1
- package/src/lib/grafloria-flow-element.js +1 -1
- package/src/lib/grafloria.d.ts +4 -4
- package/src/lib/grafloria.js +2 -2
- package/src/lib/load.d.ts +3 -3
- package/src/lib/load.js +11 -11
- package/src/lib/stencil-kit/card-builders.js +2 -2
- package/src/lib/stencil-kit/index.d.ts +7 -7
- package/src/lib/stencil-kit/index.js +5 -5
- package/src/lib/stencil-kit/palette.js +2 -2
- package/src/lib/stencil-kit/shape-data.js +2 -2
package/README.md
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
# @grafloria/element
|
|
2
2
|
|
|
3
|
-
`<grafloria-flow>`
|
|
4
|
-
|
|
5
|
-
element with no framework wall: plain HTML, Vue, Svelte, Solid, Lit, a CMS
|
|
6
|
-
block, or a notebook cell all speak "element with attributes and events".
|
|
7
|
-
Includes the high-level kits: dashboard (drag-pack grid + widgets), class-UML,
|
|
8
|
-
and ERD.
|
|
3
|
+
`<grafloria-flow>` and the kits of **Grafloria Diagrams** and **Grafloria Dashboards**, for any framework or none. Grafloria is an MIT diagram and dashboard engine for JavaScript: one headless core, native Angular, React and Vue bindings, one document format and one undo stack.
|
|
4
|
+
|
|
5
|
+
A custom element with no framework wall: plain HTML, Vue, Svelte, Solid, Lit, a CMS block or a notebook cell all speak "element with attributes and events". The same package carries `dashboard()` (the dashboard layout kit, also published as `@grafloria/dashboard`) and the UML and ER kits.
|
|
9
6
|
|
|
10
7
|
```html
|
|
11
8
|
<script type="module" src="grafloria.js"></script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafloria/element",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"tslib": "^2.3.0"
|
|
13
13
|
},
|
|
14
|
-
"description": "
|
|
14
|
+
"description": "Web component, dashboard kit and UML/ERD kits for Grafloria — diagrams and dashboards in any framework or none. Grafloria is an MIT diagram and dashboard engine for JavaScript.",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"author": "Ramy Othman",
|
|
17
17
|
"homepage": "https://grafloria.com/javascript/",
|
|
@@ -33,7 +33,9 @@
|
|
|
33
33
|
"erd",
|
|
34
34
|
"svg",
|
|
35
35
|
"layout",
|
|
36
|
-
"mermaid"
|
|
36
|
+
"mermaid",
|
|
37
|
+
"dashboard-layout",
|
|
38
|
+
"workflow-editor"
|
|
37
39
|
],
|
|
38
40
|
"publishConfig": {
|
|
39
41
|
"access": "public"
|
package/src/index.d.ts
CHANGED
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
* on the server, where `customElements` does not exist). Call
|
|
13
13
|
* `Grafloria.define('my-flow')` yourself if you want a different tag name.
|
|
14
14
|
*/
|
|
15
|
-
export { GrafloriaFlowElement, defineGrafloriaFlow, GRAFLORIA_EVENTS } from './lib/grafloria-flow-element
|
|
16
|
-
export { Grafloria, render, renderStatic } from './lib/grafloria
|
|
17
|
-
export type { DiagramSpec, RenderSpec, RenderOptions } from './lib/grafloria
|
|
18
|
-
export { fromDocument } from './lib/load
|
|
19
|
-
export type { SavedDiagram, FromDocumentOptions, LoadedDiagramSpec } from './lib/load
|
|
20
|
-
export { registerNodeType, unregisterNodeType, registeredNodeTypes, getNodeType, hasNodeType, renderFromTemplate, } from './lib/node-type-registry
|
|
21
|
-
export type { NodeTypeRenderer } from './lib/node-type-registry
|
|
15
|
+
export { GrafloriaFlowElement, defineGrafloriaFlow, GRAFLORIA_EVENTS } from './lib/grafloria-flow-element';
|
|
16
|
+
export { Grafloria, render, renderStatic } from './lib/grafloria';
|
|
17
|
+
export type { DiagramSpec, RenderSpec, RenderOptions } from './lib/grafloria';
|
|
18
|
+
export { fromDocument } from './lib/load';
|
|
19
|
+
export type { SavedDiagram, FromDocumentOptions, LoadedDiagramSpec } from './lib/load';
|
|
20
|
+
export { registerNodeType, unregisterNodeType, registeredNodeTypes, getNodeType, hasNodeType, renderFromTemplate, } from './lib/node-type-registry';
|
|
21
|
+
export type { NodeTypeRenderer } from './lib/node-type-registry';
|
|
22
22
|
export type { DiagramInstance, CreateDiagramOptions, NodeSpec, EdgeSpec, PortSpec, HydrationSnapshot, StaticRenderOptions, StaticRenderResult, Theme, } from '@grafloria/renderer';
|
|
23
23
|
export { renderToStaticSVG, LIGHT_THEME, DARK_THEME } from '@grafloria/renderer';
|
|
24
24
|
export { createDiagramApi } from '@grafloria/renderer';
|
|
@@ -74,15 +74,15 @@ export { GroupModel } from '@grafloria/engine';
|
|
|
74
74
|
export { GroupCollapseService, PROXY_NODE_GROUP_KEY, PROXY_LINK_GROUP_KEY } from '@grafloria/engine';
|
|
75
75
|
export { serveLayout } from '@grafloria/engine';
|
|
76
76
|
export type { LayoutPort, LayoutServePort, LayoutProgress } from '@grafloria/engine';
|
|
77
|
-
export { erDiagram, erRowCenterY, ER_ROW_H, ER_HEAD_H, umlDiagram, ensureDiagramKitStyles, DIAGRAM_KIT_STYLE_ID, updateEntity, updateClass, addColumnAt, removeColumnAt, renameColumnAt, bindCardEditing, matchColumns, rowIndexFromY, scoreMatch, matchTier, assignTiers, singularize, bindJoinGuidance, ensureJoinGuidanceStyles, JOIN_GUIDANCE_STYLE_ID, } from './lib/diagram-kit
|
|
78
|
-
export type { JoinColumn, JoinEnd, MatchTier, JoinGuidanceApi, JoinGuidanceOptions, JoinGuidanceHandle, } from './lib/diagram-kit
|
|
79
|
-
export type { ErColumn, ErEntitySpec, ErRelationshipSpec, ErCardinality, ErSide, ErDiagramOptions, UmlClassSpec, UmlRelationshipSpec, UmlRelationKind, UmlSide, UmlDiagramOptions, ErEntityDelta, UmlClassDelta, CardEditingHandle, } from './lib/diagram-kit
|
|
80
|
-
export { erTable, umlClass, erTables, umlClasses, CardHandle, ErTable, ErField, ErColumnList, UmlClass, UmlMemberList, } from './lib/diagram-kit
|
|
81
|
-
export type { HandleApi } from './lib/diagram-kit
|
|
82
|
-
export { bindDashboardGrid, rowHeightFor, boardHeightFor, columnUnitFor, cellToRect, pointToCell, sizeToSpan, gridItemFromCell, cellFromGridItem, buildCommitCommands, ensureDashboardKitStyles, DASHBOARD_KIT_STYLE_ID, dashboard, defaultWidgetRenderer, renderKpiWidget, renderLineWidget, renderBarWidget, renderDonutWidget, renderFunnelWidget, renderTableWidget, BUILT_IN_WIDGET_KINDS, } from './lib/dashboard-kit
|
|
83
|
-
export type { DashboardGridApi, DashboardGridOptions, DashboardGridHandle, CellRect, WorldRect, DashboardGridGeometry, TileDelta, DashboardOptions, DashboardSpec, DashboardSnapshot, DragHandleOption, DragGripOptions, DashboardHandle, DashboardViewSpec, DashboardWidgetSpec, WidgetHandle, WidgetRenderer, KpiWidgetData, LineWidgetData, LineSeries, BarWidgetData, DonutWidgetData, FunnelWidgetData, TableWidgetData, } from './lib/dashboard-kit
|
|
84
|
-
export { bindStencilPalette, bindShapeDataPanel, ensureStencilKitStyles } from './lib/stencil-kit
|
|
85
|
-
export type { StencilPaletteApi, StencilPaletteOptions, StencilPaletteHandle, ShapeDataPanelApi, ShapeDataPanelOptions, ShapeDataPanelHandle, } from './lib/stencil-kit
|
|
77
|
+
export { erDiagram, erRowCenterY, ER_ROW_H, ER_HEAD_H, umlDiagram, ensureDiagramKitStyles, DIAGRAM_KIT_STYLE_ID, updateEntity, updateClass, addColumnAt, removeColumnAt, renameColumnAt, bindCardEditing, matchColumns, rowIndexFromY, scoreMatch, matchTier, assignTiers, singularize, bindJoinGuidance, ensureJoinGuidanceStyles, JOIN_GUIDANCE_STYLE_ID, } from './lib/diagram-kit';
|
|
78
|
+
export type { JoinColumn, JoinEnd, MatchTier, JoinGuidanceApi, JoinGuidanceOptions, JoinGuidanceHandle, } from './lib/diagram-kit';
|
|
79
|
+
export type { ErColumn, ErEntitySpec, ErRelationshipSpec, ErCardinality, ErSide, ErDiagramOptions, UmlClassSpec, UmlRelationshipSpec, UmlRelationKind, UmlSide, UmlDiagramOptions, ErEntityDelta, UmlClassDelta, CardEditingHandle, } from './lib/diagram-kit';
|
|
80
|
+
export { erTable, umlClass, erTables, umlClasses, CardHandle, ErTable, ErField, ErColumnList, UmlClass, UmlMemberList, } from './lib/diagram-kit';
|
|
81
|
+
export type { HandleApi } from './lib/diagram-kit';
|
|
82
|
+
export { bindDashboardGrid, rowHeightFor, boardHeightFor, columnUnitFor, cellToRect, pointToCell, sizeToSpan, gridItemFromCell, cellFromGridItem, buildCommitCommands, ensureDashboardKitStyles, DASHBOARD_KIT_STYLE_ID, dashboard, defaultWidgetRenderer, renderKpiWidget, renderLineWidget, renderBarWidget, renderDonutWidget, renderFunnelWidget, renderTableWidget, BUILT_IN_WIDGET_KINDS, } from './lib/dashboard-kit';
|
|
83
|
+
export type { DashboardGridApi, DashboardGridOptions, DashboardGridHandle, CellRect, WorldRect, DashboardGridGeometry, TileDelta, DashboardOptions, DashboardSpec, DashboardSnapshot, DragHandleOption, DragGripOptions, DashboardHandle, DashboardViewSpec, DashboardWidgetSpec, WidgetHandle, WidgetRenderer, KpiWidgetData, LineWidgetData, LineSeries, BarWidgetData, DonutWidgetData, FunnelWidgetData, TableWidgetData, } from './lib/dashboard-kit';
|
|
84
|
+
export { bindStencilPalette, bindShapeDataPanel, ensureStencilKitStyles } from './lib/stencil-kit';
|
|
85
|
+
export type { StencilPaletteApi, StencilPaletteOptions, StencilPaletteHandle, ShapeDataPanelApi, ShapeDataPanelOptions, ShapeDataPanelHandle, } from './lib/stencil-kit';
|
|
86
86
|
export * from '@grafloria/engine';
|
|
87
87
|
export * from '@grafloria/renderer';
|
|
88
88
|
export { NodeModel, PortModel, distanceToSegment, rotatePoint, coalesce, } from '@grafloria/engine';
|
package/src/index.js
CHANGED
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
* on the server, where `customElements` does not exist). Call
|
|
13
13
|
* `Grafloria.define('my-flow')` yourself if you want a different tag name.
|
|
14
14
|
*/
|
|
15
|
-
import { defineGrafloriaFlow } from './lib/grafloria-flow-element
|
|
16
|
-
export { GrafloriaFlowElement, defineGrafloriaFlow, GRAFLORIA_EVENTS } from './lib/grafloria-flow-element
|
|
17
|
-
export { Grafloria, render, renderStatic } from './lib/grafloria
|
|
15
|
+
import { defineGrafloriaFlow } from './lib/grafloria-flow-element';
|
|
16
|
+
export { GrafloriaFlowElement, defineGrafloriaFlow, GRAFLORIA_EVENTS } from './lib/grafloria-flow-element';
|
|
17
|
+
export { Grafloria, render, renderStatic } from './lib/grafloria';
|
|
18
18
|
// The LOAD front door — the other half of `DiagramSerializer.serialize()`.
|
|
19
19
|
// `render(fromDocument(json), host)` is the one-liner; see lib/load.ts for why
|
|
20
20
|
// the loaded models go back in as models rather than being re-specced.
|
|
21
|
-
export { fromDocument } from './lib/load
|
|
22
|
-
export { registerNodeType, unregisterNodeType, registeredNodeTypes, getNodeType, hasNodeType, renderFromTemplate, } from './lib/node-type-registry
|
|
21
|
+
export { fromDocument } from './lib/load';
|
|
22
|
+
export { registerNodeType, unregisterNodeType, registeredNodeTypes, getNodeType, hasNodeType, renderFromTemplate, } from './lib/node-type-registry';
|
|
23
23
|
export { renderToStaticSVG, LIGHT_THEME, DARK_THEME } from '@grafloria/renderer';
|
|
24
24
|
// React Flow-parity helper surface (getIntersectingNodes & friends) — an embed
|
|
25
25
|
// gets the same convenience wrapper the frameworks get, from the same import.
|
|
@@ -215,10 +215,10 @@ export { erDiagram, erRowCenterY, ER_ROW_H, ER_HEAD_H, umlDiagram, ensureDiagram
|
|
|
215
215
|
updateEntity, updateClass, addColumnAt, removeColumnAt, renameColumnAt, bindCardEditing, matchColumns, rowIndexFromY,
|
|
216
216
|
// Live join guidance (query-builder): score every other table's columns
|
|
217
217
|
// against a connection drag's source column and tint the kit rows by fit.
|
|
218
|
-
scoreMatch, matchTier, assignTiers, singularize, bindJoinGuidance, ensureJoinGuidanceStyles, JOIN_GUIDANCE_STYLE_ID, } from './lib/diagram-kit
|
|
218
|
+
scoreMatch, matchTier, assignTiers, singularize, bindJoinGuidance, ensureJoinGuidanceStyles, JOIN_GUIDANCE_STYLE_ID, } from './lib/diagram-kit';
|
|
219
219
|
// Typed façade handles (domain-API decision, Option B): the OO surface —
|
|
220
220
|
// CardHandle → ErTable/UmlClass, ErField — over the data-first kit.
|
|
221
|
-
export { erTable, umlClass, erTables, umlClasses, CardHandle, ErTable, ErField, ErColumnList, UmlClass, UmlMemberList, } from './lib/diagram-kit
|
|
221
|
+
export { erTable, umlClass, erTables, umlClasses, CardHandle, ErTable, ErField, ErColumnList, UmlClass, UmlMemberList, } from './lib/diagram-kit';
|
|
222
222
|
// ===========================================================================
|
|
223
223
|
// THE DASHBOARD KIT — Phase 2 of the dashboard-grid plan.
|
|
224
224
|
//
|
|
@@ -236,10 +236,10 @@ dashboard,
|
|
|
236
236
|
// …and the built-in renderers behind `kind`, so a dashboard is useful with
|
|
237
237
|
// no renderWidget at all. Composable: call defaultWidgetRenderer first, then
|
|
238
238
|
// decorate the host.
|
|
239
|
-
defaultWidgetRenderer, renderKpiWidget, renderLineWidget, renderBarWidget, renderDonutWidget, renderFunnelWidget, renderTableWidget, BUILT_IN_WIDGET_KINDS, } from './lib/dashboard-kit
|
|
239
|
+
defaultWidgetRenderer, renderKpiWidget, renderLineWidget, renderBarWidget, renderDonutWidget, renderFunnelWidget, renderTableWidget, BUILT_IN_WIDGET_KINDS, } from './lib/dashboard-kit';
|
|
240
240
|
// The stencil kit — a Visio-style palette that drags shape masters onto the
|
|
241
241
|
// canvas (T6/T7). Pairs with listStencils()/registerStencils() above.
|
|
242
|
-
export { bindStencilPalette, bindShapeDataPanel, ensureStencilKitStyles } from './lib/stencil-kit
|
|
242
|
+
export { bindStencilPalette, bindShapeDataPanel, ensureStencilKitStyles } from './lib/stencil-kit';
|
|
243
243
|
/* ==========================================================================
|
|
244
244
|
* PHASE 0 — THE INVERSION.
|
|
245
245
|
*
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
* round-trips with no extra work — same as every other kit.
|
|
44
44
|
*/
|
|
45
45
|
import { GroupModel, NodeModel, type GridColumnLayout } from '@grafloria/engine';
|
|
46
|
-
import { type DashboardGridHandle, type DashboardGridOptions, type DashboardResponsiveOptions } from './grid-binder
|
|
47
|
-
import type { DragHandleOption } from './grid-binder
|
|
48
|
-
import type { SplitNode } from './split-layout
|
|
46
|
+
import { type DashboardGridHandle, type DashboardGridOptions, type DashboardResponsiveOptions } from './grid-binder';
|
|
47
|
+
import type { DragHandleOption } from './grid-binder';
|
|
48
|
+
import type { SplitNode } from './split-layout';
|
|
49
49
|
/** A widget, declared as data. */
|
|
50
50
|
export interface DashboardWidgetSpec {
|
|
51
51
|
id: string;
|
|
@@ -268,6 +268,12 @@ export interface DashboardHandle {
|
|
|
268
268
|
readonly activeView: string;
|
|
269
269
|
/** A widget handle by id (undefined when unknown). */
|
|
270
270
|
widget(id: string): WidgetHandle | undefined;
|
|
271
|
+
/**
|
|
272
|
+
* SELECT a widget and move keyboard focus to it — what a press on the widget
|
|
273
|
+
* does. The selected widget shows its painted grip (`dragHandle: { grip }`)
|
|
274
|
+
* and a quiet ring; a void click clears. False when the id is unknown.
|
|
275
|
+
*/
|
|
276
|
+
focusWidget(id: string): boolean;
|
|
271
277
|
/** Every widget handle of a view (default: the active one). */
|
|
272
278
|
widgetsOf(viewId?: string): WidgetHandle[];
|
|
273
279
|
/**
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
*/
|
|
45
45
|
import { __awaiter } from "tslib";
|
|
46
46
|
import { BatchCommand, BringNodeToFrontCommand, Command, GroupModel, NodeModel, RemoveFromGroupCommand, RemoveGroupCommand, RemoveNodeCommand, SendNodeToBackCommand, } from '@grafloria/engine';
|
|
47
|
-
import { bindDashboardGrid, } from './grid-binder
|
|
48
|
-
import { bindDashboardSplit, SPLIT_TREE_KEY } from './split-binder
|
|
49
|
-
import { gridItemFromCell } from './grid-mapping
|
|
50
|
-
import { ensureDashboardKitStyles } from './styles
|
|
51
|
-
import { defaultWidgetRenderer } from './widgets
|
|
47
|
+
import { bindDashboardGrid, } from './grid-binder';
|
|
48
|
+
import { bindDashboardSplit, SPLIT_TREE_KEY } from './split-binder';
|
|
49
|
+
import { gridItemFromCell } from './grid-mapping';
|
|
50
|
+
import { ensureDashboardKitStyles } from './styles';
|
|
51
|
+
import { defaultWidgetRenderer } from './widgets';
|
|
52
52
|
/**
|
|
53
53
|
* Add a widget node AND its board membership as ONE undoable step.
|
|
54
54
|
*
|
|
@@ -504,6 +504,11 @@ export function createDashboardHandle(ctx) {
|
|
|
504
504
|
widget(id) {
|
|
505
505
|
return makeWidgetHandle(id);
|
|
506
506
|
},
|
|
507
|
+
focusWidget(id) {
|
|
508
|
+
var _a, _b;
|
|
509
|
+
const b = binders.get((_a = viewOfWidget.get(id)) !== null && _a !== void 0 ? _a : '');
|
|
510
|
+
return (_b = b === null || b === void 0 ? void 0 : b.focusWidget(id)) !== null && _b !== void 0 ? _b : false;
|
|
511
|
+
},
|
|
507
512
|
widgetsOf(viewId) {
|
|
508
513
|
var _a;
|
|
509
514
|
const v = views.find((x) => x.id === (viewId !== null && viewId !== void 0 ? viewId : ctx.active));
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
* second `bindDashboardGrid` on the section for a nested pack grid.
|
|
51
51
|
*/
|
|
52
52
|
import { Command, type DiagramModel, type GridColumnLayout, type GroupModel, type NodeModel } from '@grafloria/engine';
|
|
53
|
-
import { type CellRect, type WorldRect } from './grid-mapping
|
|
53
|
+
import { type CellRect, type WorldRect } from './grid-mapping';
|
|
54
54
|
/** The slice of a DiagramInstance the binder needs (structural, test-friendly). */
|
|
55
55
|
export interface DashboardGridApi {
|
|
56
56
|
getModel(): DiagramModel;
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
import { __awaiter } from "tslib";
|
|
53
53
|
import { AddToGroupCommand, BatchCommand, Command, GridPackEngine, RemoveFromGroupCommand, } from '@grafloria/engine';
|
|
54
54
|
import { LiveRegionController, registerTool } from '@grafloria/renderer';
|
|
55
|
-
import { buildCommitCommands, cellFromGridItem, cellToRect, columnUnitFor, gridItemFromCell, pointToCell, rowHeightFor, sizeToSpan, } from './grid-mapping
|
|
56
|
-
import { ensureDashboardKitStyles } from './styles
|
|
55
|
+
import { buildCommitCommands, cellFromGridItem, cellToRect, columnUnitFor, gridItemFromCell, pointToCell, rowHeightFor, sizeToSpan, } from './grid-mapping';
|
|
56
|
+
import { ensureDashboardKitStyles } from './styles';
|
|
57
57
|
/** The class of the painted grip element (a child of the node host). */
|
|
58
58
|
export const GRIP_CLASS = 'axdb-grip';
|
|
59
59
|
/** The container class that turns the caption strip's grip dots on. */
|
|
@@ -609,6 +609,20 @@ export function bindDashboardGrid(api, group, options = {}) {
|
|
|
609
609
|
* and the ROVING TABINDEX — exactly one member per board is a tab stop.
|
|
610
610
|
* Runs with the handles, so a repainted host gets it back too.
|
|
611
611
|
*/
|
|
612
|
+
/**
|
|
613
|
+
* THE SELECTED WIDGET — the one a press or keyboard focus last landed on.
|
|
614
|
+
* Stamped on its host as `axdb-selected`; that is what shows the painted
|
|
615
|
+
* grip (the DevExpress designer shows an item's bar on the selected item
|
|
616
|
+
* only). A press on a member selects it even when it starts no gesture; a
|
|
617
|
+
* void click clears it. Distinct from the roving tab stop, which must stay.
|
|
618
|
+
*/
|
|
619
|
+
let selectedId;
|
|
620
|
+
const selectWidget = (id) => {
|
|
621
|
+
if (id === selectedId)
|
|
622
|
+
return;
|
|
623
|
+
selectedId = id;
|
|
624
|
+
syncA11y();
|
|
625
|
+
};
|
|
612
626
|
const syncA11y = (only) => {
|
|
613
627
|
var _a, _b;
|
|
614
628
|
if (disposed)
|
|
@@ -616,6 +630,8 @@ export function bindDashboardGrid(api, group, options = {}) {
|
|
|
616
630
|
const members = [...((_a = group.members) !== null && _a !== void 0 ? _a : [])].filter((id) => !!diagram.getNode(id));
|
|
617
631
|
if (focusedId && !members.includes(focusedId))
|
|
618
632
|
focusedId = undefined;
|
|
633
|
+
if (selectedId && !members.includes(selectedId))
|
|
634
|
+
selectedId = undefined;
|
|
619
635
|
const stop = focusedId !== null && focusedId !== void 0 ? focusedId : members[0];
|
|
620
636
|
for (const id of members) {
|
|
621
637
|
if (only && !only.has(id))
|
|
@@ -634,6 +650,7 @@ export function bindDashboardGrid(api, group, options = {}) {
|
|
|
634
650
|
host.setAttribute('aria-roledescription', 'dashboard widget');
|
|
635
651
|
host.setAttribute('aria-label', bits.join(', '));
|
|
636
652
|
host.setAttribute('tabindex', id === stop ? '0' : '-1');
|
|
653
|
+
host.classList.toggle('axdb-selected', id === selectedId);
|
|
637
654
|
}
|
|
638
655
|
};
|
|
639
656
|
/**
|
|
@@ -1688,11 +1705,15 @@ export function bindDashboardGrid(api, group, options = {}) {
|
|
|
1688
1705
|
// The board's own empty area: a void click. Nothing to drag, and the
|
|
1689
1706
|
// selection clears exactly as a click outside any board would.
|
|
1690
1707
|
(_f = (_e = diagram).clearSelection) === null || _f === void 0 ? void 0 : _f.call(_e);
|
|
1708
|
+
selectWidget(undefined);
|
|
1691
1709
|
api.render();
|
|
1692
1710
|
return;
|
|
1693
1711
|
}
|
|
1694
1712
|
const node = diagram.getNode(onGrip ? gripId : hit.node.id);
|
|
1695
|
-
if (!node
|
|
1713
|
+
if (!node)
|
|
1714
|
+
return;
|
|
1715
|
+
selectWidget(node.id); // a press selects, whether or not it starts a gesture
|
|
1716
|
+
if (((_g = node.state) === null || _g === void 0 ? void 0 : _g.locked) === true)
|
|
1696
1717
|
return; // pinned: refuse; click still focuses
|
|
1697
1718
|
if (isStatic)
|
|
1698
1719
|
return; // a static board: claimed and deadened, click still focuses
|
|
@@ -1833,8 +1854,9 @@ export function bindDashboardGrid(api, group, options = {}) {
|
|
|
1833
1854
|
const hit = memberHostAt(e.target);
|
|
1834
1855
|
if (!hit || disposed)
|
|
1835
1856
|
return;
|
|
1836
|
-
if (focusedId !== hit.id) {
|
|
1857
|
+
if (focusedId !== hit.id || selectedId !== hit.id) {
|
|
1837
1858
|
focusedId = hit.id;
|
|
1859
|
+
selectedId = hit.id;
|
|
1838
1860
|
syncA11y();
|
|
1839
1861
|
}
|
|
1840
1862
|
};
|
|
@@ -2186,6 +2208,7 @@ export function bindDashboardGrid(api, group, options = {}) {
|
|
|
2186
2208
|
if (disposed || !((_a = group.members) !== null && _a !== void 0 ? _a : new Set()).has(id) || !diagram.getNode(id))
|
|
2187
2209
|
return false;
|
|
2188
2210
|
focusedId = id;
|
|
2211
|
+
selectedId = id;
|
|
2189
2212
|
syncA11y();
|
|
2190
2213
|
(_c = (_b = hostOf(id)) === null || _b === void 0 ? void 0 : _b.focus) === null || _c === void 0 ? void 0 : _c.call(_b, { preventScroll: true });
|
|
2191
2214
|
return true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { bindDashboardGrid, type DashboardGridApi, type DashboardGridOptions, type DashboardGridHandle, type DashboardResponsiveOptions, type DragHandleOption, type DragGripOptions, normalizeDragHandle, } from './grid-binder
|
|
2
|
-
export { bindDashboardSplit, SetSplitTreeCommand, SPLIT_TREE_KEY, type DashboardSplitOptions, type DashboardSplitHandle, } from './split-binder
|
|
3
|
-
export { projectSplit, dividersOf, addSplitLeaf, removeSplitLeaf, insertSplitLeaf, moveSplitDivider, splitFromCells, cellsFromSplit, splitLeaves, type SplitNode, type SplitGroup, type SplitLeaf, type SplitDir, type SplitSide, type SplitDivider, } from './split-layout
|
|
4
|
-
export { rowHeightFor, boardHeightFor, columnUnitFor, cellToRect, pointToCell, sizeToSpan, spanWidthPx, gridItemFromCell, cellFromGridItem, buildCommitCommands, type CellRect, type WorldRect, type DashboardGridGeometry, type TileDelta, } from './grid-mapping
|
|
5
|
-
export { ensureDashboardKitStyles, DASHBOARD_KIT_STYLE_ID } from './styles
|
|
6
|
-
export { dashboard, type DashboardOptions, type DashboardSpec, type DashboardSnapshot, type DashboardHandle, type DashboardViewSpec, type DashboardWidgetSpec, type WidgetHandle, } from './dashboard
|
|
7
|
-
export { defaultWidgetRenderer, renderKpiWidget, renderLineWidget, renderBarWidget, renderDonutWidget, renderFunnelWidget, renderTableWidget, BUILT_IN_WIDGET_KINDS, type WidgetRenderer, type KpiWidgetData, type LineWidgetData, type LineSeries, type BarWidgetData, type DonutWidgetData, type FunnelWidgetData, type TableWidgetData, } from './widgets
|
|
1
|
+
export { bindDashboardGrid, type DashboardGridApi, type DashboardGridOptions, type DashboardGridHandle, type DashboardResponsiveOptions, type DragHandleOption, type DragGripOptions, normalizeDragHandle, } from './grid-binder';
|
|
2
|
+
export { bindDashboardSplit, SetSplitTreeCommand, SPLIT_TREE_KEY, type DashboardSplitOptions, type DashboardSplitHandle, } from './split-binder';
|
|
3
|
+
export { projectSplit, dividersOf, addSplitLeaf, removeSplitLeaf, insertSplitLeaf, moveSplitDivider, splitFromCells, cellsFromSplit, splitLeaves, type SplitNode, type SplitGroup, type SplitLeaf, type SplitDir, type SplitSide, type SplitDivider, } from './split-layout';
|
|
4
|
+
export { rowHeightFor, boardHeightFor, columnUnitFor, cellToRect, pointToCell, sizeToSpan, spanWidthPx, gridItemFromCell, cellFromGridItem, buildCommitCommands, type CellRect, type WorldRect, type DashboardGridGeometry, type TileDelta, } from './grid-mapping';
|
|
5
|
+
export { ensureDashboardKitStyles, DASHBOARD_KIT_STYLE_ID } from './styles';
|
|
6
|
+
export { dashboard, type DashboardOptions, type DashboardSpec, type DashboardSnapshot, type DashboardHandle, type DashboardViewSpec, type DashboardWidgetSpec, type WidgetHandle, } from './dashboard';
|
|
7
|
+
export { defaultWidgetRenderer, renderKpiWidget, renderLineWidget, renderBarWidget, renderDonutWidget, renderFunnelWidget, renderTableWidget, BUILT_IN_WIDGET_KINDS, type WidgetRenderer, type KpiWidgetData, type LineWidgetData, type LineSeries, type BarWidgetData, type DonutWidgetData, type FunnelWidgetData, type TableWidgetData, } from './widgets';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { bindDashboardGrid, normalizeDragHandle, } from './grid-binder
|
|
2
|
-
export { bindDashboardSplit, SetSplitTreeCommand, SPLIT_TREE_KEY, } from './split-binder
|
|
3
|
-
export { projectSplit, dividersOf, addSplitLeaf, removeSplitLeaf, insertSplitLeaf, moveSplitDivider, splitFromCells, cellsFromSplit, splitLeaves, } from './split-layout
|
|
4
|
-
export { rowHeightFor, boardHeightFor, columnUnitFor, cellToRect, pointToCell, sizeToSpan, spanWidthPx, gridItemFromCell, cellFromGridItem, buildCommitCommands, } from './grid-mapping
|
|
5
|
-
export { ensureDashboardKitStyles, DASHBOARD_KIT_STYLE_ID } from './styles
|
|
1
|
+
export { bindDashboardGrid, normalizeDragHandle, } from './grid-binder';
|
|
2
|
+
export { bindDashboardSplit, SetSplitTreeCommand, SPLIT_TREE_KEY, } from './split-binder';
|
|
3
|
+
export { projectSplit, dividersOf, addSplitLeaf, removeSplitLeaf, insertSplitLeaf, moveSplitDivider, splitFromCells, cellsFromSplit, splitLeaves, } from './split-layout';
|
|
4
|
+
export { rowHeightFor, boardHeightFor, columnUnitFor, cellToRect, pointToCell, sizeToSpan, spanWidthPx, gridItemFromCell, cellFromGridItem, buildCommitCommands, } from './grid-mapping';
|
|
5
|
+
export { ensureDashboardKitStyles, DASHBOARD_KIT_STYLE_ID } from './styles';
|
|
6
6
|
// The DATA-FIRST authoring API (the erDiagram/umlDiagram equivalent).
|
|
7
|
-
export { dashboard, } from './dashboard
|
|
7
|
+
export { dashboard, } from './dashboard';
|
|
8
8
|
// The built-in renderers behind `kind` — dashboard()'s default renderWidget.
|
|
9
|
-
export { defaultWidgetRenderer, renderKpiWidget, renderLineWidget, renderBarWidget, renderDonutWidget, renderFunnelWidget, renderTableWidget, BUILT_IN_WIDGET_KINDS, } from './widgets
|
|
9
|
+
export { defaultWidgetRenderer, renderKpiWidget, renderLineWidget, renderBarWidget, renderDonutWidget, renderFunnelWidget, renderTableWidget, BUILT_IN_WIDGET_KINDS, } from './widgets';
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
* the authored size.
|
|
24
24
|
*/
|
|
25
25
|
import { Command, type GroupModel } from '@grafloria/engine';
|
|
26
|
-
import type { DashboardGridApi, DashboardGridHandle, DashboardGridOptions } from './grid-binder
|
|
27
|
-
import { type SplitNode } from './split-layout
|
|
26
|
+
import type { DashboardGridApi, DashboardGridHandle, DashboardGridOptions } from './grid-binder';
|
|
27
|
+
import { type SplitNode } from './split-layout';
|
|
28
28
|
/** Group metadata key the tree persists under. */
|
|
29
29
|
export declare const SPLIT_TREE_KEY = "dashboardTree";
|
|
30
30
|
export interface DashboardSplitOptions extends Pick<DashboardGridOptions, 'columns' | 'gap' | 'padding' | 'rtl' | 'fluid' | 'static' | 'dragHandle' | 'designHeight' | 'baseRowHeight' | 'dragOut' | 'removeZone' | 'onRemoveRequest' | 'onDropIn' | 'onGesture'> {
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
import { __awaiter } from "tslib";
|
|
26
26
|
import { Command } from '@grafloria/engine';
|
|
27
27
|
import { LiveRegionController, registerTool } from '@grafloria/renderer';
|
|
28
|
-
import { dragHandleSelector, gripHostOf, gripOf, normalizeDragHandle, pressOnDragHandle, syncGrip, DRAG_HANDLE_CLASS } from './grid-binder
|
|
29
|
-
import { cellFromGridItem } from './grid-mapping
|
|
30
|
-
import { addSplitLeaf, cellsFromSplit, cloneSplit, dividersOf, groupRectsOf, insertSplitLeaf, moveSplitDivider, normalizeSplit, pathToLeaf, projectSplit, removeSplitLeaf, splitFromCells, splitLeaves, } from './split-layout
|
|
31
|
-
import { ensureDashboardKitStyles } from './styles
|
|
28
|
+
import { dragHandleSelector, gripHostOf, gripOf, normalizeDragHandle, pressOnDragHandle, syncGrip, DRAG_HANDLE_CLASS } from './grid-binder';
|
|
29
|
+
import { cellFromGridItem } from './grid-mapping';
|
|
30
|
+
import { addSplitLeaf, cellsFromSplit, cloneSplit, dividersOf, groupRectsOf, insertSplitLeaf, moveSplitDivider, normalizeSplit, pathToLeaf, projectSplit, removeSplitLeaf, splitFromCells, splitLeaves, } from './split-layout';
|
|
31
|
+
import { ensureDashboardKitStyles } from './styles';
|
|
32
32
|
/** Group metadata key the tree persists under. */
|
|
33
33
|
export const SPLIT_TREE_KEY = 'dashboardTree';
|
|
34
34
|
/**
|
|
@@ -369,11 +369,21 @@ export function bindDashboardSplit(api, group, options = {}) {
|
|
|
369
369
|
return '';
|
|
370
370
|
return `${Math.round((r.width / f.width) * 100)} percent wide, ${Math.round((r.height / f.height) * 100)} percent tall`;
|
|
371
371
|
};
|
|
372
|
+
/** The selected widget (see grid-binder): stamped `axdb-selected`, shows the grip. */
|
|
373
|
+
let selectedId;
|
|
374
|
+
const selectWidget = (id) => {
|
|
375
|
+
if (id === selectedId)
|
|
376
|
+
return;
|
|
377
|
+
selectedId = id;
|
|
378
|
+
syncA11y();
|
|
379
|
+
};
|
|
372
380
|
const syncA11y = () => {
|
|
373
381
|
var _a, _b, _c, _d;
|
|
374
382
|
if (disposed)
|
|
375
383
|
return;
|
|
376
384
|
const order = splitLeaves(paintedTree()).filter((id) => !!diagram.getNode(id));
|
|
385
|
+
if (selectedId && !order.includes(selectedId))
|
|
386
|
+
selectedId = undefined;
|
|
377
387
|
// No corner handles on a split board: size comes from the dividers. A host
|
|
378
388
|
// that carried the grid's handle (a board switched live) sheds it here.
|
|
379
389
|
for (const id of order)
|
|
@@ -401,6 +411,7 @@ export function bindDashboardSplit(api, group, options = {}) {
|
|
|
401
411
|
host.setAttribute('aria-roledescription', 'dashboard widget');
|
|
402
412
|
host.setAttribute('aria-label', bits.filter(Boolean).join(', '));
|
|
403
413
|
host.setAttribute('tabindex', id === stop ? '0' : '-1');
|
|
414
|
+
host.classList.toggle('axdb-selected', id === selectedId);
|
|
404
415
|
});
|
|
405
416
|
};
|
|
406
417
|
// -- commit -----------------------------------------------------------------
|
|
@@ -637,11 +648,15 @@ export function bindDashboardSplit(api, group, options = {}) {
|
|
|
637
648
|
const onGrip = !!gripId && ((_f = group.members) !== null && _f !== void 0 ? _f : new Set()).has(gripId);
|
|
638
649
|
if (!hit.node && !onGrip) {
|
|
639
650
|
(_h = (_g = diagram).clearSelection) === null || _h === void 0 ? void 0 : _h.call(_g);
|
|
651
|
+
selectWidget(undefined);
|
|
640
652
|
api.render();
|
|
641
653
|
return;
|
|
642
654
|
}
|
|
643
655
|
const node = diagram.getNode(onGrip ? gripId : hit.node.id);
|
|
644
|
-
if (!node
|
|
656
|
+
if (!node)
|
|
657
|
+
return;
|
|
658
|
+
selectWidget(node.id); // a press selects, whether or not it starts a gesture
|
|
659
|
+
if (((_j = node.state) === null || _j === void 0 ? void 0 : _j.locked) === true || isStatic)
|
|
645
660
|
return;
|
|
646
661
|
if (((_k = node.getMetadata) === null || _k === void 0 ? void 0 : _k.call(node, 'widgetMovable')) === false)
|
|
647
662
|
return;
|
|
@@ -779,8 +794,9 @@ export function bindDashboardSplit(api, group, options = {}) {
|
|
|
779
794
|
const hit = memberHostAt(e.target);
|
|
780
795
|
if (!hit || disposed)
|
|
781
796
|
return;
|
|
782
|
-
if (focusedId !== hit.id) {
|
|
797
|
+
if (focusedId !== hit.id || selectedId !== hit.id) {
|
|
783
798
|
focusedId = hit.id;
|
|
799
|
+
selectedId = hit.id;
|
|
784
800
|
syncA11y();
|
|
785
801
|
}
|
|
786
802
|
};
|
|
@@ -978,6 +994,7 @@ export function bindDashboardSplit(api, group, options = {}) {
|
|
|
978
994
|
if (!((_a = group.members) !== null && _a !== void 0 ? _a : new Set()).has(id) || !diagram.getNode(id))
|
|
979
995
|
return false;
|
|
980
996
|
focusedId = id;
|
|
997
|
+
selectedId = id;
|
|
981
998
|
syncA11y();
|
|
982
999
|
(_c = (_b = hostOf(id)) === null || _b === void 0 ? void 0 : _b.focus) === null || _c === void 0 ? void 0 : _c.call(_b, { preventScroll: true });
|
|
983
1000
|
return true;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* tree as plain JSON (`dashboardTree` on the board's group). One tree write
|
|
17
17
|
* per gesture is the whole undo story.
|
|
18
18
|
*/
|
|
19
|
-
import type { CellRect, WorldRect } from './grid-mapping
|
|
19
|
+
import type { CellRect, WorldRect } from './grid-mapping';
|
|
20
20
|
export type SplitDir = 'row' | 'column';
|
|
21
21
|
export interface SplitLeaf {
|
|
22
22
|
id: string;
|
|
@@ -192,21 +192,50 @@ const CSS = `
|
|
|
192
192
|
.grafloria-node-host > .axdb-grip {
|
|
193
193
|
position: absolute; z-index: 4; box-sizing: border-box; width: 24px; height: 12px;
|
|
194
194
|
border: 1px solid var(--axdb-line, #e7eaf1); border-radius: 3px; background: var(--axdb-card, #fff);
|
|
195
|
-
color: var(--axdb-muted, #5a6478); cursor: grab;
|
|
195
|
+
color: var(--axdb-muted, #5a6478); cursor: grab;
|
|
196
|
+
/* Shown on the SELECTED widget only (the DevExpress designer shows an item's
|
|
197
|
+
bar on the selected item): a press or keyboard focus selects, a void
|
|
198
|
+
click clears. Hidden, it takes no pointer either. */
|
|
199
|
+
opacity: 0; pointer-events: none; transition: opacity .12s ease;
|
|
196
200
|
}
|
|
201
|
+
.grafloria-node-host.axdb-selected > .axdb-grip, .grafloria-node-host:focus-within > .axdb-grip { opacity: 1; pointer-events: auto; }
|
|
197
202
|
.grafloria-node-host > .axdb-grip::before {
|
|
198
203
|
content: ''; position: absolute; left: 5px; top: 2px; width: 12px; height: 6px;
|
|
199
204
|
background: radial-gradient(circle, currentColor 1px, transparent 1.4px) 0 0 / 4px 3px;
|
|
200
205
|
}
|
|
201
|
-
.grafloria-node-host
|
|
202
|
-
|
|
206
|
+
.grafloria-node-host > .axdb-grip:hover { border-color: #3b52d9; color: #3b52d9; }
|
|
207
|
+
/* The selected card says so, quietly. */
|
|
208
|
+
.grafloria-node-host.axdb-selected > .axdb-widget { box-shadow: 0 0 0 1.5px rgba(59, 82, 217, .55), 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .05); }
|
|
209
|
+
/* INSIDE: centred on the header's text line and flush with the card padding,
|
|
210
|
+
per size tier (padding 13/15, then 8/14, 4/12, 2/12). */
|
|
211
|
+
.grafloria-node-host > .axdb-grip--inside { top: 14px; }
|
|
212
|
+
.grafloria-node-host > .axdb-grip--inside.axdb-grip--left { left: 15px; }
|
|
213
|
+
.grafloria-node-host > .axdb-grip--inside.axdb-grip--right { right: 15px; }
|
|
214
|
+
.grafloria-node-host > .axdb-grip--inside.axdb-grip--center { top: 3px; }
|
|
215
|
+
@container axdb-tile (max-height: 90px) {
|
|
216
|
+
.grafloria-node-host > .axdb-grip--inside { top: 9px; }
|
|
217
|
+
.grafloria-node-host > .axdb-grip--inside.axdb-grip--left { left: 14px; }
|
|
218
|
+
.grafloria-node-host > .axdb-grip--inside.axdb-grip--right { right: 14px; }
|
|
219
|
+
.grafloria-node-host > .axdb-grip--inside.axdb-grip--center { top: 2px; }
|
|
220
|
+
}
|
|
221
|
+
@container axdb-tile (max-height: 46px) {
|
|
222
|
+
.grafloria-node-host > .axdb-grip--inside { top: 5px; }
|
|
223
|
+
.grafloria-node-host > .axdb-grip--inside.axdb-grip--left { left: 12px; }
|
|
224
|
+
.grafloria-node-host > .axdb-grip--inside.axdb-grip--right { right: 12px; }
|
|
225
|
+
.grafloria-node-host > .axdb-grip--inside.axdb-grip--center { top: 1px; }
|
|
226
|
+
}
|
|
227
|
+
@container axdb-tile (max-height: 26px) {
|
|
228
|
+
.grafloria-node-host > .axdb-grip--inside { top: 2px; }
|
|
229
|
+
}
|
|
230
|
+
/* OUTSIDE: a tab on the card's top edge, its corners in line with the card's. */
|
|
203
231
|
.grafloria-node-host > .axdb-grip--outside { top: -11px; height: 11px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; box-shadow: 0 -1px 2px rgba(16, 24, 40, .08); }
|
|
204
|
-
.grafloria-node-host > .axdb-grip--left { left:
|
|
205
|
-
.grafloria-node-host > .axdb-grip--right { right:
|
|
232
|
+
.grafloria-node-host > .axdb-grip--outside.axdb-grip--left { left: 10px; }
|
|
233
|
+
.grafloria-node-host > .axdb-grip--outside.axdb-grip--right { right: 10px; }
|
|
206
234
|
.grafloria-node-host > .axdb-grip--center { left: 50%; transform: translateX(-50%); }
|
|
207
|
-
|
|
208
|
-
.grafloria-node-host.axdb-gp-inside.axdb-gp-
|
|
209
|
-
.grafloria-node-host.axdb-gp-inside.axdb-gp-
|
|
235
|
+
/* The header makes room for an inside grip on its side; a centred one sits above it. */
|
|
236
|
+
.grafloria-node-host.axdb-gp-inside.axdb-gp-left .axdb-widget > .axdb-widget-h { padding-left: 32px; }
|
|
237
|
+
.grafloria-node-host.axdb-gp-inside.axdb-gp-right .axdb-widget > .axdb-widget-h { padding-right: 32px; }
|
|
238
|
+
.grafloria-node-host.axdb-gp-inside.axdb-gp-center .axdb-widget > .axdb-widget-h { padding-top: 12px; }
|
|
210
239
|
.axdb-widget-b { flex: 1; min-height: 0; position: relative; }
|
|
211
240
|
.axdb-widget-b > svg { display: block; width: 100%; height: 100%; }
|
|
212
241
|
.axdb-widget-b.axdb-scroll { overflow: auto; }
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* (that is exactly what demos/dashboard/dashboard-builder.html does for its
|
|
29
29
|
* focus ring and pin marker).
|
|
30
30
|
*/
|
|
31
|
-
import type { DashboardWidgetSpec } from './dashboard
|
|
31
|
+
import type { DashboardWidgetSpec } from './dashboard';
|
|
32
32
|
/** The signature every renderer here (and `renderWidget`) satisfies. */
|
|
33
33
|
export type WidgetRenderer = (widget: DashboardWidgetSpec, host: HTMLElement) => void;
|
|
34
34
|
/** `kind: 'kpi'` — one headline number, an optional change, an optional trend. */
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* (that is exactly what demos/dashboard/dashboard-builder.html does for its
|
|
29
29
|
* focus ring and pin marker).
|
|
30
30
|
*/
|
|
31
|
-
import { ensureDashboardKitStyles } from './styles
|
|
31
|
+
import { ensureDashboardKitStyles } from './styles';
|
|
32
32
|
/** The kinds `defaultWidgetRenderer` knows; anything else gets the placeholder. */
|
|
33
33
|
export const BUILT_IN_WIDGET_KINDS = ['kpi', 'line', 'bar', 'donut', 'funnel', 'table'];
|
|
34
34
|
/**
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* port-reconciliation code count those, and the affordance is neither a column
|
|
15
15
|
* nor a member.
|
|
16
16
|
*/
|
|
17
|
-
import type { ErColumn, ErEntitySpec } from './er
|
|
18
|
-
import type { UmlClassSpec } from './uml
|
|
17
|
+
import type { ErColumn, ErEntitySpec } from './er';
|
|
18
|
+
import type { UmlClassSpec } from './uml';
|
|
19
19
|
/** Row height / header height of the entity card — sizing is derived from these. */
|
|
20
20
|
export declare const ER_ROW_H = 25;
|
|
21
21
|
export declare const ER_HEAD_H = 28;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* row-selection handler and the binder's node/waypoint double-click never also
|
|
27
27
|
* fire for the same gesture.
|
|
28
28
|
*/
|
|
29
|
-
import { updateEntity, updateClass, addColumnAt, removeColumnAt, renameColumnAt } from './update
|
|
29
|
+
import { updateEntity, updateClass, addColumnAt, removeColumnAt, renameColumnAt } from './update';
|
|
30
30
|
const bindings = new WeakMap();
|
|
31
31
|
const ROW_SELECTOR = '.axk-row, .axk-member';
|
|
32
32
|
/** Resolve the node id + the clicked row's global index (among selectable rows). */
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
* render(spec, container);
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
import { ensureDiagramKitStyles } from './styles
|
|
24
|
-
import { bindRowInteractions } from './rows
|
|
25
|
-
import { entityCardContent, entityAutoHeight, entityAutoWidth, erRowCenterY, ER_ROW_H, ER_HEAD_H, } from './card
|
|
26
|
-
import { bindCardEditing } from './editing
|
|
23
|
+
import { ensureDiagramKitStyles } from './styles';
|
|
24
|
+
import { bindRowInteractions } from './rows';
|
|
25
|
+
import { entityCardContent, entityAutoHeight, entityAutoWidth, erRowCenterY, ER_ROW_H, ER_HEAD_H, } from './card';
|
|
26
|
+
import { bindCardEditing } from './editing';
|
|
27
27
|
// Layout constants + the row-centre helper live in card.ts now (the ONE source
|
|
28
|
-
// of truth shared with update.ts). Re-exported here so `import … from './er
|
|
28
|
+
// of truth shared with update.ts). Re-exported here so `import … from './er'`
|
|
29
29
|
// keeps working.
|
|
30
30
|
export { erRowCenterY, ER_ROW_H, ER_HEAD_H };
|
|
31
31
|
const CARDINALITY = {
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
* where it is safe, never on the stored NodeModel (which the engine
|
|
21
21
|
* reconstructs from data on undo/paste/collab; see the decision doc).
|
|
22
22
|
*/
|
|
23
|
-
import type { ErColumn, ErEntitySpec } from './er
|
|
24
|
-
import type { UmlClassSpec } from './uml
|
|
25
|
-
import { updateEntity, updateClass } from './update
|
|
26
|
-
import type { RowRef } from './rows
|
|
23
|
+
import type { ErColumn, ErEntitySpec } from './er';
|
|
24
|
+
import type { UmlClassSpec } from './uml';
|
|
25
|
+
import { updateEntity, updateClass } from './update';
|
|
26
|
+
import type { RowRef } from './rows';
|
|
27
27
|
/** The slice of DiagramInstance the handles need (same shape update.ts uses). */
|
|
28
28
|
export interface HandleApi {
|
|
29
29
|
container: HTMLElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import { updateEntity, updateClass } from './update
|
|
2
|
+
import { updateEntity, updateClass } from './update';
|
|
3
3
|
const deep = (v) => JSON.parse(JSON.stringify(v));
|
|
4
4
|
// ---------------------------------------------------------------------------
|
|
5
5
|
// Base
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { erDiagram, erRowCenterY, ER_ROW_H, ER_HEAD_H, type ErColumn, type ErEntitySpec, type ErRelationshipSpec, type ErCardinality, type ErSide, type ErDiagramOptions, } from './er
|
|
2
|
-
export { umlDiagram, type UmlClassSpec, type UmlRelationshipSpec, type UmlRelationKind, type UmlSide, type UmlDiagramOptions, } from './uml
|
|
3
|
-
export { ensureDiagramKitStyles, DIAGRAM_KIT_STYLE_ID } from './styles
|
|
4
|
-
export { bindRowInteractions, type RowRef, type RowInteractionsHandle } from './rows
|
|
5
|
-
export { updateEntity, updateClass, addColumnAt, removeColumnAt, renameColumnAt, type ErEntityDelta, type UmlClassDelta, } from './update
|
|
6
|
-
export { bindCardEditing, type CardEditingHandle } from './editing
|
|
7
|
-
export { matchColumns, rowIndexFromY } from './card
|
|
8
|
-
export { entityCardContent, entityAutoHeight, classCardContent, classAutoHeight } from './card
|
|
9
|
-
export { scoreMatch, matchTier, assignTiers, singularize, bindJoinGuidance, ensureJoinGuidanceStyles, JOIN_GUIDANCE_STYLE_ID, type JoinColumn, type JoinEnd, type MatchTier, type JoinGuidanceApi, type JoinGuidanceOptions, type JoinGuidanceHandle, } from './join-guidance
|
|
10
|
-
export { erTable, umlClass, erTables, umlClasses, CardHandle, ErTable, ErField, ErColumnList, UmlClass, UmlMemberList, type HandleApi, } from './handles
|
|
1
|
+
export { erDiagram, erRowCenterY, ER_ROW_H, ER_HEAD_H, type ErColumn, type ErEntitySpec, type ErRelationshipSpec, type ErCardinality, type ErSide, type ErDiagramOptions, } from './er';
|
|
2
|
+
export { umlDiagram, type UmlClassSpec, type UmlRelationshipSpec, type UmlRelationKind, type UmlSide, type UmlDiagramOptions, } from './uml';
|
|
3
|
+
export { ensureDiagramKitStyles, DIAGRAM_KIT_STYLE_ID } from './styles';
|
|
4
|
+
export { bindRowInteractions, type RowRef, type RowInteractionsHandle } from './rows';
|
|
5
|
+
export { updateEntity, updateClass, addColumnAt, removeColumnAt, renameColumnAt, type ErEntityDelta, type UmlClassDelta, } from './update';
|
|
6
|
+
export { bindCardEditing, type CardEditingHandle } from './editing';
|
|
7
|
+
export { matchColumns, rowIndexFromY } from './card';
|
|
8
|
+
export { entityCardContent, entityAutoHeight, classCardContent, classAutoHeight } from './card';
|
|
9
|
+
export { scoreMatch, matchTier, assignTiers, singularize, bindJoinGuidance, ensureJoinGuidanceStyles, JOIN_GUIDANCE_STYLE_ID, type JoinColumn, type JoinEnd, type MatchTier, type JoinGuidanceApi, type JoinGuidanceOptions, type JoinGuidanceHandle, } from './join-guidance';
|
|
10
|
+
export { erTable, umlClass, erTables, umlClasses, CardHandle, ErTable, ErField, ErColumnList, UmlClass, UmlMemberList, type HandleApi, } from './handles';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { erDiagram, erRowCenterY, ER_ROW_H, ER_HEAD_H, } from './er
|
|
2
|
-
export { umlDiagram, } from './uml
|
|
3
|
-
export { ensureDiagramKitStyles, DIAGRAM_KIT_STYLE_ID } from './styles
|
|
4
|
-
export { bindRowInteractions } from './rows
|
|
5
|
-
export { updateEntity, updateClass, addColumnAt, removeColumnAt, renameColumnAt, } from './update
|
|
6
|
-
export { bindCardEditing } from './editing
|
|
7
|
-
export { matchColumns, rowIndexFromY } from './card
|
|
1
|
+
export { erDiagram, erRowCenterY, ER_ROW_H, ER_HEAD_H, } from './er';
|
|
2
|
+
export { umlDiagram, } from './uml';
|
|
3
|
+
export { ensureDiagramKitStyles, DIAGRAM_KIT_STYLE_ID } from './styles';
|
|
4
|
+
export { bindRowInteractions } from './rows';
|
|
5
|
+
export { updateEntity, updateClass, addColumnAt, removeColumnAt, renameColumnAt, } from './update';
|
|
6
|
+
export { bindCardEditing } from './editing';
|
|
7
|
+
export { matchColumns, rowIndexFromY } from './card';
|
|
8
8
|
// The card CONTENT builders — shared with the stencil palette so a dropped
|
|
9
9
|
// "Entity"/"Class" is the identical card erDiagram()/umlDiagram() produce.
|
|
10
|
-
export { entityCardContent, entityAutoHeight, classCardContent, classAutoHeight } from './card
|
|
10
|
+
export { entityCardContent, entityAutoHeight, classCardContent, classAutoHeight } from './card';
|
|
11
11
|
// Live join guidance — score every other table's columns against a connection
|
|
12
12
|
// drag's source column and tint the kit rows by fit (the query-builder story).
|
|
13
|
-
export { scoreMatch, matchTier, assignTiers, singularize, bindJoinGuidance, ensureJoinGuidanceStyles, JOIN_GUIDANCE_STYLE_ID, } from './join-guidance
|
|
14
|
-
export { erTable, umlClass, erTables, umlClasses, CardHandle, ErTable, ErField, ErColumnList, UmlClass, UmlMemberList, } from './handles
|
|
13
|
+
export { scoreMatch, matchTier, assignTiers, singularize, bindJoinGuidance, ensureJoinGuidanceStyles, JOIN_GUIDANCE_STYLE_ID, } from './join-guidance';
|
|
14
|
+
export { erTable, umlClass, erTables, umlClasses, CardHandle, ErTable, ErField, ErColumnList, UmlClass, UmlMemberList, } from './handles';
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
* spec.finalize(api); // attaches multiplicity chips (needs the live model)
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
|
-
import { ensureDiagramKitStyles } from './styles
|
|
26
|
-
import { bindRowInteractions } from './rows
|
|
27
|
-
import { classCardContent, classAutoHeight, classAutoWidth } from './card
|
|
28
|
-
import { bindCardEditing } from './editing
|
|
25
|
+
import { ensureDiagramKitStyles } from './styles';
|
|
26
|
+
import { bindRowInteractions } from './rows';
|
|
27
|
+
import { classCardContent, classAutoHeight, classAutoWidth } from './card';
|
|
28
|
+
import { bindCardEditing } from './editing';
|
|
29
29
|
const STROKE = '#475569';
|
|
30
30
|
const DASH = '6,4';
|
|
31
31
|
/**
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* intended extension point — every basic command does it). When no engine is
|
|
28
28
|
* present the edit still applies, just non-undoably.
|
|
29
29
|
*/
|
|
30
|
-
import type { ErColumn } from './er
|
|
30
|
+
import type { ErColumn } from './er';
|
|
31
31
|
/** What an ER table edit can change. Omitted fields are left as they were. */
|
|
32
32
|
export interface ErEntityDelta {
|
|
33
33
|
name?: string;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
*/
|
|
30
30
|
import { __awaiter } from "tslib";
|
|
31
31
|
import { Command, PortModel, LinkModel } from '@grafloria/engine';
|
|
32
|
-
import { entityCardContent, entityAutoHeight, entityAutoWidth, classCardContent, classAutoHeight, classAutoWidth, erRowCenterY, rowIndexFromY, matchColumns, } from './card
|
|
32
|
+
import { entityCardContent, entityAutoHeight, entityAutoWidth, classCardContent, classAutoHeight, classAutoWidth, erRowCenterY, rowIndexFromY, matchColumns, } from './card';
|
|
33
33
|
/**
|
|
34
34
|
* The single undoable edit. Captures the card's whole before-state on first
|
|
35
35
|
* execute and restores it on undo, so an edit — however many rows and edges it
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createDiagram, DARK_THEME, LIGHT_THEME } from '@grafloria/renderer';
|
|
2
|
-
import { getNodeType, renderFromTemplate } from './node-type-registry
|
|
2
|
+
import { getNodeType, renderFromTemplate } from './node-type-registry';
|
|
3
3
|
/**
|
|
4
4
|
* `<grafloria-flow>` — the universal embed.
|
|
5
5
|
*
|
package/src/lib/grafloria.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CreateDiagramOptions, DiagramInstance, EdgeSpec, NodeSpec, StaticRenderOptions, StaticRenderResult } from '@grafloria/renderer';
|
|
2
|
-
import { defineGrafloriaFlow } from './grafloria-flow-element
|
|
3
|
-
import type { DashboardSpec } from './dashboard-kit
|
|
4
|
-
import { registerNodeType, registeredNodeTypes } from './node-type-registry
|
|
5
|
-
import type { NodeTypeRenderer } from './node-type-registry
|
|
2
|
+
import { defineGrafloriaFlow } from './grafloria-flow-element';
|
|
3
|
+
import type { DashboardSpec } from './dashboard-kit';
|
|
4
|
+
import { registerNodeType, registeredNodeTypes } from './node-type-registry';
|
|
5
|
+
import type { NodeTypeRenderer } from './node-type-registry';
|
|
6
6
|
/**
|
|
7
7
|
* `Grafloria` — the Mermaid-shaped top-level API.
|
|
8
8
|
*
|
package/src/lib/grafloria.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createDiagram, renderToStaticSVG } from '@grafloria/renderer';
|
|
2
|
-
import { defineGrafloriaFlow } from './grafloria-flow-element
|
|
3
|
-
import { registerNodeType, registeredNodeTypes, getNodeType } from './node-type-registry
|
|
2
|
+
import { defineGrafloriaFlow } from './grafloria-flow-element';
|
|
3
|
+
import { registerNodeType, registeredNodeTypes, getNodeType } from './node-type-registry';
|
|
4
4
|
/**
|
|
5
5
|
* Mount `spec` into `target` and return the live instance.
|
|
6
6
|
*
|
package/src/lib/load.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DiagramDocumentEnvelope, DiagramModel, LinkModel, NodeModel, SerializedDiagramData } from '@grafloria/engine';
|
|
2
|
-
import { type DashboardGridHandle } from './dashboard-kit/grid-binder
|
|
3
|
-
import { type WidgetRenderer } from './dashboard-kit/widgets
|
|
4
|
-
import { type DashboardHandle } from './dashboard-kit/dashboard
|
|
2
|
+
import { type DashboardGridHandle } from './dashboard-kit/grid-binder';
|
|
3
|
+
import { type WidgetRenderer } from './dashboard-kit/widgets';
|
|
4
|
+
import { type DashboardHandle } from './dashboard-kit/dashboard';
|
|
5
5
|
/** Anything `DiagramSerializer.deserialize()` accepts, or the JSON string of it. */
|
|
6
6
|
export type SavedDiagram = SerializedDiagramData | DiagramDocumentEnvelope | Record<string, unknown> | string;
|
|
7
7
|
export interface FromDocumentOptions {
|
package/src/lib/load.js
CHANGED
|
@@ -62,17 +62,17 @@
|
|
|
62
62
|
* itself wrote keeps the registry the general seam it is meant to be.
|
|
63
63
|
*/
|
|
64
64
|
import { DiagramSerializer } from '@grafloria/engine';
|
|
65
|
-
import { getNodeType } from './node-type-registry
|
|
66
|
-
import { bindRowInteractions } from './diagram-kit/rows
|
|
67
|
-
import { bindCardEditing } from './diagram-kit/editing
|
|
68
|
-
import { ensureDiagramKitStyles } from './diagram-kit/styles
|
|
69
|
-
import { bindDashboardGrid } from './dashboard-kit/grid-binder
|
|
70
|
-
import { bindDashboardSplit, SPLIT_TREE_KEY } from './dashboard-kit/split-binder
|
|
71
|
-
import { gridItemFromCell } from './dashboard-kit/grid-mapping
|
|
72
|
-
import { cellFromGridItem } from './dashboard-kit/grid-mapping
|
|
73
|
-
import { ensureDashboardKitStyles } from './dashboard-kit/styles
|
|
74
|
-
import { defaultWidgetRenderer } from './dashboard-kit/widgets
|
|
75
|
-
import { createDashboardHandle, } from './dashboard-kit/dashboard
|
|
65
|
+
import { getNodeType } from './node-type-registry';
|
|
66
|
+
import { bindRowInteractions } from './diagram-kit/rows';
|
|
67
|
+
import { bindCardEditing } from './diagram-kit/editing';
|
|
68
|
+
import { ensureDiagramKitStyles } from './diagram-kit/styles';
|
|
69
|
+
import { bindDashboardGrid } from './dashboard-kit/grid-binder';
|
|
70
|
+
import { bindDashboardSplit, SPLIT_TREE_KEY } from './dashboard-kit/split-binder';
|
|
71
|
+
import { gridItemFromCell } from './dashboard-kit/grid-mapping';
|
|
72
|
+
import { cellFromGridItem } from './dashboard-kit/grid-mapping';
|
|
73
|
+
import { ensureDashboardKitStyles } from './dashboard-kit/styles';
|
|
74
|
+
import { defaultWidgetRenderer } from './dashboard-kit/widgets';
|
|
75
|
+
import { createDashboardHandle, } from './dashboard-kit/dashboard';
|
|
76
76
|
/** True when the node is an ER entity card or a UML class card. */
|
|
77
77
|
function isDiagramKitCard(node) {
|
|
78
78
|
return node.getMetadata('kitEntity') !== undefined || node.getMetadata('kitClass') !== undefined;
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* a canvas that was never built by a kit.
|
|
14
14
|
*/
|
|
15
15
|
import { NodeModel } from '@grafloria/engine';
|
|
16
|
-
import { entityCardContent, entityAutoHeight, classCardContent, classAutoHeight, bindRowInteractions, bindCardEditing, ensureDiagramKitStyles, } from '../diagram-kit
|
|
17
|
-
import { registerStencilBuilder } from './builders
|
|
16
|
+
import { entityCardContent, entityAutoHeight, classCardContent, classAutoHeight, bindRowInteractions, bindCardEditing, ensureDiagramKitStyles, } from '../diagram-kit';
|
|
17
|
+
import { registerStencilBuilder } from './builders';
|
|
18
18
|
/** Cards are transparent: the HTML body IS the card, the shape must not paint. */
|
|
19
19
|
const CARD_SHAPE = { type: 'rect', fill: 'none', stroke: 'none' };
|
|
20
20
|
const CARD_STYLE = { fill: 'transparent', stroke: 'transparent', strokeWidth: 0 };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { bindStencilPalette } from './palette
|
|
2
|
-
export type { StencilPaletteApi, StencilPaletteOptions, StencilPaletteHandle, } from './palette
|
|
3
|
-
export { bindShapeDataPanel } from './shape-data
|
|
4
|
-
export type { ShapeDataPanelApi, ShapeDataPanelOptions, ShapeDataPanelHandle } from './shape-data
|
|
5
|
-
export { ensureStencilKitStyles } from './styles
|
|
6
|
-
export { registerStencilBuilder, getStencilBuilder, unregisterStencilBuilder, registeredStencilBuilders, } from './builders
|
|
7
|
-
export type { StencilBuilder, StencilBuildContext } from './builders
|
|
1
|
+
export { bindStencilPalette } from './palette';
|
|
2
|
+
export type { StencilPaletteApi, StencilPaletteOptions, StencilPaletteHandle, } from './palette';
|
|
3
|
+
export { bindShapeDataPanel } from './shape-data';
|
|
4
|
+
export type { ShapeDataPanelApi, ShapeDataPanelOptions, ShapeDataPanelHandle } from './shape-data';
|
|
5
|
+
export { ensureStencilKitStyles } from './styles';
|
|
6
|
+
export { registerStencilBuilder, getStencilBuilder, unregisterStencilBuilder, registeredStencilBuilders, } from './builders';
|
|
7
|
+
export type { StencilBuilder, StencilBuildContext } from './builders';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { bindStencilPalette } from './palette
|
|
2
|
-
export { bindShapeDataPanel } from './shape-data
|
|
3
|
-
export { ensureStencilKitStyles } from './styles
|
|
4
|
-
export { registerStencilBuilder, getStencilBuilder, unregisterStencilBuilder, registeredStencilBuilders, } from './builders
|
|
5
|
-
import { registerCardBuilders } from './card-builders
|
|
1
|
+
export { bindStencilPalette } from './palette';
|
|
2
|
+
export { bindShapeDataPanel } from './shape-data';
|
|
3
|
+
export { ensureStencilKitStyles } from './styles';
|
|
4
|
+
export { registerStencilBuilder, getStencilBuilder, unregisterStencilBuilder, registeredStencilBuilders, } from './builders';
|
|
5
|
+
import { registerCardBuilders } from './card-builders';
|
|
6
6
|
// The ER/UML card builders ship registered — dropping "Entity" gives a real,
|
|
7
7
|
// editable table out of the box.
|
|
8
8
|
registerCardBuilders();
|
|
@@ -16,8 +16,8 @@ import { __awaiter } from "tslib";
|
|
|
16
16
|
*/
|
|
17
17
|
import { listStencils, NodeFactory, AddNodeCommand, BatchCommand, } from '@grafloria/engine';
|
|
18
18
|
import { getShape } from '@grafloria/renderer';
|
|
19
|
-
import { ensureStencilKitStyles } from './styles
|
|
20
|
-
import { getStencilBuilder } from './builders
|
|
19
|
+
import { ensureStencilKitStyles } from './styles';
|
|
20
|
+
import { getStencilBuilder } from './builders';
|
|
21
21
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
22
22
|
/** The MIME the palette drags with — namespaced so a page's other DnD is untouched. */
|
|
23
23
|
const DND_TYPE = 'application/x-grafloria-master';
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
* kit card's Name rows) is load-bearing for existing demos and gates.
|
|
28
28
|
*/
|
|
29
29
|
import { BatchCommand, MoveNodeCommand, ResizeNodeCommand, SetLinkDisplayLabelCommand, SetLinkPathTypeCommand, SetNodeDataCommand, SetNodeLabelCommand, SetNodeShapeConfigCommand, SetNodeStyleCommand, UpdateLinkStyleCommand, } from '@grafloria/engine';
|
|
30
|
-
import { erTable, umlClass } from '../diagram-kit
|
|
31
|
-
import { ensureStencilKitStyles } from './styles
|
|
30
|
+
import { erTable, umlClass } from '../diagram-kit';
|
|
31
|
+
import { ensureStencilKitStyles } from './styles';
|
|
32
32
|
/** The schema a node's shape data follows, via the master it was stamped from. */
|
|
33
33
|
function schemaFor(engine, node) {
|
|
34
34
|
var _a, _b, _c, _d;
|