@social-mail/social-mail-client 1.8.229 → 1.8.230
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/site-editor/properties/controls/PropertyEditor.local.css +1 -1
- package/dist/site-editor/properties/controls/PropertyEditor.local.css.map +1 -1
- package/dist/site-editor/properties/controls/animation-chooser/AnimationChooser.d.ts +5 -12
- package/dist/site-editor/properties/controls/animation-chooser/AnimationChooser.d.ts.map +1 -1
- package/dist/site-editor/properties/controls/animation-chooser/AnimationChooser.global.css +1 -1
- package/dist/site-editor/properties/controls/animation-chooser/AnimationChooser.global.css.map +1 -1
- package/dist/site-editor/properties/controls/animation-chooser/AnimationChooser.js +44 -202
- package/dist/site-editor/properties/controls/animation-chooser/AnimationChooser.js.map +1 -1
- package/dist/site-editor/properties/controls/animation-chooser/CustomAnimationEditor.d.ts +21 -0
- package/dist/site-editor/properties/controls/animation-chooser/CustomAnimationEditor.d.ts.map +1 -0
- package/dist/site-editor/properties/controls/animation-chooser/CustomAnimationEditor.global.css +2 -0
- package/dist/site-editor/properties/controls/animation-chooser/CustomAnimationEditor.global.css.map +1 -0
- package/dist/site-editor/properties/controls/animation-chooser/CustomAnimationEditor.js +177 -0
- package/dist/site-editor/properties/controls/animation-chooser/CustomAnimationEditor.js.map +1 -0
- package/dist/site-editor/properties/controls/animation-chooser/PresetAnimations.d.ts +22 -0
- package/dist/site-editor/properties/controls/animation-chooser/PresetAnimations.d.ts.map +1 -0
- package/dist/site-editor/properties/controls/animation-chooser/PresetAnimations.global.css +2 -0
- package/dist/site-editor/properties/controls/animation-chooser/PresetAnimations.global.css.map +1 -0
- package/dist/site-editor/properties/controls/animation-chooser/PresetAnimations.js +246 -0
- package/dist/site-editor/properties/controls/animation-chooser/PresetAnimations.js.map +1 -0
- package/dist/site-editor/properties/groups/AnimateGroupEditor.d.ts.map +1 -1
- package/dist/site-editor/properties/groups/AnimateGroupEditor.js +1 -0
- package/dist/site-editor/properties/groups/AnimateGroupEditor.js.map +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.global.css +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.global.css.map +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.js +299 -27
- package/dist/site-editor-app/SiteEditorApp.pack.js.map +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.local.css +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.local.css.map +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.min.js +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.min.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/site-editor/properties/controls/PropertyEditor.local.css +8 -0
- package/src/site-editor/properties/controls/animation-chooser/AnimationChooser.global.css +4 -68
- package/src/site-editor/properties/controls/animation-chooser/AnimationChooser.tsx +41 -221
- package/src/site-editor/properties/controls/animation-chooser/CustomAnimationEditor.global.css +37 -0
- package/src/site-editor/properties/controls/animation-chooser/CustomAnimationEditor.tsx +156 -0
- package/src/site-editor/properties/controls/animation-chooser/PresetAnimations.global.css +70 -0
- package/src/site-editor/properties/controls/animation-chooser/PresetAnimations.tsx +259 -0
- package/src/site-editor/properties/groups/AnimateGroupEditor.tsx +1 -0
- package/styler-lite/styles/animations/animations/key-frames/breath/breath-in.js +16 -0
- package/styler-lite/styles/animations/animations/key-frames/breath/breath-out.js +16 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
body[show-only=all] [data-item-property*=desktop],body[show-only=all] [data-item-property*=tablet],body[show-only=desktop] [data-item-property*=all],body[show-only=desktop] [data-item-property*=tablet],body[show-only=tablet] [data-item-property*=all],body[show-only=tablet] [data-item-property*=desktop]{display:none}[data-element=property-editor]{align-items:center;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto auto;justify-items:stretch;max-width:200px;row-gap:5px}[data-element=property-editor]>*{width:100%}[data-element=property-editor]>label{grid-column:1;grid-row:1}[data-element=property-editor]>[data-element=editor]{grid-column:1;grid-row:2}[data-element=property-editor]>[data-element=custom]{grid-column:1;grid-row:3}[data-element=property-editor]>[data-element=action-button]{cursor:pointer;grid-column:2;grid-row:2;margin-left:5px}[data-element=property-editor]>[data-element=label]{font-size:small}[data-element=property-editor][data-group-end]{border-bottom:1px solid #d3d3d3;padding-bottom:10px}[data-element=property-editor] select{background-color:#e7e7e775;border:none;border-radius:9999px;outline:none;padding-left:10px;padding-right:10px}[data-element=property-editor]:not([data-custom=true])>[data-element=custom],[data-element=property-editor]:not([has-value]) .clear-value,[data-element=property-editor][has-value=false] .clear-value{display:none}[data-element=property-editor][has-value=true]>label{color:blue;font-weight:700}[data-element=property-editor][has-value=true]>label .clear-value{color:red;cursor:pointer}[data-element=expander-property-editor]{border-bottom:1px solid #a0a0a050}[data-element=expander-property-editor] select{background-color:#e7e7e734;border:none;border-radius:9999px;outline:none;padding-left:10px;padding-right:10px}[data-element=expander-property-editor] [data-layout=vertical-flex-stretch-items]{padding-left:0;padding-right:0}[data-element=expander-property-editor]:has([data-element=detail]>[data-element=property-editor][has-value=true])>label{color:blue;font-weight:700}
|
|
1
|
+
body[show-only=all] [data-item-property*=desktop],body[show-only=all] [data-item-property*=tablet],body[show-only=desktop] [data-item-property*=all],body[show-only=desktop] [data-item-property*=tablet],body[show-only=tablet] [data-item-property*=all],body[show-only=tablet] [data-item-property*=desktop]{display:none}[data-element=property-editor]{align-items:center;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto auto;justify-items:stretch;max-width:200px;row-gap:5px}[data-element=property-editor] [data-break=ellipses]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-element=property-editor]>*{width:100%}[data-element=property-editor]>label{grid-column:1;grid-row:1}[data-element=property-editor]>[data-element=editor]{grid-column:1;grid-row:2}[data-element=property-editor]>[data-element=custom]{grid-column:1;grid-row:3}[data-element=property-editor]>[data-element=action-button]{cursor:pointer;grid-column:2;grid-row:2;margin-left:5px}[data-element=property-editor]>[data-element=label]{font-size:small}[data-element=property-editor][data-group-end]{border-bottom:1px solid #d3d3d3;padding-bottom:10px}[data-element=property-editor] select{background-color:#e7e7e775;border:none;border-radius:9999px;outline:none;padding-left:10px;padding-right:10px}[data-element=property-editor]:not([data-custom=true])>[data-element=custom],[data-element=property-editor]:not([has-value]) .clear-value,[data-element=property-editor][has-value=false] .clear-value{display:none}[data-element=property-editor][has-value=true]>label{color:blue;font-weight:700}[data-element=property-editor][has-value=true]>label .clear-value{color:red;cursor:pointer}[data-element=expander-property-editor]{border-bottom:1px solid #a0a0a050}[data-element=expander-property-editor] select{background-color:#e7e7e734;border:none;border-radius:9999px;outline:none;padding-left:10px;padding-right:10px}[data-element=expander-property-editor] [data-layout=vertical-flex-stretch-items]{padding-left:0;padding-right:0}[data-element=expander-property-editor]:has([data-element=detail]>[data-element=property-editor][has-value=true])>label{color:blue;font-weight:700}
|
|
2
2
|
/*# sourceMappingURL=PropertyEditor.local.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/site-editor/properties/controls/PropertyEditor.local.css"],"names":[],"mappings":"AAaI,gTACI,YACJ,CAGJ,+BAKI,kBAAmB,CAJnB,YAAa,CACb,8BAA+B,CAC/B,iCAAkC,CAClC,qBAAsB,CAGtB,eAAgB,CADhB,
|
|
1
|
+
{"version":3,"sources":["../../../../src/site-editor/properties/controls/PropertyEditor.local.css"],"names":[],"mappings":"AAaI,gTACI,YACJ,CAGJ,+BAKI,kBAAmB,CAJnB,YAAa,CACb,8BAA+B,CAC/B,iCAAkC,CAClC,qBAAsB,CAGtB,eAAgB,CADhB,WAuEJ,CAnEI,qDAEI,eAAgB,CADhB,sBAAuB,CAEvB,kBACJ,CAEA,iCACI,UACJ,CACA,qCAEI,aAAc,CADd,UAEJ,CAEA,qDAEI,aAAc,CADd,UAEJ,CAEA,qDAEI,aAAc,CADd,UAEJ,CAEA,4DAII,cAAe,CAFf,aAAc,CADd,UAAW,CAEX,eAEJ,CAEA,oDACI,eACJ,CAEA,+CAEI,+BAAkC,CADlC,mBAEJ,CAEA,sCAGI,0BAA2B,CAD3B,WAAY,CAEZ,oBAAqB,CAHrB,YAAa,CAIb,iBAAkB,CAClB,kBACJ,CAMA,uMACI,YACJ,CAGI,qDAEI,UAAW,CADX,eAMJ,CAJI,kEACI,SAAU,CACV,cACJ,CAKZ,wCACI,iCAsBJ,CApBI,+CAGI,0BAA2B,CAD3B,WAAY,CAEZ,oBAAqB,CAHrB,YAAa,CAIb,iBAAkB,CAClB,kBACJ,CAEA,kFACI,cAAe,CACf,eACJ,CAGI,wHAEI,UAAW,CADX,eAEJ","file":"PropertyEditor.local.css"}
|
|
@@ -4,18 +4,11 @@ export default class AnimationChooser extends PopupWindowPage<{
|
|
|
4
4
|
name: string;
|
|
5
5
|
element: HTMLElement;
|
|
6
6
|
}> {
|
|
7
|
-
|
|
8
|
-
selectedDirection: string;
|
|
9
|
-
selectedPoint: string;
|
|
10
|
-
targetElement: HTMLIFrameElement;
|
|
11
|
-
root: ShadowRoot;
|
|
12
|
-
animationName: string;
|
|
13
|
-
srcElement: HTMLElement;
|
|
14
|
-
afterInit: Promise<void>;
|
|
7
|
+
selectedType: string;
|
|
15
8
|
init(): Promise<void>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
updateBody(): void;
|
|
10
|
+
choose({ animationName }: {
|
|
11
|
+
animationName: any;
|
|
12
|
+
}): any;
|
|
20
13
|
}
|
|
21
14
|
//# sourceMappingURL=AnimationChooser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationChooser.d.ts","sourceRoot":"","sources":["../../../../../src/site-editor/properties/controls/animation-chooser/AnimationChooser.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"AnimationChooser.d.ts","sourceRoot":"","sources":["../../../../../src/site-editor/properties/controls/animation-chooser/AnimationChooser.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AASpF,OAAO,+BAA+B,CAAC;AAQvC,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,eAAe,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,WAAW,CAAA;CAAE,CAAC;IAEjG,YAAY,SAAY;IAElB,IAAI;IA0BV,UAAU;IAkBV,MAAM,CAAC,EAAE,aAAa,EAAE;;KAAA;CAI3B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.animation-chooser-page
|
|
1
|
+
.animation-chooser-page [data-window-element=content]>*{height:600px;width:750px}
|
|
2
2
|
/*# sourceMappingURL=AnimationChooser.global.css.map */
|
package/dist/site-editor/properties/controls/animation-chooser/AnimationChooser.global.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/site-editor/properties/controls/animation-chooser/AnimationChooser.global.css"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/site-editor/properties/controls/animation-chooser/AnimationChooser.global.css"],"names":[],"mappings":"AAEQ,wDAEI,YAAa,CADb,WAEJ","file":"AnimationChooser.global.css"}
|
|
@@ -1,242 +1,84 @@
|
|
|
1
|
-
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "
|
|
1
|
+
System.register(["tslib", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "@web-atoms/core/dist/core/XNode", "../../../suggestions/pair", "@web-atoms/web-controls/dist/basic/ButtonBar", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/view-model/Action", "./PresetAnimations", "./CustomAnimationEditor", "./AnimationChooser.global.css"], function (_export, _context) {
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var __awaiter, __decorate, __metadata, PopupWindowPage, XNode, pair, ButtonBar, Bind, Action, PresetAnimations, CustomAnimationEditor, AnimationChooser, types;
|
|
5
5
|
_export("default", void 0);
|
|
6
6
|
return {
|
|
7
7
|
setters: [function (_tslib) {
|
|
8
|
-
__addDisposableResource = _tslib.__addDisposableResource;
|
|
9
8
|
__awaiter = _tslib.__awaiter;
|
|
10
9
|
__decorate = _tslib.__decorate;
|
|
11
|
-
__disposeResources = _tslib.__disposeResources;
|
|
12
10
|
__metadata = _tslib.__metadata;
|
|
13
11
|
}, function (_webAtomsWebControlsDistMobileAppMobileApp) {
|
|
14
12
|
PopupWindowPage = _webAtomsWebControlsDistMobileAppMobileApp.PopupWindowPage;
|
|
15
|
-
}, function (
|
|
13
|
+
}, function (_webAtomsCoreDistCoreXNode) {
|
|
16
14
|
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
17
|
-
}, function (_commonControlsButtonsIconButton) {
|
|
18
|
-
PlayIconTextButton = _commonControlsButtonsIconButton.PlayIconTextButton;
|
|
19
|
-
SaveIconTextButton = _commonControlsButtonsIconButton.SaveIconTextButton;
|
|
20
|
-
}, function (_webAtomsWebControlsDistBasicAtomRepeater) {
|
|
21
|
-
AtomRepeater = _webAtomsWebControlsDistBasicAtomRepeater.default;
|
|
22
15
|
}, function (_suggestionsPair) {
|
|
23
16
|
pair = _suggestionsPair.default;
|
|
24
17
|
}, function (_webAtomsWebControlsDistBasicButtonBar) {
|
|
25
18
|
ButtonBar = _webAtomsWebControlsDistBasicButtonBar.default;
|
|
26
19
|
}, function (_webAtomsCoreDistCoreBind) {
|
|
27
20
|
Bind = _webAtomsCoreDistCoreBind.default;
|
|
28
|
-
}, function (_commonPackageInfo) {
|
|
29
|
-
packageVersion = _commonPackageInfo.packageVersion;
|
|
30
21
|
}, function (_webAtomsCoreDistViewModelAction) {
|
|
31
22
|
Action = _webAtomsCoreDistViewModelAction.default;
|
|
32
|
-
}, function (
|
|
33
|
-
|
|
34
|
-
}, function (
|
|
35
|
-
|
|
36
|
-
}],
|
|
23
|
+
}, function (_PresetAnimations) {
|
|
24
|
+
PresetAnimations = _PresetAnimations.default;
|
|
25
|
+
}, function (_CustomAnimationEditor) {
|
|
26
|
+
CustomAnimationEditor = _CustomAnimationEditor.default;
|
|
27
|
+
}, function (_AnimationChooserGlobalCss) {}],
|
|
37
28
|
execute: function () {
|
|
38
|
-
|
|
39
|
-
directions = pair.from([{
|
|
40
|
-
label: "in",
|
|
41
|
-
value: "in"
|
|
42
|
-
}, "in-from", "in-from-far", {
|
|
43
|
-
label: "out",
|
|
44
|
-
value: "out"
|
|
45
|
-
}, "out-to", "out-to-far"]);
|
|
46
|
-
points = pair.from([{
|
|
47
|
-
label: "Center",
|
|
48
|
-
value: ""
|
|
49
|
-
}, "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]);
|
|
29
|
+
types = pair.from(["Preset", "Custom"]);
|
|
50
30
|
_export("default", AnimationChooser = class AnimationChooser extends PopupWindowPage {
|
|
51
31
|
constructor() {
|
|
52
32
|
super(...arguments);
|
|
53
|
-
this.
|
|
54
|
-
this.selectedDirection = "";
|
|
55
|
-
this.selectedPoint = "";
|
|
56
|
-
this.animationName = "slide";
|
|
33
|
+
this.selectedType = "Preset";
|
|
57
34
|
}
|
|
58
35
|
init() {
|
|
59
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
37
|
var _a;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
this.afterInit = sp.promise;
|
|
69
|
-
this.title = "Choose Animation";
|
|
70
|
-
const {
|
|
71
|
-
name,
|
|
72
|
-
element: srcElement
|
|
73
|
-
} = (_a = this.parameters) !== null && _a !== void 0 ? _a : {};
|
|
74
|
-
this.srcElement = srcElement;
|
|
75
|
-
if (name) {
|
|
76
|
-
this.animationName = name;
|
|
77
|
-
this.headerRenderer = () => XNode.create("div", null, "Existing animation is ", name);
|
|
78
|
-
for (const element of animations) {
|
|
79
|
-
if (element.value && name.startsWith(element.value)) {
|
|
80
|
-
this.selectedAnimation = element.value;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
for (const element of directions) {
|
|
84
|
-
if (element.value && name.includes(element.value + "-")) {
|
|
85
|
-
this.selectedDirection = element.value;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
for (const element of points) {
|
|
89
|
-
if (element.value && name.endsWith("-" + element.value)) {
|
|
90
|
-
this.selectedPoint = element.value;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
this.element.className = "animation-chooser-page";
|
|
95
|
-
this.renderer = XNode.create("div", null, XNode.create("main", null, XNode.create("header", null, XNode.create(ButtonBar, {
|
|
96
|
-
valuePath: x => x.value,
|
|
97
|
-
labelPath: x => x.label,
|
|
98
|
-
items: directions,
|
|
99
|
-
value: Bind.twoWaysImmediate(() => this.selectedDirection)
|
|
100
|
-
})), XNode.create("aside", {
|
|
101
|
-
class: "left"
|
|
102
|
-
}, XNode.create(AtomRepeater, {
|
|
103
|
-
allowMultipleSelection: false,
|
|
104
|
-
selectOnClick: true,
|
|
105
|
-
valuePath: x => x.value,
|
|
106
|
-
value: Bind.twoWaysImmediate(() => this.selectedAnimation),
|
|
107
|
-
itemRenderer: item => XNode.create("label", {
|
|
108
|
-
text: item.label
|
|
109
|
-
}),
|
|
110
|
-
items: animations
|
|
111
|
-
})), XNode.create("aside", {
|
|
112
|
-
class: "right",
|
|
113
|
-
"style-display": Bind.oneWay(() => /(in|out)/i.test(this.selectedDirection))
|
|
114
|
-
}, XNode.create(AtomRepeater, {
|
|
115
|
-
allowMultipleSelection: false,
|
|
116
|
-
selectOnClick: true,
|
|
117
|
-
valuePath: x => x.value,
|
|
118
|
-
value: Bind.twoWaysImmediate(() => this.selectedPoint),
|
|
119
|
-
itemRenderer: item => XNode.create("label", {
|
|
120
|
-
text: item.label
|
|
121
|
-
}),
|
|
122
|
-
items: points
|
|
123
|
-
})), XNode.create("iframe", {
|
|
124
|
-
class: "target",
|
|
125
|
-
"animation-name": Bind.oneWay((s, e) => this.updateAnimationName(e, this.selectedAnimation, this.selectedDirection, this.selectedPoint))
|
|
126
|
-
}), XNode.create("footer", null, XNode.create(SaveIconTextButton, {
|
|
127
|
-
"data-click-event": "apply-animation",
|
|
128
|
-
"style-display": Bind.oneWay(() => this.animationName ? true : false),
|
|
129
|
-
text: "Apply"
|
|
130
|
-
}), XNode.create(PlayIconTextButton, {
|
|
131
|
-
class: "play",
|
|
132
|
-
"data-click-event": "play-animation"
|
|
133
|
-
}))));
|
|
134
|
-
this.targetElement = this.element.querySelector(".target");
|
|
135
|
-
this.targetElement.setAttribute("sandbox", "allow-scripts");
|
|
136
|
-
yield sleep(100);
|
|
137
|
-
this.updateAnimationName();
|
|
138
|
-
} catch (e_1) {
|
|
139
|
-
env_1.error = e_1;
|
|
140
|
-
env_1.hasError = true;
|
|
141
|
-
} finally {
|
|
142
|
-
__disposeResources(env_1);
|
|
38
|
+
this.element.className = "animation-chooser-page";
|
|
39
|
+
const name = (_a = this.parameters) === null || _a === void 0 ? void 0 : _a.name;
|
|
40
|
+
if (/^\@/i.test(name)) {
|
|
41
|
+
this.selectedType = "Custom";
|
|
42
|
+
this.title = "Custom Animation";
|
|
43
|
+
} else {
|
|
44
|
+
this.title = name ? `Animation ${name}` : "Choose Animation";
|
|
143
45
|
}
|
|
46
|
+
this.headerRenderer = () => XNode.create("div", {
|
|
47
|
+
"data-layout": "header-row"
|
|
48
|
+
}, XNode.create(ButtonBar, {
|
|
49
|
+
valuePath: x => x.value,
|
|
50
|
+
labelPath: x => x.label,
|
|
51
|
+
items: types,
|
|
52
|
+
value: Bind.twoWaysImmediate(() => this.selectedType),
|
|
53
|
+
"event-input": () => this.updateBody()
|
|
54
|
+
}));
|
|
55
|
+
this.updateBody();
|
|
144
56
|
});
|
|
145
57
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
this.animationName = name;
|
|
155
|
-
let tag = "section";
|
|
156
|
-
let attributes = "";
|
|
157
|
-
if (/animated\-/i.test(this.srcElement.tagName)) {
|
|
158
|
-
tag = "animated-text";
|
|
159
|
-
attributes = `text-content="Animated"`;
|
|
58
|
+
updateBody() {
|
|
59
|
+
var _a, _b, _c, _d, _e;
|
|
60
|
+
if (this.selectedType === "Preset") {
|
|
61
|
+
this.renderer = XNode.create("div", null, XNode.create(PresetAnimations, {
|
|
62
|
+
srcElement: (_a = this.parameters) === null || _a === void 0 ? void 0 : _a.element,
|
|
63
|
+
currentAnimationName: (_b = this.parameters) === null || _b === void 0 ? void 0 : _b.name
|
|
64
|
+
}));
|
|
65
|
+
return;
|
|
160
66
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
<script src="https://cdn.jsdelivr.net/npm/@social-mail/web-components@latest/dist/main.js"></script>
|
|
166
|
-
<style>
|
|
167
|
-
html, body {
|
|
168
|
-
margin: 0;
|
|
169
|
-
padding: 0;
|
|
170
|
-
width: 100vw;
|
|
171
|
-
height: 100vh;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
main {
|
|
175
|
-
position: absolute;
|
|
176
|
-
left: 0;
|
|
177
|
-
right: 0;
|
|
178
|
-
top: 0;
|
|
179
|
-
bottom: 0;
|
|
180
|
-
overflow: hidden;
|
|
181
|
-
display: grid;
|
|
182
|
-
align-items: center;
|
|
183
|
-
justify-items: center;
|
|
184
|
-
align-content: center;
|
|
185
|
-
justify-content: center;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
section {
|
|
189
|
-
display: block;
|
|
190
|
-
width: 100px;
|
|
191
|
-
height: 100px;
|
|
192
|
-
background-color: blue;
|
|
193
|
-
animation-delay: 1s;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
animated-text {
|
|
197
|
-
font-size: 40px;
|
|
198
|
-
animation-composition: add;
|
|
67
|
+
this.renderer = XNode.create("div", null, XNode.create(CustomAnimationEditor, {
|
|
68
|
+
srcElement: (_c = this.parameters) === null || _c === void 0 ? void 0 : _c.element,
|
|
69
|
+
code: /^\@/i.test((_e = (_d = this.parameters) === null || _d === void 0 ? void 0 : _d.name) === null || _e === void 0 ? void 0 : _e.trim()) ? this.parameters.name : ""
|
|
70
|
+
}));
|
|
199
71
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
<${tag} styler-on-enter="${name}" styler-entered="yes" ${attributes}></${tag}>
|
|
205
|
-
</main>
|
|
206
|
-
</body>
|
|
207
|
-
</html>
|
|
208
|
-
`;
|
|
209
|
-
this.updateContent(html).catch(console.error);
|
|
210
|
-
}
|
|
211
|
-
updateContent(html) {
|
|
212
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
213
|
-
const env_2 = {
|
|
214
|
-
stack: [],
|
|
215
|
-
error: void 0,
|
|
216
|
-
hasError: false
|
|
217
|
-
};
|
|
218
|
-
try {
|
|
219
|
-
const s = __addDisposableResource(env_2, new PromiseScope(), false);
|
|
220
|
-
const old = this.afterInit;
|
|
221
|
-
this.afterInit = s.promise;
|
|
222
|
-
yield old;
|
|
223
|
-
this.targetElement.srcdoc = html;
|
|
224
|
-
} catch (e_2) {
|
|
225
|
-
env_2.error = e_2;
|
|
226
|
-
env_2.hasError = true;
|
|
227
|
-
} finally {
|
|
228
|
-
__disposeResources(env_2);
|
|
229
|
-
}
|
|
230
|
-
});
|
|
72
|
+
choose({
|
|
73
|
+
animationName
|
|
74
|
+
}) {
|
|
75
|
+
return animationName;
|
|
231
76
|
}
|
|
232
77
|
});
|
|
233
78
|
__decorate([Action({
|
|
234
79
|
close: true,
|
|
235
80
|
onEvent: "apply-animation"
|
|
236
|
-
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", void 0)], AnimationChooser.prototype, "choose", null);
|
|
237
|
-
__decorate([Action({
|
|
238
|
-
onEvent: "play-animation"
|
|
239
|
-
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", void 0)], AnimationChooser.prototype, "playAnimation", null);
|
|
81
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], AnimationChooser.prototype, "choose", null);
|
|
240
82
|
}
|
|
241
83
|
};
|
|
242
84
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AnimationChooser","
|
|
1
|
+
{"version":3,"names":["AnimationChooser","types","_export","setters","_tslib","PopupWindowPage","_webAtomsWebControlsDistMobileAppMobileApp","_webAtomsCoreDistCoreXNode","XNode","default","_suggestionsPair","pair","_webAtomsWebControlsDistBasicButtonBar","ButtonBar","_webAtomsCoreDistCoreBind","Bind","_webAtomsCoreDistViewModelAction","Action","_PresetAnimations","PresetAnimations","_CustomAnimationEditor","CustomAnimationEditor","_AnimationChooserGlobalCss","execute","from","constructor","selectedType","init","element","className","name","_a","parameters","test","title","headerRenderer","create","valuePath","x","value","labelPath","label","items","twoWaysImmediate","event-input","updateBody","renderer","srcElement","currentAnimationName","_b","_c","code","_e","_d","trim","choose","animationName","__decorate","close","onEvent"],"sources":["../../../../../src/site-editor/properties/controls/animation-chooser/AnimationChooser.tsx"],"sourcesContent":[null],"mappings":";;;yIAiBqBA,gBAAiB,EAAAC,KAAA;EAAAC,OAAA;EAAA;IAAAC,OAAA,aAAAC,MAAA;;;;;MAjB7BC,eAAe,GAAAC,0CAAA,CAAfD,eAAe;IAAA,aAAAE,0BAAA;MACjBC,KAAK,GAAAD,0BAAA,CAAAE,OAAA;IAAA,aAAAC,gBAAA;MACLC,IAAI,GAAAD,gBAAA,CAAAD,OAAA;IAAA,aAAAG,sCAAA;MACJC,SAAS,GAAAD,sCAAA,CAAAH,OAAA;IAAA,aAAAK,yBAAA;MACTC,IAAI,GAAAD,yBAAA,CAAAL,OAAA;IAAA,aAAAO,gCAAA;MACJC,MAAM,GAAAD,gCAAA,CAAAP,OAAA;IAAA,aAAAS,iBAAA;MACNC,gBAAgB,GAAAD,iBA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,KAAK,QAAQ,EAAE;YAChC,IAAI,CAACoB,QAAQ,GAAGtC,KAAA,CAAA4B,MAAA,cACZ5B,KAAA,CAAA4B,MAAA,CAACjB,gBAAgB;cACb4B,UAAU,EAAE,CAAAhB,EAAA,OAAI,CAACC,UAAU,cAAAD,EAAA,uBAAAA,EAAA,CAAEH,OAAO;cACpCoB,oBAAoB,EAAE,CAAAC,EAAA,OAAI,CAACjB,UAAU,cAAAiB,EAAA,uBAAAA,EAAA,CAAEnB;YAAI,EAAG,CAChD;YACN;UACJ;UACA,IAAI,CAACgB,QAAQ,GAAGtC,KAAA,CAAA4B,MAAA,cACZ5B,KAAA,CAAA4B,MAAA,CAACf,qBAAqB;YAClB0B,UAAU,EAAE,CAAAG,EAAA,OAAI,CAAClB,UAAU,cAAAkB,EAAA,uBAAAA,EAAA,CAAEtB,OAAO;YACpCuB,IAAI,EAAE,MAAM,CAAClB,IAAI,CAAC,CAAAmB,EAAA,IAAAC,EAAA,OAAI,CAACrB,UAAU,cAAAqB,EAAA,uBAAAA,EAAA,CAAEvB,IAAI,cAAAsB,EAAA,uBAAAA,EAAA,CAAEE,IAAI,EAAE,CAAC,GAAG,IAAI,CAACtB,UAAU,CAACF,IAAI,GAAG;UAAE,EAC1E,CACJ;QACV;QAGAyB,MAAMA,CAAC;UAAEC;QAAa,CAAE;UACpB,OAAOA,aAAa;QACxB;OAEH;MAJGC,UAAA,EADCxC,MAAM,CAAC;QAAEyC,KAAK,EAAE,IAAI;QAAEC,OAAO,EAAE;MAAiB,CAAC,CAAC,E,qKAGlD;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
|
|
2
|
+
import "./CustomAnimationEditor.global.css";
|
|
3
|
+
import MonacoService from "../../../../code-editor/MonacoService";
|
|
4
|
+
export default class CustomAnimationEditor extends AtomControl {
|
|
5
|
+
code: string;
|
|
6
|
+
srcElement: HTMLElement;
|
|
7
|
+
editor: HTMLIFrameElement;
|
|
8
|
+
preview: HTMLIFrameElement;
|
|
9
|
+
editorService: MonacoService;
|
|
10
|
+
codeModel: monaco.editor.ITextModel;
|
|
11
|
+
afterInit: any;
|
|
12
|
+
constructor(app: any, e: any);
|
|
13
|
+
init(): Promise<void>;
|
|
14
|
+
choose(): void;
|
|
15
|
+
codeChanged({ code }: {
|
|
16
|
+
code: any;
|
|
17
|
+
}): void;
|
|
18
|
+
updateAnimationName(): void;
|
|
19
|
+
updateContent(html: string): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=CustomAnimationEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomAnimationEditor.d.ts","sourceRoot":"","sources":["../../../../../src/site-editor/properties/controls/animation-chooser/CustomAnimationEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,oCAAoC,CAAC;AAE5C,OAAO,aAAa,MAAM,uCAAuC,CAAC;AAUlE,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAGnD,IAAI,EAAE,MAAM,CAAC;IAGb,UAAU,EAAE,WAAW,CAAC;IAE/B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;IACpC,SAAS,EAAE,GAAG,CAAC;gBAEH,GAAG,KAAA,EAAE,CAAC,KAAA;IAMZ,IAAI;IAgCV,MAAM;IAKN,WAAW,CAAC,EAAE,IAAI,EAAE;;KAAA;IAMpB,mBAAmB;IAqEb,aAAa,CAAC,IAAI,EAAE,MAAM;CASnC"}
|
package/dist/site-editor/properties/controls/animation-chooser/CustomAnimationEditor.global.css
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.custom-animation-editor{display:grid;grid-template-columns:2fr auto 1fr;grid-template-rows:1fr auto}.custom-animation-editor iframe{border:none;height:100%;outline:none;width:100%}.custom-animation-editor .editor{grid-column:1}.custom-animation-editor .preview{grid-column:3}.custom-animation-editor .apply{grid-column:1;grid-row:2}.custom-animation-editor .play{align-content:end;display:flex;flex-direction:row;grid-column:3;grid-row:2;justify-content:end}
|
|
2
|
+
/*# sourceMappingURL=CustomAnimationEditor.global.css.map */
|
package/dist/site-editor/properties/controls/animation-chooser/CustomAnimationEditor.global.css.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/site-editor/properties/controls/animation-chooser/CustomAnimationEditor.global.css"],"names":[],"mappings":"AAAA,yBACI,YAAa,CACb,kCAAmC,CACnC,2BAiCJ,CA/BI,gCACI,WAAY,CAGZ,WAAY,CAFZ,YAAa,CACb,UAEJ,CAEA,iCACI,aACJ,CAEA,kCACI,aACJ,CAEA,gCACI,aAAc,CACd,UACJ,CAGA,+BAGI,iBAAkB,CAClB,YAAa,CACb,kBAAmB,CAJnB,aAAc,CACd,UAAW,CAIX,mBACJ","file":"CustomAnimationEditor.global.css"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
System.register(["tslib", "@web-atoms/core/dist/web/controls/AtomControl", "./CustomAnimationEditor.global.css", "@web-atoms/core/dist/core/BindableProperty", "../../../../code-editor/MonacoService", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/view-model/Action", "./PromiseScope", "../../../../common/PackageInfo", "../../../../common/controls/buttons/IconButton"], function (_export, _context) {
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var __addDisposableResource, __awaiter, __decorate, __disposeResources, __metadata, AtomControl, BindableProperty, MonacoService, XNode, Action, PromiseScope, packageVersion, PlayIconTextButton, SaveIconTextButton, CustomAnimationEditor, animationNameID;
|
|
5
|
+
_export("default", void 0);
|
|
6
|
+
return {
|
|
7
|
+
setters: [function (_tslib) {
|
|
8
|
+
__addDisposableResource = _tslib.__addDisposableResource;
|
|
9
|
+
__awaiter = _tslib.__awaiter;
|
|
10
|
+
__decorate = _tslib.__decorate;
|
|
11
|
+
__disposeResources = _tslib.__disposeResources;
|
|
12
|
+
__metadata = _tslib.__metadata;
|
|
13
|
+
}, function (_webAtomsCoreDistWebControlsAtomControl) {
|
|
14
|
+
AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
|
|
15
|
+
}, function (_CustomAnimationEditorGlobalCss) {}, function (_webAtomsCoreDistCoreBindableProperty) {
|
|
16
|
+
BindableProperty = _webAtomsCoreDistCoreBindableProperty.BindableProperty;
|
|
17
|
+
}, function (_codeEditorMonacoService) {
|
|
18
|
+
MonacoService = _codeEditorMonacoService.default;
|
|
19
|
+
}, function (_webAtomsCoreDistCoreXNode) {
|
|
20
|
+
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
21
|
+
}, function (_webAtomsCoreDistViewModelAction) {
|
|
22
|
+
Action = _webAtomsCoreDistViewModelAction.default;
|
|
23
|
+
}, function (_PromiseScope) {
|
|
24
|
+
PromiseScope = _PromiseScope.default;
|
|
25
|
+
}, function (_commonPackageInfo) {
|
|
26
|
+
packageVersion = _commonPackageInfo.packageVersion;
|
|
27
|
+
}, function (_commonControlsButtonsIconButton) {
|
|
28
|
+
PlayIconTextButton = _commonControlsButtonsIconButton.PlayIconTextButton;
|
|
29
|
+
SaveIconTextButton = _commonControlsButtonsIconButton.SaveIconTextButton;
|
|
30
|
+
}],
|
|
31
|
+
execute: function () {
|
|
32
|
+
animationNameID = Date.now();
|
|
33
|
+
_export("default", CustomAnimationEditor = class CustomAnimationEditor extends AtomControl {
|
|
34
|
+
constructor(app, e) {
|
|
35
|
+
super(app, e);
|
|
36
|
+
this.element.classList.add("custom-animation-editor");
|
|
37
|
+
this.pushInit();
|
|
38
|
+
}
|
|
39
|
+
init() {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
this.code || (this.code = "@keyframes name \n{\n}");
|
|
42
|
+
if (!/^\@/i.test(this.code.trim())) {
|
|
43
|
+
this.code = "@keyframes name \n{\n}";
|
|
44
|
+
}
|
|
45
|
+
this.render(XNode.create("div", null, XNode.create("iframe", {
|
|
46
|
+
class: "editor"
|
|
47
|
+
}), XNode.create("iframe", {
|
|
48
|
+
class: "preview"
|
|
49
|
+
}), XNode.create("div", {
|
|
50
|
+
class: "apply"
|
|
51
|
+
}, XNode.create(SaveIconTextButton, {
|
|
52
|
+
"data-click-event": "save-animation",
|
|
53
|
+
text: "Apply"
|
|
54
|
+
})), XNode.create("div", {
|
|
55
|
+
class: "play"
|
|
56
|
+
}, XNode.create(PlayIconTextButton, {
|
|
57
|
+
"data-click-event": "play-animation"
|
|
58
|
+
}))));
|
|
59
|
+
this.editor = this.element.querySelector(".editor");
|
|
60
|
+
this.preview = this.element.querySelector(".preview");
|
|
61
|
+
this.editorService = yield MonacoService.createEditor(this, this.editor);
|
|
62
|
+
this.codeModel = this.editorService.setCodeModel(this, this.code, "http://a.com/code.css");
|
|
63
|
+
this.updateAnimationName();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
choose() {
|
|
67
|
+
this.element.dispatchEvent(new CustomEvent("applyAnimation", {
|
|
68
|
+
bubbles: true,
|
|
69
|
+
detail: {
|
|
70
|
+
animationName: this.code
|
|
71
|
+
}
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
codeChanged({
|
|
75
|
+
code
|
|
76
|
+
}) {
|
|
77
|
+
this.code = code;
|
|
78
|
+
this.updateAnimationName();
|
|
79
|
+
}
|
|
80
|
+
updateAnimationName() {
|
|
81
|
+
let tag = "section";
|
|
82
|
+
let attributes = "";
|
|
83
|
+
let text = this.code;
|
|
84
|
+
const id = `internal-style-generated-${animationNameID++}`;
|
|
85
|
+
text = text.replace(/(\@keyframes\s{1,100})([^\s\{]{1,200})(\s{1,1000}\{)/gm, "$1" + id + "$3");
|
|
86
|
+
if (/animated\-/i.test(this.srcElement.tagName)) {
|
|
87
|
+
tag = "animated-text";
|
|
88
|
+
attributes = `text-content="Animated"`;
|
|
89
|
+
}
|
|
90
|
+
const html = `<!DOCTYPE html>
|
|
91
|
+
<html>
|
|
92
|
+
<head>
|
|
93
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@social-mail/social-mail-client@${packageVersion}/styler-lite/styler.css"/>
|
|
94
|
+
<script src="https://cdn.jsdelivr.net/npm/@social-mail/web-components@latest/dist/main.js"></script>
|
|
95
|
+
<style>
|
|
96
|
+
html, body {
|
|
97
|
+
margin: 0;
|
|
98
|
+
padding: 0;
|
|
99
|
+
width: 100vw;
|
|
100
|
+
height: 100vh;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
main {
|
|
104
|
+
position: absolute;
|
|
105
|
+
left: 0;
|
|
106
|
+
right: 0;
|
|
107
|
+
top: 0;
|
|
108
|
+
bottom: 0;
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
display: grid;
|
|
111
|
+
align-items: center;
|
|
112
|
+
justify-items: center;
|
|
113
|
+
align-content: center;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
section {
|
|
118
|
+
display: block;
|
|
119
|
+
width: 100px;
|
|
120
|
+
height: 100px;
|
|
121
|
+
background-color: blue;
|
|
122
|
+
animation-delay: 1s;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
animated-text {
|
|
126
|
+
font-size: 40px;
|
|
127
|
+
animation-composition: add;
|
|
128
|
+
}
|
|
129
|
+
${text}
|
|
130
|
+
</style>
|
|
131
|
+
</head>
|
|
132
|
+
<body styler-expansion-enabled="true">
|
|
133
|
+
<main>
|
|
134
|
+
<${tag} styler-on-enter="${id}" styler-entered="yes" ${attributes}></${tag}>
|
|
135
|
+
</main>
|
|
136
|
+
</body>
|
|
137
|
+
</html>
|
|
138
|
+
`;
|
|
139
|
+
this.updateContent(html).catch(console.error);
|
|
140
|
+
}
|
|
141
|
+
updateContent(html) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
const env_1 = {
|
|
144
|
+
stack: [],
|
|
145
|
+
error: void 0,
|
|
146
|
+
hasError: false
|
|
147
|
+
};
|
|
148
|
+
try {
|
|
149
|
+
const s = __addDisposableResource(env_1, new PromiseScope(), false);
|
|
150
|
+
const old = this.afterInit;
|
|
151
|
+
this.afterInit = s.promise;
|
|
152
|
+
yield old;
|
|
153
|
+
this.preview.srcdoc = html;
|
|
154
|
+
} catch (e_1) {
|
|
155
|
+
env_1.error = e_1;
|
|
156
|
+
env_1.hasError = true;
|
|
157
|
+
} finally {
|
|
158
|
+
__disposeResources(env_1);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
__decorate([BindableProperty, __metadata("design:type", String)], CustomAnimationEditor.prototype, "code", void 0);
|
|
164
|
+
__decorate([BindableProperty, __metadata("design:type", HTMLElement)], CustomAnimationEditor.prototype, "srcElement", void 0);
|
|
165
|
+
__decorate([Action({
|
|
166
|
+
onEvent: "save-animation"
|
|
167
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", void 0)], CustomAnimationEditor.prototype, "choose", null);
|
|
168
|
+
__decorate([Action({
|
|
169
|
+
onEvent: "code-changed"
|
|
170
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], CustomAnimationEditor.prototype, "codeChanged", null);
|
|
171
|
+
__decorate([Action({
|
|
172
|
+
onEvent: "play-animation"
|
|
173
|
+
}), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", void 0)], CustomAnimationEditor.prototype, "updateAnimationName", null);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
});
|
|
177
|
+
//# sourceMappingURL=CustomAnimationEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CustomAnimationEditor","animationNameID","_export","setters","_tslib","AtomControl","_webAtomsCoreDistWebControlsAtomControl","_CustomAnimationEditorGlobalCss","_webAtomsCoreDistCoreBindableProperty","BindableProperty","_codeEditorMonacoService","MonacoService","default","_webAtomsCoreDistCoreXNode","XNode","_webAtomsCoreDistViewModelAction","Action","_PromiseScope","PromiseScope","_commonPackageInfo","packageVersion","_commonControlsButtonsIconButton","PlayIconTextButton","SaveIconTextButton","execute","Date","now","constructor","app","e","element","classList","add","pushInit","init","code","test","trim","render","create","class","text","editor","querySelector","preview","editorService","createEditor","codeModel","setCodeModel","updateAnimationName","choose","dispatchEvent","CustomEvent","bubbles","detail","animationName","codeChanged","tag","attributes","id","replace","srcElement","tagName","html","updateContent","catch","console","error","s","__addDisposableResource","env_1","old","afterInit","promise","srcdoc","__decorate","HTMLElement","onEvent"],"sources":["../../../../../src/site-editor/properties/controls/animation-chooser/CustomAnimationEditor.tsx"],"sourcesContent":[null],"mappings":";;;yNAcqBA,qBAAsB,EAAAC,eAAA;EAAAC,OAAA;EAAA;IAAAC,OAAA,aAAAC,MAAA;;;;;;;MAdlCC,WAAW,GAAAC,uCAAA,CAAXD,WAAW;IAAA,aAAAE,+BAAA,gBAAAC,qCAAA;MAGXC,gBAAgB,GAAAD,qCAAA,CAAhBC,gBAAgB;IAAA,aAAAC,wBAAA;MAClBC,aAAa,GAAAD,wBAAA,CAAAE,OAAA;IAAA,aAAAC,0BAAA;MACbC,KAAK,GAAAD,0BAAA,CAAAD,OAAA;IAAA,aAAAG,gCAAA;MACLC,MAAM,GAAAD,gCAAA,CAAAH,OAAA;IAAA,aAAAK,aAAA;MACNC,YAAY,GAAAD,aAAA,CAAAL,OAAA;IAAA,aAAAO,kBAAA;MACVC,cAAc,GAAAD,kBAAA,CAAdC,cAAc;IAAA,aAAAC,gCAAA;MACdC,kBAAkB,GAAAD,gCAAA,CAAlBC,kBAAkB;MAAEC,kBAAkB,GAAAF,gCAAA,CAAlBE,kBAAkB;IAAA;IAAAC,OAAA,WAAAA,CAAA;MAG3CvB,eAAe,G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