@picked/svelte 0.0.1-dev.1793753513002 → 0.0.1-dev.1793756239746

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.
@@ -605,6 +605,8 @@
605
605
 
606
606
  <style>
607
607
  .map {
608
+ flex: 1;
609
+ min-height: 0;
608
610
  display: flex;
609
611
  flex-direction: column;
610
612
  gap: var(--space-2);
@@ -652,9 +654,9 @@
652
654
  position: relative;
653
655
  box-sizing: border-box;
654
656
  overflow: hidden;
655
- /* Grows with a panel that is 90% of the viewport: what is left once the panel's header, the
656
- view and journey row, the map's toolbar and its legend (about 223px together) have theirs. */
657
- height: max(420px, calc(90vh - 223px));
657
+ /* Takes the height the toolbar and legend leave in the frame. */
658
+ flex: 1;
659
+ min-height: 0;
658
660
  border: 1px solid var(--color-gray-200);
659
661
  border-radius: var(--radius-lg);
660
662
  background-color: var(--color-white);
@@ -16,7 +16,7 @@
16
16
  * same vocabulary modules, so a screen is named identically in each and they cannot drift.
17
17
  */
18
18
  import type { Picked } from '@picked/client'
19
- import { Badge, Banner, Button, Card, EmptyState, Stack } from '../../ui'
19
+ import { Badge, Banner, Button, Card, EmptyState } from '../../ui'
20
20
  import { buildOutline, buildTimeline, buildTree } from '../../derive'
21
21
  import type { FieldLookup, OutlineRow, SafetyPosture, Trails } from '../../derive'
22
22
  import type { JourneyView } from '../../session'
@@ -216,7 +216,7 @@
216
216
  }
217
217
  </script>
218
218
 
219
- <Stack direction="vertical" gap="medium">
219
+ <div class="journey">
220
220
  {#if selectedKey === null}
221
221
  <EmptyState
222
222
  message="No journeys yet"
@@ -284,23 +284,30 @@
284
284
  <Banner status="warning" testId="devtools-journey-readonly">{posture.reason}</Banner>
285
285
  {/if}
286
286
 
287
- <Card sectioned>
288
- {#if rows.length === 0}
287
+ {#if rows.length === 0}
288
+ <Card sectioned>
289
289
  <EmptyState
290
290
  message="This journey has no screens yet"
291
291
  hint="Its flow has not loaded, or it is built entirely from background steps."
292
292
  />
293
- {:else if layout !== null}
294
- <!-- Keyed on the experience, so a switch re-frames the map instead of keeping the last
295
- journey's pan and zoom over a different tree. -->
293
+ </Card>
294
+ {:else if layout !== null}
295
+ <!-- The map and the timeline draw their own frames and fill what the panel leaves them.
296
+ Keyed on the experience, so a switch re-frames the map instead of keeping the last
297
+ journey's pan and zoom over a different tree. -->
298
+ <div class="frame" data-testid="devtools-journey-frame">
296
299
  {#key selectedKey}
297
300
  <JourneyMap {layout} {canNavigate} onJump={jumpTo} />
298
301
  {/key}
299
- {:else if timeline !== null}
302
+ </div>
303
+ {:else if timeline !== null}
304
+ <div class="frame" data-testid="devtools-journey-frame">
300
305
  {#key selectedKey}
301
306
  <JourneyTimeline layout={timeline} {canNavigate} onJump={jumpTo} />
302
307
  {/key}
303
- {:else}
308
+ </div>
309
+ {:else}
310
+ <Card sectioned>
304
311
  <ul class="outline" data-testid="devtools-journey">
305
312
  {#each rows as row (row.id)}
306
313
  <li class="row kind-{row.kind}" style:--depth={row.depth}>
@@ -350,12 +357,29 @@
350
357
  </li>
351
358
  {/each}
352
359
  </ul>
353
- {/if}
354
- </Card>
360
+ </Card>
361
+ {/if}
355
362
  {/if}
356
- </Stack>
363
+ </div>
357
364
 
358
365
  <style>
366
+ /* Fills the pane, and never shrinks below 480px: a shorter pane scrolls. Everything inside
367
+ takes `min-height: 0`, so this floor is the only one and the views fit it exactly. */
368
+ .journey {
369
+ flex: 1;
370
+ min-height: 480px;
371
+ display: flex;
372
+ flex-direction: column;
373
+ gap: var(--space-4);
374
+ }
375
+
376
+ .frame {
377
+ flex: 1;
378
+ min-height: 0;
379
+ display: flex;
380
+ flex-direction: column;
381
+ }
382
+
359
383
  .controls {
360
384
  display: flex;
361
385
  align-items: center;
@@ -369,28 +369,34 @@
369
369
 
370
370
  <style>
371
371
  .timeline {
372
+ flex: 1;
373
+ min-height: 0;
372
374
  display: flex;
373
375
  flex-direction: column;
374
376
  gap: var(--space-2);
375
377
  }
376
378
 
379
+ /* Takes the height the legend leaves in the frame, as the map's viewport does. */
377
380
  .body {
381
+ flex: 1;
382
+ min-height: 0;
378
383
  display: grid;
379
384
  grid-template-columns: minmax(0, 1fr) 320px;
385
+ grid-template-rows: minmax(0, 1fr);
380
386
  gap: var(--space-3);
381
387
  }
382
388
 
383
389
  @media (max-width: 760px) {
384
390
  .body {
385
391
  grid-template-columns: minmax(0, 1fr);
392
+ grid-template-rows: minmax(0, 2fr) minmax(0, 1fr);
386
393
  }
387
394
  }
388
395
 
389
- /* The same height as the map's viewport, so switching views never moves the page. */
390
396
  .scroller,
391
397
  .details {
392
398
  box-sizing: border-box;
393
- height: max(420px, calc(90vh - 223px));
399
+ min-height: 0;
394
400
  border: 1px solid var(--color-gray-200);
395
401
  border-radius: var(--radius-lg);
396
402
  background-color: var(--color-white);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picked/svelte",
3
- "version": "0.0.1-dev.1793753513002",
3
+ "version": "0.0.1-dev.1793756239746",
4
4
  "dependencies": {
5
5
  "d3": "^7.9.0"
6
6
  },
@@ -113,7 +113,7 @@
113
113
  "license": "SEE LICENSE IN LICENSE",
114
114
  "module": "./dist/index.js",
115
115
  "peerDependencies": {
116
- "@picked/client": "0.0.1-dev.1793753513002",
116
+ "@picked/client": "0.0.1-dev.1793756239746",
117
117
  "effector": "^23.4.4",
118
118
  "svelte": "^5.55.7"
119
119
  },