@dxos/react-ui-canvas 0.8.4-main.ead640a → 0.8.4-main.f466a3d56e

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 (90) hide show
  1. package/LICENSE +102 -5
  2. package/dist/lib/browser/index.mjs +1131 -388
  3. package/dist/lib/browser/index.mjs.map +4 -4
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/node-esm/index.mjs +1131 -388
  6. package/dist/lib/node-esm/index.mjs.map +4 -4
  7. package/dist/lib/node-esm/meta.json +1 -1
  8. package/dist/types/src/components/Canvas/Canvas.d.ts +2 -2
  9. package/dist/types/src/components/Canvas/Canvas.stories.d.ts.map +1 -1
  10. package/dist/types/src/components/CellGrid/CellGrid.d.ts +21 -0
  11. package/dist/types/src/components/CellGrid/CellGrid.d.ts.map +1 -0
  12. package/dist/types/src/components/CellGrid/CellGrid.stories.d.ts +21 -0
  13. package/dist/types/src/components/CellGrid/CellGrid.stories.d.ts.map +1 -0
  14. package/dist/types/src/components/CellGrid/headers/Ruler.d.ts +15 -0
  15. package/dist/types/src/components/CellGrid/headers/Ruler.d.ts.map +1 -0
  16. package/dist/types/src/components/CellGrid/headers/TrackHeader.d.ts +19 -0
  17. package/dist/types/src/components/CellGrid/headers/TrackHeader.d.ts.map +1 -0
  18. package/dist/types/src/components/CellGrid/headers/index.d.ts +3 -0
  19. package/dist/types/src/components/CellGrid/headers/index.d.ts.map +1 -0
  20. package/dist/types/src/components/CellGrid/index.d.ts +6 -0
  21. package/dist/types/src/components/CellGrid/index.d.ts.map +1 -0
  22. package/dist/types/src/components/CellGrid/input/index.d.ts +3 -0
  23. package/dist/types/src/components/CellGrid/input/index.d.ts.map +1 -0
  24. package/dist/types/src/components/CellGrid/input/pointer.d.ts +29 -0
  25. package/dist/types/src/components/CellGrid/input/pointer.d.ts.map +1 -0
  26. package/dist/types/src/components/CellGrid/input/wheel.d.ts +14 -0
  27. package/dist/types/src/components/CellGrid/input/wheel.d.ts.map +1 -0
  28. package/dist/types/src/components/CellGrid/render/index.d.ts +3 -0
  29. package/dist/types/src/components/CellGrid/render/index.d.ts.map +1 -0
  30. package/dist/types/src/components/CellGrid/render/overlay-layer.d.ts +21 -0
  31. package/dist/types/src/components/CellGrid/render/overlay-layer.d.ts.map +1 -0
  32. package/dist/types/src/components/CellGrid/render/static-layer.d.ts +36 -0
  33. package/dist/types/src/components/CellGrid/render/static-layer.d.ts.map +1 -0
  34. package/dist/types/src/components/CellGrid/state/atoms.d.ts +23 -0
  35. package/dist/types/src/components/CellGrid/state/atoms.d.ts.map +1 -0
  36. package/dist/types/src/components/CellGrid/state/index.d.ts +4 -0
  37. package/dist/types/src/components/CellGrid/state/index.d.ts.map +1 -0
  38. package/dist/types/src/components/CellGrid/state/types.d.ts +39 -0
  39. package/dist/types/src/components/CellGrid/state/types.d.ts.map +1 -0
  40. package/dist/types/src/components/CellGrid/state/viewport.d.ts +52 -0
  41. package/dist/types/src/components/CellGrid/state/viewport.d.ts.map +1 -0
  42. package/dist/types/src/components/CellGrid/state/viewport.test.d.ts +2 -0
  43. package/dist/types/src/components/CellGrid/state/viewport.test.d.ts.map +1 -0
  44. package/dist/types/src/components/FPS.d.ts.map +1 -1
  45. package/dist/types/src/components/Grid/Grid.d.ts +2 -2
  46. package/dist/types/src/components/Grid/Grid.d.ts.map +1 -1
  47. package/dist/types/src/components/Grid/Grid.stories.d.ts +1 -1
  48. package/dist/types/src/components/Grid/Grid.stories.d.ts.map +1 -1
  49. package/dist/types/src/components/index.d.ts +1 -0
  50. package/dist/types/src/components/index.d.ts.map +1 -1
  51. package/dist/types/src/hooks/index.d.ts +1 -0
  52. package/dist/types/src/hooks/index.d.ts.map +1 -1
  53. package/dist/types/src/hooks/projection.d.ts.map +1 -1
  54. package/dist/types/src/hooks/useDrag.d.ts +6 -0
  55. package/dist/types/src/hooks/useDrag.d.ts.map +1 -0
  56. package/dist/types/src/hooks/useWheel.d.ts.map +1 -1
  57. package/dist/types/src/util/svg.d.ts +1 -1
  58. package/dist/types/src/util/svg.d.ts.map +1 -1
  59. package/dist/types/src/util/svg.stories.d.ts.map +1 -1
  60. package/dist/types/src/util/util.d.ts.map +1 -1
  61. package/dist/types/tsconfig.tsbuildinfo +1 -1
  62. package/package.json +26 -26
  63. package/src/components/Canvas/Canvas.stories.tsx +6 -6
  64. package/src/components/Canvas/Canvas.tsx +4 -4
  65. package/src/components/CellGrid/CellGrid.stories.tsx +238 -0
  66. package/src/components/CellGrid/CellGrid.tsx +266 -0
  67. package/src/components/CellGrid/headers/Ruler.tsx +71 -0
  68. package/src/components/CellGrid/headers/TrackHeader.tsx +58 -0
  69. package/src/components/CellGrid/headers/index.ts +6 -0
  70. package/src/components/CellGrid/index.ts +9 -0
  71. package/src/components/CellGrid/input/index.ts +6 -0
  72. package/src/components/CellGrid/input/pointer.ts +208 -0
  73. package/src/components/CellGrid/input/wheel.ts +68 -0
  74. package/src/components/CellGrid/render/index.ts +6 -0
  75. package/src/components/CellGrid/render/overlay-layer.ts +66 -0
  76. package/src/components/CellGrid/render/static-layer.ts +112 -0
  77. package/src/components/CellGrid/state/atoms.ts +43 -0
  78. package/src/components/CellGrid/state/index.ts +7 -0
  79. package/src/components/CellGrid/state/types.ts +40 -0
  80. package/src/components/CellGrid/state/viewport.test.ts +50 -0
  81. package/src/components/CellGrid/state/viewport.ts +94 -0
  82. package/src/components/FPS.tsx +2 -2
  83. package/src/components/Grid/Grid.stories.tsx +2 -3
  84. package/src/components/Grid/Grid.tsx +13 -15
  85. package/src/components/index.ts +1 -0
  86. package/src/hooks/index.ts +1 -0
  87. package/src/hooks/useDrag.tsx +96 -0
  88. package/src/hooks/useWheel.tsx +0 -28
  89. package/src/util/svg.stories.tsx +2 -2
  90. package/src/util/svg.tsx +1 -1
@@ -0,0 +1,29 @@
1
+ import type { Registry } from '@effect-atom/atom-react';
2
+ import type { CellGridAtoms } from '../state/atoms';
3
+ import type { Cell, CellCoord, Headers, SelectionRange } from '../state/types';
4
+ /**
5
+ * 'set' / 'unset' are idempotent — the receiver must add or remove the cell
6
+ * regardless of current state. 'toggle' flips it. Drag operations always pick
7
+ * a fixed mode (set or unset) based on the cell under the initial pointerdown
8
+ * so the user paints a uniform stroke instead of flipping each cell.
9
+ */
10
+ export type ToggleMode = 'set' | 'unset' | 'toggle';
11
+ export type PointerHandlers = {
12
+ onCellToggle?: (coord: CellCoord, mode: ToggleMode) => void;
13
+ onSelectionCommit?: (range: SelectionRange) => void;
14
+ };
15
+ export type PointerControllerOptions<T> = {
16
+ registry: Registry.Registry;
17
+ atoms: CellGridAtoms<T>;
18
+ headers: Headers;
19
+ handlers: PointerHandlers;
20
+ };
21
+ /**
22
+ * Attach pointer handlers to an element. Returns an unsubscribe.
23
+ */
24
+ export declare const attachPointerHandlers: <T>(element: HTMLElement, { registry, atoms, headers, handlers }: PointerControllerOptions<T>) => (() => void);
25
+ /**
26
+ * Utility for consumers: toggle, set, or unset membership of a cell in the cells atom.
27
+ */
28
+ export declare const toggleCell: <T>(registry: Registry.Registry, atoms: CellGridAtoms<T>, coord: CellCoord, factory: (coord: CellCoord) => Cell<T>, mode?: ToggleMode) => void;
29
+ //# sourceMappingURL=pointer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CellGrid/input/pointer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAQ,MAAM,gBAAgB,CAAC;AAGrF;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IAC5D,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CACrD,CAAC;AAOF,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI;IACxC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC5B,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,WAC5B,WAAW,0CACoB,wBAAwB,CAAC,CAAC,CAAC,KAClE,CAAC,MAAM,IAAI,CA+Ib,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,YAChB,QAAQ,CAAC,QAAQ,SACpB,aAAa,CAAC,CAAC,CAAC,SAChB,SAAS,WACP,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,SAChC,UAAU,KACf,IAYF,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Registry } from '@effect-atom/atom-react';
2
+ import type { CellGridAtoms } from '../state/atoms';
3
+ import type { Headers } from '../state/types';
4
+ export type WheelControllerOptions<T> = {
5
+ registry: Registry.Registry;
6
+ atoms: CellGridAtoms<T>;
7
+ headers: Headers;
8
+ };
9
+ /**
10
+ * Attach wheel handlers. Vertical wheel scrolls y; shift+wheel scrolls x;
11
+ * cmd/ctrl+wheel zooms x around the cursor.
12
+ */
13
+ export declare const attachWheelHandlers: <T>(element: HTMLElement, { registry, atoms, headers }: WheelControllerOptions<T>) => (() => void);
14
+ //# sourceMappingURL=wheel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wheel.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CellGrid/input/wheel.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAM9C,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI;IACtC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC5B,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,WAC1B,WAAW,gCACU,sBAAsB,CAAC,CAAC,CAAC,KACtD,CAAC,MAAM,IAAI,CAyCb,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './overlay-layer';
2
+ export * from './static-layer';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CellGrid/render/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { Headers, Selection, Viewport } from '../state/types';
2
+ export type OverlayStyle = {
3
+ playhead: string;
4
+ selectionFill: string;
5
+ selectionStroke: string;
6
+ };
7
+ export type DrawOverlayOptions = {
8
+ ctx: CanvasRenderingContext2D;
9
+ size: {
10
+ width: number;
11
+ height: number;
12
+ };
13
+ viewport: Viewport;
14
+ headers: Headers;
15
+ selection: Selection;
16
+ /** Playhead position in world units (col + fraction), or null when not playing. */
17
+ playhead: number | null;
18
+ style: OverlayStyle;
19
+ };
20
+ export declare const drawOverlay: ({ ctx, size, viewport, headers, selection, playhead, style }: DrawOverlayOptions) => void;
21
+ //# sourceMappingURL=overlay-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overlay-layer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CellGrid/render/overlay-layer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGnE,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,wBAAwB,CAAC;IAC9B,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,mFAAmF;IACnF,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,YAAY,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,WAAW,iEAAkE,kBAAkB,KAAG,IAyC9G,CAAC"}
@@ -0,0 +1,36 @@
1
+ import type { Cell, Headers, Row, Viewport } from '../state/types';
2
+ export type RenderCellArgs<T> = {
3
+ ctx: CanvasRenderingContext2D;
4
+ x: number;
5
+ y: number;
6
+ w: number;
7
+ h: number;
8
+ cell: Cell<T>;
9
+ };
10
+ export type RenderCell<T = unknown> = (args: RenderCellArgs<T>) => void;
11
+ export type StaticLayerStyle = {
12
+ /** Grid line color, e.g. 'rgba(0,0,0,0.08)'. */
13
+ gridLine: string;
14
+ /** Row band fill (alternating), e.g. 'rgba(0,0,0,0.02)'. */
15
+ rowBand?: string;
16
+ background?: string;
17
+ };
18
+ export type DrawCellsOptions<T> = {
19
+ ctx: CanvasRenderingContext2D;
20
+ size: {
21
+ width: number;
22
+ height: number;
23
+ };
24
+ viewport: Viewport;
25
+ headers: Headers;
26
+ rows: ReadonlyArray<Row>;
27
+ cells: ReadonlyMap<string, Cell<T>>;
28
+ renderCell: RenderCell<T>;
29
+ style: StaticLayerStyle;
30
+ };
31
+ /**
32
+ * Paint the static layer: background, gridlines, alternating row bands, and cells.
33
+ * Pure with respect to its inputs (writes only to the supplied ctx).
34
+ */
35
+ export declare const drawCells: <T>({ ctx, size, viewport, headers, rows, cells, renderCell, style, }: DrawCellsOptions<T>) => void;
36
+ //# sourceMappingURL=static-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static-layer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CellGrid/render/static-layer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGnE,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAC9B,GAAG,EAAE,wBAAwB,CAAC;IAC9B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAExE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,GAAG,EAAE,wBAAwB,CAAC;IAC9B,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IACzB,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC1B,KAAK,EAAE,gBAAgB,CAAC;CACzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,qEASxB,gBAAgB,CAAC,CAAC,CAAC,KAAG,IA6DxB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { Atom } from '@effect-atom/atom-react';
2
+ import type { Cell, Selection, Tool, Viewport } from './types';
3
+ export type CellGridAtoms<T = unknown> = {
4
+ cells: Atom.Writable<ReadonlyMap<string, Cell<T>>>;
5
+ viewport: Atom.Writable<Viewport>;
6
+ selection: Atom.Writable<Selection>;
7
+ playhead: Atom.Writable<number | null>;
8
+ tool: Atom.Writable<Tool>;
9
+ };
10
+ export type CellGridAtomsOptions = {
11
+ cellWidth?: number;
12
+ cellHeight?: number;
13
+ };
14
+ export declare const defaultViewport: (options?: CellGridAtomsOptions) => Viewport;
15
+ /**
16
+ * Create a fresh set of atoms backing a CellGrid instance. Consumers may pass any of these as props
17
+ * or substitute their own (e.g., a cells atom backed by ECHO).
18
+ *
19
+ * Atoms are marked keepAlive so they preserve state across transient unsubscribe windows (e.g. React
20
+ * Strict Mode mount-unmount-remount). Consumers are responsible for the atoms' lifetime.
21
+ */
22
+ export declare const createCellGridAtoms: <T = unknown>(options?: CellGridAtomsOptions) => CellGridAtoms<T>;
23
+ //# sourceMappingURL=atoms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atoms.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CellGrid/state/atoms.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/C,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE/D,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,OAAO,IAAI;IACvC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnD,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAClC,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACpC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,eAAe,aAAa,oBAAoB,KAAQ,QAMnE,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,GAAG,OAAO,YAAW,oBAAoB,KAAQ,aAAa,CAAC,CAAC,CAMnG,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './atoms';
2
+ export * from './types';
3
+ export * from './viewport';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CellGrid/state/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
@@ -0,0 +1,39 @@
1
+ export type CellCoord = {
2
+ col: number;
3
+ row: number;
4
+ };
5
+ export type Cell<T = unknown> = {
6
+ col: number;
7
+ row: number;
8
+ length: number;
9
+ data?: T;
10
+ };
11
+ export type Viewport = {
12
+ /** World-space scroll offset (pixels). */
13
+ scrollX: number;
14
+ scrollY: number;
15
+ /** Cell dimensions in pixels at zoomX = 1. */
16
+ baseCellWidth: number;
17
+ cellHeight: number;
18
+ /** Horizontal zoom factor. */
19
+ zoomX: number;
20
+ };
21
+ export type SelectionRange = {
22
+ col0: number;
23
+ row0: number;
24
+ col1: number;
25
+ row1: number;
26
+ };
27
+ export type Selection = {
28
+ range: SelectionRange | null;
29
+ };
30
+ export type Tool = 'toggle' | 'select' | 'resize';
31
+ export type Row = {
32
+ id: string;
33
+ label?: string;
34
+ };
35
+ export type Headers = {
36
+ left: number;
37
+ top: number;
38
+ };
39
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CellGrid/state/types.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,SAAS,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAErD,MAAM,MAAM,IAAI,CAAC,CAAC,GAAG,OAAO,IAAI;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,CAAC,CAAC;CACV,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,cAAc,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAElD,MAAM,MAAM,GAAG,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,MAAM,MAAM,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -0,0 +1,52 @@
1
+ import type { Cell, CellCoord, Headers, Viewport } from './types';
2
+ export declare const cellKey: (col: number, row: number) => string;
3
+ export declare const cellWidth: (viewport: Viewport) => number;
4
+ /**
5
+ * Convert a cell's world coordinates to screen-space pixel rectangle (relative to canvas origin).
6
+ */
7
+ export declare const worldToScreen: (viewport: Viewport, headers: Headers, coord: {
8
+ col: number;
9
+ row: number;
10
+ length?: number;
11
+ }) => {
12
+ x: number;
13
+ y: number;
14
+ w: number;
15
+ h: number;
16
+ };
17
+ /**
18
+ * Convert screen-space pixels (relative to canvas origin) to fractional cell coordinates.
19
+ */
20
+ export declare const screenToWorld: (viewport: Viewport, headers: Headers, point: {
21
+ x: number;
22
+ y: number;
23
+ }) => {
24
+ col: number;
25
+ row: number;
26
+ };
27
+ export declare const hitTestCell: (viewport: Viewport, headers: Headers, point: {
28
+ x: number;
29
+ y: number;
30
+ }) => CellCoord | null;
31
+ /**
32
+ * Compute the inclusive range of cell coordinates intersecting the visible content rect.
33
+ */
34
+ export declare const visibleCellRange: (viewport: Viewport, headers: Headers, size: {
35
+ width: number;
36
+ height: number;
37
+ }) => {
38
+ minCol: number;
39
+ maxCol: number;
40
+ minRow: number;
41
+ maxRow: number;
42
+ };
43
+ /**
44
+ * Iterate sparse cell map, yielding only cells whose horizontal extent intersects visible cols and whose row is visible.
45
+ */
46
+ export declare const visibleCells: <T>(cells: ReadonlyMap<string, Cell<T>>, range: {
47
+ minCol: number;
48
+ maxCol: number;
49
+ minRow: number;
50
+ maxRow: number;
51
+ }) => Generator<Cell<T>>;
52
+ //# sourceMappingURL=viewport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewport.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CellGrid/state/viewport.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAElE,eAAO,MAAM,OAAO,QAAS,MAAM,OAAO,MAAM,KAAG,MAAyB,CAAC;AAE7E,eAAO,MAAM,SAAS,aAAc,QAAQ,KAAG,MAAiD,CAAC;AAEjG;;GAEG;AACH,eAAO,MAAM,aAAa,aACd,QAAQ,WACT,OAAO,SACT;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KACnD;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAQ9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,aACd,QAAQ,WACT,OAAO,SACT;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,KAC9B;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAM5B,CAAC;AAEF,eAAO,MAAM,WAAW,aACZ,QAAQ,WACT,OAAO,SACT;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,KAC9B,SAAS,GAAG,IASd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,aACjB,QAAQ,WACT,OAAO,QACV;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,KACtC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CASlE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,GAAc,CAAC,SAC/B,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAC5B;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,KACxE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAYnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=viewport.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewport.test.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CellGrid/state/viewport.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"FPS.d.ts","sourceRoot":"","sources":["../../../../src/components/FPS.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,MAAM,MAAM,QAAQ,GAAG,eAAe,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AAYH,eAAO,MAAM,GAAG,GAAI,oCAA8D,QAAQ,sBAuEzF,CAAC"}
1
+ {"version":3,"file":"FPS.d.ts","sourceRoot":"","sources":["../../../../src/components/FPS.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,MAAM,MAAM,QAAQ,GAAG,eAAe,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AAYH,eAAO,MAAM,GAAG,uCAAkE,QAAQ,sBAuEzF,CAAC"}
@@ -7,13 +7,13 @@ export type GridProps = ThemedClassName<{
7
7
  offset?: Point;
8
8
  showAxes?: boolean;
9
9
  }>;
10
+ export declare const Grid: (props: GridProps) => React.JSX.Element;
10
11
  export declare const GridComponent: React.ForwardRefExoticComponent<Omit<{
11
12
  size?: number;
12
13
  scale?: number;
13
14
  offset?: Point;
14
15
  showAxes?: boolean;
15
16
  }, "className"> & {
16
- classNames?: import("@dxos/react-ui-types").ClassNameValue;
17
+ classNames?: import("@dxos/ui-types").ClassNameValue;
17
18
  } & React.RefAttributes<SVGSVGElement>>;
18
- export declare const Grid: (props: GridProps) => React.JSX.Element;
19
19
  //# sourceMappingURL=Grid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../../src/components/Grid/Grid.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,gBAAgB,CAAC;AAIvE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAUzC,MAAM,MAAM,SAAS,GAAG,eAAe,CAAC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AAEH,eAAO,MAAM,aAAa;WANjB,MAAM;YACL,MAAM;aACL,KAAK;eACH,OAAO;;;uCAwDnB,CAAC;AAGF,eAAO,MAAM,IAAI,GAAI,OAAO,SAAS,sBAGpC,CAAC"}
1
+ {"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../../../src/components/Grid/Grid.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,gBAAgB,CAAC;AAIvE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAYzC,MAAM,MAAM,SAAS,GAAG,eAAe,CAAC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AAGH,eAAO,MAAM,IAAI,UAAW,SAAS,sBAGpC,CAAC;AAEF,eAAO,MAAM,aAAa;WAZjB,MAAM;YACL,MAAM;aACL,KAAK;eACH,OAAO;;;uCA0DnB,CAAC"}
@@ -9,7 +9,7 @@ declare const meta: {
9
9
  offset?: import("../..").Point;
10
10
  showAxes?: boolean;
11
11
  }, "className"> & {
12
- classNames?: import("@dxos/react-ui-types").ClassNameValue;
12
+ classNames?: import("@dxos/ui-types").ClassNameValue;
13
13
  } & React.RefAttributes<SVGSVGElement>>;
14
14
  render: (props: GridProps) => React.JSX.Element;
15
15
  decorators: import("@storybook/react").Decorator[];
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Grid/Grid.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA2B,MAAM,OAAO,CAAC;AAMhD,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAavD,QAAA,MAAM,IAAI;;;;;;;;;;oBAXmB,SAAS;;;;;CAmBA,CAAC;AAEvC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
1
+ {"version":3,"file":"Grid.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Grid/Grid.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA2B,MAAM,OAAO,CAAC;AAKhD,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAavD,QAAA,MAAM,IAAI;;;;;;;;;;oBAXmB,SAAS;;;QAiBlC,MAAM;;CAE4B,CAAC;eAExB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './Canvas';
2
+ export * from './CellGrid';
2
3
  export * from './FPS';
3
4
  export * from './Grid';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './projection';
2
2
  export * from './useCanvasContext';
3
+ export * from './useDrag';
3
4
  export * from './useWheel';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":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sC;IACrD,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,QAAQ,CAAsB;IAEtC,YAAY,MAAM,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,EAI7D;IAED,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,GAAG,IAAI,CAa5D;IAED,IAAI,MAAM;;;MAET;IAED,IAAI,KAAK,WAER;IAED,IAAI,MAAM;;;MAET;IAED,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAEjC;IAED,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAEhC;CACF;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,sCAK1B,eAAe,GAAG;IAAE,GAAG,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,KAAG,eAQvD,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,WAAW,iBACR,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,OACzC,KAAK,UACF,KAAK,WACJ,MAAM,QACT,MAAM,yBAWb,CAAC;AAIF;;GAEG;AAEH,eAAO,MAAM,MAAM,iBACH,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,WACrC,eAAe,QAClB,eAAe,0CAatB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export type DragOptions = {};
2
+ /**
3
+ * Handle drag events to update the transform state (offset).
4
+ */
5
+ export declare const useDrag: (_options?: DragOptions) => void;
6
+ //# sourceMappingURL=useDrag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDrag.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDrag.tsx"],"names":[],"mappings":"AASA,MAAM,MAAM,WAAW,GAAG,EAEzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,cAAc,WAAW,SA+E5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useWheel.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useWheel.tsx"],"names":[],"mappings":"AAYA,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,UAAS,YAA6B,SAkD9D,CAAC"}
1
+ {"version":3,"file":"useWheel.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useWheel.tsx"],"names":[],"mappings":"AAWA,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAMF;;GAEG;AACH,eAAO,MAAM,QAAQ,aAAa,YAAY,SA+C7C,CAAC"}
@@ -22,7 +22,7 @@ export declare const Marker: ({ id, className, children, pos: { x: refX, y: refY
22
22
  export declare const Arrow: ({ classNames, id, size, dir, closed, }: ThemedClassName<{
23
23
  id: string;
24
24
  size?: number;
25
- dir?: "start" | "end";
25
+ dir?: 'start' | 'end';
26
26
  closed?: boolean;
27
27
  }>) => React.JSX.Element;
28
28
  export declare const GridPattern: ({ classNames, id, size, offset, }: ThemedClassName<{
@@ -1 +1 @@
1
- {"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../../../src/util/svg.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAMtD,eAAO,MAAM,UAAU,GAAI,QAAQ,KAAK,EAAE,EAAE,cAAY,WAEvD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO,GAAI,oBAAk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CAAC,sBAYzF,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,gBAAgB,CAAC,GAClD,iBAAiB,CACf,eAAe,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,KAAK,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC,CACH,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,MAAM,8HAQhB,WAAW,sBAgBb,CAAC;AAEF,eAAO,MAAM,KAAK,2CAMf,eAAe,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,sBA0BzF,CAAC;AAEF,eAAO,MAAM,WAAW,sCAKrB,eAAe,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,CAAA;CAAE,CAAC,sBAe9D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"svg.stories.d.ts","sourceRoot":"","sources":["../../../../src/util/svg.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AA0B1B,QAAA,MAAM,IAAI;;;;;;;CAOM,CAAC;AAEjB,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
1
+ {"version":3,"file":"svg.stories.d.ts","sourceRoot":"","sources":["../../../../src/util/svg.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AA0B1B,QAAA,MAAM,IAAI;;;;;QAKN,MAAM;;CAEM,CAAC;eAEF,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/util/util.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,IAAI,WAAW,EAAE,IAAI,UAAU;;;CAG/D,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,MAAM,GAAI,EAAE,GAAG,MAAM,EAAE,IAAI,EAAE,EAAE,iBAAe;;CAiB1D,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,IAAI,OAAO,SASzC,CAAC;AAEF,eAAO,MAAM,YAAY,iBAAiB,CAAC"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/util/util.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,eAAO,MAAM,gBAAgB,OAAQ,WAAW,MAAM,UAAU;IAErD,CAAC;IAAuB,CAAC;CACnC,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,MAAM,GAAI,EAAE,eAAe,EAAE;;CAiBzC,CAAC;AAEF,eAAO,MAAM,cAAc,OAAQ,OAAO,SASzC,CAAC;AAEF,eAAO,MAAM,YAAY,iBAAiB,CAAC"}