@dxos/react-ui-mosaic 0.8.4-main.bc674ce → 0.8.4-main.ef1bc66f44
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/dist/lib/browser/{chunk-UMBPEG4F.mjs → chunk-Y6GU2CCU.mjs} +833 -992
- package/dist/lib/browser/chunk-Y6GU2CCU.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +407 -45
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +28 -218
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/{chunk-X6GV7SMK.mjs → chunk-KTLFCRVA.mjs} +833 -992
- package/dist/lib/node-esm/chunk-KTLFCRVA.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +407 -45
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +28 -218
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/types/src/components/Board/Board.d.ts +65 -0
- package/dist/types/src/components/Board/Board.d.ts.map +1 -0
- package/dist/types/src/components/{Mosaic/Mosaic.stories.d.ts → Board/Board.stories.d.ts} +9 -1
- package/dist/types/src/components/Board/Board.stories.d.ts.map +1 -0
- package/dist/types/src/components/Board/Column.d.ts +29 -0
- package/dist/types/src/components/Board/Column.d.ts.map +1 -0
- package/dist/types/src/components/Board/Item.d.ts +9 -0
- package/dist/types/src/components/Board/Item.d.ts.map +1 -0
- package/dist/types/src/components/Board/index.d.ts +2 -0
- package/dist/types/src/components/Board/index.d.ts.map +1 -0
- package/dist/types/src/components/Card/Card.d.ts +5 -3
- package/dist/types/src/components/Card/Card.d.ts.map +1 -1
- package/dist/types/src/components/Focus/Focus.d.ts +5 -4
- package/dist/types/src/components/Focus/Focus.d.ts.map +1 -1
- package/dist/types/src/components/Focus/styles.d.ts.map +1 -1
- package/dist/types/src/components/Mosaic/Mosaic.d.ts +8 -17
- package/dist/types/src/components/Mosaic/Mosaic.d.ts.map +1 -1
- package/dist/types/src/components/Mosaic/styles.d.ts.map +1 -1
- package/dist/types/src/components/Mosaic/types.d.ts +0 -2
- package/dist/types/src/components/Mosaic/types.d.ts.map +1 -1
- package/dist/types/src/components/Stack/Stack.d.ts +3 -3
- package/dist/types/src/components/Stack/Stack.d.ts.map +1 -1
- package/dist/types/src/components/Stack/Stack.stories.d.ts.map +1 -1
- package/dist/types/src/{testing/Virtualizer.stories.d.ts → components/Stack/virtualizer.stories.d.ts} +2 -2
- package/dist/types/src/components/Stack/virtualizer.stories.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/testing/CardContainer.d.ts +1 -1
- package/dist/types/src/testing/CardContainer.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/types.d.ts +21 -0
- package/dist/types/src/testing/types.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +4 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -26
- package/src/components/{Mosaic/Mosaic.stories.tsx → Board/Board.stories.tsx} +52 -8
- package/src/components/Board/Board.tsx +166 -0
- package/src/components/Board/Column.tsx +253 -0
- package/src/components/Board/Item.tsx +80 -0
- package/src/components/{Layout → Board}/index.ts +1 -1
- package/src/components/Card/Card.stories.tsx +1 -1
- package/src/components/Card/styles.ts +1 -1
- package/src/components/Focus/Focus.tsx +7 -9
- package/src/components/Focus/styles.ts +3 -6
- package/src/components/Image/Image.stories.tsx +1 -1
- package/src/components/Mosaic/Mosaic.tsx +40 -39
- package/src/components/Mosaic/styles.ts +9 -8
- package/src/components/Mosaic/types.ts +0 -4
- package/src/components/Stack/Stack.stories.tsx +23 -19
- package/src/components/Stack/Stack.tsx +34 -25
- package/src/{testing/Virtualizer.stories.tsx → components/Stack/virtualizer.stories.tsx} +47 -37
- package/src/components/index.ts +1 -1
- package/src/hooks/useContainerDebug.tsx +4 -2
- package/src/testing/CardContainer.tsx +12 -7
- package/src/testing/index.ts +1 -1
- package/src/testing/types.ts +38 -0
- package/src/translations.ts +4 -1
- package/dist/lib/browser/chunk-UMBPEG4F.mjs.map +0 -7
- package/dist/lib/browser/index.css +0 -13
- package/dist/lib/browser/index.css.map +0 -7
- package/dist/lib/browser/testing/index.css +0 -13
- package/dist/lib/browser/testing/index.css.map +0 -7
- package/dist/lib/node-esm/chunk-X6GV7SMK.mjs.map +0 -7
- package/dist/lib/node-esm/index.css +0 -13
- package/dist/lib/node-esm/index.css.map +0 -7
- package/dist/lib/node-esm/testing/index.css +0 -13
- package/dist/lib/node-esm/testing/index.css.map +0 -7
- package/dist/types/src/components/Layout/Layout.d.ts +0 -33
- package/dist/types/src/components/Layout/Layout.d.ts.map +0 -1
- package/dist/types/src/components/Layout/Layout.stories.d.ts +0 -10
- package/dist/types/src/components/Layout/Layout.stories.d.ts.map +0 -1
- package/dist/types/src/components/Layout/index.d.ts +0 -2
- package/dist/types/src/components/Layout/index.d.ts.map +0 -1
- package/dist/types/src/components/Mosaic/Mosaic.stories.d.ts.map +0 -1
- package/dist/types/src/components/Scrollable/Scrollable.d.ts +0 -24
- package/dist/types/src/components/Scrollable/Scrollable.d.ts.map +0 -1
- package/dist/types/src/components/Scrollable/Scrollable.stories.d.ts +0 -10
- package/dist/types/src/components/Scrollable/Scrollable.stories.d.ts.map +0 -1
- package/dist/types/src/components/Scrollable/index.d.ts +0 -2
- package/dist/types/src/components/Scrollable/index.d.ts.map +0 -1
- package/dist/types/src/testing/Board.d.ts +0 -45
- package/dist/types/src/testing/Board.d.ts.map +0 -1
- package/dist/types/src/testing/Slot.stories.d.ts +0 -14
- package/dist/types/src/testing/Slot.stories.d.ts.map +0 -1
- package/dist/types/src/testing/Virtualizer.stories.d.ts.map +0 -1
- package/src/components/Layout/Layout.stories.tsx +0 -59
- package/src/components/Layout/Layout.tsx +0 -108
- package/src/components/Scrollable/Scrollable.stories.tsx +0 -59
- package/src/components/Scrollable/Scrollable.tsx +0 -88
- package/src/components/Scrollable/index.ts +0 -5
- package/src/components/Scrollable/scrollable.css +0 -20
- package/src/testing/Board.tsx +0 -278
- package/src/testing/Slot.stories.tsx +0 -101
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/components/Card/styles.ts":{"bytes":2466,"imports":[],"format":"esm"},"src/translations.ts":{"bytes":1059,"imports":[],"format":"esm"},"src/components/Image/Image.tsx":{"bytes":22239,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/components/Image/index.ts":{"bytes":464,"imports":[{"path":"src/components/Image/Image.tsx","kind":"import-statement","original":"./Image"}],"format":"esm"},"src/components/Card/Card.tsx":{"bytes":34464,"imports":[{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"src/components/Image/index.ts","kind":"import-statement","original":"../Image"},{"path":"src/components/Card/styles.ts","kind":"import-statement","original":"./styles"}],"format":"esm"},"src/components/Card/CardDragPreview.tsx":{"bytes":2399,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/Card/styles.ts","kind":"import-statement","original":"./styles"}],"format":"esm"},"src/components/Card/index.ts":{"bytes":758,"imports":[{"path":"src/components/Card/styles.ts","kind":"import-statement","original":"./styles"},{"path":"src/components/Card/Card.tsx","kind":"import-statement","original":"./Card"},{"path":"src/components/Card/CardDragPreview.tsx","kind":"import-statement","original":"./CardDragPreview"}],"format":"esm"},"src/components/Focus/styles.ts":{"bytes":2242,"imports":[],"format":"esm"},"src/components/Focus/Focus.tsx":{"bytes":8109,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/Focus/styles.ts","kind":"import-statement","original":"./styles"}],"format":"esm"},"src/components/Focus/index.ts":{"bytes":658,"imports":[{"path":"src/components/Focus/styles.ts","kind":"import-statement","original":"./styles"},{"path":"src/components/Focus/Focus.tsx","kind":"import-statement","original":"./Focus"}],"format":"esm"},"src/components/Layout/Layout.tsx":{"bytes":6547,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/components/Layout/index.ts":{"bytes":470,"imports":[{"path":"src/components/Layout/Layout.tsx","kind":"import-statement","original":"./Layout"}],"format":"esm"},"src/components/Mosaic/styles.ts":{"bytes":4082,"imports":[],"format":"esm"},"src/components/Mosaic/extension.ts":{"bytes":14399,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true}],"format":"esm"},"src/components/Mosaic/types.ts":{"bytes":3507,"imports":[],"format":"esm"},"src/components/Scrollable/scrollable.css":{"bytes":736,"imports":[]},"src/components/Scrollable/Scrollable.tsx":{"bytes":7659,"imports":[{"path":"overlayscrollbars-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"overlayscrollbars/styles/overlayscrollbars.css","kind":"import-statement","external":true},{"path":"src/components/Scrollable/scrollable.css","kind":"import-statement","original":"./scrollable.css"}],"format":"esm"},"src/components/Scrollable/index.ts":{"bytes":482,"imports":[{"path":"src/components/Scrollable/Scrollable.tsx","kind":"import-statement","original":"./Scrollable"}],"format":"esm"},"src/hooks/useContainerDebug.tsx":{"bytes":5641,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"}],"format":"esm"},"src/hooks/useEventHandlerAdapter.ts":{"bytes":8069,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/useVisibleItems.ts":{"bytes":3168,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":714,"imports":[{"path":"src/hooks/useContainerDebug.tsx","kind":"import-statement","original":"./useContainerDebug"},{"path":"src/hooks/useEventHandlerAdapter.ts","kind":"import-statement","original":"./useEventHandlerAdapter"},{"path":"src/hooks/useVisibleItems.ts","kind":"import-statement","original":"./useVisibleItems"}],"format":"esm"},"src/components/Stack/Stack.tsx":{"bytes":17785,"imports":[{"path":"@tanstack/react-virtual","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"src/components/Mosaic/index.ts","kind":"import-statement","original":"../Mosaic"},{"path":"src/components/Mosaic/index.ts","kind":"import-statement","original":"../Mosaic"}],"format":"esm"},"src/components/Stack/index.ts":{"bytes":464,"imports":[{"path":"src/components/Stack/Stack.tsx","kind":"import-statement","original":"./Stack"}],"format":"esm"},"src/components/Mosaic/Mosaic.tsx":{"bytes":85824,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-auto-scroll/element","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"bind-event-listener","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/components/Focus/index.ts","kind":"import-statement","original":"../Focus"},{"path":"src/components/Scrollable/index.ts","kind":"import-statement","original":"../Scrollable"},{"path":"src/components/Stack/index.ts","kind":"import-statement","original":"../Stack"}],"format":"esm"},"src/components/Mosaic/index.ts":{"bytes":839,"imports":[{"path":"src/components/Mosaic/styles.ts","kind":"import-statement","original":"./styles"},{"path":"src/components/Mosaic/extension.ts","kind":"import-statement","original":"./extension"},{"path":"src/components/Mosaic/types.ts","kind":"import-statement","original":"./types"},{"path":"src/components/Mosaic/Mosaic.tsx","kind":"import-statement","original":"./Mosaic"}],"format":"esm"},"src/components/index.ts":{"bytes":868,"imports":[{"path":"src/components/Card/index.ts","kind":"import-statement","original":"./Card"},{"path":"src/components/Focus/index.ts","kind":"import-statement","original":"./Focus"},{"path":"src/components/Image/index.ts","kind":"import-statement","original":"./Image"},{"path":"src/components/Layout/index.ts","kind":"import-statement","original":"./Layout"},{"path":"src/components/Mosaic/index.ts","kind":"import-statement","original":"./Mosaic"},{"path":"src/components/Stack/index.ts","kind":"import-statement","original":"./Stack"}],"format":"esm"},"src/index.ts":{"bytes":541,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"./hooks"}],"format":"esm"},"src/testing/decorator.tsx":{"bytes":1207,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"}],"format":"esm"},"src/testing/Board.tsx":{"bytes":27666,"imports":[{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"../hooks"}],"format":"esm"},"src/testing/CardContainer.tsx":{"bytes":7835,"imports":[{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","kind":"import-statement","external":true}],"format":"esm"},"src/testing/DefaultStackTile.tsx":{"bytes":4268,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"}],"format":"esm"},"src/testing/index.ts":{"bytes":761,"imports":[{"path":"src/testing/decorator.tsx","kind":"import-statement","original":"./decorator"},{"path":"src/testing/Board.tsx","kind":"import-statement","original":"./Board"},{"path":"src/testing/CardContainer.tsx","kind":"import-statement","original":"./CardContainer"},{"path":"src/testing/DefaultStackTile.tsx","kind":"import-statement","original":"./DefaultStackTile"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4810},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-UMBPEG4F.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["Card","CardDragPreview","Focus","Image","Layout","Mosaic","Stack","VirtualStack","cardStyles","dropHandler","focusStyles","mosaicStyles","useContainerDebug","useEventHandlerAdapter","useFocus","useMosaic","useMosaicContainer","useMosaicTile","useVisibleItems"],"entryPoint":"src/index.ts","cssBundle":"dist/lib/browser/index.css","inputs":{"src/components/Card/index.ts":{"bytesInOutput":0},"src/components/Card/CardDragPreview.tsx":{"bytesInOutput":492},"src/components/Layout/Layout.tsx":{"bytesInOutput":1395},"src/index.ts":{"bytesInOutput":0}},"bytes":2669},"dist/lib/browser/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21659},"dist/lib/browser/testing/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-UMBPEG4F.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true}],"exports":["Board","CardContainer","Debug","DefaultStackTile","IntrinsicCardContainer","PopoverCardContainer","TestColumn","TestItem","withMosaic"],"entryPoint":"src/testing/index.ts","cssBundle":"dist/lib/browser/testing/index.css","inputs":{"src/testing/decorator.tsx":{"bytesInOutput":181},"src/testing/index.ts":{"bytesInOutput":0},"src/testing/Board.tsx":{"bytesInOutput":7192},"src/testing/CardContainer.tsx":{"bytesInOutput":1961},"src/testing/DefaultStackTile.tsx":{"bytesInOutput":1100}},"bytes":10905},"dist/lib/browser/chunk-UMBPEG4F.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":111159},"dist/lib/browser/chunk-UMBPEG4F.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-auto-scroll/element","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"bind-event-listener","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"overlayscrollbars-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"overlayscrollbars/styles/overlayscrollbars.css","kind":"import-statement","external":true},{"path":"@tanstack/react-virtual","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["Card","Focus","Image","Mosaic","Stack","VirtualStack","dropHandler","styles","styles2","styles3","useContainerContext","useContainerDebug","useEventHandlerAdapter","useFocus","useRootContext","useTileContext","useVisibleItems"],"inputs":{"src/components/Card/styles.ts":{"bytesInOutput":695},"src/components/Image/Image.tsx":{"bytesInOutput":4776},"src/components/Card/Card.tsx":{"bytesInOutput":8779},"src/translations.ts":{"bytesInOutput":126},"src/components/Focus/styles.ts":{"bytesInOutput":532},"src/components/Focus/Focus.tsx":{"bytesInOutput":1677},"src/components/Focus/index.ts":{"bytesInOutput":0},"src/components/Mosaic/styles.ts":{"bytesInOutput":1303},"src/components/Mosaic/extension.ts":{"bytesInOutput":3256},"src/hooks/useContainerDebug.tsx":{"bytesInOutput":1322},"src/components/Mosaic/index.ts":{"bytesInOutput":0},"src/components/Mosaic/Mosaic.tsx":{"bytesInOutput":20600},"src/components/Scrollable/Scrollable.tsx":{"bytesInOutput":1634},"src/components/Scrollable/scrollable.css":{"bytesInOutput":0},"src/components/Stack/Stack.tsx":{"bytesInOutput":4183},"src/hooks/useEventHandlerAdapter.ts":{"bytesInOutput":1620},"src/hooks/useVisibleItems.ts":{"bytesInOutput":542}},"bytes":51983},"dist/lib/browser/index.css.map":{"imports":[],"exports":[],"inputs":{},"bytes":1137},"dist/lib/browser/index.css":{"imports":[],"inputs":{"src/components/Scrollable/scrollable.css":{"bytesInOutput":354}},"bytes":439},"dist/lib/browser/testing/index.css.map":{"imports":[],"exports":[],"inputs":{},"bytes":1140},"dist/lib/browser/testing/index.css":{"imports":[],"inputs":{"src/components/Scrollable/scrollable.css":{"bytesInOutput":354}},"bytes":439}}}
|
|
1
|
+
{"inputs":{"src/hooks/useContainerDebug.tsx":{"bytes":5788,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"}],"format":"esm"},"src/hooks/useEventHandlerAdapter.ts":{"bytes":8069,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/useVisibleItems.ts":{"bytes":3168,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/hooks/index.ts":{"bytes":714,"imports":[{"path":"src/hooks/useContainerDebug.tsx","kind":"import-statement","original":"./useContainerDebug"},{"path":"src/hooks/useEventHandlerAdapter.ts","kind":"import-statement","original":"./useEventHandlerAdapter"},{"path":"src/hooks/useVisibleItems.ts","kind":"import-statement","original":"./useVisibleItems"}],"format":"esm"},"src/components/Focus/styles.ts":{"bytes":1977,"imports":[],"format":"esm"},"src/components/Focus/Focus.tsx":{"bytes":8097,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/Focus/styles.ts","kind":"import-statement","original":"./styles"}],"format":"esm"},"src/components/Focus/index.ts":{"bytes":658,"imports":[{"path":"src/components/Focus/styles.ts","kind":"import-statement","original":"./styles"},{"path":"src/components/Focus/Focus.tsx","kind":"import-statement","original":"./Focus"}],"format":"esm"},"src/components/Mosaic/styles.ts":{"bytes":4415,"imports":[],"format":"esm"},"src/components/Mosaic/extension.ts":{"bytes":14399,"imports":[{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true}],"format":"esm"},"src/components/Mosaic/types.ts":{"bytes":3183,"imports":[],"format":"esm"},"src/components/Stack/Stack.tsx":{"bytes":19141,"imports":[{"path":"@tanstack/react-virtual","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"src/components/Mosaic/index.ts","kind":"import-statement","original":"../Mosaic"},{"path":"src/components/Mosaic/index.ts","kind":"import-statement","original":"../Mosaic"}],"format":"esm"},"src/components/Stack/index.ts":{"bytes":464,"imports":[{"path":"src/components/Stack/Stack.tsx","kind":"import-statement","original":"./Stack"}],"format":"esm"},"src/components/Mosaic/Mosaic.tsx":{"bytes":86437,"imports":[{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-auto-scroll/element","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"bind-event-listener","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/components/Focus/index.ts","kind":"import-statement","original":"../Focus"},{"path":"src/components/Stack/index.ts","kind":"import-statement","original":"../Stack"}],"format":"esm"},"src/components/Mosaic/index.ts":{"bytes":839,"imports":[{"path":"src/components/Mosaic/styles.ts","kind":"import-statement","original":"./styles"},{"path":"src/components/Mosaic/extension.ts","kind":"import-statement","original":"./extension"},{"path":"src/components/Mosaic/types.ts","kind":"import-statement","original":"./types"},{"path":"src/components/Mosaic/Mosaic.tsx","kind":"import-statement","original":"./Mosaic"}],"format":"esm"},"src/translations.ts":{"bytes":1320,"imports":[],"format":"esm"},"src/components/Card/styles.ts":{"bytes":2429,"imports":[],"format":"esm"},"src/components/Image/Image.tsx":{"bytes":22239,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/components/Image/index.ts":{"bytes":464,"imports":[{"path":"src/components/Image/Image.tsx","kind":"import-statement","original":"./Image"}],"format":"esm"},"src/components/Card/Card.tsx":{"bytes":34464,"imports":[{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"src/components/Image/index.ts","kind":"import-statement","original":"../Image"},{"path":"src/components/Card/styles.ts","kind":"import-statement","original":"./styles"}],"format":"esm"},"src/components/Card/CardDragPreview.tsx":{"bytes":2399,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/Card/styles.ts","kind":"import-statement","original":"./styles"}],"format":"esm"},"src/components/Card/index.ts":{"bytes":758,"imports":[{"path":"src/components/Card/styles.ts","kind":"import-statement","original":"./styles"},{"path":"src/components/Card/Card.tsx","kind":"import-statement","original":"./Card"},{"path":"src/components/Card/CardDragPreview.tsx","kind":"import-statement","original":"./CardDragPreview"}],"format":"esm"},"src/components/Board/Item.tsx":{"bytes":8303,"imports":[{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/components/Card/index.ts","kind":"import-statement","original":"../Card"},{"path":"src/components/Focus/index.ts","kind":"import-statement","original":"../Focus"},{"path":"src/components/Mosaic/index.ts","kind":"import-statement","original":"../Mosaic"}],"format":"esm"},"src/components/Board/Column.tsx":{"bytes":24567,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"src/translations.ts","kind":"import-statement","original":"../../translations"},{"path":"src/components/Card/index.ts","kind":"import-statement","original":"../Card"},{"path":"src/components/Focus/index.ts","kind":"import-statement","original":"../Focus"},{"path":"src/components/Mosaic/index.ts","kind":"import-statement","original":"../Mosaic"},{"path":"src/components/Board/Board.tsx","kind":"import-statement","original":"./Board"},{"path":"src/components/Board/Item.tsx","kind":"import-statement","original":"./Item"}],"format":"esm"},"src/components/Board/Board.tsx":{"bytes":14822,"imports":[{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/hooks/index.ts","kind":"import-statement","original":"../../hooks"},{"path":"src/components/Focus/index.ts","kind":"import-statement","original":"../Focus"},{"path":"src/components/Mosaic/index.ts","kind":"import-statement","original":"../Mosaic"},{"path":"src/components/Board/Column.tsx","kind":"import-statement","original":"./Column"},{"path":"src/components/Board/Item.tsx","kind":"import-statement","original":"./Item"}],"format":"esm"},"src/components/Board/index.ts":{"bytes":464,"imports":[{"path":"src/components/Board/Board.tsx","kind":"import-statement","original":"./Board"}],"format":"esm"},"src/components/index.ts":{"bytes":863,"imports":[{"path":"src/components/Board/index.ts","kind":"import-statement","original":"./Board"},{"path":"src/components/Card/index.ts","kind":"import-statement","original":"./Card"},{"path":"src/components/Focus/index.ts","kind":"import-statement","original":"./Focus"},{"path":"src/components/Image/index.ts","kind":"import-statement","original":"./Image"},{"path":"src/components/Mosaic/index.ts","kind":"import-statement","original":"./Mosaic"},{"path":"src/components/Stack/index.ts","kind":"import-statement","original":"./Stack"}],"format":"esm"},"src/index.ts":{"bytes":541,"imports":[{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/hooks/index.ts","kind":"import-statement","original":"./hooks"}],"format":"esm"},"src/testing/decorator.tsx":{"bytes":1207,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"}],"format":"esm"},"src/testing/types.ts":{"bytes":3025,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"src/testing/CardContainer.tsx":{"bytes":7880,"imports":[{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","kind":"import-statement","external":true}],"format":"esm"},"src/testing/DefaultStackTile.tsx":{"bytes":4268,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"src/components/index.ts","kind":"import-statement","original":"../components"}],"format":"esm"},"src/testing/index.ts":{"bytes":761,"imports":[{"path":"src/testing/decorator.tsx","kind":"import-statement","original":"./decorator"},{"path":"src/testing/types.ts","kind":"import-statement","original":"./types"},{"path":"src/testing/CardContainer.tsx","kind":"import-statement","original":"./CardContainer"},{"path":"src/testing/DefaultStackTile.tsx","kind":"import-statement","original":"./DefaultStackTile"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":33879},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-Y6GU2CCU.mjs","kind":"import-statement"},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["Board","BoardContextProvider","BoardDebug","Card","CardDragPreview","Focus","Image","Mosaic","Stack","VirtualStack","cardStyles","dropHandler","focusStyles","mosaicStyles","useBoardContext","useContainerDebug","useEventHandlerAdapter","useFocus","useMosaic","useMosaicContainer","useMosaicTile","useVisibleItems"],"entryPoint":"src/index.ts","inputs":{"src/components/Board/Board.tsx":{"bytesInOutput":3094},"src/hooks/useContainerDebug.tsx":{"bytesInOutput":1288},"src/hooks/useEventHandlerAdapter.ts":{"bytesInOutput":1620},"src/components/Board/Column.tsx":{"bytesInOutput":5898},"src/components/Card/index.ts":{"bytesInOutput":0},"src/components/Card/CardDragPreview.tsx":{"bytesInOutput":504},"src/components/Board/Item.tsx":{"bytesInOutput":1920},"src/index.ts":{"bytesInOutput":0}},"bytes":15348},"dist/lib/browser/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8527},"dist/lib/browser/testing/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-Y6GU2CCU.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-dnd","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true}],"exports":["CardContainer","DefaultStackTile","IntrinsicCardContainer","PopoverCardContainer","TestColumn","TestItem","withMosaic"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/decorator.tsx":{"bytesInOutput":181},"src/testing/index.ts":{"bytesInOutput":0},"src/testing/types.ts":{"bytesInOutput":554},"src/testing/CardContainer.tsx":{"bytesInOutput":1976},"src/testing/DefaultStackTile.tsx":{"bytesInOutput":1055}},"bytes":4123},"dist/lib/browser/chunk-Y6GU2CCU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":100927},"dist/lib/browser/chunk-Y6GU2CCU.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"@tanstack/react-virtual","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/combine","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/adapter","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/preserve-offset-on-source","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-auto-scroll/element","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge","kind":"import-statement","external":true},{"path":"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box","kind":"import-statement","external":true},{"path":"@radix-ui/react-compose-refs","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"bind-event-listener","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["Card","Focus","Image","Mosaic","Stack","VirtualStack","dropHandler","styles","styles2","styles3","translationKey","useContainerContext","useFocus","useRootContext","useTileContext","useVisibleItems"],"inputs":{"src/hooks/useVisibleItems.ts":{"bytesInOutput":529},"src/components/Focus/styles.ts":{"bytesInOutput":427},"src/components/Focus/Focus.tsx":{"bytesInOutput":1598},"src/components/Focus/index.ts":{"bytesInOutput":0},"src/components/Mosaic/styles.ts":{"bytesInOutput":1426},"src/components/Mosaic/extension.ts":{"bytesInOutput":3256},"src/components/Stack/Stack.tsx":{"bytesInOutput":4660},"src/components/Mosaic/index.ts":{"bytesInOutput":0},"src/components/Mosaic/Mosaic.tsx":{"bytesInOutput":20702},"src/translations.ts":{"bytesInOutput":209},"src/components/Card/styles.ts":{"bytesInOutput":679},"src/components/Card/Card.tsx":{"bytesInOutput":8860},"src/components/Image/Image.tsx":{"bytesInOutput":4835}},"bytes":47896}}}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Card,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
styles3 as styles,
|
|
6
|
-
useContainerDebug,
|
|
7
|
-
useEventHandlerAdapter,
|
|
8
|
-
useRootContext
|
|
9
|
-
} from "../chunk-UMBPEG4F.mjs";
|
|
3
|
+
Mosaic
|
|
4
|
+
} from "../chunk-Y6GU2CCU.mjs";
|
|
10
5
|
|
|
11
6
|
// src/testing/decorator.tsx
|
|
12
7
|
import React from "react";
|
|
@@ -14,16 +9,10 @@ var withMosaic = () => {
|
|
|
14
9
|
return (Story) => /* @__PURE__ */ React.createElement(Mosaic.Root, null, /* @__PURE__ */ React.createElement(Story, null));
|
|
15
10
|
};
|
|
16
11
|
|
|
17
|
-
// src/testing/
|
|
18
|
-
import { useComposedRefs } from "@radix-ui/react-compose-refs";
|
|
12
|
+
// src/testing/types.ts
|
|
19
13
|
import * as Schema from "effect/Schema";
|
|
20
|
-
import
|
|
21
|
-
import { Obj, Ref, Type } from "@dxos/echo";
|
|
14
|
+
import { Type } from "@dxos/echo";
|
|
22
15
|
import { ObjectId } from "@dxos/keys";
|
|
23
|
-
import { useObject } from "@dxos/react-client/echo";
|
|
24
|
-
import { Tag } from "@dxos/react-ui";
|
|
25
|
-
import { Json } from "@dxos/react-ui-syntax-highlighter";
|
|
26
|
-
import { getHashStyles, mx } from "@dxos/ui-theme";
|
|
27
16
|
var TestItem = Schema.Struct({
|
|
28
17
|
name: Schema.String,
|
|
29
18
|
description: Schema.optional(Schema.String),
|
|
@@ -34,218 +23,41 @@ var TestItem = Schema.Struct({
|
|
|
34
23
|
}));
|
|
35
24
|
var TestColumn = Schema.Struct({
|
|
36
25
|
id: ObjectId,
|
|
26
|
+
name: Schema.String,
|
|
37
27
|
items: Schema.mutable(Schema.Array(Type.Ref(TestItem)))
|
|
38
28
|
}).pipe(Type.object({
|
|
39
29
|
typename: "example.com/type/Column",
|
|
40
30
|
version: "0.1.0"
|
|
41
31
|
}));
|
|
42
|
-
var Root = /* @__PURE__ */ forwardRef(({ id, columns, debug }, forwardedRef) => {
|
|
43
|
-
const [DebugInfo, debugHandler] = useContainerDebug(debug);
|
|
44
|
-
const [viewport, setViewport] = useState(null);
|
|
45
|
-
const eventHandler = useEventHandlerAdapter({
|
|
46
|
-
id,
|
|
47
|
-
items: columns,
|
|
48
|
-
getId: (data) => data.id,
|
|
49
|
-
get: (data) => data,
|
|
50
|
-
make: (object) => object,
|
|
51
|
-
canDrop: ({ source }) => Obj.instanceOf(TestColumn, source.data)
|
|
52
|
-
});
|
|
53
|
-
return /* @__PURE__ */ React2.createElement("div", {
|
|
54
|
-
role: "none",
|
|
55
|
-
className: mx("plb-2 grid bs-full is-full overflow-hidden", debug && "grid-cols-[1fr_20rem] gap-2"),
|
|
56
|
-
ref: forwardedRef
|
|
57
|
-
}, /* @__PURE__ */ React2.createElement(Focus.Group, {
|
|
58
|
-
asChild: true,
|
|
59
|
-
axis: "horizontal"
|
|
60
|
-
}, /* @__PURE__ */ React2.createElement(Mosaic.Container, {
|
|
61
|
-
asChild: true,
|
|
62
|
-
withFocus: true,
|
|
63
|
-
axis: "horizontal",
|
|
64
|
-
autoScroll: viewport,
|
|
65
|
-
eventHandler,
|
|
66
|
-
debug: debugHandler
|
|
67
|
-
}, /* @__PURE__ */ React2.createElement(Mosaic.Viewport, {
|
|
68
|
-
axis: "horizontal",
|
|
69
|
-
padding: true,
|
|
70
|
-
viewportRef: setViewport
|
|
71
|
-
}, /* @__PURE__ */ React2.createElement(Mosaic.Stack, {
|
|
72
|
-
axis: "horizontal",
|
|
73
|
-
items: columns,
|
|
74
|
-
getId: (item) => item.id,
|
|
75
|
-
Tile: Column,
|
|
76
|
-
debug
|
|
77
|
-
})))), /* @__PURE__ */ React2.createElement(DebugInfo, null));
|
|
78
|
-
});
|
|
79
|
-
var Column = /* @__PURE__ */ forwardRef(({ classNames, location, data, debug }, forwardedRef) => {
|
|
80
|
-
const [column, updateColumn] = useObject(data);
|
|
81
|
-
const [DebugInfo, debugHandler] = useContainerDebug(debug);
|
|
82
|
-
const dragHandleRef = useRef(null);
|
|
83
|
-
const [viewport, setViewport] = useState(null);
|
|
84
|
-
const eventHandler = useEventHandlerAdapter({
|
|
85
|
-
id: data.id,
|
|
86
|
-
items: column.items,
|
|
87
|
-
getId: (data2) => data2.dxn.toString(),
|
|
88
|
-
get: (data2) => data2.target,
|
|
89
|
-
make: (object) => Ref.make(object),
|
|
90
|
-
canDrop: ({ source }) => Obj.instanceOf(TestItem, source.data.target),
|
|
91
|
-
onChange: (mutator) => updateColumn((column2) => mutator(column2.items))
|
|
92
|
-
});
|
|
93
|
-
const menuItems = useMemo(() => [
|
|
94
|
-
{
|
|
95
|
-
label: "Delete",
|
|
96
|
-
onClick: (obj) => {
|
|
97
|
-
updateColumn((column2) => {
|
|
98
|
-
const idx = column2.items.findIndex((item) => item.target?.id === obj?.id);
|
|
99
|
-
if (idx !== -1) {
|
|
100
|
-
column2.items.splice(idx, 1);
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
], [
|
|
106
|
-
updateColumn
|
|
107
|
-
]);
|
|
108
|
-
return /* @__PURE__ */ React2.createElement(Mosaic.Tile, {
|
|
109
|
-
asChild: true,
|
|
110
|
-
dragHandle: dragHandleRef.current,
|
|
111
|
-
location,
|
|
112
|
-
id: data.id,
|
|
113
|
-
data,
|
|
114
|
-
debug
|
|
115
|
-
}, /* @__PURE__ */ React2.createElement(Focus.Group, {
|
|
116
|
-
asChild: true
|
|
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),
|
|
119
|
-
ref: forwardedRef
|
|
120
|
-
}, /* @__PURE__ */ React2.createElement(Card.Toolbar, null, /* @__PURE__ */ React2.createElement(Card.DragHandle, {
|
|
121
|
-
ref: dragHandleRef
|
|
122
|
-
}), /* @__PURE__ */ React2.createElement(Card.Title, null, column.id), /* @__PURE__ */ React2.createElement(Card.Menu, {
|
|
123
|
-
items: []
|
|
124
|
-
})), /* @__PURE__ */ React2.createElement(Card.Context, {
|
|
125
|
-
value: {
|
|
126
|
-
menuItems
|
|
127
|
-
}
|
|
128
|
-
}, /* @__PURE__ */ React2.createElement(Mosaic.Container, {
|
|
129
|
-
asChild: true,
|
|
130
|
-
withFocus: true,
|
|
131
|
-
axis: "vertical",
|
|
132
|
-
autoScroll: viewport,
|
|
133
|
-
eventHandler,
|
|
134
|
-
debug: debugHandler
|
|
135
|
-
}, /* @__PURE__ */ React2.createElement(Mosaic.Viewport, {
|
|
136
|
-
axis: "vertical",
|
|
137
|
-
padding: true,
|
|
138
|
-
viewportRef: setViewport
|
|
139
|
-
}, /* @__PURE__ */ React2.createElement(Mosaic.Stack, {
|
|
140
|
-
axis: "vertical",
|
|
141
|
-
items: column.items,
|
|
142
|
-
getId: (data2) => data2.dxn.toString(),
|
|
143
|
-
Tile: Item
|
|
144
|
-
})))), /* @__PURE__ */ React2.createElement("div", {
|
|
145
|
-
role: "none"
|
|
146
|
-
}, /* @__PURE__ */ React2.createElement("div", {
|
|
147
|
-
className: "grow flex p-1 justify-center text-xs"
|
|
148
|
-
}, column.items.length), /* @__PURE__ */ React2.createElement(DebugInfo, null)))));
|
|
149
|
-
});
|
|
150
|
-
Column.displayName = "Column";
|
|
151
|
-
var Item = /* @__PURE__ */ forwardRef(({ classNames, data: ref, location, debug }, forwardedRef) => {
|
|
152
|
-
const rootRef = useRef(null);
|
|
153
|
-
const composedRef = useComposedRefs(rootRef, forwardedRef);
|
|
154
|
-
const dragHandleRef = useRef(null);
|
|
155
|
-
const object = ref.target;
|
|
156
|
-
if (!object) {
|
|
157
|
-
return null;
|
|
158
|
-
}
|
|
159
|
-
return /* @__PURE__ */ React2.createElement(Mosaic.Tile, {
|
|
160
|
-
asChild: true,
|
|
161
|
-
dragHandle: dragHandleRef.current,
|
|
162
|
-
id: ref.dxn.toString(),
|
|
163
|
-
data: ref,
|
|
164
|
-
location,
|
|
165
|
-
debug
|
|
166
|
-
}, /* @__PURE__ */ React2.createElement(Focus.Group, {
|
|
167
|
-
asChild: true
|
|
168
|
-
}, /* @__PURE__ */ React2.createElement(Card.Root, {
|
|
169
|
-
classNames,
|
|
170
|
-
onClick: () => rootRef.current?.focus(),
|
|
171
|
-
ref: composedRef
|
|
172
|
-
}, /* @__PURE__ */ React2.createElement(Card.Toolbar, null, /* @__PURE__ */ React2.createElement(Card.DragHandle, {
|
|
173
|
-
ref: dragHandleRef
|
|
174
|
-
}), /* @__PURE__ */ React2.createElement(Card.Title, null, object.name), /* @__PURE__ */ React2.createElement(Card.Menu, {
|
|
175
|
-
context: object
|
|
176
|
-
})), /* @__PURE__ */ React2.createElement(Card.Row, {
|
|
177
|
-
icon: "ph--note--regular",
|
|
178
|
-
classNames: "text-description"
|
|
179
|
-
}, object.description), /* @__PURE__ */ React2.createElement(Card.Row, {
|
|
180
|
-
icon: "ph--tag--regular"
|
|
181
|
-
}, object.label && /* @__PURE__ */ React2.createElement("div", {
|
|
182
|
-
role: "none",
|
|
183
|
-
className: "flex shrink-0 gap-1 text-xs items-center"
|
|
184
|
-
}, /* @__PURE__ */ React2.createElement(Tag, {
|
|
185
|
-
palette: getHashStyles(object.label).hue
|
|
186
|
-
}, object.label))))));
|
|
187
|
-
});
|
|
188
|
-
Item.displayName = "Item";
|
|
189
|
-
var Placeholder = (props) => {
|
|
190
|
-
return /* @__PURE__ */ React2.createElement(Mosaic.Placeholder, {
|
|
191
|
-
...props,
|
|
192
|
-
classNames: styles.placeholder.root
|
|
193
|
-
}, /* @__PURE__ */ React2.createElement("div", {
|
|
194
|
-
className: mx("flex bs-full border border-dashed border-separator rounded-sm", styles.placeholder.content)
|
|
195
|
-
}));
|
|
196
|
-
};
|
|
197
|
-
Placeholder.displayName = "Placeholder";
|
|
198
|
-
var Debug = /* @__PURE__ */ forwardRef(({ classNames }, forwardedRef) => {
|
|
199
|
-
const { containers, dragging } = useRootContext(Debug.displayName);
|
|
200
|
-
const counter = useRef(0);
|
|
201
|
-
return /* @__PURE__ */ React2.createElement(Json, {
|
|
202
|
-
data: {
|
|
203
|
-
containers,
|
|
204
|
-
dragging,
|
|
205
|
-
count: counter.current++
|
|
206
|
-
},
|
|
207
|
-
classNames: mx("text-xs", classNames),
|
|
208
|
-
ref: forwardedRef
|
|
209
|
-
});
|
|
210
|
-
});
|
|
211
|
-
Debug.displayName = "Debug";
|
|
212
|
-
var Board = {
|
|
213
|
-
Root,
|
|
214
|
-
Column,
|
|
215
|
-
Item,
|
|
216
|
-
Placeholder,
|
|
217
|
-
Debug
|
|
218
|
-
};
|
|
219
32
|
|
|
220
33
|
// src/testing/CardContainer.tsx
|
|
221
34
|
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
222
|
-
import
|
|
35
|
+
import React2 from "react";
|
|
223
36
|
import { Icon, Popover } from "@dxos/react-ui";
|
|
224
37
|
import { ResizeHandle, resizeAttributes, sizeStyle } from "@dxos/react-ui-dnd";
|
|
225
38
|
var DEFAULT_BLOCK_SIZE = 22;
|
|
226
39
|
var MIN_BLOCK_SIZE = 8;
|
|
227
|
-
var CardContainer = ({ children, icon = "ph--
|
|
40
|
+
var CardContainer = ({ children, icon = "ph--arrow-line-down--regular", role }) => {
|
|
228
41
|
switch (role) {
|
|
229
42
|
case "card--popover":
|
|
230
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ React2.createElement(PopoverCardContainer, {
|
|
231
44
|
icon
|
|
232
45
|
}, children);
|
|
233
46
|
case "card--intrinsic":
|
|
234
47
|
default:
|
|
235
|
-
return /* @__PURE__ */
|
|
48
|
+
return /* @__PURE__ */ React2.createElement(IntrinsicCardContainer, null, children);
|
|
236
49
|
}
|
|
237
50
|
};
|
|
238
|
-
var
|
|
239
|
-
|
|
240
|
-
return /* @__PURE__ */ React3.createElement(Popover.Root, {
|
|
51
|
+
var PopoverCardContainer = ({ children, icon = "ph--arrow-line-down--regular" }) => {
|
|
52
|
+
return /* @__PURE__ */ React2.createElement(Popover.Root, {
|
|
241
53
|
open: true
|
|
242
|
-
}, /* @__PURE__ */
|
|
54
|
+
}, /* @__PURE__ */ React2.createElement(Popover.Content, {
|
|
243
55
|
onOpenAutoFocus: (event) => event.preventDefault()
|
|
244
|
-
}, /* @__PURE__ */
|
|
245
|
-
classNames: "popover-card-width"
|
|
246
|
-
}, children), /* @__PURE__ */
|
|
56
|
+
}, /* @__PURE__ */ React2.createElement(Popover.Viewport, {
|
|
57
|
+
classNames: "popover-card-max-height popover-card-max-width"
|
|
58
|
+
}, children), /* @__PURE__ */ React2.createElement(Popover.Arrow, null)), /* @__PURE__ */ React2.createElement(Popover.Trigger, {
|
|
247
59
|
asChild: true
|
|
248
|
-
}, /* @__PURE__ */
|
|
60
|
+
}, /* @__PURE__ */ React2.createElement(Icon, {
|
|
249
61
|
icon,
|
|
250
62
|
size: 5
|
|
251
63
|
})));
|
|
@@ -256,11 +68,11 @@ var IntrinsicCardContainer = ({ children, defaultSize, size: propSize, onSizeCha
|
|
|
256
68
|
defaultProp: defaultSize,
|
|
257
69
|
onChange: onSizeChange
|
|
258
70
|
});
|
|
259
|
-
return /* @__PURE__ */
|
|
260
|
-
className: border,
|
|
71
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
72
|
+
className: "relative border border-dashed border-subduedSeparator p-4 rounded-lg overflow-x-auto",
|
|
261
73
|
style: sizeStyle(size, "horizontal"),
|
|
262
74
|
...resizeAttributes
|
|
263
|
-
}, children, /* @__PURE__ */
|
|
75
|
+
}, children, /* @__PURE__ */ React2.createElement(ResizeHandle, {
|
|
264
76
|
side: "inline-end",
|
|
265
77
|
fallbackSize: DEFAULT_BLOCK_SIZE,
|
|
266
78
|
minSize: MIN_BLOCK_SIZE,
|
|
@@ -270,34 +82,32 @@ var IntrinsicCardContainer = ({ children, defaultSize, size: propSize, onSizeCha
|
|
|
270
82
|
};
|
|
271
83
|
|
|
272
84
|
// src/testing/DefaultStackTile.tsx
|
|
273
|
-
import
|
|
274
|
-
import { Obj
|
|
275
|
-
import { Json
|
|
85
|
+
import React3, { useRef, useState } from "react";
|
|
86
|
+
import { Obj } from "@dxos/echo";
|
|
87
|
+
import { Json } from "@dxos/react-ui-syntax-highlighter";
|
|
276
88
|
var DefaultStackTile = (props) => {
|
|
277
|
-
const dragHandleRef =
|
|
278
|
-
const [open, setOpen] =
|
|
279
|
-
return /* @__PURE__ */
|
|
89
|
+
const dragHandleRef = useRef(null);
|
|
90
|
+
const [open, setOpen] = useState(false);
|
|
91
|
+
return /* @__PURE__ */ React3.createElement(Mosaic.Tile, {
|
|
280
92
|
...props,
|
|
281
93
|
className: "border border-separator rounded-sm font-mono"
|
|
282
|
-
}, /* @__PURE__ */
|
|
94
|
+
}, /* @__PURE__ */ React3.createElement(Card.Toolbar, null, /* @__PURE__ */ React3.createElement(Card.DragHandle, {
|
|
283
95
|
ref: dragHandleRef
|
|
284
|
-
}), /* @__PURE__ */
|
|
96
|
+
}), /* @__PURE__ */ React3.createElement(Card.Title, null, Obj.getLabel(props.data) ?? props.data.id), /* @__PURE__ */ React3.createElement(Card.Menu, {
|
|
285
97
|
items: [
|
|
286
98
|
{
|
|
287
99
|
label: open ? "Hide details" : "Show details",
|
|
288
100
|
onClick: () => setOpen((open2) => !open2)
|
|
289
101
|
}
|
|
290
102
|
]
|
|
291
|
-
})), open && /* @__PURE__ */
|
|
103
|
+
})), open && /* @__PURE__ */ React3.createElement(Card.Row, null, /* @__PURE__ */ React3.createElement(Json, {
|
|
292
104
|
data: props.data,
|
|
293
105
|
classNames: "text-xs"
|
|
294
106
|
})));
|
|
295
107
|
};
|
|
296
108
|
DefaultStackTile.displayName = "DefaultStackTile";
|
|
297
109
|
export {
|
|
298
|
-
Board,
|
|
299
110
|
CardContainer,
|
|
300
|
-
Debug,
|
|
301
111
|
DefaultStackTile,
|
|
302
112
|
IntrinsicCardContainer,
|
|
303
113
|
PopoverCardContainer,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/testing/decorator.tsx", "../../../../src/testing/
|
|
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 = 'DefaultStackTile';\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["React", "withMosaic", "Story", "Mosaic", "Root", "
|
|
3
|
+
"sources": ["../../../../src/testing/decorator.tsx", "../../../../src/testing/types.ts", "../../../../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 * as Schema from 'effect/Schema';\n\nimport { Type } from '@dxos/echo';\nimport { ObjectId } from '@dxos/keys';\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 name: Schema.String,\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// 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--arrow-line-down--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\n//\n// Popover\n//\n\nexport type PopoverCardContainerProps = PropsWithChildren<{ icon?: string }>;\n\nexport const PopoverCardContainer = ({\n children,\n icon = 'ph--arrow-line-down--regular',\n}: PopoverCardContainerProps) => {\n return (\n <Popover.Root open>\n <Popover.Content onOpenAutoFocus={(event: Event) => event.preventDefault()}>\n <Popover.Viewport classNames='popover-card-max-height popover-card-max-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\n className='relative border border-dashed border-subduedSeparator p-4 rounded-lg overflow-x-auto'\n style={sizeStyle(size, 'horizontal')}\n {...resizeAttributes}\n >\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,WAAW;AAIX,IAAMC,aAAa,MAAA;AACxB,SAAO,CAACC,UACN,sBAAA,cAACC,OAAOC,MAAI,MACV,sBAAA,cAACF,OAAAA,IAAAA,CAAAA;AAGP;;;ACXA,YAAYG,YAAY;AAExB,SAASC,YAAY;AACrB,SAASC,gBAAgB;AAMlB,IAAMC,WAAkBC,cAAO;EACpCC,MAAaC;EACbC,aAAoBC,gBAAgBF,aAAM;EAC1CG,OAAcD,gBAAgBF,aAAM;AACtC,CAAA,EAAGI,KACDC,KAAKC,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,CAAA;AAKK,IAAMC,aAAoBX,cAAO;EACtCY,IAAIC;EACJZ,MAAaC;EACbY,OAAcC,eAAeC,aAAMT,KAAKU,IAAIlB,QAAAA,CAAAA,CAAAA;AAC9C,CAAA,EAAGO,KACDC,KAAKC,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,CAAA;;;AC9BF,SAASQ,4BAA4B;AACrC,OAAOC,YAAuC;AAE9C,SAASC,MAAMC,eAAe;AAC9B,SAASC,cAAyBC,kBAAkBC,iBAAiB;AAErE,IAAMC,qBAAqB;AAC3B,IAAMC,iBAAiB;AAMhB,IAAMC,gBAAgB,CAAC,EAC5BC,UACAC,OAAO,gCACPC,KAAI,MACgD;AACpD,UAAQA,MAAAA;IACN,KAAK;AACH,aAAO,gBAAAC,OAAA,cAACC,sBAAAA;QAAqBH;SAAaD,QAAAA;IAC5C,KAAK;IACL;AACE,aAAO,gBAAAG,OAAA,cAACE,wBAAAA,MAAwBL,QAAAA;EACpC;AACF;AAQO,IAAMI,uBAAuB,CAAC,EACnCJ,UACAC,OAAO,+BAA8B,MACX;AAC1B,SACE,gBAAAE,OAAA,cAACG,QAAQC,MAAI;IAACC,MAAAA;KACZ,gBAAAL,OAAA,cAACG,QAAQG,SAAO;IAACC,iBAAiB,CAACC,UAAiBA,MAAMC,eAAc;KACtE,gBAAAT,OAAA,cAACG,QAAQO,UAAQ;IAACC,YAAW;KAAkDd,QAAAA,GAC/E,gBAAAG,OAAA,cAACG,QAAQS,OAAK,IAAA,CAAA,GAEhB,gBAAAZ,OAAA,cAACG,QAAQU,SAAO;IAACC,SAAAA;KACf,gBAAAd,OAAA,cAACe,MAAAA;IAAKjB;IAAYkB,MAAM;;AAIhC;AAYO,IAAMd,yBAAyB,CAAC,EACrCL,UACAoB,aACAD,MAAME,UACNC,aAAY,MACgB;AAC5B,QAAM,CAACH,OAAOtB,oBAAoB0B,OAAAA,IAAWC,qBAA2B;IACtEC,MAAMJ;IACNK,aAAaN;IACbO,UAAUL;EACZ,CAAA;AAEA,SACE,gBAAAnB,OAAA,cAACyB,OAAAA;IACCC,WAAU;IACVC,OAAOC,UAAUZ,MAAM,YAAA;IACtB,GAAGa;KAEHhC,UACD,gBAAAG,OAAA,cAAC8B,cAAAA;IACCC,MAAK;IACLC,cAActC;IACduC,SAAStC;IACTqB;IACAG,cAAcC;;AAItB;;;ACxFA,OAAOc,UAASC,QAAQC,gBAAgB;AAExC,SAASC,WAAW;AACpB,SAASC,YAAY;AAId,IAAMC,mBAAgD,CAACC,UAAAA;AAC5D,QAAMC,gBAAgBC,OAA0B,IAAA;AAChD,QAAM,CAACC,MAAMC,OAAAA,IAAWC,SAAS,KAAA;AACjC,SACE,gBAAAC,OAAA,cAACC,OAAOC,MAAI;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,IAAIC,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,MAAAA;IAAKP,MAAMjB,MAAMiB;IAAMQ,YAAW;;AAK7C;AAEA1B,iBAAiB2B,cAAc;",
|
|
6
|
+
"names": ["React", "withMosaic", "Story", "Mosaic", "Root", "Schema", "Type", "ObjectId", "TestItem", "Struct", "name", "String", "description", "optional", "label", "pipe", "Type", "object", "typename", "version", "TestColumn", "id", "ObjectId", "items", "mutable", "Array", "Ref", "useControllableState", "React", "Icon", "Popover", "ResizeHandle", "resizeAttributes", "sizeStyle", "DEFAULT_BLOCK_SIZE", "MIN_BLOCK_SIZE", "CardContainer", "children", "icon", "role", "React", "PopoverCardContainer", "IntrinsicCardContainer", "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
|
}
|