@gjermundgaraba-designs/pixel-paper 0.14.0 → 0.14.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.
package/DESIGN.md CHANGED
@@ -1055,9 +1055,9 @@ The printed button: a paper rectangle in a 2px ink frame that casts a 3px shadow
1055
1055
 
1056
1056
  ### Cards (dialogs)
1057
1057
 
1058
- **Dialog** is a Submodel over `@foldkit/ui`'s Dialog: a `<dialog class="veil">` that fills the viewport, opened with `show()` in place rather than `showModal()` in the top layer. That is a deliberate exception to the baseline's "prefer the platform" for overlays: Foldkit's Dialog (through `Dom.showDialog`) makes everything outside the dialog `inert` and `aria-hidden`, traps focus, handles Escape on the topmost dialog and returns focus on close, so the platform's modal behaviour is reproduced, not dropped; what is lost is the top layer and its `::backdrop`. The veil is therefore an element of its own, `div.veil-backdrop` (fixed, Veil with the ink checker grain, entering in 3 steps over 0.12s), under `div.veil-pad` (`.top` for the palette), which lets a press through everywhere but on the card it holds; a press on the veil, Escape, or a control given the `closeButton` group closes it and reports `Closed`. While its work must land in it (a save whose failure the reader has to see), the update that starts the work holds those three in the dialog's Model (`Dialog.setCloseHeld`), so its update leaves them out, however soon after the start they come: it stays open and reports no `Closed`. The update where the work fails lets go (`Dialog.setCloseHeld(model, false)`), or the reader is shut in with the failure; `Dialog.close` closes it and lets go of the hold. Opening and closing are the parent's, through `Dialog.open` and `Dialog.close` in its update, and a step the parent asked for reports nothing; `Dialog.foldDialog` lifts a dialog the parent always holds (its update, `open` and `close`) into the parent at once, `Closed` reported only where the parent maps it. The content is the parent's `toView`, which receives the attribute groups to spread (`title`, `description`, `initialFocus`, `closeButton`, `actionBar`). Focus starts on the element given the `initialFocus` group, else the first control. The Card inside names the dialog through its title (the `title` group, `aria-labelledby`); a dialog without a heading takes `label`, printed for screen readers only. `isAlert` makes it an `alertdialog`, and `hasDescription` points `aria-describedby` at the element given the `description` group. Because the page outside is inert and hidden, anything that must be heard or reached while it is open renders inside it: the topmost open dialog hosts the page's live region and the toast stack, both outside the card, through its `toLiveRegionView` (see Building components).
1058
+ **Dialog** is a Submodel over `@foldkit/ui`'s Dialog: a `<dialog class="veil">` that fills the viewport, opened with `show()` in place rather than `showModal()` in the top layer. That is a deliberate exception to the baseline's "prefer the platform" for overlays: Foldkit's Dialog (through `Dom.showDialog`) makes everything outside the dialog `inert` and `aria-hidden`, traps focus, handles Escape on the topmost dialog and returns focus on close, so the platform's modal behaviour is reproduced, not dropped; what is lost is the top layer and its `::backdrop`. The veil is therefore an element of its own, `div.veil-backdrop` (fixed, Veil with the ink checker grain, entering in 3 steps over 0.12s), under `div.veil-pad` (`.top` for the palette), which lets a press through everywhere but on the card it holds; a press on the veil, Escape, or a control given the `closeButton` group closes it and reports `Closed`. While its work must land in it (a save whose failure the reader has to see), the update that starts the work holds those three in the dialog's Model (`Dialog.setCloseHeld`), so its update leaves them out, however soon after the start they come: it stays open and reports no `Closed`. The update where the work fails lets go (`Dialog.setCloseHeld(model, false)`), or the reader is shut in with the failure; `Dialog.close` closes it and lets go of the hold, and `Dialog.open` opens it free. Opening and closing are the parent's, through `Dialog.open` and `Dialog.close` in its update, and a step the parent asked for reports nothing; `Dialog.foldDialog` lifts a dialog the parent always holds (its update, `open` and `close`) into the parent at once, `Closed` reported only where the parent maps it. The content is the parent's `toView`, which receives the attribute groups to spread (`title`, `description`, `initialFocus`, `closeButton`, `actionBar`). Focus starts on the element given the `initialFocus` group, else the first control. The Card inside names the dialog through its title (the `title` group, `aria-labelledby`); a dialog without a heading takes `label`, printed for screen readers only. `isAlert` makes it an `alertdialog`, and `hasDescription` points `aria-describedby` at the element given the `description` group. Because the page outside is inert and hidden, anything that must be heard or reached while it is open renders inside it: the topmost open dialog hosts the page's live region and the toast stack, both outside the card, through its `toLiveRegionView` (see Building components).
1059
1059
 
1060
- **Card** → `div.card` (`.narrow`; `form.card` from `Card.formView`, named by its title (`aria-label`), so a form landmark; no role of its own, the Dialog around it is the dialog): a paper panel with the card shadow, `min(680px, 100%)` (440px narrow), entering in 3 steps over 0.14s from `scale(0.97)`. An inverted title bar `header.card-tb` (`6px 8px 6px 12px`, 13px uppercase 0.06em (`--tracking-head`), a close IconButton when it has `closeAttributes`, held by `Card.formView`'s `isBusy` while work the reader may not walk away from runs: `aria-disabled`, in the keyboard, its `closeAttributes` and so its handler dropped, faded to 0.6 on the bar, as a held button in a panel's title bar), a scrolling `div.card-body` (16px, 14px gap; a word longer than the card, a path or an id, breaks rather than widening it), and `div.card-actions` (`12px 16px`) over a 2px ink rule: `lead` first, then `span.card-acts` holding the actions at the right, which drop below the lead together when the bar wraps. Inside a Dialog, where the page's keys wait, the bar moves focus between its actions: `h` or ← to the one before, `l` or → to the one after, in the order they print, stopping at the ends, never pressing one (Enter, Space and Tab stay the browser's). The keys are bound by a Mount on the bar (`BindActionKeys`), which reads the real key event: only a key whose target is one of that bar's own buttons or links, unmodified, outside an IME and not already handled, and only when there is an action that way, moves focus and has its default prevented. A field, the title bar's close, a menu's items and a nested dialog's bar keep their keys. A disabled action is passed over; an `aria-disabled` one (held: busy, done or disabled) is still a stop and still ignores presses. **Card.formView** is the one way to make a form card: its `body` in one Fields group, then the action bar's cancel (`cancel`, closing through `closeAttributes`) and the primary default submit button (`submit`, its id `Card.submitId(id)`). One flag, `isBusy`, holds every way the form could change or leave while its work runs: the submit button prints busy and turns `type="button"`, the close glyph and cancel are held with their close attributes dropped, and the Fields group is natively disabled and `aria-busy`, so nothing changes under the send and nothing sends twice. In a Dialog, the update that sends also holds the Dialog's ways out (`Dialog.setCloseHeld`), Escape and the veil among them, and the update where the send fails lets go of both, the reason on the field (the specimen's rename refuses a name with a slash). `isSubmitDisabled` holds the submit button alone while there is nothing to send (a name unchanged), the fields and cancel live. The fields leave the keyboard as they are held, so the update moves focus to the submit button as it sends (`Focus.Focus({ id: Card.submitId(id) })`), and it still ignores `onSubmit` while busy, for an Enter that raced the render. A ConfirmDialog with `isDanger` still opens on cancel.
1060
+ **Card** → `div.card` (`.narrow`; `form.card` from `Card.formView`, named by its title (`aria-label`), so a form landmark; no role of its own, the Dialog around it is the dialog): a paper panel with the card shadow, `min(680px, 100%)` (440px narrow), entering in 3 steps over 0.14s from `scale(0.97)`. An inverted title bar `header.card-tb` (`6px 8px 6px 12px`, 13px uppercase 0.06em (`--tracking-head`), a close IconButton when it has `closeAttributes`, held by `Card.formView`'s `isBusy` while work the reader may not walk away from runs: `aria-disabled`, in the keyboard, its `closeAttributes` and so its handler dropped, faded to 0.6 on the bar, as a held button in a panel's title bar), a scrolling `div.card-body` (16px, 14px gap; a word longer than the card, a path or an id, breaks rather than widening it), and `div.card-actions` (`12px 16px`) over a 2px ink rule: `lead` first, then `span.card-acts` holding the actions at the right, which drop below the lead together when the bar wraps. Inside a Dialog, where the page's keys wait, the bar moves focus between its actions: `h` or ← to the one before, `l` or → to the one after, in the order they print, stopping at the ends, never pressing one (Enter, Space and Tab stay the browser's). The keys are bound by a Mount on the bar (`BindActionKeys`), which reads the real key event: only a key whose target is one of that bar's own buttons or links, unmodified, outside an IME and not already handled, and only when there is an action that way, moves focus and has its default prevented. A field, the title bar's close, a menu's items and a nested dialog's bar keep their keys. A disabled action is passed over; an `aria-disabled` one (held: busy, done or disabled) is still a stop and still ignores presses. **Card.formView** is the one way to make a form card: its `body` in one Fields group, then the action bar's `lead` (a form's own delete, before the push), cancel (`cancel`, closing through `closeAttributes`) and the primary default submit button (`submit`, its id `Card.submitId(id)`). One flag, `isBusy`, holds every way the form could change or leave while its work runs: the submit button prints busy and turns `type="button"`, the close glyph and cancel are held with their close attributes dropped, and the Fields group is natively disabled and `aria-busy`, so nothing changes under the send and nothing sends twice. In a Dialog, the update that sends also holds the Dialog's ways out (`Dialog.setCloseHeld`), Escape and the veil among them, and the update where the send fails lets go of both, the reason on the field (the specimen's rename refuses a name with a slash). `isSubmitDisabled` holds the submit button alone while there is nothing to send (a name unchanged), the fields and cancel live. The fields leave the keyboard as they are held, so the update moves focus to the submit button as it sends (`Focus.Focus({ id: Card.submitId(id) })`), and it still ignores `onSubmit` while busy, for an Enter that raced the render. A ConfirmDialog with `isDanger` still opens on cancel.
1061
1061
 
1062
1062
  - **ConfirmDialog** → a Submodel over Dialog (an `alertdialog` when `isDanger`, a `dialog` otherwise) holding a narrow Card whose body is an Outcome (warn, or error when `isDanger`), the Outcome's body describing the dialog. Its view inputs follow the system's words: `title` (the title bar), `question` (the Outcome's title), `body`, and `label` (the confirming button's word). Without `isDanger` the confirm is primary and default; with it the confirm is the red button and cancel is the default, where focus starts. `Confirmed` does not close it: work that takes a while stays in the dialog. `isBusy` holds the confirming button (its word, the working cursor, focus kept, a second press ignored) while cancel stays live; the parent calls `ConfirmDialog.close` when the work lands, or keeps it open while it is not done. `isDisabled` holds it the same way without the working cursor, for an action that is blocked rather than running (writes not accepted yet). `toDetailView` prints the application's own content under the sentence, inside the Outcome's body and so in the dialog's description: what the work said back (a refused delete's reason as an error Notice) or a notice with its own retry. Cancel, Escape and the veil report `Cancelled`; the parent decides whether that also stops work already running, and ignores the work's result once cancelled. Where the reader may not walk away from the work (its failure must land in the dialog), the update that starts it holds the ways out (`ConfirmDialog.setCloseHeld`): cancel prints held (`aria-disabled`, in the keyboard, no ring and no shadow while the busy commit keeps focus), and cancel, Escape and a press on the veil change nothing, so the dialog stays open and reports no `Cancelled`; the update where the work fails lets go, and `close` closes it and lets go.
1063
1063
  - **CommandPalette** (Submodel over Dialog and `@foldkit/ui`'s Input with a listbox of its own, since a combobox would not let the cursor land on held rows or Escape reach the Dialog) → a card at 18vh holding `div.palette-q` (a `span.palette-scope` and a combobox input), `div.palette-detail` when the app gives `toDetailView`, `div.palette-list[role="listbox"]` of `div.palette-group` headings and `div.palette-row[role="option"][aria-selected]` rows (control register; `isAuthored` titles, `.authored`, set in sans with a glyph and wait for a query), a `div.sr-only[role="status"]`, and `div.palette-more`. Once a query is typed the status says how many rows it finds ("3 results.", "Nothing matches."); it is empty as the card opens and on a fresh page, so it is never mounted holding its words (rule 12). Labels and hints wrap within their row, including long names and destination paths. One cursor: the inverted row, moved by the keys only. ↑ ↓ move it and stop at the ends, each key one row from where the last left it however fast they come (the field's own handler, in the view, reports `PressedArrowKey` with the rows its render showed, and update steps from the Model's cursor); Home and End stay the field's, moving the caret; Enter does what a click on its row does, decided in update from what the render showed each row to be (held, opening a page, a choice on a page): a command closes the palette first so what it opens takes focus, and reports `SelectedCommand`. An arrow or an Enter pressed before the list has caught up with the keys before it (straight after a letter, or before the arrows already waiting have moved the cursor) cannot name a row yet, so it waits for the next render: the row that render shows the cursor on becomes the cursor, and a waiting Enter acts on it as on any row. So arrows typed straight after a letter step through the new query's rows, and an Enter acts on the keys before it, never on letters typed after it. While the palette is open, ↑ ↓ and Enter pressed before its field has focus (straight after the key that opened it) are its own too: `CommandPalette.subscriptions(keyPrefix)` takes them on the window before the page's bindings see them, and they wait as above. A key an IME is composing stays the IME's. The pointer shades the row under it (Header Grey, as a list's row) and a click runs that row; it never moves the cursor and never scrolls. The cursor comes into view on every key that moves it, when the view or the query changes, and when its row leaves the list (it falls back to the first): the app, which changes the list, returns `CommandPalette.ScrollToCursor` with the palette's id; a row that only reflows is not followed. The cursor holds to its row by id while the app updates the list; `CommandPalette.maybeCursorId` reads the row it shows for a list of commands, so the app can compare it before and after its change. A row with `isDisabled` prints muted (`[aria-disabled="true"]`), its `reason` in the hint, and the cursor still lands on it but Enter and a click do nothing. **Pages:** a command with a `page` (a status, a date, a destination) ends in a caret and opens that page in place instead of closing: `div.palette-q` holds a Back IconButton, the scope chip (what the commands act on, kept on every page), the page's title (`span.palette-title`, pixel caps), then the page's own field (placeholder `find`, else "type to narrow"), focused. A long scope wraps inside its chip and the field takes its own line when too little is left beside it, so nothing leaves the card at 390px. The choices are found in like the commands. The choice in force now (`current`) carries a `current` tag and cannot be picked again. The cursor starts on the page's `start` (the next status; the first choice a typed query finds), else on `current`, else on the first choice, read while the reader has not moved it, so an application that keeps `start` steady across a change made elsewhere moves the tag, not the cursor. Back, or Backspace in an empty field, returns to the commands with their query and cursor as they were, also when the palette opened straight on a page (`CommandPalette.openAt`). A pick (`SelectedChoice`) holds the page until the parent answers: the row prints the working cursor, the list is `aria-busy`, and moving, picking, typing and Back wait. With `CommandPalette.pickSucceeded` the palette closes; with `pickFailed` the page stays with its query, focus and the cursor on that choice, and the app says why in `toDetailView`, which shows on the commands and on every page alike. Escape closes the whole palette, even while a pick is out, and reports `Closed`; an answer arriving after that, or after the page was left, changes nothing. A page whose command leaves the list gives way to the commands. One level: choices do not open pages.
@@ -24,8 +24,9 @@ export type ViewConfig<Message> = Readonly<{
24
24
  /** The raised surface: paper in a 2px ink box on the 8px print shadow, under a title bar. */
25
25
  export declare const view: <Message>(config: ViewConfig<Message>, h: HtmlBuilder<Message>) => Html;
26
26
  /** Configuration for rendering a form card with `formView`: a card's, but for its body, its
27
- * close attributes and its action bar, which the form fills. */
28
- export type FormViewConfig<Message> = Omit<ViewConfig<Message>, "body" | "closeAttributes" | "actions" | "lead"> & Readonly<{
27
+ * close attributes and its actions, which the form fills. `lead` stays the card's: what
28
+ * goes before the push, such as a form's own delete. */
29
+ export type FormViewConfig<Message> = Omit<ViewConfig<Message>, "body" | "closeAttributes" | "actions"> & Readonly<{
29
30
  /** Unique in the document: the submit button's id is `submitId(id)`. */
30
31
  id: string;
31
32
  /** The form's content, fields and all, in one Fields group that `isBusy` holds. A link in
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/card/card.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAQ9D,sDAAsD;AACtD,MAAM,MAAM,UAAU,CAAC,OAAO,IAAI,QAAQ,CAAC;IACzC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,0FAA0F;IAC1F,eAAe,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;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IAAI,CACxC,UAAU,CAAC,OAAO,CAAC,EACnB,MAAM,GAAG,iBAAiB,GAAG,SAAS,CACvC,GACC,QAAQ,CAAC;IACP,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IACX;6CACyC;IACzC,IAAI,EAAE,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IACnC,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;IACf,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;wEACoE;IACpE,eAAe,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IACtC;;;;6DAIyD;IACzD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;6DAEyD;IACzD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC,CAAC;AAEL;;gDAEgD;AAChD,eAAO,MAAM,QAAQ,OAAQ,MAAM,KAAG,MAAwB,CAAC;AAE/D;0EAC0E;AAC1E,eAAO,MAAM,QAAQ,GAAI,OAAO,UACtB,cAAc,CAAC,OAAO,CAAC,KAC5B,WAAW,CAAC,OAAO,CAAC,KACtB,IAwDF,CAAC"}
@@ -143,7 +143,8 @@ export declare const update: (model: Model, message: Message) => Readonly<{
143
143
  readonly _tag: "Confirmed";
144
144
  };
145
145
  }>;
146
- /** Opens the confirm dialog: focus starts on the action, or on cancel when it is `isDanger`. */
146
+ /** Opens the confirm dialog with its ways out free: focus starts on the action, or on cancel
147
+ * when it is `isDanger`. */
147
148
  export declare const open: (model: Model) => Update.Return<Model, Message>;
148
149
  /** Closes the confirm dialog without reporting `Cancelled`, and lets go of a hold: call it
149
150
  * once confirmed work has landed. */
@@ -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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IAClB;;kEAE8D;aACrD,OAAO;IAChB;;wDAEoD;iBACvC,OAAO;IACpB;0CACsC;uBACnB,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS;GAoF5C,CAAC"}
@@ -52,7 +52,8 @@ export const update = (model, message) => __foldkitBrandViewResult((Message.matc
52
52
  ? { model }
53
53
  : pipe(dialogFold.close(model), Update.withOutMessage(OutMessage.Cancelled()))), "@gjermundgaraba-designs/pixel-paper/src/confirmDialog/confirmDialog.js#ClickedCancel"),
54
54
  })), "@gjermundgaraba-designs/pixel-paper/src/confirmDialog/confirmDialog.js#update");
55
- /** Opens the confirm dialog: focus starts on the action, or on cancel when it is `isDanger`. */
55
+ /** Opens the confirm dialog with its ways out free: focus starts on the action, or on cancel
56
+ * when it is `isDanger`. */
56
57
  export const open = (model) => __foldkitBrandViewResult((dialogFold.open(model)), "@gjermundgaraba-designs/pixel-paper/src/confirmDialog/confirmDialog.js#open");
57
58
  /** Closes the confirm dialog without reporting `Cancelled`, and lets go of a hold: call it
58
59
  * once confirmed work has landed. */
@@ -136,8 +136,9 @@ export declare const update: (model: Model, message: Message) => Readonly<{
136
136
  readonly _tag: "Closed";
137
137
  };
138
138
  }>;
139
- /** Opens the dialog: focus moves to the element given the `initialFocus` group, else to the
140
- * first control, and returns to where it was when the dialog closes. */
139
+ /** Opens the dialog with its ways out free: focus moves to the element given the
140
+ * `initialFocus` group, else to the first control, and returns to where it was when the
141
+ * dialog closes. */
141
142
  export declare const open: (model: Model) => Update.Return<Model, Message>;
142
143
  /** Closes the dialog without reporting `Closed`, and lets go of a hold. */
143
144
  export declare const close: (model: Model) => Update.Return<Model, Message>;
@@ -145,7 +146,8 @@ export declare const close: (model: Model) => Update.Return<Model, Message>;
145
146
  * a control given the `closeButton` group leave it open and report no `Closed`, so the
146
147
  * result of work the reader may not walk away from (a save whose failure must land here)
147
148
  * lands in it. Hold it in the update that starts the work, and let go in the update where
148
- * the work fails, or the reader is shut in with the failure; `close` lets go once it lands.
149
+ * the work fails, or the reader is shut in with the failure; `close` lets go once it lands,
150
+ * and `open` opens it free.
149
151
  * Hold the card's own close controls too (`Card.formView`'s `isBusy`). */
150
152
  export declare const setCloseHeld: (model: Model, isHeld: boolean) => Model;
151
153
  /** Moves focus for one keydown in an action bar, and says which way it moved. It moves only
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialog.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,MAAM,EAAE,MAAM,EAAQ,MAAM,QAAQ,CAAC;AAE5D,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,IAAI,EAAmB,MAAM,cAAc,CAAC;AAE/E,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAGvC,OAAO,KAAK,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAO9C;0CAC0C;AAC1C,eAAO,MAAM,KAAK;;;;;;;;;;;;;;EAGhB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAC;AAEtC,8EAA8E;AAC9E,QAAA,MAAM,eAAe,gDAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAC;AAEnD,iFAAiF;AACjF,eAAO,MAAM,SAAS,6CAAqC,CAAC;AAC5D,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAC;AAI9C;4FAC4F;AAC5F,eAAO,MAAM,OAAO;;QACE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;QACP,SAAS;;EAC7B,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAI1C;gGACgG;AAChG,eAAO,MAAM,UAAU;;EAErB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAC;AAIhD,gGAAgG;AAChG,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,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AG,SAAS,CAAC;CAC7C,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAzBf,2FAA2F;YACnF,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI;IACpC;0FACsF;YAC9E,MAAM;IACd,sEAAsE;cAC5D,OAAO;gBACL,SAAS;qBACJ,OAAO;IACxB;;;;2FAIuF;uBACpE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS;GA2D3C,CAAC"}
@@ -65,18 +65,20 @@ export const update = (model, message) => __foldkitBrandViewResult((Message.matc
65
65
  GotDialogMessage: ({ message: dialogMessage }) => __foldkitBrandViewResult((isHeldClose(model, dialogMessage) ? { model } : dialogFold.update(model, dialogMessage)), "@gjermundgaraba-designs/pixel-paper/src/dialog/dialog.js#GotDialogMessage"),
66
66
  PressedActionKey: () => (__foldkitBrandViewResult(({ model }), "@gjermundgaraba-designs/pixel-paper/src/dialog/dialog.js#PressedActionKey")),
67
67
  })), "@gjermundgaraba-designs/pixel-paper/src/dialog/dialog.js#update");
68
- /** Opens the dialog: focus moves to the element given the `initialFocus` group, else to the
69
- * first control, and returns to where it was when the dialog closes. */
70
- export const open = (model) => __foldkitBrandViewResult((dialogFold.open(model)), "@gjermundgaraba-designs/pixel-paper/src/dialog/dialog.js#open");
68
+ /** Opens the dialog with its ways out free: focus moves to the element given the
69
+ * `initialFocus` group, else to the first control, and returns to where it was when the
70
+ * dialog closes. */
71
+ export const open = (model) => __foldkitBrandViewResult((dialogFold.open(modifyFields(model, { isCloseHeld: () => __foldkitBrandViewResult((false), "@gjermundgaraba-designs/pixel-paper/src/dialog/dialog.js#isCloseHeld~2") }))), "@gjermundgaraba-designs/pixel-paper/src/dialog/dialog.js#open");
71
72
  /** Closes the dialog without reporting `Closed`, and lets go of a hold. */
72
- export const close = (model) => __foldkitBrandViewResult((dialogFold.close(modifyFields(model, { isCloseHeld: () => __foldkitBrandViewResult((false), "@gjermundgaraba-designs/pixel-paper/src/dialog/dialog.js#isCloseHeld~2") }))), "@gjermundgaraba-designs/pixel-paper/src/dialog/dialog.js#close");
73
+ export const close = (model) => __foldkitBrandViewResult((dialogFold.close(modifyFields(model, { isCloseHeld: () => __foldkitBrandViewResult((false), "@gjermundgaraba-designs/pixel-paper/src/dialog/dialog.js#isCloseHeld~3") }))), "@gjermundgaraba-designs/pixel-paper/src/dialog/dialog.js#close");
73
74
  /** Holds the dialog's ways out, or lets them go: while held, Escape, a press on the veil and
74
75
  * a control given the `closeButton` group leave it open and report no `Closed`, so the
75
76
  * result of work the reader may not walk away from (a save whose failure must land here)
76
77
  * lands in it. Hold it in the update that starts the work, and let go in the update where
77
- * the work fails, or the reader is shut in with the failure; `close` lets go once it lands.
78
+ * the work fails, or the reader is shut in with the failure; `close` lets go once it lands,
79
+ * and `open` opens it free.
78
80
  * Hold the card's own close controls too (`Card.formView`'s `isBusy`). */
79
- export const setCloseHeld = (model, isHeld) => __foldkitBrandViewResult((modifyFields(model, { isCloseHeld: () => __foldkitBrandViewResult((isHeld), "@gjermundgaraba-designs/pixel-paper/src/dialog/dialog.js#isCloseHeld~3") })), "@gjermundgaraba-designs/pixel-paper/src/dialog/dialog.js#setCloseHeld");
81
+ export const setCloseHeld = (model, isHeld) => __foldkitBrandViewResult((modifyFields(model, { isCloseHeld: () => __foldkitBrandViewResult((isHeld), "@gjermundgaraba-designs/pixel-paper/src/dialog/dialog.js#isCloseHeld~4") })), "@gjermundgaraba-designs/pixel-paper/src/dialog/dialog.js#setCloseHeld");
80
82
  // ACTION BAR KEYS
81
83
  const ACTION_BAR_ATTRIBUTE = "data-pixel-paper-action-bar";
82
84
  const ACTION_SELECTOR = "button:not(:disabled), a[href]";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjermundgaraba-designs/pixel-paper",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
package/src/card/card.ts CHANGED
@@ -90,10 +90,11 @@ export const view = <Message>(config: ViewConfig<Message>, h: HtmlBuilder<Messag
90
90
  // FORM
91
91
 
92
92
  /** Configuration for rendering a form card with `formView`: a card's, but for its body, its
93
- * close attributes and its action bar, which the form fills. */
93
+ * close attributes and its actions, which the form fills. `lead` stays the card's: what
94
+ * goes before the push, such as a form's own delete. */
94
95
  export type FormViewConfig<Message> = Omit<
95
96
  ViewConfig<Message>,
96
- "body" | "closeAttributes" | "actions" | "lead"
97
+ "body" | "closeAttributes" | "actions"
97
98
  > &
98
99
  Readonly<{
99
100
  /** Unique in the document: the submit button's id is `submitId(id)`. */
@@ -76,7 +76,8 @@ export const update = (model: Model, message: Message) =>
76
76
  : pipe(dialogFold.close(model), Update.withOutMessage(OutMessage.Cancelled())),
77
77
  });
78
78
 
79
- /** Opens the confirm dialog: focus starts on the action, or on cancel when it is `isDanger`. */
79
+ /** Opens the confirm dialog with its ways out free: focus starts on the action, or on cancel
80
+ * when it is `isDanger`. */
80
81
  export const open = (model: Model): Update.Return<Model, Message> => dialogFold.open(model);
81
82
 
82
83
  /** Closes the confirm dialog without reporting `Cancelled`, and lets go of a hold: call it
@@ -99,9 +99,11 @@ export const update = (model: Model, message: Message) =>
99
99
  PressedActionKey: () => ({ model }),
100
100
  });
101
101
 
102
- /** Opens the dialog: focus moves to the element given the `initialFocus` group, else to the
103
- * first control, and returns to where it was when the dialog closes. */
104
- export const open = (model: Model): Update.Return<Model, Message> => dialogFold.open(model);
102
+ /** Opens the dialog with its ways out free: focus moves to the element given the
103
+ * `initialFocus` group, else to the first control, and returns to where it was when the
104
+ * dialog closes. */
105
+ export const open = (model: Model): Update.Return<Model, Message> =>
106
+ dialogFold.open(modifyFields(model, { isCloseHeld: () => false }));
105
107
 
106
108
  /** Closes the dialog without reporting `Closed`, and lets go of a hold. */
107
109
  export const close = (model: Model): Update.Return<Model, Message> =>
@@ -111,7 +113,8 @@ export const close = (model: Model): Update.Return<Model, Message> =>
111
113
  * a control given the `closeButton` group leave it open and report no `Closed`, so the
112
114
  * result of work the reader may not walk away from (a save whose failure must land here)
113
115
  * lands in it. Hold it in the update that starts the work, and let go in the update where
114
- * the work fails, or the reader is shut in with the failure; `close` lets go once it lands.
116
+ * the work fails, or the reader is shut in with the failure; `close` lets go once it lands,
117
+ * and `open` opens it free.
115
118
  * Hold the card's own close controls too (`Card.formView`'s `isBusy`). */
116
119
  export const setCloseHeld = (model: Model, isHeld: boolean): Model =>
117
120
  modifyFields(model, { isCloseHeld: () => isHeld });