@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.
- package/DESIGN.md +18 -17
- package/dist/src/adapters/mermaid.d.ts.map +1 -1
- package/dist/src/adapters/mermaid.js +0 -24
- package/dist/src/announcer/announcer.d.ts.map +1 -1
- package/dist/src/announcer/announcer.js +12 -12
- package/dist/src/board/board.d.ts +0 -10
- package/dist/src/board/board.d.ts.map +1 -1
- package/dist/src/board/board.js +36 -64
- package/dist/src/board/index.d.ts +2 -1
- package/dist/src/board/index.d.ts.map +1 -1
- package/dist/src/board/index.js +2 -1
- package/dist/src/button/button.d.ts +1 -1
- package/dist/src/button/button.d.ts.map +1 -1
- package/dist/src/commandPalette/commandPalette.d.ts.map +1 -1
- package/dist/src/commandPalette/commandPalette.js +78 -83
- package/dist/src/commandPalette/keys.d.ts +2 -2
- package/dist/src/commandPalette/keys.d.ts.map +1 -1
- package/dist/src/commandPalette/keys.js +2 -4
- package/dist/src/commandPalette/match.d.ts.map +1 -1
- package/dist/src/commandPalette/match.js +2 -2
- package/dist/src/confirmDialog/confirmDialog.d.ts.map +1 -1
- package/dist/src/confirmDialog/confirmDialog.js +1 -2
- package/dist/src/copyButton/copyButton.d.ts +0 -5
- package/dist/src/copyButton/copyButton.d.ts.map +1 -1
- package/dist/src/copyButton/copyButton.js +2 -2
- package/dist/src/crumbs/crumbs.d.ts +0 -2
- package/dist/src/crumbs/crumbs.d.ts.map +1 -1
- package/dist/src/crumbs/crumbs.js +2 -2
- package/dist/src/dialog/dialog.d.ts +2 -0
- package/dist/src/dialog/dialog.d.ts.map +1 -1
- package/dist/src/dialog/dialog.js +3 -2
- package/dist/src/drag/drag.d.ts +28 -0
- package/dist/src/drag/drag.d.ts.map +1 -1
- package/dist/src/drag/drag.js +39 -17
- package/dist/src/editableTitle/editableTitle.d.ts +4 -4
- package/dist/src/field/field.d.ts +7 -1
- package/dist/src/field/field.d.ts.map +1 -1
- package/dist/src/field/field.js +14 -6
- package/dist/src/fieldset/fieldset.d.ts.map +1 -1
- package/dist/src/fieldset/fieldset.js +2 -4
- package/dist/src/fileTree/fileTree.d.ts.map +1 -1
- package/dist/src/fileTree/fileTree.js +16 -16
- package/dist/src/iconButton/iconButton.d.ts +6 -1
- package/dist/src/iconButton/iconButton.d.ts.map +1 -1
- package/dist/src/iconButton/iconButton.js +7 -2
- package/dist/src/inlineInput/inlineInput.d.ts +4 -0
- package/dist/src/inlineInput/inlineInput.d.ts.map +1 -1
- package/dist/src/inlineInput/inlineInput.js +9 -6
- package/dist/src/keyHelp/index.d.ts +1 -1
- package/dist/src/keyHelp/index.d.ts.map +1 -1
- package/dist/src/keyHelp/index.js +1 -1
- package/dist/src/keyHelp/keyHelp.d.ts +1 -3
- package/dist/src/keyHelp/keyHelp.d.ts.map +1 -1
- package/dist/src/keyHelp/keyHelp.js +3 -6
- package/dist/src/keyHint/keyLabel.d.ts +2 -0
- package/dist/src/keyHint/keyLabel.d.ts.map +1 -1
- package/dist/src/keyHint/keyLabel.js +3 -2
- package/dist/src/lineDiff/diff.d.ts +6 -3
- package/dist/src/lineDiff/diff.d.ts.map +1 -1
- package/dist/src/lineDiff/diff.js +40 -28
- package/dist/src/lineDiff/patch.d.ts.map +1 -1
- package/dist/src/lineDiff/patch.js +18 -13
- package/dist/src/linkState/linkState.d.ts.map +1 -1
- package/dist/src/linkState/linkState.js +1 -7
- package/dist/src/menu/slip.js +2 -2
- package/dist/src/meter/meter.d.ts.map +1 -1
- package/dist/src/meter/meter.js +22 -17
- package/dist/src/notice/notice.d.ts +2 -0
- package/dist/src/notice/notice.d.ts.map +1 -1
- package/dist/src/notice/notice.js +2 -1
- package/dist/src/panel/panel.d.ts +3 -0
- package/dist/src/panel/panel.d.ts.map +1 -1
- package/dist/src/panel/panel.js +2 -1
- package/dist/src/passwordField/passwordField.d.ts.map +1 -1
- package/dist/src/passwordField/passwordField.js +3 -7
- package/dist/src/rail/index.d.ts +1 -1
- package/dist/src/rail/index.d.ts.map +1 -1
- package/dist/src/rail/index.js +1 -1
- package/dist/src/rail/rail.d.ts +95 -20
- package/dist/src/rail/rail.d.ts.map +1 -1
- package/dist/src/rail/rail.js +103 -46
- package/dist/src/reel/layout.d.ts +9 -5
- package/dist/src/reel/layout.d.ts.map +1 -1
- package/dist/src/reel/layout.js +11 -5
- package/dist/src/reel/reel.d.ts.map +1 -1
- package/dist/src/reel/reel.js +122 -68
- package/dist/src/scheme/scheme.d.ts +1 -1
- package/dist/src/scheme/scheme.d.ts.map +1 -1
- package/dist/src/segmented/segmented.d.ts +0 -3
- package/dist/src/segmented/segmented.d.ts.map +1 -1
- package/dist/src/segmented/segmented.js +1 -6
- package/dist/src/selectField/selectField.d.ts.map +1 -1
- package/dist/src/selectField/selectField.js +3 -10
- package/dist/src/sortable/index.d.ts +1 -1
- package/dist/src/sortable/index.d.ts.map +1 -1
- package/dist/src/sortable/index.js +1 -1
- package/dist/src/sortable/sortable.d.ts +39 -40
- package/dist/src/sortable/sortable.d.ts.map +1 -1
- package/dist/src/sortable/sortable.js +14 -31
- package/dist/src/stack/stack.d.ts +1 -1
- package/dist/src/stack/stack.d.ts.map +1 -1
- package/dist/src/stack/stack.js +1 -1
- package/dist/src/tabs/tabs.d.ts +1 -1
- package/dist/src/tabs/tabs.d.ts.map +1 -1
- package/dist/src/tabs/tabs.js +1 -1
- package/dist/src/textareaField/textareaField.d.ts.map +1 -1
- package/dist/src/textareaField/textareaField.js +3 -7
- package/dist/src/time/time.d.ts.map +1 -1
- package/dist/src/time/time.js +4 -2
- package/dist/src/tips/index.d.ts +1 -1
- package/dist/src/tips/index.d.ts.map +1 -1
- package/dist/src/tips/tips.d.ts +30 -1
- package/dist/src/tips/tips.d.ts.map +1 -1
- package/dist/src/tips/tips.js +53 -31
- package/dist/src/toast/index.d.ts +1 -1
- package/dist/src/toast/index.d.ts.map +1 -1
- package/dist/src/toast/toast.d.ts +5 -5
- package/dist/src/toast/toast.d.ts.map +1 -1
- package/dist/src/toast/toast.js +1 -6
- package/dist/src/toolbar/toolbar.d.ts +0 -3
- package/dist/src/toolbar/toolbar.d.ts.map +1 -1
- package/dist/src/toolbar/toolbar.js +1 -2
- package/package.json +1 -1
- package/src/adapters/mermaid.ts +0 -24
- package/src/announcer/announcer.ts +13 -17
- package/src/board/board.ts +32 -80
- package/src/board/index.ts +1 -1
- package/src/button/button.ts +1 -1
- package/src/commandPalette/commandPalette.ts +21 -38
- package/src/commandPalette/keys.ts +2 -4
- package/src/commandPalette/match.ts +3 -3
- package/src/confirmDialog/confirmDialog.ts +5 -3
- package/src/copyButton/copyButton.ts +2 -5
- package/src/crumbs/crumbs.ts +2 -4
- package/src/dialog/dialog.ts +3 -2
- package/src/drag/drag.ts +54 -5
- package/src/field/field.ts +29 -7
- package/src/fieldset/fieldset.ts +2 -4
- package/src/fileTree/fileTree.ts +10 -12
- package/src/iconButton/iconButton.ts +19 -2
- package/src/inlineInput/inlineInput.ts +11 -2
- package/src/keyHelp/index.ts +0 -1
- package/src/keyHelp/keyHelp.ts +3 -9
- package/src/keyHint/keyLabel.ts +5 -2
- package/src/lineDiff/diff.ts +70 -54
- package/src/lineDiff/patch.ts +27 -14
- package/src/linkState/linkState.ts +1 -8
- package/src/menu/slip.ts +2 -2
- package/src/meter/meter.ts +25 -15
- package/src/notice/notice.ts +2 -1
- package/src/panel/panel.ts +5 -0
- package/src/passwordField/passwordField.ts +3 -7
- package/src/pixel-paper.css +200 -134
- package/src/rail/index.ts +2 -0
- package/src/rail/rail.ts +124 -44
- package/src/reel/layout.ts +14 -7
- package/src/reel/reel.ts +132 -63
- package/src/scheme/scheme.ts +1 -1
- package/src/segmented/segmented.ts +1 -9
- package/src/selectField/selectField.ts +3 -10
- package/src/sortable/index.ts +0 -1
- package/src/sortable/sortable.ts +35 -54
- package/src/stack/stack.ts +1 -1
- package/src/tabs/tabs.ts +1 -1
- package/src/textareaField/textareaField.ts +3 -7
- package/src/time/time.ts +6 -7
- package/src/tips/index.ts +1 -1
- package/src/tips/tips.ts +71 -35
- package/src/toast/index.ts +1 -1
- package/src/toast/toast.ts +2 -8
- package/src/tokens.css +7 -0
- package/src/toolbar/toolbar.ts +0 -5
- package/dist/src/inlineInput/inline.d.ts +0 -6
- package/dist/src/inlineInput/inline.d.ts.map +0 -1
- package/dist/src/inlineInput/inline.js +0 -7
- package/src/inlineInput/inline.ts +0 -13
package/dist/src/board/board.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
|
|
2
2
|
import { Button as UiButton, DragAndDrop as UiDragAndDrop } from "@foldkit/ui";
|
|
3
|
-
import { Array, Effect, Equal, Match, Option, Schema,
|
|
3
|
+
import { Array, Effect, Equal, Match, Option, Schema, pipe } from "effect";
|
|
4
4
|
import * as Command from "foldkit/command";
|
|
5
5
|
import { childAttributes, } from "foldkit/html";
|
|
6
6
|
import { defineMessageUnion } from "foldkit/message";
|
|
@@ -16,7 +16,7 @@ import * as IconButton from "../iconButton/iconButton.js";
|
|
|
16
16
|
import { LOCALE } from "../locale/locale.js";
|
|
17
17
|
import { slotView } from "../slot/slot.js";
|
|
18
18
|
import { prefixKeys } from "../subscription/prefixKeys.js";
|
|
19
|
-
import { LEFT_BUTTON, activatedKeyboardDrag, cancelledDrag,
|
|
19
|
+
import { LEFT_BUTTON, activatedKeyboardDrag, canLift, cancelledDrag, escapeSubscriptions, innerControls, isCarrying, measureLift, phaseOf, pressedDraggable, settle as settleDrag, } from "../drag/drag.js";
|
|
20
20
|
// MODEL
|
|
21
21
|
/** Schema for one card as the board knows it: its id, unique across the board, and its name
|
|
22
22
|
* in words, which the grip and screen readers use. */
|
|
@@ -27,17 +27,19 @@ export const Column = Schema.Struct({
|
|
|
27
27
|
title: Schema.String,
|
|
28
28
|
cards: Schema.Array(Card),
|
|
29
29
|
});
|
|
30
|
+
/** How the keyboard carries what it holds: said on the grip and once it is picked up. */
|
|
31
|
+
const KEYBOARD_MOVES = "Arrow keys move it to another column, space drops it, escape cancels.";
|
|
30
32
|
/** The words a board says. `{card}` stands for the card's label and `{column}` for a
|
|
31
33
|
* column's title. */
|
|
32
34
|
const COPY = {
|
|
33
35
|
/** The grip's name. */
|
|
34
36
|
gripLabel: "Move {card}",
|
|
35
37
|
/** What the grip describes: how to move a card from the keyboard. */
|
|
36
|
-
gripHelp:
|
|
38
|
+
gripHelp: `Press space to pick the card up. ${KEYBOARD_MOVES}`,
|
|
37
39
|
/** A pointer has lifted the card. */
|
|
38
40
|
pickedUp: "Picked up {card}.",
|
|
39
41
|
/** The keyboard has lifted the card: say how to go on. */
|
|
40
|
-
pickedUpByKeyboard:
|
|
42
|
+
pickedUpByKeyboard: `Picked up {card}. ${KEYBOARD_MOVES}`,
|
|
41
43
|
/** The held card is over another column. */
|
|
42
44
|
over: "{card} is over {column}.",
|
|
43
45
|
/** The card was dropped in a column. */
|
|
@@ -123,10 +125,6 @@ export const init = (config) => (__foldkitBrandViewResult(({
|
|
|
123
125
|
export const id = (model) => __foldkitBrandViewResult((model.dragAndDrop.id), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#id");
|
|
124
126
|
/** Whether a card is held by a pointer or the keyboard. */
|
|
125
127
|
export const isDragging = (model) => __foldkitBrandViewResult((UiDragAndDrop.isDragging(model.dragAndDrop)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#isDragging");
|
|
126
|
-
/** Whether a card is pressed or held. While it is, the arrow keys, Space and Escape belong to
|
|
127
|
-
* the board: pause the page's own bindings for them. The board takes Escape before anything
|
|
128
|
-
* else sees it. */
|
|
129
|
-
export const isHolding = (model) => __foldkitBrandViewResult((Option.isSome(UiDragAndDrop.maybeDraggedItemId(model.dragAndDrop))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#isHolding");
|
|
130
128
|
// DOM HOOKS
|
|
131
129
|
const hookId = (boardId, localId) => __foldkitBrandViewResult((`${boardId}/${localId}`), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#hookId");
|
|
132
130
|
const cardHook = (model, cardId) => __foldkitBrandViewResult((hookId(id(model), cardId)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#cardHook");
|
|
@@ -146,18 +144,17 @@ const placeOf = (columns, cardId) => __foldkitBrandViewResult((Array.findFirst(c
|
|
|
146
144
|
const fill = (template, card, column = "") => __foldkitBrandViewResult((template.replaceAll("{card}", card).replaceAll("{column}", column)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#fill");
|
|
147
145
|
const columnOfHook = (model, held, hook) => __foldkitBrandViewResult((Array.findFirst(held.columns, (column) => __foldkitBrandViewResult((columnHook(model, column.id) === hook), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~4"))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#columnOfHook");
|
|
148
146
|
const overColumn = (model) => __foldkitBrandViewResult((Option.flatMap(model.maybeHeld, (held) => __foldkitBrandViewResult((Option.flatMap(UiDragAndDrop.maybeDropTarget(model.dragAndDrop), ({ containerId }) => __foldkitBrandViewResult((columnOfHook(model, held, containerId)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~6"))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~5"))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#overColumn");
|
|
149
|
-
const announceMove = (maybeText) => __foldkitBrandViewResult((Array.fromOption(Option.map(maybeText, (text) => __foldkitBrandViewResult((AnnounceMove({ text })), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~7")))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#announceMove");
|
|
150
147
|
const placementOf = (model, held, toContainerId, rawIndex) => __foldkitBrandViewResult((Option.gen(function* () {
|
|
151
148
|
const from = yield* placeOf(held.columns, held.card.id);
|
|
152
149
|
const to = yield* columnOfHook(model, held, toContainerId);
|
|
153
|
-
const others = Array.filter(to.cards, (card) => __foldkitBrandViewResult((card.id !== held.card.id), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
150
|
+
const others = Array.filter(to.cards, (card) => __foldkitBrandViewResult((card.id !== held.card.id), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~8"));
|
|
154
151
|
const isSameColumn = to.id === from.column.id;
|
|
155
152
|
const isKeyboard = Option.isNone(held.maybePressPoint);
|
|
156
153
|
const pastItself = isSameColumn && rawIndex > from.index ? rawIndex - 1 : rawIndex;
|
|
157
154
|
const toIndex = Math.min(Math.max(pastItself, 0), others.length);
|
|
158
155
|
const isWhereItWas = isSameColumn && (isKeyboard || toIndex === from.index);
|
|
159
156
|
if (isWhereItWas || !model.isMovable) {
|
|
160
|
-
return __foldkitBrandViewResult((yield* Option.none()), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
157
|
+
return __foldkitBrandViewResult((yield* Option.none()), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~7");
|
|
161
158
|
}
|
|
162
159
|
return __foldkitBrandViewResult((OutMessage.Moved({
|
|
163
160
|
cardId: held.card.id,
|
|
@@ -165,13 +162,13 @@ const placementOf = (model, held, toContainerId, rawIndex) => __foldkitBrandView
|
|
|
165
162
|
fromIndex: from.index,
|
|
166
163
|
toColumnId: to.id,
|
|
167
164
|
toIndex,
|
|
168
|
-
maybeAfterCardId: Option.map(
|
|
169
|
-
maybeBeforeCardId: Option.map(Array.get(others, toIndex), (card) => __foldkitBrandViewResult((card.id), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
170
|
-
})), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
165
|
+
maybeAfterCardId: Option.map(Array.get(others, toIndex - 1), (card) => __foldkitBrandViewResult((card.id), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~9")),
|
|
166
|
+
maybeBeforeCardId: Option.map(Array.get(others, toIndex), (card) => __foldkitBrandViewResult((card.id), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~10")),
|
|
167
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~7");
|
|
171
168
|
})), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#placementOf");
|
|
172
169
|
const foldDragAndDropOutMessage = UiDragAndDrop.OutMessage.match({
|
|
173
|
-
Reordered: ({ toContainerId, toIndex }) => __foldkitBrandViewResult(((stepModel) => __foldkitBrandViewResult((Update.withOutMessage({ model: stepModel }, Option.getOrUndefined(Option.flatMap(stepModel.maybeHeld, (held) => __foldkitBrandViewResult((placementOf(stepModel, held, toContainerId, toIndex)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
174
|
-
Cancelled: () => __foldkitBrandViewResult(((stepModel) => (__foldkitBrandViewResult(({ model: stepModel }), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
170
|
+
Reordered: ({ toContainerId, toIndex }) => __foldkitBrandViewResult(((stepModel) => __foldkitBrandViewResult((Update.withOutMessage({ model: stepModel }, Option.getOrUndefined(Option.flatMap(stepModel.maybeHeld, (held) => __foldkitBrandViewResult((placementOf(stepModel, held, toContainerId, toIndex)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~12"))))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~11")), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#Reordered"),
|
|
171
|
+
Cancelled: () => __foldkitBrandViewResult(((stepModel) => (__foldkitBrandViewResult(({ model: stepModel }), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~13"))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#Cancelled"),
|
|
175
172
|
});
|
|
176
173
|
const toDragAndDropMessage = (message) => __foldkitBrandViewResult((Message.GotDragAndDropMessage({ message })), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#toDragAndDropMessage");
|
|
177
174
|
const foldDragAndDrop = Update.foldChild({
|
|
@@ -187,10 +184,10 @@ const moveText = (held, previous, next, maybeOutMessage, putBack) => {
|
|
|
187
184
|
const label = held.card.label;
|
|
188
185
|
const before = phaseOf(previous.dragAndDrop);
|
|
189
186
|
const after = phaseOf(next.dragAndDrop);
|
|
190
|
-
const maybeMoved = Option.filter(maybeOutMessage, (outMessage) => __foldkitBrandViewResult((outMessage._tag === "Moved"), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
187
|
+
const maybeMoved = Option.filter(maybeOutMessage, (outMessage) => __foldkitBrandViewResult((outMessage._tag === "Moved"), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~14"));
|
|
191
188
|
if (after === "Idle") {
|
|
192
189
|
return __foldkitBrandViewResult((isCarrying(before)
|
|
193
|
-
? Option.some(Option.match(Option.flatMap(maybeMoved, () => __foldkitBrandViewResult((overColumn(previous)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
190
|
+
? Option.some(Option.match(Option.flatMap(maybeMoved, () => __foldkitBrandViewResult((overColumn(previous)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~15")), {
|
|
194
191
|
onNone: () => __foldkitBrandViewResult((fill(putBack, label)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#onNone"),
|
|
195
192
|
onSome: (column) => __foldkitBrandViewResult((fill(COPY.dropped, label, column.title)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#onSome"),
|
|
196
193
|
}))
|
|
@@ -203,23 +200,13 @@ const moveText = (held, previous, next, maybeOutMessage, putBack) => {
|
|
|
203
200
|
return __foldkitBrandViewResult((Option.some(fill(COPY.pickedUpByKeyboard, label))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#moveText");
|
|
204
201
|
}
|
|
205
202
|
else {
|
|
206
|
-
return __foldkitBrandViewResult((pipe(overColumn(next), Option.filter((column) => __foldkitBrandViewResult((!Equal.equals(Option.map(overColumn(previous), ({ id }) => __foldkitBrandViewResult((id), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
203
|
+
return __foldkitBrandViewResult((pipe(overColumn(next), Option.filter((column) => __foldkitBrandViewResult((!Equal.equals(Option.map(overColumn(previous), ({ id }) => __foldkitBrandViewResult((id), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~17")), Option.some(column.id))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~16")), Option.map((column) => __foldkitBrandViewResult((fill(COPY.over, label, column.title)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~18")))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#moveText");
|
|
207
204
|
}
|
|
208
205
|
};
|
|
209
206
|
/** Announces the step a DragAndDrop update took and forgets the held card once it is down.
|
|
210
207
|
* A card set down without a move says `putBack`. */
|
|
211
|
-
const settle = (previous, putBack = COPY.putBack) => __foldkitBrandViewResult(((dragAndDropUpdate) => {
|
|
212
|
-
|
|
213
|
-
? modifyFields(dragAndDropUpdate.model, { maybeHeld: () => __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#maybeHeld") })
|
|
214
|
-
: dragAndDropUpdate.model;
|
|
215
|
-
const maybeText = Option.flatMap(previous.maybeHeld, (held) => __foldkitBrandViewResult((moveText(held, previous, dragAndDropUpdate.model, Option.fromNullishOr(dragAndDropUpdate.outMessage), putBack)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~21"));
|
|
216
|
-
return __foldkitBrandViewResult((Update.withOutMessage({
|
|
217
|
-
model: nextModel,
|
|
218
|
-
commands: [...(dragAndDropUpdate.commands ?? []), ...announceMove(maybeText)],
|
|
219
|
-
}, dragAndDropUpdate.outMessage)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~20");
|
|
220
|
-
}), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#settle");
|
|
221
|
-
const holding = (model, held) => __foldkitBrandViewResult((modifyFields(model, { maybeHeld: () => __foldkitBrandViewResult((Option.some(held)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#maybeHeld~2") })), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#holding");
|
|
222
|
-
const canLift = (model) => __foldkitBrandViewResult((model.isMovable && phaseOf(model.dragAndDrop) === "Idle"), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#canLift");
|
|
208
|
+
const settle = (previous, putBack = COPY.putBack) => __foldkitBrandViewResult(((dragAndDropUpdate) => __foldkitBrandViewResult((settleDrag(dragAndDropUpdate, Option.map(Option.flatMap(previous.maybeHeld, (held) => __foldkitBrandViewResult((moveText(held, previous, dragAndDropUpdate.model, Option.fromNullishOr(dragAndDropUpdate.outMessage), putBack)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~20")), (text) => __foldkitBrandViewResult((AnnounceMove({ text })), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~21")))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~19")), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#settle");
|
|
209
|
+
const holding = (model, held) => __foldkitBrandViewResult((modifyFields(model, { maybeHeld: () => __foldkitBrandViewResult((Option.some(held)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#maybeHeld") })), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#holding");
|
|
223
210
|
const liftByKeyboard = (model, place, columns) => {
|
|
224
211
|
const pressed = holding(model, { card: place.card, columns, maybePressPoint: Option.none() });
|
|
225
212
|
return __foldkitBrandViewResult((settle(pressed)(foldDragAndDrop(pressed, activatedKeyboardDrag({
|
|
@@ -313,12 +300,6 @@ export const setMovable = (model, isMovable) => {
|
|
|
313
300
|
return __foldkitBrandViewResult((isMovable ? { model: next } : cancel(next)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#setMovable");
|
|
314
301
|
};
|
|
315
302
|
// SUBSCRIPTION
|
|
316
|
-
const holdingSubscriptions = Subscription.make()((entry) => (__foldkitBrandViewResult(({
|
|
317
|
-
escape: entry({ isHolding: Schema.Boolean }, {
|
|
318
|
-
modelToDependencies: (model) => (__foldkitBrandViewResult(({ isHolding: isHolding(model) }), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#modelToDependencies")),
|
|
319
|
-
dependenciesToStream: ({ isHolding: isHoldingNow }) => __foldkitBrandViewResult((isHoldingNow ? escapeKeys(Message.PressedEscape()) : Stream.empty), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#dependenciesToStream"),
|
|
320
|
-
}),
|
|
321
|
-
}), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~35")));
|
|
322
303
|
// NOTE: @foldkit/ui gap: DragAndDrop's Subscription keys are fixed, so two of its users on a
|
|
323
304
|
// page would share them. The board lifts them under its own names, behind the parent's prefix.
|
|
324
305
|
const dragSubscriptions = Subscription.lift({
|
|
@@ -329,7 +310,7 @@ const dragSubscriptions = Subscription.lift({
|
|
|
329
310
|
read: (model) => __foldkitBrandViewResult((Option.some(model.dragAndDrop)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#read~2"),
|
|
330
311
|
toParentMessage: toDragAndDropMessage,
|
|
331
312
|
});
|
|
332
|
-
const boardSubscriptions = Subscription.aggregate(
|
|
313
|
+
const boardSubscriptions = Subscription.aggregate(escapeSubscriptions(Message.PressedEscape()), dragSubscriptions);
|
|
333
314
|
/** A held card follows the pointer, the arrows and Space move and drop it, Escape puts it
|
|
334
315
|
* back and the page scrolls near its edges, all from listeners that run only while a card is
|
|
335
316
|
* pressed or held. Lift them into the application's Subscriptions, once per board, with a
|
|
@@ -339,7 +320,6 @@ const boardSubscriptions = Subscription.aggregate(holdingSubscriptions, dragSubs
|
|
|
339
320
|
* DragAndDrop user) aggregate side by side. */
|
|
340
321
|
export const subscriptions = (keyPrefix) => __foldkitBrandViewResult((prefixKeys(keyPrefix, boardSubscriptions)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#subscriptions");
|
|
341
322
|
// LIFTED CARD
|
|
342
|
-
const pressPointOf = (model) => __foldkitBrandViewResult((Option.flatMap(model.maybeHeld, (held) => __foldkitBrandViewResult((held.maybePressPoint), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~36"))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#pressPointOf");
|
|
343
323
|
/** Sizes the copy that follows the pointer to the card it lifts, and keeps the pointer where
|
|
344
324
|
* it pressed the card. Measures the card once, when the copy appears. */
|
|
345
325
|
export const SizeLiftedCard = Mount.define("SizeLiftedCard", {
|
|
@@ -347,7 +327,7 @@ export const SizeLiftedCard = Mount.define("SizeLiftedCard", {
|
|
|
347
327
|
messages: [Message.CompletedSizeLiftedCard],
|
|
348
328
|
execute: ({ element, cardHook: hook, pressX, pressY }) => __foldkitBrandViewResult((Effect.sync(() => {
|
|
349
329
|
measureLift(element, `[data-sortable-id="${CSS.escape(hook)}"]`, pressX, pressY);
|
|
350
|
-
return __foldkitBrandViewResult((Message.CompletedSizeLiftedCard()), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
330
|
+
return __foldkitBrandViewResult((Message.CompletedSizeLiftedCard()), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~35");
|
|
351
331
|
})), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#execute~2"),
|
|
352
332
|
});
|
|
353
333
|
const INNER_CONTROL = innerControls(`[data-${TITLE_ATTRIBUTE}], [data-${GRIP_ATTRIBUTE}]`);
|
|
@@ -358,7 +338,7 @@ const pressSpotOf = (target) => {
|
|
|
358
338
|
return __foldkitBrandViewResult((Option.some("Body")), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#pressSpotOf");
|
|
359
339
|
}
|
|
360
340
|
const maybeCard = Option.fromNullishOr(target.closest(`[data-${CARD_ATTRIBUTE}]`));
|
|
361
|
-
const isOnControl = Option.exists(maybeCard, (card) => __foldkitBrandViewResult((isInside(card, target.closest(INNER_CONTROL))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
341
|
+
const isOnControl = Option.exists(maybeCard, (card) => __foldkitBrandViewResult((isInside(card, target.closest(INNER_CONTROL))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~36"));
|
|
362
342
|
const isOnGrip = target.closest(`[data-${GRIP_ATTRIBUTE}]`) !== null;
|
|
363
343
|
if (isOnControl) {
|
|
364
344
|
return __foldkitBrandViewResult((Option.none()), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#pressSpotOf");
|
|
@@ -372,7 +352,7 @@ const pressSpotOf = (target) => {
|
|
|
372
352
|
};
|
|
373
353
|
const gripHelpId = (model) => __foldkitBrandViewResult((`${id(model)}-grip-help`), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#gripHelpId");
|
|
374
354
|
const isHeldCard = (model, cardId) => __foldkitBrandViewResult((isDragging(model) &&
|
|
375
|
-
Option.exists(UiDragAndDrop.maybeDraggedItemId(model.dragAndDrop), (heldHook) => __foldkitBrandViewResult((heldHook === cardHook(model, cardId)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
355
|
+
Option.exists(UiDragAndDrop.maybeDraggedItemId(model.dragAndDrop), (heldHook) => __foldkitBrandViewResult((heldHook === cardHook(model, cardId)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~37"))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#isHeldCard");
|
|
376
356
|
const liftedRender = (h) => (__foldkitBrandViewResult(({
|
|
377
357
|
attributes: childAttributes([h.AriaHidden(true), h.Inert(true)]),
|
|
378
358
|
isMovable: false,
|
|
@@ -387,7 +367,7 @@ const cardRender = (info, place, h) => {
|
|
|
387
367
|
const { card } = place;
|
|
388
368
|
const isIdleNow = phaseOf(model.dragAndDrop) === "Idle";
|
|
389
369
|
const isHeld = isHeldCard(model, card.id);
|
|
390
|
-
const onPress = h.OnPointerDown((pointerType, button, screenX, screenY, _time, clientX, clientY, _pointerId, target) => __foldkitBrandViewResult((Option.map(Option.filter(pressSpotOf(target), () => __foldkitBrandViewResult((isIdleNow && button === LEFT_BUTTON), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
370
|
+
const onPress = h.OnPointerDown((pointerType, button, screenX, screenY, _time, clientX, clientY, _pointerId, target) => __foldkitBrandViewResult((Option.map(Option.filter(pressSpotOf(target), () => __foldkitBrandViewResult((isIdleNow && button === LEFT_BUTTON), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~39")), (spot) => __foldkitBrandViewResult((Message.PressedCard({
|
|
391
371
|
cardId: card.id,
|
|
392
372
|
spot,
|
|
393
373
|
pointerType,
|
|
@@ -396,8 +376,8 @@ const cardRender = (info, place, h) => {
|
|
|
396
376
|
clientX,
|
|
397
377
|
clientY,
|
|
398
378
|
columns,
|
|
399
|
-
})), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
400
|
-
const onGripKey = h.OnKeyDownPreventDefault((key) => __foldkitBrandViewResult((Option.liftPredicate(Message.PressedGripKey({ cardId: card.id, columns }), () => __foldkitBrandViewResult((isIdleNow && (key === " " || key === "Enter")), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
379
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~40"))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~38"));
|
|
380
|
+
const onGripKey = h.OnKeyDownPreventDefault((key) => __foldkitBrandViewResult((Option.liftPredicate(Message.PressedGripKey({ cardId: card.id, columns }), () => __foldkitBrandViewResult((isIdleNow && (key === " " || key === "Enter")), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~42"))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~41"));
|
|
401
381
|
// NOTE: @foldkit/ui gap: DragAndDrop's `draggable` bundle forces `role="option"` and
|
|
402
382
|
// `data-sortable-id`, which belong on a list's own items, and the card's `li` already
|
|
403
383
|
// carries `sortable`. So the grip carries the ui's `data-draggable-id` by hand, and
|
|
@@ -456,23 +436,22 @@ const keyboardSlot = (info, column, h) => {
|
|
|
456
436
|
const { model } = info;
|
|
457
437
|
const maybeSlot = pipe(Option.all({ held: model.maybeHeld, over: overColumn(model) }), Option.filter(({ held, over }) => __foldkitBrandViewResult((phaseOf(model.dragAndDrop) === "KeyboardDragging" &&
|
|
458
438
|
over.id === column.id &&
|
|
459
|
-
!Array.some(column.cards, (card) => __foldkitBrandViewResult((card.id === held.card.id), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
460
|
-
return __foldkitBrandViewResult((Array.fromOption(Option.map(maybeSlot, ({ held }) => __foldkitBrandViewResult((h.keyed("li")("board-lift-slot", [h.Class("board-lift-slot"), h.AriaHidden(true)], [info.toCardView(held.card, liftedRender(h))])), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
439
|
+
!Array.some(column.cards, (card) => __foldkitBrandViewResult((card.id === held.card.id), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~44"))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~43")));
|
|
440
|
+
return __foldkitBrandViewResult((Array.fromOption(Option.map(maybeSlot, ({ held }) => __foldkitBrandViewResult((h.keyed("li")("board-lift-slot", [h.Class("board-lift-slot"), h.AriaHidden(true)], [info.toCardView(held.card, liftedRender(h))])), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~45")))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#keyboardSlot");
|
|
461
441
|
};
|
|
462
442
|
const columnView = (info, column, h) => {
|
|
463
443
|
const { model } = info;
|
|
464
444
|
const headingId = `${id(model)}-${column.id}-title`;
|
|
465
445
|
const items = [
|
|
466
446
|
...keyboardSlot(info, column, h),
|
|
467
|
-
...Array.map(column.cards, (card, index) => __foldkitBrandViewResult((cardItemView(info, { card, column, index }, h)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
447
|
+
...Array.map(column.cards, (card, index) => __foldkitBrandViewResult((cardItemView(info, { card, column, index }, h)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~46")),
|
|
468
448
|
];
|
|
469
449
|
const isTarget = isDragging(model) &&
|
|
470
|
-
Equal.equals(Option.map(overColumn(model), ({ id: overId }) => __foldkitBrandViewResult((overId), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
450
|
+
Equal.equals(Option.map(overColumn(model), ({ id: overId }) => __foldkitBrandViewResult((overId), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~47")), Option.some(column.id));
|
|
471
451
|
// NOTE: @foldkit/ui gap: DragAndDrop's `droppable` bundle forces `role="listbox"`, which
|
|
472
452
|
// would claim cards that are not options. So the column carries the ui's
|
|
473
453
|
// `data-droppable-id` by hand, and drops are found by it.
|
|
474
454
|
return __foldkitBrandViewResult((h.keyed("div")(column.id, [
|
|
475
|
-
...info.toColumnAttributes(column),
|
|
476
455
|
h.DataAttribute("droppable-id", columnHook(model, column.id)),
|
|
477
456
|
h.Class(isTarget ? "board-col drop-target" : "board-col"),
|
|
478
457
|
], [
|
|
@@ -496,9 +475,9 @@ const liftedCopyView = (info, h) => {
|
|
|
496
475
|
const maybeLifted = Option.all({
|
|
497
476
|
style: UiDragAndDrop.ghostStyle(model.dragAndDrop),
|
|
498
477
|
held: model.maybeHeld,
|
|
478
|
+
pressPoint: Option.flatMap(model.maybeHeld, (held) => __foldkitBrandViewResult((held.maybePressPoint), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~48")),
|
|
499
479
|
});
|
|
500
|
-
|
|
501
|
-
return __foldkitBrandViewResult((Array.fromOption(Option.map(maybeLifted, ({ style, held }) => __foldkitBrandViewResult((h.div([
|
|
480
|
+
return __foldkitBrandViewResult((Array.fromOption(Option.map(maybeLifted, ({ style, held, pressPoint }) => __foldkitBrandViewResult((h.div([
|
|
502
481
|
h.Class("board-lift"),
|
|
503
482
|
h.Style(style),
|
|
504
483
|
h.AriaHidden(true),
|
|
@@ -507,7 +486,7 @@ const liftedCopyView = (info, h) => {
|
|
|
507
486
|
pressX: pressPoint.clientX,
|
|
508
487
|
pressY: pressPoint.clientY,
|
|
509
488
|
})),
|
|
510
|
-
], [info.toCardView(held.card, liftedRender(h))])), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
489
|
+
], [info.toCardView(held.card, liftedRender(h))])), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~49")))), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#liftedCopyView");
|
|
511
490
|
};
|
|
512
491
|
/**
|
|
513
492
|
* Columns of printed slips, one panel per column (one column on narrow screens), built on
|
|
@@ -525,20 +504,13 @@ const liftedCopyView = (info, h) => {
|
|
|
525
504
|
* follows the pointer or the keys.
|
|
526
505
|
*/
|
|
527
506
|
export const view = defineView((model, viewInputs, h) => {
|
|
528
|
-
const { columns, toCardView, toEmptyView = () => __foldkitBrandViewResult(([]), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
529
|
-
const info = {
|
|
530
|
-
model,
|
|
531
|
-
columns,
|
|
532
|
-
toCardView,
|
|
533
|
-
toEmptyView,
|
|
534
|
-
toColumnActions,
|
|
535
|
-
toColumnAttributes,
|
|
536
|
-
};
|
|
507
|
+
const { columns, toCardView, toEmptyView = () => __foldkitBrandViewResult(([]), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~51"), toColumnActions = () => __foldkitBrandViewResult(([]), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~52") } = viewInputs;
|
|
508
|
+
const info = { model, columns, toCardView, toEmptyView, toColumnActions };
|
|
537
509
|
return __foldkitBrandViewResult((h.div([h.Class("board"), h.Style({ "--cols": `${columns.length}` })], [
|
|
538
|
-
...Array.map(columns, (column) => __foldkitBrandViewResult((columnView(info, column, h)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
510
|
+
...Array.map(columns, (column) => __foldkitBrandViewResult((columnView(info, column, h)), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~53")),
|
|
539
511
|
...(model.isMovable
|
|
540
512
|
? [h.p([h.Id(gripHelpId(model)), h.Class("sr-only")], [COPY.gripHelp])]
|
|
541
513
|
: []),
|
|
542
514
|
...liftedCopyView(info, h),
|
|
543
|
-
])), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~
|
|
515
|
+
])), "@gjermundgaraba-designs/pixel-paper/src/board/board.js#anonymous~50");
|
|
544
516
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { AnnounceMove, Card, Column, Message, Model, OutMessage, SizeLiftedCard, cancel, cardView, id, init,
|
|
1
|
+
export { AnnounceMove, Card, Column, Message, Model, OutMessage, SizeLiftedCard, cancel, cardView, id, init, setMovable, subscriptions, update, view, } from "./board.ts";
|
|
2
|
+
export { isHolding } from "../drag/drag.ts";
|
|
2
3
|
export type { CardRender, CardViewConfig, InitConfig, ViewInputs } from "./board.ts";
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/board/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,MAAM,EACN,OAAO,EACP,KAAK,EACL,UAAU,EACV,cAAc,EACd,MAAM,EACN,QAAQ,EACR,EAAE,EACF,IAAI,EACJ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/board/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,MAAM,EACN,OAAO,EACP,KAAK,EACL,UAAU,EACV,cAAc,EACd,MAAM,EACN,QAAQ,EACR,EAAE,EACF,IAAI,EACJ,UAAU,EACV,aAAa,EACb,MAAM,EACN,IAAI,GACL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/src/board/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { AnnounceMove, Card, Column, Message, Model, OutMessage, SizeLiftedCard, cancel, cardView, id, init,
|
|
1
|
+
export { AnnounceMove, Card, Column, Message, Model, OutMessage, SizeLiftedCard, cancel, cardView, id, init, setMovable, subscriptions, update, view, } from "./board.js";
|
|
2
|
+
export { isHolding } from "../drag/drag.js";
|
|
@@ -46,7 +46,7 @@ export type ViewConfig<Message> = Look & Readonly<{
|
|
|
46
46
|
isDisabled?: boolean;
|
|
47
47
|
keyHint?: KeyHintConfig;
|
|
48
48
|
/** `submit` makes it its form's submit button while it is not held. */
|
|
49
|
-
type?: "button" | "submit"
|
|
49
|
+
type?: "button" | "submit";
|
|
50
50
|
/** Further attributes for the `<button>`, such as an id or a Submodel's attribute group. */
|
|
51
51
|
attributes?: Attributes<Message>;
|
|
52
52
|
}> & (Readonly<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/button/button.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAI1D;;uBAEuB;AACvB,eAAO,MAAM,OAAO,4DAAoD,CAAC;AACzE,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC;AAE1C,yFAAyF;AACzF,MAAM,MAAM,IAAI,GAAG,QAAQ,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO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,uEAAuE;IACvE,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC3B,4FAA4F;IAC5F,UAAU,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;CAClC,CAAC,GACF,CAAC,QAAQ,CAAC;IAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC,CAAC;AAmBnG;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,GAAI,OAAO,UAAU,UAAU,CAAC,OAAO,CAAC,KAAK,WAAW,CAAC,OAAO,CAAC,KAAG,IA4CpF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandPalette.d.ts","sourceRoot":"","sources":["../../../src/commandPalette/commandPalette.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"commandPalette.d.ts","sourceRoot":"","sources":["../../../src/commandPalette/commandPalette.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,MAAM,EAAyB,MAAM,EAAE,MAAM,EAAwB,MAAM,QAAQ,CAAC;AACpG,OAAO,KAAK,cAAc,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EAAa,IAAI,EAAkC,MAAM,cAAc,CAAC;AAKpF,OAAO,KAAK,YAAY,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAoBzC,OAAO,KAAK,EAAU,OAAO,EAAQ,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAavC;;;;;;;;;;;kDAWkD;AAClD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;EAQhB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAA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