@wix/zero-config-implementation 1.19.0 → 1.21.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/src/schema.ts DELETED
@@ -1,206 +0,0 @@
1
- // ─────────────────────────────────────────────────────────────────────────────
2
- // Constants
3
- // Extracted verbatim from @wix/component-protocol (chunk-U3HQJA7D.js).
4
- // ─────────────────────────────────────────────────────────────────────────────
5
-
6
- const DATA_TYPE = {
7
- UNKNOWN_DataType: 'UNKNOWN_DataType',
8
- text: 'text',
9
- textEnum: 'textEnum',
10
- number: 'number',
11
- booleanValue: 'booleanValue',
12
- a11y: 'a11y',
13
- link: 'link',
14
- image: 'image',
15
- video: 'video',
16
- vectorArt: 'vectorArt',
17
- audio: 'audio',
18
- schema: 'schema',
19
- localDate: 'localDate',
20
- localTime: 'localTime',
21
- localDateTime: 'localDateTime',
22
- webUrl: 'webUrl',
23
- email: 'email',
24
- phone: 'phone',
25
- hostname: 'hostname',
26
- regex: 'regex',
27
- guid: 'guid',
28
- richText: 'richText',
29
- container: 'container',
30
- arrayItems: 'arrayItems',
31
- direction: 'direction',
32
- menuItems: 'menuItems',
33
- data: 'data',
34
- function: 'function',
35
- onClick: 'onClick',
36
- onChange: 'onChange',
37
- onKeyPress: 'onKeyPress',
38
- onKeyUp: 'onKeyUp',
39
- onSubmit: 'onSubmit',
40
- } as const
41
-
42
- const A11Y_ATTRIBUTES = {
43
- Unknown_AriaAttributes: 'Unknown_AriaAttributes',
44
- tabIndex: 'tabIndex',
45
- ariaLevel: 'ariaLevel',
46
- ariaExpanded: 'ariaExpanded',
47
- ariaDisabled: 'ariaDisabled',
48
- ariaAtomic: 'ariaAtomic',
49
- ariaHidden: 'ariaHidden',
50
- ariaBusy: 'ariaBusy',
51
- multiline: 'multiline',
52
- ariaAutocomplete: 'ariaAutocomplete',
53
- ariaPressed: 'ariaPressed',
54
- ariaHaspopup: 'ariaHaspopup',
55
- ariaRelevant: 'ariaRelevant',
56
- role: 'role',
57
- ariaLive: 'ariaLive',
58
- ariaCurrent: 'ariaCurrent',
59
- ariaLabel: 'ariaLabel',
60
- ariaRoledescription: 'ariaRoledescription',
61
- ariaDescribedby: 'ariaDescribedby',
62
- ariaLabelledby: 'ariaLabelledby',
63
- ariaErrormessage: 'ariaErrormessage',
64
- ariaOwns: 'ariaOwns',
65
- ariaControls: 'ariaControls',
66
- tag: 'tag',
67
- ariaMultiline: 'ariaMultiline',
68
- ariaInvalid: 'ariaInvalid',
69
- } as const
70
-
71
- const LINK_TYPE = {
72
- UNKNOWN_LinkType: 'UNKNOWN_LinkType',
73
- externalLink: 'externalLink',
74
- anchorLink: 'anchorLink',
75
- emailLink: 'emailLink',
76
- phoneLink: 'phoneLink',
77
- dynamicPageLink: 'dynamicPageLink',
78
- pageLink: 'pageLink',
79
- whatsAppLink: 'whatsAppLink',
80
- documentLink: 'documentLink',
81
- popupLink: 'popupLink',
82
- addressLink: 'addressLink',
83
- edgeAnchorLinks: 'edgeAnchorLinks',
84
- loginToWixLink: 'loginToWixLink',
85
- } as const
86
-
87
- const IMAGE_CATEGORY = {
88
- UNKNOWN_CategoryName: 'UNKNOWN_CategoryName',
89
- IMAGE: 'IMAGE',
90
- IMAGE_BACKGROUND: 'IMAGE_BACKGROUND',
91
- } as const
92
-
93
- const VIDEO_CATEGORY = {
94
- UNKNOWN_VideoCategoryTypes: 'UNKNOWN_VideoCategoryTypes',
95
- VIDEO: 'VIDEO',
96
- VIDEO_TRANSPARENT: 'VIDEO_TRANSPARENT',
97
- VIDEO_OPAQUE: 'VIDEO_OPAQUE',
98
- } as const
99
-
100
- const VECTOR_ART_CATEGORY = {
101
- UNKNOWN_VectorArtCategoryTypes: 'UNKNOWN_VectorArtCategoryTypes',
102
- SHAPE_ALL: 'SHAPE_ALL',
103
- SHAPE_BASIC: 'SHAPE_BASIC',
104
- SHAPE_ART: 'SHAPE_ART',
105
- ICON_SOCIAL: 'ICON_SOCIAL',
106
- SHAPE_DIVIDERS: 'SHAPE_DIVIDERS',
107
- SHAPE_LOCATION: 'SHAPE_LOCATION',
108
- SHAPE_DOCUMENTS: 'SHAPE_DOCUMENTS',
109
- SHAPE_SOCIAL: 'SHAPE_SOCIAL',
110
- SHAPE_ARROWS: 'SHAPE_ARROWS',
111
- } as const
112
-
113
- const ELEMENT_TYPE = {
114
- UNKNOWN_ElementType: 'UNKNOWN_ElementType',
115
- inlineElement: 'inlineElement',
116
- refElement: 'refElement',
117
- } as const
118
-
119
- /**
120
- * Maps @wix/public-schemas type names (PascalCase) to their DATA_TYPE keys.
121
- * Derived from the exports of @wix/public-schemas.
122
- */
123
- const WIX_TYPE_TO_DATA_TYPE: Record<string, keyof typeof DATA_TYPE> = {
124
- Link: 'link',
125
- Image: 'image',
126
- Video: 'video',
127
- VectorArt: 'vectorArt',
128
- A11y: 'a11y',
129
- Audio: 'audio',
130
- MenuItems: 'menuItems',
131
- Schema: 'schema',
132
- Text: 'text',
133
- TextEnum: 'textEnum',
134
- NumberType: 'number',
135
- BooleanValue: 'booleanValue',
136
- LocalDate: 'localDate',
137
- LocalTime: 'localTime',
138
- LocalDateTime: 'localDateTime',
139
- WebUrl: 'webUrl',
140
- Email: 'email',
141
- Phone: 'phone',
142
- Hostname: 'hostname',
143
- Regex: 'regex',
144
- Guid: 'guid',
145
- RichText: 'richText',
146
- Container: 'container',
147
- ArrayItems: 'arrayItems',
148
- Direction: 'direction',
149
- }
150
-
151
- export const DATA = { DATA_TYPE, A11Y_ATTRIBUTES, LINK_TYPE, WIX_TYPE_TO_DATA_TYPE }
152
- export const MEDIA = { VIDEO_CATEGORY, VECTOR_ART_CATEGORY, IMAGE_CATEGORY }
153
- export const ELEMENTS = { ELEMENT_TYPE }
154
-
155
- // ─────────────────────────────────────────────────────────────────────────────
156
- // Types
157
- // Minimal stubs matching only the properties accessed in this codebase.
158
- // ─────────────────────────────────────────────────────────────────────────────
159
-
160
- export interface DataItem {
161
- displayName?: string
162
- defaultValue?: unknown
163
- dataType?: string
164
- text?: Record<string, unknown>
165
- number?: Record<string, unknown>
166
- booleanValue?: unknown
167
- textEnum?: { options: Array<{ value: string; displayName?: string }> }
168
- arrayItems?: { dataItem?: DataItem }
169
- data?: { items?: Record<string, DataItem> }
170
- function?: Record<string, unknown>
171
- link?: { linkTypes?: string[] }
172
- image?: { category?: string }
173
- }
174
-
175
- export interface CssPropertyItem {
176
- defaultValue?: string
177
- }
178
-
179
- export interface CssCustomPropertyItem {
180
- defaultValue?: string
181
- }
182
-
183
- export interface EditorElement {
184
- selector?: string
185
- displayName?: string
186
- data?: Record<string, DataItem>
187
- elements?: Record<string, ElementItem>
188
- cssProperties?: Record<string, CssPropertyItem>
189
- cssCustomProperties?: Record<string, CssCustomPropertyItem>
190
- }
191
-
192
- export interface ElementItem {
193
- elementType?: string
194
- inlineElement?: {
195
- selector?: string
196
- displayName?: string
197
- data?: Record<string, DataItem>
198
- cssProperties?: Record<string, CssPropertyItem>
199
- cssCustomProperties?: Record<string, CssCustomPropertyItem>
200
- elements?: Record<string, ElementItem>
201
- }
202
- }
203
-
204
- export interface EditorReactComponent {
205
- editorElement?: EditorElement
206
- }