foldkit-mixins-builder 0.7.0 → 0.9.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/README.md CHANGED
@@ -24,16 +24,14 @@ test or an agent go through the same `update`.
24
24
 
25
25
  ## Mental model
26
26
 
27
- ```text
28
- Builder.make(...) the Builder: Model, update, a plain view
29
- |
30
- BuilderView.define(builder) the editor, as a SlotView over BuilderSlots,
31
- | .pipe(Style.attach(...)) with its keyboard and pointer Behaviors
32
- BuilderView.submodel(view) a Submodel view, drawn with BuilderView.inputs({ data })
33
- |
34
- builder.bundle.pipe(Bundle.withView(...)) placed on its own, or
35
- builder.inputWith(...) as a form key whose value is the page
36
- ```
27
+ 1. `Builder.make(...)` makes the Builder: Model, `update` and a plain view.
28
+ 2. `BuilderView.define(builder)` makes the editor, a SlotView over `BuilderSlots`,
29
+ with its keyboard and pointer Behaviors; attach your styles with
30
+ `.pipe(Style.attach(...))`.
31
+ 3. `BuilderView.submodel(view)` makes a Submodel view, drawn with
32
+ `BuilderView.inputs({ data })`.
33
+ 4. `builder.bundle.pipe(Bundle.withView(...))` places it on its own, or
34
+ `builder.inputWith(...)` makes it a form key whose value is the page.
37
35
 
38
36
  The page on the canvas is drawn by the site's Renderer, the same one the public
39
37
  page uses, in edit mode: each node is wrapped in an element carrying its id, so
@@ -132,8 +130,11 @@ Five Behaviors are attached, each from `foldkit-primitives`:
132
130
  | `canvas` | `Targets` | The pointer over a node marks it hovered; a press selects it and does not follow a link. |
133
131
  | `canvas` | `EditableText` | A double-click on text the page draws as a field, or Enter on its node, edits it where it is: typing sets the prop, Enter or leaving commits, Escape puts it back. A press in it selects text rather than dragging the node. |
134
132
  | `layers`, `canvas` | `KeepInView` | Whatever became selected (a click, a shortcut, an insert, the address) is scrolled into view, its row in the layers and its element on the page. |
135
- | `tree`, `canvas` | `PointerDrag` | A row or a node pressed and moved 4px is dragged; over another, the drop lands before it, inside it or after it by which third of it the pointer is in; releasing moves it there, and Escape cancels. |
136
- | `palette` | `PointerDrag`, onto the canvas | A Block's tile dragged onto the page lands the same way and adds a new node of it there; a press without a drag adds it where its title says. A pattern's tile is pressed, not dragged. |
133
+ | `tree`, `canvas` | `PointerDrag` | A row or a node pressed and moved 4px (a finger's: held still 400ms) is dragged; over another, the drop lands before it, inside it or after it by which third of it the pointer is in; releasing moves it where the pointer let go, and Escape or a cancelled pointer drops nothing. Held near the edge of the layers or the canvas, the drag scrolls it. |
134
+ | `nodeHandle` | `GripPlace` | Marks the handle `data-grip-place="inside"` where there is no room above the selected node for the grip: its top edge is within the grip's height of the top of what can be reached, the lowest of the scrolling ancestors' tops and the window's, each moved down by its `scroll-padding-top` (where an application says its sticky bar ends). `nodeGrip` then sits in the node's top corner. |
135
+ | `nodeHandle` | `PointerDrag`, onto the canvas and the layers | The selected node's grip drags it as a row or a node is dragged. A tap or a click on the grip opens `nodeMenu` instead: the node's commands (move, indent, duplicate, delete) as buttons, a `popover` the platform opens and closes, so a finger has every move a key has. The menu takes the pointer the handle refuses, and a closed one stays hidden whatever `display` a look gives `nodeMenu` (an important rule in `components`): give it `display` for when it is open. |
136
+ | `dragPreview` | `DragPreview` | What a drag carries, in the top layer above every panel, `aria-hidden` and taking no pointer, following the pointer by the custom properties `PointerDrag` writes on the root (`--fk-drag-x`, `--fk-drag-y`), so a move redraws nothing; a finger's sits above it, centred on it. Drawn by the `Carried` part. |
137
+ | `palette` | `PointerDrag`, onto the canvas and the layers | A Block's tile dragged onto the page, or onto a layer row, lands the same way (a row by its thirds, as a node is) and adds a new node of it there; a press without a drag adds it where its title says. A pattern's tile is pressed, not dragged. |
137
138
 
138
139
  The shortcuts are on the layers panel and the canvas, not the whole editor,
139
140
  so Delete in a text box edits the text. The canvas is focusable, so a press on
@@ -236,6 +237,24 @@ the node a drop would land at. A wrapper is `display: contents` and draws
236
237
  nothing, so style the element inside it. The layer rows carry
237
238
  `data-builder-drop` and `data-builder-dragging` the same way.
238
239
 
240
+ Over a container's own space (the page's, or a Section's padding or the gap
241
+ between two of its nodes) a drop lands between its children: before the first
242
+ whose middle, along the container's flow (a row, a column, right to left), is
243
+ past the pointer, else after the last, decided from where the pointer is when it
244
+ moves and again where it lets go. Only that container's children are measured.
245
+ Past the last node of the page itself it lands last, which the frame and the
246
+ layers' `tree` mark as `data-builder-drop="end"`. While a drag is under
247
+ way `dragPreview`, `canvas` and `tree` carry `data-drag-place`: `here` where a
248
+ drop would land and `nowhere` where it would be refused or the pointer is over
249
+ nothing, so a look can show the one and refuse the other (a dashed preview, a
250
+ `not-allowed` cursor).
251
+
252
+ A drag under way also writes the pointer's place on the document root, for
253
+ the preview and for any style of yours that follows the pointer: `--fk-drag-x`
254
+ and `--fk-drag-y` (pixels) and `data-fk-drag="mouse | touch | pen"`, all
255
+ removed when the drag ends. `dragPreview` reads them; the defaults put it
256
+ beside the pointer, and above a finger.
257
+
239
258
  ```css
240
259
  [data-composition-drop='before'] > * { box-shadow: 0 -3px 0 Highlight; }
241
260
  [data-composition-drop='after'] > * { box-shadow: 0 3px 0 Highlight; }
@@ -261,7 +280,8 @@ const Compact = BuilderView.assemble((_model, slots, h, draw) =>
261
280
  ```
262
281
 
263
282
  The parts are `Panels`, `Palette`, `Layers`, `Inspector`, `Toolbar`, `Crumbs`,
264
- `Viewports`, `Preview`, `Alert`, `Canvas` and `Live`. Each brings its own
283
+ `Viewports`, `Preview`, `Alert`, `Canvas`, `Carried` (what a drag carries; a
284
+ layout without it shows nothing following a drag) and `Live`. Each brings its own
265
285
  Behaviors: `Layers` its tree keyboard and dragging, `Canvas` the pointer, and
266
286
  both the shortcuts. A layout without `Layers` has no tree keyboard. Styles
267
287
  attach to `Compact` as to `define`'s view.
@@ -527,8 +547,12 @@ the page for that context: a node hidden there is still drawn, marked
527
547
  under the Builder's name, and one drawn twice is a crash that says so. Its
528
548
  fields' ids are `<Block>Settings-<prop>`, so two Builders over one Catalog
529
549
  showing the same Block also share ids.
530
- - A drag does not scroll the layers or the canvas when the pointer nears an
531
- edge.
550
+ - The grip is drawn over the selected node, above its top edge: a page whose
551
+ first node touches the top of the canvas needs room there for it. Its menu
552
+ places itself beside the grip with CSS anchor positioning; a browser without
553
+ it opens the menu in the middle of the window. A finger drags only after a
554
+ hold, as `PointerDrag` does everywhere: the grip is for holding, the menu for
555
+ tapping.
532
556
  - The viewport frame sets a width: `--fk-frame-width` on the frame, read by
533
557
  the Builder's one default rule (in `components`, so any application style
534
558
  overrides it). It does not load the page in an iframe, so the page's media
@@ -0,0 +1,11 @@
1
+ import * as Mount from "foldkit/mount";
2
+ /** What the grip's handle is marked with when the grip has no room above the node. */
3
+ export declare const GRIP_PLACE_ATTRIBUTE = "grip-place";
4
+ /**
5
+ * Puts the grip inside the selected node's top edge when above it there is no room: the node's top is
6
+ * within the grip's height of the top of what is reachable, such as under a sticky bar the page
7
+ * declared with `scroll-padding-top`. The element it is mounted on is marked `data-grip-place="inside"`
8
+ * then, and a look places the grip there. It watches the scroll and the box's own moves, a frame at a time.
9
+ */
10
+ export declare const GripPlace: Mount.MountDefinitionWithArgs<"GripPlace", {}, never>;
11
+ //# sourceMappingURL=gripPlace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gripPlace.d.ts","names":[],"sources":["../src/gripPlace.ts"],"mappings":";;qBAIa;;;;;;;qBA0BA,WAAS,MAAA"}
@@ -0,0 +1,67 @@
1
+ import { Effect, Schema, Stream } from "effect";
2
+ import * as Mount from "foldkit/mount";
3
+ // src/gripPlace.ts
4
+ /** What the grip's handle is marked with when the grip has no room above the node. */
5
+ const GRIP_PLACE_ATTRIBUTE = "grip-place";
6
+ /**
7
+ * The top of what a person can see and reach of `element`: the lowest of the tops of the scrolling
8
+ * ancestors and the window, each moved down by its `scroll-padding-top`, which is where an
9
+ * application says its sticky chrome ends.
10
+ */
11
+ const reachableTop = (element) => {
12
+ const view = element.ownerDocument.defaultView;
13
+ if (view === null) return 0;
14
+ const padding = (style) => Number.parseFloat(style.scrollPaddingTop) || 0;
15
+ let top = padding(view.getComputedStyle(element.ownerDocument.documentElement));
16
+ for (let at = element.parentElement; at !== null; at = at.parentElement) {
17
+ const style = view.getComputedStyle(at);
18
+ if (/auto|scroll|overlay|hidden|clip/.test(style.overflowY)) top = Math.max(top, at.getBoundingClientRect().top + padding(style));
19
+ }
20
+ return top;
21
+ };
22
+ /**
23
+ * Puts the grip inside the selected node's top edge when above it there is no room: the node's top is
24
+ * within the grip's height of the top of what is reachable, such as under a sticky bar the page
25
+ * declared with `scroll-padding-top`. The element it is mounted on is marked `data-grip-place="inside"`
26
+ * then, and a look places the grip there. It watches the scroll and the box's own moves, a frame at a time.
27
+ */
28
+ const GripPlace = Mount.defineStream("GripPlace", {
29
+ messages: [Schema.Never],
30
+ args: {},
31
+ execute: ({ element }) => Stream.callback(() => Effect.acquireRelease(Effect.sync(() => {
32
+ const view = element.ownerDocument.defaultView;
33
+ let frame;
34
+ const place = () => {
35
+ frame = void 0;
36
+ const grip = element.querySelector("[data-builder-handle]");
37
+ const box = element.getBoundingClientRect();
38
+ if (grip === null || box.width === 0) return;
39
+ if (box.top - grip.offsetHeight < reachableTop(element)) element.setAttribute(`data-${GRIP_PLACE_ATTRIBUTE}`, "inside");
40
+ else element.removeAttribute(`data-${GRIP_PLACE_ATTRIBUTE}`);
41
+ };
42
+ const soon = () => {
43
+ if (frame === void 0 && view !== null) frame = view.requestAnimationFrame(place);
44
+ };
45
+ const canvas = element.parentElement;
46
+ const observer = new MutationObserver(soon);
47
+ if (canvas !== null) observer.observe(canvas, {
48
+ attributes: true,
49
+ attributeFilter: ["style"]
50
+ });
51
+ view?.addEventListener("scroll", soon, {
52
+ capture: true,
53
+ passive: true
54
+ });
55
+ view?.addEventListener("resize", soon, { passive: true });
56
+ soon();
57
+ return () => {
58
+ observer.disconnect();
59
+ view?.removeEventListener("scroll", soon, { capture: true });
60
+ view?.removeEventListener("resize", soon);
61
+ if (frame !== void 0) view?.cancelAnimationFrame(frame);
62
+ };
63
+ }), (stop) => Effect.sync(stop)))
64
+ });
65
+ export { GRIP_PLACE_ATTRIBUTE, GripPlace };
66
+
67
+ //# sourceMappingURL=gripPlace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gripPlace.js","names":[],"sources":["../src/gripPlace.ts"],"sourcesContent":["import { Effect, Schema, Stream } from 'effect'\nimport * as Mount from 'foldkit/mount'\n\n/** What the grip's handle is marked with when the grip has no room above the node. */\nexport const GRIP_PLACE_ATTRIBUTE = 'grip-place'\n\n/**\n * The top of what a person can see and reach of `element`: the lowest of the tops of the scrolling\n * ancestors and the window, each moved down by its `scroll-padding-top`, which is where an\n * application says its sticky chrome ends.\n */\nconst reachableTop = (element: Element): number => {\n const view = element.ownerDocument.defaultView\n if (view === null) return 0\n const padding = (style: CSSStyleDeclaration) => Number.parseFloat(style.scrollPaddingTop) || 0\n let top = padding(view.getComputedStyle(element.ownerDocument.documentElement))\n for (let at = element.parentElement; at !== null; at = at.parentElement) {\n const style = view.getComputedStyle(at)\n if (/auto|scroll|overlay|hidden|clip/.test(style.overflowY))\n top = Math.max(top, at.getBoundingClientRect().top + padding(style))\n }\n return top\n}\n\n/**\n * Puts the grip inside the selected node's top edge when above it there is no room: the node's top is\n * within the grip's height of the top of what is reachable, such as under a sticky bar the page\n * declared with `scroll-padding-top`. The element it is mounted on is marked `data-grip-place=\"inside\"`\n * then, and a look places the grip there. It watches the scroll and the box's own moves, a frame at a time.\n */\nexport const GripPlace = Mount.defineStream('GripPlace', {\n messages: [Schema.Never],\n args: {},\n execute: ({ element }) =>\n Stream.callback<never>(() =>\n Effect.acquireRelease(\n Effect.sync(() => {\n const view = element.ownerDocument.defaultView\n let frame: number | undefined\n const place = () => {\n frame = undefined\n const grip = element.querySelector<HTMLElement>('[data-builder-handle]')\n const box = element.getBoundingClientRect()\n if (grip === null || box.width === 0) return\n const inside = box.top - grip.offsetHeight < reachableTop(element)\n if (inside) element.setAttribute(`data-${GRIP_PLACE_ATTRIBUTE}`, 'inside')\n else element.removeAttribute(`data-${GRIP_PLACE_ATTRIBUTE}`)\n }\n const soon = () => {\n if (frame === undefined && view !== null) frame = view.requestAnimationFrame(place)\n }\n // The box is placed by custom properties its canvas gets, so the canvas's `style` is watched too.\n const canvas = element.parentElement\n const observer = new MutationObserver(soon)\n if (canvas !== null)\n observer.observe(canvas, { attributes: true, attributeFilter: ['style'] })\n view?.addEventListener('scroll', soon, { capture: true, passive: true })\n view?.addEventListener('resize', soon, { passive: true })\n soon()\n return () => {\n observer.disconnect()\n view?.removeEventListener('scroll', soon, { capture: true })\n view?.removeEventListener('resize', soon)\n if (frame !== undefined) view?.cancelAnimationFrame(frame)\n }\n }),\n stop => Effect.sync(stop),\n ),\n ),\n})\n"],"mappings":";;;;AAIA,MAAa,uBAAuB;;;;;;AAOpC,MAAM,gBAAgB,YAA6B;CACjD,MAAM,OAAO,QAAQ,cAAc;CACnC,IAAI,SAAS,MAAM,OAAO;CAC1B,MAAM,WAAW,UAA+B,OAAO,WAAW,MAAM,gBAAgB,KAAK;CAC7F,IAAI,MAAM,QAAQ,KAAK,iBAAiB,QAAQ,cAAc,eAAe,CAAC;CAC9E,KAAK,IAAI,KAAK,QAAQ,eAAe,OAAO,MAAM,KAAK,GAAG,eAAe;EACvE,MAAM,QAAQ,KAAK,iBAAiB,EAAE;EACtC,IAAI,kCAAkC,KAAK,MAAM,SAAS,GACxD,MAAM,KAAK,IAAI,KAAK,GAAG,sBAAsB,CAAC,CAAC,MAAM,QAAQ,KAAK,CAAC;CACvE;CACA,OAAO;AACT;;;;;;;AAQA,MAAa,YAAY,MAAM,aAAa,aAAa;CACvD,UAAU,CAAC,OAAO,KAAK;CACvB,MAAM,CAAC;CACP,UAAU,EAAE,cACV,OAAO,eACL,OAAO,eACL,OAAO,WAAW;EAChB,MAAM,OAAO,QAAQ,cAAc;EACnC,IAAI;EACJ,MAAM,cAAc;GAClB,QAAQ,KAAA;GACR,MAAM,OAAO,QAAQ,cAA2B,uBAAuB;GACvE,MAAM,MAAM,QAAQ,sBAAsB;GAC1C,IAAI,SAAS,QAAQ,IAAI,UAAU,GAAG;GAEtC,IADe,IAAI,MAAM,KAAK,eAAe,aAAa,OAAO,GACrD,QAAQ,aAAa,QAAQ,wBAAwB,QAAQ;QACpE,QAAQ,gBAAgB,QAAQ,sBAAsB;EAC7D;EACA,MAAM,aAAa;GACjB,IAAI,UAAU,KAAA,KAAa,SAAS,MAAM,QAAQ,KAAK,sBAAsB,KAAK;EACpF;EAEA,MAAM,SAAS,QAAQ;EACvB,MAAM,WAAW,IAAI,iBAAiB,IAAI;EAC1C,IAAI,WAAW,MACb,SAAS,QAAQ,QAAQ;GAAE,YAAY;GAAM,iBAAiB,CAAC,OAAO;EAAE,CAAC;EAC3E,MAAM,iBAAiB,UAAU,MAAM;GAAE,SAAS;GAAM,SAAS;EAAK,CAAC;EACvE,MAAM,iBAAiB,UAAU,MAAM,EAAE,SAAS,KAAK,CAAC;EACxD,KAAK;EACL,aAAa;GACX,SAAS,WAAW;GACpB,MAAM,oBAAoB,UAAU,MAAM,EAAE,SAAS,KAAK,CAAC;GAC3D,MAAM,oBAAoB,UAAU,IAAI;GACxC,IAAI,UAAU,KAAA,GAAW,MAAM,qBAAqB,KAAK;EAC3D;CACF,CAAC,IACD,SAAQ,OAAO,KAAK,IAAI,CAC1B,CACF;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -104,6 +104,24 @@ export declare const BuilderSlots: Slots.Contract<{
104
104
  readonly selectionLabel: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
105
105
  /** Over the node under the pointer, as the selection's box is placed. */
106
106
  readonly hoverBox: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
107
+ /**
108
+ * Over the selected node, placed as its box is, holding the handle that moves it:
109
+ * a pointer's press and move or a finger's hold drags the node, a tap or a click on
110
+ * the grip opens `nodeMenu`. It takes no pointer itself; `nodeGrip` does.
111
+ */
112
+ readonly nodeHandle: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
113
+ /** The grip: a button, always drawn for the selected node, so a finger has something to hold. Carries `data-builder-handle`. */
114
+ readonly nodeGrip: Slot.UnnamedSlot<Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
115
+ /** What the selected node can do without a drag: its commands (move, indent, duplicate, delete), a popover opened by the grip. */
116
+ readonly nodeMenu: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
117
+ readonly nodeAction: Slot.UnnamedSlot<Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
118
+ /**
119
+ * What a drag carries, following the pointer in the top layer for as long as the drag
120
+ * lasts, hidden from assistive technology and taking no pointer. Carries `data-drag-source`.
121
+ */
122
+ readonly dragPreview: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
123
+ readonly dragPreviewLabel: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
124
+ readonly dragPreviewSummary: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
107
125
  /** The live region the Builder's announcements are read from. */
108
126
  readonly live: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
109
127
  }>;
@@ -137,6 +155,8 @@ export declare const ROW_ATTRIBUTE = "builder-row";
137
155
  export declare const ROW_DROP_ATTRIBUTE = "builder-drop";
138
156
  /** On the row being dragged. */
139
157
  export declare const ROW_DRAGGING_ATTRIBUTE = "builder-dragging";
158
+ /** On the selected node's grip, holding its node's id, for a drag to find. */
159
+ export declare const HANDLE_ATTRIBUTE = "builder-handle";
140
160
  /** The DOM id a layer row carries, so keyboard focus can find it. */
141
161
  export declare const layerId: (builder: {
142
162
  readonly name: string;
@@ -217,6 +237,8 @@ export interface BuilderParts {
217
237
  readonly Alert: BuilderPart;
218
238
  /** The page, drawn by the site's Renderer, with the pointer. */
219
239
  readonly Canvas: BuilderPart;
240
+ /** What a drag carries, following the pointer while it lasts; nothing otherwise. Draw it once, anywhere. */
241
+ readonly Carried: BuilderPart;
220
242
  /** What the Builder announces to a screen reader. */
221
243
  readonly Live: BuilderPart;
222
244
  }
@@ -347,6 +369,24 @@ export declare const BuilderView: {
347
369
  readonly selectionLabel: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
348
370
  /** Over the node under the pointer, as the selection's box is placed. */
349
371
  readonly hoverBox: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
372
+ /**
373
+ * Over the selected node, placed as its box is, holding the handle that moves it:
374
+ * a pointer's press and move or a finger's hold drags the node, a tap or a click on
375
+ * the grip opens `nodeMenu`. It takes no pointer itself; `nodeGrip` does.
376
+ */
377
+ readonly nodeHandle: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
378
+ /** The grip: a button, always drawn for the selected node, so a finger has something to hold. Carries `data-builder-handle`. */
379
+ readonly nodeGrip: Slot.UnnamedSlot<Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
380
+ /** What the selected node can do without a drag: its commands (move, indent, duplicate, delete), a popover opened by the grip. */
381
+ readonly nodeMenu: Slot.UnnamedSlot<Capability.Capability<"Container", readonly [Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
382
+ readonly nodeAction: Slot.UnnamedSlot<Capability.Capability<"Interactive", readonly [Capability.Capability<"Base", readonly []>]>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
383
+ /**
384
+ * What a drag carries, following the pointer in the top layer for as long as the drag
385
+ * lasts, hidden from assistive technology and taking no pointer. Carries `data-drag-source`.
386
+ */
387
+ readonly dragPreview: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
388
+ readonly dragPreviewLabel: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
389
+ readonly dragPreviewSummary: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
350
390
  /** The live region the Builder's announcements are read from. */
351
391
  readonly live: Slot.UnnamedSlot<Capability.Capability<"Base", readonly []>, readonly Slot.EventName[], readonly Slot.AttributeName[], readonly Slot.RequirementName[], boolean>;
352
392
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["BuilderWords"],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;qBA8Ea,cAAY,MAAA;;;;;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