@extenshi/mcp 0.10.0 → 0.12.0
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/README.md +22 -4
- package/dist/bff.d.ts +88 -0
- package/dist/bff.d.ts.map +1 -1
- package/dist/bff.js +17 -0
- package/dist/bff.js.map +1 -1
- package/dist/development-guide.d.ts +34 -33
- package/dist/development-guide.d.ts.map +1 -1
- package/dist/development-guide.js +35 -9
- package/dist/development-guide.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/json-ld.d.ts +43 -5
- package/dist/json-ld.d.ts.map +1 -1
- package/dist/json-ld.js +53 -1
- package/dist/json-ld.js.map +1 -1
- package/dist/landing-page.d.ts +22 -4
- package/dist/landing-page.d.ts.map +1 -1
- package/dist/landing-page.js +14 -11
- package/dist/landing-page.js.map +1 -1
- package/dist/landing-sections.d.ts +350 -0
- package/dist/landing-sections.d.ts.map +1 -0
- package/dist/landing-sections.js +1117 -0
- package/dist/landing-sections.js.map +1 -0
- package/dist/landing-workflow.d.ts +28 -4
- package/dist/landing-workflow.d.ts.map +1 -1
- package/dist/landing-workflow.js +86 -15
- package/dist/landing-workflow.js.map +1 -1
- package/dist/mcp-analytics.d.ts +41 -0
- package/dist/mcp-analytics.d.ts.map +1 -0
- package/dist/mcp-analytics.js +91 -0
- package/dist/mcp-analytics.js.map +1 -0
- package/dist/pay.d.ts +28 -4
- package/dist/pay.d.ts.map +1 -1
- package/dist/pay.js +24 -1
- package/dist/pay.js.map +1 -1
- package/dist/scan.d.ts +1 -1
- package/dist/scan.d.ts.map +1 -1
- package/dist/telemetry.d.ts +7 -0
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +8 -0
- package/dist/telemetry.js.map +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +571 -7
- package/dist/tools.js.map +1 -1
- package/package.json +16 -11
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Page generator, schema v2: a full, declarative extension homepage.
|
|
3
|
+
*
|
|
4
|
+
* A v1 form (no `schemaVersion`) is still rendered by `buildLandingPage` in
|
|
5
|
+
* landing-page.ts, unchanged and byte-identical — `renderLandingForm` below
|
|
6
|
+
* only takes the v2 path when `schemaVersion === 2`. Everything v2 adds is an
|
|
7
|
+
* optional field on the same LandingForm, so an old row, an old client and an
|
|
8
|
+
* old server all keep working (see landing-page-v2.test.ts).
|
|
9
|
+
*
|
|
10
|
+
* What v2 adds, all declarative data — never markup:
|
|
11
|
+
* - ordered sections with `hidden` (hero, about, features, screenshots,
|
|
12
|
+
* how-it-works, pricing, faq, testimonials, store-badges, changelog, links);
|
|
13
|
+
* - theme tokens: palette per light/dark (or `auto` = both, by
|
|
14
|
+
* prefers-color-scheme), fonts from LANDING_FONTS, radius, width;
|
|
15
|
+
* - per-locale content (`locales`) rendered as one page per locale with
|
|
16
|
+
* hreflang alternates and `dir="rtl"` for right-to-left languages;
|
|
17
|
+
* - SEO / Open Graph fields and JSON-LD (SoftwareApplication + FAQPage),
|
|
18
|
+
* whose `offers` carry the real prices of plans bound to Pay offers.
|
|
19
|
+
*
|
|
20
|
+
* Output rules are the v1 rules: no JavaScript, every string HTML-escaped,
|
|
21
|
+
* links scheme-clamped (safeHref), images clamped (safeImageSrc), CSS built
|
|
22
|
+
* only from allowlists and validated hex colours. The hosted CSP
|
|
23
|
+
* (`default-src 'none'`, inline styles only) therefore holds unchanged.
|
|
24
|
+
*
|
|
25
|
+
* Testimonials must be attributed: a quote without an author and a public
|
|
26
|
+
* https source is refused, never rendered. Drafting tools never write
|
|
27
|
+
* testimonials — only the developer supplies them.
|
|
28
|
+
*
|
|
29
|
+
* SINGLE SOURCE, THREE COPIES — same scheme as landing-page.ts:
|
|
30
|
+
* shared-types/landing-sections.ts (canonical — edit here)
|
|
31
|
+
* tools/extenshi-mcp/src/landing-sections.ts (copy)
|
|
32
|
+
* tools/extenshi-cli/src/landing-sections.ts (copy)
|
|
33
|
+
* After editing, run:
|
|
34
|
+
* sed "s#from 'shared-types\/#from './#" shared-types/landing-sections.ts > tools/extenshi-mcp/src/landing-sections.ts
|
|
35
|
+
* sed "s#from 'shared-types\/#from './#" shared-types/landing-sections.ts > tools/extenshi-cli/src/landing-sections.ts
|
|
36
|
+
*/
|
|
37
|
+
import { type LandingBrowser, type LandingForm } from './landing-page.js';
|
|
38
|
+
export declare const LANDING_SCHEMA_VERSION: 2;
|
|
39
|
+
export declare const LANDING_SECTION_TYPES: readonly ["hero", "about", "features", "screenshots", "how-it-works", "pricing", "faq", "testimonials", "store-badges", "changelog", "links"];
|
|
40
|
+
export type LandingSectionType = (typeof LANDING_SECTION_TYPES)[number];
|
|
41
|
+
export declare const LANDING_V2_LIMITS: {
|
|
42
|
+
readonly sections: 20;
|
|
43
|
+
readonly sectionId: 40;
|
|
44
|
+
readonly title: 120;
|
|
45
|
+
readonly intro: 600;
|
|
46
|
+
readonly body: 6000;
|
|
47
|
+
readonly items: 24;
|
|
48
|
+
readonly screenshots: 12;
|
|
49
|
+
readonly steps: 8;
|
|
50
|
+
readonly plans: 6;
|
|
51
|
+
readonly planFeatures: 12;
|
|
52
|
+
readonly faq: 20;
|
|
53
|
+
readonly testimonials: 12;
|
|
54
|
+
readonly quote: 600;
|
|
55
|
+
readonly changelog: 20;
|
|
56
|
+
readonly changelogNotes: 12;
|
|
57
|
+
readonly links: 12;
|
|
58
|
+
readonly shortText: 120;
|
|
59
|
+
readonly text: 500;
|
|
60
|
+
readonly locales: 10;
|
|
61
|
+
readonly seoTitle: 70;
|
|
62
|
+
readonly seoDescription: 300;
|
|
63
|
+
};
|
|
64
|
+
/** A section id: lowercase slug, used as the HTML id and as the locale override key. */
|
|
65
|
+
export declare const LANDING_SECTION_ID: RegExp;
|
|
66
|
+
interface SectionBase<T extends LandingSectionType> {
|
|
67
|
+
id: string;
|
|
68
|
+
type: T;
|
|
69
|
+
/** Kept in the form, left out of the page. */
|
|
70
|
+
hidden?: boolean;
|
|
71
|
+
/** Section heading; each type has a default (LANDING_UI_DEFAULTS). */
|
|
72
|
+
title?: string;
|
|
73
|
+
intro?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface LandingHeroSection extends SectionBase<'hero'> {
|
|
76
|
+
/** Defaults to extensionName. */
|
|
77
|
+
headline?: string;
|
|
78
|
+
/** Defaults to tagline. */
|
|
79
|
+
subheadline?: string;
|
|
80
|
+
/** Store buttons under the headline. Default true. */
|
|
81
|
+
showBadges?: boolean;
|
|
82
|
+
}
|
|
83
|
+
export interface LandingAboutSection extends SectionBase<'about'> {
|
|
84
|
+
/** Plain text; blank lines separate paragraphs. */
|
|
85
|
+
body: string;
|
|
86
|
+
}
|
|
87
|
+
export interface LandingFeaturesSection extends SectionBase<'features'> {
|
|
88
|
+
items: {
|
|
89
|
+
title: string;
|
|
90
|
+
description?: string;
|
|
91
|
+
}[];
|
|
92
|
+
}
|
|
93
|
+
export interface LandingScreenshotsSection extends SectionBase<'screenshots'> {
|
|
94
|
+
items: {
|
|
95
|
+
url: string;
|
|
96
|
+
alt?: string;
|
|
97
|
+
caption?: string;
|
|
98
|
+
}[];
|
|
99
|
+
}
|
|
100
|
+
export interface LandingHowItWorksSection extends SectionBase<'how-it-works'> {
|
|
101
|
+
steps: {
|
|
102
|
+
title: string;
|
|
103
|
+
description?: string;
|
|
104
|
+
}[];
|
|
105
|
+
}
|
|
106
|
+
export type LandingPlanPeriod = 'one-time' | 'month' | 'year' | 'lifetime';
|
|
107
|
+
export interface LandingPricingPlan {
|
|
108
|
+
name?: string;
|
|
109
|
+
/** Display price ("$4.99", "Free"). Overwritten from the Pay offer when offerSku is set. */
|
|
110
|
+
price?: string;
|
|
111
|
+
period?: LandingPlanPeriod;
|
|
112
|
+
description?: string;
|
|
113
|
+
features?: string[];
|
|
114
|
+
highlighted?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* SKU of an Extenshi Pay offer of this project. When set, the hosted page
|
|
117
|
+
* takes price, period and — when not given here — name, description and
|
|
118
|
+
* features from the live offer, so the page cannot advertise a price the
|
|
119
|
+
* checkout does not charge.
|
|
120
|
+
*/
|
|
121
|
+
offerSku?: string;
|
|
122
|
+
ctaLabel?: string;
|
|
123
|
+
/** Where the plan button goes. Default: the first store listing. */
|
|
124
|
+
ctaUrl?: string;
|
|
125
|
+
}
|
|
126
|
+
export interface LandingPricingSection extends SectionBase<'pricing'> {
|
|
127
|
+
plans: LandingPricingPlan[];
|
|
128
|
+
note?: string;
|
|
129
|
+
}
|
|
130
|
+
export interface LandingFaqSection extends SectionBase<'faq'> {
|
|
131
|
+
items: {
|
|
132
|
+
question: string;
|
|
133
|
+
answer: string;
|
|
134
|
+
}[];
|
|
135
|
+
}
|
|
136
|
+
export interface LandingTestimonial {
|
|
137
|
+
quote: string;
|
|
138
|
+
/** The person's name as published at the source. Required. */
|
|
139
|
+
author: string;
|
|
140
|
+
role?: string;
|
|
141
|
+
/** Public https URL where they said it (store review, post). Required. */
|
|
142
|
+
sourceUrl: string;
|
|
143
|
+
sourceLabel?: string;
|
|
144
|
+
}
|
|
145
|
+
export interface LandingTestimonialsSection extends SectionBase<'testimonials'> {
|
|
146
|
+
items: LandingTestimonial[];
|
|
147
|
+
}
|
|
148
|
+
export interface LandingStoreBadgesSection extends SectionBase<'store-badges'> {
|
|
149
|
+
/** Order and subset of stores; default every store with a URL. */
|
|
150
|
+
browsers?: LandingBrowser[];
|
|
151
|
+
}
|
|
152
|
+
export interface LandingChangelogSection extends SectionBase<'changelog'> {
|
|
153
|
+
entries: {
|
|
154
|
+
version: string;
|
|
155
|
+
date?: string;
|
|
156
|
+
notes: string[];
|
|
157
|
+
}[];
|
|
158
|
+
}
|
|
159
|
+
export interface LandingLinksSection extends SectionBase<'links'> {
|
|
160
|
+
items?: {
|
|
161
|
+
label: string;
|
|
162
|
+
url: string;
|
|
163
|
+
}[];
|
|
164
|
+
/** Also list privacy / support / feedback / terms from the form. Default true. */
|
|
165
|
+
includeProjectLinks?: boolean;
|
|
166
|
+
}
|
|
167
|
+
export type LandingSection = LandingHeroSection | LandingAboutSection | LandingFeaturesSection | LandingScreenshotsSection | LandingHowItWorksSection | LandingPricingSection | LandingFaqSection | LandingTestimonialsSection | LandingStoreBadgesSection | LandingChangelogSection | LandingLinksSection;
|
|
168
|
+
/**
|
|
169
|
+
* System font stacks only (after modern-font-stacks, CC0). A web font would
|
|
170
|
+
* need a font-src exception in the hosted CSP and a third-party request from
|
|
171
|
+
* every visitor; a stack renders instantly and requests nothing.
|
|
172
|
+
*/
|
|
173
|
+
export declare const LANDING_FONTS: {
|
|
174
|
+
readonly default: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif";
|
|
175
|
+
readonly 'system-ui': "system-ui, sans-serif";
|
|
176
|
+
readonly 'neo-grotesque': "Inter, Roboto, \"Helvetica Neue\", \"Arial Nova\", \"Nimbus Sans\", Arial, sans-serif";
|
|
177
|
+
readonly humanist: "Seravek, \"Gill Sans Nova\", Ubuntu, Calibri, \"DejaVu Sans\", source-sans-pro, sans-serif";
|
|
178
|
+
readonly 'geometric-humanist': "Avenir, Montserrat, Corbel, \"URW Gothic\", source-sans-pro, sans-serif";
|
|
179
|
+
readonly 'classical-humanist': "Optima, Candara, \"Noto Sans\", source-sans-pro, sans-serif";
|
|
180
|
+
readonly 'rounded-sans': "ui-rounded, \"Hiragino Maru Gothic ProN\", Quicksand, Comfortaa, Manjari, \"Arial Rounded MT\", \"Arial Rounded MT Bold\", Calibri, source-sans-pro, sans-serif";
|
|
181
|
+
readonly hyperlegible: "\"Atkinson Hyperlegible Next\", \"Atkinson Hyperlegible\", Lexend, Verdana, Tahoma, sans-serif";
|
|
182
|
+
readonly industrial: "Bahnschrift, \"DIN Alternate\", \"Franklin Gothic Medium\", \"Nimbus Sans Narrow\", sans-serif-condensed, sans-serif";
|
|
183
|
+
readonly transitional: "Charter, \"Bitstream Charter\", \"Sitka Text\", Cambria, serif";
|
|
184
|
+
readonly 'old-style': "\"Iowan Old Style\", \"Palatino Linotype\", \"URW Palladio L\", P052, serif";
|
|
185
|
+
readonly 'slab-serif': "Rockwell, \"Rockwell Nova\", \"Roboto Slab\", \"DejaVu Serif\", \"Sitka Small\", serif";
|
|
186
|
+
readonly didone: "Didot, \"Bodoni MT\", \"Noto Serif Display\", \"URW Palladio L\", P052, Sylfaen, serif";
|
|
187
|
+
readonly monospace: "ui-monospace, \"Cascadia Code\", \"Source Code Pro\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace";
|
|
188
|
+
};
|
|
189
|
+
export type LandingFontId = keyof typeof LANDING_FONTS;
|
|
190
|
+
export interface LandingPalette {
|
|
191
|
+
accent?: string;
|
|
192
|
+
/** Text on accent-coloured buttons. */
|
|
193
|
+
accentText?: string;
|
|
194
|
+
background?: string;
|
|
195
|
+
surface?: string;
|
|
196
|
+
text?: string;
|
|
197
|
+
muted?: string;
|
|
198
|
+
border?: string;
|
|
199
|
+
}
|
|
200
|
+
export interface LandingThemeTokens {
|
|
201
|
+
/** `auto` ships both palettes and follows prefers-color-scheme. Default: form.theme. */
|
|
202
|
+
mode?: 'light' | 'dark' | 'auto';
|
|
203
|
+
light?: LandingPalette;
|
|
204
|
+
dark?: LandingPalette;
|
|
205
|
+
headingFont?: LandingFontId;
|
|
206
|
+
bodyFont?: LandingFontId;
|
|
207
|
+
radius?: 'none' | 'small' | 'medium' | 'large';
|
|
208
|
+
width?: 'narrow' | 'normal' | 'wide';
|
|
209
|
+
}
|
|
210
|
+
export interface LandingSeo {
|
|
211
|
+
/** <title> and og:title. Default "{name} — {tagline}". */
|
|
212
|
+
title?: string;
|
|
213
|
+
/** meta description and og:description. Default description or tagline. */
|
|
214
|
+
description?: string;
|
|
215
|
+
/** og:image; default the first screenshot. https only. */
|
|
216
|
+
ogImageUrl?: string;
|
|
217
|
+
/** Twitter/X handle for twitter:site. */
|
|
218
|
+
twitterSite?: string;
|
|
219
|
+
/** Publisher name for JSON-LD author. */
|
|
220
|
+
authorName?: string;
|
|
221
|
+
/** Adds robots noindex — for a page that must stay out of search. */
|
|
222
|
+
noindex?: boolean;
|
|
223
|
+
}
|
|
224
|
+
export declare const LANDING_UI_DEFAULTS: {
|
|
225
|
+
readonly addToChrome: "Add to Chrome";
|
|
226
|
+
readonly getForFirefox: "Get for Firefox";
|
|
227
|
+
readonly getForEdge: "Get for Edge";
|
|
228
|
+
readonly screenshots: "Screenshots";
|
|
229
|
+
readonly features: "Features";
|
|
230
|
+
readonly howItWorks: "How it works";
|
|
231
|
+
readonly pricing: "Pricing";
|
|
232
|
+
readonly faq: "Frequently asked questions";
|
|
233
|
+
readonly testimonials: "What people say";
|
|
234
|
+
readonly storeBadges: "Get it for your browser";
|
|
235
|
+
readonly changelog: "Changelog";
|
|
236
|
+
readonly links: "Links";
|
|
237
|
+
readonly privacy: "Privacy policy";
|
|
238
|
+
readonly support: "Support";
|
|
239
|
+
readonly feedback: "Share feedback";
|
|
240
|
+
readonly terms: "License & refunds";
|
|
241
|
+
readonly install: "Install";
|
|
242
|
+
readonly popular: "Most popular";
|
|
243
|
+
readonly perMonth: "/ month";
|
|
244
|
+
readonly perYear: "/ year";
|
|
245
|
+
readonly oneTime: "one-time";
|
|
246
|
+
readonly lifetime: "lifetime";
|
|
247
|
+
readonly source: "Source";
|
|
248
|
+
readonly languages: "Languages";
|
|
249
|
+
/** Alt text of the hero logo; `{name}` is replaced by the extension name. */
|
|
250
|
+
readonly logoAlt: "{name} logo";
|
|
251
|
+
};
|
|
252
|
+
export type LandingUiKey = keyof typeof LANDING_UI_DEFAULTS;
|
|
253
|
+
export interface LandingLocaleContent {
|
|
254
|
+
extensionName?: string;
|
|
255
|
+
tagline?: string;
|
|
256
|
+
description?: string;
|
|
257
|
+
seo?: {
|
|
258
|
+
title?: string;
|
|
259
|
+
description?: string;
|
|
260
|
+
ogImageUrl?: string;
|
|
261
|
+
};
|
|
262
|
+
ui?: Partial<Record<LandingUiKey, string>>;
|
|
263
|
+
/**
|
|
264
|
+
* Per-section overrides keyed by section id, in the section's own shape.
|
|
265
|
+
* Only string values are taken (arrays merge by index), so a translation
|
|
266
|
+
* can change words and localized screenshot URLs, never structure.
|
|
267
|
+
*/
|
|
268
|
+
sections?: Record<string, Record<string, unknown>>;
|
|
269
|
+
}
|
|
270
|
+
/** The optional fields v2 adds to LandingForm. */
|
|
271
|
+
export interface LandingV2Fields {
|
|
272
|
+
schemaVersion?: 2;
|
|
273
|
+
sections?: LandingSection[];
|
|
274
|
+
tokens?: LandingThemeTokens;
|
|
275
|
+
seo?: LandingSeo;
|
|
276
|
+
/** Locale of the base content. Default `en`. */
|
|
277
|
+
defaultLocale?: string;
|
|
278
|
+
locales?: Record<string, LandingLocaleContent>;
|
|
279
|
+
ui?: Partial<Record<LandingUiKey, string>>;
|
|
280
|
+
/** Hosted uninstall-feedback form (extenshi hosted artifact). */
|
|
281
|
+
uninstallUrl?: string;
|
|
282
|
+
/** License terms & refunds page (Extenshi Pay hosted artifact). */
|
|
283
|
+
termsUrl?: string;
|
|
284
|
+
}
|
|
285
|
+
export interface LandingProblem {
|
|
286
|
+
/** JSON path into the form, e.g. `sections[3].items[0].sourceUrl`. */
|
|
287
|
+
path: string;
|
|
288
|
+
severity: 'error' | 'warning';
|
|
289
|
+
message: string;
|
|
290
|
+
/** What to change to fix it. */
|
|
291
|
+
fix: string;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* `pt_BR`, `pt-br`, `PT-BR` → `pt-BR` (BCP 47, as hreflang and <html lang>
|
|
295
|
+
* want it). Accepts the Chrome `_locales` spelling used by the localization
|
|
296
|
+
* workflow. Null when the value is not a language tag.
|
|
297
|
+
*/
|
|
298
|
+
export declare function normalizeLandingLocale(raw: unknown): string | null;
|
|
299
|
+
/** `<html dir>` for a locale page: `rtl` for Arabic, Hebrew, Persian, Urdu and other RTL scripts. */
|
|
300
|
+
export declare function landingLocaleDir(locale: string): 'ltr' | 'rtl';
|
|
301
|
+
/** URL path segment for a locale: lowercase BCP 47 (`pt-br`). */
|
|
302
|
+
export declare function landingLocaleSlug(locale: string): string;
|
|
303
|
+
export declare function landingDefaultLocale(form: LandingForm): string;
|
|
304
|
+
/** Default locale first, then every valid translated locale (deduplicated, capped). */
|
|
305
|
+
export declare function landingLocales(form: LandingForm): string[];
|
|
306
|
+
/** Absolute URL of a locale's page: the default locale lives at `base`, others at `base/{slug}`. */
|
|
307
|
+
export declare function landingLocaleUrl(base: string, locale: string, defaultLocale: string): string;
|
|
308
|
+
/** The form as it reads in `locale` (the base form for the default locale). */
|
|
309
|
+
export declare function localizeLandingForm(form: LandingForm, locale: string): LandingForm;
|
|
310
|
+
/** WCAG 2 contrast ratio of two hex colours, or null when either is not a hex colour. */
|
|
311
|
+
export declare function contrastRatio(a: string, b: string): number | null;
|
|
312
|
+
/**
|
|
313
|
+
* Everything wrong with a form, as actionable problems. `error` means the
|
|
314
|
+
* hosted publish refuses the form; `warning` means it renders but something
|
|
315
|
+
* was dropped, defaulted or is likely unintended. For a v1 form this is
|
|
316
|
+
* landingPageWarnings() as warnings — v1 validation is unchanged.
|
|
317
|
+
*/
|
|
318
|
+
export declare function landingFormProblems(form: LandingForm): LandingProblem[];
|
|
319
|
+
/** A live Extenshi Pay offer as the renderer needs it (the BFF's LandingPayOffer fits). */
|
|
320
|
+
export interface LandingRenderOffer {
|
|
321
|
+
sku: string;
|
|
322
|
+
/** Minor units, as stored on the offer (formatLandingPrice divides by 100). */
|
|
323
|
+
amountMinor: number;
|
|
324
|
+
currency: string;
|
|
325
|
+
}
|
|
326
|
+
export interface RenderLandingOptions {
|
|
327
|
+
/** Locale to render; default the form's default locale. */
|
|
328
|
+
locale?: string;
|
|
329
|
+
/**
|
|
330
|
+
* The project's active Pay offers (hosted rendering only). Plans bound to
|
|
331
|
+
* one by offerSku get a JSON-LD Offer with its real price; without them a
|
|
332
|
+
* page that sells something claims no price rather than a free one.
|
|
333
|
+
*/
|
|
334
|
+
payOffers?: readonly LandingRenderOffer[];
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* The one entry point every surface calls (dojo preview, BFF hosting, MCP and
|
|
338
|
+
* CLI generate). A v1 form goes to buildLandingPage untouched.
|
|
339
|
+
*/
|
|
340
|
+
export declare function renderLandingForm(form: LandingForm, opts?: RenderLandingOptions): string;
|
|
341
|
+
/** Every locale's page: `[{ locale, path, html }]`, default locale first (path ''). */
|
|
342
|
+
export declare function renderLandingLocales(form: LandingForm, opts?: Omit<RenderLandingOptions, 'locale'>): {
|
|
343
|
+
locale: string;
|
|
344
|
+
slug: string;
|
|
345
|
+
html: string;
|
|
346
|
+
}[];
|
|
347
|
+
/** Format a Pay offer amount for a pricing card ("$4.99", "4,99 €"). */
|
|
348
|
+
export declare function formatLandingPrice(amountMinor: number, currency: string, locale: string): string;
|
|
349
|
+
export {};
|
|
350
|
+
//# sourceMappingURL=landing-sections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"landing-sections.d.ts","sourceRoot":"","sources":["../src/landing-sections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,OAAO,EAMN,KAAK,cAAc,EACnB,KAAK,WAAW,EAQhB,MAAM,mBAAmB,CAAA;AAE1B,eAAO,MAAM,sBAAsB,EAAG,CAAU,CAAA;AAEhD,eAAO,MAAM,qBAAqB,+IAYxB,CAAA;AACV,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEvE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;CAsBpB,CAAA;AAEV,wFAAwF;AACxF,eAAO,MAAM,kBAAkB,QAA8B,CAAA;AAE7D,UAAU,WAAW,CAAC,CAAC,SAAS,kBAAkB;IACjD,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,CAAC,CAAA;IACP,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,sEAAsE;IACtE,KAAK,C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