neuphlo-editor 0.3.0 → 0.3.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.
package/README.md CHANGED
@@ -39,7 +39,8 @@ import Placeholder from "@tiptap/extension-placeholder"
39
39
  - Import our minimal stylesheet in your app to activate defaults: `import 'neuphlo-editor/styles.css'` (or `@import 'neuphlo-editor/styles.css';`).
40
40
  - Next.js App Router: `app/layout.tsx` or `app/globals.css`
41
41
  - Vite/CRA: `src/main.tsx`/`src/index.tsx`
42
- - The base CSS does not add a border or background; add your own if desired.
42
+ - The base CSS does not add a border, background, padding, or min-height; add your own if desired.
43
+ - Top/bottom gaps are trimmed: the first and last child inside the editor have their margins collapsed to 0 so the container itself introduces no spacing. You fully control outer spacing.
43
44
 
44
45
  - Opt out per instance:
45
46
 
package/dist/styles.css CHANGED
@@ -3,10 +3,20 @@
3
3
  --nph-text-muted: #6b7280;
4
4
  --nph-accent: #2563eb;
5
5
 
6
- min-height: 160px;
6
+ /*
7
+ Keep the component neutral by default. Consumers control spacing.
8
+ Ensure the container and ProseMirror root introduce no implicit
9
+ padding or margins.
10
+ */
7
11
  color: var(--nph-text);
8
12
  }
9
13
 
14
+ /* Remove any implicit padding/margins on the ProseMirror root */
15
+ .nph-editor .ProseMirror {
16
+ margin: 0;
17
+ padding: 0;
18
+ }
19
+
10
20
  @media (prefers-color-scheme: dark) {
11
21
  .nph-editor {
12
22
  --nph-text: #fafafa;
@@ -16,6 +26,15 @@
16
26
  }
17
27
 
18
28
  /* Typography */
29
+ .nph-editor .ProseMirror > :first-child {
30
+ /* Avoid top gap so users control outer spacing */
31
+ margin-top: 0 !important;
32
+ }
33
+ .nph-editor .ProseMirror > :last-child {
34
+ /* Avoid bottom gap so users control outer spacing */
35
+ margin-bottom: 0 !important;
36
+ }
37
+
19
38
  .nph-editor p {
20
39
  margin: 0.75em 0;
21
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neuphlo-editor",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",