@sovecom/theme-sdk 1.0.0-rc.1 → 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.
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@
15
15
  * core version.
16
16
  */
17
17
  /** SDK package version (independent of the core API contract version below). */
18
- export declare const THEME_SDK_VERSION = "1.0.0-rc.1";
18
+ export declare const THEME_SDK_VERSION = "1.0.1";
19
19
  export { defineTheme } from './theme.js';
20
20
  export type { DefineThemeConfig } from './theme.js';
21
21
  export { defineThemeSlots } from './slots.js';
@@ -30,4 +30,6 @@ export type { WidgetType, WidgetDescriptor, StarRatingSummaryProps, ReviewListPr
30
30
  export { MANIFEST_MAX_BYTES, assertCoreCompatible } from './manifest.js';
31
31
  export { CORE_API_VERSION } from '@sovecom/module-sdk';
32
32
  export type { ActiveTheme, SlotBinding, SlotMap } from './store-contract.js';
33
+ export { MARKETING_SECTION_TYPES, MARKETING_SECTION_REGISTRY, marketingHrefSchema, marketingImageUrlSchema, heroBannerSettingsSchema, ctaBannerSettingsSchema, promoTilesSettingsSchema, richTextSettingsSchema, parseMarketingSectionSettings, parseMarketingSection, } from './marketing-sections.js';
34
+ export type { MarketingSectionType, MarketingSectionDescriptor, HeroBannerSettings, CtaBannerSettings, PromoTilesSettings, RichTextSettings, } from './marketing-sections.js';
33
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,gFAAgF;AAChF,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAG9C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,e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,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -16,9 +16,9 @@
16
16
  * core version.
17
17
  */
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.CORE_API_VERSION = exports.assertCoreCompatible = exports.MANIFEST_MAX_BYTES = exports.parseWidget = exports.widgetDescriptorSchema = exports.submitFormPropsSchema = exports.toggleButtonPropsSchema = exports.productCarouselPropsSchema = exports.reviewListPropsSchema = exports.starRatingSummaryPropsSchema = exports.actionSchema = exports.actionPathSchema = exports.WIDGET_MAX_BYTES = exports.WIDGET_TYPES = exports.defineSection = exports.defineTemplate = exports.parseTemplate = exports.templateSchema = exports.templateSectionSchema = exports.regionNameSchema = exports.pageTypeSchema = exports.MAX_REGION_DEPTH = exports.REGION_NAME_RE = exports.SECTION_TYPE_RE = exports.PAGE_TYPES = exports.parseAndVerifyThemeManifest = exports.themeTemplateDeclSchema = exports.themeManifestSchema = exports.TEMPLATE_PATH_RE = exports.SLOT_SLUG_RE = exports.THEME_NAME_RE = exports.defineThemeSettings = exports.defineThemeSlots = exports.defineTheme = exports.THEME_SDK_VERSION = void 0;
19
+ exports.parseMarketingSection = exports.parseMarketingSectionSettings = exports.richTextSettingsSchema = exports.promoTilesSettingsSchema = exports.ctaBannerSettingsSchema = exports.heroBannerSettingsSchema = exports.marketingImageUrlSchema = exports.marketingHrefSchema = exports.MARKETING_SECTION_REGISTRY = exports.MARKETING_SECTION_TYPES = exports.CORE_API_VERSION = exports.assertCoreCompatible = exports.MANIFEST_MAX_BYTES = exports.parseWidget = exports.widgetDescriptorSchema = exports.submitFormPropsSchema = exports.toggleButtonPropsSchema = exports.productCarouselPropsSchema = exports.reviewListPropsSchema = exports.starRatingSummaryPropsSchema = exports.actionSchema = exports.actionPathSchema = exports.WIDGET_MAX_BYTES = exports.WIDGET_TYPES = exports.defineSection = exports.defineTemplate = exports.parseTemplate = exports.templateSchema = exports.templateSectionSchema = exports.regionNameSchema = exports.pageTypeSchema = exports.MAX_REGION_DEPTH = exports.REGION_NAME_RE = exports.SECTION_TYPE_RE = exports.PAGE_TYPES = exports.parseAndVerifyThemeManifest = exports.themeTemplateDeclSchema = exports.themeManifestSchema = exports.TEMPLATE_PATH_RE = exports.SLOT_SLUG_RE = exports.THEME_NAME_RE = exports.defineThemeSettings = exports.defineThemeSlots = exports.defineTheme = exports.THEME_SDK_VERSION = void 0;
20
20
  /** SDK package version (independent of the core API contract version below). */
21
- exports.THEME_SDK_VERSION = '1.0.0-rc.1';
21
+ exports.THEME_SDK_VERSION = '1.0.1';
22
22
  // ── author ergonomics ───────────────────────────────────────────────────────────
23
23
  var theme_js_1 = require("./theme.js");
24
24
  Object.defineProperty(exports, "defineTheme", { enumerable: true, get: function () { return theme_js_1.defineTheme; } });
@@ -72,4 +72,18 @@ Object.defineProperty(exports, "MANIFEST_MAX_BYTES", { enumerable: true, get: fu
72
72
  Object.defineProperty(exports, "assertCoreCompatible", { enumerable: true, get: function () { return manifest_js_2.assertCoreCompatible; } });
73
73
  var module_sdk_1 = require("@sovecom/module-sdk");
74
74
  Object.defineProperty(exports, "CORE_API_VERSION", { enumerable: true, get: function () { return module_sdk_1.CORE_API_VERSION; } });
75
+ // ── marketing section settings schemas ────────────────────────────────────────
76
+ // Shared, validated contract for hero-banner / cta-banner / promo-tiles / rich-text sections.
77
+ // The API, admin editor, and storefront all import from here — one source of truth for validation.
78
+ var marketing_sections_js_1 = require("./marketing-sections.js");
79
+ Object.defineProperty(exports, "MARKETING_SECTION_TYPES", { enumerable: true, get: function () { return marketing_sections_js_1.MARKETING_SECTION_TYPES; } });
80
+ Object.defineProperty(exports, "MARKETING_SECTION_REGISTRY", { enumerable: true, get: function () { return marketing_sections_js_1.MARKETING_SECTION_REGISTRY; } });
81
+ Object.defineProperty(exports, "marketingHrefSchema", { enumerable: true, get: function () { return marketing_sections_js_1.marketingHrefSchema; } });
82
+ Object.defineProperty(exports, "marketingImageUrlSchema", { enumerable: true, get: function () { return marketing_sections_js_1.marketingImageUrlSchema; } });
83
+ Object.defineProperty(exports, "heroBannerSettingsSchema", { enumerable: true, get: function () { return marketing_sections_js_1.heroBannerSettingsSchema; } });
84
+ Object.defineProperty(exports, "ctaBannerSettingsSchema", { enumerable: true, get: function () { return marketing_sections_js_1.ctaBannerSettingsSchema; } });
85
+ Object.defineProperty(exports, "promoTilesSettingsSchema", { enumerable: true, get: function () { return marketing_sections_js_1.promoTilesSettingsSchema; } });
86
+ Object.defineProperty(exports, "richTextSettingsSchema", { enumerable: true, get: function () { return marketing_sections_js_1.richTextSettingsSchema; } });
87
+ Object.defineProperty(exports, "parseMarketingSectionSettings", { enumerable: true, get: function () { return marketing_sections_js_1.parseMarketingSectionSettings; } });
88
+ Object.defineProperty(exports, "parseMarketingSection", { enumerable: true, get: function () { return marketing_sections_js_1.parseMarketingSection; } });
75
89
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,gFAAgF;AACnE,QAAA,iBAAiB,GAAG,YAAY,CAAC;AAE9C,mFAAmF;AACnF,uCAAyC;AAAhC,uGAAA,WAAW,OAAA;AAEpB,uCAA8C;AAArC,4GAAA,gBAAgB,OAAA;AACzB,6CAAoD;AAA3C,kHAAA,mBAAmB,OAAA;AAG5B,oFAAoF;AACpF,6CAOuB;AANrB,4GAAA,aAAa,OAAA;AACb,2GAAA,YAAY,OAAA;AACZ,+GAAA,gBAAgB,OAAA;AAChB,kHAAA,mBAAmB,OAAA;AACnB,sHAAA,uB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B,iIAAA,wBAAwB,OAAA;AACxB,+HAAA,sBAAsB,OAAA;AACtB,sIAAA,6BAA6B,OAAA;AAC7B,8HAAA,qBAAqB,OAAA"}
@@ -0,0 +1,197 @@
1
+ /**
2
+ * Marketing section settings schemas — the shared, validated contract for the API, admin editor,
3
+ * and storefront renderers.
4
+ *
5
+ * Every consumer (API validation, admin-side form generation, storefront render) imports from this
6
+ * single file so the contract can never diverge across tiers. Section-type strings match
7
+ * {@link SECTION_TYPE_RE} (`/^[a-z][a-z0-9-]*$/`). All strings are bounded, all arrays capped, all
8
+ * fixed-choice fields are enums — no open strings where a finite set suffices.
9
+ *
10
+ * URL/link safety: `ctaHref` and tile `href` fields use {@link marketingHrefSchema}, a schema that
11
+ * accepts only root-relative paths (`/…`) or `http(s)://` absolute URLs. It rejects `javascript:`,
12
+ * `data:`, protocol-relative (`//host`), and any other scheme — mirroring the `safeImageUrl` guard
13
+ * in `apps/storefront-next/src/lib/widgets/safeUrl.ts`.
14
+ *
15
+ * HTML safety: `rich-text` stores its content as MARKDOWN, not raw HTML, so there is no raw-HTML
16
+ * injection surface at the schema layer. The storefront MUST render it with `react-markdown` +
17
+ * `rehype-sanitize` (exactly as `apps/storefront-next/src/components/Markdown.tsx` does for CMS
18
+ * pages) — never with `dangerouslySetInnerHTML` of the raw string.
19
+ *
20
+ * Image URL safety: `imageUrl` fields accept root-relative paths or `http(s)://` absolute URLs only
21
+ * — same shape gate as `safeImageUrl`. The storefront enforces the PII-egress origin allowlist at
22
+ * render time (the schema cannot know the runtime API base URL).
23
+ */
24
+ import { z } from 'zod';
25
+ /**
26
+ * A safe `href` for CTA links and tile links. Accepts:
27
+ * - Root-relative paths: `/…` (NOT protocol-relative `//host`).
28
+ * - Absolute `http(s)://` URLs.
29
+ * Rejects `javascript:`, `data:`, `//host`, bare strings with no slash, and anything else.
30
+ * Mirrors the scheme-gate posture of `safeImageUrl` in `safeUrl.ts`.
31
+ */
32
+ export declare const marketingHrefSchema: z.ZodString;
33
+ /**
34
+ * An image URL: root-relative path or `http(s)://` absolute URL, bounded length.
35
+ * Same gate as `marketingHrefSchema` — the storefront enforces the PII-egress origin allowlist
36
+ * at render time (mirrors `safeImageUrl` in `safeUrl.ts`).
37
+ */
38
+ export declare const marketingImageUrlSchema: z.ZodString;
39
+ /**
40
+ * `hero-banner` settings — a full-width banner with an optional image, headline, sub-headline,
41
+ * and a single call-to-action.
42
+ */
43
+ export declare const heroBannerSettingsSchema: z.ZodObject<{
44
+ imageUrl: z.ZodOptional<z.ZodString>;
45
+ headline: z.ZodString;
46
+ subheadline: z.ZodOptional<z.ZodString>;
47
+ ctaLabel: z.ZodOptional<z.ZodString>;
48
+ ctaHref: z.ZodOptional<z.ZodString>;
49
+ align: z.ZodOptional<z.ZodEnum<{
50
+ left: "left";
51
+ center: "center";
52
+ right: "right";
53
+ }>>;
54
+ overlay: z.ZodOptional<z.ZodBoolean>;
55
+ }, z.core.$strict>;
56
+ /** Validated `hero-banner` settings. */
57
+ export type HeroBannerSettings = z.infer<typeof heroBannerSettingsSchema>;
58
+ /**
59
+ * `cta-banner` settings — a compact call-to-action strip with a headline, optional body copy,
60
+ * and a required CTA button.
61
+ */
62
+ export declare const ctaBannerSettingsSchema: z.ZodObject<{
63
+ headline: z.ZodString;
64
+ body: z.ZodOptional<z.ZodString>;
65
+ ctaLabel: z.ZodString;
66
+ ctaHref: z.ZodString;
67
+ variant: z.ZodOptional<z.ZodEnum<{
68
+ primary: "primary";
69
+ secondary: "secondary";
70
+ }>>;
71
+ }, z.core.$strict>;
72
+ /** Validated `cta-banner` settings. */
73
+ export type CtaBannerSettings = z.infer<typeof ctaBannerSettingsSchema>;
74
+ /**
75
+ * `promo-tiles` settings — a responsive grid of linked image tiles, capped at
76
+ * {@link MAX_TILES} items (12).
77
+ */
78
+ export declare const promoTilesSettingsSchema: z.ZodObject<{
79
+ columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
80
+ tiles: z.ZodArray<z.ZodObject<{
81
+ imageUrl: z.ZodOptional<z.ZodString>;
82
+ label: z.ZodString;
83
+ href: z.ZodString;
84
+ caption: z.ZodOptional<z.ZodString>;
85
+ }, z.core.$strict>>;
86
+ }, z.core.$strict>;
87
+ /** Validated `promo-tiles` settings. */
88
+ export type PromoTilesSettings = z.infer<typeof promoTilesSettingsSchema>;
89
+ /**
90
+ * `rich-text` settings — author-supplied Markdown content.
91
+ *
92
+ * Content is stored as MARKDOWN (not raw HTML) to eliminate raw-HTML injection at the schema layer.
93
+ * The storefront MUST render it through `react-markdown` + `rehype-sanitize` — as
94
+ * `apps/storefront-next/src/components/Markdown.tsx` does for CMS pages — and must NEVER pass
95
+ * `markdown` to `dangerouslySetInnerHTML` directly.
96
+ */
97
+ export declare const richTextSettingsSchema: z.ZodObject<{
98
+ markdown: z.ZodString;
99
+ }, z.core.$strict>;
100
+ /** Validated `rich-text` settings. */
101
+ export type RichTextSettings = z.infer<typeof richTextSettingsSchema>;
102
+ /**
103
+ * All marketing section types as a const tuple — matches {@link SECTION_TYPE_RE}
104
+ * (`/^[a-z][a-z0-9-]*$/`).
105
+ */
106
+ export declare const MARKETING_SECTION_TYPES: readonly ["hero-banner", "cta-banner", "promo-tiles", "rich-text"];
107
+ /** One of the known marketing section type strings. */
108
+ export type MarketingSectionType = (typeof MARKETING_SECTION_TYPES)[number];
109
+ /**
110
+ * Registry mapping each marketing section type to its Zod settings schema. Import this in the API
111
+ * validator, admin editor, and storefront renderer to share a single source of truth — never
112
+ * duplicate the schema in multiple places.
113
+ *
114
+ * @example
115
+ * ```ts
116
+ * import { MARKETING_SECTION_REGISTRY } from '@sovecom/theme-sdk';
117
+ * const result = MARKETING_SECTION_REGISTRY['hero-banner'].safeParse(settings);
118
+ * ```
119
+ */
120
+ export declare const MARKETING_SECTION_REGISTRY: {
121
+ readonly 'hero-banner': z.ZodObject<{
122
+ imageUrl: z.ZodOptional<z.ZodString>;
123
+ headline: z.ZodString;
124
+ subheadline: z.ZodOptional<z.ZodString>;
125
+ ctaLabel: z.ZodOptional<z.ZodString>;
126
+ ctaHref: z.ZodOptional<z.ZodString>;
127
+ align: z.ZodOptional<z.ZodEnum<{
128
+ left: "left";
129
+ center: "center";
130
+ right: "right";
131
+ }>>;
132
+ overlay: z.ZodOptional<z.ZodBoolean>;
133
+ }, z.core.$strict>;
134
+ readonly 'cta-banner': z.ZodObject<{
135
+ headline: z.ZodString;
136
+ body: z.ZodOptional<z.ZodString>;
137
+ ctaLabel: z.ZodString;
138
+ ctaHref: z.ZodString;
139
+ variant: z.ZodOptional<z.ZodEnum<{
140
+ primary: "primary";
141
+ secondary: "secondary";
142
+ }>>;
143
+ }, z.core.$strict>;
144
+ readonly 'promo-tiles': z.ZodObject<{
145
+ columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
146
+ tiles: z.ZodArray<z.ZodObject<{
147
+ imageUrl: z.ZodOptional<z.ZodString>;
148
+ label: z.ZodString;
149
+ href: z.ZodString;
150
+ caption: z.ZodOptional<z.ZodString>;
151
+ }, z.core.$strict>>;
152
+ }, z.core.$strict>;
153
+ readonly 'rich-text': z.ZodObject<{
154
+ markdown: z.ZodString;
155
+ }, z.core.$strict>;
156
+ };
157
+ /**
158
+ * A discriminated union of all marketing section descriptors `{ type, settings }`. Useful for
159
+ * typed switch/dispatch in renderers that handle multiple section types.
160
+ */
161
+ export type MarketingSectionDescriptor = {
162
+ type: 'hero-banner';
163
+ settings: HeroBannerSettings;
164
+ } | {
165
+ type: 'cta-banner';
166
+ settings: CtaBannerSettings;
167
+ } | {
168
+ type: 'promo-tiles';
169
+ settings: PromoTilesSettings;
170
+ } | {
171
+ type: 'rich-text';
172
+ settings: RichTextSettings;
173
+ };
174
+ /**
175
+ * Parse and validate marketing section settings for a given `type`. Returns the typed, validated
176
+ * settings object, or `null` on any failure (unknown type, schema violation, etc.). Fail-closed —
177
+ * never throws. Mirrors `parseWidget`'s defensive contract.
178
+ *
179
+ * @example
180
+ * ```ts
181
+ * const settings = parseMarketingSectionSettings('hero-banner', rawSettings);
182
+ * if (!settings) return null; // skip the section — never render unvalidated data
183
+ * ```
184
+ */
185
+ export declare function parseMarketingSectionSettings(type: string, raw: unknown): HeroBannerSettings | CtaBannerSettings | PromoTilesSettings | RichTextSettings | null;
186
+ /**
187
+ * Parse and validate a full marketing section descriptor `{ type, settings }`. Returns the typed
188
+ * {@link MarketingSectionDescriptor}, or `null` on any failure. Fail-closed — never throws.
189
+ *
190
+ * @example
191
+ * ```ts
192
+ * const section = parseMarketingSection({ type: 'cta-banner', settings: rawSettings });
193
+ * if (!section) return; // skip unknown / invalid sections
194
+ * ```
195
+ */
196
+ export declare function parseMarketingSection(raw: unknown): MarketingSectionDescriptor | null;
197
+ //# sourceMappingURL=marketing-sections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketing-sections.d.ts","sourceRoot":"","sources":["../src/marketing-sections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,aAoB7B,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,aAkBjC,CAAC;AAIJ;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;kBAY1B,CAAC;AAEZ,wCAAwC;AACxC,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;kBASzB,CAAC;AAEZ,uCAAuC;AACvC,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAYxE;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;kBAM1B,CAAC;A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.MARKETING_SECTION_TYPES = exports.richTextSettingsSchema = exports.promoTilesSettingsSchema = exports.ctaBannerSettingsSchema = exports.heroBannerSettingsSchema = exports.marketingImageUrlSchema = exports.marketingHrefSchema = void 0;
4
+ exports.parseMarketingSectionSettings = parseMarketingSectionSettings;
5
+ exports.parseMarketingSection = parseMarketingSection;
6
+ /**
7
+ * Marketing section settings schemas — the shared, validated contract for the API, admin editor,
8
+ * and storefront renderers.
9
+ *
10
+ * Every consumer (API validation, admin-side form generation, storefront render) imports from this
11
+ * single file so the contract can never diverge across tiers. Section-type strings match
12
+ * {@link SECTION_TYPE_RE} (`/^[a-z][a-z0-9-]*$/`). All strings are bounded, all arrays capped, all
13
+ * fixed-choice fields are enums — no open strings where a finite set suffices.
14
+ *
15
+ * URL/link safety: `ctaHref` and tile `href` fields use {@link marketingHrefSchema}, a schema that
16
+ * accepts only root-relative paths (`/…`) or `http(s)://` absolute URLs. It rejects `javascript:`,
17
+ * `data:`, protocol-relative (`//host`), and any other scheme — mirroring the `safeImageUrl` guard
18
+ * in `apps/storefront-next/src/lib/widgets/safeUrl.ts`.
19
+ *
20
+ * HTML safety: `rich-text` stores its content as MARKDOWN, not raw HTML, so there is no raw-HTML
21
+ * injection surface at the schema layer. The storefront MUST render it with `react-markdown` +
22
+ * `rehype-sanitize` (exactly as `apps/storefront-next/src/components/Markdown.tsx` does for CMS
23
+ * pages) — never with `dangerouslySetInnerHTML` of the raw string.
24
+ *
25
+ * Image URL safety: `imageUrl` fields accept root-relative paths or `http(s)://` absolute URLs only
26
+ * — same shape gate as `safeImageUrl`. The storefront enforces the PII-egress origin allowlist at
27
+ * render time (the schema cannot know the runtime API base URL).
28
+ */
29
+ const zod_1 = require("zod");
30
+ // ── shared field bounds ────────────────────────────────────────────────────────────
31
+ const MAX_HEADLINE_LEN = 160;
32
+ const MAX_SUBHEADLINE_LEN = 300;
33
+ const MAX_BODY_LEN = 600;
34
+ const MAX_CTA_LABEL_LEN = 80;
35
+ const MAX_IMAGE_URL_LEN = 2048;
36
+ const MAX_TILE_LABEL_LEN = 120;
37
+ const MAX_TILE_CAPTION_LEN = 300;
38
+ const MAX_TILES = 12;
39
+ const MAX_MARKDOWN_LEN = 50_000; // ~50 KB of source markdown is a generous upper bound
40
+ /**
41
+ * A safe `href` for CTA links and tile links. Accepts:
42
+ * - Root-relative paths: `/…` (NOT protocol-relative `//host`).
43
+ * - Absolute `http(s)://` URLs.
44
+ * Rejects `javascript:`, `data:`, `//host`, bare strings with no slash, and anything else.
45
+ * Mirrors the scheme-gate posture of `safeImageUrl` in `safeUrl.ts`.
46
+ */
47
+ exports.marketingHrefSchema = zod_1.z
48
+ .string()
49
+ .min(1)
50
+ .max(2048)
51
+ .refine((v) => {
52
+ // Root-relative: starts with `/` but NOT `//` (not protocol-relative).
53
+ if (v.startsWith('/') && !v.startsWith('//'))
54
+ return true;
55
+ // Absolute http(s) URL — require a real URL parse so the scheme is canonical.
56
+ if (/^https?:\/\//i.test(v)) {
57
+ try {
58
+ const u = new URL(v);
59
+ return u.protocol === 'http:' || u.protocol === 'https:';
60
+ }
61
+ catch {
62
+ return false;
63
+ }
64
+ }
65
+ return false;
66
+ }, { message: 'href must be a root-relative path (/…) or an http(s):// absolute URL' });
67
+ /**
68
+ * An image URL: root-relative path or `http(s)://` absolute URL, bounded length.
69
+ * Same gate as `marketingHrefSchema` — the storefront enforces the PII-egress origin allowlist
70
+ * at render time (mirrors `safeImageUrl` in `safeUrl.ts`).
71
+ */
72
+ exports.marketingImageUrlSchema = zod_1.z
73
+ .string()
74
+ .min(1)
75
+ .max(MAX_IMAGE_URL_LEN)
76
+ .refine((v) => {
77
+ if (v.startsWith('/') && !v.startsWith('//'))
78
+ return true;
79
+ if (/^https?:\/\//i.test(v)) {
80
+ try {
81
+ const u = new URL(v);
82
+ return u.protocol === 'http:' || u.protocol === 'https:';
83
+ }
84
+ catch {
85
+ return false;
86
+ }
87
+ }
88
+ return false;
89
+ }, { message: 'imageUrl must be a root-relative path (/…) or an http(s):// absolute URL' });
90
+ // ── per-section settings schemas ──────────────────────────────────────────────────
91
+ /**
92
+ * `hero-banner` settings — a full-width banner with an optional image, headline, sub-headline,
93
+ * and a single call-to-action.
94
+ */
95
+ exports.heroBannerSettingsSchema = zod_1.z
96
+ .object({
97
+ imageUrl: exports.marketingImageUrlSchema.optional(),
98
+ headline: zod_1.z.string().min(1).max(MAX_HEADLINE_LEN),
99
+ subheadline: zod_1.z.string().max(MAX_SUBHEADLINE_LEN).optional(),
100
+ ctaLabel: zod_1.z.string().max(MAX_CTA_LABEL_LEN).optional(),
101
+ ctaHref: exports.marketingHrefSchema.optional(),
102
+ /** Horizontal alignment of the banner text. Defaults to `center` when absent. */
103
+ align: zod_1.z.enum(['left', 'center', 'right']).optional(),
104
+ /** Whether to render a dark overlay on the image for contrast. Defaults to `false`. */
105
+ overlay: zod_1.z.boolean().optional(),
106
+ })
107
+ .strict();
108
+ /**
109
+ * `cta-banner` settings — a compact call-to-action strip with a headline, optional body copy,
110
+ * and a required CTA button.
111
+ */
112
+ exports.ctaBannerSettingsSchema = zod_1.z
113
+ .object({
114
+ headline: zod_1.z.string().min(1).max(MAX_HEADLINE_LEN),
115
+ body: zod_1.z.string().max(MAX_BODY_LEN).optional(),
116
+ ctaLabel: zod_1.z.string().min(1).max(MAX_CTA_LABEL_LEN),
117
+ ctaHref: exports.marketingHrefSchema,
118
+ /** Visual variant of the CTA button. Defaults to `primary` when absent. */
119
+ variant: zod_1.z.enum(['primary', 'secondary']).optional(),
120
+ })
121
+ .strict();
122
+ /** A single promo tile — an image + label + link + optional caption. */
123
+ const promoTileSchema = zod_1.z
124
+ .object({
125
+ imageUrl: exports.marketingImageUrlSchema.optional(),
126
+ label: zod_1.z.string().min(1).max(MAX_TILE_LABEL_LEN),
127
+ href: exports.marketingHrefSchema,
128
+ caption: zod_1.z.string().max(MAX_TILE_CAPTION_LEN).optional(),
129
+ })
130
+ .strict();
131
+ /**
132
+ * `promo-tiles` settings — a responsive grid of linked image tiles, capped at
133
+ * {@link MAX_TILES} items (12).
134
+ */
135
+ exports.promoTilesSettingsSchema = zod_1.z
136
+ .object({
137
+ /** Number of columns in the tile grid. Defaults to `3` when absent. */
138
+ columns: zod_1.z.union([zod_1.z.literal(2), zod_1.z.literal(3), zod_1.z.literal(4)]).optional(),
139
+ tiles: zod_1.z.array(promoTileSchema).min(1).max(MAX_TILES),
140
+ })
141
+ .strict();
142
+ /**
143
+ * `rich-text` settings — author-supplied Markdown content.
144
+ *
145
+ * Content is stored as MARKDOWN (not raw HTML) to eliminate raw-HTML injection at the schema layer.
146
+ * The storefront MUST render it through `react-markdown` + `rehype-sanitize` — as
147
+ * `apps/storefront-next/src/components/Markdown.tsx` does for CMS pages — and must NEVER pass
148
+ * `markdown` to `dangerouslySetInnerHTML` directly.
149
+ */
150
+ exports.richTextSettingsSchema = zod_1.z
151
+ .object({
152
+ /** Markdown source. The storefront must sanitize on render (react-markdown + rehype-sanitize). */
153
+ markdown: zod_1.z.string().max(MAX_MARKDOWN_LEN),
154
+ })
155
+ .strict();
156
+ // ── registry + discriminated union ────────────────────────────────────────────────
157
+ /**
158
+ * All marketing section types as a const tuple — matches {@link SECTION_TYPE_RE}
159
+ * (`/^[a-z][a-z0-9-]*$/`).
160
+ */
161
+ exports.MARKETING_SECTION_TYPES = [
162
+ 'hero-banner',
163
+ 'cta-banner',
164
+ 'promo-tiles',
165
+ 'rich-text',
166
+ ];
167
+ /**
168
+ * Registry mapping each marketing section type to its Zod settings schema. Import this in the API
169
+ * validator, admin editor, and storefront renderer to share a single source of truth — never
170
+ * duplicate the schema in multiple places.
171
+ *
172
+ * @example
173
+ * ```ts
174
+ * import { MARKETING_SECTION_REGISTRY } from '@sovecom/theme-sdk';
175
+ * const result = MARKETING_SECTION_REGISTRY['hero-banner'].safeParse(settings);
176
+ * ```
177
+ */
178
+ exports.MARKETING_SECTION_REGISTRY = {
179
+ 'hero-banner': exports.heroBannerSettingsSchema,
180
+ 'cta-banner': exports.ctaBannerSettingsSchema,
181
+ 'promo-tiles': exports.promoTilesSettingsSchema,
182
+ 'rich-text': exports.richTextSettingsSchema,
183
+ };
184
+ // ── parse helpers ─────────────────────────────────────────────────────────────────
185
+ /**
186
+ * Parse and validate marketing section settings for a given `type`. Returns the typed, validated
187
+ * settings object, or `null` on any failure (unknown type, schema violation, etc.). Fail-closed —
188
+ * never throws. Mirrors `parseWidget`'s defensive contract.
189
+ *
190
+ * @example
191
+ * ```ts
192
+ * const settings = parseMarketingSectionSettings('hero-banner', rawSettings);
193
+ * if (!settings) return null; // skip the section — never render unvalidated data
194
+ * ```
195
+ */
196
+ function parseMarketingSectionSettings(type, raw) {
197
+ if (!exports.MARKETING_SECTION_TYPES.includes(type))
198
+ return null;
199
+ const schema = exports.MARKETING_SECTION_REGISTRY[type];
200
+ const result = schema.safeParse(raw);
201
+ return result.success ? result.data : null;
202
+ }
203
+ /**
204
+ * Parse and validate a full marketing section descriptor `{ type, settings }`. Returns the typed
205
+ * {@link MarketingSectionDescriptor}, or `null` on any failure. Fail-closed — never throws.
206
+ *
207
+ * @example
208
+ * ```ts
209
+ * const section = parseMarketingSection({ type: 'cta-banner', settings: rawSettings });
210
+ * if (!section) return; // skip unknown / invalid sections
211
+ * ```
212
+ */
213
+ function parseMarketingSection(raw) {
214
+ if (raw === null || typeof raw !== 'object' || Array.isArray(raw))
215
+ return null;
216
+ const { type, settings } = raw;
217
+ if (typeof type !== 'string')
218
+ return null;
219
+ const parsed = parseMarketingSectionSettings(type, settings);
220
+ if (parsed === null)
221
+ return null;
222
+ // `type` is a known MarketingSectionType at this point (parseMarketingSectionSettings validated it).
223
+ return { type: type, settings: parsed };
224
+ }
225
+ //# sourceMappingURL=marketing-sections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketing-sections.js","sourceRoot":"","sources":["../src/marketing-sections.ts"],"names":[],"mappings":";;;AAuOA,sEAQC;AAYD,sDAQC;AAnQD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,6BAAw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AI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,MAAM,GAAG,6BAA6B,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC7D,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACjC,qGAAqG;IACrG,OAAO,EAAE,IAAI,EAAE,IAA4B,EAAE,QAAQ,EAAE,MAAM,EAAgC,CAAC;AAChG,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sovecom/theme-sdk",
3
- "version": "1.0.0-rc.1",
3
+ "version": "1.0.1",
4
4
  "license": "MIT",
5
5
  "description": "Public author-facing contract SDK for the SovEcom theme ecosystem",
6
6
  "repository": {
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "semver": "^7.8.4",
34
34
  "zod": "^4.4.3",
35
- "@sovecom/module-sdk": "1.0.0-rc.1"
35
+ "@sovecom/module-sdk": "1.0.1"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^24.0.0",