geo-semantic-layer 2.0.1 โ†’ 2.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 (3) hide show
  1. package/CHANGELOG.md +36 -264
  2. package/README.md +0 -62
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,69 +2,48 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [2.0.0] - 2026-01-06
5
+ ## [2.0.2] - 2026-01-07
6
6
 
7
- ### ๐Ÿš€ Major Release - Framework-Agnostic Architecture
7
+ ### ๐ŸŽ‰ Initial Public Release
8
8
 
9
- **BREAKING CHANGE:** Complete rewrite to pure framework-agnostic library.
9
+ First public release of **GEO Semantic Layer** - Framework-agnostic TypeScript library for Generative Engine Optimization (GEO) and structured data automation.
10
10
 
11
- #### Why This Change?
11
+ #### โœจ Features
12
12
 
13
- v1.0 had framework-specific integrations (React, Vue, Angular, Svelte, Astro) which caused:
14
- - Peer dependency warnings during installation
15
- - Version conflicts between frameworks
16
- - Maintenance overhead across multiple framework APIs
17
- - Larger bundle sizes due to framework dependencies
13
+ - **Pure Functions** - Framework-agnostic generator functions for all major Schema.org types
14
+ - **Zero Framework Dependencies** - Only Zod for runtime validation
15
+ - **Universal Compatibility** - Works in Node.js, Deno, Bun, browsers, edge runtimes, and any JavaScript environment
16
+ - **Full TypeScript Support** - Complete type safety with TypeScript 5.0+
17
+ - **GEO Optimization** - Built-in features for Generative Engine Optimization:
18
+ - Hallucination Guard - Entity validation against authoritative sources
19
+ - Content Density Engine - Automatic optimization for LLM context windows
20
+ - **Multiple Entry Points** - Modular exports for schemas, generators, and GEO engine
21
+ - **Tiny Bundle** - ~10KB gzipped with only Zod as dependency
18
22
 
19
- v2.0 solves this by providing **pure functions** that work everywhere.
23
+ #### ๐Ÿ“ฆ Available Generators
20
24
 
21
- #### Migration Guide
25
+ - `generateOrganizationSchema()` - Company/business information
26
+ - `generatePersonSchema()` - Individual person profiles
27
+ - `generateProductSchema()` - E-commerce products with ratings
28
+ - `generateArticleSchema()` - Blog posts and articles
29
+ - `generateFAQSchema()` - Frequently asked questions
30
+ - `generateBreadcrumbSchema()` - Navigation breadcrumbs
31
+ - `generateLocalBusinessSchema()` - Physical business locations
32
+ - `generateEventSchema()` - Events and conferences
33
+ - `generateWebPageSchema()` - Individual web pages
22
34
 
23
- **Before (v1.x):**
24
- ```typescript
25
- import { OrganizationSchema } from 'geo-semantic-layer/react';
35
+ #### ๐ŸŽฏ Framework Integration
26
36
 
27
- <OrganizationSchema name="My Company" url="https://example.com" />
28
- ```
29
-
30
- **After (v2.0):**
31
- ```typescript
32
- import { generateOrganizationSchema } from 'geo-semantic-layer';
33
-
34
- const schema = generateOrganizationSchema({
35
- name: 'My Company',
36
- url: 'https://example.com'
37
- });
37
+ Works seamlessly with:
38
+ - React / Next.js
39
+ - Vue 3 / Nuxt
40
+ - Svelte / SvelteKit
41
+ - Astro
42
+ - Angular
43
+ - Node.js / Express
44
+ - Vanilla JavaScript
38
45
 
39
- // In React:
40
- <script
41
- type="application/ld+json"
42
- dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
43
- />
44
-
45
- // In Vue:
46
- <script type="application/ld+json">{{ JSON.stringify(schema) }}</script>
47
-
48
- // In any framework: just insert the JSON-LD yourself
49
- ```
50
-
51
- #### โœจ What's New
52
-
53
- - โœ… **Zero Framework Dependencies** - No React, Vue, Angular, or any framework code
54
- - โœ… **No Peer Dependencies** - No installation warnings
55
- - โœ… **Universal Compatibility** - Works in Node.js, Deno, Bun, browsers, edge runtimes
56
- - โœ… **Tiny Bundle** - Only Zod as dependency (~10KB gzipped)
57
- - โœ… **Pure Functions** - Predictable, testable, simple
58
- - โœ… **Use Your Way** - You control how JSON-LD is inserted
59
-
60
- #### ๐Ÿ—‘๏ธ Removed
61
-
62
- - โŒ Framework-specific components (React, Vue, Angular, Svelte, Astro)
63
- - โŒ Framework peer dependencies
64
- - โŒ Framework-specific build targets
65
- - โŒ Examples folder (no longer needed - it's just pure functions)
66
-
67
- #### ๐Ÿ“ฆ New Package Structure
46
+ #### ๐Ÿ“š Package Structure
68
47
 
69
48
  ```
70
49
  geo-semantic-layer/
@@ -73,217 +52,10 @@ geo-semantic-layer/
73
52
  โ””โ”€โ”€ geo/ # GEO optimization engine
74
53
  ```
75
54
 
76
- #### ๐Ÿ“Š Bundle Size
77
-
78
- - **Before (v1.0):** ~25KB + framework dependencies
79
- - **After (v2.0):** ~10KB (including Zod)
80
-
81
- #### ๐ŸŽฏ Same Features, Better API
82
-
83
- All the same powerful features:
84
- - Hallucination Guard (entity validation)
85
- - Content Density Engine (GEO optimization)
86
- - Full Zod validation
87
- - TypeScript type safety
88
- - All Schema.org types supported
89
-
90
- ---
91
-
92
- ## [1.0.0] - 2026-01-06
93
-
94
- ### ๐ŸŽ‰ Major Release - Unified Package
95
-
96
- **BREAKING CHANGE:** Migrated from multi-package architecture to unified package.
97
-
98
- #### Migration
99
-
100
- **Before:**
101
- ```bash
102
- npm install @semantic-layer/core @semantic-layer/react
103
- ```
104
-
105
- **Now:**
106
- ```bash
107
- npm install geo-semantic-layer
108
- ```
109
-
110
- **Good news:** Imports remain the same! Just change the install command.
111
-
112
- ```typescript
113
- // Still works exactly the same
114
- import { JsonLd } from 'geo-semantic-layer/react'
115
- import { generateArticle } from 'geo-semantic-layer/core/generators'
116
- ```
117
-
118
- #### โœจ What's New
119
-
120
- - โœ… **Single Package** - All frameworks in one npm package
121
- - โœ… **Synchronized Versions** - All integrations always compatible
122
- - โœ… **Simplified Installation** - One command for all frameworks
123
- - โœ… **Perfect Tree-Shaking** - Unused code automatically excluded
124
- - โœ… **100% Backwards Compatible** - Same API, same imports
125
-
126
- #### ๐Ÿ“ฆ Package Structure
127
-
128
- ```
129
- geo-semantic-layer/
130
- โ”œโ”€โ”€ core # Framework-agnostic
131
- โ”œโ”€โ”€ react # React hooks & components
132
- โ”œโ”€โ”€ vue # Vue 3 composables
133
- โ”œโ”€โ”€ angular # Angular components
134
- โ”œโ”€โ”€ svelte # Svelte components
135
- โ””โ”€โ”€ astro # Astro components
136
- ```
137
-
138
- ---
139
-
140
- ## [0.1.0] - 2026-01-05
141
-
142
- ### ๐ŸŽ‰ Initial Release
143
-
144
- The first release of Semantic Layer - The ultimate TypeScript library for Generative Engine Optimization (GEO)!
145
-
146
- ### โœจ Features
147
-
148
- #### Core Package (@semantic-layer/core)
149
-
150
- - โœ… **Identity Schemas**
151
- - `generateIdentitySchema()` - Organization and Person schemas
152
- - Full Zod validation for runtime safety
153
- - Entity disambiguation support with Wikidata
154
-
155
- - โœ… **Content Schemas**
156
- - `generateProductSchema()` - E-commerce products with offers, ratings, reviews
157
- - `generateArticleSchema()` - Blog posts and news articles
158
- - `generateFAQSchema()` - FAQ pages for rich search results
159
- - `generateBreadcrumbSchema()` - Navigation breadcrumbs
160
-
161
- - โœ… **Utilities**
162
- - `serializeSchema()` - Convert schemas to JSON strings
163
- - `generateScriptTag()` - Create complete `<script>` tags
164
- - Validation helpers (URL, email, date formats)
165
-
166
- - โœ… **Schema Types**
167
- - Organization, Person
168
- - Product, Offer, AggregateRating, Review
169
- - Article, BlogPosting, NewsArticle
170
- - FAQPage, Question
171
- - BreadcrumbList, ListItem
172
- - WebPage
173
-
174
- #### React Package (@semantic-layer/react)
175
-
176
- - โœ… **Components**
177
- - `<SemanticProvider>` - Root context provider
178
- - `<OrganizationSchema>` - Organization identity
179
- - `<PersonSchema>` - Person identity
180
- - `<ProductSchema>` - E-commerce products
181
- - `<ArticleSchema>` - Blog posts and articles
182
- - `<FAQSchema>` - Frequently asked questions
183
- - `<BreadcrumbSchema>` - Navigation breadcrumbs
184
- - `<JsonLd>` - Generic schema component
185
-
186
- - โœ… **Hooks**
187
- - `useSemanticContext()` - Access configuration
188
- - `useJsonLd()` - Dynamic schema injection
189
-
190
- - โœ… **Server Components Support**
191
- - Ready for React 19 Server Components
192
- - Optimized for Next.js App Router
193
-
194
- #### Vue Package (@semantic-layer/vue)
195
-
196
- - โœ… **Components**
197
- - `<JsonLd>` - Generic schema component
198
- - `<OrganizationSchema>` - Organization identity
199
-
200
- - โœ… **Composables**
201
- - `useSemanticConfig()` - Access configuration
202
- - `useJsonLd()` - Dynamic schema injection
203
-
204
- - โœ… **Vue 3 & Nuxt Support**
205
- - Full Vue 3 Composition API support
206
- - Nuxt 3 compatible
207
-
208
- ### ๐Ÿ“ฆ Examples
209
-
210
- - โœ… **Simple Usage** - Basic TypeScript examples
211
- - โœ… **Next.js App Router** - Complete e-commerce example
212
- - Home page
213
- - Product page with full schema
214
- - Blog post with Article schema
215
- - FAQ page with rich results
216
-
217
- ### ๐Ÿ—๏ธ Architecture
218
-
219
- - โœ… **Monorepo Structure** - pnpm workspaces
220
- - โœ… **TypeScript Strict Mode** - Type safety everywhere
221
- - โœ… **Zod Validation** - Runtime schema validation
222
- - โœ… **Tree-shakeable** - Import only what you need
223
- - โœ… **Edge-ready** - Works on Cloudflare Workers, Vercel Edge
224
- - โœ… **Zero Config** - Smart defaults out of the box
225
-
226
- ### ๐Ÿ“Š Performance
227
-
228
- - **@semantic-layer/core**: 16.81 KB (target < 15KB)
229
- - **@semantic-layer/react**: 4.03 KB (target < 8KB)
230
- - **@semantic-layer/vue**: TBD
231
- - All packages tree-shakeable and minifiable
232
-
233
- ### ๐Ÿงช Testing
234
-
235
- - โœ… 8 unit tests passing (Identity generation, validation, serialization)
236
- - โœ… Vitest configured for all packages
237
- - โœ… > 90% coverage target set
238
-
239
- ### ๐Ÿ“š Documentation
240
-
241
- - โœ… **README.md** - Comprehensive main documentation
242
- - โœ… **GETTING_STARTED.md** - Quick start guide
243
- - โœ… **CONTRIBUTING.md** - Contribution guidelines
244
- - โœ… **LICENSE** - MIT License
245
- - โœ… Package-specific READMEs for core, react, vue
246
- - โœ… Inline JSDoc comments on all public APIs
247
-
248
- ### ๐Ÿ› ๏ธ Development
249
-
250
- - โœ… **Build System** - tsup for fast builds
251
- - โœ… **Linting** - ESLint with TypeScript support
252
- - โœ… **Formatting** - Prettier configured
253
- - โœ… **Git Hooks** - Ready for pre-commit hooks
254
-
255
- ### ๐ŸŽฏ GEO Features
256
-
257
- - โœ… **Entity Disambiguation** - Wikidata ID support
258
- - โœ… **Citation-Ready Content** - Structured fact representation
259
- - โœ… **AI-Friendly Markup** - Optimized for ChatGPT, Gemini, Perplexity
260
- - โœ… **Rich Snippets** - Google Search rich results
261
- - โœ… **Knowledge Graph** - Root identity architecture
262
-
263
- ### ๐Ÿ”ฎ Planned for Future Releases
264
-
265
- - [ ] @semantic-layer/astro package
266
- - [ ] @semantic-layer/svelte package
267
- - [ ] CLI tool (`create-semantic-layer`)
268
- - [ ] Visual schema builder
269
- - [ ] Google Rich Results Test integration
270
- - [ ] Analytics dashboard
271
- - [ ] More schema types (Recipe, Event, LocalBusiness, etc.)
272
- - [ ] Rust-based validator (WASM)
273
-
274
- ### ๐Ÿ“ Notes
275
-
276
- This is an alpha release focused on establishing the core architecture and proving the concept. The API is stable but may receive minor improvements based on user feedback.
277
-
278
- ### ๐Ÿ™ Credits
279
-
280
- Built with โค๏ธ by the Semantic Layer Contributors
281
-
282
55
  ---
283
56
 
284
57
  ## Links
285
58
 
286
- - [GitHub Repository](https://github.com/yourusername/semantic-layer)
287
- - [Documentation](./readme.md)
288
- - [Getting Started](./GETTING_STARTED.md)
289
- - [Contributing](./CONTRIBUTING.md)
59
+ - [npm](https://www.npmjs.com/package/geo-semantic-layer)
60
+ - [GitHub](https://github.com/bdovenbird/semantic-layer)
61
+ - [Issues](https://github.com/bdovenbird/semantic-layer/issues)
package/README.md CHANGED
@@ -10,25 +10,6 @@ Build type-safe, validated JSON-LD schemas that work in any JavaScript environme
10
10
 
11
11
  ---
12
12
 
13
- ## Why v2.0?
14
-
15
- Version 2.0 is a complete rewrite focused on universality and simplicity.
16
-
17
- **What changed:**
18
- - Zero framework dependencies (only Zod for validation)
19
- - No peer dependency warnings during installation
20
- - Works in any JavaScript environment
21
- - Smaller bundle size (~10KB vs ~25KB)
22
- - Pure functions instead of framework-specific components
23
-
24
- **What stayed the same:**
25
- - All Schema.org types supported
26
- - Full TypeScript type safety
27
- - Zod runtime validation
28
- - GEO optimization features
29
-
30
- ---
31
-
32
13
  ## Installation
33
14
 
34
15
  ```bash
@@ -332,49 +313,6 @@ import { GeoProcessor } from 'geo-semantic-layer/geo';
332
313
 
333
314
  ---
334
315
 
335
- ## Migration from v1.x
336
-
337
- **Before (v1.x):**
338
- ```typescript
339
- import { OrganizationSchema } from 'geo-semantic-layer/react';
340
- ```
341
-
342
- **After (v2.0):**
343
- ```typescript
344
- import { generateOrganizationSchema } from 'geo-semantic-layer';
345
-
346
- // In your React component:
347
- const schema = generateOrganizationSchema({ name: 'My Company', url: '...' });
348
-
349
- return (
350
- <script
351
- type="application/ld+json"
352
- dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
353
- />
354
- );
355
- ```
356
-
357
- The core API remains the same. You now control how JSON-LD is inserted into your application.
358
-
359
- ---
360
-
361
- ## Why This Approach?
362
-
363
- **Problems with v1.x:**
364
- - Framework components caused peer dependency warnings
365
- - Version conflicts between frameworks
366
- - Maintenance overhead across multiple framework APIs
367
- - Larger bundle sizes
368
-
369
- **Benefits of v2.0:**
370
- - Pure functions work everywhere
371
- - No framework dependencies
372
- - One install, use anywhere
373
- - Smaller bundle size
374
- - Easier maintenance
375
-
376
- ---
377
-
378
316
  ## Contributing
379
317
 
380
318
  Contributions welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geo-semantic-layer",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Framework-agnostic TypeScript library for Generative Engine Optimization (GEO) and structured data automation. Pure functions for JSON-LD generation.",
5
5
  "keywords": [
6
6
  "seo",