@joinskips/brand 9.0.0-develop.147 → 9.0.0-develop.149
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/chat/chat/SkipsChat.d.ts +36 -0
- package/chat/chat/SkipsChat.js +98 -0
- package/chat/chat/client.d.ts +48 -0
- package/chat/chat/client.js +173 -0
- package/chat/chat/connection.d.ts +4 -0
- package/chat/chat/connection.js +6 -0
- package/chat/chat/generated/skips-app/index.d.ts +1 -0
- package/chat/chat/generated/skips-app/index.js +2 -0
- package/chat/chat/generated/skips-app/types.gen.d.ts +733 -0
- package/chat/chat/generated/skips-app/types.gen.js +2 -0
- package/chat/chat/index.d.ts +3 -0
- package/chat/chat/index.js +2 -0
- package/chat/chat/platform.d.ts +4 -0
- package/chat/chat/platform.js +46 -0
- package/chat/chat/session.d.ts +19 -0
- package/chat/chat/session.js +95 -0
- package/chat/chat/useSkipsChat.d.ts +78 -0
- package/chat/chat/useSkipsChat.js +498 -0
- package/chat/chat/verify.d.ts +35 -0
- package/chat/chat/verify.js +84 -0
- package/chat/helpers/cable.d.ts +34 -0
- package/chat/helpers/cable.js +88 -0
- package/chat/helpers/cableFrames.d.ts +40 -0
- package/chat/helpers/cableFrames.js +70 -0
- package/chat/helpers/index.d.ts +4 -1
- package/chat/helpers/index.js +4 -1
- package/chat/helpers/message.d.ts +1 -1
- package/chat/helpers/skipsMessage.d.ts +52 -0
- package/chat/helpers/skipsMessage.js +129 -0
- package/chat/helpers/thread.d.ts +12 -1
- package/chat/helpers/thread.js +16 -1
- package/chat/index.d.ts +1 -0
- package/chat/index.js +1 -0
- package/chat/ui/Conversation.d.ts +29 -3
- package/chat/ui/Conversation.js +37 -12
- package/chat/ui/index.d.ts +0 -1
- package/chat/ui/index.js +0 -1
- package/chat/ui/parts.d.ts +1 -1
- package/package.json +9 -1
- package/chat/ui/CheckIn.d.ts +0 -25
- package/chat/ui/CheckIn.js +0 -24
package/chat/ui/index.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ export { Conversation, type ConversationProps, type LoadState } from './Conversa
|
|
|
2
2
|
export { Bubble, type BubbleProps } from './Bubble.tsx';
|
|
3
3
|
export type { ChatIcon, ChatIconName, ChatWords } from './parts.ts';
|
|
4
4
|
export { Choices, CodeStep, EmailStep, NameStep, Pill, SkipTyping, WelcomeChoice, type PillProps, type WelcomeWords, } from './Welcome.tsx';
|
|
5
|
-
export { MedicationCheck, STOPPED_REASON_MAX_LENGTH, type CheckInWords, type MedicationAnswer, type MedicationCheckProps, } from './CheckIn.tsx';
|
package/chat/ui/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { Conversation } from "./Conversation.js";
|
|
2
2
|
export { Bubble } from "./Bubble.js";
|
|
3
3
|
export { Choices, CodeStep, EmailStep, NameStep, Pill, SkipTyping, WelcomeChoice, } from "./Welcome.js";
|
|
4
|
-
export { MedicationCheck, STOPPED_REASON_MAX_LENGTH, } from "./CheckIn.js";
|
package/chat/ui/parts.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
2
|
/** The icons the chat draws, from the brand's interface icons, which each app already draws. */
|
|
3
|
-
export type ChatIconName = 'attach' | 'arrow-right' | 'file' | 'close'
|
|
3
|
+
export type ChatIconName = 'attach' | 'arrow-right' | 'file' | 'close';
|
|
4
4
|
export interface ChatIconProps {
|
|
5
5
|
name: ChatIconName;
|
|
6
6
|
color: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@joinskips/brand",
|
|
3
|
-
"version": "9.0.0-develop.
|
|
3
|
+
"version": "9.0.0-develop.149",
|
|
4
4
|
"description": "Skips design tokens, Onest, logos, favicons, interface icons, member pictures and app icons.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://brand.joinskips.com",
|
|
@@ -25,6 +25,14 @@
|
|
|
25
25
|
"types": "./chat/helpers/index.d.ts",
|
|
26
26
|
"default": "./chat/helpers/index.js"
|
|
27
27
|
},
|
|
28
|
+
"./chat/chat": {
|
|
29
|
+
"types": "./chat/chat/index.d.ts",
|
|
30
|
+
"default": "./chat/chat/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./chat/connection": {
|
|
33
|
+
"types": "./chat/chat/connection.d.ts",
|
|
34
|
+
"default": "./chat/chat/connection.js"
|
|
35
|
+
},
|
|
28
36
|
"./ui": {
|
|
29
37
|
"types": "./ui/index.d.ts",
|
|
30
38
|
"default": "./ui/index.js"
|
package/chat/ui/CheckIn.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type ChatIcon } from './parts.ts';
|
|
2
|
-
/** What a person says about one of their current medications. */
|
|
3
|
-
export type MedicationAnswer = 'taking' | 'refill' | 'reorder' | 'stopped';
|
|
4
|
-
/** Every word the medication check-in shows, which the app passes in. */
|
|
5
|
-
export interface CheckInWords {
|
|
6
|
-
taking: string;
|
|
7
|
-
refill: string;
|
|
8
|
-
reorder: string;
|
|
9
|
-
stopped: string;
|
|
10
|
-
whyStopped: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const STOPPED_REASON_MAX_LENGTH = 500;
|
|
13
|
-
export interface MedicationCheckProps {
|
|
14
|
-
name: string;
|
|
15
|
-
directions: string;
|
|
16
|
-
refillable: boolean;
|
|
17
|
-
answer: MedicationAnswer | null;
|
|
18
|
-
reason: string;
|
|
19
|
-
words: CheckInWords;
|
|
20
|
-
Icon: ChatIcon;
|
|
21
|
-
onAnswer: (answer: MedicationAnswer) => void;
|
|
22
|
-
onReason: (reason: string) => void;
|
|
23
|
-
}
|
|
24
|
-
/** One current medication in the check-in: still taking, a refill or re-order, or stopped and why. */
|
|
25
|
-
export declare function MedicationCheck({ name, directions, refillable, answer, reason, words, Icon, onAnswer, onReason, }: MedicationCheckProps): import("react").JSX.Element;
|
package/chat/ui/CheckIn.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Pressable, Text, TextInput, View } from 'react-native';
|
|
3
|
-
import { useColor } from "./parts.js";
|
|
4
|
-
export const STOPPED_REASON_MAX_LENGTH = 500;
|
|
5
|
-
const ICONS = {
|
|
6
|
-
taking: 'thumbs-up',
|
|
7
|
-
refill: 'repeat',
|
|
8
|
-
reorder: 'copy-plus',
|
|
9
|
-
stopped: 'close',
|
|
10
|
-
};
|
|
11
|
-
const ICON_SIZE = 24;
|
|
12
|
-
/** One current medication in the check-in: still taking, a refill or re-order, or stopped and why. */
|
|
13
|
-
export function MedicationCheck({ name, directions, refillable, answer, reason, words, Icon, onAnswer, onReason, }) {
|
|
14
|
-
const ink = useColor('ink');
|
|
15
|
-
const accentInk = useColor('accent-ink');
|
|
16
|
-
const placeholder = useColor('ink-placeholder');
|
|
17
|
-
const answers = ['taking', refillable ? 'refill' : 'reorder', 'stopped'];
|
|
18
|
-
return (_jsxs(View, { className: "w-80 max-w-full gap-3.5 rounded-[20px] border border-line-subtle bg-surface p-4", children: [_jsxs(View, { className: "gap-0.5", children: [_jsx(Text, { className: "font-ui text-md font-semibold text-ink", children: name }), _jsx(Text, { className: "font-ui text-sm text-ink-secondary", children: directions })] }), _jsx(View, { role: "radiogroup", accessibilityLabel: name, className: "flex-row", children: answers.map((each) => {
|
|
19
|
-
const picked = answer === each;
|
|
20
|
-
return (_jsxs(Pressable, { role: "radio", "aria-checked": picked, accessibilityLabel: words[each], onPress: () => {
|
|
21
|
-
onAnswer(each);
|
|
22
|
-
}, className: "flex-1 items-center gap-1.5", children: [_jsx(View, { className: `h-[52px] w-[52px] items-center justify-center rounded-pill border ${picked ? 'border-accent bg-accent' : 'border-line-control bg-surface'}`, children: _jsx(Icon, { name: ICONS[each], color: picked ? accentInk : ink, size: ICON_SIZE }) }), _jsx(Text, { className: "text-center font-ui text-xs font-semibold text-ink", children: words[each] })] }, each));
|
|
23
|
-
}) }), answer === 'stopped' ? (_jsx(TextInput, { value: reason, onChangeText: onReason, accessibilityLabel: words.whyStopped, placeholder: words.whyStopped, placeholderTextColor: placeholder, multiline: true, maxLength: STOPPED_REASON_MAX_LENGTH, className: "min-h-20 rounded-control border border-line-control bg-surface px-3 py-2 font-ui text-md text-ink" })) : null] }));
|
|
24
|
-
}
|