@impro.social/impro-plugin 0.0.13 → 0.0.15

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/main.js +28 -0
  2. package/package.json +1 -1
package/main.js CHANGED
@@ -709,6 +709,28 @@ class IconComponent {
709
709
  }
710
710
  }
711
711
 
712
+ class BlobImageComponent {
713
+ constructor(containerEl) {
714
+ this.el = containerEl.createEl("plugin-blob-image");
715
+ }
716
+ setDid(did) {
717
+ this.el.setAttr("did", did);
718
+ return this;
719
+ }
720
+ setCid(cid) {
721
+ this.el.setAttr("cid", cid);
722
+ return this;
723
+ }
724
+ setAlt(alt) {
725
+ this.el.setAttr("alt", alt);
726
+ return this;
727
+ }
728
+ setCdnPrefix(prefix) {
729
+ this.el.setAttr("cdn-prefix", prefix);
730
+ return this;
731
+ }
732
+ }
733
+
712
734
  class ProfilesListComponent {
713
735
  constructor(containerEl) {
714
736
  this.el = containerEl.createEl("plugin-profiles-list");
@@ -866,6 +888,12 @@ export class VirtualEl {
866
888
  return component;
867
889
  }
868
890
 
891
+ createBlobImage(callback) {
892
+ const component = new BlobImageComponent(this);
893
+ if (typeof callback === "function") callback(component);
894
+ return component;
895
+ }
896
+
869
897
  _serialize() {
870
898
  const serialized = {
871
899
  type: "element",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@impro.social/impro-plugin",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "type": "module",
5
5
  "main": "main.js",
6
6
  "license": "0BSD",