@seedprotocol/mapping 0.7.4 → 0.7.5-next.871.g8788c94

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 (3) hide show
  1. package/CHANGELOG.md +65 -6
  2. package/README.md +18 -7
  3. package/package.json +16 -2
package/CHANGELOG.md CHANGED
@@ -1,6 +1,28 @@
1
1
  # Changelog
2
2
 
3
- ## 0.8.0
3
+ ## 0.6.10 (2026-10-04)
4
+
5
+ ### Commits
6
+
7
+ #### Other
8
+
9
+ - Fixing gas estimation. v0.6.10 (d5b161a1)
10
+
11
+ ## 0.6.7 (2026-10-01)
12
+
13
+ _Also covers 0.6.4, 0.6.5, 0.6.6, published from commits in this range._
14
+
15
+ ### Commits
16
+
17
+ #### Other
18
+
19
+ - Final edits (687d320b)
20
+
21
+ ## 0.6.3 (2026-09-25)
22
+
23
+ _Also covers 0.6.1, 0.6.2, published from commits in this range._
24
+
25
+ _Derive and assemble. This file used to list them under `0.8.0`, a mapping version that was never published. They first shipped in 0.6.3._
4
26
 
5
27
  - `ResolveJob` adds `'derive' | 'assemble'`. `FieldMapping.sourceId` is optional so a derive-only edge is legal.
6
28
  - Persist `derive?: { from: string; fallback?: boolean }` and `assemble?: { blocks: string[] }` on the edge. Mutators pass them through, including copy + `derive` fallback. Empty `sourceId` is omitted.
@@ -11,7 +33,7 @@
11
33
  - `resolvedSourceId` only suffixes `extract` / `file`.
12
34
  - Package `autoMap` is unchanged: it does not inject derive-only slug or default html to assemble.
13
35
 
14
- ## 0.7.0
36
+ _Relation lookup, listed in this file under `0.7.0` before the monorepo reached that number. It first shipped in 0.6.2._
15
37
 
16
38
  - Relation lookup is an edge-local stored intent: `FieldMapping.lookup.entries` as `{ value, ref }[]`. `ref` is opaque (`seedLocalId` or `seedUid`). Empty entries are a valid unassigned map.
17
39
  - `applyMapping` (sync) applies lookup entries and emits refs. Unmatched values are omitted. `applyMappingAsync` reports unmatched on `errors[]` and no longer calls the host `resolve` callback for lookup.
@@ -22,12 +44,22 @@
22
44
  - `MappingDocument.lookups` / `lookups` + `onLookupsChange` are deprecated read/write fallbacks for 0.6.0 documents.
23
45
  - `_pendingResolve` is extract/file only; lookup hits appear in the preview bag.
24
46
 
25
- ## 0.6.1
47
+ ### Commits
48
+
49
+ #### Other
50
+
51
+ - Fix Item proxy descriptors and FieldMapper stale mapping writes. (e26a927f)
52
+ - Add derive and assemble as FieldMapper resolve words. (31c5753b)
53
+ - Fixing bug so uid doesn't depend on CreatedAttestation (5e64192b)
54
+ - Improved field mapping relation handling (76c6b18c)
55
+
56
+ ## 0.6.0 (2026-09-22)
57
+
58
+ _Written as mapping 0.6.1._
26
59
 
27
60
  - `FieldMapper` `renderRowAccessory?: (row: FieldMapperRow) => ReactNode` — host chrome slot on each rows-layout row (`.fm-row-accessory` / `classNames.rowAccessory`), after the transform control and before remove. Package does not fetch or preview; hosts return `null` when idle (e.g. show **Preview** only for `resolve: 'extract' | 'file'`).
28
61
  - Optional `SourceNode.subtitle` for a secondary display line (inspector, wires card, source option labels). Prefer this over stuffing origin into `label`. Display-only — not part of `MappingDocument`.
29
-
30
- ## 0.6.0
62
+ _Written as mapping 0.6.0._
31
63
 
32
64
  - `FieldMapper` Phase 5: `layout` defaults to `'rows'`; `'wires'` is deprecated but still supported.
33
65
  - `FieldMapper` Phase 4: per-row lookup editors (`slots.lookups: 'row'`), row/JSON preview parity with sync `applyMapping` (+ `_pendingResolve`), JSON behind a `<details>` disclosure. Rows layout defaults `lookups` to `'row'`; wires keep `'section'`.
@@ -51,6 +83,33 @@
51
83
  - `autoMap` fans `link` / `url` sources out to matching URL-ish targets (`importUrl`, `canonicalUrl`, `url`, `link`, `permalink`).
52
84
  - `FieldMapper` supports attaching multiple properties from an active source without clearing prior edges; normalizes `@extract`/`@file` nodes to `resolve` on persist.
53
85
 
54
- ## 0.5.1
86
+ ### Commits
87
+
88
+ #### Features
89
+
90
+ - add FieldMapper row layout and useFieldMapper hook (32290d70)
91
+ - add resolve:lookup for relation value maps (c7a11b64)
92
+ - add resolve jobs, URL classifier, and AV media roles (ac9ef29c)
93
+ - allow one source to fan out to multiple properties (2f5b4840)
94
+
95
+ #### Other
96
+
97
+ - Responding to app developer requests (907b8cdf)
98
+ - Field mapper phase 5 work (61e7a518)
99
+ - Adding phase 4 work of mapping redesign (e3603ffa)
100
+ - Adding cursor rule. More theme work. (9a5b31fc)
101
+ - Additional improvements to address developer requests (1e6820ff)
102
+
103
+ ## 0.5.3 (2026-09-17)
104
+
105
+ _Also covers 0.5.2, published from commits in this range._
106
+
107
+ _Written as mapping 0.5.1._
55
108
 
56
109
  - Initial Phase 1 release: headless mapping core, markdown + RSS adapters, `FieldMapper` UI.
110
+
111
+ ### Commits
112
+
113
+ #### Features
114
+
115
+ - add @seedprotocol/mapping Phase 1 package (d97020cd)
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @seedprotocol/mapping
2
2
 
3
- Source → Seed model property mapping helpers and a props-driven React UI.
3
+ [![npm](https://img.shields.io/npm/v/@seedprotocol/mapping.svg)](https://www.npmjs.com/package/@seedprotocol/mapping)
4
+
5
+ Source → Seed model property mapping helpers and a props-driven React UI. Part of [Seed Protocol](https://seedprotocol.io); the mapped property bag is what you write to items with [`@seedprotocol/sdk`](https://www.npmjs.com/package/@seedprotocol/sdk).
4
6
 
5
7
  Use this package to:
6
8
 
@@ -18,14 +20,18 @@ fetches, runs Readability, or loads Seed Identity items.
18
20
  (`derive.from` is a property name; `assemble.blocks` is a host-owned string list).
19
21
  A derive-only edge may omit `sourceId`. Sync and async `applyMapping` skip these jobs.
20
22
 
21
- ## Install
23
+ ## Installation
22
24
 
23
25
  ```bash
24
- bun add @seedprotocol/mapping
26
+ npm install @seedprotocol/mapping
25
27
  ```
26
28
 
27
29
  The default entry (`@seedprotocol/mapping`) is headless — no React peer required.
28
- For `FieldMapper`, also install React peers and import from `@seedprotocol/mapping/react`.
30
+ For `FieldMapper`, also install the optional React peers (`react` and `react-dom`, 18 or 19) and import from `@seedprotocol/mapping/react`:
31
+
32
+ ```bash
33
+ npm install react react-dom
34
+ ```
29
35
 
30
36
  RSS parsing uses `rss-parser` with the same custom fields as `@seedprotocol/feed`
31
37
  `parseRssString` (aligned, no hard dependency on the feed package barrel).
@@ -88,11 +94,12 @@ const { properties, errors } = await applyMappingAsync(
88
94
  {
89
95
  resolve: async ({ job, url, contentType, rawValue }) => {
90
96
  if (job === 'extract') return await hostExtractHtml(url!)
91
- if (job === 'lookup') return await hostLookupIdentity(rawValue!)
92
97
  return await hostFetchAndStoreFile(url!, contentType)
93
98
  },
94
99
  },
95
100
  )
101
+ // `resolve` is only called for extract/file edges; lookup edges apply their
102
+ // stored `lookup.entries` (see below).
96
103
  ```
97
104
 
98
105
  ### Relation lookup (`resolve: 'lookup'`)
@@ -281,7 +288,7 @@ default html to assemble.
281
288
 
282
289
  Sync `applyMapping` preview lists pending **extract/file/derive/assemble** edges under `_pendingResolve`. Lookup refs from stored entries appear in the bag.
283
290
 
284
- See [FIELD_MAPPER_REDESIGN.md](../../docs/FIELD_MAPPER_REDESIGN.md) for the row-layout design study (Phases 1–5 shipped). PermaPress: [FIELD_MAPPER_PERMAPRESS_HANDOFF.md](../../docs/FIELD_MAPPER_PERMAPRESS_HANDOFF.md).
291
+ See [FIELD_MAPPER_REDESIGN.md](https://github.com/JournoLabs/seed-protocol-sdk/blob/main/docs/FIELD_MAPPER_REDESIGN.md) for the row-layout design study (Phases 1–5 shipped).
285
292
 
286
293
  ## Relationship to `FeedFieldManifest`
287
294
 
@@ -298,4 +305,8 @@ Compose them: map + resolve into a plain item, then optionally normalize roles f
298
305
  - RSS: top-level item fields via `parseRssString` (no general XPath); structured enclosure / media:content
299
306
  - UI: self-contained dark theme (or `theme="none"` / `"structural"` for host paint); `layout` defaults to `rows` (`wires` deprecated); no desktop/Tailwind coupling; no media preview player
300
307
 
301
- See [MAPPING_PHASE2.md](../../docs/MAPPING_PHASE2.md) for remaining consumer work (desktop migration, npm publish), [FIELD_MAPPER_REDESIGN.md](../../docs/FIELD_MAPPER_REDESIGN.md) for the row-layout study, and [FIELD_MAPPER_PERMAPRESS_HANDOFF.md](../../docs/FIELD_MAPPER_PERMAPRESS_HANDOFF.md) for PermaPress.
308
+ See [MAPPING_PHASE2.md](https://github.com/JournoLabs/seed-protocol-sdk/blob/main/docs/MAPPING_PHASE2.md) for remaining consumer work and [FIELD_MAPPER_REDESIGN.md](https://github.com/JournoLabs/seed-protocol-sdk/blob/main/docs/FIELD_MAPPER_REDESIGN.md) for the row-layout study.
309
+
310
+ ## License
311
+
312
+ MIT
package/package.json CHANGED
@@ -1,9 +1,19 @@
1
1
  {
2
2
  "name": "@seedprotocol/mapping",
3
- "version": "0.7.4",
4
- "description": "Source-to-model-property field mapping helpers and UI for Seed Protocol",
3
+ "version": "0.7.5-next.871.g8788c94",
4
+ "description": "Map markdown and RSS/Atom sources onto Seed Protocol model properties: headless mapping helpers plus an optional React FieldMapper UI",
5
+ "keywords": [
6
+ "seed-protocol",
7
+ "mapping",
8
+ "field-mapping",
9
+ "rss",
10
+ "markdown",
11
+ "import",
12
+ "react"
13
+ ],
5
14
  "type": "module",
6
15
  "main": "./dist/index.js",
16
+ "types": "./dist/index.d.ts",
7
17
  "exports": {
8
18
  ".": {
9
19
  "import": {
@@ -68,6 +78,10 @@
68
78
  "url": "git+https://github.com/JournoLabs/seed-protocol-sdk.git",
69
79
  "directory": "packages/mapping"
70
80
  },
81
+ "homepage": "https://github.com/JournoLabs/seed-protocol-sdk/tree/main/packages/mapping#readme",
82
+ "bugs": {
83
+ "url": "https://github.com/JournoLabs/seed-protocol-sdk/issues"
84
+ },
71
85
  "publishConfig": {
72
86
  "access": "public"
73
87
  }