@formicoidea/labre-framework-bpmn 0.40.0 → 0.42.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/LICENSE +384 -0
- package/dist/actions.d.ts +7 -7
- package/dist/actions.js +49 -38
- package/dist/commands.js +201 -39
- package/dist/consts.d.ts +54 -2
- package/dist/consts.js +58 -2
- package/dist/export.d.ts +30 -1
- package/dist/export.js +119 -66
- package/dist/import.d.ts +65 -13
- package/dist/import.js +205 -68
- package/dist/interchange.d.ts +34 -0
- package/dist/interchange.js +112 -8
- package/dist/node/node-renderer.js +22 -32
- package/dist/presets.js +4 -3
- package/dist/templates/index.d.ts +55 -0
- package/dist/templates/index.js +126 -38
- package/dist/toolbar/bpmn-senior-button.d.ts +2 -0
- package/dist/toolbar/bpmn-senior-button.js +6 -2
- package/dist/toolbar/config.d.ts +22 -11
- package/dist/toolbar/config.js +39 -39
- package/dist/toolbar/icons.d.ts +9 -2
- package/dist/toolbar/icons.js +9 -6
- package/dist/toolbar/palette.d.ts +23 -0
- package/dist/toolbar/palette.js +65 -0
- package/dist/translations.js +76 -3
- package/dist/view.js +18 -14
- package/package.json +2 -2
package/dist/export.js
CHANGED
|
@@ -763,6 +763,72 @@ class IdMinter {
|
|
|
763
763
|
return unique;
|
|
764
764
|
}
|
|
765
765
|
}
|
|
766
|
+
/**
|
|
767
|
+
* The ten export-warning keys, each paired with its English fallback
|
|
768
|
+
* (`{{name}}` placeholders included) — declared ONCE, here, and read both by
|
|
769
|
+
* the `if` blocks below (which add the live `params`) and by
|
|
770
|
+
* `translations.ts`'s manifest (which needs the pair with no board to run
|
|
771
|
+
* against).
|
|
772
|
+
*/
|
|
773
|
+
// Each fallback below is ONE unbroken literal rather than the `+`-joined
|
|
774
|
+
// pieces an earlier draft used: `manifest.unit.spec.ts`'s drift check reads a
|
|
775
|
+
// key/fallback PAIR as two adjacent literals in one argument list, and a
|
|
776
|
+
// concatenation left it seeing only the first piece — a drift the check
|
|
777
|
+
// itself then (correctly) flagged. A long line is the trade for a fallback
|
|
778
|
+
// the check can actually confirm against the manifest.
|
|
779
|
+
const UNDRAWN_ARTEFACTS_WARNING = [
|
|
780
|
+
'com.labre.bpmn.export.warning.undrawn',
|
|
781
|
+
'{{count}} artefact(s) are drawn outside every pool. They are in the file, but most BPMN tools will not draw them: only a pool has a shape to hold them. Draw them inside a pool to make them visible.',
|
|
782
|
+
];
|
|
783
|
+
const DROPPED_MESSAGE_FLOWS_WARNING = [
|
|
784
|
+
'com.labre.bpmn.export.warning.dropped-message-flows',
|
|
785
|
+
'{{count}} message flow(s) were left out: a message flow runs between participants, and this board has no pool. Draw the pools it runs between, or say "is followed by" instead.',
|
|
786
|
+
];
|
|
787
|
+
const SUBSTITUTED_IDS_WARNING = [
|
|
788
|
+
'com.labre.bpmn.export.warning.substituted-ids',
|
|
789
|
+
'{{count}} element(s) imported from a BPMN file could not keep their original id: it was already taken in this file. A new id was written instead; nothing else changed.',
|
|
790
|
+
];
|
|
791
|
+
const DISPLACED_SHAPES_WARNING = [
|
|
792
|
+
'com.labre.bpmn.export.warning.displaced-shapes',
|
|
793
|
+
'{{count}} shape(s) imported from a BPMN file are kept exactly as the file drew them, and the rest of this drawing has moved since. They will open beside the process rather than inside it. Nothing was lost: they are in the file, at the position the original gave them.',
|
|
794
|
+
];
|
|
795
|
+
const CONTRADICTING_DECLARATIONS_WARNING = [
|
|
796
|
+
'com.labre.bpmn.export.warning.contradicting-declarations',
|
|
797
|
+
"This board came from a BPMN file that used {{names}} for something other than what BPMN means by them. Labre writes its own, so the file's declarations were left out rather than allowed to redefine the diagram's own namespaces. They are still in the document. Anything the file wrote under those prefixes is still in the export and will now be read under Labre's meaning of them, which is not the meaning the original had.",
|
|
798
|
+
];
|
|
799
|
+
const DISAGREEING_DECLARATIONS_WARNING = [
|
|
800
|
+
'com.labre.bpmn.export.warning.disagreeing-declarations',
|
|
801
|
+
"Two pools on this board disagree about {{names}}: they came from BPMN files that gave the same name two different values. The last was written and the other left out, so matter carried from the first file is now read under the second's meaning. Both are still in the document.",
|
|
802
|
+
];
|
|
803
|
+
const CONFLICTING_IDS_WARNING = [
|
|
804
|
+
'com.labre.bpmn.export.warning.conflicting-ids',
|
|
805
|
+
'{{count}} element(s) imported from a BPMN file could not be written back: {{names}} name(s) an id another imported element had already claimed, and a BPMN id must be unique across a document. The first was kept. The other(s) are still in the document; they are not in this file.',
|
|
806
|
+
];
|
|
807
|
+
const REFUSED_ATTRIBUTE_NAMES_WARNING = [
|
|
808
|
+
'com.labre.bpmn.export.warning.refused-attribute-names',
|
|
809
|
+
'{{count}} carried attribute(s) could not be written back, because their name(s) are not a valid XML name. They are still in the document. This is a sign the payload was edited by something other than a BPMN import.',
|
|
810
|
+
];
|
|
811
|
+
const UNWRITABLE_EDGES_WARNING = [
|
|
812
|
+
'com.labre.bpmn.export.warning.unwritable-edges',
|
|
813
|
+
'{{count}} arrow(s) were left out: BPMN requires both ends of a flow to be named, and they have an end that is loose or attached to something that is not a BPMN artefact.',
|
|
814
|
+
];
|
|
815
|
+
const LEFT_OUT_WARNING = [
|
|
816
|
+
'com.labre.bpmn.export.warning.left-out',
|
|
817
|
+
'{{count}} element(s) inside the pool are not BPMN elements and were left out of the .bpmn file. Export SVG to get everything drawn in the pool.',
|
|
818
|
+
];
|
|
819
|
+
/** All ten, for `translations.ts`'s manifest contribution. */
|
|
820
|
+
export const BPMN_EXPORT_WARNING_KEYS = [
|
|
821
|
+
UNDRAWN_ARTEFACTS_WARNING,
|
|
822
|
+
DROPPED_MESSAGE_FLOWS_WARNING,
|
|
823
|
+
SUBSTITUTED_IDS_WARNING,
|
|
824
|
+
DISPLACED_SHAPES_WARNING,
|
|
825
|
+
CONTRADICTING_DECLARATIONS_WARNING,
|
|
826
|
+
DISAGREEING_DECLARATIONS_WARNING,
|
|
827
|
+
CONFLICTING_IDS_WARNING,
|
|
828
|
+
REFUSED_ATTRIBUTE_NAMES_WARNING,
|
|
829
|
+
UNWRITABLE_EDGES_WARNING,
|
|
830
|
+
LEFT_OUT_WARNING,
|
|
831
|
+
];
|
|
766
832
|
/* ── The plan ─────────────────────────────────────────────────────────── */
|
|
767
833
|
/**
|
|
768
834
|
* Which element an artefact is written INSIDE.
|
|
@@ -1364,9 +1430,11 @@ export function exportBpmnXmlWithWarnings(board, options = {}) {
|
|
|
1364
1430
|
id: minter.mint('Shape', node.id),
|
|
1365
1431
|
bpmnElement: node.id,
|
|
1366
1432
|
};
|
|
1367
|
-
// The pack draws the COLLAPSED sub-process only — a task-sized box with
|
|
1368
|
-
//
|
|
1369
|
-
// tool is free to draw an expanded container the
|
|
1433
|
+
// The pack draws the COLLAPSED sub-process only — a task-sized box, with
|
|
1434
|
+
// no body folded open inside it — and `isExpanded="false"` is how DI says
|
|
1435
|
+
// exactly that. Without it a tool is free to draw an expanded container the
|
|
1436
|
+
// author never made. (Labre leaves the `+` marker itself off the box, which
|
|
1437
|
+
// is a drawing choice and says nothing about the DI flag.)
|
|
1370
1438
|
if (node.model.kind === 'subProcess' ||
|
|
1371
1439
|
node.model.kind === 'callActivity') {
|
|
1372
1440
|
attrs.isExpanded = 'false';
|
|
@@ -1465,6 +1533,14 @@ export function exportBpmnXmlWithWarnings(board, options = {}) {
|
|
|
1465
1533
|
...slot(document, 'relationship'),
|
|
1466
1534
|
]);
|
|
1467
1535
|
/* ── What the format refused to carry ────────────────────────────── */
|
|
1536
|
+
//
|
|
1537
|
+
// Each warning is a KEY plus its English fallback and params — see
|
|
1538
|
+
// `BpmnExportWarning`. This function stays `std`-free (like every other
|
|
1539
|
+
// pure exporter in the pack), so it cannot ask a host's catalogue itself;
|
|
1540
|
+
// `exportBpmnXmlFile` (`actions.ts`) resolves every one of these through
|
|
1541
|
+
// `translateKey` before showing them. The fallback is deliberately NEUTRAL
|
|
1542
|
+
// on number ("{{count}} element(s)") rather than branching singular/plural
|
|
1543
|
+
// English by hand: pluralisation is the host's, off `count`.
|
|
1468
1544
|
const warnings = [];
|
|
1469
1545
|
// Flow objects drawn beside the pools. They are in the file and correct for
|
|
1470
1546
|
// any tool that reads the MODEL, and a collaboration plane has no shape to
|
|
@@ -1478,18 +1554,12 @@ export function exportBpmnXmlWithWarnings(board, options = {}) {
|
|
|
1478
1554
|
? planned.filter(node => node.scope === orphanProcess).length
|
|
1479
1555
|
: 0;
|
|
1480
1556
|
if (undrawn > 0) {
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
`file, but most BPMN tools will not draw ${undrawn === 1 ? 'it' : 'them'}: ` +
|
|
1484
|
-
`only a pool has a shape to hold ${undrawn === 1 ? 'it' : 'them'}. ` +
|
|
1485
|
-
`Draw ${undrawn === 1 ? 'it' : 'them'} inside a pool to make ` +
|
|
1486
|
-
`${undrawn === 1 ? 'it' : 'them'} visible.`);
|
|
1557
|
+
const [key, fallback] = UNDRAWN_ARTEFACTS_WARNING;
|
|
1558
|
+
warnings.push({ key, fallback, params: { count: undrawn } });
|
|
1487
1559
|
}
|
|
1488
1560
|
if (droppedMessageFlows > 0) {
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
`has no pool. Draw the pools it runs between, or say "is followed by" ` +
|
|
1492
|
-
`instead.`);
|
|
1561
|
+
const [key, fallback] = DROPPED_MESSAGE_FLOWS_WARNING;
|
|
1562
|
+
warnings.push({ key, fallback, params: { count: droppedMessageFlows } });
|
|
1493
1563
|
}
|
|
1494
1564
|
// An id a file gave us that we could not give back (ADR 0012 D3). It happens
|
|
1495
1565
|
// when two elements carry the same recorded id — a merged document, an
|
|
@@ -1497,11 +1567,8 @@ export function exportBpmnXmlWithWarnings(board, options = {}) {
|
|
|
1497
1567
|
// file is correct either way; what the author loses is the continuity of one
|
|
1498
1568
|
// name between the document they imported and the one they are exporting.
|
|
1499
1569
|
if (minter.substituted > 0) {
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
`${minter.substituted === 1 ? 'its' : 'their'} original id: ` +
|
|
1503
|
-
`${minter.substituted === 1 ? 'it was' : 'they were'} already taken in ` +
|
|
1504
|
-
`this file. A new id was written instead; nothing else changed.`);
|
|
1570
|
+
const [key, fallback] = SUBSTITUTED_IDS_WARNING;
|
|
1571
|
+
warnings.push({ key, fallback, params: { count: minter.substituted } });
|
|
1505
1572
|
}
|
|
1506
1573
|
// A carried diagram element keeps the source file's own coordinates, and the
|
|
1507
1574
|
// rest of the drawing has just been translated to the plane origin (§12.3).
|
|
@@ -1510,44 +1577,28 @@ export function exportBpmnXmlWithWarnings(board, options = {}) {
|
|
|
1510
1577
|
// once anything has been dragged. Nothing is lost; something is displaced,
|
|
1511
1578
|
// and the person who clicked Export is the one entitled to hear about it.
|
|
1512
1579
|
if (carriedPlane.length > 0 && (dx !== 0 || dy !== 0)) {
|
|
1513
|
-
const
|
|
1514
|
-
warnings.push(
|
|
1515
|
-
`${count === 1 ? 'is' : 'are'} kept exactly as the file drew ` +
|
|
1516
|
-
`${count === 1 ? 'it' : 'them'}, and the rest of this drawing has ` +
|
|
1517
|
-
`moved since. ${count === 1 ? 'It' : 'They'} will open beside the ` +
|
|
1518
|
-
`process rather than inside it. Nothing was lost: ` +
|
|
1519
|
-
`${count === 1 ? 'it is' : 'they are'} in the file, at the position ` +
|
|
1520
|
-
`the original gave ${count === 1 ? 'it' : 'them'}.`);
|
|
1580
|
+
const [key, fallback] = DISPLACED_SHAPES_WARNING;
|
|
1581
|
+
warnings.push({ key, fallback, params: { count: carriedPlane.length } });
|
|
1521
1582
|
}
|
|
1522
1583
|
if (contradictingDeclarations.length > 0) {
|
|
1523
|
-
const
|
|
1524
|
-
warnings.push(
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
`left out rather than allowed to redefine the diagram's own namespaces. ` +
|
|
1530
|
-
`${one ? 'It is' : 'They are'} still in the document. ` +
|
|
1531
|
-
// The half a reader would otherwise have to work out: the DECLARATION
|
|
1532
|
-
// is what was dropped, and the matter written under it was not — so it
|
|
1533
|
-
// is now read under Labre's binding of the same prefix, which means
|
|
1534
|
-
// something else. That is the larger of the two changes and it was the
|
|
1535
|
-
// silent one.
|
|
1536
|
-
`Anything the file wrote under ` +
|
|
1537
|
-
`${one ? 'that prefix' : 'those prefixes'} is still in the export and ` +
|
|
1538
|
-
`will now be read under Labre's meaning of ` +
|
|
1539
|
-
`${one ? 'it' : 'them'}, which is not the meaning the original had.`);
|
|
1584
|
+
const [key, fallback] = CONTRADICTING_DECLARATIONS_WARNING;
|
|
1585
|
+
warnings.push({
|
|
1586
|
+
key,
|
|
1587
|
+
fallback,
|
|
1588
|
+
params: { names: contradictingDeclarations.join(' and ') },
|
|
1589
|
+
});
|
|
1540
1590
|
}
|
|
1541
1591
|
// Two pools, two source files, one prefix bound two ways. Last one wins —
|
|
1542
1592
|
// there is one attribute of each name on `definitions` and something has to
|
|
1543
1593
|
// be written — but a rebinding nobody was told about is how a fragment comes
|
|
1544
1594
|
// to mean something else with no trace of when.
|
|
1545
1595
|
if (disagreeingDeclarations.length > 0) {
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1596
|
+
const [key, fallback] = DISAGREEING_DECLARATIONS_WARNING;
|
|
1597
|
+
warnings.push({
|
|
1598
|
+
key,
|
|
1599
|
+
fallback,
|
|
1600
|
+
params: { names: disagreeingDeclarations.join(' and ') },
|
|
1601
|
+
});
|
|
1551
1602
|
}
|
|
1552
1603
|
// A carried element claiming an id another has already written back. The
|
|
1553
1604
|
// duplicate-by-paste case is silent on purpose — one thing carried twice is
|
|
@@ -1555,32 +1606,34 @@ export function exportBpmnXmlWithWarnings(board, options = {}) {
|
|
|
1555
1606
|
// fragments claiming one id, which is a file that cannot hold both.
|
|
1556
1607
|
const conflicting = [...new Set(carried.conflictingIds)];
|
|
1557
1608
|
if (conflicting.length > 0) {
|
|
1558
|
-
const
|
|
1559
|
-
warnings.push(
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1609
|
+
const [key, fallback] = CONFLICTING_IDS_WARNING;
|
|
1610
|
+
warnings.push({
|
|
1611
|
+
key,
|
|
1612
|
+
fallback,
|
|
1613
|
+
params: {
|
|
1614
|
+
count: conflicting.length,
|
|
1615
|
+
names: conflicting.map(id => `"${id}"`).join(', '),
|
|
1616
|
+
},
|
|
1617
|
+
});
|
|
1566
1618
|
}
|
|
1567
1619
|
// An attribute NAME that is not a name. It cannot be written without
|
|
1568
1620
|
// unbalancing the document — the serializer interpolates a name and escapes
|
|
1569
1621
|
// only a value — so it is dropped rather than allowed to corrupt the file.
|
|
1570
1622
|
const refusedNames = [...new Set(carried.refusedNames)];
|
|
1571
1623
|
if (refusedNames.length > 0) {
|
|
1572
|
-
const
|
|
1573
|
-
warnings.push(
|
|
1574
|
-
`could not be written back, because ` +
|
|
1575
|
-
`${one ? 'its name is not' : 'their names are not'} a valid XML name. ` +
|
|
1576
|
-
`${one ? 'It is' : 'They are'} still in the document. This is a sign ` +
|
|
1577
|
-
`the payload was edited by something other than a BPMN import.`);
|
|
1624
|
+
const [key, fallback] = REFUSED_ATTRIBUTE_NAMES_WARNING;
|
|
1625
|
+
warnings.push({ key, fallback, params: { count: refusedNames.length } });
|
|
1578
1626
|
}
|
|
1579
1627
|
if (unwritableEdges > 0) {
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1628
|
+
const [key, fallback] = UNWRITABLE_EDGES_WARNING;
|
|
1629
|
+
warnings.push({ key, fallback, params: { count: unwritableEdges } });
|
|
1630
|
+
}
|
|
1631
|
+
// What the PICKING left behind (see {@link BpmnExportBoard.leftOut}). One
|
|
1632
|
+
// line for the whole pool, because the point is not which shape it was: it is
|
|
1633
|
+
// that the file is the process and the SVG is the picture.
|
|
1634
|
+
if (board.leftOut !== undefined && board.leftOut > 0) {
|
|
1635
|
+
const [key, fallback] = LEFT_OUT_WARNING;
|
|
1636
|
+
warnings.push({ key, fallback, params: { count: board.leftOut } });
|
|
1584
1637
|
}
|
|
1585
1638
|
return {
|
|
1586
1639
|
text: `<?xml version="1.0" encoding="UTF-8"?>\n${serializeElement(definitions, '')}\n`,
|
package/dist/import.d.ts
CHANGED
|
@@ -1,22 +1,34 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type InterchangeImportContext, type InterchangeImportResult } from '@formicoidea/labre-core/blocks/surface';
|
|
2
2
|
import type { BpmnNodeKind } from '@formicoidea/labre-core/model';
|
|
3
3
|
import { BPMN_SCOPE } from './export.js';
|
|
4
4
|
/**
|
|
5
|
-
* The remarks whose wording is FIXED, as `[key, English]` pairs
|
|
5
|
+
* The remarks whose wording is FIXED, as `[key, English]` pairs — one entry
|
|
6
|
+
* per SHAPE of sentence, never one per exact string: a remark that names
|
|
7
|
+
* something out of the file (`<boundaryEvent>`, an id, a count of lanes)
|
|
8
|
+
* carries `{{name}}` / `{{count}}` holes in the fallback here, filled at the
|
|
9
|
+
* call site by `messageParams` (`InterchangeNote.messageParams`) — never by
|
|
10
|
+
* minting a new key for every value the file happens to carry.
|
|
6
11
|
*
|
|
7
12
|
* A reader is a pure function of text (`docs/adr/0012`, P3) and has no `std`,
|
|
8
|
-
* so it cannot ask the host's catalogue for anything: it declares the key
|
|
9
|
-
* the
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
+
* so it cannot ask the host's catalogue for anything: it declares the key
|
|
14
|
+
* (and, where the sentence has a hole, the params) on the note, and
|
|
15
|
+
* `reportInterchangeImport` resolves both when it draws the report
|
|
16
|
+
* (`InterchangeNote.messageKey` / `.messageParams`). The English string stays
|
|
17
|
+
* here and stays the fallback, so the console table and a playground with no
|
|
18
|
+
* catalogue read exactly what they read before: `translateKey` fills a
|
|
19
|
+
* `{{…}}` hole from `messageParams` even with no `TranslationProvider`
|
|
20
|
+
* registered (`fillPlaceholders`), so the ENGLISH sentence a call site builds
|
|
21
|
+
* is unchanged by giving it a key.
|
|
13
22
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
23
|
+
* Plural wording is the host's: where a count can be 0, 1 or many, the
|
|
24
|
+
* fallback stays grammatically neutral (`'{{count}} lane(s)…'`) rather than
|
|
25
|
+
* picking English's own singular/plural — the same rule
|
|
26
|
+
* `interchange-import.ts`'s own count labels follow.
|
|
27
|
+
*
|
|
28
|
+
* `BPMN_QUARANTINE_REASON` (declared further down, with its own key pairing)
|
|
29
|
+
* is the one exception: its plain string is ALSO written verbatim into
|
|
30
|
+
* `ForeignInterchange.quarantined[].reason` (data, never translated), so it
|
|
31
|
+
* cannot become a `[key, english]` pair without breaking that contract.
|
|
20
32
|
*
|
|
21
33
|
* They are contributed to the manifest by `./translations.ts`, with the
|
|
22
34
|
* framework, because they ship in the BPMN bundle rather than in core.
|
|
@@ -25,6 +37,32 @@ export declare const BPMN_IMPORT_REMARKS: {
|
|
|
25
37
|
readonly inventedPool: readonly ["com.labre.bpmn.import.remark.invented-pool", "This file names no participant, so its process was drawn in a pool of Labre's own. The pool is not the file's: exporting writes the process back without one."];
|
|
26
38
|
readonly laneGap: readonly ["com.labre.bpmn.import.remark.lane-gap", "The lanes of this pool are drawn with a gap or an overlap between them. Labre lays its bands end to end, so their heights were kept in proportion and the space between them was closed."];
|
|
27
39
|
readonly mustUnderstand: readonly ["com.labre.bpmn.import.remark.must-understand", "The file declares an extension that it says MUST be understood to read the model correctly. Labre does not understand it: the import went ahead, and this reading of the process may be wrong."];
|
|
40
|
+
readonly duplicateId: readonly ["com.labre.bpmn.import.remark.duplicate-id", "Two elements in this file share the id \"{{id}}\", which BPMN requires to be unique across a document. Both were imported; the second will be written back under an id Labre mints."];
|
|
41
|
+
readonly carriedChild: readonly ["com.labre.bpmn.import.remark.carried-child", "<{{tag}}> has no Labre artefact, so it is kept verbatim on the nearest element that has one. It is not drawn, and no validation rule sees it."];
|
|
42
|
+
readonly inventedPoolLayout: readonly ["com.labre.bpmn.import.remark.invented-pool-layout", "The participant \"{{name}}\" arrived with no diagram, so Labre placed its pool beside the drawing."];
|
|
43
|
+
readonly inventedLaneLayout: readonly ["com.labre.bpmn.import.remark.invented-lane-layout", "{{count}} lane(s) arrived with no diagram, so Labre split the pool into equal bands. The proportions are Labre's and not the file's."];
|
|
44
|
+
readonly undrawnTrigger: readonly ["com.labre.bpmn.import.remark.undrawn-trigger", "<{{tag}}> names its trigger by reference to \"{{ref}}\", which Labre does not draw. The event was kept whole rather than drawn as a plain one."];
|
|
45
|
+
readonly inventedNodeLayout: readonly ["com.labre.bpmn.import.remark.invented-node-layout", "<{{tag}}> arrived with no diagram, so Labre placed it beside the drawing. Its position is Labre's and not the file's."];
|
|
46
|
+
readonly singleEndedFlow: readonly ["com.labre.bpmn.import.remark.single-ended-flow", "<{{tag}}> names only one of its two ends, so there is no arrow to draw between them. It was left out."];
|
|
47
|
+
readonly danglingFlowEnd: readonly ["com.labre.bpmn.import.remark.dangling-flow-end", "<{{tag}}> runs to {{ends}}, not drawn on this canvas. The flow is kept whole beside them rather than drawn with a loose end."];
|
|
48
|
+
readonly undeclaredShape: readonly ["com.labre.bpmn.import.remark.undeclared-shape", "The diagram draws \"{{id}}\", which the file does not declare. The shape is kept, and nothing is drawn for it."];
|
|
49
|
+
readonly noProcessResidue: readonly ["com.labre.bpmn.import.remark.no-process-residue", "This file declares {{count}} root element(s) and no process to draw, so there was no artefact for them to be kept on. Nothing was imported."];
|
|
50
|
+
readonly laneDrift: readonly ["com.labre.bpmn.import.remark.lane-drift", "The file lists this artefact in the lane \"{{listedLane}}\" and draws it in \"{{drawnLane}}\". Labre reads the drawing: a lane holds what is drawn inside it."];
|
|
51
|
+
readonly inventedRouting: readonly ["com.labre.bpmn.import.remark.invented-routing", "{{count}} flow(s) carry an explicit routing in the file. Labre routes a flow between its two ends and re-routes it whenever they move, so their bend points are not kept."];
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* The reader's own refusals, as `[key, English]` pairs — thrown via
|
|
55
|
+
* {@link InterchangeImportError}, never returned, because none of these say
|
|
56
|
+
* "this is a file I can partly read" (see `parseDefinitions` and the
|
|
57
|
+
* choreography refusal, below). Same shape and the same reason as
|
|
58
|
+
* {@link BPMN_IMPORT_REMARKS}: one entry per shape of refusal, `{{name}}`
|
|
59
|
+
* holes filled by `InterchangeImportError.messageParams`.
|
|
60
|
+
*/
|
|
61
|
+
export declare const BPMN_IMPORT_ERRORS: {
|
|
62
|
+
readonly malformedXml: readonly ["com.labre.bpmn.import.error.malformed-xml", "This file is not well-formed XML, so no BPMN can be read out of it: {{detail}}"];
|
|
63
|
+
readonly notDefinitions: readonly ["com.labre.bpmn.import.error.not-definitions", "A BPMN file opens on <definitions>; this one opens on <{{tag}}>."];
|
|
64
|
+
readonly wrongNamespace: readonly ["com.labre.bpmn.import.error.wrong-namespace", "This <definitions> is in \"{{namespace}}\", not in BPMN 2.0's (\"{{bpmnNamespace}}\"). A DMN decision model and a BPMN process open on the same element name and are not the same file."];
|
|
65
|
+
readonly declinedRootKind: readonly ["com.labre.bpmn.import.error.declined-root-kind", "This file is a BPMN {{kind}}, which Labre does not draw. Only a process or a collaboration can be imported."];
|
|
28
66
|
};
|
|
29
67
|
/**
|
|
30
68
|
* `startEvent` + `messageEventDefinition` → `startEventMessage`, and the
|
|
@@ -60,6 +98,20 @@ export declare const BPMN_QUARANTINE_REASON: {
|
|
|
60
98
|
readonly nestedLanes: string;
|
|
61
99
|
readonly imported: string;
|
|
62
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* {@link BPMN_QUARANTINE_REASON}'s own i18n keys, one per reason.
|
|
103
|
+
*
|
|
104
|
+
* A SEPARATE table rather than folding the key into each reason string
|
|
105
|
+
* (`BPMN_IMPORT_REMARKS`'s `[key, english]` shape): `BPMN_QUARANTINE_REASON`'s
|
|
106
|
+
* plain strings are ALSO written verbatim into
|
|
107
|
+
* `ForeignInterchange.quarantined[].reason` — a DATA field the reader hands
|
|
108
|
+
* the writer, never re-emitted, never shown, and pinned in
|
|
109
|
+
* `import.unit.spec.ts` as the literal English text — so it cannot become a
|
|
110
|
+
* tuple without breaking that contract. Only the REPORT note (`messageKey`
|
|
111
|
+
* below) is resolved through the host's catalogue; the carried `reason` data
|
|
112
|
+
* stays English, exactly as it always has.
|
|
113
|
+
*/
|
|
114
|
+
export declare const BPMN_QUARANTINE_REASON_KEY: Record<keyof typeof BPMN_QUARANTINE_REASON, string>;
|
|
63
115
|
/**
|
|
64
116
|
* Read a BPMN 2.0 interchange document as element props plus a report.
|
|
65
117
|
*
|