@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.
- package/dist/{chunk-ILX53OYM.js → chunk-WNSV4E7G.js} +12 -2
- package/dist/{chunk-ILX53OYM.js.map → chunk-WNSV4E7G.js.map} +1 -1
- package/dist/graph/index.d.ts +2 -2
- package/dist/graph/index.js +3 -1
- package/dist/graph/react/graph-core.css +13 -0
- package/dist/graph/react/index.d.ts +47 -13
- package/dist/graph/react/index.js +210 -103
- package/dist/graph/react/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -1
- package/dist/standalone/graph-standalone.html +136 -94
- package/dist/standalone/graph-viewer.css +94 -54
- package/dist/standalone/graph-viewer.js +9 -9
- package/dist/{types-DJTrDxjV.d.ts → types-uGRs3n4k.d.ts} +43 -4
- package/package.json +1 -1
package/dist/graph/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as ARROW_CLOSED_MARKER,
|
|
1
|
+
import { k as GraphSpecNode, n as PipeCallNode, c as GraphSpec, D as DataflowAnalysis, C as ConceptInfo, o as PipeBlueprintUnion, p as GraphData, q as PipeCardPayload, i as FoldToggleOptions, b as GraphNode, a as GraphEdge, e as GraphDirection, r as LayoutConfig, d as GraphConfig, g as GraphTheme } from '../types-uGRs3n4k.js';
|
|
2
|
+
export { A as ARROW_CLOSED_MARKER, s as CONTROLLER_PADDING_BOTTOM, t as CONTROLLER_PADDING_TOP, u as CONTROLLER_PADDING_X, E as EDGE_TYPE, v as EdgeType, w as FOLD_MODE, x as FieldResolution, F as FoldMode, y as GRAPH_DIRECTION, z as GRAPH_THEME, B as GRAPH_THEME_MODE, G as GraphNodeData, H as GraphSpecEdge, I as GraphSpecEdgeKind, J as GraphSpecNodeError, K as GraphSpecNodeIo, l as GraphSpecNodeIoItem, M as GraphSpecNodeTiming, f as GraphThemeMode, N as KNOWN_PIPE_TYPES, L as LabelDescriptor, O as NODE_TYPE_CONTROLLER, Q as NODE_TYPE_PIPE_CARD, R as NODE_TYPE_STUFF, S as NodeKind, T as PipeBatchBlueprint, U as PipeBlueprintBase, V as PipeComposeBlueprint, W as PipeComposeConstructBlueprint, X as PipeComposeConstructField, Y as PipeConditionBlueprint, h as PipeControllerType, Z as PipeExtractBlueprint, _ as PipeFuncBlueprint, $ as PipeImgGenBlueprint, a0 as PipeLLMBlueprint, m as PipeOperatorType, a1 as PipeParallelBlueprint, a2 as PipeSearchBlueprint, a3 as PipeSequenceBlueprint, a4 as PipeSignatureBlueprint, P as PipeStatus, j as PipeType, a5 as STUFF_ID_PREFIX, a6 as StuffRole, a7 as StuffSpecInfo, a8 as SubPipeSpec, a9 as TemplateBlueprint, aa as isStuffNodeId, ab as nodeHeight, ac as nodeWidth, ad as stuffDigestFromId, ae as stuffNodeId } from '../types-uGRs3n4k.js';
|
|
3
3
|
import { ElkNode } from 'elkjs/lib/elk-api';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/graph/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
FOLD_MODE,
|
|
11
11
|
GRAPH_DIRECTION,
|
|
12
12
|
GRAPH_THEME,
|
|
13
|
+
GRAPH_THEME_MODE,
|
|
13
14
|
GraphSpecValidationError,
|
|
14
15
|
KNOWN_PIPE_TYPES,
|
|
15
16
|
LIGHT_PALETTE_COLORS,
|
|
@@ -47,7 +48,7 @@ import {
|
|
|
47
48
|
stuffDigestFromId,
|
|
48
49
|
stuffNodeId,
|
|
49
50
|
validateGraphSpec
|
|
50
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-WNSV4E7G.js";
|
|
51
52
|
import "../chunk-2NMEKWO5.js";
|
|
52
53
|
export {
|
|
53
54
|
ARROW_CLOSED_MARKER,
|
|
@@ -60,6 +61,7 @@ export {
|
|
|
60
61
|
FOLD_MODE,
|
|
61
62
|
GRAPH_DIRECTION,
|
|
62
63
|
GRAPH_THEME,
|
|
64
|
+
GRAPH_THEME_MODE,
|
|
63
65
|
GraphSpecValidationError,
|
|
64
66
|
KNOWN_PIPE_TYPES,
|
|
65
67
|
LIGHT_PALETTE_COLORS,
|
|
@@ -384,6 +384,19 @@
|
|
|
384
384
|
.pipe-card--controller {
|
|
385
385
|
--pipe-card-accent: var(--text-muted);
|
|
386
386
|
}
|
|
387
|
+
|
|
388
|
+
/* Signature (unimplemented stub) — dashed + muted so it reads as "declared,
|
|
389
|
+
not built yet", distinct from operator (solid accent) and controller (tinted). */
|
|
390
|
+
.pipe-card--signature {
|
|
391
|
+
--pipe-card-accent: var(--text-muted);
|
|
392
|
+
border-left-style: dashed;
|
|
393
|
+
opacity: 0.85;
|
|
394
|
+
}
|
|
395
|
+
.pipe-card-badge--signature {
|
|
396
|
+
background: transparent;
|
|
397
|
+
color: var(--text-muted);
|
|
398
|
+
border: 1px dashed var(--text-muted);
|
|
399
|
+
}
|
|
387
400
|
@keyframes pipe-card-pulse {
|
|
388
401
|
0%,
|
|
389
402
|
100% {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { G as GraphNodeData, a as GraphEdge, b as GraphNode, c as GraphSpec, d as GraphConfig, e as GraphDirection, F as FoldMode, f as GraphTheme, P as PipeStatus, L as LabelDescriptor,
|
|
4
|
-
export {
|
|
3
|
+
import { G as GraphNodeData, a as GraphEdge, b as GraphNode, c as GraphSpec, d as GraphConfig, e as GraphDirection, F as FoldMode, f as GraphThemeMode, g as GraphTheme, P as PipeStatus, L as LabelDescriptor, h as PipeControllerType, i as FoldToggleOptions, j as PipeType, k as GraphSpecNode, C as ConceptInfo, l as GraphSpecNodeIoItem } from '../../types-uGRs3n4k.js';
|
|
4
|
+
export { m as PipeOperatorType } from '../../types-uGRs3n4k.js';
|
|
5
5
|
import { Edge, Node, ReactFlowInstance } from '@xyflow/react';
|
|
6
6
|
|
|
7
7
|
/** Data for rendering a stuff (data item) in the StuffViewer component. */
|
|
@@ -74,14 +74,24 @@ interface GraphViewerProps {
|
|
|
74
74
|
/** Hide the built-in floating toolbar (direction + controllers toggle). */
|
|
75
75
|
hideToolbar?: boolean;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
78
|
-
* clearing it back to `undefined` hands control back to
|
|
79
|
-
* the default). Users can also
|
|
80
|
-
* (unless `showThemeToggle` is `false`).
|
|
77
|
+
* Theme *mode*: `dark | light | system`. Reactive: passing it as a prop drives
|
|
78
|
+
* the active mode, and clearing it back to `undefined` hands control back to
|
|
79
|
+
* `config.theme` (or the default `system`). Users can also cycle it via the
|
|
80
|
+
* built-in toolbar button (unless `showThemeToggle` is `false`).
|
|
81
81
|
*
|
|
82
|
-
*
|
|
82
|
+
* `system` resolves to the environment theme — the browser's
|
|
83
|
+
* `prefers-color-scheme`, or `systemTheme` when injected.
|
|
84
|
+
*
|
|
85
|
+
* Defaults to `config.theme` or `"system"`.
|
|
86
|
+
*/
|
|
87
|
+
theme?: GraphThemeMode;
|
|
88
|
+
/**
|
|
89
|
+
* Host-injected environment theme, authoritative when set. Forwarded to the
|
|
90
|
+
* `system` resolver so non-browser hosts (e.g. VS Code webviews, where
|
|
91
|
+
* `prefers-color-scheme` is unreliable) can drive `system` from their own
|
|
92
|
+
* detection. When omitted, `system` follows the browser's `prefers-color-scheme`.
|
|
83
93
|
*/
|
|
84
|
-
|
|
94
|
+
systemTheme?: GraphTheme;
|
|
85
95
|
/**
|
|
86
96
|
* Whether to render the theme toggle button in the built-in toolbar.
|
|
87
97
|
* Defaults to `true`. Set to `false` to hide it (useful when the host app
|
|
@@ -89,11 +99,12 @@ interface GraphViewerProps {
|
|
|
89
99
|
*/
|
|
90
100
|
showThemeToggle?: boolean;
|
|
91
101
|
/**
|
|
92
|
-
* Called whenever the
|
|
93
|
-
*
|
|
94
|
-
*
|
|
102
|
+
* Called whenever the theme changes — from the built-in toggle, from external
|
|
103
|
+
* prop / config updates, or when `system` re-resolves because the environment
|
|
104
|
+
* changed. Receives both the selected `mode` (for persistence) and the
|
|
105
|
+
* `resolvedTheme` (for keeping page chrome outside the container in sync).
|
|
95
106
|
*/
|
|
96
|
-
onThemeChange?: (
|
|
107
|
+
onThemeChange?: (mode: GraphThemeMode, resolvedTheme: GraphTheme) => void;
|
|
97
108
|
onNavigateToPipe?: (pipeCode: string, status?: PipeStatus) => void;
|
|
98
109
|
onStuffNodeClick?: (stuffData: StuffViewerData) => void;
|
|
99
110
|
onReactFlowInit?: (instance: AppRFInstance) => void;
|
|
@@ -133,6 +144,29 @@ declare function renderLabel(desc: LabelDescriptor): React.ReactNode;
|
|
|
133
144
|
/** Convert label descriptors to React elements on all nodes */
|
|
134
145
|
declare function hydrateLabels(nodes: GraphNode[]): GraphNode[];
|
|
135
146
|
|
|
147
|
+
/**
|
|
148
|
+
* Read the environment's current color scheme once. SSR / no-`matchMedia` safe:
|
|
149
|
+
* defaults to `dark` when `window.matchMedia` is unavailable. Exported so
|
|
150
|
+
* non-React callers (e.g. the standalone adapter's initial body-palette paint,
|
|
151
|
+
* before any `onThemeChange` fires) can resolve `system` the same way the hook does.
|
|
152
|
+
*/
|
|
153
|
+
declare function detectSystemTheme(): GraphTheme;
|
|
154
|
+
/**
|
|
155
|
+
* Resolved environment theme.
|
|
156
|
+
*
|
|
157
|
+
* - `injected` set → return it (host owns detection; host re-renders drive
|
|
158
|
+
* updates). No live `matchMedia` subscription is registered.
|
|
159
|
+
* - otherwise → subscribe to `prefers-color-scheme` and re-render on `change`.
|
|
160
|
+
*
|
|
161
|
+
* Uses `useSyncExternalStore` so the subscription is concurrent-safe. The hook
|
|
162
|
+
* is always called (rules-of-hooks); only the `systemThemeStore` triple branches
|
|
163
|
+
* on `injected`, memoized so the `subscribe` reference stays stable across
|
|
164
|
+
* renders (no re-subscribe churn). SSR with no injected value falls back to
|
|
165
|
+
* `dark` via the server snapshot — see `docs/theming.md` → "SSR" for the
|
|
166
|
+
* consequence and the recommended `theme` / `systemTheme` pinning.
|
|
167
|
+
*/
|
|
168
|
+
declare function useSystemTheme(injected?: GraphTheme): GraphTheme;
|
|
169
|
+
|
|
136
170
|
interface ControllerGroupData {
|
|
137
171
|
label?: React.ReactNode;
|
|
138
172
|
pipeType?: PipeControllerType;
|
|
@@ -325,4 +359,4 @@ interface UseResizableResult {
|
|
|
325
359
|
}
|
|
326
360
|
declare function useResizable({ defaultWidth, minWidth, maxWidth, containerRef, }: UseResizableOptions): UseResizableResult;
|
|
327
361
|
|
|
328
|
-
export { type AppEdge, type AppNode, type AppRFInstance, ConceptDetailPanel, type ConceptDetailPanelProps, ControllerGroupNode, DetailPanel, type DetailPanelProps, GraphViewer, type GraphViewerProps, PipeCardBase, type PipeCardBaseProps, type PipeCardData, PipeCardNode, PipeDetailPanel, type PipeDetailPanelProps, PipeStatus, type ResolveStorageUrl, StuffViewer, type StuffViewerData, type StuffViewerProps, type UseResizableOptions, type UseResizableResult, applyStatusOverrides, controllerNodeTypes, extractFilename, extractInlineUrl, extractStorageUri, extractUrl, findStuffDataByDigest, getHtmlTabLabel, hydrateLabels, isInlineRenderableUrl, isSafeDisplayUrl, renderLabel, resolveMimeType, toAppEdges, toAppNodes, useResizable };
|
|
362
|
+
export { type AppEdge, type AppNode, type AppRFInstance, ConceptDetailPanel, type ConceptDetailPanelProps, ControllerGroupNode, DetailPanel, type DetailPanelProps, GraphViewer, type GraphViewerProps, PipeCardBase, type PipeCardBaseProps, type PipeCardData, PipeCardNode, PipeDetailPanel, type PipeDetailPanelProps, PipeStatus, type ResolveStorageUrl, StuffViewer, type StuffViewerData, type StuffViewerProps, type UseResizableOptions, type UseResizableResult, applyStatusOverrides, controllerNodeTypes, detectSystemTheme, extractFilename, extractInlineUrl, extractStorageUri, extractUrl, findStuffDataByDigest, getHtmlTabLabel, hydrateLabels, isInlineRenderableUrl, isSafeDisplayUrl, renderLabel, resolveMimeType, toAppEdges, toAppNodes, useResizable, useSystemTheme };
|