@happyvertical/smrt-content 0.43.6 → 0.43.7
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/README.md +5 -1
- package/agents/content-list.md +37 -0
- package/dist/index.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/smrt-knowledge.json +5 -5
- package/dist/svelte/components/ContentList.svelte +374 -16
- package/dist/svelte/components/ContentList.svelte.d.ts +3 -0
- package/dist/svelte/components/ContentList.svelte.d.ts.map +1 -1
- package/dist/svelte/content-list-query.d.ts +15 -0
- package/dist/svelte/content-list-query.d.ts.map +1 -1
- package/dist/svelte/content-list-runtime.d.ts +66 -0
- package/dist/svelte/content-list-runtime.d.ts.map +1 -0
- package/dist/svelte/content-list-runtime.js +249 -0
- package/dist/svelte/i18n.contribution.d.ts +14 -0
- package/dist/svelte/i18n.contribution.d.ts.map +1 -1
- package/dist/svelte/i18n.contribution.js +14 -0
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/index.js +1 -0
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -465,7 +465,7 @@ startup and seeds sample content (3 items) for immediate testing.
|
|
|
465
465
|
|
|
466
466
|
| Component | Props | Description |
|
|
467
467
|
|-----------|-------|-------------|
|
|
468
|
-
| `ContentList` | `contents`, `onEdit`, `onDelete`, `onAdd`, `getViewHref` |
|
|
468
|
+
| `ContentList` | `contents` or `query`, `jobs`, `onEdit`, `onDelete`, `onAdd`, `getViewHref` | Query-backed catalog with realtime freshness, background-job progress, retry, search, filters, and view toggles |
|
|
469
469
|
| `ContentEditor` | `content`, `contentId`, `onSave`, `onCancel` | Full content editor with metadata, assets, references |
|
|
470
470
|
| `GovernedContentEditor` | `content`, `contentId`, `onSave`, `onCancel` | Editor with integrated governance panel and review controls |
|
|
471
471
|
| `ContentAgentChat` | `contentId`, `apiBasePath` | AI chat sidebar for content with thread management |
|
|
@@ -476,6 +476,10 @@ startup and seeds sample content (3 items) for immediate testing.
|
|
|
476
476
|
| `ImageThumbnail` | `src`, `alt` | Thumbnail image display |
|
|
477
477
|
| `Markdown` | `source` | Markdown renderer |
|
|
478
478
|
|
|
479
|
+
`ContentList` retry handlers must return a new job attempt with a distinct
|
|
480
|
+
`jobId`. The controller retains the failed attempt as immutable history so a
|
|
481
|
+
late event from it cannot overwrite the retry result.
|
|
482
|
+
|
|
479
483
|
Applications that compose their own article editor can use
|
|
480
484
|
`createContentEditorState`, `getContentEditorAssetImageSource`, and
|
|
481
485
|
`resolveContentEditorImageSelection` to share the same form normalization,
|
package/agents/content-list.md
CHANGED
|
@@ -7,6 +7,43 @@ adapter (`src/svelte/content-list-controller.ts`) over a `DataTableController`,
|
|
|
7
7
|
and can source those rows either from a client array or from the bounded
|
|
8
8
|
content query endpoint. This doc covers both modes end to end.
|
|
9
9
|
|
|
10
|
+
## Realtime, freshness, and background workflows (#2455)
|
|
11
|
+
|
|
12
|
+
A server-backed list consumes the complete reactive seam exposed by
|
|
13
|
+
`remoteQuery(...)`: initial loading, stale-while-refreshing rows, error, retry,
|
|
14
|
+
last-updated time, and an optional query-shaped live subscription. ContentList
|
|
15
|
+
subscribes after its first request. The remote-query controller carries that
|
|
16
|
+
live intent across query changes, so search/filter/page changes rebind to the
|
|
17
|
+
new exact query rather than subscribing to the whole collection. Browser
|
|
18
|
+
`offline` keeps usable rows on screen and announces their freshness; `online`
|
|
19
|
+
calls the live handle's `reconnect()` (which refreshes the exact request before
|
|
20
|
+
resubscribing), or falls back to `refresh()` when the transport has no live
|
|
21
|
+
handle. A refresh failure over existing rows is an inline error and never
|
|
22
|
+
replaces them with an empty/error-only screen.
|
|
23
|
+
|
|
24
|
+
Long-running actions share a framework-free
|
|
25
|
+
`createContentListJobController()`. Give that controller to action controls and
|
|
26
|
+
pass it to ContentList as `jobs`. Its `submit({ actionId, submissionKey,
|
|
27
|
+
target }, start)` method coalesces duplicate active submission keys before
|
|
28
|
+
calling `start`, publishes the accepted job id/progress, and leaves a rejected
|
|
29
|
+
submission failed until an explicit retry. Server progress enters through
|
|
30
|
+
`update(job)`; terminal state cannot be reverted by an out-of-order progress
|
|
31
|
+
event. Row-targeted pending work disables that row's selection/edit/delete
|
|
32
|
+
controls.
|
|
33
|
+
|
|
34
|
+
Job targets are deliberately precise:
|
|
35
|
+
|
|
36
|
+
- `{ kind: 'rows', rowIds }` refreshes only when at least one affected row is
|
|
37
|
+
visible;
|
|
38
|
+
- `{ kind: 'query', queryKey }` refreshes only when the key equals
|
|
39
|
+
`contentListQueryRequestKey(activeRequest)`.
|
|
40
|
+
|
|
41
|
+
Only a transition to `succeeded` triggers that refresh. Failed jobs remain
|
|
42
|
+
visible with their error and retry affordance, so error recovery cannot report
|
|
43
|
+
success or refresh as though the action applied. The tracker is exported from
|
|
44
|
+
`@happyvertical/smrt-content/svelte` for the bulk-action slice to reuse rather
|
|
45
|
+
than creating a second pending-state machine.
|
|
46
|
+
|
|
10
47
|
## ContentList migration (#2451)
|
|
11
48
|
|
|
12
49
|
`ContentList` no longer holds bespoke local state. `src/svelte/content-list-controller.ts`
|