@endora-commerce/cms-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.
- package/LICENSE +21 -0
- package/README.md +59 -0
- package/dist/cms-components.css +2 -0
- package/dist/components/Accordion.d.ts +43 -0
- package/dist/components/Accordion.d.ts.map +1 -0
- package/dist/components/Accordion.js +81 -0
- package/dist/components/Accordion.js.map +1 -0
- package/dist/components/AnnouncementBar.d.ts +43 -0
- package/dist/components/AnnouncementBar.d.ts.map +1 -0
- package/dist/components/AnnouncementBar.js +27 -0
- package/dist/components/AnnouncementBar.js.map +1 -0
- package/dist/components/Button.d.ts +43 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Button.js +122 -0
- package/dist/components/Button.js.map +1 -0
- package/dist/components/CategoryGrid.d.ts +43 -0
- package/dist/components/CategoryGrid.d.ts.map +1 -0
- package/dist/components/CategoryGrid.js +117 -0
- package/dist/components/CategoryGrid.js.map +1 -0
- package/dist/components/CategoryList.d.ts +43 -0
- package/dist/components/CategoryList.d.ts.map +1 -0
- package/dist/components/CategoryList.js +96 -0
- package/dist/components/CategoryList.js.map +1 -0
- package/dist/components/CmsPageContainer.d.ts +12 -0
- package/dist/components/CmsPageContainer.d.ts.map +1 -0
- package/dist/components/CmsPageContainer.js +19 -0
- package/dist/components/CmsPageContainer.js.map +1 -0
- package/dist/components/CmsProductCard.d.ts +35 -0
- package/dist/components/CmsProductCard.d.ts.map +1 -0
- package/dist/components/CmsProductCard.js +101 -0
- package/dist/components/CmsProductCard.js.map +1 -0
- package/dist/components/Column.d.ts +50 -0
- package/dist/components/Column.d.ts.map +1 -0
- package/dist/components/Column.js +127 -0
- package/dist/components/Column.js.map +1 -0
- package/dist/components/ContactFormEmbed.d.ts +43 -0
- package/dist/components/ContactFormEmbed.d.ts.map +1 -0
- package/dist/components/ContactFormEmbed.js +37 -0
- package/dist/components/ContactFormEmbed.js.map +1 -0
- package/dist/components/ContentSlider.d.ts +43 -0
- package/dist/components/ContentSlider.d.ts.map +1 -0
- package/dist/components/ContentSlider.js +96 -0
- package/dist/components/ContentSlider.js.map +1 -0
- package/dist/components/FeatureList.d.ts +43 -0
- package/dist/components/FeatureList.d.ts.map +1 -0
- package/dist/components/FeatureList.js +89 -0
- package/dist/components/FeatureList.js.map +1 -0
- package/dist/components/Heading.d.ts +43 -0
- package/dist/components/Heading.d.ts.map +1 -0
- package/dist/components/Heading.js +116 -0
- package/dist/components/Heading.js.map +1 -0
- package/dist/components/Hero.d.ts +43 -0
- package/dist/components/Hero.d.ts.map +1 -0
- package/dist/components/Hero.js +186 -0
- package/dist/components/Hero.js.map +1 -0
- package/dist/components/IconPickerField.d.ts +3 -0
- package/dist/components/IconPickerField.d.ts.map +1 -0
- package/dist/components/IconPickerField.js +30 -0
- package/dist/components/IconPickerField.js.map +1 -0
- package/dist/components/Icons.d.ts +43 -0
- package/dist/components/Icons.d.ts.map +1 -0
- package/dist/components/Icons.js +62 -0
- package/dist/components/Icons.js.map +1 -0
- package/dist/components/Image.d.ts +43 -0
- package/dist/components/Image.d.ts.map +1 -0
- package/dist/components/Image.js +179 -0
- package/dist/components/Image.js.map +1 -0
- package/dist/components/ImageSlider.d.ts +44 -0
- package/dist/components/ImageSlider.d.ts.map +1 -0
- package/dist/components/ImageSlider.js +186 -0
- package/dist/components/ImageSlider.js.map +1 -0
- package/dist/components/InsertBlock.d.ts +4 -0
- package/dist/components/InsertBlock.d.ts.map +1 -0
- package/dist/components/InsertBlock.js +30 -0
- package/dist/components/InsertBlock.js.map +1 -0
- package/dist/components/InsertTemplate.d.ts +4 -0
- package/dist/components/InsertTemplate.d.ts.map +1 -0
- package/dist/components/InsertTemplate.js +30 -0
- package/dist/components/InsertTemplate.js.map +1 -0
- package/dist/components/LogoStrip.d.ts +43 -0
- package/dist/components/LogoStrip.d.ts.map +1 -0
- package/dist/components/LogoStrip.js +155 -0
- package/dist/components/LogoStrip.js.map +1 -0
- package/dist/components/Map.d.ts +43 -0
- package/dist/components/Map.d.ts.map +1 -0
- package/dist/components/Map.js +165 -0
- package/dist/components/Map.js.map +1 -0
- package/dist/components/MissingComponentPlaceholder.d.ts +27 -0
- package/dist/components/MissingComponentPlaceholder.d.ts.map +1 -0
- package/dist/components/MissingComponentPlaceholder.js +24 -0
- package/dist/components/MissingComponentPlaceholder.js.map +1 -0
- package/dist/components/NewsletterSignup.d.ts +43 -0
- package/dist/components/NewsletterSignup.d.ts.map +1 -0
- package/dist/components/NewsletterSignup.js +43 -0
- package/dist/components/NewsletterSignup.js.map +1 -0
- package/dist/components/ProductCard.d.ts +43 -0
- package/dist/components/ProductCard.d.ts.map +1 -0
- package/dist/components/ProductCard.js +96 -0
- package/dist/components/ProductCard.js.map +1 -0
- package/dist/components/ProductGrid.d.ts +43 -0
- package/dist/components/ProductGrid.d.ts.map +1 -0
- package/dist/components/ProductGrid.js +138 -0
- package/dist/components/ProductGrid.js.map +1 -0
- package/dist/components/ProductSlider.d.ts +43 -0
- package/dist/components/ProductSlider.d.ts.map +1 -0
- package/dist/components/ProductSlider.js +134 -0
- package/dist/components/ProductSlider.js.map +1 -0
- package/dist/components/RawHtml.d.ts +43 -0
- package/dist/components/RawHtml.d.ts.map +1 -0
- package/dist/components/RawHtml.js +38 -0
- package/dist/components/RawHtml.js.map +1 -0
- package/dist/components/RawJs.d.ts +43 -0
- package/dist/components/RawJs.d.ts.map +1 -0
- package/dist/components/RawJs.js +53 -0
- package/dist/components/RawJs.js.map +1 -0
- package/dist/components/RichContent.d.ts +4 -0
- package/dist/components/RichContent.d.ts.map +1 -0
- package/dist/components/RichContent.js +48 -0
- package/dist/components/RichContent.js.map +1 -0
- package/dist/components/RichContentEditorField.d.ts +10 -0
- package/dist/components/RichContentEditorField.d.ts.map +1 -0
- package/dist/components/RichContentEditorField.js +130 -0
- package/dist/components/RichContentEditorField.js.map +1 -0
- package/dist/components/RichContentPublished.d.ts +5 -0
- package/dist/components/RichContentPublished.d.ts.map +1 -0
- package/dist/components/RichContentPublished.js +22 -0
- package/dist/components/RichContentPublished.js.map +1 -0
- package/dist/components/Row.d.ts +43 -0
- package/dist/components/Row.d.ts.map +1 -0
- package/dist/components/Row.js +305 -0
- package/dist/components/Row.js.map +1 -0
- package/dist/components/SimpleTable.d.ts +43 -0
- package/dist/components/SimpleTable.d.ts.map +1 -0
- package/dist/components/SimpleTable.js +155 -0
- package/dist/components/SimpleTable.js.map +1 -0
- package/dist/components/Slide.d.ts +44 -0
- package/dist/components/Slide.d.ts.map +1 -0
- package/dist/components/Slide.js +36 -0
- package/dist/components/Slide.js.map +1 -0
- package/dist/components/Social.d.ts +43 -0
- package/dist/components/Social.d.ts.map +1 -0
- package/dist/components/Social.js +110 -0
- package/dist/components/Social.js.map +1 -0
- package/dist/components/Spacer.d.ts +43 -0
- package/dist/components/Spacer.d.ts.map +1 -0
- package/dist/components/Spacer.js +48 -0
- package/dist/components/Spacer.js.map +1 -0
- package/dist/components/Stats.d.ts +43 -0
- package/dist/components/Stats.d.ts.map +1 -0
- package/dist/components/Stats.js +71 -0
- package/dist/components/Stats.js.map +1 -0
- package/dist/components/Tabs.d.ts +43 -0
- package/dist/components/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs.js +70 -0
- package/dist/components/Tabs.js.map +1 -0
- package/dist/components/Testimonial.d.ts +43 -0
- package/dist/components/Testimonial.d.ts.map +1 -0
- package/dist/components/Testimonial.js +74 -0
- package/dist/components/Testimonial.js.map +1 -0
- package/dist/components/Text.d.ts +43 -0
- package/dist/components/Text.d.ts.map +1 -0
- package/dist/components/Text.js +87 -0
- package/dist/components/Text.js.map +1 -0
- package/dist/components/Video.d.ts +43 -0
- package/dist/components/Video.d.ts.map +1 -0
- package/dist/components/Video.js +98 -0
- package/dist/components/Video.js.map +1 -0
- package/dist/components/box-styles.d.ts +19 -0
- package/dist/components/box-styles.d.ts.map +1 -0
- package/dist/components/box-styles.js +66 -0
- package/dist/components/box-styles.js.map +1 -0
- package/dist/components/button-link.d.ts +7 -0
- package/dist/components/button-link.d.ts.map +1 -0
- package/dist/components/button-link.js +15 -0
- package/dist/components/button-link.js.map +1 -0
- package/dist/components/carousel/CarouselShell.d.ts +27 -0
- package/dist/components/carousel/CarouselShell.d.ts.map +1 -0
- package/dist/components/carousel/CarouselShell.js +210 -0
- package/dist/components/carousel/CarouselShell.js.map +1 -0
- package/dist/components/catalog/CatalogSkeletons.d.ts +27 -0
- package/dist/components/catalog/CatalogSkeletons.d.ts.map +1 -0
- package/dist/components/catalog/CatalogSkeletons.js +38 -0
- package/dist/components/catalog/CatalogSkeletons.js.map +1 -0
- package/dist/components/catalog-preview-context.d.ts +9 -0
- package/dist/components/catalog-preview-context.d.ts.map +1 -0
- package/dist/components/catalog-preview-context.js +18 -0
- package/dist/components/catalog-preview-context.js.map +1 -0
- package/dist/components/icon-catalog.d.ts +139 -0
- package/dist/components/icon-catalog.d.ts.map +1 -0
- package/dist/components/icon-catalog.js +148 -0
- package/dist/components/icon-catalog.js.map +1 -0
- package/dist/components/image-fields.d.ts +6 -0
- package/dist/components/image-fields.d.ts.map +1 -0
- package/dist/components/image-fields.js +11 -0
- package/dist/components/image-fields.js.map +1 -0
- package/dist/components/image-slider-item.d.ts +7 -0
- package/dist/components/image-slider-item.d.ts.map +1 -0
- package/dist/components/image-slider-item.js +45 -0
- package/dist/components/image-slider-item.js.map +1 -0
- package/dist/components/render-context.d.ts +29 -0
- package/dist/components/render-context.d.ts.map +1 -0
- package/dist/components/render-context.js +21 -0
- package/dist/components/render-context.js.map +1 -0
- package/dist/components/rich-content-shared.d.ts +11 -0
- package/dist/components/rich-content-shared.d.ts.map +1 -0
- package/dist/components/rich-content-shared.js +132 -0
- package/dist/components/rich-content-shared.js.map +1 -0
- package/dist/components/social-networks.d.ts +10 -0
- package/dist/components/social-networks.d.ts.map +1 -0
- package/dist/components/social-networks.js +43 -0
- package/dist/components/social-networks.js.map +1 -0
- package/dist/components/styles.d.ts +2 -0
- package/dist/components/styles.d.ts.map +1 -0
- package/dist/components/styles.js +9 -0
- package/dist/components/styles.js.map +1 -0
- package/dist/components/text-content.d.ts +13 -0
- package/dist/components/text-content.d.ts.map +1 -0
- package/dist/components/text-content.js +64 -0
- package/dist/components/text-content.js.map +1 -0
- package/dist/components/typography.d.ts +26 -0
- package/dist/components/typography.d.ts.map +1 -0
- package/dist/components/typography.js +52 -0
- package/dist/components/typography.js.map +1 -0
- package/dist/editor/row-layout-presets.d.ts +34 -0
- package/dist/editor/row-layout-presets.d.ts.map +1 -0
- package/dist/editor/row-layout-presets.js +175 -0
- package/dist/editor/row-layout-presets.js.map +1 -0
- package/dist/editor/slot-edit-props.d.ts +16 -0
- package/dist/editor/slot-edit-props.d.ts.map +1 -0
- package/dist/editor/slot-edit-props.js +25 -0
- package/dist/editor/slot-edit-props.js.map +1 -0
- package/dist/fields/catalog-data-fields.d.ts +7 -0
- package/dist/fields/catalog-data-fields.d.ts.map +1 -0
- package/dist/fields/catalog-data-fields.js +4 -0
- package/dist/fields/catalog-data-fields.js.map +1 -0
- package/dist/fields/catalog-fallback-fields.d.ts +4 -0
- package/dist/fields/catalog-fallback-fields.d.ts.map +1 -0
- package/dist/fields/catalog-fallback-fields.js +34 -0
- package/dist/fields/catalog-fallback-fields.js.map +1 -0
- package/dist/fields/catalog-resolve-fields.d.ts +5 -0
- package/dist/fields/catalog-resolve-fields.d.ts.map +1 -0
- package/dist/fields/catalog-resolve-fields.js +40 -0
- package/dist/fields/catalog-resolve-fields.js.map +1 -0
- package/dist/fields/shared-fields.d.ts +176 -0
- package/dist/fields/shared-fields.d.ts.map +1 -0
- package/dist/fields/shared-fields.js +142 -0
- package/dist/fields/shared-fields.js.map +1 -0
- package/dist/hooks/use-viewport-breakpoint-tier.d.ts +4 -0
- package/dist/hooks/use-viewport-breakpoint-tier.d.ts.map +1 -0
- package/dist/hooks/use-viewport-breakpoint-tier.js +21 -0
- package/dist/hooks/use-viewport-breakpoint-tier.js.map +1 -0
- package/dist/index.d.ts +127 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +377 -0
- package/dist/index.js.map +1 -0
- package/dist/schema/catalog-types.d.ts +22 -0
- package/dist/schema/catalog-types.d.ts.map +1 -0
- package/dist/schema/catalog-types.js +2 -0
- package/dist/schema/catalog-types.js.map +1 -0
- package/dist/schema/component-types.d.ts +419 -0
- package/dist/schema/component-types.d.ts.map +1 -0
- package/dist/schema/component-types.js +2 -0
- package/dist/schema/component-types.js.map +1 -0
- package/dist/schema/envelope.d.ts +21 -0
- package/dist/schema/envelope.d.ts.map +1 -0
- package/dist/schema/envelope.js +19 -0
- package/dist/schema/envelope.js.map +1 -0
- package/dist/utils/catalog-fetch.d.ts +29 -0
- package/dist/utils/catalog-fetch.d.ts.map +1 -0
- package/dist/utils/catalog-fetch.js +88 -0
- package/dist/utils/catalog-fetch.js.map +1 -0
- package/dist/utils/catalog-load.d.ts +4 -0
- package/dist/utils/catalog-load.d.ts.map +1 -0
- package/dist/utils/catalog-load.js +11 -0
- package/dist/utils/catalog-load.js.map +1 -0
- package/dist/utils/catalog-preview-bridge.d.ts +13 -0
- package/dist/utils/catalog-preview-bridge.d.ts.map +1 -0
- package/dist/utils/catalog-preview-bridge.js +8 -0
- package/dist/utils/catalog-preview-bridge.js.map +1 -0
- package/dist/utils/catalog-skeleton-estimate.d.ts +7 -0
- package/dist/utils/catalog-skeleton-estimate.d.ts.map +1 -0
- package/dist/utils/catalog-skeleton-estimate.js +42 -0
- package/dist/utils/catalog-skeleton-estimate.js.map +1 -0
- package/dist/utils/resolve-image-url.d.ts +20 -0
- package/dist/utils/resolve-image-url.d.ts.map +1 -0
- package/dist/utils/resolve-image-url.js +24 -0
- package/dist/utils/resolve-image-url.js.map +1 -0
- package/dist/utils/sanitize-html.d.ts +6 -0
- package/dist/utils/sanitize-html.d.ts.map +1 -0
- package/dist/utils/sanitize-html.js +81 -0
- package/dist/utils/sanitize-html.js.map +1 -0
- package/dist/utils/video-embed.d.ts +11 -0
- package/dist/utils/video-embed.d.ts.map +1 -0
- package/dist/utils/video-embed.js +61 -0
- package/dist/utils/video-embed.js.map +1 -0
- package/dist/utils/walk-asset-ids.d.ts +3 -0
- package/dist/utils/walk-asset-ids.d.ts.map +1 -0
- package/dist/utils/walk-asset-ids.js +23 -0
- package/dist/utils/walk-asset-ids.js.map +1 -0
- package/package.json +117 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
export declare const BOX_MARGIN_FIELD: import("@measured/puck").Field<import("@endora-commerce/page-builder-core").SpacingValue | import("@endora-commerce/page-builder-core").ResponsiveProp<import("@endora-commerce/page-builder-core").SpacingValue> | undefined, Record<string, unknown>>;
|
|
2
|
+
export declare const BOX_PADDING_FIELD: import("@measured/puck").Field<import("@endora-commerce/page-builder-core").SpacingValue | import("@endora-commerce/page-builder-core").ResponsiveProp<import("@endora-commerce/page-builder-core").SpacingValue> | undefined, Record<string, unknown>>;
|
|
3
|
+
export declare const BOX_BORDER_FIELD: import("@measured/puck").Field<import("@endora-commerce/page-builder-core").BorderValue | import("@endora-commerce/page-builder-core").ResponsiveProp<import("@endora-commerce/page-builder-core").BorderValue> | undefined, Record<string, unknown>>;
|
|
4
|
+
export declare const BACKGROUND_FIELD: import("@measured/puck").Field<import("@endora-commerce/page-builder-core").BackgroundProp>;
|
|
5
|
+
export declare const TEXT_COLOR_FIELD: import("@measured/puck").CustomField<string | undefined>;
|
|
6
|
+
export declare const CORNER_RADIUS_FIELD: {
|
|
7
|
+
type: "select";
|
|
8
|
+
label: string;
|
|
9
|
+
options: {
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
export declare const SHADOW_FIELD: {
|
|
15
|
+
type: "select";
|
|
16
|
+
label: string;
|
|
17
|
+
options: {
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}[];
|
|
21
|
+
};
|
|
22
|
+
export declare const DEFAULT_CONTENT_MARGIN: {
|
|
23
|
+
mode: "sides";
|
|
24
|
+
top: number;
|
|
25
|
+
right: number;
|
|
26
|
+
bottom: number;
|
|
27
|
+
left: number;
|
|
28
|
+
};
|
|
29
|
+
export declare const DEFAULT_LAYOUT_PADDING: {
|
|
30
|
+
mode: "uniform";
|
|
31
|
+
value: number;
|
|
32
|
+
};
|
|
33
|
+
export declare const DEFAULT_LAYOUT_BOX_PROPS: {
|
|
34
|
+
margin: import("@endora-commerce/page-builder-core").SpacingValue;
|
|
35
|
+
padding: {
|
|
36
|
+
mode: "uniform";
|
|
37
|
+
value: number;
|
|
38
|
+
};
|
|
39
|
+
border: import("@endora-commerce/page-builder-core").BorderValue;
|
|
40
|
+
background: {
|
|
41
|
+
kind: "none";
|
|
42
|
+
};
|
|
43
|
+
cornerRadius: "none";
|
|
44
|
+
shadow: "none";
|
|
45
|
+
};
|
|
46
|
+
export declare const DEFAULT_BOX_PROPS: {
|
|
47
|
+
margin: {
|
|
48
|
+
mode: "sides";
|
|
49
|
+
top: number;
|
|
50
|
+
right: number;
|
|
51
|
+
bottom: number;
|
|
52
|
+
left: number;
|
|
53
|
+
};
|
|
54
|
+
padding: import("@endora-commerce/page-builder-core").SpacingValue;
|
|
55
|
+
border: import("@endora-commerce/page-builder-core").BorderValue;
|
|
56
|
+
background: {
|
|
57
|
+
kind: "none";
|
|
58
|
+
};
|
|
59
|
+
cornerRadius: "none";
|
|
60
|
+
shadow: "none";
|
|
61
|
+
};
|
|
62
|
+
export declare const RESPONSIVE_GAP_FIELD: {
|
|
63
|
+
type: "number";
|
|
64
|
+
label: string;
|
|
65
|
+
min: number;
|
|
66
|
+
max: number;
|
|
67
|
+
step: number;
|
|
68
|
+
metadata: {
|
|
69
|
+
pageBuilder: {
|
|
70
|
+
responsive: true;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export declare const RESPONSIVE_MIN_HEIGHT_FIELD: {
|
|
75
|
+
type: "number";
|
|
76
|
+
label: string;
|
|
77
|
+
min: number;
|
|
78
|
+
max: number;
|
|
79
|
+
step: number;
|
|
80
|
+
metadata: {
|
|
81
|
+
pageBuilder: {
|
|
82
|
+
responsive: true;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
export declare const COLUMN_COUNT_OPTIONS: {
|
|
87
|
+
label: string;
|
|
88
|
+
value: number;
|
|
89
|
+
}[];
|
|
90
|
+
export declare const RESPONSIVE_COLUMNS_FIELD: {
|
|
91
|
+
type: "select";
|
|
92
|
+
label: string;
|
|
93
|
+
metadata: {
|
|
94
|
+
pageBuilder: {
|
|
95
|
+
responsive: true;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
options: {
|
|
99
|
+
label: string;
|
|
100
|
+
value: number;
|
|
101
|
+
}[];
|
|
102
|
+
};
|
|
103
|
+
export declare const TEXT_TYPOGRAPHY_FIELDS: {
|
|
104
|
+
fontFamily: {
|
|
105
|
+
type: "select";
|
|
106
|
+
label: string;
|
|
107
|
+
options: {
|
|
108
|
+
label: string;
|
|
109
|
+
value: string;
|
|
110
|
+
}[];
|
|
111
|
+
};
|
|
112
|
+
fontStyle: {
|
|
113
|
+
type: "select";
|
|
114
|
+
label: string;
|
|
115
|
+
options: {
|
|
116
|
+
label: string;
|
|
117
|
+
value: string;
|
|
118
|
+
}[];
|
|
119
|
+
};
|
|
120
|
+
color: import("@measured/puck").CustomField<string | undefined>;
|
|
121
|
+
fontSize: {
|
|
122
|
+
type: "number";
|
|
123
|
+
label: string;
|
|
124
|
+
min: number;
|
|
125
|
+
max: number;
|
|
126
|
+
step: number;
|
|
127
|
+
metadata: {
|
|
128
|
+
pageBuilder: {
|
|
129
|
+
responsive: true;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
fontWeight: {
|
|
134
|
+
type: "select";
|
|
135
|
+
label: string;
|
|
136
|
+
metadata: {
|
|
137
|
+
pageBuilder: {
|
|
138
|
+
responsive: true;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
options: {
|
|
142
|
+
label: string;
|
|
143
|
+
value: number;
|
|
144
|
+
}[];
|
|
145
|
+
};
|
|
146
|
+
textAlign: {
|
|
147
|
+
type: "select";
|
|
148
|
+
label: string;
|
|
149
|
+
metadata: {
|
|
150
|
+
pageBuilder: {
|
|
151
|
+
responsive: true;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
options: {
|
|
155
|
+
label: string;
|
|
156
|
+
value: string;
|
|
157
|
+
}[];
|
|
158
|
+
};
|
|
159
|
+
lineHeight: {
|
|
160
|
+
type: "number";
|
|
161
|
+
label: string;
|
|
162
|
+
min: number;
|
|
163
|
+
max: number;
|
|
164
|
+
step: number;
|
|
165
|
+
metadata: {
|
|
166
|
+
pageBuilder: {
|
|
167
|
+
responsive: true;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
export declare const COLUMN_SPAN_OPTIONS: {
|
|
173
|
+
label: string;
|
|
174
|
+
value: number;
|
|
175
|
+
}[];
|
|
176
|
+
//# sourceMappingURL=shared-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-fields.d.ts","sourceRoot":"","sources":["../../src/fields/shared-fields.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB,yPAAiD,CAAC;AAC/E,eAAO,MAAM,iBAAiB,yPAAiD,CAAC;AAChF,eAAO,MAAM,gBAAgB,uPAAsB,CAAC;AACpD,eAAO,MAAM,gBAAgB,6FAAiD,CAAC;AAC/E,eAAO,MAAM,gBAAgB,0DAAuC,CAAC;AAErE,eAAO,MAAM,mBAAmB;;;;;;;CAS/B,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;CAQxB,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;CAMlC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;CAGlC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;CAOpC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;CAO7B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;CAOhC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;CAOvC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;GAG/B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;CAKpC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DlC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;GAG9B,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { createBorderField, createBackgroundField, createColorField, createSpacingField, DEFAULT_BORDER, DEFAULT_SPACING, PB_RESPONSIVE_METADATA, } from '@endora-commerce/page-builder-core';
|
|
2
|
+
export const BOX_MARGIN_FIELD = createSpacingField({ label: 'Outer spacing' });
|
|
3
|
+
export const BOX_PADDING_FIELD = createSpacingField({ label: 'Inner spacing' });
|
|
4
|
+
export const BOX_BORDER_FIELD = createBorderField();
|
|
5
|
+
export const BACKGROUND_FIELD = createBackgroundField({ label: 'Background' });
|
|
6
|
+
export const TEXT_COLOR_FIELD = createColorField({ label: 'Color' });
|
|
7
|
+
export const CORNER_RADIUS_FIELD = {
|
|
8
|
+
type: 'select',
|
|
9
|
+
label: 'Rounded corners',
|
|
10
|
+
options: [
|
|
11
|
+
{ label: 'None', value: 'none' },
|
|
12
|
+
{ label: 'Small', value: 'small' },
|
|
13
|
+
{ label: 'Medium', value: 'medium' },
|
|
14
|
+
{ label: 'Large', value: 'large' },
|
|
15
|
+
],
|
|
16
|
+
};
|
|
17
|
+
export const SHADOW_FIELD = {
|
|
18
|
+
type: 'select',
|
|
19
|
+
label: 'Shadow',
|
|
20
|
+
options: [
|
|
21
|
+
{ label: 'None', value: 'none' },
|
|
22
|
+
{ label: 'Soft', value: 'soft' },
|
|
23
|
+
{ label: 'Medium', value: 'medium' },
|
|
24
|
+
],
|
|
25
|
+
};
|
|
26
|
+
export const DEFAULT_CONTENT_MARGIN = {
|
|
27
|
+
mode: 'sides',
|
|
28
|
+
top: 0,
|
|
29
|
+
right: 0,
|
|
30
|
+
bottom: 24,
|
|
31
|
+
left: 0,
|
|
32
|
+
};
|
|
33
|
+
export const DEFAULT_LAYOUT_PADDING = {
|
|
34
|
+
mode: 'uniform',
|
|
35
|
+
value: 16,
|
|
36
|
+
};
|
|
37
|
+
export const DEFAULT_LAYOUT_BOX_PROPS = {
|
|
38
|
+
margin: DEFAULT_SPACING,
|
|
39
|
+
padding: DEFAULT_LAYOUT_PADDING,
|
|
40
|
+
border: DEFAULT_BORDER,
|
|
41
|
+
background: { kind: 'none' },
|
|
42
|
+
cornerRadius: 'none',
|
|
43
|
+
shadow: 'none',
|
|
44
|
+
};
|
|
45
|
+
export const DEFAULT_BOX_PROPS = {
|
|
46
|
+
margin: DEFAULT_CONTENT_MARGIN,
|
|
47
|
+
padding: DEFAULT_SPACING,
|
|
48
|
+
border: DEFAULT_BORDER,
|
|
49
|
+
background: { kind: 'none' },
|
|
50
|
+
cornerRadius: 'none',
|
|
51
|
+
shadow: 'none',
|
|
52
|
+
};
|
|
53
|
+
export const RESPONSIVE_GAP_FIELD = {
|
|
54
|
+
type: 'number',
|
|
55
|
+
label: 'Space between blocks',
|
|
56
|
+
min: 0,
|
|
57
|
+
max: 96,
|
|
58
|
+
step: 4,
|
|
59
|
+
metadata: PB_RESPONSIVE_METADATA,
|
|
60
|
+
};
|
|
61
|
+
export const RESPONSIVE_MIN_HEIGHT_FIELD = {
|
|
62
|
+
type: 'number',
|
|
63
|
+
label: 'Minimum height',
|
|
64
|
+
min: 0,
|
|
65
|
+
max: 800,
|
|
66
|
+
step: 8,
|
|
67
|
+
metadata: PB_RESPONSIVE_METADATA,
|
|
68
|
+
};
|
|
69
|
+
export const COLUMN_COUNT_OPTIONS = Array.from({ length: 12 }, (_, index) => {
|
|
70
|
+
const n = index + 1;
|
|
71
|
+
return { label: n === 1 ? '1 column' : `${n} columns`, value: n };
|
|
72
|
+
});
|
|
73
|
+
export const RESPONSIVE_COLUMNS_FIELD = {
|
|
74
|
+
type: 'select',
|
|
75
|
+
label: 'Columns',
|
|
76
|
+
metadata: PB_RESPONSIVE_METADATA,
|
|
77
|
+
options: COLUMN_COUNT_OPTIONS,
|
|
78
|
+
};
|
|
79
|
+
export const TEXT_TYPOGRAPHY_FIELDS = {
|
|
80
|
+
fontFamily: {
|
|
81
|
+
type: 'select',
|
|
82
|
+
label: 'Font',
|
|
83
|
+
options: [
|
|
84
|
+
{ label: 'Sans-serif', value: 'sans' },
|
|
85
|
+
{ label: 'Serif', value: 'serif' },
|
|
86
|
+
{ label: 'Monospace', value: 'mono' },
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
fontStyle: {
|
|
90
|
+
type: 'select',
|
|
91
|
+
label: 'Style',
|
|
92
|
+
options: [
|
|
93
|
+
{ label: 'Normal', value: 'normal' },
|
|
94
|
+
{ label: 'Italic', value: 'italic' },
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
color: TEXT_COLOR_FIELD,
|
|
98
|
+
fontSize: {
|
|
99
|
+
type: 'number',
|
|
100
|
+
label: 'Font size',
|
|
101
|
+
min: 10,
|
|
102
|
+
max: 96,
|
|
103
|
+
step: 1,
|
|
104
|
+
metadata: PB_RESPONSIVE_METADATA,
|
|
105
|
+
},
|
|
106
|
+
fontWeight: {
|
|
107
|
+
type: 'select',
|
|
108
|
+
label: 'Font weight',
|
|
109
|
+
metadata: PB_RESPONSIVE_METADATA,
|
|
110
|
+
options: [
|
|
111
|
+
{ label: 'Light (300)', value: 300 },
|
|
112
|
+
{ label: 'Regular (400)', value: 400 },
|
|
113
|
+
{ label: 'Medium (500)', value: 500 },
|
|
114
|
+
{ label: 'Semibold (600)', value: 600 },
|
|
115
|
+
{ label: 'Bold (700)', value: 700 },
|
|
116
|
+
{ label: 'Extra bold (800)', value: 800 },
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
textAlign: {
|
|
120
|
+
type: 'select',
|
|
121
|
+
label: 'Align',
|
|
122
|
+
metadata: PB_RESPONSIVE_METADATA,
|
|
123
|
+
options: [
|
|
124
|
+
{ label: 'Left', value: 'left' },
|
|
125
|
+
{ label: 'Center', value: 'center' },
|
|
126
|
+
{ label: 'Right', value: 'right' },
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
lineHeight: {
|
|
130
|
+
type: 'number',
|
|
131
|
+
label: 'Line height',
|
|
132
|
+
min: 1,
|
|
133
|
+
max: 2.5,
|
|
134
|
+
step: 0.05,
|
|
135
|
+
metadata: PB_RESPONSIVE_METADATA,
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
export const COLUMN_SPAN_OPTIONS = Array.from({ length: 12 }, (_, index) => {
|
|
139
|
+
const n = index + 1;
|
|
140
|
+
return { label: n === 12 ? '12/12 (full)' : `${n}/12`, value: n };
|
|
141
|
+
});
|
|
142
|
+
//# sourceMappingURL=shared-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-fields.js","sourceRoot":"","sources":["../../src/fields/shared-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAE5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;AAChF,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,EAAE,CAAC;AACpD,MAAM,CAAC,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,EAAE,KAAK,EAAE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Q,EAAE,sBAAsB;QAChC,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;YAChC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;YACpC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;SACnC;KACF;IACD,UAAU,EAAE;QACV,IAAI,EAAE,QAAiB;QACvB,KAAK,EAAE,aAAa;QACpB,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,GAAG;QACR,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,sBAAsB;KACjC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;IACzE,MAAM,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;IACpB,OAAO,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AACpE,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type BreakpointTier } from '@endora-commerce/page-builder-core';
|
|
2
|
+
/** Breakpoint tier from the browser viewport — safe outside Puck `<Puck>` (storefront Render). */
|
|
3
|
+
export declare function useViewportBreakpointTier(): BreakpointTier;
|
|
4
|
+
//# sourceMappingURL=use-viewport-breakpoint-tier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-viewport-breakpoint-tier.d.ts","sourceRoot":"","sources":["../../src/hooks/use-viewport-breakpoint-tier.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAgBhG,kGAAkG;AAClG,wBAAgB,yBAAyB,IAAI,cAAc,CAG1D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useSyncExternalStore } from 'react';
|
|
3
|
+
import { tierFromViewportWidth } from '@endora-commerce/page-builder-core';
|
|
4
|
+
function subscribe(onStoreChange) {
|
|
5
|
+
if (typeof window === 'undefined')
|
|
6
|
+
return () => undefined;
|
|
7
|
+
window.addEventListener('resize', onStoreChange);
|
|
8
|
+
return () => window.removeEventListener('resize', onStoreChange);
|
|
9
|
+
}
|
|
10
|
+
function getSnapshot() {
|
|
11
|
+
return typeof window !== 'undefined' ? window.innerWidth : 360;
|
|
12
|
+
}
|
|
13
|
+
function getServerSnapshot() {
|
|
14
|
+
return 360;
|
|
15
|
+
}
|
|
16
|
+
/** Breakpoint tier from the browser viewport — safe outside Puck `<Puck>` (storefront Render). */
|
|
17
|
+
export function useViewportBreakpointTier() {
|
|
18
|
+
const width = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
19
|
+
return tierFromViewportWidth(width);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=use-viewport-breakpoint-tier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-viewport-breakpoint-tier.js","sourceRoot":"","sources":["../../src/hooks/use-viewport-breakpoint-tier.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAuB,MAAM,oCAAoC,CAAC;AAEhG,SAAS,SAAS,CAAC,aAAyB;IAC1C,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC;IAC1D,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IACjD,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,WAAW;IAClB,OAAO,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC;AACjE,CAAC;AAED,SAAS,iBAAiB;IACxB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,yBAAyB;IACvC,MAAM,KAAK,GAAG,oBAAoB,CAAC,SAAS,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAC;IAC9E,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;AACtC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type { ComponentConfig, Config } from '@measured/puck';
|
|
2
|
+
export * from './components/Accordion.js';
|
|
3
|
+
export * from './components/AnnouncementBar.js';
|
|
4
|
+
export * from './components/Button.js';
|
|
5
|
+
export * from './components/CategoryGrid.js';
|
|
6
|
+
export * from './components/CategoryList.js';
|
|
7
|
+
export * from './components/Column.js';
|
|
8
|
+
export * from './components/ContactFormEmbed.js';
|
|
9
|
+
export * from './components/ContentSlider.js';
|
|
10
|
+
export * from './components/FeatureList.js';
|
|
11
|
+
export * from './components/Heading.js';
|
|
12
|
+
export * from './components/Hero.js';
|
|
13
|
+
export * from './components/Icons.js';
|
|
14
|
+
export * from './components/icon-catalog.js';
|
|
15
|
+
export * from './components/IconPickerField.js';
|
|
16
|
+
export * from './components/Image.js';
|
|
17
|
+
export * from './components/ImageSlider.js';
|
|
18
|
+
export * from './components/InsertBlock.js';
|
|
19
|
+
export * from './components/InsertTemplate.js';
|
|
20
|
+
export * from './components/LogoStrip.js';
|
|
21
|
+
export * from './components/Map.js';
|
|
22
|
+
export * from './components/MissingComponentPlaceholder.js';
|
|
23
|
+
export * from './components/NewsletterSignup.js';
|
|
24
|
+
export * from './components/ProductCard.js';
|
|
25
|
+
export * from './components/ProductGrid.js';
|
|
26
|
+
export * from './components/ProductSlider.js';
|
|
27
|
+
export * from './components/RawHtml.js';
|
|
28
|
+
export * from './components/RawJs.js';
|
|
29
|
+
export * from './components/RichContent.js';
|
|
30
|
+
export { RichContentEditorField } from './components/RichContentEditorField.js';
|
|
31
|
+
export { coerceRichContentProps, defaultRichContent, htmlFromTiptap, richContentExtensions, sanitizeRichHtml, } from './components/rich-content-shared.js';
|
|
32
|
+
export * from './components/Row.js';
|
|
33
|
+
export * from './components/SimpleTable.js';
|
|
34
|
+
export * from './components/Slide.js';
|
|
35
|
+
export * from './components/Social.js';
|
|
36
|
+
export * from './components/social-networks.js';
|
|
37
|
+
export * from './components/Spacer.js';
|
|
38
|
+
export * from './components/Stats.js';
|
|
39
|
+
export * from './components/Tabs.js';
|
|
40
|
+
export * from './components/Testimonial.js';
|
|
41
|
+
export * from './components/Text.js';
|
|
42
|
+
export * from './components/Video.js';
|
|
43
|
+
export * from './components/CmsPageContainer.js';
|
|
44
|
+
export * from './components/render-context.js';
|
|
45
|
+
export * from './components/catalog-preview-context.js';
|
|
46
|
+
export * from './components/box-styles.js';
|
|
47
|
+
export * from './schema/component-types.js';
|
|
48
|
+
export * from './schema/catalog-types.js';
|
|
49
|
+
export * from './utils/walk-asset-ids.js';
|
|
50
|
+
/**
|
|
51
|
+
* The CMS renderer map — **the React half only**, keyed by namespaced block name
|
|
52
|
+
* (feature 096, T301; `contracts/block-definition.md` §4.3).
|
|
53
|
+
*
|
|
54
|
+
* **The `categories` block is gone and nothing in this package replaces it.**
|
|
55
|
+
* A section is declared by the module whose blocks occupy it and is served,
|
|
56
|
+
* merged across the present modules, by
|
|
57
|
+
* `GET /api/v1/admin/cms/page-builder/config` — so a module contributing a
|
|
58
|
+
* block into a section no longer has to edit a map in a package it does not
|
|
59
|
+
* own, which is FR-009 and the shape feature 091 removed from the admin. The
|
|
60
|
+
* eight CMS sections it listed are `cms`' `blockCategories`, and the five
|
|
61
|
+
* Catalog entries are `catalog`'s.
|
|
62
|
+
*
|
|
63
|
+
* `defaultExpanded` went with it and no schema field replaces it (D-11).
|
|
64
|
+
* Measured on Puck `0.20.2`: `ComponentList` reads `{ expanded = true }`, so
|
|
65
|
+
* `defaultExpanded: true` — which is what all four sections wrote — is
|
|
66
|
+
* indistinguishable from omitting the field. Deleting it is behaviour-preserving.
|
|
67
|
+
*/
|
|
68
|
+
export declare const defaultPageBuilderConfig: Config;
|
|
69
|
+
/**
|
|
70
|
+
* Builds a per-name placeholder ComponentConfig for a Page Builder
|
|
71
|
+
* component whose React renderer this bundle does not carry — because the
|
|
72
|
+
* descriptor declares a block no local renderer answers, because the owning
|
|
73
|
+
* module is switched off or not installed, or because the name is one the
|
|
74
|
+
* block-name migration did not recognise and left alone. FR-020 says those are
|
|
75
|
+
* one path, and this is it.
|
|
76
|
+
*
|
|
77
|
+
* `visible` is the surface's answer, not the placeholder's. On an editing
|
|
78
|
+
* surface an operator has to be told **why** a block vanished, so the
|
|
79
|
+
* placeholder renders its note; on a customer-facing one it renders an empty
|
|
80
|
+
* span, which is what `MissingComponentPlaceholder` decides for itself from the
|
|
81
|
+
* `?cms_admin=1` preview parameter when nothing says otherwise. Passing it
|
|
82
|
+
* explicitly is what makes the admin case work at all: nothing in this
|
|
83
|
+
* repository has ever set that query parameter, so every placeholder the editor
|
|
84
|
+
* merged before feature 096's T602 rendered as nothing — a block that has lost
|
|
85
|
+
* its module and a block that has been deleted looked identical on the canvas.
|
|
86
|
+
*/
|
|
87
|
+
export declare function makeMissingComponentConfig(componentName: string, ownerModule: string, options?: {
|
|
88
|
+
readonly visible?: boolean;
|
|
89
|
+
}): ComponentConfig;
|
|
90
|
+
/**
|
|
91
|
+
* The editor's degradation merge — feature 096, T602 (FR-019, FR-020).
|
|
92
|
+
*
|
|
93
|
+
* Give every one of `storedNames` that `config` cannot render a visible,
|
|
94
|
+
* data-preserving placeholder, and change nothing else.
|
|
95
|
+
*
|
|
96
|
+
* ## Why the stored document is a source of names at all
|
|
97
|
+
*
|
|
98
|
+
* The editor already merged a placeholder for a name the *descriptor* declares
|
|
99
|
+
* with no local renderer. That population does not contain the case
|
|
100
|
+
* Constitution XVII produces: a switched-off module's blocks are filtered out
|
|
101
|
+
* of the descriptor (FR-010), so after a deactivation the name on an operator's
|
|
102
|
+
* page is in neither the renderer map nor the descriptor and the merge saw it
|
|
103
|
+
* nowhere. The document is the one place it is still written down — which is
|
|
104
|
+
* the whole point of namespacing the persisted name in the first place.
|
|
105
|
+
*
|
|
106
|
+
* ## It takes names, not the document
|
|
107
|
+
*
|
|
108
|
+
* The caller walks the document with `countBlockNames`, which is the one
|
|
109
|
+
* structural walk this repository has. That is not ceremony: a React caller
|
|
110
|
+
* needs a **stable** memo key, and the set of names a document carries changes
|
|
111
|
+
* far less often than the document does — a keystroke inside a text block moves
|
|
112
|
+
* the document and not the names, and a merge keyed on the document would
|
|
113
|
+
* rebuild the whole Puck config on every one.
|
|
114
|
+
*
|
|
115
|
+
* ## What it deliberately does not do
|
|
116
|
+
*
|
|
117
|
+
* It adds **no category entry**. A degraded block must stay visible and
|
|
118
|
+
* editable where it already is; it is not a block anyone may insert, and the
|
|
119
|
+
* palette is the surface that answers the second question.
|
|
120
|
+
*
|
|
121
|
+
* It does not decide **presence**. Which names this config keys is the caller's
|
|
122
|
+
* answer, arrived at from the descriptor; this function only says what happens
|
|
123
|
+
* to a stored name that answer does not cover — which is why one unknown name
|
|
124
|
+
* behaves identically whatever made it unknown.
|
|
125
|
+
*/
|
|
126
|
+
export declare function withMissingBlockPlaceholders(config: Config, storedNames: Iterable<string>): Config;
|
|
127
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAuC9D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cA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