@shoppexio/builder-contracts 0.1.1 → 0.1.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.
Files changed (65) hide show
  1. package/dist/builder-settings.d.ts +2 -0
  2. package/dist/builder-settings.d.ts.map +1 -1
  3. package/dist/builder-settings.js +2 -1
  4. package/dist/custom-pages.d.ts +15 -0
  5. package/dist/custom-pages.d.ts.map +1 -0
  6. package/dist/custom-pages.js +40 -0
  7. package/dist/dedicated-pages.d.ts +15 -0
  8. package/dist/dedicated-pages.d.ts.map +1 -0
  9. package/dist/dedicated-pages.js +142 -0
  10. package/dist/fields.d.ts +60 -2
  11. package/dist/fields.d.ts.map +1 -1
  12. package/dist/fields.js +4 -4
  13. package/dist/index.d.ts +3 -0
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +3 -0
  16. package/dist/legacy-manifest.d.ts +7 -0
  17. package/dist/legacy-manifest.d.ts.map +1 -1
  18. package/dist/legacy-manifest.js +31 -6
  19. package/dist/migrations.d.ts.map +1 -1
  20. package/dist/migrations.js +5 -2
  21. package/dist/preview-boot.d.ts +2 -2
  22. package/dist/preview-boot.d.ts.map +1 -1
  23. package/dist/preview-boot.js +3 -1
  24. package/dist/preview-session-resolve.d.ts +2 -2
  25. package/dist/preview-session-resolve.d.ts.map +1 -1
  26. package/dist/preview-session-resolve.js +2 -2
  27. package/dist/preview-trusted-origins.d.ts.map +1 -1
  28. package/dist/preview-trusted-origins.js +10 -8
  29. package/dist/storefront-typography-fonts.d.ts +18 -0
  30. package/dist/storefront-typography-fonts.d.ts.map +1 -0
  31. package/dist/storefront-typography-fonts.js +89 -0
  32. package/dist/style-slots.d.ts +2 -2
  33. package/dist/style-slots.d.ts.map +1 -1
  34. package/dist/style-slots.js +5 -3
  35. package/dist/theme-manifest.d.ts +58 -2
  36. package/dist/theme-manifest.d.ts.map +1 -1
  37. package/dist/theme-schemes.d.ts +2 -2
  38. package/dist/theme-schemes.d.ts.map +1 -1
  39. package/dist/theme-schemes.js +1 -0
  40. package/dist/validation.d.ts.map +1 -1
  41. package/dist/validation.js +6 -4
  42. package/package.json +1 -1
  43. package/src/builder-contracts.test.ts +18 -0
  44. package/src/builder-settings.ts +4 -1
  45. package/src/custom-pages.test.ts +74 -0
  46. package/src/custom-pages.ts +70 -0
  47. package/src/dedicated-pages.test.ts +88 -0
  48. package/src/dedicated-pages.ts +173 -0
  49. package/src/fields.ts +4 -4
  50. package/src/index.ts +3 -0
  51. package/src/legacy-manifest.ts +40 -7
  52. package/src/migrations.ts +5 -2
  53. package/src/preview-boot.test.ts +72 -0
  54. package/src/preview-boot.ts +3 -1
  55. package/src/preview-session-resolve.test.ts +37 -0
  56. package/src/preview-session-resolve.ts +2 -2
  57. package/src/storefront-initial-data-html.test.ts +10 -0
  58. package/src/storefront-typography-fonts.test.ts +48 -0
  59. package/src/storefront-typography-fonts.ts +108 -0
  60. package/src/style-slots.ts +6 -3
  61. package/src/theme-schemes.ts +1 -0
  62. package/src/validation.ts +6 -4
  63. package/dist/builder-contracts.test.d.ts +0 -2
  64. package/dist/builder-contracts.test.d.ts.map +0 -1
  65. package/dist/builder-contracts.test.js +0 -431
@@ -1,4 +1,5 @@
1
1
  import * as z from 'zod/v4';
2
+ import { createDedicatedPageBlockType } from "./dedicated-pages.js";
2
3
  import { BuilderFieldSchema } from "./fields.js";
3
4
  import { ThemeManifestSchema } from "./theme-manifest.js";
4
5
  import { StyleSlotDefaultsSchema } from "./style-slots.js";
@@ -111,7 +112,7 @@ export function convertLegacyThemeManifest(input) {
111
112
  },
112
113
  ]));
113
114
  for (const page of legacy.builder.pages) {
114
- const syntheticBlockType = createSyntheticPageBlockType(page.id);
115
+ const syntheticBlockType = createDedicatedPageBlockType(page.id);
115
116
  if ((page.fields?.length ?? 0) === 0 && (page.lists?.length ?? 0) === 0) {
116
117
  continue;
117
118
  }
@@ -140,7 +141,7 @@ export function convertLegacyThemeManifest(input) {
140
141
  tags: legacy.tags,
141
142
  hotfixPaths: legacy.hotfixPaths,
142
143
  pages: Object.fromEntries(legacy.builder.pages.map((page) => {
143
- const syntheticBlockType = createSyntheticPageBlockType(page.id);
144
+ const syntheticBlockType = createDedicatedPageBlockType(page.id);
144
145
  const hasSyntheticBlock = blocks[syntheticBlockType] !== undefined;
145
146
  const allowedBlocks = page.blocks.length > 0
146
147
  ? page.blocks
@@ -176,10 +177,6 @@ function normalizeLegacyThemeId(rawId) {
176
177
  }
177
178
  return `legacy-${lowered || 'theme'}`;
178
179
  }
179
- function createSyntheticPageBlockType(pageId) {
180
- const normalizedPageId = pageId.toLowerCase().replace(/[^a-z0-9\-_.]+/g, '-').replace(/^[-_.]+/, '');
181
- return `page-${normalizedPageId || 'custom'}`;
182
- }
183
180
  function convertLegacyThemePresets(presets) {
184
181
  return Object.fromEntries(presets.map((preset) => {
185
182
  const styleSlots = StyleSlotDefaultsSchema.parse(preset.overrides?.style_slots ?? preset.overrides?.styleSlots ?? {});
@@ -360,3 +357,31 @@ function createListItemShape(kind) {
360
357
  body: { type: 'richtext', label: 'Body' },
361
358
  };
362
359
  }
360
+ function resolveManifestPagesForBlockOrder(manifest) {
361
+ const canonical = ThemeManifestSchema.safeParse(manifest);
362
+ if (canonical.success) {
363
+ return canonical.data.pages;
364
+ }
365
+ try {
366
+ return convertLegacyThemeManifest(manifest).pages;
367
+ }
368
+ catch {
369
+ if (typeof manifest === 'object' && manifest !== null && 'pages' in manifest) {
370
+ const pages = manifest.pages;
371
+ if (typeof pages === 'object' && pages !== null && !Array.isArray(pages)) {
372
+ return pages;
373
+ }
374
+ }
375
+ return {};
376
+ }
377
+ }
378
+ export function getThemePageBlockOrderFromManifest(manifest, pageId) {
379
+ const page = resolveManifestPagesForBlockOrder(manifest)[pageId];
380
+ if (!page) {
381
+ return [];
382
+ }
383
+ const defaultBlockTypes = (Array.isArray(page.defaultBlocks) ? page.defaultBlocks : [])
384
+ .map((block) => (typeof block === 'object' && block !== null ? block.type : undefined))
385
+ .filter((blockType) => typeof blockType === 'string' && blockType.length > 0);
386
+ return defaultBlockTypes.length > 0 ? defaultBlockTypes : page.allowedBlocks ?? [];
387
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../src/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,eAAe,EAEpB,KAAK,UAAU,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAClC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACjC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC1C,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvC,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,0BAA0B,CAAC,QAAQ,SAAI,GAAG,eAAe,CAYxE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,eAA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AA0B,CAAC,QAAQ,SAAI,GAAG,eAAe,CAYxE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,eAAe,CAAC,EAAE,UAAU,CAAC;CAC9B,GAAG,aAAa,CAShB;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,CAE9E;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,0BAA0B,EAAE,QAAQ,SAAI,GAAG,eAAe,CAoB7G;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,aAAa,GAAG,eAAe,CAwB9G;AAED,wBAAgB,mCAAmC,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU,CAuC/F"}
@@ -1,3 +1,4 @@
1
+ import { migrateDedicatedPageContent, migrateDedicatedPageLayout } from "./dedicated-pages.js";
1
2
  import { BUILDER_SETTINGS_VERSION, BuilderSettingsSchema, } from "./builder-settings.js";
2
3
  import { sanitizeBuilderSettingsState } from "./persistence.js";
3
4
  export function createEmptyBuilderSettings(revision = 0) {
@@ -32,12 +33,14 @@ export function migrateLegacyBuilderSettings(input, revision = 0) {
32
33
  ...mapLegacyTokenOverridesToStyleSlots(tokensOverride),
33
34
  ...(input.theme?.style_slots ?? {}),
34
35
  };
36
+ const rawContent = input.theme?.content ?? {};
37
+ const rawLayout = input.theme?.layout ?? {};
35
38
  return sanitizeBuilderSettingsState(BuilderSettingsSchema.parse({
36
39
  version: BUILDER_SETTINGS_VERSION,
37
40
  revision,
38
41
  theme: {
39
- content: input.theme?.content ?? {},
40
- layout: normalizeLegacyLayout(input.theme?.layout ?? {}),
42
+ content: migrateDedicatedPageContent(rawContent),
43
+ layout: migrateDedicatedPageLayout(normalizeLegacyLayout(rawLayout)),
41
44
  style_slots: styleSlots,
42
45
  pages: [],
43
46
  terms: {},
@@ -5,7 +5,7 @@ export declare const StorefrontSeedSchema: z.ZodObject<{
5
5
  products: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
6
6
  groups: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
7
7
  pages: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
8
- }, z.core.$strict>;
8
+ }, z.core.$loose>;
9
9
  export type StorefrontSeed = z.infer<typeof StorefrontSeedSchema>;
10
10
  export declare const PreviewBootPayloadSchema: z.ZodObject<{
11
11
  shopId: z.ZodString;
@@ -59,7 +59,7 @@ export declare const PreviewBootPayloadSchema: z.ZodObject<{
59
59
  products: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
60
60
  groups: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
61
61
  pages: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
62
- }, z.core.$strict>;
62
+ }, z.core.$loose>;
63
63
  artifactRevision: z.ZodOptional<z.ZodString>;
64
64
  artifactStale: z.ZodOptional<z.ZodBoolean>;
65
65
  }, z.core.$strict>;
@@ -1 +1 @@
1
- {"version":3,"file":"preview-boot.d.ts","sourceRoot":"","sources":["../src/preview-boot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,eAAO,MAAM,yBAAyB,gCAAgC,CAAC;AAEvE,eAAO,MAAM,oBAAoB;;;;;kBAOtB,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAS1B,CAAC;AAEZ,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,kBAAkB,GAC1B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWzB"}
1
+ {"version":3,"file":"preview-boot.d.ts","sourceRoot":"","sources":["../src/preview-boot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,eAAO,MAAM,yBAAyB,gCAAgC,CAAC;AAIvE,eAAO,MAAM,oBAAoB;;;;;iBAOjB,CAAC;AAEjB,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAS1B,CAAC;AAEZ,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,kBAAkB,GAC1B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWzB"}
@@ -1,6 +1,8 @@
1
1
  import * as z from 'zod/v4';
2
2
  import { BuilderSettingsSchema } from "./builder-settings.js";
3
3
  export const PREVIEW_BOOT_SIDECAR_PATH = '__shoppex/preview-boot.json';
4
+ // Artifact HTML seeds include catalog/menu fields beyond the documented minimum.
5
+ // Passthrough keeps them available to the theme runtime in preview boot.
4
6
  export const StorefrontSeedSchema = z
5
7
  .object({
6
8
  store: z.record(z.string(), z.unknown()),
@@ -8,7 +10,7 @@ export const StorefrontSeedSchema = z
8
10
  groups: z.array(z.unknown()).optional(),
9
11
  pages: z.array(z.unknown()).optional(),
10
12
  })
11
- .strict();
13
+ .passthrough();
12
14
  export const PreviewBootPayloadSchema = z
13
15
  .object({
14
16
  shopId: z.string().min(1),
@@ -108,8 +108,8 @@ export declare const BuilderPreviewResolveResponseSchema: z.ZodObject<{
108
108
  artifactStale: z.ZodOptional<z.ZodBoolean>;
109
109
  sourceRevision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
110
  }, z.core.$strict>>;
111
- error: z.ZodNullable<z.ZodString>;
112
- }, z.core.$strict>;
111
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
+ }, z.core.$strip>;
113
113
  export type BuilderPreviewResolveResponse = z.infer<typeof BuilderPreviewResolveResponseSchema>;
114
114
  export declare function parseBuilderPreviewResolveResponse(value: unknown): BuilderPreviewResolveResponse | null;
115
115
  //# sourceMappingURL=preview-session-resolve.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preview-session-resolve.d.ts","sourceRoot":"","sources":["../src/preview-session-resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAWjC,CAAC;AAEZ,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMrC,CAAC;AAEZ,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAEhG,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,OAAO,GACb,6BAA6B,GAAG,IAAI,CAGtC"}
1
+ {"version":3,"file":"preview-session-resolve.d.ts","sourceRoot":"","sources":["../src/preview-session-resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAWjC,CAAC;AAEZ,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMtC,CAAC;AAEX,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAEhG,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,OAAO,GACb,6BAA6B,GAAG,IAAI,CAGtC"}
@@ -16,9 +16,9 @@ export const BuilderPreviewResolveResponseSchema = z
16
16
  .object({
17
17
  status: z.number(),
18
18
  data: BuilderPreviewResolveDataSchema.nullable(),
19
- error: z.string().nullable(),
19
+ error: z.string().nullable().optional(),
20
20
  })
21
- .strict();
21
+ .strip();
22
22
  export function parseBuilderPreviewResolveResponse(value) {
23
23
  const parsed = BuilderPreviewResolveResponseSchema.safeParse(value);
24
24
  return parsed.success ? parsed.data : null;
@@ -1 +1 @@
1
- {"version":3,"file":"preview-trusted-origins.d.ts","sourceRoot":"","sources":["../src/preview-trusted-origins.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B,iMAOjC,CAAC;AAEX,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzF,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAmBpE"}
1
+ {"version":3,"file":"preview-trusted-origins.d.ts","sourceRoot":"","sources":["../src/preview-trusted-origins.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B,iMAOjC,CAAC;AAEX,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzF,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAuBpE"}
@@ -11,14 +11,16 @@ export function isTrustedPreviewParentOrigin(origin) {
11
11
  return true;
12
12
  }
13
13
  try {
14
- const hostname = new URL(origin).hostname.toLowerCase();
15
- return (hostname === 'dashboard.shoppex.test'
16
- || hostname === 'localhost'
17
- || hostname === '127.0.0.1'
18
- || hostname === '::1'
19
- || hostname.endsWith('.localhost')
20
- || hostname.endsWith('.vercel.app')
21
- || hostname.endsWith('.vercel.run'));
14
+ const url = new URL(origin);
15
+ const hostname = url.hostname.toLowerCase();
16
+ const isHttp = url.protocol === 'http:' || url.protocol === 'https:';
17
+ return (isHttp
18
+ && (hostname === 'dashboard.shoppex.test'
19
+ || hostname === 'localhost'
20
+ || hostname === '127.0.0.1'
21
+ || hostname === '::1'
22
+ || hostname === '[::1]'
23
+ || hostname.endsWith('.localhost')));
22
24
  }
23
25
  catch {
24
26
  return false;
@@ -0,0 +1,18 @@
1
+ export type StorefrontCuratedFont = {
2
+ value: string;
3
+ label: string;
4
+ stack: string;
5
+ };
6
+ export declare const STOREFRONT_SYSTEM_FONTS: Set<string>;
7
+ export declare const STOREFRONT_CURATED_FONTS: StorefrontCuratedFont[];
8
+ export declare function resolvePrimaryFontFamilyName(raw: unknown): string | null;
9
+ export declare function resolveCuratedFontValue(raw: unknown, fallback: string): string;
10
+ export declare function curatedFontOptionsForValue(value: string): StorefrontCuratedFont[];
11
+ export declare function findStorefrontCuratedFont(value: string): StorefrontCuratedFont | undefined;
12
+ export declare function isValidGoogleFontFamily(value: unknown): value is string;
13
+ export declare function buildStorefrontGoogleFontHref(family: string): string;
14
+ export declare function getStorefrontGoogleFontHrefs(input: {
15
+ bodyFont?: unknown;
16
+ headingFont?: unknown;
17
+ }): string[];
18
+ //# sourceMappingURL=storefront-typography-fonts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storefront-typography-fonts.d.ts","sourceRoot":"","sources":["../src/storefront-typography-fonts.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,uBAAuB,aAA6C,CAAC;AAElF,eAAO,MAAM,wBAAwB,EAAE,qBAAqB,EAwB3D,CAAC;AAIF,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAoBxE;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE9E;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,qBAAqB,EAAE,CAajF;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAE1F;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAIvE;AAED,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGpE;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,MAAM,EAAE,CAYX"}
@@ -0,0 +1,89 @@
1
+ export const STOREFRONT_SYSTEM_FONTS = new Set(['Arial', 'Georgia', 'System UI']);
2
+ export const STOREFRONT_CURATED_FONTS = [
3
+ { value: 'Inter', label: 'Inter', stack: 'Inter, system-ui, sans-serif' },
4
+ { value: 'Geist', label: 'Geist', stack: 'Geist, system-ui, sans-serif' },
5
+ { value: 'Manrope', label: 'Manrope', stack: 'Manrope, system-ui, sans-serif' },
6
+ {
7
+ value: 'Plus Jakarta Sans',
8
+ label: 'Plus Jakarta Sans',
9
+ stack: '"Plus Jakarta Sans", system-ui, sans-serif',
10
+ },
11
+ { value: 'DM Sans', label: 'DM Sans', stack: '"DM Sans", system-ui, sans-serif' },
12
+ {
13
+ value: 'Space Grotesk',
14
+ label: 'Space Grotesk',
15
+ stack: '"Space Grotesk", system-ui, sans-serif',
16
+ },
17
+ { value: 'Sora', label: 'Sora', stack: 'Sora, system-ui, sans-serif' },
18
+ {
19
+ value: 'IBM Plex Sans',
20
+ label: 'IBM Plex Sans',
21
+ stack: '"IBM Plex Sans", system-ui, sans-serif',
22
+ },
23
+ { value: 'Arial', label: 'Arial', stack: 'Arial, sans-serif' },
24
+ { value: 'Georgia', label: 'Georgia', stack: 'Georgia, serif' },
25
+ { value: 'System UI', label: 'System UI', stack: 'system-ui, sans-serif' },
26
+ ];
27
+ const GOOGLE_FONT_FAMILY_PATTERN = /^[A-Za-z0-9 +\-_]+$/;
28
+ export function resolvePrimaryFontFamilyName(raw) {
29
+ if (typeof raw !== 'string')
30
+ return null;
31
+ const trimmed = raw.trim();
32
+ if (!trimmed)
33
+ return null;
34
+ const exact = STOREFRONT_CURATED_FONTS.find((font) => font.value === trimmed || font.stack === trimmed);
35
+ if (exact)
36
+ return exact.value;
37
+ const prefix = STOREFRONT_CURATED_FONTS.find((font) => trimmed.startsWith(`${font.value},`));
38
+ if (prefix)
39
+ return prefix.value;
40
+ const quoted = trimmed.match(/^["'](.+?)["']/);
41
+ if (quoted?.[1]) {
42
+ return quoted[1].trim() || null;
43
+ }
44
+ const primary = trimmed.split(',')[0]?.trim();
45
+ return primary && primary.length > 0 ? primary : null;
46
+ }
47
+ export function resolveCuratedFontValue(raw, fallback) {
48
+ return resolvePrimaryFontFamilyName(raw) ?? fallback;
49
+ }
50
+ export function curatedFontOptionsForValue(value) {
51
+ if (STOREFRONT_CURATED_FONTS.some((font) => font.value === value)) {
52
+ return STOREFRONT_CURATED_FONTS;
53
+ }
54
+ return [
55
+ ...STOREFRONT_CURATED_FONTS,
56
+ {
57
+ value,
58
+ label: value,
59
+ stack: value.includes(',') ? value : `${value}, system-ui, sans-serif`,
60
+ },
61
+ ];
62
+ }
63
+ export function findStorefrontCuratedFont(value) {
64
+ return curatedFontOptionsForValue(value).find((font) => font.value === value);
65
+ }
66
+ export function isValidGoogleFontFamily(value) {
67
+ if (typeof value !== 'string')
68
+ return false;
69
+ const trimmed = value.trim();
70
+ return trimmed.length > 0 && trimmed.length <= 60 && GOOGLE_FONT_FAMILY_PATTERN.test(trimmed);
71
+ }
72
+ export function buildStorefrontGoogleFontHref(family) {
73
+ const familyParam = family.trim().replace(/\s+/g, '+');
74
+ return `https://fonts.googleapis.com/css2?family=${familyParam}:wght@400;500;600;700&display=swap`;
75
+ }
76
+ export function getStorefrontGoogleFontHrefs(input) {
77
+ const families = new Set();
78
+ for (const raw of [input.bodyFont, input.headingFont]) {
79
+ const family = resolvePrimaryFontFamilyName(raw);
80
+ if (!family)
81
+ continue;
82
+ if (STOREFRONT_SYSTEM_FONTS.has(family))
83
+ continue;
84
+ if (!isValidGoogleFontFamily(family))
85
+ continue;
86
+ families.add(family);
87
+ }
88
+ return [...families].map((family) => buildStorefrontGoogleFontHref(family));
89
+ }
@@ -23,7 +23,7 @@ export declare const ResponsiveStringSchema: z.ZodObject<{
23
23
  xl: z.ZodOptional<z.ZodString>;
24
24
  }, z.core.$strict>;
25
25
  export type ResponsiveString = z.infer<typeof ResponsiveStringSchema>;
26
- export declare const ColorSchema: z.ZodString;
26
+ export declare const ColorSchema: z.ZodUnion<readonly [z.ZodLiteral<"transparent">, z.ZodString]>;
27
27
  export type Color = z.infer<typeof ColorSchema>;
28
28
  export declare const FontWeightSchema: z.ZodUnion<readonly [z.ZodLiteral<100>, z.ZodLiteral<200>, z.ZodLiteral<300>, z.ZodLiteral<400>, z.ZodLiteral<500>, z.ZodLiteral<600>, z.ZodLiteral<700>, z.ZodLiteral<800>, z.ZodLiteral<900>]>;
29
29
  export type FontWeight = z.infer<typeof FontWeightSchema>;
@@ -84,7 +84,7 @@ export declare const StyleSlotIdSchema: z.ZodUnion<readonly [z.ZodEnum<{
84
84
  }>, z.ZodString]>;
85
85
  export type StyleSlotId = CoreStyleSlotId | ThemeStyleSlotId;
86
86
  export declare const CORE_STYLE_SLOT_IDS: ("button.radius" | "button.background" | "button.foreground" | "button.border" | "button.font.weight" | "input.radius" | "input.height" | "input.border" | "input.background" | "input.foreground" | "card.radius" | "card.background" | "card.border" | "section.padding.y" | "section.padding.x" | "container.width" | "color.primary" | "color.accent" | "color.background" | "color.foreground" | "color.muted" | "link.color" | "typography.heading.weight" | "typography.body.size")[];
87
- export declare const ThemeStyleSlotValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
87
+ export declare const ThemeStyleSlotValueSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"transparent">, z.ZodString]>, z.ZodObject<{
88
88
  base: z.ZodNumber;
89
89
  sm: z.ZodOptional<z.ZodNumber>;
90
90
  md: z.ZodOptional<z.ZodNumber>;
@@ -1 +1 @@
1
- {"version":3,"file":"style-slots.d.ts","sourceRoot":"","sources":["../src/style-slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,eAAO,MAAM,gBAAgB;;;;;;EAA2C,CAAC;AACzE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,sBAAsB;;;;;;kBAQxB,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,sBAAsB;;;;;;kBAQxB,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,WAAW,aAE+D,CAAC;AACxF,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD,eAAO,MAAM,gBAAgB,kMAU3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gB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O,CAAC,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC;AAEtE,eAAO,MAAM,gBAAgB,EAoCrB,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAE9B,eAAO,MAAM,uBAAuB,mJAAmB,CAAC;AACxD,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAE3C,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,CAE1D"}
@@ -18,9 +18,11 @@ export const ResponsiveStringSchema = z
18
18
  xl: z.string().min(1).optional(),
19
19
  })
20
20
  .strict();
21
- export const ColorSchema = z
22
- .string()
23
- .regex(/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, 'Expected a hex color');
21
+ const HEX_COLOR_PATTERN = /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;
22
+ export const ColorSchema = z.union([
23
+ z.literal('transparent'),
24
+ z.string().regex(HEX_COLOR_PATTERN, 'Expected a hex color'),
25
+ ]);
24
26
  export const FontWeightSchema = z.union([
25
27
  z.literal(100),
26
28
  z.literal(200),
@@ -49,7 +49,9 @@ export declare const ManifestBlockSchema: z.ZodObject<{
49
49
  defaultValue: z.ZodOptional<z.ZodUnknown>;
50
50
  required: z.ZodOptional<z.ZodBoolean>;
51
51
  group: z.ZodOptional<z.ZodEnum<{
52
+ search: "search";
52
53
  content: "content";
54
+ profile: "profile";
53
55
  style: "style";
54
56
  }>>;
55
57
  type: z.ZodLiteral<"text">;
@@ -62,7 +64,9 @@ export declare const ManifestBlockSchema: z.ZodObject<{
62
64
  defaultValue: z.ZodOptional<z.ZodUnknown>;
63
65
  required: z.ZodOptional<z.ZodBoolean>;
64
66
  group: z.ZodOptional<z.ZodEnum<{
67
+ search: "search";
65
68
  content: "content";
69
+ profile: "profile";
66
70
  style: "style";
67
71
  }>>;
68
72
  type: z.ZodLiteral<"richtext">;
@@ -78,7 +82,9 @@ export declare const ManifestBlockSchema: z.ZodObject<{
78
82
  defaultValue: z.ZodOptional<z.ZodUnknown>;
79
83
  required: z.ZodOptional<z.ZodBoolean>;
80
84
  group: z.ZodOptional<z.ZodEnum<{
85
+ search: "search";
81
86
  content: "content";
87
+ profile: "profile";
82
88
  style: "style";
83
89
  }>>;
84
90
  type: z.ZodLiteral<"code">;
@@ -101,7 +107,9 @@ export declare const ManifestBlockSchema: z.ZodObject<{
101
107
  defaultValue: z.ZodOptional<z.ZodUnknown>;
102
108
  required: z.ZodOptional<z.ZodBoolean>;
103
109
  group: z.ZodOptional<z.ZodEnum<{
110
+ search: "search";
104
111
  content: "content";
112
+ profile: "profile";
105
113
  style: "style";
106
114
  }>>;
107
115
  type: z.ZodLiteral<"image">;
@@ -112,7 +120,9 @@ export declare const ManifestBlockSchema: z.ZodObject<{
112
120
  defaultValue: z.ZodOptional<z.ZodUnknown>;
113
121
  required: z.ZodOptional<z.ZodBoolean>;
114
122
  group: z.ZodOptional<z.ZodEnum<{
123
+ search: "search";
115
124
  content: "content";
125
+ profile: "profile";
116
126
  style: "style";
117
127
  }>>;
118
128
  type: z.ZodLiteral<"link">;
@@ -121,7 +131,9 @@ export declare const ManifestBlockSchema: z.ZodObject<{
121
131
  description: z.ZodOptional<z.ZodString>;
122
132
  required: z.ZodOptional<z.ZodBoolean>;
123
133
  group: z.ZodOptional<z.ZodEnum<{
134
+ search: "search";
124
135
  content: "content";
136
+ profile: "profile";
125
137
  style: "style";
126
138
  }>>;
127
139
  type: z.ZodLiteral<"boolean">;
@@ -131,7 +143,9 @@ export declare const ManifestBlockSchema: z.ZodObject<{
131
143
  description: z.ZodOptional<z.ZodString>;
132
144
  required: z.ZodOptional<z.ZodBoolean>;
133
145
  group: z.ZodOptional<z.ZodEnum<{
146
+ search: "search";
134
147
  content: "content";
148
+ profile: "profile";
135
149
  style: "style";
136
150
  }>>;
137
151
  type: z.ZodLiteral<"number">;
@@ -144,7 +158,9 @@ export declare const ManifestBlockSchema: z.ZodObject<{
144
158
  description: z.ZodOptional<z.ZodString>;
145
159
  required: z.ZodOptional<z.ZodBoolean>;
146
160
  group: z.ZodOptional<z.ZodEnum<{
161
+ search: "search";
147
162
  content: "content";
163
+ profile: "profile";
148
164
  style: "style";
149
165
  }>>;
150
166
  type: z.ZodLiteral<"range">;
@@ -158,7 +174,9 @@ export declare const ManifestBlockSchema: z.ZodObject<{
158
174
  description: z.ZodOptional<z.ZodString>;
159
175
  required: z.ZodOptional<z.ZodBoolean>;
160
176
  group: z.ZodOptional<z.ZodEnum<{
177
+ search: "search";
161
178
  content: "content";
179
+ profile: "profile";
162
180
  style: "style";
163
181
  }>>;
164
182
  type: z.ZodLiteral<"select">;
@@ -172,18 +190,22 @@ export declare const ManifestBlockSchema: z.ZodObject<{
172
190
  description: z.ZodOptional<z.ZodString>;
173
191
  required: z.ZodOptional<z.ZodBoolean>;
174
192
  group: z.ZodOptional<z.ZodEnum<{
193
+ search: "search";
175
194
  content: "content";
195
+ profile: "profile";
176
196
  style: "style";
177
197
  }>>;
178
198
  type: z.ZodLiteral<"color">;
179
- defaultValue: z.ZodOptional<z.ZodString>;
199
+ defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"transparent">, z.ZodString]>>;
180
200
  }, z.core.$strict>, z.ZodObject<{
181
201
  label: z.ZodString;
182
202
  description: z.ZodOptional<z.ZodString>;
183
203
  defaultValue: z.ZodOptional<z.ZodUnknown>;
184
204
  required: z.ZodOptional<z.ZodBoolean>;
185
205
  group: z.ZodOptional<z.ZodEnum<{
206
+ search: "search";
186
207
  content: "content";
208
+ profile: "profile";
187
209
  style: "style";
188
210
  }>>;
189
211
  type: z.ZodLiteral<"product">;
@@ -193,7 +215,9 @@ export declare const ManifestBlockSchema: z.ZodObject<{
193
215
  defaultValue: z.ZodOptional<z.ZodUnknown>;
194
216
  required: z.ZodOptional<z.ZodBoolean>;
195
217
  group: z.ZodOptional<z.ZodEnum<{
218
+ search: "search";
196
219
  content: "content";
220
+ profile: "profile";
197
221
  style: "style";
198
222
  }>>;
199
223
  type: z.ZodLiteral<"products">;
@@ -205,7 +229,9 @@ export declare const ManifestBlockSchema: z.ZodObject<{
205
229
  defaultValue: z.ZodOptional<z.ZodUnknown>;
206
230
  required: z.ZodOptional<z.ZodBoolean>;
207
231
  group: z.ZodOptional<z.ZodEnum<{
232
+ search: "search";
208
233
  content: "content";
234
+ profile: "profile";
209
235
  style: "style";
210
236
  }>>;
211
237
  type: z.ZodLiteral<"list">;
@@ -217,7 +243,9 @@ export declare const ManifestBlockSchema: z.ZodObject<{
217
243
  defaultValue: z.ZodOptional<z.ZodUnknown>;
218
244
  required: z.ZodOptional<z.ZodBoolean>;
219
245
  group: z.ZodOptional<z.ZodEnum<{
246
+ search: "search";
220
247
  content: "content";
248
+ profile: "profile";
221
249
  style: "style";
222
250
  }>>;
223
251
  type: z.ZodEnum<{
@@ -354,7 +382,9 @@ export declare const ThemeManifestSchema: z.ZodObject<{
354
382
  defaultValue: z.ZodOptional<z.ZodUnknown>;
355
383
  required: z.ZodOptional<z.ZodBoolean>;
356
384
  group: z.ZodOptional<z.ZodEnum<{
385
+ search: "search";
357
386
  content: "content";
387
+ profile: "profile";
358
388
  style: "style";
359
389
  }>>;
360
390
  type: z.ZodLiteral<"text">;
@@ -367,7 +397,9 @@ export declare const ThemeManifestSchema: z.ZodObject<{
367
397
  defaultValue: z.ZodOptional<z.ZodUnknown>;
368
398
  required: z.ZodOptional<z.ZodBoolean>;
369
399
  group: z.ZodOptional<z.ZodEnum<{
400
+ search: "search";
370
401
  content: "content";
402
+ profile: "profile";
371
403
  style: "style";
372
404
  }>>;
373
405
  type: z.ZodLiteral<"richtext">;
@@ -383,7 +415,9 @@ export declare const ThemeManifestSchema: z.ZodObject<{
383
415
  defaultValue: z.ZodOptional<z.ZodUnknown>;
384
416
  required: z.ZodOptional<z.ZodBoolean>;
385
417
  group: z.ZodOptional<z.ZodEnum<{
418
+ search: "search";
386
419
  content: "content";
420
+ profile: "profile";
387
421
  style: "style";
388
422
  }>>;
389
423
  type: z.ZodLiteral<"code">;
@@ -406,7 +440,9 @@ export declare const ThemeManifestSchema: z.ZodObject<{
406
440
  defaultValue: z.ZodOptional<z.ZodUnknown>;
407
441
  required: z.ZodOptional<z.ZodBoolean>;
408
442
  group: z.ZodOptional<z.ZodEnum<{
443
+ search: "search";
409
444
  content: "content";
445
+ profile: "profile";
410
446
  style: "style";
411
447
  }>>;
412
448
  type: z.ZodLiteral<"image">;
@@ -417,7 +453,9 @@ export declare const ThemeManifestSchema: z.ZodObject<{
417
453
  defaultValue: z.ZodOptional<z.ZodUnknown>;
418
454
  required: z.ZodOptional<z.ZodBoolean>;
419
455
  group: z.ZodOptional<z.ZodEnum<{
456
+ search: "search";
420
457
  content: "content";
458
+ profile: "profile";
421
459
  style: "style";
422
460
  }>>;
423
461
  type: z.ZodLiteral<"link">;
@@ -426,7 +464,9 @@ export declare const ThemeManifestSchema: z.ZodObject<{
426
464
  description: z.ZodOptional<z.ZodString>;
427
465
  required: z.ZodOptional<z.ZodBoolean>;
428
466
  group: z.ZodOptional<z.ZodEnum<{
467
+ search: "search";
429
468
  content: "content";
469
+ profile: "profile";
430
470
  style: "style";
431
471
  }>>;
432
472
  type: z.ZodLiteral<"boolean">;
@@ -436,7 +476,9 @@ export declare const ThemeManifestSchema: z.ZodObject<{
436
476
  description: z.ZodOptional<z.ZodString>;
437
477
  required: z.ZodOptional<z.ZodBoolean>;
438
478
  group: z.ZodOptional<z.ZodEnum<{
479
+ search: "search";
439
480
  content: "content";
481
+ profile: "profile";
440
482
  style: "style";
441
483
  }>>;
442
484
  type: z.ZodLiteral<"number">;
@@ -449,7 +491,9 @@ export declare const ThemeManifestSchema: z.ZodObject<{
449
491
  description: z.ZodOptional<z.ZodString>;
450
492
  required: z.ZodOptional<z.ZodBoolean>;
451
493
  group: z.ZodOptional<z.ZodEnum<{
494
+ search: "search";
452
495
  content: "content";
496
+ profile: "profile";
453
497
  style: "style";
454
498
  }>>;
455
499
  type: z.ZodLiteral<"range">;
@@ -463,7 +507,9 @@ export declare const ThemeManifestSchema: z.ZodObject<{
463
507
  description: z.ZodOptional<z.ZodString>;
464
508
  required: z.ZodOptional<z.ZodBoolean>;
465
509
  group: z.ZodOptional<z.ZodEnum<{
510
+ search: "search";
466
511
  content: "content";
512
+ profile: "profile";
467
513
  style: "style";
468
514
  }>>;
469
515
  type: z.ZodLiteral<"select">;
@@ -477,18 +523,22 @@ export declare const ThemeManifestSchema: z.ZodObject<{
477
523
  description: z.ZodOptional<z.ZodString>;
478
524
  required: z.ZodOptional<z.ZodBoolean>;
479
525
  group: z.ZodOptional<z.ZodEnum<{
526
+ search: "search";
480
527
  content: "content";
528
+ profile: "profile";
481
529
  style: "style";
482
530
  }>>;
483
531
  type: z.ZodLiteral<"color">;
484
- defaultValue: z.ZodOptional<z.ZodString>;
532
+ defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"transparent">, z.ZodString]>>;
485
533
  }, z.core.$strict>, z.ZodObject<{
486
534
  label: z.ZodString;
487
535
  description: z.ZodOptional<z.ZodString>;
488
536
  defaultValue: z.ZodOptional<z.ZodUnknown>;
489
537
  required: z.ZodOptional<z.ZodBoolean>;
490
538
  group: z.ZodOptional<z.ZodEnum<{
539
+ search: "search";
491
540
  content: "content";
541
+ profile: "profile";
492
542
  style: "style";
493
543
  }>>;
494
544
  type: z.ZodLiteral<"product">;
@@ -498,7 +548,9 @@ export declare const ThemeManifestSchema: z.ZodObject<{
498
548
  defaultValue: z.ZodOptional<z.ZodUnknown>;
499
549
  required: z.ZodOptional<z.ZodBoolean>;
500
550
  group: z.ZodOptional<z.ZodEnum<{
551
+ search: "search";
501
552
  content: "content";
553
+ profile: "profile";
502
554
  style: "style";
503
555
  }>>;
504
556
  type: z.ZodLiteral<"products">;
@@ -510,7 +562,9 @@ export declare const ThemeManifestSchema: z.ZodObject<{
510
562
  defaultValue: z.ZodOptional<z.ZodUnknown>;
511
563
  required: z.ZodOptional<z.ZodBoolean>;
512
564
  group: z.ZodOptional<z.ZodEnum<{
565
+ search: "search";
513
566
  content: "content";
567
+ profile: "profile";
514
568
  style: "style";
515
569
  }>>;
516
570
  type: z.ZodLiteral<"list">;
@@ -522,7 +576,9 @@ export declare const ThemeManifestSchema: z.ZodObject<{
522
576
  defaultValue: z.ZodOptional<z.ZodUnknown>;
523
577
  required: z.ZodOptional<z.ZodBoolean>;
524
578
  group: z.ZodOptional<z.ZodEnum<{
579
+ search: "search";
525
580
  content: "content";
581
+ profile: "profile";
526
582
  style: "style";
527
583
  }>>;
528
584
  type: z.ZodEnum<{