@hypercerts-org/lexicon 0.10.0-beta.1 → 0.10.0-beta.3

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/CHANGELOG.md ADDED
@@ -0,0 +1,131 @@
1
+ # @hypercerts-org/lexicon
2
+
3
+ ## 0.10.0-beta.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ece7629`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/ece7629956d6efbfed757d66609fe4ccc1c81d5a) Thanks [@aspiers](https://github.com/aspiers)! - Include CHANGELOG.md in package distribution for better user documentation.
8
+
9
+ ## 0.10.0-beta.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`5a490bf`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/5a490bf4404f6690fe832f82023ea05663050977) Thanks [@aspiers](https://github.com/aspiers)! - Add basic test suite using vitest 4.
14
+
15
+ ## 0.10.0-beta.1
16
+
17
+ ### Minor Changes
18
+
19
+ - [`96bdb6c`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/96bdb6c9c7107680da301a92a8120ee60e676f15) Thanks [@aspiers](https://github.com/aspiers)! - Improved exports structure with semantic collection mappings for extra syntactic sugar.
20
+
21
+ **Breaking Changes:**
22
+ - Renamed `ids` export to `HYPERCERTS_NSIDS_BY_TYPE` (maps type namespaces to NSIDs)
23
+
24
+ **New Features:**
25
+ - Added `HYPERCERTS_NSIDS` object with semantic keys (e.g., `ACTIVITY`, `RIGHTS`, `CONTRIBUTION`)
26
+ - Added `HYPERCERTS_LEXICON_JSON` object with semantic keys mapping to raw JSON lexicons
27
+ - Added `HYPERCERTS_LEXICON_DOC` object with semantic keys mapping to typed lexicon documents
28
+ - All three new objects share the same key structure for consistency
29
+
30
+ **Migration Guide:**
31
+
32
+ If you were using the `ids` export (rare):
33
+
34
+ ```typescript
35
+ // Before
36
+ import { ids } from "@hypercerts-org/lexicon";
37
+ const nsid = ids.OrgHypercertsClaimActivity;
38
+
39
+ // After
40
+ import { HYPERCERTS_NSIDS_BY_TYPE } from "@hypercerts-org/lexicon";
41
+ const nsid = HYPERCERTS_NSIDS_BY_TYPE.OrgHypercertsClaimActivity;
42
+ ```
43
+
44
+ Most users should use individual NSID constants (unchanged):
45
+
46
+ ```typescript
47
+ import { ACTIVITY_NSID, RIGHTS_NSID } from "@hypercerts-org/lexicon";
48
+ ```
49
+
50
+ Or the new semantic mapping:
51
+
52
+ ```typescript
53
+ import { HYPERCERTS_NSIDS } from "@hypercerts-org/lexicon";
54
+ const nsid = HYPERCERTS_NSIDS.ACTIVITY; // Same as ACTIVITY_NSID
55
+ ```
56
+
57
+ - [`ec91289`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/ec912892497198741254a861fd9104fa7c6dc827) Thanks [@aspiers](https://github.com/aspiers)! - chore: switch to build via rollup
58
+
59
+ Major build system improvements:
60
+ - **Build System**: Migrated from direct TypeScript to Rollup-based builds
61
+ - Generates proper ESM (`dist/index.mjs`) and CommonJS (`dist/index.cjs`) bundles
62
+ - Generates TypeScript declarations (`dist/index.d.ts`)
63
+ - Includes source maps for debugging
64
+ - Adds `/lexicons` export for lighter bundle (validation only)
65
+ - **Code Generation**:
66
+ - Auto-generates `generated/exports.ts` with clean, organized exports
67
+ - Creates type shims for external lexicons (@atcute/leaflet)
68
+ - All generated code now in `generated/` directory (gitignored)
69
+ - **Package Exports**:
70
+ - Main export: `@hypercerts-org/lexicon` (full package with types)
71
+ - Lexicons export: `@hypercerts-org/lexicon/lexicons` (schemas only, smaller bundle)
72
+ - Proper dual package support (ESM + CommonJS)
73
+ - **Code Quality**:
74
+ - Added ESLint configuration
75
+ - Added TypeScript type-checking to CI
76
+ - Improved build validation workflow
77
+ - **Dependencies**:
78
+ - Added `@atcute/leaflet` for external lexicon references
79
+ - Added `multiformats` as runtime dependency
80
+ - Moved `@atproto/lex-cli` to devDependencies (build-time only)
81
+
82
+ **Migration**: No breaking changes for existing users. Package structure is improved
83
+ but import paths remain compatible.
84
+
85
+ ### Patch Changes
86
+
87
+ - [`913eb06`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/913eb06bcec519552f45f5d9797579ce99be1635) Thanks [@aspiers](https://github.com/aspiers)! - Switch from bundled to individual type declaration files
88
+
89
+ **Changes:**
90
+ - Removed `rollup-plugin-dts` dependency
91
+ - Switched to native TypeScript declaration generation
92
+ - Type declarations now mirror source structure in `dist/types/`
93
+ - Individual type files are small (1-3KB each) and lazy-loaded by TypeScript
94
+ - Improves IDE performance by avoiding single 39MB bundled declaration file
95
+
96
+ **Technical Details:**
97
+
98
+ The package now generates individual `.d.ts` files alongside the bundled JavaScript
99
+ output. This provides better IDE performance as TypeScript can lazy-load type files
100
+ on demand rather than parsing a massive bundled declaration file upfront.
101
+
102
+ ## 0.10.0-beta.0
103
+
104
+ ### Minor Changes
105
+
106
+ - [`6a62c04`](https://github.com/hypercerts-org/hypercerts-lexicon/commit/6a62c04e98950756a196110490cabd72f936a976) Thanks [@aspiers](https://github.com/aspiers)! - This release represents the migration of the lexicon package from the SDK monorepo (`hypercerts-sdk/packages/lexicon`) to a dedicated standalone repository (`hypercerts-lexicon`). This separation allows for independent versioning and development of the lexicon definitions.
107
+
108
+ Major architectural and feature updates compared to the SDK lexicon package include but are not limited to the following:
109
+
110
+ **New Lexicons:**
111
+ - Activity model: `org.hypercerts.claim.activity` - activity-based hypercert records (replaces single claim model)
112
+ - Project records: `org.hypercerts.claim.project` - projects that group multiple activities
113
+ - Shared definitions: `org.hypercerts.defs` - common types (uri, smallBlob, largeBlob, smallImage, largeImage)
114
+ - Badge system: `app.certified.badge.definition`, `app.certified.badge.award`, `app.certified.badge.response` for badge-based endorsements
115
+ - Funding receipts: `org.hypercerts.funding.receipt` - payment and funding tracking
116
+
117
+ **Architectural Changes:**
118
+ - **Claim model**: Replaced single `org.hypercerts.claim` record with activity-based `org.hypercerts.claim.activity` model
119
+ - **Collection model**: Collections now reference activities (via `activityWeight`) instead of claims (via `claimItem`)
120
+ - **Work scope**: Activity model uses structured `workScope` object with label-based conditions (`withinAllOf`, `withinAnyOf`, `withinNoneOf`)
121
+ - **Time fields**: Activity uses `startDate`/`endDate` instead of `workTimeFrameFrom`/`workTimeFrameTo`
122
+ - **Image references**: Activity model references `org.hypercerts.defs#smallImage` instead of `app.certified.defs#uri`/`smallBlob`
123
+
124
+ **Definition Updates:**
125
+ - `app.certified.defs` now includes `did` type definition
126
+ - Added `org.hypercerts.defs` with image and blob type definitions
127
+ - Activity model references project via AT-URI instead of strongRef
128
+
129
+ **Removed/Replaced:**
130
+ - `org.hypercerts.claim` (replaced by `org.hypercerts.claim.activity`)
131
+ - Top-level `org.hypercerts.collection` (replaced by `org.hypercerts.claim.collection` using activities)
package/dist/exports.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * ⚠️ DO NOT EDIT THIS FILE MANUALLY ⚠️
5
5
  *
6
6
  * This file is automatically generated by scripts/generate-exports.js
7
- * Generated: 2026-01-02T20:37:58.264Z
7
+ * Generated: 2026-01-04T01:24:32.988Z
8
8
  *
9
9
  * To regenerate this file, run:
10
10
  * npm run gen-api
@@ -4,7 +4,7 @@
4
4
  * ⚠️ DO NOT EDIT THIS FILE MANUALLY ⚠️
5
5
  *
6
6
  * This file is automatically generated by scripts/generate-exports.js
7
- * Generated: 2026-01-02T20:37:58.264Z
7
+ * Generated: 2026-01-04T01:24:32.988Z
8
8
  *
9
9
  * To regenerate this file, run:
10
10
  * npm run gen-api
package/dist/index.cjs CHANGED
@@ -2441,7 +2441,7 @@ var receipt = /*#__PURE__*/Object.freeze({
2441
2441
  * ⚠️ DO NOT EDIT THIS FILE MANUALLY ⚠️
2442
2442
  *
2443
2443
  * This file is automatically generated by scripts/generate-exports.js
2444
- * Generated: 2026-01-02T20:37:58.264Z
2444
+ * Generated: 2026-01-04T01:24:32.988Z
2445
2445
  *
2446
2446
  * To regenerate this file, run:
2447
2447
  * npm run gen-api