@grasco/profile-picture 0.1.4 → 0.1.6
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.
- package/dist/angular.cjs +1 -1
- package/dist/angular.cjs.map +1 -1
- package/dist/angular.d.cts +8 -17
- package/dist/angular.d.ts +8 -17
- package/dist/angular.js +1 -1
- package/dist/angular.js.map +1 -1
- package/dist/index.cjs +97 -124
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -20
- package/dist/index.d.ts +9 -20
- package/dist/index.js +97 -124
- package/dist/index.js.map +1 -1
- package/dist/standalone.d.ts +8 -15
- package/dist/standalone.standalone.js +103 -130
- package/dist/standalone.standalone.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/svelte.cjs +1 -1
- package/dist/svelte.cjs.map +1 -1
- package/dist/svelte.d.cts +8 -17
- package/dist/svelte.d.ts +8 -17
- package/dist/svelte.js +1 -1
- package/dist/svelte.js.map +1 -1
- package/dist/vue.cjs +1 -1
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.d.cts +8 -17
- package/dist/vue.d.ts +8 -17
- package/dist/vue.js +1 -1
- package/dist/vue.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -20,18 +20,6 @@ interface PresenceConfig {
|
|
|
20
20
|
/** Ring thickness (1-3) */
|
|
21
21
|
thickness?: 1 | 2 | 3;
|
|
22
22
|
}
|
|
23
|
-
interface RibbonConfig {
|
|
24
|
-
/** Text displayed on the ribbon */
|
|
25
|
-
text: string;
|
|
26
|
-
/** Position of the ribbon */
|
|
27
|
-
position?: Position;
|
|
28
|
-
/** Text color (CSS color) */
|
|
29
|
-
color?: string;
|
|
30
|
-
/** Background color (CSS color or gradient) */
|
|
31
|
-
bgColor?: string;
|
|
32
|
-
/** Icon before text (emoji or symbol) */
|
|
33
|
-
icon?: string;
|
|
34
|
-
}
|
|
35
23
|
interface BadgeConfig {
|
|
36
24
|
/** Badge content (text, number, or empty for dot) */
|
|
37
25
|
content?: string | number;
|
|
@@ -124,8 +112,6 @@ interface ProfilePictureProps$1 {
|
|
|
124
112
|
ring?: RingConfig;
|
|
125
113
|
/** Presence indicator configuration */
|
|
126
114
|
presence?: PresenceConfig;
|
|
127
|
-
/** Ribbon configuration */
|
|
128
|
-
ribbon?: RibbonConfig;
|
|
129
115
|
/** Badge configuration */
|
|
130
116
|
badge?: BadgeConfig;
|
|
131
117
|
/** Loading strategy */
|
|
@@ -160,6 +146,8 @@ interface GroupUserData {
|
|
|
160
146
|
name: string;
|
|
161
147
|
/** Image source URL */
|
|
162
148
|
src?: string;
|
|
149
|
+
/** External customer ID for CDN image loading */
|
|
150
|
+
extCustomerId?: string;
|
|
163
151
|
/** Presence status from data-status attribute */
|
|
164
152
|
status?: PresenceStatus;
|
|
165
153
|
/** Reference to the profile-picture element */
|
|
@@ -265,7 +253,6 @@ declare class ProfilePicture$1 extends LitElement {
|
|
|
265
253
|
ring?: RingConfig;
|
|
266
254
|
presence?: PresenceConfig;
|
|
267
255
|
glow?: GlowConfig;
|
|
268
|
-
ribbon?: RibbonConfig;
|
|
269
256
|
badge?: BadgeConfig;
|
|
270
257
|
loading: LoadingStrategy;
|
|
271
258
|
placeholder: PlaceholderType;
|
|
@@ -298,9 +285,13 @@ declare class ProfilePicture$1 extends LitElement {
|
|
|
298
285
|
private renderFallback;
|
|
299
286
|
private renderImage;
|
|
300
287
|
private renderRing;
|
|
288
|
+
/**
|
|
289
|
+
* Calculate corner offset based on variant
|
|
290
|
+
* Returns the inset from container edge where badges/presence should be positioned
|
|
291
|
+
*/
|
|
292
|
+
private getCornerOffset;
|
|
301
293
|
private renderPresence;
|
|
302
294
|
private renderBadge;
|
|
303
|
-
private renderRibbon;
|
|
304
295
|
render(): lit_html.TemplateResult<1>;
|
|
305
296
|
}
|
|
306
297
|
|
|
@@ -462,7 +453,6 @@ declare const ProfilePictureGroup: React.ForwardRefExoticComponent<ProfilePictur
|
|
|
462
453
|
* border
|
|
463
454
|
* borderColor="white"
|
|
464
455
|
* bgColor="bg-gradient-to-br from-purple-500 to-pink-500"
|
|
465
|
-
* ribbon={{ text: 'PRO', position: 'top-right', bgColor: 'bg-amber-500' }}
|
|
466
456
|
* badge={{ content: '3', position: 'bottom-right', pulse: true }}
|
|
467
457
|
* onLoad={() => console.log('loaded')}
|
|
468
458
|
* onError={() => console.error('failed')}
|
|
@@ -495,7 +485,7 @@ interface ProfilePictureProps extends ProfilePictureProps$1 {
|
|
|
495
485
|
* Type-safe wrapper around the profile-picture web component.
|
|
496
486
|
* Uses ref as a prop (React 19+ pattern).
|
|
497
487
|
*/
|
|
498
|
-
declare function ProfilePicture({ src, alt, extCustomerId, size, variant, shadow, border, borderWidth, borderColor, rotation, bgColor, bgGradient, glow, ring, presence,
|
|
488
|
+
declare function ProfilePicture({ src, alt, extCustomerId, size, variant, shadow, border, borderWidth, borderColor, rotation, bgColor, bgGradient, glow, ring, presence, badge, loading, placeholder, placeholderColor, fallback, interactive, onLoad, onError, onCdnError, className, style, ref, }: ProfilePictureProps & {
|
|
499
489
|
ref?: React.Ref<HTMLElement>;
|
|
500
490
|
}): React.ReactElement<{
|
|
501
491
|
ref: React.RefObject<HTMLElement>;
|
|
@@ -514,7 +504,6 @@ declare function ProfilePicture({ src, alt, extCustomerId, size, variant, shadow
|
|
|
514
504
|
glow: string | undefined;
|
|
515
505
|
ring: string | undefined;
|
|
516
506
|
presence: string | undefined;
|
|
517
|
-
ribbon: string | undefined;
|
|
518
507
|
badge: string | undefined;
|
|
519
508
|
loading: LoadingStrategy | undefined;
|
|
520
509
|
placeholder: PlaceholderType | undefined;
|
|
@@ -528,4 +517,4 @@ declare namespace ProfilePicture {
|
|
|
528
517
|
var displayName: string;
|
|
529
518
|
}
|
|
530
519
|
|
|
531
|
-
export { type BadgeConfig, type ProfilePictureGroupProps$1 as CoreProfilePictureGroupProps, type ProfilePictureProps$1 as CoreProfilePictureProps, type DropdownConfig, type GlowConfig, type GroupUserData, type InteractionConfig, type LoadingStrategy, type PlaceholderType, type Position, type PresenceConfig, type PresenceStatus, ProfilePicture, ProfilePictureGroup, type ProfilePictureGroupProps, type ProfilePictureProps, type
|
|
520
|
+
export { type BadgeConfig, type ProfilePictureGroupProps$1 as CoreProfilePictureGroupProps, type ProfilePictureProps$1 as CoreProfilePictureProps, type DropdownConfig, type GlowConfig, type GroupUserData, type InteractionConfig, type LoadingStrategy, type PlaceholderType, type Position, type PresenceConfig, type PresenceStatus, ProfilePicture, ProfilePictureGroup, type ProfilePictureGroupProps, type ProfilePictureProps, type RingConfig, type ShadowPreset, type Size, type StackDirection, type TooltipConfig, type TooltipPosition, type Variant, constructCdnUrl, detectThemeFromColor, getCdnSizeLabel };
|
package/dist/index.d.ts
CHANGED
|
@@ -20,18 +20,6 @@ interface PresenceConfig {
|
|
|
20
20
|
/** Ring thickness (1-3) */
|
|
21
21
|
thickness?: 1 | 2 | 3;
|
|
22
22
|
}
|
|
23
|
-
interface RibbonConfig {
|
|
24
|
-
/** Text displayed on the ribbon */
|
|
25
|
-
text: string;
|
|
26
|
-
/** Position of the ribbon */
|
|
27
|
-
position?: Position;
|
|
28
|
-
/** Text color (CSS color) */
|
|
29
|
-
color?: string;
|
|
30
|
-
/** Background color (CSS color or gradient) */
|
|
31
|
-
bgColor?: string;
|
|
32
|
-
/** Icon before text (emoji or symbol) */
|
|
33
|
-
icon?: string;
|
|
34
|
-
}
|
|
35
23
|
interface BadgeConfig {
|
|
36
24
|
/** Badge content (text, number, or empty for dot) */
|
|
37
25
|
content?: string | number;
|
|
@@ -124,8 +112,6 @@ interface ProfilePictureProps$1 {
|
|
|
124
112
|
ring?: RingConfig;
|
|
125
113
|
/** Presence indicator configuration */
|
|
126
114
|
presence?: PresenceConfig;
|
|
127
|
-
/** Ribbon configuration */
|
|
128
|
-
ribbon?: RibbonConfig;
|
|
129
115
|
/** Badge configuration */
|
|
130
116
|
badge?: BadgeConfig;
|
|
131
117
|
/** Loading strategy */
|
|
@@ -160,6 +146,8 @@ interface GroupUserData {
|
|
|
160
146
|
name: string;
|
|
161
147
|
/** Image source URL */
|
|
162
148
|
src?: string;
|
|
149
|
+
/** External customer ID for CDN image loading */
|
|
150
|
+
extCustomerId?: string;
|
|
163
151
|
/** Presence status from data-status attribute */
|
|
164
152
|
status?: PresenceStatus;
|
|
165
153
|
/** Reference to the profile-picture element */
|
|
@@ -265,7 +253,6 @@ declare class ProfilePicture$1 extends LitElement {
|
|
|
265
253
|
ring?: RingConfig;
|
|
266
254
|
presence?: PresenceConfig;
|
|
267
255
|
glow?: GlowConfig;
|
|
268
|
-
ribbon?: RibbonConfig;
|
|
269
256
|
badge?: BadgeConfig;
|
|
270
257
|
loading: LoadingStrategy;
|
|
271
258
|
placeholder: PlaceholderType;
|
|
@@ -298,9 +285,13 @@ declare class ProfilePicture$1 extends LitElement {
|
|
|
298
285
|
private renderFallback;
|
|
299
286
|
private renderImage;
|
|
300
287
|
private renderRing;
|
|
288
|
+
/**
|
|
289
|
+
* Calculate corner offset based on variant
|
|
290
|
+
* Returns the inset from container edge where badges/presence should be positioned
|
|
291
|
+
*/
|
|
292
|
+
private getCornerOffset;
|
|
301
293
|
private renderPresence;
|
|
302
294
|
private renderBadge;
|
|
303
|
-
private renderRibbon;
|
|
304
295
|
render(): lit_html.TemplateResult<1>;
|
|
305
296
|
}
|
|
306
297
|
|
|
@@ -462,7 +453,6 @@ declare const ProfilePictureGroup: React.ForwardRefExoticComponent<ProfilePictur
|
|
|
462
453
|
* border
|
|
463
454
|
* borderColor="white"
|
|
464
455
|
* bgColor="bg-gradient-to-br from-purple-500 to-pink-500"
|
|
465
|
-
* ribbon={{ text: 'PRO', position: 'top-right', bgColor: 'bg-amber-500' }}
|
|
466
456
|
* badge={{ content: '3', position: 'bottom-right', pulse: true }}
|
|
467
457
|
* onLoad={() => console.log('loaded')}
|
|
468
458
|
* onError={() => console.error('failed')}
|
|
@@ -495,7 +485,7 @@ interface ProfilePictureProps extends ProfilePictureProps$1 {
|
|
|
495
485
|
* Type-safe wrapper around the profile-picture web component.
|
|
496
486
|
* Uses ref as a prop (React 19+ pattern).
|
|
497
487
|
*/
|
|
498
|
-
declare function ProfilePicture({ src, alt, extCustomerId, size, variant, shadow, border, borderWidth, borderColor, rotation, bgColor, bgGradient, glow, ring, presence,
|
|
488
|
+
declare function ProfilePicture({ src, alt, extCustomerId, size, variant, shadow, border, borderWidth, borderColor, rotation, bgColor, bgGradient, glow, ring, presence, badge, loading, placeholder, placeholderColor, fallback, interactive, onLoad, onError, onCdnError, className, style, ref, }: ProfilePictureProps & {
|
|
499
489
|
ref?: React.Ref<HTMLElement>;
|
|
500
490
|
}): React.ReactElement<{
|
|
501
491
|
ref: React.RefObject<HTMLElement>;
|
|
@@ -514,7 +504,6 @@ declare function ProfilePicture({ src, alt, extCustomerId, size, variant, shadow
|
|
|
514
504
|
glow: string | undefined;
|
|
515
505
|
ring: string | undefined;
|
|
516
506
|
presence: string | undefined;
|
|
517
|
-
ribbon: string | undefined;
|
|
518
507
|
badge: string | undefined;
|
|
519
508
|
loading: LoadingStrategy | undefined;
|
|
520
509
|
placeholder: PlaceholderType | undefined;
|
|
@@ -528,4 +517,4 @@ declare namespace ProfilePicture {
|
|
|
528
517
|
var displayName: string;
|
|
529
518
|
}
|
|
530
519
|
|
|
531
|
-
export { type BadgeConfig, type ProfilePictureGroupProps$1 as CoreProfilePictureGroupProps, type ProfilePictureProps$1 as CoreProfilePictureProps, type DropdownConfig, type GlowConfig, type GroupUserData, type InteractionConfig, type LoadingStrategy, type PlaceholderType, type Position, type PresenceConfig, type PresenceStatus, ProfilePicture, ProfilePictureGroup, type ProfilePictureGroupProps, type ProfilePictureProps, type
|
|
520
|
+
export { type BadgeConfig, type ProfilePictureGroupProps$1 as CoreProfilePictureGroupProps, type ProfilePictureProps$1 as CoreProfilePictureProps, type DropdownConfig, type GlowConfig, type GroupUserData, type InteractionConfig, type LoadingStrategy, type PlaceholderType, type Position, type PresenceConfig, type PresenceStatus, ProfilePicture, ProfilePictureGroup, type ProfilePictureGroupProps, type ProfilePictureProps, type RingConfig, type ShadowPreset, type Size, type StackDirection, type TooltipConfig, type TooltipPosition, type Variant, constructCdnUrl, detectThemeFromColor, getCdnSizeLabel };
|