@trebired/frontend 19.5.0 → 19.6.1

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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 19.6.1
4
+
5
+ - A page whose client tree carries no `RenderCurrentUrlProvider` hydrates against the address rather than against nothing. It was resolving to the site root during hydration, so the header marked the home link while the server had marked the real page, and React reported an attribute mismatch it does not patch up. A provided url still wins, since that is what the server rendered against.
6
+
7
+ ## 19.6.0
8
+
9
+ Breaking for configuration: `shell.header.menu.link.color` and `shell.header.menu.link.fontWeight` are gone.
10
+
11
+ - A navigation link has one colour and one weight, set once under `shell.header.link`, and both the header and the menu read them. Giving the menu its own let a site pin it to the same value as the active colour, which is exactly what two sites had done: every link in the menu rendered identically and the current page was impossible to pick out, while the header beside it marked the same link correctly. The active state, hover and letter spacing already came from the shared tokens, so only the base colour and weight were ever out of step.
12
+ - `menu-link-padding` and `menu-link-radius` stay, since a stacked menu genuinely needs its own spacing.
13
+
3
14
  ## 19.5.0
4
15
 
5
16
  - An action row's value no longer breaks mid-word by default. It is usually an address or a number, and `overflow-wrap: anywhere` cut `info@machynka.eu` across two lines on a phone. It breaks only where it truly cannot fit now, and its size is capped against the screen before that: a site's chosen size holds on a wide screen and gives way on a narrow one, so the same address fits on one line at phone width.
@@ -254,11 +254,11 @@ $motion: token("motion-duration", 500ms) token("motion-easing", cubic-bezier(0.2
254
254
  display: block;
255
255
  padding: token("menu-link-padding", 0.5rem 0);
256
256
  border-radius: token("menu-link-radius", 0);
257
- color: token("menu-link-color", token("link-color", var(#{ns.css-var("text-muted")}, #555)));
257
+ color: token("link-color", var(#{ns.css-var("text-muted")}, #555));
258
258
  font-size: 1rem;
259
- font-weight: token("menu-link-font-weight", token("link-font-weight", 500));
260
- letter-spacing: token("menu-link-letter-spacing", token("link-letter-spacing", normal));
261
- text-transform: token("menu-link-text-transform", token("link-text-transform", none));
259
+ font-weight: token("link-font-weight", 500);
260
+ letter-spacing: token("link-letter-spacing", normal);
261
+ text-transform: token("link-text-transform", none);
262
262
  }
263
263
 
264
264
  #{ns.element-class("site-header", "menu-footer")} {
@@ -24,7 +24,7 @@ function RenderCurrentUrlProvider(props) {
24
24
  }
25
25
  function useRenderCurrentUrl() {
26
26
  const currentUrl = toCurrentUrl(useContext(RenderCurrentUrlContext));
27
- return useSyncExternalStore(subscribeUrl, () => currentUrlSnapshot(currentUrl), () => currentUrl);
27
+ return useSyncExternalStore(subscribeUrl, () => currentUrlSnapshot(currentUrl), () => currentUrl || browserCurrentUrl());
28
28
  }
29
29
  export { RenderCurrentUrlProvider, useRenderCurrentUrl };
30
30
  //# sourceMappingURL=current_url.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"current_url.js","sourceRoot":"","sources":["../../../src/render/current_url.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,UAAU,EACV,oBAAoB,GAErB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAQvD,MAAM,uBAAuB,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;AAElD,SAAS,YAAY,CAAC,QAAoB;IACxC,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IACnD,MAAM,CAAC,gBAAgB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC9C,MAAM,CAAC,gBAAgB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAChD,OAAO,GAAG,EAAE;QACV,MAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACjD,MAAM,CAAC,mBAAmB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB;IACxB,OAAO,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAA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;QACV,MAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACjD,MAAM,CAAC,mBAAmB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB;IACxB,OAAO,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;AACnE,CAAC;AAED,SAAS,kBAAkB,CAAC,QAAQ,GAAG,EAAE;IACvC,OAAO,iBAAiB,EAAE,IAAI,QAAQ,CAAC;AACzC,CAAC;AAED,SAAS,wBAAwB,CAAC,KAAoC;IACpE,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;IACjE,OAAO,CACL,KAAC,uBAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,YAClD,KAAK,CAAC,QAAQ,GACoB,CACpC,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB;IAC1B,MAAM,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC;IACrE,OAAO,oBAAoB,CACzB,YAAY,EACZ,GAAG,EAAE,CAAC,kBAAkB,CAAC,UAAU,CAAC,EACpC,GAAG,EAAE,CAAC,UAAU,IAAI,iBAAiB,EAAE,CACxC,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,CAAC"}
@@ -24,7 +24,7 @@ function RenderCurrentUrlProvider(props) {
24
24
  }
25
25
  function useRenderCurrentUrl() {
26
26
  const currentUrl = toCurrentUrl(useContext(RenderCurrentUrlContext));
27
- return useSyncExternalStore(subscribeUrl, () => currentUrlSnapshot(currentUrl), () => currentUrl);
27
+ return useSyncExternalStore(subscribeUrl, () => currentUrlSnapshot(currentUrl), () => currentUrl || browserCurrentUrl());
28
28
  }
29
29
  export { RenderCurrentUrlProvider, useRenderCurrentUrl };
30
30
  //# sourceMappingURL=current_url.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"current_url.js","sourceRoot":"","sources":["../../../src/render/current_url.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,UAAU,EACV,oBAAoB,GAErB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAQvD,MAAM,uBAAuB,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;AAElD,SAAS,YAAY,CAAC,QAAoB;IACxC,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IACnD,MAAM,CAAC,gBAAgB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC9C,MAAM,CAAC,gBAAgB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAChD,OAAO,GAAG,EAAE;QACV,MAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACjD,MAAM,CAAC,mBAAmB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB;IACxB,OAAO,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;AACnE,CAAC;AAED,SAAS,kBAAkB,CAAC,QAAQ,GAAG,EAAE;IACvC,OAAO,iBAAiB,EAAE,IAAI,QAAQ,CAAC;AACzC,CAAC;AAED,SAAS,wBAAwB,CAAC,KAAoC;IACpE,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;IACjE,OAAO,CACL,KAAC,uBAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,YAClD,KAAK,CAAC,QAAQ,GACoB,CACpC,C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AED,SAAS,wBAAwB,CAAC,KAAoC;IACpE,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;IACjE,OAAO,CACL,KAAC,uBAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,YAClD,KAAK,CAAC,QAAQ,GACoB,CACpC,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB;IAC1B,MAAM,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC;IACrE,OAAO,oBAAoB,CACzB,YAAY,EACZ,GAAG,EAAE,CAAC,kBAAkB,CAAC,UAAU,CAAC,EACpC,GAAG,EAAE,CAAC,UAAU,IAAI,iBAAiB,EAAE,CACxC,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,CAAC"}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  }
9
9
  },
10
10
  "name": "@trebired/frontend",
11
- "version": "19.5.0",
11
+ "version": "19.6.1",
12
12
  "description": "Generic browser runtime systems for Trebired frontend packages and applications.",
13
13
  "type": "module",
14
14
  "private": false,