@dxos/react-ui-dnd 0.8.4-main.937b3ca → 0.8.4-main.9be5663bfe

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-dnd",
3
- "version": "0.8.4-main.937b3ca",
3
+ "version": "0.8.4-main.9be5663bfe",
4
4
  "description": "Drag and drop components.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -37,15 +37,15 @@
37
37
  "@types/react-dom": "~19.2.3",
38
38
  "react": "~19.2.3",
39
39
  "react-dom": "~19.2.3",
40
- "vite": "7.1.9",
41
- "@dxos/react-ui": "0.8.4-main.937b3ca",
42
- "@dxos/ui-theme": "0.8.4-main.937b3ca"
40
+ "vite": "^7.1.11",
41
+ "@dxos/ui-theme": "0.8.4-main.9be5663bfe",
42
+ "@dxos/react-ui": "0.8.4-main.9be5663bfe"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": "~19.2.3",
46
46
  "react-dom": "~19.2.3",
47
- "@dxos/react-ui": "0.8.4-main.937b3ca",
48
- "@dxos/ui-theme": "0.8.4-main.937b3ca"
47
+ "@dxos/react-ui": "0.8.4-main.9be5663bfe",
48
+ "@dxos/ui-theme": "0.8.4-main.9be5663bfe"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"
@@ -34,7 +34,7 @@ const getNextSize = (
34
34
  Math.max(
35
35
  minSize,
36
36
  startSize +
37
- ((location.current.input[client] - location.initial.input[client]) / REM) * (side.endsWith('end') ? 1 : -1),
37
+ ((location.current.input[client] - location.initial.input[client]) / REM) * (side.endsWith('start') ? -1 : 1),
38
38
  ),
39
39
  );
40
40
  };
@@ -64,14 +64,14 @@ export const ResizeHandle = ({
64
64
  iconPosition = 'start',
65
65
  defaultSize,
66
66
  fallbackSize,
67
- size: _size,
67
+ size: sizeProp,
68
68
  minSize,
69
69
  maxSize,
70
70
  onSizeChange,
71
71
  }: ResizeHandleProps) => {
72
72
  const buttonRef = useRef<HTMLButtonElement>(null);
73
73
  const [size = 'min-content', setSize] = useControllableState({
74
- prop: _size,
74
+ prop: sizeProp,
75
75
  defaultProp: defaultSize,
76
76
  onChange: onSizeChange,
77
77
  });
@@ -133,11 +133,11 @@ export const ResizeHandle = ({
133
133
  ref={buttonRef}
134
134
  data-side={side}
135
135
  className={mx(
136
- 'group absolute flex focus-visible:outline-none',
136
+ 'group absolute flex focus-visible:outline-hidden',
137
137
  surfaceZIndex({ elevation, level: 'tooltip' }),
138
138
  orientation === 'horizontal'
139
- ? 'cursor-col-resize is-4 inset-block-0 data-[side="inline-end"]:inline-end-0 data-[side="inline-end"]:before:inline-end-0 data-[side="inline-start"]:inline-start-0 data-[side="inline-start"]:before:inline-start-0 !border-lb-0 before:inset-block-0 before:is-1'
140
- : 'cursor-row-resize bs-4 inset-inline-0 data-[side="block-end"]:block-end-0 data-[side="block-end"]:before:block-end-0 data-[side="block-start"]:block-start-0 data-[side="block-start"]:before:block-start-0 !border-li-0 before:inset-inline-0 before:bs-1',
139
+ ? 'cursor-col-resize w-4 inset-y-0 data-[side=inline-end]:end-0 data-[side=inline-end]:before:end-0 data-[side=inline-start]:start-0 data-[side=inline-start]:before:start-0 border-b-0! before:inset-y-0 before:w-1'
140
+ : 'cursor-row-resize h-4 inset-x-0 data-[side=block-end]:bottom-0 data-[side=block-end]:before:bottom-0 data-[side=block-start]:top-0 data-[side=block-start]:before:top-0 border-x-0! before:inset-x-0 before:h-1',
141
141
  orientation === 'horizontal'
142
142
  ? iconPosition === 'end'
143
143
  ? 'align-end'
@@ -150,45 +150,9 @@ export const ResizeHandle = ({
150
150
  ? 'justify-center'
151
151
  : 'justify-start',
152
152
  'before:transition-opacity before:duration-100 before:ease-in-out before:opacity-0 hover:before:opacity-100 focus-visible:before:opacity-100 active:before:opacity-100',
153
- 'before:absolute before:block before:bg-neutralFocusIndicator',
153
+ 'before:absolute before:block before:bg-neutral-focus-indicator',
154
154
  classNames,
155
155
  )}
156
- >
157
- <div
158
- role='none'
159
- data-side={side}
160
- className={mx(
161
- 'grid place-items-center group-hover:opacity-0 group-focus-visible:opacity-0 group-active:opacity-0',
162
- orientation === 'horizontal' ? 'bs-[--rail-size] is-4' : 'is-[--rail-size] bs-4',
163
- )}
164
- >
165
- <DragHandleSignifier side={side} />
166
- </div>
167
- </button>
168
- );
169
- };
170
-
171
- const DragHandleSignifier = ({ side }: Pick<ResizeHandleProps, 'side'>) => {
172
- return (
173
- <svg
174
- xmlns='http://www.w3.org/2000/svg'
175
- viewBox='0 0 256 256'
176
- fill='currentColor'
177
- className={mx(
178
- 'shrink-0 bs-4 is-4 text-unAccent',
179
- side === 'block-end'
180
- ? 'rotate-90'
181
- : side === 'block-start'
182
- ? '-rotate-90'
183
- : side === 'inline-start' && 'rotate-180',
184
- )}
185
- >
186
- {/* two pips: <path d='M256,120c-8.8,0-16-7.2-16-16v-56c0-8.8,7.2-16,16-16v88Z' />
187
- <path d='M256,232c-8.8,0-16-7.2-16-16v-56c0-8.8,7.2-16,16-16v88Z' /> */}
188
- <path d='M256,64c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />
189
- <path d='M256,120c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />
190
- <path d='M256,176c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />
191
- <path d='M256,232c-8.8,0-16-7.2-16-16s7.2-16,16-16v32Z' />
192
- </svg>
156
+ />
193
157
  );
194
158
  };