@limetech/lime-elements 38.12.4 → 38.13.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/CHANGELOG.md +16 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-ai-avatar.cjs.entry.js +1 -1
- package/dist/cjs/limel-ai-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-markdown.cjs.entry.js +49 -1
- package/dist/cjs/limel-markdown.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +41 -20
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{markdown-parser-5b5ed6c4.js → markdown-parser-564adb69.js} +32 -1
- package/dist/cjs/{markdown-parser-5b5ed6c4.js.map → markdown-parser-564adb69.js.map} +1 -1
- package/dist/collection/components/ai-avatar/ai-avatar.css +7 -4
- package/dist/collection/components/markdown/allowed-css-properties.js +3 -0
- package/dist/collection/components/markdown/allowed-css-properties.js.map +1 -1
- package/dist/collection/components/markdown/image-intersection-observer.js +29 -0
- package/dist/collection/components/markdown/image-intersection-observer.js.map +1 -0
- package/dist/collection/components/markdown/image-markdown-plugin.js +28 -0
- package/dist/collection/components/markdown/image-markdown-plugin.js.map +1 -0
- package/dist/collection/components/markdown/markdown-parser.js +2 -0
- package/dist/collection/components/markdown/markdown-parser.js.map +1 -1
- package/dist/collection/components/markdown/markdown.js +38 -0
- package/dist/collection/components/markdown/markdown.js.map +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/node.js +31 -14
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/node.js.map +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/view.js +10 -5
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/image/view.js.map +1 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-ai-avatar.entry.js +1 -1
- package/dist/esm/limel-ai-avatar.entry.js.map +1 -1
- package/dist/esm/limel-markdown.entry.js +49 -1
- package/dist/esm/limel-markdown.entry.js.map +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +41 -20
- package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{markdown-parser-ecdce41c.js → markdown-parser-1c1fdedc.js} +32 -1
- package/dist/esm/{markdown-parser-ecdce41c.js.map → markdown-parser-1c1fdedc.js.map} +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js.map +1 -1
- package/dist/lime-elements/{p-8f4c55fa.entry.js → p-587f6b6d.entry.js} +2 -2
- package/dist/lime-elements/p-587f6b6d.entry.js.map +1 -0
- package/dist/lime-elements/p-98478c6d.entry.js +2 -0
- package/dist/lime-elements/p-98478c6d.entry.js.map +1 -0
- package/dist/lime-elements/p-ce152b39.entry.js +2 -0
- package/dist/lime-elements/p-ce152b39.entry.js.map +1 -0
- package/dist/lime-elements/{p-e5c8cf08.js → p-cf87519f.js} +3 -3
- package/dist/lime-elements/p-cf87519f.js.map +1 -0
- package/dist/types/components/markdown/image-intersection-observer.d.ts +10 -0
- package/dist/types/components/markdown/image-markdown-plugin.d.ts +9 -0
- package/dist/types/components/markdown/markdown-parser.d.ts +1 -0
- package/dist/types/components/markdown/markdown.d.ts +9 -1
- package/dist/types/components/text-editor/prosemirror-adapter/plugins/image/node.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/lime-elements/p-8f4c55fa.entry.js.map +0 -1
- package/dist/lime-elements/p-e5c8cf08.js.map +0 -1
- package/dist/lime-elements/p-eadff599.entry.js +0 -2
- package/dist/lime-elements/p-eadff599.entry.js.map +0 -1
- package/dist/lime-elements/p-f20b7faa.entry.js +0 -2
- package/dist/lime-elements/p-f20b7faa.entry.js.map +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class ImageIntersectionObserver {
|
|
2
|
+
private observer;
|
|
3
|
+
/**
|
|
4
|
+
* @param containerElement - The element containing images to observe.
|
|
5
|
+
*/
|
|
6
|
+
constructor(containerElement: HTMLElement);
|
|
7
|
+
disconnect(): void;
|
|
8
|
+
private readonly handleIntersection;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=image-intersection-observer.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Plugin } from 'unified';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a unified.js plugin that transforms image elements for lazy loading
|
|
4
|
+
*
|
|
5
|
+
* @param lazyLoadImages - Whether to enable lazy loading for images
|
|
6
|
+
* @returns A unified.js plugin function
|
|
7
|
+
*/
|
|
8
|
+
export declare function createLazyLoadImagesPlugin(lazyLoadImages?: boolean): Plugin;
|
|
9
|
+
//# sourceMappingURL=image-markdown-plugin.d.ts.map
|
|
@@ -34,9 +34,17 @@ export declare class Markdown {
|
|
|
34
34
|
* @alpha
|
|
35
35
|
*/
|
|
36
36
|
whitelist?: CustomElementDefinition[];
|
|
37
|
+
/**
|
|
38
|
+
* Enable lazy loading for images
|
|
39
|
+
*/
|
|
40
|
+
lazyLoadImages: boolean;
|
|
37
41
|
textChanged(): Promise<void>;
|
|
38
|
-
componentDidLoad(): Promise<void>;
|
|
39
42
|
private rootElement;
|
|
43
|
+
private imageIntersectionObserver;
|
|
44
|
+
componentDidLoad(): Promise<void>;
|
|
45
|
+
disconnectedCallback(): void;
|
|
40
46
|
render(): any[];
|
|
47
|
+
private setupImageIntersectionObserver;
|
|
48
|
+
private cleanupImageIntersectionObserver;
|
|
41
49
|
}
|
|
42
50
|
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -6,6 +6,7 @@ export declare const imageCache: Map<string, HTMLImageElement>;
|
|
|
6
6
|
type MarkdownSerializerFunction = (state: MarkdownSerializerState, node: Node) => void;
|
|
7
7
|
export declare function getImageNode(language: Languages): Record<string, NodeSpec>;
|
|
8
8
|
export declare function getImageNodeMarkdownSerializer(language: Languages): Record<string, MarkdownSerializerFunction>;
|
|
9
|
+
export declare function applyImageStyles(img: HTMLImageElement, node: Node): void;
|
|
9
10
|
/**
|
|
10
11
|
* Recursively checks if a ProseMirror node or
|
|
11
12
|
* any of its child nodes is an image node.
|
|
@@ -16,7 +17,10 @@ export interface ImageNodeAttrs {
|
|
|
16
17
|
alt: string;
|
|
17
18
|
state: EditorImageState;
|
|
18
19
|
fileInfoId: string | number;
|
|
20
|
+
height?: string;
|
|
19
21
|
width?: string;
|
|
22
|
+
minHeight?: string;
|
|
23
|
+
minWidth?: string;
|
|
20
24
|
maxWidth?: string;
|
|
21
25
|
}
|
|
22
26
|
export {};
|
|
@@ -1935,6 +1935,10 @@ export namespace Components {
|
|
|
1935
1935
|
* @exampleComponent limel-example-markdown-custom-component
|
|
1936
1936
|
*/
|
|
1937
1937
|
interface LimelMarkdown {
|
|
1938
|
+
/**
|
|
1939
|
+
* Enable lazy loading for images
|
|
1940
|
+
*/
|
|
1941
|
+
"lazyLoadImages": boolean;
|
|
1938
1942
|
/**
|
|
1939
1943
|
* The input text. Treated as GitHub Flavored Markdown, with the addition that any included HTML will be parsed and rendered as HTML, rather than as text.
|
|
1940
1944
|
*/
|
|
@@ -6741,6 +6745,10 @@ declare namespace LocalJSX {
|
|
|
6741
6745
|
* @exampleComponent limel-example-markdown-custom-component
|
|
6742
6746
|
*/
|
|
6743
6747
|
interface LimelMarkdown {
|
|
6748
|
+
/**
|
|
6749
|
+
* Enable lazy loading for images
|
|
6750
|
+
*/
|
|
6751
|
+
"lazyLoadImages"?: boolean;
|
|
6744
6752
|
/**
|
|
6745
6753
|
* The input text. Treated as GitHub Flavored Markdown, with the addition that any included HTML will be parsed and rendered as HTML, rather than as text.
|
|
6746
6754
|
*/
|