@endora-commerce/email-components 0.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -0
  3. package/dist/components/email-branding-preview-context.d.ts +7 -0
  4. package/dist/components/email-branding-preview-context.d.ts.map +1 -0
  5. package/dist/components/email-branding-preview-context.js +8 -0
  6. package/dist/components/email-branding-preview-context.js.map +1 -0
  7. package/dist/components/email-embeds-context.d.ts +11 -0
  8. package/dist/components/email-embeds-context.d.ts.map +1 -0
  9. package/dist/components/email-embeds-context.js +15 -0
  10. package/dist/components/email-embeds-context.js.map +1 -0
  11. package/dist/config.d.ts +333 -0
  12. package/dist/config.d.ts.map +1 -0
  13. package/dist/config.js +900 -0
  14. package/dist/config.js.map +1 -0
  15. package/dist/defaults/default-footer.d.ts +13 -0
  16. package/dist/defaults/default-footer.d.ts.map +1 -0
  17. package/dist/defaults/default-footer.js +42 -0
  18. package/dist/defaults/default-footer.js.map +1 -0
  19. package/dist/defaults/default-header.d.ts +5 -0
  20. package/dist/defaults/default-header.d.ts.map +1 -0
  21. package/dist/defaults/default-header.js +34 -0
  22. package/dist/defaults/default-header.js.map +1 -0
  23. package/dist/defaults/simple-email-body.d.ts +20 -0
  24. package/dist/defaults/simple-email-body.d.ts.map +1 -0
  25. package/dist/defaults/simple-email-body.js +41 -0
  26. package/dist/defaults/simple-email-body.js.map +1 -0
  27. package/dist/directives/directive-engine.d.ts +7 -0
  28. package/dist/directives/directive-engine.d.ts.map +1 -0
  29. package/dist/directives/directive-engine.js +144 -0
  30. package/dist/directives/directive-engine.js.map +1 -0
  31. package/dist/editor/email-row-layout-presets.d.ts +33 -0
  32. package/dist/editor/email-row-layout-presets.d.ts.map +1 -0
  33. package/dist/editor/email-row-layout-presets.js +145 -0
  34. package/dist/editor/email-row-layout-presets.js.map +1 -0
  35. package/dist/index.d.ts +18 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +24 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/render/escape-html.d.ts +4 -0
  40. package/dist/render/escape-html.d.ts.map +1 -0
  41. package/dist/render/escape-html.js +21 -0
  42. package/dist/render/escape-html.js.map +1 -0
  43. package/dist/render/order-labels.d.ts +23 -0
  44. package/dist/render/order-labels.d.ts.map +1 -0
  45. package/dist/render/order-labels.js +46 -0
  46. package/dist/render/order-labels.js.map +1 -0
  47. package/dist/render/render-email-html.d.ts +18 -0
  48. package/dist/render/render-email-html.d.ts.map +1 -0
  49. package/dist/render/render-email-html.js +659 -0
  50. package/dist/render/render-email-html.js.map +1 -0
  51. package/dist/render/render-email-text.d.ts +11 -0
  52. package/dist/render/render-email-text.d.ts.map +1 -0
  53. package/dist/render/render-email-text.js +167 -0
  54. package/dist/render/render-email-text.js.map +1 -0
  55. package/dist/render/sample-variables.d.ts +15 -0
  56. package/dist/render/sample-variables.d.ts.map +1 -0
  57. package/dist/render/sample-variables.js +43 -0
  58. package/dist/render/sample-variables.js.map +1 -0
  59. package/dist/render/sanitize-email-html.d.ts +9 -0
  60. package/dist/render/sanitize-email-html.d.ts.map +1 -0
  61. package/dist/render/sanitize-email-html.js +122 -0
  62. package/dist/render/sanitize-email-html.js.map +1 -0
  63. package/dist/render/social-icon-svg.d.ts +6 -0
  64. package/dist/render/social-icon-svg.d.ts.map +1 -0
  65. package/dist/render/social-icon-svg.js +41 -0
  66. package/dist/render/social-icon-svg.js.map +1 -0
  67. package/dist/schema/component-types.d.ts +269 -0
  68. package/dist/schema/component-types.d.ts.map +1 -0
  69. package/dist/schema/component-types.js +105 -0
  70. package/dist/schema/component-types.js.map +1 -0
  71. package/dist/schema/envelope.d.ts +21 -0
  72. package/dist/schema/envelope.d.ts.map +1 -0
  73. package/dist/schema/envelope.js +8 -0
  74. package/dist/schema/envelope.js.map +1 -0
  75. package/dist/tree/walk-embeds.d.ts +7 -0
  76. package/dist/tree/walk-embeds.d.ts.map +1 -0
  77. package/dist/tree/walk-embeds.js +115 -0
  78. package/dist/tree/walk-embeds.js.map +1 -0
  79. package/package.json +71 -0
  80. package/tailwind.css +14 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Endora sp. z o.o. and the Endora Commerce contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ <!-- Generated by `pnpm --filter backend run manifests:generate`. Delete this line to take the file over; a README without it is never regenerated. -->
2
+
3
+ # @endora-commerce/email-components
4
+
5
+ Shared transactional-email building blocks (feature 047). Pure, React-free render/* + directives/* + tree/* + schema/* + defaults/* are imported by the backend to render email-client-safe HTML and plain text; the React components/* + config.ts power the admin's email-safe Puck editor. The split keeps React out of the backend send path (Principle I/IV).
6
+
7
+ ## What this is
8
+
9
+ A shared library package of **Endora Commerce**, the modular B2B/B2C commerce platform. It declares no module manifest, so the platform composes nothing from it: what is published here is what the platform and the modules built on it compile against.
10
+
11
+ ## Entry points
12
+
13
+ - `@endora-commerce/email-components`
14
+ - `@endora-commerce/email-components/*`
15
+ - `@endora-commerce/email-components/components/*`
16
+ - `@endora-commerce/email-components/tailwind.css`
17
+
18
+ ## Depends on
19
+
20
+ Everything below is a **peer** dependency, so the application resolves exactly one copy of each — two copies of a host or of React are a runtime failure rather than a type error. An entry marked *optional* is needed only by the layers that use it.
21
+
22
+ **Endora packages**
23
+
24
+ - `@endora-commerce/page-builder-core`
25
+
26
+ **Third-party**
27
+
28
+ - `@measured/puck` * — *optional*
29
+ - `react` ^19.0.0 — *optional*
30
+ - `react-dom` ^19.0.0 — *optional*
31
+
32
+ ## What the tarball carries
33
+
34
+ - `dist/` — the compiled JavaScript and its type declarations
35
+ - `tailwind.css` — the Tailwind source declaration
36
+
37
+ ## Install
38
+
39
+ ```bash
40
+ pnpm add @endora-commerce/email-components
41
+ ```
42
+
43
+ ## Licence
44
+
45
+ MIT — the text is in `LICENSE`, beside this file.
@@ -0,0 +1,7 @@
1
+ export interface EmailBrandingPreview {
2
+ /** Resolved absolute logo URL for the current scope, or empty. */
3
+ logoUrl: string;
4
+ }
5
+ export declare const EmailBrandingPreviewProvider: import("react").Provider<EmailBrandingPreview>;
6
+ export declare function useEmailBrandingPreview(): EmailBrandingPreview;
7
+ //# sourceMappingURL=email-branding-preview-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-branding-preview-context.d.ts","sourceRoot":"","sources":["../../src/components/email-branding-preview-context.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,oBAAoB;IACnC,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,eAAO,MAAM,4BAA4B,gDAAuC,CAAC;AAEjF,wBAAgB,uBAAuB,IAAI,oBAAoB,CAE9D"}
@@ -0,0 +1,8 @@
1
+ // Branding preview for EmailLogo on the authoring canvas.
2
+ import { createContext, useContext } from 'react';
3
+ const EmailBrandingPreviewContext = createContext({ logoUrl: '' });
4
+ export const EmailBrandingPreviewProvider = EmailBrandingPreviewContext.Provider;
5
+ export function useEmailBrandingPreview() {
6
+ return useContext(EmailBrandingPreviewContext);
7
+ }
8
+ //# sourceMappingURL=email-branding-preview-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-branding-preview-context.js","sourceRoot":"","sources":["../../src/components/email-branding-preview-context.tsx"],"names":[],"mappings":"AAAA,0DAA0D;AAE1D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAOlD,MAAM,2BAA2B,GAAG,aAAa,CAAuB,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;AAEzF,MAAM,CAAC,MAAM,4BAA4B,GAAG,2BAA2B,CAAC,QAAQ,CAAC;AAEjF,MAAM,UAAU,uBAAuB;IACrC,OAAO,UAAU,CAAC,2BAA2B,CAAC,CAAC;AACjD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface EmailEmbeds {
3
+ /** Rendered preview node per referenced block code. */
4
+ blocks: Record<string, ReactNode>;
5
+ /** Rendered preview node per referenced template code. */
6
+ templates: Record<string, ReactNode>;
7
+ }
8
+ export declare const EmailEmbedsProvider: import("react").Provider<EmailEmbeds>;
9
+ /** Read the embed previews supplied by the host editor (empty by default). */
10
+ export declare function useEmailEmbeds(): EmailEmbeds;
11
+ //# sourceMappingURL=email-embeds-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-embeds-context.d.ts","sourceRoot":"","sources":["../../src/components/email-embeds-context.tsx"],"names":[],"mappings":"AAQA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,MAAM,WAAW,WAAW;IAC1B,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAClC,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACtC;AAID,eAAO,MAAM,mBAAmB,uCAA8B,CAAC;AAE/D,8EAA8E;AAC9E,wBAAgB,cAAc,IAAI,WAAW,CAE5C"}
@@ -0,0 +1,15 @@
1
+ // Email Page Builder embeds context (feature 047).
2
+ //
3
+ // The `EmailInsertBlock` / `EmailInsertTemplate` components reference a reusable
4
+ // block / template by code. On the authoring canvas we want to render that
5
+ // referenced content inline rather than just printing its code. This React
6
+ // context lets the host editor supply pre-rendered previews keyed by code;
7
+ // when absent, the components fall back to a labelled placeholder.
8
+ import { createContext, useContext } from 'react';
9
+ const EmailEmbedsContext = createContext({ blocks: {}, templates: {} });
10
+ export const EmailEmbedsProvider = EmailEmbedsContext.Provider;
11
+ /** Read the embed previews supplied by the host editor (empty by default). */
12
+ export function useEmailEmbeds() {
13
+ return useContext(EmailEmbedsContext);
14
+ }
15
+ //# sourceMappingURL=email-embeds-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-embeds-context.js","sourceRoot":"","sources":["../../src/components/email-embeds-context.tsx"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,EAAE;AACF,iFAAiF;AACjF,2EAA2E;AAC3E,2EAA2E;AAC3E,2EAA2E;AAC3E,mEAAmE;AAEnE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAC;AASlE,MAAM,kBAAkB,GAAG,aAAa,CAAc,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;AAErF,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,QAAQ,CAAC;AAE/D,8EAA8E;AAC9E,MAAM,UAAU,cAAc;IAC5B,OAAO,UAAU,CAAC,kBAAkB,CAAC,CAAC;AACxC,CAAC"}
@@ -0,0 +1,333 @@
1
+ import type { ComponentConfig, Config } from '@measured/puck';
2
+ import type { EmailButtonProps, EmailCalloutProps, EmailColumnProps, EmailDividerProps, EmailFooterLegalProps, EmailHeadingProps, EmailImageProps, EmailInsertBlockProps, EmailLogoProps, EmailOrderLabeledVarProps, EmailOrderSummaryProps, EmailProductCardProps, EmailProductGridProps, EmailCategoryGridProps, EmailRichTextProps, EmailRowProps, EmailSectionProps, EmailSocialProps, EmailSpacerProps, EmailTableProps, EmailTextProps } from './schema/component-types.js';
3
+ export declare const EmailHeading: ComponentConfig<EmailHeadingProps>;
4
+ export declare const EmailText: ComponentConfig<EmailTextProps>;
5
+ export declare const EmailButton: ComponentConfig<EmailButtonProps>;
6
+ export declare const EmailImage: ComponentConfig<EmailImageProps>;
7
+ export declare const EmailLogo: ComponentConfig<EmailLogoProps>;
8
+ export declare const EmailDivider: ComponentConfig<EmailDividerProps>;
9
+ export declare const EmailSpacer: ComponentConfig<EmailSpacerProps>;
10
+ export declare const EmailTable: ComponentConfig<EmailTableProps>;
11
+ export declare const EmailSection: ComponentConfig<EmailSectionProps>;
12
+ export declare const EmailColumn: ComponentConfig<EmailColumnProps>;
13
+ export declare const EmailRow: ComponentConfig<EmailRowProps>;
14
+ export declare const EmailRichText: ComponentConfig<EmailRichTextProps>;
15
+ export declare const EmailProductCard: ComponentConfig<EmailProductCardProps>;
16
+ export declare const EmailProductGrid: ComponentConfig<EmailProductGridProps>;
17
+ export declare const EmailCategoryGrid: ComponentConfig<EmailCategoryGridProps>;
18
+ export declare const EmailOrderSummary: ComponentConfig<EmailOrderSummaryProps>;
19
+ export declare const EmailOrderId: {
20
+ render: import("@measured/puck").PuckComponent<EmailOrderLabeledVarProps>;
21
+ label?: string;
22
+ defaultProps?: EmailOrderLabeledVarProps;
23
+ fields?: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
24
+ permissions?: Partial<import("@measured/puck").Permissions>;
25
+ inline?: boolean;
26
+ resolveFields?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
27
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
28
+ id: string;
29
+ }>;
30
+ fields: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
31
+ lastFields: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
32
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
33
+ appState: import("@measured/puck").AppState;
34
+ parent: import("@measured/puck").ComponentData | null;
35
+ }) => import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}> | Promise<import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>>;
36
+ resolveData?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
37
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
38
+ id: string;
39
+ }>;
40
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
41
+ metadata: import("@measured/puck").Metadata;
42
+ trigger: import("@measured/puck").ResolveDataTrigger;
43
+ }) => (Omit<Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, "props"> & {
44
+ props?: Partial<EmailOrderLabeledVarProps>;
45
+ }) | Promise<Omit<Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, "props"> & {
46
+ props?: Partial<EmailOrderLabeledVarProps>;
47
+ }>;
48
+ resolvePermissions?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
49
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
50
+ id: string;
51
+ }>;
52
+ lastPermissions: Partial<import("@measured/puck").Permissions>;
53
+ permissions: Partial<import("@measured/puck").Permissions>;
54
+ appState: import("@measured/puck").AppState;
55
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
56
+ }) => Promise<Partial<import("@measured/puck").Permissions>> | Partial<import("@measured/puck").Permissions>;
57
+ metadata?: import("@measured/puck").Metadata;
58
+ };
59
+ export declare const EmailBillingAddress: {
60
+ render: import("@measured/puck").PuckComponent<EmailOrderLabeledVarProps>;
61
+ label?: string;
62
+ defaultProps?: EmailOrderLabeledVarProps;
63
+ fields?: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
64
+ permissions?: Partial<import("@measured/puck").Permissions>;
65
+ inline?: boolean;
66
+ resolveFields?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
67
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
68
+ id: string;
69
+ }>;
70
+ fields: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
71
+ lastFields: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
72
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
73
+ appState: import("@measured/puck").AppState;
74
+ parent: import("@measured/puck").ComponentData | null;
75
+ }) => import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}> | Promise<import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>>;
76
+ resolveData?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
77
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
78
+ id: string;
79
+ }>;
80
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
81
+ metadata: import("@measured/puck").Metadata;
82
+ trigger: import("@measured/puck").ResolveDataTrigger;
83
+ }) => (Omit<Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, "props"> & {
84
+ props?: Partial<EmailOrderLabeledVarProps>;
85
+ }) | Promise<Omit<Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, "props"> & {
86
+ props?: Partial<EmailOrderLabeledVarProps>;
87
+ }>;
88
+ resolvePermissions?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
89
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
90
+ id: string;
91
+ }>;
92
+ lastPermissions: Partial<import("@measured/puck").Permissions>;
93
+ permissions: Partial<import("@measured/puck").Permissions>;
94
+ appState: import("@measured/puck").AppState;
95
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
96
+ }) => Promise<Partial<import("@measured/puck").Permissions>> | Partial<import("@measured/puck").Permissions>;
97
+ metadata?: import("@measured/puck").Metadata;
98
+ };
99
+ export declare const EmailShippingAddress: {
100
+ render: import("@measured/puck").PuckComponent<EmailOrderLabeledVarProps>;
101
+ label?: string;
102
+ defaultProps?: EmailOrderLabeledVarProps;
103
+ fields?: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
104
+ permissions?: Partial<import("@measured/puck").Permissions>;
105
+ inline?: boolean;
106
+ resolveFields?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
107
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
108
+ id: string;
109
+ }>;
110
+ fields: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
111
+ lastFields: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
112
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
113
+ appState: import("@measured/puck").AppState;
114
+ parent: import("@measured/puck").ComponentData | null;
115
+ }) => import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}> | Promise<import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>>;
116
+ resolveData?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
117
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
118
+ id: string;
119
+ }>;
120
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
121
+ metadata: import("@measured/puck").Metadata;
122
+ trigger: import("@measured/puck").ResolveDataTrigger;
123
+ }) => (Omit<Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, "props"> & {
124
+ props?: Partial<EmailOrderLabeledVarProps>;
125
+ }) | Promise<Omit<Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, "props"> & {
126
+ props?: Partial<EmailOrderLabeledVarProps>;
127
+ }>;
128
+ resolvePermissions?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
129
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
130
+ id: string;
131
+ }>;
132
+ lastPermissions: Partial<import("@measured/puck").Permissions>;
133
+ permissions: Partial<import("@measured/puck").Permissions>;
134
+ appState: import("@measured/puck").AppState;
135
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
136
+ }) => Promise<Partial<import("@measured/puck").Permissions>> | Partial<import("@measured/puck").Permissions>;
137
+ metadata?: import("@measured/puck").Metadata;
138
+ };
139
+ export declare const EmailOrderTotals: {
140
+ render: import("@measured/puck").PuckComponent<EmailOrderLabeledVarProps>;
141
+ label?: string;
142
+ defaultProps?: EmailOrderLabeledVarProps;
143
+ fields?: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
144
+ permissions?: Partial<import("@measured/puck").Permissions>;
145
+ inline?: boolean;
146
+ resolveFields?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
147
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
148
+ id: string;
149
+ }>;
150
+ fields: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
151
+ lastFields: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
152
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
153
+ appState: import("@measured/puck").AppState;
154
+ parent: import("@measured/puck").ComponentData | null;
155
+ }) => import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}> | Promise<import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>>;
156
+ resolveData?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
157
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
158
+ id: string;
159
+ }>;
160
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
161
+ metadata: import("@measured/puck").Metadata;
162
+ trigger: import("@measured/puck").ResolveDataTrigger;
163
+ }) => (Omit<Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, "props"> & {
164
+ props?: Partial<EmailOrderLabeledVarProps>;
165
+ }) | Promise<Omit<Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, "props"> & {
166
+ props?: Partial<EmailOrderLabeledVarProps>;
167
+ }>;
168
+ resolvePermissions?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
169
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
170
+ id: string;
171
+ }>;
172
+ lastPermissions: Partial<import("@measured/puck").Permissions>;
173
+ permissions: Partial<import("@measured/puck").Permissions>;
174
+ appState: import("@measured/puck").AppState;
175
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
176
+ }) => Promise<Partial<import("@measured/puck").Permissions>> | Partial<import("@measured/puck").Permissions>;
177
+ metadata?: import("@measured/puck").Metadata;
178
+ };
179
+ export declare const EmailAppliedDiscounts: {
180
+ render: import("@measured/puck").PuckComponent<EmailOrderLabeledVarProps>;
181
+ label?: string;
182
+ defaultProps?: EmailOrderLabeledVarProps;
183
+ fields?: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
184
+ permissions?: Partial<import("@measured/puck").Permissions>;
185
+ inline?: boolean;
186
+ resolveFields?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
187
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
188
+ id: string;
189
+ }>;
190
+ fields: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
191
+ lastFields: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
192
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
193
+ appState: import("@measured/puck").AppState;
194
+ parent: import("@measured/puck").ComponentData | null;
195
+ }) => import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}> | Promise<import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>>;
196
+ resolveData?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
197
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
198
+ id: string;
199
+ }>;
200
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
201
+ metadata: import("@measured/puck").Metadata;
202
+ trigger: import("@measured/puck").ResolveDataTrigger;
203
+ }) => (Omit<Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, "props"> & {
204
+ props?: Partial<EmailOrderLabeledVarProps>;
205
+ }) | Promise<Omit<Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, "props"> & {
206
+ props?: Partial<EmailOrderLabeledVarProps>;
207
+ }>;
208
+ resolvePermissions?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
209
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
210
+ id: string;
211
+ }>;
212
+ lastPermissions: Partial<import("@measured/puck").Permissions>;
213
+ permissions: Partial<import("@measured/puck").Permissions>;
214
+ appState: import("@measured/puck").AppState;
215
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
216
+ }) => Promise<Partial<import("@measured/puck").Permissions>> | Partial<import("@measured/puck").Permissions>;
217
+ metadata?: import("@measured/puck").Metadata;
218
+ };
219
+ export declare const EmailDeliveryMethod: {
220
+ render: import("@measured/puck").PuckComponent<EmailOrderLabeledVarProps>;
221
+ label?: string;
222
+ defaultProps?: EmailOrderLabeledVarProps;
223
+ fields?: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
224
+ permissions?: Partial<import("@measured/puck").Permissions>;
225
+ inline?: boolean;
226
+ resolveFields?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
227
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
228
+ id: string;
229
+ }>;
230
+ fields: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
231
+ lastFields: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
232
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
233
+ appState: import("@measured/puck").AppState;
234
+ parent: import("@measured/puck").ComponentData | null;
235
+ }) => import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}> | Promise<import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>>;
236
+ resolveData?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
237
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
238
+ id: string;
239
+ }>;
240
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
241
+ metadata: import("@measured/puck").Metadata;
242
+ trigger: import("@measured/puck").ResolveDataTrigger;
243
+ }) => (Omit<Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, "props"> & {
244
+ props?: Partial<EmailOrderLabeledVarProps>;
245
+ }) | Promise<Omit<Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, "props"> & {
246
+ props?: Partial<EmailOrderLabeledVarProps>;
247
+ }>;
248
+ resolvePermissions?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
249
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
250
+ id: string;
251
+ }>;
252
+ lastPermissions: Partial<import("@measured/puck").Permissions>;
253
+ permissions: Partial<import("@measured/puck").Permissions>;
254
+ appState: import("@measured/puck").AppState;
255
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
256
+ }) => Promise<Partial<import("@measured/puck").Permissions>> | Partial<import("@measured/puck").Permissions>;
257
+ metadata?: import("@measured/puck").Metadata;
258
+ };
259
+ export declare const EmailPaymentMethod: {
260
+ render: import("@measured/puck").PuckComponent<EmailOrderLabeledVarProps>;
261
+ label?: string;
262
+ defaultProps?: EmailOrderLabeledVarProps;
263
+ fields?: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
264
+ permissions?: Partial<import("@measured/puck").Permissions>;
265
+ inline?: boolean;
266
+ resolveFields?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
267
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
268
+ id: string;
269
+ }>;
270
+ fields: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
271
+ lastFields: import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>;
272
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
273
+ appState: import("@measured/puck").AppState;
274
+ parent: import("@measured/puck").ComponentData | null;
275
+ }) => import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}> | Promise<import("@measured/puck").Fields<EmailOrderLabeledVarProps, {}>>;
276
+ resolveData?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
277
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
278
+ id: string;
279
+ }>;
280
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
281
+ metadata: import("@measured/puck").Metadata;
282
+ trigger: import("@measured/puck").ResolveDataTrigger;
283
+ }) => (Omit<Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, "props"> & {
284
+ props?: Partial<EmailOrderLabeledVarProps>;
285
+ }) | Promise<Omit<Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, "props"> & {
286
+ props?: Partial<EmailOrderLabeledVarProps>;
287
+ }>;
288
+ resolvePermissions?: (data: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type">, params: {
289
+ changed: Partial<Record<keyof EmailOrderLabeledVarProps, boolean> & {
290
+ id: string;
291
+ }>;
292
+ lastPermissions: Partial<import("@measured/puck").Permissions>;
293
+ permissions: Partial<import("@measured/puck").Permissions>;
294
+ appState: import("@measured/puck").AppState;
295
+ lastData: Omit<import("@measured/puck").ComponentData<EmailOrderLabeledVarProps, string, Record<string, import("@measured/puck").DefaultComponentProps>>, "type"> | null;
296
+ }) => Promise<Partial<import("@measured/puck").Permissions>> | Partial<import("@measured/puck").Permissions>;
297
+ metadata?: import("@measured/puck").Metadata;
298
+ };
299
+ export declare const EmailSocial: ComponentConfig<EmailSocialProps>;
300
+ export declare const EmailCallout: ComponentConfig<EmailCalloutProps>;
301
+ export declare const EmailFooterLegal: ComponentConfig<EmailFooterLegalProps>;
302
+ export declare const EmailInsertBlock: ComponentConfig<EmailInsertBlockProps>;
303
+ /**
304
+ * Hide palette entries that require variables not declared on the current email
305
+ * (e.g. Order summary needs `order.items`).
306
+ *
307
+ * Hidden names are removed from both `categories` and `components` so Puck does
308
+ * not dump them into the uncategorized "Other" drawer group.
309
+ */
310
+ export declare function filterEmailPaletteByVariables(config: Config, variableKeys: readonly string[]): Config;
311
+ /**
312
+ * The e-mail renderer map — **the React half only**, keyed by namespaced block
313
+ * name (feature 096, T302; `contracts/block-definition.md` §4.3).
314
+ *
315
+ * **The four `categories` are gone**, with `defaultExpanded` (D-11: on Puck
316
+ * `0.20.2` `defaultExpanded: true` is indistinguishable from omitting the
317
+ * field, so deleting it is behaviour-preserving). Sections are declared by the
318
+ * modules whose blocks occupy them — `content`, `layout`, `embeds` and the
319
+ * hidden `internal` by `transactional_emails`, `order` by `orders`, and
320
+ * `content` jointly by `catalog` — and served merged by
321
+ * `GET /api/v1/admin/cms/page-builder/config`.
322
+ *
323
+ * **`emailContexts` is gone too** (D-10). It wrote `['email', 'newsletter']`
324
+ * onto every entry, which is what diverged from the declarations: no block in
325
+ * this repository declares `newsletter`, that member of `PageBuilderContext`
326
+ * has never had a block of its own, and the newsletter palette **is** the
327
+ * e-mail palette. The relation that makes it so — `email` admits into
328
+ * `newsletter` — is `contextAdmits` in `@endora-commerce/page-builder-core`,
329
+ * one implementation, imported by every reader. Widening the declarations
330
+ * instead buys no behaviour and leaves two mechanisms answering one question.
331
+ */
332
+ export declare const defaultEmailBuilderConfig: Config;
333
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.tsx"],"names":[],"mappings":"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"}