@milkdown/crepe 7.14.0 → 7.15.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 (52) hide show
  1. package/lib/cjs/builder.js +5 -1
  2. package/lib/cjs/builder.js.map +1 -1
  3. package/lib/cjs/feature/block-edit/index.js.map +1 -1
  4. package/lib/cjs/feature/code-mirror/index.js +18 -0
  5. package/lib/cjs/feature/code-mirror/index.js.map +1 -1
  6. package/lib/cjs/feature/cursor/index.js.map +1 -1
  7. package/lib/cjs/feature/image-block/index.js.map +1 -1
  8. package/lib/cjs/feature/latex/index.js.map +1 -1
  9. package/lib/cjs/feature/link-tooltip/index.js.map +1 -1
  10. package/lib/cjs/feature/list-item/index.js.map +1 -1
  11. package/lib/cjs/feature/placeholder/index.js +5 -0
  12. package/lib/cjs/feature/placeholder/index.js.map +1 -1
  13. package/lib/cjs/feature/table/index.js.map +1 -1
  14. package/lib/cjs/feature/toolbar/index.js.map +1 -1
  15. package/lib/cjs/index.js +12 -2
  16. package/lib/cjs/index.js.map +1 -1
  17. package/lib/esm/builder.js +5 -1
  18. package/lib/esm/builder.js.map +1 -1
  19. package/lib/esm/feature/block-edit/index.js.map +1 -1
  20. package/lib/esm/feature/code-mirror/index.js +18 -0
  21. package/lib/esm/feature/code-mirror/index.js.map +1 -1
  22. package/lib/esm/feature/cursor/index.js.map +1 -1
  23. package/lib/esm/feature/image-block/index.js.map +1 -1
  24. package/lib/esm/feature/latex/index.js.map +1 -1
  25. package/lib/esm/feature/link-tooltip/index.js.map +1 -1
  26. package/lib/esm/feature/list-item/index.js.map +1 -1
  27. package/lib/esm/feature/placeholder/index.js +5 -0
  28. package/lib/esm/feature/placeholder/index.js.map +1 -1
  29. package/lib/esm/feature/table/index.js.map +1 -1
  30. package/lib/esm/feature/toolbar/index.js.map +1 -1
  31. package/lib/esm/index.js +12 -2
  32. package/lib/esm/index.js.map +1 -1
  33. package/lib/theme/common/code-mirror.css +35 -20
  34. package/lib/tsconfig.tsbuildinfo +1 -1
  35. package/lib/types/core/builder.d.ts +2 -1
  36. package/lib/types/core/builder.d.ts.map +1 -1
  37. package/lib/types/core/crepe.d.ts +1 -1
  38. package/lib/types/core/crepe.d.ts.map +1 -1
  39. package/lib/types/feature/code-mirror/index.d.ts +3 -0
  40. package/lib/types/feature/code-mirror/index.d.ts.map +1 -1
  41. package/lib/types/feature/latex/block-latex.d.ts +1 -1
  42. package/lib/types/feature/latex/block-latex.d.ts.map +1 -1
  43. package/lib/types/feature/placeholder/index.d.ts.map +1 -1
  44. package/lib/types/feature/placeholder/placeholder.spec.d.ts +2 -0
  45. package/lib/types/feature/placeholder/placeholder.spec.d.ts.map +1 -0
  46. package/package.json +2 -2
  47. package/src/core/builder.ts +6 -1
  48. package/src/core/crepe.ts +1 -1
  49. package/src/feature/code-mirror/index.ts +7 -0
  50. package/src/feature/placeholder/index.ts +4 -1
  51. package/src/feature/placeholder/placeholder.spec.ts +34 -0
  52. package/src/theme/common/code-mirror.css +35 -20
@@ -110,28 +110,43 @@
110
110
  caret-color: var(--crepe-color-outline);
111
111
  }
112
112
 
113
- .milkdown .milkdown-code-block .tools .preview-toggle-button {
114
- background: var(--crepe-color-secondary);
115
- color: var(--crepe-color-on-surface-variant);
116
- padding: 4px 10px;
117
- opacity: 0;
118
- cursor: pointer;
119
- border-radius: 100px;
120
- font-size: 12px;
121
- line-height: 16px;
122
- font-weight: 600;
123
- font-family: var(--crepe-font-default);
124
- transition: opacity 0.2s ease-in-out;
113
+ .milkdown .milkdown-code-block .tools .tools-button-group {
125
114
  display: flex;
126
- align-items: center;
127
- justify-content: center;
128
- gap: 4px;
115
+ gap: 2px;
129
116
  }
130
117
 
131
- .milkdown .milkdown-code-block .tools .preview-toggle-button svg {
132
- width: 14px;
133
- height: 14px;
134
- fill: var(--crepe-color-on-surface-variant);
118
+ .milkdown .milkdown-code-block .tools .tools-button-group button {
119
+ background: var(--crepe-color-secondary);
120
+ color: var(--crepe-color-on-surface-variant);
121
+ padding: 4px 10px;
122
+ opacity: 0;
123
+ cursor: pointer;
124
+ border-radius: 4px;
125
+ font-size: 12px;
126
+ line-height: 16px;
127
+ font-weight: 600;
128
+ font-family: var(--crepe-font-default);
129
+ transition: opacity 0.2s ease-in-out;
130
+ display: flex;
131
+ align-items: center;
132
+ justify-content: center;
133
+ gap: 4px;
134
+ }
135
+
136
+ .milkdown .milkdown-code-block .tools .tools-button-group button svg {
137
+ width: 14px;
138
+ height: 14px;
139
+ fill: var(--crepe-color-on-surface-variant);
140
+ }
141
+
142
+ .milkdown .milkdown-code-block .tools .tools-button-group button:first-child {
143
+ border-top-left-radius: 100px;
144
+ border-bottom-left-radius: 100px;
145
+ }
146
+
147
+ .milkdown .milkdown-code-block .tools .tools-button-group button:last-child {
148
+ border-top-right-radius: 100px;
149
+ border-bottom-right-radius: 100px;
135
150
  }
136
151
 
137
152
  .milkdown .milkdown-code-block .tools .language-button {
@@ -184,7 +199,7 @@
184
199
  opacity: 1;
185
200
  }
186
201
 
187
- .milkdown .milkdown-code-block:hover .preview-toggle-button {
202
+ .milkdown .milkdown-code-block:hover .tools-button-group > button {
188
203
  opacity: 1;
189
204
  }
190
205