@ontosdk/next 1.3.0 → 1.3.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/ONTOROVIDER_USAGE.md +42 -83
- package/dist/cli.js +8 -6
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +8 -6
- package/dist/cli.mjs.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/config.mjs +2 -2
- package/dist/config.mjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/middleware.js +3 -3
- package/dist/middleware.js.map +1 -1
- package/dist/middleware.mjs +3 -3
- package/dist/middleware.mjs.map +1 -1
- package/package.json +1 -1
- package/src/cli.ts +34 -0
- package/src/config.ts +0 -16
- package/src/middleware.ts +7 -8
- package/dist/OntoHead.d.mts +0 -27
- package/dist/OntoHead.d.ts +0 -27
- package/dist/OntoProvider.d.mts +0 -52
- package/dist/OntoProvider.d.ts +0 -52
- package/dist/cli.d.mts +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/config.d.mts +0 -85
- package/dist/config.d.ts +0 -85
- package/dist/index.d.mts +0 -25
- package/dist/index.d.ts +0 -25
- package/dist/middleware.d.mts +0 -25
- package/dist/middleware.d.ts +0 -25
- package/dist/schemas.d.mts +0 -73
- package/dist/schemas.d.ts +0 -73
package/dist/schemas.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { OntoConfig } from './config.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* JSON-LD Schema generators for automatic structured data injection
|
|
5
|
-
* Follows Schema.org standards for AI-friendly metadata
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Standard AIO (AI Optimization) scoring methodology
|
|
10
|
-
* Based on the Onto scoring algorithm:
|
|
11
|
-
* - Content Negotiation: 40% (30 points)
|
|
12
|
-
* - React Tax / Token Efficiency: 35% (30 points)
|
|
13
|
-
* - Structured Data: 25% (25 points)
|
|
14
|
-
* - Semantic HTML: Bonus (15 points)
|
|
15
|
-
*/
|
|
16
|
-
interface AIOMethodologySchema {
|
|
17
|
-
'@context': 'https://schema.org';
|
|
18
|
-
'@type': 'HowTo';
|
|
19
|
-
name: string;
|
|
20
|
-
description: string;
|
|
21
|
-
step: Array<{
|
|
22
|
-
'@type': 'HowToStep';
|
|
23
|
-
name: string;
|
|
24
|
-
text: string;
|
|
25
|
-
position: number;
|
|
26
|
-
}>;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Generate AIO Scoring Methodology JSON-LD schema
|
|
30
|
-
* This explains to AI agents how the scoring system works
|
|
31
|
-
*/
|
|
32
|
-
declare function generateAIOMethodologySchema(config: OntoConfig, pageUrl: string): AIOMethodologySchema;
|
|
33
|
-
/**
|
|
34
|
-
* Organization schema for About pages
|
|
35
|
-
*/
|
|
36
|
-
interface OrganizationSchema {
|
|
37
|
-
'@context': 'https://schema.org';
|
|
38
|
-
'@type': 'Organization';
|
|
39
|
-
name: string;
|
|
40
|
-
url?: string;
|
|
41
|
-
description?: string;
|
|
42
|
-
logo?: string;
|
|
43
|
-
foundingDate?: string;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Generate Organization JSON-LD schema for About pages
|
|
47
|
-
*/
|
|
48
|
-
declare function generateOrganizationSchema(config: OntoConfig, pageUrl: string): OrganizationSchema | null;
|
|
49
|
-
/**
|
|
50
|
-
* AboutPage schema combining Organization and WebPage
|
|
51
|
-
*/
|
|
52
|
-
interface AboutPageSchema {
|
|
53
|
-
'@context': 'https://schema.org';
|
|
54
|
-
'@type': 'AboutPage';
|
|
55
|
-
name: string;
|
|
56
|
-
url: string;
|
|
57
|
-
description?: string;
|
|
58
|
-
mainEntity?: OrganizationSchema;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Generate AboutPage JSON-LD schema
|
|
62
|
-
*/
|
|
63
|
-
declare function generateAboutPageSchema(config: OntoConfig, pageUrl: string): AboutPageSchema;
|
|
64
|
-
/**
|
|
65
|
-
* Determine which schema to generate based on page type
|
|
66
|
-
*/
|
|
67
|
-
declare function generateSchemaForPageType(pageType: 'scoring' | 'about' | 'default', config: OntoConfig, pageUrl: string): any | null;
|
|
68
|
-
/**
|
|
69
|
-
* Serialize schema to JSON-LD script tag content
|
|
70
|
-
*/
|
|
71
|
-
declare function serializeSchema(schema: any | null): string | null;
|
|
72
|
-
|
|
73
|
-
export { type AIOMethodologySchema, type AboutPageSchema, type OrganizationSchema, generateAIOMethodologySchema, generateAboutPageSchema, generateOrganizationSchema, generateSchemaForPageType, serializeSchema };
|