@formicoidea/labre-framework-wardley 0.61.0 → 1.1.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/dist/commands.js +2 -2
- package/dist/dark-palette.d.ts +4 -1
- package/dist/dark-palette.js +7 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +9 -2
- package/dist/interchange-headless.d.ts +32 -6
- package/dist/interchange-headless.js +65 -6
- package/dist/interchange.d.ts +1 -1
- package/dist/interchange.js +8 -3
- package/dist/legend.d.ts +1 -0
- package/dist/legend.js +66 -1
- package/dist/method.d.ts +53 -0
- package/dist/method.js +88 -0
- package/dist/natures.d.ts +64 -2
- package/dist/natures.js +154 -6
- package/dist/node/consts.d.ts +133 -1
- package/dist/node/consts.js +219 -1
- package/dist/node/node-renderer.d.ts +2 -2
- package/dist/node/node-renderer.js +42 -1
- package/dist/renderer-json-export.d.ts +40 -0
- package/dist/renderer-json-export.js +669 -0
- package/dist/renderer-json-import.d.ts +71 -0
- package/dist/renderer-json-import.js +759 -0
- package/dist/renderer-json.d.ts +202 -0
- package/dist/renderer-json.js +366 -0
- package/dist/roles.d.ts +2 -2
- package/dist/roles.js +13 -0
- package/dist/toolbar/node-config.d.ts +0 -23
- package/dist/toolbar/node-config.js +1 -114
- package/dist/translations.js +6 -3
- package/package.json +2 -2
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { InterchangeImportContext, InterchangeImportResult } from '@formicoidea/labre-core/interchange';
|
|
2
|
+
/**
|
|
3
|
+
* The renderer JSON reader's remarks whose wording is FIXED, as
|
|
4
|
+
* `[key, English]` pairs — the shape and the reason of
|
|
5
|
+
* `WARDLEY_OWM_IMPORT_REMARKS`: a reader has no `std`, so it hands the key
|
|
6
|
+
* over and `reportInterchangeImport` resolves it. Contributed to the
|
|
7
|
+
* manifest by `./translations.ts`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const WARDLEY_JSON_IMPORT_REMARKS: {
|
|
10
|
+
readonly notJson: readonly ["com.labre.wardley.import.json.remark.not-json", "This file is not JSON, so nothing was read from it."];
|
|
11
|
+
readonly notAMap: readonly ["com.labre.wardley.import.json.remark.not-a-map", "This JSON is not a wardley-map-renderer map: it has no `components` list, so nothing was read from it."];
|
|
12
|
+
readonly invalidComponent: readonly ["com.labre.wardley.import.json.remark.invalid-component", "this component lacks an id, a name, a type or a numeric position, so it was not imported."];
|
|
13
|
+
readonly invalidRelation: readonly ["com.labre.wardley.import.json.remark.invalid-relation", "a relation lacks its consumer or its supplier, so it was not imported."];
|
|
14
|
+
readonly undeclaredEnd: readonly ["com.labre.wardley.import.json.remark.undeclared-end", "a relation names this, and no component of the file has this id, so the relation was not imported."];
|
|
15
|
+
readonly duplicateId: readonly ["com.labre.wardley.import.json.remark.duplicate-id", "this id is used by more than one component. Both are on the map, and every relation naming it means the first."];
|
|
16
|
+
readonly invalidEvolution: readonly ["com.labre.wardley.import.json.remark.invalid-evolution", "an evolution of this component has no numeric target position, so it was not imported."];
|
|
17
|
+
readonly outOfRange: readonly ["com.labre.wardley.import.json.remark.out-of-range", "its position falls outside 0…1, so it is drawn off the map’s plot."];
|
|
18
|
+
readonly noGeometry: readonly ["com.labre.wardley.import.json.remark.no-geometry", "this pipeline has no usable `pipelineGeometry`, so it was drawn at the toolbar’s size around its position. The file did not say how wide it is."];
|
|
19
|
+
readonly droppedField: readonly ["com.labre.wardley.import.json.remark.dropped-field", "{{count}} `{{kind}}` field(s) have nothing on this canvas to show them, so they were not imported."];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* A `@formicoidea/wardley-map-renderer` JSON map, read as a Wardley map made
|
|
23
|
+
* of what a user places from the TOOLBAR (ADR 0012 P3, ADR 0045, PO decisions
|
|
24
|
+
* of 2026-10-28).
|
|
25
|
+
*
|
|
26
|
+
* ## Only what shows, made of the toolbar's own artefacts
|
|
27
|
+
*
|
|
28
|
+
* The OWM path the connector used drew a second component at the target of
|
|
29
|
+
* every evolution, a pipeline's name twice with its square centred, and lost
|
|
30
|
+
* the source's squares and colours (the connector's bench). Here every
|
|
31
|
+
* Wardley element is a `WARDLEY_TOOLBOX` builder's, given its real
|
|
32
|
+
* parameters; what the toolbox has no item for is a plain shape or a free
|
|
33
|
+
* text, grouped with the component it belongs to; and what nothing can show
|
|
34
|
+
* is dropped and named in the report. No id and no field of the file is
|
|
35
|
+
* stored on any element.
|
|
36
|
+
*
|
|
37
|
+
* ## The mapping
|
|
38
|
+
*
|
|
39
|
+
* | renderer field | on the canvas |
|
|
40
|
+
* | ------------------------------------------------ | ----------------------------------------------------------------------------- |
|
|
41
|
+
* | `type` anchor / component / pipeline; `subtype` market / ecosystem; a `method` | the toolbox anchor, component, pipeline, market, ecosystem, method item |
|
|
42
|
+
* | `subtype` userNeed / solution / supplier / functional | a plain component (the subtype has no look) |
|
|
43
|
+
* | `label.name` / `label.position` | the toolbox name, moved by the offset (`jsonLabelBox`) |
|
|
44
|
+
* | `position.*.scalar` | the node's centre on the plot (visibility 0 is the TOP) |
|
|
45
|
+
* | `position.evolution.range` | a thin plain rect at the node's height, under it, in its group |
|
|
46
|
+
* | `nature` activity / data / practice / knowledge | the `wardley:nature` tag; the other five are dropped |
|
|
47
|
+
* | `description` | a free text under the name, in the component's group |
|
|
48
|
+
* | `color` | the node's stroke (an unknown name paints black, as in the renderer) |
|
|
49
|
+
* | `method` (category, recommendation) | the method item and its `wardley:method` tag; a pair naming none of the nine leaves it untagged (it paints as Make) |
|
|
50
|
+
* | `accelerator` / `deaccelerator` | the toolbox climate arrow beside the node, where the renderer draws it |
|
|
51
|
+
* | `step` | a numbered plain dot at the node's upper left, in its group |
|
|
52
|
+
* | `evolvesTo[].position` / `evolveType` / `inertia` | the toolbox change arrow to that point, `evolveType` as its label, an inertia item on each phase line it crosses (at its middle when it crosses none) |
|
|
53
|
+
* | `pipelineGeometry` | the pipeline's body stretched to the box, its handle at `handleEvolution` |
|
|
54
|
+
* | `relations[]` and their `type`, `flow` | the toolbox dependency link, consumer first; Flow blue and thicker, Constraint black and as thick; `flow.label` its text, `flow.style` its dash or double width |
|
|
55
|
+
* | `title` / `context` | free texts above / under the map |
|
|
56
|
+
* | `renderConfig` axis and phase labels and toggles | the map's own fields |
|
|
57
|
+
* | `id`s, component `inertia`, a pipeline's `position`, subtype / nature on a pipeline, the rest of `renderConfig`, unknown fields | **dropped**, named in the report |
|
|
58
|
+
*
|
|
59
|
+
* ## An evolution is an arrow to a point, never a twin
|
|
60
|
+
*
|
|
61
|
+
* The toolbar's Arrow tool, dragged from a component and dropped on the empty
|
|
62
|
+
* map, leaves the change-arrow connector with a free end
|
|
63
|
+
* (`ConnectorTool.dragEnd` keeps `target: { position }`), and the renderer
|
|
64
|
+
* draws an evolution as an arrow and no second node. So it is that.
|
|
65
|
+
*
|
|
66
|
+
* ## A bad document is a report
|
|
67
|
+
*
|
|
68
|
+
* Text that is not JSON, or JSON with no `components` list, imports nothing
|
|
69
|
+
* and the report says why; the reader never throws.
|
|
70
|
+
*/
|
|
71
|
+
export declare function importWardleyRendererJson(source: string, _context?: InterchangeImportContext): InterchangeImportResult;
|