@miragon/dmn-modeler 0.8.0 → 0.10.0
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/CHANGELOG.md +44 -0
- package/README.md +29 -136
- package/dist/darkTheme.css +1 -1
- package/dist/dmn-modeler.css +1 -1
- package/dist/index.d.ts +136 -3
- package/dist/index.js +718 -97
- package/dist/lightTheme.css +1 -1
- package/package.json +13 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.10.0](https://github.com/Miragon/bpmn-modeler/compare/dmn-modeler-v0.9.0...dmn-modeler-v0.10.0) (2026-11-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 🎉 New Features
|
|
7
|
+
|
|
8
|
+
* **bpmn-diff:** return one element's XML without its children and diagram data ([#2461](https://github.com/Miragon/bpmn-modeler/issues/2461)) [sync 93096fa] ([73dfe03](https://github.com/Miragon/bpmn-modeler/commit/73dfe030192cd30b4924658bccb1b3ba32b5b9d3))
|
|
9
|
+
* **bpmn-modeler:** add reloadDiagram that keeps the view across a re-import ([#2427](https://github.com/Miragon/bpmn-modeler/issues/2427)) ([f6ff334](https://github.com/Miragon/bpmn-modeler/commit/f6ff334f5b58d396f1b3335710799bf6d3c17177))
|
|
10
|
+
* **bpmn-modeler:** give the diff legend the miragon look ([#2436](https://github.com/Miragon/bpmn-modeler/issues/2436)) ([291a060](https://github.com/Miragon/bpmn-modeler/commit/291a060fc94452031a31e65a16992404f08fb91c))
|
|
11
|
+
* **bpmn-modeler:** keep both diff panes on the same subprocess plane ([#2443](https://github.com/Miragon/bpmn-modeler/issues/2443)) [sync 378c141] ([ed31c8d](https://github.com/Miragon/bpmn-modeler/commit/ed31c8d3e199115d1b75bc86904379d99a8ad89f))
|
|
12
|
+
* **bpmn-modeler:** publish the surface checks hosts duck-type ([#2420](https://github.com/Miragon/bpmn-modeler/issues/2420)) ([0109615](https://github.com/Miragon/bpmn-modeler/commit/01096152c1e9b00affcedd63751abfeb4c7af5bd))
|
|
13
|
+
* **bpmn-modeler:** restyle the diff view after Diagit's diff panel ([#2442](https://github.com/Miragon/bpmn-modeler/issues/2442)) ([c4f0e69](https://github.com/Miragon/bpmn-modeler/commit/c4f0e6970915672dc882d39dc6d5d791c1d24165))
|
|
14
|
+
* **bpmn-webview:** open an element's XML changes from the diff pane's context pad ([#2462](https://github.com/Miragon/bpmn-modeler/issues/2462)) [sync ff660b7] ([96d865c](https://github.com/Miragon/bpmn-modeler/commit/96d865c575d8f384319de02ac29a25384cb30260))
|
|
15
|
+
* **model-navigation:** open and preview a start event's linked form ([#2460](https://github.com/Miragon/bpmn-modeler/issues/2460)) [sync f1dd92f] ([6414d46](https://github.com/Miragon/bpmn-modeler/commit/6414d464c797688f13f543dc058b9ab9b3a3c5f3))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### 🔨 Refactoring
|
|
19
|
+
|
|
20
|
+
* **dmn-modeler:** keep the diff viewer out of the published types ([#2432](https://github.com/Miragon/bpmn-modeler/issues/2432)) ([b26b0df](https://github.com/Miragon/bpmn-modeler/commit/b26b0dfacdc1556d6063f61a383acd13c3302bd3))
|
|
21
|
+
* **modeler-types:** render both diff legends from one component ([#2426](https://github.com/Miragon/bpmn-modeler/issues/2426)) ([d651f17](https://github.com/Miragon/bpmn-modeler/commit/d651f175559bf5c6968c311169a70efe1387676a))
|
|
22
|
+
* **shared:** build the properties-panel chrome once for every editor page ([#2435](https://github.com/Miragon/bpmn-modeler/issues/2435)) ([bc04fd8](https://github.com/Miragon/bpmn-modeler/commit/bc04fd85038752abe4136a7d9b95e33b12ee63d7))
|
|
23
|
+
|
|
24
|
+
## [0.9.0](https://github.com/Miragon/bpmn-modeler/compare/dmn-modeler-v0.8.0...dmn-modeler-v0.9.0) (2026-11-12)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### 🎉 New Features
|
|
28
|
+
|
|
29
|
+
* **bpmn-modeler:** keep hidden element templates out of new choices ([#2301](https://github.com/Miragon/bpmn-modeler/issues/2301)) [sync 2d6033d] ([e40e3c8](https://github.com/Miragon/bpmn-modeler/commit/e40e3c8bfaa5f74c88a80882d01e5f68c50d0541))
|
|
30
|
+
* **dmn-diff:** show DMN changes in a visual diff of DRD and decision tables ([#2359](https://github.com/Miragon/bpmn-modeler/issues/2359)) ([e66b46d](https://github.com/Miragon/bpmn-modeler/commit/e66b46d056f5c72b87a81152182a695249dc9937))
|
|
31
|
+
* fit the diagram to the view from a canvas button ([#2343](https://github.com/Miragon/bpmn-modeler/issues/2343)) ([00da896](https://github.com/Miragon/bpmn-modeler/commit/00da8960e5bbdf0cf0c5fd9c8518ff3495aa5775))
|
|
32
|
+
* **modeler-core:** list element templates and marketplaces in the add-on catalog ([#2296](https://github.com/Miragon/bpmn-modeler/issues/2296)) [sync d7dd275] ([4eab152](https://github.com/Miragon/bpmn-modeler/commit/4eab1525a247dd18626a3de5ee6d9a98783e86bf))
|
|
33
|
+
* replace the canvas focus reticle with a focus ring ([#2342](https://github.com/Miragon/bpmn-modeler/issues/2342)) ([3f64891](https://github.com/Miragon/bpmn-modeler/commit/3f648910c76288ec018eaa25a2d9743ca7b33f42))
|
|
34
|
+
* show the canvas keyboard focus as a dot on the fit button ([#2362](https://github.com/Miragon/bpmn-modeler/issues/2362)) ([0f56772](https://github.com/Miragon/bpmn-modeler/commit/0f567728f53e88561a6d28de68d18207ff94a9d3))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### 📔 Documentation
|
|
38
|
+
|
|
39
|
+
* rewrite READMEs for users, move package reference to the docs ([#2331](https://github.com/Miragon/bpmn-modeler/issues/2331)) ([6177741](https://github.com/Miragon/bpmn-modeler/commit/6177741ca798c7c86da068cabb1e4802cb187e6a))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### 🛠️ Misc
|
|
43
|
+
|
|
44
|
+
* **deps:** bump the bpmn-io group except @bpmn-io/properties-panel ([#2123](https://github.com/Miragon/bpmn-modeler/issues/2123)) ([4a03893](https://github.com/Miragon/bpmn-modeler/commit/4a0389337341a562ed9e2b366df1e175c7adf5cb))
|
|
45
|
+
* **deps:** bump the npm-minor-patch group across 1 directory with 24 updates ([#2334](https://github.com/Miragon/bpmn-modeler/issues/2334)) ([0f3f59d](https://github.com/Miragon/bpmn-modeler/commit/0f3f59db46031a56defb0a48e839c50de4f17a00))
|
|
46
|
+
|
|
3
47
|
## [0.8.0](https://github.com/Miragon/bpmn-modeler/compare/dmn-modeler-v0.7.0...dmn-modeler-v0.8.0) (2026-11-09)
|
|
4
48
|
|
|
5
49
|
|
package/README.md
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
# @miragon/dmn-modeler
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[
|
|
5
|
-
options)` call stands up an independent modeler — decision requirements diagram, decision tables,
|
|
6
|
-
literal expressions, a properties panel, and our own simulation module.
|
|
3
|
+
[](https://www.npmjs.com/package/@miragon/dmn-modeler)
|
|
4
|
+
[](https://github.com/Miragon/bpmn-modeler/blob/main/LICENSE)
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
the
|
|
11
|
-
|
|
6
|
+
**Put a DMN modeler with decision simulation into your own web app with one call.**
|
|
7
|
+
|
|
8
|
+
`@miragon/dmn-modeler` is the DMN modeler behind the Miragon BPMN Modeler for VS Code, the desktop app and Orca, built on [dmn-js](https://github.com/bpmn-io/dmn-js). To model DMN yourself instead, install one of those [editors](https://github.com/Miragon/bpmn-modeler#install).
|
|
9
|
+
|
|
10
|
+
## What you get
|
|
11
|
+
|
|
12
|
+
- **One call, a full modeler.** `createModeler(container, options)` brings the decision requirements diagram, decision tables, literal expressions and a properties panel.
|
|
13
|
+
- **Decisions you can try.** A simulation module evaluates a decision table in place.
|
|
14
|
+
- **Light and dark per instance.** One stylesheet holds both looks, and the theme follows `prefers-color-scheme` unless you pin it.
|
|
15
|
+
- **12 languages.** Set the locale up front or switch it live with `setLocale`; it applies to the whole page.
|
|
12
16
|
|
|
13
17
|
## Install
|
|
14
18
|
|
|
@@ -16,148 +20,37 @@ the [desktop app](https://miragon.github.io/bpmn-modeler/download) or, experimen
|
|
|
16
20
|
npm install @miragon/dmn-modeler
|
|
17
21
|
```
|
|
18
22
|
|
|
19
|
-
The dmn-js stack
|
|
20
|
-
`dependencies`, so a single install pulls everything the modeler needs.
|
|
23
|
+
The dmn-js stack ships as regular dependencies, so this one install is all you need. With Yarn 2 or later and the `node-modules` linker, pin `diagram-js` as the [caveats](https://miragon.github.io/bpmn-modeler/embed/dmn-modeler#caveats) describe.
|
|
21
24
|
|
|
22
|
-
##
|
|
25
|
+
## Get started
|
|
23
26
|
|
|
24
27
|
```ts
|
|
25
28
|
import { createModeler } from "@miragon/dmn-modeler";
|
|
26
|
-
// The stock dmn-js component styles (needed to render at all):
|
|
27
29
|
import "@miragon/dmn-modeler/styles.css";
|
|
28
30
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const modeler = await createModeler( canvas, {
|
|
33
|
-
propertiesPanel: { parent: panel },
|
|
34
|
-
} );
|
|
31
|
+
const modeler = await createModeler(document.querySelector("#canvas")!, {
|
|
32
|
+
propertiesPanel: { parent: document.querySelector("#properties")! },
|
|
33
|
+
});
|
|
35
34
|
|
|
36
|
-
await
|
|
35
|
+
const dmnXml = await (await fetch("decision.dmn")).text();
|
|
36
|
+
await modeler.loadDiagram(dmnXml);
|
|
37
37
|
const xml = await modeler.exportDiagram();
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
`propertiesPanel` is required, and `#canvas` needs a height; there is no empty starter diagram, so load existing DMN XML. The [reference](https://miragon.github.io/bpmn-modeler/embed/dmn-modeler) covers theming, locale, views, the escape hatch and caveats.
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
`@miragon/dmn-modeler/styles.css` (above) already ships both looks. The modeler toggles a
|
|
44
|
-
`data-dmn-theme="light" | "dark"` attribute on its container and properties-panel parent, and the
|
|
45
|
-
dark rules are scoped under
|
|
46
|
-
`[data-dmn-theme="dark"]`, so two modelers on one page can hold different themes.
|
|
47
|
-
`theme` defaults to `"automatic"` (follows `prefers-color-scheme` live); pass
|
|
48
|
-
`theme: "light"` / `"dark"` to pin one, or call `modeler.setTheme(...)` later.
|
|
49
|
-
|
|
50
|
-
```ts
|
|
51
|
-
const modeler = await createModeler( canvas, {
|
|
52
|
-
propertiesPanel: { parent: panel },
|
|
53
|
-
theme: "automatic", // "automatic" (default) | "light" | "dark"
|
|
54
|
-
} );
|
|
55
|
-
```
|
|
42
|
+
## Help and feedback
|
|
56
43
|
|
|
57
|
-
**
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
compatibility path. It is optional; a missing
|
|
61
|
-
`#theme-link` is a silent no-op. Because it is page-global, it cannot express per-instance themes —
|
|
62
|
-
prefer the attribute mechanism (i.e. just `styles.css`).
|
|
44
|
+
- **Documentation:** the [`@miragon/dmn-modeler` reference](https://miragon.github.io/bpmn-modeler/embed/dmn-modeler).
|
|
45
|
+
- **Bugs and ideas:** [open an issue](https://github.com/Miragon/bpmn-modeler/issues).
|
|
46
|
+
- **Changes:** see the [changelog](https://github.com/Miragon/bpmn-modeler/blob/main/packages/dmn-modeler/CHANGELOG.md).
|
|
63
47
|
|
|
64
|
-
|
|
65
|
-
> everything below it. Mixing that with two instances that hold _different_
|
|
66
|
-
> per-instance themes would let the root value leak; a single-instance page or
|
|
67
|
-
> one that never sets the root attribute is unaffected.
|
|
68
|
-
|
|
69
|
-
## Locale
|
|
70
|
-
|
|
71
|
-
The dmn-js UI is translated through the shared
|
|
72
|
-
[`@miragon/bpmn-modeler-i18n`](https://www.npmjs.com/package/@miragon/bpmn-modeler-i18n)
|
|
73
|
-
dictionaries. Pass an initial `locale` to `createModeler`, or switch it live with
|
|
74
|
-
`setLocale(...)`:
|
|
75
|
-
|
|
76
|
-
```ts
|
|
77
|
-
const modeler = await createModeler( canvas, {
|
|
78
|
-
propertiesPanel: { parent: panel },
|
|
79
|
-
locale: "de", // any locale the shared library ships; unknown codes fall back to "en"
|
|
80
|
-
} );
|
|
81
|
-
|
|
82
|
-
await modeler.setLocale( "en" ); // re-translate live
|
|
83
|
-
```
|
|
48
|
+
## Contributing
|
|
84
49
|
|
|
85
|
-
|
|
86
|
-
`setLocale` set the language for every modeler on the page (there is no per-instance locale).
|
|
87
|
-
Switching a running modeler re-opens its active view so the already rendered labels re-translate;
|
|
88
|
-
that resets the view's undo history and re-fires `onViewChanged` (the DRD viewbox is preserved).
|
|
89
|
-
`setLocale` is a no-op when the resolved locale is unchanged.
|
|
90
|
-
|
|
91
|
-
## Views
|
|
92
|
-
|
|
93
|
-
A loaded document exposes its views (`getViews`), the active view (`getActiveView`), and lets you
|
|
94
|
-
switch between them (`openView`). Each view is a DRD, decision table, literal expression, or boxed
|
|
95
|
-
expression editor.
|
|
96
|
-
|
|
97
|
-
```ts
|
|
98
|
-
const views = modeler.getViews();
|
|
99
|
-
await modeler.openView( views.find( ( v ) => v.type === "decisionTable" )! );
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Escape hatch
|
|
103
|
-
|
|
104
|
-
`modeler.getService(name)` reaches into the **active** dmn-js viewer's dependency-injection graph by
|
|
105
|
-
service name. The names and returned shapes are **not** covered by this facade's API and may change
|
|
106
|
-
without a major bump — prefer a typed option or method where one exists.
|
|
107
|
-
|
|
108
|
-
```ts
|
|
109
|
-
const eventBus = modeler.getService( "eventBus" );
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Caveats
|
|
113
|
-
|
|
114
|
-
- **bpmn.io watermark.** dmn-js renders the bpmn.io logo. Per the bpmn.io license you must keep it
|
|
115
|
-
visible unless you hold a commercial
|
|
116
|
-
[bpmn.io license](https://bpmn.io/license/). Do not hide it in CSS.
|
|
117
|
-
- **Locale is page-global** in this release (the i18n instance is a singleton); theming is
|
|
118
|
-
per-instance via the `data-dmn-theme` attribute (see
|
|
119
|
-
[Theming](#theming)).
|
|
120
|
-
- **Yarn Berry installs.** This package pins `diagram-js` exactly, but the dmn-js packages
|
|
121
|
-
declare it with caret ranges. Yarn 2+ resolves each range to the newest matching version, so
|
|
122
|
-
once diagram-js publishes a release newer than this package's pin, a second copy is nested
|
|
123
|
-
under dmn-js and the modeler splits across two versions. npm and pnpm reuse the pinned
|
|
124
|
-
version. With Yarn, pin it in your root `package.json` to the version that
|
|
125
|
-
`node_modules/@miragon/dmn-modeler/package.json` declares, and update it whenever you upgrade
|
|
126
|
-
`@miragon/dmn-modeler`:
|
|
127
|
-
|
|
128
|
-
```json
|
|
129
|
-
{
|
|
130
|
-
"resolutions": {
|
|
131
|
-
"diagram-js": "<pin from @miragon/dmn-modeler>"
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
- **Bundler dedupe.** The modeler and its plugins must share single copies of
|
|
137
|
-
`inferno` and the properties-panel / CodeMirror stack. If you build with Vite, add these to
|
|
138
|
-
`resolve.dedupe`:
|
|
139
|
-
|
|
140
|
-
```ts
|
|
141
|
-
resolve: {
|
|
142
|
-
dedupe: [
|
|
143
|
-
"inferno",
|
|
144
|
-
"@bpmn-io/properties-panel",
|
|
145
|
-
"@codemirror/state",
|
|
146
|
-
"@codemirror/view",
|
|
147
|
-
"@codemirror/language",
|
|
148
|
-
"@codemirror/autocomplete",
|
|
149
|
-
"@codemirror/commands",
|
|
150
|
-
"@codemirror/lint",
|
|
151
|
-
"@codemirror/search",
|
|
152
|
-
"@lezer/common",
|
|
153
|
-
"@lezer/highlight",
|
|
154
|
-
"@lezer/lr",
|
|
155
|
-
],
|
|
156
|
-
}
|
|
157
|
-
```
|
|
50
|
+
How to build, test and change the package is in [CONTRIBUTING.md](https://github.com/Miragon/bpmn-modeler/blob/main/CONTRIBUTING.md).
|
|
158
51
|
|
|
159
52
|
## License
|
|
160
53
|
|
|
161
|
-
Apache
|
|
162
|
-
|
|
163
|
-
licenses and the bpmn.io watermark
|
|
54
|
+
[Apache License 2.0](https://github.com/Miragon/bpmn-modeler/blob/main/packages/dmn-modeler/LICENSE). Made by [Miragon](https://www.miragon.io).
|
|
55
|
+
|
|
56
|
+
The package depends on third-party software (dmn-js, diagram-js, dmn-js-properties-panel and the bpmn.io ecosystem); their licenses apply, and dmn-js renders the bpmn.io watermark, which you must keep visible unless you hold a commercial [bpmn.io license](https://bpmn.io/license/).
|