@duongthiu/onex-core 0.1.0 → 0.1.1
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/README.md +44 -65
- package/THEME_API.md +36 -33
- package/dist/api.js +14 -0
- package/dist/api.js.map +1 -0
- package/dist/api.mjs +5 -0
- package/dist/api.mjs.map +1 -0
- package/dist/auth.js +23 -0
- package/dist/auth.js.map +1 -0
- package/dist/auth.mjs +6 -0
- package/dist/auth.mjs.map +1 -0
- package/dist/blog.js +22 -0
- package/dist/blog.js.map +1 -0
- package/dist/blog.mjs +5 -0
- package/dist/blog.mjs.map +1 -0
- package/dist/cart.js +27 -0
- package/dist/cart.js.map +1 -0
- package/dist/cart.mjs +6 -0
- package/dist/cart.mjs.map +1 -0
- package/dist/chunk-2CSWHI3L.js +210 -0
- package/dist/chunk-2CSWHI3L.js.map +1 -0
- package/dist/chunk-2FGHIDUV.js +99 -0
- package/dist/chunk-2FGHIDUV.js.map +1 -0
- package/dist/chunk-2NMEKWO5.js +40 -0
- package/dist/chunk-2NMEKWO5.js.map +1 -0
- package/dist/chunk-43BVHGDT.mjs +131 -0
- package/dist/chunk-43BVHGDT.mjs.map +1 -0
- package/dist/chunk-4JVQJI3I.mjs +290 -0
- package/dist/chunk-4JVQJI3I.mjs.map +1 -0
- package/dist/chunk-5N2EKK5O.js +9550 -0
- package/dist/chunk-5N2EKK5O.js.map +1 -0
- package/dist/chunk-5T6NDVSN.js +76 -0
- package/dist/chunk-5T6NDVSN.js.map +1 -0
- package/dist/chunk-73AINNCI.mjs +201 -0
- package/dist/chunk-73AINNCI.mjs.map +1 -0
- package/dist/chunk-AIXBDAVP.mjs +61 -0
- package/dist/chunk-AIXBDAVP.mjs.map +1 -0
- package/dist/chunk-ALYN5HAC.js +210 -0
- package/dist/chunk-ALYN5HAC.js.map +1 -0
- package/dist/chunk-AREMJR3Q.js +36 -0
- package/dist/chunk-AREMJR3Q.js.map +1 -0
- package/dist/chunk-DXAI6XOI.mjs +33 -0
- package/dist/chunk-DXAI6XOI.mjs.map +1 -0
- package/dist/chunk-F5TFNWFJ.mjs +257 -0
- package/dist/chunk-F5TFNWFJ.mjs.map +1 -0
- package/dist/chunk-FQ7FWUZN.js +265 -0
- package/dist/chunk-FQ7FWUZN.js.map +1 -0
- package/dist/{chunk-3SZX6LHT.js → chunk-J27VGXJH.js} +2 -24
- package/dist/chunk-J27VGXJH.js.map +1 -0
- package/dist/chunk-JZ46LLTZ.js +121 -0
- package/dist/chunk-JZ46LLTZ.js.map +1 -0
- package/dist/chunk-K24UHN6G.mjs +76 -0
- package/dist/chunk-K24UHN6G.mjs.map +1 -0
- package/dist/chunk-KCQGGU5R.mjs +344 -0
- package/dist/chunk-KCQGGU5R.mjs.map +1 -0
- package/dist/chunk-MT22NYKT.mjs +117 -0
- package/dist/chunk-MT22NYKT.mjs.map +1 -0
- package/dist/chunk-NDD472IZ.js +85 -0
- package/dist/chunk-NDD472IZ.js.map +1 -0
- package/dist/chunk-NHOIGGYU.mjs +833 -0
- package/dist/chunk-NHOIGGYU.mjs.map +1 -0
- package/dist/chunk-O3XR7TW3.mjs +12 -0
- package/dist/chunk-O3XR7TW3.mjs.map +1 -0
- package/dist/chunk-OAPYSC2X.mjs +206 -0
- package/dist/chunk-OAPYSC2X.mjs.map +1 -0
- package/dist/{chunk-XE4EOKS4.mjs → chunk-ONJREDYY.mjs} +3 -23
- package/dist/chunk-ONJREDYY.mjs.map +1 -0
- package/dist/chunk-OVT2LUAM.js +197 -0
- package/dist/chunk-OVT2LUAM.js.map +1 -0
- package/dist/chunk-OWNGNGKL.js +331 -0
- package/dist/chunk-OWNGNGKL.js.map +1 -0
- package/dist/chunk-P7SXNZSV.js +298 -0
- package/dist/chunk-P7SXNZSV.js.map +1 -0
- package/dist/chunk-PFJOL3HI.mjs +71 -0
- package/dist/chunk-PFJOL3HI.mjs.map +1 -0
- package/dist/chunk-PPULMWJ6.js +295 -0
- package/dist/chunk-PPULMWJ6.js.map +1 -0
- package/dist/chunk-RGIVKACG.js +359 -0
- package/dist/chunk-RGIVKACG.js.map +1 -0
- package/dist/chunk-RPP5K2LP.js +870 -0
- package/dist/chunk-RPP5K2LP.js.map +1 -0
- package/dist/{chunk-7EON6Q4L.mjs → chunk-RUCHWUD7.mjs} +7651 -6370
- package/dist/chunk-RUCHWUD7.mjs.map +1 -0
- package/dist/chunk-SEVUIX4H.js +137 -0
- package/dist/chunk-SEVUIX4H.js.map +1 -0
- package/dist/chunk-SK2FSHFM.mjs +208 -0
- package/dist/chunk-SK2FSHFM.mjs.map +1 -0
- package/dist/chunk-T6EJ2GAV.mjs +294 -0
- package/dist/chunk-T6EJ2GAV.mjs.map +1 -0
- package/dist/chunk-ULBDOFZI.mjs +302 -0
- package/dist/chunk-ULBDOFZI.mjs.map +1 -0
- package/dist/chunk-V3JIELNV.js +241 -0
- package/dist/chunk-V3JIELNV.js.map +1 -0
- package/dist/chunk-V5E2KWMA.mjs +238 -0
- package/dist/chunk-V5E2KWMA.mjs.map +1 -0
- package/dist/chunk-VJA3ER6A.js +14 -0
- package/dist/chunk-VJA3ER6A.js.map +1 -0
- package/dist/chunk-VLI7ULX5.js +66 -0
- package/dist/chunk-VLI7ULX5.js.map +1 -0
- package/dist/chunk-WFGS5OFH.mjs +189 -0
- package/dist/chunk-WFGS5OFH.mjs.map +1 -0
- package/dist/chunk-WVC5GP24.mjs +96 -0
- package/dist/chunk-WVC5GP24.mjs.map +1 -0
- package/dist/chunk-YOSPWY5K.mjs +36 -0
- package/dist/chunk-YOSPWY5K.mjs.map +1 -0
- package/dist/chunk-ZFFXXLX7.js +205 -0
- package/dist/chunk-ZFFXXLX7.js.map +1 -0
- package/dist/client.js +512 -249
- package/dist/client.mjs +21 -2
- package/dist/components.js +393 -0
- package/dist/components.js.map +1 -0
- package/dist/components.mjs +8 -0
- package/dist/components.mjs.map +1 -0
- package/dist/config.js +17 -0
- package/dist/config.js.map +1 -0
- package/dist/config.mjs +4 -0
- package/dist/config.mjs.map +1 -0
- package/dist/contact.js +22 -0
- package/dist/contact.js.map +1 -0
- package/dist/contact.mjs +5 -0
- package/dist/contact.mjs.map +1 -0
- package/dist/contexts.js +51 -0
- package/dist/contexts.js.map +1 -0
- package/dist/contexts.mjs +6 -0
- package/dist/contexts.mjs.map +1 -0
- package/dist/finance.js +26 -0
- package/dist/finance.js.map +1 -0
- package/dist/finance.mjs +5 -0
- package/dist/finance.mjs.map +1 -0
- package/dist/icons.js +15 -0
- package/dist/icons.js.map +1 -0
- package/dist/icons.mjs +4 -0
- package/dist/icons.mjs.map +1 -0
- package/dist/index.js +512 -249
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal.js +1437 -0
- package/dist/internal.js.map +1 -0
- package/dist/internal.mjs +1404 -0
- package/dist/internal.mjs.map +1 -0
- package/dist/motion.js +51 -0
- package/dist/motion.js.map +1 -0
- package/dist/motion.mjs +38 -0
- package/dist/motion.mjs.map +1 -0
- package/dist/orders.js +22 -0
- package/dist/orders.js.map +1 -0
- package/dist/orders.mjs +5 -0
- package/dist/orders.mjs.map +1 -0
- package/dist/products.js +27 -0
- package/dist/products.js.map +1 -0
- package/dist/products.mjs +6 -0
- package/dist/products.mjs.map +1 -0
- package/dist/registry.js +44 -0
- package/dist/registry.js.map +1 -0
- package/dist/registry.mjs +7 -0
- package/dist/registry.mjs.map +1 -0
- package/dist/renderers.js +51 -0
- package/dist/renderers.js.map +1 -0
- package/dist/renderers.mjs +6 -0
- package/dist/renderers.mjs.map +1 -0
- package/dist/server.js +11 -189
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +3 -186
- package/dist/server.mjs.map +1 -1
- package/dist/types.js +37 -0
- package/dist/types.js.map +1 -0
- package/dist/types.mjs +4 -0
- package/dist/types.mjs.map +1 -0
- package/dist/utils.js +160 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.mjs +7 -0
- package/dist/utils.mjs.map +1 -0
- package/dist/wrappers.js +104 -0
- package/dist/wrappers.js.map +1 -0
- package/dist/wrappers.mjs +96 -0
- package/dist/wrappers.mjs.map +1 -0
- package/package.json +112 -9
- package/dist/api-vuL1Eg5L.d.mts +0 -2961
- package/dist/api-vuL1Eg5L.d.ts +0 -2961
- package/dist/chunk-3SZX6LHT.js.map +0 -1
- package/dist/chunk-7EON6Q4L.mjs.map +0 -1
- package/dist/chunk-WDY773GJ.js +0 -8308
- package/dist/chunk-WDY773GJ.js.map +0 -1
- package/dist/chunk-XE4EOKS4.mjs.map +0 -1
- package/dist/client.d.mts +0 -1461
- package/dist/client.d.ts +0 -1461
- package/dist/index.d.mts +0 -125
- package/dist/index.d.ts +0 -125
- package/dist/server.d.mts +0 -70
- package/dist/server.d.ts +0 -70
package/dist/client.d.mts
DELETED
|
@@ -1,1461 +0,0 @@
|
|
|
1
|
-
import { ar as RegistryConfig, aA as SectionRegistry, aB as BlockRegistry, O as ComponentDefinition, X as ComponentProps, M as ComponentCategory, W as ComponentRegistration, D as SectionInstance, v as BlockInstance, E as SectionComponentInstance, Q as ComponentInstance, aW as DetectionResult, r as SettingValue, z as SectionSchema, H as SectionComponentProps, y as TemplateDefinition, bF as CartContextType, b8 as WebsiteSettings } from './api-vuL1Eg5L.mjs';
|
|
2
|
-
export { bb as ActiveHotlineConnections, ba as ActiveSocialConnections, bc as ActiveTrackingAnalytics, a as AnimationEasing, c as AnimationSettings, b as AnimationTrigger, A as AnimationType, bJ as ApiListResponse, bN as ApiPriceGroup, bO as ApiProductRaw, bG as ApiResponse, $ as ApplyScope, a0 as ApplyScopeResult, o as ArticleFieldDefinition, B as BaseEntity, f as BaseFieldDefinition, x as BlockComponentProps, u as BlockDefinition, ax as BlockRegisteredPayload, w as BlockRegistration, ay as BlockUnregisteredPayload, by as Blog, bs as BlogCategory, bv as BlogCategoryData, bA as BlogDetailData, n as BlogFieldDefinition, bz as BlogFilters, bQ as BlogFiltersParams, bt as BlogImage, bB as BlogListData, bC as BlogListItem, bw as BlogMetaData, bu as BlogUser, h as BooleanFieldDefinition, ag as BorderRadius, Z as Breakpoint, ah as Breakpoints, a1 as COMPONENT_CATEGORIES, a2 as COMPONENT_TYPES, bD as CartItem, bE as CartSummary, i as CheckboxFieldDefinition, m as CollectionFieldDefinition, C as ColorFieldDefinition, ad as ColorPalette, b7 as CompanyInfo, ab as ComponentPageDefinition, L as ComponentType, b6 as ContactEmail, a_ as DEFAULT_INSPECTOR_CONFIG, ac as DesignToken, aE as DetectedElement, aC as DetectedSection, aU as DetectionPriority, aV as DetectionStrategy, aQ as DragDropContext, aF as EditableElementRegistry, aM as EditorActions, aN as EditorContextValue, aI as EditorMode, aL as EditorState, aT as ElementMetadata, aD as ElementRegistry, aS as ElementType, b9 as EnabledItems, t as FIELD_TYPES, q as FieldDefinition, F as FieldType, l as FontFieldDefinition, aP as HistoryEntry, b3 as HotlineConnection, b2 as HotlineType, I as ImageFieldDefinition, aY as InlineEditorProps, aX as InlineEditorState, aZ as InspectorConfig, aO as InspectorOverlayState, aR as KeyboardShortcut, bK as ListQueryParams, bL as Location, bM as LocationListResponse, N as NumberFieldDefinition, a5 as PageConfig, p as PageFieldDefinition, a7 as PageListItem, a8 as PageNavItem, aG as PageRegistration, a9 as PageRenderMode, a4 as PageSEO, a6 as PageTemplate, aH as PageTemplateRegistration, a3 as PageType, bH as PaginatedResponse, bf as PriceRange, bo as Product, br as ProductCardProps, bd as ProductCategory, P as ProductFieldDefinition, bp as ProductFilters, bP as ProductFiltersParams, bq as ProductListItem, bk as ProductMeasurements, bm as ProductOption, bj as ProductPrice, bi as ProductPriceGroup, bh as ProductSize, bl as ProductSpecs, be as ProductTag, bn as ProductVariant, j as RadioFieldDefinition, R as RangeFieldDefinition, at as RegistryEvent, az as RegistryEventHandler, as as RegistryEventType, bx as ResponseMetaData, _ as ResponsiveStyles, k as RichTextFieldDefinition, K as SECTION_CATEGORIES, J as SectionCategory, au as SectionRegisteredPayload, G as SectionRegistration, av as SectionUnregisteredPayload, S as SelectFieldDefinition, aK as SelectedElement, aJ as SelectedElementType, bI as ServerFetcherResponse, s as Settings, a$ as SettingsIcon, b1 as SocialConnection, b0 as SocialPlatform, bg as SortOption, af as Spacing, Y as StyleSettings, aw as TemplateRegisteredPayload, T as TextFieldDefinition, g as TextareaFieldDefinition, ai as ThemeConfig, ak as ThemeExport, aa as ThemeLayoutConfig, al as ThemeManifest, am as ThemeModule, aj as ThemePreset, an as ThemeUpload, ap as ThemeValidationError, ao as ThemeValidationResult, aq as ThemeValidationWarning, b5 as TrackingAnalytics, b4 as TrackingPlatform, ae as Typography, U as UrlFieldDefinition, V as VideoFieldDefinition, d as animationFieldDefinitions, e as defaultAnimationSettings } from './api-vuL1Eg5L.mjs';
|
|
3
|
-
import { ClassValue } from 'clsx';
|
|
4
|
-
import React$1, { ReactNode } from 'react';
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Section Registry Implementation
|
|
9
|
-
* Hierarchical registry with multi-template support
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Create a new section registry instance
|
|
14
|
-
*/
|
|
15
|
-
declare function createSectionRegistry(config?: RegistryConfig): SectionRegistry;
|
|
16
|
-
/**
|
|
17
|
-
* Global section registry instance
|
|
18
|
-
*/
|
|
19
|
-
declare const sectionRegistry: SectionRegistry;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Block Registry Implementation
|
|
23
|
-
* Registry for repeatable block components
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Create a new block registry instance
|
|
28
|
-
*/
|
|
29
|
-
declare function createBlockRegistry(config?: RegistryConfig): BlockRegistry;
|
|
30
|
-
/**
|
|
31
|
-
* Global block registry instance
|
|
32
|
-
*/
|
|
33
|
-
declare const blockRegistry: BlockRegistry;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Component Registry
|
|
37
|
-
* Central registry for all component types
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Component Registry Class
|
|
42
|
-
*/
|
|
43
|
-
declare class ComponentRegistry {
|
|
44
|
-
private components;
|
|
45
|
-
private categories;
|
|
46
|
-
private tags;
|
|
47
|
-
private events;
|
|
48
|
-
/**
|
|
49
|
-
* Register a component type
|
|
50
|
-
*/
|
|
51
|
-
register(type: string, definition: ComponentDefinition, component: React.ComponentType<ComponentProps>, options?: {
|
|
52
|
-
category?: ComponentCategory;
|
|
53
|
-
tags?: string[];
|
|
54
|
-
}): void;
|
|
55
|
-
/**
|
|
56
|
-
* Unregister a component type
|
|
57
|
-
*/
|
|
58
|
-
unregister(type: string): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Get component by type
|
|
61
|
-
*/
|
|
62
|
-
get(type: string): ComponentRegistration | undefined;
|
|
63
|
-
/**
|
|
64
|
-
* Get component definition by type
|
|
65
|
-
*/
|
|
66
|
-
getDefinition(type: string): ComponentDefinition | undefined;
|
|
67
|
-
/**
|
|
68
|
-
* Get component React component by type
|
|
69
|
-
*/
|
|
70
|
-
getComponent(type: string): React.ComponentType<ComponentProps> | undefined;
|
|
71
|
-
/**
|
|
72
|
-
* Get all components
|
|
73
|
-
*/
|
|
74
|
-
getAll(): Map<string, ComponentRegistration>;
|
|
75
|
-
/**
|
|
76
|
-
* Get all component types
|
|
77
|
-
*/
|
|
78
|
-
getAllTypes(): string[];
|
|
79
|
-
/**
|
|
80
|
-
* Get components by category
|
|
81
|
-
*/
|
|
82
|
-
getByCategory(category: ComponentCategory): ComponentRegistration[];
|
|
83
|
-
/**
|
|
84
|
-
* Get components by tag
|
|
85
|
-
*/
|
|
86
|
-
getByTag(tag: string): ComponentRegistration[];
|
|
87
|
-
/**
|
|
88
|
-
* Search components
|
|
89
|
-
*/
|
|
90
|
-
search(query: string): ComponentRegistration[];
|
|
91
|
-
/**
|
|
92
|
-
* Get all categories
|
|
93
|
-
*/
|
|
94
|
-
getCategories(): ComponentCategory[];
|
|
95
|
-
/**
|
|
96
|
-
* Get all tags
|
|
97
|
-
*/
|
|
98
|
-
getTags(): string[];
|
|
99
|
-
/**
|
|
100
|
-
* Check if component type exists
|
|
101
|
-
*/
|
|
102
|
-
has(type: string): boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Get component count
|
|
105
|
-
*/
|
|
106
|
-
count(): number;
|
|
107
|
-
/**
|
|
108
|
-
* Get component count by category
|
|
109
|
-
*/
|
|
110
|
-
countByCategory(category: ComponentCategory): number;
|
|
111
|
-
/**
|
|
112
|
-
* Subscribe to registry events
|
|
113
|
-
*/
|
|
114
|
-
on(event: string, handler: (...args: unknown[]) => void): void;
|
|
115
|
-
/**
|
|
116
|
-
* Unsubscribe from registry events
|
|
117
|
-
*/
|
|
118
|
-
off(event: string, handler: (...args: unknown[]) => void): void;
|
|
119
|
-
/**
|
|
120
|
-
* Clear all components (for testing)
|
|
121
|
-
*/
|
|
122
|
-
clear(): void;
|
|
123
|
-
}
|
|
124
|
-
declare const componentRegistry: ComponentRegistry;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* ID Generation Utilities
|
|
128
|
-
* Generate unique IDs for pages, sections, and other entities
|
|
129
|
-
*/
|
|
130
|
-
/**
|
|
131
|
-
* Generate a unique page ID
|
|
132
|
-
*
|
|
133
|
-
* @param prefix - Optional prefix (default: 'page')
|
|
134
|
-
* @returns Unique page ID
|
|
135
|
-
*
|
|
136
|
-
* @example
|
|
137
|
-
* ```ts
|
|
138
|
-
* const pageId = generatePageId(); // 'page-a3b4c5d6'
|
|
139
|
-
* const pageId = generatePageId('homepage'); // 'homepage-a3b4c5d6'
|
|
140
|
-
* ```
|
|
141
|
-
*/
|
|
142
|
-
declare function generatePageId(prefix?: string): string;
|
|
143
|
-
/**
|
|
144
|
-
* Generate a unique section ID
|
|
145
|
-
*
|
|
146
|
-
* @param sectionType - Section type (e.g., 'hero', 'features')
|
|
147
|
-
* @returns Unique section ID
|
|
148
|
-
*
|
|
149
|
-
* @example
|
|
150
|
-
* ```ts
|
|
151
|
-
* const sectionId = generateSectionId('hero'); // 'hero-1234567890-a3b4c5d6'
|
|
152
|
-
* ```
|
|
153
|
-
*/
|
|
154
|
-
declare function generateSectionId(sectionType: string): string;
|
|
155
|
-
/**
|
|
156
|
-
* Generate a unique block ID
|
|
157
|
-
*
|
|
158
|
-
* @param blockType - Block type (e.g., 'text', 'image')
|
|
159
|
-
* @returns Unique block ID
|
|
160
|
-
*
|
|
161
|
-
* @example
|
|
162
|
-
* ```ts
|
|
163
|
-
* const blockId = generateBlockId('text'); // 'text-1234567890-a3b4c5d6'
|
|
164
|
-
* ```
|
|
165
|
-
*/
|
|
166
|
-
declare function generateBlockId(blockType: string): string;
|
|
167
|
-
/**
|
|
168
|
-
* Generate a URL-friendly handle from a title
|
|
169
|
-
*
|
|
170
|
-
* @param title - Page or section title
|
|
171
|
-
* @returns URL-friendly handle
|
|
172
|
-
*
|
|
173
|
-
* @example
|
|
174
|
-
* ```ts
|
|
175
|
-
* const handle = generateHandle('My New Page'); // 'my-new-page'
|
|
176
|
-
* const handle = generateHandle('About Us & Services'); // 'about-us-services'
|
|
177
|
-
* ```
|
|
178
|
-
*/
|
|
179
|
-
declare function generateHandle(title: string): string;
|
|
180
|
-
/**
|
|
181
|
-
* Generate a unique theme ID
|
|
182
|
-
*
|
|
183
|
-
* @param name - Theme name
|
|
184
|
-
* @returns Unique theme ID
|
|
185
|
-
*
|
|
186
|
-
* @example
|
|
187
|
-
* ```ts
|
|
188
|
-
* const themeId = generateThemeId('Dark Mode'); // 'dark-mode-1234567890'
|
|
189
|
-
* ```
|
|
190
|
-
*/
|
|
191
|
-
declare function generateThemeId(name: string): string;
|
|
192
|
-
/**
|
|
193
|
-
* Generate a generic unique ID
|
|
194
|
-
*
|
|
195
|
-
* @param prefix - Optional prefix (default: 'id')
|
|
196
|
-
* @returns Unique ID
|
|
197
|
-
*
|
|
198
|
-
* @example
|
|
199
|
-
* ```ts
|
|
200
|
-
* const id = generateId(); // 'id-1234567890-a3b4c5d6'
|
|
201
|
-
* const id = generateId('comp'); // 'comp-1234567890-a3b4c5d6'
|
|
202
|
-
* ```
|
|
203
|
-
*/
|
|
204
|
-
declare function generateId(prefix?: string): string;
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Block Finder Utilities
|
|
208
|
-
* Recursive functions to find, update, and remove blocks at any nesting level
|
|
209
|
-
*/
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Recursively find a block by ID in a section's block tree
|
|
213
|
-
* @param section - The section to search in
|
|
214
|
-
* @param blockId - The block ID to find
|
|
215
|
-
* @returns The block if found, undefined otherwise
|
|
216
|
-
*/
|
|
217
|
-
declare function findBlockInSection(section: SectionInstance | null | undefined, blockId: string): BlockInstance | undefined;
|
|
218
|
-
/**
|
|
219
|
-
* Update a block at any nesting level in a section
|
|
220
|
-
* @param section - The section containing the block
|
|
221
|
-
* @param blockId - The block ID to update
|
|
222
|
-
* @param updates - Partial updates to apply to the block
|
|
223
|
-
* @returns Updated section with the block modified
|
|
224
|
-
*/
|
|
225
|
-
declare function updateNestedBlock(section: SectionInstance, blockId: string, updates: Partial<BlockInstance>): SectionInstance;
|
|
226
|
-
/**
|
|
227
|
-
* Remove a block at any nesting level from a section
|
|
228
|
-
* @param section - The section containing the block
|
|
229
|
-
* @param blockId - The block ID to remove
|
|
230
|
-
* @returns Updated section with the block removed
|
|
231
|
-
*/
|
|
232
|
-
declare function removeNestedBlock(section: SectionInstance, blockId: string): SectionInstance;
|
|
233
|
-
/**
|
|
234
|
-
* Get the path to a block (useful for debugging)
|
|
235
|
-
* @param section - The section to search in
|
|
236
|
-
* @param blockId - The block ID to find
|
|
237
|
-
* @returns Array of block IDs representing the path, or empty array if not found
|
|
238
|
-
*/
|
|
239
|
-
declare function getBlockPath(section: SectionInstance | null | undefined, blockId: string): string[];
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Component Finder Utilities
|
|
243
|
-
* Recursive functions to find components at any nesting level (in sections and blocks)
|
|
244
|
-
*/
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Recursively find a component by ID in a section
|
|
248
|
-
* Searches both direct section components and components nested in blocks
|
|
249
|
-
* @param section - The section to search in
|
|
250
|
-
* @param componentId - The component ID to find
|
|
251
|
-
* @returns The component if found, null otherwise
|
|
252
|
-
*/
|
|
253
|
-
declare function findComponentInSection(section: SectionInstance | null | undefined, componentId: string): SectionComponentInstance | null;
|
|
254
|
-
/**
|
|
255
|
-
* Get the path to a component (useful for debugging)
|
|
256
|
-
* @param section - The section to search in
|
|
257
|
-
* @param componentId - The component ID to find
|
|
258
|
-
* @returns Object with the path information, or null if not found
|
|
259
|
-
*/
|
|
260
|
-
declare function getComponentPath(section: SectionInstance | null | undefined, componentId: string): {
|
|
261
|
-
sectionId: string;
|
|
262
|
-
blockPath: string[];
|
|
263
|
-
componentId: string;
|
|
264
|
-
} | null;
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Component Updater Utilities
|
|
268
|
-
* Recursive functions to update components at any nesting level (in sections and blocks)
|
|
269
|
-
*/
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Update a component at any nesting level in a section
|
|
273
|
-
* Searches both direct section components and components nested in blocks
|
|
274
|
-
* @param section - The section containing the component
|
|
275
|
-
* @param componentId - The component ID to update
|
|
276
|
-
* @param updates - Partial updates to apply to the component
|
|
277
|
-
* @returns Updated section with the component modified
|
|
278
|
-
*/
|
|
279
|
-
declare function updateNestedComponent(section: SectionInstance, componentId: string, updates: Partial<SectionComponentInstance>): SectionInstance;
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Section Helper Utilities
|
|
283
|
-
* Auto-rendering utilities for sections with component grouping and slot-based layouts
|
|
284
|
-
*/
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Sort components by order field
|
|
288
|
-
*/
|
|
289
|
-
declare function sortComponents<T extends ComponentInstance | SectionComponentInstance>(components: T[]): T[];
|
|
290
|
-
/**
|
|
291
|
-
* Filter enabled components only
|
|
292
|
-
*/
|
|
293
|
-
declare function filterEnabledComponents<T extends ComponentInstance | SectionComponentInstance>(components: T[]): T[];
|
|
294
|
-
/**
|
|
295
|
-
* Get components sorted and filtered
|
|
296
|
-
*/
|
|
297
|
-
declare function getActiveComponents<T extends ComponentInstance | SectionComponentInstance>(components: T[]): T[];
|
|
298
|
-
/**
|
|
299
|
-
* Slot configuration for grouping components
|
|
300
|
-
*/
|
|
301
|
-
interface SlotConfig {
|
|
302
|
-
[slotName: string]: string[];
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Grouped components by slot
|
|
306
|
-
*/
|
|
307
|
-
interface GroupedComponents<T extends ComponentInstance | SectionComponentInstance = ComponentInstance> {
|
|
308
|
-
slots: Record<string, T[]>;
|
|
309
|
-
ungrouped: T[];
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* Group components by slot based on their types
|
|
313
|
-
* Useful for layout-based rendering (header, content, footer, etc.)
|
|
314
|
-
*
|
|
315
|
-
* @example
|
|
316
|
-
* ```tsx
|
|
317
|
-
* const slotConfig = {
|
|
318
|
-
* header: ['heading', 'badge'],
|
|
319
|
-
* content: ['paragraph', 'image'],
|
|
320
|
-
* actions: ['button']
|
|
321
|
-
* };
|
|
322
|
-
* const { slots, ungrouped } = groupBySlot(components, slotConfig);
|
|
323
|
-
* ```
|
|
324
|
-
*/
|
|
325
|
-
declare function groupBySlot<T extends ComponentInstance | SectionComponentInstance>(components: T[], slotConfig: SlotConfig): GroupedComponents<T>;
|
|
326
|
-
/**
|
|
327
|
-
* Get components by type
|
|
328
|
-
* Useful for finding specific component types in a section
|
|
329
|
-
*
|
|
330
|
-
* @example
|
|
331
|
-
* ```tsx
|
|
332
|
-
* const headings = getComponentsByType(components, 'heading');
|
|
333
|
-
* const buttons = getComponentsByType(components, ['button', 'link']);
|
|
334
|
-
* ```
|
|
335
|
-
*/
|
|
336
|
-
declare function getComponentsByType<T extends ComponentInstance | SectionComponentInstance>(components: T[], types: string | string[]): T[];
|
|
337
|
-
/**
|
|
338
|
-
* Get first component by type
|
|
339
|
-
* Useful for getting a specific component like the main heading
|
|
340
|
-
*
|
|
341
|
-
* @example
|
|
342
|
-
* ```tsx
|
|
343
|
-
* const heading = getFirstComponentByType(components, 'heading');
|
|
344
|
-
* ```
|
|
345
|
-
*/
|
|
346
|
-
declare function getFirstComponentByType<T extends ComponentInstance | SectionComponentInstance>(components: T[], types: string | string[]): T | undefined;
|
|
347
|
-
/**
|
|
348
|
-
* Check if section has any components of given type
|
|
349
|
-
*/
|
|
350
|
-
declare function hasComponentType<T extends ComponentInstance | SectionComponentInstance>(components: T[], types: string | string[]): boolean;
|
|
351
|
-
/**
|
|
352
|
-
* Sort blocks by order field
|
|
353
|
-
*/
|
|
354
|
-
declare function sortBlocks(blocks: BlockInstance[]): BlockInstance[];
|
|
355
|
-
/**
|
|
356
|
-
* Filter enabled blocks only
|
|
357
|
-
*/
|
|
358
|
-
declare function filterEnabledBlocks(blocks: BlockInstance[]): BlockInstance[];
|
|
359
|
-
/**
|
|
360
|
-
* Get blocks sorted and filtered
|
|
361
|
-
*/
|
|
362
|
-
declare function getActiveBlocks(blocks: BlockInstance[]): BlockInstance[];
|
|
363
|
-
/**
|
|
364
|
-
* Count enabled items (components or blocks)
|
|
365
|
-
*/
|
|
366
|
-
declare function countEnabledItems<T extends {
|
|
367
|
-
enabled?: boolean;
|
|
368
|
-
}>(items: T[]): number;
|
|
369
|
-
/**
|
|
370
|
-
* Check if array has any enabled items
|
|
371
|
-
*/
|
|
372
|
-
declare function hasEnabledItems<T extends {
|
|
373
|
-
enabled?: boolean;
|
|
374
|
-
}>(items: T[] | undefined): boolean;
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Get display label for a detection result
|
|
378
|
-
* Formats section/block/component names for the inspector overlay
|
|
379
|
-
*/
|
|
380
|
-
declare function getElementLabel(result: DetectionResult): string;
|
|
381
|
-
/**
|
|
382
|
-
* Get color for a detection type
|
|
383
|
-
* Returns the appropriate outline color from the inspector config
|
|
384
|
-
*/
|
|
385
|
-
declare function getSelectionColor(type: string): string;
|
|
386
|
-
/**
|
|
387
|
-
* Format a kebab-case name to Title Case
|
|
388
|
-
* e.g., "feature-card" → "Feature Card"
|
|
389
|
-
*/
|
|
390
|
-
declare function formatBlockName(name: string): string;
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* Class Name Utility
|
|
394
|
-
* Merge Tailwind CSS classes with proper conflict resolution
|
|
395
|
-
*/
|
|
396
|
-
|
|
397
|
-
/**
|
|
398
|
-
* Combines class names with Tailwind CSS conflict resolution
|
|
399
|
-
*
|
|
400
|
-
* @param inputs - Class names to merge
|
|
401
|
-
* @returns Merged class string
|
|
402
|
-
*
|
|
403
|
-
* @example
|
|
404
|
-
* cn("px-2 py-1", "px-4") // => "py-1 px-4"
|
|
405
|
-
* cn("text-red-500", condition && "text-blue-500") // => "text-blue-500" (if condition is true)
|
|
406
|
-
*/
|
|
407
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Data Adapters
|
|
411
|
-
* Convert between different data formats for compatibility
|
|
412
|
-
*/
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* Adapt a SectionComponentInstance to a full ComponentInstance
|
|
416
|
-
* so it can be rendered via the component registry.
|
|
417
|
-
*
|
|
418
|
-
* - Ensures content/style objects always exist
|
|
419
|
-
* - Preserves ordering and metadata
|
|
420
|
-
*
|
|
421
|
-
* @param component - Section component instance to adapt
|
|
422
|
-
* @returns Full component instance ready for rendering
|
|
423
|
-
*
|
|
424
|
-
* @example
|
|
425
|
-
* const sectionComp = { id: "1", type: "heading", settings: { text: "Hello" } };
|
|
426
|
-
* const fullComp = toComponentInstance(sectionComp);
|
|
427
|
-
* // fullComp.content = { text: "Hello" }
|
|
428
|
-
* // fullComp.style = {}
|
|
429
|
-
*/
|
|
430
|
-
declare function toComponentInstance(component: SectionComponentInstance): ComponentInstance;
|
|
431
|
-
|
|
432
|
-
/**
|
|
433
|
-
* Section Helper Types
|
|
434
|
-
* Type definitions for section validation and value extraction
|
|
435
|
-
*/
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
* Validation error for a single field
|
|
439
|
-
*/
|
|
440
|
-
interface ValidationError$1 {
|
|
441
|
-
/** Field ID that failed validation */
|
|
442
|
-
field: string;
|
|
443
|
-
/** Current value that failed */
|
|
444
|
-
value: SettingValue;
|
|
445
|
-
/** Human-readable error message */
|
|
446
|
-
message: string;
|
|
447
|
-
/** Expected/allowed values (for select/radio fields) */
|
|
448
|
-
allowedValues?: string[];
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
* Validation result
|
|
452
|
-
*/
|
|
453
|
-
interface ValidationResult$1 {
|
|
454
|
-
/** Whether all fields are valid */
|
|
455
|
-
valid: boolean;
|
|
456
|
-
/** List of validation errors */
|
|
457
|
-
errors: ValidationError$1[];
|
|
458
|
-
}
|
|
459
|
-
/**
|
|
460
|
-
* Section values returned by getSectionValues()
|
|
461
|
-
*/
|
|
462
|
-
interface SectionValues {
|
|
463
|
-
/** All section settings with auto-type conversion */
|
|
464
|
-
settings: Record<string, SettingValue>;
|
|
465
|
-
/** Whether all values passed validation */
|
|
466
|
-
isValid: boolean;
|
|
467
|
-
/** List of validation errors (empty if valid) */
|
|
468
|
-
errors: ValidationError$1[];
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* Section Helpers - Validation
|
|
473
|
-
* Validates section field values against schema definitions
|
|
474
|
-
* @module utils/section/validation
|
|
475
|
-
*/
|
|
476
|
-
|
|
477
|
-
/**
|
|
478
|
-
* Validate all settings in a section
|
|
479
|
-
*
|
|
480
|
-
* @param section - Section instance
|
|
481
|
-
* @param schema - Section schema
|
|
482
|
-
* @returns Validation result with errors
|
|
483
|
-
* @internal
|
|
484
|
-
*/
|
|
485
|
-
declare function validateSettings(section: SectionInstance, schema: SectionSchema): ValidationResult$1;
|
|
486
|
-
/**
|
|
487
|
-
* Validate entire section (settings)
|
|
488
|
-
*
|
|
489
|
-
* @param section - Section instance
|
|
490
|
-
* @param schema - Section schema
|
|
491
|
-
* @returns Validation result
|
|
492
|
-
*/
|
|
493
|
-
declare function validateSection(section: SectionInstance, schema: SectionSchema): ValidationResult$1;
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* Section Helpers - Main API
|
|
497
|
-
*
|
|
498
|
-
* Provides schema-driven validation and value extraction for sections.
|
|
499
|
-
* Auto-extracts all fields from schema with type detection and validation.
|
|
500
|
-
*
|
|
501
|
-
* @example
|
|
502
|
-
* ```typescript
|
|
503
|
-
* import { getSectionValues } from '@onex/core';
|
|
504
|
-
*
|
|
505
|
-
* export function MySection({ section, schema }: SectionComponentProps) {
|
|
506
|
-
* const { settings } = getSectionValues(section, schema);
|
|
507
|
-
*
|
|
508
|
-
* // Direct property access - auto-typed!
|
|
509
|
-
* const { title, subtitle, backgroundColor } = settings;
|
|
510
|
-
*
|
|
511
|
-
* return <div style={{ backgroundColor }}>{title}</div>;
|
|
512
|
-
* }
|
|
513
|
-
* ```
|
|
514
|
-
*
|
|
515
|
-
* @module utils/section
|
|
516
|
-
*/
|
|
517
|
-
|
|
518
|
-
/**
|
|
519
|
-
* Get all section values with validation and auto-type conversion
|
|
520
|
-
*
|
|
521
|
-
* This is the primary API for sections. It:
|
|
522
|
-
* - Auto-extracts ALL fields from schema (no need to specify field names)
|
|
523
|
-
* - Validates runtime values against schema definitions
|
|
524
|
-
* - Auto-converts types based on field type (text→string, number→number, etc.)
|
|
525
|
-
* - Falls back to schema defaults for missing/invalid values
|
|
526
|
-
* - Provides direct property access: settings.title, settings.backgroundColor
|
|
527
|
-
*
|
|
528
|
-
* @param section - Section instance (runtime data)
|
|
529
|
-
* @param schema - Section schema (definition)
|
|
530
|
-
* @returns Object with settings, isValid, and errors
|
|
531
|
-
*
|
|
532
|
-
* @example
|
|
533
|
-
* ```typescript
|
|
534
|
-
* const { settings } = getSectionValues(section, schema);
|
|
535
|
-
*
|
|
536
|
-
* // Direct property access - auto-typed!
|
|
537
|
-
* const title = settings.title; // string (auto-detected from schema)
|
|
538
|
-
* const enabled = settings.enabled; // boolean (auto-detected from schema)
|
|
539
|
-
* const padding = settings.padding; // number (auto-detected from schema)
|
|
540
|
-
*
|
|
541
|
-
* // Or destructure
|
|
542
|
-
* const { title, subtitle, backgroundColor, padding } = settings;
|
|
543
|
-
* ```
|
|
544
|
-
*/
|
|
545
|
-
declare function getSectionValues(section: SectionInstance, schema: SectionSchema): SectionValues;
|
|
546
|
-
|
|
547
|
-
/**
|
|
548
|
-
* Component Helpers - Type Definitions
|
|
549
|
-
* @module utils/component/types
|
|
550
|
-
*/
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* Validation error details
|
|
554
|
-
*/
|
|
555
|
-
interface ValidationError {
|
|
556
|
-
/** Field ID that failed validation */
|
|
557
|
-
field: string;
|
|
558
|
-
/** The invalid value */
|
|
559
|
-
value: SettingValue;
|
|
560
|
-
/** Human-readable error message */
|
|
561
|
-
message: string;
|
|
562
|
-
/** Allowed values (for select/radio fields) */
|
|
563
|
-
allowedValues?: SettingValue[];
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* Validation result
|
|
567
|
-
*/
|
|
568
|
-
interface ValidationResult {
|
|
569
|
-
/** Whether validation passed */
|
|
570
|
-
valid: boolean;
|
|
571
|
-
/** List of validation errors (empty if valid) */
|
|
572
|
-
errors: ValidationError[];
|
|
573
|
-
}
|
|
574
|
-
/**
|
|
575
|
-
* Component values with auto-typed property access
|
|
576
|
-
*/
|
|
577
|
-
interface ComponentValues {
|
|
578
|
-
/** Content values with auto-type conversion */
|
|
579
|
-
content: Record<string, SettingValue>;
|
|
580
|
-
/** Style values with auto-type conversion */
|
|
581
|
-
style: Record<string, SettingValue>;
|
|
582
|
-
/** Whether all values are valid */
|
|
583
|
-
isValid: boolean;
|
|
584
|
-
/** Validation errors (empty if valid) */
|
|
585
|
-
errors: ValidationError[];
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* Component Helpers - Validation
|
|
590
|
-
* Validates component values against schema definitions
|
|
591
|
-
* @module utils/component/validation
|
|
592
|
-
*/
|
|
593
|
-
|
|
594
|
-
/**
|
|
595
|
-
* Validate component content against schema
|
|
596
|
-
*/
|
|
597
|
-
declare function validateContent(component: ComponentInstance, definition: ComponentDefinition): ValidationResult;
|
|
598
|
-
/**
|
|
599
|
-
* Validate component style against schema
|
|
600
|
-
*/
|
|
601
|
-
declare function validateStyle(component: ComponentInstance, definition: ComponentDefinition): ValidationResult;
|
|
602
|
-
/**
|
|
603
|
-
* Validate entire component instance against its definition
|
|
604
|
-
*/
|
|
605
|
-
declare function validateComponent(component: ComponentInstance, definition: ComponentDefinition): ValidationResult;
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* Component Helpers - Main API
|
|
609
|
-
*
|
|
610
|
-
* Provides schema-driven validation and value extraction for components.
|
|
611
|
-
* Auto-extracts all fields from schema with type detection and validation.
|
|
612
|
-
*
|
|
613
|
-
* @example
|
|
614
|
-
* ```typescript
|
|
615
|
-
* import { getComponentValues } from '@onex/core';
|
|
616
|
-
*
|
|
617
|
-
* export function MyComponent({ component, definition }: ComponentProps) {
|
|
618
|
-
* const { content, style } = getComponentValues(component, definition);
|
|
619
|
-
*
|
|
620
|
-
* // Direct property access - auto-typed!
|
|
621
|
-
* const { text, url } = content;
|
|
622
|
-
* const { variant, size } = style;
|
|
623
|
-
*
|
|
624
|
-
* return <div>{text}</div>;
|
|
625
|
-
* }
|
|
626
|
-
* ```
|
|
627
|
-
*
|
|
628
|
-
* @module utils/component
|
|
629
|
-
*/
|
|
630
|
-
|
|
631
|
-
/**
|
|
632
|
-
* Get all component values with validation and auto-type conversion
|
|
633
|
-
*
|
|
634
|
-
* This is the primary API for components. It:
|
|
635
|
-
* - Auto-extracts ALL fields from schema (no need to specify field names)
|
|
636
|
-
* - Validates runtime values against schema definitions
|
|
637
|
-
* - Auto-converts types based on field type (text→string, number→number, etc.)
|
|
638
|
-
* - Falls back to schema defaults for missing/invalid values
|
|
639
|
-
* - Provides direct property access: content.text, style.variant
|
|
640
|
-
*
|
|
641
|
-
* @param component - Component instance (runtime data)
|
|
642
|
-
* @param definition - Component definition (schema)
|
|
643
|
-
* @returns Object with content, style, isValid, and errors
|
|
644
|
-
*
|
|
645
|
-
* @example
|
|
646
|
-
* ```typescript
|
|
647
|
-
* const { content, style } = getComponentValues(component, definition);
|
|
648
|
-
*
|
|
649
|
-
* // Direct property access - auto-typed!
|
|
650
|
-
* const text = content.text; // string (auto-detected from schema)
|
|
651
|
-
* const enabled = content.enabled; // boolean (auto-detected from schema)
|
|
652
|
-
* const variant = style.variant; // string (auto-detected from schema)
|
|
653
|
-
*
|
|
654
|
-
* // Or destructure
|
|
655
|
-
* const { text, url, target } = content;
|
|
656
|
-
* const { variant, size } = style;
|
|
657
|
-
* ```
|
|
658
|
-
*/
|
|
659
|
-
declare function getComponentValues(component: ComponentInstance, definition: ComponentDefinition): ComponentValues;
|
|
660
|
-
|
|
661
|
-
interface ComponentRendererProps {
|
|
662
|
-
/** Component instance to render */
|
|
663
|
-
instance: ComponentInstance;
|
|
664
|
-
/** Section ID (required for click detection) */
|
|
665
|
-
sectionId?: string;
|
|
666
|
-
/** Whether in edit mode */
|
|
667
|
-
isEditing?: boolean;
|
|
668
|
-
/** Additional wrapper classes */
|
|
669
|
-
className?: string;
|
|
670
|
-
/** Fallback when component not found */
|
|
671
|
-
fallback?: React$1.ReactNode;
|
|
672
|
-
}
|
|
673
|
-
/**
|
|
674
|
-
* Render a single component instance
|
|
675
|
-
*/
|
|
676
|
-
declare function ComponentRenderer({ instance, sectionId, isEditing, className, fallback, }: ComponentRendererProps): React$1.ReactElement | null;
|
|
677
|
-
/**
|
|
678
|
-
* Render multiple component instances
|
|
679
|
-
*/
|
|
680
|
-
interface ComponentListRendererProps {
|
|
681
|
-
/** Component instances to render */
|
|
682
|
-
instances: ComponentInstance[];
|
|
683
|
-
/** Section ID (required for click detection) */
|
|
684
|
-
sectionId?: string;
|
|
685
|
-
/** Whether in edit mode */
|
|
686
|
-
isEditing?: boolean;
|
|
687
|
-
/** Container class */
|
|
688
|
-
containerClassName?: string;
|
|
689
|
-
/** Item wrapper class */
|
|
690
|
-
itemClassName?: string;
|
|
691
|
-
}
|
|
692
|
-
declare function ComponentListRenderer({ instances, sectionId, isEditing, containerClassName, itemClassName, }: ComponentListRendererProps): React$1.ReactElement;
|
|
693
|
-
/**
|
|
694
|
-
* Hook to get a component registration
|
|
695
|
-
*/
|
|
696
|
-
declare function useComponentRegistration(componentType: string): ComponentRegistration | undefined;
|
|
697
|
-
/**
|
|
698
|
-
* Hook to render a component instance
|
|
699
|
-
*/
|
|
700
|
-
declare function useComponentInstance(instance: ComponentInstance | undefined): {
|
|
701
|
-
Component: React$1.ComponentType<ComponentProps>;
|
|
702
|
-
definition: ComponentDefinition;
|
|
703
|
-
instance: ComponentInstance;
|
|
704
|
-
} | null;
|
|
705
|
-
|
|
706
|
-
/**
|
|
707
|
-
* Block Renderer Utility
|
|
708
|
-
* Recursive renderer for block instances with support for nested blocks and components
|
|
709
|
-
*/
|
|
710
|
-
|
|
711
|
-
interface BlockRendererProps {
|
|
712
|
-
/** Block instance to render */
|
|
713
|
-
block: BlockInstance;
|
|
714
|
-
/** Section ID (for context) */
|
|
715
|
-
sectionId?: string;
|
|
716
|
-
/** Whether in edit mode */
|
|
717
|
-
isEditing?: boolean;
|
|
718
|
-
/** Additional data (e.g., website settings) */
|
|
719
|
-
data?: Record<string, unknown>;
|
|
720
|
-
/** Additional wrapper classes */
|
|
721
|
-
className?: string;
|
|
722
|
-
/** Fallback when block not found */
|
|
723
|
-
fallback?: React$1.ReactNode;
|
|
724
|
-
}
|
|
725
|
-
/**
|
|
726
|
-
* Render a single block instance with recursive support
|
|
727
|
-
* Handles both registered block components and generic fallback
|
|
728
|
-
*/
|
|
729
|
-
declare function BlockRenderer({ block, sectionId, isEditing, data, className, fallback, }: BlockRendererProps): React$1.ReactElement | null;
|
|
730
|
-
interface BlockListRendererProps {
|
|
731
|
-
/** Array of block instances to render */
|
|
732
|
-
blocks: BlockInstance[];
|
|
733
|
-
/** Section ID (for context) */
|
|
734
|
-
sectionId?: string;
|
|
735
|
-
/** Whether in edit mode */
|
|
736
|
-
isEditing?: boolean;
|
|
737
|
-
/** Additional data (e.g., website settings) */
|
|
738
|
-
data?: Record<string, unknown>;
|
|
739
|
-
/** Container class name */
|
|
740
|
-
containerClassName?: string;
|
|
741
|
-
/** Individual block class name */
|
|
742
|
-
blockClassName?: string;
|
|
743
|
-
}
|
|
744
|
-
/**
|
|
745
|
-
* Render a list of blocks with auto-sorting
|
|
746
|
-
* Automatically sorts by order field and filters enabled blocks
|
|
747
|
-
*/
|
|
748
|
-
declare function BlockListRenderer({ blocks, sectionId, isEditing, data, containerClassName, blockClassName, }: BlockListRendererProps): React$1.ReactElement | null;
|
|
749
|
-
/**
|
|
750
|
-
* Simple helper to render a block
|
|
751
|
-
* Convenience wrapper around BlockRenderer
|
|
752
|
-
*/
|
|
753
|
-
declare function renderBlock(block: BlockInstance, isEditing?: boolean, className?: string, sectionId?: string): React$1.ReactElement | null;
|
|
754
|
-
|
|
755
|
-
/**
|
|
756
|
-
* Section Renderer
|
|
757
|
-
* Universal renderer for section instances with theme components
|
|
758
|
-
*/
|
|
759
|
-
|
|
760
|
-
interface SectionRendererProps {
|
|
761
|
-
/** The section instance to render */
|
|
762
|
-
section: SectionInstance;
|
|
763
|
-
/** The React component to render the section */
|
|
764
|
-
Component: React$1.ComponentType<SectionComponentProps>;
|
|
765
|
-
/** Section schema for metadata */
|
|
766
|
-
schema?: SectionSchema;
|
|
767
|
-
/** Template definition */
|
|
768
|
-
template?: TemplateDefinition;
|
|
769
|
-
/** Whether in editing mode */
|
|
770
|
-
isEditing?: boolean;
|
|
771
|
-
/** Additional data to pass to the component */
|
|
772
|
-
data?: Record<string, unknown>;
|
|
773
|
-
/** Fallback component if rendering fails */
|
|
774
|
-
fallback?: React$1.ReactNode;
|
|
775
|
-
/** Additional className for the wrapper */
|
|
776
|
-
className?: string;
|
|
777
|
-
}
|
|
778
|
-
/**
|
|
779
|
-
* Render a section with proper wrapping and error handling
|
|
780
|
-
*/
|
|
781
|
-
declare function SectionRenderer({ section, Component, schema, template, isEditing, data, fallback, className, }: SectionRendererProps): React$1.ReactElement | null;
|
|
782
|
-
interface SectionListRendererProps {
|
|
783
|
-
/** Array of sections to render */
|
|
784
|
-
sections: SectionInstance[];
|
|
785
|
-
/** Function to get component for a section */
|
|
786
|
-
getComponent: (sectionType: string, template: string) => {
|
|
787
|
-
Component: React$1.ComponentType<SectionComponentProps>;
|
|
788
|
-
schema?: SectionSchema;
|
|
789
|
-
template?: TemplateDefinition;
|
|
790
|
-
} | null;
|
|
791
|
-
/** Whether in editing mode */
|
|
792
|
-
isEditing?: boolean;
|
|
793
|
-
/** Additional data to pass to components */
|
|
794
|
-
data?: Record<string, unknown>;
|
|
795
|
-
/** Fallback for missing sections */
|
|
796
|
-
fallback?: (section: SectionInstance) => React$1.ReactNode;
|
|
797
|
-
/** Additional className for wrappers */
|
|
798
|
-
className?: string;
|
|
799
|
-
}
|
|
800
|
-
/**
|
|
801
|
-
* Render a list of sections with automatic filtering and sorting
|
|
802
|
-
*/
|
|
803
|
-
declare function SectionListRenderer({ sections, getComponent, isEditing, data, fallback, className, }: SectionListRendererProps): React$1.ReactElement;
|
|
804
|
-
/**
|
|
805
|
-
* Helper function to render a single section (non-component version)
|
|
806
|
-
* Useful for server components or static rendering
|
|
807
|
-
*/
|
|
808
|
-
declare function renderSection(props: SectionRendererProps): React$1.ReactElement | null;
|
|
809
|
-
|
|
810
|
-
declare function CartProvider({ children }: {
|
|
811
|
-
children: React$1.ReactNode;
|
|
812
|
-
}): react_jsx_runtime.JSX.Element;
|
|
813
|
-
/**
|
|
814
|
-
* Hook to access cart context
|
|
815
|
-
*/
|
|
816
|
-
declare function useCart(): CartContextType;
|
|
817
|
-
|
|
818
|
-
interface ThemeContextValue {
|
|
819
|
-
themeId: string;
|
|
820
|
-
setThemeId: (id: string) => void;
|
|
821
|
-
}
|
|
822
|
-
interface ThemeContextProviderProps {
|
|
823
|
-
children: React$1.ReactNode;
|
|
824
|
-
themeId: string;
|
|
825
|
-
}
|
|
826
|
-
declare function ThemeContextProvider({ children, themeId: initialThemeId, }: ThemeContextProviderProps): react_jsx_runtime.JSX.Element;
|
|
827
|
-
declare function useThemeContext(): ThemeContextValue;
|
|
828
|
-
|
|
829
|
-
/**
|
|
830
|
-
* Viewport Context
|
|
831
|
-
* Provides viewport mode for editor preview responsiveness
|
|
832
|
-
*/
|
|
833
|
-
type ViewportMode = "desktop" | "tablet" | "mobile";
|
|
834
|
-
interface ViewportContextType {
|
|
835
|
-
/** Whether in editor mode */
|
|
836
|
-
isEditing: boolean;
|
|
837
|
-
/** Current viewport mode */
|
|
838
|
-
viewportMode: ViewportMode;
|
|
839
|
-
}
|
|
840
|
-
declare function ViewportProvider({ children, isEditing, viewportMode, }: {
|
|
841
|
-
children: React.ReactNode;
|
|
842
|
-
isEditing: boolean;
|
|
843
|
-
viewportMode: ViewportMode;
|
|
844
|
-
}): react_jsx_runtime.JSX.Element;
|
|
845
|
-
declare function useViewport(): ViewportContextType;
|
|
846
|
-
/**
|
|
847
|
-
* Hook to get responsive class based on viewport mode
|
|
848
|
-
* Returns mobile class when in mobile preview, tablet class when in tablet preview, etc.
|
|
849
|
-
*/
|
|
850
|
-
declare function useResponsiveClass(classes: {
|
|
851
|
-
mobile: string;
|
|
852
|
-
tablet: string;
|
|
853
|
-
desktop: string;
|
|
854
|
-
}): string;
|
|
855
|
-
|
|
856
|
-
/**
|
|
857
|
-
* Generic page data structure
|
|
858
|
-
*/
|
|
859
|
-
interface PageData {
|
|
860
|
-
/** Website settings (social connections, hotlines, etc.) */
|
|
861
|
-
websiteSettings?: WebsiteSettings;
|
|
862
|
-
/** Any other dynamic data needed by the page */
|
|
863
|
-
[key: string]: unknown;
|
|
864
|
-
}
|
|
865
|
-
/**
|
|
866
|
-
* Page Data Provider Props
|
|
867
|
-
*/
|
|
868
|
-
interface PageDataProviderProps {
|
|
869
|
-
/** Server-fetched data to provide to children */
|
|
870
|
-
data?: PageData;
|
|
871
|
-
/** Child components */
|
|
872
|
-
children: React$1.ReactNode;
|
|
873
|
-
}
|
|
874
|
-
/**
|
|
875
|
-
* Page Data Provider Component
|
|
876
|
-
* Wraps pages/components to provide server-fetched data via context
|
|
877
|
-
*
|
|
878
|
-
* @example
|
|
879
|
-
* ```tsx
|
|
880
|
-
* <PageDataProvider data={{ websiteSettings }}>
|
|
881
|
-
* <YourPage />
|
|
882
|
-
* </PageDataProvider>
|
|
883
|
-
* ```
|
|
884
|
-
*/
|
|
885
|
-
declare function PageDataProvider({ data, children, }: PageDataProviderProps): react_jsx_runtime.JSX.Element;
|
|
886
|
-
/**
|
|
887
|
-
* Hook to access page data
|
|
888
|
-
* Returns all page data provided by PageDataProvider
|
|
889
|
-
*
|
|
890
|
-
* @throws Error if used outside PageDataProvider
|
|
891
|
-
*
|
|
892
|
-
* @example
|
|
893
|
-
* ```tsx
|
|
894
|
-
* const pageData = usePageData();
|
|
895
|
-
* const customData = pageData.myCustomField;
|
|
896
|
-
* ```
|
|
897
|
-
*/
|
|
898
|
-
declare function usePageData(): PageData;
|
|
899
|
-
/**
|
|
900
|
-
* Hook to access website settings from page data
|
|
901
|
-
* Convenience hook that extracts websiteSettings from page data
|
|
902
|
-
*
|
|
903
|
-
* @returns WebsiteSettings object (empty object if not available)
|
|
904
|
-
*
|
|
905
|
-
* @example
|
|
906
|
-
* ```tsx
|
|
907
|
-
* function MyBlock() {
|
|
908
|
-
* const websiteSettings = useWebsiteSettings();
|
|
909
|
-
* const socials = useSocialConnections(websiteSettings);
|
|
910
|
-
* // ...
|
|
911
|
-
* }
|
|
912
|
-
* ```
|
|
913
|
-
*/
|
|
914
|
-
declare function useWebsiteSettings(): WebsiteSettings;
|
|
915
|
-
|
|
916
|
-
interface GridContainerProps {
|
|
917
|
-
/** Content to render inside the container */
|
|
918
|
-
children: ReactNode;
|
|
919
|
-
/** Additional CSS classes */
|
|
920
|
-
className?: string;
|
|
921
|
-
/** HTML element to render as */
|
|
922
|
-
as?: "div" | "section" | "header" | "footer" | "main";
|
|
923
|
-
}
|
|
924
|
-
/**
|
|
925
|
-
* Grid Container Component
|
|
926
|
-
* Implements a 12-column grid system with proper gutters and max-width
|
|
927
|
-
* All content should be wrapped in this container for consistent layout
|
|
928
|
-
*
|
|
929
|
-
* Breakpoints and padding:
|
|
930
|
-
* - Mobile (< 768px): 20px padding (16px + 4px gutter)
|
|
931
|
-
* - Tablet (768px - 1023px): 32px padding
|
|
932
|
-
* - Desktop (1024px - 1279px): 40px padding
|
|
933
|
-
* - Large (1280px - 1919px): 140px padding
|
|
934
|
-
* - XL (>= 1920px): max 1640px content width (1920px - 280px padding)
|
|
935
|
-
*
|
|
936
|
-
* @example
|
|
937
|
-
* ```tsx
|
|
938
|
-
* <GridContainer>
|
|
939
|
-
* <h1>My Content</h1>
|
|
940
|
-
* </GridContainer>
|
|
941
|
-
* ```
|
|
942
|
-
*/
|
|
943
|
-
declare function GridContainer({ children, className, as: Component, }: GridContainerProps): react_jsx_runtime.JSX.Element;
|
|
944
|
-
interface FullWidthSectionProps {
|
|
945
|
-
/** Content to render inside the section */
|
|
946
|
-
children: ReactNode;
|
|
947
|
-
/** Additional CSS classes */
|
|
948
|
-
className?: string;
|
|
949
|
-
/** Background color (can be any valid CSS color) */
|
|
950
|
-
backgroundColor?: string;
|
|
951
|
-
}
|
|
952
|
-
/**
|
|
953
|
-
* Full Width Container (for backgrounds that extend full width)
|
|
954
|
-
* Content inside should still use GridContainer for proper content width
|
|
955
|
-
*
|
|
956
|
-
* @example
|
|
957
|
-
* ```tsx
|
|
958
|
-
* <FullWidthSection backgroundColor="#f5f5f5">
|
|
959
|
-
* <GridContainer>
|
|
960
|
-
* <h1>Full-width background, constrained content</h1>
|
|
961
|
-
* </GridContainer>
|
|
962
|
-
* </FullWidthSection>
|
|
963
|
-
* ```
|
|
964
|
-
*/
|
|
965
|
-
declare function FullWidthSection({ children, className, backgroundColor, }: FullWidthSectionProps): react_jsx_runtime.JSX.Element;
|
|
966
|
-
|
|
967
|
-
/**
|
|
968
|
-
* Heading Component
|
|
969
|
-
* Renders text headings (H1-H6) with customizable typography
|
|
970
|
-
*
|
|
971
|
-
* ✅ Now uses component-helpers for auto-typed values with validation
|
|
972
|
-
*/
|
|
973
|
-
|
|
974
|
-
declare function HeadingComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
975
|
-
|
|
976
|
-
/**
|
|
977
|
-
* Heading Component Schema
|
|
978
|
-
* Text heading (H1-H6) with typography controls
|
|
979
|
-
*/
|
|
980
|
-
|
|
981
|
-
declare const headingComponentDefinition: ComponentDefinition;
|
|
982
|
-
|
|
983
|
-
/**
|
|
984
|
-
* Paragraph Component
|
|
985
|
-
* Renders text paragraph with typography controls
|
|
986
|
-
*
|
|
987
|
-
* ✅ Now uses component-helpers for auto-typed values with validation
|
|
988
|
-
*/
|
|
989
|
-
|
|
990
|
-
declare function ParagraphComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
991
|
-
|
|
992
|
-
/**
|
|
993
|
-
* Paragraph Component Schema
|
|
994
|
-
* Text paragraph with typography controls
|
|
995
|
-
*/
|
|
996
|
-
|
|
997
|
-
declare const paragraphComponentDefinition: ComponentDefinition;
|
|
998
|
-
|
|
999
|
-
/**
|
|
1000
|
-
* Button Component
|
|
1001
|
-
* Renders clickable button with link
|
|
1002
|
-
*
|
|
1003
|
-
* ✅ Framework-agnostic version using native <a> tag
|
|
1004
|
-
* Note: Apps using Next.js should wrap with Link component in their theme override
|
|
1005
|
-
*/
|
|
1006
|
-
|
|
1007
|
-
declare function ButtonComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1008
|
-
|
|
1009
|
-
/**
|
|
1010
|
-
* Button Component Schema
|
|
1011
|
-
* Clickable button with link and styling options
|
|
1012
|
-
*/
|
|
1013
|
-
|
|
1014
|
-
declare const buttonComponentDefinition: ComponentDefinition;
|
|
1015
|
-
|
|
1016
|
-
/**
|
|
1017
|
-
* Link Component
|
|
1018
|
-
* Renders text hyperlink
|
|
1019
|
-
*
|
|
1020
|
-
* ✅ Framework-agnostic version using native <a> tag
|
|
1021
|
-
*/
|
|
1022
|
-
|
|
1023
|
-
declare function LinkComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1024
|
-
|
|
1025
|
-
/**
|
|
1026
|
-
* Link Component Schema
|
|
1027
|
-
* Text link with styling options
|
|
1028
|
-
*/
|
|
1029
|
-
|
|
1030
|
-
declare const linkComponentDefinition: ComponentDefinition;
|
|
1031
|
-
|
|
1032
|
-
/**
|
|
1033
|
-
* Divider Component
|
|
1034
|
-
* Horizontal line separator with optional center text
|
|
1035
|
-
*
|
|
1036
|
-
* ✅ Uses Radix UI Separator primitive
|
|
1037
|
-
*/
|
|
1038
|
-
|
|
1039
|
-
declare function DividerComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1040
|
-
|
|
1041
|
-
/**
|
|
1042
|
-
* Divider Component Schema
|
|
1043
|
-
* Horizontal line separator
|
|
1044
|
-
*/
|
|
1045
|
-
|
|
1046
|
-
declare const dividerComponentDefinition: ComponentDefinition;
|
|
1047
|
-
|
|
1048
|
-
/**
|
|
1049
|
-
* Spacer Component
|
|
1050
|
-
* Vertical spacing element
|
|
1051
|
-
*
|
|
1052
|
-
* ✅ Framework-agnostic spacing component
|
|
1053
|
-
*/
|
|
1054
|
-
|
|
1055
|
-
declare function SpacerComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1056
|
-
|
|
1057
|
-
/**
|
|
1058
|
-
* Spacer Component Schema
|
|
1059
|
-
* Empty vertical space for layout
|
|
1060
|
-
*/
|
|
1061
|
-
|
|
1062
|
-
declare const spacerComponentDefinition: ComponentDefinition;
|
|
1063
|
-
|
|
1064
|
-
/**
|
|
1065
|
-
* Quote Component
|
|
1066
|
-
* Blockquote with optional citation
|
|
1067
|
-
*
|
|
1068
|
-
* ✅ Framework-agnostic blockquote component
|
|
1069
|
-
*/
|
|
1070
|
-
|
|
1071
|
-
declare function QuoteComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1072
|
-
|
|
1073
|
-
/**
|
|
1074
|
-
* Quote Component Schema
|
|
1075
|
-
* Blockquote with optional citation and styling
|
|
1076
|
-
*/
|
|
1077
|
-
|
|
1078
|
-
declare const quoteComponentDefinition: ComponentDefinition;
|
|
1079
|
-
|
|
1080
|
-
/**
|
|
1081
|
-
* Badge Component
|
|
1082
|
-
* Small colored label or tag
|
|
1083
|
-
*
|
|
1084
|
-
* ✅ Standalone badge component with shadcn-style variants
|
|
1085
|
-
*/
|
|
1086
|
-
|
|
1087
|
-
declare function BadgeComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1088
|
-
|
|
1089
|
-
/**
|
|
1090
|
-
* Badge Component Schema
|
|
1091
|
-
* Small colored label or tag
|
|
1092
|
-
*/
|
|
1093
|
-
|
|
1094
|
-
declare const badgeComponentDefinition: ComponentDefinition;
|
|
1095
|
-
|
|
1096
|
-
/**
|
|
1097
|
-
* Image Component
|
|
1098
|
-
* Renders image with optional caption and link
|
|
1099
|
-
*
|
|
1100
|
-
* ✅ Framework-agnostic version using native <img> tag
|
|
1101
|
-
*/
|
|
1102
|
-
|
|
1103
|
-
declare function ImageComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1104
|
-
|
|
1105
|
-
/**
|
|
1106
|
-
* Image Component Schema
|
|
1107
|
-
* Image with alt text, sizing, and styling options
|
|
1108
|
-
*/
|
|
1109
|
-
|
|
1110
|
-
declare const imageComponentDefinition: ComponentDefinition;
|
|
1111
|
-
|
|
1112
|
-
/**
|
|
1113
|
-
* Icon Component
|
|
1114
|
-
* Displays icon from Lucide icon library
|
|
1115
|
-
*
|
|
1116
|
-
* ✅ Uses lucide-react (peer dependency)
|
|
1117
|
-
*/
|
|
1118
|
-
|
|
1119
|
-
declare function IconComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1120
|
-
|
|
1121
|
-
/**
|
|
1122
|
-
* Icon Component Schema
|
|
1123
|
-
* Displays icon from icon library
|
|
1124
|
-
*/
|
|
1125
|
-
|
|
1126
|
-
declare const iconComponentDefinition: ComponentDefinition;
|
|
1127
|
-
|
|
1128
|
-
/**
|
|
1129
|
-
* Video Component
|
|
1130
|
-
* Embeds video from YouTube, Vimeo, or self-hosted
|
|
1131
|
-
*
|
|
1132
|
-
* ✅ Framework-agnostic video component
|
|
1133
|
-
*/
|
|
1134
|
-
|
|
1135
|
-
declare function VideoComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1136
|
-
|
|
1137
|
-
/**
|
|
1138
|
-
* Video Component Schema
|
|
1139
|
-
* Embeds video from YouTube, Vimeo, or self-hosted
|
|
1140
|
-
*/
|
|
1141
|
-
|
|
1142
|
-
declare const videoComponentDefinition: ComponentDefinition;
|
|
1143
|
-
|
|
1144
|
-
/**
|
|
1145
|
-
* List Component
|
|
1146
|
-
* Renders ordered or unordered list
|
|
1147
|
-
*
|
|
1148
|
-
* ✅ Framework-agnostic list component
|
|
1149
|
-
*/
|
|
1150
|
-
|
|
1151
|
-
declare function ListComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1152
|
-
|
|
1153
|
-
/**
|
|
1154
|
-
* List Component Schema
|
|
1155
|
-
* Ordered or unordered list with customizable items
|
|
1156
|
-
*/
|
|
1157
|
-
|
|
1158
|
-
declare const listComponentDefinition: ComponentDefinition;
|
|
1159
|
-
|
|
1160
|
-
/**
|
|
1161
|
-
* Container Component
|
|
1162
|
-
* Wrapper element for grouping content
|
|
1163
|
-
*
|
|
1164
|
-
* ✅ Framework-agnostic container component
|
|
1165
|
-
*/
|
|
1166
|
-
|
|
1167
|
-
declare function ContainerComponent({ component, definition, sectionId, isEditing, className, children, }: ComponentProps): React$1.ReactElement;
|
|
1168
|
-
|
|
1169
|
-
/**
|
|
1170
|
-
* Container Component Schema
|
|
1171
|
-
* Wrapper element for grouping content with layout controls
|
|
1172
|
-
*/
|
|
1173
|
-
|
|
1174
|
-
declare const containerComponentDefinition: ComponentDefinition;
|
|
1175
|
-
|
|
1176
|
-
/**
|
|
1177
|
-
* Grid Component
|
|
1178
|
-
* CSS Grid layout container
|
|
1179
|
-
*
|
|
1180
|
-
* ✅ Framework-agnostic grid component
|
|
1181
|
-
*/
|
|
1182
|
-
|
|
1183
|
-
declare function GridComponent({ component, definition, sectionId, isEditing, className, children, }: ComponentProps): React$1.ReactElement;
|
|
1184
|
-
|
|
1185
|
-
/**
|
|
1186
|
-
* Grid Component Schema
|
|
1187
|
-
* CSS Grid layout container
|
|
1188
|
-
*/
|
|
1189
|
-
|
|
1190
|
-
declare const gridComponentDefinition: ComponentDefinition;
|
|
1191
|
-
|
|
1192
|
-
/**
|
|
1193
|
-
* Columns Component
|
|
1194
|
-
* Flexbox column layout container
|
|
1195
|
-
*
|
|
1196
|
-
* ✅ Framework-agnostic columns component
|
|
1197
|
-
*/
|
|
1198
|
-
|
|
1199
|
-
declare function ColumnsComponent({ component, definition, sectionId, isEditing, className, children, }: ComponentProps): React$1.ReactElement;
|
|
1200
|
-
|
|
1201
|
-
/**
|
|
1202
|
-
* Columns Component Schema
|
|
1203
|
-
* Flexbox column layout container
|
|
1204
|
-
*/
|
|
1205
|
-
|
|
1206
|
-
declare const columnsComponentDefinition: ComponentDefinition;
|
|
1207
|
-
|
|
1208
|
-
/**
|
|
1209
|
-
* Card Component
|
|
1210
|
-
* Container with border, shadow, and padding
|
|
1211
|
-
*
|
|
1212
|
-
* ✅ Framework-agnostic card component
|
|
1213
|
-
*/
|
|
1214
|
-
|
|
1215
|
-
declare function CardComponent({ component, definition, sectionId, isEditing, className, children, }: ComponentProps): React$1.ReactElement;
|
|
1216
|
-
|
|
1217
|
-
/**
|
|
1218
|
-
* Card Component Schema
|
|
1219
|
-
* Container with border, shadow, and padding
|
|
1220
|
-
*/
|
|
1221
|
-
|
|
1222
|
-
declare const cardComponentDefinition: ComponentDefinition;
|
|
1223
|
-
|
|
1224
|
-
/**
|
|
1225
|
-
* Gallery Component
|
|
1226
|
-
* Image gallery with grid layout
|
|
1227
|
-
*
|
|
1228
|
-
* ✅ Framework-agnostic gallery component
|
|
1229
|
-
*/
|
|
1230
|
-
|
|
1231
|
-
declare function GalleryComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1232
|
-
|
|
1233
|
-
/**
|
|
1234
|
-
* Gallery Component Schema
|
|
1235
|
-
* Image gallery with grid layout
|
|
1236
|
-
*/
|
|
1237
|
-
|
|
1238
|
-
declare const galleryComponentDefinition: ComponentDefinition;
|
|
1239
|
-
|
|
1240
|
-
/**
|
|
1241
|
-
* Input Component
|
|
1242
|
-
* Text input field for forms
|
|
1243
|
-
*
|
|
1244
|
-
* ✅ Framework-agnostic input component
|
|
1245
|
-
*/
|
|
1246
|
-
|
|
1247
|
-
declare function InputComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1248
|
-
|
|
1249
|
-
/**
|
|
1250
|
-
* Input Component Schema
|
|
1251
|
-
* Text input field for forms
|
|
1252
|
-
*/
|
|
1253
|
-
|
|
1254
|
-
declare const inputComponentDefinition: ComponentDefinition;
|
|
1255
|
-
|
|
1256
|
-
/**
|
|
1257
|
-
* Textarea Component
|
|
1258
|
-
* Multi-line text input for forms
|
|
1259
|
-
*
|
|
1260
|
-
* ✅ Framework-agnostic textarea using Radix UI Label
|
|
1261
|
-
*/
|
|
1262
|
-
|
|
1263
|
-
declare function TextareaComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1264
|
-
|
|
1265
|
-
/**
|
|
1266
|
-
* Textarea Component Schema
|
|
1267
|
-
* Multi-line text input for forms
|
|
1268
|
-
*/
|
|
1269
|
-
|
|
1270
|
-
declare const textareaComponentDefinition: ComponentDefinition;
|
|
1271
|
-
|
|
1272
|
-
/**
|
|
1273
|
-
* Checkbox Component
|
|
1274
|
-
* Checkbox input for forms
|
|
1275
|
-
*
|
|
1276
|
-
* ✅ Framework-agnostic checkbox using Radix UI primitives
|
|
1277
|
-
*/
|
|
1278
|
-
|
|
1279
|
-
declare function CheckboxComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1280
|
-
|
|
1281
|
-
/**
|
|
1282
|
-
* Checkbox Component Schema
|
|
1283
|
-
* Checkbox input for forms
|
|
1284
|
-
*/
|
|
1285
|
-
|
|
1286
|
-
declare const checkboxComponentDefinition: ComponentDefinition;
|
|
1287
|
-
|
|
1288
|
-
/**
|
|
1289
|
-
* Select Component
|
|
1290
|
-
* Dropdown select input for forms
|
|
1291
|
-
*
|
|
1292
|
-
* ✅ Framework-agnostic select using Radix UI primitives
|
|
1293
|
-
*/
|
|
1294
|
-
|
|
1295
|
-
declare function SelectComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1296
|
-
|
|
1297
|
-
/**
|
|
1298
|
-
* Select Component Schema
|
|
1299
|
-
* Dropdown select input for forms
|
|
1300
|
-
*/
|
|
1301
|
-
|
|
1302
|
-
declare const selectComponentDefinition: ComponentDefinition;
|
|
1303
|
-
|
|
1304
|
-
/**
|
|
1305
|
-
* Rating Component
|
|
1306
|
-
* Star rating display
|
|
1307
|
-
*
|
|
1308
|
-
* ✅ Now uses component-helpers for auto-typed values with validation
|
|
1309
|
-
*/
|
|
1310
|
-
|
|
1311
|
-
declare function RatingComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1312
|
-
|
|
1313
|
-
/**
|
|
1314
|
-
* Rating Component Schema
|
|
1315
|
-
* Star rating display
|
|
1316
|
-
*/
|
|
1317
|
-
|
|
1318
|
-
declare const ratingComponentDefinition: ComponentDefinition;
|
|
1319
|
-
|
|
1320
|
-
/**
|
|
1321
|
-
* Progress Component
|
|
1322
|
-
* Progress bar indicator
|
|
1323
|
-
*
|
|
1324
|
-
* ✅ Now uses component-helpers for auto-typed values with validation
|
|
1325
|
-
* ✅ Extends shadcn Progress component (Radix-based)
|
|
1326
|
-
*/
|
|
1327
|
-
|
|
1328
|
-
declare function ProgressComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1329
|
-
|
|
1330
|
-
/**
|
|
1331
|
-
* Progress Component Schema
|
|
1332
|
-
* Progress bar indicator
|
|
1333
|
-
*/
|
|
1334
|
-
|
|
1335
|
-
declare const progressComponentDefinition: ComponentDefinition;
|
|
1336
|
-
|
|
1337
|
-
/**
|
|
1338
|
-
* Alert Component
|
|
1339
|
-
* Alert/notification message box
|
|
1340
|
-
*
|
|
1341
|
-
* ✅ Now uses component-helpers for auto-typed values with validation
|
|
1342
|
-
* ✅ Extends shadcn Alert component
|
|
1343
|
-
*/
|
|
1344
|
-
|
|
1345
|
-
declare function AlertComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1346
|
-
|
|
1347
|
-
/**
|
|
1348
|
-
* Alert Component Schema
|
|
1349
|
-
* Alert/notification message box
|
|
1350
|
-
*/
|
|
1351
|
-
|
|
1352
|
-
declare const alertComponentDefinition: ComponentDefinition;
|
|
1353
|
-
|
|
1354
|
-
/**
|
|
1355
|
-
* Accordion Component
|
|
1356
|
-
* Collapsible content panels
|
|
1357
|
-
*
|
|
1358
|
-
* ✅ Now uses component-helpers for auto-typed values with validation
|
|
1359
|
-
*/
|
|
1360
|
-
|
|
1361
|
-
declare function AccordionComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1362
|
-
|
|
1363
|
-
/**
|
|
1364
|
-
* Accordion Component Schema
|
|
1365
|
-
* Collapsible content panels
|
|
1366
|
-
*/
|
|
1367
|
-
|
|
1368
|
-
declare const accordionComponentDefinition: ComponentDefinition;
|
|
1369
|
-
|
|
1370
|
-
/**
|
|
1371
|
-
* Tabs Component
|
|
1372
|
-
* Tabbed interface for content
|
|
1373
|
-
*
|
|
1374
|
-
* ✅ Now uses component-helpers for auto-typed values with validation
|
|
1375
|
-
*/
|
|
1376
|
-
|
|
1377
|
-
declare function TabsComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1378
|
-
|
|
1379
|
-
/**
|
|
1380
|
-
* Tabs Component Schema
|
|
1381
|
-
* Tabbed interface for content
|
|
1382
|
-
*/
|
|
1383
|
-
|
|
1384
|
-
declare const tabsComponentDefinition: ComponentDefinition;
|
|
1385
|
-
|
|
1386
|
-
/**
|
|
1387
|
-
* Timer Component
|
|
1388
|
-
* Countdown timer
|
|
1389
|
-
*
|
|
1390
|
-
* ✅ Now uses component-helpers for auto-typed values with validation
|
|
1391
|
-
*/
|
|
1392
|
-
|
|
1393
|
-
declare function TimerComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1394
|
-
|
|
1395
|
-
/**
|
|
1396
|
-
* Timer Component Schema
|
|
1397
|
-
* Countdown timer
|
|
1398
|
-
*/
|
|
1399
|
-
|
|
1400
|
-
declare const timerComponentDefinition: ComponentDefinition;
|
|
1401
|
-
|
|
1402
|
-
/**
|
|
1403
|
-
* Table Component
|
|
1404
|
-
* Data table display
|
|
1405
|
-
*
|
|
1406
|
-
* ✅ Now uses component-helpers for auto-typed values with validation
|
|
1407
|
-
*/
|
|
1408
|
-
|
|
1409
|
-
declare function TableComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1410
|
-
|
|
1411
|
-
/**
|
|
1412
|
-
* Table Component Schema
|
|
1413
|
-
* Data table display
|
|
1414
|
-
*/
|
|
1415
|
-
|
|
1416
|
-
declare const tableComponentDefinition: ComponentDefinition;
|
|
1417
|
-
|
|
1418
|
-
/**
|
|
1419
|
-
* Map Component
|
|
1420
|
-
* Embedded Google Maps
|
|
1421
|
-
*/
|
|
1422
|
-
|
|
1423
|
-
declare function MapComponent({ component, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1424
|
-
|
|
1425
|
-
/**
|
|
1426
|
-
* Map Component Schema
|
|
1427
|
-
* Google Maps embed
|
|
1428
|
-
*/
|
|
1429
|
-
|
|
1430
|
-
declare const mapComponentDefinition: ComponentDefinition;
|
|
1431
|
-
|
|
1432
|
-
/**
|
|
1433
|
-
* Code Component
|
|
1434
|
-
* Code block display
|
|
1435
|
-
*
|
|
1436
|
-
* ✅ Now uses component-helpers for auto-typed values with validation
|
|
1437
|
-
*/
|
|
1438
|
-
|
|
1439
|
-
declare function CodeComponent({ component, definition, sectionId, isEditing, className, }: ComponentProps): React$1.ReactElement;
|
|
1440
|
-
|
|
1441
|
-
/**
|
|
1442
|
-
* Code Component Schema
|
|
1443
|
-
* Code block with syntax highlighting
|
|
1444
|
-
*/
|
|
1445
|
-
|
|
1446
|
-
declare const codeComponentDefinition: ComponentDefinition;
|
|
1447
|
-
|
|
1448
|
-
/**
|
|
1449
|
-
* @onex/core/client - Client-Safe Exports
|
|
1450
|
-
*
|
|
1451
|
-
* This entry point exports only client-safe code that can be used in:
|
|
1452
|
-
* - Client Components ("use client")
|
|
1453
|
-
* - Server Components
|
|
1454
|
-
* - Shared utilities
|
|
1455
|
-
*
|
|
1456
|
-
* Does NOT include:
|
|
1457
|
-
* - ThemeRegistryManager (server-only, uses fs/promises)
|
|
1458
|
-
*/
|
|
1459
|
-
declare const version = "0.1.0";
|
|
1460
|
-
|
|
1461
|
-
export { AccordionComponent, AlertComponent, BadgeComponent, BlockInstance, BlockListRenderer, type BlockListRendererProps, BlockRegistry, BlockRenderer, type BlockRendererProps, ButtonComponent, CardComponent, CartContextType, CartProvider, CheckboxComponent, CodeComponent, ColumnsComponent, ComponentCategory, ComponentDefinition, ComponentInstance, ComponentListRenderer, type ComponentListRendererProps, ComponentProps, ComponentRegistration, ComponentRegistry, ComponentRenderer, type ComponentRendererProps, type ValidationError as ComponentValidationError, type ValidationResult as ComponentValidationResult, type ComponentValues, ContainerComponent, DetectionResult, DividerComponent, FullWidthSection, type FullWidthSectionProps, GalleryComponent, GridComponent, GridContainer, type GridContainerProps, type GroupedComponents, HeadingComponent, IconComponent, ImageComponent, InputComponent, LinkComponent, ListComponent, MapComponent, type PageData, PageDataProvider, type PageDataProviderProps, ParagraphComponent, ProgressComponent, QuoteComponent, RatingComponent, RegistryConfig, SectionComponentInstance, SectionComponentProps, SectionInstance, SectionListRenderer, type SectionListRendererProps, SectionRegistry, SectionRenderer, type SectionRendererProps, SectionSchema, type SectionValues, SelectComponent, SettingValue, type SlotConfig, SpacerComponent, TableComponent, TabsComponent, TemplateDefinition, TextareaComponent, ThemeContextProvider, type ThemeContextProviderProps, TimerComponent, type ValidationError$1 as ValidationError, type ValidationResult$1 as ValidationResult, VideoComponent, type ViewportMode, ViewportProvider, WebsiteSettings, accordionComponentDefinition, alertComponentDefinition, badgeComponentDefinition, blockRegistry, buttonComponentDefinition, cardComponentDefinition, checkboxComponentDefinition, cn, codeComponentDefinition, columnsComponentDefinition, componentRegistry, containerComponentDefinition, countEnabledItems, createBlockRegistry, createSectionRegistry, dividerComponentDefinition, filterEnabledBlocks, filterEnabledComponents, findBlockInSection, findComponentInSection, formatBlockName, galleryComponentDefinition, generateBlockId, generateHandle, generateId, generatePageId, generateSectionId, generateThemeId, getActiveBlocks, getActiveComponents, getBlockPath, getComponentPath, getComponentValues, getComponentsByType, getElementLabel, getFirstComponentByType, getSectionValues, getSelectionColor, gridComponentDefinition, groupBySlot, hasComponentType, hasEnabledItems, headingComponentDefinition, iconComponentDefinition, imageComponentDefinition, inputComponentDefinition, linkComponentDefinition, listComponentDefinition, mapComponentDefinition, paragraphComponentDefinition, progressComponentDefinition, quoteComponentDefinition, ratingComponentDefinition, removeNestedBlock, renderBlock, renderSection, sectionRegistry, selectComponentDefinition, sortBlocks, sortComponents, spacerComponentDefinition, tableComponentDefinition, tabsComponentDefinition, textareaComponentDefinition, timerComponentDefinition, toComponentInstance, updateNestedBlock, updateNestedComponent, useCart, useComponentInstance, useComponentRegistration, usePageData, useResponsiveClass, useThemeContext, useViewport, useWebsiteSettings, validateComponent, validateContent, validateSection, validateSettings, validateStyle, version, videoComponentDefinition };
|