@keemakr/ui-sdk 1.4.0-dev-20261012093350 → 1.4.0-dev-20261012120249

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.
@@ -0,0 +1,49 @@
1
+ export type CalendarView = 'day' | 'week' | 'month';
2
+ /** `days` after a YYYY-MM-DD day, as YYYY-MM-DD. Calendar arithmetic, no zone. */
3
+ export declare function addDays(day: string, days: number): string;
4
+ /**
5
+ * The days a view draws: one for a day, Monday to Sunday for a week, and six
6
+ * whole weeks from the Monday on or before the 1st for a month (so a month grid
7
+ * never changes height between months).
8
+ */
9
+ export declare function calendarDays(view: CalendarView, date: string): string[];
10
+ /** The date previous or next moves to. A month step keeps the day where it can:
11
+ * 31 January steps to 28 (or 29) February, not into March. */
12
+ export declare function shiftCalendarDate(view: CalendarView, date: string, step: 1 | -1): string;
13
+ /** Midnight at the start of a day, in the viewer's zone or in UTC. */
14
+ export declare function dayStartMs(day: string, utc: boolean): number;
15
+ /** Today as YYYY-MM-DD, in the viewer's zone or in UTC. */
16
+ export declare function todayIn(utc: boolean, now?: number): string;
17
+ /** The ISO start and end of the free time `slot` (counted from `startHour`). */
18
+ export declare function slotTimes(day: string, startHour: number, slotMinutes: number, slot: number, utc: boolean): {
19
+ start: string;
20
+ end: string;
21
+ };
22
+ export interface CalendarEntryLike {
23
+ key: string;
24
+ start: string;
25
+ end: string;
26
+ resource?: string;
27
+ }
28
+ export interface PlacedEntry<E> {
29
+ entry: E;
30
+ /** Where the entry starts and how tall it is, as fractions of the drawn hours. */
31
+ top: number;
32
+ height: number;
33
+ /** Side by side with its overlaps: lane `lane` of `lanes`. */
34
+ lane: number;
35
+ lanes: number;
36
+ }
37
+ /**
38
+ * The entries one column draws, between `startHour` and `endHour` of `day`. An
39
+ * entry that runs past either edge is clipped to it; one wholly outside is left
40
+ * out. Overlapping entries share the width in lanes, as a printed diary does.
41
+ */
42
+ export declare function placeEntries<E extends CalendarEntryLike>(entries: readonly E[], day: string, startHour: number, endHour: number, utc: boolean): PlacedEntry<E>[];
43
+ /** The entries that touch any part of `day`, earliest first. For the month view. */
44
+ export declare function entriesOnDay<E extends CalendarEntryLike>(entries: readonly E[], day: string, utc: boolean): E[];
45
+ /** True when a free time in a column is not covered by any entry in it. */
46
+ export declare function slotIsFree(entries: readonly CalendarEntryLike[], times: {
47
+ start: string;
48
+ end: string;
49
+ }): boolean;
@@ -0,0 +1,138 @@
1
+ // Renderer-side helpers for the `calendar` node. They live in the SDK, not in a
2
+ // renderer, because core and every client draw this node: which days a week
3
+ // holds, where an entry sits and which entries share a row must be one rule, or
4
+ // the same tree lays out differently on web and mobile.
5
+ //
6
+ // Every function takes `utc`. A renderer passes false to lay out in the viewer's
7
+ // own time zone, and true where it cannot know that zone (a server render), so
8
+ // the first paint never claims to be local time.
9
+ const DAY_MS = 24 * 3600 * 1000;
10
+ function parts(day) {
11
+ const [y, m, d] = day.split('-').map(Number);
12
+ return [y ?? 1970, (m ?? 1) - 1, d ?? 1];
13
+ }
14
+ function isoDay(ms) {
15
+ return new Date(ms).toISOString().slice(0, 10);
16
+ }
17
+ /** `days` after a YYYY-MM-DD day, as YYYY-MM-DD. Calendar arithmetic, no zone. */
18
+ export function addDays(day, days) {
19
+ const [y, m, d] = parts(day);
20
+ return isoDay(Date.UTC(y, m, d + days));
21
+ }
22
+ /** The Monday on or before a day. */
23
+ function mondayOf(day) {
24
+ const [y, m, d] = parts(day);
25
+ const weekday = (new Date(Date.UTC(y, m, d)).getUTCDay() + 6) % 7;
26
+ return addDays(day, -weekday);
27
+ }
28
+ /**
29
+ * The days a view draws: one for a day, Monday to Sunday for a week, and six
30
+ * whole weeks from the Monday on or before the 1st for a month (so a month grid
31
+ * never changes height between months).
32
+ */
33
+ export function calendarDays(view, date) {
34
+ if (view === 'day')
35
+ return [date];
36
+ if (view === 'week') {
37
+ const monday = mondayOf(date);
38
+ return Array.from({ length: 7 }, (_, i) => addDays(monday, i));
39
+ }
40
+ const [y, m] = parts(date);
41
+ const first = mondayOf(isoDay(Date.UTC(y, m, 1)));
42
+ return Array.from({ length: 42 }, (_, i) => addDays(first, i));
43
+ }
44
+ /** The date previous or next moves to. A month step keeps the day where it can:
45
+ * 31 January steps to 28 (or 29) February, not into March. */
46
+ export function shiftCalendarDate(view, date, step) {
47
+ if (view === 'day')
48
+ return addDays(date, step);
49
+ if (view === 'week')
50
+ return addDays(date, 7 * step);
51
+ const [y, m, d] = parts(date);
52
+ const lastDay = new Date(Date.UTC(y, m + step + 1, 0)).getUTCDate();
53
+ return isoDay(Date.UTC(y, m + step, Math.min(d, lastDay)));
54
+ }
55
+ /** Midnight at the start of a day, in the viewer's zone or in UTC. */
56
+ export function dayStartMs(day, utc) {
57
+ const [y, m, d] = parts(day);
58
+ return utc ? Date.UTC(y, m, d) : new Date(y, m, d).getTime();
59
+ }
60
+ /** Today as YYYY-MM-DD, in the viewer's zone or in UTC. */
61
+ export function todayIn(utc, now = Date.now()) {
62
+ if (utc)
63
+ return isoDay(now);
64
+ const date = new Date(now);
65
+ const pad = (n) => String(n).padStart(2, '0');
66
+ return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
67
+ }
68
+ /** The ISO start and end of the free time `slot` (counted from `startHour`). */
69
+ export function slotTimes(day, startHour, slotMinutes, slot, utc) {
70
+ const startMs = dayStartMs(day, utc) + (startHour * 60 + slot * slotMinutes) * 60_000;
71
+ return {
72
+ start: new Date(startMs).toISOString(),
73
+ end: new Date(startMs + slotMinutes * 60_000).toISOString(),
74
+ };
75
+ }
76
+ /**
77
+ * The entries one column draws, between `startHour` and `endHour` of `day`. An
78
+ * entry that runs past either edge is clipped to it; one wholly outside is left
79
+ * out. Overlapping entries share the width in lanes, as a printed diary does.
80
+ */
81
+ export function placeEntries(entries, day, startHour, endHour, utc) {
82
+ const from = dayStartMs(day, utc) + startHour * 3600_000;
83
+ const to = dayStartMs(day, utc) + endHour * 3600_000;
84
+ const span = to - from;
85
+ const inView = entries
86
+ .map((entry) => ({
87
+ entry,
88
+ startMs: Math.max(Date.parse(entry.start), from),
89
+ endMs: Math.min(Date.parse(entry.end), to),
90
+ }))
91
+ .filter((e) => e.endMs > e.startMs)
92
+ .sort((a, b) => a.startMs - b.startMs || b.endMs - a.endMs);
93
+ const placed = [];
94
+ // A cluster is a run of entries joined by overlaps. Each gets the lane count
95
+ // of its own cluster, so one busy hour does not squeeze the whole day.
96
+ let cluster = [];
97
+ let clusterEnd = -Infinity;
98
+ const closeCluster = () => {
99
+ const lanes = cluster.reduce((max, c) => Math.max(max, c.item.lane + 1), 1);
100
+ for (const c of cluster)
101
+ c.item.lanes = lanes;
102
+ cluster = [];
103
+ };
104
+ for (const e of inView) {
105
+ if (e.startMs >= clusterEnd)
106
+ closeCluster();
107
+ const taken = new Set(cluster.filter((c) => c.endMs > e.startMs).map((c) => c.item.lane));
108
+ let lane = 0;
109
+ while (taken.has(lane))
110
+ lane += 1;
111
+ const item = {
112
+ entry: e.entry,
113
+ top: (e.startMs - from) / span,
114
+ height: (e.endMs - e.startMs) / span,
115
+ lane,
116
+ lanes: 1,
117
+ };
118
+ placed.push(item);
119
+ cluster.push({ item, endMs: e.endMs });
120
+ clusterEnd = Math.max(clusterEnd, e.endMs);
121
+ }
122
+ closeCluster();
123
+ return placed;
124
+ }
125
+ /** The entries that touch any part of `day`, earliest first. For the month view. */
126
+ export function entriesOnDay(entries, day, utc) {
127
+ const from = dayStartMs(day, utc);
128
+ const to = from + DAY_MS;
129
+ return entries
130
+ .filter((e) => Date.parse(e.start) < to && Date.parse(e.end) > from)
131
+ .sort((a, b) => Date.parse(a.start) - Date.parse(b.start));
132
+ }
133
+ /** True when a free time in a column is not covered by any entry in it. */
134
+ export function slotIsFree(entries, times) {
135
+ const start = Date.parse(times.start);
136
+ const end = Date.parse(times.end);
137
+ return !entries.some((e) => Date.parse(e.start) < end && Date.parse(e.end) > start);
138
+ }
package/dist/index.d.ts CHANGED
@@ -3,6 +3,8 @@ export type { Press, ScreenPresentation, ScreenNode, ScreenRootNode, ScreenTree,
3
3
  export { childNodesOf, KNOWN_CONTAINERS, KNOWN_NODE_TYPES } from './nodes.js';
4
4
  export type { ContainerChild, ContainerNodeType, KnownNodeType } from './nodes.js';
5
5
  export { pageRangeLabel, pageWindow, pressWithValue } from './pager.js';
6
+ export { addDays, calendarDays, dayStartMs, entriesOnDay, placeEntries, shiftCalendarDate, slotIsFree, slotTimes, todayIn, } from './calendar.js';
7
+ export type { CalendarEntryLike, CalendarView, PlacedEntry } from './calendar.js';
6
8
  export { defineScreen, defineSurface } from './define.js';
7
9
  export type { ScreenDefinition, ScreenParams, LoadHandler, ActionHandler } from './define.js';
8
10
  export { loadWebsiteChat, websiteChatSnippet } from './website-chat.js';
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@
9
9
  export { UI_SCHEMA_VERSION, pressSchema, buttonSchema, cellSchema, nodeSchema, screenPresentationSchema, screenTreeSchema, actionResultSchema, screenLoadRequestSchema, screenLoadResponseSchema, screenActionRequestSchema, interfaceFamilySchema, surfaceDefinitionSchema, surfaceSchema, screenRegistrationSchema, uiManifestSchema, } from './schema.js';
10
10
  export { childNodesOf, KNOWN_CONTAINERS, KNOWN_NODE_TYPES } from './nodes.js';
11
11
  export { pageRangeLabel, pageWindow, pressWithValue } from './pager.js';
12
+ export { addDays, calendarDays, dayStartMs, entriesOnDay, placeEntries, shiftCalendarDate, slotIsFree, slotTimes, todayIn, } from './calendar.js';
12
13
  export { defineScreen, defineSurface } from './define.js';
13
14
  export { loadWebsiteChat, websiteChatSnippet } from './website-chat.js';
14
15
  export { createWidgetClient } from './widget.js';
package/dist/nodes.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { ScreenRootNode } from './schema.js';
2
2
  /** Every node type the root union admits (KEE-574 item 3). */
3
- export declare const KNOWN_NODE_TYPES: readonly ["heading", "text", "markdown", "stat", "button", "form", "table", "timeline", "pending_request", "pending_requests", "choice_cards", "progress", "chart", "pagination", "select", "alert", "details", "timestamp", "divider", "board", "section", "tabs"];
3
+ export declare const KNOWN_NODE_TYPES: readonly ["heading", "text", "markdown", "stat", "button", "form", "table", "timeline", "pending_request", "pending_requests", "choice_cards", "progress", "chart", "pagination", "select", "alert", "details", "timestamp", "divider", "board", "calendar", "section", "tabs"];
4
4
  export type KnownNodeType = (typeof KNOWN_NODE_TYPES)[number];
5
5
  /**
6
6
  * The node types that hold child nodes. `section` mounts its children
package/dist/nodes.js CHANGED
@@ -30,6 +30,7 @@ export const KNOWN_NODE_TYPES = [
30
30
  'timestamp',
31
31
  'divider',
32
32
  'board',
33
+ 'calendar',
33
34
  'section',
34
35
  'tabs',
35
36
  ];
package/dist/schema.d.ts CHANGED
@@ -409,6 +409,112 @@ declare const leafNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
409
409
  }, z.core.$strip>>;
410
410
  }, z.core.$strip>>;
411
411
  empty: z.ZodDefault<z.ZodString>;
412
+ }, z.core.$strip>, z.ZodObject<{
413
+ type: z.ZodLiteral<"calendar">;
414
+ view: z.ZodDefault<z.ZodEnum<{
415
+ day: "day";
416
+ week: "week";
417
+ month: "month";
418
+ }>>;
419
+ date: z.ZodISODate;
420
+ views: z.ZodDefault<z.ZodArray<z.ZodEnum<{
421
+ day: "day";
422
+ week: "week";
423
+ month: "month";
424
+ }>>>;
425
+ onChange: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
426
+ kind: z.ZodLiteral<"action">;
427
+ action: z.ZodString;
428
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
429
+ confirm: z.ZodOptional<z.ZodString>;
430
+ }, z.core.$strip>, z.ZodObject<{
431
+ kind: z.ZodLiteral<"navigate">;
432
+ screen: z.ZodString;
433
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
434
+ }, z.core.$strip>], "kind">>;
435
+ startHour: z.ZodDefault<z.ZodNumber>;
436
+ endHour: z.ZodDefault<z.ZodNumber>;
437
+ slotMinutes: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<15>, z.ZodLiteral<30>, z.ZodLiteral<60>]>>;
438
+ resources: z.ZodOptional<z.ZodArray<z.ZodObject<{
439
+ key: z.ZodString;
440
+ label: z.ZodString;
441
+ }, z.core.$strip>>>;
442
+ events: z.ZodArray<z.ZodObject<{
443
+ key: z.ZodString;
444
+ title: z.ZodString;
445
+ start: z.ZodISODateTime;
446
+ end: z.ZodISODateTime;
447
+ resource: z.ZodOptional<z.ZodString>;
448
+ tone: z.ZodDefault<z.ZodEnum<{
449
+ success: "success";
450
+ default: "default";
451
+ warning: "warning";
452
+ destructive: "destructive";
453
+ }>>;
454
+ subtitle: z.ZodOptional<z.ZodString>;
455
+ details: z.ZodOptional<z.ZodArray<z.ZodObject<{
456
+ label: z.ZodString;
457
+ value: z.ZodDiscriminatedUnion<[z.ZodObject<{
458
+ kind: z.ZodLiteral<"text">;
459
+ value: z.ZodString;
460
+ }, z.core.$strip>, z.ZodObject<{
461
+ kind: z.ZodLiteral<"badge">;
462
+ value: z.ZodString;
463
+ tone: z.ZodDefault<z.ZodEnum<{
464
+ success: "success";
465
+ default: "default";
466
+ warning: "warning";
467
+ destructive: "destructive";
468
+ }>>;
469
+ }, z.core.$strip>, z.ZodObject<{
470
+ kind: z.ZodLiteral<"date">;
471
+ value: z.ZodISODateTime;
472
+ }, z.core.$strip>], "kind">;
473
+ }, z.core.$strip>>>;
474
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
475
+ type: z.ZodLiteral<"button">;
476
+ label: z.ZodString;
477
+ onPress: z.ZodDiscriminatedUnion<[z.ZodObject<{
478
+ kind: z.ZodLiteral<"action">;
479
+ action: z.ZodString;
480
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
481
+ confirm: z.ZodOptional<z.ZodString>;
482
+ }, z.core.$strip>, z.ZodObject<{
483
+ kind: z.ZodLiteral<"navigate">;
484
+ screen: z.ZodString;
485
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
486
+ }, z.core.$strip>], "kind">;
487
+ variant: z.ZodDefault<z.ZodEnum<{
488
+ destructive: "destructive";
489
+ primary: "primary";
490
+ secondary: "secondary";
491
+ }>>;
492
+ disabled: z.ZodDefault<z.ZodBoolean>;
493
+ hint: z.ZodOptional<z.ZodString>;
494
+ disabledReason: z.ZodOptional<z.ZodString>;
495
+ }, z.core.$strip>>>;
496
+ onPress: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
497
+ kind: z.ZodLiteral<"action">;
498
+ action: z.ZodString;
499
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
500
+ confirm: z.ZodOptional<z.ZodString>;
501
+ }, z.core.$strip>, z.ZodObject<{
502
+ kind: z.ZodLiteral<"navigate">;
503
+ screen: z.ZodString;
504
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
505
+ }, z.core.$strip>], "kind">>;
506
+ }, z.core.$strip>>;
507
+ onSlotPress: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
508
+ kind: z.ZodLiteral<"action">;
509
+ action: z.ZodString;
510
+ input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
511
+ confirm: z.ZodOptional<z.ZodString>;
512
+ }, z.core.$strip>, z.ZodObject<{
513
+ kind: z.ZodLiteral<"navigate">;
514
+ screen: z.ZodString;
515
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
516
+ }, z.core.$strip>], "kind">>;
517
+ empty: z.ZodDefault<z.ZodString>;
412
518
  }, z.core.$strip>], "type">;
413
519
  type LeafScreenNode = z.infer<typeof leafNodeSchema>;
414
520
  type LeafScreenNodeInput = z.input<typeof leafNodeSchema>;
package/dist/schema.js CHANGED
@@ -298,6 +298,121 @@ const boardSchema = z
298
298
  });
299
299
  }
300
300
  });
301
+ const CALENDAR_VIEWS = ['day', 'week', 'month'];
302
+ /**
303
+ * Appointments on a day, a week or a month. A coordinator reads several
304
+ * providers at once and books into a free time from the same screen.
305
+ *
306
+ * Times are ISO 8601 and show in the viewer's time zone, as dates do
307
+ * everywhere else. `date` is the day the view is built around; a week starts
308
+ * on Monday. In the day view each `resource` (a provider, a room) gets a
309
+ * column; in the week and month views an entry names its resource instead.
310
+ *
311
+ * Three presses, each merging values into the declared press the way the
312
+ * pager does (into `params` for a navigate, `input` for an action):
313
+ * - `onChange`: previous, next, today and the view switch send `date`
314
+ * (YYYY-MM-DD) and `view`. Without it the calendar shows no controls.
315
+ * - `onSlotPress`: a free time sends `start` and `end` (ISO) and, in the day
316
+ * view with resources, `resource`. Without it free time is not pressable.
317
+ * - an entry's `onPress`: as on a card.
318
+ *
319
+ * An entry with `details` or `actions` opens them in a panel beside the
320
+ * calendar, with no navigation, and its `onPress` is IGNORED: a press means
321
+ * "call my runtime", the panel is local view state, and one tap cannot be
322
+ * both. Put a navigate button in `actions` to also open the full record.
323
+ */
324
+ const calendarSchema = z
325
+ .object({
326
+ type: z.literal('calendar'),
327
+ view: z.enum(CALENDAR_VIEWS).default('week'),
328
+ date: z.iso.date(),
329
+ /** The views the switch offers, in order. Without `onChange`, no switch. */
330
+ views: z.array(z.enum(CALENDAR_VIEWS)).min(1).max(3).default(['day', 'week', 'month']),
331
+ onChange: pressSchema.optional(),
332
+ /** The first and last hour the day and week views draw. Entries outside are clipped. */
333
+ startHour: z.number().int().min(0).max(23).default(8),
334
+ endHour: z.number().int().min(1).max(24).default(18),
335
+ /** How long one free time is. */
336
+ slotMinutes: z.union([z.literal(15), z.literal(30), z.literal(60)]).default(30),
337
+ resources: z
338
+ .array(z.object({ key: z.string().min(1).max(128), label: z.string().min(1).max(80) }))
339
+ .max(12)
340
+ .optional(),
341
+ events: z
342
+ .array(z.object({
343
+ key: z.string().min(1).max(128),
344
+ title: z.string().min(1).max(120),
345
+ start: z.iso.datetime(),
346
+ end: z.iso.datetime(),
347
+ /** A `resources` key. */
348
+ resource: z.string().min(1).max(128).optional(),
349
+ /** Colours the entry: a confirmed visit, an unconfirmed one, a no-show. */
350
+ tone: tone.default('default'),
351
+ subtitle: z.string().max(200).optional(),
352
+ details: z
353
+ .array(z.object({ label: z.string().min(1).max(80), value: cellSchema }))
354
+ .max(12)
355
+ .optional(),
356
+ actions: z.array(buttonSchema).max(4).optional(),
357
+ onPress: pressSchema.optional(),
358
+ }))
359
+ .max(500),
360
+ onSlotPress: pressSchema.optional(),
361
+ /** Shown when no entry falls in the view. */
362
+ empty: z.string().min(1).max(80).default('Nothing booked'),
363
+ })
364
+ .superRefine((node, ctx) => {
365
+ if (node.endHour <= node.startHour) {
366
+ ctx.addIssue({
367
+ code: 'custom',
368
+ path: ['endHour'],
369
+ message: `endHour ${node.endHour} must be after startHour ${node.startHour}`,
370
+ });
371
+ }
372
+ if (!node.views.includes(node.view)) {
373
+ ctx.addIssue({
374
+ code: 'custom',
375
+ path: ['view'],
376
+ message: `view "${node.view}" is not one of views`,
377
+ });
378
+ }
379
+ const resourceKeys = new Set();
380
+ for (const [i, resource] of (node.resources ?? []).entries()) {
381
+ if (resourceKeys.has(resource.key)) {
382
+ ctx.addIssue({
383
+ code: 'custom',
384
+ path: ['resources', i, 'key'],
385
+ message: `duplicate resource key "${resource.key}"`,
386
+ });
387
+ }
388
+ resourceKeys.add(resource.key);
389
+ }
390
+ const eventKeys = new Set();
391
+ for (const [i, event] of node.events.entries()) {
392
+ if (eventKeys.has(event.key)) {
393
+ ctx.addIssue({
394
+ code: 'custom',
395
+ path: ['events', i, 'key'],
396
+ message: `duplicate event key "${event.key}"`,
397
+ });
398
+ }
399
+ eventKeys.add(event.key);
400
+ if (Date.parse(event.end) <= Date.parse(event.start)) {
401
+ ctx.addIssue({
402
+ code: 'custom',
403
+ path: ['events', i, 'end'],
404
+ message: 'end must be after start',
405
+ });
406
+ }
407
+ if (event.resource !== undefined && !resourceKeys.has(event.resource)) {
408
+ ctx.addIssue({
409
+ code: 'custom',
410
+ path: ['events', i, 'resource'],
411
+ message: `resource "${event.resource}" is not one of resources`,
412
+ });
413
+ }
414
+ }
415
+ });
301
416
  /**
302
417
  * A horizontal line that says where one part of a screen ends and the next
303
418
  * begins. It carries no content. Use a `section` when the parts need a title.
@@ -428,6 +543,7 @@ const leafNodeSchema = z.discriminatedUnion('type', [
428
543
  timestampSchema,
429
544
  dividerSchema,
430
545
  boardSchema,
546
+ calendarSchema,
431
547
  ]);
432
548
  const MAX_SECTION_DEPTH = 8;
433
549
  const nodeSchemas = new Map();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keemakr/ui-sdk",
3
- "version": "1.4.0-dev-20261012093350",
3
+ "version": "1.4.0-dev-20261012120249",
4
4
  "description": "Product screens for keemakr marketplace modules: a versioned, server-driven UI tree schema plus defineScreen() handlers. Module code never ships to the browser — keemakr-core validates the tree and renders it with platform components.",
5
5
  "license": "MIT",
6
6
  "type": "module",