@adminide-stack/clock-tik-browser 12.0.30 → 12.0.32
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/lib/pages/Home/HomePage.d.ts.map +1 -1
- package/lib/pages/Home/HomePage.js +1091 -325
- package/lib/pages/Home/HomePage.js.map +1 -1
- package/lib/pages/Home/__tests__/device.test.d.ts +2 -0
- package/lib/pages/Home/__tests__/device.test.d.ts.map +1 -0
- package/lib/pages/Home/__tests__/failure.test.d.ts +2 -0
- package/lib/pages/Home/__tests__/failure.test.d.ts.map +1 -0
- package/lib/pages/Home/__tests__/qr.test.d.ts +2 -0
- package/lib/pages/Home/__tests__/qr.test.d.ts.map +1 -0
- package/lib/pages/Home/__tests__/textLink.test.d.ts +2 -0
- package/lib/pages/Home/__tests__/textLink.test.d.ts.map +1 -0
- package/lib/pages/Home/__tests__/timeBack.test.d.ts +2 -0
- package/lib/pages/Home/__tests__/timeBack.test.d.ts.map +1 -0
- package/lib/pages/Home/assets.js +0 -2
- package/lib/pages/Home/assets.js.map +1 -1
- package/lib/pages/Home/chat/ChoresChat.d.ts +3 -1
- package/lib/pages/Home/chat/ChoresChat.d.ts.map +1 -1
- package/lib/pages/Home/chat/ChoresChat.js +212 -31
- package/lib/pages/Home/chat/ChoresChat.js.map +1 -1
- package/lib/pages/Home/chat/chatTheme.d.ts +2 -1
- package/lib/pages/Home/chat/chatTheme.d.ts.map +1 -1
- package/lib/pages/Home/chat/chatTheme.js +298 -15
- package/lib/pages/Home/chat/chatTheme.js.map +1 -1
- package/lib/pages/Home/chat/failure.d.ts +8 -0
- package/lib/pages/Home/chat/failure.d.ts.map +1 -0
- package/lib/pages/Home/chat/failure.js +24 -0
- package/lib/pages/Home/chat/failure.js.map +1 -0
- package/lib/pages/Home/chat/thread.d.ts +5 -0
- package/lib/pages/Home/chat/thread.d.ts.map +1 -1
- package/lib/pages/Home/chat/thread.js +24 -1
- package/lib/pages/Home/chat/thread.js.map +1 -1
- package/lib/pages/Home/content.d.ts +38 -16
- package/lib/pages/Home/content.d.ts.map +1 -1
- package/lib/pages/Home/content.js +79 -30
- package/lib/pages/Home/content.js.map +1 -1
- package/lib/pages/Home/homeStyles.d.ts +2 -0
- package/lib/pages/Home/homeStyles.d.ts.map +1 -1
- package/lib/pages/Home/homeStyles.js +1902 -491
- package/lib/pages/Home/homeStyles.js.map +1 -1
- package/lib/pages/Home/imessage/ImessageDialog.d.ts +14 -0
- package/lib/pages/Home/imessage/ImessageDialog.d.ts.map +1 -0
- package/lib/pages/Home/imessage/ImessageDialog.js +277 -0
- package/lib/pages/Home/imessage/ImessageDialog.js.map +1 -0
- package/lib/pages/Home/imessage/ImessageIcon.d.ts +5 -0
- package/lib/pages/Home/imessage/ImessageIcon.d.ts.map +1 -0
- package/lib/pages/Home/imessage/ImessageIcon.js +42 -0
- package/lib/pages/Home/imessage/ImessageIcon.js.map +1 -0
- package/lib/pages/Home/imessage/QrCode.d.ts +6 -0
- package/lib/pages/Home/imessage/QrCode.d.ts.map +1 -0
- package/lib/pages/Home/imessage/QrCode.js +86 -0
- package/lib/pages/Home/imessage/QrCode.js.map +1 -0
- package/lib/pages/Home/imessage/device.d.ts +31 -0
- package/lib/pages/Home/imessage/device.d.ts.map +1 -0
- package/lib/pages/Home/imessage/device.js +31 -0
- package/lib/pages/Home/imessage/device.js.map +1 -0
- package/lib/pages/Home/imessage/qr.d.ts +42 -0
- package/lib/pages/Home/imessage/qr.d.ts.map +1 -0
- package/lib/pages/Home/imessage/qr.js +469 -0
- package/lib/pages/Home/imessage/qr.js.map +1 -0
- package/lib/pages/Home/imessage/textLink.d.ts +70 -0
- package/lib/pages/Home/imessage/textLink.d.ts.map +1 -0
- package/lib/pages/Home/imessage/textLink.js +224 -0
- package/lib/pages/Home/imessage/textLink.js.map +1 -0
- package/lib/pages/Home/index.d.ts +15 -0
- package/lib/pages/Home/index.d.ts.map +1 -1
- package/lib/pages/Home/index.js +23 -28
- package/lib/pages/Home/index.js.map +1 -1
- package/lib/pages/Home/platform.d.ts +5 -0
- package/lib/pages/Home/platform.d.ts.map +1 -1
- package/lib/pages/Home/platform.js +8 -1
- package/lib/pages/Home/platform.js.map +1 -1
- package/lib/pages/Home/timeBack.d.ts +10 -0
- package/lib/pages/Home/timeBack.d.ts.map +1 -0
- package/lib/pages/Home/timeBack.js +12 -0
- package/lib/pages/Home/timeBack.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import {backendGraphqlUrl,fetchWithAuthRetry}from'@yantra/surface-kit/auth';/**
|
|
2
|
+
* "Text Lucy on iMessage": an `sms:` link that opens Messages at the platform's iMessage line with
|
|
3
|
+
* the first text ready to send. It is the line, and the way in, of the Yantra app's own iMessage
|
|
4
|
+
* onboarding (yantra-app pages/invite/hooks/useImessageOnboarding.ts) and of the fitness surface's
|
|
5
|
+
* "Text the coach" (yantra-surface fitness-subgraph-server textLink.ts); the agent answering there
|
|
6
|
+
* is the same Lucy this page's chat runs on.
|
|
7
|
+
*
|
|
8
|
+
* A phone the gateway has never seen cannot be told apart from a stranger, so its first text
|
|
9
|
+
* carries a one-time pairing code, hidden in the greeting as invisible characters: the person sees
|
|
10
|
+
* and sends "Hi Lucy", and the gateway links the phone to their account. A phone that already
|
|
11
|
+
* texts Lucy gets the plain greeting, and its thread stays where it is.
|
|
12
|
+
*
|
|
13
|
+
* Everything is asked of the Yantra backend with the visitor's own bearer (the token their sign-in
|
|
14
|
+
* brought back), so the platform decides what they may see. The line's addresses only ever live
|
|
15
|
+
* inside `href`: the page uses it as a link or a QR code and never prints it.
|
|
16
|
+
*/
|
|
17
|
+
class TextLinkError extends Error {
|
|
18
|
+
kind;
|
|
19
|
+
constructor(kind, message) {
|
|
20
|
+
super(message);
|
|
21
|
+
this.name = 'TextLinkError';
|
|
22
|
+
this.kind = kind;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** The gateway channel the iMessage line arrives on. SMS and RCS forwarded to the same Mac arrive on it too. */
|
|
26
|
+
const IMESSAGE_CHANNEL = 'imessage-webhook';
|
|
27
|
+
/** What the person sees ready in Messages, and sends. */
|
|
28
|
+
const LUCY_GREETING = 'Hi Lucy';
|
|
29
|
+
/** The longest first text the link carries; the chore itself can be the greeting. */
|
|
30
|
+
const MAX_MESSAGE = 300;
|
|
31
|
+
const TIMEOUT_MS = 8000;
|
|
32
|
+
/** The gateway's code lifetime (messenger-gateway pairing-service: 600 s). */
|
|
33
|
+
const CODE_TTL_MS = 10 * 60_000;
|
|
34
|
+
/** A minted code is reused until this close to its expiry: the gateway mints only five a minute. */
|
|
35
|
+
const REUSE_LEAD_MS = 2 * 60_000;
|
|
36
|
+
const ADDRESS_QUERY = `query ClockbookImessageLine { imessageBotAddress }`;
|
|
37
|
+
// Its own request: a backend that does not serve `smsBotNumber` fails this one alone, never the address.
|
|
38
|
+
const SMS_QUERY = `query ClockbookSmsLine { smsBotNumber }`;
|
|
39
|
+
const BINDINGS_QUERY = `query ClockbookTextBindings($chatSessionId: String) {
|
|
40
|
+
gatewayListBindings(chatSessionId: $chatSessionId) { channelType externalChatId externalAccountId }
|
|
41
|
+
}`;
|
|
42
|
+
const MINT_MUTATION = `mutation ClockbookPairingCode($input: GatewayPairingTokenInput!) {
|
|
43
|
+
gatewayGeneratePairingToken(input: $input) { token expiresAt }
|
|
44
|
+
}`;
|
|
45
|
+
/*
|
|
46
|
+
* The hidden code's wire format, shared with messenger-box messenger-gateway/server/src/pairing/
|
|
47
|
+
* hidden-token.ts, yantra-app features/channels/imessageAgentLink.ts and the fitness server (change
|
|
48
|
+
* them together): FRAME + four base-4 digits per byte of the token, high bits first, + FRAME. Every
|
|
49
|
+
* character is a Unicode default-ignorable, so Messages shows only the greeting. Tokens are
|
|
50
|
+
* base64url, so each character code is its byte.
|
|
51
|
+
*/
|
|
52
|
+
const HIDDEN_FRAME = '';
|
|
53
|
+
const HIDDEN_DIGITS = ['', '', '', ''];
|
|
54
|
+
function encodeHiddenCode(token) {
|
|
55
|
+
let out = HIDDEN_FRAME;
|
|
56
|
+
for (let i = 0; i < token.length; i += 1) {
|
|
57
|
+
const byte = token.charCodeAt(i) & 0xff;
|
|
58
|
+
for (let shift = 6; shift >= 0; shift -= 2) out += HIDDEN_DIGITS[byte >> shift & 3];
|
|
59
|
+
}
|
|
60
|
+
return out + HIDDEN_FRAME;
|
|
61
|
+
}
|
|
62
|
+
/** `?&body=` is the one form both iOS Messages and Android's messaging apps read the body from. */
|
|
63
|
+
function smsHref(address, body) {
|
|
64
|
+
return `sms:${address.trim()}?&body=${encodeURIComponent(body)}`;
|
|
65
|
+
}
|
|
66
|
+
/** The person's own one-on-one thread on the platform line: never a group chat, never a workspace's line. */
|
|
67
|
+
function ownThread(bindings) {
|
|
68
|
+
return bindings.find(b => b.channelType === IMESSAGE_CHANNEL && !String(b.externalChatId ?? '').includes(';+;') && !String(b.externalAccountId ?? '').startsWith('ws_'));
|
|
69
|
+
}
|
|
70
|
+
/** A linked thread keeps texting the way it is linked: texts the Mac's iPhone forwarded are SMS or RCS. */
|
|
71
|
+
function threadReach(thread) {
|
|
72
|
+
return /^(SMS|RCS);/i.test(thread.externalChatId ?? '') ? 'sms' : 'imessage';
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Where a text on `reach` goes. An iPhone can text a number too, so the number stands in when the
|
|
76
|
+
* handle is unknown; an Android phone cannot text an Apple ID, so nothing stands in for the number.
|
|
77
|
+
*/
|
|
78
|
+
function lineAddress(line, reach) {
|
|
79
|
+
if (reach === 'sms') return line.sms;
|
|
80
|
+
return line.imessage || line.sms;
|
|
81
|
+
}
|
|
82
|
+
/** The first text: the person's own words when they brought some, Lucy's greeting otherwise. */
|
|
83
|
+
function firstText(message) {
|
|
84
|
+
const text = (message ?? '').trim().slice(0, MAX_MESSAGE).trim();
|
|
85
|
+
return text || LUCY_GREETING;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The server stamps expiry with its own clock. A device running fast would see a fresh code as
|
|
89
|
+
* nearly dead (and mint again, into the rate limit); one running slow would keep a dead code up.
|
|
90
|
+
* So never trust less than a minute of a just-minted code, nor more than its lifetime.
|
|
91
|
+
*/
|
|
92
|
+
function normalizeExpiry(expiresAt, receivedAt) {
|
|
93
|
+
const at = typeof expiresAt === 'string' ? Number(expiresAt) : expiresAt;
|
|
94
|
+
const latest = receivedAt + CODE_TTL_MS;
|
|
95
|
+
if (typeof at !== 'number' || !Number.isFinite(at) || at - receivedAt < 60_000) return latest;
|
|
96
|
+
return Math.min(at, latest);
|
|
97
|
+
}
|
|
98
|
+
const RATE_LIMITED = /too many pairing|rate.?limit/i;
|
|
99
|
+
const SIGNED_OUT = /unauthori[sz]ed|unauthenticated|not authenticated|jwt|token (is )?(expired|invalid)|session expired/i;
|
|
100
|
+
function classifyError(message, code) {
|
|
101
|
+
if (RATE_LIMITED.test(message)) return new TextLinkError('rate-limited', message);
|
|
102
|
+
if (code === 'UNAUTHENTICATED' || SIGNED_OUT.test(message)) return new TextLinkError('signed-out', message);
|
|
103
|
+
return new TextLinkError('failed', message || 'The platform could not answer.');
|
|
104
|
+
}
|
|
105
|
+
async function ask(query, variables, signal) {
|
|
106
|
+
const url = backendGraphqlUrl();
|
|
107
|
+
if (!url) throw new TextLinkError('failed', 'This page has no Yantra backend to ask.');
|
|
108
|
+
const timeout = new AbortController();
|
|
109
|
+
const timer = setTimeout(() => timeout.abort(), TIMEOUT_MS);
|
|
110
|
+
const onAbort = () => timeout.abort();
|
|
111
|
+
signal?.addEventListener('abort', onAbort);
|
|
112
|
+
try {
|
|
113
|
+
const res = await fetchWithAuthRetry(url, auth => ({
|
|
114
|
+
method: 'POST',
|
|
115
|
+
credentials: 'include',
|
|
116
|
+
headers: {
|
|
117
|
+
'content-type': 'application/json',
|
|
118
|
+
...auth
|
|
119
|
+
},
|
|
120
|
+
body: JSON.stringify({
|
|
121
|
+
query,
|
|
122
|
+
variables
|
|
123
|
+
}),
|
|
124
|
+
signal: timeout.signal
|
|
125
|
+
}));
|
|
126
|
+
if (res.status === 401) throw new TextLinkError('signed-out', 'The sign-in was refused.');
|
|
127
|
+
const json = await res.json().catch(() => null);
|
|
128
|
+
const first = json?.errors?.[0];
|
|
129
|
+
if (first) throw classifyError(String(first.message ?? ''), first.extensions?.code);
|
|
130
|
+
if (!res.ok || !json?.data) throw new TextLinkError('failed', `The platform answered ${res.status}.`);
|
|
131
|
+
return json.data;
|
|
132
|
+
} finally {
|
|
133
|
+
clearTimeout(timer);
|
|
134
|
+
signal?.removeEventListener('abort', onAbort);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/** A lookup that may come back empty; only a refused sign-in (or the caller giving up) gets through. */
|
|
138
|
+
function orElse(promise, fallback, signal) {
|
|
139
|
+
return promise.catch(err => {
|
|
140
|
+
if (signal?.aborted || err instanceof TextLinkError && err.kind === 'signed-out') throw err;
|
|
141
|
+
return fallback;
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/** A fresh conversation for the phone to bridge into, as the gateway starts one for /newchat. */
|
|
145
|
+
function newConversationId() {
|
|
146
|
+
const c = typeof crypto !== 'undefined' ? crypto : undefined;
|
|
147
|
+
if (c?.randomUUID) return c.randomUUID();
|
|
148
|
+
const bytes = new Uint8Array(16);
|
|
149
|
+
if (c?.getRandomValues) c.getRandomValues(bytes);else for (let i = 0; i < 16; i += 1) bytes[i] = Math.floor(Math.random() * 256);
|
|
150
|
+
bytes[6] = bytes[6] & 0x0f | 0x40;
|
|
151
|
+
bytes[8] = bytes[8] & 0x3f | 0x80;
|
|
152
|
+
const hex = Array.from(bytes, b => b.toString(16).padStart(2, '0')).join('');
|
|
153
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
154
|
+
}
|
|
155
|
+
/** Codes minted in this tab, per account: reopening the dialog, or switching phones, reuses one. */
|
|
156
|
+
const codes = new Map();
|
|
157
|
+
async function pairingCode(account, signal) {
|
|
158
|
+
const kept = codes.get(account);
|
|
159
|
+
if (kept && kept.expiresAt - Date.now() > REUSE_LEAD_MS) return kept;
|
|
160
|
+
const data = await ask(MINT_MUTATION,
|
|
161
|
+
// `chatSession` like every other pairing entry point: the phone bridges into this chat only.
|
|
162
|
+
{
|
|
163
|
+
input: {
|
|
164
|
+
channelType: IMESSAGE_CHANNEL,
|
|
165
|
+
chatSessionId: newConversationId(),
|
|
166
|
+
scope: 'chatSession'
|
|
167
|
+
}
|
|
168
|
+
}, signal);
|
|
169
|
+
const token = data.gatewayGeneratePairingToken?.token?.trim();
|
|
170
|
+
if (!token) throw new TextLinkError('failed', 'The platform did not mint a code.');
|
|
171
|
+
const code = {
|
|
172
|
+
token,
|
|
173
|
+
expiresAt: normalizeExpiry(data.gatewayGeneratePairingToken?.expiresAt, Date.now())
|
|
174
|
+
};
|
|
175
|
+
codes.set(account, code);
|
|
176
|
+
return code;
|
|
177
|
+
}
|
|
178
|
+
/** Forget every code minted here: called on sign-out, so the next person on this browser gets their own. */
|
|
179
|
+
function clearTextLinkCodes() {
|
|
180
|
+
codes.clear();
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* The link for a device that texts on `reach`. Throws a TextLinkError: `signed-out` when the
|
|
184
|
+
* platform refused the sign-in, `rate-limited` after too many codes in a minute, `failed` otherwise.
|
|
185
|
+
*/
|
|
186
|
+
async function fetchTextLink(reach, {
|
|
187
|
+
account,
|
|
188
|
+
message,
|
|
189
|
+
signal
|
|
190
|
+
}) {
|
|
191
|
+
const [imessage, sms, bindings] = await Promise.all([orElse(ask(ADDRESS_QUERY, undefined, signal).then(d => d.imessageBotAddress?.trim() || null), null, signal), orElse(ask(SMS_QUERY, undefined, signal).then(d => d.smsBotNumber?.trim() || null), null, signal), orElse(ask(BINDINGS_QUERY, {
|
|
192
|
+
chatSessionId: null
|
|
193
|
+
}, signal).then(d => d.gatewayListBindings ?? []), [], signal)]);
|
|
194
|
+
const thread = ownThread(bindings);
|
|
195
|
+
const route = thread ? threadReach(thread) : reach;
|
|
196
|
+
const address = lineAddress({
|
|
197
|
+
imessage,
|
|
198
|
+
sms
|
|
199
|
+
}, route);
|
|
200
|
+
const body = firstText(message);
|
|
201
|
+
const base = {
|
|
202
|
+
reach: route,
|
|
203
|
+
smsAvailable: Boolean(sms)
|
|
204
|
+
};
|
|
205
|
+
if (!address) return {
|
|
206
|
+
...base,
|
|
207
|
+
href: null,
|
|
208
|
+
linked: Boolean(thread),
|
|
209
|
+
expiresAt: null
|
|
210
|
+
};
|
|
211
|
+
if (thread) return {
|
|
212
|
+
...base,
|
|
213
|
+
href: smsHref(address, body),
|
|
214
|
+
linked: true,
|
|
215
|
+
expiresAt: null
|
|
216
|
+
};
|
|
217
|
+
const code = await pairingCode(account, signal);
|
|
218
|
+
return {
|
|
219
|
+
...base,
|
|
220
|
+
href: smsHref(address, body + encodeHiddenCode(code.token)),
|
|
221
|
+
linked: false,
|
|
222
|
+
expiresAt: code.expiresAt
|
|
223
|
+
};
|
|
224
|
+
}export{IMESSAGE_CHANNEL,LUCY_GREETING,TextLinkError,classifyError,clearTextLinkCodes,encodeHiddenCode,fetchTextLink,firstText,lineAddress,normalizeExpiry,ownThread,smsHref,threadReach};//# sourceMappingURL=textLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textLink.js","sources":["../../../../src/pages/Home/imessage/textLink.ts"],"sourcesContent":[null],"names":[],"mappings":"4EAAA;;;;;;;;;;;;;;;AAeG;AAqBG,MAAO,aAAc,SAAQ,KAAK,CAAA;AAC3B,EAAA,IAAA;aAEG,CAAA,IAAA,EAAuB,OAAiB,EAAA;SAC3C,CAAA,OAAQ,CAAA;AACb,IAAA,IAAA,CAAA,IAAK,GAAA,eAAO;AACZ,IAAA,IAAA,CAAA,IAAK,GAAA,IAAO;;AAEnB;AAED;AACO,MAAM,gBAAgB,GAAG;AAEhC;AACO,MAAM,aAAa,GAAG;AAE7B;AACA,MAAM,WAA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?: undefined;
|
|
13
|
+
crossOrigin?: undefined;
|
|
13
14
|
property?: undefined;
|
|
14
15
|
'script:ld+json'?: undefined;
|
|
15
16
|
} | {
|
|
@@ -19,6 +20,7 @@ export declare const meta: () => ({
|
|
|
19
20
|
tagName?: undefined;
|
|
20
21
|
rel?: undefined;
|
|
21
22
|
href?: undefined;
|
|
23
|
+
crossOrigin?: undefined;
|
|
22
24
|
property?: undefined;
|
|
23
25
|
'script:ld+json'?: undefined;
|
|
24
26
|
} | {
|
|
@@ -28,6 +30,17 @@ export declare const meta: () => ({
|
|
|
28
30
|
title?: undefined;
|
|
29
31
|
name?: undefined;
|
|
30
32
|
content?: undefined;
|
|
33
|
+
crossOrigin?: undefined;
|
|
34
|
+
property?: undefined;
|
|
35
|
+
'script:ld+json'?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
tagName: string;
|
|
38
|
+
rel: string;
|
|
39
|
+
href: string;
|
|
40
|
+
crossOrigin: string;
|
|
41
|
+
title?: undefined;
|
|
42
|
+
name?: undefined;
|
|
43
|
+
content?: undefined;
|
|
31
44
|
property?: undefined;
|
|
32
45
|
'script:ld+json'?: undefined;
|
|
33
46
|
} | {
|
|
@@ -38,6 +51,7 @@ export declare const meta: () => ({
|
|
|
38
51
|
tagName?: undefined;
|
|
39
52
|
rel?: undefined;
|
|
40
53
|
href?: undefined;
|
|
54
|
+
crossOrigin?: undefined;
|
|
41
55
|
'script:ld+json'?: undefined;
|
|
42
56
|
} | {
|
|
43
57
|
'script:ld+json': {
|
|
@@ -121,6 +135,7 @@ export declare const meta: () => ({
|
|
|
121
135
|
tagName?: undefined;
|
|
122
136
|
rel?: undefined;
|
|
123
137
|
href?: undefined;
|
|
138
|
+
crossOrigin?: undefined;
|
|
124
139
|
property?: undefined;
|
|
125
140
|
})[];
|
|
126
141
|
export default HomePage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pages/Home/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,QAAQ,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pages/Home/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,QAAQ,MAAM,YAAY,CAAC;AAqBlC,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoGhB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
package/lib/pages/Home/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import HomePage from'./HomePage.js';import {HOME_ASSETS}from'./assets.js';import {config}from'../../config/env-config.js';import {robotsContent}from'../../seo/pageMeta.js';import {SITE}from'../../seo/site.js';/**
|
|
1
|
+
import HomePage from'./HomePage.js';import {HOME_ASSETS}from'./assets.js';import {FAQS}from'./content.js';import {HOME_FONTS_HREF}from'./homeStyles.js';import {config}from'../../config/env-config.js';import {robotsContent}from'../../seo/pageMeta.js';import {SITE}from'../../seo/site.js';/**
|
|
2
2
|
* clockbook.com's home page (the `/` route, outside the /business layout). Rendered on the server,
|
|
3
3
|
* so search engines and link previews read the page itself; the chat loads in the browser.
|
|
4
4
|
*/
|
|
@@ -30,7 +30,7 @@ const meta = () => {
|
|
|
30
30
|
content: robotsContent()
|
|
31
31
|
}, {
|
|
32
32
|
name: 'theme-color',
|
|
33
|
-
content: '#
|
|
33
|
+
content: '#FFFAF5'
|
|
34
34
|
}, {
|
|
35
35
|
name: 'color-scheme',
|
|
36
36
|
content: 'light'
|
|
@@ -38,6 +38,21 @@ const meta = () => {
|
|
|
38
38
|
tagName: 'link',
|
|
39
39
|
rel: 'canonical',
|
|
40
40
|
href: home
|
|
41
|
+
},
|
|
42
|
+
// The page's two typefaces (homeStyles.tsx); text shows in the fallbacks until they land.
|
|
43
|
+
{
|
|
44
|
+
tagName: 'link',
|
|
45
|
+
rel: 'preconnect',
|
|
46
|
+
href: 'https://fonts.googleapis.com'
|
|
47
|
+
}, {
|
|
48
|
+
tagName: 'link',
|
|
49
|
+
rel: 'preconnect',
|
|
50
|
+
href: 'https://fonts.gstatic.com',
|
|
51
|
+
crossOrigin: 'anonymous'
|
|
52
|
+
}, {
|
|
53
|
+
tagName: 'link',
|
|
54
|
+
rel: 'stylesheet',
|
|
55
|
+
href: HOME_FONTS_HREF
|
|
41
56
|
}, {
|
|
42
57
|
property: 'og:type',
|
|
43
58
|
content: 'website'
|
|
@@ -114,41 +129,21 @@ const meta = () => {
|
|
|
114
129
|
operatingSystem: 'Web, iOS, Android',
|
|
115
130
|
url: home,
|
|
116
131
|
description: 'An AI assistant that saves time on household life admin: phone calls to customer service, scheduling calls and appointments, bills, cancellations, household service quotes, shopping and travel.',
|
|
117
|
-
featureList: ['Calls customer service for you, works the phone menu and waits on hold', 'Schedules calls and appointments on your calendar', 'Cancels subscriptions and memberships', 'Lowers bills and disputes charges', 'Gets quotes from local household service pros', 'Compares prices and plans groceries', 'Books appointments and travel'],
|
|
132
|
+
featureList: ['Text it from iMessage on iPhone, iPad or Mac', 'Calls customer service for you, works the phone menu and waits on hold', 'Schedules calls and appointments on your calendar', 'Cancels subscriptions and memberships', 'Lowers bills and disputes charges', 'Gets quotes from local household service pros', 'Compares prices and plans groceries', 'Books appointments and travel'],
|
|
118
133
|
publisher: {
|
|
119
134
|
'@id': `${site}/#organization`
|
|
120
135
|
}
|
|
121
136
|
}, {
|
|
137
|
+
// The questions the page shows (content.ts FAQS), word for word.
|
|
122
138
|
'@type': 'FAQPage',
|
|
123
|
-
mainEntity:
|
|
124
|
-
'@type': 'Question',
|
|
125
|
-
name: 'How much time does Clockbook save?',
|
|
126
|
-
acceptedAnswer: {
|
|
127
|
-
'@type': 'Answer',
|
|
128
|
-
text: 'About 38 minutes a day, roughly 4.4 hours a week, as an illustrative estimate based on the U.S. BLS American Time Use Survey 2025. Results vary by household.'
|
|
129
|
-
}
|
|
130
|
-
}, {
|
|
131
|
-
'@type': 'Question',
|
|
132
|
-
name: 'What can I hand over to Clockbook?',
|
|
133
|
-
acceptedAnswer: {
|
|
134
|
-
'@type': 'Answer',
|
|
135
|
-
text: 'Life admin: calls to customer care, scheduling calls and appointments, bills and fees, cancellations, subscriptions, household service quotes, groceries and shopping, family logistics and travel refunds or rebookings.'
|
|
136
|
-
}
|
|
137
|
-
}, {
|
|
138
|
-
'@type': 'Question',
|
|
139
|
-
name: 'Can Clockbook call a company for me?',
|
|
140
|
-
acceptedAnswer: {
|
|
141
|
-
'@type': 'Answer',
|
|
142
|
-
text: 'Yes. Clockbook makes the call, works the phone menu, waits on hold and talks to a real person. When the company needs to hear from you, it rings you in.'
|
|
143
|
-
}
|
|
144
|
-
}, {
|
|
139
|
+
mainEntity: FAQS.map(f => ({
|
|
145
140
|
'@type': 'Question',
|
|
146
|
-
name:
|
|
141
|
+
name: f.q,
|
|
147
142
|
acceptedAnswer: {
|
|
148
143
|
'@type': 'Answer',
|
|
149
|
-
text:
|
|
144
|
+
text: f.a
|
|
150
145
|
}
|
|
151
|
-
}
|
|
146
|
+
}))
|
|
152
147
|
}]
|
|
153
148
|
}
|
|
154
149
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/pages/Home/index.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/pages/Home/index.tsx"],"sourcesContent":[null],"names":[],"mappings":"+RAAA;;;AAGG;AASH,MAAM,KAAK,GAAG,kFAAkF;AAChG,MAAM,WAAW,GACb,iMAAiM;AACrM,MAAM,YAAY,GAAG,mCAAmC;AACxD,MAAM,kBAAkB,GACpB,gIAAgI;AACpI,MAAM,SAAS,GAAG,wDAAwD;AAE1E;AACA,SAAS,OAAO,GAAA;AACZ,EAAA,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ACJ,IAAA,OAAA,EAAA;AACD,GAAA,EAAA;AACI,IAAA,QAAA,EAAA,QAAA;;AAEA,GAAA,EAAA;AACA,IAAA,QAAA,EAAA,UAAA;AACA,IAAA,OAAA,EAAA;AACA,GAAA,EAAA;AACH,IAAA,QAAA,EAAA,gBAAA;AACD,IAAA,OAAA,EAAA;AACI,GAAA,EAAA;AACA,IAAA,QAAA,EAAA,iBAAiB;AACjB,IAAA,OAAA,EAAA;AACA,GAAA,EAAA;AACA,IAAA,QAAA,EAAA;AACA,IAAA,OAAA,EAAA;AAEA,GAAA,EAAA;;;;;;;;;AASC,GAAA,EAAA;AACD,IAAA,IAAA,EAAA,qBAAA;AACH,IAAA,OAAA,EAAA;AACD,GAAA,EAAA;yBACqE;AACjE,IAAA,OAAA,EAAA;;AAEI,IAAA,IAAA,EAAA,mBAAA;;;AAGH,IAAA,gBAAA,EAAA;AACJ,MAAA,UAAA,EAAA,oBAAA;AACJ,MAAA,QAAA,EAAA,CAAA;AACJ,QAAA,OAAA,EAAA,cAAA;AACJ,QAAA,KAAA,EAAA,CAAA,EAAA,IAAA,CAAA,cAAA,CAAA;QACH,IAAA,EAAA,WAAA;AACN,QAAE,GAAA,EAAA,IAAA;AAEF,QAAA,iBAAwB,CAAA,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
export declare function yantraAppUrl(): string;
|
|
3
3
|
/** Point the kit at this environment's Yantra app. Browser only; safe to call more than once. */
|
|
4
4
|
export declare function ensurePlatformAnchor(): void;
|
|
5
|
+
/**
|
|
6
|
+
* Last resort for "Text Lucy on iMessage" when the page cannot sign anyone in: the app's public
|
|
7
|
+
* texting onboarding, which signs them in and opens Messages the same way.
|
|
8
|
+
*/
|
|
9
|
+
export declare function appTextingLink(): string;
|
|
5
10
|
/** Last resort when the page cannot sign anyone in: the app's own chat, the chore pre-typed. */
|
|
6
11
|
export declare function appChatLink(chore: string): string;
|
|
7
12
|
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../src/pages/Home/platform.ts"],"names":[],"mappings":"AAWA,gFAAgF;AAChF,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,iGAAiG;AACjG,wBAAgB,oBAAoB,IAAI,IAAI,CAG3C;AAED,gGAAgG;AAChG,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKjD"}
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../src/pages/Home/platform.ts"],"names":[],"mappings":"AAWA,gFAAgF;AAChF,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,iGAAiG;AACjG,wBAAgB,oBAAoB,IAAI,IAAI,CAG3C;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,gGAAgG;AAChG,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKjD"}
|
|
@@ -14,10 +14,17 @@ function ensurePlatformAnchor() {
|
|
|
14
14
|
if (anchored || typeof window === 'undefined') return;
|
|
15
15
|
anchored = anchorPlatformTo(yantraAppUrl());
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Last resort for "Text Lucy on iMessage" when the page cannot sign anyone in: the app's public
|
|
19
|
+
* texting onboarding, which signs them in and opens Messages the same way.
|
|
20
|
+
*/
|
|
21
|
+
function appTextingLink() {
|
|
22
|
+
return new URL('/onboarding', yantraAppUrl()).toString();
|
|
23
|
+
}
|
|
17
24
|
/** Last resort when the page cannot sign anyone in: the app's own chat, the chore pre-typed. */
|
|
18
25
|
function appChatLink(chore) {
|
|
19
26
|
const url = new URL('/new', yantraAppUrl());
|
|
20
27
|
const q = chore.trim().slice(0, 500).trim();
|
|
21
28
|
if (q) url.searchParams.set('q', q);
|
|
22
29
|
return url.toString();
|
|
23
|
-
}export{appChatLink,ensurePlatformAnchor,yantraAppUrl};//# sourceMappingURL=platform.js.map
|
|
30
|
+
}export{appChatLink,appTextingLink,ensurePlatformAnchor,yantraAppUrl};//# sourceMappingURL=platform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sources":["../../../src/pages/Home/platform.ts"],"sourcesContent":[null],"names":[],"mappings":"wGAAA;;;;;AAKG;AAIH,IAAI,QAAQ,GAAG,KAAK;AAEpB;SACgB,YAAY,GAAA;AACxB,EAAA,OAAA,MAAa,CAAA,MAAO,CAAA,kBAAmB,oBAAA,CAAA,CAAoB,cAAU,EAAM,EAAE,CAAA;AACjF;AAEA;SACgB,oBAAoB,GAAA;AAChC,EAAA,IAAA,QAAY,IAAA,OAAW,MAAA,gBAAsB,EAAA;UAAS,GAAA,gBAAA,CAAA,YAAA,EAAA,CAAA;AACtD;AACJ;AAEgG,SAAA,WAAA,CAAA,KAAA,EAAA;AAChG,EAAM,MAAA,GAAA,GAAA,IAAqB,GAAA,CAAA,MAAC,EAAa,YAAA,EAAA,CAAA;QAC/B,CAAA,GAAA,KAAM,CAAA,IAAO,EAAC,MAAM,CAAE,CAAA,EAAA,GAAA,CAAA,CAAA,IAAA,EAAc;AAC1C,EAAA,IAAA,CAAA,EAAA,GAAU,CAAA,aAAY,GAAC,CAAA,GAAM,GAAG,CAAG;AACnC,EAAA,OAAK,GAAA,CAAA,QAAA,EAAA;"}
|
|
1
|
+
{"version":3,"file":"platform.js","sources":["../../../src/pages/Home/platform.ts"],"sourcesContent":[null],"names":[],"mappings":"wGAAA;;;;;AAKG;AAIH,IAAI,QAAQ,GAAG,KAAK;AAEpB;SACgB,YAAY,GAAA;AACxB,EAAA,OAAA,MAAa,CAAA,MAAO,CAAA,kBAAmB,oBAAA,CAAA,CAAoB,cAAU,EAAM,EAAE,CAAA;AACjF;AAEA;SACgB,oBAAoB,GAAA;AAChC,EAAA,IAAA,QAAY,IAAA,OAAW,MAAA,gBAAsB,EAAA;UAAS,GAAA,gBAAA,CAAA,YAAA,EAAA,CAAA;AACtD;AACJ;AAEA;;;AAGG,SAAA,cAAA,GAAA;AACH,EAAA,cAAgB,CAAc,aAAA,EAAA,YAAA,EAAA,CAAA,CAAA,QAAA,EAAA;;AAE9B;AAEgG,SAAA,WAAA,CAAA,KAAA,EAAA;AAChG,EAAM,MAAA,GAAA,GAAA,IAAqB,GAAA,CAAA,MAAC,EAAa,YAAA,EAAA,CAAA;QAC/B,CAAA,GAAA,KAAM,CAAA,IAAO,EAAC,MAAM,CAAE,CAAA,EAAA,GAAA,CAAA,CAAA,IAAA,EAAc;AAC1C,EAAA,IAAA,CAAA,EAAA,GAAU,CAAA,aAAY,GAAC,CAAA,GAAM,GAAG,CAAG;AACnC,EAAA,OAAK,GAAA,CAAA,QAAA,EAAA;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minutes a day handed over, as time back: hours a week to a tenth, then a year of those weeks.
|
|
3
|
+
* It is the page's own arithmetic, so the whole of MINUTES (38 a day) comes to the 4.4 hours a
|
|
4
|
+
* week and 229 hours a year that the time card and the FAQ say.
|
|
5
|
+
*/
|
|
6
|
+
export declare function timeBack(minPerDay: number): {
|
|
7
|
+
week: number;
|
|
8
|
+
year: number;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=timeBack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeBack.d.ts","sourceRoot":"","sources":["../../../src/pages/Home/timeBack.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAG1E"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minutes a day handed over, as time back: hours a week to a tenth, then a year of those weeks.
|
|
3
|
+
* It is the page's own arithmetic, so the whole of MINUTES (38 a day) comes to the 4.4 hours a
|
|
4
|
+
* week and 229 hours a year that the time card and the FAQ say.
|
|
5
|
+
*/
|
|
6
|
+
function timeBack(minPerDay) {
|
|
7
|
+
const week = Math.round(minPerDay * 7 / 6) / 10;
|
|
8
|
+
return {
|
|
9
|
+
week,
|
|
10
|
+
year: Math.round(week * 52)
|
|
11
|
+
};
|
|
12
|
+
}export{timeBack};//# sourceMappingURL=timeBack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeBack.js","sources":["../../../src/pages/Home/timeBack.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;AAIG;AACG,SAAU,QAAQ,CAAC,SAAiB,EAAA;AACtC,EAAA,MAAA,OAAa,IAAA,CAAA,KAAK,CAAA,SAAO,GAAS,CAAG,GAAC,CAAC,CAAG,GAAC,EAAC;AAC5C,EAAA,OAAA;AACJ,IAAC,IAAA;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminide-stack/clock-tik-browser",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.32",
|
|
4
4
|
"description": "Sample core for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"typescript": {
|
|
72
72
|
"definition": "lib/index.d.ts"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "89bff913d1ebe2ef4f4296f1ca70522fad2b37ee"
|
|
75
75
|
}
|