@iyulab/router 0.15.0 → 0.15.2
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/CHANGELOG.md +32 -0
- package/README.md +29 -7
- package/dist/index.d.ts +619 -9
- package/dist/index.js +1 -1
- package/dist/react.d.ts +170 -9
- package/dist/react.js +1 -1
- package/dist/{share-RyrbTDel.js → share-DxyaaBox.js} +27 -4
- package/package.json +3 -2
- package/skills/iyulab-router/references/components.md +29 -7
- package/dist/Router.d.ts +0 -41
- package/dist/components/UErrorPage.d.ts +0 -30
- package/dist/components/ULink.d.ts +0 -93
- package/dist/components/UOutlet.d.ts +0 -47
- package/dist/internals/RouteTracker.d.ts +0 -22
- package/dist/internals/crypto-helpers.d.ts +0 -8
- package/dist/internals/element-helpers.d.ts +0 -36
- package/dist/internals/route-helpers.d.ts +0 -21
- package/dist/internals/url-helpers.d.ts +0 -38
- package/dist/types/NavigateOptions.d.ts +0 -25
- package/dist/types/RouteConfig.d.ts +0 -151
- package/dist/types/RouteContext.d.ts +0 -85
- package/dist/types/RouteError.d.ts +0 -52
- package/dist/types/RouteEvent.d.ts +0 -54
- package/dist/types/RouterConfig.d.ts +0 -52
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.15.2] - 2026-09-23
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **A wide descendant no longer widens the route screen past the outlet.** 0.15.0 made
|
|
8
|
+
`<u-outlet>` a grid container without declaring a column track. The implicit column is `auto`,
|
|
9
|
+
and a grid item's default `min-width: auto` passes its content's minimum width up to the track,
|
|
10
|
+
so a wide table widened the whole screen — even inside an `overflow-x: auto` box — and anything
|
|
11
|
+
aligned to the screen's right edge, such as a toolbar's last button, was pushed off screen. The
|
|
12
|
+
track is now `minmax(0, 1fr)`: the screen is exactly as wide as the outlet, a narrow screen still
|
|
13
|
+
fills it, and wide content scrolls inside its own box. Print is unaffected (the outlet is a block
|
|
14
|
+
box there). The rule keeps zero specificity, so `u-outlet { grid-template-columns: auto; }`
|
|
15
|
+
restores the previous track.
|
|
16
|
+
|
|
17
|
+
## [0.15.1] - 2026-09-17
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- **Printing no longer adds a trailing blank page when a screen's last block has a bottom
|
|
22
|
+
margin.** 0.15.0 made `<u-outlet>` a grid container in every medium. A grid container keeps
|
|
23
|
+
its children's margins inside its own box, so the last block's bottom margin added to the
|
|
24
|
+
outlet's height; when the content ended within that margin of a page boundary, the outlet
|
|
25
|
+
spilled onto a page that held only the margin. In print media the outlet is now a block box,
|
|
26
|
+
which lets the margin collapse past it and be truncated at the page break:
|
|
27
|
+
|
|
28
|
+
```css
|
|
29
|
+
@media print { :where(u-outlet) { display: block; } }
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Screen layout is unchanged. The grid only matters when the parent has a definite height, and
|
|
33
|
+
an application shell normally sets one for screen media only.
|
|
34
|
+
|
|
3
35
|
## [0.15.0] - 2026-09-16
|
|
4
36
|
|
|
5
37
|
### Changed
|
package/README.md
CHANGED
|
@@ -144,12 +144,13 @@ const routes = [
|
|
|
144
144
|
## Outlet Layout
|
|
145
145
|
|
|
146
146
|
`<u-outlet>` declares its own box model. A custom element's UA default is `inline`, which
|
|
147
|
-
would put a route's block-level screen inside an inline box — so the outlet adopts
|
|
148
|
-
|
|
147
|
+
would put a route's block-level screen inside an inline box — so the outlet adopts its
|
|
148
|
+
rules on whichever tree it is connected to (the document, or the shadow root if it lives in
|
|
149
149
|
one):
|
|
150
150
|
|
|
151
151
|
```css
|
|
152
|
-
:where(u-outlet) { display: grid; min-height: 100%; }
|
|
152
|
+
:where(u-outlet) { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100%; }
|
|
153
|
+
@media print { :where(u-outlet) { display: block; } }
|
|
153
154
|
```
|
|
154
155
|
|
|
155
156
|
The outlet has to be two things at once, and no single declaration gives both:
|
|
@@ -178,19 +179,41 @@ The rule deliberately omits `align-content`; it relies on the initial `normal`.
|
|
|
178
179
|
`align-content: start` stops the track from stretching and silently voids case 1.
|
|
179
180
|
|
|
180
181
|
When the parent's own height is `auto`, `min-height: 100%` resolves to `auto` too, so ordinary
|
|
181
|
-
document flow
|
|
182
|
+
document flow is unaffected.
|
|
183
|
+
|
|
184
|
+
The column track is bound to the outlet's width with `minmax(0, 1fr)`. Without it the implicit
|
|
185
|
+
column is `auto`, and a grid item's default `min-width: auto` passes its content's minimum width up
|
|
186
|
+
to the track — so a wide table inside a screen widened the whole screen past the outlet, even when
|
|
187
|
+
the table sat in an `overflow-x: auto` box, and anything aligned to the screen's right edge (a
|
|
188
|
+
toolbar's last button) ended up off screen. With the track bound, the screen is exactly as wide as
|
|
189
|
+
the outlet, a narrow screen still fills it, and wide content scrolls inside its own box.
|
|
190
|
+
|
|
191
|
+
### Printing
|
|
192
|
+
|
|
193
|
+
In print media the outlet is a plain block box instead of a grid container. A grid container is
|
|
194
|
+
an independent formatting context, so the bottom margin of a screen's last block cannot collapse
|
|
195
|
+
through it — the margin lands *inside* the outlet's box and adds to its height. On screen that is
|
|
196
|
+
harmless. On paper it is not: when content ends within that margin of a page boundary, the box
|
|
197
|
+
spills onto a new page that holds nothing but the margin. As a block box, the outlet lets the
|
|
198
|
+
margin collapse past it to the end of the document, and a margin that meets a page break is
|
|
199
|
+
truncated there, so no trailing blank page appears.
|
|
200
|
+
|
|
201
|
+
Print loses nothing by this. The grid exists to pass a *sized* parent's height down, and an
|
|
202
|
+
application shell normally sizes itself to the viewport only for screen media; in print the
|
|
203
|
+
parent's height is `auto`, and `min-height: 100%` resolves to nothing.
|
|
182
204
|
|
|
183
205
|
### Overriding it
|
|
184
206
|
|
|
185
|
-
The `:where()` wrapper makes
|
|
207
|
+
The `:where()` wrapper makes both rules' specificity zero, so **any** `u-outlet { … }` rule your
|
|
186
208
|
application writes wins, regardless of sheet order and without `!important`:
|
|
187
209
|
|
|
188
210
|
```css
|
|
189
211
|
u-outlet { display: flex; } /* wins */
|
|
212
|
+
u-outlet { grid-template-columns: auto; } /* restores the 0.15.1 column track */
|
|
190
213
|
u-outlet { display: contents; } /* remove the box entirely */
|
|
191
214
|
u-outlet { display: block; height: 100%; } /* restores the 0.14.0 behavior */
|
|
192
215
|
u-outlet { display: inline; } /* restores the pre-0.14.0 behavior */
|
|
193
|
-
@media print { u-outlet {
|
|
216
|
+
@media print { u-outlet { display: grid; } } /* restores the 0.15.0 print behavior */
|
|
194
217
|
```
|
|
195
218
|
|
|
196
219
|
> **Making the outlet *smaller* takes two declarations, not one.** `min-height` is a floor, so
|
|
@@ -198,7 +221,6 @@ u-outlet { display: inline; } /* restores the pre-0.14.0 behavi
|
|
|
198
221
|
> `u-outlet { min-height: 0; height: 200px }`. Making it *larger*, or replacing `display`, needs
|
|
199
222
|
> nothing extra. This is the only contract addition in 0.15.0.
|
|
200
223
|
|
|
201
|
-
The rule is not media-scoped: the outlet is a block-level box on screen and in print alike.
|
|
202
224
|
|
|
203
225
|
`<u-link>` supports `href`, `target`, `rel`, and `navigate`.
|
|
204
226
|
|