popost 4.6.9 → 4.6.11

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 (89) hide show
  1. package/README.md +2 -0
  2. package/SKILL.md +6 -2
  3. package/assets/canvas/assets/{dist-CX2mxpwq.js → dist-DAI3U0Jz.js} +1 -1
  4. package/assets/canvas/assets/{es-BFnFFu6P.js → es-3zEBH4X5.js} +1 -1
  5. package/assets/canvas/assets/index-Ce4sDSi9.css +1 -0
  6. package/assets/canvas/assets/{index-CwqBT_rk.js → index-Dc4qgNYJ.js} +4 -4
  7. package/assets/canvas/assets/{jszip.min-DqfCBLrH.js → jszip.min-BwYI3Gs3.js} +1 -1
  8. package/assets/canvas/build-info.json +6 -6
  9. package/assets/canvas/index.html +2 -2
  10. package/dist/cli.js +30544 -27776
  11. package/dist/index.js +30295 -27591
  12. package/dist/types/cloud/account.d.ts +14 -0
  13. package/dist/types/cloud/deliver.d.ts +29 -0
  14. package/dist/types/cloud/entitlement.d.ts +55 -0
  15. package/dist/types/cloud/paid-gate.d.ts +159 -0
  16. package/dist/types/cloud/service.d.ts +68 -23
  17. package/dist/types/commands/link-platforms.d.ts +2 -0
  18. package/dist/types/commands/update.d.ts +2 -0
  19. package/dist/types/device-login.d.ts +35 -0
  20. package/dist/types/editor/canvas-state.d.ts +1 -1
  21. package/dist/types/editor/handoff.d.ts +12 -3
  22. package/dist/types/editor/http-types.d.ts +4 -1
  23. package/dist/types/editor/routes-cloud.d.ts +4 -3
  24. package/dist/types/install/agents.d.ts +36 -11
  25. package/dist/types/install/record.d.ts +15 -0
  26. package/dist/types/providers/api-errors.d.ts +2 -0
  27. package/dist/types/providers/api.d.ts +3 -1
  28. package/dist/types/providers/link.d.ts +2 -0
  29. package/dist/types/providers/pricing.d.ts +11 -0
  30. package/dist/types/runtime.d.ts +38 -0
  31. package/dist/types/update/auto.d.ts +14 -0
  32. package/dist/types/update/check.d.ts +47 -0
  33. package/dist/types/update/install-kind.d.ts +27 -0
  34. package/dist/types/update/npm.d.ts +8 -0
  35. package/dist/types/update/perform.d.ts +64 -0
  36. package/dist/types/update/report.d.ts +7 -0
  37. package/dist/types/update/semver.d.ts +17 -0
  38. package/dist/types/update/session.d.ts +19 -0
  39. package/dist/types/update/state.d.ts +91 -0
  40. package/dist/types/update/verify.d.ts +33 -0
  41. package/dist/types/version.d.ts +1 -1
  42. package/dist/types/video/cache/frames.d.ts +85 -0
  43. package/dist/types/video/cache/holds.d.ts +35 -0
  44. package/dist/types/video/cache/project.d.ts +57 -0
  45. package/dist/types/video/commands/clean.d.ts +9 -0
  46. package/dist/types/video/commands/product.d.ts +15 -0
  47. package/dist/types/video/compile/footage.d.ts +24 -7
  48. package/dist/types/video/compile/index.d.ts +3 -0
  49. package/dist/types/video/generate/index.d.ts +13 -1
  50. package/dist/types/video/preview/cloud.d.ts +20 -1
  51. package/dist/types/video/preview/edit/routes.d.ts +17 -11
  52. package/dist/types/video/preview/export-settings.d.ts +1 -2
  53. package/dist/types/video/preview/project.d.ts +3 -0
  54. package/dist/types/video/preview/shell/dom.d.ts +2 -0
  55. package/dist/types/video/preview/shell/footage.d.ts +2 -1
  56. package/dist/types/video/preview/shell/i18n.d.ts +1 -1
  57. package/dist/types/video/preview/shell/studio/cloud.d.ts +6 -1
  58. package/dist/types/video/preview/shell/studio/compare.d.ts +16 -0
  59. package/dist/types/video/preview/shell/studio/copy.d.ts +24 -3
  60. package/dist/types/video/preview/shell/studio/paid.d.ts +23 -0
  61. package/dist/types/video/preview/shell/studio/style.d.ts +2 -2
  62. package/dist/types/video/preview/shell/studio/workspace.d.ts +2 -0
  63. package/dist/types/video/preview/shell-bundle.d.ts +1 -1
  64. package/dist/types/video/product/requests.d.ts +74 -0
  65. package/dist/types/video/product/review.d.ts +74 -0
  66. package/dist/types/video/product/sheet.d.ts +99 -0
  67. package/dist/types/video/project/schema.d.ts +21 -21
  68. package/dist/types/video/render/index.d.ts +2 -0
  69. package/dist/types/video/render/session.d.ts +4 -0
  70. package/dist/types/video/replication/contract.d.ts +29 -29
  71. package/dist/types/video/replication/production.d.ts +5 -5
  72. package/dist/types/video/replication/schema.d.ts +2 -2
  73. package/dist/types/video/replication/speech-observed.d.ts +6 -6
  74. package/package.json +1 -1
  75. package/references/host-editor.md +33 -8
  76. package/references/image-workflow.md +6 -6
  77. package/references/onboarding.md +23 -3
  78. package/references/post-bundle.md +7 -7
  79. package/references/video-editing.md +19 -7
  80. package/references/video-performers.md +2 -2
  81. package/references/video-product.md +174 -0
  82. package/references/video-replication.md +1 -1
  83. package/references/video-step-1-read.md +15 -1
  84. package/references/video-step-3-content.md +14 -6
  85. package/references/video-step-7-deliver.md +36 -1
  86. package/references/video-tools.md +43 -7
  87. package/references/video.md +5 -0
  88. package/assets/canvas/assets/index-C5rz5H21.css +0 -1
  89. package/dist/types/cloud/auth-flow.d.ts +0 -30
@@ -0,0 +1,15 @@
1
+ import type { Runtime } from '../../runtime';
2
+ import { type ReferenceLimits } from '../product/requests';
3
+ import { type Commands } from './shared';
4
+ /**
5
+ * What the model of the clips takes, from the built-in generator's own list (POPOST_VIDEO_MODEL, else the platform's
6
+ * default). A generator of the user's own, or a list that cannot be read, gives no limits and says why: the list of
7
+ * requests is then not held to them, and says so.
8
+ */
9
+ /** POPOST_GEN_CMD names the built-in generator (popost video generate, whatever comes before and after it). */
10
+ export declare const builtInGenerator: (rt: Runtime) => boolean;
11
+ export declare const referenceLimits: (rt: Runtime) => Promise<{
12
+ limits?: ReferenceLimits;
13
+ unread?: string;
14
+ }>;
15
+ export declare const productCommands: Commands;
@@ -1,8 +1,8 @@
1
1
  import type { Runtime } from '../../runtime';
2
2
  import type { FootageFacts, FootageInfo, Project, Resolved } from '../types';
3
3
  import { type FootageColour } from '../media/footage';
4
- /** Where frame pictures go, relative to the project directory. */
5
- export declare const FOOTAGE_CACHE = ".cache/video";
4
+ import type { FootageHold } from '../cache/holds';
5
+ export { FOOTAGE_CACHE } from '../cache/frames';
6
6
  export interface FootageProbe {
7
7
  /** Codecs that common browsers decode directly; other sources keep extracted frame pictures. */
8
8
  native?: Record<string, boolean>;
@@ -15,6 +15,20 @@ export interface FootageStats {
15
15
  extracted: number;
16
16
  reused: number;
17
17
  ms: number;
18
+ /** The size of the frame cache after the build, and what the build removed from it. */
19
+ cacheBytes?: number;
20
+ freedBytes?: number;
21
+ /** Set when the frames this timeline shows are alone larger than the cache's size cap: they stay. */
22
+ overCap?: {
23
+ neededBytes: number;
24
+ capBytes: number;
25
+ };
26
+ }
27
+ export interface ExtractOptions {
28
+ /** The render scale, so a half-size render extracts half-size pictures. */
29
+ scale?: number;
30
+ /** The caller shows the pictures for longer than the build (a render page, the preview): the directories are named in it before anything is removed. */
31
+ hold?: FootageHold;
18
32
  }
19
33
  /** Reads every video material whose file lies inside the project and exists (check reports the others). */
20
34
  export declare const probeFootage: (rt: Runtime, project: Project, projectDir: string) => Promise<FootageProbe>;
@@ -27,12 +41,15 @@ export declare const extractSize: (r: Resolved, id: string, src: Pick<FootageFac
27
41
  height: number;
28
42
  };
29
43
  /**
30
- * Extracts the frames the timeline shows (missing ones only) and returns the timeline with each footage's dir set.
31
- * opts.scale: the render scale, so a half-size render extracts half-size pictures.
44
+ * Extracts the frames the timeline shows (missing ones only) and returns the timeline with each footage's dir set,
45
+ * then removes from the cache what this state of the project no longer needs (never a failure of the build).
32
46
  */
33
- export declare const extractFootage: (rt: Runtime, r: Resolved, projectDir: string, probed: FootageProbe, opts?: {
34
- scale?: number;
35
- }) => Promise<{
47
+ export declare const extractFootage: (rt: Runtime, r: Resolved, projectDir: string, probed: FootageProbe, opts?: ExtractOptions) => Promise<{
36
48
  resolved: Resolved;
37
49
  stats: FootageStats;
38
50
  }>;
51
+ /**
52
+ * A build that shows no extracted frames (no video, or the Studio playing the clips themselves): the caller's hold
53
+ * names nothing, and the cache loses the directories of clips the project no longer has.
54
+ */
55
+ export declare const releaseFootage: (rt: Runtime, r: Resolved, projectDir: string, opts?: ExtractOptions) => Promise<void>;
@@ -6,6 +6,7 @@
6
6
  import type { Runtime } from '../../runtime';
7
7
  import type { Problem, Project, Resolved } from '../types';
8
8
  import { type FootageStats } from './footage';
9
+ import type { FootageHold } from '../cache/holds';
9
10
  export { compilePage } from './page';
10
11
  export { loadWords } from './words';
11
12
  export interface BuiltPage {
@@ -27,6 +28,8 @@ export interface BuildOptions {
27
28
  source?: unknown;
28
29
  /** Fetch the effects of the catalogue the project names and does not have yet (render, preview, draft export). */
29
30
  fetchEffects?: boolean;
31
+ /** The caller shows the page for longer than the build: the frame directories it shows are named in this hold (cache/holds.ts). */
32
+ hold?: FootageHold;
30
33
  }
31
34
  /** projectDir: as the user typed it (the problems name it so), against rt.cwd. */
32
35
  export declare const buildPage: (rt: Runtime, projectDir: string, opts?: BuildOptions) => Promise<BuiltPage>;
@@ -32,6 +32,7 @@ import { type VisibleSpeech } from './speech';
32
32
  import { type BeatTimes } from './dialogue';
33
33
  import { type ClipMusicBasis, type ModeContext, type RecordedException, type SoundMode } from '../sound/modes';
34
34
  import { type ClipMusicUse } from './clip-sound';
35
+ import { type ReferenceLimits } from '../product/requests';
35
36
  export type GenerateKind = 'video' | 'image';
36
37
  export interface GenerateRequest {
37
38
  prompt: string;
@@ -111,6 +112,12 @@ export declare const commandGenerator: (rt: Runtime) => Generator | undefined;
111
112
  export interface MaterialRequest extends GenerateRequest {
112
113
  /** Visible role ids from cast.json; [] explicitly declares a shot without people. */
113
114
  cast?: string[];
115
+ /**
116
+ * The products of the project's product sheet this file shows (production/product.json; product/requests.ts); []
117
+ * declares that it shows none. Every picture the user gave of them goes with the request as a reference picture,
118
+ * and the sheet's product block into its prompt. A project with a sheet refuses a request without this.
119
+ */
120
+ products?: string[];
114
121
  speech?: VisibleSpeech;
115
122
  /**
116
123
  * The role of the clip's own sound in the video (sound/modes.ts; video-sound.md): "speech", "exhibit", "ambience"
@@ -256,7 +263,12 @@ export declare const makeMaterials: (rt: Runtime, o: {
256
263
  generator: Generator;
257
264
  anchor?: boolean;
258
265
  picture?: AnchorPicture;
259
- plan?: boolean;
266
+ plan?: boolean; /** The product rules' view of the run: the model's reference limits, and whether files are paid for now (product/requests.ts). */
267
+ product?: {
268
+ limits?: ReferenceLimits;
269
+ unread?: string;
270
+ paying?: boolean;
271
+ };
260
272
  times?: BeatTimes;
261
273
  music?: boolean;
262
274
  modes?: ModeContext;
@@ -1,3 +1,4 @@
1
+ import { type CloudDelivery } from '../../cloud/deliver';
1
2
  import { CloudService } from '../../cloud/service';
2
3
  import type { Runtime } from '../../runtime';
3
4
  import type { PreviewState } from './protocol';
@@ -7,7 +8,25 @@ interface File {
7
8
  bytes: number;
8
9
  absolute: string;
9
10
  }
11
+ /**
12
+ * How long one request of a sync may take before it is given up: a minute, plus a second for every MB it carries (the
13
+ * upload of a file) or refers to (the sync of the project, which the platform checks file by file), fifteen minutes at
14
+ * most. Without it a stalled connection would keep `popost video render` from ever returning.
15
+ */
16
+ export interface CloudLimits {
17
+ baseMs: number;
18
+ perMbMs: number;
19
+ capMs: number;
20
+ }
21
+ export declare const CLOUD_LIMITS: CloudLimits;
22
+ export declare const cloudTimeoutMs: (bytes: number, limits?: CloudLimits) => number;
10
23
  /** Only dependencies named by video.json and its scene documents are uploaded. Cache, logs and credentials stay local. */
11
24
  export declare const projectFiles: (rt: Runtime, dir: string, source: unknown) => Promise<File[]>;
12
- export declare const createVideoCloud: (rt: Runtime, dir: string, state: () => Promise<PreviewState>, enabled?: boolean) => CloudService;
25
+ export declare const createVideoCloud: (rt: Runtime, dir: string, state: () => Promise<PreviewState>, enabled?: boolean, limits?: CloudLimits) => CloudService;
26
+ /**
27
+ * Sync a video project once from a command, with no Studio open (`popost video render`): the Studio's own adapter, so the
28
+ * same files, the same uploads by content hash and the same `.studio/cloud.json`. `undefined` when no account is connected
29
+ * or the host shows projects in its own editor; never throws.
30
+ */
31
+ export declare const syncVideoProject: (rt: Runtime, projectDir: string, lang: "zh" | "en", limits?: CloudLimits) => Promise<CloudDelivery | undefined>;
13
32
  export {};
@@ -4,6 +4,7 @@
4
4
  * POST /api/edit one operation (ops.ts) -> { ok, op, label, history, state } or { ok: false, problems, history }
5
5
  * POST /api/undo the step before -> the same answer
6
6
  * POST /api/redo the step undone last -> the same answer
7
+ * POST /api/open-pricing opens the pricing page in the system browser (cloud/entitlement.ts) -> { ok, opened, url }
7
8
  * POST /api/render starts a render into out.mp4; progress and result come as "render" events
8
9
  * GET /api/schema the JSON schema of the parts of video.json the page edits (allowed values and ranges)
9
10
  */
@@ -19,6 +20,11 @@ export interface EditContext {
19
20
  editor: Editor;
20
21
  exportAccess?: () => Promise<ExportAccess>;
21
22
  studio?: (path: string, body: Record<string, unknown>) => Promise<unknown>;
23
+ /** Opens the pricing page of the configured site in the system browser; the request chooses the language only. */
24
+ openPricing?: (lang: unknown) => Promise<{
25
+ opened: boolean;
26
+ url: string;
27
+ }>;
22
28
  render: RenderJob;
23
29
  /** Origins a request from the page itself carries: "http://127.0.0.1:<port>" and the other loopback names. */
24
30
  origins: ReadonlySet<string>;
@@ -113,8 +119,8 @@ declare const SCHEMAS: {
113
119
  enter: z.ZodOptional<z.ZodObject<{
114
120
  preset: z.ZodEnum<{
115
121
  pop: "pop";
116
- type: "type";
117
122
  none: "none";
123
+ type: "type";
118
124
  fade: "fade";
119
125
  wipe: "wipe";
120
126
  slide: "slide";
@@ -140,8 +146,8 @@ declare const SCHEMAS: {
140
146
  exit: z.ZodOptional<z.ZodObject<{
141
147
  preset: z.ZodEnum<{
142
148
  pop: "pop";
143
- type: "type";
144
149
  none: "none";
150
+ type: "type";
145
151
  fade: "fade";
146
152
  wipe: "wipe";
147
153
  slide: "slide";
@@ -217,8 +223,8 @@ declare const SCHEMAS: {
217
223
  enter: z.ZodOptional<z.ZodObject<{
218
224
  preset: z.ZodEnum<{
219
225
  pop: "pop";
220
- type: "type";
221
226
  none: "none";
227
+ type: "type";
222
228
  fade: "fade";
223
229
  wipe: "wipe";
224
230
  slide: "slide";
@@ -244,8 +250,8 @@ declare const SCHEMAS: {
244
250
  exit: z.ZodOptional<z.ZodObject<{
245
251
  preset: z.ZodEnum<{
246
252
  pop: "pop";
247
- type: "type";
248
253
  none: "none";
254
+ type: "type";
249
255
  fade: "fade";
250
256
  wipe: "wipe";
251
257
  slide: "slide";
@@ -328,8 +334,8 @@ declare const SCHEMAS: {
328
334
  enter: z.ZodOptional<z.ZodObject<{
329
335
  preset: z.ZodEnum<{
330
336
  pop: "pop";
331
- type: "type";
332
337
  none: "none";
338
+ type: "type";
333
339
  fade: "fade";
334
340
  wipe: "wipe";
335
341
  slide: "slide";
@@ -355,8 +361,8 @@ declare const SCHEMAS: {
355
361
  exit: z.ZodOptional<z.ZodObject<{
356
362
  preset: z.ZodEnum<{
357
363
  pop: "pop";
358
- type: "type";
359
364
  none: "none";
365
+ type: "type";
360
366
  fade: "fade";
361
367
  wipe: "wipe";
362
368
  slide: "slide";
@@ -441,8 +447,8 @@ declare const SCHEMAS: {
441
447
  enter: z.ZodOptional<z.ZodObject<{
442
448
  preset: z.ZodEnum<{
443
449
  pop: "pop";
444
- type: "type";
445
450
  none: "none";
451
+ type: "type";
446
452
  fade: "fade";
447
453
  wipe: "wipe";
448
454
  slide: "slide";
@@ -468,8 +474,8 @@ declare const SCHEMAS: {
468
474
  exit: z.ZodOptional<z.ZodObject<{
469
475
  preset: z.ZodEnum<{
470
476
  pop: "pop";
471
- type: "type";
472
477
  none: "none";
478
+ type: "type";
473
479
  fade: "fade";
474
480
  wipe: "wipe";
475
481
  slide: "slide";
@@ -617,8 +623,8 @@ declare const SCHEMAS: {
617
623
  enter: z.ZodOptional<z.ZodObject<{
618
624
  preset: z.ZodEnum<{
619
625
  pop: "pop";
620
- type: "type";
621
626
  none: "none";
627
+ type: "type";
622
628
  fade: "fade";
623
629
  wipe: "wipe";
624
630
  slide: "slide";
@@ -644,8 +650,8 @@ declare const SCHEMAS: {
644
650
  exit: z.ZodOptional<z.ZodObject<{
645
651
  preset: z.ZodEnum<{
646
652
  pop: "pop";
647
- type: "type";
648
653
  none: "none";
654
+ type: "type";
649
655
  fade: "fade";
650
656
  wipe: "wipe";
651
657
  slide: "slide";
@@ -1009,8 +1015,8 @@ declare const SCHEMAS: {
1009
1015
  readonly motion: z.ZodObject<{
1010
1016
  preset: z.ZodEnum<{
1011
1017
  pop: "pop";
1012
- type: "type";
1013
1018
  none: "none";
1019
+ type: "type";
1014
1020
  fade: "fade";
1015
1021
  wipe: "wipe";
1016
1022
  slide: "slide";
@@ -1,4 +1,4 @@
1
- import type { Runtime } from '../../runtime';
1
+ /** What the render route needs of the account's entitlement (`cloud/entitlement.ts`). */
2
2
  export interface ExportAccess {
3
3
  premium: boolean;
4
4
  verified: boolean;
@@ -14,7 +14,6 @@ export interface VideoExportSettings {
14
14
  from?: number;
15
15
  to?: number;
16
16
  }
17
- export declare const exportAccess: (rt: Runtime) => Promise<ExportAccess>;
18
17
  export declare const readExportSettings: (raw: unknown, canvas: {
19
18
  width: number;
20
19
  height: number;
@@ -4,6 +4,7 @@
4
4
  * writes a file. Results are cached until the watcher reports a change (bump).
5
5
  */
6
6
  import type { Runtime } from '../../runtime';
7
+ import type { FootageHold } from '../cache/holds';
7
8
  import type { Resolved } from '../types';
8
9
  import type { PreviewState } from './protocol';
9
10
  export interface SourceOptions {
@@ -15,6 +16,8 @@ export interface SourceOptions {
15
16
  referenceMeasure?: string;
16
17
  /** Edit mode: the state carries video.json as written ("source"), which the page's form edits. */
17
18
  edit?: boolean;
19
+ /** The server's hold on the frame directories its page shows (cache/holds.ts), kept current by every load. */
20
+ hold?: FootageHold;
18
21
  }
19
22
  /** File names looked up in the project directory, in this order. The round trip writes measure.json and truth.json. */
20
23
  export declare const RENDER_MEASURE_NAMES: readonly ["measure.json", "render.measure.json", "replica.measure.json"];
@@ -37,6 +37,8 @@ declare const ICONS: {
37
37
  readonly external: "M9 2h5v5M14 2 7 9M6 2H2v12h12v-4";
38
38
  readonly cloud: "M4 12a3 3 0 0 1-1-5.8A5 5 0 0 1 12 5a3.5 3.5 0 0 1 0 7M8 14V7M5.5 9.5 8 7l2.5 2.5";
39
39
  readonly refresh: "M13 2v4H9M13 6a5.5 5.5 0 1 0 .2 5";
40
+ readonly close: "M3.5 3.5l9 9M12.5 3.5l-9 9";
41
+ readonly lock: "M4 7.5h8v6H4zM5.8 7.5V5.4a2.2 2.2 0 0 1 4.4 0v2.1";
40
42
  };
41
43
  export type IconName = keyof typeof ICONS;
42
44
  export declare const icon: (name: IconName) => SVGSVGElement;
@@ -1,6 +1,7 @@
1
1
  import type { Resolved } from '../../types';
2
2
  /** Native decoding belongs to the interactive preview; export still uses deterministic extracted frames. */
3
- export declare const nativeFootage: (doc: Document, r: Resolved) => {
3
+ /** onFailed(file): a native-only source (no frame pictures to fall back on) could not be loaded or decoded. */
4
+ export declare const nativeFootage: (doc: Document, r: Resolved, onFailed?: (file: string) => void) => {
4
5
  sync: (frame: number, playing: boolean, speed: number) => void;
5
6
  needsPictures: () => boolean;
6
7
  dispose: () => void;
@@ -13,7 +13,7 @@ declare const EN: {
13
13
  readonly seekNote: "A browser video seek is near, not frame-exact.";
14
14
  readonly noReference: "No reference video. Start with --reference <video> to show one here.";
15
15
  readonly errorsOnStage: "The project has errors; the stage lists them.";
16
- readonly imageFailed: "A picture failed to load";
16
+ readonly imageFailed: "A picture or video failed to load";
17
17
  readonly first: "First frame (Home)";
18
18
  readonly last: "Last frame (End)";
19
19
  readonly back10: "Back 10 frames (Shift+Left)";
@@ -1,3 +1,8 @@
1
1
  import type { Store } from '../app';
2
- /** Match the image editor's CloudButton lifecycle, including retrying a retained upload credential. */
2
+ /**
3
+ * The Studio's cloud control, with the image editor's CloudButton lifecycle: "Save to Cloud" connects the user's popost.ai
4
+ * account (the device code and a copyable link while it waits), "Cloud sync is on" once it is connected and synced, and
5
+ * "Cloud sync is off", a link to the page with the switch, when the account has it off. The mode shown is the service's
6
+ * current one: it changes while the page is open.
7
+ */
3
8
  export declare const mountCloud: (root: HTMLElement, store: Store, saveLocal: () => Promise<boolean>) => void;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Whether the Studio opens with the reference beside the video. A project that has a reference is a replication of
3
+ * it, and opens with the comparison on (reference left, video right); one without opens with it off. Once the user
4
+ * switches it by hand, that choice is kept for the project and wins the next time it is opened.
5
+ *
6
+ * The choices are one small map in localStorage (the 50 projects switched last). A project is known by its directory;
7
+ * a host that serves many projects from changing directories names it instead: it puts a stable id of the project in
8
+ * sessionStorage under PROJECT_KEY before the shell starts.
9
+ */
10
+ import type { PreviewState } from '../../protocol';
11
+ export declare const COMPARE_KEY = "popost-studio-compare";
12
+ export declare const PROJECT_KEY = "popost-studio-project";
13
+ /** The comparison as the Studio opens: the user's own choice for this project, else on exactly when it has a reference. */
14
+ export declare const initialCompare: (s: PreviewState) => boolean;
15
+ /** Keeps the user's switch for this project, moved to the end of the map so that the oldest choices go first. */
16
+ export declare const rememberCompare: (s: PreviewState, on: boolean) => void;
@@ -1,5 +1,6 @@
1
1
  import type { Store } from '../app';
2
2
  declare const en: {
3
+ readonly closePanel: "Close panel";
3
4
  readonly noReference: "No reference video is available for this project.";
4
5
  readonly shots: "Shots";
5
6
  readonly media: "Media";
@@ -70,9 +71,6 @@ declare const en: {
70
71
  readonly start: "Start frame";
71
72
  readonly end: "End frame (exclusive)";
72
73
  readonly paid: "Paid benefit";
73
- readonly paidInfo: "This feature is available with a paid plan.";
74
- readonly unlock: "Unlock";
75
- readonly refreshPlan: "Refresh plan";
76
74
  readonly preparing: "Preparing";
77
75
  readonly rendering: "Rendering";
78
76
  readonly renderDone: "Export ready";
@@ -154,6 +152,29 @@ declare const en: {
154
152
  readonly versionSnapshot: "Saved versions preserve the draft JSON; assets are reused.";
155
153
  readonly bitrateUnit: "Mbps";
156
154
  readonly reviewOnly: "Review notes are local; sending to an Agent requires copying the request.";
155
+ readonly paidChecking: "Checking your plan…";
156
+ readonly paidUnknown: "Could not check your plan.";
157
+ readonly paidRetry: "Try again";
158
+ readonly paidConnect: "Connect your popost.ai account to use paid options.";
159
+ readonly paidNoConnect: "An account cannot be connected from here. Use popost auth login or the key settings of your host.";
160
+ readonly paidConnectAction: "Connect account";
161
+ readonly paidConnectFailed: "Could not connect the account. Try again.";
162
+ readonly paidDenied: "The connection was declined.";
163
+ readonly paidExpired: "The code expired before it was approved. Try again.";
164
+ readonly paidApprove: "Approve the connection in your browser.";
165
+ readonly paidApproveLink: "Open this link in your browser and approve.";
166
+ readonly paidCode: "Code";
167
+ readonly paidApprovalLink: "Approval link";
168
+ readonly paidUpgrade: "4K is a paid feature. 1080p and below stay free.";
169
+ readonly paidPlans: "See plans";
170
+ readonly paidPlansAgain: "Open again";
171
+ readonly paidOpened: "Plans opened in your browser. This unlocks by itself after you upgrade.";
172
+ readonly paidOpenLink: "4K is a paid feature. Open the plans in your browser:";
173
+ readonly paidPricingLink: "Plans link";
174
+ readonly paidUnlocked: "Paid options unlocked";
175
+ readonly copyLink: "Copy link";
176
+ readonly linkCopied: "Link copied";
177
+ readonly openLink: "Open";
157
178
  };
158
179
  export type CopyKey = keyof typeof en;
159
180
  export declare const copy: (store: Store, key: CopyKey) => string;
@@ -0,0 +1,23 @@
1
+ import type { Store } from '../app';
2
+ /**
3
+ * The paid export options of the Studio (the resolutions above 1080p), with the image editor's flow: the same state
4
+ * machine (`cloud/paid-gate.ts`), drawn here without a framework. A paid option that is clicked
5
+ * while it is locked is remembered and a prompt appears in place: connect the account (no account yet), or see the plans
6
+ * (free plan). The local Studio asks its own service to open those pages in the system browser, since it may be shown in
7
+ * an agent's side panel; the hosted Studio, where the user is signed in, links to the plans in a new tab. Once the account
8
+ * is paid the remembered option is applied by itself, without a reload.
9
+ */
10
+ export interface StudioPaid {
11
+ /** Paid options are locked for now. */
12
+ locked(): boolean;
13
+ /** A paid option was clicked: `apply` runs now when the account is paid, otherwise once it is. */
14
+ request(id: string, apply: () => void): boolean;
15
+ /** Another option was chosen: nothing is remembered. */
16
+ dismiss(): void;
17
+ /** The prompt, to be placed right under the paid options; empty (and not shown) while there is nothing to say. */
18
+ readonly element: HTMLElement;
19
+ dispose(): void;
20
+ }
21
+ /** The mark of a paid option while it is locked. */
22
+ export declare const paidMark: (store: Store) => HTMLElement;
23
+ export declare const mountPaid: (store: Store, changed: (unlocked?: string) => void) => StudioPaid;
@@ -1,2 +1,2 @@
1
- export declare const STUDIO_CSS = "\n:root{--pc-bg:#f4f4f2;--pc-surface:#fff;--pc-surface-2:#f8f8f7;--pc-border:#dededb;--pc-text:#252525;--pc-muted:#85847d;--pc-hover:#ebebe8;--pc-accent:#ff7a1a;--pc-accent-soft:#fff1e5;--pc-stage:#e9e9e6;--timeline-height:240px;--left-width:264px;--right-width:300px}\nhtml.dark{color-scheme:dark;--pc-bg:#111;--pc-surface:#1a1a1a;--pc-surface-2:#141414;--pc-border:#363632;--pc-text:#f2f2f0;--pc-muted:#a5a59a;--pc-hover:#2a2a2a;--pc-accent-soft:#3e2b1b;--pc-stage:#0b0b0b}\nbody.studio{font:13px/1.45 'Helvetica Neue','PingFang SC',system-ui,sans-serif;background:var(--pc-bg);color:var(--pc-text);--bg:var(--pc-bg);--surface:var(--pc-surface);--fg:var(--pc-text);--muted:var(--pc-muted);--line:var(--pc-border);--accent:var(--pc-accent);--on-accent:#fff;--seg:#e7eef3;--item:#eee7f7;--audio:#e6f1e8;--stage:var(--pc-stage);--stage-fg:var(--pc-muted);--head:#292929}\n.studio [hidden]{display:none!important}.studio button,.studio input,.studio textarea,.studio select{font:inherit;color:inherit}.studio button:focus-visible,.studio a:focus-visible,.studio textarea:focus-visible,.studio input:focus-visible{outline:2px solid var(--pc-accent);outline-offset:2px}.studio button:disabled{opacity:.45;cursor:default}\n.studio #app{grid-template-rows:48px minmax(240px,1fr) var(--timeline-height) 24px;height:100dvh}.studio .main{display:grid;grid-template-rows:minmax(0,1fr);grid-template-columns:64px var(--left-width) minmax(0,1fr) var(--right-width);min-height:0;position:relative}.studio .left{overflow:hidden;min-height:0;min-width:0;display:flex;flex-direction:column}.studio .panel{width:auto;min-width:0;overflow:auto;background:var(--pc-surface);border-left:1px solid var(--pc-border);padding:12px 16px}.studio .panel>#problems,.studio .panel>#score,.studio .panel>#measures,.studio .panel>#notes{display:none}.studio .panel h2{font-size:12px;color:var(--pc-muted)}.studio .sel-title{font-size:13px;padding-bottom:10px;border-bottom:1px solid var(--pc-border);color:var(--pc-text);overflow-wrap:anywhere}.studio .status-line{font-size:11px;max-height:80px;overflow:auto}.studio #render-status{display:none}\n.studio-topbar{display:flex;align-items:center;gap:12px;padding:0 16px;background:var(--pc-surface-2);border-bottom:1px solid var(--pc-border);min-width:0;white-space:nowrap}.studio-brand{font-size:23px;font-weight:800;letter-spacing:-1.3px;margin-right:8px}.studio-brand:after{content:'\u2022';color:var(--pc-accent);font-size:15px;vertical-align:top;letter-spacing:0}.studio-project{min-width:80px;max-width:30%;overflow:hidden;text-overflow:ellipsis;flex:1}.studio-save{font-size:11px;color:var(--pc-muted)}.studio-save:before{content:'\u25CF';font-size:9px;color:#2e9e6b;margin-right:7px}.studio-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.studio-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:5px 10px;border:1px solid var(--pc-border);border-radius:8px;background:var(--pc-surface);text-decoration:none;font-size:12px;cursor:pointer}.studio-btn:hover{background:var(--pc-hover)}.studio-btn.primary{background:#292929;color:#fff;border-color:#292929}.dark .studio-btn.primary{background:#f2f2f0;color:#222}.studio-btn.selected{background:var(--pc-accent-soft);border-color:#ffb47c;color:#c76520}.studio-btn.ghost{border-color:transparent;background:transparent}.studio .tbtn{height:30px;min-width:30px;border:0;background:transparent;border-radius:7px}.studio .tbtn:hover{background:var(--pc-hover)}.studio #edit-render{display:none}.studio .edit-tools{gap:6px}.studio .tool-group{gap:2px}\n.studio-rail{min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:5px;padding:12px 5px;background:var(--pc-surface-2);border-right:1px solid var(--pc-border)}.studio-rail button{height:57px;flex:none;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;background:transparent;border:0;border-radius:8px;color:var(--pc-muted);font-size:11px;cursor:pointer}.studio-rail button.active{background:var(--pc-accent-soft);color:#e8711c}.studio-rail svg{width:19px;height:19px}.studio-content{min-height:0;overflow:auto;background:var(--pc-surface);border-right:1px solid var(--pc-border)}.studio-side-body{padding:14px 14px 20px;display:flex;flex-direction:column;gap:12px}.studio-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:24px}.studio-heading h2{margin:0;font-size:14px;font-weight:600;color:var(--pc-text)}.studio-heading small{font-size:10px;color:var(--pc-muted)}.studio-note{font-size:11px;line-height:1.7;color:var(--pc-muted);margin:0;overflow-wrap:anywhere}.studio-note.notice{padding:10px;border:1px solid #f0d5b9;border-radius:8px;background:var(--pc-accent-soft);color:#9a5c2d}.studio-note.bad{color:var(--err)}.studio-input{border:1px solid var(--pc-border);border-radius:7px;background:var(--pc-surface-2);width:100%;min-height:34px;padding:7px 9px;resize:vertical;min-width:0}.studio-field{display:flex;flex-direction:column;gap:6px;font-size:11px;color:var(--pc-muted)}.studio-field .studio-input{font-size:12px;color:var(--pc-text)}.studio-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}\n.studio-shot-list{display:flex;flex-direction:column;gap:7px}.studio-shot{width:100%;min-height:70px;justify-content:flex-start;text-align:left;padding:7px;gap:10px}.studio-thumb{display:block;width:74px;height:55px;object-fit:cover;border-radius:5px;background:var(--pc-stage);flex:none}.studio-shot-copy{display:flex;flex-direction:column;min-width:0;gap:7px}.studio-shot-copy strong{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:145px}.studio-shot-copy small{font-size:10px;color:var(--pc-muted)}.studio-media-list{display:grid;gap:12px}.studio-media-card,.studio-review-card,.studio-sentence{border:1px solid var(--pc-border);border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:9px}.studio-media-card>img,.studio-media-card>video{width:100%;max-height:150px;object-fit:contain;background:var(--pc-stage);border-radius:5px}.studio-media-card>audio{width:100%;height:30px}.studio-media-card>strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.studio-media-card .studio-btn{font-size:10px;padding:4px 6px}.studio-script-list{display:flex;flex-direction:column;gap:8px}.studio-sentence>button{align-self:flex-start;font-size:10px;min-height:24px}.studio-sentence textarea{font-size:12px}.studio-item{justify-content:flex-start;overflow-wrap:anywhere;text-align:left}.studio-slot-image{max-width:100%;max-height:150px;object-fit:contain}.studio-stage-heading{display:flex;align-items:center;justify-content:space-between;height:40px;flex:none;padding:0 18px;background:var(--pc-surface-2);border-bottom:1px solid var(--pc-border);font-size:12px}.studio-stage-heading small{font-size:10px;color:var(--pc-muted)}.studio .stage-area{min-height:0!important;padding:14px 18px;gap:14px;background:var(--pc-stage);min-height:160px}.studio .stage-area.comparing{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:16px}.studio .stage-area.comparing .viewer{width:100%;min-height:0;align-self:stretch;justify-content:center;padding:8px;border:1px solid var(--pc-border);border-radius:10px;background:var(--pc-surface-2)}.studio .stage-area.comparing .caption{width:100%;font-weight:600;color:var(--pc-text);padding:0 4px 5px}.studio .stage-area.comparing .note{width:100%;padding-inline:4px}.studio .frame-box{box-shadow:0 2px 7px #0002,0 12px 30px #0001}.studio .caption{font-size:11px}.studio .note{font-size:10px;max-width:350px}.studio .transport{height:76px;min-height:76px;flex-wrap:wrap;align-content:center;background:var(--pc-surface-2);padding:4px 12px;gap:7px}.studio .transport .readout{font-size:11px;gap:8px;order:2;flex:1 0 calc(100% - 100px)}.studio .transport #jump{order:3;width:80px;font-size:10px}.studio .transport .speed{order:1;font-size:10px}.studio .transport .tbtn{min-width:24px;padding:0 4px}.studio .transport #back10,.studio .transport #fwd10{display:none}.studio .transport .slider-wrap{min-width:50px}\n.studio-timeline-wrap{position:relative;display:flex;flex-direction:column;min-height:0;border-top:1px solid var(--pc-border);background:var(--pc-surface)}.studio-timeline-toolbar{height:39px;flex:none;display:flex;align-items:center;gap:8px;padding:0 14px;border-bottom:1px solid var(--pc-border);background:var(--pc-surface-2)}.studio-timeline-toolbar .spacer{flex:1}.studio-timeline-toolbar input[type=range]{width:105px;accent-color:var(--pc-accent)}.studio .timeline{min-height:0;flex:1;max-height:none;overflow:auto}.studio .lanes{--label:160px;width:calc(100% * var(--timeline-zoom,1));min-width:100%;padding-bottom:9px}.studio .lane{height:34px;border-color:var(--pc-border)}.studio .lane-label{position:sticky;left:0;z-index:9;background:var(--pc-surface);line-height:33px;font-size:11px;padding-left:15px}.studio .ruler{height:28px;background:var(--pc-surface-2);position:sticky;top:0;z-index:10}.studio .ruler .lane-label{background:var(--pc-surface-2);line-height:27px}.studio .rtick{font-size:10px;color:var(--pc-muted)}.studio .lane.segments{height:70px}.studio .blk.seg{height:58px;top:5px;bottom:auto;line-height:13px;padding:0 4px;border:1px solid #aebfcb;background:#e8eef3;color:#4c6474}.studio .blk.seg img{display:block;position:absolute;left:0;top:0;width:100%;height:39px;object-fit:cover;pointer-events:none}.studio .blk.seg .segment-name{position:absolute;bottom:1px;left:4px;right:2px;font-size:9px;overflow:hidden;text-overflow:ellipsis}.studio .blk.seg.selected{border:2px solid var(--pc-accent);background:#fff0e2}.studio .blk.item{background:#eee8fa;color:#8c70a9;border:1px solid #d8c9ef;font-size:10px;top:5px;bottom:5px}.studio .lane.caption-lane .blk.item{background:#f5efdf;color:#8e7950;border-color:#e6dcc1}.studio .lane.caption-lane .blk.selected{border-color:var(--pc-accent)}.studio .blk.audio{background:#e7f2e9;color:#537b60;border:1px solid #b3d1bd;top:5px;bottom:5px;font-size:10px}.studio .blk.audio.wave-ready{color:transparent}.studio .blk.audio svg{width:100%;height:100%;position:absolute;inset:0;pointer-events:none}.studio .measure,.studio .lane.words-lane{display:none}.studio.show-analysis .measure,.studio.show-analysis .lane.words-lane{display:grid}.studio .band{z-index:2;opacity:.7}.studio .seg-grip{height:66px;top:2px}.studio .playhead{background:#292929;min-width:1px}.studio .selected{outline-color:var(--pc-accent)}\n.studio-footer{height:24px;background:var(--pc-surface-2);border-top:1px solid var(--pc-border);display:flex;align-items:center;justify-content:space-between;padding:0 14px;font-size:10px;color:var(--pc-muted)}.studio-handle{position:absolute;z-index:15;touch-action:none}.studio-handle.vertical{width:5px;top:0;bottom:0;cursor:col-resize}.studio-handle.horizontal{height:5px;left:0;right:0;top:-3px;cursor:row-resize}.studio-handle:hover{background:var(--pc-accent);opacity:.35}.studio.focus-preview .main{grid-template-columns:64px 0 minmax(0,1fr) 0}.studio.focus-preview .studio-content,.studio.focus-preview .panel{visibility:hidden;padding:0;overflow:hidden}.studio.panel-code{--left-width:min(480px,35vw)}\n.studio-code-wrap{display:flex;flex-direction:column;gap:10px;height:100%;padding:14px}.studio-json{flex:1;min-height:240px;white-space:pre;overflow:auto;resize:none;width:100%;font:12px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace!important;border:1px solid var(--pc-border);border-radius:8px;background:var(--pc-surface-2);padding:12px;tab-size:2}.studio-code-status{font-size:11px;color:var(--pc-muted);overflow-wrap:anywhere}.studio-scrim{position:fixed;inset:0;background:#0003;z-index:80}.studio-export{position:fixed;right:0;top:0;bottom:0;width:440px;max-width:100vw;overflow:auto;padding:18px 22px;background:var(--pc-surface);z-index:81;box-shadow:-12px 0 40px #0002;display:flex;flex-direction:column;gap:18px}.studio-export-header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--pc-border);padding-bottom:14px}.studio-export-fields{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:16px;min-width:0}.studio-export-fields>.studio-field{display:grid;grid-template-columns:95px 1fr;align-items:center;gap:12px;font-size:13px}.studio-segments{display:flex;padding:3px;background:var(--pc-bg);border-radius:8px;gap:3px}.studio-segments button{flex:1;border:0;background:transparent;border-radius:6px;padding:7px}.studio-segments button.selected{background:var(--pc-surface);color:var(--pc-text)}.studio-resolutions{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.studio-resolutions button{position:relative;padding:5px;min-width:0}.export-gem{color:var(--pc-accent);display:inline-flex;align-items:center;justify-content:center;font-size:20px;line-height:15px;margin-left:3px}.studio-paid-info:empty{display:none}.studio-paid-info{border:1px solid #e9cfb8;background:var(--pc-accent-soft);border-radius:8px;padding:10px;font-size:11px}.studio-paid-info a{color:#df711e;margin-right:12px}.studio-paid-info p{color:var(--pc-text);margin-bottom:6px}.studio-check{display:flex;align-items:center;gap:8px;font-size:12px}.studio-check input{accent-color:var(--pc-accent)}.studio-export>progress{width:100%;accent-color:var(--pc-accent)}.studio-export-result{display:flex;gap:10px;flex-direction:column}.studio-export-result:empty{display:none}#studio-message{position:fixed;left:50%;bottom:35px;transform:translateX(-50%);max-width:min(650px,85vw);padding:11px 16px;background:#292929;color:white;box-shadow:0 5px 20px #0003;border-radius:8px;z-index:100;opacity:0;pointer-events:none;font-size:12px}#studio-message.visible{opacity:1}\n.studio .sel-box.thin .h-n{top:-9px}.studio .sel-box.thin .h-s{top:calc(100% + 9px)}\n@media(max-width:1300px){:root{--left-width:238px;--right-width:272px}.studio-save{display:none}.studio-topbar{gap:6px}.studio-project{max-width:25%}.studio .transport .readout{font-size:10px}.studio .lanes{--label:140px}}\n@media(max-width:1000px){.studio .main{grid-template-columns:55px 225px minmax(150px,1fr)}.studio .main{grid-template-columns:52px 190px minmax(0,1fr) 240px}.studio .panel{position:static;width:auto;display:block}.studio-topbar .studio-btn:not(.primary){padding:4px}.studio-topbar .studio-project{max-width:18%}.studio .readout>span:first-child{display:none}}\n\n.studio-export{left:50%;right:auto;top:50%;bottom:auto;transform:translate(-50%,-50%);width:min(740px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:26px 30px;border-radius:16px;box-shadow:0 20px 70px #0003;gap:24px}.studio-export-header{border:0;padding:0}.studio-export-header h2{font-size:24px}.studio-export-header button{border:0;font-size:24px;background:transparent}.export-tabs{padding:4px}.export-tabs button{font-size:17px;font-weight:600}.studio-export-fields{gap:18px}.studio-export-fields>.studio-field{grid-template-columns:135px 1fr;font-size:15px}.studio-export .studio-segments button{position:relative;min-height:36px;font-size:15px}.studio-export>.primary{width:100%;min-height:46px;background:#df7634;border-color:#d66b29;font-size:17px}.studio-export .studio-note{font-size:13px}.export-pro{position:absolute;right:-8px;top:-10px;font-size:10px;border-radius:4px;padding:2px 5px;background:#df7634;color:#fff}.studio-export details{font-size:13px;color:var(--pc-muted)}.studio-export details summary{cursor:pointer}.studio-export details p{margin-top:12px}.studio-export .studio-input{border:0;background:var(--pc-bg);min-height:40px;font-size:15px}@media(max-width:600px){.studio-export{padding:20px}.studio-export-fields>.studio-field{grid-template-columns:90px 1fr}}\n.studio-draft-success{width:min(560px,calc(100vw - 32px));gap:18px;padding:30px}.studio-draft-success .studio-export-header h2{font-size:22px}.studio-draft-success>.studio-note{font-size:15px;line-height:1.7;margin:0}.studio-draft-actions{display:flex;justify-content:flex-end;gap:10px}.studio-draft-actions .studio-btn{padding:11px 18px;border:0;background:var(--pc-bg);font-size:14px}.studio-draft-actions .primary{background:#df7634;color:white}.studio-draft-success [role=status]:empty{display:none}\n";
2
- export declare const STUDIO_REFINEMENTS = "\n.studio .timeline-divider{height:20px;border-left:1px solid var(--pc-border);margin:0 5px}.studio .timeline-selection{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--pc-muted)}.studio .grip{z-index:8;opacity:0;width:9px}.studio .lane:has(.blk:hover) .grip,.studio .grip.selected{opacity:1;background:var(--pc-accent-soft);border:1px solid var(--pc-accent)}.studio .seg-grip{z-index:9;background:var(--pc-border);width:7px;margin-left:-7px}.studio .seg-grip:hover{background:var(--pc-accent)}.studio .blk.seg{display:flex;align-items:center;gap:6px;padding:4px 8px}.studio .blk.seg img{width:60px;height:38px;object-fit:cover;flex:none}.studio .segment-name{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.studio .scene-field{font-style:italic}.studio .stage-text-editor{position:absolute;z-index:30;min-height:50px;box-sizing:border-box;resize:vertical;border:2px solid var(--pc-accent);border-radius:3px;padding:4px;background:var(--pc-surface);color:var(--pc-text);font-weight:600;line-height:1.2;box-shadow:0 4px 18px #0002}.studio .panel .colour input[type=text]{min-width:86px}.studio .panel .fld.area textarea{height:64px}.studio .timeline .blk:focus-visible{outline:2px solid var(--pc-accent);outline-offset:2px}@media(max-width:1250px){.studio .timeline-selection{display:none}.studio-timeline-toolbar{gap:4px}.studio-timeline-toolbar .tbtn{padding:0 4px}.studio-timeline-toolbar .studio-btn{padding:4px 7px}}\n\n.studio #app{grid-template-rows:52px minmax(0,1fr) min(300px,36dvh) 24px;grid-template-rows:52px minmax(0,1fr) var(--timeline-height) 24px}\n.studio .main{overflow:hidden}.studio .panel{position:static;min-height:0;z-index:auto;scrollbar-gutter:stable}.studio .left{grid-column:3;grid-row:1}.studio .panel{grid-column:4;grid-row:1}.studio-rail{grid-column:1;grid-row:1}.studio-content{grid-column:2;grid-row:1;min-width:0;max-width:100%}\n.studio-topbar{justify-content:space-between;gap:12px}.studio-project{flex:1;max-width:none}.studio-global-actions{display:flex;gap:6px;align-items:center;margin-left:auto;flex:none}.studio-save{white-space:nowrap}.studio-topbar .primary{margin-left:8px}\n.studio-side-body,.studio-media-list,.studio-media-card,.studio-actions,.studio-shot-copy{min-width:0;max-width:100%}.studio-media-card>video,.studio-media-card>img,.studio-media-card>audio{display:block;min-width:0;max-width:100%;width:100%}.studio-media-card>video{aspect-ratio:16/10;height:132px}.studio-actions{display:grid;grid-template-columns:1fr;gap:6px}.studio-actions .studio-btn{white-space:normal;width:100%}.studio-media-card>strong{display:block;max-width:100%}.studio-resource-tabs{display:flex;gap:6px;padding:12px 14px 0}.studio-resource-tabs button{flex:1;font-size:12px}.studio-resource-tabs .selected{border-color:var(--pc-accent);background:var(--pc-accent-soft)}\n.studio .stage-area{min-width:0;overflow:hidden}.studio .viewer{flex:none}.studio .panel>h2,.studio .panel #selection>h2{display:none}.studio .panel .follow{display:none}.studio .panel .fs{border:0;border-top:1px solid var(--pc-border);padding:14px 0;margin:0 0 6px;min-width:0}.studio .panel .fs legend{font-size:12px;font-weight:600;padding:0 6px 0 0;color:var(--pc-text)}.studio .panel .row{gap:8px;margin:0 0 10px;flex-wrap:wrap}.studio .panel .fld{min-width:68px;flex:1}.studio .panel .fld.wide{flex-basis:100%}.studio .panel .fld input,.studio .panel .fld textarea,.studio .panel .fld select{min-width:0;width:100%;border-radius:7px;background:var(--pc-surface-2);border:1px solid var(--pc-border);padding:7px 8px;height:34px}.studio .panel .fld textarea{height:86px;line-height:1.7;resize:vertical}.studio .panel .fl{font-size:11px;margin-bottom:6px;color:var(--pc-muted)}.studio .panel .rv,.studio .panel .hint{display:none}.studio .panel details{padding:12px 0;border-top:1px solid var(--pc-border)}.studio .panel summary{cursor:pointer;color:var(--pc-muted);font-size:12px;margin-bottom:12px}.studio .sel-title{font-size:14px;font-weight:600;margin-bottom:14px}.studio .edit-status:has(#edit-status:empty){display:none}.studio .status-line:not(.bad){display:none}.studio .panel .chips{display:flex;flex-direction:column;gap:8px}.studio .panel .chip{padding:9px;text-align:left;border-radius:7px}\n.studio .timeline{overflow:scroll;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:auto}.studio .timeline::-webkit-scrollbar{width:11px;height:12px}.studio .timeline::-webkit-scrollbar-track{background:var(--pc-surface-2)}.studio .timeline::-webkit-scrollbar-thumb{background:#aaa9a1;border:3px solid var(--pc-surface-2);border-radius:8px}.studio .lanes{--label:112px;width:calc(100% * var(--timeline-zoom,1));min-width:100%;padding-bottom:20px}.studio .lane{grid-template-columns:var(--label) minmax(0,1fr)}.studio .lane-track{overflow:visible;min-width:0}.studio .lane-label{z-index:11;font-size:12px}.studio .lane.media-lane{height:44px}.studio .lane.caption-lane{height:38px}.studio .blk.item{padding:5px 6px;line-height:20px;cursor:pointer;z-index:3;min-width:3px}.studio .blk.audio{cursor:pointer;z-index:3}.studio .lane.caption-lane .blk.item{font-size:11px;line-height:18px;padding:3px 5px}.studio .blk.selected{outline:none;border:2px solid var(--pc-accent);box-shadow:0 0 0 1px var(--pc-surface);z-index:5}.studio .lane .shade{pointer-events:none;display:none}.studio .playhead-layer{pointer-events:none}.studio .ruler{z-index:15}.studio .lane.segments{height:62px;position:sticky;top:28px;z-index:12;background:var(--pc-surface)}.studio .playhead-layer{z-index:14}.studio .blk.seg{height:50px;cursor:pointer}.studio .blk.seg img{height:30px}.studio .seg-grip{height:58px}.studio-timeline-toolbar{height:42px;min-width:0}.studio-timeline-toolbar .edit-tools{border-right:1px solid var(--pc-border);padding-right:8px}.studio-timeline-toolbar #edit-split{min-height:28px}.studio-timeline-toolbar .tbtn{width:auto;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:0 7px}.studio-timeline-toolbar .studio-btn{font-size:11px}.studio .edit-tools .tool-group:last-child{display:none}\n.studio-export{width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:22px 24px;gap:18px}.studio-export-header h2{font-size:19px}.studio-export .studio-segments button{font-size:13px;min-height:32px}.studio-export .export-tabs button{font-size:14px}.studio-export-fields{gap:15px}.studio-export-fields>.studio-field{grid-template-columns:80px minmax(0,1fr);font-size:12px}.studio-export .studio-input{min-height:34px;font-size:13px}.studio-export>.primary{min-height:38px;font-size:14px}.studio-export .studio-note{font-size:12px}.studio-paid-info{line-height:1.7}.studio-paid-info p{margin:0 0 7px}.studio-paid-info .studio-btn{font-size:12px}.studio-export-result{font-size:12px}.studio-export-result a{color:var(--pc-accent)}.studio-slot-outline{position:absolute;border:2px solid var(--pc-accent);pointer-events:none;z-index:4}.studio-slot-name{position:absolute;left:-2px;bottom:100%;padding:3px 7px;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:var(--pc-accent);color:white;font-size:11px}.studio-slot-preview{max-width:100%;max-height:160px;object-fit:contain;border-radius:8px}.studio-cloud{max-width:180px;font-size:12px}.studio-element-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}\n@media(max-width:1100px){.studio .main{grid-template-columns:52px 208px minmax(0,1fr) 246px}.studio .panel{display:block;position:static;width:auto}.studio-global-actions{gap:3px}.studio-topbar .studio-btn{padding:5px 7px}.studio-project{max-width:140px}.studio .main>.studio-handle.vertical{display:none}}\n@media(max-width:820px){.studio .main{grid-template-columns:48px 0 minmax(0,1fr) 220px}.studio-content{visibility:hidden}.studio-topbar{gap:6px;padding:0 10px}.studio-brand{font-size:20px}.studio-project{display:none}.studio .lanes{--label:88px}.studio-timeline-toolbar{gap:5px;padding:0 8px}.studio-timeline-toolbar input[type=range]{width:70px}}\n\n.studio:not(.inspecting) .main{grid-template-columns:64px var(--left-width) minmax(0,1fr) 0}.studio:not(.inspecting) .panel,.studio:not(.inspecting) .inspector-resize{display:none}.studio-sentence.selected{border-color:var(--pc-accent);background:var(--pc-accent-soft)}.studio-item.selected{border-color:var(--pc-accent);background:var(--pc-accent-soft)}\n@media(max-width:1100px){.studio:not(.inspecting) .main{grid-template-columns:52px 208px minmax(0,1fr) 0}}@media(max-width:820px){.studio:not(.inspecting) .main{grid-template-columns:48px 0 minmax(0,1fr) 0}}\n\n.studio-cloud{position:relative;display:flex;align-items:center;gap:7px;max-width:310px;min-width:0}.studio-cloud-state{font-size:12px;max-width:185px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.studio-cloud-state.bad{color:var(--err)}.studio-cloud-link{position:absolute;right:0;top:calc(100% + 10px);z-index:90;width:min(420px,calc(100vw - 32px));border:1px solid var(--pc-border);border-radius:8px;padding:12px;background:var(--pc-surface);color:var(--pc-text);box-shadow:0 6px 25px #0002;font-size:12px}.studio-cloud[hidden]{display:none}\n.studio.focus-preview:not(.inspecting) .main{grid-template-columns:64px 0 minmax(0,1fr) 0}\n.studio-topbar .studio-icon-btn{width:34px;height:34px;min-width:34px;padding:0;border:0;background:transparent;color:var(--pc-text);border-radius:6px;flex:none}.studio-topbar .studio-icon-btn svg{width:18px;height:18px}.studio-topbar .studio-icon-btn:hover{background:var(--pc-hover)}.studio-topbar .studio-icon-btn.selected,.studio-topbar .studio-icon-btn[aria-pressed=true]{background:var(--pc-accent-soft);color:var(--pc-accent)}.studio-topbar .studio-icon-btn:focus-visible{outline:2px solid var(--pc-accent);outline-offset:2px}.studio-topbar .studio-icon-btn:disabled{opacity:.4;cursor:default}\n";
1
+ export declare const STUDIO_CSS = "\n:root{--pc-bg:#f4f4f2;--pc-surface:#fff;--pc-surface-2:#f8f8f7;--pc-border:#dededb;--pc-text:#252525;--pc-muted:#85847d;--pc-hover:#ebebe8;--pc-accent:#ff7a1a;--pc-accent-soft:#fff1e5;--pc-stage:#e9e9e6;--timeline-height:240px;--left-width:264px;--right-width:300px}\nhtml.dark{color-scheme:dark;--pc-bg:#111;--pc-surface:#1a1a1a;--pc-surface-2:#141414;--pc-border:#363632;--pc-text:#f2f2f0;--pc-muted:#a5a59a;--pc-hover:#2a2a2a;--pc-accent-soft:#3e2b1b;--pc-stage:#0b0b0b}\nbody.studio{font:13px/1.45 'Helvetica Neue','PingFang SC',system-ui,sans-serif;background:var(--pc-bg);color:var(--pc-text);--bg:var(--pc-bg);--surface:var(--pc-surface);--fg:var(--pc-text);--muted:var(--pc-muted);--line:var(--pc-border);--accent:var(--pc-accent);--on-accent:#fff;--seg:#e7eef3;--item:#eee7f7;--audio:#e6f1e8;--stage:var(--pc-stage);--stage-fg:var(--pc-muted);--head:#292929}\n.studio [hidden]{display:none!important}.studio button,.studio input,.studio textarea,.studio select{font:inherit;color:inherit}.studio button:focus-visible,.studio a:focus-visible,.studio textarea:focus-visible,.studio input:focus-visible{outline:2px solid var(--pc-accent);outline-offset:2px}.studio button:disabled{opacity:.45;cursor:default}\n.studio #app{grid-template-rows:48px minmax(240px,1fr) var(--timeline-height) 24px;height:100dvh}.studio .main{display:grid;grid-template-rows:minmax(0,1fr);grid-template-columns:64px var(--left-width) minmax(0,1fr) var(--right-width);min-height:0;position:relative}.studio .left{overflow:hidden;min-height:0;min-width:0;display:flex;flex-direction:column}.studio .panel{width:auto;min-width:0;overflow:auto;background:var(--pc-surface);border-left:1px solid var(--pc-border);padding:12px 16px}.studio .panel>#problems,.studio .panel>#score,.studio .panel>#measures,.studio .panel>#notes{display:none}.studio .panel h2{font-size:12px;color:var(--pc-muted)}.studio .sel-title{font-size:13px;padding-bottom:10px;border-bottom:1px solid var(--pc-border);color:var(--pc-text);overflow-wrap:anywhere}.studio .status-line{font-size:11px;max-height:80px;overflow:auto}.studio #render-status{display:none}\n.studio-topbar{display:flex;align-items:center;gap:12px;padding:0 16px;background:var(--pc-surface-2);border-bottom:1px solid var(--pc-border);min-width:0;white-space:nowrap}.studio-brand{font-size:23px;font-weight:800;letter-spacing:-1.3px;margin-right:8px}.studio-brand:after{content:'\u2022';color:var(--pc-accent);font-size:15px;vertical-align:top;letter-spacing:0}.studio-project{min-width:80px;max-width:30%;overflow:hidden;text-overflow:ellipsis;flex:1}.studio-save{font-size:11px;color:var(--pc-muted)}.studio-save:before{content:'\u25CF';font-size:9px;color:#2e9e6b;margin-right:7px}.studio-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.studio-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:5px 10px;border:1px solid var(--pc-border);border-radius:8px;background:var(--pc-surface);text-decoration:none;font-size:12px;cursor:pointer}.studio-btn:hover{background:var(--pc-hover)}.studio-btn.primary{background:#292929;color:#fff;border-color:#292929}.dark .studio-btn.primary{background:#f2f2f0;color:#222}.studio-btn.selected{background:var(--pc-accent-soft);border-color:#ffb47c;color:#c76520}.studio-btn.ghost{border-color:transparent;background:transparent}.studio .tbtn{height:30px;min-width:30px;border:0;background:transparent;border-radius:7px}.studio .tbtn:hover{background:var(--pc-hover)}.studio #edit-render{display:none}.studio .edit-tools{gap:6px}.studio .tool-group{gap:2px}\n.studio-rail{min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:5px;padding:12px 5px;background:var(--pc-surface-2);border-right:1px solid var(--pc-border)}.studio-rail button{height:57px;flex:none;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;background:transparent;border:0;border-radius:8px;color:var(--pc-muted);font-size:11px;cursor:pointer}.studio-rail button.active{background:var(--pc-accent-soft);color:#e8711c}.studio-rail svg{width:19px;height:19px}.studio-content{min-height:0;overflow:auto;background:var(--pc-surface);border-right:1px solid var(--pc-border)}.studio-side-body{padding:14px 14px 20px;display:flex;flex-direction:column;gap:12px}.studio-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:24px}.studio-heading h2{margin:0;font-size:14px;font-weight:600;color:var(--pc-text)}.studio-heading small{font-size:10px;color:var(--pc-muted)}.studio-note{font-size:11px;line-height:1.7;color:var(--pc-muted);margin:0;overflow-wrap:anywhere}.studio-note.notice{padding:10px;border:1px solid #f0d5b9;border-radius:8px;background:var(--pc-accent-soft);color:#9a5c2d}.studio-note.bad{color:var(--err)}.studio-input{border:1px solid var(--pc-border);border-radius:7px;background:var(--pc-surface-2);width:100%;min-height:34px;padding:7px 9px;resize:vertical;min-width:0}.studio-field{display:flex;flex-direction:column;gap:6px;font-size:11px;color:var(--pc-muted)}.studio-field .studio-input{font-size:12px;color:var(--pc-text)}.studio-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}\n.studio-shot-list{display:flex;flex-direction:column;gap:7px}.studio-shot{width:100%;min-height:70px;justify-content:flex-start;text-align:left;padding:7px;gap:10px}.studio-thumb{display:block;width:74px;height:55px;object-fit:cover;border-radius:5px;background:var(--pc-stage);flex:none}.studio-shot-copy{display:flex;flex-direction:column;min-width:0;gap:7px}.studio-shot-copy strong{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:145px}.studio-shot-copy small{font-size:10px;color:var(--pc-muted)}.studio-media-list{display:grid;gap:12px}.studio-media-card,.studio-review-card,.studio-sentence{border:1px solid var(--pc-border);border-radius:8px;padding:10px;display:flex;flex-direction:column;gap:9px}.studio-media-card>img,.studio-media-card>video{width:100%;max-height:150px;object-fit:contain;background:var(--pc-stage);border-radius:5px}.studio-media-card>audio{width:100%;height:30px}.studio-media-card>strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.studio-media-card .studio-btn{font-size:10px;padding:4px 6px}.studio-script-list{display:flex;flex-direction:column;gap:8px}.studio-sentence>button{align-self:flex-start;font-size:10px;min-height:24px}.studio-sentence textarea{font-size:12px}.studio-item{justify-content:flex-start;overflow-wrap:anywhere;text-align:left}.studio-slot-image{max-width:100%;max-height:150px;object-fit:contain}.studio-stage-heading{display:flex;align-items:center;justify-content:space-between;height:40px;flex:none;padding:0 18px;background:var(--pc-surface-2);border-bottom:1px solid var(--pc-border);font-size:12px}.studio-stage-heading small{font-size:10px;color:var(--pc-muted)}.studio .stage-area{min-height:0!important;padding:14px 18px;gap:14px;background:var(--pc-stage);min-height:160px}.studio .stage-area.comparing{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:16px}.studio .stage-area.comparing .viewer{width:100%;min-height:0;align-self:stretch;justify-content:center;padding:8px;border:1px solid var(--pc-border);border-radius:10px;background:var(--pc-surface-2)}.studio .stage-area.comparing .caption{width:100%;font-weight:600;color:var(--pc-text);padding:0 4px 5px}.studio .stage-area.comparing .note{width:100%;padding-inline:4px}.studio .frame-box{box-shadow:0 2px 7px #0002,0 12px 30px #0001}.studio .caption{font-size:11px}.studio .note{font-size:10px;max-width:350px}.studio .transport{height:76px;min-height:76px;flex-wrap:wrap;align-content:center;background:var(--pc-surface-2);padding:4px 12px;gap:7px}.studio .transport .readout{font-size:11px;gap:8px;order:2;flex:1 0 calc(100% - 100px)}.studio .transport #jump{order:3;width:80px;font-size:10px}.studio .transport .speed{order:1;font-size:10px}.studio .transport .tbtn{min-width:24px;padding:0 4px}.studio .transport #back10,.studio .transport #fwd10{display:none}.studio .transport .slider-wrap{min-width:50px}\n.studio-timeline-wrap{position:relative;display:flex;flex-direction:column;min-height:0;border-top:1px solid var(--pc-border);background:var(--pc-surface)}.studio-timeline-toolbar{height:39px;flex:none;display:flex;align-items:center;gap:8px;padding:0 14px;border-bottom:1px solid var(--pc-border);background:var(--pc-surface-2)}.studio-timeline-toolbar .spacer{flex:1}.studio-timeline-toolbar input[type=range]{width:105px;accent-color:var(--pc-accent)}.studio .timeline{min-height:0;flex:1;max-height:none;overflow:auto}.studio .lanes{--label:160px;width:calc(100% * var(--timeline-zoom,1));min-width:100%;padding-bottom:9px}.studio .lane{height:34px;border-color:var(--pc-border)}.studio .lane-label{position:sticky;left:0;z-index:9;background:var(--pc-surface);line-height:33px;font-size:11px;padding-left:15px}.studio .ruler{height:28px;background:var(--pc-surface-2);position:sticky;top:0;z-index:10}.studio .ruler .lane-label{background:var(--pc-surface-2);line-height:27px}.studio .rtick{font-size:10px;color:var(--pc-muted)}.studio .lane.segments{height:70px}.studio .blk.seg{height:58px;top:5px;bottom:auto;line-height:13px;padding:0 4px;border:1px solid #aebfcb;background:#e8eef3;color:#4c6474}.studio .blk.seg img{display:block;position:absolute;left:0;top:0;width:100%;height:39px;object-fit:cover;pointer-events:none}.studio .blk.seg .segment-name{position:absolute;bottom:1px;left:4px;right:2px;font-size:9px;overflow:hidden;text-overflow:ellipsis}.studio .blk.seg.selected{border:2px solid var(--pc-accent);background:#fff0e2}.studio .blk.item{background:#eee8fa;color:#8c70a9;border:1px solid #d8c9ef;font-size:10px;top:5px;bottom:5px}.studio .lane.caption-lane .blk.item{background:#f5efdf;color:#8e7950;border-color:#e6dcc1}.studio .lane.caption-lane .blk.selected{border-color:var(--pc-accent)}.studio .blk.audio{background:#e7f2e9;color:#537b60;border:1px solid #b3d1bd;top:5px;bottom:5px;font-size:10px}.studio .blk.audio.wave-ready{color:transparent}.studio .blk.audio svg{width:100%;height:100%;position:absolute;inset:0;pointer-events:none}.studio .measure,.studio .lane.words-lane{display:none}.studio.show-analysis .measure,.studio.show-analysis .lane.words-lane{display:grid}.studio .band{z-index:2;opacity:.7}.studio .seg-grip{height:66px;top:2px}.studio .playhead{background:#292929;min-width:1px}.studio .selected{outline-color:var(--pc-accent)}\n.studio-footer{height:24px;background:var(--pc-surface-2);border-top:1px solid var(--pc-border);display:flex;align-items:center;justify-content:space-between;padding:0 14px;font-size:10px;color:var(--pc-muted)}.studio-handle{position:absolute;z-index:15;touch-action:none}.studio-handle.vertical{width:5px;top:0;bottom:0;cursor:col-resize}.studio-handle.horizontal{height:5px;left:0;right:0;top:-3px;cursor:row-resize}.studio-handle:hover{background:var(--pc-accent);opacity:.35}.studio.focus-preview .main{grid-template-columns:64px 0 minmax(0,1fr) 0}.studio.focus-preview .studio-content,.studio.focus-preview .panel{visibility:hidden;padding:0;overflow:hidden}.studio.panel-code{--left-width:min(480px,35vw)}\n.studio-code-wrap{display:flex;flex-direction:column;gap:10px;height:100%;padding:14px}.studio-json{flex:1;min-height:240px;white-space:pre;overflow:auto;resize:none;width:100%;font:12px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace!important;border:1px solid var(--pc-border);border-radius:8px;background:var(--pc-surface-2);padding:12px;tab-size:2}.studio-code-status{font-size:11px;color:var(--pc-muted);overflow-wrap:anywhere}.studio-scrim{position:fixed;inset:0;background:#0003;z-index:80}.studio-export{position:fixed;right:0;top:0;bottom:0;width:440px;max-width:100vw;overflow:auto;padding:18px 22px;background:var(--pc-surface);z-index:81;box-shadow:-12px 0 40px #0002;display:flex;flex-direction:column;gap:18px}.studio-export-header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--pc-border);padding-bottom:14px}.studio-export-fields{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:16px;min-width:0}.studio-export-fields>.studio-field{display:grid;grid-template-columns:95px 1fr;align-items:center;gap:12px;font-size:13px}.studio-segments{display:flex;padding:3px;background:var(--pc-bg);border-radius:8px;gap:3px}.studio-segments button{flex:1;border:0;background:transparent;border-radius:6px;padding:7px}.studio-segments button.selected{background:var(--pc-surface);color:var(--pc-text)}.studio-resolutions{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.studio-resolutions button{position:relative;padding:5px;min-width:0}.export-gem{color:var(--pc-accent);display:inline-flex;align-items:center;justify-content:center;font-size:20px;line-height:15px;margin-left:3px}.studio-paid-info:empty{display:none}.studio-check{display:flex;align-items:center;gap:8px;font-size:12px}.studio-check input{accent-color:var(--pc-accent)}.studio-export>progress{width:100%;accent-color:var(--pc-accent)}.studio-export-result{display:flex;gap:10px;flex-direction:column}.studio-export-result:empty{display:none}#studio-message{position:fixed;left:50%;bottom:35px;transform:translateX(-50%);max-width:min(650px,85vw);padding:11px 16px;background:#292929;color:white;box-shadow:0 5px 20px #0003;border-radius:8px;z-index:100;opacity:0;pointer-events:none;font-size:12px}#studio-message.visible{opacity:1}\n.studio .sel-box.thin .h-n{top:-9px}.studio .sel-box.thin .h-s{top:calc(100% + 9px)}\n@media(max-width:1300px){:root{--left-width:238px;--right-width:272px}.studio-save{display:none}.studio-topbar{gap:6px}.studio-project{max-width:25%}.studio .transport .readout{font-size:10px}.studio .lanes{--label:140px}}\n@media(max-width:1000px){.studio .main{grid-template-columns:55px 225px minmax(150px,1fr)}.studio .main{grid-template-columns:52px 190px minmax(0,1fr) 240px}.studio .panel{position:static;width:auto;display:block}.studio-topbar .studio-btn:not(.primary){padding:4px}.studio-topbar .studio-project{max-width:18%}.studio .readout>span:first-child{display:none}}\n\n.studio-export{left:50%;right:auto;top:50%;bottom:auto;transform:translate(-50%,-50%);width:min(740px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:26px 30px;border-radius:16px;box-shadow:0 20px 70px #0003;gap:24px}.studio-export-header{border:0;padding:0}.studio-export-header h2{font-size:24px}.studio-export-header button{border:0;font-size:24px;background:transparent}.export-tabs{padding:4px}.export-tabs button{font-size:17px;font-weight:600}.studio-export-fields{gap:18px}.studio-export-fields>.studio-field{grid-template-columns:135px 1fr;font-size:15px}.studio-export .studio-segments button{position:relative;min-height:36px;font-size:15px}.studio-export>.primary{width:100%;min-height:46px;background:#df7634;border-color:#d66b29;font-size:17px}.studio-export .studio-note{font-size:13px}.export-lock{display:inline-flex;margin-left:5px;color:var(--pc-muted);vertical-align:-2px}.export-lock svg{width:13px;height:13px}.studio-export details{font-size:13px;color:var(--pc-muted)}.studio-export details summary{cursor:pointer}.studio-export details p{margin-top:12px}.studio-export .studio-input{border:0;background:var(--pc-bg);min-height:40px;font-size:15px}@media(max-width:600px){.studio-export{padding:20px}.studio-export-fields>.studio-field{grid-template-columns:90px 1fr}}\n.studio-draft-success{width:min(560px,calc(100vw - 32px));gap:18px;padding:30px}.studio-draft-success .studio-export-header h2{font-size:22px}.studio-draft-success>.studio-note{font-size:15px;line-height:1.7;margin:0}.studio-draft-actions{display:flex;justify-content:flex-end;gap:10px}.studio-draft-actions .studio-btn{padding:11px 18px;border:0;background:var(--pc-bg);font-size:14px}.studio-draft-actions .primary{background:#df7634;color:white}.studio-draft-success [role=status]:empty{display:none}\n";
2
+ export declare const STUDIO_REFINEMENTS = "\n.studio .timeline-divider{height:20px;border-left:1px solid var(--pc-border);margin:0 5px}.studio .timeline-selection{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--pc-muted)}.studio .grip{z-index:8;opacity:0;width:9px}.studio .lane:has(.blk:hover) .grip,.studio .grip.selected{opacity:1;background:var(--pc-accent-soft);border:1px solid var(--pc-accent)}.studio .seg-grip{z-index:9;background:var(--pc-border);width:7px;margin-left:-7px}.studio .seg-grip:hover{background:var(--pc-accent)}.studio .blk.seg{display:flex;align-items:center;gap:6px;padding:4px 8px}.studio .blk.seg img{width:60px;height:38px;object-fit:cover;flex:none}.studio .segment-name{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.studio .scene-field{font-style:italic}.studio .stage-text-editor{position:absolute;z-index:30;min-height:50px;box-sizing:border-box;resize:vertical;border:2px solid var(--pc-accent);border-radius:3px;padding:4px;background:var(--pc-surface);color:var(--pc-text);font-weight:600;line-height:1.2;box-shadow:0 4px 18px #0002}.studio .panel .colour input[type=text]{min-width:86px}.studio .panel .fld.area textarea{height:64px}.studio .timeline .blk:focus-visible{outline:2px solid var(--pc-accent);outline-offset:2px}@media(max-width:1250px){.studio .timeline-selection{display:none}.studio-timeline-toolbar{gap:4px}.studio-timeline-toolbar .tbtn{padding:0 4px}.studio-timeline-toolbar .studio-btn{padding:4px 7px}}\n\n.studio #app{grid-template-rows:52px minmax(0,1fr) min(300px,36dvh) 24px;grid-template-rows:52px minmax(0,1fr) var(--timeline-height) 24px}\n.studio .main{overflow:hidden}.studio .panel{position:static;min-height:0;z-index:auto;scrollbar-gutter:stable}.studio .left{grid-column:3;grid-row:1}.studio .panel{grid-column:4;grid-row:1}.studio-rail{grid-column:1;grid-row:1}.studio-content{grid-column:2;grid-row:1;min-width:0;max-width:100%}\n.studio-topbar{justify-content:space-between;gap:12px}.studio-project{flex:1;max-width:none}.studio-global-actions{display:flex;gap:6px;align-items:center;margin-left:auto;flex:none}.studio-save{white-space:nowrap}.studio-topbar .primary{margin-left:8px}\n.studio-side-body,.studio-media-list,.studio-media-card,.studio-actions,.studio-shot-copy{min-width:0;max-width:100%}.studio-media-card>video,.studio-media-card>img,.studio-media-card>audio{display:block;min-width:0;max-width:100%;width:100%}.studio-media-card>video{aspect-ratio:16/10;height:132px}.studio-actions{display:grid;grid-template-columns:1fr;gap:6px}.studio-actions .studio-btn{white-space:normal;width:100%}.studio-media-card>strong{display:block;max-width:100%}.studio-resource-tabs{display:flex;gap:6px;padding:12px 14px 0}.studio-resource-tabs button{flex:1;font-size:12px}.studio-resource-tabs .selected{border-color:var(--pc-accent);background:var(--pc-accent-soft)}\n.studio .stage-area{min-width:0;overflow:hidden}.studio .viewer{flex:none}.studio .panel>h2,.studio .panel #selection>h2{display:none}.studio .panel .follow{display:none}.studio .panel .fs{border:0;border-top:1px solid var(--pc-border);padding:14px 0;margin:0 0 6px;min-width:0}.studio .panel .fs legend{font-size:12px;font-weight:600;padding:0 6px 0 0;color:var(--pc-text)}.studio .panel .row{gap:8px;margin:0 0 10px;flex-wrap:wrap}.studio .panel .fld{min-width:68px;flex:1}.studio .panel .fld.wide{flex-basis:100%}.studio .panel .fld input,.studio .panel .fld textarea,.studio .panel .fld select{min-width:0;width:100%;border-radius:7px;background:var(--pc-surface-2);border:1px solid var(--pc-border);padding:7px 8px;height:34px}.studio .panel .fld textarea{height:86px;line-height:1.7;resize:vertical}.studio .panel .fl{font-size:11px;margin-bottom:6px;color:var(--pc-muted)}.studio .panel .rv,.studio .panel .hint{display:none}.studio .panel details{padding:12px 0;border-top:1px solid var(--pc-border)}.studio .panel summary{cursor:pointer;color:var(--pc-muted);font-size:12px;margin-bottom:12px}.studio .sel-title{font-size:14px;font-weight:600;margin-bottom:14px}.studio .edit-status:has(#edit-status:empty){display:none}.studio .status-line:not(.bad){display:none}.studio .panel .chips{display:flex;flex-direction:column;gap:8px}.studio .panel .chip{padding:9px;text-align:left;border-radius:7px}\n.studio .timeline{overflow:scroll;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:auto}.studio .timeline::-webkit-scrollbar{width:11px;height:12px}.studio .timeline::-webkit-scrollbar-track{background:var(--pc-surface-2)}.studio .timeline::-webkit-scrollbar-thumb{background:#aaa9a1;border:3px solid var(--pc-surface-2);border-radius:8px}.studio .lanes{--label:112px;width:calc(100% * var(--timeline-zoom,1));min-width:100%;padding-bottom:20px}.studio .lane{grid-template-columns:var(--label) minmax(0,1fr)}.studio .lane-track{overflow:visible;min-width:0}.studio .lane-label{z-index:11;font-size:12px}.studio .lane.media-lane{height:44px}.studio .lane.caption-lane{height:38px}.studio .blk.item{padding:5px 6px;line-height:20px;cursor:pointer;z-index:3;min-width:3px}.studio .blk.audio{cursor:pointer;z-index:3}.studio .lane.caption-lane .blk.item{font-size:11px;line-height:18px;padding:3px 5px}.studio .blk.selected{outline:none;border:2px solid var(--pc-accent);box-shadow:0 0 0 1px var(--pc-surface);z-index:5}.studio .lane .shade{pointer-events:none;display:none}.studio .playhead-layer{pointer-events:none}.studio .ruler{z-index:15}.studio .lane.segments{height:62px;position:sticky;top:28px;z-index:12;background:var(--pc-surface)}.studio .playhead-layer{z-index:14}.studio .blk.seg{height:50px;cursor:pointer}.studio .blk.seg img{height:30px}.studio .seg-grip{height:58px}.studio-timeline-toolbar{height:42px;min-width:0}.studio-timeline-toolbar .edit-tools{border-right:1px solid var(--pc-border);padding-right:8px}.studio-timeline-toolbar #edit-split{min-height:28px}.studio-timeline-toolbar .tbtn{width:auto;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:0 7px}.studio-timeline-toolbar .studio-btn{font-size:11px}.studio .edit-tools .tool-group:last-child{display:none}\n.studio-export{width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:22px 24px;gap:18px}.studio-export-header h2{font-size:19px}.studio-export .studio-segments button{font-size:13px;min-height:32px}.studio-export .export-tabs button{font-size:14px}.studio-export-fields{gap:15px}.studio-export-fields>.studio-field{grid-template-columns:80px minmax(0,1fr);font-size:12px}.studio-export .studio-input{min-height:34px;font-size:13px}.studio-export>.primary{min-height:38px;font-size:14px}.studio-export .studio-note{font-size:12px}.studio-paid-info{display:grid;gap:8px;line-height:1.7;padding:10px 12px;border:1px solid var(--pc-border);border-radius:10px;background:var(--pc-surface-2)}.studio-paid-info:empty,.studio-paid-info[hidden]{display:none}.studio-paid-actions,.studio-paid-link{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.studio-paid-link .studio-input{flex:1 1 100%;min-width:0;font-size:12px}.studio-paid-info .studio-btn:disabled{opacity:.6;cursor:default}.studio-paid-info .studio-btn{font-size:12px}.studio-export-result{font-size:12px}.studio-export-result a{color:var(--pc-accent)}.studio-slot-outline{position:absolute;border:2px solid var(--pc-accent);pointer-events:none;z-index:4}.studio-slot-name{position:absolute;left:-2px;bottom:100%;padding:3px 7px;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:var(--pc-accent);color:white;font-size:11px}.studio-slot-preview{max-width:100%;max-height:160px;object-fit:contain;border-radius:8px}.studio-cloud{max-width:180px;font-size:12px}.studio-element-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}\n@media(max-width:1100px){.studio .main{grid-template-columns:52px 208px minmax(0,1fr) 246px}.studio .panel{display:block;position:static;width:auto}.studio-global-actions{gap:3px}.studio-topbar .studio-btn{padding:5px 7px}.studio-project{max-width:140px}.studio .main>.studio-handle.vertical{display:none}}\n@media(max-width:820px){.studio .main{grid-template-columns:48px 0 minmax(0,1fr) 220px}.studio-topbar{gap:6px;padding:0 10px}.studio-brand{font-size:20px}.studio-project{display:none}.studio .lanes{--label:88px}.studio-timeline-toolbar{gap:5px;padding:0 8px}.studio-timeline-toolbar input[type=range]{width:70px}}\n\n.studio:not(.inspecting) .main{grid-template-columns:64px var(--left-width) minmax(0,1fr) 0}.studio:not(.inspecting) .panel,.studio:not(.inspecting) .inspector-resize{display:none}.studio-sentence.selected{border-color:var(--pc-accent);background:var(--pc-accent-soft)}.studio-item.selected{border-color:var(--pc-accent);background:var(--pc-accent-soft)}\n@media(max-width:1100px){.studio:not(.inspecting) .main{grid-template-columns:52px 208px minmax(0,1fr) 0}}@media(max-width:820px){.studio:not(.inspecting) .main{grid-template-columns:48px 0 minmax(0,1fr) 0}}\n\n.studio-cloud{position:relative;display:flex;align-items:center;gap:7px;max-width:310px;min-width:0}.studio-cloud-state{font-size:12px;max-width:185px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.studio-cloud-state.bad{color:var(--err)}.studio-cloud-off{color:var(--pc-muted);text-decoration:underline;text-underline-offset:3px}.studio-cloud-off:hover{color:var(--pc-text)}.studio-cloud-code{flex:none;padding:2px 6px;border:1px solid var(--pc-border);border-radius:6px;background:var(--pc-surface);color:var(--pc-text);font:600 12px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.04em;user-select:all}.studio-cloud-link{position:absolute;right:0;top:calc(100% + 10px);z-index:90;width:min(420px,calc(100vw - 32px));border:1px solid var(--pc-border);border-radius:8px;padding:12px;background:var(--pc-surface);color:var(--pc-text);box-shadow:0 6px 25px #0002;font-size:12px}.studio-cloud[hidden]{display:none}\n.studio.focus-preview:not(.inspecting) .main{grid-template-columns:64px 0 minmax(0,1fr) 0}\n.studio-topbar .studio-icon-btn{width:34px;height:34px;min-width:34px;padding:0;border:0;background:transparent;color:var(--pc-text);border-radius:6px;flex:none}.studio-topbar .studio-icon-btn svg{width:18px;height:18px}.studio-topbar .studio-icon-btn:hover{background:var(--pc-hover)}.studio-topbar .studio-icon-btn.selected,.studio-topbar .studio-icon-btn[aria-pressed=true]{background:var(--pc-accent-soft);color:var(--pc-accent)}.studio-topbar .studio-icon-btn:focus-visible{outline:2px solid var(--pc-accent);outline-offset:2px}.studio-topbar .studio-icon-btn:disabled{opacity:.4;cursor:default}\n/* A narrow window (an agent's side panel, 360 to 820 px): the app never grows wider than the window, the side panel is\n a drawer over the stage that a rail button opens (workspace.ts), and below 640 px the properties are one too. */\n.studio-drawer-scrim,.studio-drawer-close,.studio-inspector-close,.studio .studio-inspector-toggle{display:none}\n.studio .stage-area.comparing.stacked{grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr))}\n@media(max-width:820px){\n.studio #app{grid-template-columns:minmax(0,1fr);grid-template-rows:52px minmax(0,1fr) min(var(--timeline-height),38dvh) 24px}.studio #app>*{min-width:0}\n.studio.focus-preview .main{grid-template-columns:48px 0 minmax(0,1fr) 0}\n.studio-rail{padding:8px 2px;gap:3px}.studio-rail button{height:50px;min-width:0;padding:0;font-size:9px;letter-spacing:-.1px;overflow:hidden}\n.studio-content{display:none;position:fixed;z-index:61;left:48px;top:52px;bottom:0;width:min(320px,calc(100vw - 48px));max-width:none;padding-top:38px;box-shadow:14px 0 40px #0003}\n.studio.panel-code .studio-content{width:min(560px,calc(100vw - 48px))}\n.studio.drawer-open .studio-content{display:block}\n.studio.drawer-open .studio-drawer-scrim,.studio.inspector-open .studio-drawer-scrim{display:block;position:fixed;z-index:60;left:48px;top:52px;right:0;bottom:0;background:#0005}\n.studio .studio-drawer-close,.studio .studio-inspector-close{position:fixed;z-index:62;top:58px;width:30px;height:30px;min-width:30px;min-height:30px;padding:0;border:1px solid var(--pc-border);border-radius:7px;background:var(--pc-surface)}\n.studio.drawer-open .studio-drawer-close{display:inline-flex;left:calc(48px + min(320px,100vw - 48px) - 38px)}\n.studio.drawer-open.panel-code .studio-drawer-close{left:calc(48px + min(560px,100vw - 48px) - 38px)}\n.studio-code-wrap{height:calc(100% - 4px)}\n.studio-topbar{gap:6px;padding:0 8px}.studio-brand{font-size:19px;margin-right:0}\n.studio-global-actions{flex:0 1 auto;min-width:0;gap:2px;overflow-x:auto;scrollbar-width:none}.studio-global-actions::-webkit-scrollbar{display:none}.studio-global-actions>*{flex:none}\n.studio-topbar #studio-layout{display:none}.studio-topbar .primary{margin-left:2px}\n.studio-cloud-state{max-width:104px}.studio-cloud-link{position:fixed;left:8px;right:8px;top:58px;width:auto}\n.studio-timeline-toolbar{overflow-x:auto;scrollbar-width:none}.studio-timeline-toolbar::-webkit-scrollbar{display:none}.studio-timeline-toolbar>*,.studio-timeline-toolbar .edit-tools>*{flex:none}.studio-timeline-toolbar .spacer{flex:1 0 4px}\n.studio-stage-heading{padding:0 10px;gap:8px;height:36px}.studio .stage-area{padding:8px 10px;gap:10px}\n.studio .transport{height:auto;min-height:76px;padding:4px 8px}.studio .transport .readout{flex:1 1 120px}.studio-footer{padding:0 10px}\n}\n@media(max-width:640px){\n.studio.inspecting .main{grid-template-columns:48px 0 minmax(0,1fr) 0}.studio .panel{display:none}\n.studio.inspecting .studio-inspector-toggle{display:inline-flex;min-height:26px;padding:2px 8px;font-size:11px}\n.studio.inspecting.inspector-open .panel{display:block;position:fixed;z-index:61;right:0;top:52px;bottom:0;width:min(300px,calc(100vw - 48px));padding-top:42px;box-shadow:-14px 0 40px #0003}\n.studio.inspecting.inspector-open .studio-inspector-close{display:inline-flex;right:8px}\n.studio .lanes{--label:72px}\n}\n@media(max-width:820px) and (max-height:600px){.studio #app{grid-template-rows:44px minmax(0,1fr) min(var(--timeline-height),34dvh) 0}.studio-footer{display:none}.studio-content,.studio.inspecting.inspector-open .panel{top:44px}.studio.drawer-open .studio-drawer-scrim,.studio.inspector-open .studio-drawer-scrim{top:44px}.studio .studio-drawer-close,.studio .studio-inspector-close{top:50px}.studio-stage-heading{height:30px}.studio .transport{height:auto;min-height:44px}}\n";
@@ -1,6 +1,8 @@
1
1
  import type { Store, Actions } from '../app';
2
2
  import type { EditActions } from '../edit/controller';
3
3
  import { type Panel } from './sidebar';
4
+ /** Below this width the side panel is a drawer over the stage (the same number as the style's narrow layout). */
5
+ export declare const NARROW = "(max-width:820px)";
4
6
  export declare const mountWorkspace: (root: HTMLElement, store: Store, actions: Actions, edit: EditActions) => {
5
7
  refresh: () => Promise<void>;
6
8
  choose: (panel: Panel) => void;