Skip to content

Commit

Permalink
feat: add package exports
Browse files Browse the repository at this point in the history
  • Loading branch information
d3m1d0v committed Dec 19, 2023
1 parent fdfc206 commit 9a32737
Show file tree
Hide file tree
Showing 13 changed files with 58 additions and 1 deletion.
31 changes: 31 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,40 @@
"type": "git",
"url": "https://github.com/yandex-cloud/yfm-editor"
},
"exports": {
".": {
"types": "./build/esm/index.d.ts",
"require": "./build/cjs/index.js",
"import": "./build/esm/index.js"
},
"./specs": {
"types": "./build/esm/extensions/specs.d.ts",
"require": "./build/cjs/extensions/specs.js",
"import": "./build/esm/extensions/specs.js"
},
"./pm/*": {
"types": "./build/esm/pm/*",
"require": "./build/cjs/pm/*",
"import": "./build/esm/pm/*"
},
"./styles/*": "./build/esm/styles/*"
},
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/esm/index.d.ts",
"typesVersions": {
"*": {
"index.d.ts": [
"./build/esm/index.d.ts"
],
"specs": [
"./build/esm/extensions/specs.d.ts"
],
"pm/*": [
"./build/esm/pm/*"
]
}
},
"files": [
"build"
],
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/behavior/ReactRenderer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
RenderStorageItemEventMap,
} from './types';

export type {RendererItem} from './types';
export type {RendererItem, RenderStorage} from './types';
export {Renderer as ReactRendererComponent} from './react';
export type {RendererProps as ReactRendererComponentProps} from './react';

Expand Down
1 change: 1 addition & 0 deletions src/pm/commands.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from 'prosemirror-commands';
1 change: 1 addition & 0 deletions src/pm/history.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from 'prosemirror-history';
1 change: 1 addition & 0 deletions src/pm/inputrules.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from 'prosemirror-inputrules';
1 change: 1 addition & 0 deletions src/pm/keymap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from 'prosemirror-keymap';
1 change: 1 addition & 0 deletions src/pm/model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from 'prosemirror-model';
16 changes: 16 additions & 0 deletions src/pm/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## PM submodule

### Re-exports prosemirror core modules:

- [prosemirror-commands](https://github.com/ProseMirror/prosemirror-commands)
- [prosemirror-history](https://github.com/ProseMirror/prosemirror-history)
- [prosemirror-inputrules](https://github.com/ProseMirror/prosemirror-inputrules)
- [prosemirror-keymap](https://github.com/ProseMirror/prosemirror-keymap)
- [prosemirror-model](https://github.com/ProseMirror/prosemirror-model)
- [prosemirror-state](https://github.com/ProseMirror/prosemirror-state)
- [prosemirror-transform](https://github.com/ProseMirror/prosemirror-transform)
- [prosemirror-view](https://github.com/ProseMirror/prosemirror-view)

### Also some other modules:

- [prosemirror-utils](https://github.com/atlassian/prosemirror-utils)
1 change: 1 addition & 0 deletions src/pm/state.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from 'prosemirror-state';
1 change: 1 addition & 0 deletions src/pm/transform.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from 'prosemirror-transform';
1 change: 1 addition & 0 deletions src/pm/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from 'prosemirror-utils';
1 change: 1 addition & 0 deletions src/pm/view.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from 'prosemirror-view';
1 change: 1 addition & 0 deletions src/styles/markdown.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@use '../extensions/yfm/Color/colors';

0 comments on commit 9a32737

Please sign in to comment.