@tempots/beatui 0.93.0 → 0.94.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.
@@ -12,7 +12,7 @@ export { getNodesForPlugins, createDefaultPluginConfig } from './nodes';
12
12
  export { HorizontalRuleNode, $createHorizontalRuleNode, $isHorizontalRuleNode, } from './horizontal-rule-node';
13
13
  export type { SerializedHorizontalRuleNode } from './horizontal-rule-node';
14
14
  export { loadLexicalCore } from './lazy-loader';
15
- export { registerRichTextPlugin, registerPlainTextPlugin, registerHistoryPlugin, registerClipboardPlugin, registerListPlugin, registerLinkPlugin, registerSlashCommandsPlugin, executeSlashCommand, exportToMarkdown, importFromMarkdown, getMarkdownTransformers, exportToHtml, importFromHtml, exportEditorToFile, importFileToEditor, registerTablePlugin, insertTable, registerCodePlugin, registerCodeShikiPlugin, registerHashtagPlugin, registerAutoLinkPlugin, registerMarkPlugin, applyMark, removeMark, registerOverflowPlugin, registerDragonPlugin, registerYjsPlugin, getSelectionInfo, getTextContent, getCharacterCount, getWordCount, loadOffsetUtils, registerHorizontalRulePlugin, HR_TRANSFORMER, } from './plugins';
15
+ export { registerRichTextPlugin, registerPlainTextPlugin, registerHistoryPlugin, registerClipboardPlugin, registerListPlugin, registerLinkPlugin, registerSlashCommandsPlugin, executeSlashCommand, exportToMarkdown, importFromMarkdown, getMarkdownTransformers, exportToHtml, importFromHtml, exportEditorToFile, importFileToEditor, registerTablePlugin, insertTable, registerCodePlugin, registerCodeShikiPlugin, registerHashtagPlugin, registerAutoLinkPlugin, registerMarkPlugin, applyMark, removeMark, registerOverflowPlugin, registerDragonPlugin, registerYjsPlugin, getSelectionInfo, getTextContent, getCharacterCount, getWordCount, loadOffsetUtils, registerHorizontalRulePlugin, HR_TRANSFORMER, buildInlineStyleImportMap, buildStyleImportMap, DEFAULT_INLINE_STYLE_PROPERTIES, } from './plugins';
16
16
  export type { SlashCommandState, SlashCommandCallbacks } from './plugins';
17
17
  export { createHeadlessEditor, markdownToLexicalJson, lexicalJsonToMarkdown, htmlToLexicalJson, lexicalJsonToHtml, } from './headless';
18
18
  export { createCommand, ElementNode, DecoratorNode, TextNode, COMMAND_PRIORITY_LOW, COMMAND_PRIORITY_NORMAL, COMMAND_PRIORITY_HIGH, COMMAND_PRIORITY_EDITOR, COMMAND_PRIORITY_CRITICAL, } from 'lexical';
@@ -27,3 +27,31 @@ export declare function buildElementStyleExportMap(): DOMExportOutputMap;
27
27
  * from imported HTML elements onto the Lexical node style.
28
28
  */
29
29
  export declare function buildElementStyleImportMap(): DOMConversionMap;
30
+ /**
31
+ * Default set of CSS properties to preserve on inline text nodes during
32
+ * HTML import. Matches the properties the toolbar applies via
33
+ * `$patchStyleText()`.
34
+ */
35
+ export declare const DEFAULT_INLINE_STYLE_PROPERTIES: readonly string[];
36
+ /**
37
+ * Build a DOMConversionMap that preserves inline CSS styles from inline
38
+ * HTML elements onto Lexical TextNode.__style.
39
+ *
40
+ * Also replicates Lexical's default format toggling (bold from
41
+ * font-weight, italic from font-style, etc.) since our priority-1
42
+ * handler replaces the default priority-0 handler.
43
+ *
44
+ * @param properties - CSS properties to preserve. Defaults to
45
+ * {@link DEFAULT_INLINE_STYLE_PROPERTIES}.
46
+ */
47
+ export declare function buildInlineStyleImportMap(properties?: readonly string[]): DOMConversionMap;
48
+ /**
49
+ * Build a combined DOMConversionMap that preserves styles for both
50
+ * block-level elements (text-align, background-color on p/h1-h6)
51
+ * and inline elements (color, font-size, font-family, background-color
52
+ * on span/em/strong/etc.).
53
+ *
54
+ * @param inlineProperties - CSS properties to preserve on inline text
55
+ * nodes. Defaults to {@link DEFAULT_INLINE_STYLE_PROPERTIES}.
56
+ */
57
+ export declare function buildStyleImportMap(inlineProperties?: readonly string[]): DOMConversionMap;
@@ -22,4 +22,4 @@ export { getSelectionInfo } from './selection';
22
22
  export { getTextContent, getCharacterCount, getWordCount } from './text';
23
23
  export { loadOffsetUtils } from './offset';
24
24
  export { registerHorizontalRulePlugin, HR_TRANSFORMER } from './horizontal-rule';
25
- export { registerElementStylePlugin, buildElementStyleExportMap, buildElementStyleImportMap, mergeElementStyle, getElementStyleProperty, } from './element-style';
25
+ export { registerElementStylePlugin, buildElementStyleExportMap, buildElementStyleImportMap, buildInlineStyleImportMap, buildStyleImportMap, DEFAULT_INLINE_STYLE_PROPERTIES, mergeElementStyle, getElementStyleProperty, } from './element-style';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tempots/beatui",
3
- "version": "0.93.0",
3
+ "version": "0.94.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.umd.js",
6
6
  "module": "dist/index.es.js",