@prosekit/react 0.0.2 → 0.0.4
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/prosekit-react-components-command-empty.d.ts +11 -0
- package/dist/prosekit-react-components-command-empty.js +21 -0
- package/dist/prosekit-react-components-command-item.d.ts +11 -0
- package/dist/prosekit-react-components-command-item.js +21 -0
- package/dist/prosekit-react-components-command-list.d.ts +11 -0
- package/dist/prosekit-react-components-command-list.js +21 -0
- package/dist/prosekit-react-components-command-popover.d.ts +12 -0
- package/dist/prosekit-react-components-command-popover.js +21 -0
- package/package.json +39 -20
- package/dist/prosekit-react-components-menu-item.d.ts +0 -6
- package/dist/prosekit-react-components-menu-item.js +0 -13
- package/dist/prosekit-react-components-menu.d.ts +0 -16
- package/dist/prosekit-react-components-menu.js +0 -16
- package/dist/prosekit-react-components-popover-suggestion.d.ts +0 -16
- package/dist/prosekit-react-components-popover-suggestion.js +0 -27
- package/dist/prosekit-react-components-popover.d.ts +0 -6
- package/dist/prosekit-react-components-popover.js +0 -13
@@ -0,0 +1,11 @@
|
|
1
|
+
import { SimplifyUnion } from '@prosekit/core';
|
2
|
+
import { CommandEmptyProps as CommandEmptyProps$1 } from '@prosekit/lit/components/command-empty';
|
3
|
+
import React, { ComponentType } from 'react';
|
4
|
+
|
5
|
+
type CommandEmptyProps = SimplifyUnion<{
|
6
|
+
className?: string;
|
7
|
+
children?: React.ReactNode;
|
8
|
+
} & CommandEmptyProps$1>;
|
9
|
+
declare const CommandEmpty: ComponentType<CommandEmptyProps>;
|
10
|
+
|
11
|
+
export { CommandEmpty, CommandEmptyProps };
|
@@ -0,0 +1,21 @@
|
|
1
|
+
// src/components/command-empty.gen.tsx
|
2
|
+
import { createComponent } from "@lit-labs/react";
|
3
|
+
import { CommandEmpty as CommandEmptyElement } from "@prosekit/lit/components/command-empty";
|
4
|
+
import React from "react";
|
5
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
6
|
+
var CommandEmptyComponent = createComponent({
|
7
|
+
tagName: "prosekit-command-empty",
|
8
|
+
elementClass: CommandEmptyElement,
|
9
|
+
react: React,
|
10
|
+
displayName: "CommandEmptyComponent"
|
11
|
+
});
|
12
|
+
var CommandEmpty = (props) => {
|
13
|
+
return /* @__PURE__ */ jsxDEV(CommandEmptyComponent, { ...props }, void 0, false, {
|
14
|
+
fileName: "src/components/command-empty.gen.tsx",
|
15
|
+
lineNumber: 19,
|
16
|
+
columnNumber: 10
|
17
|
+
}, this);
|
18
|
+
};
|
19
|
+
export {
|
20
|
+
CommandEmpty
|
21
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { SimplifyUnion } from '@prosekit/core';
|
2
|
+
import { CommandItemProps as CommandItemProps$1 } from '@prosekit/lit/components/command-item';
|
3
|
+
import React, { ComponentType } from 'react';
|
4
|
+
|
5
|
+
type CommandItemProps = SimplifyUnion<{
|
6
|
+
className?: string;
|
7
|
+
children?: React.ReactNode;
|
8
|
+
} & CommandItemProps$1>;
|
9
|
+
declare const CommandItem: ComponentType<CommandItemProps>;
|
10
|
+
|
11
|
+
export { CommandItem, CommandItemProps };
|
@@ -0,0 +1,21 @@
|
|
1
|
+
// src/components/command-item.gen.tsx
|
2
|
+
import { createComponent } from "@lit-labs/react";
|
3
|
+
import { CommandItem as CommandItemElement } from "@prosekit/lit/components/command-item";
|
4
|
+
import React from "react";
|
5
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
6
|
+
var CommandItemComponent = createComponent({
|
7
|
+
tagName: "prosekit-command-item",
|
8
|
+
elementClass: CommandItemElement,
|
9
|
+
react: React,
|
10
|
+
displayName: "CommandItemComponent"
|
11
|
+
});
|
12
|
+
var CommandItem = (props) => {
|
13
|
+
return /* @__PURE__ */ jsxDEV(CommandItemComponent, { ...props }, void 0, false, {
|
14
|
+
fileName: "src/components/command-item.gen.tsx",
|
15
|
+
lineNumber: 19,
|
16
|
+
columnNumber: 10
|
17
|
+
}, this);
|
18
|
+
};
|
19
|
+
export {
|
20
|
+
CommandItem
|
21
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { SimplifyUnion } from '@prosekit/core';
|
2
|
+
import { CommandListProps as CommandListProps$1 } from '@prosekit/lit/components/command-list';
|
3
|
+
import React, { ComponentType } from 'react';
|
4
|
+
|
5
|
+
type CommandListProps = SimplifyUnion<{
|
6
|
+
className?: string;
|
7
|
+
children?: React.ReactNode;
|
8
|
+
} & CommandListProps$1>;
|
9
|
+
declare const CommandList: ComponentType<CommandListProps>;
|
10
|
+
|
11
|
+
export { CommandList, CommandListProps };
|
@@ -0,0 +1,21 @@
|
|
1
|
+
// src/components/command-list.gen.tsx
|
2
|
+
import { createComponent } from "@lit-labs/react";
|
3
|
+
import { CommandList as CommandListElement } from "@prosekit/lit/components/command-list";
|
4
|
+
import React from "react";
|
5
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
6
|
+
var CommandListComponent = createComponent({
|
7
|
+
tagName: "prosekit-command-list",
|
8
|
+
elementClass: CommandListElement,
|
9
|
+
react: React,
|
10
|
+
displayName: "CommandListComponent"
|
11
|
+
});
|
12
|
+
var CommandList = (props) => {
|
13
|
+
return /* @__PURE__ */ jsxDEV(CommandListComponent, { ...props }, void 0, false, {
|
14
|
+
fileName: "src/components/command-list.gen.tsx",
|
15
|
+
lineNumber: 19,
|
16
|
+
columnNumber: 10
|
17
|
+
}, this);
|
18
|
+
};
|
19
|
+
export {
|
20
|
+
CommandList
|
21
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { CommandPopoverProps as CommandPopoverProps$1 } from '@prosekit/lit/components/command-popover';
|
2
|
+
export { PopoverOptions, QueryBuilder } from '@prosekit/lit/components/command-popover';
|
3
|
+
import { SimplifyUnion } from '@prosekit/core';
|
4
|
+
import React, { ComponentType } from 'react';
|
5
|
+
|
6
|
+
type CommandPopoverProps = SimplifyUnion<{
|
7
|
+
className?: string;
|
8
|
+
children?: React.ReactNode;
|
9
|
+
} & CommandPopoverProps$1>;
|
10
|
+
declare const CommandPopover: ComponentType<CommandPopoverProps>;
|
11
|
+
|
12
|
+
export { CommandPopover, CommandPopoverProps };
|
@@ -0,0 +1,21 @@
|
|
1
|
+
// src/components/command-popover.gen.tsx
|
2
|
+
import { createComponent } from "@lit-labs/react";
|
3
|
+
import { CommandPopover as CommandPopoverElement } from "@prosekit/lit/components/command-popover";
|
4
|
+
import React from "react";
|
5
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
6
|
+
var CommandPopoverComponent = createComponent({
|
7
|
+
tagName: "prosekit-command-popover",
|
8
|
+
elementClass: CommandPopoverElement,
|
9
|
+
react: React,
|
10
|
+
displayName: "CommandPopoverComponent"
|
11
|
+
});
|
12
|
+
var CommandPopover = (props) => {
|
13
|
+
return /* @__PURE__ */ jsxDEV(CommandPopoverComponent, { ...props }, void 0, false, {
|
14
|
+
fileName: "src/components/command-popover.gen.tsx",
|
15
|
+
lineNumber: 19,
|
16
|
+
columnNumber: 10
|
17
|
+
}, this);
|
18
|
+
};
|
19
|
+
export {
|
20
|
+
CommandPopover
|
21
|
+
};
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/react",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.4",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -30,25 +30,25 @@
|
|
30
30
|
"import": "./dist/prosekit-react.js",
|
31
31
|
"default": "./dist/prosekit-react.js"
|
32
32
|
},
|
33
|
-
"./components/
|
34
|
-
"types": "./dist/prosekit-react-components-
|
35
|
-
"import": "./dist/prosekit-react-components-
|
36
|
-
"default": "./dist/prosekit-react-components-
|
33
|
+
"./components/command-empty": {
|
34
|
+
"types": "./dist/prosekit-react-components-command-empty.d.ts",
|
35
|
+
"import": "./dist/prosekit-react-components-command-empty.js",
|
36
|
+
"default": "./dist/prosekit-react-components-command-empty.js"
|
37
37
|
},
|
38
|
-
"./components/
|
39
|
-
"types": "./dist/prosekit-react-components-
|
40
|
-
"import": "./dist/prosekit-react-components-
|
41
|
-
"default": "./dist/prosekit-react-components-
|
38
|
+
"./components/command-item": {
|
39
|
+
"types": "./dist/prosekit-react-components-command-item.d.ts",
|
40
|
+
"import": "./dist/prosekit-react-components-command-item.js",
|
41
|
+
"default": "./dist/prosekit-react-components-command-item.js"
|
42
42
|
},
|
43
|
-
"./components/
|
44
|
-
"types": "./dist/prosekit-react-components-
|
45
|
-
"import": "./dist/prosekit-react-components-
|
46
|
-
"default": "./dist/prosekit-react-components-
|
43
|
+
"./components/command-list": {
|
44
|
+
"types": "./dist/prosekit-react-components-command-list.d.ts",
|
45
|
+
"import": "./dist/prosekit-react-components-command-list.js",
|
46
|
+
"default": "./dist/prosekit-react-components-command-list.js"
|
47
47
|
},
|
48
|
-
"./components/popover
|
49
|
-
"types": "./dist/prosekit-react-components-popover
|
50
|
-
"import": "./dist/prosekit-react-components-popover
|
51
|
-
"default": "./dist/prosekit-react-components-popover
|
48
|
+
"./components/command-popover": {
|
49
|
+
"types": "./dist/prosekit-react-components-command-popover.d.ts",
|
50
|
+
"import": "./dist/prosekit-react-components-command-popover.js",
|
51
|
+
"default": "./dist/prosekit-react-components-command-popover.js"
|
52
52
|
}
|
53
53
|
},
|
54
54
|
"files": [
|
@@ -56,8 +56,8 @@
|
|
56
56
|
],
|
57
57
|
"dependencies": {
|
58
58
|
"@lit-labs/react": "latest",
|
59
|
-
"@prosekit/core": "^0.0.
|
60
|
-
"@prosekit/lit": "^0.0.
|
59
|
+
"@prosekit/core": "^0.0.3",
|
60
|
+
"@prosekit/lit": "^0.0.4"
|
61
61
|
},
|
62
62
|
"peerDependencies": {
|
63
63
|
"react": ">= 17.0.0",
|
@@ -85,5 +85,24 @@
|
|
85
85
|
"build:tsup": "tsup",
|
86
86
|
"build:tsc": "tsc -b tsconfig.json"
|
87
87
|
},
|
88
|
-
"types": "./dist/prosekit-react.d.ts"
|
88
|
+
"types": "./dist/prosekit-react.d.ts",
|
89
|
+
"typesVersions": {
|
90
|
+
"*": {
|
91
|
+
".": [
|
92
|
+
"./dist/prosekit-react.d.ts"
|
93
|
+
],
|
94
|
+
"components/command-empty": [
|
95
|
+
"./dist/prosekit-react-components-command-empty.d.ts"
|
96
|
+
],
|
97
|
+
"components/command-item": [
|
98
|
+
"./dist/prosekit-react-components-command-item.d.ts"
|
99
|
+
],
|
100
|
+
"components/command-list": [
|
101
|
+
"./dist/prosekit-react-components-command-list.d.ts"
|
102
|
+
],
|
103
|
+
"components/command-popover": [
|
104
|
+
"./dist/prosekit-react-components-command-popover.d.ts"
|
105
|
+
]
|
106
|
+
}
|
107
|
+
}
|
89
108
|
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
// src/components/menu-item.gen.ts
|
2
|
-
import { createComponent } from "@lit-labs/react";
|
3
|
-
import { MenuItem as MenuItemElement } from "@prosekit/lit/elements/menu-item";
|
4
|
-
import React from "react";
|
5
|
-
var MenuItem = createComponent({
|
6
|
-
tagName: "prosekit-menu-item",
|
7
|
-
elementClass: MenuItemElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "MenuItem"
|
10
|
-
});
|
11
|
-
export {
|
12
|
-
MenuItem
|
13
|
-
};
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { Editor } from '@prosekit/core';
|
2
|
-
import { Menu as Menu$1 } from '@prosekit/lit/elements/menu';
|
3
|
-
import { ComponentType, ForwardedRef, ReactNode } from 'react';
|
4
|
-
|
5
|
-
/**
|
6
|
-
* @module @prosekit/react/components/menu
|
7
|
-
*/
|
8
|
-
|
9
|
-
declare const Menu: ComponentType<{
|
10
|
-
editor?: Editor;
|
11
|
-
ref?: ForwardedRef<Menu$1>;
|
12
|
-
children?: ReactNode | undefined;
|
13
|
-
className?: string;
|
14
|
-
}>;
|
15
|
-
|
16
|
-
export { Menu };
|
@@ -1,16 +0,0 @@
|
|
1
|
-
// src/components/menu.gen.ts
|
2
|
-
import { createComponent } from "@lit-labs/react";
|
3
|
-
import { Menu as MenuElement } from "@prosekit/lit/elements/menu";
|
4
|
-
import React from "react";
|
5
|
-
var Menu = createComponent({
|
6
|
-
tagName: "prosekit-menu",
|
7
|
-
elementClass: MenuElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "Menu"
|
10
|
-
});
|
11
|
-
|
12
|
-
// src/components/menu.tsx
|
13
|
-
var Menu2 = Menu;
|
14
|
-
export {
|
15
|
-
Menu2 as Menu
|
16
|
-
};
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { Editor } from '@prosekit/core';
|
2
|
-
import { PredictionRule, PopoverSuggestionContext } from '@prosekit/lit/elements/popover-suggestion';
|
3
|
-
export { PopoverSuggestionContext, PredictionRule } from '@prosekit/lit/elements/popover-suggestion';
|
4
|
-
import React, { FC } from 'react';
|
5
|
-
|
6
|
-
/**
|
7
|
-
* @module @prosekit/react/components/popover-slash
|
8
|
-
*/
|
9
|
-
|
10
|
-
declare const PopoverSuggestion: FC<{
|
11
|
-
editor: Editor;
|
12
|
-
rules: PredictionRule[];
|
13
|
-
render: (context: PopoverSuggestionContext) => React.ReactNode;
|
14
|
-
}>;
|
15
|
-
|
16
|
-
export { PopoverSuggestion };
|
@@ -1,27 +0,0 @@
|
|
1
|
-
// src/components/popover-suggestion.tsx
|
2
|
-
import { useState } from "react";
|
3
|
-
|
4
|
-
// src/components/popover-suggestion.gen.ts
|
5
|
-
import { createComponent } from "@lit-labs/react";
|
6
|
-
import { PopoverSuggestion as PopoverSuggestionElement } from "@prosekit/lit/elements/popover-suggestion";
|
7
|
-
import React from "react";
|
8
|
-
var PopoverSuggestion = createComponent({
|
9
|
-
tagName: "prosekit-popover-suggestion",
|
10
|
-
elementClass: PopoverSuggestionElement,
|
11
|
-
react: React,
|
12
|
-
displayName: "PopoverSuggestion"
|
13
|
-
});
|
14
|
-
|
15
|
-
// src/components/popover-suggestion.tsx
|
16
|
-
import { jsxDEV } from "react/jsx-dev-runtime";
|
17
|
-
var PopoverSuggestion2 = ({ editor, rules, render }) => {
|
18
|
-
const [context, setContext] = useState(null);
|
19
|
-
return /* @__PURE__ */ jsxDEV(PopoverSuggestion, { editor, rules, onContext: setContext, children: context ? render(context) : null }, void 0, false, {
|
20
|
-
fileName: "src/components/popover-suggestion.tsx",
|
21
|
-
lineNumber: 23,
|
22
|
-
columnNumber: 5
|
23
|
-
}, this);
|
24
|
-
};
|
25
|
-
export {
|
26
|
-
PopoverSuggestion2 as PopoverSuggestion
|
27
|
-
};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
// src/components/popover.gen.ts
|
2
|
-
import { createComponent } from "@lit-labs/react";
|
3
|
-
import { Popover as PopoverElement } from "@prosekit/lit/elements/popover";
|
4
|
-
import React from "react";
|
5
|
-
var Popover = createComponent({
|
6
|
-
tagName: "prosekit-popover",
|
7
|
-
elementClass: PopoverElement,
|
8
|
-
react: React,
|
9
|
-
displayName: "Popover"
|
10
|
-
});
|
11
|
-
export {
|
12
|
-
Popover
|
13
|
-
};
|