@peter.prib/renderengine 0.14.0 → 0.15.1

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.
Files changed (113) hide show
  1. package/README.md +45 -19
  2. package/bin/renderengine.mjs +157 -0
  3. package/dist/renderengine-workspace.umd.js +49641 -39747
  4. package/dist/renderengine.umd.js +25366 -15650
  5. package/documentation/REFERENCE.md +206 -0
  6. package/examples/decision-workbench.html +26 -0
  7. package/package.json +7 -1
  8. package/src/CanvasRenderer.js +225 -200
  9. package/src/SVGRenderer.js +476 -454
  10. package/src/archimate.js +22 -2
  11. package/src/archimateArchiFormat.js +1735 -1701
  12. package/src/archimateArchive.js +36 -7
  13. package/src/archimateCSV.js +93 -37
  14. package/src/archimateDrawio.js +2 -0
  15. package/src/archimateExchangeFormat.js +3 -1
  16. package/src/chartCatalog.js +219 -0
  17. package/src/charting/Annotations.js +169 -0
  18. package/src/charting/ArchimateDiagramEditor.js +54 -10
  19. package/src/charting/Axis.js +217 -5
  20. package/src/charting/Chart.js +99 -9
  21. package/src/charting/Chart3D.js +3 -0
  22. package/src/charting/ChartBox.js +8 -1
  23. package/src/charting/ColorPalette.js +42 -4
  24. package/src/charting/DiagramEditor.js +174 -39
  25. package/src/charting/DiagramEditorCommands.js +28 -0
  26. package/src/charting/Edge.js +7 -0
  27. package/src/charting/Hierarchy.js +114 -0
  28. package/src/charting/InteractionManager.js +4 -0
  29. package/src/charting/ModelFileFormat.js +5 -1
  30. package/src/charting/SettingsManager.js +35 -0
  31. package/src/charting/ShapePaths.js +82 -10
  32. package/src/charting/archimate/ArchimateCsvFileFormat.js +51 -12
  33. package/src/charting/archimate/ArchimateElementTemplate.js +235 -231
  34. package/src/charting/charts/AlluvialDiagram.js +311 -0
  35. package/src/charting/charts/AreaChart.js +52 -15
  36. package/src/charting/charts/BarChart.js +38 -3
  37. package/src/charting/charts/BarChart3D.js +5 -3
  38. package/src/charting/charts/BarChartBase.js +26 -6
  39. package/src/charting/charts/BeeswarmChart.js +164 -0
  40. package/src/charting/charts/BoxPlotChart.js +23 -1
  41. package/src/charting/charts/CalendarHeatmapChart.js +2 -1
  42. package/src/charting/charts/CandlestickChart.js +172 -4
  43. package/src/charting/charts/ChordDiagram.js +105 -2
  44. package/src/charting/charts/CirclePackChart.js +81 -0
  45. package/src/charting/charts/ComboChart.js +233 -0
  46. package/src/charting/charts/ContourChart.js +310 -0
  47. package/src/charting/charts/DonutChart3D.js +13 -0
  48. package/src/charting/charts/DumbbellChart.js +217 -0
  49. package/src/charting/charts/EcdfChart.js +150 -0
  50. package/src/charting/charts/FunnelChart.js +4 -1
  51. package/src/charting/charts/GeoMapChart.js +132 -11
  52. package/src/charting/charts/GroupedBarChart.js +44 -3
  53. package/src/charting/charts/GroupedDistributionChart.js +26 -1
  54. package/src/charting/charts/HeatmapChart.js +2 -2
  55. package/src/charting/charts/HexbinChart.js +137 -0
  56. package/src/charting/charts/HierarchyChart.js +77 -3
  57. package/src/charting/charts/HorizonChart.js +105 -0
  58. package/src/charting/charts/KagiChart.js +167 -0
  59. package/src/charting/charts/LineChart.js +74 -18
  60. package/src/charting/charts/OhlcChart.js +79 -0
  61. package/src/charting/charts/ParallelCoordinatesChart.js +9 -1
  62. package/src/charting/charts/PieChart.js +195 -17
  63. package/src/charting/charts/PieChart3D.js +137 -0
  64. package/src/charting/charts/PointAndFigureChart.js +198 -0
  65. package/src/charting/charts/PolarAreaChart.js +189 -0
  66. package/src/charting/charts/RadarChart.js +7 -1
  67. package/src/charting/charts/RadialBarChart.js +5 -2
  68. package/src/charting/charts/RenkoChart.js +178 -0
  69. package/src/charting/charts/RidgelineChart.js +113 -0
  70. package/src/charting/charts/SankeyDiagram.js +127 -4
  71. package/src/charting/charts/ScatterChart.js +13 -0
  72. package/src/charting/charts/ScatterMatrixChart.js +119 -0
  73. package/src/charting/charts/SlopegraphChart.js +205 -0
  74. package/src/charting/charts/SparklineTableChart.js +166 -0
  75. package/src/charting/charts/StackedBarChart.js +48 -5
  76. package/src/charting/charts/StackedBarChart3DOrbit.js +10 -5
  77. package/src/charting/charts/StreamGraphChart.js +10 -3
  78. package/src/charting/charts/SunburstChart.js +27 -7
  79. package/src/charting/charts/SurfaceChart3D.js +157 -0
  80. package/src/charting/charts/TreemapChart.js +28 -8
  81. package/src/charting/charts/ViolinChart.js +18 -0
  82. package/src/charting/datamodel/ArchimateDataLink.js +70 -0
  83. package/src/charting/datamodel/DataLineage.js +150 -0
  84. package/src/charting/datamodel/DataModel.js +83 -1
  85. package/src/charting/datamodel/ModelMapping.js +87 -0
  86. package/src/charting/datamodel/SqlDdl.js +110 -85
  87. package/src/charting/datamodel/index.js +3 -0
  88. package/src/charting/decision/DecisionWorkbench.js +295 -0
  89. package/src/charting/diagrams/ArchimateDiagram.js +25 -9
  90. package/src/charting/diagrams/ArchimateModel.js +1382 -1238
  91. package/src/charting/diagrams/GraphDiagram.js +1424 -1350
  92. package/src/charting/diagrams/SketchView.js +121 -0
  93. package/src/charting/diagrams/sketchBoxKinds.js +30 -0
  94. package/src/charting/modelTree/AnalysisPanel.js +101 -23
  95. package/src/charting/modelTree/NavigatorModel.js +410 -0
  96. package/src/charting/modelTree/NavigatorPanel.js +453 -0
  97. package/src/charting/pivot/PivotChart.js +109 -4
  98. package/src/charting/pivot/PivotGridChart.js +321 -33
  99. package/src/charting/pivot/PivotView.js +82 -0
  100. package/src/charting/report/TemplatedReport.js +547 -0
  101. package/src/charting/templates/BoxTemplate.js +28 -27
  102. package/src/charting/templates/PackageTemplate.js +26 -25
  103. package/src/charting/templates/SwimlaneTemplate.js +19 -18
  104. package/src/charting/templates/Template.js +219 -212
  105. package/src/cli.js +146 -0
  106. package/src/index.js +3370 -2995
  107. package/src/workspace/Workspace.js +126 -7
  108. package/src/workspace/archimateServices.js +4 -0
  109. package/src/workspace/index.js +3 -0
  110. package/src/workspace/parts/ArchimateCanvasPart.js +1 -1
  111. package/src/workspace/parts/DecisionWorkbenchPart.js +58 -0
  112. package/src/workspace/parts/ViewsPart.js +196 -0
  113. package/src/workspace/styles.js +36 -1
@@ -2640,6 +2640,8 @@ end. Waypoints and style are kept, and that end's side pin resets to automatic.
2640
2640
  empty canvas, or on the shape at the other end, cancels. This is one undo step
2641
2641
  (`ReconnectEdgeCommand`).
2642
2642
 
2643
+ **Container nesting and hierarchy.** Shapes such as `PackageTemplate`, `SwimlaneTemplate`, and `BoxTemplate` are containers (`isContainer = true`). When an element is dropped inside a container (`nestsOnDrop(parentId, childId)`), it is parented via `NestElementCommand` (setting `child.parentId`). Moving a container recursively moves all nested descendants (`moversFor(templateId)`). Containers can automatically expand their bounds to fit their contents via `fitNesting(changes, { padding })`. Ancestor loops are prevented (`isAncestor(childId, parentId)`).
2644
+
2643
2645
  **Line style levels.** A line's style resolves through `EdgeStyleCascade`: the line itself,
2644
2646
  then each level in `editor.edgeStyleLevels` (most specific first, `[{ key, label, style }]`),
2645
2647
  then the schema default. A value a level doesn't set is inherited. `EDGE_STYLE_PROPERTIES` is the
@@ -3200,6 +3202,56 @@ to it) / `deleteEdgeCommand(id)`. A subclass whose shapes and lines stand for so
3200
3202
  overrides those factories (ArchimateCanvasEditor does). A template class says whether the editor
3201
3203
  offers it a rotate handle (`static rotatable`, true by default; ArchiMate's templates are not). `pickFile(accept)` resolves with the chosen `File` (or `null`).
3202
3204
 
3205
+ ## Decision Workbench (`DecisionWorkbench`)
3206
+
3207
+ The views of a SADIS recommendation made by decisionengine (`gitlab.com/peter.prib/decisionengine`),
3208
+ drawn with this library's charts. It reads decisionengine's JSON, not decisionengine: a workbench
3209
+ document
3210
+
3211
+ ```js
3212
+ { kind: 'sadis-workbench', report, plan?, before? } // report.toJSON(), plan.toJSON(), an earlier report.toJSON()
3213
+ ```
3214
+
3215
+ which decisionengine's SADIS Explorer downloads ("Download for the Decision Workbench").
3216
+
3217
+ ```js
3218
+ import { DecisionWorkbench } from '@peter.prib/renderengine';
3219
+ const workbench = DecisionWorkbench.from(doc, { start: '2026-11-02', periodDays: 14 });
3220
+ for (const view of workbench.views()) {
3221
+ view.id, view.title; // 'executive', 'Executive', …
3222
+ view.charts(); // [{ title, chartType, data, options }] — chartType is a CHART_CATALOG key
3223
+ view.notes(); // plain lines for what the charts cannot show
3224
+ }
3225
+ ```
3226
+
3227
+ | View | Needs | Charts |
3228
+ |---|---|---|
3229
+ | Executive | a report | `kpi-tile` (what to build next; half the value delivered by), `stackedBar` (score part by part), `line` (value delivered by period) |
3230
+ | Architecture | a report | `scatter` (visible rating against basin position: foundations sit high and left), `lollipop` (share each frees) |
3231
+ | Delivery | a plan | `gantt` (the plan on a calendar), `stackedBar` (capacity used per period, per team when planned by team) |
3232
+ | Portfolio | a report with perspectives | `heatmap` (rank by perspective), `dumbbell` (best and worst rank, most contested first) |
3233
+ | Replay | an earlier report | `slopegraph` (rank then → now); notes say what entered, left (and why) and moved |
3234
+
3235
+ A view the document cannot fill is not offered. `from()` refuses what is not a workbench document,
3236
+ saying why. The delivery plan's periods are put on a calendar: period 1 starts at `start` (default:
3237
+ the report's as-of business time, else today), each `periodDays` long (default 14). Each view is a
3238
+ `WorkbenchView` subclass (`WORKBENCH_VIEWS`); a new view is a new subclass.
3239
+
3240
+ In a workspace the workbench is one part, `DecisionWorkbenchPart` (type `decision-workbench`), a
3241
+ `ViewsPart` that reads workbench documents: a tab per view, its charts and notes, a toolbar that opens a
3242
+ file and sets the calendar.
3243
+
3244
+ ```js
3245
+ const { registerBuiltinParts, ChartPart, DecisionWorkbenchPart } = RenderEngineWorkspace;
3246
+ ws.registerParts([ChartPart, DecisionWorkbenchPart]);
3247
+ ws.addParts([{ id: 'workbench', type: 'decision-workbench', document /* optional */, start, periodDays }]);
3248
+ ```
3249
+
3250
+ `ViewsPart` (type `views`) is the general part underneath: any `{ views: [{ id, title, charts, notes }] }`
3251
+ document, or views given in its spec, shown the same way — see `documentation/WORKSPACE_ARCHITECTURE.md`
3252
+ for why it is one part and why a new kind of document is a subclass. `examples/decision-workbench.html`
3253
+ is a thin host of the workbench part (it is in the package).
3254
+
3203
3255
  ## Navigation menus
3204
3256
 
3205
3257
  `NavMenu` is a vertical navigation menu (a sidebar's), written as data: no markup. Each entry is
@@ -3311,6 +3363,160 @@ const bar = RenderEngine.askBar(document.getElementById('ask-bar'), {
3311
3363
  - **For a host:** `bar.setSuggest(fn)` swaps where suggestions come from, for example when the user picks another model or ontology. `bar.setValue(text)` sets the question without suggesting. `bar.focus()` puts the cursor in the question, and `bar.destroy()` removes the bar and cancels any pending close.
3312
3364
  - **Accessible:** the input is a WAI-ARIA combobox over a `listbox` of `option`s. `aria-expanded` follows the popup and `aria-activedescendant` follows the active item. Each bar's list has its own id, so several bars can share a page.
3313
3365
 
3366
+ ## Navigator & Relationship Explorer (`NavigatorModel` / `NavigatorPanel`)
3367
+
3368
+ `NavigatorModel` (`src/charting/modelTree/NavigatorModel.js`) and `NavigatorPanel` (`src/charting/modelTree/NavigatorPanel.js`) provide interactive graph traversal and relationship exploration for models. It enables navigating through connected elements step-by-step to arbitrary depth with cycle detection, navigation history (back/forward), direction filters, path-finding, and transitive impact analysis.
3369
+
3370
+ ```javascript
3371
+ import { NavigatorModel, NavigatorPanel, buildNavigatorPanel } from '@peter.prib/renderengine';
3372
+
3373
+ // 1. Create a pure, DOM-free traversal model:
3374
+ const nav = new NavigatorModel(archimateModel, {
3375
+ rootId: 'billing-app',
3376
+ direction: 'both', // 'both' | 'outgoing' | 'incoming'
3377
+ allowedKinds: ['serving-relationship', 'composition-relationship'],
3378
+ });
3379
+
3380
+ nav.focus('crm-app');
3381
+ nav.canGoBack; // true
3382
+ nav.back(); // returns to 'billing-app'
3383
+
3384
+ // Find all paths between two elements (up to maxDepth):
3385
+ const paths = nav.findPaths('billing-app', 'ledger-db', 5);
3386
+
3387
+ // Trace transitive downstream or upstream impact:
3388
+ const impact = nav.findImpact('billing-app', { maxDepth: 4, direction: 'outgoing' });
3389
+
3390
+ // 2. Build or render the Navigator UI panel:
3391
+ const panel = new NavigatorPanel({
3392
+ model: archimateModel,
3393
+ navigator: nav,
3394
+ onSelectElement: (elId) => editor.selectElement(elId),
3395
+ onOpenView: (viewId) => editor.openView(viewId),
3396
+ });
3397
+ ```
3398
+
3399
+ - **DOM-free engine:** `NavigatorModel` operates completely without DOM dependencies, making it directly testable in Node.js and reusable across diverse UI shells.
3400
+ - **Cycle detection and path tracking:** Tracks visited nodes along active branches to prevent infinite recursion in cyclic relationship graphs, annotating cycles in tree outputs.
3401
+ - **Directional filters:** Traversal can follow outgoing relationships, incoming relationships, or bidirectional connections (`setDirection('outgoing' | 'incoming' | 'both')`).
3402
+ - **History stack:** Maintains full forward and backward navigation stacks (`focus(id)`, `back()`, `forward()`, `canGoBack`, `canGoForward`).
3403
+ - **Impact and path finding:** Built-in BFS/DFS algorithms find connecting pathways (`findPaths(fromId, toId, maxDepth)`) and downstream dependency cascades (`findImpact(elementId, { maxDepth, direction })`).
3404
+
3405
+ ## Templated Reports (`TemplatedReport`)
3406
+
3407
+ `TemplatedReport` (`src/charting/report/TemplatedReport.js`) provides multi-format, template-driven report generation matching Archi's Jasper-style reporting capabilities. It extracts model metadata, viewpoints, diagrams (SVG/PNG), elements, properties, and relationships into document formats.
3408
+
3409
+ ```javascript
3410
+ import { TemplatedReport, REPORT_TEMPLATES } from '@peter.prib/renderengine';
3411
+
3412
+ const report = new TemplatedReport(archimateModel, {
3413
+ title: 'Enterprise Architecture Overview',
3414
+ template: REPORT_TEMPLATES.DETAILED, // 'executive' | 'detailed' | 'tabular'
3415
+ pictures: { 'view-1': 'data:image/svg+xml;utf8,...' },
3416
+ });
3417
+
3418
+ // Generate various formats:
3419
+ const htmlDoc = report.toHtml({ printable: true }); // PDF-ready HTML with @media print CSS
3420
+ const wordDoc = report.toWord(); // Microsoft Word (.doc HTML format)
3421
+ const excelXml = report.toExcel(); // Excel SpreadsheetML (.xml)
3422
+ const csvData = report.toCsv('elements'); // RFC 4180 CSV ('elements' | 'relationships')
3423
+ const markdown = report.toMarkdown(); // GitHub-flavored Markdown
3424
+ ```
3425
+
3426
+ - **Output formats:** Generates printable PDF-ready HTML with page-break controls, Word-compatible HTML documents (`.doc`), Excel SpreadsheetML workbooks (`.xml`) with styled headers and filters, RFC 4180 CSV tables, and GitHub-flavored Markdown (`.md`).
3427
+ - **Built-in templates:** Includes `REPORT_TEMPLATES.EXECUTIVE` (high-level summary with diagrams), `REPORT_TEMPLATES.DETAILED` (full catalog of views, elements, relationships, and user properties), and `REPORT_TEMPLATES.TABULAR` (matrix-focused presentation).
3428
+ - **Embedded diagram pictures:** Accepts rendered SVG data URIs or base64 raster images in the `pictures` dictionary keyed by view ID to embed high-resolution diagrams directly into generated documents.
3429
+
3430
+ ## Sketch Views & Palettes (`SketchView` / `sketchBoxKinds`)
3431
+
3432
+ `SketchView` (`src/charting/diagrams/SketchView.js`) implements freeform sketching views (corresponding to Archi's `archimate:SketchModel`). It supports sticky notes, stick-figure actors, groups, freehand lines, and customizable palettes on grid or lined canvas backgrounds.
3433
+
3434
+ ```javascript
3435
+ import { SketchView, SKETCH_BOX_KINDS, DEFAULT_SKETCH_PALETTE } from '@peter.prib/renderengine';
3436
+
3437
+ const sketch = new SketchView(model, {
3438
+ name: 'Brainstorming Session',
3439
+ background: SketchView.BACKGROUNDS.GRID, // NONE (0), GRID (1), LINES (2)
3440
+ palette: DEFAULT_SKETCH_PALETTE,
3441
+ });
3442
+
3443
+ // Custom palette management:
3444
+ sketch.addPaletteItem({ id: 'custom-note', name: 'Critical Note', fill: '#ffcccc' });
3445
+ const jsonConfig = sketch.exportPalette();
3446
+ sketch.importPalette(jsonConfig);
3447
+ ```
3448
+
3449
+ - **Sketch box types:** Native support for sticky notes (`sketch-model-sticky`) and stick figures (`sketch-model-actor`) via `SKETCH_BOX_KINDS`.
3450
+ - **Background styles:** Configurable canvas backgrounds including plain (`NONE`), grid paper (`GRID`), and lined notebook paper (`LINES`).
3451
+ - **Palette customization:** Dynamically add, remove, reset, export, and import custom sticky colors and presets as JSON configurations.
3452
+ - **Archi XML compatibility:** Full bi-directional fidelity with `.archimate` sketch model XML representations (`archimate:SketchModel`, `archimate:Sticky`, `archimate:Actor`).
3453
+
3454
+ ## Cross-Model Data Lineage & ArchiMate Linking
3455
+
3456
+ `ModelMapping` (`src/charting/datamodel/ModelMapping.js`), `DataLineage` (`src/charting/datamodel/DataLineage.js`), and `ArchimateDataLink` (`src/charting/datamodel/ArchimateDataLink.js`) extend the data modeling subsystem (`src/charting/datamodel/`) with enterprise cross-model data lineage and architectural traceability aligned with DMBOK2 and TOGAF.
3457
+
3458
+ ```javascript
3459
+ import { DataModel, ModelMapping, DataLineage, ArchimateDataLink } from '@peter.prib/renderengine';
3460
+
3461
+ // 1. Cross-model mapping with attribute-level transformation rules:
3462
+ const mapping = new ModelMapping({
3463
+ name: 'Core Banking to EDW',
3464
+ sourceModel: 'OLTP-Core',
3465
+ targetModel: 'EDW-Analytical',
3466
+ entityMappings: [{ sourceEntityId: 'account', targetEntityId: 'dim_account', rule: 'SCD Type 2' }],
3467
+ attributeMappings: [
3468
+ { sourceEntityId: 'account', sourceAttribute: 'bal', targetEntityId: 'dim_account', targetAttribute: 'current_balance', transformation: 'ROUND(bal, 2)' }
3469
+ ],
3470
+ });
3471
+
3472
+ dataModel.addModelMapping(mapping);
3473
+
3474
+ // 2. Trace end-to-end lineage and downstream impact:
3475
+ const lineage = dataModel.crossModelLineage();
3476
+ const upstreamHops = lineage.traceLineage('dim_account', 'current_balance'); // Upstream provenance
3477
+ const downstreamImpact = lineage.traceImpact('account', 'bal'); // Downstream impact
3478
+
3479
+ // 3. Connect Data Model entities to ArchiMate enterprise architecture:
3480
+ const link = new ArchimateDataLink({
3481
+ dataModelEntityId: 'account',
3482
+ level: 'conceptual',
3483
+ archimateElementId: 'business-obj-account',
3484
+ archimateType: 'business-object',
3485
+ });
3486
+ dataModel.addArchimateLink(link);
3487
+ ```
3488
+
3489
+ - **DMBOK2 integration:** Enables tracking provenance across conceptual, logical, and physical models, including disparate source and target data stores.
3490
+ - **Multi-hop traversal:** Traces multi-hop transformations forwards (`traceImpact`) and backwards (`traceLineage`) across complex data pipelines.
3491
+ - **ArchiMate alignment:** Bridges data model entities to ArchiMate Business Objects (Business Layer), Data Objects (Application Layer), and Artifacts (Technology Layer).
3492
+
3493
+ ## Multi-View Chart Dashboards (`ViewsPart` / `DecisionWorkbenchPart`)
3494
+
3495
+ `ViewsPart` (`src/workspace/parts/ViewsPart.js`) and `DecisionWorkbenchPart` (`src/workspace/parts/DecisionWorkbenchPart.js`) render multi-tab dashboards of coordinated charts and note cards inside the `<ws-workspace>` application shell.
3496
+
3497
+ ```javascript
3498
+ // Declarative view specification for a workspace layout node:
3499
+ const layout = {
3500
+ type: 'part',
3501
+ part: 'views',
3502
+ views: [
3503
+ {
3504
+ id: 'executive-summary',
3505
+ title: 'Executive Summary',
3506
+ charts: [
3507
+ { title: 'System Health', chartType: 'gauge dial', data: [{ score: 94 }], options: { min: 0, max: 100 } },
3508
+ { title: 'Revenue Trend', chartType: 'area', data: [...] }
3509
+ ],
3510
+ notes: ['All latency thresholds met', 'Quarterly SLA target achieved']
3511
+ }
3512
+ ]
3513
+ };
3514
+ ```
3515
+
3516
+ - **Self-contained workbench part:** Embeds cleanly into tabs, split panes, or WorkArea documents alongside diagram modellers and data tables without hijacking global workspace perspective state.
3517
+ - **Catalog-driven composition:** Composes existing `ChartPart`s driven by `CHART_CATALOG` keys alongside `ListPart` note cards. Small gauge charts automatically tile along the top banner.
3518
+ - **Decision Workbench:** Specialized `DecisionWorkbenchPart` reads SADIS analysis reports and optimization plans (`viewsFrom(doc)`), projecting trade-off curves, capability radars, and decision matrices directly into tabs.
3519
+
3314
3520
  ## Where to go next
3315
3521
 
3316
3522
  - **`ARCHITECTURE.md`** — module layout, the chart-type catalog mechanics, how to add a new chart type.
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head><meta charset="utf-8"><title>Decision Workbench</title></head>
4
+ <body style="margin:0;height:100vh;display:flex;font:14px system-ui">
5
+ <!--
6
+ The Decision Workbench: decisionengine's SADIS recommendation, drawn. A thin host, as data-model.html is:
7
+ everything it does is DecisionWorkbenchPart's (reading a workbench file, the calendar) and ViewsPart's
8
+ (a tab per view, its charts and notes, opening a file). Open a workbench file — decisionengine's SADIS
9
+ Explorer downloads one ("Download for the Decision Workbench"). Runs straight off disk.
10
+ -->
11
+ <script src="../dist/renderengine-workspace.umd.js"></script>
12
+ <script>
13
+ const { el, registerBuiltinParts, ChartPart, DecisionWorkbenchPart } = window.RenderEngineWorkspace;
14
+ const ws = document.body.appendChild(el({
15
+ tag: 'ws-workspace',
16
+ attrs: { label: 'Decision Workbench', theme: 'light' },
17
+ style: { flex: '1 1 auto', minHeight: '0' },
18
+ }));
19
+ registerBuiltinParts(ws);
20
+ ws.registerParts([ChartPart, DecisionWorkbenchPart]);
21
+ ws.addParts([{ id: 'workbench', type: 'decision-workbench', title: 'Decision Workbench' }]);
22
+ ws.registerPerspective('Decision Workbench', { type: 'part', partId: 'workbench' });
23
+ ws.activatePerspective('Decision Workbench');
24
+ </script>
25
+ </body>
26
+ </html>
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@peter.prib/renderengine",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "description": "ArchiMate modeller, data modeller, diagram editor, OLAP cube & pivot chart studio, and 50+ type chart library for the browser, with no runtime dependencies.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "module": "src/index.js",
8
8
  "browser": "dist/renderengine.umd.js",
9
+ "bin": {
10
+ "renderengine": "./bin/renderengine.mjs"
11
+ },
9
12
  "exports": {
10
13
  ".": "./src/index.js",
11
14
  "./workspace": "./src/workspace/index.js",
@@ -14,16 +17,19 @@
14
17
  "./package.json": "./package.json"
15
18
  },
16
19
  "files": [
20
+ "bin/*.mjs",
17
21
  "src/",
18
22
  "dist/*.umd.js",
19
23
  "examples/archimate.html",
20
24
  "examples/diagram-editor.html",
21
25
  "examples/data-model.html",
26
+ "examples/decision-workbench.html",
22
27
  "README.md",
23
28
  "documentation/REFERENCE.md",
24
29
  "LICENSE"
25
30
  ],
26
31
  "scripts": {
32
+ "cli": "node bin/renderengine.mjs",
27
33
  "start": "node scripts/open.mjs examples/archimate.html",
28
34
  "archimate": "node scripts/open.mjs examples/archimate.html",
29
35
  "diagram": "node scripts/open.mjs examples/diagram-editor.html",