@xenosystem/blocks 0.13.8 → 0.13.10

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.
@@ -18,8 +18,7 @@ import {
18
18
  VisibilityIcon,
19
19
  XIcon,
20
20
  XIcon2
21
- } from "../chunk-BNALWAAQ.js";
22
- import "../chunk-GTN5EDY3.js";
21
+ } from "../chunk-W4PTX2Y4.js";
23
22
  import {
24
23
  ChevronGlyph,
25
24
  CollapseGlyph,
@@ -1,8 +1,7 @@
1
1
  import {
2
2
  ICONS,
3
3
  ICON_UNITS
4
- } from "../chunk-BNALWAAQ.js";
5
- import "../chunk-GTN5EDY3.js";
4
+ } from "../chunk-W4PTX2Y4.js";
6
5
  import {
7
6
  Svg
8
7
  } from "../chunk-K7YLLV2W.js";
@@ -421,7 +421,7 @@ interface TransportPanelViewModel extends TransportViewState {
421
421
  positionLabel: string;
422
422
  }
423
423
  declare function transportPanelView(state: TransportViewState): TransportPanelViewModel;
424
- declare const BEHAVIOURS: {
424
+ declare const BEHAVIOURS$1: {
425
425
  'time/transportPanelView': (inputs: Record<string, unknown>) => TransportPanelViewModel;
426
426
  };
427
427
  declare const TRANSPORT_DECLARATION: BlockDeclaration;
@@ -2416,7 +2416,116 @@ declare function weekStart(key: string, firstDayOfWeek: number): string;
2416
2416
  declare function rowInWindow(row: XenoRow, columnId: string, column: XenoColumn | undefined, from: string, to: string): boolean;
2417
2417
 
2418
2418
  /**
2419
- * The Calendar panel view.
2419
+ * The Calendar panel AS A DECLARATION — the eleventh declared block, and the first over a GRID:
2420
+ * a period's day cells with their events, or the same events as an agenda list.
2421
+ *
2422
+ * Everything drawn is data: the toolbar (previous / next / Today, the anchor month, the partial and
2423
+ * time-zone badges, the view-mode segmented control), the three body states (not configured, error,
2424
+ * nothing scheduled), the agenda listbox (agenda / timeline modes), the grid (month / week / day —
2425
+ * `chrome/CalendarGrid` with a `WeekdayRow` when it is seven wide, one `DayCell` per cell, one
2426
+ * `EventChip` per event), the status bar. The cell that carries the roving tab stop is decided here
2427
+ * (today when in view, else the first cell) — the grid MOVES it, the view state SEEDS it.
2428
+ *
2429
+ * No runtime-bound unit: every intent is a `ui` emit. The chips' pointer affordances (select,
2430
+ * activate, context menu) are declared as emits; the cell's activation is the keyboard path.
2431
+ */
2432
+
2433
+ interface CalendarViewChip {
2434
+ id: string;
2435
+ title: string;
2436
+ time?: string;
2437
+ selected: boolean;
2438
+ tooltip: string;
2439
+ }
2440
+ interface CalendarViewCell {
2441
+ key: string;
2442
+ day: number;
2443
+ label: string;
2444
+ today: boolean;
2445
+ outside: boolean;
2446
+ tabStop: boolean;
2447
+ overflow: number;
2448
+ chips: CalendarViewChip[];
2449
+ }
2450
+ interface CalendarViewAgendaRow {
2451
+ id: string;
2452
+ title: string;
2453
+ meta: string;
2454
+ selected: boolean;
2455
+ status?: string;
2456
+ tone: 'neutral' | 'success' | 'warning' | 'error';
2457
+ }
2458
+ interface CalendarViewModel {
2459
+ anchor: string;
2460
+ partial: boolean;
2461
+ timeZone: string;
2462
+ viewMode: XenoCalendarViewMode;
2463
+ modes: {
2464
+ value: string;
2465
+ label: string;
2466
+ }[];
2467
+ configProblem?: string;
2468
+ notConfigured: boolean;
2469
+ errorMessage?: string;
2470
+ errored: boolean;
2471
+ empty: boolean;
2472
+ emptyHint: string;
2473
+ agenda: boolean;
2474
+ grid: boolean;
2475
+ columns: number;
2476
+ weekHeaded: boolean;
2477
+ weekdays: string[];
2478
+ gridLabel: string;
2479
+ cells: CalendarViewCell[];
2480
+ rows: CalendarViewAgendaRow[];
2481
+ countLabel: string;
2482
+ selectionLabel?: string;
2483
+ }
2484
+ type CalendarUiIntent = {
2485
+ kind: 'navigate';
2486
+ direction: 1 | -1;
2487
+ } | {
2488
+ kind: 'today';
2489
+ } | {
2490
+ kind: 'mode';
2491
+ mode: XenoCalendarViewMode;
2492
+ } | {
2493
+ kind: 'activateSlot';
2494
+ key: string;
2495
+ } | {
2496
+ kind: 'select';
2497
+ id: string;
2498
+ additive?: boolean;
2499
+ meta?: boolean;
2500
+ } | {
2501
+ kind: 'activateRow';
2502
+ id: string;
2503
+ } | {
2504
+ kind: 'contextMenu';
2505
+ id: string;
2506
+ x: number;
2507
+ y: number;
2508
+ };
2509
+ interface CalendarViewOptions {
2510
+ firstDayOfWeek?: number;
2511
+ emptyHint?: string;
2512
+ }
2513
+ declare function formatMinutes(minutes: number | null): string;
2514
+ /** Derive the view from the live controller — the runtime calls this on every draw. */
2515
+ declare function calendarViewState(c: CalendarController, options?: CalendarViewOptions): CalendarViewModel;
2516
+ /** Apply a `ui` intent to the controller. */
2517
+ declare function applyCalendarUi(c: CalendarController, intent: CalendarUiIntent): void;
2518
+ declare const calendarViewManifest: PanelManifest;
2519
+ declare const BEHAVIOURS: {
2520
+ 'time/calendarPanelView': (inputs: Record<string, unknown>) => CalendarViewModel;
2521
+ };
2522
+ declare const CALENDAR_RUNTIME_UNITS: readonly [];
2523
+ declare const CALENDAR_DECLARATION: BlockDeclaration;
2524
+
2525
+ /**
2526
+ * The Calendar panel view — the CODE VIEW of `CALENDAR_DECLARATION`, drawing the same
2527
+ * `CalendarViewModel` byte-identical (the equivalence suite holds the two together). No runtime-bound
2528
+ * unit; every intent goes through `applyCalendarUi`.
2420
2529
  *
2421
2530
  * Composes `@xenosystem/components/chrome`; the host must ensure `@xenosystem/workbench/primitives.css` is
2422
2531
  * present.
@@ -2425,12 +2534,10 @@ declare function rowInWindow(row: XenoRow, columnId: string, column: XenoColumn
2425
2534
  */
2426
2535
 
2427
2536
  /** Props for {@link CalendarPanelView}. */
2428
- interface CalendarPanelViewProps {
2537
+ interface CalendarPanelViewProps extends CalendarViewOptions {
2429
2538
  controller: CalendarController;
2430
- firstDayOfWeek?: number;
2431
- emptyHint?: string;
2432
2539
  }
2433
2540
  /** The Calendar panel view. */
2434
- declare function CalendarPanelView({ controller, firstDayOfWeek, emptyHint, }: CalendarPanelViewProps): ReactNode;
2541
+ declare function CalendarPanelView({ controller, firstDayOfWeek, emptyHint }: CalendarPanelViewProps): ReactNode;
2435
2542
 
2436
- export { ALL_CALENDAR_MODES, type BeginDragOptions, type BuildCellsOptions, CALENDAR_PANEL_ID, CalendarController, type CalendarControllerOptions, type CalendarHostBridge, type CalendarPanelState, CalendarPanelView, type CalendarPanelViewProps, type CalendarRenderContext, type CalendarViewState, type CreateCalendarPanelOptions, type CreateTimelinePanelOptions, type CreateTransportPanelOptions, DEFAULT_SNAP, DEFAULT_ZOOM, DRAG_THRESHOLD_PX, type DeriveOptions, EDGE_ZONE_MIN_CLIP_PX, EDGE_ZONE_PX, MIN_MAJOR_PX, MIN_MINOR_PX, TIMELINE_PANEL_ID, BEHAVIOURS as TRANSPORT_BEHAVIOURS, TRANSPORT_DECLARATION, TRANSPORT_ICONS, TRANSPORT_RUNTIME_UNITS, TRIM_SNAP_PX, TimelineController, type TimelineControllerOptions, type TimelineHostBridge, type TimelinePanelState, TimelinePanelView, type TimelinePanelViewProps, type TimelineRenderConfig, type TimelineRenderContext, type TimelineViewState, type TransportKeyEvent, TransportPanelController, type TransportPanelControllerOptions, type TransportPanelSerialized, TransportPanelView, type TransportPanelViewModel, type TransportPanelViewProps, type TransportUiIntent, type TransportViewState, type XenoArrangement, type XenoCachedTile, type XenoCalendarCell, type XenoCalendarEdit, type XenoCalendarEvent, type XenoCalendarSlotActivate, type XenoCalendarViewMode, type XenoCalendarWindow, type XenoClip, type XenoClipFade, type XenoDragKind, type XenoDragModifiers, type XenoDragPreview, type XenoDragState, type XenoHitTarget, type XenoLaneTile, type XenoLaneTileRequest, type XenoMarker, type XenoOverlaySpan, type XenoRenderTier, type XenoRowLayout, type XenoRulerTick, type XenoSnapCandidate, type XenoSnapConfig, type XenoSnapMode, type XenoSnapResult, type XenoTickWeight, XenoTileCache, type XenoTileCacheOptions, XenoTimeScale, type XenoTimeScaleGeometry, type XenoTimeScaleState, type XenoTimelineOp, type XenoTimelineSelection, type XenoTimelineTool, type XenoTimelineViewport, type XenoTrack, type XenoTrackKind, type XenoTrimMode, type XenoVisibleTrack, type XenoZoomBounds, addDays, addMonths, alignToTileGrid, applyTransportUi, beginDrag, blitTile, buildCells, buildRowLayout, calendarManifest, calendarPanel, chooseRung, clampScroll, clipDuration, clipsInMarquee, clipsOverlap, collectSnapTargets, commitDrag, computeVisible, createCalendarPanel, createTimelinePanel, createTransportPanel, dayKey, daysInMonth, dedupeByColumn, deriveEvents, edgeZone, gridStart, gridTicksFor, hasSourceWindow, isZoomGesture, isoWeekday, packOverlaps, parseDayKey, passedThreshold, previewDrag, renderTier, rowAtY, rowInWindow, rulerTicks, scrollToReveal, snapDelta, snapTick, snapWouldFight, sourceRangeFor, statusTone, ticksPerStep, tileKey, tileWidthTicks, timelineManifest, timelinePanel, todayKey, transportManifest, transportPanel, transportPanelView, transportViewManifest, transportViewState, trimModeFor, visibleClips, visibleRows, weekStart, wheelZoomFactor, withSnapModifier, zoomAboutCursor, zoomBucket, zoomToFit };
2543
+ export { ALL_CALENDAR_MODES, type BeginDragOptions, type BuildCellsOptions, BEHAVIOURS as CALENDAR_BEHAVIOURS, CALENDAR_DECLARATION, CALENDAR_PANEL_ID, CALENDAR_RUNTIME_UNITS, CalendarController, type CalendarControllerOptions, type CalendarHostBridge, type CalendarPanelState, CalendarPanelView, type CalendarPanelViewProps, type CalendarRenderContext, type CalendarUiIntent, type CalendarViewAgendaRow, type CalendarViewCell, type CalendarViewChip, type CalendarViewModel, type CalendarViewOptions, type CalendarViewState, type CreateCalendarPanelOptions, type CreateTimelinePanelOptions, type CreateTransportPanelOptions, DEFAULT_SNAP, DEFAULT_ZOOM, DRAG_THRESHOLD_PX, type DeriveOptions, EDGE_ZONE_MIN_CLIP_PX, EDGE_ZONE_PX, MIN_MAJOR_PX, MIN_MINOR_PX, TIMELINE_PANEL_ID, BEHAVIOURS$1 as TRANSPORT_BEHAVIOURS, TRANSPORT_DECLARATION, TRANSPORT_ICONS, TRANSPORT_RUNTIME_UNITS, TRIM_SNAP_PX, TimelineController, type TimelineControllerOptions, type TimelineHostBridge, type TimelinePanelState, TimelinePanelView, type TimelinePanelViewProps, type TimelineRenderConfig, type TimelineRenderContext, type TimelineViewState, type TransportKeyEvent, TransportPanelController, type TransportPanelControllerOptions, type TransportPanelSerialized, TransportPanelView, type TransportPanelViewModel, type TransportPanelViewProps, type TransportUiIntent, type TransportViewState, type XenoArrangement, type XenoCachedTile, type XenoCalendarCell, type XenoCalendarEdit, type XenoCalendarEvent, type XenoCalendarSlotActivate, type XenoCalendarViewMode, type XenoCalendarWindow, type XenoClip, type XenoClipFade, type XenoDragKind, type XenoDragModifiers, type XenoDragPreview, type XenoDragState, type XenoHitTarget, type XenoLaneTile, type XenoLaneTileRequest, type XenoMarker, type XenoOverlaySpan, type XenoRenderTier, type XenoRowLayout, type XenoRulerTick, type XenoSnapCandidate, type XenoSnapConfig, type XenoSnapMode, type XenoSnapResult, type XenoTickWeight, XenoTileCache, type XenoTileCacheOptions, XenoTimeScale, type XenoTimeScaleGeometry, type XenoTimeScaleState, type XenoTimelineOp, type XenoTimelineSelection, type XenoTimelineTool, type XenoTimelineViewport, type XenoTrack, type XenoTrackKind, type XenoTrimMode, type XenoVisibleTrack, type XenoZoomBounds, addDays, addMonths, alignToTileGrid, applyCalendarUi, applyTransportUi, beginDrag, blitTile, buildCells, buildRowLayout, calendarManifest, calendarPanel, calendarViewManifest, calendarViewState, chooseRung, clampScroll, clipDuration, clipsInMarquee, clipsOverlap, collectSnapTargets, commitDrag, computeVisible, createCalendarPanel, createTimelinePanel, createTransportPanel, dayKey, daysInMonth, dedupeByColumn, deriveEvents, edgeZone, formatMinutes, gridStart, gridTicksFor, hasSourceWindow, isZoomGesture, isoWeekday, packOverlaps, parseDayKey, passedThreshold, previewDrag, renderTier, rowAtY, rowInWindow, rulerTicks, scrollToReveal, snapDelta, snapTick, snapWouldFight, sourceRangeFor, statusTone, ticksPerStep, tileKey, tileWidthTicks, timelineManifest, timelinePanel, todayKey, transportManifest, transportPanel, transportPanelView, transportViewManifest, transportViewState, trimModeFor, visibleClips, visibleRows, weekStart, wheelZoomFactor, withSnapModifier, zoomAboutCursor, zoomBucket, zoomToFit };