zt-react-milkdown 0.1.21 → 0.1.23
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/dist/index.cjs +6 -6
- package/dist/index.mjs +719 -687
- package/dist/src/core/createEditor.d.ts.map +1 -1
- package/dist/src/plugins/custom/code-block/code-block-language-picker.d.ts.map +1 -1
- package/dist/src/plugins/custom/code-block/code-block-language.d.ts +16 -0
- package/dist/src/plugins/custom/code-block/code-block-language.d.ts.map +1 -1
- package/dist/src/plugins/custom/code-block/index.d.ts +2 -0
- package/dist/src/plugins/custom/code-block/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEditor.d.ts","sourceRoot":"","sources":["../../../src/core/createEditor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAEL,MAAM,EAKP,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"createEditor.d.ts","sourceRoot":"","sources":["../../../src/core/createEditor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAEL,MAAM,EAKP,MAAM,gBAAgB,CAAC;AA8CxB;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,cAAc;IACd,IAAI,EAAE,MAAM,CAAC;IACb,cAAc;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,wBAAwB;IACxB,MAAM,EAAE,oBAAoB,CAAC;IAC7B,6BAA6B;IAC7B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,4BAA4B;IAC5B,WAAW,EAAE,CAAC,WAAW,CAAC,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAC5D,sBAAsB;IACtB,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,cAAc;IACd,IAAI,EAAE,WAAW,CAAC;IAClB,yBAAyB;IACzB,eAAe,EAAE,WAAW,CAAC;IAC7B,2BAA2B;IAC3B,sBAAsB,EAAE,WAAW,CAAC;IACpC,sBAAsB;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY;IACZ,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa;IACb,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,aAAa;IACb,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,kBAAkB;IAClB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,cAAc;IACd,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,qBAAqB;IACrB,QAAQ,EAAE,mBAAmB,CAAC;CAC/B;AAqED;;GAEG;AACH,eAAO,MAAM,2BAA2B,GACtC,SAAS,kCAAkC,KAC1C,qBA2LF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-block-language-picker.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/custom/code-block/code-block-language-picker.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAoBzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"code-block-language-picker.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/custom/code-block/code-block-language-picker.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAoBzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AA4qBzD;;GAEG;AACH,eAAO,MAAM,mCAAmC,GAC9C,UAAU,kBAAkB,EAC5B,iBAAiB,WAAW,KAC3B,UAAU,CAAC,OAAO,MAAM,CAO1B,CAAC"}
|
|
@@ -1,10 +1,26 @@
|
|
|
1
|
+
import { codeBlockSchema } from '@milkdown/preset-commonmark';
|
|
2
|
+
import { GetNodeSchema } from '@milkdown/utils';
|
|
1
3
|
export declare const PLAIN_TEXT_LANGUAGE_VALUE = "text";
|
|
4
|
+
/**
|
|
5
|
+
* 代码块语言 schema 配置上下文。
|
|
6
|
+
*/
|
|
7
|
+
interface CodeBlockLanguageSchemaConfigContext {
|
|
8
|
+
/** 读取代码块 schema 配置。 */
|
|
9
|
+
get: (key: typeof codeBlockSchema.key) => GetNodeSchema;
|
|
10
|
+
/** 写入代码块 schema 配置。 */
|
|
11
|
+
set: (key: typeof codeBlockSchema.key, value: GetNodeSchema) => void;
|
|
12
|
+
}
|
|
2
13
|
/**
|
|
3
14
|
* 规范化代码块语言值。
|
|
4
15
|
*/
|
|
5
16
|
export declare const normalizeCodeBlockLanguage: (language: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* 配置代码块语言的默认值与 Markdown 转换规则。
|
|
19
|
+
*/
|
|
20
|
+
export declare const configureCodeBlockLanguageSchema: (ctx: CodeBlockLanguageSchemaConfigContext) => void;
|
|
6
21
|
/**
|
|
7
22
|
* 判断代码块语言是否支持静态预览。
|
|
8
23
|
*/
|
|
9
24
|
export declare const isCodeBlockPreviewLanguage: (language: string) => boolean;
|
|
25
|
+
export {};
|
|
10
26
|
//# sourceMappingURL=code-block-language.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-block-language.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/custom/code-block/code-block-language.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"code-block-language.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/custom/code-block/code-block-language.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,eAAO,MAAM,yBAAyB,SAAS,CAAC;AAEhD;;GAEG;AACH,UAAU,oCAAoC;IAC5C,uBAAuB;IACvB,GAAG,EAAE,CAAC,GAAG,EAAE,OAAO,eAAe,CAAC,GAAG,KAAK,aAAa,CAAC;IACxD,uBAAuB;IACvB,GAAG,EAAE,CAAC,GAAG,EAAE,OAAO,eAAe,CAAC,GAAG,EAAE,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CACtE;AAcD;;GAEG;AACH,eAAO,MAAM,0BAA0B,GAAI,UAAU,MAAM,KAAG,MAgB7D,CAAC;AA0CF;;GAEG;AACH,eAAO,MAAM,gCAAgC,GAC3C,KAAK,oCAAoC,KACxC,IAIF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,GAAI,UAAU,MAAM,KAAG,OACkB,CAAC"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
export * from './code-block-editable';
|
|
3
3
|
/** 代码块语言选择器插件导出。 */
|
|
4
4
|
export * from './code-block-language-picker';
|
|
5
|
+
/** 代码块语言规则导出。 */
|
|
6
|
+
export * from './code-block-language';
|
|
5
7
|
/** 代码块内 Mod-A 全选插件导出。 */
|
|
6
8
|
export * from './code-block-mod-a-select';
|
|
7
9
|
/** 代码块 Prism 高亮插件导出。 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/custom/code-block/index.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB,cAAc,uBAAuB,CAAC;AACtC,oBAAoB;AACpB,cAAc,8BAA8B,CAAC;AAC7C,yBAAyB;AACzB,cAAc,2BAA2B,CAAC;AAC1C,wBAAwB;AACxB,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/custom/code-block/index.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB,cAAc,uBAAuB,CAAC;AACtC,oBAAoB;AACpB,cAAc,8BAA8B,CAAC;AAC7C,iBAAiB;AACjB,cAAc,uBAAuB,CAAC;AACtC,yBAAyB;AACzB,cAAc,2BAA2B,CAAC;AAC1C,wBAAwB;AACxB,cAAc,oBAAoB,CAAC"}
|