@lightspeed/crane-api 1.0.1 → 1.0.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.
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +23 -7
- package/dist/index.d.ts +23 -7
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.2 - 2025-12-11
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Add template categories support for Template Market filtering. Templates can now specify categories (e.g., vape_smoke, electronics) that will be used for filtering in Template Market.
|
|
8
|
+
|
|
3
9
|
## 1.0.1 - 2025-12-09
|
|
4
10
|
|
|
5
11
|
### Changed
|
package/dist/index.d.mts
CHANGED
|
@@ -57,10 +57,7 @@ declare function useDeckElementContent<CONTENT>(elementName: keyof CONTENT): {
|
|
|
57
57
|
};
|
|
58
58
|
declare function getReactiveRef(card: Card$1 | undefined, editorType: EditorTypes, contentElementName: string): {
|
|
59
59
|
hasContent: boolean;
|
|
60
|
-
|
|
61
|
-
highResolutionMobileImage: string;
|
|
62
|
-
lowResolutionDesktopImage: string;
|
|
63
|
-
highResolutionDesktopImage: string;
|
|
60
|
+
value: string | undefined;
|
|
64
61
|
} | {
|
|
65
62
|
title: string | undefined;
|
|
66
63
|
type: ActionLinkType | undefined;
|
|
@@ -75,7 +72,10 @@ declare function getReactiveRef(card: Card$1 | undefined, editorType: EditorType
|
|
|
75
72
|
performAction: (() => void) | undefined;
|
|
76
73
|
} | {
|
|
77
74
|
hasContent: boolean;
|
|
78
|
-
|
|
75
|
+
lowResolutionMobileImage: string;
|
|
76
|
+
highResolutionMobileImage: string;
|
|
77
|
+
lowResolutionDesktopImage: string;
|
|
78
|
+
highResolutionDesktopImage: string;
|
|
79
79
|
} | {
|
|
80
80
|
hasContent: boolean;
|
|
81
81
|
value: boolean | undefined;
|
|
@@ -508,6 +508,21 @@ interface TemplateSettings {
|
|
|
508
508
|
readonly sections: TemplateSection[];
|
|
509
509
|
}
|
|
510
510
|
|
|
511
|
+
declare const TemplateCategoriesList: {
|
|
512
|
+
readonly apparel_footwear: "apparel_footwear";
|
|
513
|
+
readonly vape_smoke: "vape_smoke";
|
|
514
|
+
readonly home_garden: "home_garden";
|
|
515
|
+
readonly sport_outdoor: "sport_outdoor";
|
|
516
|
+
readonly jewelry_accessories: "jewelry_accessories";
|
|
517
|
+
readonly pet_animals: "pet_animals";
|
|
518
|
+
readonly bikes: "bikes";
|
|
519
|
+
readonly health_beauty: "health_beauty";
|
|
520
|
+
readonly gift_shop: "gift_shop";
|
|
521
|
+
readonly electronics: "electronics";
|
|
522
|
+
readonly other: "other";
|
|
523
|
+
};
|
|
524
|
+
type TemplateCategory = typeof TemplateCategoriesList[keyof typeof TemplateCategoriesList];
|
|
525
|
+
|
|
511
526
|
interface ImageContentData {
|
|
512
527
|
readonly borderInfo?: ImageBorderInfoData;
|
|
513
528
|
readonly set: {
|
|
@@ -520,6 +535,7 @@ interface TemplateMetadata {
|
|
|
520
535
|
readonly description?: string;
|
|
521
536
|
readonly preview_url?: string;
|
|
522
537
|
readonly cover_image?: ImageContentData;
|
|
538
|
+
readonly categories?: TemplateCategory[];
|
|
523
539
|
}
|
|
524
540
|
|
|
525
541
|
interface InputboxContentEditor {
|
|
@@ -1203,5 +1219,5 @@ declare const ProductLayoutSlot: {
|
|
|
1203
1219
|
readonly CUSTOM_SLOT: "CUSTOM_SLOT";
|
|
1204
1220
|
};
|
|
1205
1221
|
|
|
1206
|
-
export { ActionLinkTypeEnum, BackgroundStyleEnum, ButtonAppearanceEnum, ButtonShapeEnum, ButtonSizeEnum, ButtonTypeEnum, CatalogLayoutSlot, CategoryLayoutSlot, ConfigTypeEnum, DesignEditorType, EditorTypes, ImageSet, InstantsiteJsEvent, OverlayTypeEnum, PluginTypeEnum, ProductLayoutSlot, SectionTypeEnum, TemplatePageEnum, ValidationTypeEnum, createVueClientApp, createVueServerApp, useBackgroundElementDesign, useButtonElementContent, useButtonElementDesign, useCategorySelectorElementContent, useDeckElementContent, useImageElementContent, useImageElementDesign, useInputboxElementContent, useInstantsiteJsApi, useLayoutElementDesign, useLogoElementContent, useLogoElementDesign, useMenuElementContent, useNavigationMenuElementContent, useProductSelectorElementContent, useSelectboxElementContent, useSelectboxElementDesign, useTextElementDesign, useTextareaElementContent, useTextareaElementDesign, useToggleElementContent, useToggleElementDesign, useTranslation, useVueBaseProps };
|
|
1207
|
-
export type { ActionLink, AppBaseContext, AppBaseData, AppBaseState, Background$1 as Background, BackgroundDesignData, BackgroundDesignEditor, BackgroundDesignEditorDefaults, BackgroundDesignEditorDefaultsTransformed, BackgroundType, ButtonAppearance$1 as ButtonAppearance, ButtonContent, ButtonContentData, ButtonContentEditor, ButtonDesignData, ButtonDesignEditor, ButtonDesignEditorDefaults, ButtonDesignEditorDefaultsTransformed, ButtonSize$1 as ButtonSize, ButtonStyle$1 as ButtonStyle, CapitalizationType, Card$1 as Card, CategorySelectorContentEditor, CategorySelectorContentEditorDefaults, Color$1 as Color, ColorPickerDesignEditor, ColorPickerDesignEditorDefaults, ColorPickerDesignEditorDefaultsTransformed, ContentEditor, ContentSettings, Deck, DeckContent, DeckContentEditor, DefaultSectionId, DesignEditor, DesignEditorDefaults, DesignEditorDefaultsTransformed, DesignSettings, DividerDesignEditor, Font, Frame, GlobalColorsString$1 as GlobalColorsString, GlobalDesign$1 as GlobalDesign, GlobalFontsString, GlobalTextSizeString$1 as GlobalTextSizeString, GradientColor, HSLColor, ImageBorderInfoData, ImageContent, ImageContentData, ImageContentEditor, ImageContentEditorDefaults, ImageDesignData, ImageDesignEditor, ImageDesignEditorDefaults, ImageDesignEditorDefaultsTransformed, ImageInfoData, InputBoxContent, InputboxContentEditor, InputboxContentEditorDefaults, InstantsiteJSAPI$1 as InstantsiteJSAPI, InstantsiteTilePromise$1 as InstantsiteTilePromise, LayoutDesignData, LayoutDesignOverride, LayoutSettings, LogoContent, LogoContentData, LogoContentEditor, LogoContentEditorDefaults, LogoDesignData$1 as LogoDesignData, LogoDesignEditor, LogoDesignEditorDefaults, LogoDesignEditorDefaultsTransformed, LogoType$1 as LogoType, MandatoryContentSettings, MandatoryDesignSettings, MenuContent, MenuContentData, MenuContentEditor, NavigationMenuContentEditor, Overlay$1 as Overlay, OverlayType, ProductSelectorContentEditor, ProductSelectorContentEditorDefaults, RGBAColor, SelectBoxContent, SelectboxContentEditor, SelectboxContentOption, SelectboxDesignData, SelectboxDesignEditor, Showcase, ShowcaseOverride, SolidColor, StorePageConfiguration, StorefrontSectionId, TemplateConfiguration, TemplateConfigurationType, TemplateCustomSection, TemplateDefaultSection, TemplateMetadata, TemplateMultiPageConfiguration, TemplatePage, TemplateSection, TemplateSettings, TemplateSinglePageConfiguration, TemplateStorefrontSection, TextAreaContent, TextDesignData, TextDesignEditor, TextDesignEditorDefaults, TextDesignEditorDefaultsTransformed, TextSize, TextareaContentEditor, TextareaContentEditorDefaults, TextareaDesignData, ToggleContent, ToggleContentData, ToggleContentEditor, ToggleDesignData, ToggleDesignEditor, TransformedFrame, TranslationSettings, VuegaPageId };
|
|
1222
|
+
export { ActionLinkTypeEnum, BackgroundStyleEnum, ButtonAppearanceEnum, ButtonShapeEnum, ButtonSizeEnum, ButtonTypeEnum, CatalogLayoutSlot, CategoryLayoutSlot, ConfigTypeEnum, DesignEditorType, EditorTypes, ImageSet, InstantsiteJsEvent, OverlayTypeEnum, PluginTypeEnum, ProductLayoutSlot, SectionTypeEnum, TemplateCategoriesList, TemplatePageEnum, ValidationTypeEnum, createVueClientApp, createVueServerApp, useBackgroundElementDesign, useButtonElementContent, useButtonElementDesign, useCategorySelectorElementContent, useDeckElementContent, useImageElementContent, useImageElementDesign, useInputboxElementContent, useInstantsiteJsApi, useLayoutElementDesign, useLogoElementContent, useLogoElementDesign, useMenuElementContent, useNavigationMenuElementContent, useProductSelectorElementContent, useSelectboxElementContent, useSelectboxElementDesign, useTextElementDesign, useTextareaElementContent, useTextareaElementDesign, useToggleElementContent, useToggleElementDesign, useTranslation, useVueBaseProps };
|
|
1223
|
+
export type { ActionLink, AppBaseContext, AppBaseData, AppBaseState, Background$1 as Background, BackgroundDesignData, BackgroundDesignEditor, BackgroundDesignEditorDefaults, BackgroundDesignEditorDefaultsTransformed, BackgroundType, ButtonAppearance$1 as ButtonAppearance, ButtonContent, ButtonContentData, ButtonContentEditor, ButtonDesignData, ButtonDesignEditor, ButtonDesignEditorDefaults, ButtonDesignEditorDefaultsTransformed, ButtonSize$1 as ButtonSize, ButtonStyle$1 as ButtonStyle, CapitalizationType, Card$1 as Card, CategorySelectorContentEditor, CategorySelectorContentEditorDefaults, Color$1 as Color, ColorPickerDesignEditor, ColorPickerDesignEditorDefaults, ColorPickerDesignEditorDefaultsTransformed, ContentEditor, ContentSettings, Deck, DeckContent, DeckContentEditor, DefaultSectionId, DesignEditor, DesignEditorDefaults, DesignEditorDefaultsTransformed, DesignSettings, DividerDesignEditor, Font, Frame, GlobalColorsString$1 as GlobalColorsString, GlobalDesign$1 as GlobalDesign, GlobalFontsString, GlobalTextSizeString$1 as GlobalTextSizeString, GradientColor, HSLColor, ImageBorderInfoData, ImageContent, ImageContentData, ImageContentEditor, ImageContentEditorDefaults, ImageDesignData, ImageDesignEditor, ImageDesignEditorDefaults, ImageDesignEditorDefaultsTransformed, ImageInfoData, InputBoxContent, InputboxContentEditor, InputboxContentEditorDefaults, InstantsiteJSAPI$1 as InstantsiteJSAPI, InstantsiteTilePromise$1 as InstantsiteTilePromise, LayoutDesignData, LayoutDesignOverride, LayoutSettings, LogoContent, LogoContentData, LogoContentEditor, LogoContentEditorDefaults, LogoDesignData$1 as LogoDesignData, LogoDesignEditor, LogoDesignEditorDefaults, LogoDesignEditorDefaultsTransformed, LogoType$1 as LogoType, MandatoryContentSettings, MandatoryDesignSettings, MenuContent, MenuContentData, MenuContentEditor, NavigationMenuContentEditor, Overlay$1 as Overlay, OverlayType, ProductSelectorContentEditor, ProductSelectorContentEditorDefaults, RGBAColor, SelectBoxContent, SelectboxContentEditor, SelectboxContentOption, SelectboxDesignData, SelectboxDesignEditor, Showcase, ShowcaseOverride, SolidColor, StorePageConfiguration, StorefrontSectionId, TemplateCategory, TemplateConfiguration, TemplateConfigurationType, TemplateCustomSection, TemplateDefaultSection, TemplateMetadata, TemplateMultiPageConfiguration, TemplatePage, TemplateSection, TemplateSettings, TemplateSinglePageConfiguration, TemplateStorefrontSection, TextAreaContent, TextDesignData, TextDesignEditor, TextDesignEditorDefaults, TextDesignEditorDefaultsTransformed, TextSize, TextareaContentEditor, TextareaContentEditorDefaults, TextareaDesignData, ToggleContent, ToggleContentData, ToggleContentEditor, ToggleDesignData, ToggleDesignEditor, TransformedFrame, TranslationSettings, VuegaPageId };
|
package/dist/index.d.ts
CHANGED
|
@@ -57,10 +57,7 @@ declare function useDeckElementContent<CONTENT>(elementName: keyof CONTENT): {
|
|
|
57
57
|
};
|
|
58
58
|
declare function getReactiveRef(card: Card$1 | undefined, editorType: EditorTypes, contentElementName: string): {
|
|
59
59
|
hasContent: boolean;
|
|
60
|
-
|
|
61
|
-
highResolutionMobileImage: string;
|
|
62
|
-
lowResolutionDesktopImage: string;
|
|
63
|
-
highResolutionDesktopImage: string;
|
|
60
|
+
value: string | undefined;
|
|
64
61
|
} | {
|
|
65
62
|
title: string | undefined;
|
|
66
63
|
type: ActionLinkType | undefined;
|
|
@@ -75,7 +72,10 @@ declare function getReactiveRef(card: Card$1 | undefined, editorType: EditorType
|
|
|
75
72
|
performAction: (() => void) | undefined;
|
|
76
73
|
} | {
|
|
77
74
|
hasContent: boolean;
|
|
78
|
-
|
|
75
|
+
lowResolutionMobileImage: string;
|
|
76
|
+
highResolutionMobileImage: string;
|
|
77
|
+
lowResolutionDesktopImage: string;
|
|
78
|
+
highResolutionDesktopImage: string;
|
|
79
79
|
} | {
|
|
80
80
|
hasContent: boolean;
|
|
81
81
|
value: boolean | undefined;
|
|
@@ -508,6 +508,21 @@ interface TemplateSettings {
|
|
|
508
508
|
readonly sections: TemplateSection[];
|
|
509
509
|
}
|
|
510
510
|
|
|
511
|
+
declare const TemplateCategoriesList: {
|
|
512
|
+
readonly apparel_footwear: "apparel_footwear";
|
|
513
|
+
readonly vape_smoke: "vape_smoke";
|
|
514
|
+
readonly home_garden: "home_garden";
|
|
515
|
+
readonly sport_outdoor: "sport_outdoor";
|
|
516
|
+
readonly jewelry_accessories: "jewelry_accessories";
|
|
517
|
+
readonly pet_animals: "pet_animals";
|
|
518
|
+
readonly bikes: "bikes";
|
|
519
|
+
readonly health_beauty: "health_beauty";
|
|
520
|
+
readonly gift_shop: "gift_shop";
|
|
521
|
+
readonly electronics: "electronics";
|
|
522
|
+
readonly other: "other";
|
|
523
|
+
};
|
|
524
|
+
type TemplateCategory = typeof TemplateCategoriesList[keyof typeof TemplateCategoriesList];
|
|
525
|
+
|
|
511
526
|
interface ImageContentData {
|
|
512
527
|
readonly borderInfo?: ImageBorderInfoData;
|
|
513
528
|
readonly set: {
|
|
@@ -520,6 +535,7 @@ interface TemplateMetadata {
|
|
|
520
535
|
readonly description?: string;
|
|
521
536
|
readonly preview_url?: string;
|
|
522
537
|
readonly cover_image?: ImageContentData;
|
|
538
|
+
readonly categories?: TemplateCategory[];
|
|
523
539
|
}
|
|
524
540
|
|
|
525
541
|
interface InputboxContentEditor {
|
|
@@ -1203,5 +1219,5 @@ declare const ProductLayoutSlot: {
|
|
|
1203
1219
|
readonly CUSTOM_SLOT: "CUSTOM_SLOT";
|
|
1204
1220
|
};
|
|
1205
1221
|
|
|
1206
|
-
export { ActionLinkTypeEnum, BackgroundStyleEnum, ButtonAppearanceEnum, ButtonShapeEnum, ButtonSizeEnum, ButtonTypeEnum, CatalogLayoutSlot, CategoryLayoutSlot, ConfigTypeEnum, DesignEditorType, EditorTypes, ImageSet, InstantsiteJsEvent, OverlayTypeEnum, PluginTypeEnum, ProductLayoutSlot, SectionTypeEnum, TemplatePageEnum, ValidationTypeEnum, createVueClientApp, createVueServerApp, useBackgroundElementDesign, useButtonElementContent, useButtonElementDesign, useCategorySelectorElementContent, useDeckElementContent, useImageElementContent, useImageElementDesign, useInputboxElementContent, useInstantsiteJsApi, useLayoutElementDesign, useLogoElementContent, useLogoElementDesign, useMenuElementContent, useNavigationMenuElementContent, useProductSelectorElementContent, useSelectboxElementContent, useSelectboxElementDesign, useTextElementDesign, useTextareaElementContent, useTextareaElementDesign, useToggleElementContent, useToggleElementDesign, useTranslation, useVueBaseProps };
|
|
1207
|
-
export type { ActionLink, AppBaseContext, AppBaseData, AppBaseState, Background$1 as Background, BackgroundDesignData, BackgroundDesignEditor, BackgroundDesignEditorDefaults, BackgroundDesignEditorDefaultsTransformed, BackgroundType, ButtonAppearance$1 as ButtonAppearance, ButtonContent, ButtonContentData, ButtonContentEditor, ButtonDesignData, ButtonDesignEditor, ButtonDesignEditorDefaults, ButtonDesignEditorDefaultsTransformed, ButtonSize$1 as ButtonSize, ButtonStyle$1 as ButtonStyle, CapitalizationType, Card$1 as Card, CategorySelectorContentEditor, CategorySelectorContentEditorDefaults, Color$1 as Color, ColorPickerDesignEditor, ColorPickerDesignEditorDefaults, ColorPickerDesignEditorDefaultsTransformed, ContentEditor, ContentSettings, Deck, DeckContent, DeckContentEditor, DefaultSectionId, DesignEditor, DesignEditorDefaults, DesignEditorDefaultsTransformed, DesignSettings, DividerDesignEditor, Font, Frame, GlobalColorsString$1 as GlobalColorsString, GlobalDesign$1 as GlobalDesign, GlobalFontsString, GlobalTextSizeString$1 as GlobalTextSizeString, GradientColor, HSLColor, ImageBorderInfoData, ImageContent, ImageContentData, ImageContentEditor, ImageContentEditorDefaults, ImageDesignData, ImageDesignEditor, ImageDesignEditorDefaults, ImageDesignEditorDefaultsTransformed, ImageInfoData, InputBoxContent, InputboxContentEditor, InputboxContentEditorDefaults, InstantsiteJSAPI$1 as InstantsiteJSAPI, InstantsiteTilePromise$1 as InstantsiteTilePromise, LayoutDesignData, LayoutDesignOverride, LayoutSettings, LogoContent, LogoContentData, LogoContentEditor, LogoContentEditorDefaults, LogoDesignData$1 as LogoDesignData, LogoDesignEditor, LogoDesignEditorDefaults, LogoDesignEditorDefaultsTransformed, LogoType$1 as LogoType, MandatoryContentSettings, MandatoryDesignSettings, MenuContent, MenuContentData, MenuContentEditor, NavigationMenuContentEditor, Overlay$1 as Overlay, OverlayType, ProductSelectorContentEditor, ProductSelectorContentEditorDefaults, RGBAColor, SelectBoxContent, SelectboxContentEditor, SelectboxContentOption, SelectboxDesignData, SelectboxDesignEditor, Showcase, ShowcaseOverride, SolidColor, StorePageConfiguration, StorefrontSectionId, TemplateConfiguration, TemplateConfigurationType, TemplateCustomSection, TemplateDefaultSection, TemplateMetadata, TemplateMultiPageConfiguration, TemplatePage, TemplateSection, TemplateSettings, TemplateSinglePageConfiguration, TemplateStorefrontSection, TextAreaContent, TextDesignData, TextDesignEditor, TextDesignEditorDefaults, TextDesignEditorDefaultsTransformed, TextSize, TextareaContentEditor, TextareaContentEditorDefaults, TextareaDesignData, ToggleContent, ToggleContentData, ToggleContentEditor, ToggleDesignData, ToggleDesignEditor, TransformedFrame, TranslationSettings, VuegaPageId };
|
|
1222
|
+
export { ActionLinkTypeEnum, BackgroundStyleEnum, ButtonAppearanceEnum, ButtonShapeEnum, ButtonSizeEnum, ButtonTypeEnum, CatalogLayoutSlot, CategoryLayoutSlot, ConfigTypeEnum, DesignEditorType, EditorTypes, ImageSet, InstantsiteJsEvent, OverlayTypeEnum, PluginTypeEnum, ProductLayoutSlot, SectionTypeEnum, TemplateCategoriesList, TemplatePageEnum, ValidationTypeEnum, createVueClientApp, createVueServerApp, useBackgroundElementDesign, useButtonElementContent, useButtonElementDesign, useCategorySelectorElementContent, useDeckElementContent, useImageElementContent, useImageElementDesign, useInputboxElementContent, useInstantsiteJsApi, useLayoutElementDesign, useLogoElementContent, useLogoElementDesign, useMenuElementContent, useNavigationMenuElementContent, useProductSelectorElementContent, useSelectboxElementContent, useSelectboxElementDesign, useTextElementDesign, useTextareaElementContent, useTextareaElementDesign, useToggleElementContent, useToggleElementDesign, useTranslation, useVueBaseProps };
|
|
1223
|
+
export type { ActionLink, AppBaseContext, AppBaseData, AppBaseState, Background$1 as Background, BackgroundDesignData, BackgroundDesignEditor, BackgroundDesignEditorDefaults, BackgroundDesignEditorDefaultsTransformed, BackgroundType, ButtonAppearance$1 as ButtonAppearance, ButtonContent, ButtonContentData, ButtonContentEditor, ButtonDesignData, ButtonDesignEditor, ButtonDesignEditorDefaults, ButtonDesignEditorDefaultsTransformed, ButtonSize$1 as ButtonSize, ButtonStyle$1 as ButtonStyle, CapitalizationType, Card$1 as Card, CategorySelectorContentEditor, CategorySelectorContentEditorDefaults, Color$1 as Color, ColorPickerDesignEditor, ColorPickerDesignEditorDefaults, ColorPickerDesignEditorDefaultsTransformed, ContentEditor, ContentSettings, Deck, DeckContent, DeckContentEditor, DefaultSectionId, DesignEditor, DesignEditorDefaults, DesignEditorDefaultsTransformed, DesignSettings, DividerDesignEditor, Font, Frame, GlobalColorsString$1 as GlobalColorsString, GlobalDesign$1 as GlobalDesign, GlobalFontsString, GlobalTextSizeString$1 as GlobalTextSizeString, GradientColor, HSLColor, ImageBorderInfoData, ImageContent, ImageContentData, ImageContentEditor, ImageContentEditorDefaults, ImageDesignData, ImageDesignEditor, ImageDesignEditorDefaults, ImageDesignEditorDefaultsTransformed, ImageInfoData, InputBoxContent, InputboxContentEditor, InputboxContentEditorDefaults, InstantsiteJSAPI$1 as InstantsiteJSAPI, InstantsiteTilePromise$1 as InstantsiteTilePromise, LayoutDesignData, LayoutDesignOverride, LayoutSettings, LogoContent, LogoContentData, LogoContentEditor, LogoContentEditorDefaults, LogoDesignData$1 as LogoDesignData, LogoDesignEditor, LogoDesignEditorDefaults, LogoDesignEditorDefaultsTransformed, LogoType$1 as LogoType, MandatoryContentSettings, MandatoryDesignSettings, MenuContent, MenuContentData, MenuContentEditor, NavigationMenuContentEditor, Overlay$1 as Overlay, OverlayType, ProductSelectorContentEditor, ProductSelectorContentEditorDefaults, RGBAColor, SelectBoxContent, SelectboxContentEditor, SelectboxContentOption, SelectboxDesignData, SelectboxDesignEditor, Showcase, ShowcaseOverride, SolidColor, StorePageConfiguration, StorefrontSectionId, TemplateCategory, TemplateConfiguration, TemplateConfigurationType, TemplateCustomSection, TemplateDefaultSection, TemplateMetadata, TemplateMultiPageConfiguration, TemplatePage, TemplateSection, TemplateSettings, TemplateSinglePageConfiguration, TemplateStorefrontSection, TextAreaContent, TextDesignData, TextDesignEditor, TextDesignEditorDefaults, TextDesignEditorDefaultsTransformed, TextSize, TextareaContentEditor, TextareaContentEditorDefaults, TextareaDesignData, ToggleContent, ToggleContentData, ToggleContentEditor, ToggleDesignData, ToggleDesignEditor, TransformedFrame, TranslationSettings, VuegaPageId };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCurrentInstance as ae,ref as O,computed as o,reactive as E,createSSRApp as re}from"vue";import{renderToString as ie}from"vue/server-renderer";const p={HYPER_LINK:"HYPER_LINK",SCROLL_TO_TILE:"SCROLL_TO_TILE",MAIL_LINK:"MAIL_LINK",TEL_LINK:"TEL_LINK",GO_TO_STORE:"GO_TO_STORE",GO_TO_STORE_LINK:"GO_TO_STORE_LINK",GO_TO_PAGE:"GO_TO_PAGE",GO_TO_CATEGORY:"GO_TO_CATEGORY",GO_TO_CATEGORY_LINK:"GO_TO_CATEGORY_LINK"};function le(e){if("tileId"in e)return e.tileId;if("tileIdForScroll"in e)return e.tileIdForScroll}function ue(e){if("pageId"in e)return e.pageId;if("pageIdForNavigate"in e)return e.pageIdForNavigate}function se(e){if("pageUrl"in e)return e.pageUrl;switch(ue(e)){case"products":return"/products";case"cart":return"/cart";case"account":return"/account";case"search":return"/search";case"home":default:return"/"}}function ce(e){if("categoryId"in e)return e.categoryId}const y=(e,t,n)=>{if(!e||t)return;const{type:a,link:r,email:i,phone:l}=e,v=se(e),c=ce(e);switch(a){case p.HYPER_LINK:if(r)return()=>window.open(r,"_blank");break;case p.GO_TO_STORE:case p.GO_TO_STORE_LINK:return()=>window.open("/products","_self");case p.GO_TO_CATEGORY:case p.GO_TO_CATEGORY_LINK:const s=n?.find(u=>u.id===c)?.url;return s===void 0?()=>window.open("/404","_self"):()=>window.open(s,"_self");case p.MAIL_LINK:if(i)return()=>window.open(`mailto:${i}`,"_self");break;case p.TEL_LINK:if(l)return()=>window.open(`tel:${l}`,"_self");break;case p.SCROLL_TO_TILE:if(typeof document<"u")return()=>{const u=le(e);document.getElementById(`tile-${u}`)?.scrollIntoView()};break;case p.GO_TO_PAGE:if(v)return()=>window.open(v,"_self");break;default:console.error(`Unknown type of ActionLink: ${a}`)}},R=new Map;function d(){const e=(r,i,l,v,c,s,u)=>{R.set(r._uid,{context:O(i),content:O(l),design:O(v),defaults:O(c),site:O(s?.site??{}),category:O(s?.category),storeData:O(s?.storeData),globalDesign:O(u)})},t=(r,i,l,v,c,s)=>{const u=R.get(r._uid);u!==void 0&&(u.content.value=i,u.design.value=l,u.defaults.value=v,u.site.value=c.site??{},u.category.value=c.category,u.globalDesign.value=s,u.storeData.value=c.storeData)},n=ae()?.appContext.app._uid??-1,a=R.get(n);return{init:e,update:t,context:a?.context,content:a?.content,design:a?.design,defaults:a?.defaults,site:a?.site,category:a?.category,storeData:a?.storeData,globalDesign:a?.globalDesign}}function ve(e){return"title"in e&&"type"in e}function de(e,t,n,a){const r=o(()=>{const b=e.value[t];if(b!==void 0){if(ve(b))return b;throw new Error(`Element ${t} is not action link`)}}),i=o(()=>r.value?.title),l=o(()=>r.value?.type),v=o(()=>r.value?.link),c=o(()=>r.value?.email),s=o(()=>r.value?.phone),u=o(()=>r.value?.tileId?`tile-${r.value?.tileId}`:null),g=o(()=>r.value?.type==="GO_TO_STORE_LINK"?"products":r.value?.pageId),T=o(()=>r.value?.pageUrl),I=o(()=>!!i.value),L=o(()=>!!v.value),oe=y(r.value,n,a);return E({title:i,type:l,link:v,email:c,phone:s,tileDivId:u,pageId:g,pageUrl:T,hasTitle:I,hasLink:L,performAction:oe})}function A(e,t){const n=d(),a=o(()=>!!n.site?.value?.isPreviewMode),r=o(()=>n.category?.value?.categories??[]),i=o(()=>t!==void 0?t:n.content.value!==void 0?n.content.value:{});return de(i,e,a.value,r.value)}function G({content:e,elementName:t,errorMessage:n,validatorFn:a}){return o(()=>{const r=e.value?.[t];if(r!==void 0){if(a(r))return r;throw new Error(n)}})}function ge(e){return typeof e=="object"&&e!==null&&"categories"in e}function Ee(e){return o(()=>e.value.reduce((t,n)=>(t[n.id]=n,t),{}))}function Te(e){return e!==void 0}function fe(e){return!!e?.trim()}function pe({name:e,customName:t,selectionType:n}){return n==="ROOT"?e:fe(t)?t:e}function Oe(e,t){return Te(e)&&t}function N({itemId:e,id:t,alt:n,name:a,nameTranslated:r,customName:i,enabled:l,productsCount:v,url:c,imageUrl:s,thumbnailImageUrl:u,imageBorderInfo:g,selectionType:T}){return{itemId:e||t.toString(),id:t,alt:n,name:pe({name:a,customName:i,selectionType:T}),nameTranslated:r,label:a,enabled:l,url:c,productsCount:v,imageUrl:s,thumbnailImageUrl:u,imageBorderInfo:g,showCategory:Oe(t,l)}}function Ie(e){const t=d(),n=o(()=>t.content.value),a=G({content:n,elementName:e,errorMessage:`Element ${e} is not a category selector type`,validatorFn:ge}),r=o(()=>t.storeData?.value),i=o(()=>a.value?.categories.selectionType??"ROOT"),l=o(()=>r.value?.categories??[]),v=o(()=>a.value?.categories?.categoryIds??[]),c=o(()=>{const g=Ee(l);return i.value==="MANUAL"?a.value?.categories?.items?.map(T=>{const I=g.value[T.id];return N({...T,...I,selectionType:i.value})})??[]:r?.value?.categories.map(T=>N({...T,selectionType:i.value}))??[]}),s=o(()=>a.value!==void 0),u=o(()=>c.value!==void 0&&c.value.length>0);return E({categories:c,categoryIds:v,hasContent:s,hasCategories:u})}function Le(e){return"bucket"in e&&"borderInfo"in e&&"set"in e}function m(e,t){const n=new RegExp(/^https?:\/\//);return e!=null&&n.test(e)?e:`${t}/${e}`}function D(e,t){const n=d(),a=o(()=>t!==void 0?t:n.content.value);return me(a,e)}function me(e,t){const n=o(()=>{const s=e.value[t];if(s!==void 0){if(Le(s))return s;throw new Error(`Element ${t} is not image`)}}),a=o(()=>n.value===void 0?"":d().context.value.imageBuckets?.[n.value?.bucket]),r=o(()=>n.value!==void 0),i=o(()=>m(n.value?.set?.["cropped-webp-100x200"]?.url,a.value)),l=o(()=>m(n.value?.set?.["cropped-webp-1000x2000"]?.url,a.value)),v=o(()=>m(n.value?.set?.["webp-200x200"]?.url,a.value)),c=o(()=>m(n.value?.set?.["webp-2000x2000"]?.url,a.value));return E({hasContent:r,lowResolutionMobileImage:i,highResolutionMobileImage:l,lowResolutionDesktopImage:v,highResolutionDesktopImage:c})}function h(e,t){const n=d(),a=o(()=>t!==void 0?t:n.content.value);return _e(a,e)}function _e(e,t){const n=o(()=>{const i=e.value[t];if(i!==void 0){if(typeof i=="string")return i;throw new Error(`Element ${t} is not inputbox`)}}),a=o(()=>n.value!==void 0&&n.value.length>0),r=o(()=>n.value);return E({hasContent:a,value:r})}function w(e,t){const n=d(),a=o(()=>t!==void 0?t:n.content.value);return Ce(a,e)}function Ce(e,t){const n=o(()=>{const i=e.value[t];if(i!==void 0){if(typeof i=="string")return i;throw new Error(`Element ${t} is not selectbox`)}}),a=o(()=>n.value!==void 0),r=o(()=>n.value);return E({hasContent:a,value:r})}function M(e,t){const n=d(),a=o(()=>t!==void 0?t:n.content.value);return be(a,e)}function be(e,t){const n=o(()=>{const i=e.value[t];if(i!==void 0){if(typeof i=="string")return i;throw new Error(`Element ${t} is not textarea`)}}),a=o(()=>n.value!==void 0),r=o(()=>n.value);return E({hasContent:a,value:r})}function Re(e){return"enabled"in e}function B(e,t){const n=d(),a=o(()=>t!==void 0?t:n.content.value);return Se(a,e)}function Se(e,t){const n=o(()=>{const i=e.value[t];if(i!==void 0){if(Re(i))return i;throw new Error(`Element ${t} is not toggle`)}}),a=o(()=>n.value!==void 0),r=o(()=>n.value?.enabled);return E({hasContent:a,value:r})}var U=(e=>(e.INPUTBOX="INPUTBOX",e.TEXTAREA="TEXTAREA",e.BUTTON="BUTTON",e.IMAGE="IMAGE",e.TOGGLE="TOGGLE",e.SELECTBOX="SELECTBOX",e))(U||{});function ye(e){if(typeof e!="object"||e===null)return!1;const t=e;return Array.isArray(t.cards)&&t.cards.every(n=>typeof n.settings=="object"&&n.settings!==null)}function Ae(e){const t=d(),n=o(()=>{const i=t.content.value[e];if(i!==void 0){if(ye(i))return i;throw new Error(`Element ${e} is not of DECK type`)}}),a=o(()=>n.value!==void 0&&n.value.cards.length>0),r=o(()=>n.value?.cards);return E({hasContent:a,cards:r,getReactiveRef:Ge})}function Ge(e,t,n){if(e==null)throw Error("Could not get a reactive ref for undefined Card");const a=e.settings[n];if(a===void 0)return a;switch(t){case"TEXTAREA":return M(n,e.settings);case"INPUTBOX":return h(n,e.settings);case"SELECTBOX":return w(n,e.settings);case"IMAGE":return D(n,e.settings);case"TOGGLE":return B(n,e.settings);case"BUTTON":return A(n,e.settings);default:return}}function Ne(e){return"type"in e&&("text"in e||"image"in e)}function _(e,t){const n=new RegExp(/^https?:\/\//);return e!==void 0&&n.test(e)?e:`${t}/${e}`}function De(){const e=d(),t=o(()=>{const l=e.content.value.logo;if(l!==void 0){if(Ne(l))return l;throw new Error("Element logo is not LOGO")}}),n=o(()=>t.value?.type),a=o(()=>t.value?.text),r=o(()=>t.value?.image===void 0?"":e.context.value.imageBuckets?.[t.value.image.bucket]),i=o(()=>({lowResolutionMobileImage:_(t.value?.image?.set?.["cropped-webp-100x200"]?.url,r.value),highResolutionMobileImage:_(t.value?.image?.set?.["cropped-webp-1000x2000"]?.url,r.value),lowResolutionDesktopImage:_(t.value?.image?.set?.["webp-200x200"]?.url,r.value),highResolutionDesktopImage:_(t.value?.image?.set?.["webp-2000x2000"]?.url,r.value)}));return E({type:n,text:a,image:i})}function he(e){return e!==null&&"items"in e}function P(e){const t=d(),n=o(()=>{const l=t.content.value[e];if(l!==void 0){if(he(l))return l;throw new Error(`Element ${e} is not an menu`)}}),a=o(()=>!!t.site?.value?.isPreviewMode),r=o(()=>n.value!==void 0),i=o(()=>n.value?.items?n.value.items.map(l=>({...l,performAction:y(l,a.value)})):[]);return E({hasContent:r,items:i})}const we="menu";function Me(){return P(we)}function Be(e){return typeof e=="object"&&e!==null&&("products"in e||"product"in e)}function Ue(e){const t=d(),n=o(()=>t.content.value),a=G({content:n,elementName:e,errorMessage:`Element ${e} is not a product selector type`,validatorFn:Be}),r=o(()=>t.storeData?.value),i=o(()=>a.value?.products?.selectionType??"MANUAL"),l=o(()=>a.value?.products?.productIds??[]),v=o(()=>a.value?.product?.id),c=o(()=>a.value?.categoryId?parseInt(a.value.categoryId,10):void 0),s=o(()=>{if(l.value&&c.value&&i.value==="CATEGORY")return r?.value?.products.filter(L=>L?.defaultCategoryId===c.value)??[];if(typeof c.value=="number"&&c.value===0&&i.value==="CATEGORY")return r?.value?.products??[];const I=v.value?[v.value]:l.value??[];return r?.value?.products.filter(L=>I.includes(L.id))??[]}),u=o(()=>r?.value?.categories.filter(I=>I.id===c?.value)??[]),g=o(()=>a.value!==void 0),T=o(()=>s.value!==void 0&&s.value.length>0);return E({products:s,categories:u,categoryId:c,hasContent:g,hasProducts:T})}function Pe(){return globalThis.craneSharedTranslation??{}}function xe(){const e=d(),t=o(()=>e.site?.value),n=o(()=>Pe()),a=o(()=>{const r=t.value?.languages;return r?r.find(i=>i.selected)?.code??r.find(i=>i.main)?.code??"en":"en"});return{t:r=>{const i=n.value;if(!i||Object.keys(i).length===0)return r;const l=a.value,v=i[l]?.[r];if(v!==void 0)return v;if(l!=="en"){const c=i.en?.[r];if(c!==void 0)return c}return r},currentLanguageCode:a}}function x(e,t){if(t===void 0)return;if(!t.startsWith("global."))return t.replaceAll("_"," ");const n=t.split(".").at(2);if(n!==void 0)return e.fontFamily?e.fontFamily[n].replaceAll("_"," "):void 0}function C(e,t,n){return t?x(e,t):x(e,n)}function k(e,t){if(t===void 0)return;if(typeof t!="string"||!t.startsWith("global."))return t;const n=t.split(".").at(2);if(n!==void 0)return e.textSize?e.textSize[n]:void 0}function S(e,t,n){return t?k(e,t):k(e,n)}function K(e,t){if(t===void 0)return;if(typeof t!="string"||!t.startsWith("global."))return t;const n=t.split(".").at(2);if(n!==void 0)return e.color?e.color[n]:void 0}function f(e,t,n){return t?K(e,t):K(e,n)}function ke(e,t,n){return{visible:t?.visible??n?.visible??!1,width:t?.width??n?.width??1,color:f(e,t?.color,n?.color)}}function Ke(e){const t=d(),n=o(()=>{const r=t.design.value[e],i=t.defaults.value[e],l=t.globalDesign.value;return{background:{type:r?.background?.type??i?.background?.type,solid:{color:f(l,r?.background?.solid?.color,i?.background?.solid?.color)},gradient:{fromColor:f(l,r?.background?.gradient?.fromColor,i?.background?.gradient?.fromColor),toColor:f(l,r?.background?.gradient?.toColor,i?.background?.gradient?.toColor)}}}}),a=o(()=>n.value?.background);return E({background:a})}function $e(e){const t=d(),n=o(()=>{const s=t.design.value[e],u=t.defaults.value[e],g=t.globalDesign.value;return{appearance:s?.appearance??u?.appearance,font:C(g,s?.font,u?.font),size:s?.size??u?.size,style:s?.style??u?.style,color:f(g,s?.color,u?.color),visible:s?.visible??u?.visible??!1}}),a=o(()=>n.value?.appearance),r=o(()=>n.value?.font),i=o(()=>n.value?.size),l=o(()=>n.value?.style),v=o(()=>n.value?.color),c=o(()=>n.value?.visible);return E({appearance:a,font:r,size:i,style:l,color:v,visible:c})}function ze(e){const t=d(),n=o(()=>{const i=t.design.value[e],l=t.defaults.value[e],v=t.globalDesign.value;return{overlay:{type:i?.overlay?.type??l?.overlay?.type,solid:{color:f(v,i?.overlay?.solid?.color,l?.overlay?.solid?.color)},gradient:{fromColor:f(v,i?.overlay?.gradient?.fromColor,l?.overlay?.gradient?.fromColor),toColor:f(v,i?.overlay?.gradient?.toColor,l?.overlay?.gradient?.toColor)}},visible:i?.visible??l?.visible??!1}}),a=o(()=>n.value?.overlay),r=o(()=>n.value?.visible);return E({overlay:a,visible:r})}function Xe(){const e=d(),t=o(()=>e.design.value.layout),n=o(()=>t.value);return E({layout:n})}function Fe(){const e=d();return o(()=>{const t=e.design.value.logo,n=e.defaults.value.logo,a=e.globalDesign.value;return{font:C(a,t?.font,n?.font),size:S(a,t?.size,n?.size),bold:t?.bold??n?.bold,italic:t?.italic??n?.italic,color:f(a,t?.color,n?.color),visible:t?.visible??n?.visible??!1,spacing:t?.spacing??n?.spacing??0,capitalization:t?.capitalization??n?.capitalization??"none",frame:ke(a,t?.frame,n?.frame)}})}function Ye(e){const t=d(),n=o(()=>{const r=t.design.value[e],i=t.defaults.value[e];return{value:r?.value??i?.value}}),a=o(()=>n.value?.value);return E({value:a})}function We(e){const t=d(),n=o(()=>{const s=t.design.value[e],u=t.defaults.value[e],g=t.globalDesign.value;return{font:C(g,s?.font,u?.font),size:S(g,s?.size,u?.size),bold:s?.bold??u?.bold,italic:s?.italic??u?.italic,color:f(g,s?.color,u?.color),visible:s?.visible??u?.visible??!1}}),a=o(()=>n.value?.font),r=o(()=>n.value?.size),i=o(()=>n.value?.bold),l=o(()=>n.value?.italic),v=o(()=>n.value?.color),c=o(()=>n.value?.visible);return E({font:a,size:r,bold:i,italic:l,color:v,visible:c})}function Ve(e){const t=d(),n=o(()=>{const u=t.design.value[e],g=t.defaults.value[e],T=t.globalDesign.value;return{font:C(T,u?.font,g?.font),size:S(T,u?.size,g?.size),bold:u?.bold??g?.bold,italic:u?.italic??g?.italic,color:f(T,u?.color,g?.color),visible:u?.visible??g?.visible??!1,whiteSpace:"pre-wrap"}}),a=o(()=>n.value?.font),r=o(()=>n.value?.size),i=o(()=>n.value?.bold),l=o(()=>n.value?.italic),v=o(()=>n.value?.color),c=o(()=>n.value?.visible),s=o(()=>n.value?.whiteSpace);return E({font:a,size:r,bold:i,italic:l,color:v,visible:c,whiteSpace:s})}function He(e){const t=d(),n=o(()=>{const r=t.design.value[e],i=t.defaults.value[e];return{enabled:r?.enabled??i?.enabled}}),a=o(()=>n.value?.enabled);return E({enabled:a})}function $(e){return{app:re(e)}}function je(e,t){return{init:()=>{const{app:n}=$(e);return t?.init?.(n),{mount:(a,r)=>{d().init(n,r.context,r.data.content,r.data.design,r.data.defaults,r.data.externalContent,r.context.globalDesign),t?.mount?.(n,a,r),n.mount(a)},update:a=>{d().update(n,a.data.content,a.data.design,a.data.defaults,a.data.externalContent,a.context.globalDesign),t?.update?.(n,a)},unmount:()=>{t?.unmount?.(n),n.unmount()}}}}}function Je(){return globalThis.window.instantsite}function qe(e,t){return{init:()=>{const{app:n}=$(e);return t?.init?.(n),{render:async(a,r)=>(d().init(n,a,r.content,r.design,r.defaults,r.externalContent,a.globalDesign),t?.render?.(n,a,r),{html:await ie(n,{context:a}),state:{context:a,data:r}})}}}}var z=(e=>(e.SCROLL_TO_TILE="SCROLL_TO_TILE",e.HYPER_LINK="HYPER_LINK",e.MAIL_LINK="MAIL_LINK",e.TEL_LINK="TEL_LINK",e.GO_TO_STORE_LINK="GO_TO_STORE_LINK",e.GO_TO_PAGE="GO_TO_PAGE",e))(z||{}),X=(e=>(e.COLOR="COLOR",e.GRADIENT="GRADIENT",e.NONE="NONE",e))(X||{}),F=(e=>(e.SOLID="SOLID",e.OUTLINE="OUTLINE",e.TEXT="TEXT",e))(F||{}),Y=(e=>(e.SMALL="SMALL",e.MEDIUM="MEDIUM",e.LARGE="LARGE",e))(Y||{}),W=(e=>(e.ROUND_CORNER="ROUND_CORNER",e.RECTANGLE="RECTANGLE",e.PILL="PILL",e))(W||{}),V=(e=>(e.COLOR="COLOR",e.GRADIENT="GRADIENT",e))(V||{}),H=(e=>(e.SECTION="SECTION",e.HEADER="HEADER",e.FOOTER="FOOTER",e))(H||{}),j=(e=>(e[e.Server=0]="Server",e[e.Client=1]="Client",e[e.Misc=2]="Misc",e[e.Layout=3]="Layout",e[e.Asset=4]="Asset",e[e.SharedFiles=5]="SharedFiles",e))(j||{}),J=(e=>(e[e.Server=0]="Server",e[e.Client=1]="Client",e[e.SectionSetting=2]="SectionSetting",e[e.SectionShowcase=3]="SectionShowcase",e[e.SectionAsset=4]="SectionAsset",e[e.TemplateDescriptor=5]="TemplateDescriptor",e[e.PageTemplateDescriptor=6]="PageTemplateDescriptor",e[e.TemplateAsset=7]="TemplateAsset",e[e.Layout=8]="Layout",e[e.LayoutSettings=9]="LayoutSettings",e[e.LayoutAsset=10]="LayoutAsset",e[e.SlotServer=11]="SlotServer",e[e.SlotClient=12]="SlotClient",e[e.SharedTranslation=13]="SharedTranslation",e))(J||{}),q=(e=>(e.SCROLL_TO_TILE="SCROLL_TO_TILE",e.HYPER_LINK="HYPER_LINK",e.MAIL_LINK="MAIL_LINK",e.TEL_LINK="TEL_LINK",e.GO_TO_STORE="GO_TO_STORE",e.GO_TO_STORE_LINK="GO_TO_STORE_LINK",e.GO_TO_PAGE="GO_TO_PAGE",e))(q||{}),Qe=(e=>(e.TEXTAREA="TEXTAREA",e.INPUTBOX="INPUTBOX",e.SELECTBOX="SELECTBOX",e.IMAGE="IMAGE",e.TOGGLE="TOGGLE",e.BUTTON="BUTTON",e.DECK="DECK",e.MENU="MENU",e.NAVIGATION_MENU="NAVIGATION_MENU",e.LOGO="LOGO",e.INFO="INFO",e.DIVIDER="DIVIDER",e))(Qe||{}),Q=(e=>(e.TEXT="TEXT",e.BUTTON="BUTTON",e.IMAGE="IMAGE",e.TOGGLE="TOGGLE",e.SELECTBOX="SELECTBOX",e.BACKGROUND="BACKGROUND",e.COLOR_PICKER="COLOR_PICKER",e.LOGO="LOGO",e.DIVIDER="DIVIDER",e))(Q||{}),Z=(e=>(e.PRODUCT="PRODUCT",e.CATALOG="CATALOG",e.CATEGORY="CATEGORY",e.HOME="HOME",e.CUSTOM="CUSTOM",e))(Z||{}),ee=(e=>(e.CONTENT="Content",e.DESIGN="Design",e))(ee||{}),te=(e=>(e.ORIGINAL="original",e.WEBP_LOW_RES="webp-200x200",e.WEBP_HI_2X_RES="webp-2000x2000",e.MOBILE_WEBP_LOW_RES="cropped-webp-100x200",e.MOBILE_WEBP_HI_RES="cropped-webp-1000x2000",e))(te||{}),ne=(e=>(e.TILE_LOADED="tile-loaded",e.TILE_UNLOADED="tile-unloaded",e))(ne||{});const Ze={PRODUCT_LIST:"CONTROLS",BOTTOM_BAR:"FOOTER",CUSTOM_SLOT:"CUSTOM_SLOT"},et={CATEGORY_TITLE:"MAIN_TITLE",PRODUCT_LIST:"CONTROLS",BOTTOM_BAR:"FOOTER",CUSTOM_SLOT:"CUSTOM_SLOT"},tt={TOP_BAR:"TOP_BAR",GALLERY:"GALLERY",SIDEBAR:"SIDEBAR",DESCRIPTION:"DESCRIPTION",REVIEW_LIST:"REVIEW_LIST",RELATED_PRODUCTS:"RELATED_PRODUCTS",BOTTOM_BAR:"FOOTER",CUSTOM_SLOT:"CUSTOM_SLOT"};export{q as ActionLinkTypeEnum,V as BackgroundStyleEnum,F as ButtonAppearanceEnum,W as ButtonShapeEnum,Y as ButtonSizeEnum,z as ButtonTypeEnum,Ze as CatalogLayoutSlot,et as CategoryLayoutSlot,J as ConfigTypeEnum,Q as DesignEditorType,U as EditorTypes,te as ImageSet,ne as InstantsiteJsEvent,X as OverlayTypeEnum,j as PluginTypeEnum,tt as ProductLayoutSlot,H as SectionTypeEnum,Z as TemplatePageEnum,ee as ValidationTypeEnum,je as createVueClientApp,qe as createVueServerApp,Ke as useBackgroundElementDesign,A as useButtonElementContent,$e as useButtonElementDesign,Ie as useCategorySelectorElementContent,Ae as useDeckElementContent,D as useImageElementContent,ze as useImageElementDesign,h as useInputboxElementContent,Je as useInstantsiteJsApi,Xe as useLayoutElementDesign,De as useLogoElementContent,Fe as useLogoElementDesign,P as useMenuElementContent,Me as useNavigationMenuElementContent,Ue as useProductSelectorElementContent,w as useSelectboxElementContent,Ye as useSelectboxElementDesign,We as useTextElementDesign,M as useTextareaElementContent,Ve as useTextareaElementDesign,B as useToggleElementContent,He as useToggleElementDesign,xe as useTranslation,d as useVueBaseProps};
|
|
1
|
+
import{getCurrentInstance as ae,ref as O,computed as o,reactive as E,createSSRApp as re}from"vue";import{renderToString as ie}from"vue/server-renderer";const p={HYPER_LINK:"HYPER_LINK",SCROLL_TO_TILE:"SCROLL_TO_TILE",MAIL_LINK:"MAIL_LINK",TEL_LINK:"TEL_LINK",GO_TO_STORE:"GO_TO_STORE",GO_TO_STORE_LINK:"GO_TO_STORE_LINK",GO_TO_PAGE:"GO_TO_PAGE",GO_TO_CATEGORY:"GO_TO_CATEGORY",GO_TO_CATEGORY_LINK:"GO_TO_CATEGORY_LINK"};function le(e){if("tileId"in e)return e.tileId;if("tileIdForScroll"in e)return e.tileIdForScroll}function ue(e){if("pageId"in e)return e.pageId;if("pageIdForNavigate"in e)return e.pageIdForNavigate}function se(e){if("pageUrl"in e)return e.pageUrl;switch(ue(e)){case"products":return"/products";case"cart":return"/cart";case"account":return"/account";case"search":return"/search";case"home":default:return"/"}}function ce(e){if("categoryId"in e)return e.categoryId}const y=(e,t,n)=>{if(!e||t)return;const{type:a,link:r,email:i,phone:l}=e,v=se(e),c=ce(e);switch(a){case p.HYPER_LINK:if(r)return()=>window.open(r,"_blank");break;case p.GO_TO_STORE:case p.GO_TO_STORE_LINK:return()=>window.open("/products","_self");case p.GO_TO_CATEGORY:case p.GO_TO_CATEGORY_LINK:const s=n?.find(u=>u.id===c)?.url;return s===void 0?()=>window.open("/404","_self"):()=>window.open(s,"_self");case p.MAIL_LINK:if(i)return()=>window.open(`mailto:${i}`,"_self");break;case p.TEL_LINK:if(l)return()=>window.open(`tel:${l}`,"_self");break;case p.SCROLL_TO_TILE:if(typeof document<"u")return()=>{const u=le(e);document.getElementById(`tile-${u}`)?.scrollIntoView()};break;case p.GO_TO_PAGE:if(v)return()=>window.open(v,"_self");break;default:console.error(`Unknown type of ActionLink: ${a}`)}},R=new Map;function d(){const e=(r,i,l,v,c,s,u)=>{R.set(r._uid,{context:O(i),content:O(l),design:O(v),defaults:O(c),site:O(s?.site??{}),category:O(s?.category),storeData:O(s?.storeData),globalDesign:O(u)})},t=(r,i,l,v,c,s)=>{const u=R.get(r._uid);u!==void 0&&(u.content.value=i,u.design.value=l,u.defaults.value=v,u.site.value=c.site??{},u.category.value=c.category,u.globalDesign.value=s,u.storeData.value=c.storeData)},n=ae()?.appContext.app._uid??-1,a=R.get(n);return{init:e,update:t,context:a?.context,content:a?.content,design:a?.design,defaults:a?.defaults,site:a?.site,category:a?.category,storeData:a?.storeData,globalDesign:a?.globalDesign}}function ve(e){return"title"in e&&"type"in e}function de(e,t,n,a){const r=o(()=>{const b=e.value[t];if(b!==void 0){if(ve(b))return b;throw new Error(`Element ${t} is not action link`)}}),i=o(()=>r.value?.title),l=o(()=>r.value?.type),v=o(()=>r.value?.link),c=o(()=>r.value?.email),s=o(()=>r.value?.phone),u=o(()=>r.value?.tileId?`tile-${r.value?.tileId}`:null),g=o(()=>r.value?.type==="GO_TO_STORE_LINK"?"products":r.value?.pageId),T=o(()=>r.value?.pageUrl),m=o(()=>!!i.value),I=o(()=>!!v.value),oe=y(r.value,n,a);return E({title:i,type:l,link:v,email:c,phone:s,tileDivId:u,pageId:g,pageUrl:T,hasTitle:m,hasLink:I,performAction:oe})}function A(e,t){const n=d(),a=o(()=>!!n.site?.value?.isPreviewMode),r=o(()=>n.category?.value?.categories??[]),i=o(()=>t!==void 0?t:n.content.value!==void 0?n.content.value:{});return de(i,e,a.value,r.value)}function G({content:e,elementName:t,errorMessage:n,validatorFn:a}){return o(()=>{const r=e.value?.[t];if(r!==void 0){if(a(r))return r;throw new Error(n)}})}function ge(e){return typeof e=="object"&&e!==null&&"categories"in e}function Ee(e){return o(()=>e.value.reduce((t,n)=>(t[n.id]=n,t),{}))}function Te(e){return e!==void 0}function fe(e){return!!e?.trim()}function pe({name:e,customName:t,selectionType:n}){return n==="ROOT"?e:fe(t)?t:e}function Oe(e,t){return Te(e)&&t}function N({itemId:e,id:t,alt:n,name:a,nameTranslated:r,customName:i,enabled:l,productsCount:v,url:c,imageUrl:s,thumbnailImageUrl:u,imageBorderInfo:g,selectionType:T}){return{itemId:e||t.toString(),id:t,alt:n,name:pe({name:a,customName:i,selectionType:T}),nameTranslated:r,label:a,enabled:l,url:c,productsCount:v,imageUrl:s,thumbnailImageUrl:u,imageBorderInfo:g,showCategory:Oe(t,l)}}function me(e){const t=d(),n=o(()=>t.content.value),a=G({content:n,elementName:e,errorMessage:`Element ${e} is not a category selector type`,validatorFn:ge}),r=o(()=>t.storeData?.value),i=o(()=>a.value?.categories.selectionType??"ROOT"),l=o(()=>r.value?.categories??[]),v=o(()=>a.value?.categories?.categoryIds??[]),c=o(()=>{const g=Ee(l);return i.value==="MANUAL"?a.value?.categories?.items?.map(T=>{const m=g.value[T.id];return N({...T,...m,selectionType:i.value})})??[]:r?.value?.categories.map(T=>N({...T,selectionType:i.value}))??[]}),s=o(()=>a.value!==void 0),u=o(()=>c.value!==void 0&&c.value.length>0);return E({categories:c,categoryIds:v,hasContent:s,hasCategories:u})}function Ie(e){return"bucket"in e&&"borderInfo"in e&&"set"in e}function L(e,t){const n=new RegExp(/^https?:\/\//);return e!=null&&n.test(e)?e:`${t}/${e}`}function D(e,t){const n=d(),a=o(()=>t!==void 0?t:n.content.value);return Le(a,e)}function Le(e,t){const n=o(()=>{const s=e.value[t];if(s!==void 0){if(Ie(s))return s;throw new Error(`Element ${t} is not image`)}}),a=o(()=>n.value===void 0?"":d().context.value.imageBuckets?.[n.value?.bucket]),r=o(()=>n.value!==void 0),i=o(()=>L(n.value?.set?.["cropped-webp-100x200"]?.url,a.value)),l=o(()=>L(n.value?.set?.["cropped-webp-1000x2000"]?.url,a.value)),v=o(()=>L(n.value?.set?.["webp-200x200"]?.url,a.value)),c=o(()=>L(n.value?.set?.["webp-2000x2000"]?.url,a.value));return E({hasContent:r,lowResolutionMobileImage:i,highResolutionMobileImage:l,lowResolutionDesktopImage:v,highResolutionDesktopImage:c})}function h(e,t){const n=d(),a=o(()=>t!==void 0?t:n.content.value);return _e(a,e)}function _e(e,t){const n=o(()=>{const i=e.value[t];if(i!==void 0){if(typeof i=="string")return i;throw new Error(`Element ${t} is not inputbox`)}}),a=o(()=>n.value!==void 0&&n.value.length>0),r=o(()=>n.value);return E({hasContent:a,value:r})}function w(e,t){const n=d(),a=o(()=>t!==void 0?t:n.content.value);return Ce(a,e)}function Ce(e,t){const n=o(()=>{const i=e.value[t];if(i!==void 0){if(typeof i=="string")return i;throw new Error(`Element ${t} is not selectbox`)}}),a=o(()=>n.value!==void 0),r=o(()=>n.value);return E({hasContent:a,value:r})}function M(e,t){const n=d(),a=o(()=>t!==void 0?t:n.content.value);return be(a,e)}function be(e,t){const n=o(()=>{const i=e.value[t];if(i!==void 0){if(typeof i=="string")return i;throw new Error(`Element ${t} is not textarea`)}}),a=o(()=>n.value!==void 0),r=o(()=>n.value);return E({hasContent:a,value:r})}function Re(e){return"enabled"in e}function B(e,t){const n=d(),a=o(()=>t!==void 0?t:n.content.value);return Se(a,e)}function Se(e,t){const n=o(()=>{const i=e.value[t];if(i!==void 0){if(Re(i))return i;throw new Error(`Element ${t} is not toggle`)}}),a=o(()=>n.value!==void 0),r=o(()=>n.value?.enabled);return E({hasContent:a,value:r})}var U=(e=>(e.INPUTBOX="INPUTBOX",e.TEXTAREA="TEXTAREA",e.BUTTON="BUTTON",e.IMAGE="IMAGE",e.TOGGLE="TOGGLE",e.SELECTBOX="SELECTBOX",e))(U||{});function ye(e){if(typeof e!="object"||e===null)return!1;const t=e;return Array.isArray(t.cards)&&t.cards.every(n=>typeof n.settings=="object"&&n.settings!==null)}function Ae(e){const t=d(),n=o(()=>{const i=t.content.value[e];if(i!==void 0){if(ye(i))return i;throw new Error(`Element ${e} is not of DECK type`)}}),a=o(()=>n.value!==void 0&&n.value.cards.length>0),r=o(()=>n.value?.cards);return E({hasContent:a,cards:r,getReactiveRef:Ge})}function Ge(e,t,n){if(e==null)throw Error("Could not get a reactive ref for undefined Card");const a=e.settings[n];if(a===void 0)return a;switch(t){case"TEXTAREA":return M(n,e.settings);case"INPUTBOX":return h(n,e.settings);case"SELECTBOX":return w(n,e.settings);case"IMAGE":return D(n,e.settings);case"TOGGLE":return B(n,e.settings);case"BUTTON":return A(n,e.settings);default:return}}function Ne(e){return"type"in e&&("text"in e||"image"in e)}function _(e,t){const n=new RegExp(/^https?:\/\//);return e!==void 0&&n.test(e)?e:`${t}/${e}`}function De(){const e=d(),t=o(()=>{const l=e.content.value.logo;if(l!==void 0){if(Ne(l))return l;throw new Error("Element logo is not LOGO")}}),n=o(()=>t.value?.type),a=o(()=>t.value?.text),r=o(()=>t.value?.image===void 0?"":e.context.value.imageBuckets?.[t.value.image.bucket]),i=o(()=>({lowResolutionMobileImage:_(t.value?.image?.set?.["cropped-webp-100x200"]?.url,r.value),highResolutionMobileImage:_(t.value?.image?.set?.["cropped-webp-1000x2000"]?.url,r.value),lowResolutionDesktopImage:_(t.value?.image?.set?.["webp-200x200"]?.url,r.value),highResolutionDesktopImage:_(t.value?.image?.set?.["webp-2000x2000"]?.url,r.value)}));return E({type:n,text:a,image:i})}function he(e){return e!==null&&"items"in e}function P(e){const t=d(),n=o(()=>{const l=t.content.value[e];if(l!==void 0){if(he(l))return l;throw new Error(`Element ${e} is not an menu`)}}),a=o(()=>!!t.site?.value?.isPreviewMode),r=o(()=>n.value!==void 0),i=o(()=>n.value?.items?n.value.items.map(l=>({...l,performAction:y(l,a.value)})):[]);return E({hasContent:r,items:i})}const we="menu";function Me(){return P(we)}function Be(e){return typeof e=="object"&&e!==null&&("products"in e||"product"in e)}function Ue(e){const t=d(),n=o(()=>t.content.value),a=G({content:n,elementName:e,errorMessage:`Element ${e} is not a product selector type`,validatorFn:Be}),r=o(()=>t.storeData?.value),i=o(()=>a.value?.products?.selectionType??"MANUAL"),l=o(()=>a.value?.products?.productIds??[]),v=o(()=>a.value?.product?.id),c=o(()=>a.value?.categoryId?parseInt(a.value.categoryId,10):void 0),s=o(()=>{if(l.value&&c.value&&i.value==="CATEGORY")return r?.value?.products.filter(I=>I?.defaultCategoryId===c.value)??[];if(typeof c.value=="number"&&c.value===0&&i.value==="CATEGORY")return r?.value?.products??[];const m=v.value?[v.value]:l.value??[];return r?.value?.products.filter(I=>m.includes(I.id))??[]}),u=o(()=>r?.value?.categories.filter(m=>m.id===c?.value)??[]),g=o(()=>a.value!==void 0),T=o(()=>s.value!==void 0&&s.value.length>0);return E({products:s,categories:u,categoryId:c,hasContent:g,hasProducts:T})}function Pe(){return globalThis.craneSharedTranslation??{}}function ke(){const e=d(),t=o(()=>e.site?.value),n=o(()=>Pe()),a=o(()=>{const r=t.value?.languages;return r?r.find(i=>i.selected)?.code??r.find(i=>i.main)?.code??"en":"en"});return{t:r=>{const i=n.value;if(!i||Object.keys(i).length===0)return r;const l=a.value,v=i[l]?.[r];if(v!==void 0)return v;if(l!=="en"){const c=i.en?.[r];if(c!==void 0)return c}return r},currentLanguageCode:a}}function k(e,t){if(t===void 0)return;if(!t.startsWith("global."))return t.replaceAll("_"," ");const n=t.split(".").at(2);if(n!==void 0)return e.fontFamily?e.fontFamily[n].replaceAll("_"," "):void 0}function C(e,t,n){return t?k(e,t):k(e,n)}function x(e,t){if(t===void 0)return;if(typeof t!="string"||!t.startsWith("global."))return t;const n=t.split(".").at(2);if(n!==void 0)return e.textSize?e.textSize[n]:void 0}function S(e,t,n){return t?x(e,t):x(e,n)}function K(e,t){if(t===void 0)return;if(typeof t!="string"||!t.startsWith("global."))return t;const n=t.split(".").at(2);if(n!==void 0)return e.color?e.color[n]:void 0}function f(e,t,n){return t?K(e,t):K(e,n)}function xe(e,t,n){return{visible:t?.visible??n?.visible??!1,width:t?.width??n?.width??1,color:f(e,t?.color,n?.color)}}function Ke(e){const t=d(),n=o(()=>{const r=t.design.value[e],i=t.defaults.value[e],l=t.globalDesign.value;return{background:{type:r?.background?.type??i?.background?.type,solid:{color:f(l,r?.background?.solid?.color,i?.background?.solid?.color)},gradient:{fromColor:f(l,r?.background?.gradient?.fromColor,i?.background?.gradient?.fromColor),toColor:f(l,r?.background?.gradient?.toColor,i?.background?.gradient?.toColor)}}}}),a=o(()=>n.value?.background);return E({background:a})}function $e(e){const t=d(),n=o(()=>{const s=t.design.value[e],u=t.defaults.value[e],g=t.globalDesign.value;return{appearance:s?.appearance??u?.appearance,font:C(g,s?.font,u?.font),size:s?.size??u?.size,style:s?.style??u?.style,color:f(g,s?.color,u?.color),visible:s?.visible??u?.visible??!1}}),a=o(()=>n.value?.appearance),r=o(()=>n.value?.font),i=o(()=>n.value?.size),l=o(()=>n.value?.style),v=o(()=>n.value?.color),c=o(()=>n.value?.visible);return E({appearance:a,font:r,size:i,style:l,color:v,visible:c})}function ze(e){const t=d(),n=o(()=>{const i=t.design.value[e],l=t.defaults.value[e],v=t.globalDesign.value;return{overlay:{type:i?.overlay?.type??l?.overlay?.type,solid:{color:f(v,i?.overlay?.solid?.color,l?.overlay?.solid?.color)},gradient:{fromColor:f(v,i?.overlay?.gradient?.fromColor,l?.overlay?.gradient?.fromColor),toColor:f(v,i?.overlay?.gradient?.toColor,l?.overlay?.gradient?.toColor)}},visible:i?.visible??l?.visible??!1}}),a=o(()=>n.value?.overlay),r=o(()=>n.value?.visible);return E({overlay:a,visible:r})}function Xe(){const e=d(),t=o(()=>e.design.value.layout),n=o(()=>t.value);return E({layout:n})}function Fe(){const e=d();return o(()=>{const t=e.design.value.logo,n=e.defaults.value.logo,a=e.globalDesign.value;return{font:C(a,t?.font,n?.font),size:S(a,t?.size,n?.size),bold:t?.bold??n?.bold,italic:t?.italic??n?.italic,color:f(a,t?.color,n?.color),visible:t?.visible??n?.visible??!1,spacing:t?.spacing??n?.spacing??0,capitalization:t?.capitalization??n?.capitalization??"none",frame:xe(a,t?.frame,n?.frame)}})}function Ye(e){const t=d(),n=o(()=>{const r=t.design.value[e],i=t.defaults.value[e];return{value:r?.value??i?.value}}),a=o(()=>n.value?.value);return E({value:a})}function We(e){const t=d(),n=o(()=>{const s=t.design.value[e],u=t.defaults.value[e],g=t.globalDesign.value;return{font:C(g,s?.font,u?.font),size:S(g,s?.size,u?.size),bold:s?.bold??u?.bold,italic:s?.italic??u?.italic,color:f(g,s?.color,u?.color),visible:s?.visible??u?.visible??!1}}),a=o(()=>n.value?.font),r=o(()=>n.value?.size),i=o(()=>n.value?.bold),l=o(()=>n.value?.italic),v=o(()=>n.value?.color),c=o(()=>n.value?.visible);return E({font:a,size:r,bold:i,italic:l,color:v,visible:c})}function Ve(e){const t=d(),n=o(()=>{const u=t.design.value[e],g=t.defaults.value[e],T=t.globalDesign.value;return{font:C(T,u?.font,g?.font),size:S(T,u?.size,g?.size),bold:u?.bold??g?.bold,italic:u?.italic??g?.italic,color:f(T,u?.color,g?.color),visible:u?.visible??g?.visible??!1,whiteSpace:"pre-wrap"}}),a=o(()=>n.value?.font),r=o(()=>n.value?.size),i=o(()=>n.value?.bold),l=o(()=>n.value?.italic),v=o(()=>n.value?.color),c=o(()=>n.value?.visible),s=o(()=>n.value?.whiteSpace);return E({font:a,size:r,bold:i,italic:l,color:v,visible:c,whiteSpace:s})}function He(e){const t=d(),n=o(()=>{const r=t.design.value[e],i=t.defaults.value[e];return{enabled:r?.enabled??i?.enabled}}),a=o(()=>n.value?.enabled);return E({enabled:a})}function $(e){return{app:re(e)}}function je(e,t){return{init:()=>{const{app:n}=$(e);return t?.init?.(n),{mount:(a,r)=>{d().init(n,r.context,r.data.content,r.data.design,r.data.defaults,r.data.externalContent,r.context.globalDesign),t?.mount?.(n,a,r),n.mount(a)},update:a=>{d().update(n,a.data.content,a.data.design,a.data.defaults,a.data.externalContent,a.context.globalDesign),t?.update?.(n,a)},unmount:()=>{t?.unmount?.(n),n.unmount()}}}}}function Je(){return globalThis.window.instantsite}function qe(e,t){return{init:()=>{const{app:n}=$(e);return t?.init?.(n),{render:async(a,r)=>(d().init(n,a,r.content,r.design,r.defaults,r.externalContent,a.globalDesign),t?.render?.(n,a,r),{html:await ie(n,{context:a}),state:{context:a,data:r}})}}}}var z=(e=>(e.SCROLL_TO_TILE="SCROLL_TO_TILE",e.HYPER_LINK="HYPER_LINK",e.MAIL_LINK="MAIL_LINK",e.TEL_LINK="TEL_LINK",e.GO_TO_STORE_LINK="GO_TO_STORE_LINK",e.GO_TO_PAGE="GO_TO_PAGE",e))(z||{}),X=(e=>(e.COLOR="COLOR",e.GRADIENT="GRADIENT",e.NONE="NONE",e))(X||{}),F=(e=>(e.SOLID="SOLID",e.OUTLINE="OUTLINE",e.TEXT="TEXT",e))(F||{}),Y=(e=>(e.SMALL="SMALL",e.MEDIUM="MEDIUM",e.LARGE="LARGE",e))(Y||{}),W=(e=>(e.ROUND_CORNER="ROUND_CORNER",e.RECTANGLE="RECTANGLE",e.PILL="PILL",e))(W||{}),V=(e=>(e.COLOR="COLOR",e.GRADIENT="GRADIENT",e))(V||{}),H=(e=>(e.SECTION="SECTION",e.HEADER="HEADER",e.FOOTER="FOOTER",e))(H||{}),j=(e=>(e[e.Server=0]="Server",e[e.Client=1]="Client",e[e.Misc=2]="Misc",e[e.Layout=3]="Layout",e[e.Asset=4]="Asset",e[e.SharedFiles=5]="SharedFiles",e))(j||{}),J=(e=>(e[e.Server=0]="Server",e[e.Client=1]="Client",e[e.SectionSetting=2]="SectionSetting",e[e.SectionShowcase=3]="SectionShowcase",e[e.SectionAsset=4]="SectionAsset",e[e.TemplateDescriptor=5]="TemplateDescriptor",e[e.PageTemplateDescriptor=6]="PageTemplateDescriptor",e[e.TemplateAsset=7]="TemplateAsset",e[e.Layout=8]="Layout",e[e.LayoutSettings=9]="LayoutSettings",e[e.LayoutAsset=10]="LayoutAsset",e[e.SlotServer=11]="SlotServer",e[e.SlotClient=12]="SlotClient",e[e.SharedTranslation=13]="SharedTranslation",e))(J||{}),q=(e=>(e.SCROLL_TO_TILE="SCROLL_TO_TILE",e.HYPER_LINK="HYPER_LINK",e.MAIL_LINK="MAIL_LINK",e.TEL_LINK="TEL_LINK",e.GO_TO_STORE="GO_TO_STORE",e.GO_TO_STORE_LINK="GO_TO_STORE_LINK",e.GO_TO_PAGE="GO_TO_PAGE",e))(q||{}),Qe=(e=>(e.TEXTAREA="TEXTAREA",e.INPUTBOX="INPUTBOX",e.SELECTBOX="SELECTBOX",e.IMAGE="IMAGE",e.TOGGLE="TOGGLE",e.BUTTON="BUTTON",e.DECK="DECK",e.MENU="MENU",e.NAVIGATION_MENU="NAVIGATION_MENU",e.LOGO="LOGO",e.INFO="INFO",e.DIVIDER="DIVIDER",e))(Qe||{}),Q=(e=>(e.TEXT="TEXT",e.BUTTON="BUTTON",e.IMAGE="IMAGE",e.TOGGLE="TOGGLE",e.SELECTBOX="SELECTBOX",e.BACKGROUND="BACKGROUND",e.COLOR_PICKER="COLOR_PICKER",e.LOGO="LOGO",e.DIVIDER="DIVIDER",e))(Q||{}),Z=(e=>(e.PRODUCT="PRODUCT",e.CATALOG="CATALOG",e.CATEGORY="CATEGORY",e.HOME="HOME",e.CUSTOM="CUSTOM",e))(Z||{}),ee=(e=>(e.CONTENT="Content",e.DESIGN="Design",e))(ee||{}),te=(e=>(e.ORIGINAL="original",e.WEBP_LOW_RES="webp-200x200",e.WEBP_HI_2X_RES="webp-2000x2000",e.MOBILE_WEBP_LOW_RES="cropped-webp-100x200",e.MOBILE_WEBP_HI_RES="cropped-webp-1000x2000",e))(te||{}),ne=(e=>(e.TILE_LOADED="tile-loaded",e.TILE_UNLOADED="tile-unloaded",e))(ne||{});const Ze={apparel_footwear:"apparel_footwear",vape_smoke:"vape_smoke",home_garden:"home_garden",sport_outdoor:"sport_outdoor",jewelry_accessories:"jewelry_accessories",pet_animals:"pet_animals",bikes:"bikes",health_beauty:"health_beauty",gift_shop:"gift_shop",electronics:"electronics",other:"other"},et={PRODUCT_LIST:"CONTROLS",BOTTOM_BAR:"FOOTER",CUSTOM_SLOT:"CUSTOM_SLOT"},tt={CATEGORY_TITLE:"MAIN_TITLE",PRODUCT_LIST:"CONTROLS",BOTTOM_BAR:"FOOTER",CUSTOM_SLOT:"CUSTOM_SLOT"},nt={TOP_BAR:"TOP_BAR",GALLERY:"GALLERY",SIDEBAR:"SIDEBAR",DESCRIPTION:"DESCRIPTION",REVIEW_LIST:"REVIEW_LIST",RELATED_PRODUCTS:"RELATED_PRODUCTS",BOTTOM_BAR:"FOOTER",CUSTOM_SLOT:"CUSTOM_SLOT"};export{q as ActionLinkTypeEnum,V as BackgroundStyleEnum,F as ButtonAppearanceEnum,W as ButtonShapeEnum,Y as ButtonSizeEnum,z as ButtonTypeEnum,et as CatalogLayoutSlot,tt as CategoryLayoutSlot,J as ConfigTypeEnum,Q as DesignEditorType,U as EditorTypes,te as ImageSet,ne as InstantsiteJsEvent,X as OverlayTypeEnum,j as PluginTypeEnum,nt as ProductLayoutSlot,H as SectionTypeEnum,Ze as TemplateCategoriesList,Z as TemplatePageEnum,ee as ValidationTypeEnum,je as createVueClientApp,qe as createVueServerApp,Ke as useBackgroundElementDesign,A as useButtonElementContent,$e as useButtonElementDesign,me as useCategorySelectorElementContent,Ae as useDeckElementContent,D as useImageElementContent,ze as useImageElementDesign,h as useInputboxElementContent,Je as useInstantsiteJsApi,Xe as useLayoutElementDesign,De as useLogoElementContent,Fe as useLogoElementDesign,P as useMenuElementContent,Me as useNavigationMenuElementContent,Ue as useProductSelectorElementContent,w as useSelectboxElementContent,Ye as useSelectboxElementDesign,We as useTextElementDesign,M as useTextareaElementContent,Ve as useTextareaElementDesign,B as useToggleElementContent,He as useToggleElementDesign,ke as useTranslation,d as useVueBaseProps};
|