@galacean/effects-plugin-rich-text 2.3.0-alpha.2 → 2.3.0-beta.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/dist/alipay.js +1 -621
- package/dist/alipay.js.map +1 -1
- package/dist/alipay.mjs +1 -593
- package/dist/alipay.mjs.map +1 -1
- package/dist/douyin.js +1 -621
- package/dist/douyin.js.map +1 -1
- package/dist/douyin.mjs +1 -593
- package/dist/douyin.mjs.map +1 -1
- package/dist/index.js +38 -20
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/index.mjs +38 -20
- package/dist/index.mjs.map +1 -1
- package/dist/rich-text-component.d.ts +1 -0
- package/dist/weapp.js +1 -621
- package/dist/weapp.js.map +1 -1
- package/dist/weapp.mjs +1 -593
- package/dist/weapp.mjs.map +1 -1
- package/package.json +2 -2
package/dist/alipay.mjs
CHANGED
|
@@ -1,594 +1,2 @@
|
|
|
1
|
-
import * as EFFECTS from '@galacean/effects/alipay';
|
|
2
|
-
import { AbstractPlugin, effectsClass, spec, math, assertExist, Texture, glContext, TextStyle, TextLayout, TextComponent, registerPlugin, VFXItem, logger } from '@galacean/effects/alipay';
|
|
3
|
-
|
|
4
|
-
function _set_prototype_of(o, p) {
|
|
5
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6
|
-
o.__proto__ = p;
|
|
7
|
-
return o;
|
|
8
|
-
};
|
|
9
|
-
return _set_prototype_of(o, p);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function _inherits(subClass, superClass) {
|
|
13
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
14
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
15
|
-
}
|
|
16
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
17
|
-
constructor: {
|
|
18
|
-
value: subClass,
|
|
19
|
-
writable: true,
|
|
20
|
-
configurable: true
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
var RichTextLoader = /*#__PURE__*/ function(AbstractPlugin) {
|
|
27
|
-
_inherits(RichTextLoader, AbstractPlugin);
|
|
28
|
-
function RichTextLoader() {
|
|
29
|
-
var _this;
|
|
30
|
-
_this = AbstractPlugin.apply(this, arguments) || this;
|
|
31
|
-
_this.name = "rich-text";
|
|
32
|
-
return _this;
|
|
33
|
-
}
|
|
34
|
-
return RichTextLoader;
|
|
35
|
-
}(AbstractPlugin);
|
|
36
|
-
|
|
37
|
-
function _array_like_to_array(arr, len) {
|
|
38
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
39
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
40
|
-
return arr2;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
44
|
-
if (!o) return;
|
|
45
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
46
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
47
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
48
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
49
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
|
|
53
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
54
|
-
if (it) return (it = it.call(o)).next.bind(it);
|
|
55
|
-
// Fallback for engines without symbol support
|
|
56
|
-
if (Array.isArray(o) || (it = _unsupported_iterable_to_array(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
57
|
-
if (it) o = it;
|
|
58
|
-
var i = 0;
|
|
59
|
-
return function() {
|
|
60
|
-
if (i >= o.length) return {
|
|
61
|
-
done: true
|
|
62
|
-
};
|
|
63
|
-
return {
|
|
64
|
-
done: false,
|
|
65
|
-
value: o[i++]
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
var TokenType;
|
|
73
|
-
(function(TokenType) {
|
|
74
|
-
TokenType["ContextStart"] = "ContextStart";
|
|
75
|
-
TokenType["Text"] = "Text";
|
|
76
|
-
TokenType["ContextEnd"] = "ContextEnd";
|
|
77
|
-
})(TokenType || (TokenType = {}));
|
|
78
|
-
var contextStartRegexp = /^<([a-z]+)(=([^>]+))?>$/;
|
|
79
|
-
var contextEndRegexp = /^<\/([a-z]+)>$/;
|
|
80
|
-
var rules = [
|
|
81
|
-
[
|
|
82
|
-
"ContextStart",
|
|
83
|
-
/^<[a-z]+(=[^>]+)?>/
|
|
84
|
-
],
|
|
85
|
-
[
|
|
86
|
-
"Text",
|
|
87
|
-
/^[^</>=]+/
|
|
88
|
-
],
|
|
89
|
-
[
|
|
90
|
-
"ContextEnd",
|
|
91
|
-
/^<\/[a-z]+>/
|
|
92
|
-
]
|
|
93
|
-
];
|
|
94
|
-
var lexer = function(input, lexed, cursor) {
|
|
95
|
-
if (lexed === void 0) lexed = [];
|
|
96
|
-
if (cursor === void 0) cursor = 0;
|
|
97
|
-
if (!input) {
|
|
98
|
-
return lexed;
|
|
99
|
-
}
|
|
100
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(rules), _step; !(_step = _iterator()).done;){
|
|
101
|
-
var _step_value = _step.value, tokenType = _step_value[0], regex = _step_value[1];
|
|
102
|
-
var _regex_exec;
|
|
103
|
-
var _ref = (_regex_exec = regex.exec(input)) != null ? _regex_exec : [], tokenMatch = _ref[0];
|
|
104
|
-
if (tokenMatch) {
|
|
105
|
-
var len = tokenMatch.length;
|
|
106
|
-
return lexer(input.slice(len), lexed.concat({
|
|
107
|
-
tokenType: tokenType,
|
|
108
|
-
value: tokenMatch
|
|
109
|
-
}), cursor + len);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
throw new Error('Unexpected token: "' + input[0] + '" at position ' + cursor + ' while reading "' + input + '"');
|
|
113
|
-
};
|
|
114
|
-
var richTextParser = function(input) {
|
|
115
|
-
var Text = function Text() {
|
|
116
|
-
var maybeText = peek();
|
|
117
|
-
if ((maybeText == null ? void 0 : maybeText.tokenType) === "Text") {
|
|
118
|
-
shift();
|
|
119
|
-
return maybeText.value;
|
|
120
|
-
}
|
|
121
|
-
return undefined;
|
|
122
|
-
};
|
|
123
|
-
var ContextStart = function ContextStart() {
|
|
124
|
-
var maybeContextStart = peek();
|
|
125
|
-
if ((maybeContextStart == null ? void 0 : maybeContextStart.tokenType) === "ContextStart") {
|
|
126
|
-
shift();
|
|
127
|
-
var matches = maybeContextStart.value.match(contextStartRegexp);
|
|
128
|
-
if (matches) {
|
|
129
|
-
var attributeName = matches[1];
|
|
130
|
-
var _matches_;
|
|
131
|
-
var attributeParam = (_matches_ = matches[3]) != null ? _matches_ : "";
|
|
132
|
-
return {
|
|
133
|
-
attributeName: attributeName,
|
|
134
|
-
attributeParam: attributeParam
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
throw new Error("Expected a start tag marker at position " + cursor);
|
|
138
|
-
}
|
|
139
|
-
return {};
|
|
140
|
-
};
|
|
141
|
-
var ContextEnd = function ContextEnd() {
|
|
142
|
-
var maybeContextEnd = peek();
|
|
143
|
-
if ((maybeContextEnd == null ? void 0 : maybeContextEnd.tokenType) === "ContextEnd") {
|
|
144
|
-
shift();
|
|
145
|
-
var matches = maybeContextEnd.value.match(contextEndRegexp);
|
|
146
|
-
if (matches) {
|
|
147
|
-
var attributeName = matches[1];
|
|
148
|
-
return {
|
|
149
|
-
attributeName: attributeName
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
throw new Error("Expect an end tag marker at position " + cursor);
|
|
153
|
-
}
|
|
154
|
-
return {};
|
|
155
|
-
};
|
|
156
|
-
var lexed = lexer(input);
|
|
157
|
-
var cursor = 0;
|
|
158
|
-
var shift = function() {
|
|
159
|
-
var shifted = lexed.shift();
|
|
160
|
-
var _shifted_value_length;
|
|
161
|
-
cursor += (_shifted_value_length = shifted == null ? void 0 : shifted.value.length) != null ? _shifted_value_length : 0;
|
|
162
|
-
return shifted;
|
|
163
|
-
};
|
|
164
|
-
var peek = function() {
|
|
165
|
-
return lexed[0];
|
|
166
|
-
};
|
|
167
|
-
var ast = [];
|
|
168
|
-
function Grammar(attributes, expectedEndAttributeName) {
|
|
169
|
-
if (attributes === void 0) attributes = [];
|
|
170
|
-
if (expectedEndAttributeName === void 0) expectedEndAttributeName = "";
|
|
171
|
-
var parsing = true;
|
|
172
|
-
while(parsing){
|
|
173
|
-
var maybeText = Text();
|
|
174
|
-
if (maybeText) {
|
|
175
|
-
ast.push({
|
|
176
|
-
attributes: attributes,
|
|
177
|
-
text: maybeText
|
|
178
|
-
});
|
|
179
|
-
continue;
|
|
180
|
-
}
|
|
181
|
-
var _ContextStart = ContextStart(), attributeName = _ContextStart.attributeName, attributeParam = _ContextStart.attributeParam;
|
|
182
|
-
if (attributeName) {
|
|
183
|
-
Grammar(attributes.concat({
|
|
184
|
-
attributeName: attributeName,
|
|
185
|
-
attributeParam: attributeParam
|
|
186
|
-
}), attributeName);
|
|
187
|
-
continue;
|
|
188
|
-
}
|
|
189
|
-
if (expectedEndAttributeName) {
|
|
190
|
-
var _ContextEnd = ContextEnd(), endAttributeName = _ContextEnd.attributeName;
|
|
191
|
-
if (!endAttributeName) {
|
|
192
|
-
throw new Error('Expect an end tag marker "' + expectedEndAttributeName + '" at position ' + cursor + " but found no tag!");
|
|
193
|
-
}
|
|
194
|
-
if (endAttributeName !== expectedEndAttributeName) {
|
|
195
|
-
throw new Error('Expect an end tag marker "' + expectedEndAttributeName + '" at position ' + cursor + ' but found tag "' + endAttributeName + '"');
|
|
196
|
-
}
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
Grammar();
|
|
203
|
-
return ast;
|
|
204
|
-
};
|
|
205
|
-
function generateProgram(textHandler) {
|
|
206
|
-
return function(richText) {
|
|
207
|
-
var ast = richTextParser(richText);
|
|
208
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(ast), _step; !(_step = _iterator()).done;){
|
|
209
|
-
var node = _step.value;
|
|
210
|
-
var text = node.text;
|
|
211
|
-
var context = node.attributes.reduce(function(ctx, param) {
|
|
212
|
-
var attributeName = param.attributeName, attributeParam = param.attributeParam;
|
|
213
|
-
if (attributeName) {
|
|
214
|
-
ctx[attributeName] = attributeParam;
|
|
215
|
-
}
|
|
216
|
-
return ctx;
|
|
217
|
-
}, {});
|
|
218
|
-
textHandler(text, context);
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
function isRichText(text) {
|
|
223
|
-
var lexed = lexer(text);
|
|
224
|
-
var contextTokens = lexed.filter(function(param) {
|
|
225
|
-
var tokenType = param.tokenType;
|
|
226
|
-
return tokenType === "ContextStart" || tokenType === "ContextEnd";
|
|
227
|
-
});
|
|
228
|
-
var contextStartTokens = contextTokens.filter(function(param) {
|
|
229
|
-
var tokenType = param.tokenType;
|
|
230
|
-
return tokenType === "ContextStart";
|
|
231
|
-
});
|
|
232
|
-
var contextEndTokens = contextTokens.filter(function(param) {
|
|
233
|
-
var tokenType = param.tokenType;
|
|
234
|
-
return tokenType === "ContextEnd";
|
|
235
|
-
});
|
|
236
|
-
if (contextStartTokens.length !== contextEndTokens.length || !contextStartTokens.length) {
|
|
237
|
-
return false;
|
|
238
|
-
}
|
|
239
|
-
var tokensOfAttribute = contextTokens.map(function(param) {
|
|
240
|
-
var tokenType = param.tokenType, value = param.value;
|
|
241
|
-
return {
|
|
242
|
-
tokenType: tokenType,
|
|
243
|
-
value: tokenType === "ContextStart" ? value.match(contextStartRegexp)[1] : value.match(contextEndRegexp)[1]
|
|
244
|
-
};
|
|
245
|
-
});
|
|
246
|
-
function checkPaired(param, startContextAttributes) {
|
|
247
|
-
var token = param[0], restToken = param.slice(1);
|
|
248
|
-
if (startContextAttributes === void 0) startContextAttributes = [];
|
|
249
|
-
if (!token) {
|
|
250
|
-
return startContextAttributes.length === 0;
|
|
251
|
-
}
|
|
252
|
-
if (token.tokenType === "ContextStart") {
|
|
253
|
-
return checkPaired(restToken, startContextAttributes.concat(token.value));
|
|
254
|
-
} else if (token.tokenType === "ContextEnd") {
|
|
255
|
-
var attributeName = startContextAttributes[startContextAttributes.length - 1];
|
|
256
|
-
if (attributeName !== token.value) {
|
|
257
|
-
return false;
|
|
258
|
-
}
|
|
259
|
-
return checkPaired(restToken, startContextAttributes.slice(0, -1));
|
|
260
|
-
}
|
|
261
|
-
throw new Error("Unexpected token: " + token.tokenType);
|
|
262
|
-
}
|
|
263
|
-
return checkPaired(tokensOfAttribute);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
function __decorate(decorators, target, key, desc) {
|
|
267
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
268
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
269
|
-
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
270
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
271
|
-
}
|
|
272
|
-
typeof SuppressedError === "function" ? SuppressedError : function _SuppressedError(error, suppressed, message) {
|
|
273
|
-
var e = new Error(message);
|
|
274
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* 将颜色名称转换为 RGBA
|
|
279
|
-
* @param colorName - 颜色名称
|
|
280
|
-
* @returns RGBA 颜色字符串
|
|
281
|
-
*/ function colorNameToRGBA(colorName) {
|
|
282
|
-
if (typeof colorName !== "string" || !colorName) {
|
|
283
|
-
throw new Error("Invalid color name provided");
|
|
284
|
-
}
|
|
285
|
-
if (typeof document === "undefined") {
|
|
286
|
-
throw new Error("This method requires a browser environment");
|
|
287
|
-
}
|
|
288
|
-
var canvas = document.createElement("canvas");
|
|
289
|
-
var context = canvas.getContext("2d");
|
|
290
|
-
if (context) {
|
|
291
|
-
try {
|
|
292
|
-
context.fillStyle = colorName;
|
|
293
|
-
var result = context.fillStyle;
|
|
294
|
-
return result;
|
|
295
|
-
} finally{
|
|
296
|
-
// Clean up DOM element
|
|
297
|
-
canvas.remove();
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
throw new Error("Failed to get 2D context for color conversion!");
|
|
301
|
-
}
|
|
302
|
-
/**
|
|
303
|
-
* 将 16 进制颜色转换为 RGBA
|
|
304
|
-
* @param hex - 16 进制颜色
|
|
305
|
-
* @param alpha - 透明度
|
|
306
|
-
* @returns - RGBA 颜色
|
|
307
|
-
*/ function hexToRGBA(hex, alpha) {
|
|
308
|
-
if (alpha === void 0) alpha = 1;
|
|
309
|
-
hex = hex.replace(/^#/, "");
|
|
310
|
-
if (hex.length === 3 || hex.length === 4) {
|
|
311
|
-
hex = hex.split("").map(function(char) {
|
|
312
|
-
return char + char;
|
|
313
|
-
}).join("");
|
|
314
|
-
}
|
|
315
|
-
// Handle alpha channel in hex
|
|
316
|
-
if (hex.length === 8) {
|
|
317
|
-
var a = parseInt(hex.slice(6, 8), 16) / 255;
|
|
318
|
-
hex = hex.slice(0, 6);
|
|
319
|
-
alpha = a;
|
|
320
|
-
}
|
|
321
|
-
var bigint = parseInt(hex, 16);
|
|
322
|
-
var r = bigint >> 16 & 255;
|
|
323
|
-
var g = bigint >> 8 & 255;
|
|
324
|
-
var b = bigint & 255;
|
|
325
|
-
return [
|
|
326
|
-
r,
|
|
327
|
-
g,
|
|
328
|
-
b,
|
|
329
|
-
alpha
|
|
330
|
-
];
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* 将颜色字符串转换为 RGBA
|
|
334
|
-
* @param color - 颜色字符串
|
|
335
|
-
* @param alpha - 透明度
|
|
336
|
-
* @returns - RGBA 颜色
|
|
337
|
-
*/ function toRGBA(color, alpha) {
|
|
338
|
-
if (alpha === void 0) alpha = 1;
|
|
339
|
-
if (typeof color !== "string" || !color) {
|
|
340
|
-
throw new Error("Invalid color string");
|
|
341
|
-
}
|
|
342
|
-
if (color.startsWith("#")) {
|
|
343
|
-
return hexToRGBA(color, alpha);
|
|
344
|
-
} else {
|
|
345
|
-
return hexToRGBA(colorNameToRGBA(color));
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
var seed = 0;
|
|
350
|
-
var RichTextComponent = /*#__PURE__*/ function(TextComponent) {
|
|
351
|
-
_inherits(RichTextComponent, TextComponent);
|
|
352
|
-
function RichTextComponent(engine) {
|
|
353
|
-
var _this;
|
|
354
|
-
_this = TextComponent.call(this, engine) || this;
|
|
355
|
-
_this.processedTextOptions = [];
|
|
356
|
-
_this.singleLineHeight = 1.571;
|
|
357
|
-
_this.size = null;
|
|
358
|
-
/**
|
|
359
|
-
* 获取第一次渲染的 size
|
|
360
|
-
*/ _this.initialized = false;
|
|
361
|
-
/**
|
|
362
|
-
* canvas 大小
|
|
363
|
-
*/ _this.canvasSize = null;
|
|
364
|
-
_this.name = "MRichText" + seed++;
|
|
365
|
-
return _this;
|
|
366
|
-
}
|
|
367
|
-
var _proto = RichTextComponent.prototype;
|
|
368
|
-
_proto.generateTextProgram = function generateTextProgram(text) {
|
|
369
|
-
var _this = this;
|
|
370
|
-
this.processedTextOptions = [];
|
|
371
|
-
var program = generateProgram(function(text, context) {
|
|
372
|
-
// 如果富文本仅包含换行符,则在每个换行符后添加一个空格
|
|
373
|
-
if (/^\n+$/.test(text)) {
|
|
374
|
-
text = text.replace(/\n/g, "\n ");
|
|
375
|
-
}
|
|
376
|
-
var textArr = text.split("\n");
|
|
377
|
-
textArr.forEach(function(text, index) {
|
|
378
|
-
var options = {
|
|
379
|
-
text: text,
|
|
380
|
-
fontSize: _this.textStyle.fontSize,
|
|
381
|
-
isNewLine: false
|
|
382
|
-
};
|
|
383
|
-
if (index > 0) {
|
|
384
|
-
options.isNewLine = true;
|
|
385
|
-
}
|
|
386
|
-
if ("b" in context) {
|
|
387
|
-
options.fontWeight = spec.TextWeight.bold;
|
|
388
|
-
}
|
|
389
|
-
if ("i" in context) {
|
|
390
|
-
options.fontStyle = spec.FontStyle.italic;
|
|
391
|
-
}
|
|
392
|
-
if ("size" in context && context.size) {
|
|
393
|
-
options.fontSize = parseInt(context.size, 10);
|
|
394
|
-
}
|
|
395
|
-
if ("color" in context && context.color) {
|
|
396
|
-
options.fontColor = toRGBA(context.color);
|
|
397
|
-
}
|
|
398
|
-
_this.processedTextOptions.push(options);
|
|
399
|
-
});
|
|
400
|
-
});
|
|
401
|
-
program(text);
|
|
402
|
-
};
|
|
403
|
-
_proto.updateTexture = function updateTexture(flipY) {
|
|
404
|
-
var _this = this;
|
|
405
|
-
if (flipY === void 0) flipY = true;
|
|
406
|
-
if (!this.isDirty || !this.context || !this.canvas) {
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
409
|
-
this.generateTextProgram(this.text);
|
|
410
|
-
var width = 0, height = 0;
|
|
411
|
-
var _this1 = this, textLayout = _this1.textLayout, textStyle = _this1.textStyle;
|
|
412
|
-
var overflow = textLayout.overflow;
|
|
413
|
-
var context = this.context;
|
|
414
|
-
context.save();
|
|
415
|
-
var charsInfo = [];
|
|
416
|
-
var fontHeight = textStyle.fontSize * this.textStyle.fontScale;
|
|
417
|
-
var charInfo = {
|
|
418
|
-
richOptions: [],
|
|
419
|
-
offsetX: [],
|
|
420
|
-
width: 0,
|
|
421
|
-
lineHeight: fontHeight * this.singleLineHeight,
|
|
422
|
-
offsetY: fontHeight * (this.singleLineHeight - 1) / 2
|
|
423
|
-
};
|
|
424
|
-
this.processedTextOptions.forEach(function(options) {
|
|
425
|
-
var text = options.text, isNewLine = options.isNewLine, fontSize = options.fontSize;
|
|
426
|
-
if (isNewLine) {
|
|
427
|
-
charsInfo.push(charInfo);
|
|
428
|
-
width = Math.max(width, charInfo.width);
|
|
429
|
-
charInfo = {
|
|
430
|
-
richOptions: [],
|
|
431
|
-
offsetX: [],
|
|
432
|
-
width: 0,
|
|
433
|
-
lineHeight: fontHeight * _this.singleLineHeight,
|
|
434
|
-
offsetY: fontHeight * (_this.singleLineHeight - 1) / 2
|
|
435
|
-
};
|
|
436
|
-
height += charInfo.lineHeight;
|
|
437
|
-
}
|
|
438
|
-
//恢复默认设置
|
|
439
|
-
context.font = (options.fontWeight || textStyle.textWeight) + " 10px " + (options.fontFamily || textStyle.fontFamily);
|
|
440
|
-
var textWidth = context.measureText(text).width;
|
|
441
|
-
var textHeight = fontSize * _this.singleLineHeight * _this.textStyle.fontScale;
|
|
442
|
-
if (textHeight > charInfo.lineHeight) {
|
|
443
|
-
height += textHeight - charInfo.lineHeight;
|
|
444
|
-
charInfo.lineHeight = textHeight;
|
|
445
|
-
charInfo.offsetY = fontSize * _this.textStyle.fontScale * (_this.singleLineHeight - 1) / 2;
|
|
446
|
-
}
|
|
447
|
-
charInfo.offsetX.push(charInfo.width);
|
|
448
|
-
charInfo.width += textWidth * fontSize * _this.SCALE_FACTOR * _this.textStyle.fontScale;
|
|
449
|
-
charInfo.richOptions.push(options);
|
|
450
|
-
});
|
|
451
|
-
charsInfo.push(charInfo);
|
|
452
|
-
width = Math.max(width, charInfo.width);
|
|
453
|
-
height += charInfo.lineHeight;
|
|
454
|
-
if (width === 0 || height === 0) {
|
|
455
|
-
this.isDirty = false;
|
|
456
|
-
return;
|
|
457
|
-
}
|
|
458
|
-
if (this.size === undefined || this.size === null) {
|
|
459
|
-
this.size = this.item.transform.size.clone();
|
|
460
|
-
}
|
|
461
|
-
var _this_size = this.size, _this_size_x = _this_size.x, x = _this_size_x === void 0 ? 1 : _this_size_x, _this_size_y = _this_size.y, y = _this_size_y === void 0 ? 1 : _this_size_y;
|
|
462
|
-
if (!this.initialized) {
|
|
463
|
-
this.canvasSize = new math.Vector2(width, height);
|
|
464
|
-
this.item.transform.size.set(x * width * this.SCALE_FACTOR * this.SCALE_FACTOR, y * height * this.SCALE_FACTOR * this.SCALE_FACTOR);
|
|
465
|
-
this.size = this.item.transform.size.clone();
|
|
466
|
-
this.initialized = true;
|
|
467
|
-
}
|
|
468
|
-
assertExist(this.canvasSize);
|
|
469
|
-
var _this_canvasSize = this.canvasSize, canvasWidth = _this_canvasSize.x, canvasHeight = _this_canvasSize.y;
|
|
470
|
-
this.textLayout.width = canvasWidth / textStyle.fontScale;
|
|
471
|
-
this.textLayout.height = canvasHeight / textStyle.fontScale;
|
|
472
|
-
this.canvas.width = canvasWidth;
|
|
473
|
-
this.canvas.height = canvasHeight;
|
|
474
|
-
context.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
475
|
-
// fix bug 1/255
|
|
476
|
-
context.fillStyle = "rgba(255, 255, 255, " + this.ALPHA_FIX_VALUE + ")";
|
|
477
|
-
if (!flipY) {
|
|
478
|
-
context.translate(0, canvasHeight);
|
|
479
|
-
context.scale(1, -1);
|
|
480
|
-
}
|
|
481
|
-
if (charsInfo.length === 0) {
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
var charsLineHeight = textLayout.getOffsetY(textStyle, charsInfo.length, fontHeight * this.singleLineHeight, textStyle.fontSize);
|
|
485
|
-
charsInfo.forEach(function(charInfo, index) {
|
|
486
|
-
var richOptions = charInfo.richOptions, offsetX = charInfo.offsetX, width = charInfo.width;
|
|
487
|
-
var charWidth = width;
|
|
488
|
-
var offset = offsetX;
|
|
489
|
-
if (overflow === spec.TextOverflow.display) {
|
|
490
|
-
if (width > canvasWidth) {
|
|
491
|
-
var scale = canvasWidth / width;
|
|
492
|
-
charWidth *= scale;
|
|
493
|
-
offset = offsetX.map(function(x) {
|
|
494
|
-
return x * scale;
|
|
495
|
-
});
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
var x = _this.textLayout.getOffsetX(textStyle, charWidth);
|
|
499
|
-
if (index > 0) {
|
|
500
|
-
charsLineHeight += charInfo.lineHeight - charInfo.offsetY;
|
|
501
|
-
}
|
|
502
|
-
richOptions.forEach(function(options, index) {
|
|
503
|
-
var fontScale = textStyle.fontScale, textColor = textStyle.textColor, textFamily = textStyle.fontFamily, textWeight = textStyle.textWeight, richStyle = textStyle.fontStyle;
|
|
504
|
-
var text = options.text, fontSize = options.fontSize, _options_fontColor = options.fontColor, fontColor = _options_fontColor === void 0 ? textColor : _options_fontColor, _options_fontFamily = options.fontFamily, fontFamily = _options_fontFamily === void 0 ? textFamily : _options_fontFamily, _options_fontWeight = options.fontWeight, fontWeight = _options_fontWeight === void 0 ? textWeight : _options_fontWeight, _options_fontStyle = options.fontStyle, fontStyle = _options_fontStyle === void 0 ? richStyle : _options_fontStyle;
|
|
505
|
-
var textSize = fontSize;
|
|
506
|
-
if (overflow === spec.TextOverflow.display) {
|
|
507
|
-
if (width > canvasWidth) {
|
|
508
|
-
textSize /= width / canvasWidth;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
context.font = fontStyle + " " + fontWeight + " " + textSize * fontScale + "px " + fontFamily;
|
|
512
|
-
context.fillStyle = "rgba(" + fontColor[0] + ", " + fontColor[1] + ", " + fontColor[2] + ", " + fontColor[3] + ")";
|
|
513
|
-
context.fillText(text, offset[index] + x, charsLineHeight);
|
|
514
|
-
});
|
|
515
|
-
});
|
|
516
|
-
//与 toDataURL() 两种方式都需要像素读取操作
|
|
517
|
-
var imageData = context.getImageData(0, 0, this.canvas.width, this.canvas.height);
|
|
518
|
-
var texture = Texture.createWithData(this.engine, {
|
|
519
|
-
data: new Uint8Array(imageData.data),
|
|
520
|
-
width: imageData.width,
|
|
521
|
-
height: imageData.height
|
|
522
|
-
}, {
|
|
523
|
-
flipY: flipY,
|
|
524
|
-
magFilter: glContext.LINEAR,
|
|
525
|
-
minFilter: glContext.LINEAR,
|
|
526
|
-
wrapS: glContext.CLAMP_TO_EDGE,
|
|
527
|
-
wrapT: glContext.CLAMP_TO_EDGE
|
|
528
|
-
});
|
|
529
|
-
this.renderer.texture = texture;
|
|
530
|
-
this.material.setTexture("_MainTex", texture);
|
|
531
|
-
this.isDirty = false;
|
|
532
|
-
context.restore();
|
|
533
|
-
};
|
|
534
|
-
/**
|
|
535
|
-
* 该方法富文本组件不支持
|
|
536
|
-
* @param value - 水平偏移距离
|
|
537
|
-
* @returns
|
|
538
|
-
*/ _proto.setShadowOffsetY = function setShadowOffsetY(value) {
|
|
539
|
-
throw new Error("Method not implemented.");
|
|
540
|
-
};
|
|
541
|
-
/**
|
|
542
|
-
* 该方法富文本组件不支持
|
|
543
|
-
* @param value - 模糊程度
|
|
544
|
-
*/ _proto.setShadowBlur = function setShadowBlur(value) {
|
|
545
|
-
throw new Error("Method not implemented.");
|
|
546
|
-
};
|
|
547
|
-
/**
|
|
548
|
-
* 该方法富文本组件不支持
|
|
549
|
-
* @param value - 水平偏移距离
|
|
550
|
-
*/ _proto.setShadowOffsetX = function setShadowOffsetX(value) {
|
|
551
|
-
throw new Error("Method not implemented.");
|
|
552
|
-
};
|
|
553
|
-
/**
|
|
554
|
-
* 该方法富文本组件不支持
|
|
555
|
-
* @param value - 阴影颜色
|
|
556
|
-
*/ _proto.setShadowColor = function setShadowColor(value) {
|
|
557
|
-
throw new Error("Method not implemented.");
|
|
558
|
-
};
|
|
559
|
-
/**
|
|
560
|
-
* 该方法富文本组件不支持
|
|
561
|
-
* @param value - 外描边宽度
|
|
562
|
-
* @returns
|
|
563
|
-
*/ _proto.setOutlineWidth = function setOutlineWidth(value) {
|
|
564
|
-
throw new Error("Method not implemented.");
|
|
565
|
-
};
|
|
566
|
-
/**
|
|
567
|
-
* 该方法富文本组件不支持
|
|
568
|
-
* @param value - 是否自动设置宽度
|
|
569
|
-
*/ _proto.setAutoWidth = function setAutoWidth(value) {
|
|
570
|
-
throw new Error("Method not implemented.");
|
|
571
|
-
};
|
|
572
|
-
_proto.updateWithOptions = function updateWithOptions(options) {
|
|
573
|
-
this.textStyle = new TextStyle(options);
|
|
574
|
-
this.textLayout = new TextLayout(options);
|
|
575
|
-
this.textLayout.textBaseline = options.textBaseline || spec.TextBaseline.middle;
|
|
576
|
-
this.text = options.text ? options.text.toString() : " ";
|
|
577
|
-
};
|
|
578
|
-
return RichTextComponent;
|
|
579
|
-
}(TextComponent);
|
|
580
|
-
RichTextComponent = __decorate([
|
|
581
|
-
effectsClass(spec.DataType.RichTextComponent)
|
|
582
|
-
], RichTextComponent);
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* 插件版本号
|
|
586
|
-
*/ var version = "2.3.0-alpha.2";
|
|
587
|
-
registerPlugin("rich-text", RichTextLoader, VFXItem, true);
|
|
588
|
-
logger.info("Plugin rich text version: " + version + ".");
|
|
589
|
-
if (version !== EFFECTS.version) {
|
|
590
|
-
console.error("注意:请统一 RichText 插件与 Player 版本,不统一的版本混用会有不可预知的后果!", "\nAttention: Please ensure the RichText plugin is synchronized with the Player version. Mixing and matching incompatible versions may result in unpredictable consequences!");
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
export { RichTextComponent, RichTextLoader, generateProgram, isRichText, lexer, richTextParser, version };
|
|
1
|
+
import*as t from"@galacean/effects/alipay";import{AbstractPlugin as e,effectsClass as n,spec as i,math as r,assertExist as o,Texture as a,glContext as s,TextStyle as l,TextLayout as h,TextComponent as f,registerPlugin as u,VFXItem as c,logger as v}from"@galacean/effects/alipay";function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}var x,g=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).name="rich-text",e}return p(e,t),e}(e);function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function m(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}!function(t){t.ContextStart="ContextStart",t.Text="Text",t.ContextEnd="ContextEnd"}(x||(x={}));var w=/^<([a-z]+)(=([^>]+))?>$/,S=/^<\/([a-z]+)>$/,T=[["ContextStart",/^<[a-z]+(=[^>]+)?>/],["Text",/^[^</>=]+/],["ContextEnd",/^<\/[a-z]+>/]],E=function(t,e,n){if(void 0===e&&(e=[]),void 0===n&&(n=0),!t)return e;for(var i,r=m(T);!(i=r()).done;){var o,a=i.value,s=a[0],l=(null!=(o=a[1].exec(t))?o:[])[0];if(l){var h=l.length;return E(t.slice(h),e.concat({tokenType:s,value:l}),n+h)}}throw new Error('Unexpected token: "'+t[0]+'" at position '+n+' while reading "'+t+'"')},b=function(t){var e=function(){var t=s();if("Text"===(null==t?void 0:t.tokenType))return a(),t.value},n=function(){var t=s();if("ContextStart"===(null==t?void 0:t.tokenType)){a();var e,n=t.value.match(w);if(n)return{attributeName:n[1],attributeParam:null!=(e=n[3])?e:""};throw new Error("Expected a start tag marker at position "+o)}return{}},i=function(){var t=s();if("ContextEnd"===(null==t?void 0:t.tokenType)){a();var e=t.value.match(S);if(e)return{attributeName:e[1]};throw new Error("Expect an end tag marker at position "+o)}return{}},r=E(t),o=0,a=function(){var t,e=r.shift();return o+=null!=(t=null==e?void 0:e.value.length)?t:0,e},s=function(){return r[0]},l=[];return function t(r,a){for(void 0===r&&(r=[]),void 0===a&&(a="");;){var s=e();if(s)l.push({attributes:r,text:s});else{var h=n(),f=h.attributeName,u=h.attributeParam;if(!f){if(a){var c=i().attributeName;if(!c)throw new Error('Expect an end tag marker "'+a+'" at position '+o+" but found no tag!");if(c!==a)throw new Error('Expect an end tag marker "'+a+'" at position '+o+' but found tag "'+c+'"');return}break}t(r.concat({attributeName:f,attributeParam:u}),f)}}}(),l};function z(t){return function(e){for(var n,i=m(b(e));!(n=i()).done;){var r=n.value,o=r.text,a=r.attributes.reduce((function(t,e){var n=e.attributeName,i=e.attributeParam;return n&&(t[n]=i),t}),{});t(o,a)}}}function C(t){var e=E(t).filter((function(t){var e=t.tokenType;return"ContextStart"===e||"ContextEnd"===e})),n=e.filter((function(t){return"ContextStart"===t.tokenType})),i=e.filter((function(t){return"ContextEnd"===t.tokenType}));if(n.length!==i.length||!n.length)return!1;return function t(e,n){var i=e[0],r=e.slice(1);if(void 0===n&&(n=[]),!i)return 0===n.length;if("ContextStart"===i.tokenType)return t(r,n.concat(i.value));if("ContextEnd"===i.tokenType)return n[n.length-1]===i.value&&t(r,n.slice(0,-1));throw new Error("Unexpected token: "+i.tokenType)}(e.map((function(t){var e=t.tokenType,n=t.value;return{tokenType:e,value:"ContextStart"===e?n.match(w)[1]:n.match(S)[1]}})))}function O(t,e){if(void 0===e&&(e=1),3!==(t=t.replace(/^#/,"")).length&&4!==t.length||(t=t.split("").map((function(t){return t+t})).join("")),8===t.length){var n=parseInt(t.slice(6,8),16)/255;t=t.slice(0,6),e=n}var i=parseInt(t,16);return[i>>16&255,i>>8&255,255&i,e]}function L(t,e){if(void 0===e&&(e=1),"string"!=typeof t||!t)throw new Error("Invalid color string");return t.startsWith("#")?O(t,e):O(function(t){if("string"!=typeof t||!t)throw new Error("Invalid color name provided");if("undefined"==typeof document)throw new Error("This method requires a browser environment");var e=document.createElement("canvas"),n=e.getContext("2d");if(n)try{return n.fillStyle=t,n.fillStyle}finally{e.remove()}throw new Error("Failed to get 2D context for color conversion!")}(t))}"function"==typeof SuppressedError&&SuppressedError;var A=0,k=function(t){function e(e){var n;return(n=t.call(this,e)||this).processedTextOptions=[],n.singleLineHeight=1.571,n.size=null,n.initialized=!1,n.canvasSize=null,n.name="MRichText"+A++,n}p(e,t);var n=e.prototype;return n.generateTextProgram=function(t){var e=this;this.processedTextOptions=[];var n=z((function(t,n){/^\n+$/.test(t)&&(t=t.replace(/\n/g,"\n ")),t.split("\n").forEach((function(t,r){var o={text:t,fontSize:e.textStyle.fontSize,isNewLine:!1};r>0&&(o.isNewLine=!0),"b"in n&&(o.fontWeight=i.TextWeight.bold),"i"in n&&(o.fontStyle=i.FontStyle.italic),"size"in n&&n.size&&(o.fontSize=parseInt(n.size,10)),"color"in n&&n.color&&(o.fontColor=L(n.color)),e.processedTextOptions.push(o)}))}));n(t)},n.updateTexture=function(t){var e=this;if(void 0===t&&(t=!0),this.isDirty&&this.context&&this.canvas){this.generateTextProgram(this.text);var n=0,l=0,h=this.textLayout,f=this.textStyle,u=h.overflow,c=h.letterSpace,v=void 0===c?0:c,d=this.context;d.save();var p=[],x=f.fontSize*this.textStyle.fontScale,g={richOptions:[],offsetX:[],width:0,lineHeight:x*this.singleLineHeight,offsetY:x*(this.singleLineHeight-1)/2};if(this.processedTextOptions.forEach((function(t){var i=t.text,r=t.isNewLine,o=t.fontSize;r&&(p.push(g),n=Math.max(n,g.width),g={richOptions:[],offsetX:[],width:0,lineHeight:x*e.singleLineHeight,offsetY:x*(e.singleLineHeight-1)/2},l+=g.lineHeight),d.font=(t.fontWeight||f.textWeight)+" 10px "+(t.fontFamily||f.fontFamily);var a=d.measureText(i).width,s=o*e.singleLineHeight*e.textStyle.fontScale;s>g.lineHeight&&(l+=s-g.lineHeight,g.lineHeight=s,g.offsetY=o*e.textStyle.fontScale*(e.singleLineHeight-1)/2),g.offsetX.push(g.width),g.width+=(a<=0?0:a)*o*e.SCALE_FACTOR*e.textStyle.fontScale+i.length*v,g.richOptions.push(t)})),p.push(g),n=Math.max(n,g.width),l+=g.lineHeight,0!==n&&0!==l){void 0!==this.size&&null!==this.size||(this.size=this.item.transform.size.clone());var y=this.size,m=y.x,w=void 0===m?1:m,S=y.y,T=void 0===S?1:S;if(!this.initialized){this.canvasSize=this.canvasSize?this.canvasSize:new r.Vector2(n,l);var E=this.canvasSize,b=E.x,z=E.y;this.item.transform.size.set(w*b*this.SCALE_FACTOR*this.SCALE_FACTOR,T*z*this.SCALE_FACTOR*this.SCALE_FACTOR),this.size=this.item.transform.size.clone(),this.initialized=!0}o(this.canvasSize);var C=this.canvasSize,O=C.x,L=C.y;if(this.textLayout.width=O/f.fontScale,this.textLayout.height=L/f.fontScale,this.canvas.width=O,this.canvas.height=L,d.clearRect(0,0,O,L),d.fillStyle="rgba(255, 255, 255, "+this.ALPHA_FIX_VALUE+")",t||(d.translate(0,L),d.scale(1,-1)),0!==p.length){var A=h.getOffsetY(f,p.length,x*this.singleLineHeight,f.fontSize);p.forEach((function(t,n){var r=t.richOptions,o=t.offsetX,a=t.width,s=a,l=o;if(u===i.TextOverflow.display&&a>O){var h=O/a;s*=h,l=o.map((function(t){return t*h}))}var c=e.textLayout.getOffsetX(f,s);n>0&&(A+=t.lineHeight-t.offsetY),r.forEach((function(t,e){var n=f.fontScale,r=f.textColor,o=f.fontFamily,s=f.textWeight,h=f.fontStyle,p=t.text,x=t.fontSize,g=t.fontColor,y=void 0===g?r:g,m=t.fontFamily,w=void 0===m?o:m,S=t.fontWeight,T=void 0===S?s:S,E=t.fontStyle,b=void 0===E?h:E,z=x;u===i.TextOverflow.display&&a>O&&(z/=a/O),d.font=b+" "+T+" "+z*n+"px "+w,d.fillStyle="rgba("+y[0]+", "+y[1]+", "+y[2]+", "+y[3]+")";var C=l[e]+c;if(" "===p)d.fillText(p,l[e]+c,A);else for(var L=0;L<p.length;L++){var k=p[L],H=d.measureText(k).width;d.fillText(k,C,A),C+=H+(L===p.length-1||" "===p?0:v*z/x)}}))}));var k=d.getImageData(0,0,this.canvas.width,this.canvas.height),H=a.createWithData(this.engine,{data:new Uint8Array(k.data),width:k.width,height:k.height},{flipY:t,magFilter:s.LINEAR,minFilter:s.LINEAR,wrapS:s.CLAMP_TO_EDGE,wrapT:s.CLAMP_TO_EDGE});this.renderer.texture=H,this.material.setTexture("_MainTex",H),this.isDirty=!1,d.restore()}}else this.isDirty=!1}},n.setShadowOffsetY=function(t){throw new Error("Method not implemented.")},n.setShadowBlur=function(t){throw new Error("Method not implemented.")},n.setShadowOffsetX=function(t){throw new Error("Method not implemented.")},n.setShadowColor=function(t){throw new Error("Method not implemented.")},n.setOutlineWidth=function(t){throw new Error("Method not implemented.")},n.setAutoWidth=function(t){throw new Error("Method not implemented.")},n.updateWithOptions=function(t){this.textStyle=new l(t),this.textLayout=new h(t),this.textLayout.textBaseline=t.textBaseline||i.TextBaseline.middle,this.text=t.text?t.text.toString():" "},n.renderText=function(t){var e=t.size;e&&(this.canvasSize=new r.Vector2(e[0],e[1])),this.updateTexture()},e}(f);k=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}([n(i.DataType.RichTextComponent)],k);var H="2.3.0-beta.0";u("rich-text",g,c,!0),v.info("Plugin rich text version: "+H+"."),H!==t.version&&console.error("注意:请统一 RichText 插件与 Player 版本,不统一的版本混用会有不可预知的后果!","\nAttention: Please ensure the RichText plugin is synchronized with the Player version. Mixing and matching incompatible versions may result in unpredictable consequences!");export{k as RichTextComponent,g as RichTextLoader,z as generateProgram,C as isRichText,E as lexer,b as richTextParser,H as version};
|
|
594
2
|
//# sourceMappingURL=alipay.mjs.map
|