demoman 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/THIRD_PARTY_NOTICES +1 -1
- package/dist/demoman.mjs +1550 -1052
- package/dist/page/mux-entry.js +40 -34
- package/dist/page/render-entry.js +58 -35
- package/dist/recipe.md +7 -7
- package/dist/studio/assets/editor-B0QH2SX6.js +4 -0
- package/dist/studio/assets/{editor-inline-07bcb316.css → editor-inline-61caf545.css} +47 -14
- package/dist/studio/assets/library-5-DKU9o1.js +1 -0
- package/dist/studio/assets/settings-DEDyzRMN.js +1 -0
- package/dist/studio/assets/state-BoH98Hy3.js +2 -0
- package/dist/studio/assets/toast-B_KSsgnJ.js +72 -0
- package/dist/studio/assets/toast-DoOgSxra.css +1 -0
- package/dist/studio/assets/view-DWP5EfCT.js +1 -0
- package/dist/studio/editor.html +6 -6
- package/dist/studio/library.html +4 -4
- package/dist/studio/settings.html +4 -4
- package/dist/studio/studio-build.json +3 -3
- package/package.json +1 -1
- package/dist/studio/assets/editor-BqUFP4jc.js +0 -4
- package/dist/studio/assets/library-BDaeqF3R.js +0 -1
- package/dist/studio/assets/settings-Dk_TSyaG.js +0 -1
- package/dist/studio/assets/state-CwX0hAy0.js +0 -2
- package/dist/studio/assets/toast-DV2oi8vF.css +0 -1
- package/dist/studio/assets/toast-DdGXRXQH.js +0 -72
- package/dist/studio/assets/view-B4EKYrze.js +0 -1
package/dist/page/mux-entry.js
CHANGED
|
@@ -16581,7 +16581,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16581
16581
|
external_exports.object({ text: external_exports.string().min(1) }).strict(),
|
|
16582
16582
|
external_exports.object({ treePath: external_exports.string().min(1) }).strict()
|
|
16583
16583
|
]);
|
|
16584
|
-
var RecordedSchema = external_exports.string().min(1).optional();
|
|
16584
|
+
var RecordedSchema = external_exports.string().min(1).optional().describe("Written by Demoman when the script was derived from a video; pairs the step with the action it came from. Leave it as it is");
|
|
16585
16585
|
var DragSpotSchema = external_exports.object({ x: external_exports.number().min(0).max(1), y: external_exports.number().min(0).max(1) }).strict();
|
|
16586
16586
|
var DragFromSchema = external_exports.object({ on: ScriptTargetSchema, at: DragSpotSchema.optional() }).strict();
|
|
16587
16587
|
var DragToSchema = external_exports.union([
|
|
@@ -16603,10 +16603,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16603
16603
|
var ScriptStepSchema = external_exports.discriminatedUnion("do", [
|
|
16604
16604
|
external_exports.object({
|
|
16605
16605
|
do: external_exports.literal("click"),
|
|
16606
|
-
on: ScriptTargetSchema,
|
|
16606
|
+
on: ScriptTargetSchema.describe("The element to click"),
|
|
16607
16607
|
/** Where in the target's box to click (its centre if absent). */
|
|
16608
|
-
at: DragSpotSchema.optional(),
|
|
16609
|
-
zoom: ZoomIntentSchema.optional(),
|
|
16608
|
+
at: DragSpotSchema.optional().describe("Where in the element to click, as fractions of its width and height; its centre if absent"),
|
|
16609
|
+
zoom: ZoomIntentSchema.optional().describe("The camera's zoom at this click: `false` for none, or `{ scale }` over 1 and at most 2.5. Absent leaves it to the camera"),
|
|
16610
16610
|
/**
|
|
16611
16611
|
* The recorded action this step was derived from (`scriptFromTake` writes
|
|
16612
16612
|
* it). How the recording layer pairs a run's step with the author's —
|
|
@@ -16614,21 +16614,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16614
16614
|
* list would go stale the moment it did. Absent on a step the agent wrote.
|
|
16615
16615
|
*/
|
|
16616
16616
|
recorded: RecordedSchema
|
|
16617
|
-
}).strict(),
|
|
16617
|
+
}).strict().describe("Click an element"),
|
|
16618
16618
|
external_exports.object({
|
|
16619
16619
|
do: external_exports.literal("type"),
|
|
16620
|
-
into: ScriptTargetSchema,
|
|
16621
|
-
text: external_exports.string(),
|
|
16620
|
+
into: ScriptTargetSchema.describe("The field to type into"),
|
|
16621
|
+
text: external_exports.string().describe("What to type: a demo value, never a real secret"),
|
|
16622
16622
|
recorded: RecordedSchema
|
|
16623
|
-
}).strict(),
|
|
16623
|
+
}).strict().describe("Type text into a field"),
|
|
16624
16624
|
external_exports.object({
|
|
16625
16625
|
do: external_exports.literal("hover"),
|
|
16626
|
-
on: ScriptTargetSchema,
|
|
16626
|
+
on: ScriptTargetSchema.describe("The element to rest the pointer on"),
|
|
16627
16627
|
recorded: RecordedSchema
|
|
16628
|
-
}).strict(),
|
|
16628
|
+
}).strict().describe("Rest the pointer on an element"),
|
|
16629
16629
|
external_exports.object({
|
|
16630
16630
|
do: external_exports.literal("scrollTo"),
|
|
16631
|
-
on: ScriptTargetSchema,
|
|
16631
|
+
on: ScriptTargetSchema.describe("The element to scroll into view"),
|
|
16632
16632
|
recorded: RecordedSchema,
|
|
16633
16633
|
/**
|
|
16634
16634
|
* Where the scroll leaves its element: `top` is the viewport y, in CSS
|
|
@@ -16645,28 +16645,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16645
16645
|
* only an element asks for. A `top` that would leave the element off
|
|
16646
16646
|
* screen centres too, and the run reports `scrollLandingOffscreen`.
|
|
16647
16647
|
*/
|
|
16648
|
-
landing: external_exports.object({ top: external_exports.number().finite() }).strict().optional()
|
|
16649
|
-
}).strict(),
|
|
16648
|
+
landing: external_exports.object({ top: external_exports.number().finite() }).strict().optional().describe("Where the element's top edge stops, in CSS px from the top of the window. Absent centres it")
|
|
16649
|
+
}).strict().describe("Scroll an element into view"),
|
|
16650
16650
|
external_exports.object({
|
|
16651
16651
|
do: external_exports.literal("waitFor"),
|
|
16652
|
-
on: ScriptTargetSchema,
|
|
16653
|
-
until: external_exports.enum(["visible", "hidden"]),
|
|
16652
|
+
on: ScriptTargetSchema.describe("The element to wait for"),
|
|
16653
|
+
until: external_exports.enum(["visible", "hidden"]).describe("Wait until it shows, or until it goes"),
|
|
16654
16654
|
recorded: RecordedSchema
|
|
16655
|
-
}).strict(),
|
|
16655
|
+
}).strict().describe("Wait for an element to show or go"),
|
|
16656
16656
|
external_exports.object({
|
|
16657
16657
|
do: external_exports.literal("drag"),
|
|
16658
|
-
from: DragFromSchema,
|
|
16659
|
-
to: DragToSchema,
|
|
16660
|
-
zoom: ZoomIntentSchema.optional(),
|
|
16658
|
+
from: DragFromSchema.describe("Where the drag presses: `{ on, at? }`, an element and a spot in it"),
|
|
16659
|
+
to: DragToSchema.describe("Where it lets go: `{ on, at? }` as `from`, or `{ by: { x, y } }` in CSS px from the start"),
|
|
16660
|
+
zoom: ZoomIntentSchema.optional().describe("The camera's zoom at this drag, as on `click`"),
|
|
16661
16661
|
recorded: RecordedSchema
|
|
16662
|
-
}).strict(),
|
|
16662
|
+
}).strict().describe("Press, move and let go"),
|
|
16663
16663
|
external_exports.object({
|
|
16664
16664
|
do: external_exports.literal("press"),
|
|
16665
|
-
key: external_exports.enum(PRESS_KEYS),
|
|
16665
|
+
key: external_exports.enum(PRESS_KEYS).describe("The key to press"),
|
|
16666
16666
|
recorded: RecordedSchema
|
|
16667
|
-
}).strict(),
|
|
16668
|
-
external_exports.object({
|
|
16669
|
-
|
|
16667
|
+
}).strict().describe("Press a key"),
|
|
16668
|
+
external_exports.object({
|
|
16669
|
+
do: external_exports.literal("waitForLoad"),
|
|
16670
|
+
recorded: RecordedSchema
|
|
16671
|
+
}).strict().describe("Wait for the page to finish loading"),
|
|
16672
|
+
external_exports.object({
|
|
16673
|
+
do: external_exports.literal("pause"),
|
|
16674
|
+
ms: external_exports.number().positive().describe("How long, in milliseconds")
|
|
16675
|
+
}).strict().describe("Hold still, so the viewer can read. Performs nothing")
|
|
16670
16676
|
]);
|
|
16671
16677
|
var ACTS_ON_THE_PAGE = {
|
|
16672
16678
|
click: true,
|
|
@@ -16724,30 +16730,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16724
16730
|
var laterVersion = (a, b) => b > a ? b : a;
|
|
16725
16731
|
var DemoScriptShape = external_exports.object({
|
|
16726
16732
|
/** Optional: Demoman sets it (see `minimumScriptVersion`); a lower one is raised. */
|
|
16727
|
-
scriptVersion: ScriptVersionSchema.optional(),
|
|
16728
|
-
name: external_exports.string().min(1),
|
|
16729
|
-
target: external_exports.url(),
|
|
16733
|
+
scriptVersion: ScriptVersionSchema.optional().describe("The format's number. Demoman sets it; leave it out"),
|
|
16734
|
+
name: external_exports.string().min(1).describe("The video's name"),
|
|
16735
|
+
target: external_exports.url().describe("The page the run opens first, http or https"),
|
|
16730
16736
|
/** Absent means the run's own window size, recorded into the document. */
|
|
16731
16737
|
viewport: external_exports.object({
|
|
16732
16738
|
width: external_exports.number().int().positive(),
|
|
16733
16739
|
height: external_exports.number().int().positive()
|
|
16734
|
-
}).optional(),
|
|
16740
|
+
}).optional().describe("The window size in CSS px, `{ width, height }`. Absent: Demoman's own window"),
|
|
16735
16741
|
/** A phone or tablet to film as (spec 2026-10-10 §3). Absent: the desktop.
|
|
16736
16742
|
* A device is a viewport, so naming both is refused. */
|
|
16737
|
-
device: DeviceIdSchema.optional(),
|
|
16743
|
+
device: DeviceIdSchema.optional().describe("A phone or tablet to record as, instead of a viewport. See Phone and tablet"),
|
|
16738
16744
|
/** One of the site's accounts in `.demoman/accounts.json` (launch C2).
|
|
16739
16745
|
* Absent: the site's `default`, else the saved manual session. */
|
|
16740
16746
|
account: external_exports.string().regex(ACCOUNT_NAME, {
|
|
16741
16747
|
message: `an account name is ${ACCOUNT_NAME_RULE}`
|
|
16742
|
-
}).optional(),
|
|
16743
|
-
steps: external_exports.array(ScriptStepSchema).min(1),
|
|
16748
|
+
}).optional().describe("A demo account from `.demoman/accounts.json` to sign in as. Absent: the site's default, else your own saved sign-in"),
|
|
16749
|
+
steps: external_exports.array(ScriptStepSchema).min(1).describe("What the run does, in order. At least one step acts on the page"),
|
|
16744
16750
|
/** Cut the film's start and end (`ScriptTrimSchema`). Absent: the whole take. */
|
|
16745
|
-
trim: ScriptTrimSchema.optional(),
|
|
16751
|
+
trim: ScriptTrimSchema.optional().describe("Cut the video's start and end: `{ start: { ms, step? }, end: { ms, step?, after? } }`. Absent: the whole video"),
|
|
16746
16752
|
/**
|
|
16747
16753
|
* The take that steps' `recorded` ids refer to (`scriptFromTake` writes it).
|
|
16748
16754
|
* Absent on a script nobody derived from a recording.
|
|
16749
16755
|
*/
|
|
16750
|
-
recordedFrom: external_exports.string().min(1).optional(),
|
|
16756
|
+
recordedFrom: external_exports.string().min(1).optional().describe("The video a derived script came from. Demoman writes it"),
|
|
16751
16757
|
/**
|
|
16752
16758
|
* The frame's dress. Reuses the document's own schemas so there is one
|
|
16753
16759
|
* vocabulary for branding, cursor and canvas rather than two. Absent means
|
|
@@ -16774,7 +16780,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16774
16780
|
motion: MotionSchema.optional()
|
|
16775
16781
|
}).strict().refine((look) => look.branding === void 0 || look.kit === void 0, {
|
|
16776
16782
|
message: "name a kit or give a branding, not both"
|
|
16777
|
-
}).optional()
|
|
16783
|
+
}).optional().describe("The frame's look: `kit` (a brand kit by name) or `branding`, plus `cursor`, `canvas` and `motion`. Absent: your default brand kit")
|
|
16778
16784
|
});
|
|
16779
16785
|
var DemoScriptSchema = DemoScriptShape.superRefine((script, ctx) => {
|
|
16780
16786
|
const bg = script.look?.branding?.background;
|
|
@@ -16757,7 +16757,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16757
16757
|
external_exports.object({ text: external_exports.string().min(1) }).strict(),
|
|
16758
16758
|
external_exports.object({ treePath: external_exports.string().min(1) }).strict()
|
|
16759
16759
|
]);
|
|
16760
|
-
var RecordedSchema = external_exports.string().min(1).optional();
|
|
16760
|
+
var RecordedSchema = external_exports.string().min(1).optional().describe("Written by Demoman when the script was derived from a video; pairs the step with the action it came from. Leave it as it is");
|
|
16761
16761
|
var DragSpotSchema = external_exports.object({ x: external_exports.number().min(0).max(1), y: external_exports.number().min(0).max(1) }).strict();
|
|
16762
16762
|
var DragFromSchema = external_exports.object({ on: ScriptTargetSchema, at: DragSpotSchema.optional() }).strict();
|
|
16763
16763
|
var DragToSchema = external_exports.union([
|
|
@@ -16779,10 +16779,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16779
16779
|
var ScriptStepSchema = external_exports.discriminatedUnion("do", [
|
|
16780
16780
|
external_exports.object({
|
|
16781
16781
|
do: external_exports.literal("click"),
|
|
16782
|
-
on: ScriptTargetSchema,
|
|
16782
|
+
on: ScriptTargetSchema.describe("The element to click"),
|
|
16783
16783
|
/** Where in the target's box to click (its centre if absent). */
|
|
16784
|
-
at: DragSpotSchema.optional(),
|
|
16785
|
-
zoom: ZoomIntentSchema.optional(),
|
|
16784
|
+
at: DragSpotSchema.optional().describe("Where in the element to click, as fractions of its width and height; its centre if absent"),
|
|
16785
|
+
zoom: ZoomIntentSchema.optional().describe("The camera's zoom at this click: `false` for none, or `{ scale }` over 1 and at most 2.5. Absent leaves it to the camera"),
|
|
16786
16786
|
/**
|
|
16787
16787
|
* The recorded action this step was derived from (`scriptFromTake` writes
|
|
16788
16788
|
* it). How the recording layer pairs a run's step with the author's —
|
|
@@ -16790,21 +16790,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16790
16790
|
* list would go stale the moment it did. Absent on a step the agent wrote.
|
|
16791
16791
|
*/
|
|
16792
16792
|
recorded: RecordedSchema
|
|
16793
|
-
}).strict(),
|
|
16793
|
+
}).strict().describe("Click an element"),
|
|
16794
16794
|
external_exports.object({
|
|
16795
16795
|
do: external_exports.literal("type"),
|
|
16796
|
-
into: ScriptTargetSchema,
|
|
16797
|
-
text: external_exports.string(),
|
|
16796
|
+
into: ScriptTargetSchema.describe("The field to type into"),
|
|
16797
|
+
text: external_exports.string().describe("What to type: a demo value, never a real secret"),
|
|
16798
16798
|
recorded: RecordedSchema
|
|
16799
|
-
}).strict(),
|
|
16799
|
+
}).strict().describe("Type text into a field"),
|
|
16800
16800
|
external_exports.object({
|
|
16801
16801
|
do: external_exports.literal("hover"),
|
|
16802
|
-
on: ScriptTargetSchema,
|
|
16802
|
+
on: ScriptTargetSchema.describe("The element to rest the pointer on"),
|
|
16803
16803
|
recorded: RecordedSchema
|
|
16804
|
-
}).strict(),
|
|
16804
|
+
}).strict().describe("Rest the pointer on an element"),
|
|
16805
16805
|
external_exports.object({
|
|
16806
16806
|
do: external_exports.literal("scrollTo"),
|
|
16807
|
-
on: ScriptTargetSchema,
|
|
16807
|
+
on: ScriptTargetSchema.describe("The element to scroll into view"),
|
|
16808
16808
|
recorded: RecordedSchema,
|
|
16809
16809
|
/**
|
|
16810
16810
|
* Where the scroll leaves its element: `top` is the viewport y, in CSS
|
|
@@ -16821,28 +16821,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16821
16821
|
* only an element asks for. A `top` that would leave the element off
|
|
16822
16822
|
* screen centres too, and the run reports `scrollLandingOffscreen`.
|
|
16823
16823
|
*/
|
|
16824
|
-
landing: external_exports.object({ top: external_exports.number().finite() }).strict().optional()
|
|
16825
|
-
}).strict(),
|
|
16824
|
+
landing: external_exports.object({ top: external_exports.number().finite() }).strict().optional().describe("Where the element's top edge stops, in CSS px from the top of the window. Absent centres it")
|
|
16825
|
+
}).strict().describe("Scroll an element into view"),
|
|
16826
16826
|
external_exports.object({
|
|
16827
16827
|
do: external_exports.literal("waitFor"),
|
|
16828
|
-
on: ScriptTargetSchema,
|
|
16829
|
-
until: external_exports.enum(["visible", "hidden"]),
|
|
16828
|
+
on: ScriptTargetSchema.describe("The element to wait for"),
|
|
16829
|
+
until: external_exports.enum(["visible", "hidden"]).describe("Wait until it shows, or until it goes"),
|
|
16830
16830
|
recorded: RecordedSchema
|
|
16831
|
-
}).strict(),
|
|
16831
|
+
}).strict().describe("Wait for an element to show or go"),
|
|
16832
16832
|
external_exports.object({
|
|
16833
16833
|
do: external_exports.literal("drag"),
|
|
16834
|
-
from: DragFromSchema,
|
|
16835
|
-
to: DragToSchema,
|
|
16836
|
-
zoom: ZoomIntentSchema.optional(),
|
|
16834
|
+
from: DragFromSchema.describe("Where the drag presses: `{ on, at? }`, an element and a spot in it"),
|
|
16835
|
+
to: DragToSchema.describe("Where it lets go: `{ on, at? }` as `from`, or `{ by: { x, y } }` in CSS px from the start"),
|
|
16836
|
+
zoom: ZoomIntentSchema.optional().describe("The camera's zoom at this drag, as on `click`"),
|
|
16837
16837
|
recorded: RecordedSchema
|
|
16838
|
-
}).strict(),
|
|
16838
|
+
}).strict().describe("Press, move and let go"),
|
|
16839
16839
|
external_exports.object({
|
|
16840
16840
|
do: external_exports.literal("press"),
|
|
16841
|
-
key: external_exports.enum(PRESS_KEYS),
|
|
16841
|
+
key: external_exports.enum(PRESS_KEYS).describe("The key to press"),
|
|
16842
16842
|
recorded: RecordedSchema
|
|
16843
|
-
}).strict(),
|
|
16844
|
-
external_exports.object({
|
|
16845
|
-
|
|
16843
|
+
}).strict().describe("Press a key"),
|
|
16844
|
+
external_exports.object({
|
|
16845
|
+
do: external_exports.literal("waitForLoad"),
|
|
16846
|
+
recorded: RecordedSchema
|
|
16847
|
+
}).strict().describe("Wait for the page to finish loading"),
|
|
16848
|
+
external_exports.object({
|
|
16849
|
+
do: external_exports.literal("pause"),
|
|
16850
|
+
ms: external_exports.number().positive().describe("How long, in milliseconds")
|
|
16851
|
+
}).strict().describe("Hold still, so the viewer can read. Performs nothing")
|
|
16846
16852
|
]);
|
|
16847
16853
|
var ACTS_ON_THE_PAGE = {
|
|
16848
16854
|
click: true,
|
|
@@ -16900,30 +16906,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16900
16906
|
var laterVersion = (a, b) => b > a ? b : a;
|
|
16901
16907
|
var DemoScriptShape = external_exports.object({
|
|
16902
16908
|
/** Optional: Demoman sets it (see `minimumScriptVersion`); a lower one is raised. */
|
|
16903
|
-
scriptVersion: ScriptVersionSchema.optional(),
|
|
16904
|
-
name: external_exports.string().min(1),
|
|
16905
|
-
target: external_exports.url(),
|
|
16909
|
+
scriptVersion: ScriptVersionSchema.optional().describe("The format's number. Demoman sets it; leave it out"),
|
|
16910
|
+
name: external_exports.string().min(1).describe("The video's name"),
|
|
16911
|
+
target: external_exports.url().describe("The page the run opens first, http or https"),
|
|
16906
16912
|
/** Absent means the run's own window size, recorded into the document. */
|
|
16907
16913
|
viewport: external_exports.object({
|
|
16908
16914
|
width: external_exports.number().int().positive(),
|
|
16909
16915
|
height: external_exports.number().int().positive()
|
|
16910
|
-
}).optional(),
|
|
16916
|
+
}).optional().describe("The window size in CSS px, `{ width, height }`. Absent: Demoman's own window"),
|
|
16911
16917
|
/** A phone or tablet to film as (spec 2026-10-10 §3). Absent: the desktop.
|
|
16912
16918
|
* A device is a viewport, so naming both is refused. */
|
|
16913
|
-
device: DeviceIdSchema.optional(),
|
|
16919
|
+
device: DeviceIdSchema.optional().describe("A phone or tablet to record as, instead of a viewport. See Phone and tablet"),
|
|
16914
16920
|
/** One of the site's accounts in `.demoman/accounts.json` (launch C2).
|
|
16915
16921
|
* Absent: the site's `default`, else the saved manual session. */
|
|
16916
16922
|
account: external_exports.string().regex(ACCOUNT_NAME, {
|
|
16917
16923
|
message: `an account name is ${ACCOUNT_NAME_RULE}`
|
|
16918
|
-
}).optional(),
|
|
16919
|
-
steps: external_exports.array(ScriptStepSchema).min(1),
|
|
16924
|
+
}).optional().describe("A demo account from `.demoman/accounts.json` to sign in as. Absent: the site's default, else your own saved sign-in"),
|
|
16925
|
+
steps: external_exports.array(ScriptStepSchema).min(1).describe("What the run does, in order. At least one step acts on the page"),
|
|
16920
16926
|
/** Cut the film's start and end (`ScriptTrimSchema`). Absent: the whole take. */
|
|
16921
|
-
trim: ScriptTrimSchema.optional(),
|
|
16927
|
+
trim: ScriptTrimSchema.optional().describe("Cut the video's start and end: `{ start: { ms, step? }, end: { ms, step?, after? } }`. Absent: the whole video"),
|
|
16922
16928
|
/**
|
|
16923
16929
|
* The take that steps' `recorded` ids refer to (`scriptFromTake` writes it).
|
|
16924
16930
|
* Absent on a script nobody derived from a recording.
|
|
16925
16931
|
*/
|
|
16926
|
-
recordedFrom: external_exports.string().min(1).optional(),
|
|
16932
|
+
recordedFrom: external_exports.string().min(1).optional().describe("The video a derived script came from. Demoman writes it"),
|
|
16927
16933
|
/**
|
|
16928
16934
|
* The frame's dress. Reuses the document's own schemas so there is one
|
|
16929
16935
|
* vocabulary for branding, cursor and canvas rather than two. Absent means
|
|
@@ -16950,7 +16956,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16950
16956
|
motion: MotionSchema.optional()
|
|
16951
16957
|
}).strict().refine((look) => look.branding === void 0 || look.kit === void 0, {
|
|
16952
16958
|
message: "name a kit or give a branding, not both"
|
|
16953
|
-
}).optional()
|
|
16959
|
+
}).optional().describe("The frame's look: `kit` (a brand kit by name) or `branding`, plus `cursor`, `canvas` and `motion`. Absent: your default brand kit")
|
|
16954
16960
|
});
|
|
16955
16961
|
var DemoScriptSchema = DemoScriptShape.superRefine((script, ctx) => {
|
|
16956
16962
|
const bg = script.look?.branding?.background;
|
|
@@ -18342,7 +18348,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18342
18348
|
}
|
|
18343
18349
|
return departures[aimed]?.center ?? landing.center;
|
|
18344
18350
|
};
|
|
18345
|
-
|
|
18351
|
+
let holding = false;
|
|
18352
|
+
let rest = null;
|
|
18353
|
+
const targetAt = (t) => {
|
|
18354
|
+
if (held(t)) {
|
|
18355
|
+
holding = true;
|
|
18356
|
+
return aimAt(t);
|
|
18357
|
+
}
|
|
18358
|
+
const hand = cursorAt?.(t) ?? null;
|
|
18359
|
+
if (holding) {
|
|
18360
|
+
holding = false;
|
|
18361
|
+
rest = hand;
|
|
18362
|
+
}
|
|
18363
|
+
if (hand !== null && rest !== null && Math.hypot(hand.x - rest.x, hand.y - rest.y) < CURSOR_MOTION_EPSILON_PX) {
|
|
18364
|
+
return aimAt(t);
|
|
18365
|
+
}
|
|
18366
|
+
rest = null;
|
|
18367
|
+
return hand ?? aimAt(t);
|
|
18368
|
+
};
|
|
18346
18369
|
let x = landing.center;
|
|
18347
18370
|
let v = { x: 0, y: 0 };
|
|
18348
18371
|
const centers = [x];
|
package/dist/recipe.md
CHANGED
|
@@ -502,7 +502,7 @@ Studio exports go to `~/Downloads`.
|
|
|
502
502
|
| `partial` | `attach`² | `gh` failed but the video is on the PR; do not post again. |
|
|
503
503
|
| `unconfirmed` | `attach`² | Unknown what landed. Do not post again; tell the user to look at the PR. |
|
|
504
504
|
| `copyFailed` | `attach`² | The video could not be copied; nothing posted. Hand the user the capped export's file. |
|
|
505
|
-
| `windowDidNotOpen` | `snapshot`; `run`¹; `studio` |
|
|
505
|
+
| `windowDidNotOpen` | `snapshot`; `run`¹; `studio` | Retry once, unless detail says no display. |
|
|
506
506
|
| `studioDidNotStart` | `studio` | The Studio did not start; `detail` quotes the end of `~/.demoman/studio.log`. Tell the user, quoting it. |
|
|
507
507
|
| `alreadyRunning` | `snapshot`, `probe`, `run`, `derive` | A run, probe, snapshot or export is in progress. Call `report(id)` on it; retry when it settles. |
|
|
508
508
|
| `busy` | `export`¹ | A run, probe or snapshot is in progress. `report(id)` it first. |
|
|
@@ -542,14 +542,14 @@ Studio exports go to `~/Downloads`.
|
|
|
542
542
|
| `pageWentElsewhere`, `unperformableStep` | `run`² | The app left the page unasked (sign-in expired, or a missing `waitForLoad`); or the step asks the impossible. |
|
|
543
543
|
| `dragEndOutOfView`, `dragNoDistance` | `run`² | A drag's end was off screen (a drag cannot scroll), or on its start. Fix the script. |
|
|
544
544
|
| `clickNotDelivered` | `run`² | The browser put a click elsewhere than sent; `stopped.detail` says where. Not the script's fault: run again (it counts); tell the user if it repeats. |
|
|
545
|
-
| `signedOut` | `run`² | The app sent this browser to
|
|
545
|
+
| `signedOut` | `run`² | The app sent this browser to sign-in. Nothing kept; not a script fault. Give the user the command in `stopped.detail`; run only after they ran it. As an account there is no command: the detail says whether Demoman signed in again; repeat only if it does. |
|
|
546
546
|
| `windowClosed` | `run`² | `--headed` only: the window closed mid-run; the script is fine. Ask the user to leave it open; run once more. In an export it answers `renderFailed`; export again. |
|
|
547
547
|
| `pageDidNotLoad` | `snapshot`, `probe` stop | The url did not load. Ask whether the app runs at that address; spend no run. |
|
|
548
|
-
| `pageSilent` | `snapshot` | The page never answered. Call once more; if again, the page blocked Demoman
|
|
549
|
-
| `pageFaulted`, `snapshotThrew`, `probeThrew` | `snapshot`, `probe` | The page
|
|
550
|
-
| `portFailure` | `probe` | The browser gave way
|
|
551
|
-
| `notInRepo`, `outsideRepo`, `outputTaken`, `logoUnreadable`, `handSignIn`, `cannotRefilm`, `keepRefused`, `exportFailed`, `repoFlowUnwritable` | `add`, `ci` | `detail
|
|
552
|
-
| `appInvalid`, `appOriginMismatch`, `appUnknown`, `appHoles`, `appInstallFailed`, `appStartExited`, `appNeverAnswered`, `appServiceFailed`, `appPortTaken`, `appDockerMissing`, `checkoutFailed`, `noRepoFlow`, `refreshFailed`, `checkThrew`, `alreadySetUp`, `setupPrOpen`, `setupBranchExists`, `noRepoFlows`, `noRelease`, `noDeployment`, `routeRefused`, `githubUnreadable`, `noSetupBranch`, `secretsUnknown`, `secretsUnreadable`, `workflowRefused`, `filesUnreadable`, `setupUnreadable`, `secretRefused`, `actionsRefused`, `actionsUnknown`, `prFailed` | `ci` | `detail
|
|
548
|
+
| `pageSilent` | `snapshot` | The page never answered. Call once more; if again, the page blocked Demoman: tell the user. |
|
|
549
|
+
| `pageFaulted`, `snapshotThrew`, `probeThrew` | `snapshot`, `probe` | The page threw, or a fault; quote `detail`. |
|
|
550
|
+
| `portFailure` | `probe` | The browser gave way, not the script. Probe once more; quote `detail` if it repeats. |
|
|
551
|
+
| `notInRepo`, `outsideRepo`, `outputTaken`, `logoUnreadable`, `handSignIn`, `cannotRefilm`, `keepRefused`, `exportFailed`, `repoFlowUnwritable` | `add`, `ci` | `detail`: what was written, the fix. |
|
|
552
|
+
| `appInvalid`, `appOriginMismatch`, `appUnknown`, `appHoles`, `appInstallFailed`, `appStartExited`, `appNeverAnswered`, `appServiceFailed`, `appPortTaken`, `appDockerMissing`, `appNowInFuture`, `appNowTooOld`, `appNowNotPinned`, `checkoutFailed`, `noRepoFlow`, `refreshFailed`, `checkThrew`, `alreadySetUp`, `setupPrOpen`, `setupBranchExists`, `noRepoFlows`, `noRelease`, `noDeployment`, `routeRefused`, `githubUnreadable`, `noSetupBranch`, `secretsUnknown`, `secretsUnreadable`, `workflowRefused`, `filesUnreadable`, `setupUnreadable`, `secretRefused`, `actionsRefused`, `actionsUnknown`, `prFailed` | `ci` | `detail`: what was done, the fix. |
|
|
553
553
|
|
|
554
554
|
## 8. Repo flows and CI
|
|
555
555
|
|