@social-mail/social-mail-client 1.2.140 → 1.2.142
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/admin/AdminAppIndex.pack.js +11 -8
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +3 -3
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/site-editor/blocks/Components.d.ts +7 -0
- package/dist/site-editor/blocks/Components.d.ts.map +1 -1
- package/dist/site-editor/blocks/Components.js +1 -7
- package/dist/site-editor/blocks/Components.js.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/WebSitePageEditor.js +9 -0
- package/dist/site-editor/editor/WebSitePageEditor.js.map +1 -1
- package/dist/site-editor/styler/properties/text/stylerText.d.ts.map +1 -1
- package/dist/site-editor/styler/properties/text/stylerText.js +1 -1
- package/dist/site-editor/styler/properties/text/stylerText.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +11 -8
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +3 -3
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/package.json +1 -1
- package/src/site-editor/blocks/Components.tsx +14 -7
- package/src/site-editor/editor/WebSitePageEditor.tsx +9 -0
- package/src/site-editor/styler/properties/text/stylerText.ts +3 -2
- package/dist/public/components/typewriter/TypeWriter.d.ts +0 -9
- package/dist/public/components/typewriter/TypeWriter.d.ts.map +0 -1
- package/dist/public/components/typewriter/TypeWriter.js +0 -85
- package/dist/public/components/typewriter/TypeWriter.js.map +0 -1
- package/dist/public/components/typewriter/TypeWriter.pack.js +0 -12666
- package/dist/public/components/typewriter/TypeWriter.pack.js.map +0 -1
- package/dist/public/components/typewriter/TypeWriter.pack.min.js +0 -279
- package/dist/public/components/typewriter/TypeWriter.pack.min.js.map +0 -1
- package/src/public/components/typewriter/TypeWriter.tsx +0 -78
package/package.json
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
1
3
|
import XNode from "@web-atoms/core/dist/core/XNode";
|
|
2
4
|
import { Block } from "./Block";
|
|
3
5
|
import { StylerSets } from "../styler/StylerSets";
|
|
@@ -43,15 +45,20 @@ export const BlogComponent = Block({
|
|
|
43
45
|
</section>
|
|
44
46
|
});
|
|
45
47
|
|
|
48
|
+
declare global {
|
|
49
|
+
namespace JSX {
|
|
50
|
+
interface IntrinsicElements {
|
|
51
|
+
"type-writer": any;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
46
57
|
export const TypeWriterComponent = Block({
|
|
47
58
|
className: "fad fa-input-text",
|
|
48
59
|
title: "Add TypeWriter Component",
|
|
49
|
-
factory: () => <
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
data-host="true"
|
|
53
|
-
data-view="dist/public/components/typewriter/TypeWriter"
|
|
54
|
-
data-json-args={`["Passionate Actor", "Method Actor", "Teleprompter"]`}>
|
|
55
|
-
</section>
|
|
60
|
+
factory: () => <type-writer>
|
|
61
|
+
Passionate Actor", "Method Actor", "Teleprompter
|
|
62
|
+
</type-writer>
|
|
56
63
|
});
|
|
57
64
|
|
|
@@ -45,6 +45,15 @@ export default class WebSitePageEditor extends HtmlPageEditor {
|
|
|
45
45
|
}
|
|
46
46
|
await this.addStyleSheet(vars);
|
|
47
47
|
|
|
48
|
+
let script = this.htmlDocument.querySelector("script[web-components]");
|
|
49
|
+
if (!script) {
|
|
50
|
+
script = this.htmlDocument.createElement("script");
|
|
51
|
+
script.setAttribute("web-components", "social");
|
|
52
|
+
script.setAttribute("async", "true");
|
|
53
|
+
script.setAttribute("defer", "true");
|
|
54
|
+
this.htmlDocument.body.appendChild(script);
|
|
55
|
+
}
|
|
56
|
+
script.setAttribute("src", "//www.unpkg.com/@social-mail/web-components@latest/dist/components.js");
|
|
48
57
|
}
|
|
49
58
|
|
|
50
59
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
-
import { StylerProperty, colorVarList, createSet, createVarSet, sizeVarList } from "../../Styler";
|
|
2
|
+
import { StylerProperty, colorVarList, createSet, createVarSet, sizeVarList, stylerVars } from "../../Styler";
|
|
3
3
|
|
|
4
4
|
export const stylerText = {
|
|
5
5
|
|
|
@@ -16,7 +16,8 @@ export const stylerText = {
|
|
|
16
16
|
"large",
|
|
17
17
|
"larger",
|
|
18
18
|
"x-large",
|
|
19
|
-
"xx-large"
|
|
19
|
+
"xx-large",
|
|
20
|
+
... sizeVarList
|
|
20
21
|
], false, true)),
|
|
21
22
|
|
|
22
23
|
stylerFontWeight: new StylerProperty("styler-font-weight",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
|
|
2
|
-
export default class TypeWriter extends AtomControl {
|
|
3
|
-
currentText: string;
|
|
4
|
-
private stop;
|
|
5
|
-
constructor(app: any, e: any);
|
|
6
|
-
init(): Promise<void>;
|
|
7
|
-
loop(): Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=TypeWriter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TypeWriter.d.ts","sourceRoot":"","sources":["../../../../src/public/components/typewriter/TypeWriter.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAgB5E,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;IAExC,WAAW,SAAM;IAExB,OAAO,CAAC,IAAI,CAAS;gBAET,GAAG,KAAA,EAAE,CAAC,KAAA;IAMZ,IAAI;IAWJ,IAAI;CAiCb"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
System.register(["tslib", "@web-atoms/core/dist/Pack", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/core/sleep", "@web-atoms/core/dist/style/styled", "@web-atoms/core/dist/web/controls/AtomControl"], function (_export, _context) {
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
var __awaiter, __decorate, __metadata, Pack, Bind, XNode, sleep, styled, AtomControl, TypeWriter;
|
|
5
|
-
return {
|
|
6
|
-
setters: [function (_tslib) {
|
|
7
|
-
__awaiter = _tslib.__awaiter;
|
|
8
|
-
__decorate = _tslib.__decorate;
|
|
9
|
-
__metadata = _tslib.__metadata;
|
|
10
|
-
}, function (_webAtomsCoreDistPack) {
|
|
11
|
-
Pack = _webAtomsCoreDistPack.default;
|
|
12
|
-
}, function (_webAtomsCoreDistCoreBind) {
|
|
13
|
-
Bind = _webAtomsCoreDistCoreBind.default;
|
|
14
|
-
}, function (_webAtomsCoreDistCoreXNode) {
|
|
15
|
-
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
16
|
-
}, function (_webAtomsCoreDistCoreSleep) {
|
|
17
|
-
sleep = _webAtomsCoreDistCoreSleep.default;
|
|
18
|
-
}, function (_webAtomsCoreDistStyleStyled) {
|
|
19
|
-
styled = _webAtomsCoreDistStyleStyled.default;
|
|
20
|
-
}, function (_webAtomsCoreDistWebControlsAtomControl) {
|
|
21
|
-
AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
|
|
22
|
-
}],
|
|
23
|
-
execute: function () {
|
|
24
|
-
styled.css`
|
|
25
|
-
display: inline-flex;
|
|
26
|
-
align-items: center;
|
|
27
|
-
justify-content: start;
|
|
28
|
-
& > span {
|
|
29
|
-
display: inline-flex;
|
|
30
|
-
padding-right: 1px;
|
|
31
|
-
border-right-style: solid;
|
|
32
|
-
border-right-width: 2px;
|
|
33
|
-
border-right-color: currentColor;
|
|
34
|
-
}
|
|
35
|
-
`.installGlobal("[data-component=type-writer]");
|
|
36
|
-
TypeWriter = class TypeWriter extends AtomControl {
|
|
37
|
-
constructor(app, e) {
|
|
38
|
-
super(app, e);
|
|
39
|
-
this.currentText = "";
|
|
40
|
-
this.stop = false;
|
|
41
|
-
this.element.setAttribute("data-component", "type-writer");
|
|
42
|
-
this.runAfterInit(() => this.app.runAsync(() => this.init()));
|
|
43
|
-
}
|
|
44
|
-
init() {
|
|
45
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
this.render(XNode.create("div", null, XNode.create("span", {
|
|
47
|
-
text: Bind.oneWay(() => this.currentText)
|
|
48
|
-
})));
|
|
49
|
-
yield this.loop();
|
|
50
|
-
this.registerDisposable({
|
|
51
|
-
dispose: () => this.stop = true
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
loop() {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
const textList = JSON.parse(this.element.getAttribute("data-json-args") || `["I am typing"]`);
|
|
58
|
-
let index = 0;
|
|
59
|
-
const max = textList.length;
|
|
60
|
-
while (!this.stop) {
|
|
61
|
-
const current = textList[index];
|
|
62
|
-
let length = 0;
|
|
63
|
-
while (length < current.length) {
|
|
64
|
-
this.currentText = current.substring(0, ++length);
|
|
65
|
-
yield sleep(200);
|
|
66
|
-
}
|
|
67
|
-
while (length) {
|
|
68
|
-
this.currentText = current.substring(0, --length);
|
|
69
|
-
yield sleep(100);
|
|
70
|
-
}
|
|
71
|
-
yield sleep(1000);
|
|
72
|
-
index++;
|
|
73
|
-
if (index === max) {
|
|
74
|
-
index = 0;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
TypeWriter = __decorate([Pack, __metadata("design:paramtypes", [Object, Object])], TypeWriter);
|
|
81
|
-
_export("default", TypeWriter);
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
});
|
|
85
|
-
//# sourceMappingURL=TypeWriter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Pack","_webAtomsCoreDistPack","default","_webAtomsCoreDistCoreBind","Bind","_webAtomsCoreDistCoreXNode","XNode","_webAtomsCoreDistCoreSleep","sleep","_webAtomsCoreDistStyleStyled","styled","_webAtomsCoreDistWebControlsAtomControl","AtomControl","execute","css","installGlobal","TypeWriter","constructor","app","e","currentText","stop","element","setAttribute","runAfterInit","runAsync","init","render","create","text","oneWay","loop","registerDisposable","dispose","textList","JSON","parse","getAttribute","index","max","length","current","substring","__decorate","_export"],"sources":["../../../../src/public/components/typewriter/TypeWriter.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;MAAOA,IAAI,GAAAC,qBAAA,CAAAC,OAAA;IAAA,aAAAC,yBAAA;MACJC,IAAI,GAAAD,yBAAA,CAAAD,OAAA;IAAA,aAAAG,0BAAA;MACJC,KAAK,GAAAD,0BAAA,CAAAH,OAAA;IAAA,aAAAK,0BAAA;MACLC,KAAK,GAAAD,0BAAA,CAAAL,OAAA;IAAA,aAAAO,4BAAA;MACLC,MAAM,GAAAD,4BAAA,CAAAP,OAAA;IAAA,aAAAS,uCAAA;MACJC,WAAW,GAAAD,uCAAA,CAAXC,WAAW;IAAA;IAAAC,OAAA,WAAAA,CAAA;MAEhBH,MAAM,CAACI,GAAI;;;;;;;;;;;KAWV,CAACC,aAAa,CAAC,8BAA8B,CAAC;MAG9BC,UAAU,GAAhB,MAAMA,UAAW,SAAQJ,WAAW;QAM/CK,YAAYC,GAAG,EAAEC,CAAC;UACd,KAAK,CAACD,GAAG,EAAEC,CAAC,CAAC;UALV,KAAAC,WAAW,GAAG,EAAE;UAEf,KAAAC,IAAI,GAAG,KAAK;UAIhB,IAAI,CAACC,OAAO,CAACC,YAAY,CAAC,gBAAgB,EAAC,aAAa,CAAC;UACzD,IAAI,CAACC,YAAY,CAAC,MAAM,IAAI,CAACN,GAAG,CAACO,QAAQ,CAAC,MAAM,IAAI,CAACC,IAAI,EAAE,CAA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