Skip to content

Commit

Permalink
fix: expose utils
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdoro committed May 17, 2024
1 parent 7051d54 commit 33252ac
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ArrowDownWideNarrow, CheckCheck, RefreshCcwDot, StepForward, WrapText } from "lucide-react";
import { useEditor } from "novel";
import { getPrevText } from "novel/extensions";
import { getPrevText } from "novel/utils";
import { CommandGroup, CommandItem, CommandSeparator } from "../ui/command";

const options = [
Expand Down
5 changes: 5 additions & 0 deletions packages/headless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
"types": "./dist/plugins.d.ts",
"import": "./dist/plugins.js",
"require": "./dist/plugins.cjs"
},
"./utils": {
"types": "./dist/utils.d.ts",
"import": "./dist/utils.js",
"require": "./dist/utils.cjs"
}
},
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions packages/headless/src/extensions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,4 @@ export {
GlobalDragHandle,
};

// Todo: Maybe I should create an utils entry
export { getPrevText } from "../utils/utils";

File renamed without changes.
1 change: 1 addition & 0 deletions packages/headless/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default defineConfig((options: Options) => ({
index: "src/components/index.ts",
extensions: "src/extensions/index.ts",
plugins: "src/plugins/index.ts",
utils: "src/utils/index.ts",
},
banner: {
js: "'use client'",
Expand Down

0 comments on commit 33252ac

Please sign in to comment.