@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.
Files changed (32) hide show
  1. package/dist/admin/AdminAppIndex.pack.js +11 -8
  2. package/dist/admin/AdminAppIndex.pack.js.map +1 -1
  3. package/dist/admin/AdminAppIndex.pack.min.js +3 -3
  4. package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
  5. package/dist/site-editor/blocks/Components.d.ts +7 -0
  6. package/dist/site-editor/blocks/Components.d.ts.map +1 -1
  7. package/dist/site-editor/blocks/Components.js +1 -7
  8. package/dist/site-editor/blocks/Components.js.map +1 -1
  9. package/dist/site-editor/editor/WebSitePageEditor.d.ts.map +1 -1
  10. package/dist/site-editor/editor/WebSitePageEditor.js +9 -0
  11. package/dist/site-editor/editor/WebSitePageEditor.js.map +1 -1
  12. package/dist/site-editor/styler/properties/text/stylerText.d.ts.map +1 -1
  13. package/dist/site-editor/styler/properties/text/stylerText.js +1 -1
  14. package/dist/site-editor/styler/properties/text/stylerText.js.map +1 -1
  15. package/dist/tsconfig.tsbuildinfo +1 -1
  16. package/dist/web/AppIndex.pack.js +11 -8
  17. package/dist/web/AppIndex.pack.js.map +1 -1
  18. package/dist/web/AppIndex.pack.min.js +3 -3
  19. package/dist/web/AppIndex.pack.min.js.map +1 -1
  20. package/package.json +1 -1
  21. package/src/site-editor/blocks/Components.tsx +14 -7
  22. package/src/site-editor/editor/WebSitePageEditor.tsx +9 -0
  23. package/src/site-editor/styler/properties/text/stylerText.ts +3 -2
  24. package/dist/public/components/typewriter/TypeWriter.d.ts +0 -9
  25. package/dist/public/components/typewriter/TypeWriter.d.ts.map +0 -1
  26. package/dist/public/components/typewriter/TypeWriter.js +0 -85
  27. package/dist/public/components/typewriter/TypeWriter.js.map +0 -1
  28. package/dist/public/components/typewriter/TypeWriter.pack.js +0 -12666
  29. package/dist/public/components/typewriter/TypeWriter.pack.js.map +0 -1
  30. package/dist/public/components/typewriter/TypeWriter.pack.min.js +0 -279
  31. package/dist/public/components/typewriter/TypeWriter.pack.min.js.map +0 -1
  32. package/src/public/components/typewriter/TypeWriter.tsx +0 -78
@@ -1,78 +0,0 @@
1
- import Pack from "@web-atoms/core/dist/Pack";
2
- import Bind from "@web-atoms/core/dist/core/Bind";
3
- import XNode from "@web-atoms/core/dist/core/XNode";
4
- import sleep from "@web-atoms/core/dist/core/sleep";
5
- import styled from "@web-atoms/core/dist/style/styled";
6
- import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
7
-
8
- styled.css `
9
- display: inline-flex;
10
- align-items: center;
11
- justify-content: start;
12
- & > span {
13
- display: inline-flex;
14
- padding-right: 1px;
15
- border-right-style: solid;
16
- border-right-width: 2px;
17
- border-right-color: currentColor;
18
- }
19
- `.installGlobal("[data-component=type-writer]");
20
-
21
- @Pack
22
- export default class TypeWriter extends AtomControl {
23
-
24
- public currentText = "";
25
-
26
- private stop = false;
27
-
28
- constructor(app, e) {
29
- super(app, e);
30
- this.element.setAttribute("data-component","type-writer");
31
- this.runAfterInit(() => this.app.runAsync(() => this.init()));
32
- }
33
-
34
- async init() {
35
- this.render(<div>
36
- <span text={Bind.oneWay(() => this.currentText)}/>
37
- </div>);
38
-
39
- await this.loop();
40
- this.registerDisposable({
41
- dispose: () => this.stop = true
42
- });
43
- }
44
-
45
- async loop() {
46
-
47
- const textList = JSON.parse(this.element.getAttribute("data-json-args") || `["I am typing"]`) as string[];
48
-
49
- let index = 0;
50
- const max = textList.length;
51
-
52
- while(!this.stop) {
53
-
54
- const current = textList[index];
55
-
56
- let length = 0;
57
-
58
- // forward...
59
- while(length < current.length) {
60
- this.currentText = current.substring(0, ++length);
61
- await sleep(200);
62
- }
63
-
64
- while(length) {
65
- this.currentText = current.substring(0, --length);
66
- await sleep(100);
67
- }
68
-
69
- await sleep(1000);
70
-
71
- index++;
72
- if (index === max) {
73
- index = 0;
74
- }
75
- }
76
- }
77
-
78
- }