@molecule/app-audit-log-row-react 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +122 -0
  2. package/package.json +16 -9
package/README.md ADDED
@@ -0,0 +1,122 @@
1
+ <!--
2
+ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
+ Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
+ Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
+ To change this document, edit the module-level JSDoc in src/index.ts.
6
+ Generated: 2026-08-04T01:50:05.040Z
7
+ -->
8
+
9
+ # @molecule/app-audit-log-row-react
10
+
11
+ > **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
12
+ > It is written to be read by coding agents as much as by people, and is generated from this
13
+ > package's source — edit `src/index.ts` JSDoc, not this file.
14
+
15
+ Audit / activity / event-log row.
16
+
17
+ Exports `<AuditLogRow>` and `AuditLogEntry` type.
18
+
19
+ ## Quick Start
20
+
21
+ ```tsx
22
+ import { AuditLogRow } from '@molecule/app-audit-log-row-react'
23
+
24
+ ;<AuditLogRow
25
+ entry={{
26
+ id: 'evt-001',
27
+ actor: 'alice@example.com',
28
+ action: 'updated',
29
+ target: 'Invoice #1042',
30
+ timestamp: '2 min ago',
31
+ oldValue: 'Draft',
32
+ newValue: 'Sent',
33
+ }}
34
+ onClick={() => openDetail('evt-001')}
35
+ />
36
+ ```
37
+
38
+ ## Type
39
+
40
+ `feature`
41
+
42
+ ## Installation
43
+
44
+ ```bash
45
+ npm install @molecule/app-audit-log-row-react @molecule/app-react @molecule/app-ui @molecule/app-ui-react react
46
+ npm install -D @types/react
47
+ ```
48
+
49
+ ## API
50
+
51
+ ### Interfaces
52
+
53
+ #### `AuditLogEntry`
54
+
55
+ Shape of a single audit / activity log entry displayed by AuditLogRow.
56
+
57
+ ```typescript
58
+ interface AuditLogEntry {
59
+ id: string
60
+ /** Actor name or id. */
61
+ actor: ReactNode
62
+ /** Verb describing what happened ("updated", "deleted", "assigned"). */
63
+ action: ReactNode
64
+ /** Target object / record. */
65
+ target?: ReactNode
66
+ /** Pre-formatted display timestamp (rendered verbatim — format before passing, e.g. "2 min ago"). */
67
+ timestamp: ReactNode
68
+ /** Optional summary field for delta display — old + new values. */
69
+ oldValue?: ReactNode
70
+ newValue?: ReactNode
71
+ /** Environment / source badge. */
72
+ environment?: ReactNode
73
+ /** Optional trace or correlation id. */
74
+ traceId?: ReactNode
75
+ }
76
+ ```
77
+
78
+ #### `AuditLogRowProps`
79
+
80
+ Props for {@link AuditLogRow}.
81
+
82
+ ```typescript
83
+ interface AuditLogRowProps {
84
+ entry: AuditLogEntry
85
+ /** Called when the row is clicked. */
86
+ onClick?: () => void
87
+ /** Extra classes. */
88
+ className?: string
89
+ }
90
+ ```
91
+
92
+ ### Functions
93
+
94
+ #### `AuditLogRow(props)`
95
+
96
+ One row of an audit / activity / event log. Shape:
97
+ `[actor] [action] [target] · [timestamp]` with optional
98
+ `[old → new]` diff line and environment/trace metadata.
99
+
100
+ ```typescript
101
+ function AuditLogRow({ entry, onClick, className }: AuditLogRowProps): JSX.Element
102
+ ```
103
+
104
+ - `props` — Component props (see {@link AuditLogRowProps}).
105
+
106
+ ## Injection Notes
107
+
108
+ ### Requirements
109
+
110
+ Peer dependencies:
111
+
112
+ - `@molecule/app-react` ^1.0.1
113
+ - `@molecule/app-ui` ^1.0.1
114
+ - `@molecule/app-ui-react` ^1.0.1
115
+ - `react` ^18.0.0 || ^19.0.0
116
+
117
+ ### Runtime Dependencies
118
+
119
+ - `@molecule/app-react`
120
+ - `@molecule/app-ui`
121
+ - `@molecule/app-ui-react`
122
+ - `react`
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@molecule/app-audit-log-row-react",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Audit / error / event-log row: actor + action + object + timestamp + old/new values",
5
+ "homepage": "https://www.molecule.dev/packages/app-audit-log-row-react",
5
6
  "type": "module",
6
7
  "main": "dist/index.js",
7
8
  "types": "dist/index.d.ts",
@@ -17,7 +18,8 @@
17
18
  }
18
19
  },
19
20
  "files": [
20
- "dist"
21
+ "dist",
22
+ "README.md"
21
23
  ],
22
24
  "keywords": [
23
25
  "molecule",
@@ -25,16 +27,21 @@
25
27
  "react"
26
28
  ],
27
29
  "license": "Apache-2.0",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/molecule-dev/molecule.git",
33
+ "directory": "packages/app/features/audit-log-row-react"
34
+ },
28
35
  "peerDependencies": {
29
- "@molecule/app-react": "^1.0.0",
30
- "@molecule/app-ui": "^1.0.0",
31
- "@molecule/app-ui-react": "^1.0.0",
36
+ "@molecule/app-react": "^1.0.1",
37
+ "@molecule/app-ui": "^1.0.1",
38
+ "@molecule/app-ui-react": "^1.0.1",
32
39
  "react": "^18.0.0 || ^19.0.0"
33
40
  },
34
41
  "devDependencies": {
35
- "@molecule/app-react": "1.0.0",
36
- "@molecule/app-ui": "1.0.0",
37
- "@molecule/app-ui-react": "1.0.0",
42
+ "@molecule/app-react": "1.5.1",
43
+ "@molecule/app-ui": "1.1.1",
44
+ "@molecule/app-ui-react": "1.0.2",
38
45
  "@testing-library/dom": "10.4.1",
39
46
  "@testing-library/react": "16.3.2",
40
47
  "@types/node": "26.1.2",
@@ -44,6 +51,6 @@
44
51
  "react": "19.2.8",
45
52
  "react-dom": "19.2.8",
46
53
  "typescript": "6.0.3",
47
- "vitest": "4.1.10"
54
+ "vitest": "4.1.11"
48
55
  }
49
56
  }