@prosekit/basic 0.2.0 → 0.2.2

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.
@@ -18,9 +18,15 @@ import { UnwrapListOptions } from 'prosemirror-flat-list';
18
18
  */
19
19
  export declare type BasicExtension = ReturnType<typeof defineBasicExtension>;
20
20
 
21
- export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
21
+ export declare namespace default_alias {
22
+ let plugins: {
23
+ 'postcss-nesting': {};
24
+ };
25
+ }
26
+
27
+ export declare const default_alias_1: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
22
28
 
23
- export declare const default_alias_1: {
29
+ export declare const default_alias_2: {
24
30
  test: {
25
31
  environment: "jsdom";
26
32
  };
@@ -1,101 +1,127 @@
1
1
  /* src/typography.css */
2
2
  div.ProseMirror {
3
- & {
4
- display: flex;
5
- flex-direction: column;
6
- }
7
- & p:first-child,
8
- & h1:first-child,
9
- & h2:first-child,
10
- & h3:first-child,
11
- & h4:first-child,
12
- & h5:first-child,
13
- & h6:first-child {
14
- margin-top: 0;
15
- }
16
- & p:last-child,
17
- & h1:last-child,
18
- & h2:last-child,
19
- & h3:last-child,
20
- & h4:last-child,
21
- & h5:last-child,
22
- & h6:last-child {
23
- margin-bottom: 0;
24
- }
25
- & h1,
26
- & h2,
27
- & h3,
28
- & h4,
29
- & h5,
30
- & h6 {
31
- font-weight: 600;
32
- line-height: 1.25;
33
- padding-top: 0;
34
- padding-bottom: 0;
35
- border-style: none;
36
- }
37
- & a {
38
- text-decoration: underline;
39
- font-weight: 500;
40
- }
41
- & p,
42
- & ul,
43
- & ol,
44
- & pre {
45
- padding: 0.25rem;
46
- line-height: 1.5;
47
- }
48
- & blockquote {
49
- padding: 0.25rem;
50
- padding-left: 1em;
51
- font-style: italic;
52
- }
53
- & h1 {
54
- margin: 1rem 0;
55
- font-size: 2.25em;
56
- }
57
- & h2 {
58
- margin: 1.75em 0 0.5em;
59
- font-size: 1.75em;
60
- }
61
- & h3 {
62
- margin: 1.5em 0 0.5em;
63
- font-size: 1.375em;
64
- }
65
- & h4 {
66
- margin: 1em 0;
67
- font-size: 1.125em;
68
- }
69
- & img,
70
- & video {
71
- max-width: 100%;
72
- }
73
- & code {
74
- font-size: 0.875em;
75
- font-weight: 600;
76
- }
77
- & pre {
78
- margin: 0.5rem 0;
79
- padding: 2rem 2rem;
80
- overflow-x: auto;
81
- border-radius: 0.375rem;
82
- }
83
- & pre,
84
- & code {
85
- white-space: pre;
86
- word-spacing: normal;
87
- word-break: normal;
88
- word-wrap: normal;
89
- tab-size: 4;
90
- hyphens: none;
91
- }
92
- & pre code {
93
- font-weight: inherit;
94
- }
95
- & hr {
96
- margin: 2em 0;
97
- }
98
- & .prosemirror-flat-list {
99
- line-height: 1.5;
100
- }
3
+ display: flex;
4
+ flex-direction: column;
5
+ }
6
+ div.ProseMirror p:first-child,
7
+ div.ProseMirror h1:first-child,
8
+ div.ProseMirror h2:first-child,
9
+ div.ProseMirror h3:first-child,
10
+ div.ProseMirror h4:first-child,
11
+ div.ProseMirror h5:first-child,
12
+ div.ProseMirror h6:first-child {
13
+ margin-top: 0;
14
+ }
15
+ div.ProseMirror p:last-child,
16
+ div.ProseMirror h1:last-child,
17
+ div.ProseMirror h2:last-child,
18
+ div.ProseMirror h3:last-child,
19
+ div.ProseMirror h4:last-child,
20
+ div.ProseMirror h5:last-child,
21
+ div.ProseMirror h6:last-child {
22
+ margin-bottom: 0;
23
+ }
24
+ div.ProseMirror h1,
25
+ div.ProseMirror h2,
26
+ div.ProseMirror h3,
27
+ div.ProseMirror h4,
28
+ div.ProseMirror h5,
29
+ div.ProseMirror h6 {
30
+ font-weight: 600;
31
+ line-height: 1.25;
32
+ padding-top: 0;
33
+ padding-bottom: 0;
34
+ border-style: none;
35
+ }
36
+ div.ProseMirror a {
37
+ text-decoration: underline;
38
+ font-weight: 500;
39
+ }
40
+ div.ProseMirror p,
41
+ div.ProseMirror ul,
42
+ div.ProseMirror ol,
43
+ div.ProseMirror pre {
44
+ padding: 0.5rem 0;
45
+ line-height: 1.5;
46
+ }
47
+ div.ProseMirror blockquote {
48
+ padding: 0.25rem;
49
+ padding-left: 1em;
50
+ font-style: italic;
51
+ }
52
+ div.ProseMirror h1 {
53
+ margin: 1rem 0;
54
+ font-size: 2.25em;
55
+ }
56
+ div.ProseMirror h2 {
57
+ margin: 1.75em 0 0.5em;
58
+ font-size: 1.75em;
59
+ }
60
+ div.ProseMirror h3 {
61
+ margin: 1.5em 0 0.5em;
62
+ font-size: 1.375em;
63
+ }
64
+ div.ProseMirror h4 {
65
+ margin: 1em 0;
66
+ font-size: 1.125em;
67
+ }
68
+ div.ProseMirror img,
69
+ div.ProseMirror video {
70
+ max-width: 100%;
71
+ }
72
+ div.ProseMirror code {
73
+ font-size: 0.875em;
74
+ font-weight: 600;
75
+ }
76
+ div.ProseMirror pre {
77
+ margin: 0.5rem 0;
78
+ padding: 2rem 2rem;
79
+ overflow-x: auto;
80
+ border-radius: 0.375rem;
81
+ }
82
+ div.ProseMirror pre,
83
+ div.ProseMirror code {
84
+ white-space: pre;
85
+ word-spacing: normal;
86
+ word-break: normal;
87
+ word-wrap: normal;
88
+ tab-size: 4;
89
+ hyphens: none;
90
+ }
91
+ div.ProseMirror pre code {
92
+ font-weight: inherit;
93
+ }
94
+ div.ProseMirror hr {
95
+ margin: 2em 0;
96
+ }
97
+ div.ProseMirror .prosemirror-flat-list {
98
+ line-height: 1.5;
99
+ }
100
+ div.ProseMirror .prosemirror-flat-list::before,
101
+ div.ProseMirror .prosemirror-flat-list > .list-marker {
102
+ top: 0.5rem;
103
+ }
104
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h1)::before,
105
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h1) > .list-marker {
106
+ top: 1em;
107
+ }
108
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h2)::before,
109
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h2) > .list-marker {
110
+ top: 0.6em;
111
+ }
112
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h3)::before,
113
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h3) > .list-marker {
114
+ top: 0.25em;
115
+ }
116
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h4)::before,
117
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h4) > .list-marker {
118
+ top: 0;
119
+ }
120
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h5)::before,
121
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h5) > .list-marker {
122
+ top: -0.1em;
123
+ }
124
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h6)::before,
125
+ div.ProseMirror .prosemirror-flat-list:has(> div.list-content > h6) > .list-marker {
126
+ top: -0.1em;
101
127
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prosekit/basic",
3
3
  "type": "module",
4
- "version": "0.2.0",
4
+ "version": "0.2.2",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "ocavue",
@@ -48,6 +48,7 @@
48
48
  "devDependencies": {
49
49
  "@prosekit/dev": "*",
50
50
  "postcss": "^8.4.32",
51
+ "postcss-nesting": "^12.0.2",
51
52
  "tsup": "^8.0.1",
52
53
  "typescript": "^5.3.3",
53
54
  "vitest": "^1.1.0"