@prosekit/preact 0.4.6 → 0.4.8

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.
@@ -21,7 +21,6 @@ import { BlockHandlePopoverEvents } from '@prosekit/web/block-handle';
21
21
  import { BlockHandlePopoverProps as BlockHandlePopoverProps_2 } from '@prosekit/web/block-handle';
22
22
  import { ComponentChildren } from 'preact';
23
23
  import { ComponentType } from 'preact';
24
- import { config as default_alias_1 } from '@prosekit/dev/config-vitest';
25
24
  import { Editor } from '@prosekit/core';
26
25
  import type { EditorState } from '@prosekit/pm/state';
27
26
  import { Extension } from '@prosekit/core';
@@ -31,7 +30,6 @@ import { InlinePopoverElement } from '@prosekit/web/inline-popover';
31
30
  import { InlinePopoverEvents } from '@prosekit/web/inline-popover';
32
31
  import { InlinePopoverProps as InlinePopoverProps_2 } from '@prosekit/web/inline-popover';
33
32
  import { Keymap } from '@prosekit/core';
34
- import { Options } from 'tsup';
35
33
  import { PopoverContentElement } from '@prosekit/web/popover';
36
34
  import { PopoverContentEvents } from '@prosekit/web/popover';
37
35
  import { PopoverContentProps as PopoverContentProps_2 } from '@prosekit/web/popover';
@@ -173,10 +171,6 @@ export declare type CreateProps<Props extends {
173
171
  [EventName in keyof Events]: CustomEvent;
174
172
  }> = Props & CreateEventProps<Events>;
175
173
 
176
- export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
177
-
178
- export { default_alias_1 }
179
-
180
174
  /**
181
175
  * @internal
182
176
  */
@@ -74,8 +74,7 @@ function createComponent(tagName, displayName, propNames, eventNames) {
74
74
  const fixedEventHandlers = {};
75
75
  for (const eventName of eventNames) {
76
76
  fixedEventHandlers[eventName] = (event) => {
77
- var _a, _b;
78
- (_b = (_a = eventHandlersRef.current)[eventName]) == null ? void 0 : _b.call(_a, event);
77
+ eventHandlersRef.current[eventName]?.(event);
79
78
  };
80
79
  }
81
80
  for (const [name, handler] of Object.entries(fixedEventHandlers)) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createComponent
3
- } from "./chunk-FEWLACYV.js";
3
+ } from "./chunk-YJQWSMJE.js";
4
4
  import "./chunk-V253IGNY.js";
5
5
 
6
6
  // src/components/autocomplete/autocomplete-empty.gen.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createComponent
3
- } from "./chunk-FEWLACYV.js";
3
+ } from "./chunk-YJQWSMJE.js";
4
4
  import "./chunk-V253IGNY.js";
5
5
 
6
6
  // src/components/block-handle/block-handle-add.gen.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createComponent
3
- } from "./chunk-FEWLACYV.js";
3
+ } from "./chunk-YJQWSMJE.js";
4
4
  import "./chunk-V253IGNY.js";
5
5
 
6
6
  // src/components/inline-popover/inline-popover.gen.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createComponent
3
- } from "./chunk-FEWLACYV.js";
3
+ } from "./chunk-YJQWSMJE.js";
4
4
  import "./chunk-V253IGNY.js";
5
5
 
6
6
  // src/components/popover/popover-content.gen.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createComponent
3
- } from "./chunk-FEWLACYV.js";
3
+ } from "./chunk-YJQWSMJE.js";
4
4
  import "./chunk-V253IGNY.js";
5
5
 
6
6
  // src/components/resizable/resizable-handle.gen.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createComponent
3
- } from "./chunk-FEWLACYV.js";
3
+ } from "./chunk-YJQWSMJE.js";
4
4
  import "./chunk-V253IGNY.js";
5
5
 
6
6
  // src/components/table-handle/table-handle-column-root.gen.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createComponent
3
- } from "./chunk-FEWLACYV.js";
3
+ } from "./chunk-YJQWSMJE.js";
4
4
  import "./chunk-V253IGNY.js";
5
5
 
6
6
  // src/components/tooltip/tooltip-content.gen.ts
@@ -47,8 +47,8 @@ function usePriorityExtension(extension, priority) {
47
47
  function useExtension(extension, options) {
48
48
  const editorContext = useEditorContext();
49
49
  useEditorExtension(
50
- (options == null ? void 0 : options.editor) || editorContext,
51
- usePriorityExtension(extension, options == null ? void 0 : options.priority)
50
+ options?.editor || editorContext,
51
+ usePriorityExtension(extension, options?.priority)
52
52
  );
53
53
  }
54
54
 
@@ -73,8 +73,7 @@ import {
73
73
  useReducer
74
74
  } from "preact/hooks";
75
75
  function useEditor(options) {
76
- var _a;
77
- const update = (_a = options == null ? void 0 : options.update) != null ? _a : false;
76
+ const update = options?.update ?? false;
78
77
  const editor = useEditorContext();
79
78
  if (!editor) {
80
79
  throw new ProseKitError(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prosekit/preact",
3
3
  "type": "module",
4
- "version": "0.4.6",
4
+ "version": "0.4.8",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "ocavue",
@@ -71,9 +71,9 @@
71
71
  ],
72
72
  "dependencies": {
73
73
  "react-merge-refs": "^2.1.1",
74
+ "@prosekit/core": "^0.7.14",
74
75
  "@prosekit/pm": "^0.1.9",
75
- "@prosekit/web": "^0.5.2",
76
- "@prosekit/core": "^0.7.14"
76
+ "@prosekit/web": "^0.5.4"
77
77
  },
78
78
  "peerDependencies": {
79
79
  "preact": ">= 10.11.0"
@@ -84,15 +84,15 @@
84
84
  }
85
85
  },
86
86
  "devDependencies": {
87
- "preact": "^10.25.3",
87
+ "preact": "^10.25.4",
88
88
  "tsup": "^8.3.5",
89
- "typescript": "~5.6.3",
89
+ "typescript": "~5.7.2",
90
90
  "vitest": "^2.1.8",
91
91
  "@prosekit/dev": "0.0.0"
92
92
  },
93
93
  "scripts": {
94
- "build:tsup": "tsup",
95
- "build:tsc": "tsc -b tsconfig.json"
94
+ "build:tsc": "tsc -b tsconfig.json",
95
+ "build:tsup": "tsup"
96
96
  },
97
97
  "types": "./dist/prosekit-preact.d.ts",
98
98
  "typesVersions": {