@pipelex/mthds-ui 0.23.0 → 0.25.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/README.md +42 -11
- package/dist/{chunk-RJVEDP7M.js → chunk-F3GBNU2I.js} +3 -2
- package/dist/{chunk-RJVEDP7M.js.map → chunk-F3GBNU2I.js.map} +1 -1
- package/dist/{chunk-FD4PKRGZ.js → chunk-LMGMRLIK.js} +2 -2
- package/dist/{chunk-HASMGCVK.js → chunk-MQ33HVWG.js} +2 -2
- package/dist/form/react/RunPanel.css +5 -4
- package/dist/form/react/index.d.ts +1 -1
- package/dist/form/react/index.js +2 -3
- package/dist/form/react/index.js.map +1 -1
- package/dist/graph/index.d.ts +2 -2
- package/dist/graph/index.js +3 -3
- package/dist/graph/react/index.css +2 -1
- package/dist/graph/react/index.css.map +1 -1
- package/dist/graph/react/index.d.ts +11 -14
- package/dist/graph/react/index.js +27 -4
- package/dist/graph/react/index.js.map +1 -1
- package/dist/graph/react/viewer/GraphToolbar.css +5 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/standalone/graph-standalone.html +146 -85
- package/dist/standalone/graph-viewer.css +6 -2
- package/dist/standalone/graph-viewer.js +140 -83
- package/dist/static-graph/index.d.ts +111 -3
- package/dist/static-graph/index.js +154 -17
- package/dist/static-graph/index.js.map +1 -1
- package/dist/styles/form-kernel.css +38 -34
- package/dist/styles/tailwind.css +51 -0
- package/dist/{types-Cn2FttBC.d.ts → types-Bcsh7Z0U.d.ts} +4 -0
- package/package.json +7 -5
- /package/dist/{chunk-FD4PKRGZ.js.map → chunk-LMGMRLIK.js.map} +0 -0
- /package/dist/{chunk-HASMGCVK.js.map → chunk-MQ33HVWG.js.map} +0 -0
|
@@ -1,37 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The form kernel's
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* classes
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
2
|
+
* The form kernel's prebuilt stylesheet, for a host WITHOUT Tailwind.
|
|
3
|
+
*
|
|
4
|
+
* Such a host imports it once, from its own entry:
|
|
5
|
+
*
|
|
6
|
+
* import "@pipelex/mthds-ui/form-kernel.css";
|
|
7
|
+
*
|
|
8
|
+
* No JavaScript in this package imports it. From v0.20.0 through v0.24.0 both
|
|
9
|
+
* React entries injected it into every host, and no single position in the
|
|
10
|
+
* cascade served a host that has Tailwind of its own; the block comments in
|
|
11
|
+
* `../graph/react/index.ts` and `../form/react/index.ts` say why.
|
|
12
|
+
*
|
|
13
|
+
* WHAT A HOST GETS WITH IT
|
|
14
|
+
*
|
|
15
|
+
* `@pipelex/mthds-form/styles.css` is a COMPLETE Tailwind build: every utility
|
|
16
|
+
* the kernel's controls use, unprefixed and unscoped, and Tailwind's preflight.
|
|
17
|
+
* The preflight is what lets the controls render with no framework underneath,
|
|
18
|
+
* and it applies to the whole page, not only to the controls: it resets every
|
|
19
|
+
* browser default the host does not restate itself, so headings drop to body
|
|
20
|
+
* size, lists lose their markers, and paragraphs and the body lose their
|
|
21
|
+
* margins. A dedicated panel such as a webview expects that; a page of ordinary
|
|
22
|
+
* content that embeds a graph restates the defaults it wants to keep.
|
|
23
|
+
*
|
|
24
|
+
* WHY THE LAYER
|
|
25
|
+
*
|
|
26
|
+
* Layered rules lose to unlayered rules whatever the source order, so the
|
|
27
|
+
* host's own rules win every tie against the kernel's utilities and preflight,
|
|
28
|
+
* even though this sheet may load after the host's. In a host without Tailwind
|
|
29
|
+
* that is the whole question, which is why the layer stays.
|
|
30
|
+
*
|
|
31
|
+
* A HOST WITH TAILWIND 4 MUST NOT IMPORT THIS FILE. It compiles the kernel's
|
|
32
|
+
* classes itself, through `@pipelex/mthds-ui/tailwind.css` (`./tailwind.css`
|
|
33
|
+
* beside this file), and this sheet would put a second preflight in its page,
|
|
34
|
+
* ranked wherever the host's layers leave it.
|
|
35
|
+
*
|
|
36
|
+
* `theme.css` stays out: it defines the semantic tokens (`--background`,
|
|
37
|
+
* `--border`, …) that belong to the host. Since kernel `0.9.0` every utility in
|
|
38
|
+
* the kernel's sheet reads its token with a fallback, so a host that defines no
|
|
39
|
+
* tokens renders the kernel's light neutral palette.
|
|
36
40
|
*/
|
|
37
41
|
@import "@pipelex/mthds-form/styles.css" layer(mthds-form);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the form kernel's classes are, for a host with Tailwind 4.
|
|
3
|
+
*
|
|
4
|
+
* The kernel's controls are styled with Tailwind utilities that live in its
|
|
5
|
+
* shipped JavaScript, not in the host's source tree, so a host's build has to be
|
|
6
|
+
* told to scan it. The kernel's documented Tailwind 4 setup (its
|
|
7
|
+
* `docs/theming.md`, "A host that runs Tailwind") does that with an `@source`
|
|
8
|
+
* line naming a path into `node_modules`. This file replaces THAT LINE and
|
|
9
|
+
* nothing else: a host writes
|
|
10
|
+
*
|
|
11
|
+
* @import "@pipelex/mthds-ui/tailwind.css";
|
|
12
|
+
*
|
|
13
|
+
* among its other `@import`s, in any position, since `@source` does not depend
|
|
14
|
+
* on order. The rest of the kernel's setup stays the host's: `tw-animate-css`,
|
|
15
|
+
* whose utilities the select popover's and the tooltip's transitions use, and
|
|
16
|
+
* the `@theme inline` mapping of the shadcn tokens, without which a class such
|
|
17
|
+
* as `bg-background` compiles to nothing however well the scan found it.
|
|
18
|
+
*
|
|
19
|
+
* WHY TWO PATHS
|
|
20
|
+
*
|
|
21
|
+
* Tailwind resolves an imported package stylesheet to its REAL path and resolves
|
|
22
|
+
* that file's `@source` directives relative to it, so both paths below are
|
|
23
|
+
* relative to where this file lands, `dist/styles/` inside this package. An
|
|
24
|
+
* explicit `@source` is scanned even inside `node_modules`.
|
|
25
|
+
*
|
|
26
|
+
* - `../../../mthds-form/dist` is the kernel as a sibling of this package:
|
|
27
|
+
* in a pnpm virtual store, where every dependency of this package is linked
|
|
28
|
+
* beside it, and in an npm tree that hoisted the kernel to the top.
|
|
29
|
+
* - `../../node_modules/@pipelex/mthds-form/dist` is the kernel nested under
|
|
30
|
+
* this package, which npm does when the host's tree already holds another
|
|
31
|
+
* version at the top.
|
|
32
|
+
*
|
|
33
|
+
* A path that does not exist is skipped silently, which is why both are listed:
|
|
34
|
+
* in the layouts pnpm and npm give this package, one of them is the copy of the
|
|
35
|
+
* kernel this package imports, and the host never names a path into
|
|
36
|
+
* `node_modules` or declares the kernel itself.
|
|
37
|
+
*
|
|
38
|
+
* ONE LAYOUT ESCAPES BOTH
|
|
39
|
+
*
|
|
40
|
+
* A tree holding two versions of this package that share a kernel range can
|
|
41
|
+
* have npm nest one of them, under the workspace or dependency that asked for
|
|
42
|
+
* it, while the kernel they share is hoisted further up. No path fixed relative
|
|
43
|
+
* to this file reaches a kernel an arbitrary number of levels above it, so both
|
|
44
|
+
* candidates are skipped, silently, and the host adds its own `@source` at the
|
|
45
|
+
* kernel's `dist` (`docs/run-form-panel.md`).
|
|
46
|
+
*
|
|
47
|
+
* No JavaScript imports this file, and a host WITHOUT Tailwind never loads it:
|
|
48
|
+
* it imports `@pipelex/mthds-ui/form-kernel.css` instead. Never both.
|
|
49
|
+
*/
|
|
50
|
+
@source "../../../mthds-form/dist";
|
|
51
|
+
@source "../../node_modules/@pipelex/mthds-form/dist";
|
|
@@ -524,12 +524,16 @@ declare function toolbarSide(position: ToolbarPosition): ToolbarSide;
|
|
|
524
524
|
* host's validation lifecycle, not the static analyzer's: `validating` while a
|
|
525
525
|
* verdict is being produced, `valid`/`invalid` once one exists, and `error`
|
|
526
526
|
* when no verdict could be produced at all (validator unavailable, timeout…).
|
|
527
|
+
* `unvalidated` is for a host with no validator at all, such as a page drawing
|
|
528
|
+
* a method from its source: no verdict exists or is coming, and the issues are
|
|
529
|
+
* what reading the source turned up.
|
|
527
530
|
*/
|
|
528
531
|
declare const VALIDATION_STATE: {
|
|
529
532
|
readonly VALIDATING: "validating";
|
|
530
533
|
readonly VALID: "valid";
|
|
531
534
|
readonly INVALID: "invalid";
|
|
532
535
|
readonly ERROR: "error";
|
|
536
|
+
readonly UNVALIDATED: "unvalidated";
|
|
533
537
|
};
|
|
534
538
|
type ValidationState = (typeof VALIDATION_STATE)[keyof typeof VALIDATION_STATE];
|
|
535
539
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipelex/mthds-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Shared graph rendering logic for MTHDS method visualization",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -51,7 +51,9 @@
|
|
|
51
51
|
"./static-graph": {
|
|
52
52
|
"import": "./dist/static-graph/index.js",
|
|
53
53
|
"types": "./dist/static-graph/index.d.ts"
|
|
54
|
-
}
|
|
54
|
+
},
|
|
55
|
+
"./tailwind.css": "./dist/styles/tailwind.css",
|
|
56
|
+
"./form-kernel.css": "./dist/styles/form-kernel.css"
|
|
55
57
|
},
|
|
56
58
|
"files": [
|
|
57
59
|
"dist"
|
|
@@ -76,14 +78,14 @@
|
|
|
76
78
|
"build-storybook": "storybook build"
|
|
77
79
|
},
|
|
78
80
|
"dependencies": {
|
|
79
|
-
"@pipelex/mthds-form": "^0.
|
|
81
|
+
"@pipelex/mthds-form": "^0.11.0",
|
|
80
82
|
"@xyflow/react": "^12",
|
|
81
83
|
"elkjs": "^0.11.1",
|
|
82
84
|
"smol-toml": "^1.7.0"
|
|
83
85
|
},
|
|
84
86
|
"peerDependencies": {
|
|
85
|
-
"react": "^19",
|
|
86
|
-
"react-dom": "^19",
|
|
87
|
+
"react": "^19.2.3",
|
|
88
|
+
"react-dom": "^19.2.3",
|
|
87
89
|
"shiki": "^3.22.0"
|
|
88
90
|
},
|
|
89
91
|
"peerDependenciesMeta": {
|
|
File without changes
|
|
File without changes
|