@pipelex/mthds-ui 0.44.0 → 0.46.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-ENRYQOCO.js → chunk-CZGIDVT7.js} +2 -2
- package/dist/{chunk-7JZBXBZS.js → chunk-DNYJEPHT.js} +3 -3
- package/dist/{chunk-6S5TQPTO.js → chunk-DUBNSW66.js} +2 -2
- package/dist/{chunk-5E3UJI2I.js → chunk-SCKRIESM.js} +411 -29
- package/dist/chunk-SCKRIESM.js.map +1 -0
- package/dist/{chunk-N2F62MW7.js → chunk-UAYO53EO.js} +5 -5
- package/dist/chunk-UAYO53EO.js.map +1 -0
- package/dist/{chunk-4KLE62AN.js → chunk-X7GHQ3SD.js} +1 -1
- package/dist/{chunk-4KLE62AN.js.map → chunk-X7GHQ3SD.js.map} +1 -1
- package/dist/form/react/index.d.ts +17 -11
- package/dist/form/react/index.js +2 -2
- package/dist/form/react/index.js.map +1 -1
- package/dist/graph/index.d.ts +226 -4
- package/dist/graph/index.js +8 -4
- package/dist/graph/react/index.d.ts +2 -2
- package/dist/graph/react/index.js +1679 -985
- package/dist/graph/react/index.js.map +1 -1
- package/dist/graph/react/styles/simple/SimpleDetailPanel.css +492 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -4
- package/dist/{registryJoin-C6Wfkik-.d.ts → registryJoin-C7paykZ2.d.ts} +1 -1
- package/dist/standalone/graph-standalone.html +620 -127
- package/dist/standalone/graph-viewer.css +493 -0
- package/dist/standalone/graph-viewer.js +127 -127
- package/dist/static-graph/index.d.ts +1 -1
- package/dist/static-graph/index.js +1 -1
- package/dist/timeline/index.d.ts +3 -3
- package/dist/timeline/index.js +2 -2
- package/dist/timeline/react/index.d.ts +2 -2
- package/dist/timeline/react/index.js +5 -5
- package/dist/{types-DLAnYNoi.d.ts → types-DgYaVX6K.d.ts} +8 -0
- package/package.json +3 -2
- package/dist/chunk-5E3UJI2I.js.map +0 -1
- package/dist/chunk-N2F62MW7.js.map +0 -1
- /package/dist/{chunk-ENRYQOCO.js.map → chunk-CZGIDVT7.js.map} +0 -0
- /package/dist/{chunk-7JZBXBZS.js.map → chunk-DNYJEPHT.js.map} +0 -0
- /package/dist/{chunk-6S5TQPTO.js.map → chunk-DUBNSW66.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graph/styles/graphStyles.ts"],"sourcesContent":["import type { GraphStyleId, LayoutConfig } from \"@graph/types\";\nimport { GRAPH_STYLE } from \"@graph/types\";\nimport { DEFAULT_GRAPH_CONFIG } from \"@graph/graphConfig\";\n\n// ─── The style registry ─────────────────────────────────────────────────────\n// A closed, typed table: adding a style is a new `GRAPH_STYLE` id, after which\n// the compiler names every table keyed by `GraphStyleId` that needs a row — the\n// descriptor below, the drawing pipeline (`stylePipelines.ts`), the node\n// components and the menu icon in the React layer.\n\n/** Which of the toolbar's controls make sense for a style. */\nexport interface GraphStyleCapabilities {\n /**\n * The toolbar's show/hide controllers toggle applies: the style draws\n * controller frames on demand. A style that decides its own frames hides it.\n */\n controllerFrameToggle: boolean;\n /**\n * Fold-all and expand-all apply. In a style that also has the frame toggle\n * they apply only while the frames are shown, since a fold is undone from a\n * frame.\n */\n foldAll: boolean;\n}\n\n/** What the registry says of one style: what it is called, what it is for, and what it supports. */\nexport interface GraphStyleDescriptor {\n id: GraphStyleId;\n /** The style's name in the toolbar menu. */\n name: string;\n /** One line saying what the style shows, under its name in the menu. */\n description: string;\n capabilities: GraphStyleCapabilities;\n /**\n * How the style lays out: its spacing, which replaces `config.nodesep` and\n * `config.ranksep` for it, the room its frames keep around their steps, and\n * whether its edges follow routes around the nodes in their way. A style\n * that leaves it undefined keeps the host's spacing and the controller\n * groups' padding, and draws free curves of the host's `edgeType`.\n */\n layout?: Required<LayoutConfig>;\n}\n\nexport const GRAPH_STYLES: Record<GraphStyleId, GraphStyleDescriptor> = {\n [GRAPH_STYLE.DETAILED]: {\n id: GRAPH_STYLE.DETAILED,\n name: \"Detailed\",\n description: \"Every pipe with its inputs, outputs and settings\",\n capabilities: { controllerFrameToggle: true, foldAll: true },\n },\n [GRAPH_STYLE.SIMPLE]: {\n id: GRAPH_STYLE.SIMPLE,\n name: \"Simple\",\n description: \"The method's steps in plain words\",\n capabilities: { controllerFrameToggle: false, foldAll: true },\n layout: {\n nodesep: 28,\n ranksep: 44,\n routeEdges: true,\n groupPadding: { x: 20, top: 40, bottom: 16 },\n },\n },\n};\n\n/** Every registered style, in the order the menu lists them. */\nexport const GRAPH_STYLE_IDS: readonly GraphStyleId[] = [GRAPH_STYLE.DETAILED, GRAPH_STYLE.SIMPLE];\n\n/**\n * Whether a value names a registered style. For values that cross an untyped\n * boundary — an editor setting, the standalone page's config embed, a host\n * written in plain JavaScript — before they reach the viewer.\n */\nexport function isGraphStyleId(value: unknown): value is GraphStyleId {\n return typeof value === \"string\" && Object.hasOwn(GRAPH_STYLES, value);\n}\n\n/**\n * Resolve the active style from `(graphStyle prop, config.graphStyle, default)`.\n * Pure + exported so the controlled/reactive precedence is unit-testable\n * without React, under the same contract `resolveExternalThemeMode` holds:\n * - the prop wins when it names a style,\n * - falls back to `config.graphStyle` when the prop is undefined (so a host can\n * hand control back to config after passing the prop),\n * - falls back to the library default (`detailed`) when neither is set.\n *\n * A value naming no registered style is treated as unset rather than thrown\n * on: a style is a preference, and a host relaying a setting written for a\n * newer version of this package should still get a graph.\n */\nexport function resolveGraphStyle(styleProp: unknown, configStyle: unknown): GraphStyleId {\n if (isGraphStyleId(styleProp)) return styleProp;\n if (isGraphStyleId(configStyle)) return configStyle;\n return DEFAULT_GRAPH_CONFIG.graphStyle;\n}\n\n/**\n * The styles the toolbar menu offers, from the viewer's `styleMenu` prop:\n * nothing for `false` or `undefined` (the menu is opt-in), every registered\n * style in registry order for `true`, and for a list the registered styles it\n * names, in its order and without repeats. A menu needs two styles to choose\n * between, so fewer than two offer none.\n */\nexport function resolveStyleMenu(\n styleMenu: boolean | readonly GraphStyleId[] | undefined,\n): GraphStyleId[] {\n if (styleMenu === undefined || styleMenu === false) return [];\n const requested: readonly unknown[] = styleMenu === true ? GRAPH_STYLE_IDS : styleMenu;\n const offered: GraphStyleId[] = [];\n for (const id of requested) {\n if (isGraphStyleId(id) && !offered.includes(id)) offered.push(id);\n }\n return offered.length >= 2 ? offered : [];\n}\n"],"mappings":";;;;;;;;AA2CO,IAAM,eAA2D;AAAA,EACtE,CAAC,YAAY,QAAQ,GAAG;AAAA,IACtB,IAAI,YAAY;AAAA,IAChB,MAAM;AAAA,IACN,aAAa;AAAA,IACb,cAAc,EAAE,uBAAuB,MAAM,SAAS,KAAK;AAAA,EAC7D;AAAA,EACA,CAAC,YAAY,MAAM,GAAG;AAAA,IACpB,IAAI,YAAY;AAAA,IAChB,MAAM;AAAA,IACN,aAAa;AAAA,IACb,cAAc,EAAE,uBAAuB,OAAO,SAAS,KAAK;AAAA,IAC5D,QAAQ;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,cAAc,EAAE,GAAG,IAAI,KAAK,IAAI,QAAQ,GAAG;AAAA,IAC7C;AAAA,EACF;AACF;AAGO,IAAM,kBAA2C,CAAC,YAAY,UAAU,YAAY,MAAM;AAO1F,SAAS,eAAe,OAAuC;AACpE,SAAO,OAAO,UAAU,YAAY,OAAO,OAAO,cAAc,KAAK;AACvE;AAeO,SAAS,kBAAkB,WAAoB,aAAoC;AACxF,MAAI,eAAe,SAAS,EAAG,QAAO;AACtC,MAAI,eAAe,WAAW,EAAG,QAAO;AACxC,SAAO,qBAAqB;AAC9B;AASO,SAAS,iBACd,WACgB;AAChB,MAAI,cAAc,UAAa,cAAc,MAAO,QAAO,CAAC;AAC5D,QAAM,YAAgC,cAAc,OAAO,kBAAkB;AAC7E,QAAM,UAA0B,CAAC;AACjC,aAAW,MAAM,WAAW;AAC1B,QAAI,eAAe,EAAE,KAAK,CAAC,QAAQ,SAAS,EAAE,EAAG,SAAQ,KAAK,EAAE;AAAA,EAClE;AACA,SAAO,QAAQ,UAAU,IAAI,UAAU,CAAC;AAC1C;","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|