screenreader-speech-capture 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +35 -9
- package/dist/ui/adapter-node.js +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/2.BbalQTLT.css +1 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.BbalQTLT.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.BbalQTLT.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/{w6UAqFO5.js → VoEQsW8I.js} +1 -1
- package/dist/ui/client/ui/_app/immutable/chunks/VoEQsW8I.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/{w6UAqFO5.js.gz → VoEQsW8I.js.gz} +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/{app.COo3YJBG.js → app.vg2Ojqcj.js} +2 -2
- package/dist/ui/client/ui/_app/immutable/entry/app.vg2Ojqcj.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.vg2Ojqcj.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/{0.BKE0tKKK.js → 0.BTOtEgN4.js} +1 -1
- package/dist/ui/client/ui/_app/immutable/nodes/0.BTOtEgN4.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.BTOtEgN4.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/{2.BCy3UgNz.js → 2.COkKMNHv.js} +73 -73
- package/dist/ui/client/ui/_app/immutable/nodes/2.COkKMNHv.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.COkKMNHv.js.gz +0 -0
- package/dist/ui/client/ui/_app/version.json +1 -1
- package/dist/ui/client/ui/_app/version.json.br +0 -0
- package/dist/ui/client/ui/_app/version.json.gz +0 -0
- package/dist/ui/server/.vite/manifest.json +11 -1
- package/dist/ui/server/_app/immutable/assets/_page.BbalQTLT.css +1 -0
- package/dist/ui/server/chunks/bridge-api.js +3 -0
- package/dist/ui/server/chunks/bridge-api.js.map +1 -1
- package/dist/ui/server/chunks/composition.js +13 -1
- package/dist/ui/server/chunks/composition.js.map +1 -1
- package/dist/ui/server/chunks/instance.js +3 -3
- package/dist/ui/server/chunks/internal.js +1 -1
- package/dist/ui/server/entries/endpoints/api/sessions/_id_/_server.ts.js +13 -0
- package/dist/ui/server/entries/endpoints/api/sessions/_id_/_server.ts.js.map +1 -0
- package/dist/ui/server/entries/pages/_page.svelte.js +56 -5
- package/dist/ui/server/entries/pages/_page.svelte.js.map +1 -1
- package/dist/ui/server/manifest-full.js +8 -1
- package/dist/ui/server/manifest.js +8 -1
- package/dist/ui/server/nodes/0.js +1 -1
- package/dist/ui/server/nodes/2.js +2 -2
- package/dist/ui/server/server.js +8 -1
- package/package.json +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/2.CtITS5jU.css +0 -1
- package/dist/ui/client/ui/_app/immutable/assets/2.CtITS5jU.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/2.CtITS5jU.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/w6UAqFO5.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.COo3YJBG.js.br +0 -2
- package/dist/ui/client/ui/_app/immutable/entry/app.COo3YJBG.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.BKE0tKKK.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.BKE0tKKK.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.BCy3UgNz.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/2.BCy3UgNz.js.gz +0 -0
- package/dist/ui/server/_app/immutable/assets/_page.CtITS5jU.css +0 -1
|
@@ -251,7 +251,7 @@ function server_data_serializer(event, state) {
|
|
|
251
251
|
let promise_id = 1;
|
|
252
252
|
let max_nodes = -1;
|
|
253
253
|
const iterator = create_async_iterator();
|
|
254
|
-
const global = "
|
|
254
|
+
const global = "__sveltekit_1ayqyt3";
|
|
255
255
|
/** @param {number} index */
|
|
256
256
|
function get_replacer(index) {
|
|
257
257
|
/** @param {any} thing */
|
|
@@ -1480,7 +1480,7 @@ async function render_response({ branch, fetched, page_config, status, error = n
|
|
|
1480
1480
|
"crossorigin"
|
|
1481
1481
|
]);
|
|
1482
1482
|
}
|
|
1483
|
-
const global = "
|
|
1483
|
+
const global = "__sveltekit_1ayqyt3";
|
|
1484
1484
|
const { data, chunks } = data_serializer.get_data(csp);
|
|
1485
1485
|
if (page_config.ssr && page_config.csr) body += `\n\t\t\t${fetched.map((item) => serialize_data(item, resolve_opts.filterSerializedResponseHeaders, is_prerendering(state))).join("\n ")}`;
|
|
1486
1486
|
if (page_config.csr && client) {
|
|
@@ -1504,7 +1504,7 @@ async function render_response({ branch, fetched, page_config, status, error = n
|
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
1506
1506
|
const blocks = [];
|
|
1507
|
-
const properties = [`base: ${base_expression}`, `version: ${s("
|
|
1507
|
+
const properties = [`base: ${base_expression}`, `version: ${s("1795259058920")}`];
|
|
1508
1508
|
if (assets) properties.push(`assets: ${s(assets)}`);
|
|
1509
1509
|
if (client.uses_env_dynamic_public) properties.push(`env: ${load_env_eagerly ? "null" : uneval$1(rendered_env)}`);
|
|
1510
1510
|
if (chunks) {
|
|
@@ -2122,7 +2122,7 @@ function is_prerendering(state) {
|
|
|
2122
2122
|
* @param {Response} response
|
|
2123
2123
|
*/
|
|
2124
2124
|
function with_version_header(response) {
|
|
2125
|
-
response.headers.set("x-sveltekit-version", "
|
|
2125
|
+
response.headers.set("x-sveltekit-version", "1795259058920");
|
|
2126
2126
|
return response;
|
|
2127
2127
|
}
|
|
2128
2128
|
/**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { t as error } from "../../../../../chunks/exports.js";
|
|
2
|
+
import { t as bridgeApiFromEnv } from "../../../../../chunks/bridge-api.js";
|
|
3
|
+
// src/routes/api/sessions/[id]/+server.ts
|
|
4
|
+
/** Deletes an ended session and its speech (the bridge refuses the current one). */
|
|
5
|
+
var DELETE = async ({ params, fetch }) => {
|
|
6
|
+
const id = Number(params.id);
|
|
7
|
+
if (!/^\d+$/.test(params.id) || !Number.isSafeInteger(id) || id < 1) error(400, "The session id must be a positive integer");
|
|
8
|
+
await bridgeApiFromEnv(fetch).deleteSession(id);
|
|
9
|
+
return new Response(null, { status: 204 });
|
|
10
|
+
};
|
|
11
|
+
export { DELETE };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=_server.ts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../../src/routes/api/sessions/[id]/+server.ts"],"sourcesContent":["import { error } from '@sveltejs/kit';\nimport { bridgeApiFromEnv } from '#lib/server/bridge-api.js';\nimport type { RequestHandler } from './$types';\n\n/** Deletes an ended session and its speech (the bridge refuses the current one). */\nexport const DELETE: RequestHandler = async ({ params, fetch }) => {\n const id = Number(params.id);\n if (!/^\\d+$/.test(params.id) || !Number.isSafeInteger(id) || id < 1) {\n error(400, 'The session id must be a positive integer');\n }\n await bridgeApiFromEnv(fetch).deleteSession(id);\n return new Response(null, { status: 204 });\n};\n"],"mappings":";;;;AAKA,IAAa,SAAyB,OAAO,EAAE,QAAQ,YAAY;CACjE,MAAM,KAAK,OAAO,OAAO,EAAE;CAC3B,IAAI,CAAC,QAAQ,KAAK,OAAO,EAAE,KAAK,CAAC,OAAO,cAAc,EAAE,KAAK,KAAK,GAChE,MAAM,KAAK,2CAA2C;CAExD,MAAM,iBAAiB,KAAK,CAAC,CAAC,cAAc,EAAE;CAC9C,OAAO,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;AAC3C"}
|
|
@@ -2,7 +2,7 @@ import { mt as resolve } from "../../chunks/internal.js";
|
|
|
2
2
|
import { f as escape_html, i as ensure_array_like, l as attr, n as attr_style, r as derived, t as attr_class, u as clsx } from "../../chunks/server2.js";
|
|
3
3
|
import { t as page } from "../../chunks/state.js";
|
|
4
4
|
import { n as goto } from "../../chunks/navigation.js";
|
|
5
|
-
import { A as
|
|
5
|
+
import { A as e$1, C as i$2, D as T, E, F as __decorate, M as n$2, N as i$3, O as Z, P as t$1, S as t$2, T as B, _ as u$1, b as e$4, c as formatReceivedTime, d as getFormValue, f as mixinFormAssociated, g as i$5, h as mixinDelegatesAria, j as r$1, k as e$2, l as logHeading, m as mixinElementInternals, n as sessionsStore, o as canAddMarker, p as internals, r as speechStore, s as canDeleteSession, t as sessionsPaneStore, u as mixinFormSubmitter, v as EASING, w as A, x as i$4, y as e$3 } from "../../chunks/composition.js";
|
|
6
6
|
import { d as API_LIMITS } from "../../chunks/src.js";
|
|
7
7
|
// ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/query-assigned-elements.js
|
|
8
8
|
/**
|
|
@@ -1038,6 +1038,18 @@ styles$4.styleSheet;
|
|
|
1038
1038
|
var MdDialog = class MdDialog extends Dialog {};
|
|
1039
1039
|
MdDialog.styles = [styles$4];
|
|
1040
1040
|
MdDialog = __decorate([t$1("md-dialog")], MdDialog);
|
|
1041
|
+
// src/lib/components/SpeechLog/DeleteSessionDialog.svelte
|
|
1042
|
+
function DeleteSessionDialog($$renderer, $$props) {
|
|
1043
|
+
$$renderer.component(($$renderer) => {
|
|
1044
|
+
/** `#3 Checkout flow` */
|
|
1045
|
+
/** Rejects with a message to show; resolves when the session is deleted. */
|
|
1046
|
+
let { open, heading, onDelete, onClose } = $$props;
|
|
1047
|
+
let busy = false;
|
|
1048
|
+
$$renderer.push(`<md-dialog${attr("open", open, true)} class="svelte-1sof82u"><div slot="headline">Delete session?</div> <div slot="content"><p class="svelte-1sof82u"><strong>${escape_html(heading)}</strong> and its speech are removed from the bridge. This cannot be undone.</p> `);
|
|
1049
|
+
$$renderer.push("<!--[-1-->");
|
|
1050
|
+
$$renderer.push(`<!--]--></div> <div slot="actions"><md-text-button type="button">Cancel</md-text-button> <md-text-button type="button"${attr("disabled", busy, true)}>Delete</md-text-button></div></md-dialog>`);
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1041
1053
|
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/field/internal/field.js
|
|
1042
1054
|
/**
|
|
1043
1055
|
* @license
|
|
@@ -2551,11 +2563,21 @@ function SpeechLog($$renderer, $$props) {
|
|
|
2551
2563
|
/** Oldest first. */
|
|
2552
2564
|
/** Whether a marker added now shows up in this log (see `canAddMarker`). */
|
|
2553
2565
|
/** Rejects with a message to show; resolves when the marker is in. */
|
|
2554
|
-
|
|
2566
|
+
/** Whether the shown scope is an ended session that can be deleted (see `canDeleteSession`). */
|
|
2567
|
+
/** Rejects with a message to show; resolves when the session is deleted. */
|
|
2568
|
+
let { heading, entries, connection, canMark, onAddMarker, canDelete, onDelete } = $$props;
|
|
2555
2569
|
let markerOpen = false;
|
|
2570
|
+
let deleteOpen = false;
|
|
2556
2571
|
$$renderer.push(`<section class="log svelte-1jnrixz" aria-labelledby="log-heading"><header class="svelte-1jnrixz"><h1 id="log-heading" class="trunc svelte-1jnrixz">${escape_html(heading)}</h1> `);
|
|
2557
|
-
if (canMark
|
|
2558
|
-
|
|
2572
|
+
if (canMark || canDelete) {
|
|
2573
|
+
$$renderer.push(`<!--[0--><div role="toolbar" aria-label="Log actions">`);
|
|
2574
|
+
if (canMark) $$renderer.push(`<!--[0--><md-icon-button title="Add marker" aria-label="Add marker"><md-icon aria-hidden="true">bookmark_add</md-icon></md-icon-button>`);
|
|
2575
|
+
else $$renderer.push("<!--[-1-->");
|
|
2576
|
+
$$renderer.push(`<!--]--> `);
|
|
2577
|
+
if (canDelete) $$renderer.push(`<!--[0--><md-icon-button title="Delete session" aria-label="Delete session"><md-icon aria-hidden="true">delete</md-icon></md-icon-button>`);
|
|
2578
|
+
else $$renderer.push("<!--[-1-->");
|
|
2579
|
+
$$renderer.push(`<!--]--></div>`);
|
|
2580
|
+
} else $$renderer.push("<!--[-1-->");
|
|
2559
2581
|
$$renderer.push(`<!--]--></header> <div class="scroll svelte-1jnrixz" role="region" aria-label="Speech log" aria-live="off" tabindex="0">`);
|
|
2560
2582
|
SpeechTable($$renderer, { entries });
|
|
2561
2583
|
$$renderer.push(`<!----> `);
|
|
@@ -2584,6 +2606,16 @@ function SpeechLog($$renderer, $$props) {
|
|
|
2584
2606
|
onClose: () => markerOpen = false
|
|
2585
2607
|
});
|
|
2586
2608
|
} else $$renderer.push("<!--[-1-->");
|
|
2609
|
+
$$renderer.push(`<!--]--> `);
|
|
2610
|
+
if (canDelete) {
|
|
2611
|
+
$$renderer.push("<!--[0-->");
|
|
2612
|
+
DeleteSessionDialog($$renderer, {
|
|
2613
|
+
open: deleteOpen,
|
|
2614
|
+
heading,
|
|
2615
|
+
onDelete,
|
|
2616
|
+
onClose: () => deleteOpen = false
|
|
2617
|
+
});
|
|
2618
|
+
} else $$renderer.push("<!--[-1-->");
|
|
2587
2619
|
$$renderer.push(`<!--]-->`);
|
|
2588
2620
|
});
|
|
2589
2621
|
}
|
|
@@ -2662,6 +2694,16 @@ function selectedScope(requested, sessions, currentId) {
|
|
|
2662
2694
|
if (id !== null && sessions.some((session) => session.id === id)) return id;
|
|
2663
2695
|
return currentId ?? "none";
|
|
2664
2696
|
}
|
|
2697
|
+
/**
|
|
2698
|
+
* The session to show once `deletedId` is gone: the next older one, else the next newer one
|
|
2699
|
+
* (`sessions` is newest first), else `null`, which the page resolves to the current session or the
|
|
2700
|
+
* speech outside any session (`selectedScope`).
|
|
2701
|
+
*/
|
|
2702
|
+
function scopeAfterDelete(deletedId, sessions) {
|
|
2703
|
+
const at = sessions.findIndex((session) => session.id === deletedId);
|
|
2704
|
+
if (at === -1) return null;
|
|
2705
|
+
return (sessions[at + 1] ?? sessions[at - 1])?.id ?? null;
|
|
2706
|
+
}
|
|
2665
2707
|
// src/lib/components/SessionsPane/EndSessionDialog.svelte
|
|
2666
2708
|
function EndSessionDialog($$renderer, $$props) {
|
|
2667
2709
|
$$renderer.component(($$renderer) => {
|
|
@@ -2802,6 +2844,7 @@ function _page($$renderer, $$props) {
|
|
|
2802
2844
|
const selectedId = derived(() => selectedScope(page.url.searchParams.get("session"), list().sessions, list().currentId));
|
|
2803
2845
|
const heading = derived(() => logHeading(selectedId(), list().sessions));
|
|
2804
2846
|
const canMark = derived(() => canAddMarker(selectedId(), list().currentId));
|
|
2847
|
+
const canDelete = derived(() => canDeleteSession(selectedId(), list().currentId));
|
|
2805
2848
|
function select(id) {
|
|
2806
2849
|
return goto(id === null ? resolve("/") : `${resolve("/")}?session=${id}`, { reset: false });
|
|
2807
2850
|
}
|
|
@@ -2810,6 +2853,12 @@ function _page($$renderer, $$props) {
|
|
|
2810
2853
|
await sessionsStore.end();
|
|
2811
2854
|
if (ended !== null && !list().sessions.some((session) => session.id === ended)) await select(null);
|
|
2812
2855
|
}
|
|
2856
|
+
async function remove() {
|
|
2857
|
+
if (typeof selectedId() !== "number") return;
|
|
2858
|
+
const next = scopeAfterDelete(selectedId(), list().sessions);
|
|
2859
|
+
await sessionsStore.delete(selectedId());
|
|
2860
|
+
await select(next);
|
|
2861
|
+
}
|
|
2813
2862
|
async function start(name, run) {
|
|
2814
2863
|
await select((await sessionsStore.start(name, run)).id);
|
|
2815
2864
|
}
|
|
@@ -2832,7 +2881,9 @@ function _page($$renderer, $$props) {
|
|
|
2832
2881
|
entries: speechStore.entries,
|
|
2833
2882
|
connection: speechStore.connection,
|
|
2834
2883
|
canMark: canMark(),
|
|
2835
|
-
onAddMarker: (label) => speechStore.addMarker(label)
|
|
2884
|
+
onAddMarker: (label) => speechStore.addMarker(label),
|
|
2885
|
+
canDelete: canDelete(),
|
|
2886
|
+
onDelete: remove
|
|
2836
2887
|
});
|
|
2837
2888
|
$$renderer.push(`<!----></div></div>`);
|
|
2838
2889
|
});
|