@toototech/webbuilder-plugins 0.1.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 +1 -0
- package/README.md +3 -0
- package/dist/basic/cssScope.d.ts +3 -0
- package/dist/basic/index.d.ts +81 -0
- package/dist/basic/injectStyle.d.ts +20 -0
- package/dist/basic/plugin.d.ts +19 -0
- package/dist/basic/publisher.d.ts +4 -0
- package/dist/basic/registries/interactive/accordion/index.d.ts +3 -0
- package/dist/basic/registries/interactive/backButton/index.d.ts +3 -0
- package/dist/basic/registries/interactive/button/index.d.ts +10 -0
- package/dist/basic/registries/interactive/countUp/index.d.ts +9 -0
- package/dist/basic/registries/interactive/customCode/index.d.ts +3 -0
- package/dist/basic/registries/interactive/index.d.ts +2 -0
- package/dist/basic/registries/interactive/inquiryForm/index.d.ts +3 -0
- package/dist/basic/registries/interactive/klaviyoSubscribe/index.d.ts +3 -0
- package/dist/basic/registries/interactive/popup/index.d.ts +5 -0
- package/dist/basic/registries/interactive/salesmartlyChatButton/index.d.ts +10 -0
- package/dist/basic/registries/interactive/search/index.d.ts +10 -0
- package/dist/basic/registries/interactive/socialShare/index.d.ts +33 -0
- package/dist/basic/registries/interactive/tabs/index.d.ts +3 -0
- package/dist/basic/registries/layout/container/index.d.ts +19 -0
- package/dist/basic/registries/layout/divider/index.d.ts +7 -0
- package/dist/basic/registries/layout/grid/index.d.ts +11 -0
- package/dist/basic/registries/layout/index.d.ts +2 -0
- package/dist/basic/registries/layout/layoutBase/index.d.ts +10 -0
- package/dist/basic/registries/layout/section/index.d.ts +3 -0
- package/dist/basic/registries/layout/sectionGridBlock/index.d.ts +3 -0
- package/dist/basic/registries/layout/spacer/index.d.ts +7 -0
- package/dist/basic/registries/media/banner/index.d.ts +11 -0
- package/dist/basic/registries/media/carousel/index.d.ts +6 -0
- package/dist/basic/registries/media/flipbook/index.d.ts +5 -0
- package/dist/basic/registries/media/icon/index.d.ts +3 -0
- package/dist/basic/registries/media/image/index.d.ts +3 -0
- package/dist/basic/registries/media/index.d.ts +2 -0
- package/dist/basic/registries/media/industryTabs/index.d.ts +3 -0
- package/dist/basic/registries/media/marquee/index.d.ts +4 -0
- package/dist/basic/registries/media/ourSolutions/helpers.d.ts +289 -0
- package/dist/basic/registries/media/ourSolutions/index.d.ts +4 -0
- package/dist/basic/registries/media/ourSolutions/script.d.ts +1 -0
- package/dist/basic/registries/media/ourSolutions/style.d.ts +1 -0
- package/dist/basic/registries/media/pdfViewer/index.d.ts +3 -0
- package/dist/basic/registries/media/productCategories/index.d.ts +4 -0
- package/dist/basic/registries/media/tabMediaGallery/index.d.ts +3 -0
- package/dist/basic/registries/media/video/index.d.ts +12 -0
- package/dist/basic/registries/navigation/footer/index.d.ts +10 -0
- package/dist/basic/registries/navigation/index.d.ts +2 -0
- package/dist/basic/registries/navigation/languageSwitcher/index.d.ts +6 -0
- package/dist/basic/registries/navigation/logo/index.d.ts +9 -0
- package/dist/basic/registries/navigation/navbar/constants.d.ts +38 -0
- package/dist/basic/registries/navigation/navbar/factories.d.ts +848 -0
- package/dist/basic/registries/navigation/navbar/helpers.d.ts +12 -0
- package/dist/basic/registries/navigation/navbar/index.d.ts +4 -0
- package/dist/basic/registries/navigation/navbar/registerMegaTypes.d.ts +2 -0
- package/dist/basic/registries/navigation/navbar/registerMenuTypes.d.ts +2 -0
- package/dist/basic/registries/navigation/navbar/registerRootTypes.d.ts +2 -0
- package/dist/basic/registries/navigation/navbar/script.d.ts +1 -0
- package/dist/basic/registries/navigation/navbar/style.d.ts +1 -0
- package/dist/basic/registries/navigation/socialLinks/index.d.ts +3 -0
- package/dist/basic/registries/section/allApplications/index.d.ts +3 -0
- package/dist/basic/registries/section/cardCarouselSection/index.d.ts +3 -0
- package/dist/basic/registries/section/caseSpotlight/index.d.ts +3 -0
- package/dist/basic/registries/section/companyScale/index.d.ts +3 -0
- package/dist/basic/registries/section/customizationGrid/index.d.ts +3 -0
- package/dist/basic/registries/section/factoryMap/index.d.ts +3 -0
- package/dist/basic/registries/section/focaHistoryTimeline/index.d.ts +3 -0
- package/dist/basic/registries/section/historyTimeline/index.d.ts +3 -0
- package/dist/basic/registries/section/homeBannerCarousel/index.d.ts +4 -0
- package/dist/basic/registries/section/hotspotShowcase/index.d.ts +30 -0
- package/dist/basic/registries/section/index.d.ts +2 -0
- package/dist/basic/registries/section/map/index.d.ts +4 -0
- package/dist/basic/registries/section/milestoneCardStrip/index.d.ts +3 -0
- package/dist/basic/registries/section/moreCardCarousel/index.d.ts +3 -0
- package/dist/basic/registries/section/ourAdvantages/index.d.ts +4 -0
- package/dist/basic/registries/section/overviewSplit/index.d.ts +3 -0
- package/dist/basic/registries/section/processTimeline/index.d.ts +3 -0
- package/dist/basic/registries/section/productCardStrip/index.d.ts +3 -0
- package/dist/basic/registries/section/resourceSection/index.d.ts +6 -0
- package/dist/basic/registries/section/responsiveHeroCarousel/index.d.ts +4 -0
- package/dist/basic/registries/section/serviceIconGrid/index.d.ts +4 -0
- package/dist/basic/registries/section/servicesCarousel/index.d.ts +4 -0
- package/dist/basic/registries/section/servicesShowcase/index.d.ts +4 -0
- package/dist/basic/registries/section/servicesThb/index.d.ts +4 -0
- package/dist/basic/registries/section/solutionList/index.d.ts +4 -0
- package/dist/basic/registries/section/staticPinMap/index.d.ts +4 -0
- package/dist/basic/registries/section/statsCards/index.d.ts +3 -0
- package/dist/basic/registries/section/swiperRuntime.d.ts +3 -0
- package/dist/basic/registries/shared/sharedTraits.d.ts +37 -0
- package/dist/basic/registries/types.d.ts +5 -0
- package/dist/basic/registries/typography/heading/index.d.ts +8 -0
- package/dist/basic/registries/typography/index.d.ts +2 -0
- package/dist/basic/registries/typography/textEditor/index.d.ts +6 -0
- package/dist/basic/registryManifest.d.ts +9 -0
- package/dist/basic/styleHelpers.d.ts +29 -0
- package/dist/basic/svgIcon.d.ts +11 -0
- package/dist/basic/traitBridge.d.ts +20 -0
- package/dist/basic/traitFactory.d.ts +106 -0
- package/dist/basic.js +1146 -0
- package/dist/cms/cmsFactory.d.ts +164 -0
- package/dist/cms/dynamicRenderPipeline.d.ts +12 -0
- package/dist/cms/index.d.ts +31 -0
- package/dist/cms/plugin.d.ts +12 -0
- package/dist/cms/publisher.d.ts +7 -0
- package/dist/cms/registries/dynamic/cms/constants.d.ts +16 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/bindings.d.ts +78 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/breadcrumbBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/conditionalBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/datetimeBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/htmlBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/imageBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/linkBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/seoBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/textBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/tocBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/constants.d.ts +19 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/helpers.d.ts +52 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/registerBlock.d.ts +57 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/styles.d.ts +7 -0
- package/dist/cms/registries/dynamic/cms/media/previewMediaTrait.d.ts +7 -0
- package/dist/cms/registries/dynamic/cms/menu/siteMenuAttrs.d.ts +11 -0
- package/dist/cms/registries/dynamic/cms/menuTree/menuTreeAttrs.d.ts +8 -0
- package/dist/cms/registries/dynamic/cms/post/styles.d.ts +6 -0
- package/dist/cms/registries/dynamic/cms/product/detail.styles.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/product/detailV2.styles.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/product/previewProductTrait.d.ts +6 -0
- package/dist/cms/registries/dynamic/cms/product/styles.d.ts +6 -0
- package/dist/cms/registries/dynamic/dataProvider.d.ts +45 -0
- package/dist/cms/registries/dynamic/loopGrid/paginationStyles.d.ts +5 -0
- package/dist/cms/registries/dynamic/loopGrid/preview.d.ts +16 -0
- package/dist/cms/registries/dynamic/loopGrid/publisher.d.ts +3 -0
- package/dist/cms/registries/dynamic/loopGrid/types.d.ts +97 -0
- package/dist/cms/registries/navigation/navbarThb/index.d.ts +3 -0
- package/dist/cms/registries/navigation/navbarThb/script.d.ts +1 -0
- package/dist/cms/registries/navigation/navbarThb/style.d.ts +1 -0
- package/dist/cms.js +4535 -0
- package/dist/global-settings/components/FontFamilySelect.vue.d.ts +29 -0
- package/dist/global-settings/components/FontManagerPanel.vue.d.ts +37 -0
- package/dist/global-settings/index.d.ts +8 -0
- package/dist/global-settings/plugin.d.ts +3 -0
- package/dist/global-settings/publisher.d.ts +15 -0
- package/dist/global-settings/runtime/canvasInjection.d.ts +13 -0
- package/dist/global-settings/runtime/panelDraftSave.d.ts +17 -0
- package/dist/global-settings/runtime/settingsSource.d.ts +4 -0
- package/dist/global-settings/useFontManager.d.ts +38 -0
- package/dist/global-settings/useGoogleFonts.d.ts +20 -0
- package/dist/global-settings/vue.d.ts +1 -0
- package/dist/global-settings.js +66 -0
- package/dist/i18n/I18nPanel.vue.d.ts +23 -0
- package/dist/i18n/i18n.d.ts +25 -0
- package/dist/i18n/index.d.ts +7 -0
- package/dist/i18n/languageOrder.d.ts +9 -0
- package/dist/i18n/plugin.d.ts +21 -0
- package/dist/i18n/types.d.ts +101 -0
- package/dist/i18n/useWebBuilderI18n.d.ts +164 -0
- package/dist/i18n/vue.d.ts +1 -0
- package/dist/i18n-BYR3l48y.js +959 -0
- package/dist/i18n.js +929 -0
- package/dist/index-CxJlLwvG.js +35378 -0
- package/dist/index-DWfJ4PBm.js +5724 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +12 -0
- package/dist/layout-template/components/LayoutPanel.vue.d.ts +37 -0
- package/dist/layout-template/components/TemplateRulesPanel.vue.d.ts +41 -0
- package/dist/layout-template/config/layoutSharedResources.d.ts +9 -0
- package/dist/layout-template/config/templateSharedResources.d.ts +28 -0
- package/dist/layout-template/index.d.ts +9 -0
- package/dist/layout-template/plugin.d.ts +13 -0
- package/dist/layout-template/runtime/storageAdapter.d.ts +49 -0
- package/dist/layout-template/utils/layoutProjectData.d.ts +15 -0
- package/dist/layout-template/utils/layoutRulePages.d.ts +19 -0
- package/dist/layout-template/utils/layoutSettings.d.ts +45 -0
- package/dist/layout-template/utils/templateRules.d.ts +52 -0
- package/dist/layout-template/vue.d.ts +2 -0
- package/dist/layout-template.js +435 -0
- package/dist/layoutSettings-D4SYUMri.js +252 -0
- package/dist/plugin-BPA8qlaC.js +40 -0
- package/dist/plugin-C0PrxrIe.js +228 -0
- package/dist/plugin-DQshk1sY.js +361 -0
- package/dist/plugin-DebyCjXx.js +191 -0
- package/dist/plugin-Dr6TOtyH.js +73 -0
- package/dist/publisher/index.d.ts +5 -0
- package/dist/publisher/publisherAssets.d.ts +9 -0
- package/dist/publisher/publisherComponents.d.ts +7 -0
- package/dist/publisher/publisherPlugins.d.ts +12 -0
- package/dist/publisher-C6VWXq8u.js +25 -0
- package/dist/publisher.js +1711 -0
- package/dist/solar-BsElUqfQ.js +29843 -0
- package/dist/style.css +1181 -0
- package/dist/templateSharedResources-D1u7eFIs.js +89 -0
- package/dist/types-DNbok59z.js +2359 -0
- package/dist/useFontManager-CdrLq1eG.js +336 -0
- package/dist/vue.d.ts +3 -0
- package/dist/vue.js +2171 -0
- package/package.json +77 -0
package/LICENSE
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
MIT
|
package/README.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function transformCssSelectors(css: string, transform: (selector: string) => string): string;
|
|
2
|
+
export declare function removeCssRulesByPrefixes(cssComposer: any, prefixes: string[]): void;
|
|
3
|
+
export declare function removeUngroupedCssRulesByPrefixes(cssComposer: any, prefixes: string[]): void;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export type { WebBuilderBlock, WebBuilderBlockPack, WebBuilderBlockPackProvider, } from '@toototech/webbuilder/core';
|
|
2
|
+
export * from './traitFactory.js';
|
|
3
|
+
export * from './traitBridge.js';
|
|
4
|
+
export * from './styleHelpers.js';
|
|
5
|
+
export * from './injectStyle.js';
|
|
6
|
+
export * from './cssScope.js';
|
|
7
|
+
export * from './svgIcon.js';
|
|
8
|
+
export * from './plugin.js';
|
|
9
|
+
export * from './publisher.js';
|
|
10
|
+
export * from './registryManifest.js';
|
|
11
|
+
export * from './registries/types.js';
|
|
12
|
+
export * from './registries/layout/index.js';
|
|
13
|
+
export * from './registries/typography/index.js';
|
|
14
|
+
export * from './registries/layout/container/index.js';
|
|
15
|
+
export * from './registries/layout/grid/index.js';
|
|
16
|
+
export * from './registries/layout/layoutBase/index.js';
|
|
17
|
+
export * from './registries/layout/section/index.js';
|
|
18
|
+
export * from './registries/layout/sectionGridBlock/index.js';
|
|
19
|
+
export * from './registries/layout/spacer/index.js';
|
|
20
|
+
export * from './registries/layout/divider/index.js';
|
|
21
|
+
export * from './registries/typography/heading/index.js';
|
|
22
|
+
export * from './registries/typography/textEditor/index.js';
|
|
23
|
+
export * from './registries/interactive/index.js';
|
|
24
|
+
export * from './registries/interactive/accordion/index.js';
|
|
25
|
+
export * from './registries/interactive/backButton/index.js';
|
|
26
|
+
export * from './registries/interactive/button/index.js';
|
|
27
|
+
export * from './registries/interactive/countUp/index.js';
|
|
28
|
+
export * from './registries/interactive/customCode/index.js';
|
|
29
|
+
export * from './registries/interactive/inquiryForm/index.js';
|
|
30
|
+
export * from './registries/interactive/klaviyoSubscribe/index.js';
|
|
31
|
+
export * from './registries/interactive/popup/index.js';
|
|
32
|
+
export * from './registries/interactive/salesmartlyChatButton/index.js';
|
|
33
|
+
export * from './registries/interactive/search/index.js';
|
|
34
|
+
export * from './registries/interactive/socialShare/index.js';
|
|
35
|
+
export * from './registries/interactive/tabs/index.js';
|
|
36
|
+
export * from './registries/media/index.js';
|
|
37
|
+
export * from './registries/media/banner/index.js';
|
|
38
|
+
export * from './registries/media/carousel/index.js';
|
|
39
|
+
export * from './registries/media/flipbook/index.js';
|
|
40
|
+
export * from './registries/media/icon/index.js';
|
|
41
|
+
export * from './registries/media/image/index.js';
|
|
42
|
+
export * from './registries/media/industryTabs/index.js';
|
|
43
|
+
export * from './registries/media/marquee/index.js';
|
|
44
|
+
export * from './registries/media/ourSolutions/index.js';
|
|
45
|
+
export * from './registries/media/pdfViewer/index.js';
|
|
46
|
+
export * from './registries/media/productCategories/index.js';
|
|
47
|
+
export * from './registries/media/tabMediaGallery/index.js';
|
|
48
|
+
export * from './registries/media/video/index.js';
|
|
49
|
+
export * from './registries/navigation/index.js';
|
|
50
|
+
export * from './registries/navigation/footer/index.js';
|
|
51
|
+
export * from './registries/navigation/languageSwitcher/index.js';
|
|
52
|
+
export * from './registries/navigation/logo/index.js';
|
|
53
|
+
export * from './registries/navigation/navbar/index.js';
|
|
54
|
+
export * from './registries/navigation/socialLinks/index.js';
|
|
55
|
+
export * from './registries/section/index.js';
|
|
56
|
+
export * from './registries/section/allApplications/index.js';
|
|
57
|
+
export * from './registries/section/cardCarouselSection/index.js';
|
|
58
|
+
export * from './registries/section/caseSpotlight/index.js';
|
|
59
|
+
export * from './registries/section/companyScale/index.js';
|
|
60
|
+
export * from './registries/section/customizationGrid/index.js';
|
|
61
|
+
export * from './registries/section/factoryMap/index.js';
|
|
62
|
+
export * from './registries/section/focaHistoryTimeline/index.js';
|
|
63
|
+
export * from './registries/section/historyTimeline/index.js';
|
|
64
|
+
export * from './registries/section/homeBannerCarousel/index.js';
|
|
65
|
+
export * from './registries/section/hotspotShowcase/index.js';
|
|
66
|
+
export * from './registries/section/map/index.js';
|
|
67
|
+
export * from './registries/section/milestoneCardStrip/index.js';
|
|
68
|
+
export * from './registries/section/moreCardCarousel/index.js';
|
|
69
|
+
export * from './registries/section/ourAdvantages/index.js';
|
|
70
|
+
export * from './registries/section/overviewSplit/index.js';
|
|
71
|
+
export * from './registries/section/processTimeline/index.js';
|
|
72
|
+
export * from './registries/section/productCardStrip/index.js';
|
|
73
|
+
export * from './registries/section/resourceSection/index.js';
|
|
74
|
+
export * from './registries/section/responsiveHeroCarousel/index.js';
|
|
75
|
+
export * from './registries/section/serviceIconGrid/index.js';
|
|
76
|
+
export * from './registries/section/servicesCarousel/index.js';
|
|
77
|
+
export * from './registries/section/servicesShowcase/index.js';
|
|
78
|
+
export * from './registries/section/servicesThb/index.js';
|
|
79
|
+
export * from './registries/section/solutionList/index.js';
|
|
80
|
+
export * from './registries/section/staticPinMap/index.js';
|
|
81
|
+
export * from './registries/section/statsCards/index.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 向 GrapesJS editor 注入全局 CSS,保证每个 key 只注入一次。
|
|
3
|
+
* 使用 editor.__wbStyles Map 跟踪已注入的样式,避免污染 editor 对象的任意属性。
|
|
4
|
+
*
|
|
5
|
+
* 同时注入到:
|
|
6
|
+
* 1. editor.addStyle() — 用于发布/导出时的 CSS 输出
|
|
7
|
+
* 2. canvas iframe <head> — 用于编辑器画布中的实时预览
|
|
8
|
+
*/
|
|
9
|
+
export declare function injectStyleOnce(editor: any, key: string, css: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* 读取通过 injectStyleOnce 注册的发布样式。
|
|
12
|
+
* 这类样式会注入编辑器 iframe,但在 component 级别 getCss({ component }) 场景下
|
|
13
|
+
* 可能不会完整出现在导出结果里,因此发布和代码预览需要手动补入。
|
|
14
|
+
*/
|
|
15
|
+
export declare function getInjectedPublishCss(editor: any, html?: string, existingCss?: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* 仅向画布 iframe 注入 CSS,不写入 editor CSS 输出/项目 schema。
|
|
18
|
+
* 适用于网格辅助线这类纯编辑器预览样式。
|
|
19
|
+
*/
|
|
20
|
+
export declare function injectCanvasStyleOnce(editor: any, key: string, css: string): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { WebBuilderFeaturePlugin } from '@toototech/webbuilder/core';
|
|
2
|
+
import type { ComponentRegistryExecutor } from './registries/types.js';
|
|
3
|
+
import { type BasicRegistryManifestEntry } from './registryManifest.js';
|
|
4
|
+
export declare const BASIC_COMPONENTS_PLUGIN_ID = "components-basic";
|
|
5
|
+
export interface BasicRegistryFailureDiagnostic {
|
|
6
|
+
registryId: string;
|
|
7
|
+
message: string;
|
|
8
|
+
error: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface ComponentsBasicPluginOptions {
|
|
11
|
+
alwaysEnabled?: boolean;
|
|
12
|
+
includeOptional?: boolean;
|
|
13
|
+
throwOnOptionalFailure?: boolean;
|
|
14
|
+
registries?: readonly ComponentRegistryExecutor[];
|
|
15
|
+
manifest?: readonly BasicRegistryManifestEntry[];
|
|
16
|
+
onRegistrationFailure?: (diagnostic: BasicRegistryFailureDiagnostic) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const BASIC_COMPONENT_REGISTRIES: ComponentRegistryExecutor[];
|
|
19
|
+
export declare const componentsBasic: (options?: ComponentsBasicPluginOptions) => WebBuilderFeaturePlugin;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Editor } from 'grapesjs';
|
|
2
|
+
import type { ComponentRegistryExecutor } from './registries/types.js';
|
|
3
|
+
export declare const BASIC_PUBLISHER_REGISTRIES: ComponentRegistryExecutor[];
|
|
4
|
+
export declare function registerBasicPublisherComponents(editor: Editor): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Editor } from 'grapesjs';
|
|
2
|
+
export declare const WB_BUTTON_TYPE = "wb-button";
|
|
3
|
+
/**
|
|
4
|
+
* 注册按钮组件(参考 Elementor Button Widget)
|
|
5
|
+
*
|
|
6
|
+
* 视觉样式属性(background-color、color、border-radius、padding、font-size)
|
|
7
|
+
* 已迁移到 StyleManager,初始值通过 defaults.style 提供。
|
|
8
|
+
* Traits 仅保留逻辑属性:buttonText、linkUrl、linkTarget。
|
|
9
|
+
*/
|
|
10
|
+
export declare function registerButtonComponent(editor: Editor): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Editor } from 'grapesjs';
|
|
2
|
+
export declare const WB_COUNT_UP_TYPE = "wb-count-up";
|
|
3
|
+
/**
|
|
4
|
+
* 注册数字滚动组件(基于 CountUp.js)
|
|
5
|
+
*
|
|
6
|
+
* 编辑器中展示静态终值,发布页通过 IntersectionObserver 在元素进入视口时触发动画。
|
|
7
|
+
* CountUp.js 通过 CDN 按需注入,不影响编辑器性能。
|
|
8
|
+
*/
|
|
9
|
+
export declare function registerCountUpComponent(editor: Editor): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Editor } from 'grapesjs';
|
|
2
|
+
export declare const WB_POPUP_TYPE = "wb-popup";
|
|
3
|
+
export declare const WB_POPUP_TEMPLATE_REF_TYPE = "wb-popup-template-ref";
|
|
4
|
+
export declare const WB_POPUP_TRIGGER_TYPE = "wb-popup-trigger";
|
|
5
|
+
export declare function registerPopupComponent(editor: Editor): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Editor } from 'grapesjs';
|
|
2
|
+
export declare const WB_SALESMARTLY_CHAT_BUTTON_TYPE = "wb-salesmartly-chat-button";
|
|
3
|
+
declare global {
|
|
4
|
+
interface Window {
|
|
5
|
+
ssq?: {
|
|
6
|
+
push: (event: string) => void;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare function registerSalesmartlyChatButtonComponent(editor: Editor): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* search.ts — Fullscreen Search Spotlight block
|
|
3
|
+
*
|
|
4
|
+
* A standalone, droppable search widget: trigger button + fullscreen overlay modal.
|
|
5
|
+
* Can be placed anywhere — inside a navbar, hero section, or standalone in the page.
|
|
6
|
+
*/
|
|
7
|
+
import type { Editor } from 'grapesjs';
|
|
8
|
+
export declare function registerSearch(editor: Editor): void;
|
|
9
|
+
export declare const WB_SEARCH_TYPE = "search-spotlight";
|
|
10
|
+
export declare function registerSearchComponent(editor: import('grapesjs').Editor): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 社媒分享组件(Social Share)
|
|
3
|
+
*
|
|
4
|
+
* 用途:
|
|
5
|
+
* 放在文章 / 产品 / 媒体等详情页底部,供访客一键将当前页面
|
|
6
|
+
* 分享到 Facebook / Twitter(X) / LinkedIn / Pinterest / WhatsApp / Email 或复制链接。
|
|
7
|
+
*
|
|
8
|
+
* 设计要点:
|
|
9
|
+
* 1. 默认分享内容取自运行时环境 —— `window.location.href` + `document.title`,
|
|
10
|
+
* 天然跟随当前页面,**不依赖任何后端字段绑定**,在任何页面都可使用。
|
|
11
|
+
* 2. 如需自定义分享 URL / 文案,可在 trait 中填入,会写到根元素 data-share-url /
|
|
12
|
+
* data-share-text,运行时优先使用这两个值(支持 `{{post.url}}` 这类占位符,
|
|
13
|
+
* 由后端模板引擎替换)。
|
|
14
|
+
* 3. 平台开关 / 按钮形状 / 大小通过 trait 配置,syncAttrs 到根元素的 data-share-*
|
|
15
|
+
* 以便 CSS 精确控制按钮展示与样式。
|
|
16
|
+
* 4. 按钮点击通过 script / script-export 注入,发布后的页面也能独立工作。
|
|
17
|
+
*
|
|
18
|
+
* 运行时输出(简化示意):
|
|
19
|
+
* ```html
|
|
20
|
+
* <div data-wb-component="social-share"
|
|
21
|
+
* data-share-shape="rounded" data-share-size="md"
|
|
22
|
+
* data-share-enabled="facebook twitter linkedin copy">
|
|
23
|
+
* <h3 class="wb-social-share__title">Share</h3>
|
|
24
|
+
* <div class="wb-social-share__list">
|
|
25
|
+
* <a class="wb-social-share__btn" data-wb-share="facebook" ...>...</a>
|
|
26
|
+
* ...
|
|
27
|
+
* </div>
|
|
28
|
+
* </div>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
import type { Editor } from 'grapesjs';
|
|
32
|
+
export declare const WB_SOCIAL_SHARE_TYPE = "wb-social-share";
|
|
33
|
+
export declare function registerSocialShareComponent(editor: Editor): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Editor } from 'grapesjs';
|
|
2
|
+
export declare const WB_CONTAINER_TYPE = "wb-container";
|
|
3
|
+
export declare function createContainerBlockContent(overrides?: Record<string, any>): {
|
|
4
|
+
type: string;
|
|
5
|
+
contentWidth: string;
|
|
6
|
+
boxedWidth: number;
|
|
7
|
+
widthValue: number;
|
|
8
|
+
widthUnit: string;
|
|
9
|
+
style: any;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 注册容器组件(参考 Elementor Container 的核心布局能力)
|
|
13
|
+
*
|
|
14
|
+
* flex 布局属性(flex-direction、justify-content、align-items、flex-wrap、gap)
|
|
15
|
+
* 和背景属性已迁移到 StyleManager(wb-layout / wb-background sector),
|
|
16
|
+
* 初始值通过 defaults.style 提供,用户通过"样式"面板修改。
|
|
17
|
+
* Traits 仅保留宽度相关属性(contentWidth / boxed 模式)。
|
|
18
|
+
*/
|
|
19
|
+
export declare function registerContainerComponent(editor: Editor): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Editor } from 'grapesjs';
|
|
2
|
+
export declare const WB_GRID_TYPE = "wb-grid";
|
|
3
|
+
/**
|
|
4
|
+
* 注册网格组件(参考 Elementor Grid Container)
|
|
5
|
+
*
|
|
6
|
+
* grid 布局属性(grid-auto-flow、justify-items、align-items、gap)
|
|
7
|
+
* 和背景属性已迁移到 StyleManager(wb-layout / wb-background sector),
|
|
8
|
+
* 初始值通过 defaults.style 提供。
|
|
9
|
+
* Traits 保留:宽度、grid-template 列/行计算、showGridOutline。
|
|
10
|
+
*/
|
|
11
|
+
export declare function registerGridComponent(editor: Editor): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Editor } from 'grapesjs';
|
|
2
|
+
export declare const WB_LAYOUT_BASE_TYPE = "wb-layout-base";
|
|
3
|
+
/**
|
|
4
|
+
* 注册布局基础类型(抽象基类,不直接用于画布)
|
|
5
|
+
* container / grid 通过 extend: 'wb-layout-base' 继承共享的属性默认值与方法
|
|
6
|
+
*
|
|
7
|
+
* 背景和最小高度属性已迁移到 StyleManager(wb-layout / wb-background sector),
|
|
8
|
+
* 此处仅保留宽度相关的 trait 与方法。
|
|
9
|
+
*/
|
|
10
|
+
export declare function registerLayoutBase(editor: Editor): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Editor, Plugin } from 'grapesjs';
|
|
2
|
+
export declare const WB_BANNER_TYPE = "wb-banner";
|
|
3
|
+
export declare const WB_BANNER_SLIDE_TYPE = "wb-banner-slide";
|
|
4
|
+
export interface BannerPluginOptions {
|
|
5
|
+
category?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
addBlock?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function registerBannerComponent(editor: Editor): void;
|
|
10
|
+
declare const gjsBanner: Plugin<BannerPluginOptions>;
|
|
11
|
+
export default gjsBanner;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Editor } from 'grapesjs';
|
|
2
|
+
export declare const WB_FLIPBOOK_TYPE = "wb-flipbook";
|
|
3
|
+
export declare const WB_FLIPBOOK_PAGE_TYPE = "wb-flipbook-page";
|
|
4
|
+
export declare function sanitizeFlipbookProjectData(projectData: any): any;
|
|
5
|
+
export declare function registerFlipbookComponent(editor: Editor): void;
|