popost 4.6.10 → 4.6.12

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 (98) hide show
  1. package/README.md +2 -0
  2. package/SKILL.md +5 -3
  3. package/assets/canvas/assets/{dist-C40jmU-w.js → dist-DAI3U0Jz.js} +1 -1
  4. package/assets/canvas/assets/{es-aF1SvUMY.js → es-3zEBH4X5.js} +1 -1
  5. package/assets/canvas/assets/index-Ce4sDSi9.css +1 -0
  6. package/assets/canvas/assets/{index-CxUXSxcb.js → index-Dc4qgNYJ.js} +4 -4
  7. package/assets/canvas/assets/{jszip.min-Bf2BQwaC.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 +18401 -14673
  11. package/dist/index.js +19448 -15784
  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/update.d.ts +2 -0
  18. package/dist/types/device-login.d.ts +35 -0
  19. package/dist/types/editor/canvas-state.d.ts +1 -1
  20. package/dist/types/editor/handoff.d.ts +10 -3
  21. package/dist/types/editor/http-types.d.ts +4 -1
  22. package/dist/types/editor/routes-cloud.d.ts +4 -3
  23. package/dist/types/install/record.d.ts +15 -0
  24. package/dist/types/providers/api-errors.d.ts +2 -0
  25. package/dist/types/providers/api.d.ts +1 -1
  26. package/dist/types/providers/link-resolve.d.ts +29 -0
  27. package/dist/types/providers/link.d.ts +2 -0
  28. package/dist/types/runtime.d.ts +38 -0
  29. package/dist/types/update/auto.d.ts +14 -0
  30. package/dist/types/update/check.d.ts +47 -0
  31. package/dist/types/update/install-kind.d.ts +27 -0
  32. package/dist/types/update/npm.d.ts +8 -0
  33. package/dist/types/update/perform.d.ts +64 -0
  34. package/dist/types/update/report.d.ts +7 -0
  35. package/dist/types/update/semver.d.ts +17 -0
  36. package/dist/types/update/session.d.ts +19 -0
  37. package/dist/types/update/state.d.ts +91 -0
  38. package/dist/types/update/verify.d.ts +33 -0
  39. package/dist/types/version.d.ts +1 -1
  40. package/dist/types/video/cache/frames.d.ts +85 -0
  41. package/dist/types/video/cache/holds.d.ts +35 -0
  42. package/dist/types/video/cache/project.d.ts +57 -0
  43. package/dist/types/video/commands/clean.d.ts +9 -0
  44. package/dist/types/video/commands/inputs.d.ts +2 -0
  45. package/dist/types/video/commands/materials.d.ts +6 -0
  46. package/dist/types/video/commands/product.d.ts +15 -0
  47. package/dist/types/video/commands/shared.d.ts +0 -5
  48. package/dist/types/video/compile/footage.d.ts +24 -7
  49. package/dist/types/video/compile/index.d.ts +3 -0
  50. package/dist/types/video/generate/cloud-image.d.ts +3 -1
  51. package/dist/types/video/generate/cloud.d.ts +5 -0
  52. package/dist/types/video/generate/dialogue.d.ts +2 -10
  53. package/dist/types/video/generate/index.d.ts +23 -2
  54. package/dist/types/video/inputs/collect.d.ts +104 -0
  55. package/dist/types/video/inputs/record.d.ts +106 -0
  56. package/dist/types/video/inputs/sheet.d.ts +8 -0
  57. package/dist/types/video/inputs/summary.d.ts +72 -0
  58. package/dist/types/video/preview/cloud.d.ts +20 -1
  59. package/dist/types/video/preview/edit/routes.d.ts +17 -11
  60. package/dist/types/video/preview/export-settings.d.ts +1 -2
  61. package/dist/types/video/preview/project.d.ts +3 -0
  62. package/dist/types/video/preview/shell/dom.d.ts +2 -0
  63. package/dist/types/video/preview/shell/studio/cloud.d.ts +6 -1
  64. package/dist/types/video/preview/shell/studio/compare.d.ts +16 -0
  65. package/dist/types/video/preview/shell/studio/copy.d.ts +24 -3
  66. package/dist/types/video/preview/shell/studio/paid.d.ts +23 -0
  67. package/dist/types/video/preview/shell/studio/style.d.ts +2 -2
  68. package/dist/types/video/preview/shell/studio/workspace.d.ts +2 -0
  69. package/dist/types/video/preview/shell-bundle.d.ts +1 -1
  70. package/dist/types/video/product/requests.d.ts +74 -0
  71. package/dist/types/video/product/review.d.ts +74 -0
  72. package/dist/types/video/product/sheet.d.ts +122 -0
  73. package/dist/types/video/project/schema.d.ts +21 -21
  74. package/dist/types/video/prompt-lang.d.ts +16 -0
  75. package/dist/types/video/render/index.d.ts +2 -0
  76. package/dist/types/video/render/session.d.ts +4 -0
  77. package/dist/types/video/replication/contract.d.ts +29 -29
  78. package/dist/types/video/replication/production.d.ts +5 -5
  79. package/dist/types/video/replication/schema.d.ts +2 -2
  80. package/dist/types/video/replication/speech-observed.d.ts +6 -6
  81. package/dist/types/video/sound/modes.d.ts +0 -8
  82. package/package.json +1 -1
  83. package/references/host-editor.md +21 -6
  84. package/references/image-workflow.md +5 -5
  85. package/references/onboarding.md +22 -1
  86. package/references/post-bundle.md +10 -8
  87. package/references/video-editing.md +19 -7
  88. package/references/video-performers.md +4 -2
  89. package/references/video-product.md +196 -0
  90. package/references/video-replication.md +1 -1
  91. package/references/video-step-1-read.md +16 -6
  92. package/references/video-step-3-content.md +15 -7
  93. package/references/video-step-6-voice.md +10 -0
  94. package/references/video-step-7-deliver.md +36 -1
  95. package/references/video-tools.md +61 -7
  96. package/references/video.md +26 -0
  97. package/assets/canvas/assets/index-C5rz5H21.css +0 -1
  98. package/dist/types/cloud/auth-flow.d.ts +0 -30
@@ -56,6 +56,35 @@ terminated through that owned process handle. Screenshot capture waits for the b
56
56
  | `POPOST_RENDER_PAGES` | how many browser pages draw frames side by side | by the size of the job |
57
57
  | `POPOST_VIDEO_WORK` | where caches and scratch files go (a voice's measured pace, test renders) | `.popost/video` under the working directory |
58
58
  | `TMPDIR` | temporary files (frames, audio); point it at a disk when `/tmp` is small | the system's |
59
+ | `POPOST_VIDEO_CACHE_MAX_MB` | the size cap of one project's frame cache (`.cache/video`), in MB | `2048` |
60
+
61
+ ## What a project keeps on disk, and what cleans it
62
+
63
+ A project keeps three things only to save work. Each is made again when a command needs it, so none of them is part
64
+ of the project: leave `.cache/` out when you copy, archive or hand over a project.
65
+
66
+ | Where | What | How it is bounded |
67
+ |---|---|---|
68
+ | `.cache/video/<key>/` | the frames of each video material the timeline shows, as pictures (a long clip at full size takes gigabytes) | every build removes the frames of clips the project no longer has (another file, size or date); a whole `render` removes what it extracted once the MP4 is written; above the cap the least recently used directories go; anything unused for a day goes |
69
+ | `.cache/render-chunks/<set>/` | the shots of the last render with each size and setting | each render keeps only the shots it used; a set no render used for a day goes |
70
+ | `.studio/drafts/<hash>/` | the media of a draft made for a desktop editor | removed by `popost video clean` |
71
+
72
+ Nothing is removed that an open Studio or a running render shows, and after a render the next `render`, `frame` or
73
+ Studio extracts what it needs again by itself (the kept shots are still reused). When the frames one timeline shows
74
+ are alone larger than the cap they stay, and the command says so once as a `warning` in `problems`: nothing is to
75
+ correct. `popost video doctor`, run in a project, prints what its caches take (`cache`).
76
+
77
+ ```bash
78
+ popost video clean project # remove this project's caches now
79
+ popost video clean --all ~/videos --dry-run # every project below a directory: what would go, and its size
80
+ popost video clean --all ~/videos # the same, removed
81
+ ```
82
+
83
+ `clean` prints one JSON document with the bytes freed per project. It removes only the three caches above (each
84
+ directory only when it holds nothing but what the engine wrote there): never a video, a material, `ref/`, a receipt
85
+ or `.studio/cloud.json`. `--all` looks up to six levels below the directory, passes over `node_modules` and `.git`
86
+ and follows no link. Projects made with a version before the automatic clean-up may hold many gigabytes of old
87
+ frames: run `clean --all` on the directory that holds them once.
59
88
 
60
89
  ## Paying for popost.ai under the shared authorization
61
90
 
@@ -291,11 +320,34 @@ that exists is never made again, so running it twice costs once, and what each f
291
320
  `project/materials.json`. Paid generation follows the money rule ("Paying for popost.ai") and the agreed clips ("The
292
321
  built-in generator").
293
322
 
323
+ **The user sees the inputs first.** A paid run starts only once the user confirmed what is sent (video.md, "Inputs
324
+ first"); until then `materials` (and `generate` for a file of a project, and the paid voice commands) print
325
+ `{ "ok": false, "confirm": { "reason": "inputs", "pending": [...], "sheets": [...], "summary": "..." }, "next": "..." }`
326
+ and exit with 3, nothing charged:
327
+
328
+ ```bash
329
+ popost video inputs voice project --speaker narrator --voice popost:default-female --fill fill.json # the voice plan, when the video has a voice
330
+ popost video inputs show project --requests requests.json [--template template] [--lang zh] # free: sheet, summary, voice sample
331
+ popost video inputs confirm project --quote "<the user's words>" # after they answered the one message
332
+ ```
333
+
334
+ `show` takes the anchor options of `materials` (`--anchor-image`, `--character`, `--no-anchor`) and composes every
335
+ request with the code `materials` sends it with; it writes `production/inputs/input-sheet.jpg` (needs the local
336
+ browser; without one it names the pictures to show one by one), `summary.md` to paste and `summary.json`. Prices are
337
+ the platform's free quotes (the reference pictures of a clip are uploaded for its quote, as `materials` without
338
+ `--confirm` does); a generator of your own has no price here. Keys name the items: `clip:<file>`, `picture:<file>`,
339
+ `product:<id>`, `cast:<id>`, `voice:<speaker>`, `anchor`. A file that exists is not asked about.
340
+
294
341
  ```json
295
342
  [{ "file": "assets/walk.mp4", "prompt": "a woman walks briskly through a market, handheld, the camera follows",
296
- "seconds": 5, "aspect": "9:16", "images": ["assets/product.png"], "note": "the walk through the market" }]
343
+ "seconds": 5, "aspect": "9:16", "images": ["assets/market.png"], "note": "the walk through the market" }]
297
344
  ```
298
345
 
346
+ - `products`: in a project with a product sheet (`production/product.json`), the ids of the user's products the file
347
+ shows, or `[]` for none; required on every request. Each product's pictures (all the user gave) are added to the
348
+ reference pictures and its product block to the prompt, and `--check` refuses a list that names the product
349
+ without it, a model that cannot take the pictures, or a first frame that is not the real product
350
+ ([video-product.md](video-product.md)).
299
351
  - `file`: where it goes in the project; `.mp4` is a clip, `.png`, `.jpg` or `.webp` a picture. `seconds`: whole
300
352
  seconds of a clip. `aspect`: the canvas's ratio. `images`, `videos`, `audios`: reference files of the project, which
301
353
  the prompt names in order as `@image1`, `@video1`, `@audio1`. `note`: what it shows, for `materials.json`
@@ -343,7 +395,7 @@ picture does not change the price.
343
395
 
344
396
  | Option | What it does |
345
397
  |---|---|
346
- | `--anchor-image <file>` | a picture of the user's (the person, the product) is the anchor of every clip; no clip is made first |
398
+ | `--anchor-image <file>` | a picture of the user's (the person, the place) is the anchor of every clip; no clip is made first. The user's product goes through the product sheet and `"products"`, not through the anchor: an anchor is one picture among the references of clips without a cast, with a sentence that asks for likeness; it does not carry the product's facts and is the first picture left out when a model takes few |
347
399
  | `--character <id>` | a character of the user's popost.ai character library is the anchor: its picture is downloaded to `assets/character-<id>.png` and every clip that shows a person shows that one. Needs the account (`popost auth login`) |
348
400
  | `"anchor": false` in a request | this clip neither gives nor takes the picture. For a clip that shares nothing with the others (another place and subject, a cutaway, an abstract ground): a reference picture pulls a clip towards what it shows |
349
401
  | `--no-anchor` | no anchor at all: unrelated clips, or a generator that takes no reference pictures |
@@ -374,11 +426,13 @@ one piece under those shots instead of being cut and re-timed with each (`video-
374
426
 
375
427
  **Reference pictures or frames.** A clip is steered in one of two ways, never both in one request:
376
428
 
377
- - Reference pictures (`"images"`, the anchor): who or what is in the clip. The model composes the shot itself and
378
- keeps the person or the product of the pictures. This is the default, and the way to keep identity across clips.
429
+ - Reference pictures (`"images"`, the anchor, the cast's identity pictures, the product's pictures): who or what is
430
+ in the clip. The model composes the shot itself and keeps the person or the product of the pictures. This is the
431
+ default, and the way to keep identity across clips. Their order when a model takes few (`maxReferenceImages` in
432
+ `--models`): the product's, the cast's, the request's own, the anchor.
379
433
  - Frames: `"firstFrame"` is the exact picture the clip starts from, `"lastFrame"` (only with it) the one it ends on.
380
- Use them for an exact composition (the clip must begin on this still: a product photo, the last picture of the
381
- scene before it), and for a shot longer than one clip: `"continues": "assets/part-1.mp4"` makes a clip start from
434
+ Use them for an exact composition (the clip must begin on this still: the user's product picture or a still
435
+ composed from it, the last picture of the scene before it), and for a shot longer than one clip: `"continues": "assets/part-1.mp4"` makes a clip start from
382
436
  the last frame of that clip (of the list, or already in the project), made after it. `template save --max-shot
383
437
  <seconds>` cuts such a shot into parts, and each later part takes the clip that continues the part before it. A
384
438
  clip with frames takes no `"images"`, `"videos"` or `"audios"` and no anchor: what it shows is
@@ -559,4 +613,4 @@ under the band). Pointer, boxes and zoom are drawn into the recording, the same
559
613
  | `capture` notes: `does not enlarge` or `the zoom stops at 3` | Zoom to a smaller element (a card, not its section) or a larger one (a card, not one word). |
560
614
  | `capture`: `nothing on ... matches` | Copy the selector from `--outline` exactly, or record the page that has the element. |
561
615
  | `render` is slow or runs out of memory | `--scale 0.5` for a draft, or `POPOST_RENDER_PAGES=1`. |
562
- | `No space left on device` | Set `TMPDIR` to a directory on a disk with room. |
616
+ | `No space left on device` | `popost video clean --all <the directory with your video projects> --dry-run` says what the caches take; without `--dry-run` it removes them. For temporary files, set `TMPDIR` to a directory on a disk with room. |
@@ -16,12 +16,34 @@ keep their previous behavior; an approved repair uses a separate project and doe
16
16
 
17
17
  - For Jianying Pro or CapCut delivery, use [direct desktop draft export](video-draft-export.md). Local Studio saves into the application's drafts folder and offers Open/Restart after success; a ZIP download is not this interaction.
18
18
 
19
+ - When the user supplies a product (a picture of what the video sells or shows), read [the user's product](video-product.md) before anything is generated. Product first: write the product sheet (`popost video product init`), show the user the facts you inferred in one line with the cost, carry the product with the user's real picture wherever the shot allows (packshots, close-ups, label shots: the picture in a scene with motion, never regenerated) and generate only the shots where it is held or used, each request marked `"products"` so that every picture the user gave and the same product block go with it. Invent no variant, size, accessory or label text. Every clip that shows the product and the finished video pass the product check by eye (`product sheet`, `product review`, `product check --deliver`); a product that differs from the user's picture is regenerated or replaced, never delivered with a note.
19
20
  - For any generated people or audible dialogue, read [people and shared voices](video-performers.md). Follow explicit user character requirements/material first; otherwise match the role, mood and broad facial style with a new face. Give photographic humans natural skin and living performance, including broad male/female briefs; prepare a readable portrait for talking heads. Keeping a presenter, avatar window or layout does not select the original person's identity. One generated clip may define its new person in the prompt; multiple generated clips reuse one new identity image. Visible mouths and the final audio share one timing source; a mixed video uses one registered voice profile for its speaker and voice-over. A person who speaks on camera in the reference speaks on camera in the re-make, in a generated clip that says the lines; never silent footage with a voice-over on top.
20
21
  - Before authoring a continuously moving shot or any motion-graphics reference, read [video-motion.md](video-motion.md)
21
22
  and search the [effects catalogue](video-effects.md). Before planning voice, music, clip audio or effects, read
22
23
  [video-sound.md](video-sound.md); before placing effects, read [video-sfx.md](video-sfx.md). These production
23
24
  checks remain required when onboarding or authorization has already been completed.
24
25
 
26
+ - Inputs first: before the first paid generation of a video, show the user everything that was prepared as the
27
+ input of a model and wait for their yes. `popost video inputs show project --requests requests.json --lang <the
28
+ language the user writes in>` builds it without paying: the input sheet (one picture: the product picture exactly
29
+ as it is sent, each person's picture with their name, every clip's reference pictures and frames, with captions)
30
+ and a summary (every prompt as it is sent, model, resolution, seconds, aspect ratio, credits; the voice, its script
31
+ and a sample to hear; the total). Send both in ONE message with the cost, and record the answer with `popost video
32
+ inputs confirm project --quote "<their words>"`. That one answer is the budget, the inputs and what was read from
33
+ the product picture: the user is asked once. `materials`, `generate` and the paid voice commands refuse with exit
34
+ code 3 and `confirm.reason: "inputs"` until then; a request, picture or voice line changed later is asked about
35
+ again, alone (run `inputs show` again). Only for a batch the user commissioned to run with nobody to ask:
36
+ `--unattended "<who authorised that, in their words>"`, and the delivery notes say the inputs were not confirmed.
37
+ - Language of prompts: write every clip and picture prompt, the facts of the product sheet and the voice script in
38
+ the language the user is writing in, and pass it once as `--lang <code>` (`product init` or `inputs show`; it is
39
+ stored in the project). The user then confirms exactly the text that is sent. The few sentences the program adds to
40
+ a prompt (product block, cast, anchor, speech and sound) are Chinese for `zh` and English for every other language.
41
+ Never translated: model ids, aspect ratios, file names, text printed on the product, brand names, quoted on-screen
42
+ text. A model whose entry in `popost video generate --models` says `"promptLanguage": "en"` is the exception: write
43
+ its prompts in English, and give the user a faithful version in their language first with the sent text underneath
44
+ (`popost video inputs translate project --item <key> --text "..."`; `inputs show` lists what is missing under
45
+ `displayMissing`, and a changed prompt asks for its version again). The same for a script in another language than
46
+ the user writes. Without `--lang` nothing changes: English sentences, one text.
25
47
  - Money: apply one commission authorization, with a budget for this video or an allocation inside an authorized batch.
26
48
  Popost voice-over, transcription, generated clips/pictures and music are paid when used; quotes are read-only.
27
49
  Cover any necessary paid reference analysis before it runs, within existing authorization or a separately agreed
@@ -78,6 +100,9 @@ video again: only the shots the fix touched are drawn, the others are copied, an
78
100
  many were reused. A scene may load any file of `assets/`, so changing one re-draws the shots with scenes.
79
101
  A change to a shared scene file invalidates every chunk that uses it; split independently edited scenes into
80
102
  separate files. Cache-key calculation does not render the scenes. The result is the same picture as a full redraw; `--no-reuse` (or `POPOST_VIDEO_CACHE=off`) draws everything again.
103
+ The frames of video materials (`.cache/video/`) are large and are cleaned automatically: a whole render removes the
104
+ ones it extracted once the MP4 is written, and the next command that needs them extracts them again. `popost video
105
+ clean` removes a project's caches at once (video-tools.md, "What a project keeps on disk").
81
106
 
82
107
  Visually confirmed caption roles remain authoritative when a template later checks them against speech. Page text
83
108
  that a reading excluded cannot become a subtitle again merely because the narrator mentions similar words. Keep
@@ -132,6 +157,7 @@ step needs; a catalogue is searched with its command, not read whole.
132
157
  | [video-effects.md](video-effects.md) | the catalogue of every example scene (generated) | never whole: `popost video scene example --search "<words>"` finds an entry; open it only to browse one class |
133
158
  | [video-sound.md](video-sound.md) | the voice-over, the music, the clips' own sound and the effects: the rules | when planning the sound (steps 1, 3 and 4) and when a sound check fails |
134
159
  | [video-sfx.md](video-sfx.md) | the catalogue of sound effects, and effects in a project | step 6 (`sfx place`), and to add an effect by hand |
160
+ | [video-product.md](video-product.md) | the user's product: the product sheet, the block every product request carries, real-picture shots, the product check | whenever the user supplies a product, before any generation (steps 1, 3) and at review (step 7) |
135
161
  | [video-performers.md](video-performers.md) | people and shared voices: identity by role, recurring people, the voice catalogue | when a shot shows a person or when the voice is chosen (steps 3 and 4) |
136
162
  | [video-native-observation.md](video-native-observation.md) | what generated clips actually say: transcribing them and importing what was heard | after generating clips that speak, in a strict replication |
137
163
  | [video-project.md](video-project.md) | the project file `video.json` and what a hand edit may add | before editing `video.json` by hand (after step 6) |
@@ -1 +0,0 @@
1
- :root{--pc-bg:#f4f4f2;--pc-surface:#fff;--pc-surface-2:#f8f8f7;--pc-border:#dededb;--pc-text:#252525;--pc-muted:#77766f;--pc-hover:#ebebe8;--pc-accent:#ff7a1a;--pc-accent-soft:#ff7a1a24;--pc-danger:#d64545;--pc-ok:#2e9e6b;--pc-guide:#e8369a;--pc-stage:#e9e9e6;--pc-paper:#fff;--pc-shadow:0 6px 20px #00000024;--pc-page-shadow:0 1px 3px #0000001f, 0 8px 28px #0000001a;--pc-primary:#2b2b2b;--pc-primary-text:#fff;--pc-topbar-h:48px;--pc-rail-w:64px;--pc-panel-w:280px;--pc-radius:8px;--pc-font:"Helvetica Neue", "PingFang SC", system-ui, -apple-system, "Segoe UI", sans-serif}html.dark{--pc-bg:#000;--pc-surface:#1a1a1a;--pc-surface-2:#141414;--pc-border:#ffffff24;--pc-text:#f2f2f0;--pc-muted:#ffffff8f;--pc-hover:#2a2a2a;--pc-accent-soft:#ff7a1a38;--pc-danger:#f06a63;--pc-ok:#6ee7b7;--pc-stage:#0b0b0b;--pc-shadow:0 6px 22px #0009;--pc-page-shadow:0 0 0 1px #ffffff14, 0 8px 28px #0009;--pc-primary:#fff;--pc-primary-text:#2b2b2b}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--pc-bg);color:var(--pc-text);font:13px/1.4 var(--pc-font);-webkit-font-smoothing:antialiased;overflow:hidden}button{font:inherit;color:inherit}.icon{flex:none}.app{flex-direction:column;min-width:0;height:100%;display:flex;container-type:inline-size}.topbar{height:var(--pc-topbar-h);background:var(--pc-surface-2);border-bottom:1px solid var(--pc-border);flex:none;align-items:center;gap:8px;min-width:0;padding:0 12px;display:flex}.topbar>:not(.tb-spacer){flex-shrink:0}.tb-group{align-items:center;gap:4px;display:flex}.tb-spacer,.sb-spacer{flex:1;min-width:0}.tb-sep{background:var(--pc-border);width:1px;height:18px;margin:0 4px}.tb-btn{border-radius:var(--pc-radius);cursor:pointer;white-space:nowrap;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:6px;min-width:32px;height:32px;padding:0 8px;display:inline-flex}.tb-btn:hover:not(:disabled){background:var(--pc-hover)}.tb-btn:disabled{opacity:.4;cursor:default}.tb-btn.outlined{border-color:var(--pc-border);background:var(--pc-surface)}.tb-btn.outlined:hover:not(:disabled){border-color:var(--pc-accent);background:var(--pc-accent-soft)}.tb-btn.small{min-width:26px;height:26px;padding:0 4px}.btn-save{background:var(--pc-primary);height:32px;color:var(--pc-primary-text);cursor:pointer;border:0;border-radius:9px;align-items:center;gap:6px;padding:0 16px;font-weight:600;display:inline-flex;position:relative}.btn-save:disabled{opacity:.5;cursor:default}.save-dot{background:var(--pc-accent);border-radius:50%;width:7px;height:7px}.save-state{color:var(--pc-muted);white-space:nowrap;align-items:center;gap:6px;min-width:0;display:inline-flex}.state-dot{background:var(--pc-ok);border-radius:50%;flex:none;width:8px;height:8px}.state-dirty .state-dot{background:var(--pc-accent)}.state-saving .state-dot{background:var(--pc-muted);animation:1s ease-in-out infinite pc-pulse}.state-error .state-dot{background:var(--pc-danger)}.tb-menu{position:relative}.cloud{align-items:center;gap:6px;min-width:0;display:inline-flex}.cloud-state{text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:240px;color:var(--pc-muted);align-items:center;gap:6px;display:inline-flex;overflow:hidden}.cloud-error{color:var(--pc-danger)}.cloud-link{color:var(--pc-accent);font-weight:600;text-decoration:none}.cloud-link:hover{text-decoration:underline}.cloud-link-input{border:1px solid var(--pc-border);border-radius:var(--pc-radius);background:var(--pc-surface);width:160px;min-width:0;height:28px;color:var(--pc-text);padding:0 8px}.spinner.small{border-width:2px;flex:none;width:12px;height:12px}.popover{z-index:60;background:var(--pc-surface);border:1px solid var(--pc-border);border-radius:var(--pc-radius);min-width:160px;box-shadow:var(--pc-shadow);padding:4px;position:absolute}#pop-export{top:38px;right:0}.ctx-menu{position:fixed}.menu-scrim{z-index:59;position:fixed;inset:0}.menu-item{text-align:left;cursor:pointer;background:0 0;border:0;border-radius:6px;width:100%;padding:7px 10px;display:block}.menu-item:hover:not(:disabled){background:var(--pc-hover)}.menu-item:disabled{opacity:.4;cursor:default}.menu-item.danger{color:var(--pc-danger)}.format-slot:empty{display:none}.format-slot{background:var(--pc-surface);border-bottom:1px solid var(--pc-border);flex:none}.workspace{flex:1;min-width:0;min-height:0;display:flex;position:relative}.main{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.rail{width:var(--pc-rail-w);background:var(--pc-surface-2);border-right:1px solid var(--pc-border);flex-direction:column;flex:none;gap:4px;padding:8px 4px;display:flex}.rail-item{border-radius:var(--pc-radius);color:var(--pc-muted);cursor:pointer;background:0 0;border:0;flex-direction:column;align-items:center;gap:3px;padding:8px 2px;font-size:11px;display:flex}.rail-item:hover{background:var(--pc-hover)}.rail-item.active{background:var(--pc-accent-soft);color:var(--pc-accent)}.panel{width:var(--pc-panel-w);background:var(--pc-surface);border-right:1px solid var(--pc-border);z-index:20;flex-direction:column;flex:none;min-height:0;display:flex}.panel:not(.open){display:none}.panel-head{border-bottom:1px solid var(--pc-border);justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.panel-head h2{margin:0;font-size:14px}.panel-body{flex:1;min-height:0;padding:12px;overflow:auto}.stage{background:var(--pc-stage);flex:1;min-height:0;overflow:auto}.stage-pad{min-width:100%;min-height:100%;display:flex}.canvas{background:var(--pc-paper);box-shadow:var(--pc-page-shadow);flex:none;margin:auto;position:relative}#frame{background:var(--pc-paper);transform-origin:0 0;border:0;display:block;position:absolute;top:0;left:0}.overlay{pointer-events:none;position:absolute;inset:0}.overlay>*{position:absolute}.ov-hover{outline-offset:-1px;outline:1.5px solid #ff7a1a8c}.ov-sel{outline:2px solid var(--pc-accent);outline-offset:-1px}.ov-sel.multi{outline-width:1.5px}.ov-sel.editing{outline-style:dashed}.ov-group{outline:1px dashed var(--pc-accent);outline-offset:2px}.ov-handles{pointer-events:none}.ov-handle{border:1.5px solid var(--pc-accent);pointer-events:auto;touch-action:none;background:#fff;border-radius:2px;width:10px;height:10px;margin:-5px 0 0 -5px;position:absolute}.ov-handle:after{content:"";position:absolute;inset:-6px}.ov-handle.h-w,.ov-handle.h-e{border-radius:4px;width:8px;height:16px;margin:-8px 0 0 -4px}.ov-pill{background:var(--pc-surface);border:1px solid var(--pc-border);height:36px;box-shadow:var(--pc-shadow);pointer-events:auto;white-space:nowrap;border-radius:10px;align-items:center;gap:2px;padding:0 4px;display:flex}.ov-pill.hidden{opacity:0}.pill-grip{cursor:grab;width:26px;height:28px;color:var(--pc-muted);touch-action:none;justify-content:center;align-items:center;display:inline-flex}.pill-count{padding:0 8px;font-weight:600}.pill-btn{cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;display:inline-flex}.pill-btn:hover{background:var(--pc-hover)}.pill-btn.danger:hover{color:var(--pc-danger)}.ov-guide{background:var(--pc-guide)}.ov-guide.v{width:1px}.ov-guide.h{height:1px}.ov-marquee{background:var(--pc-accent-soft);border:1px solid var(--pc-accent)}.ov-tip{color:#fff;white-space:nowrap;background:#222;border-radius:5px;padding:2px 7px;font-size:11px}.statusbar{background:var(--pc-surface-2);border-top:1px solid var(--pc-border);flex:none;align-items:center;gap:12px;min-width:0;height:36px;padding:0 12px;display:flex}.sb-group{align-items:center;gap:4px;display:flex}.page-counter{text-align:center;min-width:48px;color:var(--pc-muted);font-variant-numeric:tabular-nums}.overflow-indicator{height:24px;color:var(--pc-danger);cursor:pointer;background:#d6454524;border:0;border-radius:12px;align-items:center;gap:5px;padding:0 8px;display:inline-flex}.zoom-group input[type=range]{width:120px;accent-color:var(--pc-accent)}.zoom-label{cursor:pointer;font-variant-numeric:tabular-nums;background:0 0;border:0;border-radius:6px;min-width:48px;height:24px}.zoom-label:hover{background:var(--pc-hover)}.filmstrip-wrap{background:var(--pc-surface);border-top:1px solid var(--pc-border);flex:none;min-width:0}.filmstrip{gap:10px;min-height:112px;padding:10px 12px;display:flex;overflow:auto hidden}.thumb{cursor:pointer;border:2px solid #0000;border-radius:6px;outline:none;flex:none;justify-content:center;align-items:center;width:124px;height:92px;padding:3px;display:flex;position:relative}.thumb:hover{background:var(--pc-hover)}.thumb:focus-visible{box-shadow:0 0 0 2px var(--pc-accent-soft)}.thumb.active{border-color:var(--pc-accent)}.thumb.drop-before:before,.thumb.drop-after:after{content:"";background:var(--pc-accent);border-radius:2px;width:3px;position:absolute;top:0;bottom:0}.thumb.drop-before:before{left:-7px}.thumb.drop-after:after{right:-7px}.thumb-view{background:var(--pc-paper);box-shadow:0 0 0 1px var(--pc-border);pointer-events:none;position:relative;overflow:hidden}.thumb-frame{transform-origin:0 0;pointer-events:none;background:var(--pc-paper);border:0;position:absolute;top:0;left:0}.thumb-num{color:#fff;text-align:center;background:#0000009e;border-radius:9px;min-width:18px;padding:0 5px;font-size:11px;line-height:18px;position:absolute;bottom:6px;left:6px}.thumb-badge{background:var(--pc-danger);color:#fff;text-align:center;border-radius:50%;width:18px;height:18px;font-size:12px;font-weight:700;line-height:18px;position:absolute;top:6px;right:6px}.state-overlay{z-index:40;background:var(--pc-bg);text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:10px;padding:24px;display:flex;position:absolute;inset:0}.state-error p{max-width:460px;color:var(--pc-muted);margin:0}.spinner{border:2px solid var(--pc-border);border-top-color:var(--pc-accent);border-radius:50%;width:22px;height:22px;animation:.8s linear infinite pc-spin}.modal-backdrop{z-index:80;background:#00000073;justify-content:center;align-items:center;padding:16px;display:flex;position:fixed;inset:0}.modal{background:var(--pc-surface);width:min(420px,100%);box-shadow:var(--pc-shadow);border-radius:12px;padding:20px}.modal h2{margin:0 0 8px;font-size:16px}.modal p{color:var(--pc-muted);margin:0 0 16px}.modal-actions{justify-content:flex-end;gap:8px;display:flex}.btn{border:1px solid var(--pc-border);border-radius:var(--pc-radius);background:var(--pc-surface);cursor:pointer;height:32px;padding:0 14px}.btn:hover{background:var(--pc-hover)}.btn.primary{background:var(--pc-primary);color:var(--pc-primary-text);border-color:#0000;font-weight:600}.toasts{z-index:90;pointer-events:none;flex-direction:column;align-items:center;gap:8px;max-width:calc(100% - 32px);display:flex;position:fixed;bottom:140px;left:50%;transform:translate(-50%)}.toast{color:#fff;box-shadow:var(--pc-shadow);background:#262626;border-radius:10px;padding:9px 14px}.toast-error{background:#b3261e}@keyframes pc-spin{to{transform:rotate(360deg)}}@keyframes pc-pulse{50%{opacity:.35}}@media (width<=760px){.topbar{gap:4px;padding:0 8px}.tb-label,.save-text{display:none}.btn-save{padding:0 10px}.rail{width:52px}.rail-item span{display:none}.panel{width:min(var(--pc-panel-w), calc(100% - 52px));box-shadow:var(--pc-shadow);position:absolute;top:0;bottom:0;left:52px}.zoom-group input[type=range]{width:70px}}.tb-caret{display:inline-flex}@media (width<=520px){.topbar{padding:0 6px}.topbar .tb-text,.topbar .tb-caret,.topbar .tb-sep{display:none}.topbar .tb-btn{padding:0 6px}.cloud-state{max-width:110px}.cloud-link-input{width:110px}.topbar .page-design{padding-left:0}.topbar .compare-toggle{margin-left:0}.statusbar{gap:6px;padding:0 8px}.zoom-group input[type=range]{display:none}.page-design-pop.size{width:auto;right:12px}.comparison-caption>span{text-overflow:ellipsis;max-width:100%;overflow:hidden}}@container (width<=1450px){.topbar .tb-label,.topbar .tb-text,.topbar .save-text,.topbar .tb-caret{display:none}.topbar .tb-btn{padding-inline:6px}.topbar .btn-save{min-width:46px;padding-inline:10px}.topbar .cloud-state{max-width:100px}}@container (width<=900px){.topbar{height:auto;min-height:var(--pc-topbar-h);flex-wrap:wrap;gap:4px;padding-block:5px}.topbar .tb-spacer,.topbar .tb-sep{display:none}.topbar .cloud-link-input{width:min(150px,40cqw)}}.format-slot{min-height:40px}.fmt-row{white-space:nowrap;scrollbar-width:thin;align-items:center;gap:3px;height:40px;padding:0 12px;display:flex;overflow:auto hidden}.fmt-row[data-has-target="0"]{opacity:.55}.fmt-row .tb-sep{flex:none}.fmt-spacer{flex:1;min-width:8px}.tb-btn.fmt{flex:none;font-size:13px}.tb-btn.fmt.wide{gap:5px;padding:0 8px}.tb-btn.fmt.on{background:var(--pc-accent-soft);border-color:var(--pc-accent);color:var(--pc-accent)}.fmt-text{font-size:12px}.fmt-font{border:1px solid var(--pc-border);background:var(--pc-surface);width:170px;height:28px;color:var(--pc-text);font:inherit;border-radius:6px;flex:none;padding:0 6px}.fmt-font:disabled,.fmt-size input:disabled{opacity:.5}.fmt-size{flex:none;align-items:center;gap:2px;margin-left:4px;display:inline-flex}.fmt-size input{border:1px solid var(--pc-border);background:var(--pc-surface);width:52px;height:28px;color:var(--pc-text);font:inherit;text-align:center;appearance:textfield;border-radius:6px;padding:0 4px}.fmt-size input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.fmt-size input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.color-glyph{flex-direction:column;align-items:center;font-weight:700;line-height:1;display:inline-flex;position:relative}.color-glyph i{width:14px;height:3px;box-shadow:0 0 0 1px var(--pc-border);border-radius:1px;margin-top:2px;display:block}.aa{font-size:12px;font-weight:600}.popover.pop-fixed{width:max-content;max-width:calc(100vw - 16px);padding:10px;position:fixed}.popover.pop-colors{width:232px}.popover.pop-image{width:264px}.slider-row{align-items:center;gap:8px;min-width:240px;padding:4px 0;display:flex}.slider-row.bare{min-width:0}.slider-label{width:64px;color:var(--pc-muted);flex:none}.slider-row input[type=range],.slider-row.bare input[type=range]{min-width:0;accent-color:var(--pc-accent);flex:1}.slider-row output{text-align:right;font-variant-numeric:tabular-nums;width:44px;color:var(--pc-muted)}.swatch-title{letter-spacing:.02em;color:var(--pc-muted);margin:8px 0 6px;font-size:11px;font-weight:600}.swatch-title:first-child{margin-top:0}.swatch-grid{grid-template-columns:repeat(7,1fr);gap:6px;display:grid}.swatch{aspect-ratio:1;border:1px solid var(--pc-border);cursor:pointer;border-radius:6px;width:100%;min-width:0;padding:0}.swatch:hover:not(:disabled){transform:scale(1.12)}.swatch:disabled{opacity:.4;cursor:default}.swatch.current{outline:2px solid var(--pc-accent);outline-offset:1px}.swatch.none{background:linear-gradient(135deg, transparent 46%, var(--pc-danger) 46% 54%, transparent 54%), var(--pc-surface)}.swatch-custom{justify-content:space-between;align-items:center;gap:8px;margin-top:10px;display:flex}.custom-color{border:1px solid var(--pc-border);cursor:pointer;background:0 0;border-radius:6px;width:44px;height:28px;padding:0}.p-section{border-bottom:1px solid var(--pc-border);margin-bottom:14px;padding-bottom:14px}.p-section:last-child{border-bottom:0;margin-bottom:0}.p-section h3{margin:0 0 8px;font-size:12px;font-weight:700}.p-hint{color:var(--pc-muted);margin:0 0 10px}.add-list{flex-direction:column;gap:6px;display:flex}.add-item{border:1px solid var(--pc-border);border-radius:var(--pc-radius);background:var(--pc-surface);text-align:left;cursor:pointer;align-items:center;gap:10px;width:100%;height:40px;padding:0 10px;display:flex}.add-item:hover:not(:disabled){border-color:var(--pc-accent);background:var(--pc-accent-soft)}.add-item:disabled{opacity:.45;cursor:default}.add-icon{background:var(--pc-hover);border-radius:6px;justify-content:center;align-items:center;width:26px;height:26px;font-size:12px;font-weight:700;display:inline-flex}.add-heading{font-size:15px;font-weight:700}.add-subheading{font-weight:600}.chips{flex-wrap:wrap;gap:6px;margin-bottom:8px;display:flex}.chip{border:1px solid var(--pc-border);background:var(--pc-surface);cursor:pointer;border-radius:13px;height:26px;padding:0 10px;font-size:12px}.chip:hover{background:var(--pc-hover)}.chip.on{border-color:var(--pc-accent);background:var(--pc-accent-soft);color:var(--pc-accent)}.btn.wide{justify-content:center;align-items:center;gap:6px;width:100%;display:inline-flex}.btn.on{border-color:var(--pc-accent);background:var(--pc-accent-soft);color:var(--pc-accent)}.panel-body.layers{padding:8px}.layer-list{flex-direction:column;gap:1px;display:flex}.layer-row{cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:6px;outline:none;align-items:center;gap:8px;min-height:32px;padding:0 8px;display:flex;position:relative}.layer-row:hover{background:var(--pc-hover)}.layer-row:focus-visible{box-shadow:inset 0 0 0 2px var(--pc-accent-soft)}.layer-row.selected{background:var(--pc-accent-soft)}.layer-row.dragging{opacity:.45}.layer-row.drop-before:before,.layer-row.drop-after:after{content:"";background:var(--pc-accent);border-radius:1px;height:2px;position:absolute;left:4px;right:4px}.layer-row.drop-before:before{top:-1px}.layer-row.drop-after:after{bottom:-1px}.layer-icon{color:var(--pc-muted);flex:none;display:inline-flex}.layer-row.selected .layer-icon{color:var(--pc-accent)}.layer-kind{color:var(--pc-muted);flex:none;font-size:11px}.layer-snippet{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.panel-body.code-panel{flex-direction:column;gap:8px;padding:10px;display:flex;overflow:hidden}.code-actions{flex:none;justify-content:flex-end;gap:8px;display:flex}.code-actions .btn{position:relative}.code-unsaved-dot{background:var(--pc-accent);border-radius:50%;width:7px;height:7px;margin-left:6px;display:inline-block}.code-unsaved-dot[hidden]{display:none}.code-host{border:1px solid var(--pc-border);border-radius:6px;flex:1;min-height:160px;position:relative;overflow:hidden}.code-host .CodeMirror{background:var(--pc-surface-2);height:auto;color:var(--pc-text);font:12px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;position:absolute;inset:0}.code-host .CodeMirror-gutters{background:var(--pc-surface);border-right:1px solid var(--pc-border)}.code-host .CodeMirror-linenumber{color:var(--pc-muted)}.code-host .CodeMirror-cursor{border-left-color:var(--pc-text)}.code-host .CodeMirror-selected{background:var(--pc-accent-soft)}.code-status{min-height:18px;color:var(--pc-muted);flex:none;font-size:12px}.code-status.error{color:var(--pc-danger)}html.dark .cm-s-default .cm-tag{color:#6cb6ff}html.dark .cm-s-default .cm-attribute{color:#e3b341}html.dark .cm-s-default .cm-string{color:#ff9b8a}html.dark .cm-s-default .cm-comment{color:#8fa38f}html.dark .cm-s-default .cm-keyword{color:#c9a0ee}html.dark .cm-s-default .cm-number{color:#7ee2a8}html.dark .cm-s-default .cm-bracket{color:#aaa}.image-picker{flex-direction:column;display:flex}.img-grid{grid-template-columns:repeat(4,1fr);gap:6px;max-height:160px;display:grid;overflow:auto}.img-thumb{aspect-ratio:1;border:1px solid var(--pc-border);background:var(--pc-surface-2);cursor:pointer;border-radius:6px;min-width:0;padding:0;overflow:hidden}.img-thumb img{object-fit:cover;width:100%;height:100%;display:block}.img-thumb:hover:not(:disabled){border-color:var(--pc-accent)}.img-thumb.current{outline:2px solid var(--pc-accent);outline-offset:1px}.img-thumb:disabled{cursor:default}.img-url{gap:6px;display:flex}.img-url input{border:1px solid var(--pc-border);border-radius:var(--pc-radius);background:var(--pc-surface);min-width:0;height:32px;color:var(--pc-text);font:inherit;flex:1;padding:0 8px}.crop-layer{z-index:30;pointer-events:auto;position:absolute;inset:0;overflow:hidden}.crop-box{outline-offset:-2px;cursor:grab;touch-action:none;outline:2px dashed #fff;justify-content:center;align-items:flex-end;display:flex;position:absolute;box-shadow:0 0 0 9999px #0000008c}.crop-box:active{cursor:grabbing}.crop-hint{color:#fff;pointer-events:none;background:#0009;border-radius:10px;margin-bottom:8px;padding:2px 8px;font-size:11px}.crop-bar{background:var(--pc-surface);border:1px solid var(--pc-border);box-shadow:var(--pc-shadow);white-space:nowrap;border-radius:10px;gap:6px;padding:6px;display:flex;position:absolute}.crop-bar .btn{height:28px;padding:0 10px}:is(.canvas:has(.crop-layer) .ov-pill,.canvas:has(.crop-layer) .ov-handles,.canvas:has(.crop-layer) .ov-sel,.canvas:has(.crop-layer) .ov-hover){visibility:hidden}.code-host .CodeMirror-lines{padding:9px 0}.code-host .CodeMirror pre.CodeMirror-line{padding:0 9px}.code-host .cm-tag{color:var(--lightningcss-light,#8547ac)var(--lightningcss-dark,#d5a4f0)}.code-host .cm-attribute{color:var(--lightningcss-light,#17619b)var(--lightningcss-dark,#8ecbf8)}.code-host .cm-string{color:var(--lightningcss-light,#28753e)var(--lightningcss-dark,#a5d99d)}.code-host .cm-comment{color:var(--pc-muted)}.page-design,.rail-add{position:relative}.rail-add>.rail-item{width:100%}.page-design{padding-left:6px}.background-sample{border:1px solid var(--pc-border);border-radius:50%;width:17px;height:17px}.page-design-pop{z-index:62;border-radius:16px;width:min(455px,75vw);padding:7px;position:absolute;top:calc(100% + 7px);left:0}.page-design-pop.color{width:min(234px,100vw - 24px);max-height:min(432px,100vh - 64px);padding:8px;overflow:auto}.page-design-pop.color .color-field{height:min(105px,22vh)}.page-design-pop.color .color-picker{gap:5px;margin:2px 0 7px}.page-design-pop.color .color-picker input[type=range]{height:11px}.page-design-pop.color .swatch-grid{grid-template-columns:repeat(8,1fr);gap:4px}.page-design-pop.color .swatch{border-radius:4px}.page-design-pop.color .swatch-title{margin:5px 0 4px}.page-design-pop.color .color-toggle{height:24px;min-height:0;margin:3px 0;padding:0 7px}.add-popover{z-index:62;border-radius:13px;width:158px;padding:6px;position:absolute;top:0;left:calc(100% + 5px)}.add-popover .menu-item{align-items:center;gap:9px;display:flex}.page-resize-layer{z-index:12;position:absolute;inset:0}.page-resize-actions{white-space:nowrap;background:var(--pc-surface);z-index:2;border-radius:10px;align-items:center;gap:6px;padding:6px;display:flex;position:absolute;bottom:calc(100% - 12px);left:50%;transform:translate(-50%);box-shadow:0 2px 8px #0003}.page-resize-actions span{padding:0 5px;font-size:11px}.page-resize-hit{touch-action:none;cursor:move;position:absolute;inset:0}.page-resize-frame{pointer-events:none;background:linear-gradient(90deg,#0000 33%,#fffd 33% 33.4%,#0000 33.4% 66%,#fffd 66% 66.4%,#0000 66.4%),linear-gradient(#0000 33%,#fffd 33% 33.4%,#0000 33.4% 66%,#fffd 66% 66.4%,#0000 66.4%);border:2px solid #3d91ff;position:absolute;box-shadow:0 0 0 2000px #0005}.asset-tabs{flex-wrap:wrap;align-items:center;gap:4px;margin-bottom:12px;display:flex}.asset-tabs button{cursor:pointer}.asset-tabs [role=tab]{color:var(--pc-muted);background:0 0;border:0;border-radius:6px;padding:6px 7px}.asset-tabs [aria-selected=true]{background:var(--pc-accent-soft);color:var(--pc-accent)}.asset-tabs .btn{align-items:center;gap:4px;margin-left:auto;display:flex}.asset-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:10px;display:grid}.asset-grid button{aspect-ratio:1;border:1px solid var(--pc-border);background:var(--pc-surface-2);cursor:pointer;border-radius:9px;min-width:0;padding:0;overflow:hidden}.asset-grid button:hover{border-color:var(--pc-accent)}.asset-grid img{object-fit:cover;width:100%;height:100%;display:block}.color-toggle{min-height:25px;margin:5px 0;font-size:11px}.color-picker{gap:7px;margin:4px 0 12px;display:grid}.color-field{touch-action:none;cursor:crosshair;background-image:linear-gradient(#0000,#000),linear-gradient(90deg,#fff,#0000);border-radius:8px;height:min(185px,30vh);position:relative}.color-field i{pointer-events:none;border:2px solid #fff;border-radius:50%;width:12px;height:12px;position:absolute;transform:translate(-50%,-50%);box-shadow:0 1px 4px #0007}.color-picker input[type=range]{appearance:none;accent-color:#fff;border-radius:10px;width:100%;height:14px;margin:0}.color-picker input[type=range]::-webkit-slider-thumb{appearance:none;cursor:ew-resize;border:2px solid #fff;border-radius:5px;width:10px;height:17px;box-shadow:0 0 3px #0008}.color-hue{background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.color-alpha{background-color:var(--pc-surface-3)}.color-inputs{justify-content:space-between;align-items:center;gap:6px;display:flex}.color-inputs label,.color-inputs span{background:var(--pc-surface-2);color:var(--pc-muted);border-radius:6px;gap:5px;padding:5px 7px;display:flex}.color-inputs input{width:82px;color:var(--pc-text);background:0 0;border:0;font-family:monospace}#pop-export.export-panel{overscroll-behavior:contain;border-radius:17px;width:min(492px,100vw - 24px);min-width:0;max-height:calc(100dvh - 24px);padding:12px;position:fixed;right:auto;overflow:auto}.export-panel fieldset{border:0;grid-template-columns:minmax(0,1fr);gap:9px;min-width:0;margin:0;padding:0;display:grid}.export-section{background:var(--pc-surface-2);border-radius:12px;padding:10px}.export-section-head,.export-row{justify-content:space-between;align-items:center;gap:10px;display:flex}.export-section-head{flex-wrap:wrap}.export-section-head label{align-items:center;gap:5px;display:flex}.export-section-head input{accent-color:var(--pc-text)}.export-pages{gap:10px;margin-top:11px;padding-bottom:4px;display:flex;overflow:auto}.export-pages button{width:86px;color:var(--pc-muted);text-align:left;cursor:pointer;background:0 0;border:none;flex:none;padding:2px}.export-pages b,.export-pages small{text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:11px;font-weight:400;display:block;overflow:hidden}.export-thumb{background:var(--pc-stage);border:1px solid var(--pc-border);border-radius:7px;place-items:center;width:82px;height:82px;margin-bottom:5px;display:grid;position:relative;overflow:hidden}.export-thumb>span{display:block;overflow:hidden}.export-thumb iframe{transform-origin:0 0;pointer-events:none;border:0;display:block}.export-thumb i{background:var(--pc-text);width:19px;height:19px;color:var(--pc-surface);border-radius:50%;place-items:center;display:grid;position:absolute;top:3px;right:3px}.export-settings{padding:2px 10px}.export-row{flex-wrap:wrap;min-height:44px;padding-block:4px;position:relative}.export-row+.export-row{border-top:1px solid var(--pc-border)}.export-row .btn{align-items:center;gap:6px;display:flex}.export-row .export-name,.export-name-editor{min-width:0;max-width:72%}.export-row>span{flex-shrink:0}.export-row .export-name{overflow:hidden}.export-row .export-name .icon{flex-shrink:0}.export-section,.export-pages{min-width:0;max-width:100%}.export-row .export-name span{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.export-name .icon{color:var(--pc-muted)}.export-name-editor{align-items:center;gap:5px;width:72%;display:flex}.export-name-editor input{width:0;min-width:0;height:30px;color:inherit;border:1px solid var(--pc-border);background:var(--pc-surface);font:inherit;border-radius:6px;flex:1;padding:5px 8px}.export-name-editor input:focus{outline:2px solid var(--pc-accent);outline-offset:-1px}.export-name-editor .btn{padding-inline:8px}.export-select{z-index:61;overscroll-behavior:contain;border:1px solid var(--pc-border);background:var(--pc-surface);box-shadow:var(--pc-shadow);border-radius:10px;padding:5px;position:fixed;overflow:auto}.export-option{border-radius:6px;align-items:center;gap:6px;display:flex}.export-option:hover{background:var(--pc-surface-2)}.export-option:has([aria-pressed=true]){background:var(--pc-surface-2)}.export-option-label,.export-gem{color:inherit;cursor:pointer;background:0 0;border:0;border-radius:6px}.export-option-label{text-align:left;flex:1;min-width:0;padding:5px 8px}.export-select small{color:var(--pc-muted);font-size:10px;display:block}.export-category{padding:5px 8px 3px}.export-option small{margin-top:2px}.export-gem{color:var(--lightningcss-light,#8a5d0c)var(--lightningcss-dark,#f1cc84);place-items:center;width:25px;height:25px;margin-right:4px;display:grid}.export-gem:is(:hover,:focus-visible,[aria-expanded=true]){background:var(--lightningcss-light,#f9edce)var(--lightningcss-dark,#523a18)}.export-upgrade{border-top:1px solid var(--pc-border);color:var(--pc-muted);margin-top:4px;padding:7px 8px;font-size:11px;line-height:1.55}.export-upgrade a{color:var(--pc-accent);white-space:nowrap;margin-left:4px}.export-panel .export-start{width:100%;color:var(--pc-surface);background:var(--pc-text);border-color:var(--pc-text);justify-content:center;height:36px;margin-top:10px;position:relative;overflow:hidden}.export-start i{background:#ffffff48;transition:width .18s;position:absolute;inset:0 auto 0 0}.export-start span{position:relative}@media (width<=610px){.page-design-pop{position:fixed;top:45px;left:12px}}.page-resize-frame:before,.page-resize-frame:after{content:"";background-color:#0000;background-image:linear-gradient(#fff,#fff),linear-gradient(#fff,#fff),linear-gradient(#fff,#fff),linear-gradient(#fff,#fff);background-position:0 0,100% 0,0 100%,100% 100%;background-repeat:no-repeat;background-size:13px 4px,13px 4px,13px 4px,13px 4px;background-attachment:scroll,scroll,scroll,scroll;background-origin:padding-box,padding-box,padding-box,padding-box;background-clip:border-box,border-box,border-box,border-box;position:absolute;inset:-4px}.page-resize-frame:after{background-size:4px 13px}.image-panel{flex-direction:column;flex:1;min-height:0;display:flex}.asset-grid button[aria-pressed=true]{outline:2px solid var(--pc-accent);outline-offset:-2px}.asset-confirm{border-top:1px solid var(--pc-border);justify-content:flex-end;padding:9px 12px;display:flex}.asset-confirm .btn{min-width:74px}.code-header-tools{align-items:center;gap:4px;display:flex}.code-header-tools .tb-btn{white-space:nowrap;color:var(--pc-muted);gap:4px;font-size:11px}.code-header-tools .tb-btn:hover:not(:disabled){color:var(--pc-text)}.CodeMirror{color:#000;direction:ltr;height:300px;font-family:monospace}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{white-space:nowrap;background-color:#f7f7f7;border-right:1px solid #ddd}.CodeMirror-linenumber{text-align:right;color:#999;white-space:nowrap;min-width:20px;padding:0 3px 0 5px}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{background:#7e7;width:auto;border:0!important}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection{background:0 0}.cm-fat-cursor .CodeMirror-line>span::selection{background:0 0}.cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}.cm-fat-cursor .CodeMirror-line::-moz-selection{background:0 0}.cm-fat-cursor .CodeMirror-line>span::-moz-selection{background:0 0}.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}.cm-fat-cursor{caret-color:#0000}@keyframes blink{0%{}50%{background-color:#0000}to{}}.cm-tab{-webkit-text-decoration:inherit;text-decoration:inherit;display:inline-block}.CodeMirror-rulers{position:absolute;inset:-50px 0 0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute;top:0;bottom:0}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error,.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:#ff96004d}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{background:#fff;position:relative;overflow:hidden}.CodeMirror-scroll{z-index:0;outline:none;height:100%;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;position:relative;overflow:scroll!important}.CodeMirror-sizer{border-right:50px solid #0000;position:relative}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{z-index:6;outline:none;display:none;position:absolute}.CodeMirror-vscrollbar{top:0;right:0;overflow:hidden scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow:scroll hidden}.CodeMirror-scrollbar-filler{bottom:0;right:0}.CodeMirror-gutter-filler{bottom:0;left:0}.CodeMirror-gutters{z-index:3;min-height:100%;position:absolute;top:0;left:0}.CodeMirror-gutter{white-space:normal;vertical-align:top;height:100%;margin-bottom:-50px;display:inline-block}.CodeMirror-gutter-wrapper{z-index:4;position:absolute;background:0 0!important;border:none!important}.CodeMirror-gutter-background{z-index:4;position:absolute;top:0;bottom:0}.CodeMirror-gutter-elt{cursor:default;z-index:4;position:absolute}.CodeMirror-gutter-wrapper ::selection{background-color:#0000}.CodeMirror-gutter-wrapper ::selection{background-color:#0000}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{font-family:inherit;font-size:inherit;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual;background:0 0;border-width:0;border-radius:0;margin:0;position:relative;overflow:visible}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{z-index:0;position:absolute;inset:0}.CodeMirror-linewidget{z-index:2;padding:.1px;position:relative}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{box-sizing:content-box}.CodeMirror-measure{visibility:hidden;width:100%;height:0;position:absolute;overflow:hidden}.CodeMirror-cursor{pointer-events:none;position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;z-index:3;position:relative}div.CodeMirror-dragcursors,.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection{background:#d7d4f0}.CodeMirror-line>span::selection{background:#d7d4f0}.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection{background:#d7d4f0}.CodeMirror-line>span::-moz-selection{background:#d7d4f0}.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:0 0}.compare-toggle{white-space:nowrap;margin-left:8px}.compare-toggle.active{background:var(--pc-hover);box-shadow:inset 0 0 0 1px var(--pc-border)}.stage-pad.comparing{justify-content:center;align-items:center;gap:28px;padding-top:72px!important}.comparing .canvas{margin:0}.comparison-reference{background:var(--pc-surface);box-shadow:var(--pc-page-shadow);flex:none;position:relative}.comparison-image{object-fit:contain;-webkit-user-select:none;user-select:none;width:100%;height:100%;display:block}.comparison-caption{color:var(--pc-muted);white-space:nowrap;justify-content:space-between;align-items:center;gap:12px;font-size:11px;display:flex;position:absolute;bottom:calc(100% + 14px);left:0;right:0}.comparison-caption>span:first-child{color:var(--pc-text);font-size:12px;font-weight:600}.comparison-empty{height:100%;color:var(--pc-muted);text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:12px;padding:20px;font-size:12px;display:flex}.comparison-empty strong{color:var(--pc-text);font-weight:500}@media (width<=1000px){.comparison-caption{flex-direction:column;align-items:flex-start;gap:3px}.stage-pad.comparing{gap:20px}}.pp-size-picker{text-align:left;grid-template-columns:90px minmax(0,1fr);gap:12px;padding:10px;display:grid}.pp-size-tabs{background:var(--pc-surface-2,var(--surface-subtle));border-radius:12px;flex-direction:column;gap:4px;padding:5px;display:flex}.pp-size-picker button{color:inherit;cursor:pointer;background:0 0;border:0;border-radius:9px;padding:8px}.pp-size-picker button:is(:hover,[aria-selected=true],[aria-pressed=true]){background:var(--pc-surface-3,var(--surface-muted,#80808020))}.pp-size-picker button:disabled{opacity:.48;cursor:default}.pp-size-tabs button{text-align:left}.pp-size-inputs{align-items:stretch;gap:8px;margin-bottom:8px;display:flex}.pp-size-inputs label{border:1px solid var(--pc-border,var(--border));border-radius:9px;flex:1;align-items:center;gap:6px;min-width:0;padding:5px 7px;display:flex}.pp-size-inputs input{width:100%;min-width:0;color:inherit;font:inherit;background:0 0;border:0}.pp-size-presets{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;display:grid}.pp-size-presets button{text-align:left;align-items:center;gap:10px;min-height:50px;display:flex}.pp-size-presets i{border:1px solid;flex:none;display:block}.pp-size-presets small{opacity:.62;font-size:11px;display:block}.pp-smart-size{text-align:left;width:100%;margin-bottom:4px;display:block}@media (width<=460px){.pp-size-picker{grid-template-columns:76px minmax(0,1fr);gap:6px;padding:4px}}
@@ -1,30 +0,0 @@
1
- export declare const AUTH_VERSION = 1;
2
- /** How long a started login may wait for the callback. */
3
- export declare const PENDING_TTL_MS: number;
4
- /** The upload credential lives 15 minutes on the server; the local copy is dropped at the same time. */
5
- export declare const TICKET_TTL_MS: number;
6
- export declare const SECRET_PATTERN: RegExp;
7
- export declare const MIN_PORT = 1024;
8
- export declare const MAX_PORT = 65535;
9
- export declare const TITLE_MAX = 80;
10
- export type RandomBytes = (size: number) => Uint8Array;
11
- export declare const b64url: (bytes: Uint8Array) => string;
12
- /** 32 random bytes as 43 base64url characters. */
13
- export declare const newSecret: (random?: RandomBytes) => string;
14
- export declare const challengeOf: (verifier: string) => string;
15
- export declare const safeEqual: (a: string, b: string) => boolean;
16
- /** The bearer the platform accepts for one project's upload: `pat_push_<code>.<verifier>`. */
17
- export declare const ticketBearer: (code: string, verifier: string) => string;
18
- export declare const authorizeTitle: (brief: string) => string;
19
- export interface AuthorizeInput {
20
- /** The site's origin, e.g. `https://popost.ai`. */
21
- readonly site: string;
22
- readonly lang: 'en' | 'zh';
23
- readonly port: number;
24
- readonly state: string;
25
- readonly challenge: string;
26
- readonly projectId: string;
27
- readonly title: string;
28
- readonly pages: number;
29
- }
30
- export declare const buildAuthorizeUrl: (input: AuthorizeInput) => string;