@micromag/element-quote 0.4.71 → 0.4.74
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/es/index.js +201 -43
- package/package.json +9 -7
package/es/index.js
CHANGED
|
@@ -1,63 +1,221 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import { useId } from 'react';
|
|
5
4
|
import { LinkStyle, HighlightStyle } from '@micromag/core/components';
|
|
6
5
|
import { getStyleFromLink, getStyleFromHighlight, getStyleFromText, getStyleFromMargin, cssEscape } from '@micromag/core/utils';
|
|
7
|
-
import { jsxs, Fragment
|
|
6
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
7
|
|
|
9
8
|
var styles = {"container":"micromag-element-quote-container","showEmpty":"micromag-element-quote-showEmpty"};
|
|
10
9
|
|
|
11
|
-
function Quote(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
textStyle
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
10
|
+
function Quote(t0) {
|
|
11
|
+
const $ = c(43);
|
|
12
|
+
const {
|
|
13
|
+
body: t1,
|
|
14
|
+
textStyle: t2,
|
|
15
|
+
linksStyle: t3,
|
|
16
|
+
margin: t4,
|
|
17
|
+
showEmpty: t5,
|
|
18
|
+
className: t6,
|
|
19
|
+
emptyClassName: t7
|
|
20
|
+
} = t0;
|
|
21
|
+
const body = t1 === undefined ? null : t1;
|
|
22
|
+
const textStyle = t2 === undefined ? null : t2;
|
|
23
|
+
const linksStyle = t3 === undefined ? null : t3;
|
|
24
|
+
const margin = t4 === undefined ? null : t4;
|
|
25
|
+
const showEmpty = t5 === undefined ? false : t5;
|
|
26
|
+
const className = t6 === undefined ? null : t6;
|
|
27
|
+
const emptyClassName = t7 === undefined ? null : t7;
|
|
28
|
+
let t8;
|
|
29
|
+
if ($[0] !== textStyle) {
|
|
30
|
+
t8 = textStyle || {};
|
|
31
|
+
$[0] = textStyle;
|
|
32
|
+
$[1] = t8;
|
|
33
|
+
} else {
|
|
34
|
+
t8 = $[1];
|
|
35
|
+
}
|
|
36
|
+
const {
|
|
37
|
+
link: t9,
|
|
38
|
+
highlight: t10
|
|
39
|
+
} = t8;
|
|
40
|
+
const linkStyle = t9 === undefined ? null : t9;
|
|
41
|
+
const highlightStyle = t10 === undefined ? null : t10;
|
|
42
|
+
let t11;
|
|
43
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
44
|
+
t11 = {};
|
|
45
|
+
$[2] = t11;
|
|
46
|
+
} else {
|
|
47
|
+
t11 = $[2];
|
|
48
|
+
}
|
|
49
|
+
let finalStyle = t11;
|
|
50
|
+
let t12;
|
|
51
|
+
if ($[3] !== linkStyle) {
|
|
52
|
+
t12 = linkStyle !== null ? getStyleFromLink(linkStyle) : null;
|
|
53
|
+
$[3] = linkStyle;
|
|
54
|
+
$[4] = t12;
|
|
55
|
+
} else {
|
|
56
|
+
t12 = $[4];
|
|
57
|
+
}
|
|
58
|
+
let finalLinkStyle = t12;
|
|
59
|
+
let t13;
|
|
60
|
+
if ($[5] !== highlightStyle) {
|
|
61
|
+
t13 = highlightStyle !== null ? getStyleFromHighlight(highlightStyle) : null;
|
|
62
|
+
$[5] = highlightStyle;
|
|
63
|
+
$[6] = t13;
|
|
64
|
+
} else {
|
|
65
|
+
t13 = $[6];
|
|
66
|
+
}
|
|
67
|
+
const finalHighlightStyle = t13;
|
|
34
68
|
if (textStyle !== null) {
|
|
35
|
-
|
|
69
|
+
const t14 = finalStyle;
|
|
70
|
+
let t15;
|
|
71
|
+
if ($[7] !== textStyle) {
|
|
72
|
+
t15 = getStyleFromText(textStyle);
|
|
73
|
+
$[7] = textStyle;
|
|
74
|
+
$[8] = t15;
|
|
75
|
+
} else {
|
|
76
|
+
t15 = $[8];
|
|
77
|
+
}
|
|
78
|
+
let t16;
|
|
79
|
+
if ($[9] !== t15) {
|
|
80
|
+
t16 = {
|
|
81
|
+
...t14,
|
|
82
|
+
...t15
|
|
83
|
+
};
|
|
84
|
+
$[9] = t15;
|
|
85
|
+
$[10] = t16;
|
|
86
|
+
} else {
|
|
87
|
+
t16 = $[10];
|
|
88
|
+
}
|
|
89
|
+
finalStyle = t16;
|
|
36
90
|
}
|
|
37
91
|
if (margin !== null) {
|
|
38
|
-
|
|
92
|
+
const t14 = finalStyle;
|
|
93
|
+
let t15;
|
|
94
|
+
if ($[11] !== margin) {
|
|
95
|
+
t15 = getStyleFromMargin(margin);
|
|
96
|
+
$[11] = margin;
|
|
97
|
+
$[12] = t15;
|
|
98
|
+
} else {
|
|
99
|
+
t15 = $[12];
|
|
100
|
+
}
|
|
101
|
+
let t16;
|
|
102
|
+
if ($[13] !== finalStyle || $[14] !== t15) {
|
|
103
|
+
t16 = {
|
|
104
|
+
...t14,
|
|
105
|
+
...t15
|
|
106
|
+
};
|
|
107
|
+
$[13] = finalStyle;
|
|
108
|
+
$[14] = t15;
|
|
109
|
+
$[15] = t16;
|
|
110
|
+
} else {
|
|
111
|
+
t16 = $[15];
|
|
112
|
+
}
|
|
113
|
+
finalStyle = t16;
|
|
39
114
|
}
|
|
40
115
|
if (linksStyle !== null) {
|
|
41
|
-
|
|
116
|
+
const t14 = finalLinkStyle;
|
|
117
|
+
let t15;
|
|
118
|
+
if ($[16] !== linksStyle) {
|
|
119
|
+
t15 = getStyleFromText(linksStyle);
|
|
120
|
+
$[16] = linksStyle;
|
|
121
|
+
$[17] = t15;
|
|
122
|
+
} else {
|
|
123
|
+
t15 = $[17];
|
|
124
|
+
}
|
|
125
|
+
let t16;
|
|
126
|
+
if ($[18] !== finalLinkStyle || $[19] !== t15) {
|
|
127
|
+
t16 = {
|
|
128
|
+
...t14,
|
|
129
|
+
...t15
|
|
130
|
+
};
|
|
131
|
+
$[18] = finalLinkStyle;
|
|
132
|
+
$[19] = t15;
|
|
133
|
+
$[20] = t16;
|
|
134
|
+
} else {
|
|
135
|
+
t16 = $[20];
|
|
136
|
+
}
|
|
137
|
+
finalLinkStyle = t16;
|
|
42
138
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
139
|
+
const uniqueId = useId();
|
|
140
|
+
const id = finalLinkStyle !== null ? `quote-component-${uniqueId}` : null;
|
|
141
|
+
let t14;
|
|
142
|
+
if ($[21] !== finalLinkStyle || $[22] !== id) {
|
|
143
|
+
t14 = finalLinkStyle !== null ? /*#__PURE__*/jsx(LinkStyle, {
|
|
144
|
+
selector: `#${cssEscape(id)}`,
|
|
48
145
|
style: finalLinkStyle
|
|
49
|
-
}) : null
|
|
50
|
-
|
|
146
|
+
}) : null;
|
|
147
|
+
$[21] = finalLinkStyle;
|
|
148
|
+
$[22] = id;
|
|
149
|
+
$[23] = t14;
|
|
150
|
+
} else {
|
|
151
|
+
t14 = $[23];
|
|
152
|
+
}
|
|
153
|
+
let t15;
|
|
154
|
+
if ($[24] !== finalHighlightStyle || $[25] !== id) {
|
|
155
|
+
t15 = finalHighlightStyle !== null ? /*#__PURE__*/jsx(HighlightStyle, {
|
|
156
|
+
selector: `#${cssEscape(id)}`,
|
|
51
157
|
style: finalHighlightStyle
|
|
52
|
-
}) : null
|
|
158
|
+
}) : null;
|
|
159
|
+
$[24] = finalHighlightStyle;
|
|
160
|
+
$[25] = id;
|
|
161
|
+
$[26] = t15;
|
|
162
|
+
} else {
|
|
163
|
+
t15 = $[26];
|
|
164
|
+
}
|
|
165
|
+
const t16 = showEmpty && emptyClassName !== null;
|
|
166
|
+
let t17;
|
|
167
|
+
if ($[27] !== className || $[28] !== emptyClassName || $[29] !== showEmpty || $[30] !== t16) {
|
|
168
|
+
t17 = classNames([styles.container, className, {
|
|
169
|
+
[styles.showEmpty]: showEmpty,
|
|
170
|
+
[emptyClassName]: t16
|
|
171
|
+
}]);
|
|
172
|
+
$[27] = className;
|
|
173
|
+
$[28] = emptyClassName;
|
|
174
|
+
$[29] = showEmpty;
|
|
175
|
+
$[30] = t16;
|
|
176
|
+
$[31] = t17;
|
|
177
|
+
} else {
|
|
178
|
+
t17 = $[31];
|
|
179
|
+
}
|
|
180
|
+
let t18;
|
|
181
|
+
if ($[32] !== body) {
|
|
182
|
+
t18 = {
|
|
183
|
+
__html: body
|
|
184
|
+
};
|
|
185
|
+
$[32] = body;
|
|
186
|
+
$[33] = t18;
|
|
187
|
+
} else {
|
|
188
|
+
t18 = $[33];
|
|
189
|
+
}
|
|
190
|
+
let t19;
|
|
191
|
+
if ($[34] !== finalStyle || $[35] !== id || $[36] !== t17 || $[37] !== t18) {
|
|
192
|
+
t19 = /*#__PURE__*/jsx("blockquote", {
|
|
53
193
|
id: id,
|
|
54
|
-
className:
|
|
194
|
+
className: t17,
|
|
55
195
|
style: finalStyle,
|
|
56
|
-
dangerouslySetInnerHTML:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
196
|
+
dangerouslySetInnerHTML: t18
|
|
197
|
+
});
|
|
198
|
+
$[34] = finalStyle;
|
|
199
|
+
$[35] = id;
|
|
200
|
+
$[36] = t17;
|
|
201
|
+
$[37] = t18;
|
|
202
|
+
$[38] = t19;
|
|
203
|
+
} else {
|
|
204
|
+
t19 = $[38];
|
|
205
|
+
}
|
|
206
|
+
let t20;
|
|
207
|
+
if ($[39] !== t14 || $[40] !== t15 || $[41] !== t19) {
|
|
208
|
+
t20 = /*#__PURE__*/jsxs(Fragment, {
|
|
209
|
+
children: [t14, t15, t19]
|
|
210
|
+
});
|
|
211
|
+
$[39] = t14;
|
|
212
|
+
$[40] = t15;
|
|
213
|
+
$[41] = t19;
|
|
214
|
+
$[42] = t20;
|
|
215
|
+
} else {
|
|
216
|
+
t20 = $[42];
|
|
217
|
+
}
|
|
218
|
+
return t20;
|
|
61
219
|
}
|
|
62
220
|
|
|
63
221
|
export { Quote as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-quote",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.74",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -32,9 +32,11 @@
|
|
|
32
32
|
"license": "ISC",
|
|
33
33
|
"type": "module",
|
|
34
34
|
"module": "es/index.js",
|
|
35
|
+
"style": "./assets/css/styles.css",
|
|
35
36
|
"exports": {
|
|
36
37
|
".": {
|
|
37
38
|
"types": "./es/index.d.ts",
|
|
39
|
+
"style": "./assets/css/styles.css",
|
|
38
40
|
"import": "./es/index.js"
|
|
39
41
|
},
|
|
40
42
|
"./assets/css/styles": "./assets/css/styles.css",
|
|
@@ -51,16 +53,16 @@
|
|
|
51
53
|
"build": "../../scripts/prepare-package.sh --types"
|
|
52
54
|
},
|
|
53
55
|
"devDependencies": {
|
|
54
|
-
"react": "^
|
|
55
|
-
"react-dom": "^
|
|
56
|
+
"react": "^19.0.0",
|
|
57
|
+
"react-dom": "^19.0.0"
|
|
56
58
|
},
|
|
57
59
|
"peerDependencies": {
|
|
58
|
-
"react": "^
|
|
59
|
-
"react-dom": "^
|
|
60
|
+
"react": "^19.0.0",
|
|
61
|
+
"react-dom": "^19.0.0"
|
|
60
62
|
},
|
|
61
63
|
"dependencies": {
|
|
62
64
|
"@babel/runtime": "^7.28.6",
|
|
63
|
-
"@micromag/core": "^0.4.
|
|
65
|
+
"@micromag/core": "^0.4.74",
|
|
64
66
|
"classnames": "^2.2.6",
|
|
65
67
|
"react-intl": "^8.1.3 || ^10.0.0",
|
|
66
68
|
"uuid": "^9.0.0"
|
|
@@ -69,6 +71,6 @@
|
|
|
69
71
|
"access": "public",
|
|
70
72
|
"registry": "https://registry.npmjs.org/"
|
|
71
73
|
},
|
|
72
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "fe510ee87845280d0760cb292aef9d2eb69e67c1",
|
|
73
75
|
"types": "es/index.d.ts"
|
|
74
76
|
}
|