@domternal/pm 0.2.0 → 0.2.1

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 +30 -45
  2. package/package.json +38 -14
package/README.md CHANGED
@@ -1,50 +1,35 @@
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 [ProseMirror](https://prosemirror.net/). Framework-agnostic headless core with first-class **Angular** support. 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.
7
+
8
+ **[Website](https://domternal.dev)** · **[Documentation](https://domternal.dev/v1/introduction)** · **[StackBlitz (Vanilla TS)](https://stackblitz.com/edit/domternal-vanilla-full-example)** · **[StackBlitz (Angular)](https://stackblitz.com/edit/domternal-angular-full-example)**
9
+
10
+ ## Features
11
+
12
+ See [Packages & Bundle Size](https://domternal.dev/v1/packages) for a full breakdown of all packages and what each one includes.
13
+
14
+ - **Headless core** - use with any framework or vanilla JS/TS
15
+ - **Angular components** - editor, toolbar, bubble menu, floating menu, emoji picker (signals, OnPush, zoneless-ready)
16
+ - **57 extensions across 10 packages** - 23 nodes, 9 marks, and 25 behavior extensions
17
+ - **140+ chainable commands** - `editor.chain().focus().toggleBold().run()`
18
+ - **Full table support** - cell merging, column resize, row/column controls, cell toolbar, all free and MIT licensed
19
+ - **Tree-shakeable** - import only what you use, your bundler strips the rest
20
+ - **~38 KB gzipped** (own code), [~108 KB total](https://domternal.dev/v1/packages) with ProseMirror
21
+ - **TypeScript first** - 100% typed, zero `any`
22
+ - **4,200+ tests** - 2,675 unit tests and 1,550 E2E tests across 34 Playwright specs
23
+ - **Light and dark theme** - 70+ CSS custom properties for full visual control
24
+ - **Inline styles export** - `getHTML({ styled: true })` produces inline CSS ready for email clients, CMS, and Google Docs
25
+ - **SSR helpers** - `generateHTML`, `generateJSON`, `generateText` for server-side rendering
26
+
27
+ ## Documentation
28
+
29
+ - [Getting Started](https://domternal.dev/v1/getting-started) - install and create your first editor
30
+ - [Introduction](https://domternal.dev/v1/introduction) - core concepts, architecture, and design decisions
31
+ - [Packages & Bundle Size](https://domternal.dev/v1/packages) - what each package includes and bundle size breakdown
32
+ - [Blog](https://domternal.dev/blog)
48
33
 
49
34
  ## License
50
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domternal/pm",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
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
+ }