smoothly 0.3.48 → 0.3.50
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/cjs/smoothly-accordion_53.cjs.entry.js +20 -4
- package/dist/collection/components/icon/index.js +7 -2
- package/dist/collection/components/input/index.js +7 -2
- package/dist/custom-elements/index.js +20 -4
- package/dist/esm/smoothly-accordion_53.entry.js +20 -4
- package/dist/smoothly/p-f160727f.entry.js +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/icon/index.d.ts +1 -1
- package/dist/types/components/input/index.d.ts +1 -0
- package/package.json +5 -2
- package/dist/smoothly/p-e39602bd.entry.js +0 -1
|
@@ -701,6 +701,12 @@ exports.Action = void 0;
|
|
|
701
701
|
return formatter.format(StateEditor_1.StateEditor.copy(result));
|
|
702
702
|
}
|
|
703
703
|
Action.apply = apply;
|
|
704
|
+
function paste(formatter, state, pasted) {
|
|
705
|
+
const result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
|
|
706
|
+
replace(result, pasted);
|
|
707
|
+
return formatter.format(StateEditor_1.StateEditor.copy(result));
|
|
708
|
+
}
|
|
709
|
+
Action.paste = paste;
|
|
704
710
|
function ctrlArrow(formatter, state, action) {
|
|
705
711
|
let cursorPosition = Selection_1.Selection.getCursor(state.selection);
|
|
706
712
|
let stalkPosition = Selection_1.Selection.getStalker(state.selection);
|
|
@@ -20873,7 +20879,12 @@ const SmoothlyIcon = class {
|
|
|
20873
20879
|
}
|
|
20874
20880
|
async loadDocument() {
|
|
20875
20881
|
if (this.name)
|
|
20876
|
-
|
|
20882
|
+
try {
|
|
20883
|
+
this.document = await Listenable.Icon.load(this.name);
|
|
20884
|
+
}
|
|
20885
|
+
catch (error) {
|
|
20886
|
+
console.log(error);
|
|
20887
|
+
}
|
|
20877
20888
|
}
|
|
20878
20889
|
async componentWillLoad() {
|
|
20879
20890
|
await this.loadDocument();
|
|
@@ -20885,7 +20896,7 @@ const SmoothlyIcon = class {
|
|
|
20885
20896
|
.replace(` width="512" height="512"`, "")
|
|
20886
20897
|
.replace(/(<title>)[\w\d\s-]*(<\/title>)/, `<title>${this.toolTip || ""}</title>`)
|
|
20887
20898
|
.replace(/stroke:#000;/gi, "")
|
|
20888
|
-
: undefined
|
|
20899
|
+
: `<img src="undefined.jpg"/>`,
|
|
20889
20900
|
};
|
|
20890
20901
|
}
|
|
20891
20902
|
__stencil_render() {
|
|
@@ -21527,8 +21538,7 @@ const SmoothlyInput = class {
|
|
|
21527
21538
|
let pasted = event.clipboardData ? event.clipboardData.getData("text") : "";
|
|
21528
21539
|
const backend = event.target;
|
|
21529
21540
|
pasted = this.expiresAutocompleteFix(backend, pasted);
|
|
21530
|
-
|
|
21531
|
-
this.processKey({ key: letter }, backend);
|
|
21541
|
+
this.processPaste(pasted, backend);
|
|
21532
21542
|
}
|
|
21533
21543
|
onInput(event) {
|
|
21534
21544
|
var _a;
|
|
@@ -21560,6 +21570,12 @@ const SmoothlyInput = class {
|
|
|
21560
21570
|
: value;
|
|
21561
21571
|
return value;
|
|
21562
21572
|
}
|
|
21573
|
+
processPaste(pasted, backend) {
|
|
21574
|
+
if (!this.readonly) {
|
|
21575
|
+
const after = dist.Action.paste(this.formatter, this.state, pasted);
|
|
21576
|
+
this.updateBackend(after, backend);
|
|
21577
|
+
}
|
|
21578
|
+
}
|
|
21563
21579
|
processKey(event, backend) {
|
|
21564
21580
|
if (!this.readonly) {
|
|
21565
21581
|
const after = dist.Action.apply(this.formatter, this.state, event);
|
|
@@ -10,7 +10,12 @@ export class SmoothlyIcon {
|
|
|
10
10
|
}
|
|
11
11
|
async loadDocument() {
|
|
12
12
|
if (this.name)
|
|
13
|
-
|
|
13
|
+
try {
|
|
14
|
+
this.document = await Icon.load(this.name);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
console.log(error);
|
|
18
|
+
}
|
|
14
19
|
}
|
|
15
20
|
async componentWillLoad() {
|
|
16
21
|
await this.loadDocument();
|
|
@@ -22,7 +27,7 @@ export class SmoothlyIcon {
|
|
|
22
27
|
.replace(` width="512" height="512"`, "")
|
|
23
28
|
.replace(/(<title>)[\w\d\s-]*(<\/title>)/, `<title>${this.toolTip || ""}</title>`)
|
|
24
29
|
.replace(/stroke:#000;/gi, "")
|
|
25
|
-
: undefined
|
|
30
|
+
: `<img src="undefined.jpg"/>`,
|
|
26
31
|
};
|
|
27
32
|
}
|
|
28
33
|
render() {
|
|
@@ -143,8 +143,7 @@ export class SmoothlyInput {
|
|
|
143
143
|
let pasted = event.clipboardData ? event.clipboardData.getData("text") : "";
|
|
144
144
|
const backend = event.target;
|
|
145
145
|
pasted = this.expiresAutocompleteFix(backend, pasted);
|
|
146
|
-
|
|
147
|
-
this.processKey({ key: letter }, backend);
|
|
146
|
+
this.processPaste(pasted, backend);
|
|
148
147
|
}
|
|
149
148
|
onInput(event) {
|
|
150
149
|
var _a;
|
|
@@ -176,6 +175,12 @@ export class SmoothlyInput {
|
|
|
176
175
|
: value;
|
|
177
176
|
return value;
|
|
178
177
|
}
|
|
178
|
+
processPaste(pasted, backend) {
|
|
179
|
+
if (!this.readonly) {
|
|
180
|
+
const after = Action.paste(this.formatter, this.state, pasted);
|
|
181
|
+
this.updateBackend(after, backend);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
179
184
|
processKey(event, backend) {
|
|
180
185
|
if (!this.readonly) {
|
|
181
186
|
const after = Action.apply(this.formatter, this.state, event);
|
|
@@ -26454,6 +26454,12 @@ exports.Action = void 0;
|
|
|
26454
26454
|
return formatter.format(StateEditor_1.StateEditor.copy(result));
|
|
26455
26455
|
}
|
|
26456
26456
|
Action.apply = apply;
|
|
26457
|
+
function paste(formatter, state, pasted) {
|
|
26458
|
+
const result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
|
|
26459
|
+
replace(result, pasted);
|
|
26460
|
+
return formatter.format(StateEditor_1.StateEditor.copy(result));
|
|
26461
|
+
}
|
|
26462
|
+
Action.paste = paste;
|
|
26457
26463
|
function ctrlArrow(formatter, state, action) {
|
|
26458
26464
|
let cursorPosition = Selection_1.Selection.getCursor(state.selection);
|
|
26459
26465
|
let stalkPosition = Selection_1.Selection.getStalker(state.selection);
|
|
@@ -46643,7 +46649,12 @@ const SmoothlyIcon$1 = class extends HTMLElement {
|
|
|
46643
46649
|
}
|
|
46644
46650
|
async loadDocument() {
|
|
46645
46651
|
if (this.name)
|
|
46646
|
-
|
|
46652
|
+
try {
|
|
46653
|
+
this.document = await Icon.load(this.name);
|
|
46654
|
+
}
|
|
46655
|
+
catch (error) {
|
|
46656
|
+
console.log(error);
|
|
46657
|
+
}
|
|
46647
46658
|
}
|
|
46648
46659
|
async componentWillLoad() {
|
|
46649
46660
|
await this.loadDocument();
|
|
@@ -46655,7 +46666,7 @@ const SmoothlyIcon$1 = class extends HTMLElement {
|
|
|
46655
46666
|
.replace(` width="512" height="512"`, "")
|
|
46656
46667
|
.replace(/(<title>)[\w\d\s-]*(<\/title>)/, `<title>${this.toolTip || ""}</title>`)
|
|
46657
46668
|
.replace(/stroke:#000;/gi, "")
|
|
46658
|
-
: undefined
|
|
46669
|
+
: `<img src="undefined.jpg"/>`,
|
|
46659
46670
|
};
|
|
46660
46671
|
}
|
|
46661
46672
|
__stencil_render() {
|
|
@@ -47299,8 +47310,7 @@ const SmoothlyInput$1 = class extends HTMLElement {
|
|
|
47299
47310
|
let pasted = event.clipboardData ? event.clipboardData.getData("text") : "";
|
|
47300
47311
|
const backend = event.target;
|
|
47301
47312
|
pasted = this.expiresAutocompleteFix(backend, pasted);
|
|
47302
|
-
|
|
47303
|
-
this.processKey({ key: letter }, backend);
|
|
47313
|
+
this.processPaste(pasted, backend);
|
|
47304
47314
|
}
|
|
47305
47315
|
onInput(event) {
|
|
47306
47316
|
var _a;
|
|
@@ -47332,6 +47342,12 @@ const SmoothlyInput$1 = class extends HTMLElement {
|
|
|
47332
47342
|
: value;
|
|
47333
47343
|
return value;
|
|
47334
47344
|
}
|
|
47345
|
+
processPaste(pasted, backend) {
|
|
47346
|
+
if (!this.readonly) {
|
|
47347
|
+
const after = dist.Action.paste(this.formatter, this.state, pasted);
|
|
47348
|
+
this.updateBackend(after, backend);
|
|
47349
|
+
}
|
|
47350
|
+
}
|
|
47335
47351
|
processKey(event, backend) {
|
|
47336
47352
|
if (!this.readonly) {
|
|
47337
47353
|
const after = dist.Action.apply(this.formatter, this.state, event);
|
|
@@ -697,6 +697,12 @@ exports.Action = void 0;
|
|
|
697
697
|
return formatter.format(StateEditor_1.StateEditor.copy(result));
|
|
698
698
|
}
|
|
699
699
|
Action.apply = apply;
|
|
700
|
+
function paste(formatter, state, pasted) {
|
|
701
|
+
const result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
|
|
702
|
+
replace(result, pasted);
|
|
703
|
+
return formatter.format(StateEditor_1.StateEditor.copy(result));
|
|
704
|
+
}
|
|
705
|
+
Action.paste = paste;
|
|
700
706
|
function ctrlArrow(formatter, state, action) {
|
|
701
707
|
let cursorPosition = Selection_1.Selection.getCursor(state.selection);
|
|
702
708
|
let stalkPosition = Selection_1.Selection.getStalker(state.selection);
|
|
@@ -20869,7 +20875,12 @@ const SmoothlyIcon = class {
|
|
|
20869
20875
|
}
|
|
20870
20876
|
async loadDocument() {
|
|
20871
20877
|
if (this.name)
|
|
20872
|
-
|
|
20878
|
+
try {
|
|
20879
|
+
this.document = await Icon.load(this.name);
|
|
20880
|
+
}
|
|
20881
|
+
catch (error) {
|
|
20882
|
+
console.log(error);
|
|
20883
|
+
}
|
|
20873
20884
|
}
|
|
20874
20885
|
async componentWillLoad() {
|
|
20875
20886
|
await this.loadDocument();
|
|
@@ -20881,7 +20892,7 @@ const SmoothlyIcon = class {
|
|
|
20881
20892
|
.replace(` width="512" height="512"`, "")
|
|
20882
20893
|
.replace(/(<title>)[\w\d\s-]*(<\/title>)/, `<title>${this.toolTip || ""}</title>`)
|
|
20883
20894
|
.replace(/stroke:#000;/gi, "")
|
|
20884
|
-
: undefined
|
|
20895
|
+
: `<img src="undefined.jpg"/>`,
|
|
20885
20896
|
};
|
|
20886
20897
|
}
|
|
20887
20898
|
__stencil_render() {
|
|
@@ -21523,8 +21534,7 @@ const SmoothlyInput = class {
|
|
|
21523
21534
|
let pasted = event.clipboardData ? event.clipboardData.getData("text") : "";
|
|
21524
21535
|
const backend = event.target;
|
|
21525
21536
|
pasted = this.expiresAutocompleteFix(backend, pasted);
|
|
21526
|
-
|
|
21527
|
-
this.processKey({ key: letter }, backend);
|
|
21537
|
+
this.processPaste(pasted, backend);
|
|
21528
21538
|
}
|
|
21529
21539
|
onInput(event) {
|
|
21530
21540
|
var _a;
|
|
@@ -21556,6 +21566,12 @@ const SmoothlyInput = class {
|
|
|
21556
21566
|
: value;
|
|
21557
21567
|
return value;
|
|
21558
21568
|
}
|
|
21569
|
+
processPaste(pasted, backend) {
|
|
21570
|
+
if (!this.readonly) {
|
|
21571
|
+
const after = dist.Action.paste(this.formatter, this.state, pasted);
|
|
21572
|
+
this.updateBackend(after, backend);
|
|
21573
|
+
}
|
|
21574
|
+
}
|
|
21559
21575
|
processKey(event, backend) {
|
|
21560
21576
|
if (!this.readonly) {
|
|
21561
21577
|
const after = dist.Action.apply(this.formatter, this.state, event);
|