@jvs-milkdown/crepe 1.2.14 → 1.2.16

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAU,SAAS,EAAiB,MAAM,+BAA+B,CAAA;AAchF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAUpD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC,WAAW,CAAC,KAAK,IAAI,CAAA;IAC3D,eAAe,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAClC,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAC/C,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC9B;AAED,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;AAEnE,eAAO,MAAM,kBAAkB,0FAG9B,CAAA;AAED,eAAO,MAAM,eAAe,gBAA0C,CAAA;AAiStE,eAAO,MAAM,kBAAkB,sC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AC,yBAAyB,CA6BjE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"outline-panel.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/outline-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAgBhD,eAAO,MAAM,YAAY;;cAEE,MAAM,GAAG;;;;;cAAT,MAAM,GAAG;;;+GA8clC,CAAA"}
1
+ {"version":3,"file":"outline-panel.d.ts","sourceRoot":"","sources":["../../../../src/feature/fixed-toolbar/outline-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAgBhD,eAAO,MAAM,YAAY;;cAEE,MAAM,GAAG;;;;;cAAT,MAAM,GAAG;;;+GA+clC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jvs-milkdown/crepe",
3
- "version": "1.2.14",
3
+ "version": "1.2.16",
4
4
  "keywords": [
5
5
  "crepe",
6
6
  "editor",
@@ -107,9 +107,9 @@
107
107
  "@codemirror/theme-one-dark": "^6.1.2",
108
108
  "@codemirror/view": "^6.26.0",
109
109
  "@floating-ui/dom": "^1.7.6",
110
- "@jvs-milkdown/kit": "^1.2.14",
111
- "@jvs-milkdown/prose": "^1.2.14",
112
- "@jvs-milkdown/utils": "^1.2.14",
110
+ "@jvs-milkdown/kit": "^1.2.16",
111
+ "@jvs-milkdown/prose": "^1.2.16",
112
+ "@jvs-milkdown/utils": "^1.2.16",
113
113
  "@types/lodash-es": "^4.17.12",
114
114
  "clsx": "^2.0.0",
115
115
  "codemirror": "^6.0.1",
@@ -22,6 +22,8 @@ import type { ToolbarItem } from '../toolbar/config'
22
22
 
23
23
  import { crepeFeatureConfig } from '../../core/slice'
24
24
  import { CrepeFeature } from '../index'
25
+ import { highlightMark } from '../toolbar/highlight-mark'
26
+ import { underline } from '../toolbar/underline'
25
27
  import { FixedToolbarComponent } from './component'
26
28
  import { buildDefaultFixedToolbar } from './config'
27
29
  import { DocumentHeader } from './document-header'
@@ -373,5 +375,7 @@ export const fixedToolbar: DefineFeature<FixedToolbarFeatureConfig> = (
373
375
  })
374
376
  .use(viewMenuStateCtx)
375
377
  .use(fixedToolbarConfig)
378
+ .use(underline as any)
379
+ .use(highlightMark as any)
376
380
  .use(fixedToolbarPlugin)
377
381
  }
@@ -263,7 +263,8 @@ export const OutlinePanel = defineComponent({
263
263
  width: `${state.outlineWidth}px`,
264
264
  minWidth: '200px',
265
265
  maxWidth: '400px',
266
- backgroundColor: 'var(--crepe-color-surface)',
266
+ backgroundColor:
267
+ state.documentBackground || 'var(--crepe-color-background)',
267
268
  borderRight: isLeft
268
269
  ? '1px solid var(--crepe-color-outline-variant, color-mix(in srgb, var(--crepe-color-outline), transparent 80%))'
269
270
  : 'none',
@@ -41,4 +41,126 @@
41
41
  }
42
42
  }
43
43
  }
44
+
45
+ /* Unordered List Nested Markers */
46
+ ul ul .milkdown-list-item-block li .label-wrapper .label.bullet svg circle {
47
+ fill: none;
48
+ stroke: currentColor;
49
+ stroke-width: 1.5px;
50
+ }
51
+
52
+ ul ul ul .milkdown-list-item-block li .label-wrapper .label.bullet {
53
+ display: flex;
54
+ justify-content: center;
55
+ align-items: center;
56
+ }
57
+ ul ul ul .milkdown-list-item-block li .label-wrapper .label.bullet svg {
58
+ display: none;
59
+ }
60
+ ul ul ul .milkdown-list-item-block li .label-wrapper .label.bullet::before {
61
+ content: '';
62
+ display: block;
63
+ width: 5px;
64
+ height: 5px;
65
+ background-color: currentColor;
66
+ }
67
+
68
+ ul ul ul ul .milkdown-list-item-block li .label-wrapper .label.bullet svg {
69
+ display: block;
70
+ }
71
+ ul
72
+ ul
73
+ ul
74
+ ul
75
+ .milkdown-list-item-block
76
+ li
77
+ .label-wrapper
78
+ .label.bullet
79
+ svg
80
+ circle {
81
+ fill: currentColor;
82
+ stroke: none;
83
+ }
84
+ ul
85
+ ul
86
+ ul
87
+ ul
88
+ .milkdown-list-item-block
89
+ li
90
+ .label-wrapper
91
+ .label.bullet::before {
92
+ content: none;
93
+ }
94
+
95
+ /* Ordered List Nested Counters */
96
+ ol {
97
+ counter-reset: crepe-ol-level;
98
+ }
99
+ ol ol {
100
+ counter-reset: crepe-ol-level-2;
101
+ }
102
+ ol ol ol {
103
+ counter-reset: crepe-ol-level-3;
104
+ }
105
+ ol ol ol ol {
106
+ counter-reset: crepe-ol-level-4;
107
+ }
108
+
109
+ ol > .milkdown-list-item-block {
110
+ counter-increment: crepe-ol-level;
111
+ }
112
+ ol ol > .milkdown-list-item-block {
113
+ counter-increment: crepe-ol-level-2;
114
+ }
115
+ ol ol ol > .milkdown-list-item-block {
116
+ counter-increment: crepe-ol-level-3;
117
+ }
118
+ ol ol ol ol > .milkdown-list-item-block {
119
+ counter-increment: crepe-ol-level-4;
120
+ }
121
+
122
+ ol > .milkdown-list-item-block li .label-wrapper .label.ordered {
123
+ font-size: 0 !important;
124
+ }
125
+ ol > .milkdown-list-item-block li .label-wrapper .label.ordered::before {
126
+ content: counter(crepe-ol-level, decimal) '.';
127
+ font-size: 13px !important;
128
+ }
129
+
130
+ ol ol > .milkdown-list-item-block li .label-wrapper .label.ordered {
131
+ font-size: 0 !important;
132
+ }
133
+ ol ol > .milkdown-list-item-block li .label-wrapper .label.ordered::before {
134
+ content: counter(crepe-ol-level-2, lower-latin) '.';
135
+ font-size: 13px !important;
136
+ }
137
+
138
+ ol ol ol > .milkdown-list-item-block li .label-wrapper .label.ordered {
139
+ font-size: 0 !important;
140
+ }
141
+ ol
142
+ ol
143
+ ol
144
+ > .milkdown-list-item-block
145
+ li
146
+ .label-wrapper
147
+ .label.ordered::before {
148
+ content: counter(crepe-ol-level-3, lower-roman) '.';
149
+ font-size: 13px !important;
150
+ }
151
+
152
+ ol ol ol ol > .milkdown-list-item-block li .label-wrapper .label.ordered {
153
+ font-size: 0 !important;
154
+ }
155
+ ol
156
+ ol
157
+ ol
158
+ ol
159
+ > .milkdown-list-item-block
160
+ li
161
+ .label-wrapper
162
+ .label.ordered::before {
163
+ content: counter(crepe-ol-level-4, decimal) '.';
164
+ font-size: 13px !important;
165
+ }
44
166
  }