@jvs-milkdown/crepe 1.2.2 → 1.2.3

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 (240) hide show
  1. package/lib/tsconfig.tsbuildinfo +1 -1
  2. package/lib/types/builder.d.ts +2 -0
  3. package/lib/types/builder.d.ts.map +1 -0
  4. package/lib/types/core/builder.d.ts +28 -0
  5. package/lib/types/core/builder.d.ts.map +1 -0
  6. package/lib/types/core/crepe.d.ts +12 -0
  7. package/lib/types/core/crepe.d.ts.map +1 -0
  8. package/lib/types/core/index.d.ts +5 -0
  9. package/lib/types/core/index.d.ts.map +1 -0
  10. package/lib/types/core/locale.d.ts +288 -0
  11. package/lib/types/core/locale.d.ts.map +1 -0
  12. package/lib/types/core/slice.d.ts +10 -0
  13. package/lib/types/core/slice.d.ts.map +1 -0
  14. package/lib/types/default-config/default-config.spec.d.ts +2 -0
  15. package/lib/types/default-config/default-config.spec.d.ts.map +1 -0
  16. package/lib/types/default-config/index.d.ts +4 -0
  17. package/lib/types/default-config/index.d.ts.map +1 -0
  18. package/lib/types/feature/attachment/config.d.ts +12 -0
  19. package/lib/types/feature/attachment/config.d.ts.map +1 -0
  20. package/lib/types/feature/attachment/index.d.ts +4 -0
  21. package/lib/types/feature/attachment/index.d.ts.map +1 -0
  22. package/lib/types/feature/attachment/schema.d.ts +3 -0
  23. package/lib/types/feature/attachment/schema.d.ts.map +1 -0
  24. package/lib/types/feature/attachment/view/components/attachment-block.d.ts +19 -0
  25. package/lib/types/feature/attachment/view/components/attachment-block.d.ts.map +1 -0
  26. package/lib/types/feature/attachment/view/index.d.ts +3 -0
  27. package/lib/types/feature/attachment/view/index.d.ts.map +1 -0
  28. package/lib/types/feature/block-edit/handle/component.d.ts +2 -0
  29. package/lib/types/feature/block-edit/handle/component.d.ts.map +1 -0
  30. package/lib/types/feature/block-edit/handle/index.d.ts +4 -0
  31. package/lib/types/feature/block-edit/handle/index.d.ts.map +1 -0
  32. package/lib/types/feature/block-edit/index.d.ts +95 -0
  33. package/lib/types/feature/block-edit/index.d.ts.map +1 -0
  34. package/lib/types/feature/block-edit/menu/api.d.ts +12 -0
  35. package/lib/types/feature/block-edit/menu/api.d.ts.map +1 -0
  36. package/lib/types/feature/block-edit/menu/component.d.ts +2 -0
  37. package/lib/types/feature/block-edit/menu/component.d.ts.map +1 -0
  38. package/lib/types/feature/block-edit/menu/config.d.ts +9 -0
  39. package/lib/types/feature/block-edit/menu/config.d.ts.map +1 -0
  40. package/lib/types/feature/block-edit/menu/index.d.ts +7 -0
  41. package/lib/types/feature/block-edit/menu/index.d.ts.map +1 -0
  42. package/lib/types/feature/block-edit/menu/utils.d.ts +6 -0
  43. package/lib/types/feature/block-edit/menu/utils.d.ts.map +1 -0
  44. package/lib/types/feature/code-mirror/index.d.ts +12 -0
  45. package/lib/types/feature/code-mirror/index.d.ts.map +1 -0
  46. package/lib/types/feature/cursor/index.d.ts +10 -0
  47. package/lib/types/feature/cursor/index.d.ts.map +1 -0
  48. package/lib/types/feature/fixed-toolbar/component.d.ts +2 -0
  49. package/lib/types/feature/fixed-toolbar/component.d.ts.map +1 -0
  50. package/lib/types/feature/fixed-toolbar/config.d.ts +6 -0
  51. package/lib/types/feature/fixed-toolbar/config.d.ts.map +1 -0
  52. package/lib/types/feature/fixed-toolbar/cover-defaults.d.ts +3 -0
  53. package/lib/types/feature/fixed-toolbar/cover-defaults.d.ts.map +1 -0
  54. package/lib/types/feature/fixed-toolbar/document-header.d.ts +2 -0
  55. package/lib/types/feature/fixed-toolbar/document-header.d.ts.map +1 -0
  56. package/lib/types/feature/fixed-toolbar/index.d.ts +25 -0
  57. package/lib/types/feature/fixed-toolbar/index.d.ts.map +1 -0
  58. package/lib/types/feature/fixed-toolbar/menu-bar.d.ts +2 -0
  59. package/lib/types/feature/fixed-toolbar/menu-bar.d.ts.map +1 -0
  60. package/lib/types/feature/fixed-toolbar/outline-panel.d.ts +2 -0
  61. package/lib/types/feature/fixed-toolbar/outline-panel.d.ts.map +1 -0
  62. package/lib/types/feature/fixed-toolbar/shortcut-help-modal.d.ts +2 -0
  63. package/lib/types/feature/fixed-toolbar/shortcut-help-modal.d.ts.map +1 -0
  64. package/lib/types/feature/fixed-toolbar/view-menu-state.d.ts +16 -0
  65. package/lib/types/feature/fixed-toolbar/view-menu-state.d.ts.map +1 -0
  66. package/lib/types/feature/image-block/index.d.ts +26 -0
  67. package/lib/types/feature/image-block/index.d.ts.map +1 -0
  68. package/lib/types/feature/index.d.ts +42 -0
  69. package/lib/types/feature/index.d.ts.map +1 -0
  70. package/lib/types/feature/latex/block-latex.d.ts +2 -0
  71. package/lib/types/feature/latex/block-latex.d.ts.map +1 -0
  72. package/lib/types/feature/latex/command.d.ts +2 -0
  73. package/lib/types/feature/latex/command.d.ts.map +1 -0
  74. package/lib/types/feature/latex/index.d.ts +9 -0
  75. package/lib/types/feature/latex/index.d.ts.map +1 -0
  76. package/lib/types/feature/latex/inline-latex.d.ts +3 -0
  77. package/lib/types/feature/latex/inline-latex.d.ts.map +1 -0
  78. package/lib/types/feature/latex/inline-tooltip/component.d.ts +2 -0
  79. package/lib/types/feature/latex/inline-tooltip/component.d.ts.map +1 -0
  80. package/lib/types/feature/latex/inline-tooltip/tooltip.d.ts +2 -0
  81. package/lib/types/feature/latex/inline-tooltip/tooltip.d.ts.map +1 -0
  82. package/lib/types/feature/latex/inline-tooltip/view.d.ts +13 -0
  83. package/lib/types/feature/latex/inline-tooltip/view.d.ts.map +1 -0
  84. package/lib/types/feature/latex/input-rule.d.ts +3 -0
  85. package/lib/types/feature/latex/input-rule.d.ts.map +1 -0
  86. package/lib/types/feature/latex/remark.d.ts +3 -0
  87. package/lib/types/feature/latex/remark.d.ts.map +1 -0
  88. package/lib/types/feature/link-tooltip/index.d.ts +13 -0
  89. package/lib/types/feature/link-tooltip/index.d.ts.map +1 -0
  90. package/lib/types/feature/list-item/index.d.ts +9 -0
  91. package/lib/types/feature/list-item/index.d.ts.map +1 -0
  92. package/lib/types/feature/loader.d.ts +4 -0
  93. package/lib/types/feature/loader.d.ts.map +1 -0
  94. package/lib/types/feature/placeholder/index.d.ts +11 -0
  95. package/lib/types/feature/placeholder/index.d.ts.map +1 -0
  96. package/lib/types/feature/placeholder/placeholder.spec.d.ts +2 -0
  97. package/lib/types/feature/placeholder/placeholder.spec.d.ts.map +1 -0
  98. package/lib/types/feature/shared.d.ts +3 -0
  99. package/lib/types/feature/shared.d.ts.map +1 -0
  100. package/lib/types/feature/table/index.d.ts +18 -0
  101. package/lib/types/feature/table/index.d.ts.map +1 -0
  102. package/lib/types/feature/table/test.d.ts +3 -0
  103. package/lib/types/feature/table/test.d.ts.map +1 -0
  104. package/lib/types/feature/toolbar/color.d.ts +9 -0
  105. package/lib/types/feature/toolbar/color.d.ts.map +1 -0
  106. package/lib/types/feature/toolbar/component.d.ts +2 -0
  107. package/lib/types/feature/toolbar/component.d.ts.map +1 -0
  108. package/lib/types/feature/toolbar/config.d.ts +17 -0
  109. package/lib/types/feature/toolbar/config.d.ts.map +1 -0
  110. package/lib/types/feature/toolbar/font.d.ts +17 -0
  111. package/lib/types/feature/toolbar/font.d.ts.map +1 -0
  112. package/lib/types/feature/toolbar/highlight-mark.d.ts +8 -0
  113. package/lib/types/feature/toolbar/highlight-mark.d.ts.map +1 -0
  114. package/lib/types/feature/toolbar/index.d.ts +24 -0
  115. package/lib/types/feature/toolbar/index.d.ts.map +1 -0
  116. package/lib/types/feature/toolbar/underline.d.ts +7 -0
  117. package/lib/types/feature/toolbar/underline.d.ts.map +1 -0
  118. package/lib/types/icons/align-center.d.ts +3 -0
  119. package/lib/types/icons/align-center.d.ts.map +1 -0
  120. package/lib/types/icons/align-left.d.ts +3 -0
  121. package/lib/types/icons/align-left.d.ts.map +1 -0
  122. package/lib/types/icons/align-right.d.ts +3 -0
  123. package/lib/types/icons/align-right.d.ts.map +1 -0
  124. package/lib/types/icons/bold.d.ts +3 -0
  125. package/lib/types/icons/bold.d.ts.map +1 -0
  126. package/lib/types/icons/border.d.ts +2 -0
  127. package/lib/types/icons/border.d.ts.map +1 -0
  128. package/lib/types/icons/bullet-list.d.ts +3 -0
  129. package/lib/types/icons/bullet-list.d.ts.map +1 -0
  130. package/lib/types/icons/bullet.d.ts +2 -0
  131. package/lib/types/icons/bullet.d.ts.map +1 -0
  132. package/lib/types/icons/caption.d.ts +2 -0
  133. package/lib/types/icons/caption.d.ts.map +1 -0
  134. package/lib/types/icons/check-box-checked.d.ts +2 -0
  135. package/lib/types/icons/check-box-checked.d.ts.map +1 -0
  136. package/lib/types/icons/check-box-unchecked.d.ts +2 -0
  137. package/lib/types/icons/check-box-unchecked.d.ts.map +1 -0
  138. package/lib/types/icons/chevron-down.d.ts +2 -0
  139. package/lib/types/icons/chevron-down.d.ts.map +1 -0
  140. package/lib/types/icons/clear.d.ts +2 -0
  141. package/lib/types/icons/clear.d.ts.map +1 -0
  142. package/lib/types/icons/close.d.ts +2 -0
  143. package/lib/types/icons/close.d.ts.map +1 -0
  144. package/lib/types/icons/code.d.ts +2 -0
  145. package/lib/types/icons/code.d.ts.map +1 -0
  146. package/lib/types/icons/confirm.d.ts +2 -0
  147. package/lib/types/icons/confirm.d.ts.map +1 -0
  148. package/lib/types/icons/copy.d.ts +2 -0
  149. package/lib/types/icons/copy.d.ts.map +1 -0
  150. package/lib/types/icons/crop.d.ts +2 -0
  151. package/lib/types/icons/crop.d.ts.map +1 -0
  152. package/lib/types/icons/divider.d.ts +3 -0
  153. package/lib/types/icons/divider.d.ts.map +1 -0
  154. package/lib/types/icons/drag-handle.d.ts +2 -0
  155. package/lib/types/icons/drag-handle.d.ts.map +1 -0
  156. package/lib/types/icons/edit.d.ts +2 -0
  157. package/lib/types/icons/edit.d.ts.map +1 -0
  158. package/lib/types/icons/file-link.d.ts +2 -0
  159. package/lib/types/icons/file-link.d.ts.map +1 -0
  160. package/lib/types/icons/font-color.d.ts +2 -0
  161. package/lib/types/icons/font-color.d.ts.map +1 -0
  162. package/lib/types/icons/functions.d.ts +2 -0
  163. package/lib/types/icons/functions.d.ts.map +1 -0
  164. package/lib/types/icons/h1.d.ts +3 -0
  165. package/lib/types/icons/h1.d.ts.map +1 -0
  166. package/lib/types/icons/h2.d.ts +3 -0
  167. package/lib/types/icons/h2.d.ts.map +1 -0
  168. package/lib/types/icons/h3.d.ts +3 -0
  169. package/lib/types/icons/h3.d.ts.map +1 -0
  170. package/lib/types/icons/h4.d.ts +3 -0
  171. package/lib/types/icons/h4.d.ts.map +1 -0
  172. package/lib/types/icons/h5.d.ts +3 -0
  173. package/lib/types/icons/h5.d.ts.map +1 -0
  174. package/lib/types/icons/h6.d.ts +3 -0
  175. package/lib/types/icons/h6.d.ts.map +1 -0
  176. package/lib/types/icons/help.d.ts +2 -0
  177. package/lib/types/icons/help.d.ts.map +1 -0
  178. package/lib/types/icons/high-line-code.d.ts +2 -0
  179. package/lib/types/icons/high-line-code.d.ts.map +1 -0
  180. package/lib/types/icons/image.d.ts +2 -0
  181. package/lib/types/icons/image.d.ts.map +1 -0
  182. package/lib/types/icons/indent-decrease.d.ts +2 -0
  183. package/lib/types/icons/indent-decrease.d.ts.map +1 -0
  184. package/lib/types/icons/indent-increase.d.ts +2 -0
  185. package/lib/types/icons/indent-increase.d.ts.map +1 -0
  186. package/lib/types/icons/index.d.ts +55 -0
  187. package/lib/types/icons/index.d.ts.map +1 -0
  188. package/lib/types/icons/italic.d.ts +3 -0
  189. package/lib/types/icons/italic.d.ts.map +1 -0
  190. package/lib/types/icons/keyboard.d.ts +2 -0
  191. package/lib/types/icons/keyboard.d.ts.map +1 -0
  192. package/lib/types/icons/line-code.d.ts +2 -0
  193. package/lib/types/icons/line-code.d.ts.map +1 -0
  194. package/lib/types/icons/link.d.ts +2 -0
  195. package/lib/types/icons/link.d.ts.map +1 -0
  196. package/lib/types/icons/menu.d.ts +2 -0
  197. package/lib/types/icons/menu.d.ts.map +1 -0
  198. package/lib/types/icons/merge-cell.d.ts +2 -0
  199. package/lib/types/icons/merge-cell.d.ts.map +1 -0
  200. package/lib/types/icons/more.d.ts +2 -0
  201. package/lib/types/icons/more.d.ts.map +1 -0
  202. package/lib/types/icons/ordered-list.d.ts +3 -0
  203. package/lib/types/icons/ordered-list.d.ts.map +1 -0
  204. package/lib/types/icons/plus.d.ts +2 -0
  205. package/lib/types/icons/plus.d.ts.map +1 -0
  206. package/lib/types/icons/quote.d.ts +3 -0
  207. package/lib/types/icons/quote.d.ts.map +1 -0
  208. package/lib/types/icons/remove.d.ts +2 -0
  209. package/lib/types/icons/remove.d.ts.map +1 -0
  210. package/lib/types/icons/search.d.ts +2 -0
  211. package/lib/types/icons/search.d.ts.map +1 -0
  212. package/lib/types/icons/split-cell.d.ts +2 -0
  213. package/lib/types/icons/split-cell.d.ts.map +1 -0
  214. package/lib/types/icons/strikethrough.d.ts +3 -0
  215. package/lib/types/icons/strikethrough.d.ts.map +1 -0
  216. package/lib/types/icons/table.d.ts +2 -0
  217. package/lib/types/icons/table.d.ts.map +1 -0
  218. package/lib/types/icons/text.d.ts +3 -0
  219. package/lib/types/icons/text.d.ts.map +1 -0
  220. package/lib/types/icons/todo-list.d.ts +2 -0
  221. package/lib/types/icons/todo-list.d.ts.map +1 -0
  222. package/lib/types/icons/underline.d.ts +3 -0
  223. package/lib/types/icons/underline.d.ts.map +1 -0
  224. package/lib/types/icons/visibility-off.d.ts +2 -0
  225. package/lib/types/icons/visibility-off.d.ts.map +1 -0
  226. package/lib/types/icons/word-wrap.d.ts +2 -0
  227. package/lib/types/icons/word-wrap.d.ts.map +1 -0
  228. package/lib/types/index.d.ts +3 -0
  229. package/lib/types/index.d.ts.map +1 -0
  230. package/lib/types/utils/checker.d.ts +4 -0
  231. package/lib/types/utils/checker.d.ts.map +1 -0
  232. package/lib/types/utils/group-builder.d.ts +43 -0
  233. package/lib/types/utils/group-builder.d.ts.map +1 -0
  234. package/lib/types/utils/index.d.ts +4 -0
  235. package/lib/types/utils/index.d.ts.map +1 -0
  236. package/lib/types/utils/keep-alive.d.ts +2 -0
  237. package/lib/types/utils/keep-alive.d.ts.map +1 -0
  238. package/lib/types/utils/types.d.ts +4 -0
  239. package/lib/types/utils/types.d.ts.map +1 -0
  240. package/package.json +4 -4
@@ -0,0 +1,2 @@
1
+ export * from './core/builder';
2
+ //# sourceMappingURL=builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/builder.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { type DefaultValue, Editor } from '@jvs-milkdown/kit/core';
2
+ import { type ListenerManager } from '@jvs-milkdown/kit/plugin/listener';
3
+ import type { CrepeFeatureConfig } from '../feature';
4
+ import type { DefineFeature } from '../feature/shared';
5
+ import { CrepeFeature } from '../feature';
6
+ import { type CrepeTranslations } from './locale';
7
+ export interface CrepeBuilderConfig {
8
+ root?: Node | string | null;
9
+ defaultValue?: DefaultValue;
10
+ locale?: string;
11
+ translations?: Record<string, Partial<CrepeTranslations>>;
12
+ }
13
+ export declare class CrepeBuilder {
14
+ #private;
15
+ constructor({ root, defaultValue, locale, translations, }?: CrepeBuilderConfig);
16
+ addFeature: {
17
+ <T extends CrepeFeature>(feature: DefineFeature<CrepeFeatureConfig[T]>, config?: CrepeFeatureConfig[T]): CrepeBuilder;
18
+ <C>(feature: DefineFeature<C>, config?: C): CrepeBuilder;
19
+ };
20
+ create: () => Promise<Editor>;
21
+ destroy: () => Promise<Editor>;
22
+ get editor(): Editor;
23
+ get readonly(): boolean;
24
+ setReadonly: (value: boolean) => this;
25
+ getMarkdown: () => string;
26
+ on: (fn: (api: ListenerManager) => void) => this;
27
+ }
28
+ //# sourceMappingURL=builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../src/core/builder.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,YAAY,EAEjB,MAAM,EAKP,MAAM,wBAAwB,CAAA;AAI/B,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,mCAAmC,CAAA;AAO1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEzC,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAU7D,MAAM,WAAW,kBAAkB;IAIjC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;IAG3B,YAAY,CAAC,EAAE,YAAY,CAAA;IAG3B,MAAM,CAAC,EAAE,MAAM,CAAA;IAGf,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAA;CAC1D;AAID,qBAAa,YAAY;;gBAYX,EACV,IAAI,EACJ,YAAiB,EACjB,MAAgB,EAChB,YAAY,GACb,GAAE,kBAAuB;IA0H1B,UAAU,EAAE;QACV,CAAC,CAAC,SAAS,YAAY,EACrB,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAC7C,MAAM,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC7B,YAAY,CAAA;QACf,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,YAAY,CAAA;KACzD,CAGA;IAGD,MAAM,wBAEL;IAGD,OAAO,wBAEN;IAGD,IAAI,MAAM,IAAI,MAAM,CAEnB;IAGD,IAAI,QAAQ,YAEX;IAGD,WAAW,GAAI,OAAO,OAAO,UAW5B;IAGD,WAAW,eAEV;IAGD,EAAE,GAAI,IAAI,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,UAavC;CACF"}
@@ -0,0 +1,12 @@
1
+ import type { CrepeFeatureConfig } from '../feature';
2
+ import { CrepeFeature } from '../feature';
3
+ import { CrepeBuilder, type CrepeBuilderConfig } from './builder';
4
+ export interface CrepeConfig extends CrepeBuilderConfig {
5
+ features?: Partial<Record<CrepeFeature, boolean>>;
6
+ featureConfigs?: CrepeFeatureConfig;
7
+ }
8
+ export declare class Crepe extends CrepeBuilder {
9
+ static Feature: typeof CrepeFeature;
10
+ constructor({ features, featureConfigs, ...crepeBuilderConfig }?: CrepeConfig);
11
+ }
12
+ //# sourceMappingURL=crepe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crepe.d.ts","sourceRoot":"","sources":["../../../src/core/crepe.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAGpD,OAAO,EAAE,YAAY,EAAmB,MAAM,YAAY,CAAA;AAE1D,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAGjE,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IAErD,QAAQ,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAA;IAGjD,cAAc,CAAC,EAAE,kBAAkB,CAAA;CACpC;AAGD,qBAAa,KAAM,SAAQ,YAAY;IAErC,MAAM,CAAC,OAAO,sBAAe;gBAKjB,EACV,QAAa,EACb,cAAmB,EACnB,GAAG,kBAAkB,EACtB,GAAE,WAAgB;CAmBpB"}
@@ -0,0 +1,5 @@
1
+ export { Crepe, type CrepeConfig } from './crepe';
2
+ export { CrepeBuilder, type CrepeBuilderConfig } from './builder';
3
+ export { useCrepe, useCrepeFeatures } from './slice';
4
+ export * from './locale';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AACpD,cAAc,UAAU,CAAA"}
@@ -0,0 +1,288 @@
1
+ import type { Ctx } from '@jvs-milkdown/kit/ctx';
2
+ export declare const zhCN: {
3
+ 'handle.add': string;
4
+ 'handle.menu': string;
5
+ 'handle.drag': string;
6
+ 'placeholder.text': string;
7
+ 'toolbar.heading': string;
8
+ 'toolbar.formatting': string;
9
+ 'toolbar.function': string;
10
+ 'menuBar.file': string;
11
+ 'menuBar.edit': string;
12
+ 'menuBar.view': string;
13
+ 'menuBar.insert': string;
14
+ 'menuBar.format': string;
15
+ 'view.outline': string;
16
+ 'view.outlineLeft': string;
17
+ 'view.outlineRight': string;
18
+ 'view.docBackground': string;
19
+ 'view.title': string;
20
+ 'view.cover': string;
21
+ 'view.editorWidth': string;
22
+ 'view.widthDefault': string;
23
+ 'view.widthWide': string;
24
+ 'view.widthFull': string;
25
+ 'codeMirror.searchPlaceholder': string;
26
+ 'codeMirror.noResultText': string;
27
+ 'codeMirror.previewToggleOptionEdit': string;
28
+ 'codeMirror.previewToggleOptionHide': string;
29
+ 'codeMirror.previewLabel': string;
30
+ 'codeMirror.wrapText': string;
31
+ 'linkTooltip.pasteLink': string;
32
+ 'imageBlock.inlineUploadButton': string;
33
+ 'imageBlock.inlineUploadPlaceholder': string;
34
+ 'imageBlock.blockUploadButton': string;
35
+ 'imageBlock.blockUploadPlaceholder': string;
36
+ 'imageBlock.blockCaptionPlaceholder': string;
37
+ 'imageBlock.blockConfirmButton': string;
38
+ 'attachmentBlock.uploadButton': string;
39
+ 'attachmentBlock.uploadPlaceholderText': string;
40
+ 'attachmentBlock.download': string;
41
+ 'menu.group.text': string;
42
+ 'menu.group.block': string;
43
+ 'menu.group.list': string;
44
+ 'menu.group.advanced': string;
45
+ 'menu.item.text': string;
46
+ 'menu.item.h1': string;
47
+ 'menu.item.h2': string;
48
+ 'menu.item.h3': string;
49
+ 'menu.item.h4': string;
50
+ 'menu.item.h5': string;
51
+ 'menu.item.h6': string;
52
+ 'menu.item.quote': string;
53
+ 'menu.item.divider': string;
54
+ 'menu.item.bulletList': string;
55
+ 'menu.item.orderedList': string;
56
+ 'menu.item.taskList': string;
57
+ 'menu.item.image': string;
58
+ 'menu.item.attachment': string;
59
+ 'menu.item.code': string;
60
+ 'menu.item.table': string;
61
+ 'menu.item.math': string;
62
+ 'menu.item.bold': string;
63
+ 'menu.item.italic': string;
64
+ 'menu.item.strikethrough': string;
65
+ 'menu.item.underline': string;
66
+ 'menu.item.highlight': string;
67
+ 'menu.item.lineCode': string;
68
+ 'menu.item.link': string;
69
+ 'menu.tooltip.text': string;
70
+ 'menu.tooltip.h1': string;
71
+ 'menu.tooltip.h2': string;
72
+ 'menu.tooltip.h3': string;
73
+ 'menu.tooltip.h4': string;
74
+ 'menu.tooltip.h5': string;
75
+ 'menu.tooltip.h6': string;
76
+ 'menu.tooltip.quote': string;
77
+ 'menu.tooltip.divider': string;
78
+ 'menu.tooltip.bulletList': string;
79
+ 'menu.tooltip.orderedList': string;
80
+ 'menu.tooltip.taskList': string;
81
+ 'menu.tooltip.image': string;
82
+ 'menu.tooltip.code': string;
83
+ 'menu.tooltip.table': string;
84
+ 'menu.tooltip.math': string;
85
+ 'customMenu.indentAndAlign': string;
86
+ 'customMenu.color': string;
87
+ 'customMenu.cut': string;
88
+ 'customMenu.copy': string;
89
+ 'customMenu.delete': string;
90
+ 'customMenu.addBelow': string;
91
+ 'customMenu.alignLeft': string;
92
+ 'customMenu.alignCenter': string;
93
+ 'customMenu.alignRight': string;
94
+ 'customMenu.increaseIndent': string;
95
+ 'customMenu.decreaseIndent': string;
96
+ 'customMenu.textColor': string;
97
+ 'customMenu.bgColor': string;
98
+ 'customMenu.restoreDefault': string;
99
+ 'customMenu.colorDefault': string;
100
+ 'customMenu.colorRed': string;
101
+ 'customMenu.colorOrange': string;
102
+ 'customMenu.colorYellow': string;
103
+ 'customMenu.colorGreen': string;
104
+ 'customMenu.colorBlue': string;
105
+ 'customMenu.colorPurple': string;
106
+ 'customMenu.colorGray': string;
107
+ 'customMenu.insertTable': string;
108
+ 'customMenu.fontDefault': string;
109
+ 'font.fangSong': string;
110
+ 'font.stFangsong': string;
111
+ 'font.stSong': string;
112
+ 'font.stKaiti': string;
113
+ 'font.simSun': string;
114
+ 'font.microsoftYaHei': string;
115
+ 'font.kaiTi': string;
116
+ 'font.simHei': string;
117
+ 'latex.escToExit': string;
118
+ 'latex.helpDoc': string;
119
+ 'latex.emptyPlaceholder': string;
120
+ 'latex.inputPlaceholder': string;
121
+ 'shortcuts.title': string;
122
+ 'shortcuts.formatting': string;
123
+ 'shortcuts.bold': string;
124
+ 'shortcuts.italic': string;
125
+ 'shortcuts.underline': string;
126
+ 'shortcuts.strikethrough': string;
127
+ 'shortcuts.inlineCode': string;
128
+ 'shortcuts.highlight': string;
129
+ 'shortcuts.paragraph': string;
130
+ 'shortcuts.heading': string;
131
+ 'shortcuts.block': string;
132
+ 'shortcuts.codeBlock': string;
133
+ 'shortcuts.blockquote': string;
134
+ 'shortcuts.orderedList': string;
135
+ 'shortcuts.bulletList': string;
136
+ 'shortcuts.indent': string;
137
+ 'shortcuts.outdent': string;
138
+ 'shortcuts.hardBreak': string;
139
+ 'shortcuts.history': string;
140
+ 'shortcuts.undo': string;
141
+ 'shortcuts.redo': string;
142
+ };
143
+ export declare const enUS: typeof zhCN;
144
+ export type CrepeTranslations = typeof zhCN;
145
+ export declare const translationsCtx: import("@jvs-milkdown/ctx").SliceType<Record<string, Partial<{
146
+ 'handle.add': string;
147
+ 'handle.menu': string;
148
+ 'handle.drag': string;
149
+ 'placeholder.text': string;
150
+ 'toolbar.heading': string;
151
+ 'toolbar.formatting': string;
152
+ 'toolbar.function': string;
153
+ 'menuBar.file': string;
154
+ 'menuBar.edit': string;
155
+ 'menuBar.view': string;
156
+ 'menuBar.insert': string;
157
+ 'menuBar.format': string;
158
+ 'view.outline': string;
159
+ 'view.outlineLeft': string;
160
+ 'view.outlineRight': string;
161
+ 'view.docBackground': string;
162
+ 'view.title': string;
163
+ 'view.cover': string;
164
+ 'view.editorWidth': string;
165
+ 'view.widthDefault': string;
166
+ 'view.widthWide': string;
167
+ 'view.widthFull': string;
168
+ 'codeMirror.searchPlaceholder': string;
169
+ 'codeMirror.noResultText': string;
170
+ 'codeMirror.previewToggleOptionEdit': string;
171
+ 'codeMirror.previewToggleOptionHide': string;
172
+ 'codeMirror.previewLabel': string;
173
+ 'codeMirror.wrapText': string;
174
+ 'linkTooltip.pasteLink': string;
175
+ 'imageBlock.inlineUploadButton': string;
176
+ 'imageBlock.inlineUploadPlaceholder': string;
177
+ 'imageBlock.blockUploadButton': string;
178
+ 'imageBlock.blockUploadPlaceholder': string;
179
+ 'imageBlock.blockCaptionPlaceholder': string;
180
+ 'imageBlock.blockConfirmButton': string;
181
+ 'attachmentBlock.uploadButton': string;
182
+ 'attachmentBlock.uploadPlaceholderText': string;
183
+ 'attachmentBlock.download': string;
184
+ 'menu.group.text': string;
185
+ 'menu.group.block': string;
186
+ 'menu.group.list': string;
187
+ 'menu.group.advanced': string;
188
+ 'menu.item.text': string;
189
+ 'menu.item.h1': string;
190
+ 'menu.item.h2': string;
191
+ 'menu.item.h3': string;
192
+ 'menu.item.h4': string;
193
+ 'menu.item.h5': string;
194
+ 'menu.item.h6': string;
195
+ 'menu.item.quote': string;
196
+ 'menu.item.divider': string;
197
+ 'menu.item.bulletList': string;
198
+ 'menu.item.orderedList': string;
199
+ 'menu.item.taskList': string;
200
+ 'menu.item.image': string;
201
+ 'menu.item.attachment': string;
202
+ 'menu.item.code': string;
203
+ 'menu.item.table': string;
204
+ 'menu.item.math': string;
205
+ 'menu.item.bold': string;
206
+ 'menu.item.italic': string;
207
+ 'menu.item.strikethrough': string;
208
+ 'menu.item.underline': string;
209
+ 'menu.item.highlight': string;
210
+ 'menu.item.lineCode': string;
211
+ 'menu.item.link': string;
212
+ 'menu.tooltip.text': string;
213
+ 'menu.tooltip.h1': string;
214
+ 'menu.tooltip.h2': string;
215
+ 'menu.tooltip.h3': string;
216
+ 'menu.tooltip.h4': string;
217
+ 'menu.tooltip.h5': string;
218
+ 'menu.tooltip.h6': string;
219
+ 'menu.tooltip.quote': string;
220
+ 'menu.tooltip.divider': string;
221
+ 'menu.tooltip.bulletList': string;
222
+ 'menu.tooltip.orderedList': string;
223
+ 'menu.tooltip.taskList': string;
224
+ 'menu.tooltip.image': string;
225
+ 'menu.tooltip.code': string;
226
+ 'menu.tooltip.table': string;
227
+ 'menu.tooltip.math': string;
228
+ 'customMenu.indentAndAlign': string;
229
+ 'customMenu.color': string;
230
+ 'customMenu.cut': string;
231
+ 'customMenu.copy': string;
232
+ 'customMenu.delete': string;
233
+ 'customMenu.addBelow': string;
234
+ 'customMenu.alignLeft': string;
235
+ 'customMenu.alignCenter': string;
236
+ 'customMenu.alignRight': string;
237
+ 'customMenu.increaseIndent': string;
238
+ 'customMenu.decreaseIndent': string;
239
+ 'customMenu.textColor': string;
240
+ 'customMenu.bgColor': string;
241
+ 'customMenu.restoreDefault': string;
242
+ 'customMenu.colorDefault': string;
243
+ 'customMenu.colorRed': string;
244
+ 'customMenu.colorOrange': string;
245
+ 'customMenu.colorYellow': string;
246
+ 'customMenu.colorGreen': string;
247
+ 'customMenu.colorBlue': string;
248
+ 'customMenu.colorPurple': string;
249
+ 'customMenu.colorGray': string;
250
+ 'customMenu.insertTable': string;
251
+ 'customMenu.fontDefault': string;
252
+ 'font.fangSong': string;
253
+ 'font.stFangsong': string;
254
+ 'font.stSong': string;
255
+ 'font.stKaiti': string;
256
+ 'font.simSun': string;
257
+ 'font.microsoftYaHei': string;
258
+ 'font.kaiTi': string;
259
+ 'font.simHei': string;
260
+ 'latex.escToExit': string;
261
+ 'latex.helpDoc': string;
262
+ 'latex.emptyPlaceholder': string;
263
+ 'latex.inputPlaceholder': string;
264
+ 'shortcuts.title': string;
265
+ 'shortcuts.formatting': string;
266
+ 'shortcuts.bold': string;
267
+ 'shortcuts.italic': string;
268
+ 'shortcuts.underline': string;
269
+ 'shortcuts.strikethrough': string;
270
+ 'shortcuts.inlineCode': string;
271
+ 'shortcuts.highlight': string;
272
+ 'shortcuts.paragraph': string;
273
+ 'shortcuts.heading': string;
274
+ 'shortcuts.block': string;
275
+ 'shortcuts.codeBlock': string;
276
+ 'shortcuts.blockquote': string;
277
+ 'shortcuts.orderedList': string;
278
+ 'shortcuts.bulletList': string;
279
+ 'shortcuts.indent': string;
280
+ 'shortcuts.outdent': string;
281
+ 'shortcuts.hardBreak': string;
282
+ 'shortcuts.history': string;
283
+ 'shortcuts.undo': string;
284
+ 'shortcuts.redo': string;
285
+ }>>, string>;
286
+ export declare const localeCtx: import("@jvs-milkdown/ctx").SliceType<string, "localeCtx">;
287
+ export declare function i18n(ctx: Ctx, key: keyof CrepeTranslations): string;
288
+ //# sourceMappingURL=locale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../src/core/locale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAIhD,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0KhB,CAAA;AAED,eAAO,MAAM,IAAI,EAAE,OAAO,IA2JzB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,IAAI,CAAA;AAE3C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAQ3B,CAAA;AAED,eAAO,MAAM,SAAS,4DAAoC,CAAA;AAE1D,wBAAgB,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,iBAAiB,GAAG,MAAM,CASnE"}
@@ -0,0 +1,10 @@
1
+ import { type Ctx } from '@jvs-milkdown/kit/ctx';
2
+ import type { CrepeFeature } from '../feature';
3
+ import type { CrepeBuilder } from './builder';
4
+ export declare const FeaturesCtx: import("@jvs-milkdown/ctx").SliceType<CrepeFeature[], "FeaturesCtx">;
5
+ export declare const CrepeCtx: import("@jvs-milkdown/ctx").SliceType<CrepeBuilder, "CrepeCtx">;
6
+ export declare function useCrepe(ctx: Ctx): CrepeBuilder;
7
+ export declare function useCrepeFeatures(ctx: Ctx): import("@jvs-milkdown/ctx").Slice<CrepeFeature[], "FeaturesCtx">;
8
+ export declare function crepeFeatureConfig(feature: CrepeFeature): (ctx: Ctx) => void;
9
+ export { localeCtx, translationsCtx } from './locale';
10
+ //# sourceMappingURL=slice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../../../src/core/slice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAK7C,eAAO,MAAM,WAAW,sEAAmD,CAAA;AAK3E,eAAO,MAAM,QAAQ,iEAA8C,CAAA;AAanE,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,gBAGhC;AAWD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,oEAGxC;AAGD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,IAC9C,KAAK,GAAG,UAQjB;AAED,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=default-config.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-config.spec.d.ts","sourceRoot":"","sources":["../../../src/default-config/default-config.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { type CrepeFeatureConfig } from '../feature';
2
+ export declare const defaultConfig: CrepeFeatureConfig;
3
+ export declare const applyConfig: (userConfig: Partial<CrepeFeatureConfig>) => CrepeFeatureConfig & Partial<CrepeFeatureConfig>;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/default-config/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAA;AASlE,eAAO,MAAM,aAAa,EAAE,kBAU3B,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,YAAY,OAAO,CAAC,kBAAkB,CAAC,qDAOlE,CAAA"}
@@ -0,0 +1,12 @@
1
+ export interface AttachmentFeatureConfig {
2
+ onUpload: (file: File) => Promise<{
3
+ url: string;
4
+ name: string;
5
+ size: number;
6
+ }>;
7
+ uploadButton: string;
8
+ uploadPlaceholderText: string;
9
+ downloadText: string;
10
+ }
11
+ export declare const attachmentConfig: import("@jvs-milkdown/utils").$Ctx<AttachmentFeatureConfig, "attachmentConfig">;
12
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/feature/attachment/config.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC9E,YAAY,EAAE,MAAM,CAAA;IACpB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,eAAO,MAAM,gBAAgB,iFAc5B,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { DefineFeature } from '../shared';
2
+ import { type AttachmentFeatureConfig } from './config';
3
+ export declare const attachment: DefineFeature<AttachmentFeatureConfig>;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/feature/attachment/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAK9C,OAAO,EAAoB,KAAK,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAIzE,eAAO,MAAM,UAAU,EAAE,aAAa,CAAC,uBAAuB,CAsB7D,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const ATTACHMENT_DATA_TYPE = "attachment-block";
2
+ export declare const attachmentSchema: import("@jvs-milkdown/utils").$NodeSchema<"attachment">;
3
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/feature/attachment/schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,qBAAqB,CAAA;AAEtD,eAAO,MAAM,gBAAgB,yDA2E3B,CAAA"}
@@ -0,0 +1,19 @@
1
+ import { type Ref } from 'vue';
2
+ import type { AttachmentFeatureConfig } from '../../config';
3
+ type Attrs = {
4
+ src: string;
5
+ name: string;
6
+ size: number;
7
+ videoWidth: number;
8
+ };
9
+ export type MilkdownAttachmentBlockProps = {
10
+ selected: Ref<boolean>;
11
+ readonly: Ref<boolean>;
12
+ setAttr: <T extends keyof Attrs>(attr: T, value: Attrs[T]) => void;
13
+ config: AttachmentFeatureConfig;
14
+ } & {
15
+ [P in keyof Attrs]: Ref<Attrs[P] | undefined>;
16
+ };
17
+ export declare const MilkdownAttachmentBlock: any;
18
+ export {};
19
+ //# sourceMappingURL=attachment-block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment-block.d.ts","sourceRoot":"","sources":["../../../../../../src/feature/attachment/view/components/attachment-block.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,GAAG,EAAiD,MAAM,KAAK,CAAA;AAE7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAQ3D,KAAK,KAAK,GAAG;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACtB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACtB,OAAO,EAAE,CAAC,CAAC,SAAS,MAAM,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,CAAA;IAClE,MAAM,EAAE,uBAAuB,CAAA;CAChC,GAAG;KACD,CAAC,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;CAC9C,CAAA;AAWD,eAAO,MAAM,uBAAuB,KA8OhC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { NodeViewConstructor } from '@jvs-milkdown/kit/prose/view';
2
+ export declare const attachmentView: import("@jvs-milkdown/utils").$View<import("@jvs-milkdown/utils").$Node, NodeViewConstructor>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/feature/attachment/view/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AASvE,eAAO,MAAM,cAAc,+FAwE1B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const BlockHandle: any;
2
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/handle/component.tsx"],"names":[],"mappings":"AAyBA,eAAO,MAAM,WAAW,KAuGtB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { Ctx } from '@jvs-milkdown/kit/ctx';
2
+ import type { BlockEditFeatureConfig } from '../index';
3
+ export declare function configureBlockHandle(ctx: Ctx, config?: BlockEditFeatureConfig): void;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/handle/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAchD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAkRtD,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,GAAG,EACR,MAAM,CAAC,EAAE,sBAAsB,QA2ChC"}
@@ -0,0 +1,95 @@
1
+ import { type BlockProviderOptions } from '@jvs-milkdown/kit/plugin/block';
2
+ import type { DeepPartial } from '../../utils';
3
+ import type { GroupBuilder } from '../../utils/group-builder';
4
+ import type { DefineFeature } from '../shared';
5
+ import type { SlashMenuItem } from './menu/utils';
6
+ interface BlockEditConfig {
7
+ handleAddIcon: string;
8
+ handleDragIcon: string;
9
+ buildMenu: (builder: GroupBuilder<SlashMenuItem>) => void;
10
+ blockHandle: Pick<BlockProviderOptions, 'shouldShow' | 'getOffset' | 'getPosition' | 'getPlacement' | 'middleware' | 'floatingUIOptions' | 'root'>;
11
+ textGroup: {
12
+ label: string;
13
+ text: {
14
+ label: string;
15
+ icon: string;
16
+ } | null;
17
+ h1: {
18
+ label: string;
19
+ icon: string;
20
+ } | null;
21
+ h2: {
22
+ label: string;
23
+ icon: string;
24
+ } | null;
25
+ h3: {
26
+ label: string;
27
+ icon: string;
28
+ } | null;
29
+ h4: {
30
+ label: string;
31
+ icon: string;
32
+ } | null;
33
+ h5: {
34
+ label: string;
35
+ icon: string;
36
+ } | null;
37
+ h6: {
38
+ label: string;
39
+ icon: string;
40
+ } | null;
41
+ } | null;
42
+ blockGroup: {
43
+ label: string;
44
+ quote: {
45
+ label: string;
46
+ icon: string;
47
+ } | null;
48
+ divider: {
49
+ label: string;
50
+ icon: string;
51
+ } | null;
52
+ } | null;
53
+ listGroup: {
54
+ label: string;
55
+ bulletList: {
56
+ label: string;
57
+ icon: string;
58
+ } | null;
59
+ orderedList: {
60
+ label: string;
61
+ icon: string;
62
+ } | null;
63
+ taskList: {
64
+ label: string;
65
+ icon: string;
66
+ } | null;
67
+ } | null;
68
+ advancedGroup: {
69
+ label: string;
70
+ image: {
71
+ label: string;
72
+ icon: string;
73
+ } | null;
74
+ codeBlock: {
75
+ label: string;
76
+ icon: string;
77
+ } | null;
78
+ table: {
79
+ label: string;
80
+ icon: string;
81
+ } | null;
82
+ math: {
83
+ label: string;
84
+ icon: string;
85
+ } | null;
86
+ attachment: {
87
+ label: string;
88
+ icon: string;
89
+ } | null;
90
+ } | null;
91
+ }
92
+ export type BlockEditFeatureConfig = DeepPartial<BlockEditConfig>;
93
+ export declare const blockEdit: DefineFeature<BlockEditFeatureConfig>;
94
+ export {};
95
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/feature/block-edit/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,12 @@
1
+ export interface MenuAPI {
2
+ show: (pos: number, isClick?: boolean, triggerElement?: HTMLElement, mode?: 'list' | 'block') => void;
3
+ hide: () => void;
4
+ onHoverDelayHide: () => void;
5
+ cancelHide: () => void;
6
+ isProgrammatic: () => boolean;
7
+ getPos: () => number | null;
8
+ isShow: () => boolean;
9
+ getMode: () => 'list' | 'block' | null;
10
+ }
11
+ export declare const menuAPI: import("@jvs-milkdown/utils").$Ctx<MenuAPI, "menuAPICtx">;
12
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/menu/api.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,KAAK,IAAI,CAAA;IACrG,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,cAAc,EAAE,MAAM,OAAO,CAAA;IAC7B,MAAM,EAAE,MAAM,MAAM,GAAG,IAAI,CAAA;IAC3B,MAAM,EAAE,MAAM,OAAO,CAAA;IACrB,OAAO,EAAE,MAAM,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;CACvC;AAED,eAAO,MAAM,OAAO,2DAYnB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const Menu: any;
2
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/menu/component.tsx"],"names":[],"mappings":"AAwDA,eAAO,MAAM,IAAI,KA0vCf,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { Ctx } from '@jvs-milkdown/kit/ctx';
2
+ import type { BlockEditFeatureConfig } from '../index';
3
+ import type { SlashMenuItem } from './utils';
4
+ import { type MenuItemGroup } from '../../../utils/group-builder';
5
+ export declare function getGroups(filter?: string, config?: BlockEditFeatureConfig, ctx?: Ctx): {
6
+ groups: MenuItemGroup<SlashMenuItem>[];
7
+ size: number;
8
+ };
9
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/menu/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AA8BhD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAwB5C,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAwG/E,wBAAgB,SAAS,CACvB,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,sBAAsB,EAC/B,GAAG,CAAC,EAAE,GAAG;YAquBW,aAAa,CAAC,aAAa,CAAC,EAAE;;EAGnD"}
@@ -0,0 +1,7 @@
1
+ import type { Ctx } from '@jvs-milkdown/kit/ctx';
2
+ import type { BlockEditFeatureConfig } from '../index';
3
+ export declare const menu: import("@jvs-milkdown/plugin-slash").SlashPlugin<"CREPE_MENU", any>;
4
+ import { menuAPI, type MenuAPI } from './api';
5
+ export { menuAPI, type MenuAPI };
6
+ export declare function configureMenu(ctx: Ctx, config?: BlockEditFeatureConfig): void;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/feature/block-edit/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAahD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAKtD,eAAO,MAAM,IAAI,qEAA6B,CAAA;AAE9C,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,OAAO,CAAA;AAE7C,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,CAAA;AAEhC,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,sBAAsB,QAItE"}