@byline/host-tanstack-start 2.2.7 → 2.2.8

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.
@@ -20,7 +20,7 @@ const PreviewLink = ({ collectionPath, doc, adminConfig, locale, className })=>{
20
20
  setBusy(true);
21
21
  try {
22
22
  await enablePreviewModeFn();
23
- window.open(url, '_blank', 'noopener,noreferrer');
23
+ window.location.assign(url);
24
24
  } catch (err) {
25
25
  toastManager.add({
26
26
  title: 'Preview',
@@ -42,7 +42,7 @@ const PreviewLink = ({ collectionPath, doc, adminConfig, locale, className })=>{
42
42
  variant: "text",
43
43
  disabled: busy,
44
44
  onClick: handleClick,
45
- "aria-label": "Open preview in new tab",
45
+ "aria-label": "Open preview",
46
46
  title: "Preview",
47
47
  children: /*#__PURE__*/ jsx(ExternalLinkIcon, {
48
48
  width: "20px",
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "type": "module",
5
5
  "license": "MPL-2.0",
6
- "version": "2.2.7",
6
+ "version": "2.2.8",
7
7
  "engines": {
8
8
  "node": ">=20.9.0"
9
9
  },
@@ -107,12 +107,12 @@
107
107
  "react-swipeable": "^7.0.2",
108
108
  "uuid": "^14.0.0",
109
109
  "zod": "^4.4.3",
110
- "@byline/admin": "2.2.7",
111
- "@byline/ai": "2.2.7",
112
- "@byline/core": "2.2.7",
113
- "@byline/client": "2.2.7",
114
- "@byline/ui": "2.2.7",
115
- "@byline/auth": "2.2.7"
110
+ "@byline/admin": "2.2.8",
111
+ "@byline/ai": "2.2.8",
112
+ "@byline/core": "2.2.8",
113
+ "@byline/auth": "2.2.8",
114
+ "@byline/ui": "2.2.8",
115
+ "@byline/client": "2.2.8"
116
116
  },
117
117
  "peerDependencies": {
118
118
  "@tanstack/react-router": "^1.167.0",
@@ -14,8 +14,8 @@
14
14
  * on the admin's session — so the front-end host's viewer client
15
15
  * starts surfacing draft versions for this admin's subsequent
16
16
  * requests.
17
- * 2. Opens the document's preview URL in a new tab via
18
- * `window.open(url, '_blank', 'noopener,noreferrer')`.
17
+ * 2. Navigates the current tab to the document's preview URL via
18
+ * `window.location.assign(url)`.
19
19
  *
20
20
  * The preview URL comes from `CollectionAdminConfig.preview.url(doc, ctx)`
21
21
  * when configured; otherwise it falls back to the conventional
@@ -101,13 +101,11 @@ export const PreviewLink = ({
101
101
  if (busy) return
102
102
  setBusy(true)
103
103
  try {
104
- // Enable preview mode for the admin's browser session before opening
105
- // the URL. The viewer client on the front-end host reads the cookie
106
- // on subsequent requests and elevates the read context.
104
+ // Enable preview mode for the admin's browser session before
105
+ // navigating. The viewer client on the front-end host reads the
106
+ // cookie on subsequent requests and elevates the read context.
107
107
  await enablePreviewModeFn()
108
- // `noopener,noreferrer` so the opened tab can't reach back into
109
- // the admin window via `window.opener`.
110
- window.open(url, '_blank', 'noopener,noreferrer')
108
+ window.location.assign(url)
111
109
  } catch (err) {
112
110
  toastManager.add({
113
111
  title: 'Preview',
@@ -131,7 +129,7 @@ export const PreviewLink = ({
131
129
  variant="text"
132
130
  disabled={busy}
133
131
  onClick={handleClick}
134
- aria-label="Open preview in new tab"
132
+ aria-label="Open preview"
135
133
  title="Preview"
136
134
  >
137
135
  <ExternalLinkIcon width="20px" height="20px" className="byline-preview-link-icon" />