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.
- package/CHANGELOG.md +36 -264
- package/README.md +0 -62
- 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.
|
|
5
|
+
## [2.0.2] - 2026-01-07
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### ๐ Initial Public Release
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
First public release of **GEO Semantic Layer** - Framework-agnostic TypeScript library for Generative Engine Optimization (GEO) and structured data automation.
|
|
10
10
|
|
|
11
|
-
####
|
|
11
|
+
#### โจ Features
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
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
|
-
|
|
23
|
+
#### ๐ฆ Available Generators
|
|
20
24
|
|
|
21
|
-
|
|
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
|
-
|
|
24
|
-
```typescript
|
|
25
|
-
import { OrganizationSchema } from 'geo-semantic-layer/react';
|
|
35
|
+
#### ๐ฏ Framework Integration
|
|
26
36
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
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
|
-
- [
|
|
287
|
-
- [
|
|
288
|
-
- [
|
|
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.
|
|
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",
|