@mieweb/ui 0.11.0-dev.48 → 0.11.0-dev.49
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/MIGRATION.md +46 -15
- package/README.md +3 -1
- package/agent/skills/mieweb-ui-tailwind4/SKILL.md +2 -1
- package/package.json +1 -1
package/MIGRATION.md
CHANGED
|
@@ -23,10 +23,30 @@ and `@kerebron/wasm` (tested together at 0.8.12). Import `@mieweb/ui/kerebron.cs
|
|
|
23
23
|
and serve `@kerebron/wasm/assets` at `/kerebron-wasm`. Apply the Kerebron patches
|
|
24
24
|
described by the RichEditor documentation for its toolbar and Markdown marks.
|
|
25
25
|
|
|
26
|
-
**Required for Kerebron 0.8.12:**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
**Required for Kerebron 0.8.12:** install the `@kerebron/*` peers at **exactly
|
|
27
|
+
0.8.12** (the tested set) and configure the consuming application's package
|
|
28
|
+
manager to resolve every ProseMirror core package to a **single version**.
|
|
29
|
+
Without this, a fresh install loads multiple copies of `prosemirror-model`
|
|
30
|
+
and typing throws:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
RangeError: Can not convert <…> to a Fragment
|
|
34
|
+
(looks like multiple versions of prosemirror-model were loaded)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Two mechanisms split the versions (mieweb/ui#709). First, `@mieweb/ui` and
|
|
38
|
+
Kerebron 0.8.12 both pin `prosemirror-model` 1.25.9 / `prosemirror-state`
|
|
39
|
+
1.4.3 exactly, but Kerebron 0.8.13 pins different versions — a `^0.8.12`
|
|
40
|
+
range drifts onto it, and the exact pins can never dedupe. Second, even with
|
|
41
|
+
matching pins, ProseMirror's own `^`-ranged internal dependencies (for
|
|
42
|
+
example `prosemirror-state → prosemirror-model ^1.0.0`) resolve to the
|
|
43
|
+
newest release on any fresh install; this repository is only protected by
|
|
44
|
+
its frozen lockfile. `pnpm dedupe` cannot fix either case, so overrides are
|
|
45
|
+
required. (`prosemirror-view` additionally needs 1.42.3 rather than
|
|
46
|
+
Kerebron's pinned 1.40.0: the protected MDY link bridge uses 1.42.3, and two
|
|
47
|
+
view instances can make decorations incompatible and leave the older view's
|
|
48
|
+
behavior active.)
|
|
49
|
+
|
|
30
50
|
The overrides in this library's checkout do not propagate to installed apps.
|
|
31
51
|
|
|
32
52
|
For pnpm 10, add to the host's `pnpm-workspace.yaml`:
|
|
@@ -34,6 +54,9 @@ For pnpm 10, add to the host's `pnpm-workspace.yaml`:
|
|
|
34
54
|
```yaml
|
|
35
55
|
overrides:
|
|
36
56
|
prosemirror-view: "1.42.3"
|
|
57
|
+
prosemirror-model: "1.25.9"
|
|
58
|
+
prosemirror-state: "1.4.3"
|
|
59
|
+
prosemirror-transform: "1.10.4"
|
|
37
60
|
```
|
|
38
61
|
|
|
39
62
|
For npm, add to the host's `package.json`:
|
|
@@ -41,7 +64,10 @@ For npm, add to the host's `package.json`:
|
|
|
41
64
|
```json
|
|
42
65
|
{
|
|
43
66
|
"overrides": {
|
|
44
|
-
"prosemirror-view": "1.42.3"
|
|
67
|
+
"prosemirror-view": "1.42.3",
|
|
68
|
+
"prosemirror-model": "1.25.9",
|
|
69
|
+
"prosemirror-state": "1.4.3",
|
|
70
|
+
"prosemirror-transform": "1.10.4"
|
|
45
71
|
}
|
|
46
72
|
}
|
|
47
73
|
```
|
|
@@ -51,16 +77,20 @@ For Yarn, add to the host's `package.json`:
|
|
|
51
77
|
```json
|
|
52
78
|
{
|
|
53
79
|
"resolutions": {
|
|
54
|
-
"prosemirror-view": "1.42.3"
|
|
80
|
+
"prosemirror-view": "1.42.3",
|
|
81
|
+
"prosemirror-model": "1.25.9",
|
|
82
|
+
"prosemirror-state": "1.4.3",
|
|
83
|
+
"prosemirror-transform": "1.10.4"
|
|
55
84
|
}
|
|
56
85
|
}
|
|
57
86
|
```
|
|
58
87
|
|
|
59
|
-
If the host also declares
|
|
60
|
-
|
|
61
|
-
`
|
|
62
|
-
|
|
63
|
-
|
|
88
|
+
If the host also declares any of these packages directly, pin those
|
|
89
|
+
dependencies to the same versions. Reinstall and inspect
|
|
90
|
+
`pnpm why prosemirror-model` / `pnpm why prosemirror-view` (or the
|
|
91
|
+
`npm ls` / `yarn why` equivalents): every resolved instance of each package
|
|
92
|
+
must be a single version. Keep this requirement until a tested Kerebron
|
|
93
|
+
release shares the same ProseMirror versions without an override.
|
|
64
94
|
|
|
65
95
|
**Recommended for EncounterVisit hosts:** resolve `js-yaml` to **4.3.2 or
|
|
66
96
|
newer**. `@mieweb/templit` 0.2.0 (a direct dependency used by
|
|
@@ -87,8 +117,9 @@ peers** (only the Yjs collaboration peers — `@kerebron/extension-yjs`,
|
|
|
87
117
|
`yjs`, `y-protocols` — remain optional):
|
|
88
118
|
|
|
89
119
|
```sh
|
|
90
|
-
npm install @kerebron/editor @kerebron/editor-kits \
|
|
91
|
-
@kerebron/extension-basic-editor @kerebron/extension-menu
|
|
120
|
+
npm install --save-exact @kerebron/editor@0.8.12 @kerebron/editor-kits@0.8.12 \
|
|
121
|
+
@kerebron/extension-basic-editor@0.8.12 @kerebron/extension-menu@0.8.12 \
|
|
122
|
+
@kerebron/wasm@0.8.12
|
|
92
123
|
```
|
|
93
124
|
|
|
94
125
|
```ts
|
|
@@ -102,8 +133,8 @@ serve `@kerebron/wasm`'s `assets/` directory at that path (or pass your own
|
|
|
102
133
|
`<Textarea richText={false}>` or `TextAreaPlain` — but the peers must be
|
|
103
134
|
installable for the package to resolve.
|
|
104
135
|
|
|
105
|
-
Because every consumer now resolves Kerebron, the
|
|
106
|
-
|
|
136
|
+
Because every consumer now resolves Kerebron, the **ProseMirror version
|
|
137
|
+
overrides and the Kerebron patches** described under
|
|
107
138
|
[eSheet and EncounterVisit](#esheet-and-encountervisit) above also apply to
|
|
108
139
|
every consumer — previously only EncounterVisit RichEdit hosts needed them.
|
|
109
140
|
Note that package managers that auto-install peers (npm 7+, pnpm 8+ by
|
package/README.md
CHANGED
|
@@ -166,7 +166,9 @@ AGGrid is deprecated for new work; start with DataVis NITRO for tabular data.
|
|
|
166
166
|
Their shared `@esheet/styles` dependency supplies eSheet CSS automatically;
|
|
167
167
|
keep loading `@mieweb/ui/styles.css` for the composed controls. EncounterVisit's
|
|
168
168
|
RichEdit mode also needs the Kerebron peers, CSS and WASM assets. **With Kerebron
|
|
169
|
-
0.8.12, the host must override
|
|
169
|
+
0.8.12, the host must override the ProseMirror core packages to single
|
|
170
|
+
versions (`prosemirror-view` 1.42.3, `prosemirror-model` 1.25.9,
|
|
171
|
+
`prosemirror-state` 1.4.3, `prosemirror-transform` 1.10.4).**
|
|
170
172
|
The library's development override does not configure an installed consumer.
|
|
171
173
|
Follow the shipped [eSheet and EncounterVisit setup](https://github.com/mieweb/ui/blob/main/MIGRATION.md#esheet-and-encountervisit)
|
|
172
174
|
for the package-manager configuration and verification command.
|
|
@@ -14,7 +14,7 @@ npm install @mieweb/ui react react-dom
|
|
|
14
14
|
npm install -D tailwindcss@4 @tailwindcss/postcss autoprefixer
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
`react` / `react-dom` (>=18) are **required** peers, and so are the five `@kerebron/*` runtime packages (`editor`, `editor-kits`, `extension-basic-editor`, `extension-menu`, `wasm`) — the main-barrel `Textarea` rides the Kerebron engine, and bundling it would duplicate `prosemirror-state` in consumer apps. Every other peer is **optional** and only needed when you import the entry that uses it (`/maps` → leaflet, `/globe` → react-globe.gl + three, collab → @kerebron/extension-yjs + yjs + y-protocols, `/motion` → motion, `/q` → @mieweb/q, …) — see the catalog skill's entry-point table. A peer-dep warning for an entry you never import is noise, not a problem. Under pnpm's strict node_modules there is no hoisting: required peers must be in the app's own `package.json`; diagnose resolution with `pnpm why <pkg>`.
|
|
17
|
+
`react` / `react-dom` (>=18) are **required** peers, and so are the five `@kerebron/*` runtime packages (`editor`, `editor-kits`, `extension-basic-editor`, `extension-menu`, `wasm`) — the main-barrel `Textarea` rides the Kerebron engine, and bundling it would duplicate `prosemirror-state` in consumer apps. Install the Kerebron peers at **exactly 0.8.12** (the tested set) and add the ProseMirror overrides from [MIGRATION.md](https://github.com/mieweb/ui/blob/main/MIGRATION.md#esheet-and-encountervisit) — `prosemirror-view` 1.42.3, `prosemirror-model` 1.25.9, `prosemirror-state` 1.4.3, `prosemirror-transform` 1.10.4 (pnpm 10: `overrides:` in `pnpm-workspace.yaml`; npm: `"overrides"`; Yarn: `"resolutions"`). Without the overrides a fresh install resolves multiple `prosemirror-model` copies and typing in every editor breaks (mieweb/ui#709); `pnpm dedupe` cannot fix it. Every other peer is **optional** and only needed when you import the entry that uses it (`/maps` → leaflet, `/globe` → react-globe.gl + three, collab → @kerebron/extension-yjs + yjs + y-protocols, `/motion` → motion, `/q` → @mieweb/q, …) — see the catalog skill's entry-point table. A peer-dep warning for an entry you never import is noise, not a problem. Under pnpm's strict node_modules there is no hoisting: required peers must be in the app's own `package.json`; diagnose resolution with `pnpm why <pkg>`.
|
|
18
18
|
|
|
19
19
|
Install the **published package from the npm registry**. Installing from the git repo (`npm install github:mieweb/ui`) is unsupported — the source tree is a pnpm workspace with `link:` dependencies and submodules (mieweb/ui#489).
|
|
20
20
|
|
|
@@ -118,6 +118,7 @@ Filters/selection/pagination state is yours (usually the URL); `ViewSet` owns on
|
|
|
118
118
|
| Peer-dep install errors | Required vs optional confusion | react/react-dom + the five @kerebron/* runtime peers are required; match optional peers to imported entries |
|
|
119
119
|
| Dark variant + brand tokens missing; build warns `@import statements must precede…` | `@source` placed between the `@import`s — PostCSS silently drops the late `init.css` import (mieweb/ui#705) | Both `@import`s first and consecutive, `@source` after them |
|
|
120
120
|
| `vite build` fails: `MISSING_EXPORT` from `@kerebron/extension-yjs` / `y-websocket` in a `collabKit-*` chunk | Optional collab peers not installed; @mieweb/ui versions before the mieweb/ui#706 fix had static named imports in the lazy collab chunk, and Vite's optional-peer stub has no named exports | Upgrade @mieweb/ui; on older versions, externalize: `build.rollupOptions.external: [/^@kerebron\/extension-yjs/, /^y-websocket/]` (collab stays optional either way) |
|
|
121
|
+
| Editor renders but typing throws `Can not convert … to a Fragment (looks like multiple versions of prosemirror-model)` | Multiple ProseMirror copies: Kerebron 0.8.13 pins different versions than @mieweb/ui, and transitive `^`-ranges float to the newest release on fresh installs (mieweb/ui#709) | Pin `@kerebron/*` to 0.8.12 exactly + add the four ProseMirror overrides (see Install above); verify with `pnpm why prosemirror-model` — a single version must remain |
|
|
121
122
|
| Module shows failed action as success | `on*` promise swallowed | Return the real promise (`mutateAsync` / `callAsync`) |
|
|
122
123
|
| Views regroup on every render | Unstable `accessors` | Module scope or `useMemo` |
|
|
123
124
|
| `transition-*` utilities stop working after theme/brand CSS | The brand CSS's unlayered `*` transition shorthand resets `transition-property` on every element and beats layered utilities, even though it lists only color properties (mieweb/ui#460, #682) | Move the transition rule into `@layer base` (or remove/narrow it) so component transitions win; keep brand token declarations unlayered |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mieweb/ui",
|
|
3
|
-
"version": "0.11.0-dev.
|
|
3
|
+
"version": "0.11.0-dev.49",
|
|
4
4
|
"description": "A themeable, accessible React component library built with Tailwind CSS",
|
|
5
5
|
"author": "Medical Informatics Engineering, Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|