@milkdown/crepe 7.19.2 → 7.21.0
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/lib/cjs/builder.js +44 -1
- package/lib/cjs/builder.js.map +1 -1
- package/lib/cjs/feature/ai/index.js +1492 -0
- package/lib/cjs/feature/ai/index.js.map +1 -0
- package/lib/cjs/feature/block-edit/index.js +9 -2
- package/lib/cjs/feature/block-edit/index.js.map +1 -1
- package/lib/cjs/feature/code-mirror/index.js +2 -0
- package/lib/cjs/feature/code-mirror/index.js.map +1 -1
- package/lib/cjs/feature/cursor/index.js +2 -0
- package/lib/cjs/feature/cursor/index.js.map +1 -1
- package/lib/cjs/feature/image-block/index.js +5 -1
- package/lib/cjs/feature/image-block/index.js.map +1 -1
- package/lib/cjs/feature/latex/index.js +7 -0
- package/lib/cjs/feature/latex/index.js.map +1 -1
- package/lib/cjs/feature/link-tooltip/index.js +2 -0
- package/lib/cjs/feature/link-tooltip/index.js.map +1 -1
- package/lib/cjs/feature/list-item/index.js +2 -0
- package/lib/cjs/feature/list-item/index.js.map +1 -1
- package/lib/cjs/feature/placeholder/index.js +2 -0
- package/lib/cjs/feature/placeholder/index.js.map +1 -1
- package/lib/cjs/feature/table/index.js +2 -0
- package/lib/cjs/feature/table/index.js.map +1 -1
- package/lib/cjs/feature/toolbar/index.js +497 -5
- package/lib/cjs/feature/toolbar/index.js.map +1 -1
- package/lib/cjs/feature/top-bar/index.js +791 -0
- package/lib/cjs/feature/top-bar/index.js.map +1 -0
- package/lib/cjs/index.js +2047 -160
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/llm-providers/anthropic/index.js +147 -0
- package/lib/cjs/llm-providers/anthropic/index.js.map +1 -0
- package/lib/cjs/llm-providers/openai/index.js +138 -0
- package/lib/cjs/llm-providers/openai/index.js.map +1 -0
- package/lib/esm/builder.js +44 -1
- package/lib/esm/builder.js.map +1 -1
- package/lib/esm/feature/ai/index.js +1487 -0
- package/lib/esm/feature/ai/index.js.map +1 -0
- package/lib/esm/feature/block-edit/index.js +9 -2
- package/lib/esm/feature/block-edit/index.js.map +1 -1
- package/lib/esm/feature/code-mirror/index.js +2 -0
- package/lib/esm/feature/code-mirror/index.js.map +1 -1
- package/lib/esm/feature/cursor/index.js +2 -0
- package/lib/esm/feature/cursor/index.js.map +1 -1
- package/lib/esm/feature/image-block/index.js +5 -1
- package/lib/esm/feature/image-block/index.js.map +1 -1
- package/lib/esm/feature/latex/index.js +7 -0
- package/lib/esm/feature/latex/index.js.map +1 -1
- package/lib/esm/feature/link-tooltip/index.js +2 -0
- package/lib/esm/feature/link-tooltip/index.js.map +1 -1
- package/lib/esm/feature/list-item/index.js +2 -0
- package/lib/esm/feature/list-item/index.js.map +1 -1
- package/lib/esm/feature/placeholder/index.js +2 -0
- package/lib/esm/feature/placeholder/index.js.map +1 -1
- package/lib/esm/feature/table/index.js +2 -0
- package/lib/esm/feature/table/index.js.map +1 -1
- package/lib/esm/feature/toolbar/index.js +499 -7
- package/lib/esm/feature/toolbar/index.js.map +1 -1
- package/lib/esm/feature/top-bar/index.js +789 -0
- package/lib/esm/feature/top-bar/index.js.map +1 -0
- package/lib/esm/index.js +2040 -153
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/llm-providers/anthropic/index.js +145 -0
- package/lib/esm/llm-providers/anthropic/index.js.map +1 -0
- package/lib/esm/llm-providers/openai/index.js +136 -0
- package/lib/esm/llm-providers/openai/index.js.map +1 -0
- package/lib/theme/common/ai.css +446 -0
- package/lib/theme/common/code-mirror.css +14 -0
- package/lib/theme/common/diff.css +177 -0
- package/lib/theme/common/style.css +3 -0
- package/lib/theme/common/top-bar.css +152 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/builder.d.ts +2 -1
- package/lib/types/core/builder.d.ts.map +1 -1
- package/lib/types/feature/ai/ai.spec.d.ts +2 -0
- package/lib/types/feature/ai/ai.spec.d.ts.map +1 -0
- package/lib/types/feature/ai/commands.d.ts +24 -0
- package/lib/types/feature/ai/commands.d.ts.map +1 -0
- package/lib/types/feature/ai/context.d.ts +4 -0
- package/lib/types/feature/ai/context.d.ts.map +1 -0
- package/lib/types/feature/ai/diff-actions/index.d.ts +12 -0
- package/lib/types/feature/ai/diff-actions/index.d.ts.map +1 -0
- package/lib/types/feature/ai/diff-actions/view.d.ts +21 -0
- package/lib/types/feature/ai/diff-actions/view.d.ts.map +1 -0
- package/lib/types/feature/ai/index.d.ts +7 -0
- package/lib/types/feature/ai/index.d.ts.map +1 -0
- package/lib/types/feature/ai/instruction-tooltip/component.d.ts +26 -0
- package/lib/types/feature/ai/instruction-tooltip/component.d.ts.map +1 -0
- package/lib/types/feature/ai/instruction-tooltip/index.d.ts +17 -0
- package/lib/types/feature/ai/instruction-tooltip/index.d.ts.map +1 -0
- package/lib/types/feature/ai/instruction-tooltip/suggestions.d.ts +50 -0
- package/lib/types/feature/ai/instruction-tooltip/suggestions.d.ts.map +1 -0
- package/lib/types/feature/ai/instruction-tooltip/view.d.ts +19 -0
- package/lib/types/feature/ai/instruction-tooltip/view.d.ts.map +1 -0
- package/lib/types/feature/ai/streaming-indicator.d.ts +9 -0
- package/lib/types/feature/ai/streaming-indicator.d.ts.map +1 -0
- package/lib/types/feature/ai/types.d.ts +58 -0
- package/lib/types/feature/ai/types.d.ts.map +1 -0
- package/lib/types/feature/block-edit/handle/component.d.ts.map +1 -1
- package/lib/types/feature/block-edit/menu/component.d.ts.map +1 -1
- package/lib/types/feature/image-block/index.d.ts +2 -0
- package/lib/types/feature/image-block/index.d.ts.map +1 -1
- package/lib/types/feature/index.d.ts +7 -1
- package/lib/types/feature/index.d.ts.map +1 -1
- package/lib/types/feature/latex/inline-tooltip/component.d.ts.map +1 -1
- package/lib/types/feature/latex/inline-tooltip/inline-tooltip.spec.d.ts +2 -0
- package/lib/types/feature/latex/inline-tooltip/inline-tooltip.spec.d.ts.map +1 -0
- package/lib/types/feature/latex/inline-tooltip/view.d.ts.map +1 -1
- package/lib/types/feature/loader.d.ts.map +1 -1
- package/lib/types/feature/toolbar/component.d.ts.map +1 -1
- package/lib/types/feature/toolbar/config.d.ts +1 -1
- package/lib/types/feature/toolbar/config.d.ts.map +1 -1
- package/lib/types/feature/toolbar/index.d.ts +1 -0
- package/lib/types/feature/toolbar/index.d.ts.map +1 -1
- package/lib/types/feature/top-bar/component.d.ts +11 -0
- package/lib/types/feature/top-bar/component.d.ts.map +1 -0
- package/lib/types/feature/top-bar/config.d.ts +34 -0
- package/lib/types/feature/top-bar/config.d.ts.map +1 -0
- package/lib/types/feature/top-bar/index.d.ts +26 -0
- package/lib/types/feature/top-bar/index.d.ts.map +1 -0
- package/lib/types/icons/ai.d.ts +2 -0
- package/lib/types/icons/ai.d.ts.map +1 -0
- package/lib/types/icons/chevron-left.d.ts +2 -0
- package/lib/types/icons/chevron-left.d.ts.map +1 -0
- package/lib/types/icons/chevron-right.d.ts +2 -0
- package/lib/types/icons/chevron-right.d.ts.map +1 -0
- package/lib/types/icons/code-block.d.ts +2 -0
- package/lib/types/icons/code-block.d.ts.map +1 -0
- package/lib/types/icons/enter-key.d.ts +2 -0
- package/lib/types/icons/enter-key.d.ts.map +1 -0
- package/lib/types/icons/grammar-check.d.ts +2 -0
- package/lib/types/icons/grammar-check.d.ts.map +1 -0
- package/lib/types/icons/index.d.ts +12 -0
- package/lib/types/icons/index.d.ts.map +1 -1
- package/lib/types/icons/longer.d.ts +2 -0
- package/lib/types/icons/longer.d.ts.map +1 -0
- package/lib/types/icons/retry.d.ts +2 -0
- package/lib/types/icons/retry.d.ts.map +1 -0
- package/lib/types/icons/send-prompt.d.ts +2 -0
- package/lib/types/icons/send-prompt.d.ts.map +1 -0
- package/lib/types/icons/send.d.ts +2 -0
- package/lib/types/icons/send.d.ts.map +1 -0
- package/lib/types/icons/shorter.d.ts +2 -0
- package/lib/types/icons/shorter.d.ts.map +1 -0
- package/lib/types/icons/translate.d.ts +2 -0
- package/lib/types/icons/translate.d.ts.map +1 -0
- package/lib/types/llm-providers/anthropic/index.d.ts +21 -0
- package/lib/types/llm-providers/anthropic/index.d.ts.map +1 -0
- package/lib/types/llm-providers/openai/index.d.ts +15 -0
- package/lib/types/llm-providers/openai/index.d.ts.map +1 -0
- package/lib/types/llm-providers/providers.spec.d.ts +2 -0
- package/lib/types/llm-providers/providers.spec.d.ts.map +1 -0
- package/lib/types/llm-providers/shared.d.ts +16 -0
- package/lib/types/llm-providers/shared.d.ts.map +1 -0
- package/lib/types/utils/group-builder.d.ts +1 -1
- package/lib/types/utils/group-builder.d.ts.map +1 -1
- package/lib/types/utils/keep-alive.d.ts +2 -0
- package/lib/types/utils/keep-alive.d.ts.map +1 -0
- package/package.json +34 -13
- package/src/core/builder.ts +39 -2
- package/src/feature/ai/ai.spec.ts +742 -0
- package/src/feature/ai/commands.ts +257 -0
- package/src/feature/ai/context.ts +45 -0
- package/src/feature/ai/diff-actions/index.ts +95 -0
- package/src/feature/ai/diff-actions/view.ts +237 -0
- package/src/feature/ai/index.ts +118 -0
- package/src/feature/ai/instruction-tooltip/component.tsx +414 -0
- package/src/feature/ai/instruction-tooltip/index.ts +101 -0
- package/src/feature/ai/instruction-tooltip/suggestions.ts +249 -0
- package/src/feature/ai/instruction-tooltip/view.ts +159 -0
- package/src/feature/ai/streaming-indicator.ts +183 -0
- package/src/feature/ai/types.ts +178 -0
- package/src/feature/block-edit/handle/component.tsx +3 -2
- package/src/feature/block-edit/menu/component.tsx +3 -2
- package/src/feature/block-edit/menu/config.ts +1 -1
- package/src/feature/image-block/index.ts +4 -0
- package/src/feature/index.ts +14 -2
- package/src/feature/latex/inline-tooltip/component.tsx +4 -2
- package/src/feature/latex/inline-tooltip/inline-tooltip.spec.ts +81 -0
- package/src/feature/latex/inline-tooltip/view.ts +2 -0
- package/src/feature/loader.ts +8 -0
- package/src/feature/toolbar/component.tsx +7 -5
- package/src/feature/toolbar/config.ts +27 -1
- package/src/feature/toolbar/index.ts +1 -0
- package/src/feature/top-bar/component.tsx +198 -0
- package/src/feature/top-bar/config.ts +367 -0
- package/src/feature/top-bar/index.ts +113 -0
- package/src/icons/ai.ts +14 -0
- package/src/icons/chevron-left.ts +15 -0
- package/src/icons/chevron-right.ts +15 -0
- package/src/icons/code-block.ts +12 -0
- package/src/icons/enter-key.ts +13 -0
- package/src/icons/grammar-check.ts +13 -0
- package/src/icons/index.ts +12 -0
- package/src/icons/longer.ts +13 -0
- package/src/icons/retry.ts +13 -0
- package/src/icons/send-prompt.ts +13 -0
- package/src/icons/send.ts +13 -0
- package/src/icons/shorter.ts +13 -0
- package/src/icons/translate.ts +13 -0
- package/src/llm-providers/anthropic/index.ts +132 -0
- package/src/llm-providers/openai/index.ts +109 -0
- package/src/llm-providers/providers.spec.ts +472 -0
- package/src/llm-providers/shared.ts +160 -0
- package/src/theme/common/ai.css +430 -0
- package/src/theme/common/code-mirror.css +14 -0
- package/src/theme/common/diff.css +196 -0
- package/src/theme/common/style.css +3 -0
- package/src/theme/common/top-bar.css +156 -0
- package/src/utils/group-builder.ts +1 -1
- package/src/utils/keep-alive.ts +3 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const enterKeyIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M9 16l-5-5l5-5l1.4 1.4L7.825 10H18V6h2v6H7.825l2.575 2.6z\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=enter-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enter-key.d.ts","sourceRoot":"","sources":["../../../src/icons/enter-key.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,+PAYxB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const grammarCheckIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M9.55 17.575L4.225 12.25l1.4-1.425L9.55 14.75l8.825-8.825l1.4 1.425z\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=grammar-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grammar-check.d.ts","sourceRoot":"","sources":["../../../src/icons/grammar-check.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,0QAY5B,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './ai';
|
|
1
2
|
export * from './align-center';
|
|
2
3
|
export * from './align-left';
|
|
3
4
|
export * from './align-right';
|
|
@@ -8,13 +9,18 @@ export * from './caption';
|
|
|
8
9
|
export * from './check-box-checked';
|
|
9
10
|
export * from './check-box-unchecked';
|
|
10
11
|
export * from './chevron-down';
|
|
12
|
+
export * from './chevron-left';
|
|
13
|
+
export * from './chevron-right';
|
|
11
14
|
export * from './clear';
|
|
12
15
|
export * from './code';
|
|
16
|
+
export * from './code-block';
|
|
13
17
|
export * from './confirm';
|
|
14
18
|
export * from './copy';
|
|
15
19
|
export * from './divider';
|
|
16
20
|
export * from './drag-handle';
|
|
17
21
|
export * from './edit';
|
|
22
|
+
export * from './enter-key';
|
|
23
|
+
export * from './grammar-check';
|
|
18
24
|
export * from './h1';
|
|
19
25
|
export * from './h2';
|
|
20
26
|
export * from './h3';
|
|
@@ -24,16 +30,22 @@ export * from './h6';
|
|
|
24
30
|
export * from './image';
|
|
25
31
|
export * from './italic';
|
|
26
32
|
export * from './link';
|
|
33
|
+
export * from './longer';
|
|
27
34
|
export * from './menu';
|
|
28
35
|
export * from './ordered-list';
|
|
29
36
|
export * from './plus';
|
|
30
37
|
export * from './quote';
|
|
31
38
|
export * from './remove';
|
|
39
|
+
export * from './retry';
|
|
32
40
|
export * from './search';
|
|
41
|
+
export * from './send';
|
|
42
|
+
export * from './send-prompt';
|
|
43
|
+
export * from './shorter';
|
|
33
44
|
export * from './strikethrough';
|
|
34
45
|
export * from './table';
|
|
35
46
|
export * from './text';
|
|
36
47
|
export * from './todo-list';
|
|
48
|
+
export * from './translate';
|
|
37
49
|
export * from './functions';
|
|
38
50
|
export * from './visibility-off';
|
|
39
51
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAA;AACpB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,MAAM,CAAA;AACpB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const longerIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M3 18v-2h13v2zm0-5v-2h18v2zm0-5V6h18v2zm15 13v-3h-3v-2h3v-3h2v3h3v2h-3v3z\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=longer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"longer.d.ts","sourceRoot":"","sources":["../../../src/icons/longer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,+QAYtB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const retryIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M12 20q-3.35 0-5.675-2.325T4 12q0-3.35 2.325-5.675T12 4q1.725 0 3.3.713T18 6.75V4h2v7h-7V9h4.2q-.8-1.4-2.187-2.2T12 6Q9.5 6 7.75 7.75T6 12q0 2.5 1.75 4.25T12 18q1.925 0 3.475-1.1T17.65 14h2.1q-.7 2.65-2.85 4.325T12 20\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=retry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../../src/icons/retry.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,+ZAYrB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-prompt.d.ts","sourceRoot":"","sources":["../../../src/icons/send-prompt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,+NAY1B,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const sendIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M11 20V7.825l-5.6 5.6L4 12l8-8l8 8l-1.4 1.425l-5.6-5.6V20z\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=send.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/icons/send.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,gQAYpB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shorter.d.ts","sourceRoot":"","sources":["../../../src/icons/shorter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,oNAYvB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const translateIcon = "\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"m12.9 16l-2.55-2.5l.05-.05q1.45-1.6 2.262-3.117T13.95 7H16V5h-6V3H8v2H2v2h9.1q-.5 1.2-1.225 2.387T8 11.7q-.6-.6-1.187-1.412T5.85 8.6H3.85q.5 1.4 1.3 2.7T6.95 13.7L2.85 17.75L4.25 19.15L8 15.4L10.55 17.95zM18.5 22h-2L21 10h2l4.5 12h-2l-1.05-3h-4.9zm1.6-5h3.6l-1.8-5.1z\"\n />\n </svg>\n";
|
|
2
|
+
//# sourceMappingURL=translate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translate.d.ts","sourceRoot":"","sources":["../../../src/icons/translate.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,idAYzB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AIPromptContext, AIProvider } from '../../feature/ai/types';
|
|
2
|
+
import { type BaseProviderConfig } from '../shared';
|
|
3
|
+
export interface AnthropicMessage {
|
|
4
|
+
role: 'user' | 'assistant';
|
|
5
|
+
content: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AnthropicBuildMessagesResult {
|
|
8
|
+
system?: string;
|
|
9
|
+
messages: AnthropicMessage[];
|
|
10
|
+
}
|
|
11
|
+
export interface AnthropicProviderConfig extends BaseProviderConfig {
|
|
12
|
+
maxTokens?: number;
|
|
13
|
+
anthropicVersion?: string;
|
|
14
|
+
buildMessages?: (context: AIPromptContext, defaults: {
|
|
15
|
+
systemPrompt: string | null;
|
|
16
|
+
userMessage: string;
|
|
17
|
+
}) => AnthropicBuildMessagesResult;
|
|
18
|
+
body?: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
export declare function createAnthropicProvider(config: AnthropicProviderConfig): AIProvider;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/llm-providers/anthropic/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEzE,OAAO,EACL,KAAK,kBAAkB,EAMxB,MAAM,WAAW,CAAA;AAOlB,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAA;IAC1B,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,4BAA4B;IAG3C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,gBAAgB,EAAE,CAAA;CAC7B;AAED,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IAEjE,SAAS,CAAC,EAAE,MAAM,CAAA;IAGlB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAKzB,aAAa,CAAC,EAAE,CACd,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE;QAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,KAC3D,4BAA4B,CAAA;IAIjC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC/B;AAaD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,uBAAuB,GAC9B,UAAU,CAsEZ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AIPromptContext, AIProvider } from '../../feature/ai/types';
|
|
2
|
+
import { type BaseProviderConfig } from '../shared';
|
|
3
|
+
export interface OpenAIChatMessage {
|
|
4
|
+
role: 'system' | 'user' | 'assistant';
|
|
5
|
+
content: string;
|
|
6
|
+
}
|
|
7
|
+
export interface OpenAIProviderConfig extends BaseProviderConfig {
|
|
8
|
+
buildMessages?: (context: AIPromptContext, defaults: {
|
|
9
|
+
systemPrompt: string | null;
|
|
10
|
+
userMessage: string;
|
|
11
|
+
}) => OpenAIChatMessage[];
|
|
12
|
+
body?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export declare function createOpenAIProvider(config: OpenAIProviderConfig): AIProvider;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/llm-providers/openai/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEzE,OAAO,EACL,KAAK,kBAAkB,EAMxB,MAAM,WAAW,CAAA;AAKlB,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAA;IACrC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAM9D,aAAa,CAAC,EAAE,CACd,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE;QAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,KAC3D,iBAAiB,EAAE,CAAA;IAIxB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC/B;AAYD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,UAAU,CAkD7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.spec.d.ts","sourceRoot":"","sources":["../../../src/llm-providers/providers.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AIPromptContext } from '../feature/ai/types';
|
|
2
|
+
export declare const DEFAULT_SYSTEM_PROMPT = "You are a writing assistant embedded in a markdown editor.\n\nRules:\n- Output markdown only. Never wrap your output in code fences (e.g. ```markdown ... ```).\n- Never include preambles, explanations, or sign-offs \u2014 output only the edited or generated content itself.\n- Preserve the original markdown structure (headings, lists, links, code blocks) unless the instruction explicitly asks to change it.\n- If a <selection> is provided, return only the replacement for that selection \u2014 do not repeat surrounding document context.\n- If no <selection> is provided, return content to insert at the cursor that flows with the surrounding document.";
|
|
3
|
+
export declare function buildDefaultUserMessage(context: AIPromptContext): string;
|
|
4
|
+
export interface BaseProviderConfig {
|
|
5
|
+
apiKey?: string;
|
|
6
|
+
baseURL?: string;
|
|
7
|
+
headers?: Record<string, string>;
|
|
8
|
+
model: string;
|
|
9
|
+
systemPrompt?: string | null;
|
|
10
|
+
dangerouslyAllowBrowser?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function assertBrowserSafe(config: BaseProviderConfig, providerName: string): void;
|
|
13
|
+
export declare function resolveSystemPrompt(systemPrompt: string | null | undefined): string | null;
|
|
14
|
+
export declare function parseSSE(response: Response, signal: AbortSignal): AsyncGenerator<string>;
|
|
15
|
+
export declare function readErrorBody(response: Response, providerName: string): Promise<Error>;
|
|
16
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/llm-providers/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAK1D,eAAO,MAAM,qBAAqB,mpBAOgF,CAAA;AAIlH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAOxE;AAGD,MAAM,WAAW,kBAAkB;IAGjC,MAAM,CAAC,EAAE,MAAM,CAAA;IAKf,OAAO,CAAC,EAAE,MAAM,CAAA;IAIhB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAGhC,KAAK,EAAE,MAAM,CAAA;IAKb,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAQ5B,uBAAuB,CAAC,EAAE,OAAO,CAAA;CAClC;AAoBD,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,kBAAkB,EAC1B,YAAY,EAAE,MAAM,GACnB,IAAI,CAWN;AAID,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACtC,MAAM,GAAG,IAAI,CAGf;AAMD,wBAAuB,QAAQ,CAC7B,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,WAAW,GAClB,cAAc,CAAC,MAAM,CAAC,CAkCxB;AAID,wBAAsB,aAAa,CACjC,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,KAAK,CAAC,CAWhB"}
|
|
@@ -2,7 +2,7 @@ import type { Ctx } from '@milkdown/kit/ctx';
|
|
|
2
2
|
type MenuItem<T> = {
|
|
3
3
|
index: number;
|
|
4
4
|
key: string;
|
|
5
|
-
onRun
|
|
5
|
+
onRun?: (ctx: Ctx) => void;
|
|
6
6
|
} & T;
|
|
7
7
|
type WithRange<T, HasIndex extends true | false = true> = HasIndex extends true ? T & {
|
|
8
8
|
range: [start: number, end: number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-builder.d.ts","sourceRoot":"","sources":["../../../src/utils/group-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAE5C,KAAK,QAAQ,CAAC,CAAC,IAAI;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"group-builder.d.ts","sourceRoot":"","sources":["../../../src/utils/group-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAE5C,KAAK,QAAQ,CAAC,CAAC,IAAI;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAA;CAC3B,GAAG,CAAC,CAAA;AAEL,KAAK,SAAS,CAAC,CAAC,EAAE,QAAQ,SAAS,IAAI,GAAG,KAAK,GAAG,IAAI,IAAI,QAAQ,SAAS,IAAI,GAC3E,CAAC,GAAG;IAAE,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAA;CAAE,GAC3C,CAAC,CAAA;AAEL,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,QAAQ,SAAS,IAAI,GAAG,KAAK,GAAG,IAAI,IAAI,SAAS,CAC5E;IACE,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,QAAQ,SAAS,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAA;CAC5E,EACD,QAAQ,CACT,CAAA;AAED,qBAAa,YAAY,CAAC,CAAC;;IAGzB,KAAK,aAGJ;IAkBD,QAAQ,GAAI,KAAK,MAAM,EAAE,OAAO,MAAM;;iBA/B/B,MAAM;mBACJ,MAAM;;;uBAiBI,MAAM,QAAQ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;;MAuBlE;IAED,QAAQ,GAAI,KAAK,MAAM;;iBA3ChB,MAAM;mBACJ,MAAM;;;uBAiBI,MAAM,QAAQ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;;MA8BlE;IAED,KAAK;aAlDE,MAAM;eACJ,MAAM;;QAmDd;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keep-alive.d.ts","sourceRoot":"","sources":["../../../src/utils/keep-alive.ts"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,CAAC,GAAG,KAAK,EAAE,OAAO,EAAE,QAAI"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milkdown/crepe",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"version": "7.21.0",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"crepe",
|
|
6
|
+
"editor",
|
|
7
|
+
"milkdown",
|
|
8
|
+
"milkdown plugin"
|
|
9
|
+
],
|
|
5
10
|
"license": "MIT",
|
|
6
11
|
"repository": {
|
|
7
12
|
"type": "git",
|
|
8
13
|
"url": "git+https://github.com/Milkdown/milkdown.git",
|
|
9
14
|
"directory": "packages/crepe"
|
|
10
15
|
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"crepe",
|
|
15
|
-
"editor"
|
|
16
|
+
"files": [
|
|
17
|
+
"lib",
|
|
18
|
+
"src"
|
|
16
19
|
],
|
|
20
|
+
"type": "module",
|
|
17
21
|
"sideEffects": false,
|
|
22
|
+
"main": "./lib/esm/index.js",
|
|
18
23
|
"exports": {
|
|
19
24
|
".": {
|
|
20
25
|
"import": "./lib/esm/index.js",
|
|
@@ -26,6 +31,11 @@
|
|
|
26
31
|
"require": "./lib/cjs/builder.js",
|
|
27
32
|
"types": "./lib/types/builder.d.ts"
|
|
28
33
|
},
|
|
34
|
+
"./feature/ai": {
|
|
35
|
+
"import": "./lib/esm/feature/ai/index.js",
|
|
36
|
+
"require": "./lib/cjs/feature/ai/index.js",
|
|
37
|
+
"types": "./lib/types/feature/ai/index.d.ts"
|
|
38
|
+
},
|
|
29
39
|
"./feature/block-edit": {
|
|
30
40
|
"import": "./lib/esm/feature/block-edit/index.js",
|
|
31
41
|
"require": "./lib/cjs/feature/block-edit/index.js",
|
|
@@ -76,6 +86,21 @@
|
|
|
76
86
|
"require": "./lib/cjs/feature/toolbar/index.js",
|
|
77
87
|
"types": "./lib/types/feature/toolbar/index.d.ts"
|
|
78
88
|
},
|
|
89
|
+
"./feature/top-bar": {
|
|
90
|
+
"import": "./lib/esm/feature/top-bar/index.js",
|
|
91
|
+
"require": "./lib/cjs/feature/top-bar/index.js",
|
|
92
|
+
"types": "./lib/types/feature/top-bar/index.d.ts"
|
|
93
|
+
},
|
|
94
|
+
"./llm-providers/openai": {
|
|
95
|
+
"import": "./lib/esm/llm-providers/openai/index.js",
|
|
96
|
+
"require": "./lib/cjs/llm-providers/openai/index.js",
|
|
97
|
+
"types": "./lib/types/llm-providers/openai/index.d.ts"
|
|
98
|
+
},
|
|
99
|
+
"./llm-providers/anthropic": {
|
|
100
|
+
"import": "./lib/esm/llm-providers/anthropic/index.js",
|
|
101
|
+
"require": "./lib/cjs/llm-providers/anthropic/index.js",
|
|
102
|
+
"types": "./lib/types/llm-providers/anthropic/index.d.ts"
|
|
103
|
+
},
|
|
79
104
|
"./theme/common/*": "./lib/theme/common/*",
|
|
80
105
|
"./theme/classic.css": "./lib/theme/crepe/style.css",
|
|
81
106
|
"./theme/classic-dark.css": "./lib/theme/crepe-dark/style.css",
|
|
@@ -84,11 +109,6 @@
|
|
|
84
109
|
"./theme/frame.css": "./lib/theme/frame/style.css",
|
|
85
110
|
"./theme/frame-dark.css": "./lib/theme/frame-dark/style.css"
|
|
86
111
|
},
|
|
87
|
-
"main": "./lib/esm/index.js",
|
|
88
|
-
"files": [
|
|
89
|
-
"lib",
|
|
90
|
-
"src"
|
|
91
|
-
],
|
|
92
112
|
"dependencies": {
|
|
93
113
|
"@codemirror/commands": "^6.2.4",
|
|
94
114
|
"@codemirror/language": "^6.10.1",
|
|
@@ -99,13 +119,14 @@
|
|
|
99
119
|
"@types/lodash-es": "^4.17.12",
|
|
100
120
|
"clsx": "^2.0.0",
|
|
101
121
|
"codemirror": "^6.0.1",
|
|
122
|
+
"dompurify": "^3.2.5",
|
|
102
123
|
"katex": "^0.16.0",
|
|
103
124
|
"lodash-es": "^4.17.21",
|
|
104
125
|
"prosemirror-virtual-cursor": "^0.4.2",
|
|
105
126
|
"remark-math": "^6.0.0",
|
|
106
127
|
"unist-util-visit": "^5.0.0",
|
|
107
128
|
"vue": "^3.5.20",
|
|
108
|
-
"@milkdown/kit": "7.
|
|
129
|
+
"@milkdown/kit": "7.21.0"
|
|
109
130
|
},
|
|
110
131
|
"scripts": {
|
|
111
132
|
"build": "pnpm run build:es && pnpm run build:theme && echo",
|
package/src/core/builder.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { imageBlockConfig } from '@milkdown/kit/component/image-block'
|
|
1
2
|
import {
|
|
2
3
|
type DefaultValue,
|
|
3
4
|
defaultValueCtx,
|
|
@@ -16,14 +17,16 @@ import {
|
|
|
16
17
|
type ListenerManager,
|
|
17
18
|
} from '@milkdown/kit/plugin/listener'
|
|
18
19
|
import { trailing } from '@milkdown/kit/plugin/trailing'
|
|
20
|
+
import { upload, uploadConfig } from '@milkdown/kit/plugin/upload'
|
|
19
21
|
import { commonmark } from '@milkdown/kit/preset/commonmark'
|
|
20
22
|
import { gfm } from '@milkdown/kit/preset/gfm'
|
|
21
23
|
import { getMarkdown } from '@milkdown/kit/utils'
|
|
22
24
|
|
|
23
|
-
import type {
|
|
25
|
+
import type { CrepeFeatureConfig } from '../feature'
|
|
24
26
|
import type { DefineFeature } from '../feature/shared'
|
|
25
27
|
|
|
26
|
-
import {
|
|
28
|
+
import { CrepeFeature } from '../feature'
|
|
29
|
+
import { CrepeCtx, FeaturesCtx, useCrepeFeatures } from './slice'
|
|
27
30
|
|
|
28
31
|
/// The crepe builder configuration.
|
|
29
32
|
export interface CrepeBuilderConfig {
|
|
@@ -69,6 +72,39 @@ export class CrepeBuilder {
|
|
|
69
72
|
...value,
|
|
70
73
|
size: 4,
|
|
71
74
|
}))
|
|
75
|
+
ctx.update(uploadConfig.key, (prev) => ({
|
|
76
|
+
...prev,
|
|
77
|
+
uploader: async (files, schema, ctx) => {
|
|
78
|
+
const features = useCrepeFeatures(ctx).get()
|
|
79
|
+
const hasImageBlock = features.includes(CrepeFeature.ImageBlock)
|
|
80
|
+
const nodeType = hasImageBlock
|
|
81
|
+
? schema.nodes['image-block']
|
|
82
|
+
: schema.nodes['image']
|
|
83
|
+
|
|
84
|
+
if (!nodeType) return []
|
|
85
|
+
|
|
86
|
+
const onUpload = hasImageBlock
|
|
87
|
+
? ctx.get(imageBlockConfig.key).onUpload
|
|
88
|
+
: undefined
|
|
89
|
+
|
|
90
|
+
const images: File[] = []
|
|
91
|
+
for (let i = 0; i < files.length; i++) {
|
|
92
|
+
const file = files.item(i)
|
|
93
|
+
if (file && file.type.includes('image')) images.push(file)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const nodes = await Promise.all(
|
|
97
|
+
images.map(async (file) => {
|
|
98
|
+
const src = onUpload
|
|
99
|
+
? await onUpload(file)
|
|
100
|
+
: URL.createObjectURL(file)
|
|
101
|
+
return nodeType.createAndFill({ src })!
|
|
102
|
+
})
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
return nodes
|
|
106
|
+
},
|
|
107
|
+
}))
|
|
72
108
|
})
|
|
73
109
|
.use(commonmark)
|
|
74
110
|
.use(listener)
|
|
@@ -76,6 +112,7 @@ export class CrepeBuilder {
|
|
|
76
112
|
.use(indent)
|
|
77
113
|
.use(trailing)
|
|
78
114
|
.use(clipboard)
|
|
115
|
+
.use(upload)
|
|
79
116
|
.use(gfm)
|
|
80
117
|
}
|
|
81
118
|
|