@social-mail/social-mail-client 1.2.55 → 1.2.57

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 (70) hide show
  1. package/dist/admin/AdminAppIndex.pack.js +306 -14
  2. package/dist/admin/AdminAppIndex.pack.js.map +1 -1
  3. package/dist/admin/AdminAppIndex.pack.min.js +129 -6
  4. package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
  5. package/dist/common/pages/websites/manage/ManageWebSitePage.d.ts.map +1 -1
  6. package/dist/common/pages/websites/manage/ManageWebSitePage.js +4 -2
  7. package/dist/common/pages/websites/manage/ManageWebSitePage.js.map +1 -1
  8. package/dist/site-editor/blocks/Buttons.d.ts +4 -0
  9. package/dist/site-editor/blocks/Buttons.d.ts.map +1 -0
  10. package/dist/site-editor/blocks/Buttons.js +45 -0
  11. package/dist/site-editor/blocks/Buttons.js.map +1 -0
  12. package/dist/site-editor/editor/HtmlPageEditor.d.ts.map +1 -1
  13. package/dist/site-editor/editor/HtmlPageEditor.js +10 -3
  14. package/dist/site-editor/editor/HtmlPageEditor.js.map +1 -1
  15. package/dist/site-editor/editor/SelectedElement.d.ts +1 -0
  16. package/dist/site-editor/editor/SelectedElement.d.ts.map +1 -1
  17. package/dist/site-editor/editor/SelectedElement.js +17 -5
  18. package/dist/site-editor/editor/SelectedElement.js.map +1 -1
  19. package/dist/site-editor/properties/groups/AttributeEditor.d.ts.map +1 -1
  20. package/dist/site-editor/properties/groups/AttributeEditor.js +4 -0
  21. package/dist/site-editor/properties/groups/AttributeEditor.js.map +1 -1
  22. package/dist/site-editor/styler/Styler.d.ts +32 -0
  23. package/dist/site-editor/styler/Styler.d.ts.map +1 -1
  24. package/dist/site-editor/styler/Styler.js +8 -0
  25. package/dist/site-editor/styler/Styler.js.map +1 -1
  26. package/dist/site-editor/styler/StylerSet.d.ts +1 -0
  27. package/dist/site-editor/styler/StylerSet.d.ts.map +1 -1
  28. package/dist/site-editor/styler/StylerSet.js +5 -2
  29. package/dist/site-editor/styler/StylerSet.js.map +1 -1
  30. package/dist/site-editor/styler/properties/color-sets/stylerColorSets.d.ts.map +1 -1
  31. package/dist/site-editor/styler/properties/color-sets/stylerColorSets.js +41 -0
  32. package/dist/site-editor/styler/properties/color-sets/stylerColorSets.js.map +1 -1
  33. package/dist/site-editor/styler/properties/elements/elementImageLink.d.ts +2 -0
  34. package/dist/site-editor/styler/properties/elements/elementImageLink.d.ts.map +1 -0
  35. package/dist/site-editor/styler/properties/elements/elementImageLink.js +25 -0
  36. package/dist/site-editor/styler/properties/elements/elementImageLink.js.map +1 -0
  37. package/dist/site-editor/styler/properties/elements/elementLinkButton.d.ts +2 -0
  38. package/dist/site-editor/styler/properties/elements/elementLinkButton.d.ts.map +1 -0
  39. package/dist/site-editor/styler/properties/elements/elementLinkButton.js +36 -0
  40. package/dist/site-editor/styler/properties/elements/elementLinkButton.js.map +1 -0
  41. package/dist/site-editor/styler/properties/elements/elementLinkIconButton.d.ts +2 -0
  42. package/dist/site-editor/styler/properties/elements/elementLinkIconButton.d.ts.map +1 -0
  43. package/dist/site-editor/styler/properties/elements/elementLinkIconButton.js +35 -0
  44. package/dist/site-editor/styler/properties/elements/elementLinkIconButton.js.map +1 -0
  45. package/dist/site-editor/styler/properties/elements/elements.d.ts +3 -0
  46. package/dist/site-editor/styler/properties/elements/elements.d.ts.map +1 -0
  47. package/dist/site-editor/styler/properties/elements/elements.js +20 -0
  48. package/dist/site-editor/styler/properties/elements/elements.js.map +1 -0
  49. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBox.d.ts.map +1 -1
  50. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBox.js +40 -1
  51. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBox.js.map +1 -1
  52. package/dist/tsconfig.tsbuildinfo +1 -1
  53. package/dist/web/AppIndex.pack.js +306 -14
  54. package/dist/web/AppIndex.pack.js.map +1 -1
  55. package/dist/web/AppIndex.pack.min.js +129 -6
  56. package/dist/web/AppIndex.pack.min.js.map +1 -1
  57. package/package.json +1 -1
  58. package/src/common/pages/websites/manage/ManageWebSitePage.tsx +3 -1
  59. package/src/site-editor/blocks/Buttons.tsx +21 -0
  60. package/src/site-editor/editor/HtmlPageEditor.tsx +7 -0
  61. package/src/site-editor/editor/SelectedElement.tsx +16 -5
  62. package/src/site-editor/properties/groups/AttributeEditor.tsx +4 -0
  63. package/src/site-editor/styler/Styler.ts +9 -0
  64. package/src/site-editor/styler/StylerSet.ts +2 -0
  65. package/src/site-editor/styler/properties/color-sets/stylerColorSets.ts +41 -0
  66. package/src/site-editor/styler/properties/elements/elementImageLink.ts +14 -0
  67. package/src/site-editor/styler/properties/elements/elementLinkButton.ts +24 -0
  68. package/src/site-editor/styler/properties/elements/elementLinkIconButton.ts +23 -0
  69. package/src/site-editor/styler/properties/elements/elements.ts +10 -0
  70. package/src/site-editor/styler/properties/layouts/blocks/layoutImageBox.ts +40 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-client",
3
- "version": "1.2.55",
3
+ "version": "1.2.57",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -52,7 +52,9 @@ export default class ManageWebSitePage extends ContentPage {
52
52
  label="Hosts"
53
53
  model={this.model}
54
54
  collection="hosts"
55
- itemRenderer={(item: IWebSiteFolderHost) => <div text={item.host}></div>}
55
+ itemRenderer={(item: IWebSiteFolderHost) => <div>
56
+ <a href={`https://${item.host}`} target="_blank" text={item.host}/>
57
+ </div>}
56
58
  itemFactory={() => {
57
59
  const host = prompt("Internet URL Host", "");
58
60
  if (!host) {
@@ -0,0 +1,21 @@
1
+ import XNode from "@web-atoms/core/dist/core/XNode";
2
+ import { Block } from "./Block";
3
+ import { defaultImageSrc } from "./defaultImage";
4
+
5
+ export const ImageLink = Block({
6
+ className: "fad fa-images",
7
+ title: "Add Photo with Link",
8
+ factory: () => <a href="/" styler-element="image-link"><img src={defaultImageSrc}/></a>
9
+ });
10
+
11
+ export const LinkButton = Block({
12
+ className: "fad fa-link-simple",
13
+ title: "Add Link Button",
14
+ factory: () => <a href="/" styler-element="link-button">Button</a>
15
+ });
16
+
17
+ export const LinkIconButton = Block({
18
+ className: "fad fa-symbols",
19
+ title: "Add Link Button",
20
+ factory: () => <a href="/" styler-element="link-icon-button"><i class="fas fa-check"/>Button</a>
21
+ });
@@ -26,6 +26,7 @@ import { Card } from "../blocks/Card";
26
26
  import { List } from "../blocks/List";
27
27
  import { BlogComponent } from "../blocks/Components";
28
28
  import { UMD } from "@web-atoms/core/dist/core/types";
29
+ import { ImageLink, LinkButton } from "../blocks/Buttons";
29
30
 
30
31
  styled.css `
31
32
  display: grid;
@@ -323,6 +324,8 @@ export default class HtmlPageEditor extends AtomControl {
323
324
  <Columns3/>
324
325
  <List/>
325
326
  <BlogComponent/>
327
+ <ImageLink/>
328
+ <LinkButton/>
326
329
  </EditorToolbar>
327
330
  <div data-element="editor"
328
331
  style-max-width={Bind.oneWay(() => this.maxWidth > 768 ? "" : this.maxWidth + "px" )}>
@@ -410,6 +413,10 @@ export default class HtmlPageEditor extends AtomControl {
410
413
  }
411
414
  if (n.children) {
412
415
  for (const iterator of n.children) {
416
+ if (typeof iterator === "string") {
417
+ e.append(iterator);
418
+ continue;
419
+ }
413
420
  e.appendChild(build(iterator));
414
421
  }
415
422
  }
@@ -4,6 +4,7 @@ import type HtmlPageEditor from "./HtmlPageEditor";
4
4
  export class SelectedElement {
5
5
 
6
6
  public name: string;
7
+ public parentName: string;
7
8
 
8
9
  public top: string;
9
10
  public left: string;
@@ -44,6 +45,7 @@ export class SelectedElement {
44
45
 
45
46
  constructor(private editor: HtmlPageEditor) {
46
47
  this.name = "";
48
+ this.parentName = "";
47
49
  this.isImage = false;
48
50
  this.mo = new MutationObserver((changes) => {
49
51
  AtomBinder.refreshValue(this, "element");
@@ -60,23 +62,31 @@ export class SelectedElement {
60
62
  }
61
63
 
62
64
  public style(name) {
65
+ let parent;
66
+ let attributeName = name;
67
+ if (/^parent\-/.test(name)) {
68
+ parent = true;
69
+ attributeName = attributeName.substring(7);
70
+ }
63
71
  let mapper = this.styles.get(name);
64
72
  if (!mapper) {
65
73
  const owner = this;
66
- const customName = "--" + name;
74
+ const customName = "--" + attributeName;
67
75
  mapper = {
68
76
  name,
69
77
  get value() {
70
- return owner.e?.getAttribute(name) ?? "";
78
+ const e = parent ? owner.e?.parentElement : owner.e;
79
+ return e?.getAttribute(attributeName) ?? "";
71
80
  },
72
81
  set value(v) {
73
- if (!owner.e) {
82
+ const e = parent ? owner.e?.parentElement : owner.e;
83
+ if (!e) {
74
84
  return;
75
85
  }
76
86
  if (!v) {
77
- owner.e.removeAttribute(name);
87
+ e.removeAttribute(attributeName);
78
88
  } else {
79
- owner.e.setAttribute(name, v);
89
+ e.setAttribute(attributeName, v);
80
90
  }
81
91
  owner.editor.commit();
82
92
  AtomBinder.refreshValue(this, "value");
@@ -134,6 +144,7 @@ export class SelectedElement {
134
144
  return;
135
145
  }
136
146
  this.name = e.tagName.toLowerCase();
147
+ this.parentName = e.parentElement?.tagName.toLowerCase();
137
148
  const r = e.getBoundingClientRect();
138
149
  this.isImage = this.name === "img";
139
150
  this.top = `${r.top + 2}px`;
@@ -9,6 +9,10 @@ export default function AttributeEditor() {
9
9
  label="Link"
10
10
  style-display={BindEditor.oneWay((x) => x.selection.name === "a")}
11
11
  attributeName="href"/>
12
+ <TextProperty
13
+ label="Link"
14
+ style-display={BindEditor.oneWay((x) => x.selection.parentName === "a")}
15
+ attributeName="parent-href"/>
12
16
  <TextProperty
13
17
  label="Target"
14
18
  style-display={BindEditor.oneWay((x) => x.selection.name === "a")}
@@ -113,12 +113,17 @@ export const stylerVars = prepareVariables({
113
113
 
114
114
  linkColor: "blue",
115
115
 
116
+ buttonBackground: "lightgreen",
117
+ buttonText: "gray",
118
+
116
119
  primaryBackground: "#b372dd50",
117
120
  primaryColor: "gray",
118
121
  primaryAccent: "#6145a9c9",
119
122
  primaryAccentText: "white",
120
123
  primarySurface: "#FFFFFFA0",
121
124
  primarySurfaceText: "gray",
125
+ primaryButtonBackground: "lightblue",
126
+ primaryButtonText: "gray",
122
127
 
123
128
  secondaryBackground: "#00808050",
124
129
  secondaryColor: "gray",
@@ -126,6 +131,8 @@ export const stylerVars = prepareVariables({
126
131
  secondaryAccentText: "white",
127
132
  secondarySurface: "#FFFFFFA0",
128
133
  secondarySurfaceText: "gray",
134
+ secondaryButtonBackground: "lightgreen",
135
+ secondaryButtonText: "gray",
129
136
 
130
137
  tertiaryBackground: "#cfa55c87",
131
138
  tertiaryColor: "gray",
@@ -133,6 +140,8 @@ export const stylerVars = prepareVariables({
133
140
  tertiaryAccentText: "white",
134
141
  tertiarySurface: "#FFFFFFA0",
135
142
  tertiarySurfaceText: "gray",
143
+ tertiaryButtonBackground: "lightgreen",
144
+ tertiaryButtonText: "gray",
136
145
 
137
146
  navBarBackground: "rgb(114 134 170 / 51%)",
138
147
  navBarBackDropFilter: "blur(14px) saturate(180%)"
@@ -10,6 +10,7 @@ import { stylerSpace } from "./properties/stylerSpace";
10
10
  import { stylerText } from "./properties/text/stylerText";
11
11
  import { stylerBackground } from "./properties/stylerBackground";
12
12
  import { stylerColorSets } from "./properties/color-sets/stylerColorSets";
13
+ import { stylerElement } from "./properties/elements/elements";
13
14
 
14
15
  const vars = [];
15
16
  for (const key in stylerVars) {
@@ -29,6 +30,7 @@ export class StylerSet {
29
30
 
30
31
  properties = {
31
32
  stylerLayout,
33
+ stylerElement,
32
34
  stylerColorSets,
33
35
  stylerDisplay,
34
36
  stylerFlexDirection,
@@ -16,6 +16,20 @@ export const stylerColorSets = StylerProperty.create( "styler-colors", {
16
16
  background-color: ${stylerVars.primarySurface};
17
17
  color: ${stylerVars.primarySurfaceText};
18
18
  }
19
+
20
+ & [styler-element=image-link] {
21
+ background: ${stylerVars.primaryButtonBackground};
22
+ color: ${stylerVars.primaryButtonText};
23
+ }
24
+
25
+ & [styler-element=link-button] {
26
+ background: ${stylerVars.primaryButtonBackground};
27
+ color: ${stylerVars.primaryButtonText};
28
+ }
29
+ & [styler-element=link-icon-button] {
30
+ background: ${stylerVars.primaryButtonBackground};
31
+ color: ${stylerVars.primaryButtonText};
32
+ }
19
33
  `,
20
34
 
21
35
  "secondary": styled.css `
@@ -31,6 +45,20 @@ export const stylerColorSets = StylerProperty.create( "styler-colors", {
31
45
  background-color: ${stylerVars.secondarySurface};
32
46
  color: ${stylerVars.secondarySurfaceText};
33
47
  }
48
+
49
+ & [styler-element=image-link] {
50
+ background: ${stylerVars.secondaryButtonBackground};
51
+ color: ${stylerVars.secondaryButtonText};
52
+ }
53
+
54
+ & [styler-element=link-button] {
55
+ background: ${stylerVars.secondaryButtonBackground};
56
+ color: ${stylerVars.secondaryButtonText};
57
+ }
58
+ & [styler-element=link-icon-button] {
59
+ background: ${stylerVars.secondaryButtonBackground};
60
+ color: ${stylerVars.secondaryButtonText};
61
+ }
34
62
  `,
35
63
 
36
64
  "tertiary": styled.css `
@@ -46,5 +74,18 @@ export const stylerColorSets = StylerProperty.create( "styler-colors", {
46
74
  background-color: ${stylerVars.tertiarySurface};
47
75
  color: ${stylerVars.tertiarySurfaceText};
48
76
  }
77
+ & [styler-element=image-link] {
78
+ background: ${stylerVars.tertiaryButtonBackground};
79
+ color: ${stylerVars.tertiaryButtonText};
80
+ }
81
+
82
+ & [styler-element=link-button] {
83
+ background: ${stylerVars.tertiaryButtonBackground};
84
+ color: ${stylerVars.tertiaryButtonText};
85
+ }
86
+ & [styler-element=link-icon-button] {
87
+ background: ${stylerVars.tertiaryButtonBackground};
88
+ color: ${stylerVars.tertiaryButtonText};
89
+ }
49
90
  `
50
91
  });
@@ -0,0 +1,14 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+
3
+ export const elementImageLink: any = {
4
+ "image-link": styled.css `
5
+ border: solid 1px transparent;
6
+ outline: none;
7
+ text-decoration: none;
8
+ display: flex;
9
+ &:hover {
10
+ border-color: green;
11
+ text-decoration: underline;
12
+ }
13
+ `,
14
+ };
@@ -0,0 +1,24 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+ import { stylerVars } from "../../Styler";
3
+
4
+ export const elementLinkButton: any = {
5
+ "link-button": styled.css `
6
+ display: inline-flex;
7
+ flex-direction: column;
8
+ align-items: center;
9
+ justify-content: center;
10
+ gap: ${stylerVars.sizeDefault};
11
+ padding-top: ${stylerVars.sizeTiny};
12
+ padding-bottom: ${stylerVars.sizeTiny};
13
+ padding-left: ${stylerVars.sizeLarge};
14
+ padding-right: ${stylerVars.sizeLarge};
15
+ background: ${stylerVars.buttonBackground};
16
+ color: ${stylerVars.buttonText};
17
+ border: none;
18
+ border-radius: ${stylerVars.sizeLarge};
19
+ text-decoration: none;
20
+ &:hover {
21
+ text-decoration: underline;
22
+ }
23
+ `,
24
+ };
@@ -0,0 +1,23 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+ import { stylerVars } from "../../Styler";
3
+
4
+ export const elementLinkIconButton: any = {
5
+ "link-icon-button": styled.css `
6
+ display: flex;
7
+ flex-direction: column;
8
+ align-items: center;
9
+ gap: ${stylerVars.sizeDefault};
10
+ padding-top: ${stylerVars.sizeTiny};
11
+ padding-bottom: ${stylerVars.sizeTiny};
12
+ padding-left: ${stylerVars.sizeLarge};
13
+ padding-right: ${stylerVars.sizeLarge};
14
+ background: ${stylerVars.buttonBackground};
15
+ color: ${stylerVars.buttonText};
16
+ border: none;
17
+ border-radius: ${stylerVars.sizeLarge};
18
+ text-decoration: none;
19
+ &:hover {
20
+ text-decoration: underline;
21
+ }
22
+ `,
23
+ };
@@ -0,0 +1,10 @@
1
+ import { StylerProperty } from "../../Styler";
2
+ import { elementImageLink } from "./elementImageLink";
3
+ import { elementLinkButton } from "./elementLinkButton";
4
+ import { elementLinkIconButton } from "./elementLinkIconButton";
5
+
6
+ export const stylerElement = StylerProperty.create( "styler-element", {
7
+ ... elementImageLink,
8
+ ... elementLinkButton,
9
+ ... elementLinkIconButton
10
+ });
@@ -48,4 +48,44 @@ export const layoutImageBox: any = {
48
48
  content: "Container";
49
49
  }
50
50
  `,
51
+
52
+ "vertical-image-box": styled.css `
53
+ display: flex;
54
+ flex-direction: column;
55
+ gap: ${stylerVars.sizeDefault};
56
+ padding: ${stylerVars.sizeDefault};
57
+ margin: ${stylerVars.sizeDefault};
58
+ border-radius: ${stylerVars.sizeDefault};
59
+ justify-items: center;
60
+ align-items: stretch;
61
+ contain: content;
62
+
63
+ & > img {
64
+ align-self: center;
65
+ }
66
+
67
+ & > * {
68
+ padding: ${stylerVars.sizeDefault};
69
+ flex: 1 1 100%;
70
+ }
71
+
72
+ & > *:empty:before {
73
+ background-color: #ddd;
74
+ color: #000;
75
+ font-size: 16px;
76
+ font-weight: bold;
77
+ font-family: 'Courier New', Courier, monospace;
78
+ height: 100%;
79
+ display: flex;
80
+ justify-items: center;
81
+ align-items: center;
82
+ min-height: 30px;
83
+ opacity: 0.3;
84
+ border-radius: 3px;
85
+ white-space: nowrap;
86
+ overflow: hidden;
87
+ text-overflow: ellipsis;
88
+ content: "Container";
89
+ }
90
+ `,
51
91
  };