@fungi.computer/parakeet 0.6.2 → 0.7.1

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.
@@ -110,6 +110,8 @@ function sameExtensionSlots(next, current) {
110
110
  }
111
111
  /** Apply one already-decoded Shiitake frame to its authoritative projection. */
112
112
  export function applySessionFrame(current, frame) {
113
+ if (frame.kind === "heartbeat")
114
+ return current;
113
115
  if (frame.kind === "reset")
114
116
  return {
115
117
  ...frame.baseline,
@@ -1,6 +1,8 @@
1
1
  import { experimental_streamedQuery, infiniteQueryOptions, queryOptions, QueryObserver, } from "@tanstack/react-query";
2
2
  import { applySessionFrame } from "./session-projection.js";
3
3
  import { reportFailure } from "../lib/failure.js";
4
+ import * as Stream from "effect/Stream";
5
+ import { sessionSilenceDeadlineMs } from "@fungi.computer/shiitake/client";
4
6
  const emptyProjection = Object.freeze({
5
7
  observation: "connecting",
6
8
  snapshot: undefined,
@@ -54,7 +56,11 @@ async function* observeSession(session, signal) {
54
56
  return;
55
57
  let snapshot = watch.snapshot;
56
58
  yield { kind: "snapshot", value: snapshot };
57
- for await (const frame of watch.changes) {
59
+ const frames = Stream.fromAsyncIterable(watch.changes, (cause) => cause).pipe(Stream.timeoutOrElse({
60
+ duration: sessionSilenceDeadlineMs,
61
+ orElse: () => Stream.fail(new Error("Session feed is connected but silent; the service may be busy")),
62
+ }), Stream.toAsyncIterable);
63
+ for await (const frame of frames) {
58
64
  snapshot = applySessionFrame(snapshot, frame);
59
65
  if (snapshot.messages.length > LIVE_HISTORY_REFRESH_AT) {
60
66
  snapshot = await session.read({ limit: LIVE_HISTORY_LIMIT });
package/dist/styles.css CHANGED
@@ -13321,6 +13321,19 @@
13321
13321
  .list-row > .caps-field {
13322
13322
  grid-column: 1 / -1;
13323
13323
  }
13324
+ .list.list-sm > .list-row > .caps-field {
13325
+ --caps-field-icon-size: 1rem;
13326
+ }
13327
+ .list.list-sm > .list-row > .caps-field .caps-field-lead {
13328
+ align-items: flex-start;
13329
+ gap: var(--spacing-xs);
13330
+ }
13331
+ .list.list-sm > .list-row > .caps-field .caps-field-icon {
13332
+ height: calc(var(--caps-control-label-size, var(--text-sm)) * 1.5);
13333
+ }
13334
+ .list.list-sm > .list-row > .caps-field:has(> .caps-field-row > .caps-field-lead) > .caps-field-error-reveal {
13335
+ padding-inline-start: calc(var(--caps-field-icon-size) + var(--spacing-xs));
13336
+ }
13324
13337
  .caps-field:has(> .caps-field-row > .caps-field-lead) > .caps-field-error-reveal {
13325
13338
  padding-inline-start: calc(var(--caps-field-icon-size) + var(--spacing-sm));
13326
13339
  }
@@ -13355,6 +13368,15 @@
13355
13368
  line-height: 1.5;
13356
13369
  color: var(--color-base-content);
13357
13370
  }
13371
+ .caps-fieldset-legend:has(> .caps-field-icon) {
13372
+ display: flex;
13373
+ align-items: center;
13374
+ gap: var(--spacing-xs);
13375
+ }
13376
+ .caps-fieldset-legend > .caps-field-icon {
13377
+ width: 1rem;
13378
+ height: 1rem;
13379
+ }
13358
13380
  .caps-fieldset-description {
13359
13381
  margin: 0;
13360
13382
  font-size: var(--text-xs);
@@ -13472,7 +13494,7 @@
13472
13494
  padding-bottom: var(--spacing-sm);
13473
13495
  }
13474
13496
  :is(.caps-form, .caps-form-section, .caps-fieldset)[data-layout="columns"] {
13475
- --caps-form-label-col: 9rem;
13497
+ --caps-form-label-col: 7rem;
13476
13498
  }
13477
13499
  .caps-form[data-layout="columns"] :is(.caps-form-body, .caps-form-section-fields) {
13478
13500
  gap: var(--spacing-sm);
@@ -13551,6 +13573,13 @@
13551
13573
  grid-column: 1;
13552
13574
  grid-row: 1;
13553
13575
  margin: 0;
13576
+ float: left;
13577
+ align-self: start;
13578
+ min-height: var(--caps-fieldset-legend-line, 2.25rem);
13579
+ align-content: center;
13580
+ }
13581
+ .caps-fieldset[data-layout="columns"]:has( .caps-icon-choice:not([data-swatch]) ) {
13582
+ --caps-fieldset-legend-line: 3.25rem;
13554
13583
  }
13555
13584
  .caps-fieldset[data-layout="columns"] > .caps-fieldset-fields {
13556
13585
  grid-column: 2;
@@ -13558,6 +13587,7 @@
13558
13587
  flex-direction: row;
13559
13588
  flex-wrap: wrap;
13560
13589
  margin: 0;
13590
+ max-width: 30rem;
13561
13591
  }
13562
13592
  .caps-fieldset[data-layout="columns"] > :is(.caps-fieldset-description, .caps-field-error-reveal) {
13563
13593
  grid-column: 2;
@@ -13578,7 +13608,38 @@
13578
13608
  max-width: none;
13579
13609
  }
13580
13610
  }
13581
- @container (max-width: 20rem) {
13611
+ :is(.caps-form, .caps-form-section)[data-layout="columns"] :is( .caps-field[data-orientation="vertical"], .caps-field[data-orientation="horizontal"] > .caps-field-row ) > .caps-field-lead {
13612
+ display: contents;
13613
+ }
13614
+ :is(.caps-form, .caps-form-section)[data-layout="columns"] :is( .caps-field[data-orientation="vertical"], .caps-field[data-orientation="horizontal"] > .caps-field-row ) > .caps-field-lead > .caps-field-copy {
13615
+ display: contents;
13616
+ }
13617
+ :is(.caps-form, .caps-form-section)[data-layout="columns"] :is( .caps-field[data-orientation="vertical"], .caps-field[data-orientation="horizontal"] > .caps-field-row ) > .caps-field-lead > .caps-field-icon {
13618
+ grid-column: 1;
13619
+ grid-row: 1;
13620
+ justify-self: start;
13621
+ }
13622
+ :is(.caps-form, .caps-form-section)[data-layout="columns"] :is( .caps-field[data-orientation="vertical"], .caps-field[data-orientation="horizontal"] > .caps-field-row ) > .caps-field-lead > .caps-field-copy > label {
13623
+ grid-column: 1;
13624
+ grid-row: 1;
13625
+ min-width: 0;
13626
+ padding-inline-start: calc(var(--caps-field-icon-size) + var(--spacing-xs));
13627
+ overflow: hidden;
13628
+ text-overflow: ellipsis;
13629
+ white-space: nowrap;
13630
+ }
13631
+ :is(.caps-form, .caps-form-section)[data-layout="columns"] :is( .caps-field[data-orientation="vertical"], .caps-field[data-orientation="horizontal"] > .caps-field-row ) > .caps-field-lead > .caps-field-copy > .caps-field-description {
13632
+ grid-column: 2;
13633
+ grid-row: 2;
13634
+ }
13635
+ :is(.caps-form, .caps-form-section)[data-layout="columns"] .caps-field, .caps-fieldset[data-layout="columns"] {
13636
+ --caps-field-icon-size: 1rem;
13637
+ }
13638
+ :is(.caps-form, .caps-form-section)[data-layout="columns"] .caps-field :is(.caps-field-copy > label, .caps-field-icon), .caps-fieldset[data-layout="columns"] > .caps-fieldset-legend {
13639
+ color: var(--stipe-fg-muted);
13640
+ font-weight: 400;
13641
+ }
13642
+ @container (max-width: 24rem) {
13582
13643
  :is(.caps-form, .caps-form-section)[data-layout="columns"] :is( .caps-field[data-orientation="vertical"], .caps-field[data-orientation="horizontal"] > .caps-field-row ), .caps-fieldset[data-layout="columns"] {
13583
13644
  grid-template-columns: minmax(0, 1fr);
13584
13645
  }
@@ -13595,11 +13656,16 @@
13595
13656
  overflow: visible;
13596
13657
  text-overflow: clip;
13597
13658
  white-space: normal;
13659
+ min-height: 0;
13598
13660
  }
13599
13661
  :is(.caps-form, .caps-form-section)[data-layout="columns"] .caps-field[data-orientation="horizontal"] > .caps-field-error-reveal, .caps-form[data-layout="columns"] .caps-form-footer {
13600
13662
  padding-inline-start: 0;
13601
13663
  max-width: none;
13602
13664
  }
13665
+ :is(.caps-form, .caps-form-section)[data-layout="columns"] :is( .caps-field[data-orientation="vertical"], .caps-field[data-orientation="horizontal"] > .caps-field-row ) > .caps-field-lead > .caps-field-copy > .caps-field-description {
13666
+ grid-column: 1;
13667
+ grid-row: 3;
13668
+ }
13603
13669
  }
13604
13670
  .caps-choice-card {
13605
13671
  display: flex;
@@ -14877,6 +14943,121 @@
14877
14943
  .caps-icon-choice[data-appearance="compact"] .caps-icon-choice-lamp {
14878
14944
  display: none;
14879
14945
  }
14946
+ .caps-icon-choice[data-swatch] {
14947
+ min-width: 2.25rem;
14948
+ min-height: 2.25rem;
14949
+ }
14950
+ .caps-icon-choice[data-swatch] .caps-icon-choice-mark {
14951
+ padding: var(--spacing-xs);
14952
+ }
14953
+ .caps-icon-choice[data-art="color"] .caps-icon-choice-art {
14954
+ filter: none;
14955
+ opacity: 1;
14956
+ }
14957
+ .caps-icon-choice[data-swatch] .caps-icon-choice-art {
14958
+ width: 1rem;
14959
+ height: 1rem;
14960
+ }
14961
+ .caps-swatch-dot {
14962
+ display: block;
14963
+ width: 100%;
14964
+ height: 100%;
14965
+ border-radius: var(--radius-full);
14966
+ outline: var(--border) solid var(--color-base-content);
14967
+ @supports (color: color-mix(in lab, red, red)) {
14968
+ outline: var(--border) solid color-mix(in oklab, var(--color-base-content) 20%, transparent);
14969
+ }
14970
+ outline-offset: -1px;
14971
+ }
14972
+ .caps-check-keys {
14973
+ flex: 1 1 100%;
14974
+ display: grid;
14975
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr));
14976
+ gap: var(--spacing-xs);
14977
+ min-width: 0;
14978
+ }
14979
+ .caps-check-keys:has(> :nth-child(7)) {
14980
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
14981
+ }
14982
+ .caps-check-key {
14983
+ display: grid;
14984
+ min-width: 0;
14985
+ cursor: pointer;
14986
+ }
14987
+ .caps-check-key > .caps-checkbox {
14988
+ min-height: 2.25rem;
14989
+ }
14990
+ .caps-check-key-face {
14991
+ grid-area: control;
14992
+ position: relative;
14993
+ display: flex;
14994
+ align-items: flex-start;
14995
+ gap: var(--spacing-xs);
14996
+ min-width: 0;
14997
+ padding: var(--spacing-xs) var(--spacing-md) var(--spacing-xs) var(--spacing-sm);
14998
+ border: var(--border) solid var(--caps-control-line, var(--color-base-300));
14999
+ border-radius: var(--radius-field);
15000
+ background: var(--caps-control-face, var(--color-base-100));
15001
+ color: var(--caps-control-dim, var(--stipe-fg-muted));
15002
+ pointer-events: none;
15003
+ transition: border-color var(--stipe-motion-fast) var(--stipe-motion-ease), background-color var(--stipe-motion-fast) var(--stipe-motion-ease);
15004
+ }
15005
+ .caps-check-key-icon {
15006
+ display: inline-flex;
15007
+ flex: none;
15008
+ align-items: center;
15009
+ width: 1rem;
15010
+ height: calc(var(--text-sm) * 1.5);
15011
+ filter: var(--caps-control-icon-off, grayscale(1) contrast(0));
15012
+ opacity: 0.55;
15013
+ }
15014
+ .caps-check-key-icon > :is(svg, img) {
15015
+ width: 1rem;
15016
+ height: 1rem;
15017
+ }
15018
+ .caps-check-key-copy {
15019
+ display: grid;
15020
+ min-width: 0;
15021
+ }
15022
+ .caps-check-key-label {
15023
+ font-size: var(--text-sm);
15024
+ font-weight: 600;
15025
+ line-height: 1.5;
15026
+ overflow-wrap: break-word;
15027
+ }
15028
+ .caps-check-key-hint {
15029
+ font-size: var(--text-xs);
15030
+ line-height: 1.4;
15031
+ color: var(--stipe-fg-muted);
15032
+ }
15033
+ .caps-check-key-lamp {
15034
+ position: absolute;
15035
+ top: 6px;
15036
+ right: 6px;
15037
+ width: 4px;
15038
+ height: 4px;
15039
+ border-radius: var(--radius-full);
15040
+ background: currentcolor;
15041
+ opacity: 0;
15042
+ }
15043
+ .caps-check-key-input:checked + .caps-check-key-face {
15044
+ border-color: var(--caps-control-selected-line, var(--color-base-content));
15045
+ background: var(--caps-control-selected-face, var(--color-base-200));
15046
+ color: var(--caps-control-ink, var(--color-base-content));
15047
+ }
15048
+ .caps-check-key-input:checked + .caps-check-key-face .caps-check-key-icon {
15049
+ filter: none;
15050
+ opacity: 1;
15051
+ }
15052
+ .caps-check-key-input:checked + .caps-check-key-face .caps-check-key-lamp {
15053
+ opacity: 1;
15054
+ }
15055
+ .caps-check-key-input:hover:not(:checked, :disabled) + .caps-check-key-face .caps-check-key-icon {
15056
+ opacity: 0.8;
15057
+ }
15058
+ .caps-check-key:has(.caps-check-key-input:disabled) {
15059
+ cursor: not-allowed;
15060
+ }
14880
15061
  .caps-icon-choice:has(.caps-icon-choice-input:disabled) {
14881
15062
  cursor: not-allowed;
14882
15063
  }
@@ -15787,6 +15968,35 @@
15787
15968
  font-size: var(--text-xs);
15788
15969
  font-variant-numeric: tabular-nums;
15789
15970
  }
15971
+ .list-row.caps-fact {
15972
+ --list-grid-cols: 6.5rem minmax(0, 1fr);
15973
+ align-items: start;
15974
+ gap: var(--spacing-sm);
15975
+ }
15976
+ .list-row.caps-fact::after {
15977
+ inset-inline: 0;
15978
+ }
15979
+ .caps-fact-label {
15980
+ display: flex;
15981
+ align-items: center;
15982
+ gap: var(--spacing-xs);
15983
+ min-height: 1lh;
15984
+ color: var(--stipe-fg-muted);
15985
+ }
15986
+ .caps-fact-icon {
15987
+ display: inline-flex;
15988
+ flex: none;
15989
+ width: 1rem;
15990
+ height: 1rem;
15991
+ }
15992
+ .caps-fact-icon > :is(svg, img) {
15993
+ width: 100%;
15994
+ height: 100%;
15995
+ }
15996
+ .caps-fact-value {
15997
+ min-width: 0;
15998
+ overflow-wrap: anywhere;
15999
+ }
15790
16000
  .list.list-sm > .list-row {
15791
16001
  gap: var(--spacing-sm);
15792
16002
  padding: var(--spacing-2xs) 0;
@@ -16566,6 +16776,18 @@
16566
16776
  .caps-game-meter .progress {
16567
16777
  height: 0.625rem;
16568
16778
  }
16779
+ .caps-keycap-button[data-density="compact"] {
16780
+ --caps-keycap-height: 2.25rem;
16781
+ --caps-keycap-width: auto;
16782
+ --caps-keycap-justify: center;
16783
+ --caps-keycap-font-size: var(--text-sm);
16784
+ --caps-keycap-font-weight: 600;
16785
+ }
16786
+ @media (max-width: 640px), (any-pointer: coarse) {
16787
+ .caps-keycap-button[data-density="compact"] {
16788
+ --caps-keycap-height: var(--caps-touch-target);
16789
+ }
16790
+ }
16569
16791
  .caps-keycap-button {
16570
16792
  --caps-key-face: var(--caps-keycap-face, var(--color-base-200));
16571
16793
  --caps-keycap-rest-shadow: inset 0 1px 0 oklch(100% 0 0 / calc(var(--depth) * 0.18)),
@@ -18565,6 +18787,19 @@
18565
18787
  place-self: center stretch;
18566
18788
  height: max(100%, var(--caps-touch-target));
18567
18789
  }
18790
+ .caps-switch-input, .caps-icon-choice[data-swatch] .caps-icon-choice-input {
18791
+ place-self: center;
18792
+ width: max(100%, var(--caps-touch-target));
18793
+ }
18794
+ .caps-check-key > .caps-checkbox {
18795
+ min-height: var(--caps-touch-target);
18796
+ }
18797
+ .caps-check-key .caps-check-key-face {
18798
+ align-items: center;
18799
+ }
18800
+ .caps-icon-choice[data-swatch] .caps-icon-choice-input {
18801
+ height: max(100%, var(--caps-touch-target));
18802
+ }
18568
18803
  .caps-icon-button::after {
18569
18804
  content: "";
18570
18805
  position: absolute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/parakeet",
3
- "version": "0.6.2",
3
+ "version": "0.7.1",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "private": false,
6
6
  "description": "Standalone React composer for a typed Shiitake Session",
@@ -56,14 +56,14 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@earendil-works/pi-ai": "1.3.0",
59
- "@fungi.computer/agar": "0.6.1",
59
+ "@fungi.computer/agar": "0.7.0",
60
60
  "@fungi.computer/bird-dog": "0.3.1",
61
61
  "@fungi.computer/cairn": "0.1.0",
62
- "@fungi.computer/caps": "0.6.0",
62
+ "@fungi.computer/caps": "0.7.0",
63
63
  "@fungi.computer/gills": "0.2.0",
64
- "@fungi.computer/knapsack": "0.4.2",
65
- "@fungi.computer/shiitake": "0.8.0",
66
- "@fungi.computer/sigils": "0.2.2",
64
+ "@fungi.computer/knapsack": "0.4.4",
65
+ "@fungi.computer/shiitake": "0.9.1",
66
+ "@fungi.computer/sigils": "0.3.0",
67
67
  "@fungi.computer/sprite": "0.2.0",
68
68
  "@fungi.computer/sprite-zdog": "0.3.0",
69
69
  "@fungi.computer/whistle": "0.3.0",