terminoir 0.19.0 → 0.20.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/README.md CHANGED
@@ -148,7 +148,7 @@ Building blocks so apps compose screens without CSS of their own. See the demo's
148
148
 
149
149
  | Component | Notes |
150
150
  |-----------|--------|
151
- | `Page`, `PageHeader`, `Section` | Readable page column (`narrow`/`default`/`wide`/`full`, `fill` for canvases); title + meta + actions; titled section with actions |
151
+ | `Page`, `PageHeader`, `Section` | Readable page column (`narrow`/`default`/`wide`/`full`, `fill` for canvases, `fullHeight` to fill the stage height with padding); title + meta + actions; titled section with actions |
152
152
  | `PanelHeader` | Heading inside a `Panel`: `logo` (the image unframed; initials in a round avatar until `src`), `icon` or `leading` mark, title, description, `actions` (stacks under on phones) |
153
153
  | `Stack`, `Inline`, `Spacer`, `Centered` | Vertical / horizontal layout with `--space-*` gaps (`Inline fill` splits evenly, `collapse` stacks on phones); fill space; full-viewport centred column |
154
154
  | `Text`, `Prose`, `Disclosure` | Tone/size/weight text; long-form typography; collapsible details |
@@ -163,7 +163,7 @@ Building blocks so apps compose screens without CSS of their own. See the demo's
163
163
  | `TitleInput`, `FileButton`, `RadioCards` | Borderless heading input; button that opens a file picker; card-style radio group |
164
164
  | `OptionsEditor` | Notion-style option list for select/status values: drag to reorder, click a name to rename, colour and delete from each row's menu, type to add; `ChipSelect` takes `oncreate` to add one from its search |
165
165
  | `EditableText` | A name you click to rename in place (Enter or click away saves, Escape cancels); `PageHeader`, `ListItem` and `PropertyRow` take `onrename` for the same |
166
- | `CalendarGrid` | Week (scrolling hours) and month grids; `CalendarEvent` with `muted`/`color`; helpers `calendarRange`, `shiftCalendar`, `eventsOn` |
166
+ | `CalendarGrid` | Week (scrolling hours) and month grids; `fill` grows to the remaining height (e.g. in a `fullHeight` Page); `CalendarEvent` with `muted`/`color`; helpers `calendarRange`, `shiftCalendar`, `eventsOn` |
167
167
  | `CanvasStage`, `DocumentViewer` | Full-bleed canvas host with floating overlay and side panel; paged viewer with toolbar and highlight marks |
168
168
  | `AccentSwatches` | `bind:value` accent hex from `ACCENT_PALETTE` |
169
169
  | `GroupedList`, `SegmentBar` | Items in labelled groups with a colour dot and count, "Show n more" past `limit`, `collapsed` groups behind a toggle (e.g. finished items); a thin bar of proportional coloured segments |
@@ -21,6 +21,7 @@
21
21
  anchor,
22
22
  events,
23
23
  onEventClick,
24
+ fill = false,
24
25
  class: className = '',
25
26
  }: {
26
27
  mode?: CalendarMode;
@@ -28,6 +29,8 @@
28
29
  anchor: Date;
29
30
  events: CalendarEvent[];
30
31
  onEventClick?: (event: CalendarEvent) => void;
32
+ /** Grow to the remaining height of a flex column (e.g. a `fullHeight` Page) instead of a fixed height. */
33
+ fill?: boolean;
31
34
  class?: string;
32
35
  } = $props();
33
36
 
@@ -69,7 +72,7 @@
69
72
  {/snippet}
70
73
 
71
74
  {#if mode === 'week'}
72
- <div class={cn('terminoir-cal terminoir-cal--week', className)}>
75
+ <div class={cn('terminoir-cal terminoir-cal--week', fill && 'terminoir-cal--fill', className)}>
73
76
  <div class="terminoir-cal__week-head">
74
77
  <div></div>
75
78
  {#each weekDays as day (day.getTime())}
@@ -109,7 +112,7 @@
109
112
  </div>
110
113
  </div>
111
114
  {:else}
112
- <div class={cn('terminoir-cal terminoir-cal--month', className)}>
115
+ <div class={cn('terminoir-cal terminoir-cal--month', fill && 'terminoir-cal--fill', className)}>
113
116
  {#each weekDays as day (day.getTime())}
114
117
  <div class="terminoir-cal__dow">{day.toLocaleDateString(undefined, { weekday: 'short' })}</div>
115
118
  {/each}
@@ -217,6 +220,10 @@
217
220
  }
218
221
  .terminoir-cal__event:disabled { cursor: default; }
219
222
  .terminoir-cal__event--muted { opacity: 0.6; background: transparent; }
223
+ /* Fill: take the parent's free height; week hours scroll inside, month rows stretch. */
224
+ .terminoir-cal--fill { flex: 1 1 0; }
225
+ .terminoir-cal--week.terminoir-cal--fill { height: auto; }
226
+ .terminoir-cal--month.terminoir-cal--fill { grid-template-rows: auto; grid-auto-rows: 1fr; }
220
227
  .terminoir-cal__time { color: var(--muted-foreground); flex-shrink: 0; }
221
228
  .terminoir-cal__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
222
229
  .terminoir-cal--month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
@@ -5,6 +5,8 @@ type $$ComponentProps = {
5
5
  anchor: Date;
6
6
  events: CalendarEvent[];
7
7
  onEventClick?: (event: CalendarEvent) => void;
8
+ /** Grow to the remaining height of a flex column (e.g. a `fullHeight` Page) instead of a fixed height. */
9
+ fill?: boolean;
8
10
  class?: string;
9
11
  };
10
12
  declare const CalendarGrid: import("svelte").Component<$$ComponentProps, {}, "">;
@@ -5,6 +5,7 @@
5
5
  let {
6
6
  width = 'default',
7
7
  fill = false,
8
+ fullHeight = false,
8
9
  class: className = '',
9
10
  children,
10
11
  ...rest
@@ -13,12 +14,14 @@
13
14
  width?: 'narrow' | 'default' | 'wide' | 'full';
14
15
  /** Edge-to-edge and full height with no padding, for canvases (graphs, viewers, calendars). */
15
16
  fill?: boolean;
17
+ /** At least the stage's height (keeps padding), so a growing child such as `CalendarGrid fill` takes the rest. */
18
+ fullHeight?: boolean;
16
19
  class?: string;
17
20
  children?: Snippet;
18
21
  } & Record<string, unknown> = $props();
19
22
  </script>
20
23
 
21
- <div class={cn('terminoir-page', `terminoir-page--${width}`, fill && 'terminoir-page--fill', className)} {...rest}>
24
+ <div class={cn('terminoir-page', `terminoir-page--${width}`, fill && 'terminoir-page--fill', fullHeight && 'terminoir-page--full-height', className)} {...rest}>
22
25
  {@render children?.()}
23
26
  </div>
24
27
 
@@ -37,6 +40,7 @@
37
40
  .terminoir-page--default { max-width: 56rem; }
38
41
  .terminoir-page--wide { max-width: 80rem; }
39
42
  .terminoir-page--full { max-width: none; }
43
+ .terminoir-page--full-height { min-height: 100%; }
40
44
  .terminoir-page--fill {
41
45
  max-width: none;
42
46
  height: 100%;
@@ -4,6 +4,8 @@ type $$ComponentProps = {
4
4
  width?: 'narrow' | 'default' | 'wide' | 'full';
5
5
  /** Edge-to-edge and full height with no padding, for canvases (graphs, viewers, calendars). */
6
6
  fill?: boolean;
7
+ /** At least the stage's height (keeps padding), so a growing child such as `CalendarGrid fill` takes the rest. */
8
+ fullHeight?: boolean;
7
9
  class?: string;
8
10
  children?: Snippet;
9
11
  } & Record<string, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terminoir",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "Terminoir — Liquid Glass design tokens and Svelte 5 UI components.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",