@automovie/viewer 0.2.0 → 0.3.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/lib/inspector/AutoMovieInspector.js.map +1 -1
- package/lib/inspector/AutoMovieInspector.mjs.map +1 -1
- package/lib/inspector/AutoMovieInspectorMarksPanel.d.ts +2 -1
- package/lib/inspector/AutoMovieInspectorMarksPanel.js.map +1 -1
- package/lib/inspector/AutoMovieInspectorMarksPanel.mjs.map +1 -1
- package/lib/inspector/AutoMovieInspectorRequestPanel.d.ts +1 -1
- package/lib/inspector/AutoMovieInspectorRequestPanel.js.map +1 -1
- package/lib/inspector/AutoMovieInspectorRequestPanel.mjs.map +1 -1
- package/lib/inspector/AutoMovieInspectorSelectionPanel.d.ts +1 -1
- package/lib/inspector/AutoMovieInspectorSelectionPanel.js.map +1 -1
- package/lib/inspector/AutoMovieInspectorSelectionPanel.mjs.map +1 -1
- package/lib/inspector/AutoMovieInspectorShadePanel.d.ts +1 -1
- package/lib/inspector/AutoMovieInspectorShadePanel.js.map +1 -1
- package/lib/inspector/AutoMovieInspectorShadePanel.mjs.map +1 -1
- package/lib/inspector/AutoMovieInspectorViewPanel.d.ts +1 -1
- package/lib/inspector/AutoMovieInspectorViewPanel.js.map +1 -1
- package/lib/inspector/AutoMovieInspectorViewPanel.mjs.map +1 -1
- package/lib/inspector/IAutoMovieInspectorAction.d.ts +2 -2
- package/lib/inspector/IAutoMovieInspectorScene.d.ts +2 -1
- package/lib/inspector/IAutoMovieInspectorState.d.ts +1 -1
- package/lib/inspector/formatAutoMovieInspectorAddress.d.ts +1 -1
- package/lib/inspector/formatAutoMovieInspectorAddress.js.map +1 -1
- package/lib/inspector/formatAutoMovieInspectorAddress.mjs.map +1 -1
- package/lib/inspector/formatAutoMovieInspectorCommand.d.ts +1 -1
- package/lib/inspector/formatAutoMovieInspectorCommand.js.map +1 -1
- package/lib/inspector/formatAutoMovieInspectorCommand.mjs.map +1 -1
- package/lib/inspector/mountAutoMovieInspectorScene.d.ts +2 -1
- package/lib/inspector/mountAutoMovieInspectorScene.js.map +1 -1
- package/lib/inspector/mountAutoMovieInspectorScene.mjs.map +1 -1
- package/lib/inspector/readAutoMovieInspectorAddress.d.ts +1 -1
- package/lib/inspector/readAutoMovieInspectorAddress.js.map +1 -1
- package/lib/inspector/readAutoMovieInspectorAddress.mjs.map +1 -1
- package/lib/inspector/reduceAutoMovieInspectorState.js.map +1 -1
- package/lib/inspector/reduceAutoMovieInspectorState.mjs.map +1 -1
- package/package.json +5 -5
- package/src/inspector/AutoMovieInspector.tsx +2 -5
- package/src/inspector/AutoMovieInspectorMarksPanel.tsx +2 -7
- package/src/inspector/AutoMovieInspectorRequestPanel.tsx +2 -1
- package/src/inspector/AutoMovieInspectorSelectionPanel.tsx +6 -3
- package/src/inspector/AutoMovieInspectorShadePanel.tsx +6 -4
- package/src/inspector/AutoMovieInspectorViewPanel.tsx +2 -6
- package/src/inspector/IAutoMovieInspectorAction.ts +3 -3
- package/src/inspector/IAutoMovieInspectorScene.ts +2 -2
- package/src/inspector/IAutoMovieInspectorState.ts +1 -1
- package/src/inspector/formatAutoMovieInspectorAddress.ts +2 -4
- package/src/inspector/formatAutoMovieInspectorCommand.ts +2 -4
- package/src/inspector/mountAutoMovieInspectorScene.ts +5 -3
- package/src/inspector/readAutoMovieInspectorAddress.ts +2 -4
- package/src/inspector/reduceAutoMovieInspectorState.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IAutoMovieCapturePlanRequest } from "@automovie/interface";
|
|
2
2
|
/**
|
|
3
3
|
* Write the `automovie capture` command that repeats a request: its options, and the command line a person copies.
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatAutoMovieInspectorCommand.js","sourceRoot":"","sources":["../../src/inspector/formatAutoMovieInspectorCommand.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"formatAutoMovieInspectorCommand.js","sourceRoot":"","sources":["../../src/inspector/formatAutoMovieInspectorCommand.ts"],"names":[],"mappings":";;;AACA,8CAAsE;AAEtE,yDAAyD;AACzD,MAAM,KAAK,GAAW,mBAAmB,CAAC;AAE1C;;;;;;;;;;;;;;;;;;GAkBG;AACH,yCACE,OAAqC;IAQrC,MAAM,OAAO,GAAa,IAAA,0CAAiC,EAAC,OAAO,CAAC,CAAC,GAAG,CACtE,CAAC,CAAC,GAAG,EAAE,KAAK,CAA+B,EAAU,EAAE,CAAC,KAAK,GAAG,IAAI,KAAK,EAAE,CAC5E,CAAC;IACF,OAAO;QACL,OAAO;QACP,IAAI,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;KAChE,CAAC;AACJ,CAAC;AAED,0CAA0C;AAC1C,SAAS,KAAK,CAAC,QAAgB;IAC7B,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC;AAC/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatAutoMovieInspectorCommand.mjs","names":[],"sources":["../../src/inspector/formatAutoMovieInspectorCommand.ts"],"sourcesContent":["import {\
|
|
1
|
+
{"version":3,"file":"formatAutoMovieInspectorCommand.mjs","names":[],"sources":["../../src/inspector/formatAutoMovieInspectorCommand.ts"],"sourcesContent":["import type { IAutoMovieCapturePlanRequest } from \"@automovie/interface\";\nimport { formatAutoMovieCapturePlanRequest } from \"@automovie/render\";\n\n/** An argument a POSIX shell passes through unquoted. */\nconst PLAIN: RegExp = /^[\\w%+,./:=@-]+$/u;\n\n/**\n * Write the `automovie capture` command that repeats a request: its options, and the command line a person copies.\n *\n * Every pair `formatAutoMovieCapturePlanRequest` writes becomes one `--<key>=<value>` option, in its order. The `=` form is used for every option, so a value that starts with `-`, such as an axis cut `-x:0.2`, or that is empty stays the option's value. `readAutoMovieCaptureArguments` reads the options back to the same named values, so the command's reader gives an equal request.\n *\n * The text is `automovie capture` followed by the options, each quoted for a POSIX shell when it holds a character outside letters, digits and `_ % + , . / : = @ -`, such as the `*` of a pattern or the `;` between views.\n *\n * ```ts\n * const { text } = formatAutoMovieInspectorCommand(request);\n * ```\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the option form and why it is used for every option, the round trip through the command's reader, the text's prefix and the quoting rule.\n * @evidence contracts/development/implementation.md#principled-implementation The grammar's writer decides keys and values and the command's own argument reader is the inverse of the `--key=value` form; a single-quoted POSIX word is literal except for `'`, which is closed, escaped and reopened.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One map to options and one join with quoting.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No option is written by hand, so the command offers exactly what the address carries.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the length of the written request.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion of one request.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns fresh strings and keeps nothing.\n */\nexport function formatAutoMovieInspectorCommand(\n request: IAutoMovieCapturePlanRequest,\n): {\n /** The options after `automovie capture`, one argument each. */\n options: string[];\n\n /** The whole command line, quoted for a POSIX shell. */\n text: string;\n} {\n const options: string[] = formatAutoMovieCapturePlanRequest(request).map(\n ([key, value]: [key: string, value: string]): string => `--${key}=${value}`,\n );\n return {\n options,\n text: [\"automovie\", \"capture\", ...options.map(quote)].join(\" \"),\n };\n}\n\n/** One argument as a POSIX shell word. */\nfunction quote(argument: string): string {\n return PLAIN.test(argument)\n ? argument\n : `'${argument.replaceAll(\"'\", \"'\\\\''\")}'`;\n}\n"],"mappings":";;;AAIA,MAAM,QAAgB;;;;;;;;;;;;;;;;;;;;AAqBtB,SAAgB,gCACd,SAOA;CACA,MAAM,UAAoB,kCAAkC,OAAO,CAAC,CAAC,KAClE,CAAC,KAAK,WAAiD,KAAK,IAAI,GAAG,OACtE;CACA,OAAO;EACL;EACA,MAAM;GAAC;GAAa;GAAW,GAAG,QAAQ,IAAI,KAAK;EAAC,CAAC,CAAC,KAAK,GAAG;CAChE;AACF;;AAGA,SAAS,MAAM,UAA0B;CACvC,OAAO,MAAM,KAAK,QAAQ,IACtB,WACA,IAAI,SAAS,WAAW,KAAK,OAAO,EAAE;AAC5C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IAutoMovieCapturePlanRequest } from "@automovie/interface";
|
|
2
|
+
import { type IAutoMovieDrawSubject } from "@automovie/render";
|
|
2
3
|
import type { AutoMovieInspectorPlayhead } from "./AutoMovieInspectorPlayhead.js";
|
|
3
4
|
import type { IAutoMovieInspectorScene } from "./IAutoMovieInspectorScene.js";
|
|
4
5
|
import type { IAutoMovieInspectorSceneHost } from "./IAutoMovieInspectorSceneHost.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mountAutoMovieInspectorScene.js","sourceRoot":"","sources":["../../src/inspector/mountAutoMovieInspectorScene.ts"],"names":[],"mappings":";;;AAAA,8CAe2B;AAM3B,yFAAmF;AAkBnF;;;;;;;;;;;;;;;;GAgBG;AACH,sCAA6C,KAkB5C;IACC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzC,IAAI,QAAQ,GAAY,KAAK,CAAC;IAC9B,IAAI,MAAM,GAAiC,KAAK,CAAC,OAAO,CAAC;IACzD,IAAI,IAAuB,CAAC;IAE5B,kFAAkF;IAClF,KAAK,CAAC,OAAO;SACV,MAAM,EAAE;SACR,IAAI,CAAC,KAAK,EAAE,QAA6B,EAAiB,EAAE;QAC3D,IAAI,QAAQ;YAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;;YAC5B,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC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IAAI,EAAE,CAAC;QACT,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACH,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC7C,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;QACrB,MAAM,IAAI,cAAc,CAAC,QAAQ,EAAE,uCAAuC,CAAC,CAAC;AAChF,CAAC;AAED,kCAAkC;AAClC,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mountAutoMovieInspectorScene.mjs","names":[],"sources":["../../src/inspector/mountAutoMovieInspectorScene.ts"],"sourcesContent":["import {\n type IApplyAutoMovieInspectionProps,\n type IAutoMovieCapturePlanRequest,\n type IAutoMovieDrawScene,\n type IAutoMovieDrawSubject,\n type IAutoMovieInspectionHandle,\n type IAutoMovieInspectionLabel,\n type IAutoMovieInspectionView,\n type IAutoMovieViewerViewpoint,\n applyAutoMovieInspection,\n autoMovieViewerNamedViewpoints,\n formatAutoMovieInspectionRequest,\n listAutoMovieInspectionPaths,\n parseAutoMovieInspectionView,\n resolveAutoMovieInspectionView,\n} from \"@automovie/render\";\nimport type * as THREE from \"three\";\n\nimport type { AutoMovieInspectorPlayhead } from \"./AutoMovieInspectorPlayhead.js\";\nimport type { IAutoMovieInspectorScene } from \"./IAutoMovieInspectorScene.js\";\nimport type { IAutoMovieInspectorSceneHost } from \"./IAutoMovieInspectorSceneHost.js\";\nimport { readAutoMovieInspectorAddress } from \"./readAutoMovieInspectorAddress.js\";\n\n/** What a mount holds once its instance is ready. */\ninterface ILive {\n instance: IAutoMovieDrawScene;\n renderer: IAutoMovieInspectorSceneHost.IRenderer;\n inspection: IAutoMovieInspectionHandle;\n applied: IAutoMovieCapturePlanRequest;\n frame: number | undefined;\n lastMs: number | undefined;\n drawn: AutoMovieInspectorPlayhead.ISnapshot | undefined;\n size: IAutoMovieInspectorSceneHost.ISize | undefined;\n dirty: boolean;\n seeking: boolean;\n error: string | null;\n labelled: boolean;\n}\n\n/**\n * Mount a subject on the inspector's canvas: build an instance, apply the request's inspection, and draw it every animation frame at the playhead's second through the request's first view.\n *\n * The instance is created at once and arrives later. When it arrives the mount checks its clock and raster, seeks it to the request's first second and waits until it is ready there, lists its paths and the marks of its first second, applies the inspection of the newest request (or, when the scene refuses it, of the request that asks for nothing, reported through `refused`), sets the playhead's duration and second, reports `ready` and schedules the first frame. Each frame advances a playing playhead by the wall time since the last frame, follows the host's size, and redraws when the playhead's snapshot or the request changed: seek the instance and, once its promise resolves, update the inspection with the second's marks, resolve the view and render. While a seek is pending no other is started, and the next frame seeks the newest second, so a slow subject drops intermediate seconds instead of queueing them. A drawing error pauses playback and is reported once until a frame draws again.\n *\n * The picture's aspect is the subject's raster, not the canvas's, so a view frames what a capture of the same subject frames; the page gives the canvas that aspect. The mount adds no listener and holds at most one pending frame, so a mount, dispose and mount again on one canvas, as React's StrictMode runs an effect, leaves one renderer and one frame loop; a mount disposed before its instance arrives or is ready disposes the instance then and creates no renderer, and a seek that resolves after dispose draws nothing.\n *\n * The page draws the first view and the first pass of the request; the capture command draws them all. While paused, the labels the request asks for are placed by the inspection on the picture's pixels, with the stamp's font pixel at least one CSS pixel of the canvas as a capture keeps it at least one sheet pixel, and reported in CSS pixels; a named view with a focus is framed on what the focus selects.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the arrival sequence, the fallback on refusal, what a frame does and when it redraws, the error rule, the aspect rule, the lifecycle guarantees, which view and pass are drawn, and how labels and focus are placed.\n * @evidence contracts/development/implementation.md#principled-implementation The scene is changed only through render's inspection, which restores before re-applying; views are resolved by render's view resolver on the inspection's drawn bounds, and the delivery camera takes the raster's aspect as the capture does. Wall time comes from the frame callback's own timestamp, so a frame's advance is the time actually elapsed. The subject's seek promise is the draw contract's readiness signal, so a picture is drawn only once the subject reports it can be.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One closure owns one mount: arrival, apply, frame, seek, paint, failure and dispose are local steps over one record of what is held; React, the DOM and WebGL stay with the component and the host.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A refused request is reported with the request still drawn rather than drawn half-applied, an instance that arrives after dispose is released rather than drawn, and no frame is drawn from a size that is not positive.\n * @evidence contracts/development/implementation.md#efficient-algorithms A frame that changed nothing costs one size read and one snapshot comparison; a redraw costs the subject's seek, the inspection's update linear in its marks, one view resolution and the render. Paths and the first second's marks are listed once per mount.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work The applied inspection, the renderer and the instance live for the whole mount; an inspection is re-applied only when its written text changes.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The mount owns one instance, one renderer, one applied inspection and at most one pending frame, released by `dispose` in reverse order, each attempted even when another fails; the playhead is borrowed and gains no listener.\n */\nexport function mountAutoMovieInspectorScene(props: {\n /** The subject to build. */\n subject: IAutoMovieDrawSubject;\n\n /** The subject's name, as the request's `subject` key and the refusals name it. */\n name: string;\n\n /** The request in force when the mount starts. */\n request: IAutoMovieCapturePlanRequest;\n\n /** The playhead the loop advances and reads, borrowed for the mount's life. */\n playhead: AutoMovieInspectorPlayhead;\n\n /** Renderer, frame clock and size. */\n host: IAutoMovieInspectorSceneHost;\n\n /** Where the mount reports what it learns. */\n report: IAutoMovieInspectorScene.IReport;\n}): IAutoMovieInspectorScene {\n const { host, playhead, report } = props;\n let disposed: boolean = false;\n let wanted: IAutoMovieCapturePlanRequest = props.request;\n let live: ILive | undefined;\n\n // The instance arrives later; one that arrives after dispose is released at once.\n props.subject\n .create()\n .then(async (instance: IAutoMovieDrawScene): Promise<void> => {\n if (disposed) instance.dispose();\n else await arrive(instance);\n })\n .catch((error: unknown): void => {\n if (!disposed) report.error(messageOf(error));\n });\n\n /** Take an arrived instance into use once it is ready at its first second, releasing it if anything fails. */\n async function arrive(instance: IAutoMovieDrawScene): Promise<void> {\n let seconds: number;\n try {\n for (const [name, value] of [\n [\"duration\", instance.durationSeconds],\n [\"fps\", instance.fps],\n [\"width\", instance.width],\n [\"height\", instance.height],\n ] as const)\n if (!(Number.isFinite(value) && value > 0))\n throw new Error(\n `Subject \"${props.name}\" ${name} ${value} is not positive`,\n );\n playhead.setDuration(instance.durationSeconds);\n playhead.seek(firstSecond(wanted));\n seconds = playhead.getSnapshot().seconds;\n await instance.seek(seconds);\n } catch (error) {\n if (!disposed) report.error(messageOf(error));\n instance.dispose();\n return;\n }\n\n // A mount disposed while the subject got ready releases it unused.\n if (disposed) {\n instance.dispose();\n return;\n }\n const held: (() => void)[] = [(): void => instance.dispose()];\n try {\n // Paths are listed before the inspection adds its own objects to the scene.\n const marks: NonNullable<IApplyAutoMovieInspectionProps[\"marks\"]> =\n instance.marks?.(seconds) ?? [];\n const facts: IAutoMovieInspectorScene.IFacts = {\n paths: [\n ...listAutoMovieInspectionPaths(instance.scene).map(\n ({ path }: { path: string }): string => path,\n ),\n ...marks.map(({ path }: { path: string }): string => path),\n ],\n marks,\n\n views: [\n ...Object.keys(instance.views ?? {}),\n ...autoMovieViewerNamedViewpoints().map(\n ({ id }: IAutoMovieViewerViewpoint): string => id,\n ),\n ],\n width: instance.width,\n height: instance.height,\n durationSeconds: instance.durationSeconds,\n fps: instance.fps,\n };\n\n const renderer: IAutoMovieInspectorSceneHost.IRenderer =\n host.createRenderer();\n held.push((): void => renderer.dispose());\n const inspect: (\n request: IAutoMovieCapturePlanRequest,\n ) => IAutoMovieInspectionHandle = (\n request: IAutoMovieCapturePlanRequest,\n ): IAutoMovieInspectionHandle =>\n applyAutoMovieInspection({\n scene: instance.scene,\n request: request.inspection,\n renderer,\n marks,\n });\n\n // The newest request, or the one that asks for nothing when the scene refuses it.\n let applied: IAutoMovieCapturePlanRequest = wanted;\n let inspection: IAutoMovieInspectionHandle;\n let refusal: string | null = null;\n try {\n inspection = inspect(applied);\n } catch (error) {\n refusal = messageOf(error);\n applied = {\n ...readAutoMovieInspectorAddress(\"\"),\n subject: wanted.subject,\n };\n inspection = inspect(applied);\n }\n held.push((): void => inspection.restore());\n wanted = applied;\n live = {\n instance,\n renderer,\n inspection,\n applied,\n frame: undefined,\n lastMs: undefined,\n drawn: undefined,\n size: undefined,\n dirty: true,\n seeking: false,\n error: null,\n labelled: false,\n };\n report.ready(facts);\n if (refusal !== null) report.refused(applied, refusal);\n report.legend([...inspection.legend]);\n live.frame = host.requestFrame(frame);\n } catch (error) {\n live = undefined;\n report.error(messageOf(error));\n release(held.reverse());\n }\n }\n\n /** One animation frame: advance, follow the size, redraw when something changed, schedule the next. */\n function frame(nowMs: number): void {\n const now: ILive | undefined = live;\n if (disposed || now === undefined) return;\n now.frame = undefined;\n const wall: number =\n now.lastMs === undefined ? 0 : (nowMs - now.lastMs) / 1000;\n now.lastMs = nowMs;\n playhead.advance(wall);\n\n const size: IAutoMovieInspectorSceneHost.ISize = host.size();\n const drawable: boolean = [size.width, size.height, size.pixelRatio].every(\n (value: number): boolean => Number.isFinite(value) && value > 0,\n );\n if (\n drawable &&\n (now.size === undefined ||\n now.size.width !== size.width ||\n now.size.height !== size.height ||\n now.size.pixelRatio !== size.pixelRatio)\n ) {\n now.renderer.setPixelRatio(size.pixelRatio);\n now.renderer.setSize(size.width, size.height, false);\n now.size = size;\n now.dirty = true;\n }\n\n const snapshot: AutoMovieInspectorPlayhead.ISnapshot =\n playhead.getSnapshot();\n if (drawable && !now.seeking && (now.dirty || snapshot !== now.drawn))\n draw(now, snapshot);\n now.frame = host.requestFrame(frame);\n }\n\n /** Seek one second and draw it once the subject is ready there; frames skip drawing while a seek is pending. */\n function draw(\n now: ILive,\n snapshot: AutoMovieInspectorPlayhead.ISnapshot,\n ): void {\n now.dirty = false;\n now.drawn = snapshot;\n now.seeking = true;\n let ready: Promise<void>;\n try {\n ready = now.instance.seek(snapshot.seconds);\n } catch (error) {\n ready = Promise.reject(\n error instanceof Error ? error : new Error(String(error)),\n );\n }\n ready\n .then((): void => {\n now.seeking = false;\n if (live === now) paint(now, snapshot);\n })\n .catch((error: unknown): void => {\n now.seeking = false;\n if (live === now) fail(now, snapshot, error);\n });\n }\n\n /** Draw the second the subject is now at through the applied request's first view. */\n function paint(\n now: ILive,\n snapshot: AutoMovieInspectorPlayhead.ISnapshot,\n ): void {\n const { instance } = now;\n try {\n now.inspection.update(instance.marks?.(snapshot.seconds));\n\n // The delivery camera takes the raster's aspect, as a capture of the subject does.\n const aspect: number = instance.width / instance.height;\n if (instance.camera.aspect !== aspect) {\n instance.camera.aspect = aspect;\n instance.camera.updateProjectionMatrix();\n }\n const text: string = now.applied.views[0]!;\n const view: IAutoMovieInspectionView = parseAutoMovieInspectionView(text);\n const camera: THREE.Camera = resolveAutoMovieInspectionView({\n view,\n text,\n bounds:\n view.type === \"named\" ? now.inspection.bounds(view.focus) : null,\n camera: instance.camera,\n ...(instance.views === undefined ? {} : { views: instance.views }),\n seconds: snapshot.seconds,\n width: instance.width,\n height: instance.height,\n }).camera;\n now.renderer.render(instance.scene, camera);\n if (!snapshot.playing) {\n report.legend([...now.inspection.legend]);\n report.labels(place(now, camera));\n now.labelled = true;\n } else if (now.labelled) {\n report.labels({ labels: [], lineHeight: 0, dropped: 0 });\n now.labelled = false;\n }\n if (now.error !== null) {\n now.error = null;\n report.error(null);\n }\n } catch (error) {\n fail(now, snapshot, error);\n }\n }\n\n /** Report a drawing error once until a frame draws again, and stop playback on it. */\n function fail(\n now: ILive,\n snapshot: AutoMovieInspectorPlayhead.ISnapshot,\n error: unknown,\n ): void {\n if (snapshot.playing) playhead.pause();\n const message: string = messageOf(error);\n if (message !== now.error) {\n now.error = message;\n report.error(message);\n }\n }\n\n return {\n apply: (request: IAutoMovieCapturePlanRequest): void => {\n if (disposed || request === wanted) return;\n wanted = request;\n const now: ILive | undefined = live;\n if (now === undefined) return;\n\n // The inspection is re-applied only when its text changed; a refusal re-applies the previous one.\n if (written(request) !== written(now.applied)) {\n const seconds: number = playhead.getSnapshot().seconds;\n const inspect: (\n next: IAutoMovieCapturePlanRequest,\n ) => IAutoMovieInspectionHandle = (\n next: IAutoMovieCapturePlanRequest,\n ): IAutoMovieInspectionHandle =>\n applyAutoMovieInspection({\n scene: now.instance.scene,\n request: next.inspection,\n renderer: now.renderer,\n marks: now.instance.marks?.(seconds) ?? [],\n });\n now.inspection.restore();\n try {\n now.inspection = inspect(request);\n } catch (error) {\n now.inspection = inspect(now.applied);\n wanted = now.applied;\n now.dirty = true;\n report.refused(now.applied, messageOf(error));\n return;\n }\n report.legend([...now.inspection.legend]);\n }\n if (firstSecond(request) !== firstSecond(now.applied))\n playhead.seek(firstSecond(request));\n now.applied = request;\n now.dirty = true;\n },\n dispose: (): void => {\n if (disposed) return;\n disposed = true;\n const now: ILive | undefined = live;\n live = undefined;\n if (now === undefined) return;\n release([\n (): void => {\n if (now.frame !== undefined) host.cancelFrame(now.frame);\n now.frame = undefined;\n },\n (): void => now.inspection.restore(),\n (): void => now.renderer.dispose(),\n (): void => now.instance.dispose(),\n ]);\n },\n };\n}\n\n/** The labels of a paused picture in CSS pixels of the canvas. */\nfunction place(\n now: ILive,\n camera: THREE.Camera,\n): IAutoMovieInspectorScene.ILabels {\n const { width, height } = now.instance;\n const shown: IAutoMovieInspectorSceneHost.ISize = now.size!;\n\n // The stamp's font pixel stays at least one CSS pixel, as a capture keeps it at least one sheet pixel.\n const scale: number = Math.max(1, Math.ceil(height / shown.height));\n const placed: ReturnType<IAutoMovieInspectionHandle[\"labels\"]> =\n now.inspection.labels(camera, width, height, scale);\n return {\n labels: placed.labels.map(\n (\n label: IAutoMovieInspectionLabel,\n ): IAutoMovieInspectorScene.ILabels[\"labels\"][number] => ({\n path: label.path,\n text: label.text,\n left: (label.x * shown.width) / width,\n top: (label.y * shown.height) / height,\n }),\n ),\n // The stamp's box is nine font pixels high.\n lineHeight: (9 * scale * shown.height) / height,\n dropped: placed.dropped.length,\n };\n}\n\n/** The first second a request draws: its first explicit second, or the start of its sampling. */\nfunction firstSecond(request: IAutoMovieCapturePlanRequest): number {\n return request.sampling.kind === \"at\"\n ? request.sampling.seconds[0]!\n : request.sampling.from;\n}\n\n/** A request's inspection as the text it writes, the identity an applied inspection is reused by. */\nfunction written(request: IAutoMovieCapturePlanRequest): string {\n return JSON.stringify(formatAutoMovieInspectionRequest(request.inspection));\n}\n\n/** Run every step, then throw every failure together. */\nfunction release(steps: readonly (() => void)[]): void {\n const failures: unknown[] = [];\n for (const step of steps)\n try {\n step();\n } catch (error) {\n failures.push(error);\n }\n if (failures.length === 1) throw failures[0];\n if (failures.length > 1)\n throw new AggregateError(failures, \"The inspector mount failed to release\");\n}\n\n/** The text of a thrown value. */\nfunction messageOf(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwDA,SAAgB,6BAA6B,OAkBhB;CAC3B,MAAM,EAAE,MAAM,UAAU,WAAW;CACnC,IAAI,WAAoB;CACxB,IAAI,SAAuC,MAAM;CACjD,IAAI;CAGJ,MAAM,QACH,OAAO,CAAC,CACR,KAAK,OAAO,aAAiD;EAC5D,IAAI,UAAU,SAAS,QAAQ;OAC1B,MAAM,OAAO,QAAQ;CAC5B,CAAC,CAAC,CACD,OAAO,UAAyB;EAC/B,IAAI,CAAC,UAAU,OAAO,MAAM,UAAU,KAAK,CAAC;CAC9C,CAAC;;CAGH,eAAe,OAAO,UAA8C;EAClE,IAAI;EACJ,IAAI;GACF,KAAK,MAAM,CAAC,MAAM,UAAU;IAC1B,CAAC,YAAY,SAAS,eAAe;IACrC,CAAC,OAAO,SAAS,GAAG;IACpB,CAAC,SAAS,SAAS,KAAK;IACxB,CAAC,UAAU,SAAS,MAAM;GAC5B,GACE,IAAI,EAAE,OAAO,SAAS,KAAK,KAAK,QAAQ,IACtC,MAAM,IAAI,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CAAuC;AAC9E;;AAGA,SAAS,UAAU,OAAwB;CACzC,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC9D"}
|
|
1
|
+
{"version":3,"file":"mountAutoMovieInspectorScene.mjs","names":[],"sources":["../../src/inspector/mountAutoMovieInspectorScene.ts"],"sourcesContent":["import type {\n IAutoMovieCapturePlanRequest,\n IAutoMovieInspectionLabel,\n IAutoMovieInspectionView,\n} from \"@automovie/interface\";\nimport {\n type IApplyAutoMovieInspectionProps,\n type IAutoMovieDrawScene,\n type IAutoMovieDrawSubject,\n type IAutoMovieInspectionHandle,\n type IAutoMovieViewerViewpoint,\n applyAutoMovieInspection,\n autoMovieViewerNamedViewpoints,\n formatAutoMovieInspectionRequest,\n listAutoMovieInspectionPaths,\n parseAutoMovieInspectionView,\n resolveAutoMovieInspectionView,\n} from \"@automovie/render\";\nimport type * as THREE from \"three\";\n\nimport type { AutoMovieInspectorPlayhead } from \"./AutoMovieInspectorPlayhead.js\";\nimport type { IAutoMovieInspectorScene } from \"./IAutoMovieInspectorScene.js\";\nimport type { IAutoMovieInspectorSceneHost } from \"./IAutoMovieInspectorSceneHost.js\";\nimport { readAutoMovieInspectorAddress } from \"./readAutoMovieInspectorAddress.js\";\n\n/** What a mount holds once its instance is ready. */\ninterface ILive {\n instance: IAutoMovieDrawScene;\n renderer: IAutoMovieInspectorSceneHost.IRenderer;\n inspection: IAutoMovieInspectionHandle;\n applied: IAutoMovieCapturePlanRequest;\n frame: number | undefined;\n lastMs: number | undefined;\n drawn: AutoMovieInspectorPlayhead.ISnapshot | undefined;\n size: IAutoMovieInspectorSceneHost.ISize | undefined;\n dirty: boolean;\n seeking: boolean;\n error: string | null;\n labelled: boolean;\n}\n\n/**\n * Mount a subject on the inspector's canvas: build an instance, apply the request's inspection, and draw it every animation frame at the playhead's second through the request's first view.\n *\n * The instance is created at once and arrives later. When it arrives the mount checks its clock and raster, seeks it to the request's first second and waits until it is ready there, lists its paths and the marks of its first second, applies the inspection of the newest request (or, when the scene refuses it, of the request that asks for nothing, reported through `refused`), sets the playhead's duration and second, reports `ready` and schedules the first frame. Each frame advances a playing playhead by the wall time since the last frame, follows the host's size, and redraws when the playhead's snapshot or the request changed: seek the instance and, once its promise resolves, update the inspection with the second's marks, resolve the view and render. While a seek is pending no other is started, and the next frame seeks the newest second, so a slow subject drops intermediate seconds instead of queueing them. A drawing error pauses playback and is reported once until a frame draws again.\n *\n * The picture's aspect is the subject's raster, not the canvas's, so a view frames what a capture of the same subject frames; the page gives the canvas that aspect. The mount adds no listener and holds at most one pending frame, so a mount, dispose and mount again on one canvas, as React's StrictMode runs an effect, leaves one renderer and one frame loop; a mount disposed before its instance arrives or is ready disposes the instance then and creates no renderer, and a seek that resolves after dispose draws nothing.\n *\n * The page draws the first view and the first pass of the request; the capture command draws them all. While paused, the labels the request asks for are placed by the inspection on the picture's pixels, with the stamp's font pixel at least one CSS pixel of the canvas as a capture keeps it at least one sheet pixel, and reported in CSS pixels; a named view with a focus is framed on what the focus selects.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the arrival sequence, the fallback on refusal, what a frame does and when it redraws, the error rule, the aspect rule, the lifecycle guarantees, which view and pass are drawn, and how labels and focus are placed.\n * @evidence contracts/development/implementation.md#principled-implementation The scene is changed only through render's inspection, which restores before re-applying; views are resolved by render's view resolver on the inspection's drawn bounds, and the delivery camera takes the raster's aspect as the capture does. Wall time comes from the frame callback's own timestamp, so a frame's advance is the time actually elapsed. The subject's seek promise is the draw contract's readiness signal, so a picture is drawn only once the subject reports it can be.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One closure owns one mount: arrival, apply, frame, seek, paint, failure and dispose are local steps over one record of what is held; React, the DOM and WebGL stay with the component and the host.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A refused request is reported with the request still drawn rather than drawn half-applied, an instance that arrives after dispose is released rather than drawn, and no frame is drawn from a size that is not positive.\n * @evidence contracts/development/implementation.md#efficient-algorithms A frame that changed nothing costs one size read and one snapshot comparison; a redraw costs the subject's seek, the inspection's update linear in its marks, one view resolution and the render. Paths and the first second's marks are listed once per mount.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work The applied inspection, the renderer and the instance live for the whole mount; an inspection is re-applied only when its written text changes.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The mount owns one instance, one renderer, one applied inspection and at most one pending frame, released by `dispose` in reverse order, each attempted even when another fails; the playhead is borrowed and gains no listener.\n */\nexport function mountAutoMovieInspectorScene(props: {\n /** The subject to build. */\n subject: IAutoMovieDrawSubject;\n\n /** The subject's name, as the request's `subject` key and the refusals name it. */\n name: string;\n\n /** The request in force when the mount starts. */\n request: IAutoMovieCapturePlanRequest;\n\n /** The playhead the loop advances and reads, borrowed for the mount's life. */\n playhead: AutoMovieInspectorPlayhead;\n\n /** Renderer, frame clock and size. */\n host: IAutoMovieInspectorSceneHost;\n\n /** Where the mount reports what it learns. */\n report: IAutoMovieInspectorScene.IReport;\n}): IAutoMovieInspectorScene {\n const { host, playhead, report } = props;\n let disposed: boolean = false;\n let wanted: IAutoMovieCapturePlanRequest = props.request;\n let live: ILive | undefined;\n\n // The instance arrives later; one that arrives after dispose is released at once.\n props.subject\n .create()\n .then(async (instance: IAutoMovieDrawScene): Promise<void> => {\n if (disposed) instance.dispose();\n else await arrive(instance);\n })\n .catch((error: unknown): void => {\n if (!disposed) report.error(messageOf(error));\n });\n\n /** Take an arrived instance into use once it is ready at its first second, releasing it if anything fails. */\n async function arrive(instance: IAutoMovieDrawScene): Promise<void> {\n let seconds: number;\n try {\n for (const [name, value] of [\n [\"duration\", instance.durationSeconds],\n [\"fps\", instance.fps],\n [\"width\", instance.width],\n [\"height\", instance.height],\n ] as const)\n if (!(Number.isFinite(value) && value > 0))\n throw new Error(\n `Subject \"${props.name}\" ${name} ${value} is not positive`,\n );\n playhead.setDuration(instance.durationSeconds);\n playhead.seek(firstSecond(wanted));\n seconds = playhead.getSnapshot().seconds;\n await instance.seek(seconds);\n } catch (error) {\n if (!disposed) report.error(messageOf(error));\n instance.dispose();\n return;\n }\n\n // A mount disposed while the subject got ready releases it unused.\n if (disposed) {\n instance.dispose();\n return;\n }\n const held: (() => void)[] = [(): void => instance.dispose()];\n try {\n // Paths are listed before the inspection adds its own objects to the scene.\n const marks: NonNullable<IApplyAutoMovieInspectionProps[\"marks\"]> =\n instance.marks?.(seconds) ?? [];\n const facts: IAutoMovieInspectorScene.IFacts = {\n paths: [\n ...listAutoMovieInspectionPaths(instance.scene).map(\n ({ path }: { path: string }): string => path,\n ),\n ...marks.map(({ path }: { path: string }): string => path),\n ],\n marks,\n\n views: [\n ...Object.keys(instance.views ?? {}),\n ...autoMovieViewerNamedViewpoints().map(\n ({ id }: IAutoMovieViewerViewpoint): string => id,\n ),\n ],\n width: instance.width,\n height: instance.height,\n durationSeconds: instance.durationSeconds,\n fps: instance.fps,\n };\n\n const renderer: IAutoMovieInspectorSceneHost.IRenderer =\n host.createRenderer();\n held.push((): void => renderer.dispose());\n const inspect: (\n request: IAutoMovieCapturePlanRequest,\n ) => IAutoMovieInspectionHandle = (\n request: IAutoMovieCapturePlanRequest,\n ): IAutoMovieInspectionHandle =>\n applyAutoMovieInspection({\n scene: instance.scene,\n request: request.inspection,\n renderer,\n marks,\n });\n\n // The newest request, or the one that asks for nothing when the scene refuses it.\n let applied: IAutoMovieCapturePlanRequest = wanted;\n let inspection: IAutoMovieInspectionHandle;\n let refusal: string | null = null;\n try {\n inspection = inspect(applied);\n } catch (error) {\n refusal = messageOf(error);\n applied = {\n ...readAutoMovieInspectorAddress(\"\"),\n subject: wanted.subject,\n };\n inspection = inspect(applied);\n }\n held.push((): void => inspection.restore());\n wanted = applied;\n live = {\n instance,\n renderer,\n inspection,\n applied,\n frame: undefined,\n lastMs: undefined,\n drawn: undefined,\n size: undefined,\n dirty: true,\n seeking: false,\n error: null,\n labelled: false,\n };\n report.ready(facts);\n if (refusal !== null) report.refused(applied, refusal);\n report.legend([...inspection.legend]);\n live.frame = host.requestFrame(frame);\n } catch (error) {\n live = undefined;\n report.error(messageOf(error));\n release(held.reverse());\n }\n }\n\n /** One animation frame: advance, follow the size, redraw when something changed, schedule the next. */\n function frame(nowMs: number): void {\n const now: ILive | undefined = live;\n if (disposed || now === undefined) return;\n now.frame = undefined;\n const wall: number =\n now.lastMs === undefined ? 0 : (nowMs - now.lastMs) / 1000;\n now.lastMs = nowMs;\n playhead.advance(wall);\n\n const size: IAutoMovieInspectorSceneHost.ISize = host.size();\n const drawable: boolean = [size.width, size.height, size.pixelRatio].every(\n (value: number): boolean => Number.isFinite(value) && value > 0,\n );\n if (\n drawable &&\n (now.size === undefined ||\n now.size.width !== size.width ||\n now.size.height !== size.height ||\n now.size.pixelRatio !== size.pixelRatio)\n ) {\n now.renderer.setPixelRatio(size.pixelRatio);\n now.renderer.setSize(size.width, size.height, false);\n now.size = size;\n now.dirty = true;\n }\n\n const snapshot: AutoMovieInspectorPlayhead.ISnapshot =\n playhead.getSnapshot();\n if (drawable && !now.seeking && (now.dirty || snapshot !== now.drawn))\n draw(now, snapshot);\n now.frame = host.requestFrame(frame);\n }\n\n /** Seek one second and draw it once the subject is ready there; frames skip drawing while a seek is pending. */\n function draw(\n now: ILive,\n snapshot: AutoMovieInspectorPlayhead.ISnapshot,\n ): void {\n now.dirty = false;\n now.drawn = snapshot;\n now.seeking = true;\n let ready: Promise<void>;\n try {\n ready = now.instance.seek(snapshot.seconds);\n } catch (error) {\n ready = Promise.reject(\n error instanceof Error ? error : new Error(String(error)),\n );\n }\n ready\n .then((): void => {\n now.seeking = false;\n if (live === now) paint(now, snapshot);\n })\n .catch((error: unknown): void => {\n now.seeking = false;\n if (live === now) fail(now, snapshot, error);\n });\n }\n\n /** Draw the second the subject is now at through the applied request's first view. */\n function paint(\n now: ILive,\n snapshot: AutoMovieInspectorPlayhead.ISnapshot,\n ): void {\n const { instance } = now;\n try {\n now.inspection.update(instance.marks?.(snapshot.seconds));\n\n // The delivery camera takes the raster's aspect, as a capture of the subject does.\n const aspect: number = instance.width / instance.height;\n if (instance.camera.aspect !== aspect) {\n instance.camera.aspect = aspect;\n instance.camera.updateProjectionMatrix();\n }\n const text: string = now.applied.views[0]!;\n const view: IAutoMovieInspectionView = parseAutoMovieInspectionView(text);\n const camera: THREE.Camera = resolveAutoMovieInspectionView({\n view,\n text,\n bounds:\n view.type === \"named\" ? now.inspection.bounds(view.focus) : null,\n camera: instance.camera,\n ...(instance.views === undefined ? {} : { views: instance.views }),\n seconds: snapshot.seconds,\n width: instance.width,\n height: instance.height,\n }).camera;\n now.renderer.render(instance.scene, camera);\n if (!snapshot.playing) {\n report.legend([...now.inspection.legend]);\n report.labels(place(now, camera));\n now.labelled = true;\n } else if (now.labelled) {\n report.labels({ labels: [], lineHeight: 0, dropped: 0 });\n now.labelled = false;\n }\n if (now.error !== null) {\n now.error = null;\n report.error(null);\n }\n } catch (error) {\n fail(now, snapshot, error);\n }\n }\n\n /** Report a drawing error once until a frame draws again, and stop playback on it. */\n function fail(\n now: ILive,\n snapshot: AutoMovieInspectorPlayhead.ISnapshot,\n error: unknown,\n ): void {\n if (snapshot.playing) playhead.pause();\n const message: string = messageOf(error);\n if (message !== now.error) {\n now.error = message;\n report.error(message);\n }\n }\n\n return {\n apply: (request: IAutoMovieCapturePlanRequest): void => {\n if (disposed || request === wanted) return;\n wanted = request;\n const now: ILive | undefined = live;\n if (now === undefined) return;\n\n // The inspection is re-applied only when its text changed; a refusal re-applies the previous one.\n if (written(request) !== written(now.applied)) {\n const seconds: number = playhead.getSnapshot().seconds;\n const inspect: (\n next: IAutoMovieCapturePlanRequest,\n ) => IAutoMovieInspectionHandle = (\n next: IAutoMovieCapturePlanRequest,\n ): IAutoMovieInspectionHandle =>\n applyAutoMovieInspection({\n scene: now.instance.scene,\n request: next.inspection,\n renderer: now.renderer,\n marks: now.instance.marks?.(seconds) ?? [],\n });\n now.inspection.restore();\n try {\n now.inspection = inspect(request);\n } catch (error) {\n now.inspection = inspect(now.applied);\n wanted = now.applied;\n now.dirty = true;\n report.refused(now.applied, messageOf(error));\n return;\n }\n report.legend([...now.inspection.legend]);\n }\n if (firstSecond(request) !== firstSecond(now.applied))\n playhead.seek(firstSecond(request));\n now.applied = request;\n now.dirty = true;\n },\n dispose: (): void => {\n if (disposed) return;\n disposed = true;\n const now: ILive | undefined = live;\n live = undefined;\n if (now === undefined) return;\n release([\n (): void => {\n if (now.frame !== undefined) host.cancelFrame(now.frame);\n now.frame = undefined;\n },\n (): void => now.inspection.restore(),\n (): void => now.renderer.dispose(),\n (): void => now.instance.dispose(),\n ]);\n },\n };\n}\n\n/** The labels of a paused picture in CSS pixels of the canvas. */\nfunction place(\n now: ILive,\n camera: THREE.Camera,\n): IAutoMovieInspectorScene.ILabels {\n const { width, height } = now.instance;\n const shown: IAutoMovieInspectorSceneHost.ISize = now.size!;\n\n // The stamp's font pixel stays at least one CSS pixel, as a capture keeps it at least one sheet pixel.\n const scale: number = Math.max(1, Math.ceil(height / shown.height));\n const placed: ReturnType<IAutoMovieInspectionHandle[\"labels\"]> =\n now.inspection.labels(camera, width, height, scale);\n return {\n labels: placed.labels.map(\n (\n label: IAutoMovieInspectionLabel,\n ): IAutoMovieInspectorScene.ILabels[\"labels\"][number] => ({\n path: label.path,\n text: label.text,\n left: (label.x * shown.width) / width,\n top: (label.y * shown.height) / height,\n }),\n ),\n // The stamp's box is nine font pixels high.\n lineHeight: (9 * scale * shown.height) / height,\n dropped: placed.dropped.length,\n };\n}\n\n/** The first second a request draws: its first explicit second, or the start of its sampling. */\nfunction firstSecond(request: IAutoMovieCapturePlanRequest): number {\n return request.sampling.kind === \"at\"\n ? request.sampling.seconds[0]!\n : request.sampling.from;\n}\n\n/** A request's inspection as the text it writes, the identity an applied inspection is reused by. */\nfunction written(request: IAutoMovieCapturePlanRequest): string {\n return JSON.stringify(formatAutoMovieInspectionRequest(request.inspection));\n}\n\n/** Run every step, then throw every failure together. */\nfunction release(steps: readonly (() => void)[]): void {\n const failures: unknown[] = [];\n for (const step of steps)\n try {\n step();\n } catch (error) {\n failures.push(error);\n }\n if (failures.length === 1) throw failures[0];\n if (failures.length > 1)\n throw new AggregateError(failures, \"The inspector mount failed to release\");\n}\n\n/** The text of a thrown value. */\nfunction messageOf(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0DA,SAAgB,6BAA6B,OAkBhB;CAC3B,MAAM,EAAE,MAAM,UAAU,WAAW;CACnC,IAAI,WAAoB;CACxB,IAAI,SAAuC,MAAM;CACjD,IAAI;CAGJ,MAAM,QACH,OAAO,CAAC,CACR,KAAK,OAAO,aAAiD;EAC5D,IAAI,UAAU,SAAS,QAAQ;OAC1B,MAAM,OAAO,QAAQ;CAC5B,CAAC,CAAC,CACD,OAAO,UAAyB;EAC/B,IAAI,CAAC,UAAU,OAAO,MAAM,UAAU,KAAK,CAAC;CAC9C,CAAC;;CAGH,eAAe,OAAO,UAA8C;EAClE,IAAI;EACJ,IAAI;GACF,KAAK,MAAM,CAAC,MAAM,UAAU;IAC1B,CAAC,YAAY,SAAS,eAAe;IACrC,CAAC,OAAO,SAAS,GAAG;IACpB,CAAC,SAAS,SAAS,KAAK;IACxB,CAAC,UAAU,SAAS,MAAM;GAC5B,GACE,IAAI,EAAE,OAAO,SAAS,KAAK,KAAK,QAAQ,IACtC,MAAM,IAAI,MACR,YAAY,MAAM,KAAK,IAAI,KAAK,GAAG,MAAM,iBAC3C;GACJ,SAAS,YAAY,SAAS,eAAe;GAC7C,SAAS,KAAK,YAAY,MAAM,CAAC;GACjC,UAAU,SAAS,YAAY,CAAC,CAAC;GACjC,MAAM,SAAS,KAAK,OAAO;EAC7B,SAAS,OAAO;GACd,IAAI,CAAC,UAAU,OAAO,MAAM,UAAU,KAAK,CAAC;GAC5C,SAAS,QAAQ;GACjB;EACF;EAGA,IAAI,UAAU;GACZ,SAAS,QAAQ;GACjB;EACF;EACA,MAAM,OAAuB,OAAa,SAAS,QAAQ,CAAC;EAC5D,IAAI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QAA4C,IAAI;CAGtD,MAAM,QAAgB,KAAK,IAAI,GAAG,KAAK,KAAK,SAAS,MAAM,MAAM,CAAC;CAClE,MAAM,SACJ,IAAI,WAAW,OAAO,QAAQ,OAAO,QAAQ,KAAK;CACpD,OAAO;EACL,QAAQ,OAAO,OAAO,KAElB,WACwD;GACxD,MAAM,MAAM;GACZ,MAAM,MAAM;GACZ,MAAO,MAAM,IAAI,MAAM,QAAS;GAChC,KAAM,MAAM,IAAI,MAAM,SAAU;EAClC,EACF;EAEA,YAAa,IAAI,QAAQ,MAAM,SAAU;EACzC,SAAS,OAAO,QAAQ;CAC1B;AACF;;AAGA,SAAS,YAAY,SAA+C;CAClE,OAAO,QAAQ,SAAS,SAAS,OAC7B,QAAQ,SAAS,QAAQ,KACzB,QAAQ,SAAS;AACvB;;AAGA,SAAS,QAAQ,SAA+C;CAC9D,OAAO,KAAK,UAAU,iCAAiC,QAAQ,UAAU,CAAC;AAC5E;;AAGA,SAAS,QAAQ,OAAsC;CACrD,MAAM,WAAsB,CAAC;CAC7B,KAAK,MAAM,QAAQ,OACjB,IAAI;EACF,KAAK;CACP,SAAS,OAAO;EACd,SAAS,KAAK,KAAK;CACrB;CACF,IAAI,SAAS,WAAW,GAAG,MAAM,SAAS;CAC1C,IAAI,SAAS,SAAS,GACpB,MAAM,IAAI,eAAe,UAAU,uCAAuC;AAC9E;;AAGA,SAAS,UAAU,OAAwB;CACzC,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC9D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IAutoMovieCapturePlanRequest } from "@automovie/interface";
|
|
2
2
|
/**
|
|
3
3
|
* Read the request an address names: its query text, with or without the leading `?`, through the capture plan grammar.
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readAutoMovieInspectorAddress.js","sourceRoot":"","sources":["../../src/inspector/readAutoMovieInspectorAddress.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"readAutoMovieInspectorAddress.js","sourceRoot":"","sources":["../../src/inspector/readAutoMovieInspectorAddress.ts"],"names":[],"mappings":";;;AACA,8CAAqE;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AACH,uCACE,IAAY;IAEZ,OAAO,IAAA,yCAAgC,EACrC,IAAI,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CACjE,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readAutoMovieInspectorAddress.mjs","names":[],"sources":["../../src/inspector/readAutoMovieInspectorAddress.ts"],"sourcesContent":["import {\
|
|
1
|
+
{"version":3,"file":"readAutoMovieInspectorAddress.mjs","names":[],"sources":["../../src/inspector/readAutoMovieInspectorAddress.ts"],"sourcesContent":["import type { IAutoMovieCapturePlanRequest } from \"@automovie/interface\";\nimport { parseAutoMovieCapturePlanRequest } from \"@automovie/render\";\n\n/**\n * Read the request an address names: its query text, with or without the leading `?`, through the capture plan grammar.\n *\n * The text is decoded by `URLSearchParams`, so `+` reads as a space and percent escapes as their characters, and the parameters go to `parseAutoMovieCapturePlanRequest` as they are. The empty text is the request that asks for nothing.\n *\n * It throws the grammar's `Error`, which names the key, for an unknown key, a key given twice or a value the grammar refuses.\n *\n * ```ts\n * const request = readAutoMovieInspectorAddress(location.search);\n * ```\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the accepted text, how it is decoded, what empty text gives and what a refusal names.\n * @evidence contracts/development/implementation.md#principled-implementation `URLSearchParams` is the browser's own query decoder and satisfies the grammar's source as it is, so the page maps its address and parses nothing itself.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Strip one `?`, decode, read.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A refusal reaches the caller; nothing falls back to a default request here.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the text.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion of one text.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh request and keeps nothing.\n */\nexport function readAutoMovieInspectorAddress(\n text: string,\n): IAutoMovieCapturePlanRequest {\n return parseAutoMovieCapturePlanRequest(\n new URLSearchParams(text.startsWith(\"?\") ? text.slice(1) : text),\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,SAAgB,8BACd,MAC8B;CAC9B,OAAO,iCACL,IAAI,gBAAgB,KAAK,WAAW,GAAG,IAAI,KAAK,MAAM,CAAC,IAAI,IAAI,CACjE;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reduceAutoMovieInspectorState.js","sourceRoot":"","sources":["../../src/inspector/reduceAutoMovieInspectorState.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"reduceAutoMovieInspectorState.js","sourceRoot":"","sources":["../../src/inspector/reduceAutoMovieInspectorState.ts"],"names":[],"mappings":";;;AACA,8CAG2B;AAI3B,yFAAmF;AAEnF,iCAAiC;AACjC,MAAM,KAAK,GAA8D;IACvE,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACf,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,uCACE,KAA+B,EAC/B,MAAiC;IAEjC,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS;QAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;IAC1D,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM;QACxB,OAAO,IAAI,CACT,KAAK,EACL,GAAiC,EAAE,CACjC,IAAA,gEAA6B,EAAC,MAAM,CAAC,IAAI,CAAC,CAC7C,CAAC;IAEJ,0DAA0D;I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AC,KAAK,CAAC;SAC9D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,sEAAsE;AACtE,SAAS,IAAI,CACX,MAA2B,EAC3B,GAAW,EACX,MAAqC;IAErC,MAAM,KAAK,GAAa,MAAM,CAC5B,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;SACpB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1C,MAAM,CAAC,CAAC,IAAY,EAAW,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAClD,CAAC;IACF,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;;QACtC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reduceAutoMovieInspectorState.mjs","names":[],"sources":["../../src/inspector/reduceAutoMovieInspectorState.ts"],"sourcesContent":["import {\
|
|
1
|
+
{"version":3,"file":"reduceAutoMovieInspectorState.mjs","names":[],"sources":["../../src/inspector/reduceAutoMovieInspectorState.ts"],"sourcesContent":["import type { IAutoMovieCapturePlanRequest } from \"@automovie/interface\";\nimport {\n formatAutoMovieCapturePlanRequest,\n parseAutoMovieCapturePlanRequest,\n} from \"@automovie/render\";\n\nimport type { IAutoMovieInspectorAction } from \"./IAutoMovieInspectorAction.js\";\nimport type { IAutoMovieInspectorState } from \"./IAutoMovieInspectorState.js\";\nimport { readAutoMovieInspectorAddress } from \"./readAutoMovieInspectorAddress.js\";\n\n/** The key each toggle edits. */\nconst LISTS: Record<IAutoMovieInspectorAction.IToggle[\"type\"], string> = {\n select: \"parts\",\n hide: \"hide\",\n label: \"label\",\n marks: \"marks\",\n};\n\n/**\n * Apply one edit to the inspector's request, the only way its request changes.\n *\n * The request is written as named text values by `formatAutoMovieCapturePlanRequest`, the action changes the text of the key or keys the `IAutoMovieInspectorAction` table names, and the values are read back by `parseAutoMovieCapturePlanRequest`. The result has the request read and no error. When the reader refuses, the result keeps the previous request beside the reader's message, which names the key, so a mistyped address or a refused value never replaces the picture.\n *\n * A `text` action replaces every key with the address text's; a `restore` action sets the scene's request and reason without reading anything. An edit that leaves the text unchanged returns an equal request.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States how an edit becomes a request, what the result holds when accepted and when refused, and the two actions that bypass the key edit.\n * @evidence contracts/development/implementation.md#principled-implementation Editing the grammar's own text and reading it back means every control goes through the one reader the address and the command use, so the reducer restates no default, no validation and no member of the typed request; a key the reader adds starts working without a change here.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Write, edit the keys of one action in one switch, read; list and colour edits share two small helpers.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A refusal is reported, never patched by dropping the offending key, and the time edit removes the sampling keys `at` excludes instead of letting the reader refuse the mix.\n * @evidence contracts/development/implementation.md#efficient-algorithms One write and one read of the request, linear in its text, per dispatched edit; playback dispatches none.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one state and one action.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh state and keeps nothing.\n */\nexport function reduceAutoMovieInspectorState(\n state: IAutoMovieInspectorState,\n action: IAutoMovieInspectorAction,\n): IAutoMovieInspectorState {\n if (action.type === \"restore\")\n return { request: action.request, error: action.error };\n if (action.type === \"text\")\n return read(\n state,\n (): IAutoMovieCapturePlanRequest =>\n readAutoMovieInspectorAddress(action.text),\n );\n\n // Every other edit changes the text of the keys it names.\n const values: Map<string, string> = new Map<string, string>(\n formatAutoMovieCapturePlanRequest(state.request),\n );\n switch (action.type) {\n case \"select\":\n case \"hide\":\n case \"label\":\n case \"marks\":\n edit(values, LISTS[action.type], (items: string[]): string[] =>\n action.on\n ? items.includes(action.pattern)\n ? items\n : [...items, action.pattern]\n : items.filter((item: string): boolean => item !== action.pattern),\n );\n break;\n case \"color\":\n edit(values, \"color\", (items: string[]): string[] => [\n ...items.filter(\n (item: string): boolean => !item.startsWith(`${action.pattern}=`),\n ),\n ...(action.color === null\n ? []\n : [\n `${action.pattern}=${action.color.toString(16).padStart(6, \"0\")}`,\n ]),\n ]);\n break;\n case \"shade\":\n values.delete(\"passes\");\n values.set(\"shade\", action.shade);\n break;\n case \"switch\":\n values.set(action.key, action.on ? \"1\" : \"0\");\n break;\n case \"view\":\n values.set(\"views\", action.view);\n break;\n case \"time\":\n // `at` excludes an even sampling, so its keys go.\n for (const key of [\"from\", \"to\", \"rate\"]) values.delete(key);\n values.set(\"at\", String(action.seconds));\n break;\n case \"subject\":\n if (action.name === null) values.delete(\"subject\");\n else values.set(\"subject\", action.name);\n break;\n }\n return read(\n state,\n (): IAutoMovieCapturePlanRequest =>\n parseAutoMovieCapturePlanRequest(values),\n );\n}\n\n/** The state a reading gives: its request, or the previous request with the refusal. */\nfunction read(\n state: IAutoMovieInspectorState,\n reading: () => IAutoMovieCapturePlanRequest,\n): IAutoMovieInspectorState {\n try {\n return { request: reading(), error: null };\n } catch (error) {\n return {\n request: state.request,\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\n/** Rewrite one comma-separated key; an empty list removes the key. */\nfunction edit(\n values: Map<string, string>,\n key: string,\n change: (items: string[]) => string[],\n): void {\n const items: string[] = change(\n (values.get(key) ?? \"\")\n .split(\",\")\n .map((item: string): string => item.trim())\n .filter((item: string): boolean => item !== \"\"),\n );\n if (items.length === 0) values.delete(key);\n else values.set(key, items.join(\",\"));\n}\n"],"mappings":";;;;AAWA,MAAM,QAAmE;CACvE,QAAQ;CACR,MAAM;CACN,OAAO;CACP,OAAO;AACT;;;;;;;;;;;;;;;;AAiBA,SAAgB,8BACd,OACA,QAC0B;CAC1B,IAAI,OAAO,SAAS,WAClB,OAAO;EAAE,SAAS,OAAO;EAAS,OAA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O;EAAK;CAC3C,SAAS,OAAO;EACd,OAAO;GACL,SAAS,MAAM;GACf,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;EAC9D;CACF;AACF;;AAGA,SAAS,KACP,QACA,KACA,QACM;CACN,MAAM,QAAkB,QACrB,OAAO,IAAI,GAAG,KAAK,GAAA,CACjB,MAAM,GAAG,CAAC,CACV,KAAK,SAAyB,KAAK,KAAK,CAAC,CAAC,CAC1C,QAAQ,SAA0B,SAAS,EAAE,CAClD;CACA,IAAI,MAAM,WAAW,GAAG,OAAO,OAAO,GAAG;MACpC,OAAO,IAAI,KAAK,MAAM,KAAK,GAAG,CAAC;AACtC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automovie/viewer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "automovie viewer: the interactive display, a React inspector and an imperative mount over the render package's three.js scene (not an editor)",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"url": "https://github.com/samchon/automovie"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@automovie/render": "^0.
|
|
32
|
+
"@automovie/render": "^0.3.0",
|
|
33
33
|
"three": "^0.186.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"react-dom": "^19.2.0",
|
|
45
45
|
"rimraf": "^6.0.1",
|
|
46
46
|
"rolldown": "^1.1.5",
|
|
47
|
-
"ttsc": "^0.37.
|
|
47
|
+
"ttsc": "^0.37.1",
|
|
48
48
|
"typescript": "^7.0.2",
|
|
49
|
-
"@ttsc/lint": "^0.37.
|
|
49
|
+
"@ttsc/lint": "^0.37.1",
|
|
50
50
|
"@wrtnlabs/evidence": "^0.8.2",
|
|
51
|
-
"@ttsc/evidence": "^0.37.
|
|
51
|
+
"@ttsc/evidence": "^0.37.1",
|
|
52
52
|
"@types/node": "^22.19.17"
|
|
53
53
|
},
|
|
54
54
|
"engines": {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type IAutoMovieInspectionLegendEntry,
|
|
4
|
-
selectAutoMovieDrawSubject,
|
|
5
|
-
} from "@automovie/render";
|
|
1
|
+
import type { IAutoMovieInspectionLegendEntry } from "@automovie/interface";
|
|
2
|
+
import { type IAutoMovieDrawSubject, selectAutoMovieDrawSubject } from "@automovie/render";
|
|
6
3
|
import {
|
|
7
4
|
type ChangeEvent,
|
|
8
5
|
type Dispatch,
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type IAutoMovieCapturePlanRequest,
|
|
4
|
-
type IAutoMovieInspectionKind,
|
|
5
|
-
type IAutoMovieInspectionLegendEntry,
|
|
6
|
-
listAutoMovieInspectionKinds,
|
|
7
|
-
} from "@automovie/render";
|
|
1
|
+
import type { IAutoMovieCapturePlanRequest, IAutoMovieInspectionKind, IAutoMovieInspectionLegendEntry } from "@automovie/interface";
|
|
2
|
+
import { type IApplyAutoMovieInspectionProps, listAutoMovieInspectionKinds } from "@automovie/render";
|
|
8
3
|
import type { ChangeEvent, JSX } from "react";
|
|
9
4
|
|
|
10
5
|
import type { IAutoMovieInspectorAction } from "./IAutoMovieInspectorAction.js";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
IAutoMovieCapturePlanRequest,
|
|
3
|
+
IAutoMovieInspectionColorAssignment,
|
|
3
4
|
IAutoMovieInspectionRequest,
|
|
4
|
-
} from "@automovie/
|
|
5
|
+
} from "@automovie/interface";
|
|
6
|
+
|
|
5
7
|
import {
|
|
6
8
|
type ChangeEvent,
|
|
7
9
|
type Dispatch,
|
|
@@ -15,6 +17,7 @@ import type { IAutoMovieInspectorAction } from "./IAutoMovieInspectorAction.js";
|
|
|
15
17
|
import type { IAutoMovieInspectorPathNode } from "./IAutoMovieInspectorPathNode.js";
|
|
16
18
|
import { buildAutoMovieInspectorPathTree } from "./buildAutoMovieInspectorPathTree.js";
|
|
17
19
|
|
|
20
|
+
|
|
18
21
|
/** The width of each of the three checkbox columns and the colour column, pixels. */
|
|
19
22
|
const COLUMN: number = 22;
|
|
20
23
|
|
|
@@ -144,11 +147,11 @@ function Row(props: {
|
|
|
144
147
|
const [open, setOpen]: [boolean, Dispatch<SetStateAction<boolean>>] =
|
|
145
148
|
useState<boolean>(false);
|
|
146
149
|
const pattern: string | null = node.pattern;
|
|
147
|
-
const color:
|
|
150
|
+
const color: IAutoMovieInspectionColorAssignment | undefined =
|
|
148
151
|
pattern === null
|
|
149
152
|
? undefined
|
|
150
153
|
: inspection.color.find(
|
|
151
|
-
(entry:
|
|
154
|
+
(entry: IAutoMovieInspectionColorAssignment): boolean =>
|
|
152
155
|
entry.pattern === pattern,
|
|
153
156
|
);
|
|
154
157
|
const label: string = node.name === "" ? "(unnamed)" : node.name;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
AutoMovieInspectionShade,
|
|
2
3
|
IAutoMovieCapturePlanRequest,
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
} from "@automovie/interface";
|
|
5
|
+
|
|
5
6
|
import type { ChangeEvent, JSX } from "react";
|
|
6
7
|
|
|
7
8
|
import type { IAutoMovieInspectorAction } from "./IAutoMovieInspectorAction.js";
|
|
8
9
|
|
|
10
|
+
|
|
9
11
|
/** Every shade, keyed so the compiler refuses a list that misses one. */
|
|
10
|
-
const SHADES: Record<
|
|
12
|
+
const SHADES: Record<AutoMovieInspectionShade, true> = {
|
|
11
13
|
beauty: true,
|
|
12
14
|
depth: true,
|
|
13
15
|
mask: true,
|
|
@@ -87,6 +89,6 @@ export function AutoMovieInspectorShadePanel(props: {
|
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
/** Whether a text is one of the shades offered. */
|
|
90
|
-
function isShade(text: string): text is
|
|
92
|
+
function isShade(text: string): text is AutoMovieInspectionShade {
|
|
91
93
|
return Object.hasOwn(SHADES, text);
|
|
92
94
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
type IAutoMovieInspectionView,
|
|
4
|
-
formatAutoMovieInspectionView,
|
|
5
|
-
parseAutoMovieInspectionView,
|
|
6
|
-
} from "@automovie/render";
|
|
1
|
+
import type { IAutoMovieCapturePlanRequest, IAutoMovieInspectionView } from "@automovie/interface";
|
|
2
|
+
import { formatAutoMovieInspectionView, parseAutoMovieInspectionView } from "@automovie/render";
|
|
7
3
|
import { type ChangeEvent, type JSX, useState } from "react";
|
|
8
4
|
|
|
9
5
|
import type { IAutoMovieInspectorAction } from "./IAutoMovieInspectorAction.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
AutoMovieInspectionShade,
|
|
2
3
|
IAutoMovieCapturePlanRequest,
|
|
3
|
-
|
|
4
|
-
} from "@automovie/render";
|
|
4
|
+
} from "@automovie/interface";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* One edit of the inspector's request, as a control dispatches it to `reduceAutoMovieInspectorState`.
|
|
@@ -90,7 +90,7 @@ export namespace IAutoMovieInspectorAction {
|
|
|
90
90
|
type: "shade";
|
|
91
91
|
|
|
92
92
|
/** The shade drawn. */
|
|
93
|
-
shade:
|
|
93
|
+
shade: AutoMovieInspectionShade;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
IApplyAutoMovieInspectionProps,
|
|
3
2
|
IAutoMovieCapturePlanRequest,
|
|
4
3
|
IAutoMovieInspectionLegendEntry,
|
|
5
|
-
} from "@automovie/
|
|
4
|
+
} from "@automovie/interface";
|
|
5
|
+
import type { IApplyAutoMovieInspectionProps } from "@automovie/render";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A subject mounted on the inspector's canvas by `mountAutoMovieInspectorScene`: the calls the component makes while it lives.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAutoMovieCapturePlanRequest } from "@automovie/
|
|
1
|
+
import type { IAutoMovieCapturePlanRequest } from "@automovie/interface";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* What the inspector holds between edits: the one request every control edits and the canvas draws, and the last refusal.
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
formatAutoMovieCapturePlanRequest,
|
|
4
|
-
} from "@automovie/render";
|
|
1
|
+
import type { IAutoMovieCapturePlanRequest } from "@automovie/interface";
|
|
2
|
+
import { formatAutoMovieCapturePlanRequest } from "@automovie/render";
|
|
5
3
|
|
|
6
4
|
/** Characters the grammar writes that a query keeps readable: list, view, path, focus, colour pair and cut separators. */
|
|
7
5
|
const READABLE: ReadonlyMap<string, string> = new Map<string, string>([
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
formatAutoMovieCapturePlanRequest,
|
|
4
|
-
} from "@automovie/render";
|
|
1
|
+
import type { IAutoMovieCapturePlanRequest } from "@automovie/interface";
|
|
2
|
+
import { formatAutoMovieCapturePlanRequest } from "@automovie/render";
|
|
5
3
|
|
|
6
4
|
/** An argument a POSIX shell passes through unquoted. */
|
|
7
5
|
const PLAIN: RegExp = /^[\w%+,./:=@-]+$/u;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IAutoMovieCapturePlanRequest,
|
|
3
|
+
IAutoMovieInspectionLabel,
|
|
4
|
+
IAutoMovieInspectionView,
|
|
5
|
+
} from "@automovie/interface";
|
|
1
6
|
import {
|
|
2
7
|
type IApplyAutoMovieInspectionProps,
|
|
3
|
-
type IAutoMovieCapturePlanRequest,
|
|
4
8
|
type IAutoMovieDrawScene,
|
|
5
9
|
type IAutoMovieDrawSubject,
|
|
6
10
|
type IAutoMovieInspectionHandle,
|
|
7
|
-
type IAutoMovieInspectionLabel,
|
|
8
|
-
type IAutoMovieInspectionView,
|
|
9
11
|
type IAutoMovieViewerViewpoint,
|
|
10
12
|
applyAutoMovieInspection,
|
|
11
13
|
autoMovieViewerNamedViewpoints,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
parseAutoMovieCapturePlanRequest,
|
|
4
|
-
} from "@automovie/render";
|
|
1
|
+
import type { IAutoMovieCapturePlanRequest } from "@automovie/interface";
|
|
2
|
+
import { parseAutoMovieCapturePlanRequest } from "@automovie/render";
|
|
5
3
|
|
|
6
4
|
/**
|
|
7
5
|
* Read the request an address names: its query text, with or without the leading `?`, through the capture plan grammar.
|