@wordpress/grid 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/dashboard-grid/grid-item.cjs.map +2 -2
  3. package/build/dashboard-grid/index.cjs.map +2 -2
  4. package/build/dashboard-grid/resolve-fill-widths.cjs.map +2 -2
  5. package/build/dashboard-grid/types.cjs.map +1 -1
  6. package/build/dashboard-lanes/index.cjs.map +2 -2
  7. package/build/dashboard-lanes/lanes-item.cjs.map +2 -2
  8. package/build/dashboard-lanes/types.cjs.map +1 -1
  9. package/build/dashboard-lanes/use-lane-placement.cjs.map +2 -2
  10. package/build/shared/drag-overlay-drop-animation.cjs.map +2 -2
  11. package/build/shared/grid-overlay.cjs.map +2 -2
  12. package/build/shared/item-exit-overlay.cjs.map +2 -2
  13. package/build/shared/resize-handle.cjs.map +2 -2
  14. package/build/shared/types.cjs.map +1 -1
  15. package/build/shared/use-item-exit-animation.cjs.map +2 -2
  16. package/build/shared/use-layout-shift-animation.cjs.map +2 -2
  17. package/build-module/dashboard-grid/grid-item.mjs.map +2 -2
  18. package/build-module/dashboard-grid/index.mjs.map +2 -2
  19. package/build-module/dashboard-grid/resolve-fill-widths.mjs.map +2 -2
  20. package/build-module/dashboard-lanes/index.mjs.map +2 -2
  21. package/build-module/dashboard-lanes/lanes-item.mjs.map +2 -2
  22. package/build-module/dashboard-lanes/use-lane-placement.mjs.map +2 -2
  23. package/build-module/shared/drag-overlay-drop-animation.mjs.map +2 -2
  24. package/build-module/shared/grid-overlay.mjs.map +2 -2
  25. package/build-module/shared/item-exit-overlay.mjs.map +2 -2
  26. package/build-module/shared/resize-handle.mjs.map +2 -2
  27. package/build-module/shared/use-item-exit-animation.mjs.map +2 -2
  28. package/build-module/shared/use-layout-shift-animation.mjs.map +2 -2
  29. package/build-types/dashboard-grid/grid-item.d.ts.map +1 -1
  30. package/build-types/dashboard-grid/index.d.ts.map +1 -1
  31. package/build-types/dashboard-grid/resolve-fill-widths.d.ts +0 -3
  32. package/build-types/dashboard-grid/resolve-fill-widths.d.ts.map +1 -1
  33. package/build-types/dashboard-grid/stories/index.story.d.ts +0 -6
  34. package/build-types/dashboard-grid/stories/index.story.d.ts.map +1 -1
  35. package/build-types/dashboard-grid/types.d.ts +0 -3
  36. package/build-types/dashboard-grid/types.d.ts.map +1 -1
  37. package/build-types/dashboard-lanes/index.d.ts.map +1 -1
  38. package/build-types/dashboard-lanes/lanes-item.d.ts.map +1 -1
  39. package/build-types/dashboard-lanes/stories/index.story.d.ts +0 -6
  40. package/build-types/dashboard-lanes/stories/index.story.d.ts.map +1 -1
  41. package/build-types/dashboard-lanes/types.d.ts +0 -3
  42. package/build-types/dashboard-lanes/types.d.ts.map +1 -1
  43. package/build-types/dashboard-lanes/use-lane-placement.d.ts.map +1 -1
  44. package/build-types/shared/drag-overlay-drop-animation.d.ts.map +1 -1
  45. package/build-types/shared/grid-overlay.d.ts +0 -3
  46. package/build-types/shared/grid-overlay.d.ts.map +1 -1
  47. package/build-types/shared/item-exit-overlay.d.ts.map +1 -1
  48. package/build-types/shared/resize-handle.d.ts +0 -3
  49. package/build-types/shared/resize-handle.d.ts.map +1 -1
  50. package/build-types/shared/types.d.ts +0 -3
  51. package/build-types/shared/types.d.ts.map +1 -1
  52. package/build-types/shared/use-item-exit-animation.d.ts +0 -3
  53. package/build-types/shared/use-item-exit-animation.d.ts.map +1 -1
  54. package/build-types/shared/use-layout-shift-animation.d.ts.map +1 -1
  55. package/package.json +8 -8
  56. package/src/dashboard-grid/grid-item.tsx +0 -11
  57. package/src/dashboard-grid/index.tsx +0 -11
  58. package/src/dashboard-grid/resolve-fill-widths.ts +0 -3
  59. package/src/dashboard-grid/stories/index.story.tsx +0 -11
  60. package/src/dashboard-grid/test/keyboard-activation.test.tsx +0 -7
  61. package/src/dashboard-grid/test/resolve-fill-widths.test.ts +0 -3
  62. package/src/dashboard-grid/types.ts +0 -3
  63. package/src/dashboard-lanes/index.tsx +0 -11
  64. package/src/dashboard-lanes/lanes-item.tsx +0 -11
  65. package/src/dashboard-lanes/stories/index.story.tsx +0 -11
  66. package/src/dashboard-lanes/test/keyboard-activation.test.tsx +0 -7
  67. package/src/dashboard-lanes/test/lane-placement.test.ts +0 -3
  68. package/src/dashboard-lanes/test/use-lane-placement.test.tsx +0 -11
  69. package/src/dashboard-lanes/types.ts +0 -3
  70. package/src/dashboard-lanes/use-lane-placement.ts +0 -7
  71. package/src/shared/drag-overlay-drop-animation.ts +0 -3
  72. package/src/shared/grid-overlay.tsx +0 -11
  73. package/src/shared/item-exit-overlay.tsx +0 -3
  74. package/src/shared/resize-handle.tsx +0 -11
  75. package/src/shared/types.ts +0 -3
  76. package/src/shared/use-item-exit-animation.ts +0 -7
  77. package/src/shared/use-layout-shift-animation.ts +0 -7
@@ -1,16 +1,5 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  import type { Meta, StoryObj } from '@storybook/react-vite';
5
-
6
- /**
7
- * WordPress dependencies
8
- */
9
2
  import { useState, useMemo } from '@wordpress/element';
10
-
11
- /**
12
- * Internal dependencies
13
- */
14
3
  import { DashboardLanes } from '..';
15
4
  import type { DashboardLanesLayoutItem } from '../types';
16
5
  import type { GridOverlayRenderProps } from '../../shared/types';
@@ -1,11 +1,4 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  import { render } from '@testing-library/react';
5
-
6
- /**
7
- * Internal dependencies
8
- */
9
2
  import { DashboardLanes } from '..';
10
3
 
11
4
  class MockResizeObserver {
@@ -1,6 +1,3 @@
1
- /**
2
- * Internal dependencies
3
- */
4
1
  import { computeLanePlacements } from '../lane-placement';
5
2
  import type { LanePlacementItem } from '../lane-placement';
6
3
 
@@ -1,16 +1,5 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  import { render, act, screen } from '@testing-library/react';
5
-
6
- /**
7
- * WordPress dependencies
8
- */
9
2
  import { useState } from '@wordpress/element';
10
-
11
- /**
12
- * Internal dependencies
13
- */
14
3
  import { GRID_ITEM_DATA_KEY } from '../../shared/grid-item-key';
15
4
  import { useLanePlacement } from '../use-lane-placement';
16
5
  import type {
@@ -1,6 +1,3 @@
1
- /**
2
- * Internal dependencies
3
- */
4
1
  import type {
5
2
  DragPreviewRenderProps,
6
3
  GridOverlayRenderProps,
@@ -1,11 +1,4 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { useState, useLayoutEffect, useMemo } from '@wordpress/element';
5
-
6
- /**
7
- * Internal dependencies
8
- */
9
2
  import { computeLanePlacements } from './lane-placement';
10
3
  import { GRID_ITEM_DATA_KEY } from '../shared/grid-item-key';
11
4
 
@@ -1,6 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  import {
5
2
  defaultDropAnimation,
6
3
  defaultDropAnimationSideEffects,
@@ -1,16 +1,5 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  import clsx from 'clsx';
5
-
6
- /**
7
- * WordPress dependencies
8
- */
9
2
  import { useEffect, useState } from '@wordpress/element';
10
-
11
- /**
12
- * Internal dependencies
13
- */
14
3
  import type { GridOverlayRenderProps } from './types';
15
4
  import styles from './grid-overlay.module.css';
16
5
 
@@ -1,6 +1,3 @@
1
- /**
2
- * Internal dependencies
3
- */
4
1
  import { GRID_ITEM_DATA_KEY } from './grid-item-key';
5
2
  import exitStyles from './item-exit-animation.module.css';
6
3
  import type { RectSnapshot } from './use-layout-shift-animation';
@@ -1,19 +1,8 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  import { DndContext, useDraggable } from '@dnd-kit/core';
5
2
  import type { DragMoveEvent } from '@dnd-kit/core';
6
3
  import clsx from 'clsx';
7
-
8
- /**
9
- * WordPress dependencies
10
- */
11
4
  import { useCallback, useEffect, useRef } from '@wordpress/element';
12
5
  import { useMergeRefs, useThrottle } from '@wordpress/compose';
13
-
14
- /**
15
- * Internal dependencies
16
- */
17
6
  import type { ResizeDelta, ResizeHandleProps } from './types';
18
7
  import styles from './resize-handle.module.css';
19
8
 
@@ -1,6 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
1
  import type { useDraggable } from '@dnd-kit/core';
5
2
 
6
3
  // `useDraggable`'s `listeners` and `attributes` types are not exported
@@ -1,16 +1,9 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import {
5
2
  useCallback,
6
3
  useLayoutEffect,
7
4
  useRef,
8
5
  useState,
9
6
  } from '@wordpress/element';
10
-
11
- /**
12
- * Internal dependencies
13
- */
14
7
  import type { ItemExitOverlayRect } from './item-exit-overlay';
15
8
  import type { RectSnapshot } from './use-layout-shift-animation';
16
9
 
@@ -1,11 +1,4 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
1
  import { useCallback, useLayoutEffect, useRef } from '@wordpress/element';
5
-
6
- /**
7
- * Internal dependencies
8
- */
9
2
  import { GRID_ITEM_DATA_KEY } from './grid-item-key';
10
3
 
11
4
  /* `left`/`top` are relative to the grid container, not the viewport. */