@domternal/pm 0.2.0 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +34 -46
  2. package/package.json +38 -14
package/README.md CHANGED
@@ -1,51 +1,39 @@
1
1
  # @domternal/pm
2
2
 
3
- Convenience re-exports of ProseMirror packages via subpath imports, so you can depend on a single package instead of twelve.
4
-
5
- Part of the [Domternal](https://github.com/domternal/domternal) toolkit. Full docs at [domternal.dev](https://domternal.dev).
6
-
7
- ## Installation
8
-
9
- ```bash
10
- npm install @domternal/pm
11
- ```
12
-
13
- ## Usage
14
-
15
- Import ProseMirror modules through subpath exports:
16
-
17
- ```ts
18
- import { EditorState, Plugin, PluginKey } from '@domternal/pm/state';
19
- import { EditorView } from '@domternal/pm/view';
20
- import { Schema, Node, Mark } from '@domternal/pm/model';
21
- import { ReplaceStep } from '@domternal/pm/transform';
22
- import { keymap } from '@domternal/pm/keymap';
23
- import { undo, redo, history } from '@domternal/pm/history';
24
- import { baseKeymap } from '@domternal/pm/commands';
25
- import { inputRules } from '@domternal/pm/inputrules';
26
- import { dropCursor } from '@domternal/pm/dropcursor';
27
- import { gapCursor } from '@domternal/pm/gapcursor';
28
- import { tableEditing, columnResizing } from '@domternal/pm/tables';
29
- import { wrapInList, liftListItem } from '@domternal/pm/schema-list';
30
- ```
31
-
32
- ### Available Subpath Exports
33
-
34
- | Import | Re-exports |
35
- |---|---|
36
- | `@domternal/pm/state` | `prosemirror-state` |
37
- | `@domternal/pm/view` | `prosemirror-view` |
38
- | `@domternal/pm/model` | `prosemirror-model` |
39
- | `@domternal/pm/transform` | `prosemirror-transform` |
40
- | `@domternal/pm/commands` | `prosemirror-commands` |
41
- | `@domternal/pm/keymap` | `prosemirror-keymap` |
42
- | `@domternal/pm/history` | `prosemirror-history` |
43
- | `@domternal/pm/inputrules` | `prosemirror-inputrules` |
44
- | `@domternal/pm/dropcursor` | `prosemirror-dropcursor` |
45
- | `@domternal/pm/gapcursor` | `prosemirror-gapcursor` |
46
- | `@domternal/pm/tables` | `prosemirror-tables` |
47
- | `@domternal/pm/schema-list` | `prosemirror-schema-list` |
3
+ [![Version](https://img.shields.io/npm/v/@domternal/pm.svg)](https://www.npmjs.com/package/@domternal/pm)
4
+ [![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/domternal/domternal/blob/main/LICENSE)
5
+
6
+ A lightweight, extensible rich text editor toolkit built on <u>[ProseMirror](https://prosemirror.net/)</u>. Framework-agnostic headless core with first-class Angular support.
7
+ Use it headless with vanilla JS/TS, add the built-in toolbar and theme, or drop in ready-made Angular components. Fully tree-shakeable, import only what you use, unused extensions are stripped from your bundle.
8
+
9
+ ## Links
10
+
11
+ <u>[Website](https://domternal.dev)</u> &nbsp;&nbsp;&nbsp;•&nbsp;&nbsp;&nbsp; <u>[Documentation](https://domternal.dev/v1/introduction)</u> &nbsp;&nbsp;&nbsp;•&nbsp;&nbsp;&nbsp; <u>[StackBlitz (Vanilla TS)](https://stackblitz.com/edit/domternal-vanilla-full-example)</u> &nbsp;&nbsp;&nbsp;•&nbsp;&nbsp;&nbsp; <u>[StackBlitz (Angular)](https://stackblitz.com/edit/domternal-angular-full-example)</u>
12
+
13
+ ## Features
14
+
15
+ See <u>[Packages & Bundle Size](https://domternal.dev/v1/packages)</u> for a full breakdown of all packages and what each one includes.
16
+
17
+ - **Headless core** - use with any framework or vanilla JS/TS
18
+ - **Angular components** - editor, toolbar, bubble menu, floating menu, emoji picker (signals, OnPush, zoneless-ready)
19
+ - **57 extensions across 10 packages** - 23 nodes, 9 marks, and 25 behavior extensions
20
+ - **140+ chainable commands** - `editor.chain().focus().toggleBold().run()`
21
+ - **Full table support** - cell merging, column resize, row/column controls, cell toolbar, all free and MIT licensed
22
+ - **Tree-shakeable** - import only what you use, your bundler strips the rest
23
+ - **~38 KB gzipped** (own code), <u>[~108 KB total](https://domternal.dev/v1/packages)</u> with ProseMirror
24
+ - **TypeScript first** - 100% typed, zero `any`
25
+ - **4,400+ tests** - 2,687 unit tests and 1,796 E2E tests across 37 Playwright specs
26
+ - **Light and dark theme** - 70+ CSS custom properties for full visual control
27
+ - **Inline styles export** - `getHTML({ styled: true })` produces inline CSS ready for email clients, CMS, and Google Docs
28
+ - **SSR helpers** - `generateHTML`, `generateJSON`, `generateText` for server-side rendering
29
+
30
+ ## Documentation
31
+
32
+ - <u>[Getting Started](https://domternal.dev/v1/getting-started)</u> - install and create your first editor
33
+ - <u>[Introduction](https://domternal.dev/v1/introduction)</u> - core concepts, architecture, and design decisions
34
+ - <u>[Packages & Bundle Size](https://domternal.dev/v1/packages)</u> - what each package includes and bundle size breakdown
35
+ - <u>[Blog](https://domternal.dev/blog)</u>
48
36
 
49
37
  ## License
50
38
 
51
- [MIT](https://github.com/domternal/domternal/blob/main/LICENSE)
39
+ <u>[MIT](https://github.com/domternal/domternal/blob/main/LICENSE)</u>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domternal/pm",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "ProseMirror package re-exports for Domternal",
5
5
  "author": "https://github.com/ThomasNowHere",
6
6
  "license": "MIT",
@@ -130,18 +130,42 @@
130
130
  },
131
131
  "typesVersions": {
132
132
  "*": {
133
- "commands": ["src/commands.d.ts"],
134
- "dropcursor": ["src/dropcursor.d.ts"],
135
- "gapcursor": ["src/gapcursor.d.ts"],
136
- "history": ["src/history.d.ts"],
137
- "inputrules": ["src/inputrules.d.ts"],
138
- "keymap": ["src/keymap.d.ts"],
139
- "model": ["src/model.d.ts"],
140
- "schema-list": ["src/schema-list.d.ts"],
141
- "state": ["src/state.d.ts"],
142
- "tables": ["src/tables.d.ts"],
143
- "transform": ["src/transform.d.ts"],
144
- "view": ["src/view.d.ts"]
133
+ "commands": [
134
+ "src/commands.d.ts"
135
+ ],
136
+ "dropcursor": [
137
+ "src/dropcursor.d.ts"
138
+ ],
139
+ "gapcursor": [
140
+ "src/gapcursor.d.ts"
141
+ ],
142
+ "history": [
143
+ "src/history.d.ts"
144
+ ],
145
+ "inputrules": [
146
+ "src/inputrules.d.ts"
147
+ ],
148
+ "keymap": [
149
+ "src/keymap.d.ts"
150
+ ],
151
+ "model": [
152
+ "src/model.d.ts"
153
+ ],
154
+ "schema-list": [
155
+ "src/schema-list.d.ts"
156
+ ],
157
+ "state": [
158
+ "src/state.d.ts"
159
+ ],
160
+ "tables": [
161
+ "src/tables.d.ts"
162
+ ],
163
+ "transform": [
164
+ "src/transform.d.ts"
165
+ ],
166
+ "view": [
167
+ "src/view.d.ts"
168
+ ]
145
169
  }
146
170
  },
147
171
  "files": [
@@ -174,4 +198,4 @@
174
198
  "url": "https://github.com/domternal/domternal/issues"
175
199
  },
176
200
  "homepage": "https://domternal.dev"
177
- }
201
+ }