@inlaylab/opaline-element 1.0.0 → 1.1.0

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 (2) hide show
  1. package/dist/index.js +7 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2,13 +2,15 @@ import { createAvatar, escapeXml } from "@inlaylab/opaline";
2
2
  import { aura } from "@inlaylab/opaline/aura";
3
3
  import { clay } from "@inlaylab/opaline/clay";
4
4
  import { gradient } from "@inlaylab/opaline/gradient";
5
+ import { initials } from "@inlaylab/opaline/initials";
5
6
  import { morph } from "@inlaylab/opaline/morph";
6
7
  // src/index.ts
7
8
  const LOOKS = {
8
9
  morph,
9
10
  gradient,
10
11
  aura,
11
- clay
12
+ clay,
13
+ initials
12
14
  };
13
15
  const ATTRS = [
14
16
  "seed",
@@ -25,7 +27,8 @@ const ATTRS = [
25
27
  "shape",
26
28
  "finish",
27
29
  "body",
28
- "ears"
30
+ "ears",
31
+ "text"
29
32
  ];
30
33
  const IMG_STYLE = "position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit";
31
34
  let count = 0;
@@ -63,7 +66,8 @@ var OpalineAvatar = class extends HTMLElement {
63
66
  shape: get("shape"),
64
67
  finish: get("finish"),
65
68
  body: get("body"),
66
- ears: get("ears")
69
+ ears: get("ears"),
70
+ text: get("text")
67
71
  }).svg;
68
72
  const a11y = alt ? `role="img" aria-label="${escapeXml(alt)}"` : "aria-hidden=\"true\"";
69
73
  const img = src ? `<img src="${escapeXml(src)}" alt="" style="${IMG_STYLE}" hidden>` : "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inlaylab/opaline-element",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "<opaline-avatar>: seeded avatars as a framework-free custom element.",
5
5
  "keywords": [
6
6
  "avatar",
@@ -39,7 +39,7 @@
39
39
  "dist"
40
40
  ],
41
41
  "dependencies": {
42
- "@inlaylab/opaline": "1.0.0"
42
+ "@inlaylab/opaline": "1.1.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@inlaylab/opaline-contract": "0.0.0",