@krantho/seo 0.0.0-stage → 1.0.1

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 (243) hide show
  1. package/LICENSE +21 -0
  2. package/dist/archetypes/define-archetype.d.ts +23 -0
  3. package/dist/archetypes/define-archetype.d.ts.map +1 -0
  4. package/dist/archetypes/define-archetype.js +51 -0
  5. package/dist/archetypes/define-archetype.js.map +1 -0
  6. package/dist/archetypes/index.d.ts +4 -0
  7. package/dist/archetypes/index.d.ts.map +1 -0
  8. package/dist/archetypes/index.js +3 -0
  9. package/dist/archetypes/index.js.map +1 -0
  10. package/dist/archetypes/presets.d.ts +21 -0
  11. package/dist/archetypes/presets.d.ts.map +1 -0
  12. package/dist/archetypes/presets.js +42 -0
  13. package/dist/archetypes/presets.js.map +1 -0
  14. package/dist/archetypes/types.d.ts +20 -0
  15. package/dist/archetypes/types.d.ts.map +1 -0
  16. package/dist/archetypes/types.js +2 -0
  17. package/dist/archetypes/types.js.map +1 -0
  18. package/dist/catalog/auto-mappings.d.ts +39 -0
  19. package/dist/catalog/auto-mappings.d.ts.map +1 -0
  20. package/dist/catalog/auto-mappings.js +64 -0
  21. package/dist/catalog/auto-mappings.js.map +1 -0
  22. package/dist/catalog/index.d.ts +7 -0
  23. package/dist/catalog/index.d.ts.map +1 -0
  24. package/dist/catalog/index.js +4 -0
  25. package/dist/catalog/index.js.map +1 -0
  26. package/dist/catalog/properties.d.ts +9 -0
  27. package/dist/catalog/properties.d.ts.map +1 -0
  28. package/dist/catalog/properties.js +630 -0
  29. package/dist/catalog/properties.js.map +1 -0
  30. package/dist/catalog/property-atoms.d.ts +53 -0
  31. package/dist/catalog/property-atoms.d.ts.map +1 -0
  32. package/dist/catalog/property-atoms.js +170 -0
  33. package/dist/catalog/property-atoms.js.map +1 -0
  34. package/dist/catalog/types.d.ts +53 -0
  35. package/dist/catalog/types.d.ts.map +1 -0
  36. package/dist/catalog/types.js +423 -0
  37. package/dist/catalog/types.js.map +1 -0
  38. package/dist/create-seo.d.ts +70 -0
  39. package/dist/create-seo.d.ts.map +1 -0
  40. package/dist/create-seo.js +137 -0
  41. package/dist/create-seo.js.map +1 -0
  42. package/dist/decorators/breadcrumb.d.ts +12 -0
  43. package/dist/decorators/breadcrumb.d.ts.map +1 -0
  44. package/dist/decorators/breadcrumb.js +36 -0
  45. package/dist/decorators/breadcrumb.js.map +1 -0
  46. package/dist/decorators/index.d.ts +8 -0
  47. package/dist/decorators/index.d.ts.map +1 -0
  48. package/dist/decorators/index.js +13 -0
  49. package/dist/decorators/index.js.map +1 -0
  50. package/dist/decorators/nodes.d.ts +12 -0
  51. package/dist/decorators/nodes.d.ts.map +1 -0
  52. package/dist/decorators/nodes.js +29 -0
  53. package/dist/decorators/nodes.js.map +1 -0
  54. package/dist/decorators/page.d.ts +13 -0
  55. package/dist/decorators/page.d.ts.map +1 -0
  56. package/dist/decorators/page.js +68 -0
  57. package/dist/decorators/page.js.map +1 -0
  58. package/dist/decorators/registry.d.ts +11 -0
  59. package/dist/decorators/registry.d.ts.map +1 -0
  60. package/dist/decorators/registry.js +29 -0
  61. package/dist/decorators/registry.js.map +1 -0
  62. package/dist/decorators/sequence.d.ts +8 -0
  63. package/dist/decorators/sequence.d.ts.map +1 -0
  64. package/dist/decorators/sequence.js +22 -0
  65. package/dist/decorators/sequence.js.map +1 -0
  66. package/dist/decorators/types.d.ts +30 -0
  67. package/dist/decorators/types.d.ts.map +1 -0
  68. package/dist/decorators/types.js +2 -0
  69. package/dist/decorators/types.js.map +1 -0
  70. package/dist/define-seo.d.ts +21 -0
  71. package/dist/define-seo.d.ts.map +1 -0
  72. package/dist/define-seo.js +31 -0
  73. package/dist/define-seo.js.map +1 -0
  74. package/dist/graph/build-entity.d.ts +47 -0
  75. package/dist/graph/build-entity.d.ts.map +1 -0
  76. package/dist/graph/build-entity.js +69 -0
  77. package/dist/graph/build-entity.js.map +1 -0
  78. package/dist/graph/compose-from-config.d.ts +89 -0
  79. package/dist/graph/compose-from-config.d.ts.map +1 -0
  80. package/dist/graph/compose-from-config.js +189 -0
  81. package/dist/graph/compose-from-config.js.map +1 -0
  82. package/dist/graph/compose-graph.d.ts +40 -0
  83. package/dist/graph/compose-graph.d.ts.map +1 -0
  84. package/dist/graph/compose-graph.js +30 -0
  85. package/dist/graph/compose-graph.js.map +1 -0
  86. package/dist/graph/effective-config.d.ts +36 -0
  87. package/dist/graph/effective-config.d.ts.map +1 -0
  88. package/dist/graph/effective-config.js +84 -0
  89. package/dist/graph/effective-config.js.map +1 -0
  90. package/dist/graph/id-conventions.d.ts +47 -0
  91. package/dist/graph/id-conventions.d.ts.map +1 -0
  92. package/dist/graph/id-conventions.js +78 -0
  93. package/dist/graph/id-conventions.js.map +1 -0
  94. package/dist/graph/index.d.ts +9 -0
  95. package/dist/graph/index.d.ts.map +1 -0
  96. package/dist/graph/index.js +4 -0
  97. package/dist/graph/index.js.map +1 -0
  98. package/dist/graph/resolve-properties.d.ts +36 -0
  99. package/dist/graph/resolve-properties.d.ts.map +1 -0
  100. package/dist/graph/resolve-properties.js +141 -0
  101. package/dist/graph/resolve-properties.js.map +1 -0
  102. package/dist/graph/resolve-references.d.ts +14 -0
  103. package/dist/graph/resolve-references.d.ts.map +1 -0
  104. package/dist/graph/resolve-references.js +49 -0
  105. package/dist/graph/resolve-references.js.map +1 -0
  106. package/dist/graph/typed-value.d.ts +7 -0
  107. package/dist/graph/typed-value.d.ts.map +1 -0
  108. package/dist/graph/typed-value.js +43 -0
  109. package/dist/graph/typed-value.js.map +1 -0
  110. package/dist/graph/types.d.ts +34 -0
  111. package/dist/graph/types.d.ts.map +1 -0
  112. package/dist/graph/types.js +2 -0
  113. package/dist/graph/types.js.map +1 -0
  114. package/dist/graph/value-scope.d.ts +19 -0
  115. package/dist/graph/value-scope.d.ts.map +1 -0
  116. package/dist/graph/value-scope.js +30 -0
  117. package/dist/graph/value-scope.js.map +1 -0
  118. package/dist/index.d.ts +28 -0
  119. package/dist/index.d.ts.map +1 -0
  120. package/dist/index.js +29 -0
  121. package/dist/index.js.map +1 -0
  122. package/dist/json-ld.d.ts +24 -0
  123. package/dist/json-ld.d.ts.map +1 -0
  124. package/dist/json-ld.js +24 -0
  125. package/dist/json-ld.js.map +1 -0
  126. package/dist/profiles/bing.d.ts +10 -0
  127. package/dist/profiles/bing.d.ts.map +1 -0
  128. package/dist/profiles/bing.js +13 -0
  129. package/dist/profiles/bing.js.map +1 -0
  130. package/dist/profiles/check.d.ts +11 -0
  131. package/dist/profiles/check.d.ts.map +1 -0
  132. package/dist/profiles/check.js +66 -0
  133. package/dist/profiles/check.js.map +1 -0
  134. package/dist/profiles/eligibility.d.ts +26 -0
  135. package/dist/profiles/eligibility.d.ts.map +1 -0
  136. package/dist/profiles/eligibility.js +49 -0
  137. package/dist/profiles/eligibility.js.map +1 -0
  138. package/dist/profiles/google.d.ts +4 -0
  139. package/dist/profiles/google.d.ts.map +1 -0
  140. package/dist/profiles/google.js +387 -0
  141. package/dist/profiles/google.js.map +1 -0
  142. package/dist/profiles/index.d.ts +10 -0
  143. package/dist/profiles/index.d.ts.map +1 -0
  144. package/dist/profiles/index.js +13 -0
  145. package/dist/profiles/index.js.map +1 -0
  146. package/dist/profiles/registry.d.ts +16 -0
  147. package/dist/profiles/registry.d.ts.map +1 -0
  148. package/dist/profiles/registry.js +66 -0
  149. package/dist/profiles/registry.js.map +1 -0
  150. package/dist/profiles/types.d.ts +29 -0
  151. package/dist/profiles/types.d.ts.map +1 -0
  152. package/dist/profiles/types.js +2 -0
  153. package/dist/profiles/types.js.map +1 -0
  154. package/dist/seo-graph.d.ts +39 -0
  155. package/dist/seo-graph.d.ts.map +1 -0
  156. package/dist/seo-graph.js +34 -0
  157. package/dist/seo-graph.js.map +1 -0
  158. package/dist/types/built-in/content.d.ts +12 -0
  159. package/dist/types/built-in/content.d.ts.map +1 -0
  160. package/dist/types/built-in/content.js +79 -0
  161. package/dist/types/built-in/content.js.map +1 -0
  162. package/dist/types/built-in/events.d.ts +23 -0
  163. package/dist/types/built-in/events.d.ts.map +1 -0
  164. package/dist/types/built-in/events.js +93 -0
  165. package/dist/types/built-in/events.js.map +1 -0
  166. package/dist/types/built-in/index.d.ts +4 -0
  167. package/dist/types/built-in/index.d.ts.map +1 -0
  168. package/dist/types/built-in/index.js +26 -0
  169. package/dist/types/built-in/index.js.map +1 -0
  170. package/dist/types/built-in/media.d.ts +21 -0
  171. package/dist/types/built-in/media.d.ts.map +1 -0
  172. package/dist/types/built-in/media.js +104 -0
  173. package/dist/types/built-in/media.js.map +1 -0
  174. package/dist/types/built-in/site.d.ts +14 -0
  175. package/dist/types/built-in/site.d.ts.map +1 -0
  176. package/dist/types/built-in/site.js +35 -0
  177. package/dist/types/built-in/site.js.map +1 -0
  178. package/dist/types/context.d.ts +26 -0
  179. package/dist/types/context.d.ts.map +1 -0
  180. package/dist/types/context.js +44 -0
  181. package/dist/types/context.js.map +1 -0
  182. package/dist/types/definition.d.ts +58 -0
  183. package/dist/types/definition.d.ts.map +1 -0
  184. package/dist/types/definition.js +2 -0
  185. package/dist/types/definition.js.map +1 -0
  186. package/dist/types/index.d.ts +4 -0
  187. package/dist/types/index.d.ts.map +1 -0
  188. package/dist/types/index.js +3 -0
  189. package/dist/types/index.js.map +1 -0
  190. package/dist/types/registry.d.ts +14 -0
  191. package/dist/types/registry.d.ts.map +1 -0
  192. package/dist/types/registry.js +37 -0
  193. package/dist/types/registry.js.map +1 -0
  194. package/dist/types/values.d.ts +23 -0
  195. package/dist/types/values.d.ts.map +1 -0
  196. package/dist/types/values.js +52 -0
  197. package/dist/types/values.js.map +1 -0
  198. package/dist/validate/check-terms.d.ts +15 -0
  199. package/dist/validate/check-terms.d.ts.map +1 -0
  200. package/dist/validate/check-terms.js +42 -0
  201. package/dist/validate/check-terms.js.map +1 -0
  202. package/dist/validate/check-value.d.ts +19 -0
  203. package/dist/validate/check-value.d.ts.map +1 -0
  204. package/dist/validate/check-value.js +77 -0
  205. package/dist/validate/check-value.js.map +1 -0
  206. package/dist/validate/graph-nodes.d.ts +22 -0
  207. package/dist/validate/graph-nodes.d.ts.map +1 -0
  208. package/dist/validate/graph-nodes.js +50 -0
  209. package/dist/validate/graph-nodes.js.map +1 -0
  210. package/dist/validate/index.d.ts +4 -0
  211. package/dist/validate/index.d.ts.map +1 -0
  212. package/dist/validate/index.js +2 -0
  213. package/dist/validate/index.js.map +1 -0
  214. package/dist/validate/types.d.ts +22 -0
  215. package/dist/validate/types.d.ts.map +1 -0
  216. package/dist/validate/types.js +2 -0
  217. package/dist/validate/types.js.map +1 -0
  218. package/dist/validate/validate-graph.d.ts +18 -0
  219. package/dist/validate/validate-graph.d.ts.map +1 -0
  220. package/dist/validate/validate-graph.js +109 -0
  221. package/dist/validate/validate-graph.js.map +1 -0
  222. package/dist/vocabulary/datatypes.d.ts +7 -0
  223. package/dist/vocabulary/datatypes.d.ts.map +1 -0
  224. package/dist/vocabulary/datatypes.js +46 -0
  225. package/dist/vocabulary/datatypes.js.map +1 -0
  226. package/dist/vocabulary/index.d.ts +5 -0
  227. package/dist/vocabulary/index.d.ts.map +1 -0
  228. package/dist/vocabulary/index.js +4 -0
  229. package/dist/vocabulary/index.js.map +1 -0
  230. package/dist/vocabulary/schemaorg.generated.d.ts +4 -0
  231. package/dist/vocabulary/schemaorg.generated.d.ts.map +1 -0
  232. package/dist/vocabulary/schemaorg.generated.js +3038 -0
  233. package/dist/vocabulary/schemaorg.generated.js.map +1 -0
  234. package/dist/vocabulary/types.d.ts +38 -0
  235. package/dist/vocabulary/types.d.ts.map +1 -0
  236. package/dist/vocabulary/types.js +2 -0
  237. package/dist/vocabulary/types.js.map +1 -0
  238. package/dist/vocabulary/vocabulary.d.ts +28 -0
  239. package/dist/vocabulary/vocabulary.d.ts.map +1 -0
  240. package/dist/vocabulary/vocabulary.js +89 -0
  241. package/dist/vocabulary/vocabulary.js.map +1 -0
  242. package/package.json +41 -3
  243. package/README.md +0 -3
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Bing. Its webmaster guidelines publish no structured-data rule set beyond
3
+ * Schema.org (its help pages render client-side and were not readable
4
+ * programmatically when checked, 2026-10-02), so the profile adds no rules:
5
+ * Bing reads the Schema.org baseline every graph meets. A rule is added only
6
+ * with a source it can cite.
7
+ */
8
+ export const bingProfile = {
9
+ id: 'bing',
10
+ name: 'Bing',
11
+ rules: [],
12
+ };
13
+ //# sourceMappingURL=bing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bing.js","sourceRoot":"","sources":["../../src/profiles/bing.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAkB;IACxC,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,EAAE;CACV,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { Finding, GraphNode } from '../validate/types.js';
2
+ import type { ReaderProfile } from './types.js';
3
+ /**
4
+ * A reader's findings for one node, by its rule for the node's type (or the
5
+ * nearest ancestor's): a property the feature needs is a warning — the graph
6
+ * is still conformant, the page is not eligible — a recommended one is
7
+ * information, and a feature the reader retired or restricts is said so.
8
+ * Each finding cites the rule's documentation.
9
+ */
10
+ export declare function profileFindings(node: GraphNode, profile: ReaderProfile): Finding[];
11
+ //# sourceMappingURL=check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/profiles/check.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAG9D,OAAO,KAAK,EAAe,aAAa,EAAE,MAAM,YAAY,CAAA;AA2B5D;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,EAAE,CA8BlF"}
@@ -0,0 +1,66 @@
1
+ import { isEmpty } from '../types/values.js';
2
+ import { idOf, typesOf } from '../validate/graph-nodes.js';
3
+ import { isPropertyOfType } from '../vocabulary/index.js';
4
+ import { ruleFor } from './registry.js';
5
+ function has(node, property) {
6
+ return !isEmpty(node[property]);
7
+ }
8
+ function feature(profile, rule) {
9
+ return `${profile.name}'s ${rule.feature ?? rule.type}`;
10
+ }
11
+ /** What the rule's status says about the node */
12
+ function statusFindings(profile, rule, base) {
13
+ if (rule.status === 'retired') {
14
+ const message = `${profile.name} no longer shows ${rule.feature ?? rule.type}; ${rule.type} stays valid Schema.org.`;
15
+ return [{ ...base, severity: 'warning', code: 'profile-retired-feature', message }];
16
+ }
17
+ if (rule.status === 'restricted') {
18
+ const message = `${feature(profile, rule)} is shown only when: ${(rule.conditions ?? []).join('; ')}`;
19
+ return [{ ...base, severity: 'info', code: 'profile-restricted-feature', message }];
20
+ }
21
+ return [];
22
+ }
23
+ /**
24
+ * A reader's findings for one node, by its rule for the node's type (or the
25
+ * nearest ancestor's): a property the feature needs is a warning — the graph
26
+ * is still conformant, the page is not eligible — a recommended one is
27
+ * information, and a feature the reader retired or restricts is said so.
28
+ * Each finding cites the rule's documentation.
29
+ */
30
+ export function profileFindings(node, profile) {
31
+ const type = typesOf(node)[0];
32
+ if (!type)
33
+ return [];
34
+ const rule = ruleFor(profile, type);
35
+ if (!rule || rule.status === 'none')
36
+ return [];
37
+ const base = { profile: profile.id, nodeId: idOf(node), type, source: rule.source };
38
+ const findings = statusFindings(profile, rule, base);
39
+ if (rule.status === 'retired')
40
+ return findings;
41
+ // A rule written for a type may name properties only some of its subtypes
42
+ // have (servesCuisine for LocalBusiness); a node is asked only for its own.
43
+ const applies = (property) => isPropertyOfType(property, type);
44
+ for (const property of (rule.required ?? []).filter(applies)) {
45
+ if (has(node, property))
46
+ continue;
47
+ const message = `${type} needs "${property}" for ${feature(profile, rule)}.`;
48
+ findings.push({ ...base, property, severity: 'warning', code: 'profile-required', message });
49
+ }
50
+ for (const group of (rule.oneOf ?? [])
51
+ .map((g) => g.filter(applies))
52
+ .filter((g) => g.length > 0)) {
53
+ if (group.some((property) => has(node, property)))
54
+ continue;
55
+ const message = `${type} needs one of ${group.map((p) => `"${p}"`).join(', ')} for ${feature(profile, rule)}.`;
56
+ findings.push({ ...base, severity: 'warning', code: 'profile-required', message });
57
+ }
58
+ for (const property of (rule.recommended ?? []).filter(applies)) {
59
+ if (has(node, property))
60
+ continue;
61
+ const message = `${profile.name} recommends "${property}" on ${type} for ${rule.feature ?? 'its results'}.`;
62
+ findings.push({ ...base, property, severity: 'info', code: 'profile-recommended', message });
63
+ }
64
+ return findings;
65
+ }
66
+ //# sourceMappingURL=check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/profiles/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,SAAS,GAAG,CAAC,IAAe,EAAE,QAAgB;IAC5C,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAA;AACjC,CAAC;AAED,SAAS,OAAO,CAAC,OAAsB,EAAE,IAAiB;IACxD,OAAO,GAAG,OAAO,CAAC,IAAI,MAAM,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,CAAA;AACzD,CAAC;AAED,iDAAiD;AACjD,SAAS,cAAc,CACrB,OAAsB,EACtB,IAAiB,EACjB,IAAoD;IAEpD,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC9B,MAAM,OAAO,GAAG,GAAG,OAAO,CAAC,IAAI,oBAAoB,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,0BAA0B,CAAA;QACpH,OAAO,CAAC,EAAE,GAAG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AAI,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QAChE,IAAI,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC;YAAE,SAAQ;QACjC,MAAM,OAAO,GAAG,GAAG,OAAO,CAAC,IAAI,gBAAgB,QAAQ,QAAQ,IAAI,QAAQ,IAAI,CAAC,OAAO,IAAI,aAAa,GAAG,CAAA;QAC3G,QAAQ,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,CAAC,CAAA;IAC9F,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { JsonLdGraph } from '../graph/types.js';
2
+ import type { GraphNode } from '../validate/types.js';
3
+ import type { FeatureStatus } from './types.js';
4
+ /** Whether an entity a page states is eligible for a reader's search feature */
5
+ export interface FeatureEligibility {
6
+ readonly reader: string;
7
+ readonly feature: string;
8
+ readonly type: string;
9
+ readonly nodeId: string | undefined;
10
+ /** `active`: shown when the properties are present; `restricted`: shown only under the rule's conditions */
11
+ readonly status: Extract<FeatureStatus, 'active' | 'restricted'>;
12
+ /** True when the feature is active and every property it needs is present */
13
+ readonly eligible: boolean;
14
+ /** Properties (or `a | b` choices) the feature needs that the entity lacks */
15
+ readonly missing: readonly string[];
16
+ readonly conditions: readonly string[];
17
+ /** The documentation the rule comes from */
18
+ readonly source: string;
19
+ }
20
+ /**
21
+ * The search features a page's entities can appear in, per reader: each
22
+ * entity whose type has a reader rule for a feature the reader still shows,
23
+ * with what it lacks. A feature a reader has retired is never listed.
24
+ */
25
+ export declare function featureEligibility(graph: JsonLdGraph | GraphNode, readers: readonly string[]): FeatureEligibility[];
26
+ //# sourceMappingURL=eligibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eligibility.d.ts","sourceRoot":"","sources":["../../src/profiles/eligibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAGpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAGrD,OAAO,KAAK,EAAE,aAAa,EAAiB,MAAM,YAAY,CAAA;AAE9D,gFAAgF;AAChF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,4GAA4G;IAC5G,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,aAAa,EAAE,QAAQ,GAAG,YAAY,CAAC,CAAA;IAChE,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;IACtC,4CAA4C;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAyCD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,WAAW,GAAG,SAAS,EAC9B,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,kBAAkB,EAAE,CAMtB"}
@@ -0,0 +1,49 @@
1
+ import { isEmpty } from '../types/values.js';
2
+ import { idOf, topLevelNodes, typesOf } from '../validate/graph-nodes.js';
3
+ import { isPropertyOfType } from '../vocabulary/index.js';
4
+ import { getProfile, ruleFor } from './registry.js';
5
+ function has(node, property) {
6
+ return !isEmpty(node[property]);
7
+ }
8
+ /** What the reader's feature for the node's type still needs */
9
+ function missingFor(node, type, required, oneOf) {
10
+ const applies = (property) => isPropertyOfType(property, type);
11
+ const missing = required.filter((property) => applies(property) && !has(node, property));
12
+ for (const group of oneOf.map((g) => g.filter(applies)).filter((g) => g.length > 0)) {
13
+ if (!group.some((property) => has(node, property)))
14
+ missing.push(group.join(' | '));
15
+ }
16
+ return missing;
17
+ }
18
+ /** One node's eligibility for a reader's feature, or null when the reader has none for its type */
19
+ function nodeEligibility(node, profile) {
20
+ const type = typesOf(node)[0];
21
+ if (!type)
22
+ return null;
23
+ const rule = ruleFor(profile, type);
24
+ if (!rule?.feature || (rule.status !== 'active' && rule.status !== 'restricted'))
25
+ return null;
26
+ const missing = missingFor(node, type, rule.required ?? [], rule.oneOf ?? []);
27
+ return {
28
+ reader: profile.id,
29
+ feature: rule.feature,
30
+ type,
31
+ nodeId: idOf(node),
32
+ status: rule.status,
33
+ eligible: rule.status === 'active' && missing.length === 0,
34
+ missing,
35
+ conditions: rule.conditions ?? [],
36
+ source: rule.source,
37
+ };
38
+ }
39
+ /**
40
+ * The search features a page's entities can appear in, per reader: each
41
+ * entity whose type has a reader rule for a feature the reader still shows,
42
+ * with what it lacks. A feature a reader has retired is never listed.
43
+ */
44
+ export function featureEligibility(graph, readers) {
45
+ const profiles = readers.flatMap((id) => getProfile(id) ?? []);
46
+ const nodes = topLevelNodes({ ...graph });
47
+ return profiles.flatMap((profile) => nodes.flatMap((node) => nodeEligibility(node, profile) ?? []));
48
+ }
49
+ //# sourceMappingURL=eligibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eligibility.js","sourceRoot":"","sources":["../../src/profiles/eligibility.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAoBnD,SAAS,GAAG,CAAC,IAAe,EA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,IAAI,IAAI,CAAC,MAAM,KAAK,YAAY,CAAC;QAAE,OAAO,IAAI,CAAA;IAC7F,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,IAAI,EAAE,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;IAC7E,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,EAAE;QAClB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,IAAI;QACJ,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;QAClB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,QAAQ,EAAE,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAC1D,OAAO;QACP,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE;QACjC,MAAM,EAAE,IAAI,CAAC,MAAM;KACpB,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAChC,KAA8B,EAC9B,OAA0B;IAE1B,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAA;IAC9D,MAAM,KAAK,GAAG,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC,CAAA;IACzC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAClC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAC9D,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ReaderProfile } from './types.js';
2
+ /** Google Search */
3
+ export declare const googleProfile: ReaderProfile;
4
+ //# sourceMappingURL=google.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../src/profiles/google.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,aAAa,EAAE,MAAM,YAAY,CAAA;AAoY5D,oBAAoB;AACpB,eAAO,MAAM,aAAa,EAAE,aAA8D,CAAA"}
@@ -0,0 +1,387 @@
1
+ const DOCS = 'https://developers.google.com/search/docs/appearance/structured-data';
2
+ const UPDATES = 'https://developers.google.com/search/updates';
3
+ const VERIFIED = '2026-10-02';
4
+ /**
5
+ * Google Search's rules, from its structured-data documentation (top-level
6
+ * properties only), each checked against its page on the date it records.
7
+ * A property Schema.org has superseded is left out even where Google still
8
+ * lists it — `menu` on LocalBusiness — because a profile adds to the
9
+ * Schema.org baseline and never relaxes it.
10
+ */
11
+ const RULES = [
12
+ {
13
+ type: 'Article',
14
+ feature: 'Article',
15
+ status: 'active',
16
+ recommended: ['author', 'dateModified', 'datePublished', 'headline', 'image'],
17
+ source: `${DOCS}/article`,
18
+ verifiedAt: VERIFIED,
19
+ },
20
+ {
21
+ type: 'BreadcrumbList',
22
+ feature: 'Breadcrumb',
23
+ status: 'active',
24
+ required: ['itemListElement'],
25
+ source: `${DOCS}/breadcrumb`,
26
+ verifiedAt: VERIFIED,
27
+ },
28
+ {
29
+ type: 'ItemList',
30
+ feature: 'Carousel',
31
+ status: 'active',
32
+ required: ['itemListElement'],
33
+ conditions: [
34
+ 'Combined with Course list, Movie, Recipe or Restaurant, with at least two list items',
35
+ ],
36
+ source: `${DOCS}/carousel`,
37
+ verifiedAt: VERIFIED,
38
+ },
39
+ {
40
+ type: 'Course',
41
+ feature: 'Course list',
42
+ status: 'active',
43
+ required: ['description', 'name'],
44
+ recommended: ['provider'],
45
+ conditions: ['In English, with at least three courses marked up'],
46
+ source: `${DOCS}/course`,
47
+ verifiedAt: VERIFIED,
48
+ },
49
+ {
50
+ type: 'Dataset',
51
+ feature: 'Dataset Search',
52
+ status: 'restricted',
53
+ required: ['description', 'name'],
54
+ recommended: [
55
+ 'alternateName',
56
+ 'creator',
57
+ 'citation',
58
+ 'funder',
59
+ 'identifier',
60
+ 'isAccessibleForFree',
61
+ 'keywords',
62
+ 'license',
63
+ 'measurementTechnique',
64
+ 'sameAs',
65
+ 'spatialCoverage',
66
+ 'temporalCoverage',
67
+ 'variableMeasured',
68
+ 'version',
69
+ 'url',
70
+ ],
71
+ conditions: ['Used by Google Dataset Search only, not Google Search (since 2025-11-05)'],
72
+ source: `${DOCS}/dataset`,
73
+ verifiedAt: VERIFIED,
74
+ },
75
+ {
76
+ type: 'DiscussionForumPosting',
77
+ feature: 'Discussion forum',
78
+ status: 'active',
79
+ required: ['author', 'datePublished'],
80
+ oneOf: [['text', 'image', 'video']],
81
+ recommended: [
82
+ 'comment',
83
+ 'commentCount',
84
+ 'creativeWorkStatus',
85
+ 'dateModified',
86
+ 'digitalSourceType',
87
+ 'headline',
88
+ 'image',
89
+ 'interactionStatistic',
90
+ 'isPartOf',
91
+ 'sharedContent',
92
+ 'text',
93
+ 'url',
94
+ 'video',
95
+ ],
96
+ source: `${DOCS}/discussion-forum`,
97
+ verifiedAt: VERIFIED,
98
+ },
99
+ {
100
+ type: 'EmployerAggregateRating',
101
+ feature: 'Employer aggregate rating',
102
+ status: 'active',
103
+ required: ['itemReviewed', 'ratingValue'],
104
+ oneOf: [['ratingCount', 'reviewCount']],
105
+ recommended: ['bestRating', 'worstRating'],
106
+ source: `${DOCS}/employer-rating`,
107
+ verifiedAt: VERIFIED,
108
+ },
109
+ {
110
+ type: 'Event',
111
+ feature: 'Event',
112
+ status: 'active',
113
+ required: ['location', 'name', 'startDate'],
114
+ recommended: [
115
+ 'description',
116
+ 'endDate',
117
+ 'eventStatus',
118
+ 'image',
119
+ 'offers',
120
+ 'organizer',
121
+ 'performer',
122
+ 'previousStartDate',
123
+ ],
124
+ conditions: ['Shown in listed regions and languages only'],
125
+ source: `${DOCS}/event`,
126
+ verifiedAt: VERIFIED,
127
+ },
128
+ {
129
+ type: 'ImageObject',
130
+ feature: 'Image metadata',
131
+ status: 'active',
132
+ required: ['contentUrl'],
133
+ oneOf: [['creator', 'creditText', 'copyrightNotice', 'license']],
134
+ recommended: ['acquireLicensePage', 'creator', 'creditText', 'copyrightNotice', 'license'],
135
+ source: `${DOCS}/image-license-metadata`,
136
+ verifiedAt: VERIFIED,
137
+ },
138
+ {
139
+ type: 'JobPosting',
140
+ feature: 'Job posting',
141
+ status: 'active',
142
+ required: ['datePosted', 'description', 'hiringOrganization', 'jobLocation', 'title'],
143
+ recommended: [
144
+ 'applicantLocationRequirements',
145
+ 'baseSalary',
146
+ 'directApply',
147
+ 'employmentType',
148
+ 'identifier',
149
+ 'jobLocationType',
150
+ 'validThrough',
151
+ ],
152
+ conditions: ['Shown in listed regions only'],
153
+ source: `${DOCS}/job-posting`,
154
+ verifiedAt: VERIFIED,
155
+ },
156
+ {
157
+ type: 'LocalBusiness',
158
+ feature: 'Local business',
159
+ status: 'active',
160
+ required: ['address', 'name'],
161
+ recommended: [
162
+ 'aggregateRating',
163
+ 'department',
164
+ 'geo',
165
+ 'openingHoursSpecification',
166
+ 'priceRange',
167
+ 'review',
168
+ 'servesCuisine',
169
+ 'telephone',
170
+ 'url',
171
+ ],
172
+ source: `${DOCS}/local-business`,
173
+ verifiedAt: VERIFIED,
174
+ },
175
+ {
176
+ type: 'Movie',
177
+ feature: 'Movie carousel',
178
+ status: 'active',
179
+ required: ['image', 'name'],
180
+ recommended: ['aggregateRating', 'dateCreated', 'director', 'review'],
181
+ conditions: ['Mobile only'],
182
+ source: `${DOCS}/movie`,
183
+ verifiedAt: VERIFIED,
184
+ },
185
+ {
186
+ type: 'Organization',
187
+ feature: 'Organization',
188
+ status: 'active',
189
+ recommended: [
190
+ 'address',
191
+ 'alternateName',
192
+ 'contactPoint',
193
+ 'description',
194
+ 'duns',
195
+ 'email',
196
+ 'foundingDate',
197
+ 'globalLocationNumber',
198
+ 'hasMerchantReturnPolicy',
199
+ 'hasMemberProgram',
200
+ 'hasShippingService',
201
+ 'iso6523Code',
202
+ 'legalName',
203
+ 'leiCode',
204
+ 'logo',
205
+ 'naics',
206
+ 'name',
207
+ 'numberOfEmployees',
208
+ 'sameAs',
209
+ 'taxID',
210
+ 'telephone',
211
+ 'url',
212
+ 'vatID',
213
+ ],
214
+ source: `${DOCS}/organization`,
215
+ verifiedAt: VERIFIED,
216
+ },
217
+ {
218
+ type: 'Product',
219
+ feature: 'Product snippet',
220
+ status: 'active',
221
+ required: ['name'],
222
+ oneOf: [['review', 'aggregateRating', 'offers']],
223
+ recommended: ['aggregateRating', 'offers', 'review'],
224
+ conditions: ['Pages about a single product, or variants of one product'],
225
+ source: `${DOCS}/product-snippet`,
226
+ verifiedAt: VERIFIED,
227
+ },
228
+ {
229
+ type: 'ProfilePage',
230
+ feature: 'Profile page',
231
+ status: 'active',
232
+ required: ['mainEntity'],
233
+ recommended: ['dateCreated', 'dateModified'],
234
+ source: `${DOCS}/profile-page`,
235
+ verifiedAt: VERIFIED,
236
+ },
237
+ {
238
+ type: 'QAPage',
239
+ feature: 'Q&A',
240
+ status: 'active',
241
+ required: ['mainEntity'],
242
+ source: `${DOCS}/qapage`,
243
+ verifiedAt: VERIFIED,
244
+ },
245
+ {
246
+ type: 'Recipe',
247
+ feature: 'Recipe',
248
+ status: 'active',
249
+ required: ['image', 'name'],
250
+ recommended: [
251
+ 'aggregateRating',
252
+ 'author',
253
+ 'cookTime',
254
+ 'datePublished',
255
+ 'description',
256
+ 'keywords',
257
+ 'nutrition',
258
+ 'prepTime',
259
+ 'recipeCategory',
260
+ 'recipeCuisine',
261
+ 'recipeIngredient',
262
+ 'recipeInstructions',
263
+ 'recipeYield',
264
+ 'totalTime',
265
+ 'video',
266
+ ],
267
+ source: `${DOCS}/recipe`,
268
+ verifiedAt: VERIFIED,
269
+ },
270
+ {
271
+ type: 'Review',
272
+ feature: 'Review snippet',
273
+ status: 'active',
274
+ required: ['author', 'itemReviewed', 'reviewRating'],
275
+ recommended: ['datePublished'],
276
+ conditions: ['Not for reviews an entity controls about itself'],
277
+ source: `${DOCS}/review-snippet`,
278
+ verifiedAt: VERIFIED,
279
+ },
280
+ {
281
+ type: 'AggregateRating',
282
+ feature: 'Review snippet',
283
+ status: 'active',
284
+ required: ['itemReviewed', 'ratingValue'],
285
+ oneOf: [['ratingCount', 'reviewCount']],
286
+ recommended: ['bestRating', 'worstRating'],
287
+ source: `${DOCS}/review-snippet`,
288
+ verifiedAt: VERIFIED,
289
+ },
290
+ {
291
+ type: 'SoftwareApplication',
292
+ feature: 'Software app',
293
+ status: 'active',
294
+ required: ['name', 'offers'],
295
+ oneOf: [['aggregateRating', 'review']],
296
+ recommended: ['applicationCategory', 'operatingSystem'],
297
+ conditions: [
298
+ 'offers.price is required — 0 for a free app',
299
+ 'No rich result for an app typed only VideoGame',
300
+ ],
301
+ source: `${DOCS}/software-app`,
302
+ verifiedAt: VERIFIED,
303
+ },
304
+ {
305
+ type: 'SpeakableSpecification',
306
+ feature: 'Speakable',
307
+ status: 'restricted',
308
+ oneOf: [['cssSelector', 'xpath']],
309
+ conditions: [
310
+ 'Beta: users in the U.S. with Google Home devices set to English, and English-language publishers',
311
+ ],
312
+ source: `${DOCS}/speakable`,
313
+ verifiedAt: VERIFIED,
314
+ },
315
+ {
316
+ type: 'VacationRental',
317
+ feature: 'Vacation rental',
318
+ status: 'restricted',
319
+ required: ['containsPlace', 'identifier', 'image', 'latitude', 'longitude', 'name'],
320
+ recommended: [
321
+ 'additionalType',
322
+ 'address',
323
+ 'aggregateRating',
324
+ 'brand',
325
+ 'checkinTime',
326
+ 'checkoutTime',
327
+ 'description',
328
+ 'knowsLanguage',
329
+ 'review',
330
+ ],
331
+ conditions: [
332
+ 'Sites working with a Google Technical Account Manager and Hotel Center; English strings only',
333
+ ],
334
+ source: `${DOCS}/vacation-rental`,
335
+ verifiedAt: VERIFIED,
336
+ },
337
+ {
338
+ type: 'VideoObject',
339
+ feature: 'Video',
340
+ status: 'active',
341
+ required: ['name', 'thumbnailUrl', 'uploadDate'],
342
+ recommended: [
343
+ 'contentUrl',
344
+ 'creator',
345
+ 'description',
346
+ 'duration',
347
+ 'embedUrl',
348
+ 'expires',
349
+ 'hasPart',
350
+ 'ineligibleRegion',
351
+ 'interactionStatistic',
352
+ 'publication',
353
+ 'regionsAllowed',
354
+ ],
355
+ source: `${DOCS}/video`,
356
+ verifiedAt: VERIFIED,
357
+ },
358
+ {
359
+ type: 'WebSite',
360
+ feature: 'Site names',
361
+ status: 'active',
362
+ required: ['name', 'url'],
363
+ recommended: ['alternateName'],
364
+ conditions: ['On the home page'],
365
+ source: 'https://developers.google.com/search/docs/appearance/site-names',
366
+ verifiedAt: VERIFIED,
367
+ },
368
+ {
369
+ type: 'FAQPage',
370
+ feature: 'FAQ',
371
+ status: 'retired',
372
+ conditions: ['No longer shown in Google Search since 2026-05-07'],
373
+ source: `${UPDATES}#removing-faq-rich-result`,
374
+ verifiedAt: VERIFIED,
375
+ },
376
+ {
377
+ type: 'HowTo',
378
+ feature: 'How-to',
379
+ status: 'retired',
380
+ conditions: ['No longer shown in Google Search since 2023-09-14'],
381
+ source: `${UPDATES}#how-to-deprecation`,
382
+ verifiedAt: VERIFIED,
383
+ },
384
+ ];
385
+ /** Google Search */
386
+ export const googleProfile = { id: 'google', name: 'Google', rules: RULES };
387
+ //# sourceMappingURL=google.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"google.js","sourceRoot":"","sources":["../../src/profiles/google.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAG,sEAAsE,CAAA;AACnF,MAAM,OAAO,GAAG,8CAA8C,CAAA;AAC9D,MAAM,QAAQ,GAAG,YAAY,CAAA;AAE7B;;;;;;GAMG;AACH,MAAM,KAAK,GAA2B;IACpC;QACE,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,QAAQ;QAChB,WAAW,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,OAAO,CAAC;QAC7E,MAAM,EAAE,GAAG,IAAI,UAAU;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W,EAAE,CAAC,eAAe,CAAC;QAC9B,UAAU,EAAE,CAAC,kBAAkB,CAAC;QAChC,MAAM,EAAE,iEAAiE;QACzE,UAAU,EAAE,QAAQ;KACrB;IACD;QACE,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,SAAS;QACjB,UAAU,EAAE,CAAC,mDAAmD,CAAC;QACjE,MAAM,EAAE,GAAG,OAAO,2BAA2B;QAC7C,UAAU,EAAE,QAAQ;KACrB;IACD;QACE,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,QAAQ;QACjB,MAAM,EAAE,SAAS;QACjB,UAAU,EAAE,CAAC,mDAAmD,CAAC;QACjE,MAAM,EAAE,GAAG,OAAO,qBAAqB;QACvC,UAAU,EAAE,QAAQ;KACrB;CACF,CAAA;AAED,oBAAoB;AACpB,MAAM,CAAC,MAAM,aAAa,GAAkB,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA"}
@@ -0,0 +1,10 @@
1
+ export { bingProfile } from './bing.js';
2
+ export { profileFindings } from './check.js';
3
+ export type { FeatureEligibility } from './eligibility.js';
4
+ export { featureEligibility } from './eligibility.js';
5
+ export { googleProfile } from './google.js';
6
+ export { getProfile, registeredProfiles, registerProfile, ruleFor } from './registry.js';
7
+ export type { FeatureStatus, ProfileRule, ReaderProfile } from './types.js';
8
+ /** The reader profiles krantho ships */
9
+ export declare const BUILT_IN_PROFILES: readonly [import("./types.js").ReaderProfile, import("./types.js").ReaderProfile];
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/profiles/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACxF,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE3E,wCAAwC;AACxC,eAAO,MAAM,iBAAiB,mFAAwC,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { bingProfile } from './bing.js';
2
+ import { googleProfile } from './google.js';
3
+ import { registerProfile } from './registry.js';
4
+ export { bingProfile } from './bing.js';
5
+ export { profileFindings } from './check.js';
6
+ export { featureEligibility } from './eligibility.js';
7
+ export { googleProfile } from './google.js';
8
+ export { getProfile, registeredProfiles, registerProfile, ruleFor } from './registry.js';
9
+ /** The reader profiles krantho ships */
10
+ export const BUILT_IN_PROFILES = [googleProfile, bingProfile];
11
+ for (const profile of BUILT_IN_PROFILES)
12
+ registerProfile(profile);
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/profiles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGxF,wCAAwC;AACxC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,aAAa,EAAE,WAAW,CAAU,CAAA;AAEtE,KAAK,MAAM,OAAO,IAAI,iBAAiB;IAAE,eAAe,CAAC,OAAO,CAAC,CAAA"}
@@ -0,0 +1,16 @@
1
+ import type { ProfileRule, ReaderProfile } from './types.js';
2
+ /**
3
+ * Register a reader's rule set. A site registers its own readers the same way
4
+ * krantho registers Google's and Bing's; a later registration under one id
5
+ * replaces the earlier one. Throws for a rule whose type the vocabulary does
6
+ * not have, or without a source and verification date. Returns a function
7
+ * that restores the previous registration.
8
+ */
9
+ export declare function registerProfile(profile: ReaderProfile): () => void;
10
+ /** The reader profile registered under the id */
11
+ export declare function getProfile(id: string): ReaderProfile | undefined;
12
+ /** Every registered reader profile */
13
+ export declare function registeredProfiles(): readonly ReaderProfile[];
14
+ /** The profile's rule for a type: its own, or the one for its nearest ancestor */
15
+ export declare function ruleFor(profile: ReaderProfile, type: string): ProfileRule | undefined;
16
+ //# sourceMappingURL=registry.d.ts.map