@istar-ts/core 0.14.2 → 0.15.0-beta.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.
package/README.md CHANGED
@@ -461,6 +461,21 @@ toPistar(extended); // writes the "metamodel" block
461
461
  into a store (`store.load` or `store.replace`) to keep editing.
462
462
  - `pistarType` works as for any extension, so `istar.<Name>` types on disk still read.
463
463
 
464
+ ## Palette
465
+
466
+ `DEFAULT_PALETTE` (`./palette`) is iStar 2.0's palette as data — the part that isn't React: a
467
+ `PaletteDescription` keyed by element and link kind, each entry a `label`, `order`, `group`
468
+ (entries sharing one collapse into a dropdown button) and `section` ("actors"/"elements" by
469
+ default), plus the presets a toolbar entry creates with — an element's `properties`, a
470
+ contribution link's `value`, a dependency's `dependum` kind. A kind missing from the
471
+ description, or mapped to `false`, has no palette entry.
472
+
473
+ This is framework-free so a host can answer "what can I add here" — GLSP's
474
+ `RequestContextActions` — without depending on `@istar-ts/react`; `@istar-ts/actions`'
475
+ `contextActionsFor` turns a `PaletteDescription` plus a `Metamodel` into `LabeledAction`s. The
476
+ react package's palette registry derives its default entries from `DEFAULT_PALETTE`; icons,
477
+ titles and components stay in react.
478
+
464
479
  ## Diagnostics
465
480
 
466
481
  `GoalDiagnostic` (`{ elementId, key?, severity, message, source?, range?, code?, data? }`) is the
@@ -470,6 +485,13 @@ data shape for findings about elements and links. Analysers publish them per sou
470
485
  diagnostics. Diagnostics are never part of the model and never serialized. `@istar-ts/react`
471
486
  shows them as badges and in the inspector (see its README).
472
487
 
488
+ `ModelOperationError.toDiagnostic()` turns a thrown operation error into a `GoalDiagnostic`
489
+ (`severity: 'error'`, anchored on the `elementId` the error named, or `''` when it named none).
490
+ `connectResultToDiagnostic(result, endpoints)` does the same for a failing `connect`/`canLink`
491
+ result, anchored on whichever of `endpoints.source`/`endpoints.target` the failure is about.
492
+ Both are how `@istar-ts/actions`' dispatcher turns a rejected operation into the diagnostics an
493
+ `ActionResult` carries.
494
+
473
495
  ## Credits
474
496
 
475
497
  The metamodel, link constraints, element shapes, and file format are derived from