@nordcraft/core 1.0.78 → 1.0.80

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.
Files changed (62) hide show
  1. package/dist/api/ToddleApiV2.d.ts +2 -2
  2. package/dist/api/apiTypes.d.ts +1 -1
  3. package/dist/component/component.types.d.ts +1 -1
  4. package/dist/component/schemas/action-schema.d.ts +3 -0
  5. package/dist/component/schemas/action-schema.js +169 -0
  6. package/dist/component/schemas/action-schema.js.map +1 -0
  7. package/dist/component/schemas/api-schema.d.ts +3 -0
  8. package/dist/component/schemas/api-schema.js +174 -0
  9. package/dist/component/schemas/api-schema.js.map +1 -0
  10. package/dist/component/schemas/attribute-schema.d.ts +3 -0
  11. package/dist/component/schemas/attribute-schema.js +12 -0
  12. package/dist/component/schemas/attribute-schema.js.map +1 -0
  13. package/dist/component/schemas/component-schema.d.ts +6 -0
  14. package/dist/component/schemas/component-schema.js +132 -0
  15. package/dist/component/schemas/component-schema.js.map +1 -0
  16. package/dist/component/schemas/context-schema.d.ts +3 -0
  17. package/dist/component/schemas/context-schema.js +20 -0
  18. package/dist/component/schemas/context-schema.js.map +1 -0
  19. package/dist/component/schemas/event-schema.d.ts +4 -0
  20. package/dist/component/schemas/event-schema.js +25 -0
  21. package/dist/component/schemas/event-schema.js.map +1 -0
  22. package/dist/component/schemas/formula-schema.d.ts +5 -0
  23. package/dist/component/schemas/formula-schema.js +203 -0
  24. package/dist/component/schemas/formula-schema.js.map +1 -0
  25. package/dist/component/schemas/node-schema.d.ts +3 -0
  26. package/dist/component/schemas/node-schema.js +159 -0
  27. package/dist/component/schemas/node-schema.js.map +1 -0
  28. package/dist/component/schemas/route-schema.d.ts +3 -0
  29. package/dist/component/schemas/route-schema.js +88 -0
  30. package/dist/component/schemas/route-schema.js.map +1 -0
  31. package/dist/component/schemas/variable-schema.d.ts +3 -0
  32. package/dist/component/schemas/variable-schema.js +8 -0
  33. package/dist/component/schemas/variable-schema.js.map +1 -0
  34. package/dist/component/schemas/workflow-schema.d.ts +3 -0
  35. package/dist/component/schemas/workflow-schema.js +23 -0
  36. package/dist/component/schemas/workflow-schema.js.map +1 -0
  37. package/dist/component/schemas/zod-schemas.d.ts +26 -3
  38. package/dist/component/schemas/zod-schemas.js +4 -1081
  39. package/dist/component/schemas/zod-schemas.js.map +1 -1
  40. package/dist/styling/theme.js +1 -0
  41. package/dist/styling/theme.js.map +1 -1
  42. package/dist/types.d.ts +1 -1
  43. package/dist/utils/collections.d.ts +1 -1
  44. package/dist/utils/collections.js.map +1 -1
  45. package/package.json +1 -1
  46. package/src/api/apiTypes.ts +1 -1
  47. package/src/component/component.types.ts +1 -1
  48. package/src/component/schemas/action-schema.ts +258 -0
  49. package/src/component/schemas/api-schema.ts +255 -0
  50. package/src/component/schemas/attribute-schema.ts +15 -0
  51. package/src/component/schemas/component-schema.ts +174 -0
  52. package/src/component/schemas/context-schema.ts +21 -0
  53. package/src/component/schemas/event-schema.ts +35 -0
  54. package/src/component/schemas/formula-schema.ts +299 -0
  55. package/src/component/schemas/node-schema.ts +259 -0
  56. package/src/component/schemas/route-schema.ts +135 -0
  57. package/src/component/schemas/variable-schema.ts +11 -0
  58. package/src/component/schemas/workflow-schema.ts +30 -0
  59. package/src/component/schemas/zod-schemas.ts +4 -1493
  60. package/src/styling/theme.ts +1 -0
  61. package/src/types.ts +1 -1
  62. package/src/utils/collections.ts +4 -1
@@ -0,0 +1,255 @@
1
+ import { z } from 'zod'
2
+ import type {
3
+ ApiParserMode,
4
+ ApiRequest,
5
+ ComponentAPI,
6
+ LegacyComponentAPI,
7
+ } from '../../api/apiTypes'
8
+ import { EventModelSchema } from './event-schema'
9
+ import { FormulaSchema } from './formula-schema'
10
+ import { MetadataSchema } from './zod-schemas'
11
+
12
+ // API Models
13
+ const ApiMethodSchema: z.ZodType<any> = z
14
+ .enum(['GET', 'POST', 'DELETE', 'PUT', 'PATCH', 'HEAD', 'OPTIONS'])
15
+ .describe('HTTP method for the API request.')
16
+
17
+ const ApiParserModeSchema: z.ZodType<ApiParserMode> = z
18
+ .enum(['auto', 'text', 'json', 'event-stream', 'json-stream', 'blob'])
19
+ .describe('Available modes for parsing API responses.')
20
+
21
+ const RedirectStatusCodes = {
22
+ '300': 300,
23
+ '301': 301,
24
+ '302': 302,
25
+ '303': 303,
26
+ '304': 304,
27
+ '307': 307,
28
+ '308': 308,
29
+ }
30
+ const RedirectStatusCodeSchema: z.ZodType<any> = z
31
+ .enum(RedirectStatusCodes)
32
+ .describe('HTTP status code to use for the redirect.')
33
+
34
+ const ApiRequestSchema: z.ZodType<ApiRequest> = z
35
+ .object({
36
+ '@nordcraft/metadata': MetadataSchema.nullish().describe(
37
+ 'Metadata for the API request',
38
+ ),
39
+ version: z
40
+ .literal(2)
41
+ .describe('Version of the API request schema. This should always be 2.'),
42
+ name: z.string().describe('Name of the API request.'),
43
+ type: z.enum(['http', 'ws']).describe('Type of the API request.'),
44
+ method: ApiMethodSchema.nullish().describe(
45
+ 'HTTP method for the API request.',
46
+ ),
47
+ url: FormulaSchema.nullish().describe(
48
+ 'Base URL for the API request. Params and query strings are added when this API is called.',
49
+ ),
50
+ service: z
51
+ .string()
52
+ .nullish()
53
+ .describe(
54
+ 'Name of the service to use for the API request. Only Services defined in the project can be used here.',
55
+ ),
56
+ servicePath: z
57
+ .string()
58
+ .nullish()
59
+ .describe(
60
+ 'File path to the service definition. If service is defined, servicePath must also be defined.',
61
+ ),
62
+ inputs: z
63
+ .record(
64
+ z.string().describe('Name of the input'),
65
+ z
66
+ .object({
67
+ formula: FormulaSchema.nullish(),
68
+ })
69
+ .describe('Formula evaluating to the input value.'),
70
+ )
71
+ .describe(
72
+ 'Inputs to the API request. Inputs have a default value that can be overridden when the API is started from a workflow. Inputs can be used inside any Formula in the API request definition.',
73
+ ),
74
+ path: z
75
+ .record(
76
+ z.string().describe('Name of the path segment'),
77
+ z.object({
78
+ formula: FormulaSchema.describe(
79
+ 'Formula evaluating to the value of the path segment',
80
+ ),
81
+ index: z
82
+ .number()
83
+ .describe('Index defining the order of the path segments.'),
84
+ }),
85
+ )
86
+ .nullish()
87
+ .describe('Path segments to include in the API request.'),
88
+ queryParams: z
89
+ .record(
90
+ z.string().describe('Name of the query parameter'),
91
+ z.object({
92
+ formula: FormulaSchema.describe(
93
+ 'Formula evaluating to the value of the query parameter',
94
+ ),
95
+ enabled: FormulaSchema.nullish().describe(
96
+ 'Formula evaluating to whether the query parameter is included or not. If included it should evaluate to true.',
97
+ ),
98
+ }),
99
+ )
100
+ .nullish()
101
+ .describe('Query parameters to include in the API request.'),
102
+ headers: z
103
+ .record(
104
+ z.string().describe('Name of the header'),
105
+ z.object({
106
+ formula: FormulaSchema.describe(
107
+ 'Formula evaluating to the header value',
108
+ ),
109
+ enabled: FormulaSchema.nullish().describe(
110
+ 'Formula evaluating to whether the header is included or not. If included it should evaluate to true.',
111
+ ),
112
+ }),
113
+ )
114
+ .nullish()
115
+ .describe('Headers to include in the API request.'),
116
+ body: FormulaSchema.nullish().describe('Body of the API request.'),
117
+ autoFetch: FormulaSchema.nullish().describe(
118
+ 'Indicates if the API request should be automatically fetched when the component or page loads.',
119
+ ),
120
+ client: z
121
+ .object({
122
+ parserMode: ApiParserModeSchema.describe(
123
+ 'Defines how the API response should be parsed.',
124
+ ),
125
+ credentials: z
126
+ .enum(['include', 'same-origin', 'omit'])
127
+ .nullish()
128
+ .describe(
129
+ 'Indicates whether credentials such as cookies or authorization headers should be sent with the request.',
130
+ ),
131
+ debounce: z
132
+ .object({ formula: FormulaSchema })
133
+ .nullish()
134
+ .describe(
135
+ 'Debounce time in milliseconds for the API request. Useful for limiting the number of requests made when inputs change rapidly.',
136
+ ),
137
+ onCompleted: EventModelSchema.nullish().describe(
138
+ 'Event triggered when the API request completes successfully.',
139
+ ),
140
+ onFailed: EventModelSchema.nullish().describe(
141
+ 'Event triggered when the API request fails. This is also triggered when the isError formula evaluates to true.',
142
+ ),
143
+ onMessage: EventModelSchema.nullish().describe(
144
+ 'Event triggered when a message is received from the API. Only applicable for WebSocket and streaming APIs.',
145
+ ),
146
+ })
147
+ .nullish()
148
+ .describe('Client-side settings for the API request.'),
149
+ server: z
150
+ .object({
151
+ proxy: z
152
+ .object({
153
+ enabled: z
154
+ .object({ formula: FormulaSchema })
155
+ .describe(
156
+ 'Indicates if the API request should be proxied through the Nordcraft backend server. This is useful for avoiding CORS issues or hiding sensitive information in the request. It is also useful if the request needs access to http-only cookies.',
157
+ ),
158
+ useTemplatesInBody: z
159
+ .object({ formula: FormulaSchema })
160
+ .nullish()
161
+ .describe(
162
+ 'Indicates if templates in the body should be processed when proxying the request. A template could be a http-only cookie that needs to be included in the proxied request. Enabling this flag will ensure that templates in the body are processed before sending the proxied request.',
163
+ ),
164
+ })
165
+ .nullish()
166
+ .describe('Proxy settings for the API request.'),
167
+ ssr: z
168
+ .object({
169
+ enabled: z
170
+ .object({ formula: FormulaSchema })
171
+ .nullish()
172
+ .describe(
173
+ 'Indicates if server-side rendering is enabled for this API request. This means the API will be executed on the server during the initial page load. Note: This can have performance implications for the loading of a page on slow APIs.',
174
+ ),
175
+ })
176
+ .nullish()
177
+ .describe('Server-side rendering settings.'),
178
+ })
179
+ .nullish()
180
+ .describe('Server-side settings for the API request.'),
181
+ timeout: z
182
+ .object({ formula: FormulaSchema })
183
+ .nullish()
184
+ .describe('Timeout for the API request in milliseconds.'),
185
+ hash: z.object({ formula: FormulaSchema }).nullish(),
186
+ isError: z
187
+ .object({ formula: FormulaSchema })
188
+ .nullish()
189
+ .describe(
190
+ 'Indicates if the last API response was an error. Useful for forcing a response to be treated as an error even if status code is 200.',
191
+ ),
192
+ redirectRules: z
193
+ .record(
194
+ z.string().describe('The key of the redirect rule.'),
195
+ z
196
+ .object({
197
+ formula: FormulaSchema.describe(
198
+ 'Formula evaluating to the URL. If a URL is returned, the redirect will be triggered. If null is returned, no redirect will happen.',
199
+ ),
200
+ index: z
201
+ .number()
202
+ .describe('Index defining the order of the redirect rules.'),
203
+ statusCode: RedirectStatusCodeSchema.nullish().describe(
204
+ 'HTTP status code to use for the redirect.',
205
+ ),
206
+ })
207
+ .describe('Defines a single redirect rule.'),
208
+ )
209
+ .nullish()
210
+ .describe(
211
+ 'Rules for redirecting based on response data. The key is a unique identifier for the rule.',
212
+ ),
213
+ })
214
+ .describe('Schema defining an API request from a component or a page.')
215
+
216
+ const LegacyComponentAPISchema: z.ZodType<LegacyComponentAPI> = z
217
+ .object({
218
+ type: z.literal('REST'),
219
+ name: z.string(),
220
+ method: z.enum(['GET', 'POST', 'DELETE', 'PUT']),
221
+ url: FormulaSchema.nullish(),
222
+ path: z.array(z.object({ formula: FormulaSchema })).nullish(),
223
+ queryParams: z
224
+ .record(
225
+ z.string(),
226
+ z.object({
227
+ name: z.string(),
228
+ formula: FormulaSchema,
229
+ }),
230
+ )
231
+ .nullish(),
232
+ headers: z
233
+ .union([z.record(z.string(), FormulaSchema), FormulaSchema])
234
+ .nullish(),
235
+ body: FormulaSchema.nullish(),
236
+ autoFetch: FormulaSchema.nullish(),
237
+ proxy: z.boolean().nullish(),
238
+ debounce: z.number().nullish(),
239
+ throttle: z.number().nullish(),
240
+ onCompleted: EventModelSchema.nullish(),
241
+ onFailed: EventModelSchema.nullish(),
242
+ auth: z
243
+ .object({
244
+ type: z.enum(['Bearer id_token', 'Bearer access_token']),
245
+ })
246
+ .nullish(),
247
+ })
248
+ .describe(
249
+ 'Legacy API schema for backward compatibility. Never use this for new APIs.',
250
+ )
251
+
252
+ export const ComponentAPISchema: z.ZodType<ComponentAPI> = z.union([
253
+ LegacyComponentAPISchema,
254
+ ApiRequestSchema,
255
+ ])
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod'
2
+ import type { ComponentAttribute } from '../component.types'
3
+ import { MetadataSchema, SCHEMA_DESCRIPTIONS } from './zod-schemas'
4
+
5
+ export const ComponentAttributeSchema: z.ZodType<ComponentAttribute> = z
6
+ .object({
7
+ '@nordcraft/metadata': MetadataSchema.nullish().describe(
8
+ SCHEMA_DESCRIPTIONS.metadata('component attribute'),
9
+ ),
10
+ name: z.string().describe('Name of the component attribute'),
11
+ testValue: z
12
+ .any()
13
+ .describe(SCHEMA_DESCRIPTIONS.testData('component attribute')),
14
+ })
15
+ .describe('Schema for a component attribute.')
@@ -0,0 +1,174 @@
1
+ import { z } from 'zod'
2
+ import type { Component, PageComponent } from '../component.types'
3
+ import { ActionModelSchema } from './action-schema'
4
+ import { ComponentAPISchema } from './api-schema'
5
+ import { ComponentAttributeSchema } from './attribute-schema'
6
+ import { ComponentContextSchema } from './context-schema'
7
+ import { ComponentEventSchema } from './event-schema'
8
+ import { ComponentFormulaSchema } from './formula-schema'
9
+ import { NodeModelSchema } from './node-schema'
10
+ import { RouteSchema } from './route-schema'
11
+ import { ComponentVariableSchema } from './variable-schema'
12
+ import { ComponentWorkflowSchema } from './workflow-schema'
13
+ import { SCHEMA_DESCRIPTIONS } from './zod-schemas'
14
+
15
+ const commonComponentSchema = (type: 'component' | 'page') =>
16
+ z
17
+ .object({
18
+ name: z.string().describe(`Name of the ${type}`),
19
+ exported: z
20
+ .boolean()
21
+ .nullish()
22
+ .describe(
23
+ `Whether the ${type} is exported in a package project for use in other projects. Do not change this value. It should be managed by the user.`,
24
+ ),
25
+ nodes: z
26
+ .record(z.string(), NodeModelSchema)
27
+ .nullish()
28
+ .describe(
29
+ `All nodes in the ${type}, indexed by their unique IDs. Nodes represent HTML elements, text, slots, or ${type === 'component' ? 'other components' : 'components'}. They defined the UI structure of the ${type}.`,
30
+ ),
31
+ variables: z
32
+ .record(z.string(), ComponentVariableSchema)
33
+ .nullish()
34
+ .describe(SCHEMA_DESCRIPTIONS.variables(type)),
35
+ formulas: z
36
+ .record(z.string(), ComponentFormulaSchema)
37
+ .nullish()
38
+ .describe(SCHEMA_DESCRIPTIONS.formulas(type)),
39
+ workflows: z
40
+ .record(z.string(), ComponentWorkflowSchema)
41
+ .nullish()
42
+ .describe(SCHEMA_DESCRIPTIONS.workflows(type)),
43
+ apis: z
44
+ .record(z.string(), ComponentAPISchema)
45
+ .nullish()
46
+ .describe(SCHEMA_DESCRIPTIONS.apis(type)),
47
+ events: z
48
+ .array(ComponentEventSchema)
49
+ .nullish()
50
+ .describe(
51
+ 'All events this the component can emit. Events allow the component to communicate with its parent or other components. They can be triggered via actions.',
52
+ ),
53
+ contexts: z
54
+ .record(z.string(), ComponentContextSchema)
55
+ .nullish()
56
+ .describe(
57
+ 'Defines which contexts this component is subscribed to. Contexts allow the component to access formulas and workflows from other components, enabling reusability and modular design.',
58
+ ),
59
+ onLoad: z
60
+ .object({
61
+ trigger: z.literal('Load'),
62
+ actions: z.array(ActionModelSchema),
63
+ })
64
+ .nullish()
65
+ .describe(SCHEMA_DESCRIPTIONS.onLoad(type)),
66
+ onAttributeChange: z
67
+ .object({
68
+ trigger: z.literal('Attribute change'),
69
+ actions: z.array(ActionModelSchema),
70
+ })
71
+ .nullish()
72
+ .describe(SCHEMA_DESCRIPTIONS.onAttributeChange(type)),
73
+ })
74
+ .describe('Schema defining a reusable Nordcraft component.')
75
+
76
+ export const ComponentSchema: z.ZodType<Component> = commonComponentSchema(
77
+ 'component',
78
+ ).extend({
79
+ attributes: z
80
+ .record(z.string(), ComponentAttributeSchema)
81
+ .nullish()
82
+ .describe(
83
+ 'All attributes that can be passed into the component when it is used. Attributes allow for customization and configuration of the component instance. When the value of an attribute changes, any formulas depending on it will automatically recalculate and the onAttributeChange lifecycle event is triggered.',
84
+ ),
85
+ })
86
+
87
+ export const PageSchema: z.ZodType<PageComponent> = commonComponentSchema(
88
+ 'page',
89
+ ).extend({
90
+ attributes: z
91
+ .object({})
92
+ .nullish()
93
+ .describe(
94
+ 'Attributes for the page (currently none). Should always be an empty object.',
95
+ ),
96
+ route: RouteSchema.describe(
97
+ 'Route information for the page, including path segments, query parameters, and metadata such as title and description.',
98
+ ),
99
+ })
100
+
101
+ const shallowCommonComponentSchema = (type: 'component' | 'page') =>
102
+ z
103
+ .object({
104
+ name: z.string().describe(`Name of the ${type}`),
105
+ exported: z
106
+ .boolean()
107
+ .nullish()
108
+ .describe(
109
+ `Whether the ${type} is exported in a package project for use in other projects. Do not change this value. It should be managed by the user.`,
110
+ ),
111
+ nodes: z
112
+ .record(z.string(), z.any())
113
+ .nullish()
114
+ .describe(
115
+ `All nodes in the ${type}, indexed by their unique IDs. Nodes represent HTML elements, text, slots, or ${type === 'component' ? 'other components' : 'components'}. They defined the UI structure of the ${type}.`,
116
+ ),
117
+ variables: z
118
+ .record(z.string(), z.any())
119
+ .nullish()
120
+ .describe(SCHEMA_DESCRIPTIONS.variables(type)),
121
+ formulas: z
122
+ .record(z.string(), z.any())
123
+ .nullish()
124
+ .describe(SCHEMA_DESCRIPTIONS.formulas(type)),
125
+ workflows: z
126
+ .record(z.string(), z.any())
127
+ .nullish()
128
+ .describe(SCHEMA_DESCRIPTIONS.workflows(type)),
129
+ apis: z
130
+ .record(z.string(), z.any())
131
+ .nullish()
132
+ .describe(SCHEMA_DESCRIPTIONS.apis(type)),
133
+ events: z
134
+ .array(z.any())
135
+ .nullish()
136
+ .describe(
137
+ 'All events this the component can emit. Events allow the component to communicate with its parent or other components. They can be triggered via actions.',
138
+ ),
139
+ contexts: z
140
+ .record(z.string(), z.any())
141
+ .nullish()
142
+ .describe(
143
+ 'Defines which contexts this component is subscribed to. Contexts allow the component to access formulas and workflows from other components, enabling reusability and modular design.',
144
+ ),
145
+ onLoad: z.any().nullish().describe(SCHEMA_DESCRIPTIONS.onLoad(type)),
146
+ onAttributeChange: z
147
+ .any()
148
+ .nullish()
149
+ .describe(SCHEMA_DESCRIPTIONS.onAttributeChange(type)),
150
+ })
151
+ .describe('Schema defining a reusable Nordcraft component.')
152
+
153
+ export const ShallowComponentSchema: z.ZodType<Component> =
154
+ shallowCommonComponentSchema('component').extend({
155
+ attributes: z
156
+ .record(z.string(), z.any())
157
+ .nullish()
158
+ .describe(
159
+ 'All attributes that can be passed into the component when it is used. Attributes allow for customization and configuration of the component instance. When the value of an attribute changes, any formulas depending on it will automatically recalculate and the onAttributeChange lifecycle event is triggered.',
160
+ ),
161
+ })
162
+
163
+ export const ShallowPageSchema: z.ZodType<PageComponent> =
164
+ shallowCommonComponentSchema('page').extend({
165
+ attributes: z
166
+ .any()
167
+ .nullish()
168
+ .describe(
169
+ 'Attributes for the page (currently none). Should always be an empty object.',
170
+ ),
171
+ route: RouteSchema.describe(
172
+ 'Route information for the page, including path segments, query parameters, and metadata such as title and description.',
173
+ ),
174
+ })
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod'
2
+ import type { ComponentContext } from '../component.types'
3
+
4
+ export const ComponentContextSchema: z.ZodType<ComponentContext> = z
5
+ .object({
6
+ package: z
7
+ .string()
8
+ .nullish()
9
+ .describe('Package name of the component providing the context'),
10
+ componentName: z
11
+ .string()
12
+ .nullish()
13
+ .describe('Name of the component providing the context'),
14
+ formulas: z
15
+ .array(z.string())
16
+ .describe('Names of the formulas from the context to subscribe to'),
17
+ workflows: z
18
+ .array(z.string())
19
+ .describe('Names of the workflows from the context to subscribe to'),
20
+ })
21
+ .describe('Schema defining a component context subscription.')
@@ -0,0 +1,35 @@
1
+ /* eslint-disable inclusive-language/use-inclusive-words */
2
+ import { z } from 'zod'
3
+ import type { ComponentEvent, EventModel } from '../component.types'
4
+ import { ActionModelSchema } from './action-schema'
5
+ import { MetadataSchema, SCHEMA_DESCRIPTIONS } from './zod-schemas'
6
+
7
+ // Event Model
8
+ export const EventModelSchema: z.ZodType<EventModel> = z
9
+ .lazy(() =>
10
+ z.object({
11
+ trigger: z
12
+ .string()
13
+ .describe(
14
+ 'Name of the event trigger. Nordcraft does not prefix events with "on", fx a click event is just called: "click".',
15
+ ),
16
+ actions: z
17
+ .array(ActionModelSchema)
18
+ .describe('List of actions to execute.'),
19
+ }),
20
+ )
21
+ .describe(
22
+ 'Model describing an event. Events are used to define actions that should be executed in response to specific triggers, such as user interactions or lifecycle events.',
23
+ )
24
+
25
+ export const ComponentEventSchema: z.ZodType<ComponentEvent> = z
26
+ .object({
27
+ '@nordcraft/metadata': MetadataSchema.nullish().describe(
28
+ SCHEMA_DESCRIPTIONS.metadata('component event'),
29
+ ),
30
+ name: z.string().describe('Name of the component event'),
31
+ dummyEvent: z
32
+ .any()
33
+ .describe(SCHEMA_DESCRIPTIONS.testData('component event')),
34
+ })
35
+ .describe('Schema for a component event.')