@squeletteapp/widget 0.4.0 → 1.0.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 (35) hide show
  1. package/dist/changelog-entry.d.ts +43 -0
  2. package/dist/changelog-entry.js +224 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +1 -0
  5. package/package.json +9 -22
  6. package/dist/app-CZ8ztknA.js +0 -40
  7. package/dist/index-Bj_9-5Hl.js +0 -5524
  8. package/dist/types/app/app.d.ts +0 -15
  9. package/dist/types/banner/banner-modal.d.ts +0 -17
  10. package/dist/types/banner/banner.d.ts +0 -17
  11. package/dist/types/banner/element.d.ts +0 -7
  12. package/dist/types/banner/index.d.ts +0 -24
  13. package/dist/types/banner/use-css-animation.d.ts +0 -37
  14. package/dist/types/changelog/changelog.d.ts +0 -15
  15. package/dist/types/changelog/element.d.ts +0 -86
  16. package/dist/types/changelog/index.d.ts +0 -32
  17. package/dist/types/index.d.ts +0 -12
  18. package/dist/types/utils.d.ts +0 -2
  19. package/dist/types/widget/__tests__/widget.test.d.ts +0 -1
  20. package/dist/types/widget/components/widget-shell.d.ts +0 -8
  21. package/dist/types/widget/constants.d.ts +0 -9
  22. package/dist/types/widget/core/custom-element.d.ts +0 -142
  23. package/dist/types/widget/core/global-api.d.ts +0 -97
  24. package/dist/types/widget/core/identity.d.ts +0 -73
  25. package/dist/types/widget/core/panel-dimensions.d.ts +0 -36
  26. package/dist/types/widget/core/positioning.d.ts +0 -63
  27. package/dist/types/widget/core/scroll-lock.d.ts +0 -28
  28. package/dist/types/widget/element.d.ts +0 -90
  29. package/dist/types/widget/events.d.ts +0 -13
  30. package/dist/types/widget/factories.d.ts +0 -41
  31. package/dist/types/widget/styles.d.ts +0 -8
  32. package/dist/types/widget/types.d.ts +0 -79
  33. package/dist/types/widget/utils.d.ts +0 -12
  34. package/dist/widget.es.js +0 -16
  35. package/dist/widget.js +0 -176
@@ -1,15 +0,0 @@
1
- /**
2
- * Minimal Preact component responsible for rendering the sandboxed iframe. By
3
- * keeping the widget UI in an isolated module we can lazy-load it only when the
4
- * launcher opens, keeping the initial footprint tiny.
5
- */
6
- import type { JSX } from "preact";
7
- export interface WidgetFrameProps {
8
- src: string;
9
- title: string;
10
- onLoaded?: () => void;
11
- onClose: () => void;
12
- }
13
- export declare function WidgetFrame({ src, title, onLoaded, onClose, }: WidgetFrameProps): JSX.Element;
14
- export declare const stylesText: string;
15
- export default WidgetFrame;
@@ -1,17 +0,0 @@
1
- type Ticket = {
2
- title: string;
3
- id: number;
4
- workspace: {
5
- slug: string;
6
- };
7
- created_at: string;
8
- };
9
- export declare const showModal: import("@preact/signals").Signal<boolean>;
10
- export declare const modalTicket: import("@preact/signals").Signal<Ticket | null>;
11
- export declare function BannerModal({ workspaceSlug, theme, base, ticketId, }: {
12
- workspaceSlug: string;
13
- theme: "light" | "dark";
14
- base: string;
15
- ticketId?: number;
16
- }): import("preact").VNode<any> | null;
17
- export {};
@@ -1,17 +0,0 @@
1
- type SqueletteBannerWidgetProps = {
2
- workspaceSlug: string;
3
- theme: "light" | "dark";
4
- base?: string;
5
- debug?: boolean;
6
- ticketId?: number;
7
- };
8
- export declare function Banner({ workspaceSlug, theme, base, debug, ticketId, }: SqueletteBannerWidgetProps): import("preact").JSX.Element | null;
9
- type MarqueeSpanProps = {
10
- children: string;
11
- duration?: number;
12
- gap?: number;
13
- className?: string;
14
- delay?: number;
15
- };
16
- export declare function MarqueeSpan({ children, duration, gap, className, delay, }: MarqueeSpanProps): import("preact").JSX.Element;
17
- export {};
@@ -1,7 +0,0 @@
1
- declare class SqueletteBannerElement extends HTMLElement {
2
- private shadow;
3
- constructor();
4
- connectedCallback(): void;
5
- disconnectedCallback(): void;
6
- }
7
- export { SqueletteBannerElement };
@@ -1,24 +0,0 @@
1
- import { SqueletteBannerElement } from "./element";
2
- export { SqueletteBannerElement };
3
- type BannerInitPayload = {
4
- slug: string;
5
- contentTheme?: "light" | "dark";
6
- theme?: BannerTheme;
7
- base?: string;
8
- debug?: boolean;
9
- ticketId?: number;
10
- };
11
- export type BannerTheme = {
12
- bg?: string;
13
- border?: string;
14
- text?: string;
15
- badgeBg?: string;
16
- badgeText?: string;
17
- buttonHover?: string | number;
18
- };
19
- export declare const SqueletteBanner: {
20
- init({ slug, theme, contentTheme, base, debug, ticketId, }: BannerInitPayload): SqueletteBannerElement | null;
21
- setTheme(theme: BannerTheme): void;
22
- setContentTheme(contentTheme: "light" | "dark"): void;
23
- destroy(): void;
24
- };
@@ -1,37 +0,0 @@
1
- interface AnimationOptions {
2
- duration?: number;
3
- easing?: string;
4
- delay?: number;
5
- onComplete?: () => void;
6
- }
7
- /**
8
- * Hook to apply CSS transform/transition animations
9
- */
10
- export declare function useCSSAnimation<T extends HTMLElement>(): {
11
- ref: import("preact").RefObject<T>;
12
- animate: (styles: Record<string, string>, options?: AnimationOptions) => Promise<void>;
13
- };
14
- /**
15
- * Hook to handle banner drop animation with bounce effect
16
- */
17
- export declare function useBannerDrop<T extends HTMLElement>(shouldAnimate: boolean, onComplete?: () => void): import("preact").RefObject<T>;
18
- /**
19
- * Hook to handle expand/collapse width animation
20
- */
21
- export declare function useExpandAnimation<T extends HTMLElement>(shouldExpand: boolean, targetWidth: number): import("preact").RefObject<T>;
22
- /**
23
- * Hook to handle close animation
24
- */
25
- export declare function useCloseAnimation<T extends HTMLElement>(): {
26
- ref: import("preact").RefObject<T>;
27
- close: () => Promise<void>;
28
- };
29
- /**
30
- * Hook for modal fade in/out animations
31
- */
32
- export declare function useModalAnimation(isOpen: boolean): {
33
- overlayRef: import("preact").RefObject<HTMLDivElement>;
34
- contentRef: import("preact").RefObject<HTMLDivElement>;
35
- close: () => Promise<void>;
36
- };
37
- export {};
@@ -1,15 +0,0 @@
1
- import { h } from "preact";
2
- interface ChangelogProps {
3
- workspaceSlug: string;
4
- workspace: string;
5
- theme: "light" | "dark";
6
- contentTheme: "light" | "dark";
7
- base: string;
8
- debug?: boolean;
9
- onClose: () => void;
10
- }
11
- /**
12
- * Changelog component renders iframe pointing to workspace widget changelog page.
13
- */
14
- export declare function Changelog({ workspaceSlug, workspace, theme, contentTheme, base, debug, onClose, }: ChangelogProps): h.JSX.Element;
15
- export {};
@@ -1,86 +0,0 @@
1
- declare class SqueletteChangelogElement extends HTMLElement {
2
- private shadow;
3
- private targetElement;
4
- private resizeObserver;
5
- private scrollListener;
6
- private clickListener;
7
- private outsideClickListener;
8
- private isOpen;
9
- private currentAlign;
10
- private instanceId;
11
- static get observedAttributes(): string[];
12
- constructor();
13
- connectedCallback(): void;
14
- attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
15
- private renderChangelog;
16
- disconnectedCallback(): void;
17
- /**
18
- * Opens the changelog widget with animation based on position.
19
- */
20
- private lastToggleTs;
21
- open(): void;
22
- /**
23
- * Toggles the changelog widget open/close state.
24
- * Debounced to prevent double firing in the same tick (StrictMode / duplicate listeners).
25
- */
26
- toggle(): void;
27
- /**
28
- * Closes the changelog widget with animation.
29
- */
30
- close(): void;
31
- /**
32
- * Applies opening animation based on the current align position.
33
- */
34
- private applyOpenAnimation;
35
- /**
36
- * Applies closing animation.
37
- */
38
- private applyCloseAnimation;
39
- /**
40
- * Sets up click listener on the target element to toggle changelog.
41
- * Also sets up element tracking for positioning when element-based.
42
- */
43
- private setupClickListener;
44
- /**
45
- * Cleans up click listener.
46
- */
47
- private cleanupClickListener;
48
- /**
49
- * Sets up outside click listener to close the widget.
50
- */
51
- private setupOutsideClickListener;
52
- /**
53
- * Cleans up outside click listener.
54
- */
55
- private cleanupOutsideClickListener;
56
- /**
57
- * Updates the widget position based on alignment.
58
- * Screen-based positioning is relative to viewport.
59
- * Element-based positioning is relative to the target element.
60
- */
61
- private updatePosition;
62
- /**
63
- * Positions the widget relative to the viewport.
64
- */
65
- private positionRelativeToScreen;
66
- /**
67
- * Positions the widget relative to a target element.
68
- * If position is 'auto', finds the best position based on available viewport space.
69
- */
70
- private positionRelativeToElement;
71
- /**
72
- * Calculates the best position for the widget based on available viewport space.
73
- * Returns the position with the most available space.
74
- */
75
- private calculateBestPosition;
76
- /**
77
- * Sets up ResizeObserver and scroll listener to track element position changes.
78
- * Only updates position when widget is open.
79
- */
80
- private setupElementTracking;
81
- /**
82
- * Cleans up observers and listeners.
83
- */
84
- private cleanupTracking;
85
- }
86
- export { SqueletteChangelogElement };
@@ -1,32 +0,0 @@
1
- import { SqueletteChangelogElement } from "./element";
2
- export { SqueletteChangelogElement };
3
- type ChangelogInitPayload = {
4
- workspace: string;
5
- contentTheme?: "light" | "dark";
6
- theme?: ChangelogTheme;
7
- base?: string;
8
- debug?: boolean;
9
- selector?: string;
10
- align?: ChangelogAlign;
11
- height?: number | string;
12
- };
13
- export type ChangelogTheme = {
14
- bg?: string;
15
- border?: string;
16
- };
17
- /**
18
- * Alignment format: <anchor>-<position>
19
- * - anchor: "screen" or "element"
20
- * - position: "top-left" | "top-center" | "top-right" | "left" | "center" | "right" | "bottom-left" | "bottom-center" | "bottom-right" | "auto"
21
- * - "auto" is only supported for element-based positioning and will automatically choose the best position
22
- */
23
- export type ChangelogAlign = "screen-top-left" | "screen-top-center" | "screen-top-right" | "screen-left" | "screen-center" | "screen-right" | "screen-bottom-left" | "screen-bottom-center" | "screen-bottom-right" | "element-top-left" | "element-top-center" | "element-top-right" | "element-left" | "element-center" | "element-right" | "element-bottom-left" | "element-bottom-center" | "element-bottom-right" | "element-auto";
24
- export declare const SqueletteChangelog: {
25
- init({ workspace, theme, contentTheme, base, debug, selector, align, height, }: ChangelogInitPayload): SqueletteChangelogElement | null;
26
- open(): void;
27
- close(): void;
28
- toggle(): void;
29
- setTheme(theme: ChangelogTheme): void;
30
- setContentTheme(contentTheme: "light" | "dark"): void;
31
- destroy(): void;
32
- };
@@ -1,12 +0,0 @@
1
- /**
2
- * Public entry-point that re-exports the custom element and typings. Consumers
3
- * importing via ESM or CommonJS land here after bundling.
4
- */
5
- export * from "./widget/element";
6
- export { type WidgetTheme, type WidgetEventName, type WidgetEventListener, type WidgetEventDetailMap, type WidgetSubmitPayload, type CreateWidgetOptions, type WidgetView, type WidgetIdentityPayload, type WidgetPosition, type WidgetFloatingPosition, type WidgetFixedPosition, } from "./widget/types";
7
- export { identify, clearIdentity } from "./widget/element";
8
- export { createWidget, createFeedbackWidget, createRoadmapWidget, createChangelogWidget, } from "./widget/factories";
9
- export * from "./banner";
10
- export type { BannerTheme } from "./banner";
11
- export * from "./changelog";
12
- export type { ChangelogTheme, ChangelogAlign } from "./changelog";
@@ -1,2 +0,0 @@
1
- import { type ClassValue } from "clsx";
2
- export declare function cn(...inputs: ClassValue[]): string;
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- /**
2
- * Presentational shell rendered inside the widget's shadow root. It hosts the
3
- * launcher button, overlay, and the lazy-loaded iframe container while keeping
4
- * the custom element class free of JSX and rendering concerns.
5
- */
6
- import type { JSX } from "preact";
7
- import type { WidgetShellProps } from "../types";
8
- export declare function WidgetShell({ open, label, iframeSrc, FrameComponent, ensureFrame, onOpen, onClose, onFrameLoaded, }: WidgetShellProps): JSX.Element;
@@ -1,9 +0,0 @@
1
- /**
2
- * Centralised constants that define the public identity of the widget bundle.
3
- * These values are relied upon across the element implementation and by the
4
- * CDN embed snippet, so keep them in one place to avoid drift.
5
- */
6
- export declare const TAG_NAME = "squelette-widget";
7
- export declare const API_BASE: string;
8
- export declare const CDN_BASE = "https://cdn.squelette.app/widget.js";
9
- export declare const DEFAULT_LABEL = "Feedback";
@@ -1,142 +0,0 @@
1
- /**
2
- * Custom Element Implementation
3
- *
4
- * Defines the `<squelette-widget>` custom element that powers the widget system.
5
- * This class extends HTMLElement to create a fully-featured web component with:
6
- *
7
- * **Core Features:**
8
- * - Shadow DOM encapsulation for style isolation
9
- * - Lazy loading of iframe renderer (loaded only when widget opens)
10
- * - Reactive attribute system using observed attributes
11
- * - Event emitter for widget lifecycle events (open, close, submit)
12
- * - Theme management with auto/light/dark modes
13
- * - Internationalization support
14
- *
15
- * **State Management:**
16
- * - Tracks open/closed state
17
- * - Manages iframe loading state
18
- * - Handles user identity forwarding to iframe
19
- * - Coordinates scroll locking when panel is open
20
- *
21
- * **Communication:**
22
- * - PostMessage API for iframe communication
23
- * - CustomEvent system for host application integration
24
- * - Event emitter pattern for programmatic access
25
- *
26
- * The element is designed to be used both declaratively (HTML attributes)
27
- * and programmatically (JavaScript API), making it flexible for different
28
- * integration patterns.
29
- *
30
- * @example
31
- * ```html
32
- * <!-- Declarative usage -->
33
- * <squelette-widget
34
- * project="my-project"
35
- * board="feedback"
36
- * theme="auto"
37
- * locale="en"
38
- * ></squelette-widget>
39
- * ```
40
- *
41
- * @example
42
- * ```ts
43
- * // Programmatic usage
44
- * const widget = document.querySelector('squelette-widget');
45
- * await widget.open();
46
- * widget.on('submit', (event) => {
47
- * console.log('Feedback submitted:', event.payload);
48
- * });
49
- * ```
50
- */
51
- import { type WidgetEventListener, type WidgetEventName } from "../types";
52
- /**
53
- * Custom element class for `<squelette-widget>`.
54
- *
55
- * This is the main widget component that handles all widget functionality
56
- * including rendering, state management, event handling, and iframe coordination.
57
- */
58
- export declare class SqueletteWidgetElement extends HTMLElement {
59
- #private;
60
- /**
61
- * Attributes that trigger attributeChangedCallback when modified.
62
- */
63
- static get observedAttributes(): string[];
64
- constructor();
65
- /**
66
- * Called when element is inserted into the DOM.
67
- * Initializes configuration from attributes and sets up event listeners.
68
- */
69
- connectedCallback(): void;
70
- /**
71
- * Called when element is removed from the DOM.
72
- * Cleans up all event listeners and restores page state.
73
- */
74
- disconnectedCallback(): void;
75
- /**
76
- * Called when observed attributes change.
77
- * Updates internal configuration and triggers re-render.
78
- */
79
- attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
80
- /**
81
- * Opens the widget panel.
82
- * @public
83
- */
84
- open(): Promise<void>;
85
- /**
86
- * Closes the widget panel.
87
- * @public
88
- */
89
- close(): Promise<void>;
90
- /**
91
- * Toggles the widget panel open/closed state.
92
- * @public
93
- */
94
- toggle(): Promise<void>;
95
- /**
96
- * Registers an event listener for widget events.
97
- * @public
98
- * @returns Cleanup function to remove the listener
99
- */
100
- on<K extends WidgetEventName>(event: K, handler: WidgetEventListener<K>): () => void;
101
- /**
102
- * Destroys the widget and removes it from the DOM.
103
- * Cleans up all resources and event listeners.
104
- * @public
105
- */
106
- destroy(): Promise<void>;
107
- /**
108
- * Renders the widget UI using Preact.
109
- * @private
110
- */
111
- private render;
112
- /**
113
- * Lazy loads the iframe frame module when needed.
114
- * @private
115
- */
116
- private ensureFrameModule;
117
- /**
118
- * Called when iframe finishes loading.
119
- * @private
120
- */
121
- private handleFrameLoaded;
122
- /**
123
- * Updates the open/closed state and manages side effects.
124
- * @private
125
- */
126
- private setOpen;
127
- /**
128
- * Applies theme and sets up theme change listeners.
129
- * @private
130
- */
131
- private applyTheme;
132
- /**
133
- * Posts identity payload to iframe via postMessage.
134
- * @private
135
- */
136
- private postIdentityToFrame;
137
- }
138
- /**
139
- * Registers the custom element if not already registered.
140
- * @internal
141
- */
142
- export declare function registerSqueletteWidget(): void;
@@ -1,97 +0,0 @@
1
- /**
2
- * Global API Helper
3
- *
4
- * Creates and exposes the `window.SqueletteWidget` global API for widget integrations.
5
- * This module provides convenient factory functions and utilities that make
6
- * it easy to create and configure widgets without using the custom element directly.
7
- *
8
- * **Available API Methods:**
9
- *
10
- * 1. `create()` - Flexible widget factory
11
- * 2. `createFeedbackWidget()` - Specialized feedback widget factory
12
- * 3. `createRoadmapWidget()` - Specialized roadmap widget factory
13
- * 4. `createChangelogWidget()` - Specialized changelog widget factory
14
- * 5. `identify()` - Set user identity across all widgets
15
- * 6. `clearIdentity()` - Clear user identity
16
- *
17
- * **Specialized Options:**
18
- * The specialized factories support advanced positioning options including:
19
- * - Button-anchored positioning with collision detection
20
- * - Fixed viewport positioning (9 preset positions)
21
- * - Overlay blur effects
22
- * - Custom event callbacks
23
- * - Click-outside-to-close behavior
24
- *
25
- * This API maintains backward compatibility with existing integrations while
26
- * internally using the modern custom element system.
27
- *
28
- * @example
29
- * ```ts
30
- * // Modern API
31
- * const widget = SqueletteWidget.create({
32
- * project: 'my-project',
33
- * board: 'feedback',
34
- * view: 'feedback'
35
- * });
36
- *
37
- * // Specialized API
38
- * const widget = SqueletteWidget.createFeedbackWidget('my-project', 'feedback', {
39
- * buttonSelector: '#feedback-btn',
40
- * position: 'bottom'
41
- * });
42
- *
43
- * // Identity management
44
- * SqueletteWidget.identify({
45
- * userId: '123',
46
- * email: 'user@example.com',
47
- * signature: 'hmac-sig'
48
- * });
49
- * ```
50
- */
51
- import type { CreateWidgetOptions } from "../types";
52
- import { SqueletteWidgetElement } from "./custom-element";
53
- import { type PositioningOptions } from "./positioning";
54
- import { identify as identityIdentify, clearIdentity as identityClearIdentity } from "./identity";
55
- import { SqueletteBanner } from "../../banner";
56
- /**
57
- * Widget options that extend positioning options.
58
- * Omits project/board/view as these are passed separately in some factory APIs.
59
- */
60
- type WidgetFactoryOptions = Omit<CreateWidgetOptions, "project" | "board" | "view"> & PositioningOptions;
61
- /**
62
- * Global API interface exposed on window.SqueletteWidget
63
- */
64
- export interface GlobalSqueletteWidget {
65
- /** Modern widget factory */
66
- create: (options: CreateWidgetOptions) => SqueletteWidgetElement;
67
- /** Specialized feedback widget factory */
68
- createFeedbackWidget: (project: string, board?: string | null, options?: WidgetFactoryOptions) => SqueletteWidgetElement;
69
- /** Specialized roadmap widget factory */
70
- createRoadmapWidget: (project: string, board?: string | null, options?: WidgetFactoryOptions) => SqueletteWidgetElement;
71
- /** Specialized changelog widget factory */
72
- createChangelogWidget: (project: string, options?: WidgetFactoryOptions) => SqueletteWidgetElement;
73
- /** Set user identity */
74
- identify: typeof identityIdentify;
75
- /** Clear user identity */
76
- clearIdentity: typeof identityClearIdentity;
77
- /** Banner API */
78
- banner: typeof SqueletteBanner;
79
- /** Widget version */
80
- version: string;
81
- /** CDN base URL */
82
- cdn: string;
83
- }
84
- /**
85
- * Initializes and exposes the global SqueletteWidget API.
86
- * This function is called once during module initialization.
87
- *
88
- * If the API already exists (e.g., from a previous script load),
89
- * this function does nothing to avoid conflicts.
90
- */
91
- export declare function ensureGlobalHelper(): void;
92
- declare global {
93
- interface Window {
94
- SqueletteWidget?: GlobalSqueletteWidget;
95
- }
96
- }
97
- export {};
@@ -1,73 +0,0 @@
1
- /**
2
- * Identity Management Module
3
- *
4
- * Handles user identification for the widget system. This module provides:
5
- * - A global identity store accessible across all widget instances
6
- * - Event-based identity updates using CustomEvents
7
- * - Type-safe identity payload validation
8
- * - Centralized identity state management
9
- *
10
- * The identity system works by:
11
- * 1. Storing identity payload in module-level state
12
- * 2. Broadcasting changes via 'squelette:identity' CustomEvent
13
- * 3. Widget instances listen to this event and forward to iframes
14
- *
15
- * This allows multiple widget instances to share the same user identity
16
- * without prop drilling or complex state management.
17
- *
18
- * @example
19
- * ```ts
20
- * // Set user identity
21
- * identify({
22
- * userId: '123',
23
- * email: 'user@example.com',
24
- * signature: 'hmac-signature'
25
- * });
26
- *
27
- * // Clear identity
28
- * clearIdentity();
29
- * ```
30
- */
31
- import type { WidgetIdentityPayload } from '../types';
32
- /**
33
- * Sets the user identity for all widget instances.
34
- *
35
- * This function validates the payload and broadcasts the identity
36
- * to all active widget instances via a CustomEvent. Each widget
37
- * will then forward this information to its iframe.
38
- *
39
- * @param payload - User identification data including userId, email, and HMAC signature
40
- * @throws {Error} Logs an error if payload is invalid (missing required fields)
41
- *
42
- * @example
43
- * ```ts
44
- * identify({
45
- * userId: 'user_123',
46
- * email: 'john@example.com',
47
- * signature: 'hmac_abc123',
48
- * name: 'John Doe', // optional
49
- * avatar: 'https://...', // optional
50
- * });
51
- * ```
52
- */
53
- export declare function identify(payload: WidgetIdentityPayload): void;
54
- /**
55
- * Clears the current user identity for all widget instances.
56
- *
57
- * This removes the stored identity and notifies all widgets
58
- * to clear their identity state, typically used on logout.
59
- *
60
- * @example
61
- * ```ts
62
- * // On user logout
63
- * clearIdentity();
64
- * ```
65
- */
66
- export declare function clearIdentity(): void;
67
- /**
68
- * Gets the current identity payload.
69
- *
70
- * @internal This is used internally by widget instances
71
- * @returns The current identity payload, or null if no user is identified
72
- */
73
- export declare function getIdentityPayload(): WidgetIdentityPayload | null;
@@ -1,36 +0,0 @@
1
- /**
2
- * Panel Dimensions Configuration
3
- *
4
- * Defines the default dimensions for different widget views (feedback, roadmap, changelog).
5
- * Each view has optimized width and height values based on its content requirements:
6
- *
7
- * - Feedback: Compact form for quick feedback submission
8
- * - Roadmap: Medium height for displaying planned features
9
- * - Changelog: Taller panel for scrolling through updates
10
- *
11
- * These dimensions are applied as CSS custom properties (--sq-panel-width, --sq-panel-height)
12
- * to the custom element, allowing the widget to adapt its size based on the active view.
13
- */
14
- import type { WidgetView } from "../types";
15
- /**
16
- * Default dimensions for each widget view type.
17
- * Values are in pixels and represent the ideal size for each view's content.
18
- */
19
- export declare const PANEL_DIMENSIONS: Record<WidgetView, {
20
- width: number;
21
- height: number;
22
- }>;
23
- /**
24
- * Fallback dimensions when view type is unknown or not specified.
25
- */
26
- export declare const DEFAULT_PANEL_DIMENSIONS: {
27
- width: number;
28
- height: number;
29
- };
30
- /**
31
- * Applies panel dimensions to the widget element as CSS custom properties.
32
- *
33
- * @param element - The widget element to apply dimensions to
34
- * @param view - The widget view type (feedback, roadmap, or changelog)
35
- */
36
- export declare function applyPanelDimensions(element: HTMLElement, view: WidgetView): void;