@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
@@ -26,6 +26,8 @@ export declare const PageLayoutSchema: z.ZodObject<{
26
26
  }, z.core.$strict>>>;
27
27
  }, z.core.$strict>;
28
28
  export type PageLayout = z.infer<typeof PageLayoutSchema>;
29
+ export declare const CustomPageSlugSchema: z.ZodString;
30
+ export type CustomPageSlug = z.infer<typeof CustomPageSlugSchema>;
29
31
  export declare const CustomPageSchema: z.ZodObject<{
30
32
  id: z.ZodString;
31
33
  title: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"builder-settings.d.ts","sourceRoot":"","sources":["../src/builder-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,eAAO,MAAM,YAAY,aAAoD,CAAC;AAC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;;;;;;;;;;;;kBAQzB,CAAC;AACZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMvB,CAAC;AACZ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAEpE"}
@@ -19,11 +19,12 @@ export const PageLayoutSchema = z
19
19
  blocks: z.array(BlockInstanceSchema).default([]),
20
20
  })
21
21
  .strict();
22
+ export const CustomPageSlugSchema = z.string().min(1).regex(/^[a-z0-9][a-z0-9-_]*$/);
22
23
  export const CustomPageSchema = z
23
24
  .object({
24
25
  id: PageIdSchema,
25
26
  title: z.string().min(1),
26
- slug: z.string().min(1).regex(/^[a-z0-9][a-z0-9-_/]*$/),
27
+ slug: CustomPageSlugSchema,
27
28
  visible: z.boolean().default(true),
28
29
  layout: PageLayoutSchema.default({ blocks: [] }),
29
30
  seo: z
@@ -0,0 +1,15 @@
1
+ import type { BuilderSettings } from './builder-settings.ts';
2
+ import type { ManifestPage, ThemeManifest } from './theme-manifest.ts';
3
+ /**
4
+ * Allowed embed/content blocks on merchant custom pages (`theme.pages[]`).
5
+ * Keep aligned with `customPageAllowedBlocks` in
6
+ * `config/builder-shared-manifest-blocks.json`.
7
+ */
8
+ export declare const MERCHANT_CUSTOM_PAGE_ALLOWED_BLOCKS: readonly ["custom-html", "youtube-embed", "text-block"];
9
+ export type MerchantCustomPageAllowedBlock = (typeof MERCHANT_CUSTOM_PAGE_ALLOWED_BLOCKS)[number];
10
+ export declare function resolveMerchantCustomPageAllowedBlocks(manifest: ThemeManifest): string[];
11
+ export declare function buildMerchantCustomPageManifestEntry(customPage: BuilderSettings['theme']['pages'][number], manifest: ThemeManifest): ManifestPage;
12
+ export declare function mergeCustomPagesIntoManifest(manifest: ThemeManifest, settings: BuilderSettings): ThemeManifest;
13
+ export declare function findCustomPageBySlug(settings: BuilderSettings, slug: string): BuilderSettings['theme']['pages'][number] | undefined;
14
+ export declare function findCustomPageById(settings: BuilderSettings, pageId: string): BuilderSettings['theme']['pages'][number] | undefined;
15
+ //# sourceMappingURL=custom-pages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-pages.d.ts","sourceRoot":"","sources":["../src/custom-pages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEvE;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,yDAItC,CAAC;AAEX,MAAM,MAAM,8BAA8B,GACxC,CAAC,OAAO,mCAAmC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,aAAa,GACtB,MAAM,EAAE,CAIV;AAED,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,EACrD,QAAQ,EAAE,aAAa,GACtB,YAAY,CAOd;AAED,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,eAAe,GACxB,aAAa,CAef;AAED,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE,MAAM,GACX,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,SAAS,CAEvD;AAED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,MAAM,GACb,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,SAAS,CAEvD"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Allowed embed/content blocks on merchant custom pages (`theme.pages[]`).
3
+ * Keep aligned with `customPageAllowedBlocks` in
4
+ * `config/builder-shared-manifest-blocks.json`.
5
+ */
6
+ export const MERCHANT_CUSTOM_PAGE_ALLOWED_BLOCKS = [
7
+ 'custom-html',
8
+ 'youtube-embed',
9
+ 'text-block',
10
+ ];
11
+ export function resolveMerchantCustomPageAllowedBlocks(manifest) {
12
+ return MERCHANT_CUSTOM_PAGE_ALLOWED_BLOCKS.filter((blockType) => blockType in manifest.blocks);
13
+ }
14
+ export function buildMerchantCustomPageManifestEntry(customPage, manifest) {
15
+ return {
16
+ label: customPage.title,
17
+ previewPath: `/page/${customPage.slug}`,
18
+ allowedBlocks: resolveMerchantCustomPageAllowedBlocks(manifest),
19
+ defaultBlocks: [],
20
+ };
21
+ }
22
+ export function mergeCustomPagesIntoManifest(manifest, settings) {
23
+ if (settings.theme.pages.length === 0) {
24
+ return manifest;
25
+ }
26
+ const pages = { ...manifest.pages };
27
+ for (const customPage of settings.theme.pages) {
28
+ if (pages[customPage.id]) {
29
+ continue;
30
+ }
31
+ pages[customPage.id] = buildMerchantCustomPageManifestEntry(customPage, manifest);
32
+ }
33
+ return { ...manifest, pages };
34
+ }
35
+ export function findCustomPageBySlug(settings, slug) {
36
+ return settings.theme.pages.find((page) => page.slug === slug);
37
+ }
38
+ export function findCustomPageById(settings, pageId) {
39
+ return settings.theme.pages.find((page) => page.id === pageId);
40
+ }
@@ -0,0 +1,15 @@
1
+ export declare const BUILDER_LAYOUT_PAGE_IDS: readonly ["home", "navigation", "product", "footer", "terms"];
2
+ export type BuilderLayoutPageId = (typeof BUILDER_LAYOUT_PAGE_IDS)[number];
3
+ export declare const BUILDER_DEDICATED_PAGE_IDS: readonly ["contact-page", "faq-page", "reviews-page", "feedback-page", "guide-page", "status-page", "checkout-page", "tool-page"];
4
+ export type BuilderDedicatedPageId = (typeof BUILDER_DEDICATED_PAGE_IDS)[number];
5
+ /** @deprecated Legacy manifest page ids migrated on settings load. */
6
+ export declare const DEDICATED_PAGE_ID_ALIASES: Readonly<Record<string, BuilderDedicatedPageId>>;
7
+ export declare function normalizeDedicatedPageId(pageId: string): string;
8
+ export declare function isDedicatedPageId(pageId: string): pageId is BuilderDedicatedPageId;
9
+ export declare function dedicatedPagePreviewPath(pageId: string): string | null;
10
+ export declare function dedicatedPageContentKey(pageId: string, field: string): string;
11
+ export declare function normalizeDedicatedPageBlockType(pageId: string): string;
12
+ export declare function createDedicatedPageBlockType(pageId: string): string;
13
+ export declare function migrateDedicatedPageLayout(layout: Record<string, unknown>): Record<string, unknown>;
14
+ export declare function migrateDedicatedPageContent(content: Record<string, unknown>): Record<string, unknown>;
15
+ //# sourceMappingURL=dedicated-pages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dedicated-pages.d.ts","sourceRoot":"","sources":["../src/dedicated-pages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,+DAM1B,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3E,eAAO,MAAM,0BAA0B,mIAS7B,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjF,sEAAsE;AACtE,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAGtF,CAAC;AAaF,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,sBAAsB,CAElF;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMtE;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAMnE;AAkBD,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoDnG;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA8BrG"}
@@ -0,0 +1,142 @@
1
+ export const BUILDER_LAYOUT_PAGE_IDS = [
2
+ 'home',
3
+ 'navigation',
4
+ 'product',
5
+ 'footer',
6
+ 'terms',
7
+ ];
8
+ export const BUILDER_DEDICATED_PAGE_IDS = [
9
+ 'contact-page',
10
+ 'faq-page',
11
+ 'reviews-page',
12
+ 'feedback-page',
13
+ 'guide-page',
14
+ 'status-page',
15
+ 'checkout-page',
16
+ 'tool-page',
17
+ ];
18
+ /** @deprecated Legacy manifest page ids migrated on settings load. */
19
+ export const DEDICATED_PAGE_ID_ALIASES = {
20
+ reviews: 'reviews-page',
21
+ tool: 'tool-page',
22
+ };
23
+ const DEDICATED_PAGE_PREVIEW_PATHS = {
24
+ 'contact-page': '/contact',
25
+ 'faq-page': '/faq',
26
+ 'reviews-page': '/reviews',
27
+ 'feedback-page': '/feedback',
28
+ 'guide-page': '/guide',
29
+ 'status-page': '/status',
30
+ 'checkout-page': '/checkout',
31
+ 'tool-page': '/tool',
32
+ };
33
+ export function normalizeDedicatedPageId(pageId) {
34
+ return DEDICATED_PAGE_ID_ALIASES[pageId] ?? pageId;
35
+ }
36
+ export function isDedicatedPageId(pageId) {
37
+ return BUILDER_DEDICATED_PAGE_IDS.includes(pageId);
38
+ }
39
+ export function dedicatedPagePreviewPath(pageId) {
40
+ const normalized = normalizeDedicatedPageId(pageId);
41
+ if (!isDedicatedPageId(normalized)) {
42
+ return null;
43
+ }
44
+ return DEDICATED_PAGE_PREVIEW_PATHS[normalized];
45
+ }
46
+ export function dedicatedPageContentKey(pageId, field) {
47
+ return `pages.${normalizeDedicatedPageId(pageId)}.${field}`;
48
+ }
49
+ export function normalizeDedicatedPageBlockType(pageId) {
50
+ return createDedicatedPageBlockType(normalizeDedicatedPageId(pageId));
51
+ }
52
+ export function createDedicatedPageBlockType(pageId) {
53
+ const normalizedPageId = pageId
54
+ .toLowerCase()
55
+ .replace(/[^a-z0-9\-_.]+/g, '-')
56
+ .replace(/^[-_.]+/, '');
57
+ return `page-${normalizedPageId || 'custom'}`;
58
+ }
59
+ function migrateDedicatedPageBlockSettings(settings) {
60
+ if (typeof settings !== 'object' || settings === null || Array.isArray(settings)) {
61
+ return {};
62
+ }
63
+ const next = {};
64
+ for (const [key, value] of Object.entries(settings)) {
65
+ if (key.startsWith('tool.')) {
66
+ next[`pages.tool-page.${key.slice('tool.'.length)}`] = value;
67
+ continue;
68
+ }
69
+ next[key] = value;
70
+ }
71
+ return next;
72
+ }
73
+ export function migrateDedicatedPageLayout(layout) {
74
+ const next = { ...layout };
75
+ for (const [legacyId, canonicalId] of Object.entries(DEDICATED_PAGE_ID_ALIASES)) {
76
+ if (!Object.prototype.hasOwnProperty.call(next, legacyId)) {
77
+ continue;
78
+ }
79
+ const legacyLayout = next[legacyId];
80
+ delete next[legacyId];
81
+ if (Object.prototype.hasOwnProperty.call(next, canonicalId)) {
82
+ continue;
83
+ }
84
+ if (typeof legacyLayout !== 'object' || legacyLayout === null || Array.isArray(legacyLayout)) {
85
+ continue;
86
+ }
87
+ const blocks = legacyLayout.blocks;
88
+ if (!Array.isArray(blocks)) {
89
+ next[canonicalId] = legacyLayout;
90
+ continue;
91
+ }
92
+ const legacyBlockType = createDedicatedPageBlockType(legacyId);
93
+ const canonicalBlockType = createDedicatedPageBlockType(canonicalId);
94
+ next[canonicalId] = {
95
+ ...legacyLayout,
96
+ blocks: blocks.map((block) => {
97
+ if (typeof block !== 'object' || block === null || Array.isArray(block)) {
98
+ return block;
99
+ }
100
+ const typed = block;
101
+ const isLegacyBlockType = typed.type === legacyBlockType
102
+ || (legacyId === 'tool' && typed.type === 'tool');
103
+ if (!isLegacyBlockType) {
104
+ return block;
105
+ }
106
+ return {
107
+ ...typed,
108
+ type: canonicalBlockType,
109
+ settings: migrateDedicatedPageBlockSettings(typed.settings),
110
+ };
111
+ }),
112
+ };
113
+ }
114
+ return next;
115
+ }
116
+ export function migrateDedicatedPageContent(content) {
117
+ const next = { ...content };
118
+ for (const [key, value] of Object.entries(next)) {
119
+ if (key.startsWith('tool.') && !key.startsWith('tool-page.')) {
120
+ const canonicalKey = `pages.tool-page.${key.slice('tool.'.length)}`;
121
+ if (!Object.prototype.hasOwnProperty.call(next, canonicalKey)) {
122
+ next[canonicalKey] = value;
123
+ }
124
+ delete next[key];
125
+ }
126
+ }
127
+ for (const [legacyId, canonicalId] of Object.entries(DEDICATED_PAGE_ID_ALIASES)) {
128
+ const legacyPrefix = `pages.${legacyId}.`;
129
+ const canonicalPrefix = `pages.${canonicalId}.`;
130
+ for (const [key, value] of Object.entries(next)) {
131
+ if (!key.startsWith(legacyPrefix)) {
132
+ continue;
133
+ }
134
+ const canonicalKey = `${canonicalPrefix}${key.slice(legacyPrefix.length)}`;
135
+ if (!Object.prototype.hasOwnProperty.call(next, canonicalKey)) {
136
+ next[canonicalKey] = value;
137
+ }
138
+ delete next[key];
139
+ }
140
+ }
141
+ return next;
142
+ }
package/dist/fields.d.ts CHANGED
@@ -29,7 +29,9 @@ export declare const ListItemFieldSchema: z.ZodObject<{
29
29
  defaultValue: z.ZodOptional<z.ZodUnknown>;
30
30
  required: z.ZodOptional<z.ZodBoolean>;
31
31
  group: z.ZodOptional<z.ZodEnum<{
32
+ search: "search";
32
33
  content: "content";
34
+ profile: "profile";
33
35
  style: "style";
34
36
  }>>;
35
37
  type: z.ZodEnum<{
@@ -61,7 +63,9 @@ export declare const BuilderFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
61
63
  defaultValue: z.ZodOptional<z.ZodUnknown>;
62
64
  required: z.ZodOptional<z.ZodBoolean>;
63
65
  group: z.ZodOptional<z.ZodEnum<{
66
+ search: "search";
64
67
  content: "content";
68
+ profile: "profile";
65
69
  style: "style";
66
70
  }>>;
67
71
  type: z.ZodLiteral<"text">;
@@ -74,7 +78,9 @@ export declare const BuilderFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
74
78
  defaultValue: z.ZodOptional<z.ZodUnknown>;
75
79
  required: z.ZodOptional<z.ZodBoolean>;
76
80
  group: z.ZodOptional<z.ZodEnum<{
81
+ search: "search";
77
82
  content: "content";
83
+ profile: "profile";
78
84
  style: "style";
79
85
  }>>;
80
86
  type: z.ZodLiteral<"richtext">;
@@ -90,7 +96,9 @@ export declare const BuilderFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
90
96
  defaultValue: z.ZodOptional<z.ZodUnknown>;
91
97
  required: z.ZodOptional<z.ZodBoolean>;
92
98
  group: z.ZodOptional<z.ZodEnum<{
99
+ search: "search";
93
100
  content: "content";
101
+ profile: "profile";
94
102
  style: "style";
95
103
  }>>;
96
104
  type: z.ZodLiteral<"code">;
@@ -113,7 +121,9 @@ export declare const BuilderFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
113
121
  defaultValue: z.ZodOptional<z.ZodUnknown>;
114
122
  required: z.ZodOptional<z.ZodBoolean>;
115
123
  group: z.ZodOptional<z.ZodEnum<{
124
+ search: "search";
116
125
  content: "content";
126
+ profile: "profile";
117
127
  style: "style";
118
128
  }>>;
119
129
  type: z.ZodLiteral<"image">;
@@ -124,7 +134,9 @@ export declare const BuilderFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
124
134
  defaultValue: z.ZodOptional<z.ZodUnknown>;
125
135
  required: z.ZodOptional<z.ZodBoolean>;
126
136
  group: z.ZodOptional<z.ZodEnum<{
137
+ search: "search";
127
138
  content: "content";
139
+ profile: "profile";
128
140
  style: "style";
129
141
  }>>;
130
142
  type: z.ZodLiteral<"link">;
@@ -133,7 +145,9 @@ export declare const BuilderFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
133
145
  description: z.ZodOptional<z.ZodString>;
134
146
  required: z.ZodOptional<z.ZodBoolean>;
135
147
  group: z.ZodOptional<z.ZodEnum<{
148
+ search: "search";
136
149
  content: "content";
150
+ profile: "profile";
137
151
  style: "style";
138
152
  }>>;
139
153
  type: z.ZodLiteral<"boolean">;
@@ -143,7 +157,9 @@ export declare const BuilderFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
143
157
  description: z.ZodOptional<z.ZodString>;
144
158
  required: z.ZodOptional<z.ZodBoolean>;
145
159
  group: z.ZodOptional<z.ZodEnum<{
160
+ search: "search";
146
161
  content: "content";
162
+ profile: "profile";
147
163
  style: "style";
148
164
  }>>;
149
165
  type: z.ZodLiteral<"number">;
@@ -156,7 +172,9 @@ export declare const BuilderFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
156
172
  description: z.ZodOptional<z.ZodString>;
157
173
  required: z.ZodOptional<z.ZodBoolean>;
158
174
  group: z.ZodOptional<z.ZodEnum<{
175
+ search: "search";
159
176
  content: "content";
177
+ profile: "profile";
160
178
  style: "style";
161
179
  }>>;
162
180
  type: z.ZodLiteral<"range">;
@@ -170,7 +188,9 @@ export declare const BuilderFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
170
188
  description: z.ZodOptional<z.ZodString>;
171
189
  required: z.ZodOptional<z.ZodBoolean>;
172
190
  group: z.ZodOptional<z.ZodEnum<{
191
+ search: "search";
173
192
  content: "content";
193
+ profile: "profile";
174
194
  style: "style";
175
195
  }>>;
176
196
  type: z.ZodLiteral<"select">;
@@ -184,18 +204,22 @@ export declare const BuilderFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
184
204
  description: z.ZodOptional<z.ZodString>;
185
205
  required: z.ZodOptional<z.ZodBoolean>;
186
206
  group: z.ZodOptional<z.ZodEnum<{
207
+ search: "search";
187
208
  content: "content";
209
+ profile: "profile";
188
210
  style: "style";
189
211
  }>>;
190
212
  type: z.ZodLiteral<"color">;
191
- defaultValue: z.ZodOptional<z.ZodString>;
213
+ defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"transparent">, z.ZodString]>>;
192
214
  }, z.core.$strict>, z.ZodObject<{
193
215
  label: z.ZodString;
194
216
  description: z.ZodOptional<z.ZodString>;
195
217
  defaultValue: z.ZodOptional<z.ZodUnknown>;
196
218
  required: z.ZodOptional<z.ZodBoolean>;
197
219
  group: z.ZodOptional<z.ZodEnum<{
220
+ search: "search";
198
221
  content: "content";
222
+ profile: "profile";
199
223
  style: "style";
200
224
  }>>;
201
225
  type: z.ZodLiteral<"product">;
@@ -205,7 +229,9 @@ export declare const BuilderFieldSchema: z.ZodDiscriminatedUnion<[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<"products">;
@@ -217,7 +243,9 @@ export declare const BuilderFieldSchema: z.ZodDiscriminatedUnion<[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.ZodLiteral<"list">;
@@ -229,7 +257,9 @@ export declare const BuilderFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
229
257
  defaultValue: z.ZodOptional<z.ZodUnknown>;
230
258
  required: z.ZodOptional<z.ZodBoolean>;
231
259
  group: z.ZodOptional<z.ZodEnum<{
260
+ search: "search";
232
261
  content: "content";
262
+ profile: "profile";
233
263
  style: "style";
234
264
  }>>;
235
265
  type: z.ZodEnum<{
@@ -262,7 +292,9 @@ export declare const BlockSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscrimi
262
292
  defaultValue: z.ZodOptional<z.ZodUnknown>;
263
293
  required: z.ZodOptional<z.ZodBoolean>;
264
294
  group: z.ZodOptional<z.ZodEnum<{
295
+ search: "search";
265
296
  content: "content";
297
+ profile: "profile";
266
298
  style: "style";
267
299
  }>>;
268
300
  type: z.ZodLiteral<"text">;
@@ -275,7 +307,9 @@ export declare const BlockSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscrimi
275
307
  defaultValue: z.ZodOptional<z.ZodUnknown>;
276
308
  required: z.ZodOptional<z.ZodBoolean>;
277
309
  group: z.ZodOptional<z.ZodEnum<{
310
+ search: "search";
278
311
  content: "content";
312
+ profile: "profile";
279
313
  style: "style";
280
314
  }>>;
281
315
  type: z.ZodLiteral<"richtext">;
@@ -291,7 +325,9 @@ export declare const BlockSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscrimi
291
325
  defaultValue: z.ZodOptional<z.ZodUnknown>;
292
326
  required: z.ZodOptional<z.ZodBoolean>;
293
327
  group: z.ZodOptional<z.ZodEnum<{
328
+ search: "search";
294
329
  content: "content";
330
+ profile: "profile";
295
331
  style: "style";
296
332
  }>>;
297
333
  type: z.ZodLiteral<"code">;
@@ -314,7 +350,9 @@ export declare const BlockSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscrimi
314
350
  defaultValue: z.ZodOptional<z.ZodUnknown>;
315
351
  required: z.ZodOptional<z.ZodBoolean>;
316
352
  group: z.ZodOptional<z.ZodEnum<{
353
+ search: "search";
317
354
  content: "content";
355
+ profile: "profile";
318
356
  style: "style";
319
357
  }>>;
320
358
  type: z.ZodLiteral<"image">;
@@ -325,7 +363,9 @@ export declare const BlockSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscrimi
325
363
  defaultValue: z.ZodOptional<z.ZodUnknown>;
326
364
  required: z.ZodOptional<z.ZodBoolean>;
327
365
  group: z.ZodOptional<z.ZodEnum<{
366
+ search: "search";
328
367
  content: "content";
368
+ profile: "profile";
329
369
  style: "style";
330
370
  }>>;
331
371
  type: z.ZodLiteral<"link">;
@@ -334,7 +374,9 @@ export declare const BlockSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscrimi
334
374
  description: z.ZodOptional<z.ZodString>;
335
375
  required: z.ZodOptional<z.ZodBoolean>;
336
376
  group: z.ZodOptional<z.ZodEnum<{
377
+ search: "search";
337
378
  content: "content";
379
+ profile: "profile";
338
380
  style: "style";
339
381
  }>>;
340
382
  type: z.ZodLiteral<"boolean">;
@@ -344,7 +386,9 @@ export declare const BlockSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscrimi
344
386
  description: z.ZodOptional<z.ZodString>;
345
387
  required: z.ZodOptional<z.ZodBoolean>;
346
388
  group: z.ZodOptional<z.ZodEnum<{
389
+ search: "search";
347
390
  content: "content";
391
+ profile: "profile";
348
392
  style: "style";
349
393
  }>>;
350
394
  type: z.ZodLiteral<"number">;
@@ -357,7 +401,9 @@ export declare const BlockSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscrimi
357
401
  description: z.ZodOptional<z.ZodString>;
358
402
  required: z.ZodOptional<z.ZodBoolean>;
359
403
  group: z.ZodOptional<z.ZodEnum<{
404
+ search: "search";
360
405
  content: "content";
406
+ profile: "profile";
361
407
  style: "style";
362
408
  }>>;
363
409
  type: z.ZodLiteral<"range">;
@@ -371,7 +417,9 @@ export declare const BlockSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscrimi
371
417
  description: z.ZodOptional<z.ZodString>;
372
418
  required: z.ZodOptional<z.ZodBoolean>;
373
419
  group: z.ZodOptional<z.ZodEnum<{
420
+ search: "search";
374
421
  content: "content";
422
+ profile: "profile";
375
423
  style: "style";
376
424
  }>>;
377
425
  type: z.ZodLiteral<"select">;
@@ -385,18 +433,22 @@ export declare const BlockSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscrimi
385
433
  description: z.ZodOptional<z.ZodString>;
386
434
  required: z.ZodOptional<z.ZodBoolean>;
387
435
  group: z.ZodOptional<z.ZodEnum<{
436
+ search: "search";
388
437
  content: "content";
438
+ profile: "profile";
389
439
  style: "style";
390
440
  }>>;
391
441
  type: z.ZodLiteral<"color">;
392
- defaultValue: z.ZodOptional<z.ZodString>;
442
+ defaultValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"transparent">, z.ZodString]>>;
393
443
  }, z.core.$strict>, z.ZodObject<{
394
444
  label: z.ZodString;
395
445
  description: z.ZodOptional<z.ZodString>;
396
446
  defaultValue: z.ZodOptional<z.ZodUnknown>;
397
447
  required: z.ZodOptional<z.ZodBoolean>;
398
448
  group: z.ZodOptional<z.ZodEnum<{
449
+ search: "search";
399
450
  content: "content";
451
+ profile: "profile";
400
452
  style: "style";
401
453
  }>>;
402
454
  type: z.ZodLiteral<"product">;
@@ -406,7 +458,9 @@ export declare const BlockSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscrimi
406
458
  defaultValue: z.ZodOptional<z.ZodUnknown>;
407
459
  required: z.ZodOptional<z.ZodBoolean>;
408
460
  group: z.ZodOptional<z.ZodEnum<{
461
+ search: "search";
409
462
  content: "content";
463
+ profile: "profile";
410
464
  style: "style";
411
465
  }>>;
412
466
  type: z.ZodLiteral<"products">;
@@ -418,7 +472,9 @@ export declare const BlockSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscrimi
418
472
  defaultValue: z.ZodOptional<z.ZodUnknown>;
419
473
  required: z.ZodOptional<z.ZodBoolean>;
420
474
  group: z.ZodOptional<z.ZodEnum<{
475
+ search: "search";
421
476
  content: "content";
477
+ profile: "profile";
422
478
  style: "style";
423
479
  }>>;
424
480
  type: z.ZodLiteral<"list">;
@@ -430,7 +486,9 @@ export declare const BlockSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscrimi
430
486
  defaultValue: z.ZodOptional<z.ZodUnknown>;
431
487
  required: z.ZodOptional<z.ZodBoolean>;
432
488
  group: z.ZodOptional<z.ZodEnum<{
489
+ search: "search";
433
490
  content: "content";
491
+ profile: "profile";
434
492
  style: "style";
435
493
  }>>;
436
494
  type: z.ZodEnum<{
@@ -1 +1 @@
1
- {"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../src/fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAiB5B,eAAO,MAAM,iBAAiB;;;kBAKnB,CAAC;AACZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAmB5D,QAAA,MAAM,uBAAuB;;;;kBAMlB,CAAC;AACZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAgExE,eAAO,MAAM,uBAAuB;;;;;;;;;;;EAWlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAQrB,CAAC;AACZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAShE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAc7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAc7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAAkD,CAAC;AACnF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
package/dist/fields.js CHANGED
@@ -7,10 +7,10 @@ const FieldBaseSchema = z
7
7
  defaultValue: z.unknown().optional(),
8
8
  required: z.boolean().optional(),
9
9
  // Groups settings within the Inspector. "content" (default) shows
10
- // under the Block Settings collapsible; "style" shows under a
11
- // separate Style collapsible. Themes pick up the value via the
12
- // existing block.settings.path lookup — no runtime change.
13
- group: z.enum(['content', 'style']).optional(),
10
+ // under the Block Settings collapsible; "profile" shows under Profile
11
+ // banner; "style" shows under Style; "search" shows under Search bar.
12
+ // Themes pick up the value via the existing block.settings.path lookup.
13
+ group: z.enum(['content', 'profile', 'style', 'search']).optional(),
14
14
  })
15
15
  .strict();
16
16
  export const FieldOptionSchema = z
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export * from './custom-pages.ts';
2
+ export * from './dedicated-pages.ts';
1
3
  export * from './builder-settings.ts';
2
4
  export * from './canonical-settings.ts';
3
5
  export * from './events.ts';
@@ -10,6 +12,7 @@ export * from './preview-protocol.ts';
10
12
  export * from './preview-session-resolve.ts';
11
13
  export * from './preview-trusted-origins.ts';
12
14
  export * from './storefront-initial-data-html.ts';
15
+ export * from './storefront-typography-fonts.ts';
13
16
  export * from './style-slots.ts';
14
17
  export * from './theme-manifest.ts';
15
18
  export * from './theme-schemes.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ export * from "./custom-pages.js";
2
+ export * from "./dedicated-pages.js";
1
3
  export * from "./builder-settings.js";
2
4
  export * from "./canonical-settings.js";
3
5
  export * from "./events.js";
@@ -10,6 +12,7 @@ export * from "./preview-protocol.js";
10
12
  export * from "./preview-session-resolve.js";
11
13
  export * from "./preview-trusted-origins.js";
12
14
  export * from "./storefront-initial-data-html.js";
15
+ export * from "./storefront-typography-fonts.js";
13
16
  export * from "./style-slots.js";
14
17
  export * from "./theme-manifest.js";
15
18
  export * from "./theme-schemes.js";
@@ -179,5 +179,12 @@ export declare const LegacyThemeManifestSchema: z.ZodObject<{
179
179
  }, z.core.$loose>;
180
180
  export type LegacyThemeManifest = z.infer<typeof LegacyThemeManifestSchema>;
181
181
  export declare function convertLegacyThemeManifest(input: unknown): ThemeManifest;
182
+ export type ThemePageBlockOrderPage = {
183
+ allowedBlocks?: string[];
184
+ defaultBlocks?: Array<{
185
+ type?: string;
186
+ }>;
187
+ };
188
+ export declare function getThemePageBlockOrderFromManifest(manifest: unknown, pageId: string): string[];
182
189
  export {};
183
190
  //# sourceMappingURL=legacy-manifest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"legacy-manifest.d.ts","sourceRoot":"","sources":["../src/legacy-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAU9E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;iBAarB,CAAC;AACjB,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,uBAAuB;;;;;iBAOpB,CAAC;AACjB,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;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