@r_masseater/masseater-utils 0.8.2 → 0.9.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.
Files changed (45) hide show
  1. package/README.md +46 -40
  2. package/dist/browser-test/vite.mjs +1 -29
  3. package/dist/browser-test-vite-DS3fTcyM.mjs +29 -0
  4. package/dist/browser-test-vite-DS3fTcyM.mjs.map +1 -0
  5. package/dist/button-980Op0uF.mjs +30 -0
  6. package/dist/button-980Op0uF.mjs.map +1 -0
  7. package/dist/desktop-shell/media-notes/protocol.d.mts +2 -0
  8. package/dist/desktop-shell/media-notes/protocol.mjs +1 -0
  9. package/dist/desktop-shell/media-notes.d.mts +125 -0
  10. package/dist/desktop-shell/media-notes.mjs +865 -0
  11. package/dist/desktop-shell/media-notes.mjs.map +1 -0
  12. package/dist/desktop-shell/release-cli.d.mts +1 -0
  13. package/dist/desktop-shell/release-cli.mjs +290 -0
  14. package/dist/desktop-shell/release-cli.mjs.map +1 -0
  15. package/dist/desktop-shell/telemetry.d.mts +5 -0
  16. package/dist/desktop-shell/telemetry.mjs +55 -0
  17. package/dist/desktop-shell/telemetry.mjs.map +1 -0
  18. package/dist/desktop-shell/vite.d.mts +24 -0
  19. package/dist/desktop-shell/vite.mjs +58 -0
  20. package/dist/desktop-shell/vite.mjs.map +1 -0
  21. package/dist/index-BtcxUsGh.d.mts +4 -0
  22. package/dist/index-CjUS4pmA.d.mts +59 -0
  23. package/dist/lapse.mjs +1 -1
  24. package/dist/media-protocol-CMyatw7A.mjs +32 -0
  25. package/dist/media-protocol-CMyatw7A.mjs.map +1 -0
  26. package/dist/node-main-Bwril94o.mjs +19 -0
  27. package/dist/node-main-Bwril94o.mjs.map +1 -0
  28. package/dist/node-main.mjs +1 -18
  29. package/dist/plugin-kit.mjs +22 -22
  30. package/dist/plugin-kit.mjs.map +1 -1
  31. package/dist/security-headers.d.mts +2 -1
  32. package/dist/ui/button.d.mts +1 -1
  33. package/dist/ui/button.mjs +1 -30
  34. package/dist/ui/next-page-trigger.mjs +1 -1
  35. package/dist/ui/page-footer.d.mts +1 -1
  36. package/dist/ui/page-header.d.mts +1 -1
  37. package/dist/ui/table.d.mts +1 -1
  38. package/dist/ui/web-analytics.d.mts +1 -0
  39. package/dist/vitest-otlp/workers.mjs +1 -1
  40. package/dist/workers-tracing/alchemy.d.mts +1 -1
  41. package/package.json +125 -56
  42. package/skills/build-tauri-app/SKILL.md +56 -0
  43. package/dist/browser-test/vite.mjs.map +0 -1
  44. package/dist/node-main.mjs.map +0 -1
  45. package/dist/ui/button.mjs.map +0 -1
package/README.md CHANGED
@@ -8,54 +8,60 @@ It requires Node.js 26 or later.
8
8
  vp add @r_masseater/masseater-utils
9
9
  ```
10
10
 
11
- | Subpath | What it does |
12
- | ----------------------------------------------- | -------------------------------------------------------------------------- |
13
- | `@r_masseater/masseater-utils/skerm` | A horizontally scrolling row of chips for React. |
14
- | `@r_masseater/masseater-utils/plugin-kit` | Shared code for Claude Code plugin hooks and scripts. |
15
- | `@r_masseater/masseater-utils/model-server` | Local models that every Claude Code plugin hook shares, in one process. |
16
- | `@r_masseater/masseater-utils/node-main` | Runs an Effect program as a Node.js entry point. |
17
- | `@r_masseater/masseater-utils/github-workflow` | Helpers for GitHub Actions steps written with Effect. |
18
- | `@r_masseater/masseater-utils/mapped-import` | Imports files in your own format from TypeScript. |
19
- | `@r_masseater/masseater-utils/kestrion` | The Node.js package ecosystem as Effect. |
20
- | `@r_masseater/masseater-utils/vitest-otlp` | A Vitest plugin that receives OTLP telemetry during tests. |
21
- | `@r_masseater/masseater-utils/workers-tracing` | Effect, TanStack Start and Elysia spans in Cloudflare Workers traces. |
22
- | `@r_masseater/masseater-utils/effect2rs` | Serde Rust types generated from Effect Schema. |
23
- | `@r_masseater/masseater-utils/effect2cs` | C# types generated from Effect Schema. |
24
- | `@r_masseater/masseater-utils/process` | Runs commands and reads their output with Effect. |
25
- | `@r_masseater/masseater-utils/security-headers` | Security headers for sites, with HTTP, response, static and Vite entries. |
26
- | `@r_masseater/masseater-utils/lapse` | A Vite plugin that sends Vitest's spans when an OTLP endpoint is set. |
27
- | `@r_masseater/masseater-utils/local-server` | Address and token discovery for apps that talk to a server on the same PC. |
28
- | `@r_masseater/masseater-utils/browser-test` | Vite settings for Vitest browser tests that compare screenshots. |
29
- | `@r_masseater/masseater-utils/ui` | masseater's shared look: buttons, headings, tables and the theme. |
30
- | `@r_masseater/masseater-utils/yohaku-protocol` | Types shared by the Yohaku app and its sync service. |
11
+ | Subpath | What it does |
12
+ | ----------------------------------------------- | ---------------------------------------------------------------------------- |
13
+ | `@r_masseater/masseater-utils/skerm` | A horizontally scrolling row of chips for React. |
14
+ | `@r_masseater/masseater-utils/plugin-kit` | Shared code for Claude Code plugin hooks and scripts. |
15
+ | `@r_masseater/masseater-utils/model-server` | Local models that every Claude Code plugin hook shares, in one process. |
16
+ | `@r_masseater/masseater-utils/node-main` | Runs an Effect program as a Node.js entry point. |
17
+ | `@r_masseater/masseater-utils/github-workflow` | Helpers for GitHub Actions steps written with Effect. |
18
+ | `@r_masseater/masseater-utils/mapped-import` | Imports files in your own format from TypeScript. |
19
+ | `@r_masseater/masseater-utils/kestrion` | The Node.js package ecosystem as Effect. |
20
+ | `@r_masseater/masseater-utils/vitest-otlp` | A Vitest plugin that receives OTLP telemetry during tests. |
21
+ | `@r_masseater/masseater-utils/workers-tracing` | Effect, TanStack Start and Elysia spans in Cloudflare Workers traces. |
22
+ | `@r_masseater/masseater-utils/effect2rs` | Serde Rust types generated from Effect Schema. |
23
+ | `@r_masseater/masseater-utils/effect2cs` | C# types generated from Effect Schema. |
24
+ | `@r_masseater/masseater-utils/process` | Runs commands and reads their output with Effect. |
25
+ | `@r_masseater/masseater-utils/security-headers` | Security headers for sites, with HTTP, response, static and Vite entries. |
26
+ | `@r_masseater/masseater-utils/lapse` | A Vite plugin that sends Vitest's spans when an OTLP endpoint is set. |
27
+ | `@r_masseater/masseater-utils/local-server` | Address and token discovery for apps that talk to a server on the same PC. |
28
+ | `@r_masseater/masseater-utils/browser-test` | Vite settings for Vitest browser tests that compare screenshots. |
29
+ | `@r_masseater/masseater-utils/ui` | masseater's shared look: buttons, headings, tables and the theme. |
30
+ | `@r_masseater/masseater-utils/yohaku-protocol` | Types shared by the Yohaku app and its sync service. |
31
+ | `@r_masseater/masseater-utils/desktop-shell` | What Tauri desktop apps share: screen telemetry, Vite settings, media-notes. |
31
32
 
32
33
  ## Install what a subpath needs
33
34
 
34
35
  Install the peer dependencies of the subpath you import, and nothing else. A subpath that needs no extra package installs this package alone.
35
36
 
36
- | Subpath | Install besides this package |
37
- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
38
- | `skerm` | `react` |
39
- | `plugin-kit` | `effect` and `@effect/platform-node` |
40
- | `model-server` | Nothing. The server installs its inference runtime into the user's cache folder with `npm` on the first call. |
41
- | `node-main` | `effect` and `@effect/platform-node` |
42
- | `github-workflow` | `effect` |
43
- | `mapped-import` | `effect` and `ts-content-mapper`, plus `vite-plus` for `mapped-import/vite` |
44
- | `kestrion` | `effect`, plus the readers of the entry you use: `@npmcli/package-json` for `kestrion/npm`, the `@pnpm/*` readers for `kestrion/pnpm` |
45
- | `vitest-otlp` | `effect`, `@bufbuild/protobuf` and `vite-plus` |
46
- | `workers-tracing` | `effect`, plus `@tanstack/react-start`, `elysia`, `alchemy` or `@alchemy.run/cloudflare` for the entry that wraps them |
47
- | `effect2rs` | `effect` |
48
- | `effect2cs` | `effect` and `quicktype-core` |
49
- | `process` | `effect` |
50
- | `security-headers` | `effect`, plus `vite-plus` for `security-headers/vite` |
51
- | `lapse` | `effect`, `vite-plus`, `@opentelemetry/sdk-node` and `@opentelemetry/exporter-trace-otlp-http` |
52
- | `local-server` | `effect`, plus `@effect/platform-node`, `@effect/sql-sqlite-node` and `srvx` for `local-server/node` and `local-server/serve` |
53
- | `browser-test` | `vite-plus`, `@vitest/browser-playwright`, `playwright` and `dejavu-fonts-ttf` |
54
- | `ui` | `react`, `tailwindcss`, `tw-animate-css`, `@fontsource-variable/roboto-flex`, `class-variance-authority`, `clsx`, `tailwind-merge` and `radix-ui` |
55
- | `yohaku-protocol` | `effect` |
37
+ | Subpath | Install besides this package |
38
+ | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
39
+ | `skerm` | `react` |
40
+ | `plugin-kit` | `effect` and `@effect/platform-node` |
41
+ | `model-server` | Nothing. The server installs its inference runtime into the user's cache folder with `npm` on the first call. |
42
+ | `node-main` | `effect` and `@effect/platform-node` |
43
+ | `github-workflow` | `effect` |
44
+ | `mapped-import` | `effect` and `ts-content-mapper`, plus `vite-plus` for `mapped-import/vite` |
45
+ | `kestrion` | `effect`, plus the readers of the entry you use: `@npmcli/package-json` for `kestrion/npm`, the `@pnpm/*` readers for `kestrion/pnpm` |
46
+ | `vitest-otlp` | `effect`, `@bufbuild/protobuf` and `vite-plus` |
47
+ | `workers-tracing` | `effect`, plus `@tanstack/react-start`, `elysia`, `alchemy` or `@alchemy.run/cloudflare` for the entry that wraps them |
48
+ | `effect2rs` | `effect` |
49
+ | `effect2cs` | `effect` and `quicktype-core` |
50
+ | `process` | `effect` |
51
+ | `security-headers` | `effect`, plus `vite-plus` for `security-headers/vite` |
52
+ | `lapse` | `effect`, `vite-plus`, `@opentelemetry/sdk-node` and `@opentelemetry/exporter-trace-otlp-http` |
53
+ | `local-server` | `effect`, plus `@effect/platform-node`, `@effect/sql-sqlite-node` and `srvx` for `local-server/node` and `local-server/serve` |
54
+ | `browser-test` | `vite-plus`, `@vitest/browser-playwright`, `playwright` and `dejavu-fonts-ttf` |
55
+ | `ui` | `react`, `tailwindcss`, `tw-animate-css`, `@fontsource-variable/roboto-flex`, `class-variance-authority`, `clsx`, `tailwind-merge` and `radix-ui` |
56
+ | `yohaku-protocol` | `effect` |
57
+ | `desktop-shell` | `effect` and `@effect/platform-node`, plus `@tauri-apps/api` and the `@opentelemetry/*` browser packages for `desktop-shell/telemetry`, `vite-plus`, `@tailwindcss/vite` and `@vitejs/plugin-react` for `desktop-shell/vite`, and `react`, `@effect/atom-react`, `@tauri-apps/api`, `lucide-react` and `niconico-embed-player` for `desktop-shell/media-notes` |
56
58
 
57
59
  The `peerDependencies` of `package.json` are the exact list with ranges.
58
60
 
61
+ ## Tauri desktop apps
62
+
63
+ The release commands run through `tauriReleaseTasks` and `bundleCollect` of `desktop-shell/vite`: `bundle-collect <kind>` copies a Tauri bundle and its signature into `release-assets/`, `updater-feed` writes the updater feed of a released version to the `<name>-updater` GitHub Release, and `updater-key` makes the updater signing key in the `<name>-release` environment and prints the public key. The Rust crates `desktop-shell` and `media-notes` are in `native/`; depend on them with a git dependency on this repository pinned to a commit.
64
+
59
65
  ## Examples
60
66
 
61
67
  Import an entry and call it. Each snippet is the shortest working use.
@@ -1,29 +1 @@
1
- import { fileURLToPath } from "node:url";
2
- import { playwright } from "vite-plus/test/browser-playwright";
3
- // src/app/browser-test-vite.ts
4
- const FONTCONFIG_FILE = fileURLToPath(import.meta.resolve("@r_masseater/masseater-utils/browser-test/fonts.conf"));
5
- const FONT_HOME = fileURLToPath(new URL("..", import.meta.resolve("dejavu-fonts-ttf/ttf/DejaVuSans.ttf")));
6
- const ALLOWED_MISMATCHED_PIXELS = .002;
7
- const browserTest = (viewport) => ({ test: {
8
- api: { port: 0 },
9
- browser: {
10
- enabled: true,
11
- headless: true,
12
- provider: playwright({ launchOptions: {
13
- channel: "chrome",
14
- env: {
15
- FONTCONFIG_FILE,
16
- XDG_DATA_HOME: FONT_HOME
17
- }
18
- } }),
19
- instances: [{ browser: "chromium" }],
20
- viewport: { ...viewport },
21
- expect: { toMatchScreenshot: {
22
- comparatorName: "pixelmatch",
23
- comparatorOptions: { allowedMismatchedPixelRatio: ALLOWED_MISMATCHED_PIXELS }
24
- } }
25
- }
26
- } });
27
- export { browserTest };
28
-
29
- //# sourceMappingURL=vite.mjs.map
1
+ export { t as browserTest } from "../browser-test-vite-DS3fTcyM.mjs";
@@ -0,0 +1,29 @@
1
+ import { fileURLToPath } from "node:url";
2
+ import { playwright } from "vite-plus/test/browser-playwright";
3
+ // src/app/browser-test-vite.ts
4
+ const FONTCONFIG_FILE = fileURLToPath(import.meta.resolve("@r_masseater/masseater-utils/browser-test/fonts.conf"));
5
+ const FONT_HOME = fileURLToPath(new URL("..", import.meta.resolve("dejavu-fonts-ttf/ttf/DejaVuSans.ttf")));
6
+ const ALLOWED_MISMATCHED_PIXELS = .002;
7
+ const browserTest = (viewport) => ({ test: {
8
+ api: { port: 0 },
9
+ browser: {
10
+ enabled: true,
11
+ headless: true,
12
+ provider: playwright({ launchOptions: {
13
+ channel: "chrome",
14
+ env: {
15
+ FONTCONFIG_FILE,
16
+ XDG_DATA_HOME: FONT_HOME
17
+ }
18
+ } }),
19
+ instances: [{ browser: "chromium" }],
20
+ viewport: { ...viewport },
21
+ expect: { toMatchScreenshot: {
22
+ comparatorName: "pixelmatch",
23
+ comparatorOptions: { allowedMismatchedPixelRatio: ALLOWED_MISMATCHED_PIXELS }
24
+ } }
25
+ }
26
+ } });
27
+ export { browserTest as t };
28
+
29
+ //# sourceMappingURL=browser-test-vite-DS3fTcyM.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser-test-vite-DS3fTcyM.mjs","names":[],"sources":["../src/app/browser-test-vite.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\";\n\nimport type { UserConfig } from \"vite-plus\";\nimport { playwright } from \"vite-plus/test/browser-playwright\";\n\nconst FONTCONFIG_FILE = fileURLToPath(\n import.meta.resolve(\"@r_masseater/masseater-utils/browser-test/fonts.conf\"),\n);\nconst FONT_HOME = fileURLToPath(\n new URL(\"..\", import.meta.resolve(\"dejavu-fonts-ttf/ttf/DejaVuSans.ttf\")),\n);\nconst ALLOWED_MISMATCHED_PIXELS = 0.002;\n\nexport const browserTest = (viewport: Readonly<{ width: number; height: number }>): UserConfig => ({\n test: {\n api: { port: 0 },\n browser: {\n enabled: true,\n headless: true,\n provider: playwright({\n launchOptions: { channel: \"chrome\", env: { FONTCONFIG_FILE, XDG_DATA_HOME: FONT_HOME } },\n }),\n instances: [{ browser: \"chromium\" }],\n viewport: { ...viewport },\n expect: {\n toMatchScreenshot: {\n comparatorName: \"pixelmatch\",\n comparatorOptions: { allowedMismatchedPixelRatio: ALLOWED_MISMATCHED_PIXELS },\n },\n },\n },\n },\n});\n"],"mappings":";;;AAKA,MAAM,kBAAkB,cACtB,YAAY,QAAQ,sDAAsD,CAC5E;AACA,MAAM,YAAY,cAChB,IAAI,IAAI,MAAM,YAAY,QAAQ,qCAAqC,CAAC,CAC1E;AACA,MAAM,4BAA4B;AAElC,MAAa,eAAe,cAAuE,EACjG,MAAM;CACJ,KAAK,EAAE,MAAM,EAAE;CACf,SAAS;EACP,SAAS;EACT,UAAU;EACV,UAAU,WAAW,EACnB,eAAe;GAAE,SAAS;GAAU,KAAK;IAAE;IAAiB,eAAe;GAAU;EAAE,EACzF,CAAC;EACD,WAAW,CAAC,EAAE,SAAS,WAAW,CAAC;EACnC,UAAU,EAAE,GAAG,SAAS;EACxB,QAAQ,EACN,mBAAmB;GACjB,gBAAgB;GAChB,mBAAmB,EAAE,6BAA6B,0BAA0B;EAC9E,EACF;CACF;AACF,EACF"}
@@ -0,0 +1,30 @@
1
+ import { t as buttonVariants } from "./button-variants-BLMlMm-s.mjs";
2
+ import { t as cn } from "./cn-DtxpfSUK.mjs";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { Slot } from "radix-ui";
5
+ // src/shared/ui/button.tsx
6
+ const Button = ({ className, variant = "default", size = "default", asChild = false, ...props }) => {
7
+ const classes = cn(buttonVariants({
8
+ variant,
9
+ size,
10
+ className
11
+ }));
12
+ if (asChild) return /* @__PURE__ */ jsx(Slot.Root, {
13
+ "data-slot": "button",
14
+ "data-variant": variant,
15
+ "data-size": size,
16
+ className: classes,
17
+ ...props
18
+ });
19
+ return /* @__PURE__ */ jsx("button", {
20
+ type: "button",
21
+ "data-slot": "button",
22
+ "data-variant": variant,
23
+ "data-size": size,
24
+ className: classes,
25
+ ...props
26
+ });
27
+ };
28
+ export { Button as t };
29
+
30
+ //# sourceMappingURL=button-980Op0uF.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-980Op0uF.mjs","names":[],"sources":["../src/shared/ui/button.tsx"],"sourcesContent":["import type { VariantProps } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\nimport type { ComponentProps, ReactNode } from \"react\";\n\nimport { buttonVariants } from \"#/shared/lib/button-variants.ts\";\nimport { cn } from \"#/shared/lib/cn.ts\";\n\nexport const Button = ({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n ...props\n}: ComponentProps<\"button\"> &\n Readonly<VariantProps<typeof buttonVariants>> &\n Readonly<{ asChild?: boolean }>): ReactNode => {\n const classes = cn(buttonVariants({ variant, size, className }));\n if (asChild) {\n return (\n <Slot.Root\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n className={classes}\n {...props}\n />\n );\n }\n return (\n <button\n type=\"button\"\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n className={classes}\n {...props}\n />\n );\n};\n"],"mappings":";;;;;AAOA,MAAa,UAAU,EACrB,WACA,UAAU,WACV,OAAO,WACP,UAAU,OACV,GAAG,YAG4C;CAC/C,MAAM,UAAU,GAAG,eAAe;EAAE;EAAS;EAAM;CAAU,CAAC,CAAC;CAC/D,IAAI,SACF,OACE,oBAAC,KAAK,MAAN;EACE,aAAU;EACV,gBAAc;EACd,aAAW;EACX,WAAW;EACX,GAAI;CACL,CAAA;CAGL,OACE,oBAAC,UAAD;EACE,MAAK;EACL,aAAU;EACV,gBAAc;EACd,aAAW;EACX,WAAW;EACX,GAAI;CACL,CAAA;AAEL"}
@@ -0,0 +1,2 @@
1
+ import { a as McpAccessSchema, c as Opened, d as SavedSchema, f as Site, h as SourceSchema, i as McpAccess, l as OpenedSchema, m as Source, o as Media, p as SiteSchema, s as MediaSchema, u as Saved } from "../../index-CjUS4pmA.mjs";
2
+ export { type McpAccess, McpAccessSchema, type Media, MediaSchema, type Opened, OpenedSchema, type Saved, SavedSchema, type Site, SiteSchema, type Source, SourceSchema };
@@ -0,0 +1 @@
1
+ export { t as McpAccessSchema, n as MediaSchema, r as OpenedSchema, i as SavedSchema, a as SiteSchema, o as SourceSchema } from "../../media-protocol-CMyatw7A.mjs";
@@ -0,0 +1,125 @@
1
+ import { c as Opened, m as Source, n as settledAs, o as Media, r as ApiFailed, t as settled } from "../index-CjUS4pmA.mjs";
2
+ import { t as SITE_NAMES } from "../index-BtcxUsGh.mjs";
3
+ import { Cause, Effect, Option } from "effect";
4
+ import { AsyncResult, Atom, AtomRegistry } from "effect/reactivity";
5
+ import { ReactNode, SubmitEvent } from "react";
6
+ import { KeyValueStore } from "effect/persistence";
7
+ /** @internal */
8
+ export declare const openedAtom: Atom.Writable<Option.Option<{
9
+ readonly media: {
10
+ readonly source: {
11
+ readonly site: "file" | "niconico" | "soundcloud" | "youtube";
12
+ readonly id: string;
13
+ };
14
+ readonly title: string;
15
+ readonly artist: string;
16
+ };
17
+ readonly location: string;
18
+ }>, Option.Option<{
19
+ readonly media: {
20
+ readonly source: {
21
+ readonly site: "file" | "niconico" | "soundcloud" | "youtube";
22
+ readonly id: string;
23
+ };
24
+ readonly title: string;
25
+ readonly artist: string;
26
+ };
27
+ readonly location: string;
28
+ }>>;
29
+ export declare const keyOf: ({ site, id }: Source) => string;
30
+ export declare const pageOf: ({ site, id }: Source) => Option.Option<string>;
31
+ export declare const MediaMeta: ({ media, duration }: Readonly<{
32
+ media: Media;
33
+ duration: number;
34
+ }>) => ReactNode;
35
+ export declare const CopyMcpCommand: ({ name }: Readonly<{
36
+ name: string;
37
+ }>) => ReactNode;
38
+ /** @internal */
39
+ export declare const linkAtom: Atom.Writable<string, string>;
40
+ /** @internal */
41
+ export declare const openLinkAtom: Atom.AtomResultFn<string, void, ApiFailed>;
42
+ /** @internal */
43
+ export declare const openFileAtom: Atom.AtomResultFn<string, void, ApiFailed>;
44
+ /** @internal */
45
+ export declare const chooseFileAtom: Atom.AtomResultFn<void, void, ApiFailed>;
46
+ export declare const OpenBar: ({ files, label }: Readonly<{
47
+ files: boolean;
48
+ label: string;
49
+ }>) => ReactNode;
50
+ type Position = Readonly<{
51
+ current: number;
52
+ duration: number;
53
+ }>;
54
+ type Player = Readonly<{
55
+ time: () => Position;
56
+ seek: (seconds: number) => void;
57
+ toggle: () => void;
58
+ }>;
59
+ export declare const usePlayer: () => Option.Option<Player>;
60
+ export declare const usePosition: () => Position;
61
+ export declare const usePlayKey: (player: Option.Option<Player>) => void;
62
+ type Hint = Readonly<{
63
+ key: string;
64
+ meaning: string;
65
+ }>;
66
+ export declare const KeyHints: ({ hints }: Readonly<{
67
+ hints: readonly Hint[];
68
+ }>) => ReactNode;
69
+ export declare const MediaPlayer: () => ReactNode;
70
+ type Range = Readonly<{
71
+ from: number;
72
+ to: number;
73
+ }>;
74
+ type Tone = "plain" | "warn" | "faint" | "guess" | "guess-warn";
75
+ type Span = Readonly<{
76
+ key: string;
77
+ from: number;
78
+ to: number;
79
+ tone: Tone;
80
+ }>;
81
+ /** @internal */
82
+ export declare const perMedia: <Value>(initial: Value) => Atom.Writable<Value>;
83
+ /** @internal */
84
+ export declare const rangeAtom: Atom.Writable<Option.Option<Readonly<{
85
+ from: number;
86
+ to: number;
87
+ }>>, Option.Option<Readonly<{
88
+ from: number;
89
+ to: number;
90
+ }>>>;
91
+ /** @internal */
92
+ export declare const anchorAtom: Atom.Writable<Option.Option<number>, Option.Option<number>>;
93
+ export declare const RangeReadout: () => ReactNode;
94
+ export declare const Timeline: ({ position, spans, seek }: Readonly<{
95
+ position: Position;
96
+ spans: readonly Span[];
97
+ seek: (seconds: number) => void;
98
+ }>) => ReactNode;
99
+ export declare const useRangeKey: (player: Option.Option<Player>) => void;
100
+ export declare const clock: (seconds: number) => string;
101
+ export declare const preciseClock: (seconds: number) => string;
102
+ export declare const ignoredKey: (event: KeyboardEvent) => boolean;
103
+ /** @internal */
104
+ export declare const runtime: Atom.AtomRuntime<KeyValueStore.KeyValueStore, never>;
105
+ export declare const MediaStage: ({ media, spans, hints }: Readonly<{
106
+ media: Media;
107
+ spans: readonly Span[];
108
+ hints: readonly Hint[];
109
+ }>) => ReactNode;
110
+ export declare const useJump: () => ((range: Range) => void);
111
+ type Post<Failure> = (opened: Opened, range: Range) => Effect.Effect<void, Failure>;
112
+ /** @internal */
113
+ export declare const savedRange: <Failure>(post: Post<Failure>) => Effect.Effect<AtomRegistry.AtomRegistry, Failure | Cause.NoSuchElementError, AtomRegistry.AtomRegistry>;
114
+ /** @internal */
115
+ export declare const useSubmit: <Failure>(save: Readonly<Atom.AtomResultFn<void, void, Failure>>) => Readonly<{
116
+ waiting: boolean;
117
+ submit: (event: SubmitEvent<HTMLFormElement>) => void;
118
+ }>;
119
+ type Following = Readonly<{
120
+ event: string;
121
+ refresh: () => void;
122
+ }>;
123
+ export declare const useFollowing: ({ event, refresh }: Following) => void;
124
+ export { ApiFailed, type Hint, type Player, type Position, type Range, SITE_NAMES, type Span, type Tone, settled, settledAs };
125
+ //# sourceMappingURL=media-notes.d.mts.map