@pie-lib/editable-html-tip-tap 3.0.0-next.42 → 3.0.0-next.47

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.
@@ -158,15 +158,16 @@ var _ = new l("ensureTextAfterMath"), v = (e = []) => e.map((e) => ({
158
158
  t !== null && cancelAnimationFrame(t), window.removeEventListener("scroll", n, !0), window.removeEventListener("resize", n);
159
159
  };
160
160
  }, [c, y]), t(() => {
161
- let e = (e) => {
162
- let t = e?.target, n = (document.querySelectorAll?.("[id^=\"equation-editor-select\"][id*=\"listbox\"], [aria-labelledby=\"equation-editor-label\"][role=\"listbox\"]") || []).length > 0, r = !!(t?.id && t.id.includes("equation-editor-select")) || !!t?.closest?.("[id*=\"equation-editor-select\"]"), i = !!t?.closest?.(`.math-node-${C.current}`);
163
- if (x.current && !x.current.contains(t) && !t?.closest?.("[data-inline-node]") && !n && !r && !i) {
161
+ let e = performance.now(), t = (t) => {
162
+ if (t?.timeStamp < e) return;
163
+ let n = t?.target, r = (document.querySelectorAll?.("[id^=\"equation-editor-select\"][id*=\"listbox\"], [aria-labelledby=\"equation-editor-label\"][role=\"listbox\"]") || []).length > 0, i = !!(n?.id && n.id.includes("equation-editor-select")) || !!n?.closest?.("[id*=\"equation-editor-select\"]"), a = !!n?.closest?.(`.math-node-${C.current}`);
164
+ if (x.current && !x.current.contains(n) && !n?.closest?.("[data-inline-node]") && !r && !i && !a) {
164
165
  b(!1);
165
- let e = !!c?.view?.dom?.contains(t);
166
+ let e = !!c?.view?.dom?.contains(n);
166
167
  P(o.attrs.latex, { moveCursorAfterNode: !e });
167
168
  }
168
169
  };
169
- return y ? document.addEventListener("click", e) : document.removeEventListener("click", e), () => document.removeEventListener("click", e);
170
+ return y ? document.addEventListener("click", t) : document.removeEventListener("click", t), () => document.removeEventListener("click", t);
170
171
  }, [
171
172
  c,
172
173
  y,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/editable-html-tip-tap",
3
- "version": "3.0.0-next.42",
3
+ "version": "3.0.0-next.47",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,10 +13,10 @@
13
13
  "@dnd-kit/utilities": "3.2.2",
14
14
  "@mui/icons-material": "^7.3.4",
15
15
  "@mui/material": "^7.3.4",
16
- "@pie-lib/drag": "4.1.0-next.48",
17
- "@pie-lib/math-input": "9.0.0-next.13",
18
- "@pie-lib/math-toolbar": "4.0.0-next.48",
19
- "@pie-lib/render-ui": "6.2.0-next.48",
16
+ "@pie-lib/drag": "4.1.0-next.51",
17
+ "@pie-lib/math-input": "9.0.0-next.16",
18
+ "@pie-lib/math-toolbar": "4.0.0-next.52",
19
+ "@pie-lib/render-ui": "6.2.0-next.50",
20
20
  "@tiptap/core": "3.31.3",
21
21
  "@tiptap/extension-character-count": "3.31.3",
22
22
  "@tiptap/extension-color": "3.31.3",
@@ -34,7 +34,6 @@
34
34
  "@tiptap/pm": "3.31.3",
35
35
  "@tiptap/react": "3.31.3",
36
36
  "@tiptap/starter-kit": "3.31.3",
37
- "change-case": "^3.0.2",
38
37
  "debug": "^4.1.1",
39
38
  "immutable": "^4.0.0-rc.12",
40
39
  "keycode": "^2.2.0",
@@ -44,12 +43,15 @@
44
43
  "react-portal": "^4.2.0",
45
44
  "tippy.js": "latest",
46
45
  "to-style": "^1.3.3",
47
- "@pie-element/shared-lodash": "0.1.1-next.2",
46
+ "@pie-element/shared-lodash": "0.1.1-next.3",
48
47
  "clsx": "^2.1.1",
49
48
  "prosemirror-state": "^1.4.4",
50
- "@pie-element/shared-math-rendering-mathjax": "0.1.1-next.4",
49
+ "@pie-element/shared-math-rendering-mathjax": "0.1.1-next.6",
51
50
  "@tiptap/extensions": "3.31.3",
52
51
  "@tiptap/extension-list": "3.31.3",
52
+ "@tiptap/extension-bubble-menu": "3.31.3",
53
+ "@tiptap/extension-floating-menu": "3.31.3",
54
+ "@floating-ui/dom": "^1.7.6",
53
55
  "@types/react": "^18.2.0",
54
56
  "@types/react-dom": "^18.2.0"
55
57
  },
@@ -1,19 +0,0 @@
1
- /**
2
- * @synced-from pie-lib/packages/editable-html-tip-tap/src/components/media/MediaWrapper.jsx
3
- * @auto-generated
4
- *
5
- * This file is automatically synced from pie-elements and converted to TypeScript.
6
- * Manual edits will be overwritten on next sync.
7
- * To make changes, edit the upstream JavaScript file and run sync again.
8
- */
9
- import React from 'react';
10
- import PropTypes from 'prop-types';
11
- declare class MediaWrapper extends React.Component {
12
- static propTypes: {
13
- children: PropTypes.Requireable<any[]>;
14
- editor: PropTypes.Requireable<boolean>;
15
- width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
16
- };
17
- render(): React.JSX.Element;
18
- }
19
- export default MediaWrapper;
@@ -1,134 +0,0 @@
1
- /**
2
- * @synced-from pie-lib/packages/editable-html-tip-tap/src/styles/editorContainerStyles.js
3
- * @auto-generated
4
- *
5
- * This file is automatically synced from pie-elements and converted to TypeScript.
6
- * Manual edits will be overwritten on next sync.
7
- * To make changes, edit the upstream JavaScript file and run sync again.
8
- */
9
- declare const styles: (theme: any) => {
10
- root: {
11
- position: string;
12
- padding: string;
13
- border: string;
14
- borderRadius: string;
15
- cursor: string;
16
- '& [data-slate-editor="true"]': {
17
- wordBreak: string;
18
- overflow: string;
19
- maxHeight: string;
20
- padding: string;
21
- };
22
- '&:first-child': {
23
- marginTop: number;
24
- };
25
- '& ul, & ol': {
26
- padding: string;
27
- margin: string;
28
- };
29
- '& ul li p, & ol li p': {
30
- marginTop: string;
31
- marginBottom: string;
32
- };
33
- '& h1, & h2, & h3, & h4, & h5, & h6': {
34
- lineHeight: number;
35
- marginTop: string;
36
- textWrap: string;
37
- };
38
- '& h1, & h2': {
39
- marginTop: string;
40
- marginBottom: string;
41
- };
42
- '& h1': {
43
- fontSize: string;
44
- };
45
- '& h2': {
46
- fontSize: string;
47
- };
48
- '& h3': {
49
- fontSize: string;
50
- };
51
- '& h4, & h5, & h6': {
52
- fontSize: string;
53
- };
54
- '& code': {
55
- backgroundColor: string;
56
- borderRadius: string;
57
- color: string;
58
- fontSize: string;
59
- padding: string;
60
- };
61
- '& pre': {
62
- background: string;
63
- borderRadius: string;
64
- color: string;
65
- fontFamily: string;
66
- margin: string;
67
- padding: string;
68
- '& code': {
69
- background: string;
70
- color: string;
71
- fontSize: string;
72
- padding: number;
73
- };
74
- };
75
- '& blockquote': {
76
- background: string;
77
- borderLeft: string;
78
- margin: string;
79
- padding: string;
80
- };
81
- '& hr': {
82
- border: string;
83
- borderTop: string;
84
- margin: string;
85
- };
86
- '& table': {
87
- tableLayout: string;
88
- width: string;
89
- borderCollapse: string;
90
- color: any;
91
- backgroundColor: any;
92
- };
93
- '& table:not([border="1"]) tr': {
94
- borderTop: string;
95
- };
96
- '& td, th': {
97
- padding: string;
98
- textAlign: string;
99
- };
100
- '& table:not([border="1"]) td, th': {
101
- border: string;
102
- };
103
- };
104
- children: {
105
- padding: string;
106
- };
107
- editorHolder: {
108
- position: string;
109
- padding: string;
110
- overflowY: string;
111
- color: any;
112
- backgroundColor: any;
113
- };
114
- disabledScrollbar: {
115
- '&::-webkit-scrollbar': {
116
- display: string;
117
- };
118
- scrollbarWidth: string;
119
- '-ms-overflow-style': string;
120
- };
121
- error: {
122
- border: string;
123
- };
124
- noBorder: {
125
- border: string;
126
- };
127
- noPadding: {
128
- padding: number;
129
- };
130
- toolbarOnTop: {
131
- marginTop: string;
132
- };
133
- };
134
- export default styles;
package/dist/theme.d.ts DELETED
@@ -1,9 +0,0 @@
1
- /**
2
- * @synced-from pie-lib/packages/editable-html-tip-tap/src/theme.js
3
- * @auto-generated
4
- *
5
- * This file is automatically synced from pie-elements and converted to TypeScript.
6
- * Manual edits will be overwritten on next sync.
7
- * To make changes, edit the upstream JavaScript file and run sync again.
8
- */
9
- export declare const primary = "#304ffe";