@pipelex/mthds-ui 0.7.0 → 0.9.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.
@@ -1,4 +1,4 @@
1
- type PipeOperatorType = "PipeLLM" | "PipeExtract" | "PipeCompose" | "PipeImgGen" | "PipeSearch" | "PipeFunc";
1
+ type PipeOperatorType = "PipeLLM" | "PipeExtract" | "PipeCompose" | "PipeImgGen" | "PipeSearch" | "PipeFunc" | "PipeSignature";
2
2
  type PipeControllerType = "PipeSequence" | "PipeParallel" | "PipeCondition" | "PipeBatch";
3
3
  type PipeType = PipeOperatorType | PipeControllerType;
4
4
  /** Every pipe class name pipelex emits as `pipe_type`. Used by validateGraphSpec. */
@@ -221,6 +221,22 @@ interface PipeSearchBlueprint extends PipeBlueprintBase {
221
221
  interface PipeFuncBlueprint extends PipeBlueprintBase {
222
222
  type: "PipeFunc";
223
223
  }
224
+ /**
225
+ * A contract-only pipe: declares inputs + output but has no implementation.
226
+ * Emitted under `--allow-signatures` so an in-progress bundle still validates
227
+ * (dry-run mocks the declared output) before every referenced pipe is built.
228
+ */
229
+ interface PipeSignatureBlueprint extends Omit<PipeBlueprintBase, "pipe_category"> {
230
+ type: "PipeSignature";
231
+ /**
232
+ * Signatures sit outside the executable taxonomy, so pipelex serializes
233
+ * `pipe_category: null` (present, not omitted) — unlike operator/controller
234
+ * blueprints which carry "PipeOperator" / "PipeController".
235
+ */
236
+ pipe_category: null;
237
+ /** Intended downstream pipe type once implemented — an optional hint. */
238
+ signature_for?: PipeType | null;
239
+ }
224
240
  interface PipeSequenceBlueprint extends PipeBlueprintBase {
225
241
  type: "PipeSequence";
226
242
  sequential_sub_pipes: SubPipeSpec[];
@@ -246,7 +262,7 @@ interface PipeBatchBlueprint extends PipeBlueprintBase {
246
262
  input_item_stuff_name: string;
247
263
  };
248
264
  }
249
- type PipeBlueprintUnion = PipeLLMBlueprint | PipeImgGenBlueprint | PipeComposeBlueprint | PipeExtractBlueprint | PipeSearchBlueprint | PipeFuncBlueprint | PipeSequenceBlueprint | PipeParallelBlueprint | PipeConditionBlueprint | PipeBatchBlueprint;
265
+ type PipeBlueprintUnion = PipeLLMBlueprint | PipeImgGenBlueprint | PipeComposeBlueprint | PipeExtractBlueprint | PipeSearchBlueprint | PipeFuncBlueprint | PipeSignatureBlueprint | PipeSequenceBlueprint | PipeParallelBlueprint | PipeConditionBlueprint | PipeBatchBlueprint;
250
266
  interface GraphSpec {
251
267
  graph_id?: string;
252
268
  created_at?: string;
@@ -297,16 +313,39 @@ declare const FOLD_MODE: {
297
313
  readonly AUTO: "auto";
298
314
  };
299
315
  type FoldMode = (typeof FOLD_MODE)[keyof typeof FOLD_MODE];
316
+ /**
317
+ * The *resolved* binary theme — the value that actually drives the palette and
318
+ * the container class. `getPaletteForTheme` takes this. `system` is never a
319
+ * resolved theme; it resolves to one of these via the environment.
320
+ */
300
321
  declare const GRAPH_THEME: {
301
322
  readonly DARK: "dark";
302
323
  readonly LIGHT: "light";
303
324
  };
304
325
  type GraphTheme = (typeof GRAPH_THEME)[keyof typeof GRAPH_THEME];
326
+ /**
327
+ * The user's theme *selection* — what the toolbar cycles, what gets persisted
328
+ * and reported. `system` follows the host environment (browser `prefers-color-scheme`
329
+ * or an injected `systemTheme`) and resolves to a binary `GraphTheme` at render
330
+ * time. The `dark`/`light` overlap with `GraphTheme` is intentional: a resolved
331
+ * theme is also a valid mode.
332
+ */
333
+ declare const GRAPH_THEME_MODE: {
334
+ readonly DARK: "dark";
335
+ readonly LIGHT: "light";
336
+ readonly SYSTEM: "system";
337
+ };
338
+ type GraphThemeMode = (typeof GRAPH_THEME_MODE)[keyof typeof GRAPH_THEME_MODE];
305
339
  interface GraphConfig {
306
340
  direction?: GraphDirection;
307
341
  showControllers?: boolean;
308
342
  foldMode?: FoldMode;
309
- theme?: GraphTheme;
343
+ /**
344
+ * Theme *mode*: `dark | light | system`. `system` follows the host environment.
345
+ * Defaults to `system` (see `DEFAULT_GRAPH_CONFIG`). Pass `dark`/`light` to pin
346
+ * a fixed appearance.
347
+ */
348
+ theme?: GraphThemeMode;
310
349
  nodesep?: number;
311
350
  ranksep?: number;
312
351
  edgeType?: EdgeType;
@@ -415,4 +454,4 @@ declare const ARROW_CLOSED_MARKER = "arrowclosed";
415
454
  declare function nodeWidth(n: GraphNode): number;
416
455
  declare function nodeHeight(n: GraphNode): number;
417
456
 
418
- export { type PipeParallelBlueprint as $, ARROW_CLOSED_MARKER as A, type GraphSpecEdgeKind as B, type ConceptInfo as C, type DataflowAnalysis as D, EDGE_TYPE as E, type FoldMode as F, type GraphNodeData as G, type GraphSpecNodeError as H, type GraphSpecNodeIo as I, type GraphSpecNodeTiming as J, KNOWN_PIPE_TYPES as K, type LabelDescriptor as L, NODE_TYPE_PIPE_CARD as M, NODE_TYPE_CONTROLLER as N, NODE_TYPE_STUFF as O, type PipeStatus as P, type NodeKind as Q, type PipeBatchBlueprint as R, type PipeBlueprintBase as S, type PipeComposeBlueprint as T, type PipeComposeConstructBlueprint as U, type PipeComposeConstructField as V, type PipeConditionBlueprint as W, type PipeExtractBlueprint as X, type PipeFuncBlueprint as Y, type PipeImgGenBlueprint as Z, type PipeLLMBlueprint as _, type GraphEdge as a, type PipeSearchBlueprint as a0, type PipeSequenceBlueprint as a1, STUFF_ID_PREFIX as a2, type StuffRole as a3, type StuffSpecInfo as a4, type SubPipeSpec as a5, type TemplateBlueprint as a6, isStuffNodeId as a7, nodeHeight as a8, nodeWidth as a9, stuffDigestFromId as aa, stuffNodeId as ab, type GraphNode as b, type GraphSpec as c, type GraphConfig as d, type GraphDirection as e, type GraphTheme as f, type PipeControllerType as g, type FoldToggleOptions as h, type PipeType as i, type GraphSpecNode as j, type GraphSpecNodeIoItem as k, type PipeOperatorType as l, type PipeCallNode as m, type PipeBlueprintUnion as n, type GraphData as o, type PipeCardPayload as p, type LayoutConfig as q, CONTROLLER_PADDING_BOTTOM as r, CONTROLLER_PADDING_TOP as s, CONTROLLER_PADDING_X as t, type EdgeType as u, FOLD_MODE as v, type FieldResolution as w, GRAPH_DIRECTION as x, GRAPH_THEME as y, type GraphSpecEdge as z };
457
+ export { type PipeImgGenBlueprint as $, ARROW_CLOSED_MARKER as A, GRAPH_THEME_MODE as B, type ConceptInfo as C, type DataflowAnalysis as D, EDGE_TYPE as E, type FoldMode as F, type GraphNodeData as G, type GraphSpecEdge as H, type GraphSpecEdgeKind as I, type GraphSpecNodeError as J, type GraphSpecNodeIo as K, type LabelDescriptor as L, type GraphSpecNodeTiming as M, KNOWN_PIPE_TYPES as N, NODE_TYPE_CONTROLLER as O, type PipeStatus as P, NODE_TYPE_PIPE_CARD as Q, NODE_TYPE_STUFF as R, type NodeKind as S, type PipeBatchBlueprint as T, type PipeBlueprintBase as U, type PipeComposeBlueprint as V, type PipeComposeConstructBlueprint as W, type PipeComposeConstructField as X, type PipeConditionBlueprint as Y, type PipeExtractBlueprint as Z, type PipeFuncBlueprint as _, type GraphEdge as a, type PipeLLMBlueprint as a0, type PipeParallelBlueprint as a1, type PipeSearchBlueprint as a2, type PipeSequenceBlueprint as a3, type PipeSignatureBlueprint as a4, STUFF_ID_PREFIX as a5, type StuffRole as a6, type StuffSpecInfo as a7, type SubPipeSpec as a8, type TemplateBlueprint as a9, isStuffNodeId as aa, nodeHeight as ab, nodeWidth as ac, stuffDigestFromId as ad, stuffNodeId as ae, type GraphNode as b, type GraphSpec as c, type GraphConfig as d, type GraphDirection as e, type GraphThemeMode as f, type GraphTheme as g, type PipeControllerType as h, type FoldToggleOptions as i, type PipeType as j, type GraphSpecNode as k, type GraphSpecNodeIoItem as l, type PipeOperatorType as m, type PipeCallNode as n, type PipeBlueprintUnion as o, type GraphData as p, type PipeCardPayload as q, type LayoutConfig as r, CONTROLLER_PADDING_BOTTOM as s, CONTROLLER_PADDING_TOP as t, CONTROLLER_PADDING_X as u, type EdgeType as v, FOLD_MODE as w, type FieldResolution as x, GRAPH_DIRECTION as y, GRAPH_THEME as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipelex/mthds-ui",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Shared graph rendering logic for MTHDS method visualization",
5
5
  "license": "MIT",
6
6
  "repository": {