@limetech/lime-elements 37.70.4 → 37.70.6

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 (36) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/limel-markdown.cjs.entry.js +1 -1
  3. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +2 -2
  4. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
  5. package/dist/cjs/{markdown-parser-ba7cc71e.js → markdown-parser-d1887ec8.js} +12466 -421
  6. package/dist/cjs/markdown-parser-d1887ec8.js.map +1 -0
  7. package/dist/collection/components/markdown/markdown-parser.js +23 -0
  8. package/dist/collection/components/markdown/markdown-parser.js.map +1 -1
  9. package/dist/collection/components/text-editor/utils/html-converter.js +2 -2
  10. package/dist/collection/components/text-editor/utils/html-converter.js.map +1 -1
  11. package/dist/collection/style/mixins.scss +0 -95
  12. package/dist/esm/limel-markdown.entry.js +1 -1
  13. package/dist/esm/limel-prosemirror-adapter.entry.js +2 -2
  14. package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
  15. package/dist/esm/{markdown-parser-3c0af898.js → markdown-parser-90f72b15.js} +12466 -422
  16. package/dist/esm/markdown-parser-90f72b15.js.map +1 -0
  17. package/dist/lime-elements/lime-elements.esm.js +1 -1
  18. package/dist/lime-elements/p-26e8b51d.entry.js +2 -0
  19. package/dist/lime-elements/p-26e8b51d.entry.js.map +1 -0
  20. package/dist/lime-elements/p-3e8afa19.js +8 -0
  21. package/dist/lime-elements/p-3e8afa19.js.map +1 -0
  22. package/dist/lime-elements/{p-da20ff72.entry.js → p-4bfcb8c7.entry.js} +2 -2
  23. package/dist/lime-elements/style/mixins.scss +0 -95
  24. package/dist/scss/mixins.scss +0 -95
  25. package/dist/types/components/markdown/markdown-parser.d.ts +8 -0
  26. package/package.json +2 -1
  27. package/dist/cjs/markdown-parser-ba7cc71e.js.map +0 -1
  28. package/dist/collection/util/3d-tilt-hover-effect.js +0 -124
  29. package/dist/collection/util/3d-tilt-hover-effect.js.map +0 -1
  30. package/dist/esm/markdown-parser-3c0af898.js.map +0 -1
  31. package/dist/lime-elements/p-086509a5.js +0 -8
  32. package/dist/lime-elements/p-086509a5.js.map +0 -1
  33. package/dist/lime-elements/p-7098482d.entry.js +0 -2
  34. package/dist/lime-elements/p-7098482d.entry.js.map +0 -1
  35. package/dist/types/util/3d-tilt-hover-effect.d.ts +0 -93
  36. /package/dist/lime-elements/{p-da20ff72.entry.js.map → p-4bfcb8c7.entry.js.map} +0 -0
@@ -1,93 +0,0 @@
1
- /**
2
- * Utility functions for creating a 3D tilt hover effect.
3
- *
4
- * This module provides functions that enables consumer components to display a nice 3D effect,
5
- * when being hovered; enabling them to follow the cursor's position and tilt towards it.
6
- *
7
- * ## What you need, to make this work
8
- * ### Typescript
9
- * 1. Import the functions:
10
- *
11
- * ```tsx
12
- * import {
13
- * tiltFollowingTheCursor,
14
- * handleMouseEnter,
15
- * handleMouseLeave,
16
- * } from './path/to/3d-tilt-hover-effect';
17
- * ```
18
- *
19
- * 2. In your component, define the necessary properties:
20
- *
21
- * ```tsx
22
- * @Element() private element: HTMLElement;
23
- * private the3dElementBounds: DOMRect;
24
- * ```
25
- *
26
- * 3. If your component does not already have event handlers,
27
- * implement them using the imported functions from this file:
28
- *
29
- * ```tsx
30
- * private handleMouseEnter = () => {
31
- * handleMouseEnter(this.element, 'section', (bounds) => {
32
- * this.the3dElementBounds = bounds;
33
- * }, this.tiltFollowingTheCursor);
34
- * };
35
- *
36
- * private handleMouseLeave = () => {
37
- * handleMouseLeave(this.element, this.tiltFollowingTheCursor);
38
- * };
39
- *
40
- * private tiltFollowingTheCursor = (e: MouseEvent) => {
41
- * tiltFollowingTheCursor(e, this.the3dElementBounds, this.element);
42
- * };
43
- * ```
44
- *
45
- * 4. Attach the event handlers to the relevant elements in your render method:
46
- *
47
- * ```tsx
48
- * public render() {
49
- * return (
50
- * <section
51
- * onMouseEnter={this.handleMouseEnter}
52
- * onMouseLeave={this.handleMouseLeave}
53
- * >
54
- * Your content here
55
- * </section>
56
- * );
57
- * }
58
- * ```
59
- *
60
- * :::note
61
- * - Ensure that the `element` and `the3dElementBounds` properties are properly
62
- * defined in your component.
63
- * - The `selector` parameter in `handleMouseEnter` should match the selector
64
- * of the element you want to apply the 3D effect to.
65
- * - The `tiltFollowingTheCursor` function calculates the 3D rotation and glow
66
- * position based on the cursor's position relative to the element's bounds.
67
- * :::
68
- *
69
- * ### HTML elements + CSS
70
- * 1. Add a `<div class="limel-3d-hover-effect-glow" />` element to your component's template,
71
- * inside the element you want to apply the 3D effect to, and preferably at the bottom of all
72
- * other elements within that element (to avoid the need to specifying `z-index`es).
73
- * 2. Add the following `mixin` to your component's SCSS file:
74
- * `limel-3d-hover-effect-glow($the3dElement, $border-radius);`
75
- *
76
- * and don't forget to define the `$the3dElement` variables for the mixin to work
77
- * (and optionally the `$border-radius`).
78
- * 3. Keep in mind that the `<div class="limel-3d-hover-effect-glow" />` will be
79
- * absolutely positioned inside the parent element, so make sure the parent element
80
- * has `position` set.
81
- * 4. Add the following `mixin` to the host element: `parent-of-the-3d-element`.
82
- * 5. Add the following `mixin` to the 3D element: `the-3d-element`.
83
- * 6. And if your element is supposed to be clickable, add this `mixin` as well: `the-3d-element--clickable`.
84
- *
85
- */
86
- export declare const MOUSE_SCALE_FACTOR = 100;
87
- export declare const ROTATION_DEGREE_MULTIPLIER = 1.6;
88
- export declare const GLOW_POSITION_MULTIPLIER = 2;
89
- export declare const CENTER_DIVISOR = 2;
90
- export declare function tiltFollowingTheCursor(e: MouseEvent, the3dElementBounds: DOMRect, element: HTMLElement): void;
91
- export declare function handleMouseEnter(element: HTMLElement, selector: string, setBounds: (bounds: DOMRect) => void, tiltCallback: (e: MouseEvent) => void): void;
92
- export declare function handleMouseLeave(element: HTMLElement, selector: string, tiltCallback: (e: MouseEvent) => void): void;
93
- //# sourceMappingURL=3d-tilt-hover-effect.d.ts.map