@gjermundgaraba-designs/pixel-paper 0.22.2 → 0.24.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.
Files changed (176) hide show
  1. package/DESIGN.md +18 -17
  2. package/dist/src/adapters/mermaid.d.ts.map +1 -1
  3. package/dist/src/adapters/mermaid.js +0 -24
  4. package/dist/src/announcer/announcer.d.ts.map +1 -1
  5. package/dist/src/announcer/announcer.js +12 -12
  6. package/dist/src/board/board.d.ts +0 -10
  7. package/dist/src/board/board.d.ts.map +1 -1
  8. package/dist/src/board/board.js +36 -64
  9. package/dist/src/board/index.d.ts +2 -1
  10. package/dist/src/board/index.d.ts.map +1 -1
  11. package/dist/src/board/index.js +2 -1
  12. package/dist/src/button/button.d.ts +1 -1
  13. package/dist/src/button/button.d.ts.map +1 -1
  14. package/dist/src/commandPalette/commandPalette.d.ts.map +1 -1
  15. package/dist/src/commandPalette/commandPalette.js +78 -83
  16. package/dist/src/commandPalette/keys.d.ts +2 -2
  17. package/dist/src/commandPalette/keys.d.ts.map +1 -1
  18. package/dist/src/commandPalette/keys.js +2 -4
  19. package/dist/src/commandPalette/match.d.ts.map +1 -1
  20. package/dist/src/commandPalette/match.js +2 -2
  21. package/dist/src/confirmDialog/confirmDialog.d.ts.map +1 -1
  22. package/dist/src/confirmDialog/confirmDialog.js +1 -2
  23. package/dist/src/copyButton/copyButton.d.ts +0 -5
  24. package/dist/src/copyButton/copyButton.d.ts.map +1 -1
  25. package/dist/src/copyButton/copyButton.js +2 -2
  26. package/dist/src/crumbs/crumbs.d.ts +0 -2
  27. package/dist/src/crumbs/crumbs.d.ts.map +1 -1
  28. package/dist/src/crumbs/crumbs.js +2 -2
  29. package/dist/src/dialog/dialog.d.ts +2 -0
  30. package/dist/src/dialog/dialog.d.ts.map +1 -1
  31. package/dist/src/dialog/dialog.js +3 -2
  32. package/dist/src/drag/drag.d.ts +28 -0
  33. package/dist/src/drag/drag.d.ts.map +1 -1
  34. package/dist/src/drag/drag.js +39 -17
  35. package/dist/src/editableTitle/editableTitle.d.ts +4 -4
  36. package/dist/src/field/field.d.ts +7 -1
  37. package/dist/src/field/field.d.ts.map +1 -1
  38. package/dist/src/field/field.js +14 -6
  39. package/dist/src/fieldset/fieldset.d.ts.map +1 -1
  40. package/dist/src/fieldset/fieldset.js +2 -4
  41. package/dist/src/fileTree/fileTree.d.ts.map +1 -1
  42. package/dist/src/fileTree/fileTree.js +16 -16
  43. package/dist/src/iconButton/iconButton.d.ts +6 -1
  44. package/dist/src/iconButton/iconButton.d.ts.map +1 -1
  45. package/dist/src/iconButton/iconButton.js +7 -2
  46. package/dist/src/inlineInput/inlineInput.d.ts +4 -0
  47. package/dist/src/inlineInput/inlineInput.d.ts.map +1 -1
  48. package/dist/src/inlineInput/inlineInput.js +9 -6
  49. package/dist/src/keyHelp/index.d.ts +1 -1
  50. package/dist/src/keyHelp/index.d.ts.map +1 -1
  51. package/dist/src/keyHelp/index.js +1 -1
  52. package/dist/src/keyHelp/keyHelp.d.ts +1 -3
  53. package/dist/src/keyHelp/keyHelp.d.ts.map +1 -1
  54. package/dist/src/keyHelp/keyHelp.js +3 -6
  55. package/dist/src/keyHint/keyLabel.d.ts +2 -0
  56. package/dist/src/keyHint/keyLabel.d.ts.map +1 -1
  57. package/dist/src/keyHint/keyLabel.js +3 -2
  58. package/dist/src/lineDiff/diff.d.ts +6 -3
  59. package/dist/src/lineDiff/diff.d.ts.map +1 -1
  60. package/dist/src/lineDiff/diff.js +40 -28
  61. package/dist/src/lineDiff/patch.d.ts.map +1 -1
  62. package/dist/src/lineDiff/patch.js +18 -13
  63. package/dist/src/linkState/linkState.d.ts.map +1 -1
  64. package/dist/src/linkState/linkState.js +1 -7
  65. package/dist/src/menu/slip.js +2 -2
  66. package/dist/src/meter/meter.d.ts.map +1 -1
  67. package/dist/src/meter/meter.js +22 -17
  68. package/dist/src/notice/notice.d.ts +2 -0
  69. package/dist/src/notice/notice.d.ts.map +1 -1
  70. package/dist/src/notice/notice.js +2 -1
  71. package/dist/src/panel/panel.d.ts +3 -0
  72. package/dist/src/panel/panel.d.ts.map +1 -1
  73. package/dist/src/panel/panel.js +2 -1
  74. package/dist/src/passwordField/passwordField.d.ts.map +1 -1
  75. package/dist/src/passwordField/passwordField.js +3 -7
  76. package/dist/src/rail/index.d.ts +1 -1
  77. package/dist/src/rail/index.d.ts.map +1 -1
  78. package/dist/src/rail/index.js +1 -1
  79. package/dist/src/rail/rail.d.ts +95 -20
  80. package/dist/src/rail/rail.d.ts.map +1 -1
  81. package/dist/src/rail/rail.js +103 -46
  82. package/dist/src/reel/layout.d.ts +9 -5
  83. package/dist/src/reel/layout.d.ts.map +1 -1
  84. package/dist/src/reel/layout.js +11 -5
  85. package/dist/src/reel/reel.d.ts.map +1 -1
  86. package/dist/src/reel/reel.js +122 -68
  87. package/dist/src/scheme/scheme.d.ts +1 -1
  88. package/dist/src/scheme/scheme.d.ts.map +1 -1
  89. package/dist/src/segmented/segmented.d.ts +0 -3
  90. package/dist/src/segmented/segmented.d.ts.map +1 -1
  91. package/dist/src/segmented/segmented.js +1 -6
  92. package/dist/src/selectField/selectField.d.ts.map +1 -1
  93. package/dist/src/selectField/selectField.js +3 -10
  94. package/dist/src/sortable/index.d.ts +1 -1
  95. package/dist/src/sortable/index.d.ts.map +1 -1
  96. package/dist/src/sortable/index.js +1 -1
  97. package/dist/src/sortable/sortable.d.ts +39 -40
  98. package/dist/src/sortable/sortable.d.ts.map +1 -1
  99. package/dist/src/sortable/sortable.js +14 -31
  100. package/dist/src/stack/stack.d.ts +1 -1
  101. package/dist/src/stack/stack.d.ts.map +1 -1
  102. package/dist/src/stack/stack.js +1 -1
  103. package/dist/src/tabs/tabs.d.ts +1 -1
  104. package/dist/src/tabs/tabs.d.ts.map +1 -1
  105. package/dist/src/tabs/tabs.js +1 -1
  106. package/dist/src/textareaField/textareaField.d.ts.map +1 -1
  107. package/dist/src/textareaField/textareaField.js +3 -7
  108. package/dist/src/time/time.d.ts.map +1 -1
  109. package/dist/src/time/time.js +4 -2
  110. package/dist/src/tips/index.d.ts +1 -1
  111. package/dist/src/tips/index.d.ts.map +1 -1
  112. package/dist/src/tips/tips.d.ts +30 -1
  113. package/dist/src/tips/tips.d.ts.map +1 -1
  114. package/dist/src/tips/tips.js +53 -31
  115. package/dist/src/toast/index.d.ts +1 -1
  116. package/dist/src/toast/index.d.ts.map +1 -1
  117. package/dist/src/toast/toast.d.ts +5 -5
  118. package/dist/src/toast/toast.d.ts.map +1 -1
  119. package/dist/src/toast/toast.js +1 -6
  120. package/dist/src/toolbar/toolbar.d.ts +0 -3
  121. package/dist/src/toolbar/toolbar.d.ts.map +1 -1
  122. package/dist/src/toolbar/toolbar.js +1 -2
  123. package/package.json +1 -1
  124. package/src/adapters/mermaid.ts +0 -24
  125. package/src/announcer/announcer.ts +13 -17
  126. package/src/board/board.ts +32 -80
  127. package/src/board/index.ts +1 -1
  128. package/src/button/button.ts +1 -1
  129. package/src/commandPalette/commandPalette.ts +21 -38
  130. package/src/commandPalette/keys.ts +2 -4
  131. package/src/commandPalette/match.ts +3 -3
  132. package/src/confirmDialog/confirmDialog.ts +5 -3
  133. package/src/copyButton/copyButton.ts +2 -5
  134. package/src/crumbs/crumbs.ts +2 -4
  135. package/src/dialog/dialog.ts +3 -2
  136. package/src/drag/drag.ts +54 -5
  137. package/src/field/field.ts +29 -7
  138. package/src/fieldset/fieldset.ts +2 -4
  139. package/src/fileTree/fileTree.ts +10 -12
  140. package/src/iconButton/iconButton.ts +19 -2
  141. package/src/inlineInput/inlineInput.ts +11 -2
  142. package/src/keyHelp/index.ts +0 -1
  143. package/src/keyHelp/keyHelp.ts +3 -9
  144. package/src/keyHint/keyLabel.ts +5 -2
  145. package/src/lineDiff/diff.ts +70 -54
  146. package/src/lineDiff/patch.ts +27 -14
  147. package/src/linkState/linkState.ts +1 -8
  148. package/src/menu/slip.ts +2 -2
  149. package/src/meter/meter.ts +25 -15
  150. package/src/notice/notice.ts +2 -1
  151. package/src/panel/panel.ts +5 -0
  152. package/src/passwordField/passwordField.ts +3 -7
  153. package/src/pixel-paper.css +200 -134
  154. package/src/rail/index.ts +2 -0
  155. package/src/rail/rail.ts +124 -44
  156. package/src/reel/layout.ts +14 -7
  157. package/src/reel/reel.ts +132 -63
  158. package/src/scheme/scheme.ts +1 -1
  159. package/src/segmented/segmented.ts +1 -9
  160. package/src/selectField/selectField.ts +3 -10
  161. package/src/sortable/index.ts +0 -1
  162. package/src/sortable/sortable.ts +35 -54
  163. package/src/stack/stack.ts +1 -1
  164. package/src/tabs/tabs.ts +1 -1
  165. package/src/textareaField/textareaField.ts +3 -7
  166. package/src/time/time.ts +6 -7
  167. package/src/tips/index.ts +1 -1
  168. package/src/tips/tips.ts +71 -35
  169. package/src/toast/index.ts +1 -1
  170. package/src/toast/toast.ts +2 -8
  171. package/src/tokens.css +7 -0
  172. package/src/toolbar/toolbar.ts +0 -5
  173. package/dist/src/inlineInput/inline.d.ts +0 -6
  174. package/dist/src/inlineInput/inline.d.ts.map +0 -1
  175. package/dist/src/inlineInput/inline.js +0 -7
  176. package/src/inlineInput/inline.ts +0 -13
@@ -1,6 +1,6 @@
1
1
  import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
2
  import { Input as UiInput } from "@foldkit/ui";
3
- import { Array, Effect, HashSet, Match, Option, Schema, Stream, String, pipe } from "effect";
3
+ import { Array, Effect, Equal, HashSet, Match, Option, Schema, Stream, String, pipe } from "effect";
4
4
  import * as FoldkitCommand from "foldkit/command";
5
5
  import * as Dom from "foldkit/dom";
6
6
  import { defineMessageUnion } from "foldkit/message";
@@ -159,13 +159,9 @@ const fresh = (model, maybePage) => __foldkitBrandViewResult((clearPendingKeys(m
159
159
  maybePage: () => __foldkitBrandViewResult((maybePage), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybePage"),
160
160
  maybePicking: () => __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybePicking"),
161
161
  }))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#fresh");
162
- const isSamePage = (maybeFirst, maybeSecond) => __foldkitBrandViewResult((Option.match(maybeFirst, {
163
- onNone: () => __foldkitBrandViewResult((Option.isNone(maybeSecond)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~2"),
164
- onSome: (commandId) => __foldkitBrandViewResult((Option.contains(maybeSecond, commandId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~2"),
165
- })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#isSamePage");
166
162
  /** Makes the Model follow what the view showed: a page whose command is gone is dropped (with
167
163
  * a pick out on it), so the commands' query and cursor take the reader's input again. */
168
- const followShown = (model, maybeShownPage) => __foldkitBrandViewResult((isSamePage(maybePageId(model), maybeShownPage)
164
+ const followShown = (model, maybeShownPage) => __foldkitBrandViewResult((Equal.equals(maybePageId(model), maybeShownPage)
169
165
  ? model
170
166
  : clearPendingKeys(modifyFields(model, {
171
167
  maybePage: () => __foldkitBrandViewResult((Option.map(maybeShownPage, freshPage)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybePage~2"),
@@ -179,39 +175,38 @@ const leavePage = (model) => __foldkitBrandViewResult((isPicking(model) || Optio
179
175
  model: clearPendingKeys(modifyFields(model, { maybePage: () => __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybePage~3") })),
180
176
  commands: [focusField(model), scrollPaletteToCursor(model)],
181
177
  }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#leavePage");
182
- const openPage = (model, commandId) => __foldkitBrandViewResult((unlessPicking(model, (current) => (__foldkitBrandViewResult(({
183
- model: clearPendingKeys(modifyFields(current, { maybePage: () => __foldkitBrandViewResult((Option.some(freshPage(commandId))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybePage~4") })),
184
- commands: [focusField(current), scrollPaletteToCursor(current)],
185
- }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~6")))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#openPage");
178
+ const openPage = (model, commandId) => (__foldkitBrandViewResult(({
179
+ model: clearPendingKeys(modifyFields(model, { maybePage: () => __foldkitBrandViewResult((Option.some(freshPage(commandId))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybePage~4") })),
180
+ commands: [focusField(model), scrollPaletteToCursor(model)],
181
+ }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#openPage"));
186
182
  const selectCommand = (model, commandId) => __foldkitBrandViewResult((pipe(dialogFold.close(model), Update.withOutMessage(OutMessage.SelectedCommand({ id: commandId })))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#selectCommand");
187
183
  const moveCursor = (model, cursorId) => __foldkitBrandViewResult((modifyFields(Option.match(model.maybePage, {
188
- onNone: () => __foldkitBrandViewResult((modifyFields(model, { maybeCursor: () => __foldkitBrandViewResult((Option.some(cursorId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybeCursor~2") })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~3"),
189
- onSome: () => __foldkitBrandViewResult((modifyPage(model, (page) => __foldkitBrandViewResult((modifyFields(page, { maybeCursor: () => __foldkitBrandViewResult((Option.some(cursorId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybeCursor~3") })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~7"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~3"),
184
+ onNone: () => __foldkitBrandViewResult((modifyFields(model, { maybeCursor: () => __foldkitBrandViewResult((Option.some(cursorId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybeCursor~2") })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~2"),
185
+ onSome: () => __foldkitBrandViewResult((modifyPage(model, (page) => __foldkitBrandViewResult((modifyFields(page, { maybeCursor: () => __foldkitBrandViewResult((Option.some(cursorId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybeCursor~3") })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~6"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~2"),
190
186
  }), { cursorShift: () => __foldkitBrandViewResult((0), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#cursorShift~2") })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#moveCursor");
191
187
  // A pick drops the keys waiting for the next render: the row picked is the one acted on.
192
- const pick = (model, commandId, choiceId) => __foldkitBrandViewResult((isPicking(model)
193
- ? { model }
194
- : {
195
- model: clearPendingKeys(modifyFields(moveCursor(model, choiceId), { maybePicking: () => __foldkitBrandViewResult((Option.some(choiceId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybePicking~3") })),
196
- outMessage: OutMessage.SelectedChoice({ commandId, choiceId }),
197
- }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#pick");
188
+ const pick = (model, commandId, choiceId) => (__foldkitBrandViewResult(({
189
+ model: clearPendingKeys(modifyFields(moveCursor(model, choiceId), { maybePicking: () => __foldkitBrandViewResult((Option.some(choiceId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybePicking~3") })),
190
+ outMessage: OutMessage.SelectedChoice({ commandId, choiceId }),
191
+ }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#pick"));
198
192
  // What a click on a row or Enter on the cursor's does: nothing when it is held, else pick it
199
- // on a page, open its page, or select it.
193
+ // on a page, open its page, or select it. Never while a pick is out: the click and the keys
194
+ // come through `unlessPicking`, and a pick clears the waiting Enter `settlePending` runs.
200
195
  const runRow = (model, row) => {
201
196
  if (row.isHeld) {
202
197
  return __foldkitBrandViewResult(({ model }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#runRow");
203
198
  }
204
199
  return __foldkitBrandViewResult((Option.match(maybePageId(model), {
205
- onSome: (commandId) => __foldkitBrandViewResult((pick(model, commandId, row.id)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~4"),
206
- onNone: () => (__foldkitBrandViewResult((row.hasPage ? openPage(model, row.id) : selectCommand(model, row.id)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~4")),
200
+ onSome: (commandId) => __foldkitBrandViewResult((pick(model, commandId, row.id)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~3"),
201
+ onNone: () => (__foldkitBrandViewResult((row.hasPage ? openPage(model, row.id) : selectCommand(model, row.id)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~3")),
207
202
  })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#runRow");
208
203
  };
209
204
  const maybeCurrentCursor = (model) => __foldkitBrandViewResult((Option.match(model.maybePage, {
210
- onNone: () => __foldkitBrandViewResult((model.maybeCursor), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~5"),
211
- onSome: (page) => __foldkitBrandViewResult((page.maybeCursor), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~5"),
205
+ onNone: () => __foldkitBrandViewResult((model.maybeCursor), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~4"),
206
+ onSome: (page) => __foldkitBrandViewResult((page.maybeCursor), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~4"),
212
207
  })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybeCurrentCursor");
213
208
  const ARROW_STEP = { ArrowUp: -1, ArrowDown: 1 };
214
- const isListed = (rows, rowId) => __foldkitBrandViewResult((Array.some(rows, (row) => __foldkitBrandViewResult((row.id === rowId), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~8"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#isListed");
209
+ const isListed = (rows, rowId) => __foldkitBrandViewResult((Array.some(rows, (row) => __foldkitBrandViewResult((row.id === rowId), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~7"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#isListed");
215
210
  // NOTE: where the cursor is among the rows a key carries (see `Model`). With no arrows waiting
216
211
  // it is the Model's cursor while that row is listed, else the shown one, so each key acts from
217
212
  // where the last left it, also when several come before the next render; with arrows waiting,
@@ -221,7 +216,7 @@ const cursorAsShown = (model, shown) => {
221
216
  const { rows, maybeShownCursor, shownQuery, shownShift } = shown;
222
217
  const isTheList = shownQuery === query(model);
223
218
  if (isTheList && model.cursorShift === 0) {
224
- return __foldkitBrandViewResult((Option.some(Option.orElse(Option.filter(maybeCurrentCursor(model), (rowId) => __foldkitBrandViewResult((isListed(rows, rowId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~9")), () => __foldkitBrandViewResult((maybeShownCursor), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~10")))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#cursorAsShown");
219
+ return __foldkitBrandViewResult((Option.some(Option.orElse(Option.filter(maybeCurrentCursor(model), (rowId) => __foldkitBrandViewResult((isListed(rows, rowId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~8")), () => __foldkitBrandViewResult((maybeShownCursor), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~9")))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#cursorAsShown");
225
220
  }
226
221
  else if (isTheList && shownShift === model.cursorShift) {
227
222
  return __foldkitBrandViewResult((Option.some(maybeShownCursor)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#cursorAsShown");
@@ -244,10 +239,10 @@ const stepTo = (model, rowId) => {
244
239
  };
245
240
  // The row `steps` rows on from the cursor's, held at the ends. Update's arrows, one at a time,
246
241
  // and the view's waiting arrows, all at once, both land through this, so they land alike.
247
- const rowAfter = (rows, maybeFrom, steps) => __foldkitBrandViewResult((pipe(maybeFrom, Option.flatMap((rowId) => __foldkitBrandViewResult((Array.findFirstIndex(rows, (row) => __foldkitBrandViewResult((row.id === rowId), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~12"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~11")), Option.flatMap((index) => __foldkitBrandViewResult((Array.get(rows, Math.min(Math.max(index + steps, 0), rows.length - 1))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~13")))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#rowAfter");
242
+ const rowAfter = (rows, maybeFrom, steps) => __foldkitBrandViewResult((pipe(maybeFrom, Option.flatMap((rowId) => __foldkitBrandViewResult((Array.findFirstIndex(rows, (row) => __foldkitBrandViewResult((row.id === rowId), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~11"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~10")), Option.flatMap((index) => __foldkitBrandViewResult((Array.get(rows, Math.min(Math.max(index + steps, 0), rows.length - 1))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~12")))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#rowAfter");
248
243
  const stepFrom = (model, key, rows, maybeFrom) => __foldkitBrandViewResult((Option.match(rowAfter(rows, maybeFrom, ARROW_STEP[key]), {
249
- onNone: () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~6")),
250
- onSome: (row) => __foldkitBrandViewResult((stepTo(model, row.id)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~6"),
244
+ onNone: () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~5")),
245
+ onSome: (row) => __foldkitBrandViewResult((stepTo(model, row.id)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~5"),
251
246
  })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#stepFrom");
252
247
  // An arrow that cannot name a row yet waits for the next render, which applies it from the
253
248
  // cursor's row (see `Model`).
@@ -257,8 +252,8 @@ const pendArrow = (model, key) => {
257
252
  };
258
253
  // An arrow steps one row from the cursor as its render showed it, and stops at the ends.
259
254
  const pressArrow = (model, key, shown) => __foldkitBrandViewResult((Option.match(cursorAsShown(model, shown), {
260
- onNone: () => __foldkitBrandViewResult((pendArrow(model, key)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~7"),
261
- onSome: (maybeFrom) => __foldkitBrandViewResult((stepFrom(model, key, shown.rows, maybeFrom)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~7"),
255
+ onNone: () => __foldkitBrandViewResult((pendArrow(model, key)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~6"),
256
+ onSome: (maybeFrom) => __foldkitBrandViewResult((stepFrom(model, key, shown.rows, maybeFrom)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~6"),
262
257
  })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#pressArrow");
263
258
  const pendEnter = (model) => {
264
259
  const pending = modifyFields(model, { isEnterPending: () => __foldkitBrandViewResult((true), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#isEnterPending~2") });
@@ -266,8 +261,8 @@ const pendEnter = (model) => {
266
261
  };
267
262
  // An Enter acts on the cursor's row as its render showed it, or waits for the next render.
268
263
  const pressEnter = (model, shown) => __foldkitBrandViewResult((Option.match(cursorAsShown(model, shown), {
269
- onNone: () => __foldkitBrandViewResult((pendEnter(model)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~8"),
270
- onSome: (maybeRowId) => __foldkitBrandViewResult((pipe(maybeRowId, Option.flatMap((rowId) => __foldkitBrandViewResult((Array.findFirst(shown.rows, (row) => __foldkitBrandViewResult((row.id === rowId), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~15"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~14")), Option.match({ onNone: () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~9")), onSome: (row) => __foldkitBrandViewResult((runRow(model, row)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~9") }))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~8"),
264
+ onNone: () => __foldkitBrandViewResult((pendEnter(model)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~7"),
265
+ onSome: (maybeRowId) => __foldkitBrandViewResult((pipe(maybeRowId, Option.flatMap((rowId) => __foldkitBrandViewResult((Array.findFirst(shown.rows, (row) => __foldkitBrandViewResult((row.id === rowId), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~14"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~13")), Option.match({ onNone: () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~8")), onSome: (row) => __foldkitBrandViewResult((runRow(model, row)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~8") }))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~7"),
271
266
  })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#pressEnter");
272
267
  const isPending = (model) => __foldkitBrandViewResult((model.cursorShift !== 0 || model.isEnterPending), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#isPending");
273
268
  // A report settles the waiting keys (see `Model`) only from the render the Model is at. One from
@@ -275,7 +270,7 @@ const isPending = (model) => __foldkitBrandViewResult((model.cursorShift !== 0 |
275
270
  // moved it on cleared the waiting keys or asked again.
276
271
  const settlePending = (model, report) => {
277
272
  const { maybeShownPage, shownQuery, shownShift, maybeRow } = report;
278
- const isCurrent = isSamePage(maybePageId(model), maybeShownPage) &&
273
+ const isCurrent = Equal.equals(maybePageId(model), maybeShownPage) &&
279
274
  shownShift === model.cursorShift &&
280
275
  shownQuery === query(model);
281
276
  if (!isPending(model) || !isCurrent) {
@@ -283,17 +278,17 @@ const settlePending = (model, report) => {
283
278
  }
284
279
  const settled = clearPendingKeys(model);
285
280
  return __foldkitBrandViewResult((Option.match(maybeRow, {
286
- onNone: () => (__foldkitBrandViewResult(({ model: settled }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~10")),
281
+ onNone: () => (__foldkitBrandViewResult(({ model: settled }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~9")),
287
282
  onSome: (row) => {
288
283
  const moved = moveCursor(settled, row.id);
289
284
  const ran = model.isEnterPending ? runRow(moved, row) : { model: moved };
290
- return __foldkitBrandViewResult(({ ...ran, commands: [scrollPaletteToCursor(model), ...(ran.commands ?? [])] }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~10");
285
+ return __foldkitBrandViewResult(({ ...ran, commands: [scrollPaletteToCursor(model), ...(ran.commands ?? [])] }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~9");
291
286
  },
292
287
  })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#settlePending");
293
288
  };
294
289
  const updateQuery = (model, value) => __foldkitBrandViewResult((clearPendingKeys(Option.match(model.maybePage, {
295
- onNone: () => __foldkitBrandViewResult((modifyFields(model, { query: () => __foldkitBrandViewResult((value), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#query~3"), maybeCursor: () => __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybeCursor~4") })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~11"),
296
- onSome: () => __foldkitBrandViewResult((modifyPage(model, (page) => __foldkitBrandViewResult((modifyFields(page, { query: () => __foldkitBrandViewResult((value), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#query~4"), maybeCursor: () => __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybeCursor~5") })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~16"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~11"),
290
+ onNone: () => __foldkitBrandViewResult((modifyFields(model, { query: () => __foldkitBrandViewResult((value), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#query~3"), maybeCursor: () => __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybeCursor~4") })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~10"),
291
+ onSome: () => __foldkitBrandViewResult((modifyPage(model, (page) => __foldkitBrandViewResult((modifyFields(page, { query: () => __foldkitBrandViewResult((value), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#query~4"), maybeCursor: () => __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybeCursor~5") })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~15"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~10"),
297
292
  }))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#updateQuery");
298
293
  /** Processes a command palette Message and returns the next Model, Commands and OutMessage. */
299
294
  export const update = (model, message) => __foldkitBrandViewResult((Message.match(message, {
@@ -301,14 +296,14 @@ export const update = (model, message) => __foldkitBrandViewResult((Message.matc
301
296
  UpdatedQuery: ({ value, maybeShownPage }) => __foldkitBrandViewResult((unlessPicking(followShown(model, maybeShownPage), (shown) => (__foldkitBrandViewResult(({
302
297
  model: updateQuery(shown, value),
303
298
  commands: [scrollPaletteToCursor(shown)],
304
- }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~17")))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#UpdatedQuery"),
305
- PressedArrowKey: ({ key, maybeShownPage, ...shown }) => __foldkitBrandViewResult((unlessPicking(followShown(model, maybeShownPage), (current) => __foldkitBrandViewResult((pressArrow(current, key, shown)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~18"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#PressedArrowKey"),
306
- PressedEarlyArrowKey: ({ key }) => __foldkitBrandViewResult((unlessPicking(model, (current) => __foldkitBrandViewResult((pendArrow(current, key)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~19"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#PressedEarlyArrowKey"),
299
+ }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~16")))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#UpdatedQuery"),
300
+ PressedArrowKey: ({ key, maybeShownPage, ...shown }) => __foldkitBrandViewResult((unlessPicking(followShown(model, maybeShownPage), (current) => __foldkitBrandViewResult((pressArrow(current, key, shown)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~17"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#PressedArrowKey"),
301
+ PressedEarlyArrowKey: ({ key }) => __foldkitBrandViewResult((unlessPicking(model, (current) => __foldkitBrandViewResult((pendArrow(current, key)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~18"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#PressedEarlyArrowKey"),
307
302
  CompletedReportPendingKeys: (report) => __foldkitBrandViewResult((settlePending(model, report)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#CompletedReportPendingKeys"),
308
- PressedEnter: ({ maybeShownPage, ...shown }) => __foldkitBrandViewResult((unlessPicking(followShown(model, maybeShownPage), (current) => __foldkitBrandViewResult((pressEnter(current, shown)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~20"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#PressedEnter"),
303
+ PressedEnter: ({ maybeShownPage, ...shown }) => __foldkitBrandViewResult((unlessPicking(followShown(model, maybeShownPage), (current) => __foldkitBrandViewResult((pressEnter(current, shown)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~19"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#PressedEnter"),
309
304
  PressedEarlyEnter: () => __foldkitBrandViewResult((unlessPicking(model, pendEnter)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#PressedEarlyEnter"),
310
305
  PressedBackspace: ({ maybeShownPage }) => __foldkitBrandViewResult((leavePage(followShown(model, maybeShownPage))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#PressedBackspace"),
311
- ClickedRow: ({ row, maybeShownPage }) => __foldkitBrandViewResult((unlessPicking(followShown(model, maybeShownPage), (current) => __foldkitBrandViewResult((runRow(current, row)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~21"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#ClickedRow"),
306
+ ClickedRow: ({ row, maybeShownPage }) => __foldkitBrandViewResult((unlessPicking(followShown(model, maybeShownPage), (current) => __foldkitBrandViewResult((runRow(current, row)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~20"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#ClickedRow"),
312
307
  ClickedBack: () => __foldkitBrandViewResult((leavePage(model)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#ClickedBack"),
313
308
  CompletedScrollToCursor: () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#CompletedScrollToCursor")),
314
309
  CompletedFocus: () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#CompletedFocus")),
@@ -337,21 +332,21 @@ const earlyKeySubscriptions = Subscription.make()((entry) => (__foldkitBrandView
337
332
  modelToDependencies: (model) => (__foldkitBrandViewResult(({
338
333
  maybeOpenId: isOpen(model) ? Option.some(id(model)) : Option.none(),
339
334
  }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#modelToDependencies")),
340
- dependenciesToStream: ({ maybeOpenId }) => __foldkitBrandViewResult((Option.match(maybeOpenId, { onNone: () => __foldkitBrandViewResult((Stream.empty), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~12"), onSome: earlyKeys })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#dependenciesToStream"),
335
+ dependenciesToStream: ({ maybeOpenId }) => __foldkitBrandViewResult((Option.match(maybeOpenId, { onNone: () => __foldkitBrandViewResult((Stream.empty), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~11"), onSome: earlyKeys })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#dependenciesToStream"),
341
336
  }),
342
- }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~22")));
337
+ }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~21")));
343
338
  /** While the palette is open, takes ↑ ↓ and Enter pressed before its field has focus (the
344
339
  * field's own are the view's), on the window, before the page's own key bindings see them,
345
340
  * so the keys pressed straight after the one that opened it are not lost. Lift it into the
346
341
  * application's Subscriptions, once per palette, with a key prefix of the parent's that no
347
342
  * other record on the page uses: `subscriptions("palette")` is keyed `paletteEarlyKeys`. */
348
343
  export const subscriptions = (keyPrefix) => __foldkitBrandViewResult((prefixKeys(keyPrefix, earlyKeySubscriptions)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#subscriptions");
349
- const pageOf = (commands, state) => __foldkitBrandViewResult((pipe(Array.findFirst(commands, (command) => __foldkitBrandViewResult((command.id === state.commandId), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~23")), Option.flatMap((command) => __foldkitBrandViewResult((Option.fromNullishOr(command.page)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~24")), Option.map((page) => (__foldkitBrandViewResult(({ commandId: state.commandId, page, state }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~25"))))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#pageOf");
350
- const firstListed = (rows, candidates) => __foldkitBrandViewResult((Array.findFirst(Array.getSomes(candidates), (cursorId) => __foldkitBrandViewResult((isListed(rows, cursorId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~26"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#firstListed");
351
- const firstId = (rows) => __foldkitBrandViewResult((Option.map(Array.head(rows), (row) => __foldkitBrandViewResult((row.id), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~27"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#firstId");
344
+ const pageOf = (commands, state) => __foldkitBrandViewResult((pipe(Array.findFirst(commands, (command) => __foldkitBrandViewResult((command.id === state.commandId), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~22")), Option.flatMap((command) => __foldkitBrandViewResult((Option.fromNullishOr(command.page)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~23")), Option.map((page) => (__foldkitBrandViewResult(({ page, state }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~24"))))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#pageOf");
345
+ const firstListed = (rows, candidates) => __foldkitBrandViewResult((Array.findFirst(Array.getSomes(candidates), (cursorId) => __foldkitBrandViewResult((isListed(rows, cursorId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~25"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#firstListed");
346
+ const firstId = (rows) => __foldkitBrandViewResult((Option.map(Array.head(rows), (row) => __foldkitBrandViewResult((row.id), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~26"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#firstId");
352
347
  const shifted = (shown, shift) => (__foldkitBrandViewResult(({
353
348
  ...shown,
354
- maybeCursorId: Option.map(rowAfter(shown.rows, shown.maybeCursorId, shift), (row) => __foldkitBrandViewResult((row.id), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~28")),
349
+ maybeCursorId: Option.map(rowAfter(shown.rows, shown.maybeCursorId, shift), (row) => __foldkitBrandViewResult((row.id), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~27")),
355
350
  }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#shifted"));
356
351
  // NOTE: arrows waiting for the view count from the cursor's row. When that row has left the
357
352
  // list (the application changed it in between), they are dropped rather than counted from
@@ -359,8 +354,8 @@ const shifted = (shown, shift) => (__foldkitBrandViewResult(({
359
354
  const shownOf = (model, commands) => {
360
355
  const unshifted = unshiftedOf(model, commands);
361
356
  const isAnchored = Option.match(maybeCurrentCursor(model), {
362
- onNone: () => __foldkitBrandViewResult((true), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~13"),
363
- onSome: (rowId) => __foldkitBrandViewResult((Option.contains(unshifted.maybeCursorId, rowId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~12"),
357
+ onNone: () => __foldkitBrandViewResult((true), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~12"),
358
+ onSome: (rowId) => __foldkitBrandViewResult((Option.contains(unshifted.maybeCursorId, rowId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~11"),
364
359
  });
365
360
  return __foldkitBrandViewResult((isAnchored ? shifted(unshifted, model.cursorShift) : unshifted), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#shownOf");
366
361
  };
@@ -370,7 +365,7 @@ const shownOf = (model, commands) => {
370
365
  // `start`, else its `current`, else the first row, these three only among the rows the query
371
366
  // finds; none when nothing is listed.
372
367
  const unshiftedOf = (model, commands) => {
373
- const maybePage = Option.flatMap(model.maybePage, (state) => __foldkitBrandViewResult((pageOf(commands, state)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~29"));
368
+ const maybePage = Option.flatMap(model.maybePage, (state) => __foldkitBrandViewResult((pageOf(commands, state)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~28"));
374
369
  return __foldkitBrandViewResult((Option.match(maybePage, {
375
370
  onNone: () => {
376
371
  const rows = findCommands(commands, model.query);
@@ -378,8 +373,8 @@ const unshiftedOf = (model, commands) => {
378
373
  maybePage,
379
374
  rows,
380
375
  contextIds: HashSet.empty(),
381
- maybeCursorId: pipe(Option.filter(model.maybeCursor, (rowId) => __foldkitBrandViewResult((isListed(rows, rowId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~30")), Option.orElse(() => __foldkitBrandViewResult((firstId(rows)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~31"))),
382
- }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~14");
376
+ maybeCursorId: pipe(Option.filter(model.maybeCursor, (rowId) => __foldkitBrandViewResult((isListed(rows, rowId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~29")), Option.orElse(() => __foldkitBrandViewResult((firstId(rows)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~30"))),
377
+ }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~13");
383
378
  },
384
379
  onSome: ({ page, state }) => {
385
380
  const { rows, found, contextIds } = pageChoices(page, state.query);
@@ -387,11 +382,11 @@ const unshiftedOf = (model, commands) => {
387
382
  maybePage,
388
383
  rows,
389
384
  contextIds,
390
- maybeCursorId: pipe(Option.filter(state.maybeCursor, (rowId) => __foldkitBrandViewResult((isListed(rows, rowId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~32")), Option.orElse(() => __foldkitBrandViewResult((firstListed(found, [
385
+ maybeCursorId: pipe(Option.filter(state.maybeCursor, (rowId) => __foldkitBrandViewResult((isListed(rows, rowId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~31")), Option.orElse(() => __foldkitBrandViewResult((firstListed(found, [
391
386
  Option.fromNullishOr(page.start),
392
387
  Option.fromNullishOr(page.current),
393
- ])), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~33")), Option.orElse(() => __foldkitBrandViewResult((firstId(found)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~34"))),
394
- }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~13");
388
+ ])), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~32")), Option.orElse(() => __foldkitBrandViewResult((firstId(found)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~33"))),
389
+ }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~12");
395
390
  },
396
391
  })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#unshiftedOf");
397
392
  };
@@ -403,7 +398,7 @@ const unshiftedOf = (model, commands) => {
403
398
  * it, and the list its scroll. */
404
399
  export const maybeCursorId = (model, commands) => __foldkitBrandViewResult((shownOf(model, commands).maybeCursorId), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#maybeCursorId");
405
400
  const isCommand = (row) => __foldkitBrandViewResult(("group" in row), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#isCommand");
406
- const isCurrentRow = (shown, row) => __foldkitBrandViewResult((Option.exists(shown.maybePage, ({ page }) => __foldkitBrandViewResult((page.current === row.id), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~35"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#isCurrentRow");
401
+ const isCurrentRow = (shown, row) => __foldkitBrandViewResult((Option.exists(shown.maybePage, ({ page }) => __foldkitBrandViewResult((page.current === row.id), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~34"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#isCurrentRow");
407
402
  const isContextRow = (shown, row) => __foldkitBrandViewResult((HashSet.has(shown.contextIds, row.id)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#isContextRow");
408
403
  const levelOf = (row) => __foldkitBrandViewResult(("level" in row ? Option.fromNullishOr(row.level) : Option.none()), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#levelOf");
409
404
  // What a row is as this render shows it, which Enter acts on as a click would.
@@ -414,16 +409,16 @@ const shownRowFor = (shown, row) => (__foldkitBrandViewResult(({
414
409
  }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#shownRowFor"));
415
410
  // The query the shown rows were found by: the open page's, or the commands' when the view
416
411
  // shows them (also for a page whose command left).
417
- const shownQueryOf = (model, shown) => __foldkitBrandViewResult((Option.match(shown.maybePage, { onNone: () => __foldkitBrandViewResult((model.query), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~15"), onSome: ({ state }) => __foldkitBrandViewResult((state.query), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~14") })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#shownQueryOf");
412
+ const shownQueryOf = (model, shown) => __foldkitBrandViewResult((Option.match(shown.maybePage, { onNone: () => __foldkitBrandViewResult((model.query), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~14"), onSome: ({ state }) => __foldkitBrandViewResult((state.query), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~13") })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#shownQueryOf");
418
413
  // The command whose page the view shows.
419
- const shownPageIdOf = (shown) => __foldkitBrandViewResult((Option.map(shown.maybePage, ({ commandId }) => __foldkitBrandViewResult((commandId), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~36"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#shownPageIdOf");
414
+ const shownPageIdOf = (shown) => __foldkitBrandViewResult((Option.map(shown.maybePage, ({ state }) => __foldkitBrandViewResult((state.commandId), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~35"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#shownPageIdOf");
420
415
  // NOTE: the field's keys that act on the rows are taken here, where the rows are known, as a
421
416
  // Mount on the document cannot know them: ↑, ↓ and Enter carry what this render shows (see
422
417
  // `Model`), and each is taken from the field (its default prevented). A modified key and every
423
418
  // key while a pick is out are left to the field.
424
419
  const fieldKeyDown = (model, shown) => __foldkitBrandViewResult(((key, modifiers) => {
425
420
  const list = {
426
- rows: Array.map(shown.rows, (row) => __foldkitBrandViewResult((shownRowFor(shown, row)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~38")),
421
+ rows: Array.map(shown.rows, (row) => __foldkitBrandViewResult((shownRowFor(shown, row)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~37")),
427
422
  maybeShownCursor: shown.maybeCursorId,
428
423
  maybeShownPage: shownPageIdOf(shown),
429
424
  shownQuery: shownQueryOf(model, shown),
@@ -431,7 +426,7 @@ const fieldKeyDown = (model, shown) => __foldkitBrandViewResult(((key, modifiers
431
426
  };
432
427
  return __foldkitBrandViewResult((isPicking(model) || !isPlain(modifiers)
433
428
  ? Option.none()
434
- : Match.value(key).pipe(Match.withReturnType(), Match.whenOr("ArrowDown", "ArrowUp", (arrow) => __foldkitBrandViewResult((Option.some(Message.PressedArrowKey({ key: arrow, ...list }))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~39")), Match.when("Enter", () => __foldkitBrandViewResult((Option.some(Message.PressedEnter(list))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~40")), Match.orElse(() => __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~41")))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~37");
429
+ : Match.value(key).pipe(Match.withReturnType(), Match.whenOr("ArrowDown", "ArrowUp", (arrow) => __foldkitBrandViewResult((Option.some(Message.PressedArrowKey({ key: arrow, ...list }))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~38")), Match.when("Enter", () => __foldkitBrandViewResult((Option.some(Message.PressedEnter(list))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~39")), Match.orElse(() => __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~40")))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~36");
435
430
  }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#fieldKeyDown");
436
431
  const optionId = (paletteId, index) => __foldkitBrandViewResult((`${paletteId}-option-${index}`), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#optionId");
437
432
  const NOTHING_FOUND = "nothing matches · try fewer letters";
@@ -473,8 +468,8 @@ const rowView = (model, shown, row, index, h) => {
473
468
  ...(isContextRow(shown, row) ? ["context"] : []),
474
469
  ], " ")),
475
470
  ...Option.match(levelOf(row), {
476
- onNone: () => __foldkitBrandViewResult(([]), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~16"),
477
- onSome: (level) => __foldkitBrandViewResult(([h.Style({ "--palette-level": `${level}` })]), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~15"),
471
+ onNone: () => __foldkitBrandViewResult(([]), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~15"),
472
+ onSome: (level) => __foldkitBrandViewResult(([h.Style({ "--palette-level": `${level}` })]), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~14"),
478
473
  }),
479
474
  ...(shownRow.isHeld || isPicking(model)
480
475
  ? []
@@ -482,34 +477,34 @@ const rowView = (model, shown, row, index, h) => {
482
477
  ], rowPartsView(model, shown, row, h))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#rowView");
483
478
  };
484
479
  const groupedRows = (model, shown, h) => {
485
- const indexed = Array.map(shown.rows, (row, index) => (__foldkitBrandViewResult(({ row, index }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~42")));
480
+ const indexed = Array.map(shown.rows, (row, index) => (__foldkitBrandViewResult(({ row, index }), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~41")));
486
481
  return __foldkitBrandViewResult((Option.match(shown.maybePage, {
487
- onSome: () => __foldkitBrandViewResult((Array.map(indexed, ({ row, index }) => __foldkitBrandViewResult((rowView(model, shown, row, index, h)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~43"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~16"),
482
+ onSome: () => __foldkitBrandViewResult((Array.map(indexed, ({ row, index }) => __foldkitBrandViewResult((rowView(model, shown, row, index, h)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~42"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~15"),
488
483
  onNone: () => {
489
- const groups = Array.dedupe(Array.map(shown.rows, (row) => (__foldkitBrandViewResult((isCommand(row) ? row.group : ""), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~44"))));
484
+ const groups = Array.dedupe(Array.map(shown.rows, (row) => (__foldkitBrandViewResult((isCommand(row) ? row.group : ""), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~43"))));
490
485
  return __foldkitBrandViewResult((Array.map(groups, (group, groupIndex) => {
491
486
  const headingId = `${id(model)}-group-${groupIndex}`;
492
487
  return __foldkitBrandViewResult((h.keyed("div")(`group-${group}`, [h.Role("group"), h.AriaLabelledBy(headingId)], [
493
488
  h.div([h.Id(headingId), h.Role("presentation"), h.Class("palette-group")], [group]),
494
- ...Array.map(Array.filter(indexed, ({ row }) => __foldkitBrandViewResult((isCommand(row) && row.group === group), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~46")), ({ row, index }) => __foldkitBrandViewResult((rowView(model, shown, row, index, h)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~47")),
495
- ])), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~45");
496
- })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~17");
489
+ ...Array.map(Array.filter(indexed, ({ row }) => __foldkitBrandViewResult((isCommand(row) && row.group === group), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~45")), ({ row, index }) => __foldkitBrandViewResult((rowView(model, shown, row, index, h)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~46")),
490
+ ])), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~44");
491
+ })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~16");
497
492
  },
498
493
  })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#groupedRows");
499
494
  };
500
495
  const comboboxAttributes = (model, shown, noun, h) => {
501
496
  const paletteId = id(model);
502
- const maybeCursorIndex = Option.flatMap(shown.maybeCursorId, (cursorId) => __foldkitBrandViewResult((Array.findFirstIndex(shown.rows, (row) => __foldkitBrandViewResult((row.id === cursorId), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~49"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~48"));
497
+ const maybeCursorIndex = Option.flatMap(shown.maybeCursorId, (cursorId) => __foldkitBrandViewResult((Array.findFirstIndex(shown.rows, (row) => __foldkitBrandViewResult((row.id === cursorId), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~48"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~47"));
503
498
  return __foldkitBrandViewResult(([
504
499
  h.OnKeyDownPreventDefault(fieldKeyDown(model, shown)),
505
500
  h.Role("combobox"),
506
501
  h.AriaExpanded(true),
507
502
  h.AriaControls(listIdOf(paletteId)),
508
503
  h.AriaAutocomplete("list"),
509
- ...Option.toArray(Option.map(maybeCursorIndex, (index) => __foldkitBrandViewResult((h.AriaActiveDescendant(optionId(paletteId, index))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~50"))),
504
+ ...Option.toArray(Option.map(maybeCursorIndex, (index) => __foldkitBrandViewResult((h.AriaActiveDescendant(optionId(paletteId, index))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~49"))),
510
505
  h.AriaLabel(Option.match(shown.maybePage, {
511
- onNone: () => __foldkitBrandViewResult((`Command or ${noun}`), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~18"),
512
- onSome: ({ page }) => __foldkitBrandViewResult((page.title), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~17"),
506
+ onNone: () => __foldkitBrandViewResult((`Command or ${noun}`), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~17"),
507
+ onSome: ({ page }) => __foldkitBrandViewResult((page.title), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~16"),
513
508
  })),
514
509
  h.Autocomplete("off"),
515
510
  h.DataAttribute(FIELD_ATTRIBUTE, ""),
@@ -523,8 +518,8 @@ const fieldView = (model, shown, noun, render, h) => {
523
518
  onInput: (value) => __foldkitBrandViewResult((Message.UpdatedQuery({ value, maybeShownPage })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onInput"),
524
519
  isReadOnly: isPicking(model),
525
520
  placeholder: Option.match(shown.maybePage, {
526
- onNone: () => __foldkitBrandViewResult((`type a command or a ${noun}`), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~19"),
527
- onSome: ({ page }) => __foldkitBrandViewResult((page.find ?? "type to narrow"), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~18"),
521
+ onNone: () => __foldkitBrandViewResult((`type a command or a ${noun}`), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~18"),
522
+ onSome: ({ page }) => __foldkitBrandViewResult((page.find ?? "type to narrow"), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~17"),
528
523
  }),
529
524
  toView: (groups) => __foldkitBrandViewResult((h.input([
530
525
  ...render.initialFocus,
@@ -540,17 +535,17 @@ const headView = (model, shown, scope, field, h) => __foldkitBrandViewResult((h.
540
535
  isQuiet: true,
541
536
  isDisabled: isPicking(model),
542
537
  onClick: Message.ClickedBack(),
543
- }, h)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~51"))),
538
+ }, h)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~50"))),
544
539
  h.span([h.Class("palette-scope")], [scope]),
545
- ...Option.toArray(Option.map(shown.maybePage, ({ page }) => __foldkitBrandViewResult((h.span([h.Class("palette-title")], [page.title])), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~52"))),
540
+ ...Option.toArray(Option.map(shown.maybePage, ({ page }) => __foldkitBrandViewResult((h.span([h.Class("palette-title")], [page.title])), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~51"))),
546
541
  field,
547
542
  ])), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#headView");
548
543
  const listView = (model, shown, h) => __foldkitBrandViewResult((h.div([
549
544
  h.Id(listIdOf(id(model))),
550
545
  h.Role("listbox"),
551
546
  h.AriaLabel(Option.match(shown.maybePage, {
552
- onNone: () => __foldkitBrandViewResult(("Results"), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~20"),
553
- onSome: ({ page }) => __foldkitBrandViewResult((page.title), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~19"),
547
+ onNone: () => __foldkitBrandViewResult(("Results"), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~19"),
548
+ onSome: ({ page }) => __foldkitBrandViewResult((page.title), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~18"),
554
549
  })),
555
550
  ...(isPicking(model) ? [h.AriaBusy(true)] : []),
556
551
  h.Class("palette-list"),
@@ -568,10 +563,10 @@ const countView = (model, shown, h) => {
568
563
  : [countWords(shown.rows.length - HashSet.size(shown.contextIds))])), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#countView");
569
564
  };
570
565
  const cardView = (model, viewInputs, render, h) => {
571
- const { commands, scope = "commands", noun = "title", toDetailView = () => __foldkitBrandViewResult(([]), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~53") } = viewInputs;
566
+ const { commands, scope = "commands", noun = "title", toDetailView = () => __foldkitBrandViewResult(([]), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~52") } = viewInputs;
572
567
  const shown = shownOf(model, commands);
573
568
  return __foldkitBrandViewResult((h.div([
574
- ...Option.toArray(Option.map(shownPageIdOf(shown), (commandId) => __foldkitBrandViewResult((h.DataAttribute(PAGE_ATTRIBUTE, commandId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~54"))),
569
+ ...Option.toArray(Option.map(shownPageIdOf(shown), (commandId) => __foldkitBrandViewResult((h.DataAttribute(PAGE_ATTRIBUTE, commandId)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~53"))),
575
570
  h.OnMount(BindPaletteKeys()),
576
571
  h.Class("card palette"),
577
572
  ], [
@@ -579,7 +574,7 @@ const cardView = (model, viewInputs, render, h) => {
579
574
  ...slotView("div", "palette-detail", toDetailView(), h),
580
575
  listView(model, shown, h),
581
576
  countView(model, shown, h),
582
- h.div([h.Class("palette-more")], [Option.match(shown.maybePage, { onNone: () => __foldkitBrandViewResult((COMMANDS_FOOT), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~21"), onSome: () => __foldkitBrandViewResult((PAGE_FOOT), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~20") })]),
577
+ h.div([h.Class("palette-more")], [Option.match(shown.maybePage, { onNone: () => __foldkitBrandViewResult((COMMANDS_FOOT), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onNone~20"), onSome: () => __foldkitBrandViewResult((PAGE_FOOT), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#onSome~19") })]),
583
578
  ])), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#cardView");
584
579
  };
585
580
  /**
@@ -613,4 +608,4 @@ export const view = defineView((model, viewInputs, h) => __foldkitBrandViewResul
613
608
  toView: (render) => __foldkitBrandViewResult((cardView(model, viewInputs, render, h)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#toView~2"),
614
609
  },
615
610
  toParentMessage: (message) => __foldkitBrandViewResult((Message.GotDialogMessage({ message })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#toParentMessage~2"),
616
- })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~55"));
611
+ })), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/commandPalette.js#anonymous~54"));
@@ -12,8 +12,8 @@ export declare const PAGE_ATTRIBUTE = "pixel-paper-palette-page";
12
12
  export declare const shownPageOf: (element: Element) => Option.Option<string>;
13
13
  /** What a Backspace in the palette's field does: in an empty field on a page it goes back.
14
14
  * It reads the field as it is at the press, which a render cannot know. A key from elsewhere,
15
- * a key an IME is composing, a modified key, a key someone already handled, and every key
16
- * while a pick is out are left alone. */
15
+ * a key an IME is composing, a modified key and a key someone already handled are left
16
+ * alone; while a pick is out the update refuses it. */
17
17
  export declare const fieldKey: (root: Element, event: KeyboardEvent) => Option.Option<typeof Message.PressedBackspace.Type>;
18
18
  /** Keeps a key an IME is composing from the field's own key handler (the view's, which is
19
19
  * given a key's name and modifiers only), so the IME's arrows and its Enter stay the IME's.
@@ -1 +1 @@
1
- {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../src/commandPalette/keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE/C,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAGvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,mCAAmC;AACnC,eAAO,MAAM,eAAe,sBAAoB,CAAC;AAEjD,4EAA4E;AAC5E,eAAO,MAAM,eAAe,8BAA8B,CAAC;AAE3D,+EAA+E;AAC/E,eAAO,MAAM,cAAc,6BAA6B,CAAC;AAEzD;gBACgB;AAChB,eAAO,MAAM,WAAW,YAAa,OAAO,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CACG,CAAC;AAKvE;;;0CAG0C;AAC1C,eAAO,MAAM,QAAQ,SACb,OAAO,SACN,aAAa,KACnB,MAAM,CAAC,MAAM,CAAC,OAAO,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAgBpD,CAAC;AAEF;;2DAE2D;AAC3D,eAAO,MAAM,YAAY,UAAW,aAAa,KAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAKtE,CAAC;AAEF;6DAC6D;AAC7D,eAAO,MAAM,QAAQ,UAAW,UAAU,KAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAK/D,CAAC;AAEF;;;;;uCAKuC;AACvC,eAAO,MAAM,eAAe;;;EAwB1B,CAAC;AAEH,KAAK,eAAe,GAChB,OAAO,OAAO,CAAC,oBAAoB,CAAC,IAAI,GACxC,OAAO,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC;AAE1C;;;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1C;;;;kFAIkF;AAClF,eAAO,MAAM,QAAQ,cACR,MAAM,SACV,aAAa,KACnB,MAAM,CAAC,MAAM,CAAC,eAAe,CAsB/B,CAAC;AAEF;6CAC6C;AAC7C,eAAO,MAAM,SAAS,cAAe,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAM/D,CAAC"}
@@ -16,18 +16,16 @@ export const shownPageOf = (element) => __foldkitBrandViewResult((Option.fromNul
16
16
  const isEmptyFieldOnPage = (root, field) => __foldkitBrandViewResult((field instanceof HTMLInputElement && field.value === "" && Option.isSome(shownPageOf(root))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/keys.js#isEmptyFieldOnPage");
17
17
  /** What a Backspace in the palette's field does: in an empty field on a page it goes back.
18
18
  * It reads the field as it is at the press, which a render cannot know. A key from elsewhere,
19
- * a key an IME is composing, a modified key, a key someone already handled, and every key
20
- * while a pick is out are left alone. */
19
+ * a key an IME is composing, a modified key and a key someone already handled are left
20
+ * alone; while a pick is out the update refuses it. */
21
21
  export const fieldKey = (root, event) => {
22
22
  const field = root.querySelector(`[data-${FIELD_ATTRIBUTE}]`);
23
- const isWaiting = root.querySelector('[aria-busy="true"]') !== null;
24
23
  if (field === null ||
25
24
  event.target !== field ||
26
25
  event.key !== "Backspace" ||
27
26
  event.isComposing ||
28
27
  event.defaultPrevented ||
29
28
  !isPlain(event) ||
30
- isWaiting ||
31
29
  !isEmptyFieldOnPage(root, field)) {
32
30
  return __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/keys.js#fieldKey");
33
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../src/commandPalette/match.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,OAAO,EAA+B,MAAM,QAAQ,CAAC;AAErE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAIpD,gEAAgE;AAChE,MAAM,MAAM,MAAM,GAAG,QAAQ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,MAAM,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC;AASvF,sFAAsF;AACtF,eAAO,MAAM,OAAO,UAAW,MAAM,SAAS,MAAM,KAAG,OAGtD,CAAC;AAIF;+EAC+E;AAC/E,eAAO,MAAM,YAAY,aACb,aAAa,CAAC,OAAO,CAAC,SACzB,MAAM,KACZ,aAAa,CAAC,OAAO,CAevB,CAAC;AAEF,wCAAwC;AACxC,eAAO,MAAM,WAAW,SAAU,IAAI,SAAS,MAAM,KAAG,aAAa,CAAC,MAAM,CAGF,CAAC;AAM3E;;4CAE4C;AAC5C,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5B,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7B,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;CACrC,CAAC,CAAC;AA2BH,eAAO,MAAM,WAAW,SAAU,IAAI,SAAS,MAAM,KAAG,WACM,CAAC"}
@@ -7,10 +7,11 @@ export const matches = (query, label) => {
7
7
  const needle = pipe(query, String.trim, String.toLowerCase);
8
8
  return __foldkitBrandViewResult((isSubsequence(needle, String.toLowerCase(label))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/match.js#matches");
9
9
  };
10
+ const isBlank = (query) => __foldkitBrandViewResult((String.isEmpty(String.trim(query))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/match.js#isBlank");
10
11
  /** The commands the query finds, under their groups in the order the groups first appear,
11
12
  * authored titles after the commands. With no query, authored titles wait. */
12
13
  export const findCommands = (commands, query) => {
13
- const hits = String.isEmpty(String.trim(query))
14
+ const hits = isBlank(query)
14
15
  ? Array.filter(commands, (command) => __foldkitBrandViewResult((command.isAuthored !== true), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/match.js#anonymous~2"))
15
16
  : Array.filter(commands, (command) => __foldkitBrandViewResult((matches(query, command.label)), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/match.js#anonymous~3"));
16
17
  const ordered = [
@@ -21,7 +22,6 @@ export const findCommands = (commands, query) => {
21
22
  const groupIndex = (command) => __foldkitBrandViewResult((Option.getOrElse(Array.findFirstIndex(groups, (group) => __foldkitBrandViewResult((group === command.group), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/match.js#anonymous~7")), () => __foldkitBrandViewResult((groups.length), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/match.js#anonymous~8"))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/match.js#groupIndex");
22
23
  return __foldkitBrandViewResult((Array.sort(ordered, Order.mapInput(Order.Number, groupIndex))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/match.js#findCommands");
23
24
  };
24
- const isBlank = (query) => __foldkitBrandViewResult((String.isEmpty(String.trim(query))), "@gjermundgaraba-designs/pixel-paper/src/commandPalette/match.js#isBlank");
25
25
  /** The choices a page's query finds. */
26
26
  export const findChoices = (page, query) => __foldkitBrandViewResult((isBlank(query)
27
27
  ? page.choices
@@ -1 +1 @@
1
- {"version":3,"file":"confirmDialog.d.ts","sourceRoot":"","sources":["../../../src/confirmDialog/confirmDialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAQ,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,IAAI,EAAe,MAAM,cAAc,CAAC;AAItD,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAIzC,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAM9C,uEAAuE;AACvE,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;EAEhB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAC;AAItC,0DAA0D;AAC1D,eAAO,MAAM,OAAO;;QACE,OAAO;;;;;;;;;;;;;;;;;;;;;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AAM,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IAClD,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;qDAGiD;IACjD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;wDAEoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;0CACsC;IACtC,gBAAgB,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CAC7C,CAAC,CAAC;AAwDH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAjGf,qDAAqD;WAC9C,MAAM;IACb,6FAA6F;cACnF,MAAM;IAChB;;uCAEmC;UAC7B,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC;IAClC;;oBAEgB;mBACD,MAAM,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC;IACjD,iDAAiD;WAC1C,MAAM;IACb,mFAAmF;eACxE,OAAO;IAClB;;;qDAGiD;aACxC,OAAO;IAChB;;wDAEoD;iBACvC,OAAO;IACpB;0CACsC;uBACnB,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS;GAmF5C,CAAC"}
@@ -44,10 +44,9 @@ const dialogFold = foldDialog(Dialog, {
44
44
  toParentMessage: (message) => __foldkitBrandViewResult((Message.GotDialogMessage({ message })), "@gjermundgaraba-designs/pixel-paper/src/confirmDialog/confirmDialog.js#toParentMessage"),
45
45
  toParentOutMessage: toCancelled,
46
46
  });
47
- const FREE = { isCloseHeld: false };
48
47
  /** Processes a confirm dialog Message and returns the next Model, Commands and OutMessage.
49
48
  * While `context.isCloseHeld`, cancel, Escape and the veil change nothing. */
50
- export const update = (model, message, context = FREE) => __foldkitBrandViewResult((Message.match(message, {
49
+ export const update = (model, message, context = Dialog.FREE) => __foldkitBrandViewResult((Message.match(message, {
51
50
  GotDialogMessage: ({ message: dialogMessage }) => __foldkitBrandViewResult((dialogFold.updateWith(context)(model, dialogMessage)), "@gjermundgaraba-designs/pixel-paper/src/confirmDialog/confirmDialog.js#GotDialogMessage"),
52
51
  ClickedConfirm: () => (__foldkitBrandViewResult(({ model, outMessage: OutMessage.Confirmed() }), "@gjermundgaraba-designs/pixel-paper/src/confirmDialog/confirmDialog.js#ClickedConfirm")),
53
52
  ClickedCancel: () => __foldkitBrandViewResult((context.isCloseHeld
@@ -2,7 +2,6 @@ import { Clipboard } from "@effect/platform-browser";
2
2
  import { Effect, Schema } from "effect";
3
3
  import * as Command from "foldkit/command";
4
4
  import type * as Update from "foldkit/update";
5
- import type { Attributes } from "../attributes/attributes.ts";
6
5
  /** Where a copy is: nothing yet, writing to the clipboard, or just copied (the word or the
7
6
  * check shows for a beat). A click counts only from `Idle`, so one beat ends at a time. */
8
7
  export declare const CopyState: import("foldkit/schema").TaggedUnion<{
@@ -102,8 +101,6 @@ export type ViewInputs = Readonly<{
102
101
  * word (`"copy"`). */
103
102
  label: string;
104
103
  variant?: Variant;
105
- /** Further attributes for the `<button>`, never a class. */
106
- attributes?: Attributes<Message>;
107
104
  }>;
108
105
  /**
109
106
  * Copies text to the clipboard and says so, on the button and to screen readers. As a glyph
@@ -139,7 +136,5 @@ export declare const view: import("foldkit/submodel").View<{
139
136
  * word (`"copy"`). */
140
137
  label: string;
141
138
  variant?: Variant;
142
- /** Further attributes for the `<button>`, never a class. */
143
- attributes?: Attributes<Message>;
144
139
  }>>;
145
140
  //# sourceMappingURL=copyButton.d.ts.map