@grafloria/element 0.4.10 → 0.4.11
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/index.d.ts +16 -16
- package/src/index.js +9 -9
- package/src/lib/dashboard-kit/dashboard.d.ts +3 -3
- package/src/lib/dashboard-kit/dashboard.js +5 -5
- package/src/lib/dashboard-kit/grid-binder.d.ts +1 -1
- package/src/lib/dashboard-kit/grid-binder.js +2 -2
- 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 +4 -4
- package/src/lib/dashboard-kit/split-layout.d.ts +1 -1
- 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/package.json
CHANGED
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.js';
|
|
16
|
+
export { Grafloria, render, renderStatic } from './lib/grafloria.js';
|
|
17
|
+
export type { DiagramSpec, RenderSpec, RenderOptions } from './lib/grafloria.js';
|
|
18
|
+
export { fromDocument } from './lib/load.js';
|
|
19
|
+
export type { SavedDiagram, FromDocumentOptions, LoadedDiagramSpec } from './lib/load.js';
|
|
20
|
+
export { registerNodeType, unregisterNodeType, registeredNodeTypes, getNodeType, hasNodeType, renderFromTemplate, } from './lib/node-type-registry.js';
|
|
21
|
+
export type { NodeTypeRenderer } from './lib/node-type-registry.js';
|
|
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/index.js';
|
|
78
|
+
export type { JoinColumn, JoinEnd, MatchTier, JoinGuidanceApi, JoinGuidanceOptions, JoinGuidanceHandle, } from './lib/diagram-kit/index.js';
|
|
79
|
+
export type { ErColumn, ErEntitySpec, ErRelationshipSpec, ErCardinality, ErSide, ErDiagramOptions, UmlClassSpec, UmlRelationshipSpec, UmlRelationKind, UmlSide, UmlDiagramOptions, ErEntityDelta, UmlClassDelta, CardEditingHandle, } from './lib/diagram-kit/index.js';
|
|
80
|
+
export { erTable, umlClass, erTables, umlClasses, CardHandle, ErTable, ErField, ErColumnList, UmlClass, UmlMemberList, } from './lib/diagram-kit/index.js';
|
|
81
|
+
export type { HandleApi } from './lib/diagram-kit/index.js';
|
|
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/index.js';
|
|
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/index.js';
|
|
84
|
+
export { bindStencilPalette, bindShapeDataPanel, ensureStencilKitStyles } from './lib/stencil-kit/index.js';
|
|
85
|
+
export type { StencilPaletteApi, StencilPaletteOptions, StencilPaletteHandle, ShapeDataPanelApi, ShapeDataPanelOptions, ShapeDataPanelHandle, } from './lib/stencil-kit/index.js';
|
|
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.js';
|
|
16
|
+
export { GrafloriaFlowElement, defineGrafloriaFlow, GRAFLORIA_EVENTS } from './lib/grafloria-flow-element.js';
|
|
17
|
+
export { Grafloria, render, renderStatic } from './lib/grafloria.js';
|
|
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.js';
|
|
22
|
+
export { registerNodeType, unregisterNodeType, registeredNodeTypes, getNodeType, hasNodeType, renderFromTemplate, } from './lib/node-type-registry.js';
|
|
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/index.js';
|
|
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/index.js';
|
|
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/index.js';
|
|
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/index.js';
|
|
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.js';
|
|
47
|
+
import type { DragHandleOption } from './grid-binder.js';
|
|
48
|
+
import type { SplitNode } from './split-layout.js';
|
|
49
49
|
/** A widget, declared as data. */
|
|
50
50
|
export interface DashboardWidgetSpec {
|
|
51
51
|
id: string;
|
|
@@ -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.js';
|
|
48
|
+
import { bindDashboardSplit, SPLIT_TREE_KEY } from './split-binder.js';
|
|
49
|
+
import { gridItemFromCell } from './grid-mapping.js';
|
|
50
|
+
import { ensureDashboardKitStyles } from './styles.js';
|
|
51
|
+
import { defaultWidgetRenderer } from './widgets.js';
|
|
52
52
|
/**
|
|
53
53
|
* Add a widget node AND its board membership as ONE undoable step.
|
|
54
54
|
*
|
|
@@ -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.js';
|
|
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.js';
|
|
56
|
+
import { ensureDashboardKitStyles } from './styles.js';
|
|
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. */
|
|
@@ -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.js';
|
|
2
|
+
export { bindDashboardSplit, SetSplitTreeCommand, SPLIT_TREE_KEY, type DashboardSplitOptions, type DashboardSplitHandle, } from './split-binder.js';
|
|
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.js';
|
|
4
|
+
export { rowHeightFor, boardHeightFor, columnUnitFor, cellToRect, pointToCell, sizeToSpan, spanWidthPx, gridItemFromCell, cellFromGridItem, buildCommitCommands, type CellRect, type WorldRect, type DashboardGridGeometry, type TileDelta, } from './grid-mapping.js';
|
|
5
|
+
export { ensureDashboardKitStyles, DASHBOARD_KIT_STYLE_ID } from './styles.js';
|
|
6
|
+
export { dashboard, type DashboardOptions, type DashboardSpec, type DashboardSnapshot, type DashboardHandle, type DashboardViewSpec, type DashboardWidgetSpec, type WidgetHandle, } from './dashboard.js';
|
|
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.js';
|
|
@@ -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.js';
|
|
2
|
+
export { bindDashboardSplit, SetSplitTreeCommand, SPLIT_TREE_KEY, } from './split-binder.js';
|
|
3
|
+
export { projectSplit, dividersOf, addSplitLeaf, removeSplitLeaf, insertSplitLeaf, moveSplitDivider, splitFromCells, cellsFromSplit, splitLeaves, } from './split-layout.js';
|
|
4
|
+
export { rowHeightFor, boardHeightFor, columnUnitFor, cellToRect, pointToCell, sizeToSpan, spanWidthPx, gridItemFromCell, cellFromGridItem, buildCommitCommands, } from './grid-mapping.js';
|
|
5
|
+
export { ensureDashboardKitStyles, DASHBOARD_KIT_STYLE_ID } from './styles.js';
|
|
6
6
|
// The DATA-FIRST authoring API (the erDiagram/umlDiagram equivalent).
|
|
7
|
-
export { dashboard, } from './dashboard';
|
|
7
|
+
export { dashboard, } from './dashboard.js';
|
|
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.js';
|
|
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.js';
|
|
27
|
+
import { type SplitNode } from './split-layout.js';
|
|
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.js';
|
|
29
|
+
import { cellFromGridItem } from './grid-mapping.js';
|
|
30
|
+
import { addSplitLeaf, cellsFromSplit, cloneSplit, dividersOf, groupRectsOf, insertSplitLeaf, moveSplitDivider, normalizeSplit, pathToLeaf, projectSplit, removeSplitLeaf, splitFromCells, splitLeaves, } from './split-layout.js';
|
|
31
|
+
import { ensureDashboardKitStyles } from './styles.js';
|
|
32
32
|
/** Group metadata key the tree persists under. */
|
|
33
33
|
export const SPLIT_TREE_KEY = 'dashboardTree';
|
|
34
34
|
/**
|
|
@@ -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.js';
|
|
20
20
|
export type SplitDir = 'row' | 'column';
|
|
21
21
|
export interface SplitLeaf {
|
|
22
22
|
id: string;
|
|
@@ -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.js';
|
|
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.js';
|
|
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.js';
|
|
18
|
+
import type { UmlClassSpec } from './uml.js';
|
|
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.js';
|
|
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.js';
|
|
24
|
+
import { bindRowInteractions } from './rows.js';
|
|
25
|
+
import { entityCardContent, entityAutoHeight, entityAutoWidth, erRowCenterY, ER_ROW_H, ER_HEAD_H, } from './card.js';
|
|
26
|
+
import { bindCardEditing } from './editing.js';
|
|
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.js'`
|
|
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.js';
|
|
24
|
+
import type { UmlClassSpec } from './uml.js';
|
|
25
|
+
import { updateEntity, updateClass } from './update.js';
|
|
26
|
+
import type { RowRef } from './rows.js';
|
|
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.js';
|
|
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.js';
|
|
2
|
+
export { umlDiagram, type UmlClassSpec, type UmlRelationshipSpec, type UmlRelationKind, type UmlSide, type UmlDiagramOptions, } from './uml.js';
|
|
3
|
+
export { ensureDiagramKitStyles, DIAGRAM_KIT_STYLE_ID } from './styles.js';
|
|
4
|
+
export { bindRowInteractions, type RowRef, type RowInteractionsHandle } from './rows.js';
|
|
5
|
+
export { updateEntity, updateClass, addColumnAt, removeColumnAt, renameColumnAt, type ErEntityDelta, type UmlClassDelta, } from './update.js';
|
|
6
|
+
export { bindCardEditing, type CardEditingHandle } from './editing.js';
|
|
7
|
+
export { matchColumns, rowIndexFromY } from './card.js';
|
|
8
|
+
export { entityCardContent, entityAutoHeight, classCardContent, classAutoHeight } from './card.js';
|
|
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.js';
|
|
10
|
+
export { erTable, umlClass, erTables, umlClasses, CardHandle, ErTable, ErField, ErColumnList, UmlClass, UmlMemberList, type HandleApi, } from './handles.js';
|
|
@@ -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.js';
|
|
2
|
+
export { umlDiagram, } from './uml.js';
|
|
3
|
+
export { ensureDiagramKitStyles, DIAGRAM_KIT_STYLE_ID } from './styles.js';
|
|
4
|
+
export { bindRowInteractions } from './rows.js';
|
|
5
|
+
export { updateEntity, updateClass, addColumnAt, removeColumnAt, renameColumnAt, } from './update.js';
|
|
6
|
+
export { bindCardEditing } from './editing.js';
|
|
7
|
+
export { matchColumns, rowIndexFromY } from './card.js';
|
|
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.js';
|
|
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.js';
|
|
14
|
+
export { erTable, umlClass, erTables, umlClasses, CardHandle, ErTable, ErField, ErColumnList, UmlClass, UmlMemberList, } from './handles.js';
|
|
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.js';
|
|
26
|
+
import { bindRowInteractions } from './rows.js';
|
|
27
|
+
import { classCardContent, classAutoHeight, classAutoWidth } from './card.js';
|
|
28
|
+
import { bindCardEditing } from './editing.js';
|
|
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.js';
|
|
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.js';
|
|
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.js';
|
|
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.js';
|
|
3
|
+
import type { DashboardSpec } from './dashboard-kit/index.js';
|
|
4
|
+
import { registerNodeType, registeredNodeTypes } from './node-type-registry.js';
|
|
5
|
+
import type { NodeTypeRenderer } from './node-type-registry.js';
|
|
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.js';
|
|
3
|
+
import { registerNodeType, registeredNodeTypes, getNodeType } from './node-type-registry.js';
|
|
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.js';
|
|
3
|
+
import { type WidgetRenderer } from './dashboard-kit/widgets.js';
|
|
4
|
+
import { type DashboardHandle } from './dashboard-kit/dashboard.js';
|
|
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.js';
|
|
66
|
+
import { bindRowInteractions } from './diagram-kit/rows.js';
|
|
67
|
+
import { bindCardEditing } from './diagram-kit/editing.js';
|
|
68
|
+
import { ensureDiagramKitStyles } from './diagram-kit/styles.js';
|
|
69
|
+
import { bindDashboardGrid } from './dashboard-kit/grid-binder.js';
|
|
70
|
+
import { bindDashboardSplit, SPLIT_TREE_KEY } from './dashboard-kit/split-binder.js';
|
|
71
|
+
import { gridItemFromCell } from './dashboard-kit/grid-mapping.js';
|
|
72
|
+
import { cellFromGridItem } from './dashboard-kit/grid-mapping.js';
|
|
73
|
+
import { ensureDashboardKitStyles } from './dashboard-kit/styles.js';
|
|
74
|
+
import { defaultWidgetRenderer } from './dashboard-kit/widgets.js';
|
|
75
|
+
import { createDashboardHandle, } from './dashboard-kit/dashboard.js';
|
|
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/index.js';
|
|
17
|
+
import { registerStencilBuilder } from './builders.js';
|
|
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.js';
|
|
2
|
+
export type { StencilPaletteApi, StencilPaletteOptions, StencilPaletteHandle, } from './palette.js';
|
|
3
|
+
export { bindShapeDataPanel } from './shape-data.js';
|
|
4
|
+
export type { ShapeDataPanelApi, ShapeDataPanelOptions, ShapeDataPanelHandle } from './shape-data.js';
|
|
5
|
+
export { ensureStencilKitStyles } from './styles.js';
|
|
6
|
+
export { registerStencilBuilder, getStencilBuilder, unregisterStencilBuilder, registeredStencilBuilders, } from './builders.js';
|
|
7
|
+
export type { StencilBuilder, StencilBuildContext } from './builders.js';
|
|
@@ -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.js';
|
|
2
|
+
export { bindShapeDataPanel } from './shape-data.js';
|
|
3
|
+
export { ensureStencilKitStyles } from './styles.js';
|
|
4
|
+
export { registerStencilBuilder, getStencilBuilder, unregisterStencilBuilder, registeredStencilBuilders, } from './builders.js';
|
|
5
|
+
import { registerCardBuilders } from './card-builders.js';
|
|
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.js';
|
|
20
|
+
import { getStencilBuilder } from './builders.js';
|
|
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/index.js';
|
|
31
|
+
import { ensureStencilKitStyles } from './styles.js';
|
|
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;
|