@grasco/profile-picture 0.1.0 → 0.1.2

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.
@@ -46,6 +46,8 @@ interface BadgeConfig {
46
46
  glow?: boolean;
47
47
  /** Max value to display (shows 99+ if exceeded) */
48
48
  max?: number;
49
+ /** Icon to display before content (emoji, Unicode symbol, or text) */
50
+ icon?: string;
49
51
  }
50
52
  interface GlowConfig {
51
53
  /** Glow color (defaults to border or bg color) */
@@ -68,6 +70,10 @@ interface RingConfig {
68
70
  gap?: number;
69
71
  /** Animate (rotate for gradient) */
70
72
  animate?: boolean;
73
+ /** Progress percentage (0-100) for partial fill ring */
74
+ progress?: number;
75
+ /** Color for unfilled portion when progress is set (defaults to gray) */
76
+ emptyColor?: string;
71
77
  }
72
78
  interface InteractionConfig {
73
79
  /** Enable hover effects */
@@ -113,8 +119,8 @@ interface GroupUserData {
113
119
  shadow?: ShadowPreset;
114
120
  /** Show border */
115
121
  border?: boolean;
116
- /** Border width (1-4) */
117
- borderWidth?: 1 | 2 | 3 | 4;
122
+ /** Border width (1-8) */
123
+ borderWidth?: 1 | 2 | 3 | 4 | 5 | 6 | 8;
118
124
  /** Border color */
119
125
  borderColor?: string;
120
126
  /** Background color */
@@ -157,16 +163,29 @@ interface ProfilePictureGroupProps {
157
163
 
158
164
  declare class ProfilePicture extends LitElement {
159
165
  private static stylesInjected;
166
+ private static cdnBaseUrl;
167
+ private static instances;
168
+ /**
169
+ * Set global CDN base URL for all ProfilePicture instances
170
+ * @example ProfilePicture.setCdnBaseUrl('https://api.example.com')
171
+ */
172
+ static setCdnBaseUrl(url: string): void;
173
+ /**
174
+ * Get current CDN base URL
175
+ */
176
+ static getCdnBaseUrl(): string;
160
177
  protected createRenderRoot(): this;
161
178
  private static injectStylesOnce;
162
179
  src: string;
163
180
  alt: string;
181
+ extCustomerId?: string;
164
182
  size: Size | string;
165
183
  variant: Variant;
166
184
  shadow: ShadowPreset;
167
185
  border: boolean;
168
- borderWidth: 1 | 2 | 3 | 4;
186
+ borderWidth: 1 | 2 | 3 | 4 | 5 | 6 | 8;
169
187
  borderColor: string;
188
+ rotation: number;
170
189
  bgColor?: string;
171
190
  bgGradient?: string;
172
191
  ring?: RingConfig;
@@ -181,11 +200,25 @@ declare class ProfilePicture extends LitElement {
181
200
  interactive?: InteractionConfig;
182
201
  private isLoaded;
183
202
  private hasError;
203
+ private cdnImageUrl?;
204
+ private cdnLoadFailed;
184
205
  private previousSrc;
206
+ private previousExtCustomerId?;
207
+ private retryTimeoutId?;
208
+ private readonly RETRY_DELAY_MS;
185
209
  private get pixelSize();
210
+ connectedCallback(): void;
211
+ disconnectedCallback(): void;
212
+ protected firstUpdated(): void;
213
+ protected updated(changedProperties: Map<string, unknown>): void;
186
214
  protected willUpdate(changedProperties: Map<string, unknown>): void;
187
215
  private handleLoad;
188
216
  private handleError;
217
+ /**
218
+ * Construct CDN URL for profile picture using ext-customer-id
219
+ * Uses direct image src binding - browser handles redirects automatically
220
+ */
221
+ private loadCdnImage;
189
222
  private getContainerStyles;
190
223
  private renderPlaceholder;
191
224
  private renderFallback;
@@ -215,6 +248,7 @@ declare class ProfilePictureGroup extends LitElement {
215
248
  showAddButton: boolean;
216
249
  addButtonLabel: string;
217
250
  animated: true;
251
+ rotationAmount: number;
218
252
  private users;
219
253
  private dropdownOpen;
220
254
  private tooltipData;