@leafer-editor/worker 1.3.0 → 1.3.2
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/worker.cjs +7 -0
- package/dist/worker.esm.js +1 -0
- package/dist/worker.esm.min.js +1 -1
- package/dist/worker.js +186 -25
- package/dist/worker.min.cjs +1 -1
- package/dist/worker.min.js +1 -1
- package/dist/worker.module.js +186 -26
- package/dist/worker.module.min.js +1 -1
- package/package.json +15 -14
package/dist/worker.cjs
CHANGED
|
@@ -6,6 +6,7 @@ var viewport = require('@leafer-in/viewport');
|
|
|
6
6
|
var view = require('@leafer-in/view');
|
|
7
7
|
var scroll = require('@leafer-in/scroll');
|
|
8
8
|
var arrow = require('@leafer-in/arrow');
|
|
9
|
+
var find = require('@leafer-in/find');
|
|
9
10
|
var _export = require('@leafer-in/export');
|
|
10
11
|
var textEditor = require('@leafer-in/text-editor');
|
|
11
12
|
var html = require('@leafer-in/html');
|
|
@@ -48,6 +49,12 @@ Object.keys(arrow).forEach(function (k) {
|
|
|
48
49
|
get: function () { return arrow[k]; }
|
|
49
50
|
});
|
|
50
51
|
});
|
|
52
|
+
Object.keys(find).forEach(function (k) {
|
|
53
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function () { return find[k]; }
|
|
56
|
+
});
|
|
57
|
+
});
|
|
51
58
|
Object.keys(_export).forEach(function (k) {
|
|
52
59
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
53
60
|
enumerable: true,
|
package/dist/worker.esm.js
CHANGED
|
@@ -4,6 +4,7 @@ export * from '@leafer-in/viewport';
|
|
|
4
4
|
export * from '@leafer-in/view';
|
|
5
5
|
export * from '@leafer-in/scroll';
|
|
6
6
|
export * from '@leafer-in/arrow';
|
|
7
|
+
export * from '@leafer-in/find';
|
|
7
8
|
export * from '@leafer-in/export';
|
|
8
9
|
export * from '@leafer-in/text-editor';
|
|
9
10
|
export * from '@leafer-in/html';
|
package/dist/worker.esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"@leafer-ui/worker";export*from"@leafer-in/editor";export*from"@leafer-in/viewport";export*from"@leafer-in/view";export*from"@leafer-in/scroll";export*from"@leafer-in/arrow";export*from"@leafer-in/export";export*from"@leafer-in/text-editor";export*from"@leafer-in/html";
|
|
1
|
+
export*from"@leafer-ui/worker";export*from"@leafer-in/editor";export*from"@leafer-in/viewport";export*from"@leafer-in/view";export*from"@leafer-in/scroll";export*from"@leafer-in/arrow";export*from"@leafer-in/find";export*from"@leafer-in/export";export*from"@leafer-in/text-editor";export*from"@leafer-in/html";
|
package/dist/worker.js
CHANGED
|
@@ -6010,7 +6010,7 @@ var LeaferUI = (function (exports) {
|
|
|
6010
6010
|
}
|
|
6011
6011
|
}
|
|
6012
6012
|
|
|
6013
|
-
const version = "1.3.
|
|
6013
|
+
const version = "1.3.2";
|
|
6014
6014
|
|
|
6015
6015
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6016
6016
|
get allowBackgroundColor() { return true; }
|
|
@@ -6542,7 +6542,7 @@ var LeaferUI = (function (exports) {
|
|
|
6542
6542
|
partRender() {
|
|
6543
6543
|
const { canvas, updateBlocks: list } = this;
|
|
6544
6544
|
if (!list)
|
|
6545
|
-
return
|
|
6545
|
+
return;
|
|
6546
6546
|
this.mergeBlocks();
|
|
6547
6547
|
list.forEach(block => { if (canvas.bounds.hit(block) && !block.isEmpty())
|
|
6548
6548
|
this.clipRender(block); });
|
|
@@ -7398,7 +7398,7 @@ var LeaferUI = (function (exports) {
|
|
|
7398
7398
|
animate(_keyframe, _options, _type, _isTemp) {
|
|
7399
7399
|
return Plugin.need('animate');
|
|
7400
7400
|
}
|
|
7401
|
-
killAnimate(_type,
|
|
7401
|
+
killAnimate(_type, _nextStyle) { }
|
|
7402
7402
|
export(_filename, _options) {
|
|
7403
7403
|
return Plugin.need('export');
|
|
7404
7404
|
}
|
|
@@ -7894,8 +7894,6 @@ var LeaferUI = (function (exports) {
|
|
|
7894
7894
|
this.created = true;
|
|
7895
7895
|
}
|
|
7896
7896
|
__onReady() {
|
|
7897
|
-
if (this.ready)
|
|
7898
|
-
return;
|
|
7899
7897
|
this.ready = true;
|
|
7900
7898
|
this.emitLeafer(LeaferEvent.BEFORE_READY);
|
|
7901
7899
|
this.emitLeafer(LeaferEvent.READY);
|
|
@@ -7909,6 +7907,20 @@ var LeaferUI = (function (exports) {
|
|
|
7909
7907
|
this.emitLeafer(LeaferEvent.VIEW_READY);
|
|
7910
7908
|
WaitHelper.run(this.__viewReadyWait);
|
|
7911
7909
|
}
|
|
7910
|
+
__onLayoutEnd() {
|
|
7911
|
+
const { grow, growWidth, growHeight } = this.config;
|
|
7912
|
+
if (grow) {
|
|
7913
|
+
let { width, height, pixelRatio } = this;
|
|
7914
|
+
const bounds = grow === 'box' ? this.worldBoxBounds : this.__world;
|
|
7915
|
+
if (growWidth !== false)
|
|
7916
|
+
width = Math.max(1, bounds.x + bounds.width);
|
|
7917
|
+
if (growHeight !== false)
|
|
7918
|
+
height = Math.max(1, bounds.y + bounds.height);
|
|
7919
|
+
this.__doResize({ width, height, pixelRatio });
|
|
7920
|
+
}
|
|
7921
|
+
if (!this.ready)
|
|
7922
|
+
this.__onReady();
|
|
7923
|
+
}
|
|
7912
7924
|
__onNextRender() {
|
|
7913
7925
|
if (this.viewReady) {
|
|
7914
7926
|
WaitHelper.run(this.__nextRenderWait);
|
|
@@ -8002,10 +8014,9 @@ var LeaferUI = (function (exports) {
|
|
|
8002
8014
|
const runId = Run.start('FirstCreate ' + this.innerName);
|
|
8003
8015
|
this.once(LeaferEvent.START, () => Run.end(runId));
|
|
8004
8016
|
this.once(LayoutEvent.START, () => this.updateLazyBounds());
|
|
8005
|
-
this.once(LayoutEvent.END, () => this.__onReady());
|
|
8006
8017
|
this.once(RenderEvent.START, () => this.__onCreated());
|
|
8007
8018
|
this.once(RenderEvent.END, () => this.__onViewReady());
|
|
8008
|
-
this.__eventIds.push(this.on_(WatchEvent.DATA, this.__onWatchData, this), this.on_(RenderEvent.NEXT, this.__onNextRender, this));
|
|
8019
|
+
this.__eventIds.push(this.on_(WatchEvent.DATA, this.__onWatchData, this), this.on_(LayoutEvent.END, this.__onLayoutEnd, this), this.on_(RenderEvent.NEXT, this.__onNextRender, this));
|
|
8009
8020
|
}
|
|
8010
8021
|
__removeListenEvents() {
|
|
8011
8022
|
this.off_(this.__eventIds);
|
|
@@ -9928,8 +9939,8 @@ var LeaferUI = (function (exports) {
|
|
|
9928
9939
|
this.__drawRenderPath(canvas); };
|
|
9929
9940
|
|
|
9930
9941
|
const matrix$2 = new Matrix();
|
|
9931
|
-
const ui$
|
|
9932
|
-
ui$
|
|
9942
|
+
const ui$3 = exports.UI.prototype;
|
|
9943
|
+
ui$3.__updateHitCanvas = function () {
|
|
9933
9944
|
const data = this.__, { hitCanvasManager } = this.leafer;
|
|
9934
9945
|
const isHitPixelFill = (data.__pixelFill || data.__isCanvas) && data.hitFill === 'pixel';
|
|
9935
9946
|
const isHitPixelStroke = data.__pixelStroke && data.hitStroke === 'pixel';
|
|
@@ -9956,7 +9967,7 @@ var LeaferUI = (function (exports) {
|
|
|
9956
9967
|
this.__drawHitPath(h);
|
|
9957
9968
|
h.setStrokeOptions(data);
|
|
9958
9969
|
};
|
|
9959
|
-
ui$
|
|
9970
|
+
ui$3.__hit = function (inner) {
|
|
9960
9971
|
if (Platform.name === 'miniapp')
|
|
9961
9972
|
this.__drawHitPath(this.__hitCanvas);
|
|
9962
9973
|
const data = this.__;
|
|
@@ -9996,24 +10007,24 @@ var LeaferUI = (function (exports) {
|
|
|
9996
10007
|
return hitWidth ? this.__hitStroke(inner, hitWidth) : false;
|
|
9997
10008
|
};
|
|
9998
10009
|
|
|
9999
|
-
const ui$
|
|
10010
|
+
const ui$2 = exports.UI.prototype, rect = exports.Rect.prototype, box$1 = exports.Box.prototype;
|
|
10000
10011
|
rect.__updateHitCanvas = box$1.__updateHitCanvas = function () {
|
|
10001
10012
|
if (this.stroke || this.cornerRadius || ((this.fill || this.__.__isCanvas) && this.hitFill === 'pixel') || this.hitStroke === 'all')
|
|
10002
|
-
ui$
|
|
10013
|
+
ui$2.__updateHitCanvas.call(this);
|
|
10003
10014
|
else if (this.__hitCanvas)
|
|
10004
10015
|
this.__hitCanvas = null;
|
|
10005
10016
|
};
|
|
10006
10017
|
rect.__hitFill = box$1.__hitFill = function (inner) {
|
|
10007
|
-
return this.__hitCanvas ? ui$
|
|
10018
|
+
return this.__hitCanvas ? ui$2.__hitFill.call(this, inner) : BoundsHelper.hitRadiusPoint(this.__layout.boxBounds, inner);
|
|
10008
10019
|
};
|
|
10009
10020
|
|
|
10010
|
-
function getSelector(ui) {
|
|
10021
|
+
function getSelector$1(ui) {
|
|
10011
10022
|
return ui.leafer ? ui.leafer.selector : (Platform.selector || (Platform.selector = Creator.selector()));
|
|
10012
10023
|
}
|
|
10013
10024
|
exports.Group.prototype.pick = function (hitPoint, options) {
|
|
10014
10025
|
this.leafer || this.updateLayout();
|
|
10015
10026
|
options || (options = emptyData);
|
|
10016
|
-
return getSelector(this).getByPoint(hitPoint, options.hitRadius || 0, Object.assign(Object.assign({}, options), { target: this }));
|
|
10027
|
+
return getSelector$1(this).getByPoint(hitPoint, options.hitRadius || 0, Object.assign(Object.assign({}, options), { target: this }));
|
|
10017
10028
|
};
|
|
10018
10029
|
|
|
10019
10030
|
const canvas$1 = LeaferCanvasBase.prototype;
|
|
@@ -11252,7 +11263,7 @@ var LeaferUI = (function (exports) {
|
|
|
11252
11263
|
rows.forEach(row => {
|
|
11253
11264
|
if (row.words) {
|
|
11254
11265
|
indentWidth = paraIndent && row.paraStart ? paraIndent : 0;
|
|
11255
|
-
addWordWidth = (width && textAlign === 'justify' && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
|
|
11266
|
+
addWordWidth = (width && (textAlign === 'justify' || textAlign === 'both') && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
|
|
11256
11267
|
mode = (letterSpacing || row.isOverflow) ? CharMode : (addWordWidth > 0.01 ? WordMode : TextMode);
|
|
11257
11268
|
if (row.isOverflow && !letterSpacing)
|
|
11258
11269
|
row.textMode = true;
|
|
@@ -11274,7 +11285,7 @@ var LeaferUI = (function (exports) {
|
|
|
11274
11285
|
else {
|
|
11275
11286
|
charX = toChar(word.data, charX, row.data, row.isOverflow);
|
|
11276
11287
|
}
|
|
11277
|
-
if (!row.paraEnd
|
|
11288
|
+
if (addWordWidth && (!row.paraEnd || textAlign === 'both')) {
|
|
11278
11289
|
charX += addWordWidth;
|
|
11279
11290
|
row.width += addWordWidth;
|
|
11280
11291
|
}
|
|
@@ -11685,7 +11696,7 @@ var LeaferUI = (function (exports) {
|
|
|
11685
11696
|
}
|
|
11686
11697
|
}
|
|
11687
11698
|
|
|
11688
|
-
const { No, Yes, NoAndSkip, YesAndSkip } = exports.Answer;
|
|
11699
|
+
const { No, Yes: Yes$1, NoAndSkip: NoAndSkip$1, YesAndSkip: YesAndSkip$1 } = exports.Answer;
|
|
11689
11700
|
const EditSelectHelper = {
|
|
11690
11701
|
findOne(path) {
|
|
11691
11702
|
return path.list.find((leaf) => leaf.editable);
|
|
@@ -11694,20 +11705,20 @@ var LeaferUI = (function (exports) {
|
|
|
11694
11705
|
if (leaf.__.hittable && leaf.__.visible && !leaf.__.locked && bounds.hit(leaf.__world)) {
|
|
11695
11706
|
if (leaf.__.editable) {
|
|
11696
11707
|
if (leaf.isBranch && !leaf.__.hitChildren) {
|
|
11697
|
-
return leaf.__.hitSelf ? YesAndSkip : NoAndSkip;
|
|
11708
|
+
return leaf.__.hitSelf ? YesAndSkip$1 : NoAndSkip$1;
|
|
11698
11709
|
}
|
|
11699
11710
|
else if (leaf.isFrame) {
|
|
11700
|
-
return bounds.includes(leaf.__layout.boxBounds, leaf.__world) ? YesAndSkip : No;
|
|
11711
|
+
return bounds.includes(leaf.__layout.boxBounds, leaf.__world) ? YesAndSkip$1 : No;
|
|
11701
11712
|
}
|
|
11702
11713
|
else {
|
|
11703
11714
|
if (bounds.hit(leaf.__layout.boxBounds, leaf.__world) && leaf.__.hitSelf)
|
|
11704
|
-
return Yes;
|
|
11715
|
+
return Yes$1;
|
|
11705
11716
|
}
|
|
11706
11717
|
}
|
|
11707
11718
|
return No;
|
|
11708
11719
|
}
|
|
11709
11720
|
else {
|
|
11710
|
-
return leaf.isBranch ? NoAndSkip : No;
|
|
11721
|
+
return leaf.isBranch ? NoAndSkip$1 : No;
|
|
11711
11722
|
}
|
|
11712
11723
|
}
|
|
11713
11724
|
};
|
|
@@ -11871,7 +11882,7 @@ var LeaferUI = (function (exports) {
|
|
|
11871
11882
|
return target.leafer !== this.editor.leafer;
|
|
11872
11883
|
}
|
|
11873
11884
|
allowDrag(e) {
|
|
11874
|
-
if (this.running && this.editor.mergeConfig.boxSelect && !e.target.draggable) {
|
|
11885
|
+
if (this.running && (this.editor.mergeConfig.boxSelect && Plugin.has('find')) && !e.target.draggable) {
|
|
11875
11886
|
return (!this.editor.editing && this.allow(e.target)) || (e.shiftKey && !findOne(e.path));
|
|
11876
11887
|
}
|
|
11877
11888
|
else {
|
|
@@ -12414,6 +12425,8 @@ var LeaferUI = (function (exports) {
|
|
|
12414
12425
|
const { editor } = this;
|
|
12415
12426
|
if (editor.single) {
|
|
12416
12427
|
const { element } = editor;
|
|
12428
|
+
if (element.locked)
|
|
12429
|
+
return;
|
|
12417
12430
|
if (element.isBranch && !element.editInner) {
|
|
12418
12431
|
if (element.textBox) {
|
|
12419
12432
|
const { children } = element;
|
|
@@ -13587,7 +13600,153 @@ ${filterStyle}
|
|
|
13587
13600
|
|
|
13588
13601
|
Plugin.add('resize');
|
|
13589
13602
|
|
|
13590
|
-
|
|
13603
|
+
const { Yes, NoAndSkip, YesAndSkip } = exports.Answer;
|
|
13604
|
+
const idCondition = {}, classNameCondition = {}, tagCondition = {};
|
|
13605
|
+
class Finder {
|
|
13606
|
+
constructor(target) {
|
|
13607
|
+
this.innerIdMap = {};
|
|
13608
|
+
this.idMap = {};
|
|
13609
|
+
this.methods = {
|
|
13610
|
+
id: (leaf, name) => leaf.id === name ? (this.target && (this.idMap[name] = leaf), 1) : 0,
|
|
13611
|
+
innerId: (leaf, innerId) => leaf.innerId === innerId ? (this.target && (this.innerIdMap[innerId] = leaf), 1) : 0,
|
|
13612
|
+
className: (leaf, name) => leaf.className === name ? 1 : 0,
|
|
13613
|
+
tag: (leaf, name) => leaf.__tag === name ? 1 : 0,
|
|
13614
|
+
tags: (leaf, nameMap) => nameMap[leaf.__tag] ? 1 : 0
|
|
13615
|
+
};
|
|
13616
|
+
if (this.target = target)
|
|
13617
|
+
this.__listenEvents();
|
|
13618
|
+
}
|
|
13619
|
+
getBy(condition, branch, one, options) {
|
|
13620
|
+
switch (typeof condition) {
|
|
13621
|
+
case 'number':
|
|
13622
|
+
const leaf = this.getByInnerId(condition, branch);
|
|
13623
|
+
return one ? leaf : (leaf ? [leaf] : []);
|
|
13624
|
+
case 'string':
|
|
13625
|
+
switch (condition[0]) {
|
|
13626
|
+
case '#':
|
|
13627
|
+
idCondition.id = condition.substring(1), condition = idCondition;
|
|
13628
|
+
break;
|
|
13629
|
+
case '.':
|
|
13630
|
+
classNameCondition.className = condition.substring(1), condition = classNameCondition;
|
|
13631
|
+
break;
|
|
13632
|
+
default:
|
|
13633
|
+
tagCondition.tag = condition, condition = tagCondition;
|
|
13634
|
+
}
|
|
13635
|
+
case 'object':
|
|
13636
|
+
if (condition.id !== undefined) {
|
|
13637
|
+
const leaf = this.getById(condition.id, branch);
|
|
13638
|
+
return one ? leaf : (leaf ? [leaf] : []);
|
|
13639
|
+
}
|
|
13640
|
+
else if (condition.tag) {
|
|
13641
|
+
const { tag } = condition, isArray = tag instanceof Array;
|
|
13642
|
+
return this.getByMethod(isArray ? this.methods.tags : this.methods.tag, branch, one, isArray ? DataHelper.toMap(tag) : tag);
|
|
13643
|
+
}
|
|
13644
|
+
else {
|
|
13645
|
+
return this.getByMethod(this.methods.className, branch, one, condition.className);
|
|
13646
|
+
}
|
|
13647
|
+
case 'function':
|
|
13648
|
+
return this.getByMethod(condition, branch, one, options);
|
|
13649
|
+
}
|
|
13650
|
+
}
|
|
13651
|
+
getByInnerId(innerId, branch) {
|
|
13652
|
+
const cache = this.innerIdMap[innerId];
|
|
13653
|
+
if (cache)
|
|
13654
|
+
return cache;
|
|
13655
|
+
this.eachFind(this.toChildren(branch), this.methods.innerId, null, innerId);
|
|
13656
|
+
return this.findLeaf;
|
|
13657
|
+
}
|
|
13658
|
+
getById(id, branch) {
|
|
13659
|
+
const cache = this.idMap[id];
|
|
13660
|
+
if (cache && LeafHelper.hasParent(cache, branch || this.target))
|
|
13661
|
+
return cache;
|
|
13662
|
+
this.eachFind(this.toChildren(branch), this.methods.id, null, id);
|
|
13663
|
+
return this.findLeaf;
|
|
13664
|
+
}
|
|
13665
|
+
getByClassName(className, branch) {
|
|
13666
|
+
return this.getByMethod(this.methods.className, branch, false, className);
|
|
13667
|
+
}
|
|
13668
|
+
getByTag(tag, branch) {
|
|
13669
|
+
return this.getByMethod(this.methods.tag, branch, false, tag);
|
|
13670
|
+
}
|
|
13671
|
+
getByMethod(method, branch, one, options) {
|
|
13672
|
+
const list = one ? null : [];
|
|
13673
|
+
this.eachFind(this.toChildren(branch), method, list, options);
|
|
13674
|
+
return list || this.findLeaf;
|
|
13675
|
+
}
|
|
13676
|
+
eachFind(children, method, list, options) {
|
|
13677
|
+
let child, result;
|
|
13678
|
+
for (let i = 0, len = children.length; i < len; i++) {
|
|
13679
|
+
child = children[i];
|
|
13680
|
+
result = method(child, options);
|
|
13681
|
+
if (result === Yes || result === YesAndSkip) {
|
|
13682
|
+
if (list) {
|
|
13683
|
+
list.push(child);
|
|
13684
|
+
}
|
|
13685
|
+
else {
|
|
13686
|
+
this.findLeaf = child;
|
|
13687
|
+
return;
|
|
13688
|
+
}
|
|
13689
|
+
}
|
|
13690
|
+
if (child.isBranch && result < NoAndSkip)
|
|
13691
|
+
this.eachFind(child.children, method, list, options);
|
|
13692
|
+
}
|
|
13693
|
+
}
|
|
13694
|
+
toChildren(branch) {
|
|
13695
|
+
this.findLeaf = null;
|
|
13696
|
+
return [branch || this.target];
|
|
13697
|
+
}
|
|
13698
|
+
__onRemoveChild(event) {
|
|
13699
|
+
const { id, innerId } = event.child;
|
|
13700
|
+
if (this.idMap[id])
|
|
13701
|
+
delete this.idMap[id];
|
|
13702
|
+
if (this.innerIdMap[innerId])
|
|
13703
|
+
delete this.innerIdMap[innerId];
|
|
13704
|
+
}
|
|
13705
|
+
__checkIdChange(event) {
|
|
13706
|
+
if (event.attrName === 'id') {
|
|
13707
|
+
const id = event.oldValue;
|
|
13708
|
+
if (this.idMap[id])
|
|
13709
|
+
delete this.idMap[id];
|
|
13710
|
+
}
|
|
13711
|
+
}
|
|
13712
|
+
__listenEvents() {
|
|
13713
|
+
this.__eventIds = [
|
|
13714
|
+
this.target.on_(ChildEvent.REMOVE, this.__onRemoveChild, this),
|
|
13715
|
+
this.target.on_(PropertyEvent.CHANGE, this.__checkIdChange, this)
|
|
13716
|
+
];
|
|
13717
|
+
}
|
|
13718
|
+
__removeListenEvents() {
|
|
13719
|
+
this.target.off_(this.__eventIds);
|
|
13720
|
+
this.__eventIds.length = 0;
|
|
13721
|
+
}
|
|
13722
|
+
destroy() {
|
|
13723
|
+
const { __eventIds } = this;
|
|
13724
|
+
if (__eventIds && __eventIds.length) {
|
|
13725
|
+
this.__removeListenEvents();
|
|
13726
|
+
this.innerIdMap = {};
|
|
13727
|
+
this.idMap = {};
|
|
13728
|
+
}
|
|
13729
|
+
this.findLeaf = null;
|
|
13730
|
+
}
|
|
13731
|
+
}
|
|
13732
|
+
|
|
13733
|
+
const ui$1 = exports.UI.prototype;
|
|
13734
|
+
function getSelector(ui) {
|
|
13735
|
+
return ui.leafer ? ui.leafer.selector : (Platform.selector || (Platform.selector = Creator.selector()));
|
|
13736
|
+
}
|
|
13737
|
+
ui$1.find = function (condition, options) {
|
|
13738
|
+
return getSelector(this).getBy(condition, this, false, options);
|
|
13739
|
+
};
|
|
13740
|
+
ui$1.findOne = function (condition, options) {
|
|
13741
|
+
return getSelector(this).getBy(condition, this, true, options);
|
|
13742
|
+
};
|
|
13743
|
+
|
|
13744
|
+
Plugin.add('find');
|
|
13745
|
+
Creator.finder = function (target) {
|
|
13746
|
+
return new Finder(target);
|
|
13747
|
+
};
|
|
13748
|
+
|
|
13749
|
+
Plugin.add('editor', 'resize', 'find');
|
|
13591
13750
|
Creator.editor = function (options) { return new Editor(options); };
|
|
13592
13751
|
dataType(false)(exports.Box.prototype, 'textBox');
|
|
13593
13752
|
defineKey(exports.UI.prototype, 'editOuter', {
|
|
@@ -14615,6 +14774,7 @@ ${filterStyle}
|
|
|
14615
14774
|
});
|
|
14616
14775
|
};
|
|
14617
14776
|
|
|
14777
|
+
Plugin.add('export');
|
|
14618
14778
|
Object.assign(Export, ExportModule);
|
|
14619
14779
|
exports.UI.prototype.export = function (filename, options) {
|
|
14620
14780
|
return Export.export(this, filename, options);
|
|
@@ -14642,7 +14802,7 @@ ${filterStyle}
|
|
|
14642
14802
|
style.fontWeight = text.fontWeight;
|
|
14643
14803
|
style.textDecoration = textDecoration === 'delete' ? 'line-through' : textDecoration;
|
|
14644
14804
|
style.textTransform = textCaseMap[text.textCase];
|
|
14645
|
-
style.textAlign = text.textAlign;
|
|
14805
|
+
style.textAlign = text.textAlign === 'both' ? 'justify' : text.textAlign;
|
|
14646
14806
|
style.display = 'flex';
|
|
14647
14807
|
style.flexDirection = 'column';
|
|
14648
14808
|
style.justifyContent = verticalAlignMap[text.verticalAlign];
|
|
@@ -14925,6 +15085,7 @@ ${filterStyle}
|
|
|
14925
15085
|
exports.Eventer = Eventer;
|
|
14926
15086
|
exports.Export = Export;
|
|
14927
15087
|
exports.FileHelper = FileHelper;
|
|
15088
|
+
exports.Finder = Finder;
|
|
14928
15089
|
exports.FrameData = FrameData;
|
|
14929
15090
|
exports.GroupData = GroupData;
|
|
14930
15091
|
exports.HTMLTextData = HTMLTextData;
|
package/dist/worker.min.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@leafer-ui/worker"),r=require("@leafer-in/editor"),t=require("@leafer-in/viewport"),o=require("@leafer-in/view"),n=require("@leafer-in/scroll"),c=require("@leafer-in/arrow"),a=require("@leafer-in/
|
|
1
|
+
"use strict";var e=require("@leafer-ui/worker"),r=require("@leafer-in/editor"),t=require("@leafer-in/viewport"),o=require("@leafer-in/view"),n=require("@leafer-in/scroll"),c=require("@leafer-in/arrow"),a=require("@leafer-in/find"),p=require("@leafer-in/export"),u=require("@leafer-in/text-editor"),f=require("@leafer-in/html");Object.keys(e).forEach((function(r){"default"===r||Object.prototype.hasOwnProperty.call(exports,r)||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return e[r]}})})),Object.keys(r).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return r[e]}})})),Object.keys(t).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})})),Object.keys(o).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return o[e]}})})),Object.keys(n).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})})),Object.keys(c).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return c[e]}})})),Object.keys(a).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return a[e]}})})),Object.keys(p).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return p[e]}})})),Object.keys(u).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return u[e]}})})),Object.keys(f).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return f[e]}})}));
|