@monimesl/dot-dash 0.1.0-alpha.4 → 0.1.0-alpha.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +839 -112
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +779 -91
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["HostError"],"sources":["../src/call.ts","../src/file/index.ts","../src/network/http.ts","../src/network/index.ts","../src/system/clipboard.ts","../src/system/delay.ts","../src/system/haptics.ts","../src/system/share.ts","../src/system/torch.ts","../src/system/index.ts","../src/ui/dialogs.ts","../src/ui/index.ts","../src/tracked.ts","../src/index.ts"],"sourcesContent":["import type { HostCallOptions, HostRequest } from '@monimesl/dot-core';\nimport { callHost } from '@monimesl/dot-core';\n\nimport type { DashMethod, DashMethods } from './methods';\n\nexport type CallOptions = HostCallOptions;\n\n// A Dash call in flight: await it for the result, or cancel it.\nexport type DashRequest<Result> = HostRequest<Result>;\n\nexport function call<Method extends DashMethod>(\n method: Method,\n params: DashMethods[Method]['params'],\n options: CallOptions = {},\n): DashRequest<DashMethods[Method]['result']> {\n return callHost(method, params, options);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\nimport type { DotFile } from '../files';\n\n// A dot's own files, in a folder no other dot sees. Paths are relative to it, such as\n// \"receipts/42.pdf\"; '' is the folder itself.\n\nexport interface FileEntry {\n name: string;\n path: string;\n size: number;\n kind: 'file' | 'folder';\n modifiedAt: number;\n contentType?: string;\n}\n\nexport type FileEncoding = 'text' | 'base64';\n\nexport interface StorageUsage {\n used: number;\n quota: number;\n}\n\nexport interface FileMethods {\n 'dash.file.read': { params: { path: string; as?: FileEncoding }; result: string };\n 'dash.file.write': {\n params: { path: string; data: string; as?: FileEncoding; append?: boolean };\n result: FileEntry;\n };\n 'dash.file.stat': { params: { path: string }; result: FileEntry | null };\n 'dash.file.list': { params: { path: string; recursive?: boolean }; result: FileEntry[] };\n 'dash.file.createFolder': { params: { path: string }; result: FileEntry };\n 'dash.file.move': {\n params: { from: string; to: string; overwrite?: boolean };\n result: FileEntry;\n };\n 'dash.file.copy': {\n params: { from: string; to: string; overwrite?: boolean };\n result: FileEntry;\n };\n 'dash.file.remove': { params: { path: string; recursive?: boolean }; result: void };\n 'dash.file.save': {\n params: { file: string; path: string; overwrite?: boolean };\n result: FileEntry;\n };\n 'dash.file.open': { params: { path: string }; result: DotFile };\n 'dash.file.usage': { params: Record<string, never>; result: StorageUsage };\n}\n\nexport interface ReadOptions {\n as?: FileEncoding;\n}\n\nexport interface WriteOptions {\n as?: FileEncoding;\n append?: boolean;\n}\n\nexport interface ReplaceOptions {\n overwrite?: boolean;\n}\n\n// Up to 5 MB.\nexport function read(\n path: string,\n options: ReadOptions = {},\n callOptions?: CallOptions,\n): DashRequest<string> {\n return call('dash.file.read', { path, ...options }, callOptions);\n}\n\n// Creates any missing folders above the file.\nexport function write(\n path: string,\n data: string,\n options: WriteOptions = {},\n callOptions?: CallOptions,\n): DashRequest<FileEntry> {\n return call('dash.file.write', { path, data, ...options }, callOptions);\n}\n\nexport function stat(path: string, callOptions?: CallOptions): DashRequest<FileEntry | null> {\n return call('dash.file.stat', { path }, callOptions);\n}\n\n// Sorted by path.\nexport function list(\n path = '',\n options: { recursive?: boolean } = {},\n callOptions?: CallOptions,\n): DashRequest<FileEntry[]> {\n return call('dash.file.list', { path, ...options }, callOptions);\n}\n\nexport function createFolder(path: string, callOptions?: CallOptions): DashRequest<FileEntry> {\n return call('dash.file.createFolder', { path }, callOptions);\n}\n\nexport function move(\n from: string,\n to: string,\n options: ReplaceOptions = {},\n callOptions?: CallOptions,\n): DashRequest<FileEntry> {\n return call('dash.file.move', { from, to, ...options }, callOptions);\n}\n\nexport function copy(\n from: string,\n to: string,\n options: ReplaceOptions = {},\n callOptions?: CallOptions,\n): DashRequest<FileEntry> {\n return call('dash.file.copy', { from, to, ...options }, callOptions);\n}\n\n// A folder with anything in it needs `recursive`.\nexport function remove(\n path: string,\n options: { recursive?: boolean } = {},\n callOptions?: CallOptions,\n): DashRequest<void> {\n return call('dash.file.remove', { path, ...options }, callOptions);\n}\n\n// Keeps a temporary file, such as a download.\nexport function save(\n file: DotFile | string,\n path: string,\n options: ReplaceOptions = {},\n callOptions?: CallOptions,\n): DashRequest<FileEntry> {\n const id = typeof file === 'string' ? file : file.id;\n return call('dash.file.save', { file: id, path, ...options }, callOptions);\n}\n\n// A stored file as a DotFile, to show with its `url` or send with `http.upload`.\nexport function open(path: string, callOptions?: CallOptions): DashRequest<DotFile> {\n return call('dash.file.open', { path }, callOptions);\n}\n\nexport function usage(callOptions?: CallOptions): DashRequest<StorageUsage> {\n return call('dash.file.usage', {}, callOptions);\n}\n","import { HostError, createHostRequest } from '@monimesl/dot-core';\n\nimport type { CallOptions, DashRequest } from '../call';\nimport type { DotFile } from '../files';\nimport { call } from '../call';\n\nexport type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';\n\nexport type HttpRequestBody = string | object;\n\nexport interface HttpRequest<Body extends HttpRequestBody = HttpRequestBody> {\n url: string;\n method?: HttpMethod;\n headers?: Record<string, string>;\n body?: Body;\n}\n\nexport interface HttpResponse<Body = string> {\n ok: boolean;\n status: number;\n statusText: string;\n headers: Record<string, string>;\n body: Body;\n}\n\n// A body of any type but string needs `as: 'json'`.\nexport type HttpReadOptions<Body> = [Body] extends [string] ? { as?: 'text' } : { as: 'json' };\n\nexport interface HttpDownloadRequest extends HttpRequest {\n name?: string;\n}\n\nexport type HttpDownloadResponse =\n | (Omit<HttpResponse, 'ok' | 'body'> & { ok: true; file: DotFile })\n | (Omit<HttpResponse, 'ok'> & { ok: false });\n\nexport interface HttpUploadFile {\n field: string;\n file: DotFile | string;\n name?: string;\n}\n\nexport interface HttpUploadRequest {\n url: string;\n // POST by default.\n method?: 'POST' | 'PUT' | 'PATCH';\n headers?: Record<string, string>;\n fields?: Record<string, string>;\n files: HttpUploadFile[];\n}\n\ntype WireRequest<Request extends HttpRequest> = Omit<Request, 'headers' | 'body'> & {\n headers?: Record<string, string> | undefined;\n body?: string | undefined;\n};\n\ntype ReadAs = 'text' | 'json';\n\nexport interface HttpMethods {\n 'dash.network.http.request': { params: WireRequest<HttpRequest>; result: HttpResponse };\n 'dash.network.http.download': {\n params: WireRequest<HttpDownloadRequest>;\n result: HttpDownloadResponse;\n };\n 'dash.network.http.upload': {\n params: Omit<HttpUploadRequest, 'files'> & {\n files: { field: string; file: string; name?: string }[];\n };\n result: HttpResponse;\n };\n}\n\n// Like fetch: resolves with any response, even a 404. An object body goes as JSON.\nexport function request<\n ResponseBody = string,\n RequestBody extends HttpRequestBody = HttpRequestBody,\n>(\n options: HttpRequest<RequestBody> & HttpReadOptions<ResponseBody>,\n callOptions?: CallOptions,\n): DashRequest<HttpResponse<ResponseBody>> {\n const { as, ...request } = options as HttpRequest & { as?: ReadAs };\n const response = call('dash.network.http.request', wireRequest(request, as), callOptions);\n return readBody(response, as);\n}\n\n// Saves a 2xx response's body, up to 100 MB, to a temporary file.\nexport function download(\n options: HttpDownloadRequest,\n callOptions?: CallOptions,\n): DashRequest<HttpDownloadResponse> {\n return call('dash.network.http.download', wireRequest(options), callOptions);\n}\n\n// Sends files the dot has as a multipart form.\nexport function upload<ResponseBody = string>(\n options: HttpUploadRequest & HttpReadOptions<ResponseBody>,\n callOptions?: CallOptions,\n): DashRequest<HttpResponse<ResponseBody>> {\n const { as, ...request } = options as HttpUploadRequest & { as?: ReadAs };\n const files = request.files.map(({ file, ...rest }) => ({\n ...rest,\n file: typeof file === 'string' ? file : file.id,\n }));\n const params = { ...request, files };\n if (as === 'json') {\n params.headers = withDefaultHeader(request.headers, 'Accept', 'application/json');\n }\n const response = call('dash.network.http.upload', params, callOptions);\n return readBody(response, as);\n}\n\nfunction wireRequest<Request extends HttpRequest>(\n request: Request,\n as?: ReadAs,\n): WireRequest<Request> {\n let headers = request.headers;\n let body: string | undefined;\n if (as === 'json') {\n headers = withDefaultHeader(headers, 'Accept', 'application/json');\n }\n if (typeof request.body === 'string') {\n body = request.body;\n } else if (request.body !== undefined) {\n headers = withDefaultHeader(headers, 'Content-Type', 'application/json');\n body = JSON.stringify(request.body);\n }\n return { ...request, headers, body };\n}\n\nfunction withDefaultHeader(\n headers: Record<string, string> | undefined,\n name: string,\n value: string,\n): Record<string, string> {\n const lowerName = name.toLowerCase();\n if (headers && Object.keys(headers).some((existing) => existing.toLowerCase() === lowerName)) {\n return headers;\n }\n return { ...headers, [name]: value };\n}\n\nfunction readBody<Body>(\n response: DashRequest<HttpResponse>,\n as: ReadAs | undefined,\n): DashRequest<HttpResponse<Body>> {\n if (as !== 'json') {\n return response as DashRequest<HttpResponse<Body>>;\n }\n const parsed = response.then((result) => ({ ...result, body: parseJson<Body>(result) }));\n return createHostRequest(parsed, () => response.cancel());\n}\n\nfunction parseJson<Body>({ status, statusText, body }: HttpResponse): Body {\n try {\n return JSON.parse(body) as Body;\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n throw new HostError('failed', `The response (${status} ${statusText}) isn't JSON: ${message}`);\n }\n}\n","import type { HttpMethods } from './http';\nimport * as http from './http';\n\nexport { http };\nexport type {\n HttpDownloadRequest,\n HttpDownloadResponse,\n HttpMethod,\n HttpReadOptions,\n HttpRequest,\n HttpRequestBody,\n HttpResponse,\n HttpUploadFile,\n HttpUploadRequest,\n} from './http';\n\nexport type NetworkMethods = HttpMethods;\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport interface ClipboardMethods {\n 'dash.system.copyText': { params: { text: string }; result: void };\n}\n\nexport function copyText(text: string, callOptions?: CallOptions): DashRequest<void> {\n return call('dash.system.copyText', { text }, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport interface DelayMethods {\n 'dash.system.delay': { params: { milliseconds: number }; result: void };\n}\n\n// Resolves after `milliseconds`, which the host counts, since the service has no timers.\nexport function delay(milliseconds: number, callOptions?: CallOptions): DashRequest<void> {\n return call('dash.system.delay', { milliseconds }, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport type VibrationStyle = 'light' | 'medium' | 'heavy' | 'success' | 'warning' | 'error';\n\nexport interface VibrateOptions {\n // Defaults to `medium`.\n style?: VibrationStyle | undefined;\n}\n\nexport interface HapticsMethods {\n 'dash.system.vibrate': { params: VibrateOptions; result: void };\n}\n\n// Plays a short vibration, and resolves once it has.\nexport function vibrate(\n options: VibrateOptions = {},\n callOptions?: CallOptions,\n): DashRequest<void> {\n return call('dash.system.vibrate', { style: options.style ?? 'medium' }, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\nimport type { DotFile } from '../files';\n\n// Give at least one of `text`, `url` and `file`.\nexport interface ShareOptions {\n // A subject, where the app shared to has one, such as an email.\n title?: string;\n text?: string;\n url?: string;\n file?: DotFile | string;\n}\n\nexport interface ShareMethods {\n 'dash.system.share': {\n params: { title?: string; text?: string; url?: string; file?: string };\n result: void;\n };\n}\n\n// Opens the device's share sheet, and resolves once it shows.\nexport function share(options: ShareOptions, callOptions?: CallOptions): DashRequest<void> {\n const { file, ...rest } = options;\n if (file === undefined) {\n return call('dash.system.share', rest, callOptions);\n }\n const id = typeof file === 'string' ? file : file.id;\n return call('dash.system.share', { ...rest, file: id }, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport type TorchState = 'on' | 'off';\n\nexport interface TorchMethods {\n 'dash.system.torch': { params: { state: TorchState }; result: void };\n}\n\n// Turns the torch on or off. Rejects with `unsupported` on a device without one.\nexport function torch(state: TorchState, callOptions?: CallOptions): DashRequest<void> {\n return call('dash.system.torch', { state }, callOptions);\n}\n","import type { ClipboardMethods } from './clipboard';\nimport type { DelayMethods } from './delay';\nimport type { HapticsMethods } from './haptics';\nimport type { ShareMethods } from './share';\nimport type { TorchMethods } from './torch';\n\nexport { copyText } from './clipboard';\nexport { delay } from './delay';\nexport { vibrate } from './haptics';\nexport { share } from './share';\nexport { torch } from './torch';\nexport type { VibrateOptions, VibrationStyle } from './haptics';\nexport type { ShareOptions } from './share';\nexport type { TorchState } from './torch';\n\nexport type SystemMethods = ClipboardMethods &\n DelayMethods &\n HapticsMethods &\n ShareMethods &\n TorchMethods;\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport interface AlertAction {\n id: string;\n label: string;\n // `cancel` dismisses the alert; `destructive` marks something that cannot be undone.\n role?: 'default' | 'cancel' | 'destructive' | undefined;\n}\n\nexport interface AlertOptions {\n title: string;\n message?: string | undefined;\n // Defaults to a single OK.\n actions?: AlertAction[] | undefined;\n}\n\nexport interface AlertResult {\n // The `id` of the action the user chose.\n action: string;\n}\n\nexport interface DialogMethods {\n 'dash.ui.alert': { params: AlertOptions; result: AlertResult };\n}\n\n// Shows a native alert, and resolves with the action the user chose.\nexport function alert(options: AlertOptions, callOptions?: CallOptions): DashRequest<AlertResult> {\n const actions = options.actions ?? [{ id: 'ok', label: 'OK' }];\n return call('dash.ui.alert', { ...options, actions }, callOptions);\n}\n","import type { DialogMethods } from './dialogs';\n\nexport { alert } from './dialogs';\nexport type { AlertAction, AlertOptions, AlertResult } from './dialogs';\n\nexport type UIMethods = DialogMethods;\n","import type { DashRequest } from './call';\n\n// A copy of `group`, such as `dash` itself, whose functions pass each request they start to\n// `track`.\nexport function tracked<Group extends object>(\n group: Group,\n track: (request: DashRequest<unknown>) => void,\n): Group {\n const copy: Record<string, unknown> = {};\n for (const [name, member] of Object.entries(group)) {\n if (typeof member === 'function') {\n const start = member as (...args: unknown[]) => DashRequest<unknown>;\n copy[name] = (...args: unknown[]) => {\n const request = start(...args);\n track(request);\n return request;\n };\n } else {\n copy[name] = tracked(member as object, track);\n }\n }\n return copy as Group;\n}\n","import * as file from './file';\nimport * as network from './network';\nimport * as system from './system';\nimport * as ui from './ui';\n\n// Dash's features for a dot's service, grouped by use: `dash.ui.alert(...)`, `dash.system.torch(...)`,\n// `dash.network.http.request(...)`.\nexport const dash = { ui, system, network, file };\n\nexport type Dash = typeof dash;\n\nexport { tracked } from './tracked';\n\nexport { HostError } from '@monimesl/dot-core';\nexport type { HostErrorCode } from '@monimesl/dot-core';\nexport type { CallOptions, DashRequest } from './call';\nexport type { DashMethod, DashMethods } from './methods';\nexport type {\n FileEncoding,\n FileEntry,\n FileMethods,\n ReadOptions,\n ReplaceOptions,\n StorageUsage,\n WriteOptions,\n} from './file';\nexport type { DotFile } from './files';\nexport type {\n HttpDownloadRequest,\n HttpDownloadResponse,\n HttpMethod,\n HttpReadOptions,\n HttpRequest,\n HttpRequestBody,\n HttpResponse,\n HttpUploadFile,\n HttpUploadRequest,\n NetworkMethods,\n} from './network';\nexport type {\n ShareOptions,\n SystemMethods,\n TorchState,\n VibrateOptions,\n VibrationStyle,\n} from './system';\nexport type { AlertAction, AlertOptions, AlertResult, UIMethods } from './ui';\n"],"mappings":";;;AAUA,SAAgB,KACd,QACA,QACA,UAAuB,CAAC,GACoB;CAC5C,OAAO,SAAS,QAAQ,QAAQ,OAAO;AACzC;;;;;;;;;;;;;;;;AC+CA,SAAgB,KACd,MACA,UAAuB,CAAC,GACxB,aACqB;CACrB,OAAO,KAAK,kBAAkB;EAAE;EAAM,GAAG;CAAQ,GAAG,WAAW;AACjE;AAGA,SAAgB,MACd,MACA,MACA,UAAwB,CAAC,GACzB,aACwB;CACxB,OAAO,KAAK,mBAAmB;EAAE;EAAM;EAAM,GAAG;CAAQ,GAAG,WAAW;AACxE;AAEA,SAAgB,KAAK,MAAc,aAA0D;CAC3F,OAAO,KAAK,kBAAkB,EAAE,KAAK,GAAG,WAAW;AACrD;AAGA,SAAgB,KACd,OAAO,IACP,UAAmC,CAAC,GACpC,aAC0B;CAC1B,OAAO,KAAK,kBAAkB;EAAE;EAAM,GAAG;CAAQ,GAAG,WAAW;AACjE;A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names":["request","get","get","set","remove","clear","remove"],"sources":["../src/api-versions.ts","../src/call.ts","../src/account/index.ts","../src/contacts/pick-phone.ts","../src/contacts/index.ts","../src/crypto/index.ts","../src/dot/index.ts","../src/media/pick-file.ts","../src/media/pick-photo.ts","../src/media/scan-code.ts","../src/media/index.ts","../src/network/http.ts","../src/network/status.ts","../src/network/index.ts","../src/payments/payments.ts","../src/payments/index.ts","../src/storage/cache.ts","../src/storage/file.ts","../src/storage/secret.ts","../src/storage/index.ts","../src/system/clipboard.ts","../src/system/delay.ts","../src/system/dial.ts","../src/system/haptics.ts","../src/system/info.ts","../src/system/open-url.ts","../src/system/screen.ts","../src/system/share.ts","../src/system/torch.ts","../src/system/index.ts","../src/ui/dialogs.ts","../src/ui/pickers.ts","../src/ui/index.ts","../src/utils/encoding.ts","../src/utils/index.ts","../src/tracked.ts","../src/errors.ts","../src/latest.ts","../src/index.ts"],"sourcesContent":["import { DEFAULT_DASH_API_VERSION, offersDashApiVersion } from '@monimesl/dot-core';\n\n// The newest Dash API version this library knows.\nexport const DASH_API_VERSION = '1.0';\n\n// The Dash API version each call came in, by its name in `dash`, such as \"system.dial\". A field\n// added to a call later gets its own row, such as \"ui.pickDate.title\". The `@since` tag on each call\n// says the same, and a test keeps the two in step.\nexport const DASH_API_SINCE = {\n 'account.signIn': '1.0',\n 'contacts.pickPhone': '1.0',\n 'crypto.hmac': '1.0',\n 'crypto.randomBytes': '1.0',\n 'crypto.randomUUID': '1.0',\n 'crypto.sha256': '1.0',\n 'crypto.sha512': '1.0',\n 'dot.close': '1.0',\n 'media.pickFile': '1.0',\n 'media.pickPhoto': '1.0',\n 'media.scanCode': '1.0',\n 'network.http.download': '1.0',\n 'network.http.request': '1.0',\n 'network.http.upload': '1.0',\n 'network.status': '1.0',\n 'payments.get': '1.0',\n 'payments.request': '1.0',\n 'storage.cache.clear': '1.0',\n 'storage.cache.exists': '1.0',\n 'storage.cache.get': '1.0',\n 'storage.cache.keys': '1.0',\n 'storage.cache.remove': '1.0',\n 'storage.cache.set': '1.0',\n 'storage.file.copy': '1.0',\n 'storage.file.createFolder': '1.0',\n 'storage.file.list': '1.0',\n 'storage.file.move': '1.0',\n 'storage.file.open': '1.0',\n 'storage.file.read': '1.0',\n 'storage.file.remove': '1.0',\n 'storage.file.save': '1.0',\n 'storage.file.stat': '1.0',\n 'storage.file.usage': '1.0',\n 'storage.file.write': '1.0',\n 'storage.secret.clear': '1.0',\n 'storage.secret.get': '1.0',\n 'storage.secret.remove': '1.0',\n 'storage.secret.set': '1.0',\n 'system.brightness': '1.0',\n 'system.copyText': '1.0',\n 'system.delay': '1.0',\n 'system.dial': '1.0',\n 'system.info': '1.0',\n 'system.keepAwake': '1.0',\n 'system.openUrl': '1.0',\n 'system.share': '1.0',\n 'system.torch': '1.0',\n 'system.vibrate': '1.0',\n 'ui.alert': '1.0',\n 'ui.pickDate': '1.0',\n 'ui.pickTime': '1.0',\n} as const satisfies Record<string, string>;\n\n// A call or field `dash.supports` can check, such as \"contacts.pickPhone\".\nexport type DashFeature = keyof typeof DASH_API_SINCE;\n\nlet hostApiVersions: readonly string[] = [DEFAULT_DASH_API_VERSION];\nlet dotMinApiVersion: string | undefined;\nconst checkedFeatures = new Set<string>();\nconst warnedFeatures = new Set<string>();\n\n// The service passes on the Dash API versions the host says it offers.\nexport function useHostDashApiVersions(versions: readonly string[]): void {\n hostApiVersions = versions;\n}\n\n// While developing, the service names the dot's minApiVersion, so calls newer than it are pointed out.\nexport function warnAboveDashApiVersion(minApiVersion: string | undefined): void {\n dotMinApiVersion = minApiVersion;\n}\n\n/**\n * Whether the Dash the dot runs in has `feature`: a call, such as \"contacts.pickPhone\", or a field\n * added to a call later. Check it before using one that's newer than the dot's minApiVersion.\n * @since 1.0\n */\nexport function supports(feature: DashFeature): boolean {\n checkedFeatures.add(feature);\n const since = sinceOf(feature);\n return since !== undefined && offersDashApiVersion(hostApiVersions, since);\n}\n\n// Warns once for each call, or field it sends, that's newer than the dot's minApiVersion, unless the\n// dot checked it with dash.supports first. Older Dash would answer `unsupported`.\nexport function warnIfNewerThanDot(method: string, params: unknown): void {\n if (dotMinApiVersion === undefined) {\n return;\n }\n const callName = method.replace(/^dash\\./, '');\n for (const feature of [callName, ...fieldsSent(callName, params)]) {\n const since = sinceOf(feature);\n if (since === undefined) {\n continue;\n }\n if (checkedFeatures.has(feature) || warnedFeatures.has(feature)) {\n continue;\n }\n if (offersDashApiVersion([dotMinApiVersion], since)) {\n continue;\n }\n warnedFeatures.add(feature);\n console.warn(\n `dash.${feature} came in Dash API ${since}, but this dot's minApiVersion is ${dotMinApiVersion}, ` +\n `so older Dash doesn't have it. Raise \"minApiVersion\" in dot.json, or check ` +\n `dash.supports('${feature}') first.`,\n );\n }\n}\n\nfunction sinceOf(feature: string): string | undefined {\n const table: Record<string, string> = DASH_API_SINCE;\n return Object.hasOwn(table, feature) ? table[feature] : undefined;\n}\n\n// \"ui.pickDate.title\" for a `title` sent to `dash.ui.pickDate`, when that field has its own row.\nfunction fieldsSent(callName: string, params: unknown): string[] {\n if (typeof params !== 'object' || params === null) {\n return [];\n }\n return Object.keys(params)\n .map((field) => `${callName}.${field}`)\n .filter((feature) => sinceOf(feature) !== undefined);\n}\n","import type { HostCallOptions, HostRequest } from '@monimesl/dot-core';\nimport { callHost } from '@monimesl/dot-core';\n\nimport { warnIfNewerThanDot } from './api-versions';\nimport type { DashMethod, DashMethods } from './methods';\n\nexport type CallOptions = HostCallOptions;\n\n// A running Dash call. Await it for the result, or cancel it.\nexport type DashRequest<Result> = HostRequest<Result>;\n\nexport function call<Method extends DashMethod>(\n method: Method,\n params: DashMethods[Method]['params'],\n options: CallOptions = {},\n): DashRequest<DashMethods[Method]['result']> {\n warnIfNewerThanDot(method, params);\n return callHost(method, params, options);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\n// How a dot signs the person in. `simple`: Dash says who the person is. `oidc`: OpenID Connect,\n// with an ID token the dot's server can check. `oidc` isn't ready yet, so it fails with `unsupported`.\nexport type SignInMode = 'simple' | 'oidc';\n\nexport interface SimpleSignInOptions {\n mode: 'simple';\n // Mixed into the token. The same nonce gives the same token, so leaving it out, or a fixed one,\n // names the person the same way each time in this dot, and a fresh one gives a token only for\n // this call. An empty nonce is the same as none.\n nonce?: string | undefined;\n}\n\nexport interface SimpleSignIn {\n fullName: string;\n // The phone number or email address the person uses Dash with, such as \"+232 76 123456\". It's the\n // phone number when the account has one.\n alias: string;\n // Monime makes it from the dot's id, the person and the nonce, with a key only Monime knows, so the\n // same person gets the same token on any phone. It names the person but proves nothing to the\n // dot's server: Dash hands it over as it is.\n accountIdToken: string;\n}\n\n// What the dot asks to see besides who the person is. Each needs the person's consent.\nexport type OidcScope = 'profile' | 'phone' | 'email';\n\nexport interface OidcSignInOptions {\n mode: 'oidc';\n scopes?: OidcScope[] | undefined;\n // Goes into the ID token. The dot's server should give a fresh one for each sign-in and check it.\n nonce?: string | undefined;\n}\n\n// Only what the person agreed to, by scope.\nexport interface OidcProfile {\n name?: string | undefined;\n givenName?: string | undefined;\n familyName?: string | undefined;\n phone?: string | undefined;\n email?: string | undefined;\n}\n\nexport interface OidcSignIn {\n // The person's id for this dot's publisher. The same in each of the publisher's dots.\n id: string;\n // A signed JWT the dot's server checks with Monime's keys before trusting `id`.\n idToken: string;\n // When `idToken` stops being valid, such as \"2026-10-24T10:05:00Z\".\n expiresAt: string;\n profile: OidcProfile;\n}\n\nexport interface AccountMethods {\n 'dash.account.signIn': {\n params: { mode: SignInMode; nonce: string; scopes?: OidcScope[] };\n result: SimpleSignIn | OidcSignIn;\n };\n}\n\n/**\n * Signs the person in to the dot with their Dash account. Needs the `account` permission.\n *\n * With `mode: 'simple'`, resolves with their full name, their phone number or email address, and a\n * token that names them in this dot. With `mode: 'oidc'`, OpenID Connect, it will resolve with an ID\n * token for the dot's server; until Dash has it, it rejects with `unsupported`.\n *\n * Rejects with `invalid` for a nonce longer than 128 characters, with `unsupported` for a mode this\n * Dash doesn't have, and with `failed` when no one is signed in or Dash can't reach Monime.\n * @since 1.0\n */\nexport function signIn(\n options: SimpleSignInOptions,\n callOptions?: CallOptions,\n): DashRequest<SimpleSignIn>;\nexport function signIn(\n options: OidcSignInOptions,\n callOptions?: CallOptions,\n): DashRequest<OidcSignIn>;\nexport function signIn(\n options: SimpleSignInOptions | OidcSignInOptions,\n callOptions?: CallOptions,\n): DashRequest<SimpleSignIn | OidcSignIn> {\n const params: AccountMethods['dash.account.signIn']['params'] = {\n mode: options.mode,\n nonce: options.nonce ?? '',\n };\n if (options.mode === 'oidc' && options.scopes) {\n params.scopes = options.scopes;\n }\n return call('dash.account.signIn', params, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport interface PickedContact {\n name: string;\n // As the contact has it, such as \"+232 76 123456\" or \"076 123456\".\n phone: string;\n}\n\nexport interface PickPhoneMethods {\n 'dash.contacts.pickPhone': { params: Record<string, never>; result: PickedContact };\n}\n\n/**\n * Shows the phone's contacts so the person chooses one phone number, such as who to send money to.\n * Needs the `contacts` permission. The dot sees only the chosen contact. Rejects with `cancelled` if\n * the person closes it.\n * @since 1.0\n */\nexport function pickPhone(callOptions?: CallOptions): DashRequest<PickedContact> {\n return call('dash.contacts.pickPhone', {}, callOptions);\n}\n","import type { PickPhoneMethods } from './pick-phone';\n\nexport { pickPhone } from './pick-phone';\nexport type { PickedContact } from './pick-phone';\n\nexport type ContactsMethods = PickPhoneMethods;\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\n// Text is read as UTF-8. Binary data, such as a file's contents, comes as base64.\nexport type CryptoInput = string | { base64: string };\n\n// Hex by default.\nexport interface CryptoOutputOptions {\n as?: 'hex' | 'base64';\n}\n\nexport type HmacAlgorithm = 'sha256' | 'sha512';\n\n// Named, since key and data take the same kinds of value and a swapped pair signs wrongly.\nexport interface HmacOptions extends CryptoOutputOptions {\n algorithm: HmacAlgorithm;\n key: CryptoInput;\n data: CryptoInput;\n}\n\ntype InputEncoding = 'text' | 'base64';\ntype OutputEncoding = 'hex' | 'base64';\n\ninterface WireInput {\n data: string;\n dataEncoding: InputEncoding;\n as: OutputEncoding;\n}\n\nexport interface CryptoMethods {\n 'dash.crypto.sha256': { params: WireInput; result: string };\n 'dash.crypto.sha512': { params: WireInput; result: string };\n 'dash.crypto.hmac': {\n params: WireInput & { algorithm: HmacAlgorithm; key: string; keyEncoding: InputEncoding };\n result: string;\n };\n 'dash.crypto.randomBytes': { params: { count: number; as: OutputEncoding }; result: string };\n 'dash.crypto.randomUUID': { params: Record<string, never>; result: string };\n}\n\n/** @since 1.0 */\nexport function sha256(\n data: CryptoInput,\n options: CryptoOutputOptions = {},\n callOptions?: CallOptions,\n): DashRequest<string> {\n return call('dash.crypto.sha256', wireInput(data, options), callOptions);\n}\n\n/** @since 1.0 */\nexport function sha512(\n data: CryptoInput,\n options: CryptoOutputOptions = {},\n callOptions?: CallOptions,\n): DashRequest<string> {\n return call('dash.crypto.sha512', wireInput(data, options), callOptions);\n}\n\n/**\n * Signs `data` with `key`, as HMAC-SHA256 or HMAC-SHA512, such as\n * `hmac({ algorithm: 'sha256', key, data })`.\n * @since 1.0\n */\nexport function hmac(options: HmacOptions, callOptions?: CallOptions): DashRequest<string> {\n const wireKey = valueAndEncoding(options.key);\n const params = {\n ...wireInput(options.data, options),\n algorithm: options.algorithm,\n key: wireKey.value,\n keyEncoding: wireKey.encoding,\n };\n return call('dash.crypto.hmac', params, callOptions);\n}\n\n/**\n * `count` secure random bytes, from 1 to 1024, such as for a nonce.\n * @since 1.0\n */\nexport function randomBytes(\n count: number,\n options: CryptoOutputOptions = {},\n callOptions?: CallOptions,\n): DashRequest<string> {\n return call('dash.crypto.randomBytes', { count, as: outputEncoding(options) }, callOptions);\n}\n\n/**\n * A random version 4 UUID, such as \"3f0e5c3a-6d1b-4c8e-9a2f-1b7d4e6a9c05\".\n * @since 1.0\n */\nexport function randomUUID(callOptions?: CallOptions): DashRequest<string> {\n return call('dash.crypto.randomUUID', {}, callOptions);\n}\n\nfunction wireInput(data: CryptoInput, options: CryptoOutputOptions): WireInput {\n const { value, encoding } = valueAndEncoding(data);\n return { data: value, dataEncoding: encoding, as: outputEncoding(options) };\n}\n\nfunction outputEncoding(options: CryptoOutputOptions): OutputEncoding {\n return options.as ?? 'hex';\n}\n\nfunction valueAndEncoding(input: CryptoInput): { value: string; encoding: InputEncoding } {\n if (typeof input === 'string') {\n return { value: input, encoding: 'text' };\n }\n return { value: input.base64, encoding: 'base64' };\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport interface DotMethods {\n 'dash.dot.close': { params: Record<string, never>; result: void };\n}\n\n/**\n * Closes the dot, as going back from its first page does. Calls still running are cancelled.\n * @since 1.0\n */\nexport function close(callOptions?: CallOptions): DashRequest<void> {\n return call('dash.dot.close', {}, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\nimport type { DotFile } from '../files';\n\nexport interface PickFileOptions {\n // Content types the person may choose, such as 'application/pdf' or 'image/*'. Any file without them.\n types?: string[];\n}\n\nexport interface PickFileMethods {\n 'dash.media.pickFile': { params: { types?: string[] }; result: DotFile };\n}\n\n/**\n * Lets the person choose a file from their phone, of at most 25 MB. Needs the `files` permission.\n * Rejects with `cancelled` if they close the picker, and with `invalid` for a larger file. Like a\n * download, it lasts until the dot closes, so `dash.storage.file.save` it to keep it.\n * @since 1.0\n */\nexport function pickFile(\n options: PickFileOptions = {},\n callOptions?: CallOptions,\n): DashRequest<DotFile> {\n const params: { types?: string[] } = {};\n if (options.types) {\n params.types = options.types;\n }\n return call('dash.media.pickFile', params, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\nimport type { DotFile } from '../files';\n\nexport type PhotoSource = 'library' | 'camera';\n\nexport interface PickPhotoOptions {\n // `library` needs the `photoLibrary` permission, and `camera` the `camera` permission.\n source: PhotoSource;\n}\n\nexport interface PickPhotoMethods {\n 'dash.media.pickPhoto': { params: { source: PhotoSource }; result: DotFile };\n}\n\n/**\n * Lets the person choose a photo or take one. Resolves with it as a JPEG of at most 2048 pixels on its\n * longest side, without its location or other details. Rejects with `cancelled` if they close the\n * picker, and with `unsupported` on a device without a camera. Save it with `dash.storage.file.save`\n * to keep it after the dot closes.\n * @since 1.0\n */\nexport function pickPhoto(\n options: PickPhotoOptions,\n callOptions?: CallOptions,\n): DashRequest<DotFile> {\n return call('dash.media.pickPhoto', { source: options.source }, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\n// Only QR codes for now. More formats can come later without changing what a dot gets.\nexport type CodeFormat = 'qr';\n\nexport interface ScannedCode {\n text: string;\n format: CodeFormat;\n}\n\nexport interface ScanCodeMethods {\n 'dash.media.scanCode': { params: Record<string, never>; result: ScannedCode };\n}\n\n/**\n * Opens Dash's scanner until it reads a QR code. Needs the `camera` permission. Rejects with\n * `cancelled` if the person closes it, and with `unsupported` where Dash has no scanner.\n * @since 1.0\n */\nexport function scanCode(callOptions?: CallOptions): DashRequest<ScannedCode> {\n return call('dash.media.scanCode', {}, callOptions);\n}\n","import type { PickFileMethods } from './pick-file';\nimport type { PickPhotoMethods } from './pick-photo';\nimport type { ScanCodeMethods } from './scan-code';\n\nexport { pickFile } from './pick-file';\nexport { pickPhoto } from './pick-photo';\nexport { scanCode } from './scan-code';\nexport type { PickFileOptions } from './pick-file';\nexport type { PhotoSource, PickPhotoOptions } from './pick-photo';\nexport type { CodeFormat, ScannedCode } from './scan-code';\n\nexport type MediaMethods = PickFileMethods & PickPhotoMethods & ScanCodeMethods;\n","import { createHostRequest, HostError } from '@monimesl/dot-core';\n\nimport type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\nimport type { DotFile } from '../files';\n\nexport type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';\n\nexport type HttpRequestBody = string | object;\n\nexport interface HttpRequest<Body extends HttpRequestBody = HttpRequestBody> {\n url: string;\n method?: HttpMethod;\n headers?: Record<string, string>;\n body?: Body;\n}\n\nexport interface HttpResponse<Body = string> {\n ok: boolean;\n status: number;\n statusText: string;\n // Names are lowercase, such as \"content-type\". A header sent more than once comes once, with its\n // values joined by \", \".\n headers: Record<string, string>;\n body: Body;\n}\n\n// Any body type other than string needs `as: 'json'`.\nexport type HttpReadOptions<Body> = [Body] extends [string] ? { as?: 'text' } : { as: 'json' };\n\nexport interface HttpDownloadRequest extends HttpRequest {\n name?: string;\n}\n\nexport type HttpDownloadResponse =\n | (Omit<HttpResponse, 'ok' | 'body'> & { ok: true; file: DotFile })\n | (Omit<HttpResponse, 'ok'> & { ok: false });\n\nexport interface HttpUploadFile {\n field: string;\n file: DotFile;\n name?: string;\n}\n\nexport interface HttpUploadRequest {\n url: string;\n // Defaults to POST.\n method?: 'POST' | 'PUT' | 'PATCH';\n headers?: Record<string, string>;\n fields?: Record<string, string>;\n files: HttpUploadFile[];\n}\n\ntype WireRequest<Request extends HttpRequest> = Omit<Request, 'headers' | 'body'> & {\n headers?: Record<string, string> | undefined;\n body?: string | undefined;\n};\n\ntype ReadAs = 'text' | 'json';\n\nexport interface HttpMethods {\n 'dash.network.http.request': { params: WireRequest<HttpRequest>; result: HttpResponse };\n 'dash.network.http.download': {\n params: WireRequest<HttpDownloadRequest>;\n result: HttpDownloadResponse;\n };\n 'dash.network.http.upload': {\n params: Omit<HttpUploadRequest, 'files'> & {\n files: { field: string; file: string; name?: string }[];\n };\n result: HttpResponse;\n };\n}\n\n/**\n * Like fetch, resolves with any response, even a 404. An object body is sent as JSON.\n * @since 1.0\n */\nexport function request<\n ResponseBody = string,\n RequestBody extends HttpRequestBody = HttpRequestBody,\n>(\n options: HttpRequest<RequestBody> & HttpReadOptions<ResponseBody>,\n callOptions?: CallOptions,\n): DashRequest<HttpResponse<ResponseBody>> {\n const { as: readAs, ...request } = options as HttpRequest & { as?: ReadAs };\n const response = call('dash.network.http.request', wireRequest(request, readAs), callOptions);\n return readBody(response, readAs);\n}\n\n/**\n * Saves a 2xx response's body, up to 256 MB, to a temporary file.\n * @since 1.0\n */\nexport function download(\n options: HttpDownloadRequest,\n callOptions?: CallOptions,\n): DashRequest<HttpDownloadResponse> {\n return call('dash.network.http.download', wireRequest(options), callOptions);\n}\n\n/**\n * Sends the dot's files as a multipart form.\n * @since 1.0\n */\nexport function upload<ResponseBody = string>(\n options: HttpUploadRequest & HttpReadOptions<ResponseBody>,\n callOptions?: CallOptions,\n): DashRequest<HttpResponse<ResponseBody>> {\n const { as: readAs, ...request } = options as HttpUploadRequest & { as?: ReadAs };\n const files = request.files.map((upload) => ({ ...upload, file: upload.file.id }));\n const params = { ...request, files };\n if (readAs === 'json') {\n params.headers = withDefaultHeader(request.headers, 'Accept', 'application/json');\n }\n const response = call('dash.network.http.upload', params, callOptions);\n return readBody(response, readAs);\n}\n\nfunction wireRequest<Request extends HttpRequest>(\n request: Request,\n readAs?: ReadAs,\n): WireRequest<Request> {\n let headers = request.headers;\n let body: string | undefined;\n if (readAs === 'json') {\n headers = withDefaultHeader(headers, 'Accept', 'application/json');\n }\n if (typeof request.body === 'string') {\n body = request.body;\n } else if (request.body !== undefined) {\n headers = withDefaultHeader(headers, 'Content-Type', 'application/json');\n body = JSON.stringify(request.body);\n }\n return { ...request, headers, body };\n}\n\nfunction withDefaultHeader(\n headers: Record<string, string> | undefined,\n name: string,\n value: string,\n): Record<string, string> {\n if (headers === undefined) {\n return { [name]: value };\n }\n const lowerName = name.toLowerCase();\n const alreadySet = Object.keys(headers).some((existing) => existing.toLowerCase() === lowerName);\n if (alreadySet) {\n return headers;\n }\n return { ...headers, [name]: value };\n}\n\nfunction readBody<Body>(\n response: DashRequest<HttpResponse>,\n readAs: ReadAs | undefined,\n): DashRequest<HttpResponse<Body>> {\n if (readAs !== 'json') {\n return response as DashRequest<HttpResponse<Body>>;\n }\n const parsed = response.then((result) => ({ ...result, body: parseJson<Body>(result) }));\n return createHostRequest(parsed, () => response.cancel());\n}\n\nfunction parseJson<Body>({ status, statusText, body }: HttpResponse): Body {\n try {\n return JSON.parse(body) as Body;\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n throw new HostError('failed', `The response (${status} ${statusText}) isn't JSON: ${message}`);\n }\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport type ConnectionType = 'wifi' | 'cellular' | 'other' | 'none';\n\nexport interface NetworkStatus {\n online: boolean;\n type: ConnectionType;\n}\n\nexport interface StatusMethods {\n 'dash.network.status': { params: Record<string, never>; result: NetworkStatus };\n}\n\n/**\n * Whether the phone is online now, and how. It can still be online without reaching a server.\n * @since 1.0\n */\nexport function status(callOptions?: CallOptions): DashRequest<NetworkStatus> {\n return call('dash.network.status', {}, callOptions);\n}\n","import type { HttpMethods } from './http';\nimport * as http from './http';\nimport type { StatusMethods } from './status';\n\nexport { http };\nexport { status } from './status';\nexport type { ConnectionType, NetworkStatus } from './status';\nexport type {\n HttpDownloadRequest,\n HttpDownloadResponse,\n HttpMethod,\n HttpReadOptions,\n HttpRequest,\n HttpRequestBody,\n HttpResponse,\n HttpUploadFile,\n HttpUploadRequest,\n} from './http';\n\nexport type NetworkMethods = HttpMethods & StatusMethods;\n","import { createHostRequest } from '@monimesl/dot-core';\n\nimport type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport interface Money {\n currency: 'SLE' | 'USD';\n // In minor units, as in Monime's API: SLE 75.00 is 7500.\n value: number;\n}\n\nexport interface OrderLineItem {\n name: string;\n unitPrice: Money;\n // 1 to 100,000. Defaults to 1.\n quantity?: number | undefined;\n // An https picture Dash shows beside the item. Its host must be in network.hosts in dot.json.\n imageUrl?: string | undefined;\n}\n\nexport interface Order {\n // What the person is paying for, such as \"Jazz Night tickets\". 3 to 64 characters.\n name: string;\n // The dot's own ID for the order, up to 64 characters. The same reference never pays twice:\n // asking again gives back the first payment.\n reference: string;\n description?: string | undefined;\n // 1 to 16 items, all in one currency. Dash adds them up for the total.\n lineItems: OrderLineItem[];\n // Up to 64 pairs, with keys up to 48 characters and values up to 100. They stay with the payment\n // and its webhooks. Keys can't start with \"@\", \"_\" or \"monime\", which Monime keeps for itself.\n metadata?: Record<string, string> | undefined;\n}\n\n// Monime's provider IDs: m17 (Orange Money) and m18 (Africell Money) for mobile money, and\n// slb001, slb004, slb007 for banks. Give `include` or `exclude`, not both.\nexport interface ProviderFilter {\n include?: string[] | undefined;\n exclude?: string[] | undefined;\n}\n\nexport interface LinkMethod {\n type: 'link';\n // Which of the person's linked accounts can pay, by their provider.\n providers?: ProviderFilter | undefined;\n}\n\nexport interface CardMethod {\n type: 'card';\n}\n\nexport interface MomoMethod {\n type: 'momo';\n providers?: ProviderFilter | undefined;\n // Only this number can pay, such as \"+23276123456\".\n phoneNumber?: string | undefined;\n}\n\nexport type PaymentMethod = LinkMethod | CardMethod | MomoMethod;\n\nexport interface PaymentOptions {\n order: Order;\n // The methods to offer, in order, each with its own settings. Leave it out for all three\n // with no limits.\n methods?: PaymentMethod[] | undefined;\n // The financial account the money goes to, such as \"fac-k6VgVTfSmLruHpiQgMg4DUeySZx\". It must\n // belong to the Space that owns the dot and hold the order's currency. Leave it out for the\n // Space's main account.\n financialAccountId?: string | undefined;\n}\n\n// A method that fails keeps the sheet open for the person to try again, so `failed` comes only\n// from `get`, for a pending payment that failed later.\nexport type PaymentStatus = 'pending' | 'completed' | 'failed' | 'expired' | 'cancelled';\n\ninterface PaymentResultBase {\n reference: string;\n // Dash's ID for the payment request. Give it to Monime's support when asking about a payment.\n requestId: string;\n status: PaymentStatus;\n // The order's total.\n amount: Money;\n // Monime's payment, such as \"pay-…\", once there is one.\n paymentId?: string | undefined;\n // Monime's number for the order, for the person's receipt and for support. Only once the\n // payment has completed.\n orderNumber?: string | undefined;\n}\n\n// A card payment goes through a Monime checkout session.\nexport interface CardPaymentResult extends PaymentResultBase {\n method: 'card';\n checkoutSessionId: string;\n}\n\n// Mobile money goes through a Monime payment code.\nexport interface MomoPaymentResult extends PaymentResultBase {\n method: 'momo';\n paymentCodeId: string;\n}\n\n// A linked account pays directly, so the payment itself is the resource.\nexport interface LinkPaymentResult extends PaymentResultBase {\n method: 'link';\n paymentId: string;\n}\n\nexport type PaymentResult = CardPaymentResult | MomoPaymentResult | LinkPaymentResult;\n\n// Dash decides how long the sheet waits, so a dot can't set a timeout.\nexport type PaymentCallOptions = Omit<CallOptions, 'timeout'>;\n\nexport interface PaymentsMethods {\n 'dash.payments.request': { params: PaymentOptions; result: PaymentResult };\n 'dash.payments.get': { params: { reference: string }; result: PaymentResult | null };\n}\n\n/**\n * Opens Dash's payment sheet for `order`, where the person picks one of `methods` and pays the\n * Space that owns the dot. Needs `payments` in dot.json's permissions. Monime checks the request\n * before the sheet opens: an order it won't take, such as one below its smallest amount, rejects\n * with `invalid`, a dot or Space it won't take payments for rejects with `denied`, and `failed`\n * means Dash couldn't reach Monime. If a method fails, the sheet stays open for the person to try\n * again or pick another. Once they pick a method, it resolves with how the payment ended:\n * `completed`, `pending` while it's still on its way, `expired`, or `cancelled` if the person\n * closed the sheet. Before that, it rejects with `cancelled` if the person closes the sheet, or\n * `timeout` if Dash's time runs out. A payment already under way carries on after `cancel()`: read\n * it later with `get`.\n * @since 1.0\n */\nexport function request(\n options: PaymentOptions,\n callOptions?: PaymentCallOptions,\n): DashRequest<PaymentResult> {\n // Plain JavaScript could still pass a timeout, so it's taken out here too.\n const withoutTimeout: CallOptions = { ...callOptions };\n delete withoutTimeout.timeout;\n return call('dash.payments.request', options, withoutTimeout);\n}\n\n/**\n * The payment for the order with this reference, such as to check a pending one later, or after\n * the dot opens again. Undefined if this dot never asked for it, or the person never picked a\n * method. Needs `payments` in dot.json's permissions.\n * @since 1.0\n */\nexport function get(\n reference: string,\n callOptions?: CallOptions,\n): DashRequest<PaymentResult | undefined> {\n const response = call('dash.payments.get', { reference }, callOptions);\n // The host answers null for none, as JSON has no undefined.\n const found = response.then((result) => result ?? undefined);\n return createHostRequest(found, () => response.cancel());\n}\n","export { get, request } from './payments';\nexport type {\n CardMethod,\n CardPaymentResult,\n LinkMethod,\n LinkPaymentResult,\n MomoMethod,\n MomoPaymentResult,\n Money,\n Order,\n OrderLineItem,\n PaymentCallOptions,\n PaymentMethod,\n PaymentOptions,\n PaymentResult,\n PaymentsMethods,\n PaymentStatus,\n ProviderFilter,\n} from './payments';\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\n// A dot's own key-value cache, apart from its files. It holds up to 64 MB of JSON values, each kept\n// until removed or until its `ttl` runs out.\n\nexport type CacheValue = string | number | boolean | CacheValue[] | { [key: string]: CacheValue };\n\nexport interface CacheMethods {\n 'dash.storage.cache.get': { params: { key: string }; result: CacheValue | null };\n 'dash.storage.cache.set': {\n params: { key: string; value: CacheValue; ttl?: number | undefined };\n result: void;\n };\n 'dash.storage.cache.remove': { params: { key: string }; result: void };\n 'dash.storage.cache.exists': { params: { key: string }; result: boolean };\n 'dash.storage.cache.keys': { params: Record<string, never>; result: string[] };\n 'dash.storage.cache.clear': { params: Record<string, never>; result: void };\n}\n\nexport interface CacheSetOptions {\n // How many milliseconds the entry lasts. Without it, or with 0 or less, it lasts until removed.\n ttl?: number | undefined;\n}\n\n/**\n * Resolves with null for a missing or expired key.\n * @since 1.0\n */\nexport function get<Value extends CacheValue = CacheValue>(\n key: string,\n callOptions?: CallOptions,\n): DashRequest<Value | null> {\n return call('dash.storage.cache.get', { key }, callOptions) as DashRequest<Value | null>;\n}\n\n/** @since 1.0 */\nexport function set(\n key: string,\n value: CacheValue,\n options: CacheSetOptions = {},\n callOptions?: CallOptions,\n): DashRequest<void> {\n return call('dash.storage.cache.set', { key, value, ...options }, callOptions);\n}\n\n/** @since 1.0 */\nexport function remove(key: string, callOptions?: CallOptions): DashRequest<void> {\n return call('dash.storage.cache.remove', { key }, callOptions);\n}\n\n/** @since 1.0 */\nexport function exists(key: string, callOptions?: CallOptions): DashRequest<boolean> {\n return call('dash.storage.cache.exists', { key }, callOptions);\n}\n\n/**\n * The keys, sorted.\n * @since 1.0\n */\nexport function keys(callOptions?: CallOptions): DashRequest<string[]> {\n return call('dash.storage.cache.keys', {}, callOptions);\n}\n\n/** @since 1.0 */\nexport function clear(callOptions?: CallOptions): DashRequest<void> {\n return call('dash.storage.cache.clear', {}, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\nimport type { DotFile } from '../files';\n\n// A dot's own files, in a folder no other dot sees. Paths are relative to it, such as\n// \"receipts/42.pdf\", and '' is the folder itself. A call on a path with nothing there fails with\n// `missing`, while `stat` gives null for it.\n\nexport interface FileEntry {\n name: string;\n path: string;\n // In bytes, and 0 for a folder.\n size: number;\n kind: 'file' | 'folder';\n // When it last changed, in milliseconds since 1 January 1970, as Date.now() gives.\n modifiedAt: number;\n contentType?: string;\n}\n\nexport type FileEncoding = 'text' | 'base64';\n\n// In bytes: what the dot's files take, and the most they may take.\nexport interface StorageUsage {\n used: number;\n quota: number;\n}\n\nexport interface FileMethods {\n 'dash.storage.file.read': { params: { path: string; as?: FileEncoding }; result: string };\n 'dash.storage.file.write': {\n params: { path: string; data: string; as?: FileEncoding; append?: boolean };\n result: FileEntry;\n };\n 'dash.storage.file.stat': { params: { path: string }; result: FileEntry | null };\n 'dash.storage.file.list': { params: { path: string; recursive?: boolean }; result: FileEntry[] };\n 'dash.storage.file.createFolder': { params: { path: string }; result: FileEntry };\n 'dash.storage.file.move': {\n params: { from: string; to: string; overwrite?: boolean };\n result: FileEntry;\n };\n 'dash.storage.file.copy': {\n params: { from: string; to: string; overwrite?: boolean };\n result: FileEntry;\n };\n 'dash.storage.file.remove': { params: { path: string; recursive?: boolean }; result: void };\n 'dash.storage.file.save': {\n params: { file: string; path: string; overwrite?: boolean };\n result: FileEntry;\n };\n 'dash.storage.file.open': { params: { path: string }; result: DotFile };\n 'dash.storage.file.usage': { params: Record<string, never>; result: StorageUsage };\n}\n\nexport interface ReadOptions {\n as?: FileEncoding;\n}\n\nexport interface WriteOptions {\n as?: FileEncoding;\n append?: boolean;\n}\n\nexport interface ReplaceOptions {\n overwrite?: boolean;\n}\n\n/**\n * Reads a file of up to 5 MB.\n * @since 1.0\n */\nexport function read(\n path: string,\n options: ReadOptions = {},\n callOptions?: CallOptions,\n): DashRequest<string> {\n return call('dash.storage.file.read', { path, ...options }, callOptions);\n}\n\n/**\n * Creates any missing folders above the file.\n * @since 1.0\n */\nexport function write(\n path: string,\n data: string,\n options: WriteOptions = {},\n callOptions?: CallOptions,\n): DashRequest<FileEntry> {\n return call('dash.storage.file.write', { path, data, ...options }, callOptions);\n}\n\n/** @since 1.0 */\nexport function stat(path: string, callOptions?: CallOptions): DashRequest<FileEntry | null> {\n return call('dash.storage.file.stat', { path }, callOptions);\n}\n\n/**\n * Sorted by path.\n * @since 1.0\n */\nexport function list(\n path = '',\n options: { recursive?: boolean } = {},\n callOptions?: CallOptions,\n): DashRequest<FileEntry[]> {\n return call('dash.storage.file.list', { path, ...options }, callOptions);\n}\n\n/** @since 1.0 */\nexport function createFolder(path: string, callOptions?: CallOptions): DashRequest<FileEntry> {\n return call('dash.storage.file.createFolder', { path }, callOptions);\n}\n\n/** @since 1.0 */\nexport function move(\n from: string,\n to: string,\n options: ReplaceOptions = {},\n callOptions?: CallOptions,\n): DashRequest<FileEntry> {\n return call('dash.storage.file.move', { from, to, ...options }, callOptions);\n}\n\n/** @since 1.0 */\nexport function copy(\n from: string,\n to: string,\n options: ReplaceOptions = {},\n callOptions?: CallOptions,\n): DashRequest<FileEntry> {\n return call('dash.storage.file.copy', { from, to, ...options }, callOptions);\n}\n\n/**\n * Removing a folder that isn't empty needs `recursive`.\n * @since 1.0\n */\nexport function remove(\n path: string,\n options: { recursive?: boolean } = {},\n callOptions?: CallOptions,\n): DashRequest<void> {\n return call('dash.storage.file.remove', { path, ...options }, callOptions);\n}\n\n/**\n * Keeps a temporary file, such as a download, at `path`.\n * @since 1.0\n */\nexport function save(\n file: DotFile,\n path: string,\n options: ReplaceOptions = {},\n callOptions?: CallOptions,\n): DashRequest<FileEntry> {\n return call('dash.storage.file.save', { file: file.id, path, ...options }, callOptions);\n}\n\n/**\n * A stored file as a DotFile, to show with its `url` or send with `http.upload`.\n * @since 1.0\n */\nexport function open(path: string, callOptions?: CallOptions): DashRequest<DotFile> {\n return call('dash.storage.file.open', { path }, callOptions);\n}\n\n/** @since 1.0 */\nexport function usage(callOptions?: CallOptions): DashRequest<StorageUsage> {\n return call('dash.storage.file.usage', {}, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\n// A dot's secrets, such as tokens its own API gives the person. Holds up to 32 strings of up to 4 KB\n// each, encrypted with a key that never leaves the device. Don't keep the dot's own API keys here:\n// they would ship in its bundle, which anyone can read.\n\nexport interface SecretMethods {\n 'dash.storage.secret.get': { params: { key: string }; result: string | null };\n 'dash.storage.secret.set': { params: { key: string; value: string }; result: void };\n 'dash.storage.secret.remove': { params: { key: string }; result: void };\n 'dash.storage.secret.clear': { params: Record<string, never>; result: void };\n}\n\n/** @since 1.0 */\nexport function get(key: string, callOptions?: CallOptions): DashRequest<string | null> {\n return call('dash.storage.secret.get', { key }, callOptions);\n}\n\n/** @since 1.0 */\nexport function set(key: string, value: string, callOptions?: CallOptions): DashRequest<void> {\n return call('dash.storage.secret.set', { key, value }, callOptions);\n}\n\n/** @since 1.0 */\nexport function remove(key: string, callOptions?: CallOptions): DashRequest<void> {\n return call('dash.storage.secret.remove', { key }, callOptions);\n}\n\n/** @since 1.0 */\nexport function clear(callOptions?: CallOptions): DashRequest<void> {\n return call('dash.storage.secret.clear', {}, callOptions);\n}\n","// A dot's own data, kept on this device for the signed-in Dash user only. It's never backed up or\n// moved to a new phone, and another user who signs in sees none of it. Keep what matters on the\n// dot's server, and treat this as a copy you can fetch again.\n\nimport type { CacheMethods } from './cache';\nimport * as cache from './cache';\nimport type { FileMethods } from './file';\nimport * as file from './file';\nimport type { SecretMethods } from './secret';\nimport * as secret from './secret';\n\nexport { cache, file, secret };\nexport type { CacheSetOptions, CacheValue } from './cache';\nexport type {\n FileEncoding,\n FileEntry,\n ReadOptions,\n ReplaceOptions,\n StorageUsage,\n WriteOptions,\n} from './file';\n\nexport type StorageMethods = FileMethods & CacheMethods & SecretMethods;\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport interface ClipboardMethods {\n 'dash.system.copyText': { params: { text: string }; result: void };\n}\n\n/** @since 1.0 */\nexport function copyText(text: string, callOptions?: CallOptions): DashRequest<void> {\n return call('dash.system.copyText', { text }, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport interface DelayMethods {\n 'dash.system.delay': { params: { milliseconds: number }; result: void };\n}\n\n/**\n * Resolves after `milliseconds`. The host keeps the time, since a dot's logic has no timers.\n * @since 1.0\n */\nexport function delay(milliseconds: number, callOptions?: CallOptions): DashRequest<void> {\n return call('dash.system.delay', { milliseconds }, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport interface DialMethods {\n 'dash.system.dial': { params: { number: string }; result: void };\n}\n\n/**\n * Opens the phone's dialer with `number` ready, such as \"+232 76 123456\" or a USSD code such as\n * \"*715#\". The person taps Call. Spaces and dashes are fine; anything else but digits, +, * and #\n * rejects with `invalid`. For a code, Dash asks the person first, and rejects with `cancelled` if\n * they say no. Codes that set up call forwarding, such as \"**21*…#\", reject with `denied`.\n * @since 1.0\n */\nexport function dial(number: string, callOptions?: CallOptions): DashRequest<void> {\n return call('dash.system.dial', { number }, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport type VibrationStyle = 'light' | 'medium' | 'heavy' | 'success' | 'warning' | 'error';\n\nexport interface VibrateOptions {\n // Defaults to `medium`.\n style?: VibrationStyle | undefined;\n}\n\nexport interface HapticsMethods {\n 'dash.system.vibrate': { params: VibrateOptions; result: void };\n}\n\n/**\n * Plays a short vibration. Resolves once it's done.\n * @since 1.0\n */\nexport function vibrate(\n options: VibrateOptions = {},\n callOptions?: CallOptions,\n): DashRequest<void> {\n return call('dash.system.vibrate', { style: options.style ?? 'medium' }, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport type Platform = 'ios' | 'android' | 'simulator';\n\nexport interface SystemInfo {\n platform: Platform;\n // Such as \"18.2\" on iOS or \"15\" on Android.\n osVersion: string;\n // The person's language, such as \"en\", and their region, such as \"SL\", or null if unknown.\n language: string;\n region: string | null;\n // Such as \"Africa/Freetown\".\n timeZone: string;\n // The version of Dash the dot runs in, such as \"2.4.0\". To check for a call, use dash.supports.\n dashVersion: string;\n // The Dash API versions it offers, such as [\"1.4\"], one for each major it supports.\n apiVersions: string[];\n}\n\nexport interface InfoMethods {\n 'dash.system.info': { params: Record<string, never>; result: SystemInfo };\n}\n\n/**\n * The phone and the Dash the dot runs in. It has nothing that identifies the person or the phone.\n * @since 1.0\n */\nexport function info(callOptions?: CallOptions): DashRequest<SystemInfo> {\n return call('dash.system.info', {}, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport interface OpenUrlMethods {\n 'dash.system.openUrl': { params: { url: string }; result: void };\n}\n\n/**\n * Opens an https address in the device's browser. Any other address rejects with `invalid`.\n * @since 1.0\n */\nexport function openUrl(url: string, callOptions?: CallOptions): DashRequest<void> {\n return call('dash.system.openUrl', { url }, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport type BrightnessLevel = 'max' | 'normal';\n\nexport interface ScreenMethods {\n 'dash.system.keepAwake': { params: { on: boolean }; result: void };\n 'dash.system.brightness': { params: { level: BrightnessLevel }; result: void };\n}\n\n/**\n * Keeps the screen from dimming and locking while the dot shows, such as while a ticket's QR code is\n * up. Dash undoes it when the dot closes.\n * @since 1.0\n */\nexport function keepAwake(on: boolean, callOptions?: CallOptions): DashRequest<void> {\n return call('dash.system.keepAwake', { on }, callOptions);\n}\n\n/**\n * `max` makes the screen as bright as it goes, so a scanner can read a QR code on it, and `normal`\n * puts it back. Dash puts it back too when the dot closes or the person leaves the app.\n * @since 1.0\n */\nexport function brightness(level: BrightnessLevel, callOptions?: CallOptions): DashRequest<void> {\n return call('dash.system.brightness', { level }, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\nimport type { DotFile } from '../files';\n\n// Give at least one of `text`, `url` and `file`.\nexport interface ShareOptions {\n // A subject, for apps that use one, such as email.\n title?: string;\n text?: string;\n url?: string;\n file?: DotFile;\n}\n\nexport interface ShareMethods {\n 'dash.system.share': {\n params: { title?: string; text?: string; url?: string; file?: string };\n result: void;\n };\n}\n\n/**\n * Opens the device's share sheet. Resolves once it shows.\n * @since 1.0\n */\nexport function share(options: ShareOptions, callOptions?: CallOptions): DashRequest<void> {\n const { file, ...content } = options;\n if (file === undefined) {\n return call('dash.system.share', content, callOptions);\n }\n return call('dash.system.share', { ...content, file: file.id }, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport interface TorchMethods {\n 'dash.system.torch': { params: { on: boolean }; result: void };\n}\n\n/**\n * Turns the torch on or off. Rejects with `unsupported` on a device without one.\n * @since 1.0\n */\nexport function torch(on: boolean, callOptions?: CallOptions): DashRequest<void> {\n return call('dash.system.torch', { on }, callOptions);\n}\n","import type { ClipboardMethods } from './clipboard';\nimport type { DelayMethods } from './delay';\nimport type { DialMethods } from './dial';\nimport type { HapticsMethods } from './haptics';\nimport type { InfoMethods } from './info';\nimport type { OpenUrlMethods } from './open-url';\nimport type { ScreenMethods } from './screen';\nimport type { ShareMethods } from './share';\nimport type { TorchMethods } from './torch';\n\nexport { copyText } from './clipboard';\nexport { delay } from './delay';\nexport { dial } from './dial';\nexport { vibrate } from './haptics';\nexport { info } from './info';\nexport { openUrl } from './open-url';\nexport { brightness, keepAwake } from './screen';\nexport { share } from './share';\nexport { torch } from './torch';\nexport type { VibrateOptions, VibrationStyle } from './haptics';\nexport type { Platform, SystemInfo } from './info';\nexport type { BrightnessLevel } from './screen';\nexport type { ShareOptions } from './share';\n\nexport type SystemMethods = ClipboardMethods &\n DelayMethods &\n DialMethods &\n HapticsMethods &\n InfoMethods &\n OpenUrlMethods &\n ScreenMethods &\n ShareMethods &\n TorchMethods;\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport interface AlertAction {\n id: string;\n label: string;\n // `cancel` dismisses the alert. On Android, Back or a tap outside the alert chooses it too. An\n // alert without one stays until the person chooses an action. `destructive` marks something that\n // can't be undone.\n role?: 'default' | 'cancel' | 'destructive' | undefined;\n}\n\nexport interface AlertOptions {\n title: string;\n // Dash ends it with a line naming the dot, such as \"From Plasas Kitchen\".\n message?: string | undefined;\n // Defaults to one OK button. An empty list fails as `invalid`, so the person can always close it.\n actions?: AlertAction[] | undefined;\n}\n\nexport interface AlertResult {\n // The `id` of the action the person chose.\n action: string;\n}\n\nexport interface DialogMethods {\n 'dash.ui.alert': { params: AlertOptions; result: AlertResult };\n}\n\n/**\n * Shows a native alert. Resolves with the action the person chose.\n * @since 1.0\n */\nexport function alert(options: AlertOptions, callOptions?: CallOptions): DashRequest<AlertResult> {\n const actions = options.actions ?? [{ id: 'ok', label: 'OK' }];\n return call('dash.ui.alert', { ...options, actions }, callOptions);\n}\n","import type { CallOptions, DashRequest } from '../call';\nimport { call } from '../call';\n\nexport interface PickDateOptions {\n title?: string | undefined;\n // Dates such as \"2026-10-24\". `value` is the one chosen when the picker opens.\n value?: string | undefined;\n min?: string | undefined;\n max?: string | undefined;\n}\n\nexport interface PickTimeOptions {\n title?: string | undefined;\n // A time of day in 24 hours, such as \"19:30\", chosen when the picker opens.\n value?: string | undefined;\n}\n\nexport interface PickerMethods {\n 'dash.ui.pickDate': { params: PickDateOptions; result: string };\n 'dash.ui.pickTime': { params: PickTimeOptions; result: string };\n}\n\n/**\n * Opens the phone's own calendar. Resolves with the chosen date, such as \"2026-10-24\", or rejects\n * with `cancelled` if the person closes it.\n * @since 1.0\n */\nexport function pickDate(\n options: PickDateOptions = {},\n callOptions?: CallOptions,\n): DashRequest<string> {\n return call('dash.ui.pickDate', options, callOptions);\n}\n\n/**\n * Opens the phone's own clock. Resolves with the chosen time in 24 hours, such as \"19:30\", or\n * rejects with `cancelled` if the person closes it.\n * @since 1.0\n */\nexport function pickTime(\n options: PickTimeOptions = {},\n callOptions?: CallOptions,\n): DashRequest<string> {\n return call('dash.ui.pickTime', options, callOptions);\n}\n","import type { DialogMethods } from './dialogs';\nimport type { PickerMethods } from './pickers';\n\nexport { alert } from './dialogs';\nexport { pickDate, pickTime } from './pickers';\nexport type { AlertAction, AlertOptions, AlertResult } from './dialogs';\nexport type { PickDateOptions, PickTimeOptions } from './pickers';\n\nexport type UIMethods = DialogMethods & PickerMethods;\n","// Text to base64 or hex and back, as UTF-8. These run in the dot itself, so they need no Dash and\n// answer at once. The engines that run a dot's logic have no TextEncoder, so UTF-8 is done here.\n\nconst BASE64_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst HEX_PATTERN = /^(?:[0-9a-fA-F]{2})*$/;\n\nexport const base64 = {\n // \"Salone\" -> \"U2Fsb25l\"\n encode(text: string): string {\n return bytesToBase64(utf8Bytes(text));\n },\n // Throws for text that isn't base64.\n decode(encoded: string): string {\n return utf8Text(base64ToBytes(encoded));\n },\n};\n\nexport const hex = {\n // \"Salone\" -> \"53616c6f6e65\"\n encode(text: string): string {\n return utf8Bytes(text)\n .map((byte) => byte.toString(16).padStart(2, '0'))\n .join('');\n },\n // Throws for text that isn't hex.\n decode(encoded: string): string {\n if (!HEX_PATTERN.test(encoded)) {\n throw new Error(`\"${encoded.slice(0, 20)}\" isn't hex. Use pairs of 0-9 and a-f.`);\n }\n const bytes: number[] = [];\n for (let index = 0; index < encoded.length; index += 2) {\n bytes.push(parseInt(encoded.slice(index, index + 2), 16));\n }\n return utf8Text(bytes);\n },\n};\n\n// Each group of 3 bytes is 24 bits, written as 4 characters of 6 bits. A shorter last group writes\n// one character per byte plus one, and pads with \"=\" to 4.\nfunction bytesToBase64(bytes: number[]): string {\n let encoded = '';\n for (let index = 0; index < bytes.length; index += 3) {\n const group = bytes.slice(index, index + 3);\n const bits = ((group[0] ?? 0) << 16) | ((group[1] ?? 0) << 8) | (group[2] ?? 0);\n const sextets = [(bits >> 18) & 0x3f, (bits >> 12) & 0x3f, (bits >> 6) & 0x3f, bits & 0x3f];\n const characterCount = group.length + 1;\n for (const sextet of sextets.slice(0, characterCount)) {\n encoded += BASE64_ALPHABET[sextet];\n }\n encoded += '='.repeat(4 - characterCount);\n }\n return encoded;\n}\n\n// The reverse of bytesToBase64: each 4 characters give 3 bytes, less one for each \"=\".\nfunction base64ToBytes(encoded: string): number[] {\n if (!isBase64(encoded)) {\n throw new Error(`\"${encoded.slice(0, 20)}\" isn't base64.`);\n }\n const bytes: number[] = [];\n for (let index = 0; index < encoded.length; index += 4) {\n const characters = encoded.slice(index, index + 4);\n let bits = 0;\n let padding = 0;\n for (const character of characters) {\n bits <<= 6;\n if (character === '=') {\n padding += 1;\n } else {\n bits |= BASE64_ALPHABET.indexOf(character);\n }\n }\n bytes.push((bits >> 16) & 0xff);\n if (padding < 2) {\n bytes.push((bits >> 8) & 0xff);\n }\n if (padding < 1) {\n bytes.push(bits & 0xff);\n }\n }\n return bytes;\n}\n\n// A loop, not a regex, as a regex runs out of stack on a few megabytes.\nfunction isBase64(encoded: string): boolean {\n if (encoded.length % 4 !== 0) {\n return false;\n }\n // \"=\" only pads the end, as \"xx==\" or \"xxx=\".\n let padding = 0;\n if (encoded.endsWith('==')) {\n padding = 2;\n } else if (encoded.endsWith('=')) {\n padding = 1;\n }\n for (let index = 0; index < encoded.length - padding; index += 1) {\n if (BASE64_ALPHABET.indexOf(encoded[index]!) === -1) {\n return false;\n }\n }\n return true;\n}\n\nfunction utf8Bytes(text: string): number[] {\n const bytes: number[] = [];\n for (const character of text) {\n const codePoint = character.codePointAt(0)!;\n if (codePoint < 0x80) {\n bytes.push(codePoint);\n } else if (codePoint < 0x800) {\n bytes.push(0xc0 | (codePoint >> 6), 0x80 | (codePoint & 0x3f));\n } else if (codePoint < 0x10000) {\n bytes.push(\n 0xe0 | (codePoint >> 12),\n 0x80 | ((codePoint >> 6) & 0x3f),\n 0x80 | (codePoint & 0x3f),\n );\n } else {\n bytes.push(\n 0xf0 | (codePoint >> 18),\n 0x80 | ((codePoint >> 12) & 0x3f),\n 0x80 | ((codePoint >> 6) & 0x3f),\n 0x80 | (codePoint & 0x3f),\n );\n }\n }\n return bytes;\n}\n\nconst MAX_CODE_POINT = 0x10ffff;\n// The smallest code point that needs each length, by length. A smaller one is spelled too long.\nconst MIN_CODE_POINT_FOR_LENGTH = [0, 0, 0x80, 0x800, 0x10000];\n\n// Bytes that aren't UTF-8 become \"�\", as browsers read them.\nfunction utf8Text(bytes: number[]): string {\n let text = '';\n let index = 0;\n while (index < bytes.length) {\n const first = bytes[index]!;\n const length = sequenceLength(first);\n const continuation = bytes.slice(index + 1, index + length);\n if (length === 0 || !isCompleteContinuation(continuation, length)) {\n text += '�';\n index += 1;\n continue;\n }\n let codePoint = firstByteBits(first, length);\n for (const byte of continuation) {\n codePoint = (codePoint << 6) | (byte & 0x3f);\n }\n // Four bytes can spell a number past the last character, as f7 bf bf bf does. UTF-8 also\n // refuses characters spelled with more bytes than they need, and the halves of UTF-16 pairs.\n const isPastLastCharacter = codePoint > MAX_CODE_POINT;\n const isSpelledTooLong = codePoint < MIN_CODE_POINT_FOR_LENGTH[length]!;\n const isSurrogate = codePoint >= 0xd800 && codePoint <= 0xdfff;\n if (isPastLastCharacter || isSpelledTooLong || isSurrogate) {\n text += '�';\n index += 1;\n continue;\n }\n text += String.fromCodePoint(codePoint);\n index += length;\n }\n return text;\n}\n\n// How many bytes a UTF-8 character takes, from its first byte. 0 for a byte that can't start one.\nfunction sequenceLength(first: number): number {\n if (first < 0x80) {\n return 1;\n }\n if (first >= 0xf0) {\n return 4;\n }\n if (first >= 0xe0) {\n return 3;\n }\n if (first >= 0xc0) {\n return 2;\n }\n return 0;\n}\n\n// Whether the bytes after a first byte are all there, and each is a continuation byte: 10xxxxxx.\nfunction isCompleteContinuation(continuation: number[], length: number): boolean {\n if (continuation.length !== length - 1) {\n return false;\n }\n return continuation.every((byte) => (byte & 0xc0) === 0x80);\n}\n\n// The bits of the code point that a first byte holds, after its length marker of 1s and a 0.\nfunction firstByteBits(first: number, length: number): number {\n if (length === 1) {\n return first;\n }\n return first & (0xff >> (length + 1));\n}\n","// Helpers that run in the dot itself, so they need no Dash and answer at once, without `await`.\n\n/**\n * Text to base64 and back, as UTF-8: `dash.utils.base64.encode(\"Salone\")` is `\"U2Fsb25l\"`.\n * `decode` throws for text that isn't base64.\n * @since 1.0\n */\nexport { base64 } from './encoding';\n\n/**\n * Text to hex and back, as UTF-8: `dash.utils.hex.encode(\"Salone\")` is `\"53616c6f6e65\"`.\n * `decode` throws for text that isn't hex.\n * @since 1.0\n */\nexport { hex } from './encoding';\n","import type { DashRequest } from './call';\n\n// A copy of `group`, such as `dash`, that passes each request it starts to `track`.\nexport function tracked<Group extends object>(\n group: Group,\n track: (request: DashRequest<unknown>) => void,\n): Group {\n const copy: Record<string, unknown> = {};\n for (const [name, member] of Object.entries(group)) {\n if (typeof member === 'function') {\n const startCall = member as (...args: unknown[]) => unknown;\n copy[name] = (...args: unknown[]) => {\n const result = startCall(...args);\n // Only calls return a request to track. dash.supports answers at once.\n if (result instanceof Promise) {\n track(result as DashRequest<unknown>);\n }\n return result;\n };\n } else {\n copy[name] = tracked(member as object, track);\n }\n }\n return copy as Group;\n}\n","import type { HostErrorCode } from '@monimesl/dot-core';\nimport { HostError } from '@monimesl/dot-core';\n\ntype DashErrorWith<Code extends HostErrorCode> = HostError & { readonly code: Code };\n\nexport function isDashError<Code extends HostErrorCode>(\n error: unknown,\n ...codes: Code[]\n): error is DashErrorWith<Code> {\n if (error instanceof HostError) {\n return codes.length === 0 || codes.includes(error.code as Code);\n }\n return false;\n}\n\n// The message to show for anything a call threw, even if it isn't an Error.\nexport function errorMessage(error: unknown): string {\n if (error instanceof Error) {\n return error.message;\n }\n if (typeof error === 'string' && error) {\n return error;\n }\n return 'Something went wrong. Try again.';\n}\n\n// Waits for a call, such as a picker, and gives undefined if the person closed it or it was\n// cancelled. Other errors still throw.\nexport async function unlessCancelled<Result>(\n call: PromiseLike<Result>,\n): Promise<Result | undefined> {\n try {\n return await call;\n } catch (error) {\n if (isDashError(error, 'cancelled')) {\n return undefined;\n }\n throw error;\n }\n}\n","import type { DashRequest } from './call';\nimport { isDashError } from './errors';\nimport type { Dash } from './index';\n\n// Each call given to it cancels the one before, so an older answer can't arrive after a newer one.\n// The cancelled call rejects with `cancelled`, which unlessCancelled turns into undefined.\nexport function latest(): <Result>(call: DashRequest<Result>) => DashRequest<Result> {\n let running: DashRequest<unknown> | undefined;\n return (call) => {\n running?.cancel();\n running = call;\n return call;\n };\n}\n\n// Resolves true once `milliseconds` pass without another call, such as a pause in typing, and false\n// for a wait a newer call cut short. It waits through the page's `this.dash`, since a dot has no timers.\nexport function debounce(milliseconds: number): (dash: Dash) => Promise<boolean> {\n const wait = latest();\n return async (dash) => {\n try {\n await wait(dash.system.delay(milliseconds));\n return true;\n } catch (error) {\n if (isDashError(error, 'cancelled')) {\n return false;\n }\n throw error;\n }\n };\n}\n","import * as account from './account';\nimport { supports } from './api-versions';\nimport * as contacts from './contacts';\nimport * as crypto from './crypto';\nimport * as dot from './dot';\nimport * as media from './media';\nimport * as network from './network';\nimport * as payments from './payments';\nimport * as storage from './storage';\nimport * as system from './system';\nimport * as ui from './ui';\nimport * as utils from './utils';\n\n// Dash's features for a dot's logic, in groups: `dash.ui.alert(...)`, `dash.system.torch(...)`,\n// `dash.network.http.request(...)`. `dash.supports(...)` says whether this Dash has a newer one.\n// `dash.utils` holds helpers that run in the dot and answer at once, such as `dash.utils.base64`.\nexport const dash = {\n ui,\n system,\n network,\n storage,\n media,\n contacts,\n dot,\n account,\n payments,\n crypto,\n utils,\n supports,\n};\n\nexport type Dash = typeof dash;\n\nexport { tracked } from './tracked';\nexport {\n DASH_API_SINCE,\n DASH_API_VERSION,\n useHostDashApiVersions,\n warnAboveDashApiVersion,\n} from './api-versions';\nexport type { DashFeature } from './api-versions';\n\n// The error a Dash call fails with. Inside the libraries it's core's HostError.\nexport { HostError as DashError } from '@monimesl/dot-core';\nexport type { HostErrorCode as DashErrorCode } from '@monimesl/dot-core';\nexport { errorMessage, isDashError, unlessCancelled } from './errors';\nexport { debounce, latest } from './latest';\nexport type {\n OidcProfile,\n OidcScope,\n OidcSignIn,\n OidcSignInOptions,\n SignInMode,\n SimpleSignIn,\n SimpleSignInOptions,\n} from './account';\nexport type {\n CardMethod,\n CardPaymentResult,\n LinkMethod,\n LinkPaymentResult,\n MomoMethod,\n MomoPaymentResult,\n Money,\n Order,\n OrderLineItem,\n PaymentCallOptions,\n PaymentMethod,\n PaymentOptions,\n PaymentResult,\n PaymentsMethods,\n PaymentStatus,\n ProviderFilter,\n} from './payments';\nexport type { CryptoInput, CryptoOutputOptions, HmacAlgorithm, HmacOptions } from './crypto';\nexport type { CallOptions, DashRequest } from './call';\nexport type { DashMethod, DashMethods } from './methods';\nexport type {\n CacheSetOptions,\n CacheValue,\n FileEncoding,\n FileEntry,\n ReadOptions,\n ReplaceOptions,\n StorageMethods,\n StorageUsage,\n WriteOptions,\n} from './storage';\nexport type { DotFile } from './files';\nexport type {\n CodeFormat,\n MediaMethods,\n PhotoSource,\n PickFileOptions,\n PickPhotoOptions,\n ScannedCode,\n} from './media';\nexport type { ContactsMethods, PickedContact } from './contacts';\nexport type {\n ConnectionType,\n HttpDownloadRequest,\n HttpDownloadResponse,\n HttpMethod,\n HttpReadOptions,\n HttpRequest,\n HttpRequestBody,\n HttpResponse,\n HttpUploadFile,\n HttpUploadRequest,\n NetworkMethods,\n NetworkStatus,\n} from './network';\nexport type {\n BrightnessLevel,\n Platform,\n ShareOptions,\n SystemInfo,\n SystemMethods,\n VibrateOptions,\n VibrationStyle,\n} from './system';\nexport type {\n AlertAction,\n AlertOptions,\n AlertResult,\n PickDateOptions,\n PickTimeOptions,\n UIMethods,\n} from './ui';\n"],"mappings":";;;AAGA,MAAa,mBAAmB;AAKhC,MAAa,iBAAiB;CAC5B,kBAAkB;CAClB,sBAAsB;CACtB,eAAe;CACf,sBAAsB;CACtB,qBAAqB;CACrB,iBAAiB;CACjB,iBAAiB;CACjB,aAAa;CACb,kBAAkB;CAClB,mBAAmB;CACnB,kBAAkB;CAClB,yBAAyB;CACzB,wBAAwB;CACxB,uBAAuB;CACvB,kBAAkB;CAClB,gBAAgB;CAChB,oBAAoB;CACpB,uBAAuB;CACvB,wBAAwB;CACxB,qBAAqB;CACrB,sBAAsB;CACtB,wBAAwB;CACxB,qBAAqB;CACrB,qBAAqB;CACrB,6BAA6B;CAC7B,qBAAqB;CACrB,qBAAqB;CACrB,qBAAqB;CACrB,qBAAqB;CACrB,uBAAuB;CACvB,qBAAqB;CACrB,qBAAqB;CACrB,sBAAsB;CACtB,sBAAsB;CACtB,wBAAwB;CACxB,sBAAsB;CACtB,yBAAyB;CACzB,sBAAsB;CACtB,qBAAqB;CACrB,mBAAmB;CACnB,gBAAgB;CAChB,eAAe;CACf,eAAe;CACf,oBAAoB;CACpB,kBAAkB;CAClB,gBAAgB;CAChB,gBAAgB;CAChB,kBAAkB;CAClB,YAAY;CACZ,eAAe;CACf,eAAe;AACjB;AAKA,IAAI,kBAAqC,CAAC,wBAAwB;AAClE,IAAI;AACJ,MAAM,kCAAkB,IAAI,IAAY;AACxC,MAAM,iCAAiB,IAAI,IAAY;AAGvC,SAAgB,uBAAuB,UAAmC;CACxE,kBAAkB;AACpB;AAGA,SAAgB,wBAAwB,eAAyC;CAC/E,mBAAmB;AACrB;;;;;;AAOA,SAAgB,SAAS,SAA+B;CACtD,gBAAgB,IAAI,OAAO;CAC3B,MAAM,QAAQ,QAAQ,OAAO;CAC7B,OAAO,UAAU,KAAA,KAAa,qBAAqB,iBAAiB,KAAK;AAC3E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{
|
|
2
2
|
"name": "@monimesl/dot-dash",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.41",
|
|
4
4
|
"description": "Dash features for dots: native UI, system and more, called from the service",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"main": "./dist/index.js",
|
|
25
25
|
"types": "./dist/index.d.ts",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@monimesl/dot-core": "0.1.0-alpha.
|
|
27
|
+
"@monimesl/dot-core": "0.1.0-alpha.41"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"publint": "^0.3.24",
|