@pipelex/mthds-ui 0.59.0 → 0.60.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 (50) hide show
  1. package/dist/{chunk-S4UMMHLE.js → chunk-43NAVRQK.js} +17 -2
  2. package/dist/chunk-43NAVRQK.js.map +1 -0
  3. package/dist/{chunk-6KWNAU4F.js → chunk-BQZ3BPJM.js} +13 -1
  4. package/dist/chunk-BQZ3BPJM.js.map +1 -0
  5. package/dist/{chunk-XMTXWXFO.js → chunk-KKT6OVO6.js} +3 -3
  6. package/dist/{chunk-5N3MP5TD.js → chunk-PWKNMKFA.js} +106 -35
  7. package/dist/chunk-PWKNMKFA.js.map +1 -0
  8. package/dist/{chunk-ZRSFFUHA.js → chunk-S36KN6CG.js} +3 -3
  9. package/dist/chunk-UVEGKTBU.js +600 -0
  10. package/dist/chunk-UVEGKTBU.js.map +1 -0
  11. package/dist/{chunk-7QUQJW6Q.js → chunk-YQJNKQWO.js} +91 -285
  12. package/dist/chunk-YQJNKQWO.js.map +1 -0
  13. package/dist/form/react/index.d.ts +1 -1
  14. package/dist/form/react/index.js +2 -2
  15. package/dist/graph/index.d.ts +48 -21
  16. package/dist/graph/index.js +61 -21
  17. package/dist/graph/react/detail/DetailPanel.css +49 -0
  18. package/dist/graph/react/graph-core.css +20 -0
  19. package/dist/graph/react/index.d.ts +2 -2
  20. package/dist/graph/react/index.js +92 -29
  21. package/dist/graph/react/index.js.map +1 -1
  22. package/dist/graph/react/styles/simple/SimpleDetailPanel.css +20 -0
  23. package/dist/graph/react/styles/simple/SimpleStyle.css +13 -0
  24. package/dist/index.d.ts +3 -2
  25. package/dist/index.js +61 -21
  26. package/dist/methodWords-DIEg1PVT.d.ts +180 -0
  27. package/dist/{registryJoin-CMfBspIs.d.ts → registryJoin-Cj1mIkqe.d.ts} +18 -10
  28. package/dist/standalone/graph-standalone.html +232 -130
  29. package/dist/standalone/graph-viewer.css +102 -0
  30. package/dist/standalone/graph-viewer.js +130 -130
  31. package/dist/static-graph/index.d.ts +1 -1
  32. package/dist/static-graph/index.js +57 -14
  33. package/dist/static-graph/index.js.map +1 -1
  34. package/dist/timeline/index.d.ts +42 -7
  35. package/dist/timeline/index.js +8 -3
  36. package/dist/timeline/react/RunTimeline.css +18 -0
  37. package/dist/timeline/react/index.d.ts +3 -2
  38. package/dist/timeline/react/index.js +20 -11
  39. package/dist/timeline/react/index.js.map +1 -1
  40. package/dist/timeline/react/styles/simple/SimpleProgress.css +25 -0
  41. package/dist/{types-CnDJyLYo.d.ts → types-BygAt1Si.d.ts} +51 -1
  42. package/package.json +2 -2
  43. package/dist/chunk-5N3MP5TD.js.map +0 -1
  44. package/dist/chunk-6KWNAU4F.js.map +0 -1
  45. package/dist/chunk-7QUQJW6Q.js.map +0 -1
  46. package/dist/chunk-P6IGZVWE.js +0 -155
  47. package/dist/chunk-P6IGZVWE.js.map +0 -1
  48. package/dist/chunk-S4UMMHLE.js.map +0 -1
  49. /package/dist/{chunk-XMTXWXFO.js.map → chunk-KKT6OVO6.js.map} +0 -0
  50. /package/dist/{chunk-ZRSFFUHA.js.map → chunk-S36KN6CG.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { C as ConceptInfo, P as PipeBlueprintUnion, c as PresenceMarker, d as GraphSpec, V as ValidationIssue } from '../types-CnDJyLYo.js';
1
+ import { C as ConceptInfo, P as PipeBlueprintUnion, e as PresenceMarker, f as GraphSpec, V as ValidationIssue } from '../types-BygAt1Si.js';
2
2
  export { P as ParsedPipeRef, m as makePipeRef, p as parsePipeRef } from '../pipeRefs-BQJO5nh5.js';
3
3
  import 'mthds/errors';
4
4
 
@@ -7,7 +7,7 @@ import {
7
7
  KNOWN_PIPE_TYPES,
8
8
  isBindingStepSpec,
9
9
  isPluralMultiplicity
10
- } from "../chunk-6KWNAU4F.js";
10
+ } from "../chunk-BQZ3BPJM.js";
11
11
  import {
12
12
  __spreadProps,
13
13
  __spreadValues
@@ -165,7 +165,22 @@ function parseConceptRef(raw) {
165
165
  presence: presenceFromSymbol(presence)
166
166
  };
167
167
  }
168
- var INPUT_SLOT_KEYS = /* @__PURE__ */ new Set(["concept", "hints"]);
168
+ var INPUT_SLOT_KEYS = /* @__PURE__ */ new Set([
169
+ "concept",
170
+ "hints",
171
+ "description",
172
+ "choices",
173
+ "minimum",
174
+ "maximum",
175
+ "exclusive_minimum",
176
+ "exclusive_maximum",
177
+ "min_length",
178
+ "max_length",
179
+ "pattern",
180
+ "format",
181
+ "unit",
182
+ "examples"
183
+ ]);
169
184
  var CONCEPT_CODE_RE = /^[A-Z][A-Za-z0-9]*$/;
170
185
  function isConceptCodeRef(raw) {
171
186
  const parts = parseConceptRef(raw);
@@ -176,6 +191,7 @@ function unquotedDottedInputNames(name, raw) {
176
191
  const keys = Object.keys(raw);
177
192
  if (keys.length === 0) return null;
178
193
  const dottedNames = [];
194
+ if (keys.some((key) => INPUT_SLOT_KEYS.has(key))) return null;
179
195
  for (const key of keys) {
180
196
  const value = raw[key];
181
197
  const dottedName = `${name}.${key}`;
@@ -710,18 +726,31 @@ function resolvePipeTypeTag(code, raw, ctx) {
710
726
  });
711
727
  return null;
712
728
  }
729
+ function readOutcome(value) {
730
+ if (typeof value === "string") return value.length > 0 ? { pipe: value, words: null } : null;
731
+ if (!isPlainObject(value)) return null;
732
+ const pipe = strOrNull(value.pipe);
733
+ if (!pipe) return null;
734
+ const words = {};
735
+ for (const key of ["label", "description", "tone"]) {
736
+ const word = strOrNull(value[key]);
737
+ if (word) words[key] = word;
738
+ }
739
+ return { pipe, words: Object.keys(words).length > 0 ? words : null };
740
+ }
713
741
  function normalizePipe(code, raw, ctx) {
714
742
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
715
743
  const typeValue = resolvePipeTypeTag(code, raw, ctx);
716
744
  if (typeValue === null) return null;
717
745
  const type = typeValue;
718
- const base = {
746
+ const base = __spreadProps(__spreadValues({
719
747
  code,
720
748
  domain_code: ctx.domain,
721
- description: (_a = strOrNull(raw.description)) != null ? _a : "",
749
+ description: (_a = strOrNull(raw.description)) != null ? _a : ""
750
+ }, strOrNull(raw.activity) ? { activity: strOrNull(raw.activity) } : {}), {
722
751
  inputs: normalizeInputs(raw.inputs, code, ctx),
723
752
  output: normalizeOutput(raw.output, code, ctx)
724
- };
753
+ });
725
754
  switch (type) {
726
755
  case "PipeSequence":
727
756
  return __spreadProps(__spreadValues({}, base), {
@@ -744,10 +773,13 @@ function normalizePipe(code, raw, ctx) {
744
773
  });
745
774
  case "PipeCondition": {
746
775
  const outcomeMap = {};
776
+ const outcomeWords = {};
747
777
  if (isPlainObject(raw.outcomes)) {
748
- for (const [outcome, pipeRef] of Object.entries(raw.outcomes)) {
749
- if (typeof pipeRef === "string" && pipeRef.length > 0) {
750
- outcomeMap[outcome] = pipeRef;
778
+ for (const [outcome, value] of Object.entries(raw.outcomes)) {
779
+ const read = readOutcome(value);
780
+ if (read) {
781
+ outcomeMap[outcome] = read.pipe;
782
+ if (read.words) outcomeWords[outcome] = read.words;
751
783
  } else {
752
784
  ctx.diagnostics.push({
753
785
  severity: "warning",
@@ -758,12 +790,14 @@ function normalizePipe(code, raw, ctx) {
758
790
  }
759
791
  }
760
792
  }
761
- return __spreadProps(__spreadValues({}, base), {
793
+ const defaultOutcome = readOutcome(raw.default_outcome);
794
+ return __spreadProps(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, base), {
762
795
  type,
763
796
  pipe_category: "PipeController",
764
797
  expression: (_c = (_b = strOrNull(raw.expression)) != null ? _b : strOrNull(raw.expression_template)) != null ? _c : "",
765
798
  outcome_map: outcomeMap,
766
- default_outcome: (_d = strOrNull(raw.default_outcome)) != null ? _d : "",
799
+ default_outcome: (_d = defaultOutcome == null ? void 0 : defaultOutcome.pipe) != null ? _d : ""
800
+ }), Object.keys(outcomeWords).length > 0 ? { outcome_words: outcomeWords } : {}), (defaultOutcome == null ? void 0 : defaultOutcome.words) ? { default_outcome_words: defaultOutcome.words } : {}), {
767
801
  add_alias_from_expression_to: strOrNull(raw.add_alias_from_expression_to)
768
802
  });
769
803
  }
@@ -969,7 +1003,13 @@ function fieldSchema(spec) {
969
1003
  schema.items = itemType !== null ? __spreadValues({}, (_c = FIELD_TYPE_TO_JSON[itemType]) != null ? _c : {}) : {};
970
1004
  }
971
1005
  if (Array.isArray(spec.choices)) {
972
- schema.enum = spec.choices.filter((choice) => typeof choice === "string");
1006
+ schema.enum = spec.choices.flatMap((choice) => {
1007
+ if (typeof choice === "string") return [choice];
1008
+ if (typeof choice === "object" && choice !== null && typeof choice.value === "string") {
1009
+ return [choice.value];
1010
+ }
1011
+ return [];
1012
+ });
973
1013
  }
974
1014
  if (spec.default_value !== void 0 && spec.default_value !== null) {
975
1015
  schema.default = spec.default_value;
@@ -1669,17 +1709,18 @@ function bindInputs(ctx, blueprint, scope) {
1669
1709
  return ioInputs;
1670
1710
  }
1671
1711
  function emitNode(ctx, args) {
1672
- const node = {
1712
+ const node = __spreadProps(__spreadValues({
1673
1713
  id: args.id,
1674
1714
  kind: args.kind,
1675
1715
  pipe_code: args.pipeCode,
1676
1716
  pipe_type: args.pipeType,
1677
1717
  // validateGraphSpec requires a non-empty description; WIP pipes may lack one.
1678
- description: args.description.length > 0 ? args.description : args.pipeCode,
1718
+ description: args.description.length > 0 ? args.description : args.pipeCode
1719
+ }, args.activity ? { activity: args.activity } : {}), {
1679
1720
  domain_code: args.domainCode,
1680
1721
  status: "scheduled",
1681
1722
  io: { inputs: args.ioInputs, outputs: [] }
1682
- };
1723
+ });
1683
1724
  if (args.inv.outcomeValue !== void 0) node.tags = { outcome: args.inv.outcomeValue };
1684
1725
  ctx.nodes.push(node);
1685
1726
  if (args.parentId !== null) {
@@ -1719,6 +1760,7 @@ function walkPipe(ctx, ref, currentDomain, nodeId, parentId, scope, inv) {
1719
1760
  pipeCode: code,
1720
1761
  pipeType: blueprint.type,
1721
1762
  description: blueprint.description,
1763
+ activity: blueprint.activity,
1722
1764
  domainCode: blueprint.domain_code,
1723
1765
  ioInputs,
1724
1766
  parentId,
@@ -2115,6 +2157,7 @@ function walkInlineBatch(ctx, sub, domain, nodeId, parentId, scope) {
2115
2157
  pipeCode: code,
2116
2158
  pipeType: "PipeBatch",
2117
2159
  description: blueprint.description,
2160
+ activity: blueprint.activity,
2118
2161
  domainCode: domain,
2119
2162
  ioInputs,
2120
2163
  parentId,