@prosekit/web 0.3.18 → 0.4.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.
- package/dist/_tsup-dts-rollup.d.ts +575 -530
- package/dist/chunk-ZGQ225UP.js +17 -0
- package/dist/prosekit-web-autocomplete.d.ts +12 -4
- package/dist/prosekit-web-autocomplete.js +141 -115
- package/dist/prosekit-web-block-handle.d.ts +9 -9
- package/dist/prosekit-web-block-handle.js +93 -120
- package/dist/prosekit-web-inline-popover.d.ts +3 -1
- package/dist/prosekit-web-inline-popover.js +39 -35
- package/dist/prosekit-web-popover.d.ts +9 -3
- package/dist/prosekit-web-popover.js +45 -34
- package/dist/prosekit-web-resizable.d.ts +6 -2
- package/dist/prosekit-web-resizable.js +43 -38
- package/dist/prosekit-web-table-handle.d.ts +21 -7
- package/dist/prosekit-web-table-handle.js +223 -155
- package/dist/prosekit-web-tooltip.d.ts +9 -3
- package/dist/prosekit-web-tooltip.js +52 -37
- package/package.json +13 -12
- package/dist/chunk-LCDA7GFP.js +0 -11
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
defineCustomElement
|
|
3
|
-
} from "./chunk-LCDA7GFP.js";
|
|
4
|
-
|
|
5
1
|
// src/components/resizable/resizable-handle/element.gen.ts
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
// src/components/resizable/resizable-handle/props.ts
|
|
9
|
-
var defaultResizableHandleProps = {
|
|
10
|
-
position: "bottom-right"
|
|
11
|
-
};
|
|
2
|
+
import { defineCustomElement, registerCustomElement } from "@aria-ui/core";
|
|
12
3
|
|
|
13
|
-
// src/components/resizable/resizable-handle/
|
|
4
|
+
// src/components/resizable/resizable-handle/setup.ts
|
|
14
5
|
import {
|
|
15
6
|
createSignal,
|
|
16
7
|
useEffect
|
|
@@ -115,8 +106,8 @@ var calcLeftResize = (w, h, dx, dy, r) => {
|
|
|
115
106
|
return [w, h];
|
|
116
107
|
};
|
|
117
108
|
|
|
118
|
-
// src/components/resizable/resizable-handle/
|
|
119
|
-
function useResizableHandle(host, state) {
|
|
109
|
+
// src/components/resizable/resizable-handle/setup.ts
|
|
110
|
+
function useResizableHandle(host, { state }) {
|
|
120
111
|
const onResize = onResizeContext.consume(host);
|
|
121
112
|
const onResizeStart = onResizeStartContext.consume(host);
|
|
122
113
|
const onResizeEnd = onResizeEndContext.consume(host);
|
|
@@ -182,50 +173,47 @@ function useResizableHandleState(host, state, context) {
|
|
|
182
173
|
});
|
|
183
174
|
}
|
|
184
175
|
|
|
176
|
+
// src/components/resizable/resizable-handle/types.ts
|
|
177
|
+
var resizableHandleProps = {
|
|
178
|
+
position: { default: "bottom-right" }
|
|
179
|
+
};
|
|
180
|
+
var resizableHandleEvents = {};
|
|
181
|
+
|
|
185
182
|
// src/components/resizable/resizable-handle/element.gen.ts
|
|
186
|
-
var ResizableHandleElement = class extends
|
|
183
|
+
var ResizableHandleElement = class extends defineCustomElement({
|
|
184
|
+
props: resizableHandleProps,
|
|
185
|
+
events: resizableHandleEvents,
|
|
186
|
+
setup: useResizableHandle
|
|
187
|
+
}) {
|
|
187
188
|
};
|
|
188
|
-
|
|
189
|
+
registerCustomElement("prosekit-resizable-handle", ResizableHandleElement);
|
|
189
190
|
|
|
190
191
|
// src/components/resizable/resizable-root/element.gen.ts
|
|
191
|
-
import {
|
|
192
|
-
|
|
193
|
-
// src/components/resizable/resizable-root/props.ts
|
|
194
|
-
var defaultResizableRootProps = {
|
|
195
|
-
width: null,
|
|
196
|
-
height: null,
|
|
197
|
-
aspectRatio: null,
|
|
198
|
-
onSizeChangeStart: null,
|
|
199
|
-
onSizeChange: null,
|
|
200
|
-
onSizeChangeEnd: null
|
|
201
|
-
};
|
|
192
|
+
import { defineCustomElement as defineCustomElement2, registerCustomElement as registerCustomElement2 } from "@aria-ui/core";
|
|
202
193
|
|
|
203
|
-
// src/components/resizable/resizable-root/
|
|
194
|
+
// src/components/resizable/resizable-root/setup.ts
|
|
204
195
|
import {
|
|
205
196
|
createSignal as createSignal2,
|
|
206
197
|
useEffect as useEffect2
|
|
207
198
|
} from "@aria-ui/core";
|
|
208
|
-
function useResizableRoot(host, state) {
|
|
199
|
+
function useResizableRoot(host, { state, emit }) {
|
|
209
200
|
const onResizeStart = () => {
|
|
210
|
-
var _a
|
|
201
|
+
var _a;
|
|
211
202
|
const { width, height } = host.getBoundingClientRect();
|
|
212
203
|
let aspectRatio = (_a = state.aspectRatio.peek()) != null ? _a : width / height;
|
|
213
204
|
if (!isFinitePositiveNumber(aspectRatio)) {
|
|
214
205
|
aspectRatio = 0;
|
|
215
206
|
}
|
|
216
|
-
(
|
|
207
|
+
emit("resizeStart", { width, height });
|
|
217
208
|
return [width, height, aspectRatio];
|
|
218
209
|
};
|
|
219
210
|
const onResize = (width, height) => {
|
|
220
|
-
var _a;
|
|
221
|
-
(_a = state.onSizeChange.peek()) == null ? void 0 : _a({ width, height });
|
|
222
211
|
state.width.set(width);
|
|
223
212
|
state.height.set(height);
|
|
224
213
|
};
|
|
225
214
|
const onResizeEnd = () => {
|
|
226
|
-
var _a;
|
|
227
215
|
const { width, height } = host.getBoundingClientRect();
|
|
228
|
-
(
|
|
216
|
+
emit("resizeEnd", { width, height });
|
|
229
217
|
};
|
|
230
218
|
onResizeStartContext.provide(host, createSignal2(onResizeStart));
|
|
231
219
|
onResizeContext.provide(host, createSignal2(onResize));
|
|
@@ -252,13 +240,30 @@ function updateResizableRootStyles(host, width, height, aspectRatio) {
|
|
|
252
240
|
}
|
|
253
241
|
}
|
|
254
242
|
|
|
243
|
+
// src/components/resizable/resizable-root/types.ts
|
|
244
|
+
var resizableRootProps = {
|
|
245
|
+
width: { default: null },
|
|
246
|
+
height: { default: null },
|
|
247
|
+
aspectRatio: { default: null }
|
|
248
|
+
};
|
|
249
|
+
var resizableRootEvents = {
|
|
250
|
+
resizeStart: {},
|
|
251
|
+
resizeEnd: {}
|
|
252
|
+
};
|
|
253
|
+
|
|
255
254
|
// src/components/resizable/resizable-root/element.gen.ts
|
|
256
|
-
var ResizableRootElement = class extends
|
|
255
|
+
var ResizableRootElement = class extends defineCustomElement2({
|
|
256
|
+
props: resizableRootProps,
|
|
257
|
+
events: resizableRootEvents,
|
|
258
|
+
setup: useResizableRoot
|
|
259
|
+
}) {
|
|
257
260
|
};
|
|
258
|
-
|
|
261
|
+
registerCustomElement2("prosekit-resizable-root", ResizableRootElement);
|
|
259
262
|
export {
|
|
260
263
|
ResizableHandleElement,
|
|
261
264
|
ResizableRootElement,
|
|
262
|
-
|
|
263
|
-
|
|
265
|
+
resizableHandleEvents,
|
|
266
|
+
resizableHandleProps,
|
|
267
|
+
resizableRootEvents,
|
|
268
|
+
resizableRootProps
|
|
264
269
|
};
|
|
@@ -1,21 +1,35 @@
|
|
|
1
1
|
export { TableHandleColumnRootElement } from './_tsup-dts-rollup';
|
|
2
|
-
export {
|
|
2
|
+
export { tableHandleColumnRootEvents } from './_tsup-dts-rollup';
|
|
3
|
+
export { tableHandleColumnRootProps } from './_tsup-dts-rollup';
|
|
4
|
+
export { TableHandleColumnRootEvents } from './_tsup-dts-rollup';
|
|
3
5
|
export { TableHandleColumnRootProps } from './_tsup-dts-rollup';
|
|
4
6
|
export { TableHandleColumnTriggerElement } from './_tsup-dts-rollup';
|
|
5
|
-
export {
|
|
7
|
+
export { tableHandleColumnTriggerEvents } from './_tsup-dts-rollup';
|
|
8
|
+
export { tableHandleColumnTriggerProps } from './_tsup-dts-rollup';
|
|
9
|
+
export { TableHandleColumnTriggerEvents } from './_tsup-dts-rollup';
|
|
6
10
|
export { TableHandleColumnTriggerProps } from './_tsup-dts-rollup';
|
|
7
11
|
export { TableHandlePopoverContentElement } from './_tsup-dts-rollup';
|
|
8
|
-
export {
|
|
12
|
+
export { tableHandlePopoverContentEvents } from './_tsup-dts-rollup';
|
|
13
|
+
export { tableHandlePopoverContentProps } from './_tsup-dts-rollup';
|
|
14
|
+
export { TableHandlePopoverContentEvents } from './_tsup-dts-rollup';
|
|
9
15
|
export { TableHandlePopoverContentProps } from './_tsup-dts-rollup';
|
|
10
16
|
export { TableHandlePopoverItemElement } from './_tsup-dts-rollup';
|
|
11
|
-
export {
|
|
17
|
+
export { tableHandlePopoverItemEvents } from './_tsup-dts-rollup';
|
|
18
|
+
export { tableHandlePopoverItemProps } from './_tsup-dts-rollup';
|
|
19
|
+
export { TableHandlePopoverItemEvents } from './_tsup-dts-rollup';
|
|
12
20
|
export { TableHandlePopoverItemProps } from './_tsup-dts-rollup';
|
|
13
21
|
export { TableHandleRootElement } from './_tsup-dts-rollup';
|
|
14
|
-
export {
|
|
22
|
+
export { tableHandleRootEvents } from './_tsup-dts-rollup';
|
|
23
|
+
export { tableHandleRootProps } from './_tsup-dts-rollup';
|
|
24
|
+
export { TableHandleRootEvents } from './_tsup-dts-rollup';
|
|
15
25
|
export { TableHandleRootProps } from './_tsup-dts-rollup';
|
|
16
26
|
export { TableHandleRowRootElement } from './_tsup-dts-rollup';
|
|
17
|
-
export {
|
|
27
|
+
export { tableHandleRowRootEvents } from './_tsup-dts-rollup';
|
|
28
|
+
export { tableHandleRowRootProps } from './_tsup-dts-rollup';
|
|
29
|
+
export { TableHandleRowRootEvents } from './_tsup-dts-rollup';
|
|
18
30
|
export { TableHandleRowRootProps } from './_tsup-dts-rollup';
|
|
19
31
|
export { TableHandleRowTriggerElement } from './_tsup-dts-rollup';
|
|
20
|
-
export {
|
|
32
|
+
export { tableHandleRowTriggerEvents } from './_tsup-dts-rollup';
|
|
33
|
+
export { tableHandleRowTriggerProps } from './_tsup-dts-rollup';
|
|
34
|
+
export { TableHandleRowTriggerEvents } from './_tsup-dts-rollup';
|
|
21
35
|
export { TableHandleRowTriggerProps } from './_tsup-dts-rollup';
|