@byline/host-tanstack-start 4.7.0 → 4.9.0

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.
@@ -1,6 +1,6 @@
1
1
  import type { SystemActivityResponse } from '../../server-fns/admin-activity/index.js';
2
2
  /**
3
- * The system-wide activity report (docs/06-auth-and-security/02-auditability.md — Workstream 4): a paged,
3
+ * The system-wide activity report (docs/07-auth-and-security/02-auditability.md — Workstream 4): a paged,
4
4
  * filterable feed over the union of the version stream (content saves) and the
5
5
  * audit log (status / path / locale changes, deletions, and future admin-realm
6
6
  * events). Read-only; gated by `admin.activity.read`.
@@ -9,7 +9,7 @@
9
9
  * One serialised audit-log entry as it reaches the admin UI. Mirrors
10
10
  * `@byline/client`'s `AuditLogEntry` but with `occurredAt` as an ISO string —
11
11
  * the value crosses the TanStack server-fn boundary through `serialise()`,
12
- * which turns Dates into strings (docs/06-auth-and-security/02-auditability.md — Workstream 3).
12
+ * which turns Dates into strings (docs/07-auth-and-security/02-auditability.md — Workstream 3).
13
13
  */
14
14
  export interface AuditLogEntryView {
15
15
  id: string;
@@ -42,7 +42,7 @@ export interface DocumentHistoryData {
42
42
  }>;
43
43
  }
44
44
  /**
45
- * Document-grain audit log for a single document (docs/06-auth-and-security/02-auditability.md — Workstream
45
+ * Document-grain audit log for a single document (docs/07-auth-and-security/02-auditability.md — Workstream
46
46
  * 3, "Document history" tab): a chronological, newest-first list of the
47
47
  * non-versioned changes the version stream does not record — path /
48
48
  * available-locales writes, in-place status transitions, and the deletion
@@ -15,7 +15,7 @@ export declare const HistoryView: ({ collectionDefinition, adminConfig, data, au
15
15
  data: AnyCollectionSchemaTypes['HistoryType'] & {
16
16
  /**
17
17
  * Audit display labels (the acting user per version), resolved admin-side from each
18
- * version's `createdBy` id (see docs/06-auth-and-security/02-auditability.md — Workstream 1). Ids
18
+ * version's `createdBy` id (see docs/07-auth-and-security/02-auditability.md — Workstream 1). Ids
19
19
  * absent from the map belong to deleted users.
20
20
  */
21
21
  actors?: Record<string, {
@@ -23,7 +23,7 @@ export declare const HistoryView: ({ collectionDefinition, adminConfig, data, au
23
23
  }>;
24
24
  };
25
25
  /**
26
- * Document-grain audit log for the "Document history" tab (docs/06-auth-and-security/02-auditability.md —
26
+ * Document-grain audit log for the "Document history" tab (docs/07-auth-and-security/02-auditability.md —
27
27
  * Workstream 3): the non-versioned path / available-locales / status
28
28
  * changes and the deletion event, with admin-resolved actor labels.
29
29
  */
@@ -18,7 +18,7 @@
18
18
  * Permission-gated both ends: hidden unless the actor holds
19
19
  * `collections.<path>.reindex` (the same ability the server fn re-asserts).
20
20
  * Synchronous — fine for small/medium collections; a large corpus wants a
21
- * backgrounded job (see docs/05-reading-and-delivery/07-search.md).
21
+ * backgrounded job (see docs/06-search/02-indexing-and-reindexing.md).
22
22
  */
23
23
  import type React from 'react';
24
24
  import type { ListActionComponentProps } from '@byline/core';
@@ -6,7 +6,7 @@
6
6
  * Copyright (c) Infonomic Company Limited
7
7
  */
8
8
  /**
9
- * Admin-activity server fns (docs/06-auth-and-security/02-auditability.md — Workstream 4) — the
9
+ * Admin-activity server fns (docs/07-auth-and-security/02-auditability.md — Workstream 4) — the
10
10
  * system-wide activity report. Reads the adapter's audit queries directly
11
11
  * (cross-collection, includes admin-realm rows) behind the
12
12
  * `admin.activity.read` gate, rather than routing through a per-document
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "type": "module",
5
5
  "license": "MPL-2.0",
6
- "version": "4.7.0",
6
+ "version": "4.9.0",
7
7
  "engines": {
8
8
  "node": ">=20.9.0"
9
9
  },
@@ -114,17 +114,16 @@
114
114
  "@dnd-kit/core": "^6.3.1",
115
115
  "@dnd-kit/sortable": "^10.0.0",
116
116
  "classnames": "^2.5.1",
117
- "npm-run-all": "^4.1.5",
118
117
  "react-json-view-lite": "^2.5.0",
119
118
  "react-swipeable": "^7.0.2",
120
119
  "zod": "^4.4.3",
121
- "@byline/admin": "4.7.0",
122
- "@byline/ai": "4.7.0",
123
- "@byline/auth": "4.7.0",
124
- "@byline/ui": "4.7.0",
125
- "@byline/core": "4.7.0",
126
- "@byline/client": "4.7.0",
127
- "@byline/i18n": "4.7.0"
120
+ "@byline/ai": "4.9.0",
121
+ "@byline/i18n": "4.9.0",
122
+ "@byline/core": "4.9.0",
123
+ "@byline/auth": "4.9.0",
124
+ "@byline/admin": "4.9.0",
125
+ "@byline/ui": "4.9.0",
126
+ "@byline/client": "4.9.0"
128
127
  },
129
128
  "peerDependencies": {
130
129
  "@tanstack/react-router": "^1.167.0",
@@ -143,6 +142,7 @@
143
142
  "@types/react": "19.2.17",
144
143
  "@types/react-dom": "19.2.3",
145
144
  "lightningcss": "^1.32.0",
145
+ "npm-run-all": "^4.1.5",
146
146
  "react": "^19.2.7",
147
147
  "react-dom": "^19.2.7",
148
148
  "rimraf": "^6.1.3",
@@ -63,7 +63,7 @@ function formatAuditValue(value: unknown): string {
63
63
  }
64
64
 
65
65
  /**
66
- * The system-wide activity report (docs/06-auth-and-security/02-auditability.md — Workstream 4): a paged,
66
+ * The system-wide activity report (docs/07-auth-and-security/02-auditability.md — Workstream 4): a paged,
67
67
  * filterable feed over the union of the version stream (content saves) and the
68
68
  * audit log (status / path / locale changes, deletions, and future admin-realm
69
69
  * events). Read-only; gated by `admin.activity.read`.
@@ -16,7 +16,7 @@ import styles from './document-history.module.css'
16
16
  * One serialised audit-log entry as it reaches the admin UI. Mirrors
17
17
  * `@byline/client`'s `AuditLogEntry` but with `occurredAt` as an ISO string —
18
18
  * the value crosses the TanStack server-fn boundary through `serialise()`,
19
- * which turns Dates into strings (docs/06-auth-and-security/02-auditability.md — Workstream 3).
19
+ * which turns Dates into strings (docs/07-auth-and-security/02-auditability.md — Workstream 3).
20
20
  */
21
21
  export interface AuditLogEntryView {
22
22
  id: string
@@ -67,7 +67,7 @@ function formatAuditValue(value: unknown): string {
67
67
  }
68
68
 
69
69
  /**
70
- * Document-grain audit log for a single document (docs/06-auth-and-security/02-auditability.md — Workstream
70
+ * Document-grain audit log for a single document (docs/07-auth-and-security/02-auditability.md — Workstream
71
71
  * 3, "Document history" tab): a chronological, newest-first list of the
72
72
  * non-versioned changes the version stream does not record — path /
73
73
  * available-locales writes, in-place status transitions, and the deletion
@@ -428,7 +428,7 @@ export const EditView = ({
428
428
  // Document-grain system fields write first via their own non-versioned
429
429
  // path — so a path conflict surfaces before we mint a content version,
430
430
  // and these immediate writes never reset workflow status. See
431
- // docs/07-internationalization/index.md.
431
+ // docs/08-internationalization/index.md.
432
432
  if (pathDirty || availableLocalesDirty) {
433
433
  await updateCollectionDocumentSystemFields({
434
434
  data: {
@@ -123,13 +123,13 @@ export const HistoryView = ({
123
123
  data: AnyCollectionSchemaTypes['HistoryType'] & {
124
124
  /**
125
125
  * Audit display labels (the acting user per version), resolved admin-side from each
126
- * version's `createdBy` id (see docs/06-auth-and-security/02-auditability.md — Workstream 1). Ids
126
+ * version's `createdBy` id (see docs/07-auth-and-security/02-auditability.md — Workstream 1). Ids
127
127
  * absent from the map belong to deleted users.
128
128
  */
129
129
  actors?: Record<string, { label: string }>
130
130
  }
131
131
  /**
132
- * Document-grain audit log for the "Document history" tab (docs/06-auth-and-security/02-auditability.md —
132
+ * Document-grain audit log for the "Document history" tab (docs/07-auth-and-security/02-auditability.md —
133
133
  * Workstream 3): the non-versioned path / available-locales / status
134
134
  * changes and the deletion event, with admin-resolved actor labels.
135
135
  */
@@ -153,7 +153,7 @@ export const HistoryView = ({
153
153
  const titleFieldName = collectionDefinition.useAsTitle
154
154
  const location = useRouterState({ select: (s) => s.location })
155
155
  const locale = (location.search as { locale?: string }).locale
156
- // Which sub-view is active (docs/06-auth-and-security/02-auditability.md — W3). Absent / anything but
156
+ // Which sub-view is active (docs/07-auth-and-security/02-auditability.md — W3). Absent / anything but
157
157
  // 'document' → the content version stream.
158
158
  const activeTab =
159
159
  (location.search as { tab?: string }).tab === 'document' ? 'document' : 'versions'
@@ -294,7 +294,7 @@ export const HistoryView = ({
294
294
  const versionNumber = desc
295
295
  ? total - (page - 1) * pageSize - rowIndex
296
296
  : (page - 1) * pageSize + rowIndex + 1
297
- // Audit strip (docs/06-auth-and-security/02-auditability.md — W1): who created this
297
+ // Audit strip (docs/07-auth-and-security/02-auditability.md — W1): who created this
298
298
  // version, via which action. A present-but-unresolved id
299
299
  // is a deleted user; an absent id is a row written before
300
300
  // audit wiring or an internal-tooling write.
@@ -19,7 +19,7 @@
19
19
  * Permission-gated both ends: hidden unless the actor holds
20
20
  * `collections.<path>.reindex` (the same ability the server fn re-asserts).
21
21
  * Synchronous — fine for small/medium collections; a large corpus wants a
22
- * backgrounded job (see docs/05-reading-and-delivery/07-search.md).
22
+ * backgrounded job (see docs/06-search/02-indexing-and-reindexing.md).
23
23
  */
24
24
 
25
25
  import type React from 'react'
@@ -33,7 +33,7 @@ const searchSchema = z.object({
33
33
  order: z.string().optional(),
34
34
  desc: z.coerce.boolean().optional(),
35
35
  locale: z.string().optional(),
36
- // Which sub-view of the history page is active (docs/06-auth-and-security/02-auditability.md — Workstream
36
+ // Which sub-view of the history page is active (docs/07-auth-and-security/02-auditability.md — Workstream
37
37
  // 3). 'versions' is the content version stream; 'document' is the
38
38
  // document-grain audit log. Absent → 'versions'.
39
39
  tab: z.enum(['versions', 'document']).optional(),
@@ -17,7 +17,7 @@ import { type ActorLabelMap, resolveActorLabels } from '../collections/actors.js
17
17
  import type { AuditLogEntryDto } from '../collections/audit.js'
18
18
 
19
19
  // ---------------------------------------------------------------------------
20
- // System-wide activity report (docs/06-auth-and-security/02-auditability.md — Workstream 4)
20
+ // System-wide activity report (docs/07-auth-and-security/02-auditability.md — Workstream 4)
21
21
  // ---------------------------------------------------------------------------
22
22
 
23
23
  /** Filters for the activity feed. `from` / `to` are ISO strings over the wire. */
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  /**
10
- * Admin-activity server fns (docs/06-auth-and-security/02-auditability.md — Workstream 4) — the
10
+ * Admin-activity server fns (docs/07-auth-and-security/02-auditability.md — Workstream 4) — the
11
11
  * system-wide activity report. Reads the adapter's audit queries directly
12
12
  * (cross-collection, includes admin-realm rows) behind the
13
13
  * `admin.activity.read` gate, rather than routing through a per-document
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  /**
10
- * Audit actor-label resolution (docs/06-auth-and-security/02-auditability.md — Workstream 1).
10
+ * Audit actor-label resolution (docs/07-auth-and-security/02-auditability.md — Workstream 1).
11
11
  *
12
12
  * Shaped documents carry only the raw `createdBy` uuid; turning ids into
13
13
  * display labels is an **admin-realm** concern, so it happens here — in
@@ -45,7 +45,7 @@ export interface AuditLogEntryDto {
45
45
  }
46
46
 
47
47
  // ---------------------------------------------------------------------------
48
- // Get document-grain audit log (docs/06-auth-and-security/02-auditability.md — Workstream 3)
48
+ // Get document-grain audit log (docs/07-auth-and-security/02-auditability.md — Workstream 3)
49
49
  // ---------------------------------------------------------------------------
50
50
 
51
51
  export const getCollectionDocumentAuditLog = createServerFn({ method: 'GET' })
@@ -69,7 +69,7 @@ export const getCollectionDocumentAuditLog = createServerFn({ method: 'GET' })
69
69
  pageSize: params?.page_size,
70
70
  })
71
71
 
72
- // Acting-user labels for the audit list (docs/06-auth-and-security/02-auditability.md — W3). Resolved
72
+ // Acting-user labels for the audit list (docs/07-auth-and-security/02-auditability.md — W3). Resolved
73
73
  // here, in the admin realm, from each entry's raw `actorId`; the UI joins
74
74
  // by id. System/tooling rows (NULL actorId) and deleted users are absent
75
75
  // from the map — the UI renders the corresponding tombstone label.
@@ -157,7 +157,7 @@ const getDocumentFn = createServerFn({ method: 'GET' })
157
157
  // `availableLocales` — the stored editorial set → initialises the
158
158
  // form-context slot / the checked state.
159
159
  // `_availableVersionLocales` — the ledger fact → drives each row's intent.
160
- // See docs/07-internationalization/index.md.
160
+ // See docs/08-internationalization/index.md.
161
161
  const availableLocales = (serialised as Record<string, any>).availableLocales as
162
162
  | string[]
163
163
  | undefined
@@ -61,7 +61,7 @@ export const getCollectionDocumentHistory = createServerFn({ method: 'GET' })
61
61
  const serialised = serialise(result)
62
62
  const { history } = getCollectionSchemasForPath(path)
63
63
 
64
- // Acting-user labels for the audit strip (docs/06-auth-and-security/02-auditability.md — W1).
64
+ // Acting-user labels for the audit strip (docs/07-auth-and-security/02-auditability.md — W1).
65
65
  // Resolved here, in the admin realm, from the page's raw `createdBy`
66
66
  // ids; the UI joins by id. Deleted users are absent from the map.
67
67
  const actors: ActorLabelMap = await resolveActorLabels(result.docs.map((d) => d.createdBy))
@@ -15,7 +15,7 @@
15
15
  * though the button is also permission-gated in the UI.
16
16
  *
17
17
  * Synchronous today (fine for small/medium collections). A large corpus wants
18
- * this backgrounded with progress — see docs/05-reading-and-delivery/07-search.md
18
+ * this backgrounded with progress — see docs/06-search/02-indexing-and-reindexing.md
19
19
  * ("reindex cost").
20
20
  */
21
21
 
@@ -22,7 +22,7 @@ import { ensureCollection } from '../../integrations/api-utils.js'
22
22
  // Document-grain system fields (`path`, `availableLocales`) are deliberately
23
23
  // NOT handled here: they are written through their own non-versioned path
24
24
  // (`updateCollectionDocumentSystemFields` below) so that editing them does not
25
- // mint a new version or reset workflow status. See docs/07-internationalization/index.md.
25
+ // mint a new version or reset workflow status. See docs/08-internationalization/index.md.
26
26
  // ---------------------------------------------------------------------------
27
27
 
28
28
  export const updateCollectionDocumentWithPatches = createServerFn({ method: 'POST' })