@sidebandai/sideband-react 0.0.0-stage → 1.4.1-rc.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.
- package/LICENSE +21 -0
- package/README.md +137 -2
- package/dist/SurveyRenderer-BkUNLbxJ.js +1185 -0
- package/dist/client/create-sideband-client.d.ts +2 -0
- package/dist/client/create-sideband-client.d.ts.map +1 -0
- package/dist/components/SurveyFab.d.ts +11 -0
- package/dist/components/SurveyFab.d.ts.map +1 -0
- package/dist/components/SurveyProgress.d.ts +6 -0
- package/dist/components/SurveyProgress.d.ts.map +1 -0
- package/dist/components/SurveyQuestionView.d.ts +11 -0
- package/dist/components/SurveyQuestionView.d.ts.map +1 -0
- package/dist/components/SurveyRenderer.d.ts +7 -0
- package/dist/components/SurveyRenderer.d.ts.map +1 -0
- package/dist/components/SurveySheet.d.ts +10 -0
- package/dist/components/SurveySheet.d.ts.map +1 -0
- package/dist/components/SurveySnackbar.d.ts +8 -0
- package/dist/components/SurveySnackbar.d.ts.map +1 -0
- package/dist/components/SurveyThankYou.d.ts +9 -0
- package/dist/components/SurveyThankYou.d.ts.map +1 -0
- package/dist/context/SidebandProvider.d.ts +8 -0
- package/dist/context/SidebandProvider.d.ts.map +1 -0
- package/dist/context/sideband-context.d.ts +18 -0
- package/dist/context/sideband-context.d.ts.map +1 -0
- package/dist/hooks/useSideband.d.ts +2 -0
- package/dist/hooks/useSideband.d.ts.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +183 -0
- package/dist/preview.d.ts +22 -0
- package/dist/preview.d.ts.map +1 -0
- package/dist/preview.js +50 -0
- package/dist/style.css +2 -0
- package/dist/style.css.d.ts +2 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +46 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-sideband-client.d.ts","sourceRoot":"","sources":["../../src/lib/client/create-sideband-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Ref } from 'react';
|
|
2
|
+
import { type SurveySessionState } from '@sidebandai/sideband-core';
|
|
3
|
+
type SurveyFabProps = {
|
|
4
|
+
session: SurveySessionState;
|
|
5
|
+
fabRef: Ref<HTMLButtonElement>;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
animationState: 'entering' | 'visible' | 'exiting';
|
|
8
|
+
};
|
|
9
|
+
export declare function SurveyFab({ session, fabRef, onClick, animationState }: SurveyFabProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=SurveyFab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SurveyFab.d.ts","sourceRoot":"","sources":["../../src/lib/components/SurveyFab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,GAAG,EAAE,MAAM,OAAO,CAAA;AAC9D,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAGlF,KAAK,cAAc,GAAG;IACpB,OAAO,EAAE,kBAAkB,CAAA;IAC3B,MAAM,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,cAAc,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,CAAA;CACnD,CAAA;AAED,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,cAAc,+BA4CrF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SurveyProgress.d.ts","sourceRoot":"","sources":["../../src/lib/components/SurveyProgress.tsx"],"names":[],"mappings":"AAAA,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE,mBAAmB,+BAQ5D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type PulseQuestion, type SurveySessionStore } from '@sidebandai/sideband-core';
|
|
2
|
+
type SurveyQuestionViewProps = {
|
|
3
|
+
question: PulseQuestion;
|
|
4
|
+
store: SurveySessionStore;
|
|
5
|
+
isSentiment: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function ThumbUpIcon(): import("react").JSX.Element;
|
|
8
|
+
export declare function ThumbDownIcon(): import("react").JSX.Element;
|
|
9
|
+
export declare function SurveyQuestionView({ question, store, isSentiment }: SurveyQuestionViewProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=SurveyQuestionView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SurveyQuestionView.d.ts","sourceRoot":"","sources":["../../src/lib/components/SurveyQuestionView.tsx"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAA;AAElC,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,EAAE,aAAa,CAAA;IACvB,KAAK,EAAE,kBAAkB,CAAA;IACzB,WAAW,EAAE,OAAO,CAAA;CACrB,CAAA;AAID,wBAAgB,WAAW,gCAE1B;AAED,wBAAgB,aAAa,gCAE5B;AAQD,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,uBAAuB,+BAmB3F"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type SurveySessionStore } from '@sidebandai/sideband-core';
|
|
2
|
+
export declare function SurveyRenderer({ store, portal, placement }: {
|
|
3
|
+
store: SurveySessionStore;
|
|
4
|
+
portal?: boolean;
|
|
5
|
+
placement?: 'fixed' | 'inline';
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=SurveyRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SurveyRenderer.d.ts","sourceRoot":"","sources":["../../src/lib/components/SurveyRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA2B,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AA4I5F,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,MAAa,EAAE,SAAmB,EAAE,EAAE;IAAE,KAAK,EAAE,kBAAkB,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;CAAE,+BAgK5J"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Ref } from 'react';
|
|
2
|
+
import { type SurveySessionState, type SurveySessionStore } from '@sidebandai/sideband-core';
|
|
3
|
+
export declare const SurveySheet: import("react").NamedExoticComponent<{
|
|
4
|
+
session: SurveySessionState;
|
|
5
|
+
store: SurveySessionStore;
|
|
6
|
+
modal: boolean;
|
|
7
|
+
rootRef?: Ref<HTMLDivElement>;
|
|
8
|
+
interactive?: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=SurveySheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SurveySheet.d.ts","sourceRoot":"","sources":["../../src/lib/components/SurveySheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,GAAG,EAAE,MAAM,OAAO,CAAA;AAChE,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAK5F,eAAO,MAAM,WAAW;aAAgG,kBAAkB;WAAS,kBAAkB;WAAS,OAAO;cAAY,GAAG,CAAC,cAAc,CAAC;kBAAgB,OAAO;EAyCzO,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type SurveySessionState, type SurveySessionStore } from '@sidebandai/sideband-core';
|
|
2
|
+
export declare function SurveySnackbar({ session, store, placement, modal }: {
|
|
3
|
+
session: SurveySessionState;
|
|
4
|
+
store: SurveySessionStore;
|
|
5
|
+
placement: 'fixed' | 'inline';
|
|
6
|
+
modal: boolean;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=SurveySnackbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SurveySnackbar.d.ts","sourceRoot":"","sources":["../../src/lib/components/SurveySnackbar.tsx"],"names":[],"mappings":"AACA,OAAO,EAA0D,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AASpJ,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE;IACnE,OAAO,EAAE,kBAAkB,CAAA;IAC3B,KAAK,EAAE,kBAAkB,CAAA;IACzB,SAAS,EAAE,OAAO,GAAG,QAAQ,CAAA;IAC7B,KAAK,EAAE,OAAO,CAAA;CACf,+BA2IA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type PulseCompletion, type SurveySessionStore } from '@sidebandai/sideband-core';
|
|
2
|
+
export declare function SurveyThankYou({ completion, store, isBusy, headingId, bodyId }: {
|
|
3
|
+
completion: PulseCompletion;
|
|
4
|
+
store: SurveySessionStore;
|
|
5
|
+
isBusy: boolean;
|
|
6
|
+
headingId: string;
|
|
7
|
+
bodyId: string;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=SurveyThankYou.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SurveyThankYou.d.ts","sourceRoot":"","sources":["../../src/lib/components/SurveyThankYou.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAEzF,wBAAgB,cAAc,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;IAAE,UAAU,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,kBAAkB,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,+BAgB9L"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import { type SidebandCoreConfig } from '@sidebandai/sideband-core';
|
|
3
|
+
export type SidebandProviderConfig = SidebandCoreConfig;
|
|
4
|
+
/** Resources use the initial transport/pacing config for this provider lifetime. Re-key to reinitialize. */
|
|
5
|
+
export declare function SidebandProvider({ children, config }: PropsWithChildren<{
|
|
6
|
+
config: SidebandProviderConfig;
|
|
7
|
+
}>): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=SidebandProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebandProvider.d.ts","sourceRoot":"","sources":["../../src/lib/context/SidebandProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAE9C,OAAO,EAA6C,KAAK,kBAAkB,EAAiF,MAAM,2BAA2B,CAAA;AAI7L,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,CAAA;AA2DvD,4GAA4G;AAC5G,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,iBAAiB,CAAC;IAAE,MAAM,EAAE,sBAAsB,CAAA;CAAE,CAAC,+BAwG3G"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { EventMetadata, Pulse, SidebandRuntime, SurveySessionStore, SimulatedPulseDefinition, TrackOptions } from '@sidebandai/sideband-core';
|
|
2
|
+
export type SidebandContextValue = {
|
|
3
|
+
track: (eventName: string, metadata?: EventMetadata, options?: TrackOptions) => void;
|
|
4
|
+
tagUser: SidebandRuntime['tagUser'];
|
|
5
|
+
untagUser: SidebandRuntime['untagUser'];
|
|
6
|
+
sync: SidebandRuntime['sync'];
|
|
7
|
+
flush: SidebandRuntime['flush'];
|
|
8
|
+
closeSurvey: () => Promise<void>;
|
|
9
|
+
openSurvey: () => void;
|
|
10
|
+
presentSimulatedPulse: (definition: SimulatedPulseDefinition) => Promise<boolean>;
|
|
11
|
+
survey: Pulse | null;
|
|
12
|
+
fabState: 'hidden' | 'expanded';
|
|
13
|
+
isSurveyOpen: boolean;
|
|
14
|
+
isThankYouVisible: boolean;
|
|
15
|
+
store: SurveySessionStore | null;
|
|
16
|
+
};
|
|
17
|
+
export declare const SidebandContext: import("react").Context<SidebandContextValue | null>;
|
|
18
|
+
//# sourceMappingURL=sideband-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sideband-context.d.ts","sourceRoot":"","sources":["../../src/lib/context/sideband-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAElJ,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,CACL,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,aAAa,EACxB,OAAO,CAAC,EAAE,YAAY,KACnB,IAAI,CAAA;IACT,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAA;IACnC,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,CAAA;IACvC,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC7B,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,CAAA;IAC/B,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAChC,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,qBAAqB,EAAE,CAAC,UAAU,EAAE,wBAAwB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IACjF,MAAM,EAAE,KAAK,GAAG,IAAI,CAAA;IACpB,QAAQ,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC/B,YAAY,EAAE,OAAO,CAAA;IACrB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,eAAe,sDAAmD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSideband.d.ts","sourceRoot":"","sources":["../../src/lib/hooks/useSideband.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,+DAQ1B"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './style.css';
|
|
2
|
+
export { createSidebandClient, SidebandApiError, SurveySessionStore, buildFabTitle, getChoiceValue, } from '@sidebandai/sideband-core';
|
|
3
|
+
export { SidebandProvider } from './context/SidebandProvider';
|
|
4
|
+
export type { SidebandProviderConfig } from './context/SidebandProvider';
|
|
5
|
+
export { useSideband } from './hooks/useSideband';
|
|
6
|
+
export type { AnsweredInteraction, ClientContext, CompletionActionStyle, CompletionActionType, CompletionIconType, CompletionType, DismissedInteraction, EventMetadata, EventRecord, Fab, FabOffset, FabPlacement, FabPoint, Interaction, Pulse, PendingPulse, SyncEndpoint, PulseAnswer, PulseCompletion, PulseCompletionAction, PulseQuestion, QuestionType, SentimentPresentation, SimulatedPulseDefinition, SidebandClientConfig, SidebandCoreConfig, ServiceUnavailableError, SurveyAnswerMap, SurveyAnswerValue, SyncErrorResponse, SyncOptions, SyncRequest, SyncResponse, TrackedEvent, TrackOptions, Theme, ThemeColor, TimerStyle, } from '@sidebandai/sideband-core';
|
|
7
|
+
import type { EventMetadata, SidebandClientConfig, SyncOptions, SyncRequest, TrackOptions } from '@sidebandai/sideband-core';
|
|
8
|
+
export declare function sync(config: SidebandClientConfig, request: Omit<SyncRequest, 'context'> & {
|
|
9
|
+
context?: SyncRequest['context'];
|
|
10
|
+
}, options?: SyncOptions): Promise<import("@sidebandai/sideband-core").SyncResponse>;
|
|
11
|
+
export declare function track(config: SidebandClientConfig, eventName: string, metadata?: EventMetadata, options?: TrackOptions): Promise<import("@sidebandai/sideband-core").SyncResponse>;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,cAAc,GACf,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,YAAY,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEjD,YAAY,EACV,mBAAmB,EACnB,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,WAAW,EACX,GAAG,EACH,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,UAAU,EACV,UAAU,GACX,MAAM,2BAA2B,CAAA;AAGlC,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,YAAY,EACb,MAAM,2BAA2B,CAAA;AAElC,wBAAgB,IAAI,CAClB,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;CAAE,EAC5E,OAAO,CAAC,EAAE,WAAW,6DAGtB;AAED,wBAAgB,KAAK,CACnB,MAAM,EAAE,oBAAoB,EAC5B,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,aAAa,EACxB,OAAO,CAAC,EAAE,YAAY,6DAGvB"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { t as e } from "./SurveyRenderer-BkUNLbxJ.js";
|
|
2
|
+
import { SidebandApiError as t, SurveySessionStore as n, SurveySessionStore as r, buildFabTitle as i, createSidebandClient as a, createSidebandClient as o, createSidebandRuntime as s, getChoiceValue as c } from "@sidebandai/sideband-core";
|
|
3
|
+
import { createContext as l, useCallback as u, useContext as d, useEffect as f, useMemo as p, useRef as m, useState as h, useSyncExternalStore as g } from "react";
|
|
4
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
5
|
+
//#region src/lib/context/sideband-context.ts
|
|
6
|
+
var y = l(null), b = {
|
|
7
|
+
state: null,
|
|
8
|
+
destroyed: !1
|
|
9
|
+
}, x = (e) => () => {}, S = () => b, C = () => /* @__PURE__ */ Error("Sideband provider unmounted before the runtime became ready."), w = /* @__PURE__ */ new WeakMap(), T = 0;
|
|
10
|
+
function E(e, t = /* @__PURE__ */ new WeakSet()) {
|
|
11
|
+
if (e === null || typeof e == "string" || typeof e == "boolean") return JSON.stringify(e);
|
|
12
|
+
if (typeof e == "number") return Number.isFinite(e) ? String(e) : null;
|
|
13
|
+
if (Array.isArray(e)) {
|
|
14
|
+
let n = e.map((e) => E(e, t));
|
|
15
|
+
return n.some((e) => e === null) ? null : `[${n.join(",")}]`;
|
|
16
|
+
}
|
|
17
|
+
if (!e || typeof e != "object" || Object.getPrototypeOf(e) !== Object.prototype || t.has(e)) return null;
|
|
18
|
+
t.add(e);
|
|
19
|
+
let n = Object.entries(e).sort(([e], [t]) => e.localeCompare(t)).map(([e, n]) => {
|
|
20
|
+
let r = E(n, t);
|
|
21
|
+
return r === null ? null : `${JSON.stringify(e)}:${r}`;
|
|
22
|
+
});
|
|
23
|
+
return n.some((e) => e === null) ? null : `{${n.join(",")}}`;
|
|
24
|
+
}
|
|
25
|
+
function D(e, t) {
|
|
26
|
+
let n = E(e), r = E(t ? { keepalive: t.keepalive } : {});
|
|
27
|
+
if (n === null || r === null) return null;
|
|
28
|
+
let i = t?.signal;
|
|
29
|
+
if (!i) return `${n}|${r}|signal:none`;
|
|
30
|
+
let a = i, o = w.get(a) ?? ++T;
|
|
31
|
+
return w.set(a, o), `${n}|${r}|signal:${o}`;
|
|
32
|
+
}
|
|
33
|
+
function O(e, t) {
|
|
34
|
+
let n = { current: null }, i = new r({
|
|
35
|
+
syncInteraction: async (e) => n.current?.submitInteraction(e),
|
|
36
|
+
trackEvent: (e, t) => n.current?.track(e, t),
|
|
37
|
+
shouldPresentPulse: (e) => t.current.shouldPresentPulse?.(e) ?? "showNow",
|
|
38
|
+
onRateApp: () => t.current.onRateApp?.(),
|
|
39
|
+
onError: (e) => {
|
|
40
|
+
let n = t.current.onError;
|
|
41
|
+
n ? n(e) : console.error("[sideband]", e);
|
|
42
|
+
}
|
|
43
|
+
}), a = s({
|
|
44
|
+
...e,
|
|
45
|
+
libraryVersion: "1.4.1-rc.2",
|
|
46
|
+
onSyncResponse: (e) => i.handleSyncResponse(e)
|
|
47
|
+
});
|
|
48
|
+
return n.current = a, {
|
|
49
|
+
runtime: a,
|
|
50
|
+
store: i,
|
|
51
|
+
ready: !1
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function k({ children: t, config: n }) {
|
|
55
|
+
let r = m(n), i = m(n), a = m(null), o = m("starting"), s = m([]), c = m(/* @__PURE__ */ new Map()), l = m(null), [d, b] = h(null);
|
|
56
|
+
f(() => {
|
|
57
|
+
i.current = n;
|
|
58
|
+
}, [n]);
|
|
59
|
+
let w = u((e) => {
|
|
60
|
+
let t = a.current;
|
|
61
|
+
o.current === "unmounted" ? e.reject?.(C()) : t?.ready && o.current === "live" ? e.run(t) : s.current.push(e);
|
|
62
|
+
}, []), T = p(() => ({
|
|
63
|
+
track: (e, t, n) => w({ run: (r) => r.runtime.track(e, t, n) }),
|
|
64
|
+
tagUser: (e) => w({ run: (t) => t.runtime.tagUser(e) }),
|
|
65
|
+
untagUser: () => w({ run: (e) => e.runtime.untagUser() }),
|
|
66
|
+
sync: (e, t) => new Promise((n, r) => {
|
|
67
|
+
let i = a.current;
|
|
68
|
+
if (o.current === "unmounted") {
|
|
69
|
+
r(C());
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (i?.ready && o.current === "live") {
|
|
73
|
+
i.runtime.sync(e, t).then(n, r);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
let l = D(e, t), u = l ? c.current.get(l) : void 0;
|
|
77
|
+
if (u) {
|
|
78
|
+
u.resolves.push(n), u.rejects.push(r);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
let d = {
|
|
82
|
+
resolves: [n],
|
|
83
|
+
rejects: [r],
|
|
84
|
+
command: {
|
|
85
|
+
run: (n) => {
|
|
86
|
+
n.runtime.sync(e, t).then((e) => d.resolves.forEach((t) => t(e)), (e) => d.rejects.forEach((t) => t(e)));
|
|
87
|
+
},
|
|
88
|
+
reject: (e) => d.rejects.forEach((t) => t(e))
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
l && c.current.set(l, d), s.current.push(d.command);
|
|
92
|
+
}),
|
|
93
|
+
flush: () => new Promise((e, t) => {
|
|
94
|
+
let n = a.current;
|
|
95
|
+
if (o.current === "unmounted") {
|
|
96
|
+
t(C());
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (n?.ready && o.current === "live") {
|
|
100
|
+
n.runtime.flush().then(e, t);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
let r = l.current;
|
|
104
|
+
if (r) {
|
|
105
|
+
r.resolves.push(e), r.rejects.push(t);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
let i = {
|
|
109
|
+
resolves: [e],
|
|
110
|
+
rejects: [t],
|
|
111
|
+
command: {
|
|
112
|
+
run: (e) => {
|
|
113
|
+
e.runtime.flush().then(() => i.resolves.forEach((e) => e()), (e) => i.rejects.forEach((t) => t(e)));
|
|
114
|
+
},
|
|
115
|
+
reject: (e) => i.rejects.forEach((t) => t(e))
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
l.current = i, s.current.push(i.command);
|
|
119
|
+
}),
|
|
120
|
+
closeSurvey: () => new Promise((e, t) => w({
|
|
121
|
+
run: (n) => {
|
|
122
|
+
n.store.closeSurvey().then(e, t);
|
|
123
|
+
},
|
|
124
|
+
reject: t
|
|
125
|
+
})),
|
|
126
|
+
openSurvey: () => w({ run: (e) => e.store.openSurvey() }),
|
|
127
|
+
presentSimulatedPulse: (e) => new Promise((t, n) => w({
|
|
128
|
+
run: (n) => t(n.store.presentSimulatedPulse(e)),
|
|
129
|
+
reject: n
|
|
130
|
+
}))
|
|
131
|
+
}), [w]), E = g(u((e) => d ? d.store.subscribe(e) : x(e), [d]), u(() => d ? d.store.getSnapshot() : S(), [d]), S).state;
|
|
132
|
+
f(() => {
|
|
133
|
+
let e = !0, t = s, n = c, u = l, d = O(r.current, i);
|
|
134
|
+
return o.current = "starting", d.runtime.start(), a.current = d, queueMicrotask(() => {
|
|
135
|
+
if (!e || a.current !== d) return;
|
|
136
|
+
d.ready = !0, o.current = "live", b(d);
|
|
137
|
+
let r = t.current.splice(0);
|
|
138
|
+
n.current.clear(), u.current = null;
|
|
139
|
+
for (let e of r) e.run(d);
|
|
140
|
+
}), () => {
|
|
141
|
+
e = !1, d.ready = !1, a.current === d && (a.current = null), o.current = "cleanup", d.runtime.destroy(), d.store.destroy(), queueMicrotask(() => b((e) => e === d ? null : e)), queueMicrotask(() => {
|
|
142
|
+
if (a.current) return;
|
|
143
|
+
o.current = "unmounted";
|
|
144
|
+
let e = t.current.splice(0);
|
|
145
|
+
n.current.clear(), u.current = null;
|
|
146
|
+
for (let t of e) t.reject?.(C());
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
}, []);
|
|
150
|
+
let k = p(() => ({
|
|
151
|
+
...T,
|
|
152
|
+
survey: E?.survey ?? null,
|
|
153
|
+
fabState: E?.fabState ?? "hidden",
|
|
154
|
+
isSurveyOpen: !!E?.isOpen,
|
|
155
|
+
isThankYouVisible: !!E?.completion,
|
|
156
|
+
store: d?.store ?? null
|
|
157
|
+
}), [
|
|
158
|
+
T,
|
|
159
|
+
d,
|
|
160
|
+
E
|
|
161
|
+
]);
|
|
162
|
+
return /* @__PURE__ */ v(y.Provider, {
|
|
163
|
+
value: k,
|
|
164
|
+
children: [t, d ? /* @__PURE__ */ _(e, { store: d.store }) : null]
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/lib/hooks/useSideband.ts
|
|
169
|
+
function A() {
|
|
170
|
+
let e = d(y);
|
|
171
|
+
if (!e) throw Error("useSideband must be used within a SidebandProvider.");
|
|
172
|
+
return e;
|
|
173
|
+
}
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region src/lib/index.ts
|
|
176
|
+
function j(e, t, n) {
|
|
177
|
+
return o(e).sync(t, n);
|
|
178
|
+
}
|
|
179
|
+
function M(e, t, n, r) {
|
|
180
|
+
return o(e).track(t, n, r);
|
|
181
|
+
}
|
|
182
|
+
//#endregion
|
|
183
|
+
export { t as SidebandApiError, k as SidebandProvider, n as SurveySessionStore, i as buildFabTitle, a as createSidebandClient, c as getChoiceValue, j as sync, M as track, A as useSideband };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type Interaction, type Pulse, type SentimentPresentation } from '@sidebandai/sideband-core';
|
|
2
|
+
export type { CompletionActionStyle, CompletionActionType, CompletionIconType, CompletionType, Fab, FabOffset, FabPlacement, FabPoint, Pulse, PulseAnswer, PulseCompletion, PulseCompletionAction, PulseQuestion, QuestionType, SentimentPresentation, Theme, ThemeColor, TimerStyle, } from '@sidebandai/sideband-core';
|
|
3
|
+
export type SidebandPulsePreviewPlacement = 'fixed' | 'inline';
|
|
4
|
+
export type SidebandPulsePreviewOptions = {
|
|
5
|
+
pulse: Pulse;
|
|
6
|
+
sentimentPresentation?: SentimentPresentation;
|
|
7
|
+
placement?: SidebandPulsePreviewPlacement;
|
|
8
|
+
onInteraction?: (interaction: Interaction) => void;
|
|
9
|
+
onDone?: () => void;
|
|
10
|
+
onRateApp?: () => void;
|
|
11
|
+
};
|
|
12
|
+
export type SidebandPulsePreviewUpdateOptions = Partial<SidebandPulsePreviewOptions> & {
|
|
13
|
+
pulse?: Pulse;
|
|
14
|
+
};
|
|
15
|
+
export type SidebandPulsePreviewHandle = {
|
|
16
|
+
element: HTMLElement;
|
|
17
|
+
open: () => void;
|
|
18
|
+
update: (options: SidebandPulsePreviewUpdateOptions) => void;
|
|
19
|
+
destroy: () => void;
|
|
20
|
+
};
|
|
21
|
+
export declare function mountSidebandPulsePreview(target: Element | string, options: SidebandPulsePreviewOptions): SidebandPulsePreviewHandle;
|
|
22
|
+
//# sourceMappingURL=preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../src/lib/preview.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsB,KAAK,WAAW,EAAE,KAAK,KAAK,EAAE,KAAK,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAGxH,YAAY,EACV,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,GAAG,EACH,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,KAAK,EACL,UAAU,EACV,UAAU,GACX,MAAM,2BAA2B,CAAA;AAElC,MAAM,MAAM,6BAA6B,GAAG,OAAO,GAAG,QAAQ,CAAA;AAC9D,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,EAAE,KAAK,CAAA;IACZ,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C,SAAS,CAAC,EAAE,6BAA6B,CAAA;IACzC,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAA;IAClD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB,CAAA;AACD,MAAM,MAAM,iCAAiC,GAAG,OAAO,CAAC,2BAA2B,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAA;AACxG,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,EAAE,WAAW,CAAA;IACpB,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,MAAM,EAAE,CAAC,OAAO,EAAE,iCAAiC,KAAK,IAAI,CAAA;IAC5D,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAwBD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,OAAO,EAAE,2BAA2B,GAAG,0BAA0B,CA0CpI"}
|
package/dist/preview.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { t as e } from "./SurveyRenderer-BkUNLbxJ.js";
|
|
2
|
+
import { SurveySessionStore as t } from "@sidebandai/sideband-core";
|
|
3
|
+
import { createElement as n } from "react";
|
|
4
|
+
import { flushSync as r } from "react-dom";
|
|
5
|
+
import { createRoot as i } from "react-dom/client";
|
|
6
|
+
//#region src/lib/preview.ts
|
|
7
|
+
function a(e) {
|
|
8
|
+
if (typeof e != "string") return e;
|
|
9
|
+
let t = document.querySelector(e);
|
|
10
|
+
if (!t) throw Error(`Sideband Pulse preview target not found: ${e}`);
|
|
11
|
+
return t;
|
|
12
|
+
}
|
|
13
|
+
function o(e) {
|
|
14
|
+
return new t({
|
|
15
|
+
syncInteraction: async (t) => {
|
|
16
|
+
let n = e.current;
|
|
17
|
+
n.onInteraction?.(t), "completion_action_id" in t && t.completion_action_id && Object.values(n.pulse.completions).flatMap((e) => e.actions).find((e) => e.id === t.completion_action_id)?.action.type === "dismiss" && n.onDone?.();
|
|
18
|
+
},
|
|
19
|
+
onRateApp: () => e.current.onRateApp?.()
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function s(t, s) {
|
|
23
|
+
let c = a(t), l = document.createElement("div");
|
|
24
|
+
l.className = `sb-preview sb-preview--${s.placement ?? "fixed"}`, c.append(l);
|
|
25
|
+
let u = i(l), d = { current: s }, f = o(d), p = !1, m = () => {
|
|
26
|
+
p || (l.className = `sb-preview sb-preview--${d.current.placement ?? "fixed"}`, r(() => u.render(n(e, {
|
|
27
|
+
store: f,
|
|
28
|
+
portal: !1,
|
|
29
|
+
placement: d.current.placement ?? "fixed"
|
|
30
|
+
}))));
|
|
31
|
+
};
|
|
32
|
+
return f.presentPulse(s.pulse, s), m(), {
|
|
33
|
+
element: l,
|
|
34
|
+
open: () => f.openSurvey(),
|
|
35
|
+
update(e) {
|
|
36
|
+
if (p) return;
|
|
37
|
+
let t = d.current.pulse, n = d.current.sentimentPresentation ?? "sheet";
|
|
38
|
+
d.current = {
|
|
39
|
+
...d.current,
|
|
40
|
+
...e,
|
|
41
|
+
pulse: e.pulse ?? t
|
|
42
|
+
}, (d.current.pulse !== t || (d.current.sentimentPresentation ?? "sheet") !== n) && (f.destroy(), f = o(d), f.presentPulse(d.current.pulse, d.current)), m();
|
|
43
|
+
},
|
|
44
|
+
destroy() {
|
|
45
|
+
p || (p = !0, u.unmount(), f.destroy(), l.remove());
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { s as mountSidebandPulsePreview };
|
package/dist/style.css
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.sb-snackbar-root{--sb-text:var(--sb-snackbar-text);--sb-text-muted:var(--sb-theme-content-body);--sb-surface:var(--sb-snackbar-surface);z-index:1100;pointer-events:none;color:var(--sb-snackbar-text);font-family:Inter,-apple-system,BlinkMacSystemFont,system-ui,sans-serif;position:fixed;inset:0}.sb-snackbar-root *,.sb-snackbar-root :before,.sb-snackbar-root :after{box-sizing:border-box}.sb-snackbar-root h2{text-transform:none;letter-spacing:normal}.sb-snackbar-shell{left:var(--sb-snackbar-left);bottom:var(--sb-snackbar-bottom);width:var(--sb-snackbar-width);transition:left .2s ease-in-out,bottom .2s ease-in-out,width .2s ease-in-out;position:absolute}.sb-snackbar-surface{width:100%;height:var(--sb-snackbar-height,64px);border-radius:calc(var(--sb-snackbar-compact-height,64px) / 2);background:var(--sb-snackbar-surface);box-shadow:inset 0 0 0 1px var(--sb-snackbar-border);transition:height .45s cubic-bezier(0,.87,.39,1),border-radius .45s cubic-bezier(0,.87,.39,1);position:relative;overflow:hidden}.sb-snackbar-compact{width:var(--sb-snackbar-compact-width,364px);align-items:center;gap:10px;min-height:64px;padding:10px;transition:opacity .12s ease-out;display:flex;position:relative}.sb-snackbar-artwork{--sb-theme-fab-accent-primary:var(--sb-theme-sheet-progress-fill);--sb-theme-fab-accent-secondary:var(--sb-snackbar-surface);--sb-theme-fab-foreground:var(--sb-snackbar-text);background:var(--sb-theme-sheet-progress-fill);border-radius:50%;flex:0 0 40px;width:40px;height:40px;position:relative;overflow:hidden}.sb-snackbar-artwork img{z-index:2;object-fit:cover;width:100%;height:100%;position:absolute;inset:0}.sb-snackbar-prompt{overflow-wrap:anywhere;flex:1;min-width:0;margin:0;font-size:14px;font-weight:600;line-height:20px;position:relative}.sb-snackbar-answers{flex:none;gap:4px;display:flex;position:relative}.sb-snackbar-answer{width:44px;height:44px;color:var(--sb-snackbar-text);background:var(--sb-snackbar-normal);cursor:pointer;pointer-events:auto;border:0;border-radius:50%;place-items:center;margin:0;padding:0;transition:background .12s ease-out,scale .12s ease-out;display:grid}.sb-snackbar-answer svg{width:18px;height:18px}.sb-snackbar-answer:hover:not(:disabled){background:var(--sb-snackbar-hover)}.sb-snackbar-answer:active:not(:disabled){background:var(--sb-snackbar-pressed);scale:.94}.sb-snackbar-answer[aria-pressed=true]{color:var(--sb-snackbar-on-active);background:var(--sb-snackbar-active)}.sb-snackbar-answer:disabled{cursor:default;pointer-events:none;opacity:1}.sb-snackbar-close{top:-25px;width:44px;height:44px;color:var(--sb-snackbar-text);pointer-events:auto;cursor:pointer;background:0 0;border:0;place-items:center;margin:0;padding:13px;display:grid;position:absolute;inset-inline-start:-15px}.sb-snackbar-close svg{background:var(--sb-snackbar-surface);border-radius:50%;width:18px;height:18px;padding:2px}.sb-snackbar-answer:focus-visible,.sb-snackbar-close:focus-visible{outline:2px solid var(--sb-snackbar-text);outline-offset:2px}.sb-snackbar-timer{pointer-events:none;position:absolute;overflow:hidden}.sb-snackbar-timer--fill{background:var(--sb-snackbar-elapsed);inset:0}.sb-snackbar-timer--bar{inset-inline:1px 3px;background:var(--sb-theme-sheet-progress-track);height:2px;bottom:-6px}.sb-snackbar-timer-fill{transform-origin:0;background:var(--sb-theme-sheet-progress-fill);width:100%;height:100%;display:block}.sb-snackbar-timer--fill .sb-snackbar-timer-fill{background:var(--sb-snackbar-remaining)}.sb-snackbar-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .sb-snackbar-timer-fill{transform-origin:100%}.sb-snackbar-root[data-counting=true] .sb-snackbar-timer-fill{animation:sb-snackbar-countdown var(--sb-snackbar-duration) linear forwards}.sb-snackbar-root[data-frozen=true] .sb-snackbar-timer-fill{transform:scaleX(var(--sb-snackbar-fraction));animation:none}.sb-snackbar-overlay{background:var(--sb-theme-sheet-scrim);opacity:0;pointer-events:none;border:0;width:100%;height:100%;margin:0;padding:0;transition:opacity .45s ease-out;position:absolute;inset:0}.sb-snackbar-card{width:var(--sb-snackbar-card-width);max-height:var(--sb-snackbar-max-height);opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;overflow:auto}.sb-snackbar-root .sb-snackbar-card .sb-sheet-root{position:static;inset:auto}.sb-snackbar-root .sb-snackbar-card .sb-sheet-root__overlay{display:none}.sb-snackbar-root .sb-snackbar-card .sb-sheet{width:100%;max-height:none;box-shadow:none;background:0 0;border:0;margin:0;animation:none;position:relative;inset:auto;transform:none}.sb-snackbar-card[inert] *{animation-play-state:paused}.sb-snackbar-root[data-stage=widening] .sb-snackbar-compact,.sb-snackbar-root[data-stage=expanding] .sb-snackbar-compact,.sb-snackbar-root[data-stage=ready] .sb-snackbar-compact{opacity:0}.sb-snackbar-root[data-expanded=true] .sb-snackbar-overlay{opacity:1;pointer-events:auto}.sb-snackbar-root[data-expanded=true] .sb-snackbar-close{display:none}.sb-snackbar-root[data-stage=expanding] .sb-snackbar-surface,.sb-snackbar-root[data-stage=ready] .sb-snackbar-surface{box-shadow:none;background:var(--sb-theme-sheet-background);border-radius:40px}.sb-snackbar-root[data-stage=expanding] .sb-snackbar-card{opacity:1;transition:opacity .3s ease-out .12s}.sb-snackbar-root[data-stage=ready] .sb-snackbar-card{opacity:1;pointer-events:auto}.sb-snackbar-root[data-stage=entering] .sb-snackbar-shell{animation:.89016s cubic-bezier(.649439,.0577174,.124599,1) .18584s both sb-snackbar-enter-scale,.893207s cubic-bezier(.649439,.0577174,.124599,1) 1.076s both sb-snackbar-enter-width}.sb-snackbar-root[data-stage=entering] .sb-snackbar-surface{transition:none}.sb-snackbar-root[data-stage=entering] .sb-snackbar-prompt,.sb-snackbar-root[data-stage=entering] .sb-snackbar-answers,.sb-snackbar-root[data-stage=entering] .sb-snackbar-close{animation:.2s ease-out 1.076s both sb-snackbar-label}.sb-snackbar-root[data-stage=entering] .sb-snackbar-timer{animation:.2s ease-out 1.96921s both sb-snackbar-label}.sb-root--inline .sb-snackbar-root{position:absolute}@keyframes sb-snackbar-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@keyframes sb-snackbar-enter-scale{0%{scale:0}to{scale:1}}@keyframes sb-snackbar-enter-width{0%{width:var(--sb-snackbar-compact-height,64px);translate:var(--sb-snackbar-entrance-offset) 0}to{width:var(--sb-snackbar-width);translate:0}}@keyframes sb-snackbar-label{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion:reduce){.sb-snackbar-root[data-counting=true] .sb-snackbar-timer-fill{animation-duration:var(--sb-snackbar-duration)!important}.sb-snackbar-root .sb-snackbar-shell,.sb-snackbar-root .sb-snackbar-surface,.sb-snackbar-root .sb-snackbar-card,.sb-snackbar-root .sb-snackbar-compact,.sb-snackbar-root .sb-snackbar-overlay{transition:none}.sb-snackbar-root[data-stage=entering] .sb-snackbar-shell,.sb-snackbar-root[data-stage=entering] .sb-snackbar-prompt,.sb-snackbar-root[data-stage=entering] .sb-snackbar-timer,.sb-snackbar-root[data-stage=entering] .sb-snackbar-close,.sb-snackbar-root[data-stage=entering] .sb-snackbar-answers{animation:none}}.sb-root{--sb-surface:#fff;--sb-surface-muted:#f2f2f2;--sb-border-active:#080808b3;--sb-text:#080808;--sb-text-muted:#5c5c5c;--sb-overlay:#00000061;--sb-ease:cubic-bezier(0, .87, .39, 1);--sb-height-ease:cubic-bezier(0, .83, .363, .994);--sb-fab-motion-ease:cubic-bezier(.649439, .0577174, .124599, 1);color:var(--sb-text);font-synthesis:none;font-family:-apple-system,BlinkMacSystemFont,system-ui,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;line-height:normal}.sb-root *,.sb-root :before,.sb-root :after{box-sizing:border-box}.sb-safe-area-probe{visibility:hidden;pointer-events:none;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);position:fixed;inset:0}.sb-fab{right:16px;bottom:calc(24px + env(safe-area-inset-bottom,0px));z-index:1000;width:var(--sb-fab-expanded-width,86px);border:1px solid var(--sb-theme-fab-border,#080808);background:var(--sb-theme-fab-background,#080808);min-width:0;height:60px;color:var(--sb-theme-fab-foreground,#fff);box-shadow:none;cursor:pointer;transform-origin:50%;will-change:scale;border-radius:999px;align-items:center;margin:0;padding:0 28px 0 14px;transition:scale 80ms ease-out;display:inline-flex;position:fixed;overflow:hidden}.sb-fab:active:not(:disabled){scale:.97}.sb-fab--entering{animation:sb-fab-enter-scale .89016s var(--sb-fab-motion-ease) .259705s both, sb-fab-enter-width .893207s var(--sb-fab-motion-ease) 1.076s both}.sb-fab--entering .sb-fab__label{animation:sb-fab-label-in .2s var(--sb-fab-motion-ease) 1.14987s both}.sb-fab--entering .sb-fab__timer{animation:sb-fab-timer-in .2s var(--sb-fab-motion-ease) 1.96921s both}.sb-fab--entering .sb-fab__timer-fill{animation-delay:1.96921s}.sb-fab--exiting{width:var(--sb-fab-exit-width,var(--sb-fab-expanded-width));pointer-events:none;scale:var(--sb-fab-exit-scale,1);translate:var(--sb-fab-exit-offset,0) 0;animation:.292089s cubic-bezier(.677885,.170122,.695982,.997824) .3s forwards sb-fab-exit-width,.390467s cubic-bezier(.362165,.0946429,.49708,.932961) .466372s forwards sb-fab-exit-scale}.sb-fab--exiting .sb-fab__label{opacity:var(--sb-fab-exit-label-opacity,1);animation:.389727s cubic-bezier(.5,0,.5,1) .3s forwards sb-fab-label-out}.sb-fab--exiting .sb-fab__timer{opacity:var(--sb-fab-exit-timer-opacity,0)}.sb-fab--exiting .sb-fab__badge{animation:.297243s cubic-bezier(.5,0,1,.600461) .398177s forwards sb-fab-badge-out}.sb-fab__badge{z-index:1;border-radius:50%;flex:0 0 32px;width:32px;height:32px;margin-inline-end:12px;position:relative;overflow:hidden}.sb-fab__badge-image,.sb-fab__badge-art{border-radius:inherit;width:100%;height:100%;display:block}.sb-fab__badge-image{object-fit:cover}.sb-fab__badge-art{background:var(--sb-theme-fab-accent-primary,#f97316);position:relative}.sb-fab__badge-inner{background:var(--sb-theme-fab-accent-secondary,#2563eb);border-radius:50%;position:absolute;inset:17%}.sb-fab__glyph{z-index:1;border-radius:999px;display:block;position:absolute}.sb-fab__glyph--center{background:var(--sb-theme-fab-foreground,#fff);border-radius:3.52px;width:4.16px;height:11.52px;top:50%;left:50%;transform:translate(-50%,-50%)}.sb-fab__glyph--amber{background:#fac143;width:2.88px;height:6.72px;top:50%;left:50%;transform:translate(calc(-50% - 3.04px),calc(.8px - 50%))}.sb-fab__glyph--mint{background:#39c690;width:2.88px;height:5.44px;top:50%;left:50%;transform:translate(calc(3.04px - 50%),calc(-50% - .32px))}.sb-fab__glyph--rose{background:#e86398;width:2.56px;height:4.16px;top:50%;left:50%;transform:translate(calc(.96px - 50%),calc(3.68px - 50%))}.sb-fab__label{z-index:1;width:var(--sb-fab-label-width,auto);color:currentColor;text-align:start;text-overflow:clip;white-space:nowrap;flex:none;min-width:0;font-size:14px;font-weight:600;line-height:1;position:relative;overflow:hidden}.sb-fab__timer{z-index:0;pointer-events:none;position:absolute;overflow:hidden}.sb-fab__timer--bar{background:var(--sb-theme-fab-timer-track,#08080829);border-radius:999px;height:2px;bottom:4px;left:59px;right:29px}.sb-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .sb-fab__timer--bar{left:29px;right:59px}.sb-fab__timer--fill{border-radius:inherit;background:var(--sb-theme-fab-timer-track,#08080829);inset:0}.sb-fab__timer-fill{border-radius:inherit;background:var(--sb-theme-fab-timer-fill,#080808e6);transform-origin:0;width:100%;height:100%;animation:sb-fab-timer-bar var(--sb-timer-duration) linear forwards;display:block}.sb-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .sb-fab__timer-fill{transform-origin:100%}.sb-sheet-root{z-index:1100;position:fixed;inset:0}.sb-sheet-root__overlay{background:var(--sb-theme-sheet-scrim,var(--sb-overlay));cursor:pointer;border:0;width:100%;height:100%;margin:0;padding:0;animation:.2s ease-in both sb-overlay-in;position:absolute;inset:0}.sb-sheet-root--exiting{pointer-events:none}.sb-sheet-root--exiting .sb-sheet-root__overlay{animation:.2s ease-in forwards sb-overlay-out}.sb-sheet{bottom:calc(8px + env(safe-area-inset-bottom,0px));width:min(376px, calc(100% - 24px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)));max-height:calc(100% - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));background:var(--sb-theme-sheet-background,var(--sb-surface));color:var(--sb-text);box-shadow:none;interpolate-size:allow-keywords;transition:height .45s var(--sb-height-ease);animation:sb-sheet-in .45s var(--sb-ease) both;overscroll-behavior:contain;border-radius:40px;position:absolute;left:50%;overflow:hidden;transform:translate(-50%)}.sb-sheet-root--exiting .sb-sheet{animation:sb-sheet-out .45s var(--sb-ease) forwards}.sb-sheet__header{height:50px;position:relative}.sb-progress{background:var(--sb-theme-sheet-progress-track,#eaeaea);border-radius:24px;width:min(216px,100% - 112px);height:6px;position:absolute;top:27px;left:50%;overflow:hidden;transform:translate(-50%)}.sb-progress__fill{width:var(--sb-progress-value,0%);border-radius:inherit;background:var(--sb-theme-sheet-progress-fill,#080808);height:100%;transition:width .45s var(--sb-ease);animation:sb-progress-in .45s var(--sb-ease) .1s both;display:block}.sb-sheet__close{background:var(--sb-theme-sheet-close-button-background,transparent);width:40px;height:40px;color:var(--sb-theme-sheet-close-button-foreground,var(--sb-text));cursor:pointer;border:0;border-radius:4px;place-items:center;margin:0;padding:8px;display:grid;position:absolute;top:10px;right:16px}.sb-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .sb-sheet__close{left:16px;right:auto}.sb-sheet__close svg{width:24px;height:24px;display:block}.sb-sheet__stage{animation:.25s ease-in-out both sb-step-in}.sb-sheet__body{flex-direction:column;display:flex}.sb-sheet__body--question{padding-bottom:16px}.sb-sheet__copy{text-align:center;justify-items:center;display:grid}.sb-sheet__body--question .sb-sheet__copy{place-items:center;height:88px;padding-inline:23px}.sb-sheet__body--question h2{color:var(--sb-theme-content-heading,var(--sb-text));text-align:center;margin:0;font-size:19px;font-weight:600;line-height:1.24}.sb-sheet__body--sentiment{padding:12px 24px 22px}.sb-sheet__body--sentiment .sb-sheet__copy{align-content:center;gap:8px;min-height:84px}.sb-sheet__body--sentiment .sb-sheet__copy--acknowledgement{min-height:70px;padding-top:6px}.sb-sheet__eyebrow{max-width:100%;color:var(--sb-theme-content-helper,var(--sb-text-muted));text-align:center;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:16px;font-weight:400;line-height:1.25;display:-webkit-box;overflow:hidden}.sb-sheet__body--sentiment h2{max-width:100%;color:var(--sb-theme-content-heading,var(--sb-text));text-align:center;-webkit-line-clamp:3;-webkit-box-orient:vertical;margin:0;font-size:22px;font-weight:600;line-height:1.2;animation:.28s cubic-bezier(.2,0,0,1) both sb-sentiment-title-in;display:-webkit-box;overflow:hidden}.sb-sheet__copy--acknowledgement h2{max-width:324px;font-size:29px;line-height:1.12}.sb-question{min-width:0}.sb-question--sentiment{grid-template-columns:repeat(2,80px);gap:25px;width:185px;margin:37px auto 31px;display:grid}.sb-sheet__copy--acknowledgement+.sb-question--sentiment{margin-top:35px}.sb-sentiment-control{place-items:center;width:80px;height:80px;display:grid;position:relative}.sb-yesno{z-index:1;border:1.111px solid var(--sb-theme-choice-default-border,#e2e2e2);background:var(--sb-theme-choice-default-background,var(--sb-surface));width:80px;height:80px;color:var(--sb-theme-choice-default-foreground,var(--sb-text));cursor:pointer;border-radius:50%;place-items:center;margin:0;padding:0;transition:border-color .18s,background-color .18s,color .18s,scale .12s ease-out;display:grid;position:relative}.sb-yesno__icon,.sb-yesno__icon svg{width:35.5556px;height:35.5556px;display:block}.sb-yesno:hover:not(:disabled){border-color:var(--sb-theme-choice-hover-border,var(--sb-border-active));background:var(--sb-theme-choice-hover-background,var(--sb-surface));color:var(--sb-theme-choice-hover-foreground,var(--sb-text))}.sb-yesno:active:not(:disabled){border-color:var(--sb-theme-choice-pressed-border,var(--sb-border-active));background:var(--sb-theme-choice-pressed-background,var(--sb-surface-muted));color:var(--sb-theme-choice-pressed-foreground,var(--sb-text));scale:.97}.sb-yesno--selected,.sb-yesno--selected:disabled{border-color:var(--sb-theme-choice-selected-border,var(--sb-text));background:var(--sb-theme-choice-selected-background,var(--sb-text));color:var(--sb-theme-choice-selected-foreground,var(--sb-surface))}.sb-yesno:disabled:not(.sb-yesno--selected){border-color:var(--sb-theme-choice-disabled-border,#e2e2e2);background:var(--sb-theme-choice-disabled-background,#f2f2f2);color:var(--sb-theme-choice-disabled-foreground,#5c5c5c);cursor:default}.sb-spark-ring{z-index:0;opacity:0;pointer-events:none;border-radius:50%;animation:.22s cubic-bezier(.25,.46,.45,.94) forwards sb-spark-in;position:absolute;inset:-26px;scale:.55}.sb-spark-ring__dot{--sb-spark-radius:54px;width:7px;height:7px;transform:rotate(calc(var(--sb-spark-index) * 30deg)) translateY(calc(var(--sb-spark-radius) * -1));background:#dedede;border-radius:50%;margin:-3.5px;position:absolute;top:50%;left:50%}.sb-spark-ring__dot--large{--sb-spark-radius:59px;width:12px;height:12px;margin:-6px}.sb-question--choices,.sb-question--text{width:auto;margin-inline:24px}.sb-options-scroll{scrollbar-gutter:stable;overscroll-behavior:contain;max-height:320.5px;display:grid;overflow:hidden auto}.sb-options-scroll--scrolling{padding-bottom:20px}.sb-question--choices-grid .sb-options-scroll{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.sb-question--choices-list .sb-options-scroll{grid-template-columns:minmax(0,1fr);gap:8px}.sb-choice{overflow-wrap:anywhere;border:1px solid var(--sb-theme-choice-default-border,#e2e2e2);background:var(--sb-theme-choice-default-background,var(--sb-surface));width:100%;min-width:0;min-height:51px;color:var(--sb-theme-choice-default-foreground,var(--sb-text));cursor:pointer;font:inherit;text-align:center;border-radius:999px;justify-content:center;align-items:center;margin:0;padding:8px;font-size:16px;font-weight:700;line-height:1.2;transition:border-color .18s,background-color .18s,color .18s,scale .12s ease-out;display:flex}.sb-choice__label{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.sb-question--choices-grid .sb-choice{-webkit-line-clamp:2;-webkit-box-orient:vertical;align-content:center;max-height:51px;display:-webkit-box;overflow:hidden}.sb-question--choices-list .sb-choice{text-align:start;border-radius:16px;justify-content:flex-start;min-height:51px;padding:16px 22px}.sb-choice:hover:not(:disabled){border-color:var(--sb-theme-choice-hover-border,var(--sb-border-active));background:var(--sb-theme-choice-hover-background,var(--sb-surface));color:var(--sb-theme-choice-hover-foreground,var(--sb-text))}.sb-choice:active:not(:disabled){border-color:var(--sb-theme-choice-pressed-border,var(--sb-border-active));background:var(--sb-theme-choice-pressed-background,var(--sb-surface-muted));color:var(--sb-theme-choice-pressed-foreground,var(--sb-text));scale:.97}.sb-choice--selected{border-color:var(--sb-theme-choice-selected-border,var(--sb-text));background:var(--sb-theme-choice-selected-background,var(--sb-text));color:var(--sb-theme-choice-selected-foreground,var(--sb-surface))}.sb-choice:disabled{border-color:var(--sb-theme-choice-disabled-border,#e2e2e2);background:var(--sb-theme-choice-disabled-background,#f2f2f2);color:var(--sb-theme-choice-disabled-foreground,#5c5c5c);cursor:not-allowed}.sb-choice--other{border-color:var(--sb-theme-choice-default-border,#e2e2e2);color:var(--sb-theme-input-placeholder,#08080866);gap:0;padding:0;font-weight:400}.sb-choice__other-content{align-items:center;gap:0;display:inline-flex}.sb-choice__other-caret{background:var(--sb-theme-input-foreground,var(--sb-text));flex:none;width:1px;height:22px}.sb-choice__other-label{color:var(--sb-theme-input-placeholder,#08080866);line-height:1.2}.sb-question--choices-grid .sb-choice--other{display:flex}.sb-question--text{padding-top:10px}.sb-textarea-shell{border:1px solid var(--sb-theme-input-border,#08080833);background:var(--sb-theme-input-background,var(--sb-surface));border-radius:16px;width:100%;height:155px;transition:border-color .18s,background-color .18s;overflow:hidden}.sb-textarea-shell:focus-within{border-color:var(--sb-theme-input-focused-border,var(--sb-border-active))}.sb-textarea{width:100%;height:100%;color:var(--sb-theme-input-foreground,var(--sb-text));font:inherit;resize:none;background:0 0;border:0;outline:0;margin:0;padding:17px 22px;font-size:16px;font-weight:400;line-height:1.25;display:block}.sb-textarea::placeholder{color:var(--sb-theme-input-placeholder,#08080866);opacity:1}.sb-textarea:disabled{color:var(--sb-theme-input-disabled-foreground,var(--sb-text-muted));cursor:not-allowed}.sb-textarea-shell:has(.sb-textarea:disabled){background:var(--sb-theme-input-disabled-background,var(--sb-surface-muted))}.sb-sheet__footer{border-top:1px solid var(--sb-theme-sheet-divider,#e2e2e2);align-items:center;gap:16px;min-height:84px;padding:16px 20px 20px;display:flex}.sb-sheet__answer-comment,.sb-sheet__footer-spacer{flex:auto;min-width:0;margin:0}.sb-sheet__answer-comment{color:var(--sb-theme-content-helper,var(--sb-text-muted));text-align:start;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:16px;font-weight:600;line-height:1.2;animation:.18s ease-out both sb-footer-comment-in,.18s ease-in 1s forwards sb-footer-comment-out;display:-webkit-box;overflow:hidden}.sb-next,.sb-button{cursor:pointer;min-height:48px;font:inherit;border:0;border-radius:999px;margin:0;transition:background-color .18s,color .18s,opacity .18s,scale .12s ease-out}.sb-next{background:var(--sb-theme-button-primary-background,#080808);width:101px;height:48px;color:var(--sb-theme-button-primary-foreground,#fff);flex:0 0 101px;place-items:center;padding:0;display:grid}.sb-next svg{width:20px;height:20px;display:block}.sb-next--acknowledging svg{animation:.36s cubic-bezier(.2,.8,.2,1) both sb-next-acknowledgement}.sb-next:hover:not(:disabled),.sb-next:focus-visible{background:var(--sb-theme-button-primary-hover-background,#080808)}.sb-next:active:not(:disabled){background:var(--sb-theme-button-primary-pressed-background,#080808);scale:.97}.sb-next:disabled,.sb-button:disabled{cursor:not-allowed}.sb-next:disabled{background:var(--sb-theme-button-primary-disabled-background,#08080873);color:var(--sb-theme-button-primary-disabled-foreground,#ffffff73)}.sb-sheet--thanks{padding:22px 20px}.sb-sheet-root--completing .sb-progress__fill{transition-duration:.5s}.sb-thanks{justify-items:center;gap:23px;display:grid}.sb-thanks__icon-shell{background:var(--sb-theme-completion-outer-background,#f0f0f0);opacity:0;width:120px;height:120px;animation:sb-completion-icon-shell .72s var(--sb-ease) .35s both;border-radius:50%;place-items:center;display:grid;position:relative;transform:translateY(46px)}.sb-thanks__icon-core{background:var(--sb-theme-completion-inner-background,#080808);width:66px;height:66px;color:var(--sb-theme-completion-glyph,#fff);animation:sb-completion-icon-core .72s var(--sb-ease) .35s both;border-radius:50%;place-items:center;display:grid;transform:scale(.72)}.sb-thanks__icon-core svg{width:35.44px;height:27.02px;display:block}.sb-thanks__copy{opacity:0;gap:8px;width:min(330px,100%);animation:.3s ease-in-out .89s both sb-completion-content-in;display:grid;transform:translateY(20px)}.sb-thanks__copy h2{max-width:313px;color:var(--sb-theme-content-heading,var(--sb-text));letter-spacing:-.6px;text-align:center;margin:0 auto;font-size:30px;font-weight:600;line-height:1.1}.sb-thanks__copy p{max-width:292px;color:var(--sb-theme-content-body,var(--sb-text-muted));text-align:center;margin:0 auto;font-size:14px;font-weight:400;line-height:1.5}.sb-thanks__actions{opacity:0;gap:10px;width:100%;animation:.3s ease-in-out .89s both sb-completion-content-in;display:flex;transform:translateY(20px)}.sb-button{flex:1 1 0;min-width:0;padding:0 16px;font-size:14px;font-weight:600;line-height:1}.sb-button--primary{background:var(--sb-theme-button-primary-background,#080808);color:var(--sb-theme-button-primary-foreground,#fff)}.sb-button--secondary{background:var(--sb-theme-button-secondary-background,#f2f2f2);color:var(--sb-theme-button-secondary-foreground,var(--sb-text))}.sb-button--tertiary{background:var(--sb-theme-button-tertiary-background,transparent);color:var(--sb-theme-button-tertiary-foreground,var(--sb-text))}.sb-button--primary:hover:not(:disabled),.sb-button--primary:focus-visible{background:var(--sb-theme-button-primary-hover-background,#080808)}.sb-button--secondary:hover:not(:disabled),.sb-button--secondary:focus-visible{background:var(--sb-theme-button-secondary-hover-background,#f2f2f2)}.sb-button--tertiary:hover:not(:disabled),.sb-button--tertiary:focus-visible{background:var(--sb-theme-button-tertiary-hover-background,#f2f2f2)}.sb-button--primary:active:not(:disabled){background:var(--sb-theme-button-primary-pressed-background,#080808)}.sb-button--secondary:active:not(:disabled){background:var(--sb-theme-button-secondary-pressed-background,#e2e2e2)}.sb-button--tertiary:active:not(:disabled){background:var(--sb-theme-button-tertiary-pressed-background,#e2e2e2)}.sb-button--primary:disabled{background:var(--sb-theme-button-primary-disabled-background,#08080873);color:var(--sb-theme-button-primary-disabled-foreground,#ffffff73)}.sb-button--secondary:disabled{background:var(--sb-theme-button-secondary-disabled-background,#f2f2f273);color:var(--sb-theme-button-secondary-disabled-foreground,#08080873)}.sb-button--tertiary:disabled{background:var(--sb-theme-button-tertiary-disabled-background,#f2f2f273);color:var(--sb-theme-button-tertiary-disabled-foreground,#08080873)}.sb-fab:focus-visible,.sb-next:focus-visible,.sb-button:focus-visible,.sb-choice:focus-visible,.sb-yesno:focus-visible,.sb-sheet__close:focus-visible,.sb-sheet-root__overlay:focus-visible{outline-offset:2px;outline:2px solid #6366f1bf}.sb-preview--inline{place-items:center;min-height:540px;padding:24px;display:grid;position:relative;overflow:hidden}.sb-root--inline{place-items:center;width:100%;height:100%;min-height:1px;display:grid;position:relative}.sb-root--inline .sb-safe-area-probe{position:absolute}.sb-root--inline .sb-fab{position:absolute;bottom:auto;right:auto}.sb-root--inline .sb-sheet-root,.sb-preview--inline .sb-sheet-root{z-index:auto;position:absolute}.sb-root--inline .sb-sheet,.sb-preview--inline .sb-sheet{width:min(376px,100% - 24px);max-height:calc(100% - 24px)}.sb-fab.sb-fab--preview-inline{z-index:auto;position:relative;bottom:auto;right:auto}@keyframes sb-fab-enter-scale{0%{scale:0}to{scale:1}}@keyframes sb-fab-enter-width{0%{width:60px;translate:var(--sb-fab-anchor-offset) 0}to{width:var(--sb-fab-expanded-width);translate:0}}@keyframes sb-fab-label-in{0%{opacity:0}to{opacity:1}}@keyframes sb-fab-timer-in{0%{opacity:0}to{opacity:1}}@keyframes sb-fab-exit-width{0%{width:var(--sb-fab-exit-width,var(--sb-fab-expanded-width));translate:var(--sb-fab-exit-offset,0) 0}to{width:60px;translate:var(--sb-fab-anchor-offset) 0}}@keyframes sb-fab-label-out{0%{opacity:var(--sb-fab-exit-label-opacity,1)}to{opacity:0}}@keyframes sb-fab-badge-out{0%{scale:1}to{scale:0}}@keyframes sb-fab-exit-scale{0%{scale:var(--sb-fab-exit-scale,1)}to{scale:0}}@keyframes sb-fab-timer-bar{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@keyframes sb-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes sb-overlay-out{0%{opacity:1}to{opacity:0}}@keyframes sb-sheet-in{0%{opacity:0;transform:translate(-50%,28px)}to{opacity:1;transform:translate(-50%)}}@keyframes sb-sheet-out{0%{opacity:1;transform:translate(-50%)}to{opacity:0;transform:translate(-50%,calc(100% + 8px))}}@keyframes sb-progress-in{0%{width:0}to{width:var(--sb-progress-value,0%)}}@keyframes sb-step-in{0%{opacity:0}to{opacity:1}}@keyframes sb-sentiment-title-in{0%{opacity:0;scale:1.12}to{opacity:1;scale:1}}@keyframes sb-spark-in{0%{opacity:0;scale:.55}to{opacity:1;scale:1}}@keyframes sb-footer-comment-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes sb-next-acknowledgement{0%,to{rotate:0deg;scale:1}39%{rotate:-14deg;scale:1.18}}@keyframes sb-footer-comment-out{0%{opacity:1}to{opacity:0}}@keyframes sb-completion-icon-shell{0%{opacity:0;transform:translateY(46px)}58%{opacity:1;transform:translateY(46px)}to{opacity:1;transform:translateY(0)}}@keyframes sb-completion-icon-core{0%{transform:scale(.72)}58%{transform:scale(1.82)}to{transform:scale(1)}}@keyframes sb-completion-content-in{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){.sb-root *,.sb-root :before,.sb-root :after{scroll-behavior:auto!important;transition-duration:.001ms!important;animation-duration:.001ms!important;animation-delay:0s!important}.sb-sheet__answer-comment{animation:none!important}}
|
|
2
|
+
/*$vite$:1*/
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Canonical transport, pulse, theme, and survey-session types come from core. */
|
|
2
|
+
export type { AnsweredInteraction, ApiErrorDetail, ClientContext, CompletionActionStyle, CompletionActionType, CompletionIconType, CompletionType, DismissedInteraction, EventMetadata, EventRecord, Fab, FabOffset, FabPlacement, FabPoint, Interaction, Platform, Pulse, PulseAnswer, PulseCompletion, PulseCompletionAction, PulseQuestion, QuestionType, SidebandClientConfig, SidebandCoreConfig, ServiceUnavailableError, SyncErrorResponse, SyncOptions, SyncRequest, SyncResponse, TrackedEvent, TrackOptions, Theme, ThemeColor, TimerStyle, SurveyAnswerMap, SurveyAnswerValue, } from '@sidebandai/sideband-core';
|
|
3
|
+
export type SidebandConfig = import('@sidebandai/sideband-core').SidebandCoreConfig;
|
|
4
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/lib/types.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,WAAW,EACX,GAAG,EACH,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,KAAK,EACL,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,UAAU,EACV,UAAU,EACV,eAAe,EACf,iBAAiB,GAClB,MAAM,2BAA2B,CAAA;AAElC,MAAM,MAAM,cAAc,GAAG,OAAO,2BAA2B,EAAE,kBAAkB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sidebandai/sideband-react",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.4.1-rc.2",
|
|
4
|
+
"description": "React SDK for Sideband client sync surveys and prompts.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/SidebandAI/sideband-web.git",
|
|
9
|
+
"directory": "packages/react"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/SidebandAI/sideband-web/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/SidebandAI/sideband-web#readme",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"files": ["dist", "README.md", "LICENSE"],
|
|
17
|
+
"sideEffects": ["**/*.css"],
|
|
18
|
+
"main": "./dist/index.js",
|
|
19
|
+
"module": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/index.js",
|
|
25
|
+
"default": "./dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./preview": {
|
|
28
|
+
"types": "./dist/preview.d.ts",
|
|
29
|
+
"import": "./dist/preview.js",
|
|
30
|
+
"default": "./dist/preview.js"
|
|
31
|
+
},
|
|
32
|
+
"./style.css": {
|
|
33
|
+
"types": "./dist/style.css.d.ts",
|
|
34
|
+
"default": "./dist/style.css"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"react": "^19.0.0",
|
|
39
|
+
"react-dom": "^19.0.0"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@sidebandai/sideband-core": "1.4.1-rc.2"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "vite build --config ../../vite.react.config.ts && tsc -p tsconfig.lib.json && node ../../scripts/prepare-react-package.mjs",
|
|
46
|
+
"prepack": "npm run build"
|
|
47
|
+
}
|
|
48
|
+
}
|