strata-react 2.1.21 → 2.1.22
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/UPGRADING.md +4 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/UPGRADING.md
CHANGED
|
@@ -11,6 +11,10 @@ time. While the version is 0.x, any release may break.
|
|
|
11
11
|
|
|
12
12
|
Every PR that changes what an app sees adds a line here (see `CLAUDE.md`, "Changelog").
|
|
13
13
|
|
|
14
|
+
## 2026-12-01 (ButtonLink and TextLink `href` under a router basename)
|
|
15
|
+
|
|
16
|
+
- `ButtonLink` and `TextLink` with `href` (downloads, files, external URLs) no longer pass through React Router's `RouterProvider`/`useHref`, so their `href` is rendered verbatim instead of having the router `basename` prepended. Pass `api.url(...)` (or an already base-prefixed URL) for server paths behind a reverse proxy; `to` links continue to prepend `basename` through React Router.
|
|
17
|
+
|
|
14
18
|
## 2026-12-01 (PartialDateField)
|
|
15
19
|
|
|
16
20
|
- `PartialDateField` no longer sets `inputMode="numeric"` on its text input, so touch keyboards expose `-` for `YYYY-MM` and `YYYY-MM-DD` entry. `parsePartialDate` now accepts full calendar dates in years `0001`–`0099` (previously rejected due to `Date.UTC` mapping them to `1901`–`1999`).
|
package/dist/index.d.ts
CHANGED
|
@@ -4441,11 +4441,11 @@ type TextLinkProps = BaseProps & Target & {
|
|
|
4441
4441
|
/**
|
|
4442
4442
|
* A link drawn as a `Button` (React Router `to`, or `href` for a download or another site): the same variants and heights, `variant="default"` is the filled one and counts for the one-filled-button rule (`data-variant` is set).
|
|
4443
4443
|
*/
|
|
4444
|
-
export declare function ButtonLink(all: ButtonLinkProps): React.JSX.Element;
|
|
4444
|
+
export declare function ButtonLink(all: ButtonLinkProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
4445
4445
|
/**
|
|
4446
4446
|
* The house in-app link: accent ink, underlined, for a sentence, a table cell or an empty state's next step. `to` for a route, `href` for a file or another site.
|
|
4447
4447
|
*/
|
|
4448
|
-
export declare function TextLink(all: TextLinkProps): React.JSX.Element;
|
|
4448
|
+
export declare function TextLink(all: TextLinkProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
4449
4449
|
/** The caller's zoom and pan, and how to change them. */
|
|
4450
4450
|
type ViewportState = {
|
|
4451
4451
|
viewport: Viewport;
|
package/dist/index.js
CHANGED
|
@@ -4829,12 +4829,13 @@ function releaseSound(el) {
|
|
|
4829
4829
|
// src/components/link.tsx
|
|
4830
4830
|
function useTarget(target, newTab, state) {
|
|
4831
4831
|
const navigate = useNavigate();
|
|
4832
|
+
const isRoute = target.to !== void 0;
|
|
4832
4833
|
return {
|
|
4833
|
-
provide: (node) => /* @__PURE__ */ jsx(RouterProvider, {
|
|
4834
|
+
provide: (node) => isRoute ? /* @__PURE__ */ jsx(RouterProvider, {
|
|
4834
4835
|
navigate: (to) => void navigate(to, state === void 0 ? void 0 : { state }),
|
|
4835
4836
|
useHref,
|
|
4836
4837
|
children: node
|
|
4837
|
-
}),
|
|
4838
|
+
}) : node,
|
|
4838
4839
|
props: {
|
|
4839
4840
|
href: target.to ?? target.href,
|
|
4840
4841
|
download: target.href === void 0 ? void 0 : target.download,
|