@dxos/react-ui-mosaic 0.8.4-main.937b3ca → 0.8.4-main.bc674ce

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/lib/browser/{chunk-QKMUWO5X.mjs → chunk-UMBPEG4F.mjs} +347 -236
  2. package/dist/lib/browser/chunk-UMBPEG4F.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +9 -3
  4. package/dist/lib/browser/index.mjs.map +1 -1
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/testing/index.mjs +78 -185
  7. package/dist/lib/browser/testing/index.mjs.map +4 -4
  8. package/dist/lib/node-esm/{chunk-BYUYHEAX.mjs → chunk-X6GV7SMK.mjs} +347 -236
  9. package/dist/lib/node-esm/chunk-X6GV7SMK.mjs.map +7 -0
  10. package/dist/lib/node-esm/index.mjs +9 -3
  11. package/dist/lib/node-esm/index.mjs.map +1 -1
  12. package/dist/lib/node-esm/meta.json +1 -1
  13. package/dist/lib/node-esm/testing/index.mjs +78 -185
  14. package/dist/lib/node-esm/testing/index.mjs.map +4 -4
  15. package/dist/types/src/components/Card/Card.d.ts +2 -1
  16. package/dist/types/src/components/Card/Card.d.ts.map +1 -1
  17. package/dist/types/src/components/Focus/Focus.d.ts.map +1 -1
  18. package/dist/types/src/components/Mosaic/Mosaic.d.ts +8 -1
  19. package/dist/types/src/components/Mosaic/Mosaic.d.ts.map +1 -1
  20. package/dist/types/src/components/Scrollable/Scrollable.d.ts +11 -4
  21. package/dist/types/src/components/Scrollable/Scrollable.d.ts.map +1 -1
  22. package/dist/types/src/components/Scrollable/Scrollable.stories.d.ts +6 -4
  23. package/dist/types/src/components/Scrollable/Scrollable.stories.d.ts.map +1 -1
  24. package/dist/types/src/components/Stack/Stack.d.ts +4 -6
  25. package/dist/types/src/components/Stack/Stack.d.ts.map +1 -1
  26. package/dist/types/src/index.d.ts +1 -0
  27. package/dist/types/src/index.d.ts.map +1 -1
  28. package/dist/types/src/testing/Board.d.ts.map +1 -1
  29. package/dist/types/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +22 -22
  31. package/src/components/Card/Card.tsx +25 -2
  32. package/src/components/Focus/Focus.tsx +2 -0
  33. package/src/components/Mosaic/Mosaic.tsx +32 -33
  34. package/src/components/Scrollable/Scrollable.stories.tsx +34 -8
  35. package/src/components/Scrollable/Scrollable.tsx +7 -18
  36. package/src/components/Stack/Stack.stories.tsx +8 -8
  37. package/src/components/Stack/Stack.tsx +10 -10
  38. package/src/index.ts +1 -0
  39. package/src/testing/Board.tsx +11 -11
  40. package/src/testing/Virtualizer.stories.tsx +3 -3
  41. package/dist/lib/browser/chunk-QKMUWO5X.mjs.map +0 -7
  42. package/dist/lib/node-esm/chunk-BYUYHEAX.mjs.map +0 -7
@@ -3,136 +3,27 @@ import {
3
3
  Focus,
4
4
  Mosaic,
5
5
  styles3 as styles,
6
- useContainerContext,
6
+ useContainerDebug,
7
+ useEventHandlerAdapter,
7
8
  useRootContext
8
- } from "../chunk-QKMUWO5X.mjs";
9
-
10
- // src/testing/decorator.tsx
11
- import React2 from "react";
12
-
13
- // src/hooks/useContainerDebug.tsx
14
- import React, { forwardRef, useMemo, useRef } from "react";
15
- import { createPortal } from "react-dom";
16
- import { Json } from "@dxos/react-ui-syntax-highlighter";
17
- import { mx } from "@dxos/ui-theme";
18
- var useContainerDebug = (debug) => {
19
- const debugRef = useRef(null);
20
- return useMemo(() => {
21
- if (!debug) {
22
- return [
23
- () => null,
24
- void 0
25
- ];
26
- }
27
- return [
28
- ({ classNames }) => /* @__PURE__ */ React.createElement("div", {
29
- role: "none",
30
- className: mx("overflow-hidden", classNames),
31
- ref: debugRef
32
- }),
33
- () => debugRef.current && /* @__PURE__ */ createPortal(/* @__PURE__ */ React.createElement(ContainerInfo, null), debugRef.current)
34
- ];
35
- }, [
36
- debug,
37
- debugRef
38
- ]);
39
- };
40
- var ContainerInfo = /* @__PURE__ */ forwardRef(({ classNames }, forwardedRef) => {
41
- const { id, state, activeLocation, scrolling } = useContainerContext(ContainerInfo.displayName);
42
- const counter = useRef(0);
43
- return /* @__PURE__ */ React.createElement(Json, {
44
- data: {
45
- id,
46
- activeLocation,
47
- scrolling,
48
- state,
49
- count: counter.current++
50
- },
51
- classNames: mx("text-xs", classNames),
52
- ref: forwardedRef
53
- });
54
- });
55
- ContainerInfo.displayName = "ContainerInfo";
56
-
57
- // src/hooks/useEventHandlerAdapter.ts
58
- import { useMemo as useMemo2 } from "react";
59
- import { log } from "@dxos/log";
60
- import { arrayMove } from "@dxos/util";
61
- var __dxlog_file = "/__w/dxos/dxos/packages/ui/react-ui-mosaic/src/hooks/useEventHandlerAdapter.ts";
62
- var useEventHandlerAdapter = ({ items, getId, get, make, onChange, ...props }) => {
63
- return useMemo2(() => ({
64
- ...props,
65
- onTake: ({ source }, cb) => {
66
- log.info("onTake", {
67
- source
68
- }, {
69
- F: __dxlog_file,
70
- L: 58,
71
- S: void 0,
72
- C: (f, a) => f(...a)
73
- });
74
- const mutate = (items2) => {
75
- const from = items2.findIndex((item) => getId(item) === source.id);
76
- if (from !== -1) {
77
- items2.splice(from, 1);
78
- }
79
- };
80
- if (onChange) {
81
- onChange(mutate);
82
- } else {
83
- mutate(items);
84
- }
85
- void cb(source.data);
86
- },
87
- onDrop: ({ source, target }) => {
88
- const to = target?.type === "tile" || target?.type === "placeholder" ? target.location : -1;
89
- log.info("onDrop", {
90
- source,
91
- target,
92
- to
93
- }, {
94
- F: __dxlog_file,
95
- L: 76,
96
- S: void 0,
97
- C: (f, a) => f(...a)
98
- });
99
- const mutate = (items2) => {
100
- const from = items2.findIndex((item) => getId(item) === source.id);
101
- if (to !== -1) {
102
- if (from !== -1) {
103
- arrayMove(items2, from, to);
104
- } else {
105
- items2.splice(to, 0, make(get(source.data)));
106
- }
107
- }
108
- };
109
- if (onChange) {
110
- onChange(mutate);
111
- } else {
112
- mutate(items);
113
- }
114
- }
115
- }), [
116
- items,
117
- onChange
118
- ]);
119
- };
9
+ } from "../chunk-UMBPEG4F.mjs";
120
10
 
121
11
  // src/testing/decorator.tsx
12
+ import React from "react";
122
13
  var withMosaic = () => {
123
- return (Story) => /* @__PURE__ */ React2.createElement(Mosaic.Root, null, /* @__PURE__ */ React2.createElement(Story, null));
14
+ return (Story) => /* @__PURE__ */ React.createElement(Mosaic.Root, null, /* @__PURE__ */ React.createElement(Story, null));
124
15
  };
125
16
 
126
17
  // src/testing/Board.tsx
127
18
  import { useComposedRefs } from "@radix-ui/react-compose-refs";
128
19
  import * as Schema from "effect/Schema";
129
- import React3, { forwardRef as forwardRef2, useMemo as useMemo3, useRef as useRef2 } from "react";
20
+ import React2, { forwardRef, useMemo, useRef, useState } from "react";
130
21
  import { Obj, Ref, Type } from "@dxos/echo";
131
22
  import { ObjectId } from "@dxos/keys";
132
23
  import { useObject } from "@dxos/react-client/echo";
133
24
  import { Tag } from "@dxos/react-ui";
134
- import { Json as Json2 } from "@dxos/react-ui-syntax-highlighter";
135
- import { getHashStyles, mx as mx2 } from "@dxos/ui-theme";
25
+ import { Json } from "@dxos/react-ui-syntax-highlighter";
26
+ import { getHashStyles, mx } from "@dxos/ui-theme";
136
27
  var TestItem = Schema.Struct({
137
28
  name: Schema.String,
138
29
  description: Schema.optional(Schema.String),
@@ -148,9 +39,9 @@ var TestColumn = Schema.Struct({
148
39
  typename: "example.com/type/Column",
149
40
  version: "0.1.0"
150
41
  }));
151
- var Root = /* @__PURE__ */ forwardRef2(({ id, columns, debug }, forwardedRef) => {
42
+ var Root = /* @__PURE__ */ forwardRef(({ id, columns, debug }, forwardedRef) => {
152
43
  const [DebugInfo, debugHandler] = useContainerDebug(debug);
153
- const viewportRef = useRef2(null);
44
+ const [viewport, setViewport] = useState(null);
154
45
  const eventHandler = useEventHandlerAdapter({
155
46
  id,
156
47
  items: columns,
@@ -159,37 +50,37 @@ var Root = /* @__PURE__ */ forwardRef2(({ id, columns, debug }, forwardedRef) =>
159
50
  make: (object) => object,
160
51
  canDrop: ({ source }) => Obj.instanceOf(TestColumn, source.data)
161
52
  });
162
- return /* @__PURE__ */ React3.createElement("div", {
53
+ return /* @__PURE__ */ React2.createElement("div", {
163
54
  role: "none",
164
- className: mx2("p-2 grid bs-full is-full overflow-hidden", debug && "grid-cols-[1fr_20rem] gap-2"),
55
+ className: mx("plb-2 grid bs-full is-full overflow-hidden", debug && "grid-cols-[1fr_20rem] gap-2"),
165
56
  ref: forwardedRef
166
- }, /* @__PURE__ */ React3.createElement(Focus.Group, {
57
+ }, /* @__PURE__ */ React2.createElement(Focus.Group, {
167
58
  asChild: true,
168
59
  axis: "horizontal"
169
- }, /* @__PURE__ */ React3.createElement(Mosaic.Container, {
60
+ }, /* @__PURE__ */ React2.createElement(Mosaic.Container, {
170
61
  asChild: true,
171
- axis: "horizontal",
172
62
  withFocus: true,
173
- autoScroll: viewportRef.current,
63
+ axis: "horizontal",
64
+ autoScroll: viewport,
174
65
  eventHandler,
175
66
  debug: debugHandler
176
- }, /* @__PURE__ */ React3.createElement(Mosaic.Viewport, {
67
+ }, /* @__PURE__ */ React2.createElement(Mosaic.Viewport, {
177
68
  axis: "horizontal",
178
69
  padding: true,
179
- viewportRef
180
- }, /* @__PURE__ */ React3.createElement(Mosaic.Stack, {
70
+ viewportRef: setViewport
71
+ }, /* @__PURE__ */ React2.createElement(Mosaic.Stack, {
181
72
  axis: "horizontal",
182
73
  items: columns,
183
74
  getId: (item) => item.id,
184
75
  Tile: Column,
185
76
  debug
186
- })))), /* @__PURE__ */ React3.createElement(DebugInfo, null));
77
+ })))), /* @__PURE__ */ React2.createElement(DebugInfo, null));
187
78
  });
188
- var Column = /* @__PURE__ */ forwardRef2(({ classNames, location, data, debug }, forwardedRef) => {
79
+ var Column = /* @__PURE__ */ forwardRef(({ classNames, location, data, debug }, forwardedRef) => {
189
80
  const [column, updateColumn] = useObject(data);
190
81
  const [DebugInfo, debugHandler] = useContainerDebug(debug);
191
- const dragHandleRef = useRef2(null);
192
- const viewportRef = useRef2(null);
82
+ const dragHandleRef = useRef(null);
83
+ const [viewport, setViewport] = useState(null);
193
84
  const eventHandler = useEventHandlerAdapter({
194
85
  id: data.id,
195
86
  items: column.items,
@@ -199,7 +90,7 @@ var Column = /* @__PURE__ */ forwardRef2(({ classNames, location, data, debug },
199
90
  canDrop: ({ source }) => Obj.instanceOf(TestItem, source.data.target),
200
91
  onChange: (mutator) => updateColumn((column2) => mutator(column2.items))
201
92
  });
202
- const menuItems = useMemo3(() => [
93
+ const menuItems = useMemo(() => [
203
94
  {
204
95
  label: "Delete",
205
96
  onClick: (obj) => {
@@ -214,104 +105,106 @@ var Column = /* @__PURE__ */ forwardRef2(({ classNames, location, data, debug },
214
105
  ], [
215
106
  updateColumn
216
107
  ]);
217
- return /* @__PURE__ */ React3.createElement(Mosaic.Tile, {
108
+ return /* @__PURE__ */ React2.createElement(Mosaic.Tile, {
218
109
  asChild: true,
219
110
  dragHandle: dragHandleRef.current,
220
111
  location,
221
112
  id: data.id,
222
113
  data,
223
114
  debug
224
- }, /* @__PURE__ */ React3.createElement(Focus.Group, {
115
+ }, /* @__PURE__ */ React2.createElement(Focus.Group, {
225
116
  asChild: true
226
- }, /* @__PURE__ */ React3.createElement("div", {
227
- className: mx2("grid bs-full card-default-width overflow-hidden bg-deckSurface", debug ? "grid-rows-[min-content_1fr_20rem]" : "grid-rows-[min-content_1fr_min-content]", classNames),
117
+ }, /* @__PURE__ */ React2.createElement("div", {
118
+ className: mx("grid bs-full card-default-width overflow-hidden bg-deckSurface", debug ? "grid-rows-[min-content_1fr_20rem]" : "grid-rows-[min-content_1fr_min-content]", classNames),
228
119
  ref: forwardedRef
229
- }, /* @__PURE__ */ React3.createElement(Card.Toolbar, null, /* @__PURE__ */ React3.createElement(Card.DragHandle, {
120
+ }, /* @__PURE__ */ React2.createElement(Card.Toolbar, null, /* @__PURE__ */ React2.createElement(Card.DragHandle, {
230
121
  ref: dragHandleRef
231
- }), /* @__PURE__ */ React3.createElement(Card.Title, null, column.id), /* @__PURE__ */ React3.createElement(Card.Menu, {
122
+ }), /* @__PURE__ */ React2.createElement(Card.Title, null, column.id), /* @__PURE__ */ React2.createElement(Card.Menu, {
232
123
  items: []
233
- })), /* @__PURE__ */ React3.createElement(Card.Context, {
124
+ })), /* @__PURE__ */ React2.createElement(Card.Context, {
234
125
  value: {
235
126
  menuItems
236
127
  }
237
- }, /* @__PURE__ */ React3.createElement(Mosaic.Container, {
128
+ }, /* @__PURE__ */ React2.createElement(Mosaic.Container, {
238
129
  asChild: true,
239
- axis: "vertical",
240
130
  withFocus: true,
241
- autoScroll: viewportRef.current,
131
+ axis: "vertical",
132
+ autoScroll: viewport,
242
133
  eventHandler,
243
134
  debug: debugHandler
244
- }, /* @__PURE__ */ React3.createElement(Mosaic.Viewport, {
135
+ }, /* @__PURE__ */ React2.createElement(Mosaic.Viewport, {
245
136
  axis: "vertical",
246
137
  padding: true,
247
- viewportRef
248
- }, /* @__PURE__ */ React3.createElement(Mosaic.Stack, {
138
+ viewportRef: setViewport
139
+ }, /* @__PURE__ */ React2.createElement(Mosaic.Stack, {
249
140
  axis: "vertical",
250
141
  items: column.items,
251
142
  getId: (data2) => data2.dxn.toString(),
252
143
  Tile: Item
253
- })))), /* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement("div", {
144
+ })))), /* @__PURE__ */ React2.createElement("div", {
145
+ role: "none"
146
+ }, /* @__PURE__ */ React2.createElement("div", {
254
147
  className: "grow flex p-1 justify-center text-xs"
255
- }, column.items.length), /* @__PURE__ */ React3.createElement(DebugInfo, null)))));
148
+ }, column.items.length), /* @__PURE__ */ React2.createElement(DebugInfo, null)))));
256
149
  });
257
150
  Column.displayName = "Column";
258
- var Item = /* @__PURE__ */ forwardRef2(({ classNames, data: ref, location, debug }, forwardedRef) => {
259
- const rootRef = useRef2(null);
151
+ var Item = /* @__PURE__ */ forwardRef(({ classNames, data: ref, location, debug }, forwardedRef) => {
152
+ const rootRef = useRef(null);
260
153
  const composedRef = useComposedRefs(rootRef, forwardedRef);
261
- const dragHandleRef = useRef2(null);
154
+ const dragHandleRef = useRef(null);
262
155
  const object = ref.target;
263
156
  if (!object) {
264
157
  return null;
265
158
  }
266
- return /* @__PURE__ */ React3.createElement(Mosaic.Tile, {
159
+ return /* @__PURE__ */ React2.createElement(Mosaic.Tile, {
267
160
  asChild: true,
268
161
  dragHandle: dragHandleRef.current,
269
162
  id: ref.dxn.toString(),
270
163
  data: ref,
271
164
  location,
272
165
  debug
273
- }, /* @__PURE__ */ React3.createElement(Focus.Group, {
166
+ }, /* @__PURE__ */ React2.createElement(Focus.Group, {
274
167
  asChild: true
275
- }, /* @__PURE__ */ React3.createElement(Card.Root, {
168
+ }, /* @__PURE__ */ React2.createElement(Card.Root, {
276
169
  classNames,
277
170
  onClick: () => rootRef.current?.focus(),
278
171
  ref: composedRef
279
- }, /* @__PURE__ */ React3.createElement(Card.Toolbar, null, /* @__PURE__ */ React3.createElement(Card.DragHandle, {
172
+ }, /* @__PURE__ */ React2.createElement(Card.Toolbar, null, /* @__PURE__ */ React2.createElement(Card.DragHandle, {
280
173
  ref: dragHandleRef
281
- }), /* @__PURE__ */ React3.createElement(Card.Title, null, object.name), /* @__PURE__ */ React3.createElement(Card.Menu, {
174
+ }), /* @__PURE__ */ React2.createElement(Card.Title, null, object.name), /* @__PURE__ */ React2.createElement(Card.Menu, {
282
175
  context: object
283
- })), /* @__PURE__ */ React3.createElement(Card.Row, {
176
+ })), /* @__PURE__ */ React2.createElement(Card.Row, {
284
177
  icon: "ph--note--regular",
285
178
  classNames: "text-description"
286
- }, object.description), /* @__PURE__ */ React3.createElement(Card.Row, {
179
+ }, object.description), /* @__PURE__ */ React2.createElement(Card.Row, {
287
180
  icon: "ph--tag--regular"
288
- }, object.label && /* @__PURE__ */ React3.createElement("div", {
181
+ }, object.label && /* @__PURE__ */ React2.createElement("div", {
289
182
  role: "none",
290
183
  className: "flex shrink-0 gap-1 text-xs items-center"
291
- }, /* @__PURE__ */ React3.createElement(Tag, {
184
+ }, /* @__PURE__ */ React2.createElement(Tag, {
292
185
  palette: getHashStyles(object.label).hue
293
186
  }, object.label))))));
294
187
  });
295
188
  Item.displayName = "Item";
296
189
  var Placeholder = (props) => {
297
- return /* @__PURE__ */ React3.createElement(Mosaic.Placeholder, {
190
+ return /* @__PURE__ */ React2.createElement(Mosaic.Placeholder, {
298
191
  ...props,
299
192
  classNames: styles.placeholder.root
300
- }, /* @__PURE__ */ React3.createElement("div", {
301
- className: mx2("flex bs-full border border-dashed border-separator rounded-sm", styles.placeholder.content)
193
+ }, /* @__PURE__ */ React2.createElement("div", {
194
+ className: mx("flex bs-full border border-dashed border-separator rounded-sm", styles.placeholder.content)
302
195
  }));
303
196
  };
304
197
  Placeholder.displayName = "Placeholder";
305
- var Debug = /* @__PURE__ */ forwardRef2(({ classNames }, forwardedRef) => {
198
+ var Debug = /* @__PURE__ */ forwardRef(({ classNames }, forwardedRef) => {
306
199
  const { containers, dragging } = useRootContext(Debug.displayName);
307
- const counter = useRef2(0);
308
- return /* @__PURE__ */ React3.createElement(Json2, {
200
+ const counter = useRef(0);
201
+ return /* @__PURE__ */ React2.createElement(Json, {
309
202
  data: {
310
203
  containers,
311
204
  dragging,
312
205
  count: counter.current++
313
206
  },
314
- classNames: mx2("text-xs", classNames),
207
+ classNames: mx("text-xs", classNames),
315
208
  ref: forwardedRef
316
209
  });
317
210
  });
@@ -326,7 +219,7 @@ var Board = {
326
219
 
327
220
  // src/testing/CardContainer.tsx
328
221
  import { useControllableState } from "@radix-ui/react-use-controllable-state";
329
- import React4 from "react";
222
+ import React3 from "react";
330
223
  import { Icon, Popover } from "@dxos/react-ui";
331
224
  import { ResizeHandle, resizeAttributes, sizeStyle } from "@dxos/react-ui-dnd";
332
225
  var DEFAULT_BLOCK_SIZE = 22;
@@ -334,25 +227,25 @@ var MIN_BLOCK_SIZE = 8;
334
227
  var CardContainer = ({ children, icon = "ph--placeholder--regular", role }) => {
335
228
  switch (role) {
336
229
  case "card--popover":
337
- return /* @__PURE__ */ React4.createElement(PopoverCardContainer, {
230
+ return /* @__PURE__ */ React3.createElement(PopoverCardContainer, {
338
231
  icon
339
232
  }, children);
340
233
  case "card--intrinsic":
341
234
  default:
342
- return /* @__PURE__ */ React4.createElement(IntrinsicCardContainer, null, children);
235
+ return /* @__PURE__ */ React3.createElement(IntrinsicCardContainer, null, children);
343
236
  }
344
237
  };
345
238
  var border = "relative border border-dashed border-subduedSeparator p-4 rounded-lg overflow-x-auto";
346
239
  var PopoverCardContainer = ({ children, icon = "ph--placeholder--regular" }) => {
347
- return /* @__PURE__ */ React4.createElement(Popover.Root, {
240
+ return /* @__PURE__ */ React3.createElement(Popover.Root, {
348
241
  open: true
349
- }, /* @__PURE__ */ React4.createElement(Popover.Content, {
242
+ }, /* @__PURE__ */ React3.createElement(Popover.Content, {
350
243
  onOpenAutoFocus: (event) => event.preventDefault()
351
- }, /* @__PURE__ */ React4.createElement(Popover.Viewport, {
244
+ }, /* @__PURE__ */ React3.createElement(Popover.Viewport, {
352
245
  classNames: "popover-card-width"
353
- }, children), /* @__PURE__ */ React4.createElement(Popover.Arrow, null)), /* @__PURE__ */ React4.createElement(Popover.Trigger, {
246
+ }, children), /* @__PURE__ */ React3.createElement(Popover.Arrow, null)), /* @__PURE__ */ React3.createElement(Popover.Trigger, {
354
247
  asChild: true
355
- }, /* @__PURE__ */ React4.createElement(Icon, {
248
+ }, /* @__PURE__ */ React3.createElement(Icon, {
356
249
  icon,
357
250
  size: 5
358
251
  })));
@@ -363,11 +256,11 @@ var IntrinsicCardContainer = ({ children, defaultSize, size: propSize, onSizeCha
363
256
  defaultProp: defaultSize,
364
257
  onChange: onSizeChange
365
258
  });
366
- return /* @__PURE__ */ React4.createElement("div", {
259
+ return /* @__PURE__ */ React3.createElement("div", {
367
260
  className: border,
368
261
  style: sizeStyle(size, "horizontal"),
369
262
  ...resizeAttributes
370
- }, children, /* @__PURE__ */ React4.createElement(ResizeHandle, {
263
+ }, children, /* @__PURE__ */ React3.createElement(ResizeHandle, {
371
264
  side: "inline-end",
372
265
  fallbackSize: DEFAULT_BLOCK_SIZE,
373
266
  minSize: MIN_BLOCK_SIZE,
@@ -377,25 +270,25 @@ var IntrinsicCardContainer = ({ children, defaultSize, size: propSize, onSizeCha
377
270
  };
378
271
 
379
272
  // src/testing/DefaultStackTile.tsx
380
- import React5, { useRef as useRef3, useState } from "react";
273
+ import React4, { useRef as useRef2, useState as useState2 } from "react";
381
274
  import { Obj as Obj2 } from "@dxos/echo";
382
- import { Json as Json3 } from "@dxos/react-ui-syntax-highlighter";
275
+ import { Json as Json2 } from "@dxos/react-ui-syntax-highlighter";
383
276
  var DefaultStackTile = (props) => {
384
- const dragHandleRef = useRef3(null);
385
- const [open, setOpen] = useState(false);
386
- return /* @__PURE__ */ React5.createElement(Mosaic.Tile, {
277
+ const dragHandleRef = useRef2(null);
278
+ const [open, setOpen] = useState2(false);
279
+ return /* @__PURE__ */ React4.createElement(Mosaic.Tile, {
387
280
  ...props,
388
281
  className: "border border-separator rounded-sm font-mono"
389
- }, /* @__PURE__ */ React5.createElement(Card.Toolbar, null, /* @__PURE__ */ React5.createElement(Card.DragHandle, {
282
+ }, /* @__PURE__ */ React4.createElement(Card.Toolbar, null, /* @__PURE__ */ React4.createElement(Card.DragHandle, {
390
283
  ref: dragHandleRef
391
- }), /* @__PURE__ */ React5.createElement(Card.Title, null, Obj2.getLabel(props.data) ?? props.data.id), /* @__PURE__ */ React5.createElement(Card.Menu, {
284
+ }), /* @__PURE__ */ React4.createElement(Card.Title, null, Obj2.getLabel(props.data) ?? props.data.id), /* @__PURE__ */ React4.createElement(Card.Menu, {
392
285
  items: [
393
286
  {
394
287
  label: open ? "Hide details" : "Show details",
395
288
  onClick: () => setOpen((open2) => !open2)
396
289
  }
397
290
  ]
398
- })), open && /* @__PURE__ */ React5.createElement(Card.Row, null, /* @__PURE__ */ React5.createElement(Json3, {
291
+ })), open && /* @__PURE__ */ React4.createElement(Card.Row, null, /* @__PURE__ */ React4.createElement(Json2, {
399
292
  data: props.data,
400
293
  classNames: "text-xs"
401
294
  })));
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../../src/testing/decorator.tsx", "../../../../src/hooks/useContainerDebug.tsx", "../../../../src/hooks/useEventHandlerAdapter.ts", "../../../../src/testing/Board.tsx", "../../../../src/testing/CardContainer.tsx", "../../../../src/testing/DefaultStackTile.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react-vite';\nimport React from 'react';\n\nimport { Mosaic } from '../components';\n\nexport const withMosaic = (): Decorator => {\n return (Story) => (\n <Mosaic.Root>\n <Story />\n </Mosaic.Root>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { type FC, type ReactNode, forwardRef, useMemo, useRef } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { Json } from '@dxos/react-ui-syntax-highlighter';\nimport { mx } from '@dxos/ui-theme';\n\nimport { useMosaicContainer } from '../components';\n\nexport type UseContainerDebug = [FC<ThemedClassName>, (() => ReactNode) | undefined];\n\n/**\n * Hook that returns a component to be rendered in the container's viewport (within the context),\n * and a component that creates a portal in the container's debug area.\n */\nexport const useContainerDebug = (debug?: boolean): UseContainerDebug => {\n const debugRef = useRef<HTMLDivElement | null>(null);\n return useMemo(() => {\n if (!debug) {\n return [() => null, undefined];\n }\n\n return [\n ({ classNames }) => <div role='none' className={mx('overflow-hidden', classNames)} ref={debugRef} />,\n () => debugRef.current && createPortal(<ContainerInfo />, debugRef.current),\n ];\n }, [debug, debugRef]);\n};\n\nconst ContainerInfo = forwardRef<HTMLDivElement, ThemedClassName>(({ classNames }, forwardedRef) => {\n const { id, state, activeLocation, scrolling } = useMosaicContainer(ContainerInfo.displayName!);\n const counter = useRef(0);\n return (\n <Json\n data={{ id, activeLocation, scrolling, state, count: counter.current++ }}\n classNames={mx('text-xs', classNames)}\n ref={forwardedRef}\n />\n );\n});\n\nContainerInfo.displayName = 'ContainerInfo';\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { useMemo } from 'react';\n\nimport { type Obj } from '@dxos/echo';\nimport { log } from '@dxos/log';\nimport { arrayMove } from '@dxos/util';\n\nimport { type GetId, type MosaicEventHandler } from '../components';\n\nexport type UseEventHandlerProps<TItem = any, TObject = any> = Pick<MosaicEventHandler<TItem>, 'id' | 'canDrop'> & {\n /**\n * The items to manage.\n */\n items: TItem[];\n\n /**\n * ID getter.\n */\n getId: GetId<TItem>;\n\n /**\n * Extracts the object from an item.\n */\n get: (item: TItem) => TObject;\n\n /**\n * Creates a new item from the dragged object.\n */\n make: (object: TObject) => TItem;\n\n /**\n * Optional change callback for wrapping mutations in Obj.change style.\n * When provided, all array mutations will be wrapped in this callback.\n * When not provided, mutations happen directly on the items array.\n */\n onChange?: (mutator: (items: TItem[]) => void) => void;\n};\n\n/**\n * Returns a handler for the given items.\n * NOTE: This supports arrays of objects, or arrays of refs to objects.\n */\nexport const useEventHandlerAdapter = <TItem = any, TObject extends Obj.Unknown = Obj.Unknown>({\n items,\n getId,\n get,\n make,\n onChange,\n ...props\n}: UseEventHandlerProps<TItem, TObject>): MosaicEventHandler<TItem> => {\n return useMemo<MosaicEventHandler<TItem>>(\n () => ({\n ...props,\n onTake: ({ source }, cb) => {\n log.info('onTake', { source });\n const mutate = (items: TItem[]) => {\n const from = items.findIndex((item) => getId(item) === source.id);\n if (from !== -1) {\n items.splice(from, 1);\n }\n };\n\n if (onChange) {\n onChange(mutate);\n } else {\n mutate(items);\n }\n\n void cb(source.data);\n },\n onDrop: ({ source, target }) => {\n const to = target?.type === 'tile' || target?.type === 'placeholder' ? target.location : -1;\n log.info('onDrop', { source, target, to });\n\n const mutate = (items: TItem[]) => {\n const from = items.findIndex((item) => getId(item) === source.id);\n if (to !== -1) {\n if (from !== -1) {\n arrayMove(items, from, to);\n } else {\n // TODO(burdon): This should be the responsibility of the source container.\n items.splice(to, 0, make(get(source.data)));\n }\n }\n };\n\n if (onChange) {\n onChange(mutate);\n } else {\n mutate(items);\n }\n },\n }),\n [items, onChange],\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport * as Schema from 'effect/Schema';\nimport React, { forwardRef, useMemo, useRef } from 'react';\n\nimport { Obj, Ref, Type } from '@dxos/echo';\nimport { ObjectId } from '@dxos/keys';\nimport { useObject } from '@dxos/react-client/echo';\nimport { Tag, type ThemedClassName } from '@dxos/react-ui';\nimport { Json } from '@dxos/react-ui-syntax-highlighter';\nimport { getHashStyles, mx } from '@dxos/ui-theme';\n\nimport {\n Card,\n type CardMenuProps,\n Focus,\n Mosaic,\n type MosaicTileProps,\n type MosiacPlaceholderProps,\n mosaicStyles,\n useMosaic,\n} from '../components';\nimport { useContainerDebug, useEventHandlerAdapter } from '../hooks';\n\n//\n// Test Data\n//\n\nexport const TestItem = Schema.Struct({\n name: Schema.String,\n description: Schema.optional(Schema.String),\n label: Schema.optional(Schema.String),\n}).pipe(\n Type.object({\n typename: 'example.com/type/Item',\n version: '0.1.0',\n }),\n);\n\nexport interface TestItem extends Schema.Schema.Type<typeof TestItem> {}\n\nexport const TestColumn = Schema.Struct({\n id: ObjectId,\n items: Schema.mutable(Schema.Array(Type.Ref(TestItem))),\n}).pipe(\n Type.object({\n typename: 'example.com/type/Column',\n version: '0.1.0',\n }),\n);\n\nexport interface TestColumn extends Schema.Schema.Type<typeof TestColumn> {}\n\n//\n// Root\n//\n\ntype RootProps = {\n id: string;\n columns: TestColumn[];\n debug?: boolean;\n};\n\nconst Root = forwardRef<HTMLDivElement, RootProps>(({ id, columns, debug }, forwardedRef) => {\n const [DebugInfo, debugHandler] = useContainerDebug(debug);\n const viewportRef = useRef<HTMLElement | null>(null);\n\n const eventHandler = useEventHandlerAdapter({\n id,\n items: columns,\n getId: (data) => data.id,\n get: (data) => data,\n make: (object) => object,\n canDrop: ({ source }) => Obj.instanceOf(TestColumn, source.data),\n });\n\n return (\n <div\n role='none'\n className={mx('p-2 grid bs-full is-full overflow-hidden', debug && 'grid-cols-[1fr_20rem] gap-2')}\n ref={forwardedRef}\n >\n <Focus.Group asChild axis='horizontal'>\n <Mosaic.Container\n asChild\n axis='horizontal'\n withFocus\n autoScroll={viewportRef.current}\n eventHandler={eventHandler}\n debug={debugHandler}\n >\n <Mosaic.Viewport axis='horizontal' padding viewportRef={viewportRef}>\n <Mosaic.Stack axis='horizontal' items={columns} getId={(item) => item.id} Tile={Column} debug={debug} />\n </Mosaic.Viewport>\n </Mosaic.Container>\n </Focus.Group>\n <DebugInfo />\n </div>\n );\n});\n\n//\n// Column\n//\n\ntype ColumnProps = Pick<MosaicTileProps<TestColumn>, 'classNames' | 'location' | 'data' | 'debug'>;\n\nconst Column = forwardRef<HTMLDivElement, ColumnProps>(({ classNames, location, data, debug }, forwardedRef) => {\n const [column, updateColumn] = useObject(data);\n const [DebugInfo, debugHandler] = useContainerDebug(debug);\n const dragHandleRef = useRef<HTMLButtonElement>(null);\n const viewportRef = useRef<HTMLElement | null>(null);\n const eventHandler = useEventHandlerAdapter<Ref.Unknown>({\n id: data.id,\n items: column.items,\n getId: (data) => data.dxn.toString(),\n get: (data) => data.target!,\n make: (object) => Ref.make(object),\n canDrop: ({ source }) => Obj.instanceOf(TestItem, source.data.target),\n onChange: (mutator) => updateColumn((column) => mutator(column.items)),\n });\n\n // Context menu.\n const menuItems = useMemo<NonNullable<CardMenuProps<TestItem>['items']>>(\n () => [\n {\n label: 'Delete',\n onClick: (obj) => {\n updateColumn((column) => {\n const idx = column.items.findIndex((item) => item.target?.id === obj?.id);\n if (idx !== -1) {\n column.items.splice(idx, 1);\n }\n });\n },\n },\n ],\n [updateColumn],\n );\n\n return (\n <Mosaic.Tile asChild dragHandle={dragHandleRef.current} location={location} id={data.id} data={data} debug={debug}>\n <Focus.Group asChild>\n <div\n className={mx(\n 'grid bs-full card-default-width overflow-hidden bg-deckSurface',\n debug ? 'grid-rows-[min-content_1fr_20rem]' : 'grid-rows-[min-content_1fr_min-content]',\n classNames,\n )}\n ref={forwardedRef}\n >\n <Card.Toolbar>\n <Card.DragHandle ref={dragHandleRef} />\n <Card.Title>{column.id}</Card.Title>\n <Card.Menu items={[]} />\n </Card.Toolbar>\n <Card.Context value={{ menuItems }}>\n <Mosaic.Container\n asChild\n axis='vertical'\n withFocus\n autoScroll={viewportRef.current}\n eventHandler={eventHandler}\n debug={debugHandler}\n >\n <Mosaic.Viewport axis='vertical' padding viewportRef={viewportRef}>\n <Mosaic.Stack axis='vertical' items={column.items} getId={(data) => data.dxn.toString()} Tile={Item} />\n </Mosaic.Viewport>\n </Mosaic.Container>\n </Card.Context>\n <div>\n <div className='grow flex p-1 justify-center text-xs'>{column.items.length}</div>\n <DebugInfo />\n </div>\n </div>\n </Focus.Group>\n </Mosaic.Tile>\n );\n});\n\nColumn.displayName = 'Column';\n\n//\n// Item\n//\n\ntype ItemProps = Pick<MosaicTileProps<Ref.Ref<TestItem>>, 'classNames' | 'location' | 'data' | 'debug'>;\n\nconst Item = forwardRef<HTMLDivElement, ItemProps>(({ classNames, data: ref, location, debug }, forwardedRef) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const composedRef = useComposedRefs<HTMLDivElement>(rootRef, forwardedRef);\n const dragHandleRef = useRef<HTMLButtonElement>(null);\n const object = ref.target;\n if (!object) {\n return null;\n }\n\n return (\n <Mosaic.Tile\n asChild\n dragHandle={dragHandleRef.current}\n id={ref.dxn.toString()}\n data={ref}\n location={location}\n debug={debug}\n >\n <Focus.Group asChild>\n <Card.Root classNames={classNames} onClick={() => rootRef.current?.focus()} ref={composedRef}>\n <Card.Toolbar>\n <Card.DragHandle ref={dragHandleRef} />\n <Card.Title>{object.name}</Card.Title>\n <Card.Menu context={object} />\n </Card.Toolbar>\n <Card.Row icon='ph--note--regular' classNames='text-description'>\n {object.description}\n </Card.Row>\n <Card.Row icon='ph--tag--regular'>\n {object.label && (\n <div role='none' className='flex shrink-0 gap-1 text-xs items-center'>\n <Tag palette={getHashStyles(object.label).hue}>{object.label}</Tag>\n </div>\n )}\n </Card.Row>\n </Card.Root>\n </Focus.Group>\n </Mosaic.Tile>\n );\n});\n\nItem.displayName = 'Item';\n\n//\n// Placeholder\n//\n\nconst Placeholder = (props: MosiacPlaceholderProps<number>) => {\n return (\n <Mosaic.Placeholder {...props} classNames={mosaicStyles.placeholder.root}>\n <div\n className={mx(\n 'flex bs-full border border-dashed border-separator rounded-sm',\n mosaicStyles.placeholder.content,\n )}\n />\n </Mosaic.Placeholder>\n );\n};\n\nPlaceholder.displayName = 'Placeholder';\n\n//\n// Debug\n//\n\nexport const Debug = forwardRef<HTMLDivElement, ThemedClassName>(({ classNames }, forwardedRef) => {\n const { containers, dragging } = useMosaic(Debug.displayName!);\n const counter = useRef(0);\n return (\n <Json\n data={{ containers, dragging, count: counter.current++ }}\n classNames={mx('text-xs', classNames)}\n ref={forwardedRef}\n />\n );\n});\n\nDebug.displayName = 'Debug';\n\n//\n// Board\n//\n\nexport const Board = { Root, Column, Item, Placeholder, Debug };\n\nexport type { RootProps, ColumnProps, ItemProps };\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, { type PropsWithChildren } from 'react';\n\nimport { Icon, Popover } from '@dxos/react-ui';\nimport { ResizeHandle, type Size, resizeAttributes, sizeStyle } from '@dxos/react-ui-dnd';\n\nconst DEFAULT_BLOCK_SIZE = 22;\nconst MIN_BLOCK_SIZE = 8;\n\n//\n// Card container.\n//\n\nexport const CardContainer = ({\n children,\n icon = 'ph--placeholder--regular',\n role,\n}: PropsWithChildren<{ icon?: string; role?: string }>) => {\n switch (role) {\n case 'card--popover':\n return <PopoverCardContainer icon={icon}>{children}</PopoverCardContainer>;\n case 'card--intrinsic':\n default:\n return <IntrinsicCardContainer>{children}</IntrinsicCardContainer>;\n }\n};\n\nconst border = 'relative border border-dashed border-subduedSeparator p-4 rounded-lg overflow-x-auto';\n\n//\n// Popover\n//\n\nexport type PopoverCardContainerProps = PropsWithChildren<{ icon?: string }>;\n\nexport const PopoverCardContainer = ({ children, icon = 'ph--placeholder--regular' }: PopoverCardContainerProps) => {\n return (\n <Popover.Root open>\n <Popover.Content onOpenAutoFocus={(event) => event.preventDefault()}>\n <Popover.Viewport classNames='popover-card-width'>{children}</Popover.Viewport>\n <Popover.Arrow />\n </Popover.Content>\n <Popover.Trigger asChild>\n <Icon icon={icon} size={5} />\n </Popover.Trigger>\n </Popover.Root>\n );\n};\n\n//\n// Intrinsic card container (size constrained by card).\n//\n\nexport type IntrinsicCardContainerProps = PropsWithChildren<{\n defaultSize?: Size;\n size?: Size;\n onSizeChange?: (size: Size, commit?: boolean) => void;\n}>;\n\nexport const IntrinsicCardContainer = ({\n children,\n defaultSize,\n size: propSize,\n onSizeChange,\n}: IntrinsicCardContainerProps) => {\n const [size = DEFAULT_BLOCK_SIZE, setSize] = useControllableState<Size>({\n prop: propSize,\n defaultProp: defaultSize,\n onChange: onSizeChange,\n });\n\n return (\n <div className={border} style={sizeStyle(size, 'horizontal')} {...resizeAttributes}>\n {children}\n <ResizeHandle\n side='inline-end'\n fallbackSize={DEFAULT_BLOCK_SIZE}\n minSize={MIN_BLOCK_SIZE}\n size={size}\n onSizeChange={setSize}\n />\n </div>\n );\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { useRef, useState } from 'react';\n\nimport { Obj } from '@dxos/echo';\nimport { Json } from '@dxos/react-ui-syntax-highlighter';\n\nimport { Card, Mosaic, type StackTileComponent } from '../components';\n\nexport const DefaultStackTile: StackTileComponent<Obj.Any> = (props) => {\n const dragHandleRef = useRef<HTMLButtonElement>(null);\n const [open, setOpen] = useState(false);\n return (\n <Mosaic.Tile {...props} className='border border-separator rounded-sm font-mono'>\n <Card.Toolbar>\n <Card.DragHandle ref={dragHandleRef} />\n <Card.Title>{Obj.getLabel(props.data) ?? props.data.id}</Card.Title>\n <Card.Menu\n items={[\n {\n label: open ? 'Hide details' : 'Show details',\n onClick: () => setOpen((open) => !open),\n },\n ]}\n />\n </Card.Toolbar>\n {open && (\n <Card.Row>\n <Json data={props.data} classNames='text-xs' />\n </Card.Row>\n )}\n </Mosaic.Tile>\n );\n};\n\nDefaultStackTile.displayName = 'DefaultStackTile';\n"],
5
- "mappings": ";;;;;;;;;;AAKA,OAAOA,YAAW;;;ACDlB,OAAOC,SAAkCC,YAAYC,SAASC,cAAc;AAC5E,SAASC,oBAAoB;AAG7B,SAASC,YAAY;AACrB,SAASC,UAAU;AAUZ,IAAMC,oBAAoB,CAACC,UAAAA;AAChC,QAAMC,WAAWC,OAA8B,IAAA;AAC/C,SAAOC,QAAQ,MAAA;AACb,QAAI,CAACH,OAAO;AACV,aAAO;QAAC,MAAM;QAAMI;;IACtB;AAEA,WAAO;MACL,CAAC,EAAEC,WAAU,MAAO,sBAAA,cAACC,OAAAA;QAAIC,MAAK;QAAOC,WAAWC,GAAG,mBAAmBJ,UAAAA;QAAaK,KAAKT;;MACxF,MAAMA,SAASU,WAAWC,6BAAa,sBAAA,cAACC,eAAAA,IAAAA,GAAkBZ,SAASU,OAAO;;EAE9E,GAAG;IAACX;IAAOC;GAAS;AACtB;AAEA,IAAMY,gBAAgBC,2BAA4C,CAAC,EAAET,WAAU,GAAIU,iBAAAA;AACjF,QAAM,EAAEC,IAAIC,OAAOC,gBAAgBC,UAAS,IAAKC,oBAAmBP,cAAcQ,WAAW;AAC7F,QAAMC,UAAUpB,OAAO,CAAA;AACvB,SACE,sBAAA,cAACqB,MAAAA;IACCC,MAAM;MAAER;MAAIE;MAAgBC;MAAWF;MAAOQ,OAAOH,QAAQX;IAAU;IACvEN,YAAYI,GAAG,WAAWJ,UAAAA;IAC1BK,KAAKK;;AAGX,CAAA;AAEAF,cAAcQ,cAAc;;;ACzC5B,SAASK,WAAAA,gBAAe;AAGxB,SAASC,WAAW;AACpB,SAASC,iBAAiB;;AAqCnB,IAAMC,yBAA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K,MAAEC,KAAIC,SAAShB,MAAMiB,IAAI,KAAKjB,MAAMiB,KAAKC,EAAE,GACtD,gBAAAZ,OAAA,cAACI,KAAKS,MAAI;IACRC,OAAO;MACL;QACEC,OAAOlB,OAAO,iBAAiB;QAC/BmB,SAAS,MAAMlB,QAAQ,CAACD,UAAS,CAACA,KAAAA;MACpC;;OAILA,QACC,gBAAAG,OAAA,cAACI,KAAKa,KAAG,MACP,gBAAAjB,OAAA,cAACkB,OAAAA;IAAKP,MAAMjB,MAAMiB;IAAMQ,YAAW;;AAK7C;AAEA1B,iBAAiB2B,cAAc;",
6
- "names": ["React", "React", "forwardRef", "useMemo", "useRef", "createPortal", "Json", "mx", "useContainerDebug", "debug", "debugRef", "useRef", "useMemo", "undefined", "classNames", "div", "role", "className", "mx", "ref", "current", "createPortal", "ContainerInfo", "forwardRef", "forwardedRef", "id", "state", "activeLocation", "scrolling", "useMosaicContainer", "displayName", "counter", "Json", "data", "count", "useMemo", "log", "arrayMove", "useEventHandlerAdapter", "items", "getId", "get", "make", "onChange", "props", "onTake", "source", "cb", "info", "mutate", "from", "findIndex", "item", "id", "splice", "data", "onDrop", "target", "to", "type", "location", "withMosaic", "Story", "React", "Mosaic", "Root", "useComposedRefs", "Schema", "React", "forwardRef", "useMemo", "useRef", "Obj", "Ref", "Type", "ObjectId", "useObject", "Tag", "Json", "getHashStyles", "mx", "TestItem", "Struct", "name", "String", "description", "optional", "label", "pipe", "Type", "object", "typename", "version", "TestColumn", "id", "ObjectId", "items", "mutable", "Array", "Ref", "Root", "forwardRef", "columns", "debug", "forwardedRef", "DebugInfo", "debugHandler", "useContainerDebug", "viewportRef", "useRef", "eventHandler", "useEventHandlerAdapter", "getId", "data", "get", "make", "canDrop", "source", "Obj", "instanceOf", "React", "div", "role", "className", "mx", "ref", "Focus", "Group", "asChild", "axis", "Mosaic", "Container", "withFocus", "autoScroll", "current", "Viewport", "padding", "Stack", "item", "Tile", "Column", "classNames", "location", "column", "updateColumn", "useObject", "dragHandleRef", "dxn", "toString", "target", "onChange", "mutator", "menuItems", "useMemo", "onClick", "obj", "idx", "findIndex", "splice", "dragHandle", "Card", "Toolbar", "DragHandle", "Title", "Menu", "Context", "value", "Item", "length", "displayName", "rootRef", "composedRef", "useComposedRefs", "focus", "context", "Row", "icon", "Tag", "palette", "getHashStyles", "hue", "Placeholder", "props", "mosaicStyles", "placeholder", "root", "content", "Debug", "containers", "dragging", "useMosaic", "counter", "Json", "count", "Board", "useControllableState", "React", "Icon", "Popover", "ResizeHandle", "resizeAttributes", "sizeStyle", "DEFAULT_BLOCK_SIZE", "MIN_BLOCK_SIZE", "CardContainer", "children", "icon", "role", "React", "PopoverCardContainer", "IntrinsicCardContainer", "border", "Popover", "Root", "open", "Content", "onOpenAutoFocus", "event", "preventDefault", "Viewport", "classNames", "Arrow", "Trigger", "asChild", "Icon", "size", "defaultSize", "propSize", "onSizeChange", "setSize", "useControllableState", "prop", "defaultProp", "onChange", "div", "className", "style", "sizeStyle", "resizeAttributes", "ResizeHandle", "side", "fallbackSize", "minSize", "React", "useRef", "useState", "Obj", "Json", "DefaultStackTile", "props", "dragHandleRef", "useRef", "open", "setOpen", "useState", "React", "Mosaic", "Tile", "className", "Card", "Toolbar", "DragHandle", "ref", "Title", "Obj", "getLabel", "data", "id", "Menu", "items", "label", "onClick", "Row", "Json", "classNames", "displayName"]
3
+ "sources": ["../../../../src/testing/decorator.tsx", "../../../../src/testing/Board.tsx", "../../../../src/testing/CardContainer.tsx", "../../../../src/testing/DefaultStackTile.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport { type Decorator } from '@storybook/react-vite';\nimport React from 'react';\n\nimport { Mosaic } from '../components';\n\nexport const withMosaic = (): Decorator => {\n return (Story) => (\n <Mosaic.Root>\n <Story />\n </Mosaic.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport * as Schema from 'effect/Schema';\nimport React, { forwardRef, useMemo, useRef, useState } from 'react';\n\nimport { Obj, Ref, Type } from '@dxos/echo';\nimport { ObjectId } from '@dxos/keys';\nimport { useObject } from '@dxos/react-client/echo';\nimport { Tag, type ThemedClassName } from '@dxos/react-ui';\nimport { Json } from '@dxos/react-ui-syntax-highlighter';\nimport { getHashStyles, mx } from '@dxos/ui-theme';\n\nimport {\n Card,\n type CardMenuProps,\n Focus,\n Mosaic,\n type MosaicTileProps,\n type MosiacPlaceholderProps,\n mosaicStyles,\n useMosaic,\n} from '../components';\nimport { useContainerDebug, useEventHandlerAdapter } from '../hooks';\n\n//\n// Test Data\n//\n\nexport const TestItem = Schema.Struct({\n name: Schema.String,\n description: Schema.optional(Schema.String),\n label: Schema.optional(Schema.String),\n}).pipe(\n Type.object({\n typename: 'example.com/type/Item',\n version: '0.1.0',\n }),\n);\n\nexport interface TestItem extends Schema.Schema.Type<typeof TestItem> {}\n\nexport const TestColumn = Schema.Struct({\n id: ObjectId,\n items: Schema.mutable(Schema.Array(Type.Ref(TestItem))),\n}).pipe(\n Type.object({\n typename: 'example.com/type/Column',\n version: '0.1.0',\n }),\n);\n\nexport interface TestColumn extends Schema.Schema.Type<typeof TestColumn> {}\n\n//\n// Root\n//\n\ntype RootProps = {\n id: string;\n columns: TestColumn[];\n debug?: boolean;\n};\n\nconst Root = forwardRef<HTMLDivElement, RootProps>(({ id, columns, debug }, forwardedRef) => {\n const [DebugInfo, debugHandler] = useContainerDebug(debug);\n const [viewport, setViewport] = useState<HTMLElement | null>(null);\n\n const eventHandler = useEventHandlerAdapter({\n id,\n items: columns,\n getId: (data) => data.id,\n get: (data) => data,\n make: (object) => object,\n canDrop: ({ source }) => Obj.instanceOf(TestColumn, source.data),\n });\n\n return (\n <div\n role='none'\n className={mx('plb-2 grid bs-full is-full overflow-hidden', debug && 'grid-cols-[1fr_20rem] gap-2')}\n ref={forwardedRef}\n >\n <Focus.Group asChild axis='horizontal'>\n <Mosaic.Container\n asChild\n withFocus\n axis='horizontal'\n autoScroll={viewport}\n eventHandler={eventHandler}\n debug={debugHandler}\n >\n <Mosaic.Viewport axis='horizontal' padding viewportRef={setViewport}>\n <Mosaic.Stack axis='horizontal' items={columns} getId={(item) => item.id} Tile={Column} debug={debug} />\n </Mosaic.Viewport>\n </Mosaic.Container>\n </Focus.Group>\n <DebugInfo />\n </div>\n );\n});\n\n//\n// Column\n//\n\ntype ColumnProps = Pick<MosaicTileProps<TestColumn>, 'classNames' | 'location' | 'data' | 'debug'>;\n\nconst Column = forwardRef<HTMLDivElement, ColumnProps>(({ classNames, location, data, debug }, forwardedRef) => {\n const [column, updateColumn] = useObject(data);\n const [DebugInfo, debugHandler] = useContainerDebug(debug);\n const dragHandleRef = useRef<HTMLButtonElement>(null);\n const [viewport, setViewport] = useState<HTMLElement | null>(null);\n const eventHandler = useEventHandlerAdapter<Ref.Unknown>({\n id: data.id,\n items: column.items,\n getId: (data) => data.dxn.toString(),\n get: (data) => data.target!,\n make: (object) => Ref.make(object),\n canDrop: ({ source }) => Obj.instanceOf(TestItem, source.data.target),\n onChange: (mutator) => updateColumn((column) => mutator(column.items)),\n });\n\n // Context menu.\n const menuItems = useMemo<NonNullable<CardMenuProps<TestItem>['items']>>(\n () => [\n {\n label: 'Delete',\n onClick: (obj) => {\n updateColumn((column) => {\n const idx = column.items.findIndex((item) => item.target?.id === obj?.id);\n if (idx !== -1) {\n column.items.splice(idx, 1);\n }\n });\n },\n },\n ],\n [updateColumn],\n );\n\n return (\n <Mosaic.Tile asChild dragHandle={dragHandleRef.current} location={location} id={data.id} data={data} debug={debug}>\n <Focus.Group asChild>\n <div\n className={mx(\n 'grid bs-full card-default-width overflow-hidden bg-deckSurface',\n debug ? 'grid-rows-[min-content_1fr_20rem]' : 'grid-rows-[min-content_1fr_min-content]',\n classNames,\n )}\n ref={forwardedRef}\n >\n <Card.Toolbar>\n <Card.DragHandle ref={dragHandleRef} />\n <Card.Title>{column.id}</Card.Title>\n <Card.Menu items={[]} />\n </Card.Toolbar>\n <Card.Context value={{ menuItems }}>\n <Mosaic.Container\n asChild\n withFocus\n axis='vertical'\n autoScroll={viewport}\n eventHandler={eventHandler}\n debug={debugHandler}\n >\n <Mosaic.Viewport axis='vertical' padding viewportRef={setViewport}>\n <Mosaic.Stack axis='vertical' items={column.items} getId={(data) => data.dxn.toString()} Tile={Item} />\n </Mosaic.Viewport>\n </Mosaic.Container>\n </Card.Context>\n <div role='none'>\n <div className='grow flex p-1 justify-center text-xs'>{column.items.length}</div>\n <DebugInfo />\n </div>\n </div>\n </Focus.Group>\n </Mosaic.Tile>\n );\n});\n\nColumn.displayName = 'Column';\n\n//\n// Item\n//\n\ntype ItemProps = Pick<MosaicTileProps<Ref.Ref<TestItem>>, 'classNames' | 'location' | 'data' | 'debug'>;\n\nconst Item = forwardRef<HTMLDivElement, ItemProps>(({ classNames, data: ref, location, debug }, forwardedRef) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const composedRef = useComposedRefs<HTMLDivElement>(rootRef, forwardedRef);\n const dragHandleRef = useRef<HTMLButtonElement>(null);\n const object = ref.target;\n if (!object) {\n return null;\n }\n\n return (\n <Mosaic.Tile\n asChild\n dragHandle={dragHandleRef.current}\n id={ref.dxn.toString()}\n data={ref}\n location={location}\n debug={debug}\n >\n <Focus.Group asChild>\n <Card.Root classNames={classNames} onClick={() => rootRef.current?.focus()} ref={composedRef}>\n <Card.Toolbar>\n <Card.DragHandle ref={dragHandleRef} />\n <Card.Title>{object.name}</Card.Title>\n <Card.Menu context={object} />\n </Card.Toolbar>\n <Card.Row icon='ph--note--regular' classNames='text-description'>\n {object.description}\n </Card.Row>\n <Card.Row icon='ph--tag--regular'>\n {object.label && (\n <div role='none' className='flex shrink-0 gap-1 text-xs items-center'>\n <Tag palette={getHashStyles(object.label).hue}>{object.label}</Tag>\n </div>\n )}\n </Card.Row>\n </Card.Root>\n </Focus.Group>\n </Mosaic.Tile>\n );\n});\n\nItem.displayName = 'Item';\n\n//\n// Placeholder\n//\n\nconst Placeholder = (props: MosiacPlaceholderProps<number>) => {\n return (\n <Mosaic.Placeholder {...props} classNames={mosaicStyles.placeholder.root}>\n <div\n className={mx(\n 'flex bs-full border border-dashed border-separator rounded-sm',\n mosaicStyles.placeholder.content,\n )}\n />\n </Mosaic.Placeholder>\n );\n};\n\nPlaceholder.displayName = 'Placeholder';\n\n//\n// Debug\n//\n\nexport const Debug = forwardRef<HTMLDivElement, ThemedClassName>(({ classNames }, forwardedRef) => {\n const { containers, dragging } = useMosaic(Debug.displayName!);\n const counter = useRef(0);\n return (\n <Json\n data={{ containers, dragging, count: counter.current++ }}\n classNames={mx('text-xs', classNames)}\n ref={forwardedRef}\n />\n );\n});\n\nDebug.displayName = 'Debug';\n\n//\n// Board\n//\n\nexport const Board = { Root, Column, Item, Placeholder, Debug };\n\nexport type { RootProps, ColumnProps, ItemProps };\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, { type PropsWithChildren } from 'react';\n\nimport { Icon, Popover } from '@dxos/react-ui';\nimport { ResizeHandle, type Size, resizeAttributes, sizeStyle } from '@dxos/react-ui-dnd';\n\nconst DEFAULT_BLOCK_SIZE = 22;\nconst MIN_BLOCK_SIZE = 8;\n\n//\n// Card container.\n//\n\nexport const CardContainer = ({\n children,\n icon = 'ph--placeholder--regular',\n role,\n}: PropsWithChildren<{ icon?: string; role?: string }>) => {\n switch (role) {\n case 'card--popover':\n return <PopoverCardContainer icon={icon}>{children}</PopoverCardContainer>;\n case 'card--intrinsic':\n default:\n return <IntrinsicCardContainer>{children}</IntrinsicCardContainer>;\n }\n};\n\nconst border = 'relative border border-dashed border-subduedSeparator p-4 rounded-lg overflow-x-auto';\n\n//\n// Popover\n//\n\nexport type PopoverCardContainerProps = PropsWithChildren<{ icon?: string }>;\n\nexport const PopoverCardContainer = ({ children, icon = 'ph--placeholder--regular' }: PopoverCardContainerProps) => {\n return (\n <Popover.Root open>\n <Popover.Content onOpenAutoFocus={(event) => event.preventDefault()}>\n <Popover.Viewport classNames='popover-card-width'>{children}</Popover.Viewport>\n <Popover.Arrow />\n </Popover.Content>\n <Popover.Trigger asChild>\n <Icon icon={icon} size={5} />\n </Popover.Trigger>\n </Popover.Root>\n );\n};\n\n//\n// Intrinsic card container (size constrained by card).\n//\n\nexport type IntrinsicCardContainerProps = PropsWithChildren<{\n defaultSize?: Size;\n size?: Size;\n onSizeChange?: (size: Size, commit?: boolean) => void;\n}>;\n\nexport const IntrinsicCardContainer = ({\n children,\n defaultSize,\n size: propSize,\n onSizeChange,\n}: IntrinsicCardContainerProps) => {\n const [size = DEFAULT_BLOCK_SIZE, setSize] = useControllableState<Size>({\n prop: propSize,\n defaultProp: defaultSize,\n onChange: onSizeChange,\n });\n\n return (\n <div className={border} style={sizeStyle(size, 'horizontal')} {...resizeAttributes}>\n {children}\n <ResizeHandle\n side='inline-end'\n fallbackSize={DEFAULT_BLOCK_SIZE}\n minSize={MIN_BLOCK_SIZE}\n size={size}\n onSizeChange={setSize}\n />\n </div>\n );\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { useRef, useState } from 'react';\n\nimport { Obj } from '@dxos/echo';\nimport { Json } from '@dxos/react-ui-syntax-highlighter';\n\nimport { Card, Mosaic, type StackTileComponent } from '../components';\n\nexport const DefaultStackTile: StackTileComponent<Obj.Any> = (props) => {\n const dragHandleRef = useRef<HTMLButtonElement>(null);\n const [open, setOpen] = useState(false);\n return (\n <Mosaic.Tile {...props} className='border border-separator rounded-sm font-mono'>\n <Card.Toolbar>\n <Card.DragHandle ref={dragHandleRef} />\n <Card.Title>{Obj.getLabel(props.data) ?? props.data.id}</Card.Title>\n <Card.Menu\n items={[\n {\n label: open ? 'Hide details' : 'Show details',\n onClick: () => setOpen((open) => !open),\n },\n ]}\n />\n </Card.Toolbar>\n {open && (\n <Card.Row>\n <Json data={props.data} classNames='text-xs' />\n </Card.Row>\n )}\n </Mosaic.Tile>\n );\n};\n\nDefaultStackTile.displayName = 'Def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IAAE,GAAGR;IAAOS,WAAU;KAChC,gBAAAH,OAAA,cAACI,KAAKC,SAAO,MACX,gBAAAL,OAAA,cAACI,KAAKE,YAAU;IAACC,KAAKZ;MACtB,gBAAAK,OAAA,cAACI,KAAKI,OAAK,MAAEC,KAAIC,SAAShB,MAAMiB,IAAI,KAAKjB,MAAMiB,KAAKC,EAAE,GACtD,gBAAAZ,OAAA,cAACI,KAAKS,MAAI;IACRC,OAAO;MACL;QACEC,OAAOlB,OAAO,iBAAiB;QAC/BmB,SAAS,MAAMlB,QAAQ,CAACD,UAAS,CAACA,KAAAA;MACpC;;OAILA,QACC,gBAAAG,OAAA,cAACI,KAAKa,KAAG,MACP,gBAAAjB,OAAA,cAACkB,OAAAA;IAAKP,MAAMjB,MAAMiB;IAAMQ,YAAW;;AAK7C;AAEA1B,iBAAiB2B,cAAc;",
6
+ "names": ["React", "withMosaic", "Story", "Mosaic", "Root", "useComposedRefs", "Schema", "React", "forwardRef", "useMemo", "useRef", "useState", "Obj", "Ref", "Type", "ObjectId", "useObject", "Tag", "Json", "getHashStyles", "mx", "TestItem", "Struct", "name", "String", "description", "optional", "label", "pipe", "Type", "object", "typename", "version", "TestColumn", "id", "ObjectId", "items", "mutable", "Array", "Ref", "Root", "forwardRef", "columns", "debug", "forwardedRef", "DebugInfo", "debugHandler", "useContainerDebug", "viewport", "setViewport", "useState", "eventHandler", "useEventHandlerAdapter", "getId", "data", "get", "make", "canDrop", "source", "Obj", "instanceOf", "React", "div", "role", "className", "mx", "ref", "Focus", "Group", "asChild", "axis", "Mosaic", "Container", "withFocus", "autoScroll", "Viewport", "padding", "viewportRef", "Stack", "item", "Tile", "Column", "classNames", "location", "column", "updateColumn", "useObject", "dragHandleRef", "useRef", "dxn", "toString", "target", "onChange", "mutator", "menuItems", "useMemo", "onClick", "obj", "idx", "findIndex", "splice", "dragHandle", "current", "Card", "Toolbar", "DragHandle", "Title", "Menu", "Context", "value", "Item", "length", "displayName", "rootRef", "composedRef", "useComposedRefs", "focus", "context", "Row", "icon", "Tag", "palette", "getHashStyles", "hue", "Placeholder", "props", "mosaicStyles", "placeholder", "root", "content", "Debug", "containers", "dragging", "useMosaic", "counter", "Json", "count", "Board", "useControllableState", "React", "Icon", "Popover", "ResizeHandle", "resizeAttributes", "sizeStyle", "DEFAULT_BLOCK_SIZE", "MIN_BLOCK_SIZE", "CardContainer", "children", "icon", "role", "React", "PopoverCardContainer", "IntrinsicCardContainer", "border", "Popover", "Root", "open", "Content", "onOpenAutoFocus", "event", "preventDefault", "Viewport", "classNames", "Arrow", "Trigger", "asChild", "Icon", "size", "defaultSize", "propSize", "onSizeChange", "setSize", "useControllableState", "prop", "defaultProp", "onChange", "div", "className", "style", "sizeStyle", "resizeAttributes", "ResizeHandle", "side", "fallbackSize", "minSize", "React", "useRef", "useState", "Obj", "Json", "DefaultStackTile", "props", "dragHandleRef", "useRef", "open", "setOpen", "useState", "React", "Mosaic", "Tile", "className", "Card", "Toolbar", "DragHandle", "ref", "Title", "Obj", "getLabel", "data", "id", "Menu", "items", "label", "onClick", "Row", "Json", "classNames", "displayName"]
7
7
  }