@next2d/text 3.15.1 → 3.17.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next2d/text",
3
- "version": "3.15.1",
3
+ "version": "3.17.0",
4
4
  "description": "Next2D Text Package",
5
5
  "author": "Toshiyuki Ienaga<ienaga@next2d.app> (https://github.com/ienaga/)",
6
6
  "license": "MIT",
@@ -24,10 +24,10 @@
24
24
  "url": "git+https://github.com/Next2D/Player.git"
25
25
  },
26
26
  "dependencies": {
27
- "@next2d/display": "3.15.1",
28
- "@next2d/geom": "3.15.1",
29
- "@next2d/events": "3.15.1",
30
- "@next2d/ui": "3.15.1",
31
- "@next2d/cache": "3.15.1"
27
+ "@next2d/display": "3.17.0",
28
+ "@next2d/geom": "3.17.0",
29
+ "@next2d/events": "3.17.0",
30
+ "@next2d/ui": "3.17.0",
31
+ "@next2d/cache": "3.17.0"
32
32
  }
33
33
  }
package/src/TextData.js CHANGED
@@ -10,83 +10,6 @@ export class TextData {
10
10
  * @public
11
11
  */
12
12
  constructor() {
13
- Object.defineProperty(this, "_$textWidth", {
14
- enumerable: true,
15
- configurable: true,
16
- writable: true,
17
- value: void 0
18
- });
19
- Object.defineProperty(this, "_$textHeight", {
20
- enumerable: true,
21
- configurable: true,
22
- writable: true,
23
- value: void 0
24
- });
25
- /**
26
- * @description テキストの行ごとの高さ
27
- * Height of each line of text
28
- *
29
- * @type {array}
30
- * @public
31
- */
32
- Object.defineProperty(this, "heightTable", {
33
- enumerable: true,
34
- configurable: true,
35
- writable: true,
36
- value: void 0
37
- });
38
- /**
39
- * @description テキストの行ごとのベースラインから上方線までの距離
40
- * Distance from the baseline to the top line of each line of text
41
- *
42
- * @type {array}
43
- * @public
44
- */
45
- Object.defineProperty(this, "ascentTable", {
46
- enumerable: true,
47
- configurable: true,
48
- writable: true,
49
- value: void 0
50
- });
51
- /**
52
- * @description テキストの行ごとの幅
53
- * Width of each line of text
54
- *
55
- * @type {array}
56
- * @public
57
- */
58
- Object.defineProperty(this, "widthTable", {
59
- enumerable: true,
60
- configurable: true,
61
- writable: true,
62
- value: void 0
63
- });
64
- /**
65
- * @description テキストの行ごとのテキストオブジェクト
66
- * Text object for each line of text
67
- *
68
- * @type {array}
69
- * @public
70
- */
71
- Object.defineProperty(this, "textTable", {
72
- enumerable: true,
73
- configurable: true,
74
- writable: true,
75
- value: void 0
76
- });
77
- /**
78
- * @description テキストの行ごとのテキストオブジェクト
79
- * Text object for each line of text
80
- *
81
- * @type {array}
82
- * @public
83
- */
84
- Object.defineProperty(this, "lineTable", {
85
- enumerable: true,
86
- configurable: true,
87
- writable: true,
88
- value: void 0
89
- });
90
13
  /**
91
14
  * @type {number}
92
15
  * @private
package/src/TextField.js CHANGED
@@ -43,445 +43,13 @@ export class TextField extends InteractiveObject {
43
43
  */
44
44
  constructor() {
45
45
  super();
46
- /**
47
- * @description TextFieldの機能を所持しているかを返却
48
- * Returns whether the display object has TextField functionality.
49
- *
50
- * @type {boolean}
51
- * @readonly
52
- * @public
53
- */
54
- Object.defineProperty(this, "isText", {
55
- enumerable: true,
56
- configurable: true,
57
- writable: true,
58
- value: void 0
59
- });
60
- /**
61
- * @description セットされたテキストを描画用に分解したデータ
62
- * Data that breaks down the set text for drawing
63
- *
64
- * @member {TextData}
65
- * @protected
66
- */
67
- Object.defineProperty(this, "$textData", {
68
- enumerable: true,
69
- configurable: true,
70
- writable: true,
71
- value: void 0
72
- });
73
46
  /**
74
47
  * @description 文字ラスタの更新番号。位置・回転の変更では更新しない。
75
48
  * Raster revision, independent of display transform changes.
76
49
  * @type {number}
77
50
  * @protected
78
51
  */
79
- Object.defineProperty(this, "$rasterRevision", {
80
- enumerable: true,
81
- configurable: true,
82
- writable: true,
83
- value: $getNextTextRasterRevision()
84
- });
85
- /**
86
- * @description テキストが HTML であるかどうかを示します。
87
- * Indicates whether the text is HTML.
88
- *
89
- * @member {boolean}
90
- * @private
91
- */
92
- Object.defineProperty(this, "_$isHTML", {
93
- enumerable: true,
94
- configurable: true,
95
- writable: true,
96
- value: void 0
97
- });
98
- /**
99
- * @description バウンディングボックスのxMin座標
100
- * Bounding box coordinates
101
- *
102
- * @member {number}
103
- * @public
104
- */
105
- Object.defineProperty(this, "xMin", {
106
- enumerable: true,
107
- configurable: true,
108
- writable: true,
109
- value: void 0
110
- });
111
- /**
112
- * @description バウンディングボックスのyMin座標
113
- * Bounding box coordinates
114
- *
115
- * @member {number}
116
- * @public
117
- */
118
- Object.defineProperty(this, "yMin", {
119
- enumerable: true,
120
- configurable: true,
121
- writable: true,
122
- value: void 0
123
- });
124
- /**
125
- * @description バウンディングボックスのxMax座標
126
- * Bounding box coordinates
127
- *
128
- * @member {number}
129
- * @public
130
- */
131
- Object.defineProperty(this, "xMax", {
132
- enumerable: true,
133
- configurable: true,
134
- writable: true,
135
- value: void 0
136
- });
137
- /**
138
- * @description バウンディングボックスのyMax座標
139
- * Bounding box coordinates
140
- *
141
- * @member {number}
142
- * @public
143
- */
144
- Object.defineProperty(this, "yMax", {
145
- enumerable: true,
146
- configurable: true,
147
- writable: true,
148
- value: void 0
149
- });
150
- /**
151
- * @description テキストフィールドの描画範囲のバウンディングボックス
152
- * The bounding box of the drawing area of the text field
153
- *
154
- * @member {IBounds}
155
- * @private
156
- */
157
- Object.defineProperty(this, "bounds", {
158
- enumerable: true,
159
- configurable: true,
160
- writable: true,
161
- value: void 0
162
- });
163
- /**
164
- * @description スクロール機能のON/OFFの制御。
165
- * Control ON/OFF of the scroll function.
166
- *
167
- * @member {boolean}
168
- * @default true
169
- * @public
170
- */
171
- Object.defineProperty(this, "scrollEnabled", {
172
- enumerable: true,
173
- configurable: true,
174
- writable: true,
175
- value: void 0
176
- });
177
- /**
178
- * @description xスクロールバーの表示用の Shape オブジェクト
179
- * Shape object for x scroll bar display
180
- *
181
- * @member {Shape}
182
- * @protected
183
- */
184
- Object.defineProperty(this, "xScrollShape", {
185
- enumerable: true,
186
- configurable: true,
187
- writable: true,
188
- value: void 0
189
- });
190
- /**
191
- * @description yスクロールバーの表示用の Shape オブジェクト
192
- * Shape object for y scroll bar display
193
- *
194
- * @member {Shape | null}
195
- * @protected
196
- */
197
- Object.defineProperty(this, "yScrollShape", {
198
- enumerable: true,
199
- configurable: true,
200
- writable: true,
201
- value: void 0
202
- });
203
- /**
204
- * @description テキストフィールドの点滅線の表示・非表示を制御します。
205
- * Controls the visibility of the text field's blinking line.
206
- *
207
- * @member {boolean}
208
- * @default false
209
- * @public
210
- */
211
- Object.defineProperty(this, "focusVisible", {
212
- enumerable: true,
213
- configurable: true,
214
- writable: true,
215
- value: void 0
216
- });
217
- /**
218
- * @description テキストフィールドのフォーカス位置のインデックス
219
- * Index of the focus position of the text field
220
- *
221
- * @member {number}
222
- * @default -1
223
- * @public
224
- */
225
- Object.defineProperty(this, "focusIndex", {
226
- enumerable: true,
227
- configurable: true,
228
- writable: true,
229
- value: void 0
230
- });
231
- /**
232
- * @description テキストフィールドの選択位置のインデックス
233
- * Index of the selected position of the text field
234
- *
235
- * @member {number}
236
- * @default -1
237
- * @public
238
- */
239
- Object.defineProperty(this, "selectIndex", {
240
- enumerable: true,
241
- configurable: true,
242
- writable: true,
243
- value: void 0
244
- });
245
- /**
246
- * @description ユーザーが入力するときに、テキストフィールドに入力できる最大の文字数です。
247
- * The maximum number of characters that the text field can contain,
248
- * as entered by a user.
249
- *
250
- * @member {number}
251
- * @default 0
252
- * @public
253
- */
254
- Object.defineProperty(this, "maxChars", {
255
- enumerable: true,
256
- configurable: true,
257
- writable: true,
258
- value: void 0
259
- });
260
- /**
261
- * @description ユーザーがテキストフィールドに入力できる文字のセットを指定します。
262
- * 空文字列の場合は制限されません。"a-z" のような範囲指定、"^" による除外指定、
263
- * "\\" によるエスケープに対応します。
264
- * Indicates the set of characters that a user can enter into the text field.
265
- * If it is an empty string, no restriction is applied. Supports range
266
- * specification such as "a-z", exclusion by "^", and escaping by "\\".
267
- *
268
- * @member {string}
269
- * @default ""
270
- * @public
271
- */
272
- Object.defineProperty(this, "restrict", {
273
- enumerable: true,
274
- configurable: true,
275
- writable: true,
276
- value: void 0
277
- });
278
- /**
279
- * @description テキストフィールドのタイプです。
280
- * The type of the text field.
281
- *
282
- * @member {string}
283
- * @default TextFieldType.STATIC
284
- * @public
285
- */
286
- Object.defineProperty(this, "type", {
287
- enumerable: true,
288
- configurable: true,
289
- writable: true,
290
- value: void 0
291
- });
292
- /**
293
- * @description テキストフィールドのコンポジション開始インデックス
294
- * Composition start index of the text field
295
- *
296
- * @member {number}
297
- * @default -1
298
- * @public
299
- */
300
- Object.defineProperty(this, "compositionStartIndex", {
301
- enumerable: true,
302
- configurable: true,
303
- writable: true,
304
- value: void 0
305
- });
306
- /**
307
- * @description テキストフィールドのコンポジション終了インデックス
308
- * Composition end index of the text field
309
- *
310
- * @member {number}
311
- * @default -1
312
- * @public
313
- */
314
- Object.defineProperty(this, "compositionEndIndex", {
315
- enumerable: true,
316
- configurable: true,
317
- writable: true,
318
- value: void 0
319
- });
320
- /**
321
- * @description テキストフィールドのテキストフォーマットの配列です。
322
- * An array of text formats for the text field.
323
- *
324
- * @member {TextFormat[]}
325
- * @default null
326
- * @protected
327
- */
328
- Object.defineProperty(this, "$textFormats", {
329
- enumerable: true,
330
- configurable: true,
331
- writable: true,
332
- value: void 0
333
- });
334
- /**
335
- * @description x軸のスクロール位置
336
- * Scroll position on the x-axis
337
- *
338
- * @member {number}
339
- * @default 0
340
- * @protected
341
- */
342
- Object.defineProperty(this, "$scrollX", {
343
- enumerable: true,
344
- configurable: true,
345
- writable: true,
346
- value: void 0
347
- });
348
- /**
349
- * @description y軸のスクロール位置
350
- * Scroll position on the y-axis
351
- *
352
- * @member {number}
353
- * @default 0
354
- * @protected
355
- */
356
- Object.defineProperty(this, "$scrollY", {
357
- enumerable: true,
358
- configurable: true,
359
- writable: true,
360
- value: void 0
361
- });
362
- /**
363
- * @description ビルドされたキャッシュキー
364
- * Built cache key
365
- *
366
- * @type {number}
367
- * @default 0
368
- * @public
369
- */
370
- Object.defineProperty(this, "cacheKey", {
371
- enumerable: true,
372
- configurable: true,
373
- writable: true,
374
- value: void 0
375
- });
376
- /**
377
- * @description キャッシュのビルドに利用されるパラメータ
378
- * Parameters used to build the cache
379
- *
380
- * @type {number[]}
381
- * @public
382
- */
383
- Object.defineProperty(this, "cacheParams", {
384
- enumerable: true,
385
- configurable: true,
386
- writable: true,
387
- value: void 0
388
- });
389
- Object.defineProperty(this, "_$background", {
390
- enumerable: true,
391
- configurable: true,
392
- writable: true,
393
- value: void 0
394
- });
395
- Object.defineProperty(this, "_$backgroundColor", {
396
- enumerable: true,
397
- configurable: true,
398
- writable: true,
399
- value: void 0
400
- });
401
- Object.defineProperty(this, "_$border", {
402
- enumerable: true,
403
- configurable: true,
404
- writable: true,
405
- value: void 0
406
- });
407
- Object.defineProperty(this, "_$borderColor", {
408
- enumerable: true,
409
- configurable: true,
410
- writable: true,
411
- value: void 0
412
- });
413
- Object.defineProperty(this, "_$htmlText", {
414
- enumerable: true,
415
- configurable: true,
416
- writable: true,
417
- value: void 0
418
- });
419
- Object.defineProperty(this, "_$multiline", {
420
- enumerable: true,
421
- configurable: true,
422
- writable: true,
423
- value: void 0
424
- });
425
- Object.defineProperty(this, "_$text", {
426
- enumerable: true,
427
- configurable: true,
428
- writable: true,
429
- value: void 0
430
- });
431
- Object.defineProperty(this, "_$wordWrap", {
432
- enumerable: true,
433
- configurable: true,
434
- writable: true,
435
- value: void 0
436
- });
437
- Object.defineProperty(this, "_$defaultTextFormat", {
438
- enumerable: true,
439
- configurable: true,
440
- writable: true,
441
- value: void 0
442
- });
443
- Object.defineProperty(this, "_$rawHtmlText", {
444
- enumerable: true,
445
- configurable: true,
446
- writable: true,
447
- value: void 0
448
- });
449
- Object.defineProperty(this, "_$autoSize", {
450
- enumerable: true,
451
- configurable: true,
452
- writable: true,
453
- value: void 0
454
- });
455
- Object.defineProperty(this, "_$autoFontSize", {
456
- enumerable: true,
457
- configurable: true,
458
- writable: true,
459
- value: void 0
460
- });
461
- Object.defineProperty(this, "_$focus", {
462
- enumerable: true,
463
- configurable: true,
464
- writable: true,
465
- value: void 0
466
- });
467
- Object.defineProperty(this, "_$thickness", {
468
- enumerable: true,
469
- configurable: true,
470
- writable: true,
471
- value: void 0
472
- });
473
- Object.defineProperty(this, "_$thicknessColor", {
474
- enumerable: true,
475
- configurable: true,
476
- writable: true,
477
- value: void 0
478
- });
479
- Object.defineProperty(this, "_$stopIndex", {
480
- enumerable: true,
481
- configurable: true,
482
- writable: true,
483
- value: void 0
484
- });
52
+ this.$rasterRevision = $getNextTextRasterRevision();
485
53
  this.isText = true;
486
54
  /**
487
55
  * @type {TextData}
package/src/TextFormat.js CHANGED
@@ -26,164 +26,6 @@ export class TextFormat {
26
26
  * @public
27
27
  */
28
28
  constructor(font = null, size = null, color = null, bold = null, italic = null, underline = null, align = null, left_margin = null, right_margin = null, leading = null, letter_Spacing = null) {
29
- /**
30
- * @description 段落の行揃えの設定を示します。
31
- * Indicates the alignment of the paragraph.
32
- *
33
- * @member {string}
34
- * @default null
35
- * @public
36
- */
37
- Object.defineProperty(this, "align", {
38
- enumerable: true,
39
- configurable: true,
40
- writable: true,
41
- value: void 0
42
- });
43
- /**
44
- * @description テキストをボールドにするかどうかを指定します。
45
- * Specifies whether the text is boldface.
46
- *
47
- * @member {boolean}
48
- * @default null
49
- * @public
50
- */
51
- Object.defineProperty(this, "bold", {
52
- enumerable: true,
53
- configurable: true,
54
- writable: true,
55
- value: void 0
56
- });
57
- /**
58
- * @description テキストの色を示します。
59
- * Indicates the color of the text.
60
- *
61
- * @member {number}
62
- * @default null
63
- * @public
64
- */
65
- Object.defineProperty(this, "color", {
66
- enumerable: true,
67
- configurable: true,
68
- writable: true,
69
- value: void 0
70
- });
71
- /**
72
- * @description このテキストフォーマットでのテキストフォント名を示すストリングです。
73
- * The name of the font for text in this text format, as a string.
74
- *
75
- * @member {string}
76
- * @default null
77
- * @public
78
- */
79
- Object.defineProperty(this, "font", {
80
- enumerable: true,
81
- configurable: true,
82
- writable: true,
83
- value: void 0
84
- });
85
- /**
86
- * @description このテキストフォーマットのテキストをイタリックにするかどうかを示します。
87
- * Indicates whether text in this text format is italicized.
88
- *
89
- * @member {boolean}
90
- * @default null
91
- * @public
92
- */
93
- Object.defineProperty(this, "italic", {
94
- enumerable: true,
95
- configurable: true,
96
- writable: true,
97
- value: void 0
98
- });
99
- /**
100
- * @description 行間の垂直の行送りを示す整数です。
101
- * An integer representing the amount
102
- * of vertical space (called leading) between lines.
103
- *
104
- * @member {number}
105
- * @default null
106
- * @public
107
- */
108
- Object.defineProperty(this, "leading", {
109
- enumerable: true,
110
- configurable: true,
111
- writable: true,
112
- value: void 0
113
- });
114
- /**
115
- * @description 段落の左インデントをピクセル単位で示します。
116
- * The left margin of the paragraph, in pixels.
117
- *
118
- * @member {number}
119
- * @default null
120
- * @public
121
- */
122
- Object.defineProperty(this, "leftMargin", {
123
- enumerable: true,
124
- configurable: true,
125
- writable: true,
126
- value: void 0
127
- });
128
- /**
129
- * @description すべての文字の間に均等に配分されるスペースの量を表す数値です。
130
- * A object representing the amount
131
- * of space that is uniformly distributed between all characters.
132
- *
133
- * @member {number}
134
- * @default null
135
- * @public
136
- */
137
- Object.defineProperty(this, "letterSpacing", {
138
- enumerable: true,
139
- configurable: true,
140
- writable: true,
141
- value: void 0
142
- });
143
- /**
144
- * @description 段落の右インデントをピクセル単位で示します。
145
- * The right margin of the paragraph, in pixels.
146
- *
147
- * @member {number}
148
- * @default null
149
- * @public
150
- */
151
- Object.defineProperty(this, "rightMargin", {
152
- enumerable: true,
153
- configurable: true,
154
- writable: true,
155
- value: void 0
156
- });
157
- /**
158
- * @description このテキストフォーマットのテキストのサイズ(ピクセル単位)です。
159
- * The size in pixels of text in this text format.
160
- *
161
- * @member {number}
162
- * @default null
163
- * @public
164
- */
165
- Object.defineProperty(this, "size", {
166
- enumerable: true,
167
- configurable: true,
168
- writable: true,
169
- value: void 0
170
- });
171
- /**
172
- * @description このテキストフォーマットを使用するテキストに
173
- * アンダーラインを表示する(true)か、表示しない(false)かを示します。
174
- * Indicates whether the text that uses this text format
175
- * is underlined (true) or not (false).
176
- *
177
- * @member {boolean}
178
- * @default null
179
- * @public
180
- */
181
- Object.defineProperty(this, "underline", {
182
- enumerable: true,
183
- configurable: true,
184
- writable: true,
185
- value: void 0
186
- });
187
29
  this.font = font;
188
30
  this.size = size;
189
31
  this.color = color;