@joewinke/jatui 0.1.31 → 0.1.33

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.
@@ -22,6 +22,17 @@
22
22
  * transcript shows just the headline by default and the body is
23
23
  * a drill-down. This is what keeps the left column readable.
24
24
  */
25
+ var __assign = (this && this.__assign) || function () {
26
+ __assign = Object.assign || function(t) {
27
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
28
+ s = arguments[i];
29
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
30
+ t[p] = s[p];
31
+ }
32
+ return t;
33
+ };
34
+ return __assign.apply(this, arguments);
35
+ };
25
36
  export function rawTypeToState(raw) {
26
37
  switch (raw) {
27
38
  case 'needs_input':
@@ -37,27 +48,28 @@ export function rawTypeToState(raw) {
37
48
  }
38
49
  /** Detect a `jat-signal <type> '<json>'` invocation in a tool-call body. */
39
50
  function parseSignalBody(body) {
40
- const m = body.match(/jat-signal\s+(starting|working|needs_input|review|completing|complete|completed|paused|idle)\b/);
51
+ var m = body.match(/jat-signal\s+(starting|working|needs_input|review|completing|complete|completed|paused|idle)\b/);
41
52
  if (!m)
42
53
  return null;
43
- let label = '';
44
- const pick = body.match(/"(?:approach|question|reviewFocus|currentStep|summary|reason|taskTitle)"\s*:\s*"([^"]{3,90})/);
54
+ var label = '';
55
+ var pick = body.match(/"(?:approach|question|reviewFocus|currentStep|summary|reason|taskTitle)"\s*:\s*"([^"]{3,90})/);
45
56
  if (pick)
46
57
  label = pick[1];
47
- return { rawType: m[1], label };
58
+ return { rawType: m[1], label: label };
48
59
  }
49
60
  /** Build the linked model from rendered transcript lines. */
50
61
  export function buildLinkedSession(lines) {
51
- const items = [];
52
- const emits = [];
53
- let cur = null;
54
- const flush = () => {
62
+ var items = [];
63
+ var emits = [];
64
+ var cur = null;
65
+ var flush = function () {
55
66
  if (cur) {
56
- items.push({ id: items.length, ...cur, signalId: null });
67
+ items.push(__assign(__assign({ id: items.length }, cur), { signalId: null }));
57
68
  cur = null;
58
69
  }
59
70
  };
60
- for (const line of lines) {
71
+ for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {
72
+ var line = lines_1[_i];
61
73
  if (!line.trim()) {
62
74
  flush();
63
75
  continue;
@@ -68,8 +80,8 @@ export function buildLinkedSession(lines) {
68
80
  continue;
69
81
  }
70
82
  if (line.startsWith('⏺ ')) {
71
- const body = line.slice(2);
72
- const sig = parseSignalBody(body);
83
+ var body = line.slice(2);
84
+ var sig = parseSignalBody(body);
73
85
  if (sig) {
74
86
  // signal emission = boundary; consume it, don't render as an item
75
87
  flush();
@@ -81,7 +93,7 @@ export function buildLinkedSession(lines) {
81
93
  continue;
82
94
  }
83
95
  if (line.startsWith(' ⎿ ')) {
84
- const body = line.slice(4);
96
+ var body = line.slice(4);
85
97
  if (cur) {
86
98
  cur.detail.push(body);
87
99
  cur.srcLines++;
@@ -90,7 +102,7 @@ export function buildLinkedSession(lines) {
90
102
  }
91
103
  if (line.startsWith(' ')) {
92
104
  // continuation: tool detail for actions, prose for prompt/assistant
93
- const body = line.trimStart();
105
+ var body = line.trimStart();
94
106
  if (cur && cur.kind === 'action') {
95
107
  cur.detail.push(body);
96
108
  cur.srcLines++;
@@ -113,21 +125,21 @@ export function buildLinkedSession(lines) {
113
125
  }
114
126
  flush();
115
127
  // Build signal nodes from emission boundaries.
116
- const signals = [];
117
- let prevBoundary = -1;
118
- emits.forEach((e, i) => {
119
- const rowStart = Math.max(0, prevBoundary + 1);
120
- const rowEnd = Math.max(rowStart, e.afterIdx);
121
- let lineCount = 0;
122
- for (let k = rowStart; k <= rowEnd && k < items.length; k++)
128
+ var signals = [];
129
+ var prevBoundary = -1;
130
+ emits.forEach(function (e, i) {
131
+ var rowStart = Math.max(0, prevBoundary + 1);
132
+ var rowEnd = Math.max(rowStart, e.afterIdx);
133
+ var lineCount = 0;
134
+ for (var k = rowStart; k <= rowEnd && k < items.length; k++)
123
135
  lineCount += items[k].srcLines;
124
136
  signals.push({
125
- id: `sig-${i}`,
137
+ id: "sig-".concat(i),
126
138
  state: rawTypeToState(e.rawType),
127
139
  rawType: e.rawType,
128
140
  label: e.label,
129
- rowStart,
130
- rowEnd,
141
+ rowStart: rowStart,
142
+ rowEnd: rowEnd,
131
143
  lineCount: Math.max(1, lineCount),
132
144
  // No WorkBlock substrate data in the raw-lines path
133
145
  blockId: null,
@@ -139,12 +151,13 @@ export function buildLinkedSession(lines) {
139
151
  });
140
152
  prevBoundary = e.afterIdx;
141
153
  });
142
- for (const sig of signals) {
143
- for (let k = sig.rowStart; k <= sig.rowEnd && k < items.length; k++) {
154
+ for (var _a = 0, signals_1 = signals; _a < signals_1.length; _a++) {
155
+ var sig = signals_1[_a];
156
+ for (var k = sig.rowStart; k <= sig.rowEnd && k < items.length; k++) {
144
157
  items[k].signalId = sig.id;
145
158
  }
146
159
  }
147
- return { items, signals };
160
+ return { items: items, signals: signals };
148
161
  }
149
162
  /**
150
163
  * Build a LinkedSession from the WorkBlock substrate (B1).
@@ -162,45 +175,49 @@ export function buildLinkedSession(lines) {
162
175
  */
163
176
  export function buildLinkedSessionFromWork(blocks, items) {
164
177
  // Map WorkTranscriptItem → TranscriptItem (blockId → signalId mapping happens after)
165
- const transcriptItems = items.map((it) => ({
178
+ var transcriptItems = items.map(function (it) { return ({
166
179
  id: it.id,
167
180
  kind: it.kind,
168
181
  headline: it.headline,
169
182
  detail: it.detail,
170
183
  srcLines: it.srcLines,
171
184
  signalId: null // filled in below
172
- }));
185
+ }); });
173
186
  // Map WorkBlock → SignalNode
174
- const signals = blocks.map((blk) => ({
175
- id: blk.id,
176
- state: rawTypeToState(blk.signal.type),
177
- rawType: blk.signal.type,
178
- label: blk.signal.label,
179
- rowStart: blk.itemRange.start,
180
- rowEnd: blk.itemRange.end,
181
- lineCount: blk.lineCount,
182
- // WorkBlock substrate fields
183
- blockId: blk.id,
184
- summary: blk.summary,
185
- filesTouched: blk.filesTouched,
186
- commits: blk.commits ?? [],
187
- linesAdded: blk.linesAdded ?? 0,
188
- linesRemoved: blk.linesRemoved ?? 0
189
- }));
187
+ var signals = blocks.map(function (blk) {
188
+ var _a, _b, _c;
189
+ return ({
190
+ id: blk.id,
191
+ state: rawTypeToState(blk.signal.type),
192
+ rawType: blk.signal.type,
193
+ label: blk.signal.label,
194
+ rowStart: blk.itemRange.start,
195
+ rowEnd: blk.itemRange.end,
196
+ lineCount: blk.lineCount,
197
+ // WorkBlock substrate fields
198
+ blockId: blk.id,
199
+ summary: blk.summary,
200
+ filesTouched: blk.filesTouched,
201
+ commits: (_a = blk.commits) !== null && _a !== void 0 ? _a : [],
202
+ linesAdded: (_b = blk.linesAdded) !== null && _b !== void 0 ? _b : 0,
203
+ linesRemoved: (_c = blk.linesRemoved) !== null && _c !== void 0 ? _c : 0
204
+ });
205
+ });
190
206
  // Assign signalId to transcript items via block ownership
191
- for (const sig of signals) {
192
- for (let k = sig.rowStart; k <= sig.rowEnd && k < transcriptItems.length; k++) {
207
+ for (var _i = 0, signals_2 = signals; _i < signals_2.length; _i++) {
208
+ var sig = signals_2[_i];
209
+ for (var k = sig.rowStart; k <= sig.rowEnd && k < transcriptItems.length; k++) {
193
210
  transcriptItems[k].signalId = sig.id;
194
211
  }
195
212
  }
196
- return { items: transcriptItems, signals };
213
+ return { items: transcriptItems, signals: signals };
197
214
  }
198
215
  /**
199
216
  * A baked, realistic sample so /sankey always demos beautifully even with no live
200
217
  * session. Authored as raw transcript lines with real `jat-signal` calls, so it
201
218
  * flows through the EXACT same parser as live data.
202
219
  */
203
- export const SAMPLE_TRANSCRIPT_LINES = [
220
+ export var SAMPLE_TRANSCRIPT_LINES = [
204
221
  '',
205
222
  '› /jat:start GentleCoast jat-7h2k',
206
223
  '⏺ Bash(get-current-session-id)',
@@ -3,7 +3,7 @@
3
3
  * Each emoji has a character and searchable name.
4
4
  * Based on Unicode CLDR emoji ordering, minus most flags.
5
5
  */
6
- export const EMOJI_DATA = [
6
+ export var EMOJI_DATA = [
7
7
  {
8
8
  label: 'Smileys & Emotion',
9
9
  emojis: [
@@ -1186,11 +1186,11 @@ export const EMOJI_DATA = [
1186
1186
  },
1187
1187
  ];
1188
1188
  /** Flat array of all emojis for search */
1189
- export const ALL_EMOJIS = EMOJI_DATA.flatMap((g) => g.emojis);
1189
+ export var ALL_EMOJIS = EMOJI_DATA.flatMap(function (g) { return g.emojis; });
1190
1190
  /** Search emojis by name, returns matching entries */
1191
1191
  export function searchEmojis(query) {
1192
1192
  if (!query.trim())
1193
1193
  return [];
1194
- const terms = query.toLowerCase().split(/\s+/);
1195
- return ALL_EMOJIS.filter((e) => terms.every((t) => e.name.includes(t)));
1194
+ var terms = query.toLowerCase().split(/\s+/);
1195
+ return ALL_EMOJIS.filter(function (e) { return terms.every(function (t) { return e.name.includes(t); }); });
1196
1196
  }
@@ -1,25 +1,27 @@
1
1
  import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
2
- export const autoScroll = (node, params) => {
3
- let current = params ?? {};
2
+ export var autoScroll = function (node, params) {
3
+ var current = params !== null && params !== void 0 ? params : {};
4
4
  function register() {
5
5
  return autoScrollForElements({
6
6
  element: node,
7
- canScroll: ({ source }) => {
8
- if (!current.types?.length)
7
+ canScroll: function (_a) {
8
+ var _b;
9
+ var source = _a.source;
10
+ if (!((_b = current.types) === null || _b === void 0 ? void 0 : _b.length))
9
11
  return true;
10
12
  return current.types.includes(source.data.type);
11
13
  },
12
- getAllowedAxis: () => current.axis ?? 'all',
13
- getConfiguration: () => ({ maxScrollSpeed: current.speed ?? 'standard' }),
14
+ getAllowedAxis: function () { var _a; return (_a = current.axis) !== null && _a !== void 0 ? _a : 'all'; },
15
+ getConfiguration: function () { var _a; return ({ maxScrollSpeed: (_a = current.speed) !== null && _a !== void 0 ? _a : 'standard' }); },
14
16
  });
15
17
  }
16
- let cleanup = register();
18
+ var cleanup = register();
17
19
  return {
18
- update(next) {
19
- current = next ?? {};
20
+ update: function (next) {
21
+ current = next !== null && next !== void 0 ? next : {};
20
22
  cleanup();
21
23
  cleanup = register();
22
24
  },
23
- destroy: () => cleanup(),
25
+ destroy: function () { return cleanup(); },
24
26
  };
25
27
  };
@@ -1,28 +1,40 @@
1
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3
+ if (ar || !(i in from)) {
4
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
5
+ ar[i] = from[i];
6
+ }
7
+ }
8
+ return to.concat(ar || Array.prototype.slice.call(from));
9
+ };
1
10
  import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
2
11
  import { extractClosestEdge, attachClosestEdge, } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
3
12
  import { SvelteMap } from 'svelte/reactivity';
4
13
  import { announce } from './announce';
5
14
  import { makeItemData, isItemData, } from './types';
6
- const SHADOW_KEY = '__dnd-shadow__';
15
+ var SHADOW_KEY = '__dnd-shadow__';
7
16
  export function createDndBoard(opts) {
8
- const edges = opts.edges ?? ['top', 'bottom'];
9
- const hover = opts.hover ?? 'indicator';
10
- const mirror = new SvelteMap();
11
- let dragging = $state(null);
12
- let proposal = $state(null);
13
- const seq = new Map();
14
- let inFlight = 0;
15
- let seedQueued = false;
17
+ var _a, _b;
18
+ var edges = (_a = opts.edges) !== null && _a !== void 0 ? _a : ['top', 'bottom'];
19
+ var hover = (_b = opts.hover) !== null && _b !== void 0 ? _b : 'indicator';
20
+ var mirror = new SvelteMap();
21
+ var dragging = $state(null);
22
+ var proposal = $state(null);
23
+ var seq = new Map();
24
+ var inFlight = 0;
25
+ var seedQueued = false;
16
26
  function seed() {
17
27
  mirror.clear();
18
- const src = opts.items();
19
- const entries = src instanceof Map
28
+ var src = opts.items();
29
+ var entries = src instanceof Map
20
30
  ? src
21
31
  : new Map(Object.entries(src));
22
- for (const [id, list] of entries)
23
- mirror.set(id, [...list]);
32
+ for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
33
+ var _a = entries_1[_i], id = _a[0], list = _a[1];
34
+ mirror.set(id, __spreadArray([], list, true));
35
+ }
24
36
  }
25
- $effect(() => {
37
+ $effect(function () {
26
38
  opts.items();
27
39
  if (dragging || inFlight > 0) {
28
40
  seedQueued = true;
@@ -31,52 +43,57 @@ export function createDndBoard(opts) {
31
43
  seed();
32
44
  });
33
45
  function placementFrom(dropTargets) {
34
- const inner = dropTargets[0];
46
+ var _a;
47
+ var inner = dropTargets[0];
35
48
  if (!inner)
36
49
  return null;
37
- const d = inner.data;
50
+ var d = inner.data;
38
51
  if (typeof d.container !== 'string')
39
52
  return null;
40
- const list = mirror.get(d.container) ?? [];
53
+ var list = (_a = mirror.get(d.container)) !== null && _a !== void 0 ? _a : [];
41
54
  if (typeof d.index !== 'number')
42
55
  return { container: d.container, index: list.length };
43
- const edge = extractClosestEdge(d);
44
- const after = edge === 'bottom' || edge === 'right';
56
+ var edge = extractClosestEdge(d);
57
+ var after = edge === 'bottom' || edge === 'right';
45
58
  return { container: d.container, index: d.index + (after ? 1 : 0) };
46
59
  }
47
60
  function syncShadow(next) {
48
- for (const [cid, list] of mirror) {
49
- const idx = list.findIndex((item) => item[SHADOW_KEY]);
61
+ var _a;
62
+ var _b;
63
+ for (var _i = 0, mirror_1 = mirror; _i < mirror_1.length; _i++) {
64
+ var _c = mirror_1[_i], cid = _c[0], list_1 = _c[1];
65
+ var idx = list_1.findIndex(function (item) { return item[SHADOW_KEY]; });
50
66
  if (idx !== -1) {
51
- list.splice(idx, 1);
52
- mirror.set(cid, list);
67
+ list_1.splice(idx, 1);
68
+ mirror.set(cid, list_1);
53
69
  break;
54
70
  }
55
71
  }
56
72
  if (!next || !dragging)
57
73
  return;
58
- const list = [...(mirror.get(next.container) ?? [])];
59
- const shadowItem = { [SHADOW_KEY]: true, key: `${SHADOW_KEY}-${dragging.key}` };
74
+ var list = __spreadArray([], ((_b = mirror.get(next.container)) !== null && _b !== void 0 ? _b : []), true);
75
+ var shadowItem = (_a = {}, _a[SHADOW_KEY] = true, _a.key = "".concat(SHADOW_KEY, "-").concat(dragging.key), _a);
60
76
  list.splice(Math.min(next.index, list.length), 0, shadowItem);
61
77
  mirror.set(next.container, list);
62
78
  }
63
79
  function consider(next) {
64
- if (next?.container === proposal?.container && next?.index === proposal?.index)
80
+ if ((next === null || next === void 0 ? void 0 : next.container) === (proposal === null || proposal === void 0 ? void 0 : proposal.container) && (next === null || next === void 0 ? void 0 : next.index) === (proposal === null || proposal === void 0 ? void 0 : proposal.index))
65
81
  return;
66
82
  proposal = next;
67
83
  if (hover === 'shadow')
68
84
  syncShadow(next);
69
85
  }
70
86
  function applyToMirror(move) {
71
- const fromList = [...(mirror.get(move.from.container) ?? [])];
72
- const toList = move.from.container === move.to.container
87
+ var _a, _b;
88
+ var fromList = __spreadArray([], ((_a = mirror.get(move.from.container)) !== null && _a !== void 0 ? _a : []), true);
89
+ var toList = move.from.container === move.to.container
73
90
  ? fromList
74
- : [...(mirror.get(move.to.container) ?? [])];
75
- const srcIdx = fromList.findIndex((it) => opts.key(it) === opts.key(move.item));
91
+ : __spreadArray([], ((_b = mirror.get(move.to.container)) !== null && _b !== void 0 ? _b : []), true);
92
+ var srcIdx = fromList.findIndex(function (it) { return opts.key(it) === opts.key(move.item); });
76
93
  if (srcIdx === -1)
77
94
  return;
78
95
  fromList.splice(srcIdx, 1);
79
- let destIdx = move.to.index;
96
+ var destIdx = move.to.index;
80
97
  if (move.from.container === move.to.container && move.to.index > move.from.index) {
81
98
  destIdx = Math.max(0, destIdx - 1);
82
99
  }
@@ -87,21 +104,24 @@ export function createDndBoard(opts) {
87
104
  }
88
105
  }
89
106
  function rollback(move) {
90
- for (const [cid, list] of mirror) {
91
- const idx = list.findIndex((it) => opts.key(it) === opts.key(move.item));
107
+ var _a;
108
+ for (var _i = 0, mirror_2 = mirror; _i < mirror_2.length; _i++) {
109
+ var _b = mirror_2[_i], cid = _b[0], list = _b[1];
110
+ var idx = list.findIndex(function (it) { return opts.key(it) === opts.key(move.item); });
92
111
  if (idx !== -1) {
93
112
  list.splice(idx, 1);
94
113
  mirror.set(cid, list);
95
114
  break;
96
115
  }
97
116
  }
98
- const fromList = [...(mirror.get(move.from.container) ?? [])];
117
+ var fromList = __spreadArray([], ((_a = mirror.get(move.from.container)) !== null && _a !== void 0 ? _a : []), true);
99
118
  fromList.splice(Math.min(move.from.index, fromList.length), 0, move.item);
100
119
  mirror.set(move.from.container, fromList);
101
120
  }
102
121
  function finalize(dropped) {
103
- const drag = dragging;
104
- const to = dropped ? proposal : null;
122
+ var _a;
123
+ var drag = dragging;
124
+ var to = dropped ? proposal : null;
105
125
  dragging = null;
106
126
  consider(null);
107
127
  if (!drag)
@@ -114,21 +134,22 @@ export function createDndBoard(opts) {
114
134
  }
115
135
  return;
116
136
  }
117
- const move = { item: drag.item, from: drag.from, to };
137
+ var move = { item: drag.item, from: drag.from, to: to };
118
138
  applyToMirror(move);
119
139
  if (opts.announce)
120
140
  announce(opts.announce(move));
121
- const token = (seq.get(drag.key) ?? 0) + 1;
141
+ var token = ((_a = seq.get(drag.key)) !== null && _a !== void 0 ? _a : 0) + 1;
122
142
  seq.set(drag.key, token);
123
143
  inFlight++;
124
144
  opts
125
145
  .commit(move)
126
- .catch((error) => {
146
+ .catch(function (error) {
147
+ var _a;
127
148
  if (seq.get(drag.key) === token)
128
149
  rollback(move);
129
- opts.onError?.(error, move);
150
+ (_a = opts.onError) === null || _a === void 0 ? void 0 : _a.call(opts, error, move);
130
151
  })
131
- .finally(() => {
152
+ .finally(function () {
132
153
  inFlight--;
133
154
  if (inFlight === 0 && seedQueued && !dragging) {
134
155
  seedQueued = false;
@@ -136,48 +157,61 @@ export function createDndBoard(opts) {
136
157
  }
137
158
  });
138
159
  }
139
- $effect(() => monitorForElements({
140
- canMonitor: ({ source }) => isItemData(source.data, opts.type),
141
- onDragStart({ source }) {
142
- const d = source.data;
143
- dragging = {
144
- key: d.key,
145
- item: d.item,
146
- from: { container: d.container, index: d.index },
147
- };
148
- },
149
- onDropTargetChange({ location }) {
150
- consider(placementFrom(location.current.dropTargets));
151
- },
152
- onDrag({ location }) {
153
- consider(placementFrom(location.current.dropTargets));
154
- },
155
- onDrop({ location }) {
156
- finalize(location.current.dropTargets.length > 0);
157
- },
158
- }));
160
+ $effect(function () {
161
+ return monitorForElements({
162
+ canMonitor: function (_a) {
163
+ var source = _a.source;
164
+ return isItemData(source.data, opts.type);
165
+ },
166
+ onDragStart: function (_a) {
167
+ var source = _a.source;
168
+ var d = source.data;
169
+ dragging = {
170
+ key: d.key,
171
+ item: d.item,
172
+ from: { container: d.container, index: d.index },
173
+ };
174
+ },
175
+ onDropTargetChange: function (_a) {
176
+ var location = _a.location;
177
+ consider(placementFrom(location.current.dropTargets));
178
+ },
179
+ onDrag: function (_a) {
180
+ var location = _a.location;
181
+ consider(placementFrom(location.current.dropTargets));
182
+ },
183
+ onDrop: function (_a) {
184
+ var location = _a.location;
185
+ finalize(location.current.dropTargets.length > 0);
186
+ },
187
+ });
188
+ });
159
189
  return {
160
- get: (container) => mirror.get(container) ?? [],
161
- containers: () => [...mirror.keys()],
190
+ get: function (container) { var _a; return (_a = mirror.get(container)) !== null && _a !== void 0 ? _a : []; },
191
+ containers: function () { return __spreadArray([], mirror.keys(), true); },
162
192
  get dragging() {
163
193
  return dragging;
164
194
  },
165
195
  get proposal() {
166
196
  return proposal;
167
197
  },
168
- isSource: (item) => dragging?.key === opts.key(item),
169
- isShadow: (item) => !!item[SHADOW_KEY],
170
- item: (item, container, index) => ({
171
- data: () => makeItemData({ type: opts.type, key: opts.key(item), item, container, index }),
172
- }),
173
- itemTarget: (container, index) => ({
174
- data: (feedback) => attachClosestEdge({ type: `${opts.type}-target`, container, index }, { input: feedback.input, element: feedback.element, allowedEdges: edges }),
175
- accepts: (d) => isItemData(d, opts.type),
198
+ isSource: function (item) { return (dragging === null || dragging === void 0 ? void 0 : dragging.key) === opts.key(item); },
199
+ isShadow: function (item) {
200
+ return !!item[SHADOW_KEY];
201
+ },
202
+ item: function (item, container, index) { return ({
203
+ data: function () { return makeItemData({ type: opts.type, key: opts.key(item), item: item, container: container, index: index }); },
204
+ }); },
205
+ itemTarget: function (container, index) { return ({
206
+ data: function (feedback) {
207
+ return attachClosestEdge({ type: "".concat(opts.type, "-target"), container: container, index: index }, { input: feedback.input, element: feedback.element, allowedEdges: edges });
208
+ },
209
+ accepts: function (d) { return isItemData(d, opts.type); },
176
210
  sticky: true,
177
- }),
178
- containerTarget: (container) => ({
179
- data: () => ({ type: `${opts.type}-target`, container }),
180
- accepts: (d) => isItemData(d, opts.type),
181
- }),
211
+ }); },
212
+ containerTarget: function (container) { return ({
213
+ data: function () { return ({ type: "".concat(opts.type, "-target"), container: container }); },
214
+ accepts: function (d) { return isItemData(d, opts.type); },
215
+ }); },
182
216
  };
183
217
  }