@imgly/codesign-mcp 0.8.1-next.20261130091621.ge97e02f → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/dist/cli/license.js +1 -1
  2. package/dist/runtime/codesign-shim/codesign-router/release-build.generated.mjs +1 -1
  3. package/node_modules/@imgly/codesign-acp/package.json +2 -2
  4. package/node_modules/@imgly/codesign-agent/package.json +1 -1
  5. package/node_modules/@imgly/codesign-billing/package.json +1 -1
  6. package/node_modules/@imgly/codesign-router/dist/release-build.generated.d.ts +1 -1
  7. package/node_modules/@imgly/codesign-router/dist/release-build.generated.d.ts.map +1 -1
  8. package/node_modules/@imgly/codesign-router/dist/release-build.generated.js +1 -1
  9. package/node_modules/@imgly/codesign-router/dist/release-build.generated.js.map +1 -1
  10. package/node_modules/@imgly/codesign-router/package.json +1 -1
  11. package/node_modules/@imgly/codesign-sdk/dist/assets/inline.generated.js +2 -2
  12. package/node_modules/@imgly/codesign-sdk/dist/sdk-version.generated.js +1 -1
  13. package/node_modules/@imgly/codesign-sdk/dist/session/remote.js +71 -16
  14. package/node_modules/@imgly/codesign-sdk/dist/session/wire.d.ts +1 -1
  15. package/node_modules/@imgly/codesign-sdk/dist/session/wire.js +1 -1
  16. package/node_modules/@imgly/codesign-sdk/package.json +2 -2
  17. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.d.ts +2 -2
  18. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.d.ts.map +1 -1
  19. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.js +2 -2
  20. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.js.map +1 -1
  21. package/node_modules/@imgly/codesign-server/package.json +3 -3
  22. package/node_modules/@imgly/design-lint/package.json +1 -1
  23. package/package.json +7 -7
@@ -12,7 +12,7 @@ export const INLINE_ASSETS = {
12
12
  "docs/api/signatures-extended.d.ts": "// Editor-UI machinery moved out of signatures.d.ts: selection,\n// highlighting, hover, zoom/camera, undo-redo history, scopes,\n// edit-mode/cursor state, asset-source plumbing. Same engine, same\n// classes — these members are for interactive editors, not design\n// generation. Search this file for the member you need.\n// ---- VariableAPI (editor-UI members) ----\n setString(key: string, value: string, options?: VariableOptions | null): void;\n getString(key: string, options?: VariableOptions | null): string;\n setColor(key: string, value: Color, options?: VariableOptions | null): void;\n getColor(key: string, options?: VariableOptions | null): Color;\n setTypeface(key: string, typeface: Typeface, options?: VariableOptions | null): void;\n getTypeface(key: string, options?: VariableOptions | null): Typeface;\n getType(key: string, options?: VariableOptions | null): VariableType;\n// ---- BlockAPI (editor-UI members) ----\n create(type: DesignBlockType): DesignBlockId;\n createFill(type: FillType): DesignBlockId;\n createShape(type: ShapeType): DesignBlockId;\n createEffect(type: EffectType): DesignBlockId;\n createMask(): DesignBlockId;\n createBlur(type: BlurType): DesignBlockId;\n createAnimation(type: AnimationType): DesignBlockId;\n duplicate(block: DesignBlockId, attachToParent?: boolean): DesignBlockId;\n destroy(block: DesignBlockId): void;\n findAllPlaceholders(): DesignBlockId[];\n findByName(name: string): DesignBlockId[];\n findByType(type: ObjectType): DesignBlockId[];\n findAllSelected(): DesignBlockId[];\n getParent(block: DesignBlockId): DesignBlockId | null;\n setTransformParent(block: DesignBlockId, parent: DesignBlockId | null): void;\n getTransformParent(block: DesignBlockId): DesignBlockId | null;\n hasTransformAnchor(block: DesignBlockId): boolean;\n hasParent(block: DesignBlockId): boolean;\n getChildren(block: DesignBlockId): DesignBlockId[];\n insertChild(parent: DesignBlockId, child: DesignBlockId, index: number): void;\n appendChild(parent: DesignBlockId, child: DesignBlockId): void;\n getType(block: DesignBlockId): ObjectTypeLonghand;\n getKind(block: DesignBlockId): string;\n setKind(block: DesignBlockId, kind: string): void;\n getName(block: DesignBlockId): string;\n setName(block: DesignBlockId, name: string): void;\n getUUID(block: DesignBlockId): string;\n getBool(block: DesignBlockId, property: BoolPropertyName): boolean;\n setBool(block: DesignBlockId, property: BoolPropertyName, value: boolean): void;\n getInt(block: DesignBlockId, property: IntPropertyName): number;\n setInt(block: DesignBlockId, property: IntPropertyName, value: number): void;\n getFloat(block: DesignBlockId, property: FloatPropertyName): number;\n setFloat(block: DesignBlockId, property: FloatPropertyName, value: number): void;\n getDouble(block: DesignBlockId, property: DoublePropertyName): number;\n setDouble(block: DesignBlockId, property: DoublePropertyName, value: number): void;\n getVec2(block: DesignBlockId, property: Vec2PropertyName): Vec2;\n setVec2(block: DesignBlockId, property: Vec2PropertyName, value: Vec2): void;\n getString(block: DesignBlockId, property: StringPropertyName): string;\n setString(block: DesignBlockId, property: StringPropertyName, value: string): void;\n getColor(block: DesignBlockId, property: ColorPropertyName): Color;\n setColor(block: DesignBlockId, property: ColorPropertyName, value: Color): void;\n getEnum<T extends keyof BlockEnumType>(id: DesignBlockId, property: T): BlockEnumType[T];\n getEnum(id: DesignBlockId, property: string): string;\n setEnum<T extends keyof BlockEnumType>(id: DesignBlockId, property: T, value: BlockEnumType[T]): void;\n setEnum(id: DesignBlockId, property: string, value: string): void;\n getPositionX(block: DesignBlockId): number;\n setPositionX(block: DesignBlockId, value: number): void;\n getPositionY(block: DesignBlockId): number;\n setPositionY(block: DesignBlockId, value: number): void;\n getPositionXMode(block: DesignBlockId): PositionXMode;\n setPositionXMode(block: DesignBlockId, mode: PositionXMode): void;\n getPositionYMode(block: DesignBlockId): PositionYMode;\n setPositionYMode(block: DesignBlockId, mode: PositionYMode): void;\n getWidth(block: DesignBlockId): number;\n setWidth(block: DesignBlockId, value: number, maintainCrop?: boolean): void;\n getWidthMode(block: DesignBlockId): WidthMode;\n setWidthMode(block: DesignBlockId, mode: WidthMode): void;\n getHeight(block: DesignBlockId): number;\n setHeight(block: DesignBlockId, value: number, maintainCrop?: boolean): void;\n getHeightMode(block: DesignBlockId): HeightMode;\n setHeightMode(block: DesignBlockId, mode: HeightMode): void;\n getRotation(block: DesignBlockId): number;\n setRotation(block: DesignBlockId, value: number): void;\n getFlipHorizontal(block: DesignBlockId): boolean;\n getFlipVertical(block: DesignBlockId): boolean;\n setFlipHorizontal(block: DesignBlockId, flip: boolean): void;\n setFlipVertical(block: DesignBlockId, flip: boolean): void;\n setPosition(block: DesignBlockId, x: number, y: number, options?: {\n positionMode?: PositionMode;\n }): void;\n setSize(block: DesignBlockId, width: number, height: number, options?: {\n maintainCrop?: boolean;\n sizeMode?: SizeMode;\n }): void;\n scale(block: DesignBlockId, scale: number, anchorX?: number, anchorY?: number): void;\n fillParent(block: DesignBlockId): void;\n resizeContentAware(blocks: DesignBlockId[], width: number, height: number): void;\n getGlobalBoundingBoxX(block: DesignBlockId): number;\n getGlobalBoundingBoxY(block: DesignBlockId): number;\n getGlobalBoundingBoxWidth(block: DesignBlockId): number;\n getGlobalBoundingBoxHeight(block: DesignBlockId): number;\n supportsFill(block: DesignBlockId): boolean;\n getFill(block: DesignBlockId): DesignBlockId;\n setFill(block: DesignBlockId, fill: DesignBlockId): void;\n getStrokeFill(block: DesignBlockId): DesignBlockId | null;\n setStrokeFill(block: DesignBlockId, fill: DesignBlockId | null): void;\n isFillEnabled(block: DesignBlockId): boolean;\n setFillEnabled(block: DesignBlockId, enabled: boolean): void;\n getFillSolidColor(block: DesignBlockId): RGBA;\n setFillSolidColor(block: DesignBlockId, r: number, g: number, b: number, a?: number): void;\n getGradientColorStops(block: DesignBlockId, property: string): GradientColorStop[];\n setGradientColorStops(block: DesignBlockId, property: string, stops: GradientColorStop[]): void;\n supportsStroke(block: DesignBlockId): boolean;\n isStrokeEnabled(block: DesignBlockId): boolean;\n setStrokeEnabled(block: DesignBlockId, enabled: boolean): void;\n getStrokeColor(block: DesignBlockId): Color;\n setStrokeColor(block: DesignBlockId, color: Color): void;\n getStrokeWidth(block: DesignBlockId): number;\n setStrokeWidth(block: DesignBlockId, width: number): void;\n getStrokeStyle(block: DesignBlockId): StrokeStyle;\n setStrokeStyle(block: DesignBlockId, style: StrokeStyle): void;\n getStrokePosition(block: DesignBlockId): StrokePosition;\n setStrokePosition(block: DesignBlockId, position: StrokePosition): void;\n getStrokeCornerGeometry(block: DesignBlockId): StrokeCornerGeometry;\n setStrokeCornerGeometry(block: DesignBlockId, geometry: StrokeCornerGeometry): void;\n getStrokeStartCap(block: DesignBlockId): StrokeCap;\n setStrokeStartCap(block: DesignBlockId, cap: StrokeCap): void;\n getStrokeEndCap(block: DesignBlockId): StrokeCap;\n setStrokeEndCap(block: DesignBlockId, cap: StrokeCap): void;\n getStrokeDashStartCap(block: DesignBlockId): StrokeCap;\n setStrokeDashStartCap(block: DesignBlockId, cap: StrokeCap): void;\n getStrokeDashEndCap(block: DesignBlockId): StrokeCap;\n setStrokeDashEndCap(block: DesignBlockId, cap: StrokeCap): void;\n getStrokeDashArray(block: DesignBlockId): number[];\n setStrokeDashArray(block: DesignBlockId, dashArray: number[]): void;\n getStrokeDashOffset(block: DesignBlockId): number;\n setStrokeDashOffset(block: DesignBlockId, dashOffset: number): void;\n supportsEffects(block: DesignBlockId): boolean;\n getEffects(block: DesignBlockId): DesignBlockId[];\n appendEffect(block: DesignBlockId, effect: DesignBlockId): void;\n insertEffect(block: DesignBlockId, effect: DesignBlockId, index: number): void;\n removeEffect(block: DesignBlockId, index: number): void;\n createTextAnimator(): DesignBlockId;\n supportsTextAnimators(block: DesignBlockId): boolean;\n getTextAnimators(block: DesignBlockId): DesignBlockId[];\n appendTextAnimator(block: DesignBlockId, animator: DesignBlockId): void;\n insertTextAnimator(block: DesignBlockId, animator: DesignBlockId, index: number): void;\n removeTextAnimator(block: DesignBlockId, index: number): void;\n createModifier(type: ModifierType): DesignBlockId;\n supportsModifiers(block: DesignBlockId): boolean;\n getModifiers(block: DesignBlockId): DesignBlockId[];\n appendModifier(block: DesignBlockId, modifier: DesignBlockId): void;\n insertModifier(block: DesignBlockId, modifier: DesignBlockId, index: number): void;\n supportsMasks(block: DesignBlockId): boolean;\n getMasks(block: DesignBlockId): DesignBlockId[];\n appendMask(block: DesignBlockId, mask: DesignBlockId): void;\n insertMask(block: DesignBlockId, mask: DesignBlockId, index: number): void;\n removeMask(block: DesignBlockId, index: number): void;\n setEffectEnabled(effect: DesignBlockId, enabled: boolean): void;\n setEffectSource(effect: DesignBlockId, source: DesignBlockId | null): void;\n getEffectSource(effect: DesignBlockId): DesignBlockId | null;\n supportsBlur(block: DesignBlockId): boolean;\n getBlur(block: DesignBlockId): DesignBlockId;\n setBlur(block: DesignBlockId, blur: DesignBlockId): void;\n isBlurEnabled(block: DesignBlockId): boolean;\n setBlurEnabled(block: DesignBlockId, enabled: boolean): void;\n supportsShape(block: DesignBlockId): boolean;\n getShape(block: DesignBlockId): DesignBlockId;\n setShape(block: DesignBlockId, shape: DesignBlockId): void;\n getSubshapes(block: DesignBlockId): DesignBlockId[];\n insertSubshape(block: DesignBlockId, subshape: DesignBlockId, index: number): void;\n appendSubshape(block: DesignBlockId, subshape: DesignBlockId): void;\n supportsAnimation(block: DesignBlockId): boolean;\n getInAnimation(block: DesignBlockId): DesignBlockId;\n setInAnimation(block: DesignBlockId, animation: DesignBlockId): void;\n getOutAnimation(block: DesignBlockId): DesignBlockId;\n setOutAnimation(block: DesignBlockId, animation: DesignBlockId): void;\n getLoopAnimation(block: DesignBlockId): DesignBlockId;\n setLoopAnimation(block: DesignBlockId, animation: DesignBlockId): void;\n createTransition(type: TransitionType): DesignBlockId;\n supportsTransition(block: DesignBlockId): boolean;\n getTransition(block: DesignBlockId): DesignBlockId;\n setTransition(block: DesignBlockId, transition: DesignBlockId): void;\n removeTransition(block: DesignBlockId): void;\n supportsContentFillMode(block: DesignBlockId): boolean;\n getContentFillMode(block: DesignBlockId): ContentFillMode;\n setContentFillMode(block: DesignBlockId, mode: ContentFillMode): void;\n setContentFillHorizontalAlignment(block: DesignBlockId, alignment: HorizontalContentFillAlignment): void;\n getContentFillHorizontalAlignment(block: DesignBlockId): HorizontalContentFillAlignment;\n setContentFillVerticalAlignment(block: DesignBlockId, alignment: VerticalContentFillAlignment): void;\n getContentFillVerticalAlignment(block: DesignBlockId): VerticalContentFillAlignment;\n supportsCrop(block: DesignBlockId): boolean;\n resetCrop(block: DesignBlockId): void;\n adjustCropToFillFrame(block: DesignBlockId, minScaleRatio: number): number;\n getCropRotation(block: DesignBlockId): number;\n setCropRotation(block: DesignBlockId, rotation: number): void;\n getCropScaleX(block: DesignBlockId): number;\n setCropScaleX(block: DesignBlockId, scale: number): void;\n getCropScaleY(block: DesignBlockId): number;\n setCropScaleY(block: DesignBlockId, scale: number): void;\n getCropScaleRatio(block: DesignBlockId): number;\n setCropScaleRatio(block: DesignBlockId, ratio: number): void;\n getCropTranslationX(block: DesignBlockId): number;\n setCropTranslationX(block: DesignBlockId, translation: number): void;\n getCropTranslationY(block: DesignBlockId): number;\n setCropTranslationY(block: DesignBlockId, translation: number): void;\n setCropAspectRatioLocked(block: DesignBlockId, locked: boolean): void;\n flipCropHorizontal(block: DesignBlockId): void;\n flipCropVertical(block: DesignBlockId): void;\n supportsDropShadow(block: DesignBlockId): boolean;\n isDropShadowEnabled(block: DesignBlockId): boolean;\n setDropShadowEnabled(block: DesignBlockId, enabled: boolean): void;\n getDropShadowColor(block: DesignBlockId): Color;\n setDropShadowColor(block: DesignBlockId, color: Color): void;\n getDropShadowOffsetX(block: DesignBlockId): number;\n setDropShadowOffsetX(block: DesignBlockId, offset: number): void;\n getDropShadowOffsetY(block: DesignBlockId): number;\n setDropShadowOffsetY(block: DesignBlockId, offset: number): void;\n getDropShadowBlurRadiusX(block: DesignBlockId): number;\n setDropShadowBlurRadiusX(block: DesignBlockId, radius: number): void;\n getDropShadowBlurRadiusY(block: DesignBlockId): number;\n setDropShadowBlurRadiusY(block: DesignBlockId, radius: number): void;\n getDropShadowClip(block: DesignBlockId): boolean;\n setDropShadowClip(block: DesignBlockId, clip: boolean): void;\n supportsBlendMode(block: DesignBlockId): boolean;\n getBlendMode(block: DesignBlockId): BlendMode;\n setBlendMode(block: DesignBlockId, mode: BlendMode): void;\n supportsOpacity(block: DesignBlockId): boolean;\n getOpacity(block: DesignBlockId): number;\n setOpacity(block: DesignBlockId, opacity: number): void;\n isVisible(block: DesignBlockId): boolean;\n setVisible(block: DesignBlockId, visible: boolean): void;\n isClipped(block: DesignBlockId): boolean;\n setClipped(block: DesignBlockId, clipped: boolean): void;\n setKeyframes(block: DesignBlockId, property: string, keyframes: Keyframe$1[], mode?: TrackMode): void;\n getKeyframes(block: DesignBlockId, property: string): Keyframe$1[];\n getKeyframeMode(block: DesignBlockId, property: string): TrackMode;\n removeKeyframes(block: DesignBlockId, property: string): void;\n getAnimatedProperties(block: DesignBlockId): string[];\n isPropertyAnimatable(block: DesignBlockId, property: string): boolean;\n getMatte(block: DesignBlockId): BlockMatte | null;\n setMatte(block: DesignBlockId, source: DesignBlockId | null, mode?: MatteMode): void;\n setSelected(block: DesignBlockId, selected: boolean): void;\n isSelected(block: DesignBlockId): boolean;\n select(block: DesignBlockId): void;\n bringToFront(block: DesignBlockId): void;\n sendToBack(block: DesignBlockId): void;\n bringForward(block: DesignBlockId): void;\n sendBackward(block: DesignBlockId): void;\n setAlwaysOnTop(block: DesignBlockId, enabled: boolean): void;\n setAlwaysOnBottom(block: DesignBlockId, enabled: boolean): void;\n isAlwaysOnTop(block: DesignBlockId): boolean;\n isAlwaysOnBottom(block: DesignBlockId): boolean;\n alignHorizontally(blocks: DesignBlockId[], alignment: TextHorizontalAlignment): void;\n alignVertically(blocks: DesignBlockId[], alignment: TextVerticalAlignment): void;\n isAlignable(blocks: DesignBlockId[]): boolean;\n distributeHorizontally(blocks: DesignBlockId[]): void;\n distributeVertically(blocks: DesignBlockId[]): void;\n isDistributable(blocks: DesignBlockId[]): boolean;\n group(blocks: DesignBlockId[]): DesignBlockId;\n ungroup(group: DesignBlockId): void;\n isGroupable(blocks: DesignBlockId[]): boolean;\n supportsDuration(block: DesignBlockId): boolean;\n getDuration(block: DesignBlockId): number;\n setDuration(block: DesignBlockId, duration: number): void;\n supportsTimeOffset(block: DesignBlockId): boolean;\n getTimeOffset(block: DesignBlockId): number;\n setTimeOffset(block: DesignBlockId, offset: number): void;\n supportsTrim(block: DesignBlockId): boolean;\n getTrimOffset(block: DesignBlockId): number;\n setTrimOffset(block: DesignBlockId, offset: number): void;\n getTrimLength(block: DesignBlockId): number;\n setTrimLength(block: DesignBlockId, length: number): void;\n supportsPlaybackControl(block: DesignBlockId): boolean;\n supportsPlaybackTime(block: DesignBlockId): boolean;\n getPlaybackTime(block: DesignBlockId): number;\n setPlaybackTime(block: DesignBlockId, time: number): void;\n isPlaying(block: DesignBlockId): boolean;\n setPlaying(block: DesignBlockId, playing: boolean): void;\n isLooping(block: DesignBlockId): boolean;\n setLooping(block: DesignBlockId, looping: boolean): void;\n getPlaybackSpeed(block: DesignBlockId): number;\n setPlaybackSpeed(block: DesignBlockId, speed: number): void;\n isMuted(block: DesignBlockId): boolean;\n setMuted(block: DesignBlockId, muted: boolean): void;\n getVolume(block: DesignBlockId): number;\n setVolume(block: DesignBlockId, volume: number): void;\n isSoloPlaybackEnabled(block: DesignBlockId): boolean;\n setSoloPlaybackEnabled(block: DesignBlockId, enabled: boolean): void;\n isTransformLocked(block: DesignBlockId): boolean;\n setTransformLocked(block: DesignBlockId, locked: boolean): void;\n isIncludedInExport(block: DesignBlockId): boolean;\n setIncludedInExport(block: DesignBlockId, included: boolean): void;\n isPlaceholderEnabled(block: DesignBlockId): boolean;\n setPlaceholderEnabled(block: DesignBlockId, enabled: boolean): void;\n supportsPlaceholderBehavior(block: DesignBlockId): boolean;\n isPlaceholderBehaviorEnabled(block: DesignBlockId): boolean;\n setPlaceholderBehaviorEnabled(block: DesignBlockId, enabled: boolean): void;\n supportsPlaceholderControls(block: DesignBlockId): boolean;\n setPlaceholderControlsOverlayEnabled(block: DesignBlockId, enabled: boolean): void;\n setPlaceholderControlsButtonEnabled(block: DesignBlockId, enabled: boolean): void;\n supportsBackgroundColor(block: DesignBlockId): boolean;\n isBackgroundColorEnabled(block: DesignBlockId): boolean;\n setBackgroundColorEnabled(block: DesignBlockId, enabled: boolean): void;\n hasMetadata(block: DesignBlockId, key: string): boolean;\n getMetadata(block: DesignBlockId, key: string): string;\n setMetadata(block: DesignBlockId, key: string, value: string): void;\n removeMetadata(block: DesignBlockId, key: string): void;\n findAllMetadata(block: DesignBlockId): string[];\n replaceText(block: DesignBlockId, text: string, from?: number, to?: number): void;\n getTextFontSizes(block: DesignBlockId, options?: TextFontSizeOptions): number[];\n setTextFontSize(block: DesignBlockId, size: number, options?: TextFontSizeOptions): void;\n getTextFontStyles(block: DesignBlockId, from?: number, to?: number): FontStyle[];\n setTextFontStyle(block: DesignBlockId, style: FontStyle, from?: number, to?: number): void;\n getTextFontWeights(block: DesignBlockId, from?: number, to?: number): FontWeight[];\n setTextFontWeight(block: DesignBlockId, weight: FontWeight, from?: number, to?: number): void;\n getTextColors(block: DesignBlockId, from?: number, to?: number): Color[];\n setTextColor(block: DesignBlockId, color: Color, from?: number, to?: number): void;\n getTextCases(block: DesignBlockId, from?: number, to?: number): TextCase[];\n setTextCase(block: DesignBlockId, textCase: TextCase, from?: number, to?: number): void;\n getTypefaces(block: DesignBlockId, from?: number, to?: number): Typeface[];\n setTypeface(block: DesignBlockId, typeface: Typeface, from?: number, to?: number): void;\n getTypeface(block: DesignBlockId): Typeface;\n setTextKerning(block: DesignBlockId, kerning: number, from?: number, to?: number): void;\n getTextKernings(block: DesignBlockId, from?: number, to?: number): number[];\n setTextBaselineShift(block: DesignBlockId, baselineShift: number, from?: number, to?: number): void;\n getTextBaselineShifts(block: DesignBlockId, from?: number, to?: number): number[];\n setFont(block: DesignBlockId, fontUri: string, typeface: Typeface): void;\n toggleBoldFont(block: DesignBlockId, from?: number, to?: number): void;\n toggleItalicFont(block: DesignBlockId, from?: number, to?: number): void;\n getTextVisibleLineCount(block: DesignBlockId): number;\n getTextVisibleLineContent(block: DesignBlockId, lineIndex: number): string;\n getTextCharacterInkBoxes(block: DesignBlockId, from?: number, to?: number): CharacterInkBox[];\n getTextHorizontalAlignment(block: DesignBlockId, paragraphIndex?: number): TextHorizontalAlignment | undefined;\n setTextHorizontalAlignment(block: DesignBlockId, alignment: TextHorizontalAlignment | undefined, paragraphIndex?: number): void;\n setTextDecoration(block: DesignBlockId, config: TextDecorationConfig, from?: number, to?: number): void;\n toggleTextDecorationUnderline(block: DesignBlockId, from?: number, to?: number): void;\n toggleTextDecorationStrikethrough(block: DesignBlockId, from?: number, to?: number): void;\n toggleTextDecorationOverline(block: DesignBlockId, from?: number, to?: number): void;\n getTextListStyle(block: DesignBlockId, paragraphIndex: number): ListStyle;\n setTextListStyle(block: DesignBlockId, listStyle: ListStyle, paragraphIndex?: number, listLevel?: number): void;\n getTextListLevel(block: DesignBlockId, paragraphIndex: number): number;\n setTextListLevel(block: DesignBlockId, listLevel: number, paragraphIndex?: number): void;\n getTextParagraphIndices(block: DesignBlockId, from?: number, to?: number): number[];\n getTextLineHeight(block: DesignBlockId, paragraphIndex: number): number;\n setTextLineHeight(block: DesignBlockId, lineHeight: number | null, paragraphIndex?: number): void;\n setTextOnPath(block: DesignBlockId, svgPath: string | null): void;\n getTextOnPath(block: DesignBlockId): string | null;\n setTextOnPathOffset(block: DesignBlockId, offset: number): void;\n getTextOnPathOffset(block: DesignBlockId): number;\n setTextOnPathFlipped(block: DesignBlockId, flipped: boolean): void;\n getTextOnPathFlipped(block: DesignBlockId): boolean;\n getSourceSet(block: DesignBlockId, property: SourceSetPropertyName): Source[];\n setSourceSet(block: DesignBlockId, property: SourceSetPropertyName, sources: Source[]): void;\n addImageFileURIToSourceSet(block: DesignBlockId, property: SourceSetPropertyName, uri: string, options?: AbortOptions): Promise<void>;\n getAudioTrackCountFromVideo(block: DesignBlockId): number;\n getAVResourceTotalDuration(block: DesignBlockId): number;\n getFrameX(block: DesignBlockId): number;\n getFrameY(block: DesignBlockId): number;\n getFrameWidth(block: DesignBlockId): number;\n getFrameHeight(block: DesignBlockId): number;\n supportsPageDurationSource(page: DesignBlockId, block: DesignBlockId): boolean;\n isScopeEnabled(block: DesignBlockId, scope: Scope): boolean;\n setScopeEnabled(block: DesignBlockId, scope: Scope, enabled: boolean): void;\n isAllowedByScope(block: DesignBlockId, scope: Scope): boolean;\n findAllProperties(block: DesignBlockId): string[];\n export(block: DesignBlockId, options?: ExportOptions): Promise<Blob>;\n exportWithColorMask(block: DesignBlockId, maskColorR: number, maskColorG: number, maskColorB: number, options?: ExportOptions): Promise<Blob[]>;\n exportVideo(block: DesignBlockId, options?: VideoExportOptions): Promise<Blob>;\n exportAudio(block: DesignBlockId, options?: AudioExportOptions): Promise<Blob>;\n loadFromString(content: string): Promise<DesignBlockId[]>;\n loadFromURL(url: string, options?: AbortOptions): Promise<DesignBlockId[]>;\n loadFromArchiveURL(url: string, options?: AbortOptions): Promise<DesignBlockId[]>;\n saveToString(blocks: DesignBlockId[], allowedResourceSchemes?: string[], onDisallowedResourceScheme?: (url: string, dataHash: string) => Promise<string>, options?: AbortOptions): Promise<string>;\n saveToArchive(blocks: DesignBlockId[], options?: AbortOptions): Promise<Blob>;\n forceLoadAVResource(block: DesignBlockId, options?: AbortOptions): Promise<void>;\n forceLoadResources(blocks: DesignBlockId[], options?: AbortOptions): Promise<void>;\n getAudioInfoFromVideo(videoFillBlock: DesignBlockId): AudioTrackInfo[];\n createAudioFromVideo(videoFillBlock: DesignBlockId, trackIndex: number, options?: AudioFromVideoOptions): DesignBlockId;\n createAudiosFromVideo(videoFillBlock: DesignBlockId, options?: AudioFromVideoOptions): DesignBlockId[];\n createCaptionsFromURI(uri: string, options?: AbortOptions): Promise<DesignBlockId[]>;\n referencesAnyVariables(id: DesignBlockId): boolean;\n setVariableBinding(id: DesignBlockId, property: string, key: string): void;\n getVariableBinding(id: DesignBlockId, property: string): string | null;\n removeVariableBinding(id: DesignBlockId, property: string): void;\n findAllVariableBindings(id: DesignBlockId): string[];\n getFillOverprint(id: DesignBlockId): boolean;\n setFillOverprint(id: DesignBlockId, overprint: boolean): void;\n getStrokeOverprint(id: DesignBlockId): boolean;\n setStrokeOverprint(id: DesignBlockId, overprint: boolean): void;\n getTextRuns(id: DesignBlockId, options?: TextFontSizeOptions): TextRunInfo[];\n getTextRuns(id: DesignBlockId, from?: number, to?: number): TextRunInfo[];\n generateAudioThumbnailSequence(id: DesignBlockId, samplesPerChunk: number, timeBegin: number, timeEnd: number, numberOfSamples: number, numberOfChannels: number, onChunk: (chunkIndex: number, result: Float32Array | Error) => void): () => void;\n// ---- SceneAPI (editor-UI members) ----\n create(sceneLayout?: SceneLayout, options?: CreateSceneOptions): DesignBlockId;\n loadFromString(sceneContent: string, options?: LoadSceneOptions): Promise<DesignBlockId>;\n loadFromString(sceneContent: string, overrideEditorConfig?: boolean, waitForResources?: boolean): Promise<DesignBlockId>;\n loadFromURL(url: string, options?: LoadSceneOptions): Promise<DesignBlockId>;\n loadFromURL(url: string, overrideEditorConfig?: boolean, waitForResources?: boolean): Promise<DesignBlockId>;\n loadFromArchiveURL(url: string, options?: LoadSceneOptions): Promise<DesignBlockId>;\n loadFromArchiveURL(url: string, overrideEditorConfig?: boolean, waitForResources?: boolean): Promise<DesignBlockId>;\n saveToString(allowedResourceSchemes: string[], onDisallowedResourceScheme?: (url: string, dataHash: string) => Promise<string>): Promise<string>;\n saveToString(options?: {\n allowedResourceSchemes?: string[];\n onDisallowedResourceScheme?: (url: string, dataHash: string) => Promise<string>;\n compression?: {\n format?: CompressionFormat_2;\n level?: CompressionLevel;\n };\n abortSignal?: AbortSignal;\n }): Promise<string>;\n saveToArchive(options?: SaveToArchiveOptions): Promise<Blob>;\n setPlaying(play: boolean): void;\n setZoomLevel(zoomLevel?: number): void;\n getZoomLevel(): number;\n zoomToBlock(id: DesignBlockId, options?: ZoomOptions): Promise<void>;\n enableZoomAutoFit(id: DesignBlockId, axis: 'Horizontal' | 'Vertical', paddingBefore?: number, paddingAfter?: number): void;\n enableZoomAutoFit(id: DesignBlockId, axis: 'Both', paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): void;\n disableZoomAutoFit(blockOrScene: DesignBlockId): void;\n isZoomAutoFitEnabled(blockOrScene: DesignBlockId): boolean;\n unstable_enableCameraZoomClamping(blocks: DesignBlockId[], minZoomLimit?: number, maxZoomLimit?: number, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): void;\n unstable_disableCameraZoomClamping(blockOrScene?: number | null): void;\n unstable_isCameraZoomClampingEnabled(blockOrScene?: number | null): boolean;\n// ---- EditorAPI (editor-UI members) ----\n getEditMode(): EditMode;\n setEditMode(mode: EditMode, baseMode?: string): void;\n getMovementConstraint(id: DesignBlockId): ResolvedMovementConstraint;\n getCursorType(): 'Arrow' | 'Move' | 'MoveNotPermitted' | 'Resize' | 'Rotate' | 'Text' | 'Cell';\n getCursorRotation(): number;\n supportsP3(): boolean;\n isHighlightingEnabled(id: DesignBlockId): boolean;\n setHighlightingEnabled(id: DesignBlockId, enabled: boolean): void;\n isSelectionEnabled(id: DesignBlockId): boolean;\n setSelectionEnabled(id: DesignBlockId, enabled: boolean): void;\n hasSelectedVectorNode(): boolean;\n hasSelectedVectorControlPoint(): boolean;\n findAllScopes(): Scope$1[];\n getGlobalScope(scope: Scope): 'Allow' | 'Deny' | 'Defer';\n setGlobalScope(scope: Scope, value: 'Allow' | 'Deny' | 'Defer'): void;\n createHistory(): HistoryId;\n destroyHistory(history: HistoryId): void;\n getActiveHistory(): HistoryId;\n setActiveHistory(history: HistoryId): void;\n undo(): void;\n redo(): void;\n canUndo(): boolean;\n canRedo(): boolean;\n addUndoStep(): void;\n// ---- AssetAPI (editor-UI members) ----\n getGroups(id: string): Promise<string[]>;\n getLicense(sourceId: string): {\n name: string;\n url: string | undefined;\n } | undefined;\n getCredits(sourceId: string): {\n name: string;\n url: string | undefined;\n } | undefined;\n assetSourceContentsChanged(sourceID: string): void;\n registerApplyMiddleware(middleware: (sourceId: string, assetResult: AssetResult, apply: AssetAPI['apply'], context: ApplyAssetOptions) => Promise<DesignBlockId | undefined>): () => void;\n registerApplyToBlockMiddleware(middleware: (sourceId: string, assetResult: AssetResult, block: DesignBlockId, applyToBlock: AssetAPI['applyToBlock']) => Promise<void>): () => void;\n\n// ---- types referenced only by extended members ----\ntype TransitionType = 'none' | 'cross-fade' | 'cross-blur' | 'cross-spin' | 'cross-zoom' | 'cross-warp' | 'push' | 'slide' | 'stack' | 'splice' | 'diagonal-splice' | 'fade' | 'fade-to-white' | 'fade-to-black' | 'color-wipe' | 'line-wipe' | 'wipe' | 'clock-wipe' | 'chop' | 'gradient-fade' | 'two-stripes'; // each also valid as '//ly.img.ubq/transition/<name>'\ntype ObjectTypeShorthand = DesignBlockTypeShorthand | `shape/${ShapeTypeShorthand}` | `fill/${FillTypeShorthand}` | `effect/${EffectTypeShorthand}` | `modifier/${ModifierTypeShorthand}` | `blur/${BlurTypeShorthand}` | `animation/${AnimationTypeShorthand}` | `transition/${TransitionTypeShorthand}` | 'text_animator' | 'mask';\ninterface ColorInternal {\n colorSpace: number;\n components: {\n x: number;\n y: number;\n z: number;\n w: number;\n };\n spotColorName?: string;\n tint: number;\n externalReference?: string;\n}\ntype GradientstopRGBA = [\n stop: number,\n r: number,\n g: number,\n b: number,\n a: number\n];\ntype VideoMimeType = Extract<MimeType, 'video/mp4' | 'video/webm'>;\ntype ApplicationMimeType = Extract<MimeType, 'application/octet-stream' | 'application/pdf' | 'application/zip'>;\ntype KeyframePathVertex = PathVertex;\ntype PaletteColor = HexColorString | RGBColor | RGBAColor | SpotColor;\ninterface Vec3 {\n x: number;\n y: number;\n z: number;\n}\ninterface Size2 {\n width: number;\n height: number;\n}\ntype ZoomAutoFitAxis = 'Horizontal' | 'Vertical' | 'Both';\ninterface PageDuration {\n pageId: DesignBlockId;\n duration: number;\n start: number;\n end: number;\n}\ntype HorizontalBlockAlignment = 'Left' | 'Right' | 'Center' | 'Justify' | 'Auto';\ntype VerticalBlockAlignment = 'Top' | 'Center' | 'Bottom';\ntype SettingsColorRGBA = string;\ntype SettingsEnum = string;\nfunction isRGBAColor(color: Color): color is RGBAColor;\nfunction isSpotColor(color: Color): color is SpotColor;\nfunction isCMYKColor(color: Color): color is CMYKColor;\nfunction defaultLogger(message: string, level?: LogLevel): void;\ntype CreateSceneOptions = {\n page?: {\n size: number | {\n width: number;\n height: number;\n };\n color?: Color;\n };\n designUnit?: string;\n fontSizeUnit?: string;\n angleUnit?: string;\n};\ninterface SaveToArchiveOptions {\n compression?: CompressionOptions;\n abortSignal?: AbortSignal;\n}\ntype ResolvedMovementConstraint = {\n overshoot: number;\n} | null;\ntype ZoomOptions = {\n padding?: number | {\n x?: number;\n y?: number;\n } | {\n top?: number;\n bottom?: number;\n left?: number;\n right?: number;\n };\n animate?: boolean | {\n duration?: number;\n easing?: AnimationEasing;\n interruptible?: boolean;\n };\n};\ntype EnumValues = BlendMode$1 | HorizontalContentFillAlignment$1 | ContentFillMode | VerticalContentFillAlignment$1 | HeightMode | PositionXMode | PositionYMode | SceneAngleUnit | SceneColorConversionMode | DesignUnit$1 | FontSizeUnit | SceneLayout$1 | SceneMode | WidthMode | LayoutAlignCounter | LayoutAlignPrimary | LayoutMode | LayoutScaleContent | PageGuidesSource | PagePageSliceAxis | StrokeCap$1 | StrokeCornerGeometry$1 | StrokeDashEndCap | StrokeDashStartCap | StrokeEndCap | StrokePosition$1 | StrokeStartCap | StrokeStyle$1 | LayoutChildHeightSizing | LayoutChildHorizontalConstraint | LayoutChildVerticalConstraint | LayoutChildWidthSizing | PlaybackFadeInEasing | PlaybackFadeOutEasing | TextHorizontalAlignment$1 | TextVerticalAlignment$1 | CutoutType$1 | CaptionHorizontalAlignment | CaptionVerticalAlignment | AnimationEasing$1 | TextAnimationWritingStyle | AnimationGrowDirection | AnimationWipeDirection | AnimationBaselineDirection | AnimationSpinDirection | AnimationSpinLoopDirection | AnimationJumpLoopDirection | AnimationTypewriterTextWritingStyle | AnimationBlockSwipeTextDirection | AnimationMergeTextDirection | AnimationKenBurnsDirection | TransitionCrossSpinDirection | TransitionPushDirection | TransitionSlideDirection | TransitionStackDirection | TransitionSpliceDirection | TransitionDiagonalSpliceDirection | TransitionColorWipeDirection | TransitionWipeDirection | TransitionChopCorner | TransitionChopDirection | TransitionGradientFadeDirection | TransitionTwoStripesDirection | BlurUniformMode | ModifierTrimMode | ModifierRepeaterComposite | ModifierOffsetJoin | ModifierZigzagPointType | EffectDisplacementMapHorizontalChannel | EffectDisplacementMapMapBehavior | EffectDisplacementMapVerticalChannel | EffectInvertChannel | EffectRadialWipeDirection | EffectShiftChannelsTakeAlphaFrom | EffectShiftChannelsTakeBlueFrom | EffectShiftChannelsTakeGreenFrom | EffectShiftChannelsTakeRedFrom | EffectStrokePaintStyle | EffectWaveWarpWaveType | FillPixelStreamOrientation | ShapeVectorPathFillRule | ShapeCompoundFillRule | ShapeCompoundMode | MaskMode | TextAnimatorSelectorBasedOn | TextAnimatorSelectorShape | TextAnimatorSelectorUnits | (string & {});\ntype BlockEnumType = {\n 'blend/mode': BlendMode$1;\n 'contentFill/horizontalAlignment': HorizontalContentFillAlignment$1;\n 'contentFill/mode': ContentFillMode;\n 'contentFill/verticalAlignment': VerticalContentFillAlignment$1;\n 'height/mode': HeightMode;\n 'position/x/mode': PositionXMode;\n 'position/y/mode': PositionYMode;\n 'scene/angleUnit': SceneAngleUnit;\n 'scene/colorConversionMode': SceneColorConversionMode;\n 'scene/designUnit': DesignUnit$1;\n 'scene/fontSizeUnit': FontSizeUnit;\n 'scene/layout': SceneLayout$1;\n 'scene/mode': SceneMode;\n 'width/mode': WidthMode;\n 'layout/align/counter': LayoutAlignCounter;\n 'layout/align/primary': LayoutAlignPrimary;\n 'layout/mode': LayoutMode;\n 'layout/scaleContent': LayoutScaleContent;\n 'page/guides/source': PageGuidesSource;\n 'page/pageSliceAxis': PagePageSliceAxis;\n 'stroke/cap': StrokeCap$1;\n 'stroke/cornerGeometry': StrokeCornerGeometry$1;\n 'stroke/dashEndCap': StrokeDashEndCap;\n 'stroke/dashStartCap': StrokeDashStartCap;\n 'stroke/endCap': StrokeEndCap;\n 'stroke/position': StrokePosition$1;\n 'stroke/startCap': StrokeStartCap;\n 'stroke/style': StrokeStyle$1;\n 'layoutChild/heightSizing': LayoutChildHeightSizing;\n 'layoutChild/horizontalConstraint': LayoutChildHorizontalConstraint;\n 'layoutChild/verticalConstraint': LayoutChildVerticalConstraint;\n 'layoutChild/widthSizing': LayoutChildWidthSizing;\n 'playback/fadeIn/easing': PlaybackFadeInEasing;\n 'playback/fadeOut/easing': PlaybackFadeOutEasing;\n 'text/horizontalAlignment': TextHorizontalAlignment$1;\n 'text/verticalAlignment': TextVerticalAlignment$1;\n 'cutout/type': CutoutType$1;\n 'caption/horizontalAlignment': CaptionHorizontalAlignment;\n 'caption/verticalAlignment': CaptionVerticalAlignment;\n animationEasing: AnimationEasing$1;\n textAnimationWritingStyle: TextAnimationWritingStyle;\n 'animation/grow/direction': AnimationGrowDirection;\n 'animation/wipe/direction': AnimationWipeDirection;\n 'animation/baseline/direction': AnimationBaselineDirection;\n 'animation/spin/direction': AnimationSpinDirection;\n 'animation/spin_loop/direction': AnimationSpinLoopDirection;\n 'animation/jump_loop/direction': AnimationJumpLoopDirection;\n 'animation/typewriter_text/writingStyle': AnimationTypewriterTextWritingStyle;\n 'animation/block_swipe_text/direction': AnimationBlockSwipeTextDirection;\n 'animation/merge_text/direction': AnimationMergeTextDirection;\n 'animation/ken_burns/direction': AnimationKenBurnsDirection;\n 'transition/cross-spin/direction': TransitionCrossSpinDirection;\n 'transition/push/direction': TransitionPushDirection;\n 'transition/slide/direction': TransitionSlideDirection;\n 'transition/stack/direction': TransitionStackDirection;\n 'transition/splice/direction': TransitionSpliceDirection;\n 'transition/diagonal-splice/direction': TransitionDiagonalSpliceDirection;\n 'transition/color-wipe/direction': TransitionColorWipeDirection;\n 'transition/wipe/direction': TransitionWipeDirection;\n 'transition/chop/corner': TransitionChopCorner;\n 'transition/chop/direction': TransitionChopDirection;\n 'transition/gradient-fade/direction': TransitionGradientFadeDirection;\n 'transition/two-stripes/direction': TransitionTwoStripesDirection;\n 'blur/uniform/mode': BlurUniformMode;\n 'modifier/trim/mode': ModifierTrimMode;\n 'modifier/repeater/composite': ModifierRepeaterComposite;\n 'modifier/offset/join': ModifierOffsetJoin;\n 'modifier/zigzag/pointType': ModifierZigzagPointType;\n 'effect/displacement_map/horizontalChannel': EffectDisplacementMapHorizontalChannel;\n 'effect/displacement_map/mapBehavior': EffectDisplacementMapMapBehavior;\n 'effect/displacement_map/verticalChannel': EffectDisplacementMapVerticalChannel;\n 'effect/invert/channel': EffectInvertChannel;\n 'effect/radial_wipe/direction': EffectRadialWipeDirection;\n 'effect/shift_channels/takeAlphaFrom': EffectShiftChannelsTakeAlphaFrom;\n 'effect/shift_channels/takeBlueFrom': EffectShiftChannelsTakeBlueFrom;\n 'effect/shift_channels/takeGreenFrom': EffectShiftChannelsTakeGreenFrom;\n 'effect/shift_channels/takeRedFrom': EffectShiftChannelsTakeRedFrom;\n 'effect/stroke/paintStyle': EffectStrokePaintStyle;\n 'effect/wave_warp/waveType': EffectWaveWarpWaveType;\n 'fill/pixelStream/orientation': FillPixelStreamOrientation;\n 'shape/vector_path/fillRule': ShapeVectorPathFillRule;\n 'shape/compound/fillRule': ShapeCompoundFillRule;\n 'shape/compound/mode': ShapeCompoundMode;\n 'mask/mode': MaskMode;\n 'text_animator/selectorBasedOn': TextAnimatorSelectorBasedOn;\n 'text_animator/selectorShape': TextAnimatorSelectorShape;\n 'text_animator/selectorUnits': TextAnimatorSelectorUnits;\n};\ntype SettingDoublePropertyName = 'clip/defaultDurationValue' | (string & {});\ntype SettingEnumPropertyName = 'clip/initialDurationMode' | 'touch/pinchAction' | 'touch/rotateAction' | 'camera/clamping/overshootMode' | 'controlGizmo/moveHandleVisibility' | 'controlGizmo/resizeHandlesVisibility' | 'controlGizmo/scaleHandlesVisibility' | 'controlGizmo/rotateHandlesVisibility' | 'doubleClickSelectionMode' | 'colorPicker/colorMode' | 'timeline/trackVisibility' | (string & {});\ntype SettingEnumValues = ClipInitialDurationMode | TouchPinchAction | TouchRotateAction | CameraClampingOvershootMode | ControlGizmoMoveHandleVisibility | ControlGizmoResizeHandlesVisibility | ControlGizmoScaleHandlesVisibility | ControlGizmoRotateHandlesVisibility | DoubleClickSelectionMode | ColorPickerColorMode | TimelineTrackVisibility | (string & {});\ntype EngineActionId = keyof EngineActionsRegistry & string;\ninterface EnginePlugin {\n name: string;\n version: string;\n initialize: (context: EnginePluginContext) => void | Promise<void>;\n}\n\n// ---- types referenced only by extended members ----\ntype HexColorString = string;\ninterface CompressionOptions {\n format?: CompressionFormat_2;\n level?: CompressionLevel;\n}\ntype SceneColorConversionMode = 'Managed' | 'Legacy';\ntype SceneMode = 'Design' | 'Video';\ntype LayoutAlignCounter = 'Start' | 'Center' | 'End' | 'Stretch' | 'Baseline';\ntype LayoutAlignPrimary = 'Start' | 'Center' | 'End' | 'SpaceBetween' | 'SpaceAround' | 'SpaceEvenly';\ntype LayoutMode = 'None' | 'Horizontal' | 'Vertical' | 'Grid';\ntype LayoutScaleContent = 'None' | 'ShorterSide';\ntype PageGuidesSource = 'Document' | 'Custom';\ntype PagePageSliceAxis = 'Horizontal' | 'Vertical';\ntype StrokeDashEndCap = 'Butt' | 'Round' | 'Square';\ntype StrokeDashStartCap = 'Butt' | 'Round' | 'Square';\ntype StrokeEndCap = 'Butt' | 'Round' | 'Square';\ntype StrokeStartCap = 'Butt' | 'Round' | 'Square';\ntype LayoutChildHeightSizing = 'Fixed' | 'Hug' | 'Fill';\ntype LayoutChildHorizontalConstraint = 'Start' | 'End' | 'Center' | 'Both' | 'Scale';\ntype LayoutChildVerticalConstraint = 'Start' | 'End' | 'Center' | 'Both' | 'Scale';\ntype LayoutChildWidthSizing = 'Fixed' | 'Hug' | 'Fill';\ntype PlaybackFadeInEasing = 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut' | 'EaseInQuart' | 'EaseOutQuart' | 'EaseInOutQuart' | 'EaseInQuint' | 'EaseOutQuint' | 'EaseInOutQuint' | 'EaseInBack' | 'EaseOutBack' | 'EaseInOutBack' | 'EaseInSpring' | 'EaseOutSpring' | 'EaseInOutSpring';\ntype PlaybackFadeOutEasing = 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut' | 'EaseInQuart' | 'EaseOutQuart' | 'EaseInOutQuart' | 'EaseInQuint' | 'EaseOutQuint' | 'EaseInOutQuint' | 'EaseInBack' | 'EaseOutBack' | 'EaseInOutBack' | 'EaseInSpring' | 'EaseOutSpring' | 'EaseInOutSpring';\ntype CaptionHorizontalAlignment = 'Left' | 'Right' | 'Center' | 'Justify' | 'Auto';\ntype CaptionVerticalAlignment = 'Top' | 'Bottom' | 'Center';\ntype TextAnimationWritingStyle = 'Block' | 'Line' | 'Character' | 'Word';\ntype AnimationGrowDirection = 'Horizontal' | 'Vertical' | 'All' | 'TopLeft' | 'TopRight' | 'BottomLeft' | 'BottomRight';\ntype AnimationWipeDirection = 'Up' | 'Right' | 'Down' | 'Left';\ntype AnimationBaselineDirection = 'Up' | 'Right' | 'Down' | 'Left';\ntype AnimationSpinDirection = 'Clockwise' | 'CounterClockwise';\ntype AnimationSpinLoopDirection = 'Clockwise' | 'CounterClockwise';\ntype AnimationJumpLoopDirection = 'Up' | 'Right' | 'Down' | 'Left';\ntype AnimationTypewriterTextWritingStyle = 'Character' | 'Word';\ntype AnimationBlockSwipeTextDirection = 'Up' | 'Right' | 'Down' | 'Left';\ntype AnimationMergeTextDirection = 'Right' | 'Left';\ntype AnimationKenBurnsDirection = 'Up' | 'Right' | 'Down' | 'Left';\ntype TransitionCrossSpinDirection = 'Clockwise' | 'CounterClockwise';\ntype TransitionPushDirection = 'Left' | 'Right' | 'Up' | 'Down';\ntype TransitionSlideDirection = 'Left' | 'Right' | 'Up' | 'Down';\ntype TransitionStackDirection = 'Left' | 'Right' | 'Up' | 'Down';\ntype TransitionSpliceDirection = 'Left' | 'Right' | 'Up' | 'Down';\ntype TransitionDiagonalSpliceDirection = 'RaisedRamp' | 'LoweredRamp';\ntype TransitionColorWipeDirection = 'Left' | 'Right' | 'Up' | 'Down';\ntype TransitionWipeDirection = 'Left' | 'Right' | 'Up' | 'Down';\ntype TransitionChopCorner = 'TopLeft' | 'TopRight' | 'BottomLeft' | 'BottomRight';\ntype TransitionChopDirection = 'Clockwise' | 'CounterClockwise';\ntype TransitionGradientFadeDirection = 'Left' | 'Right' | 'Up' | 'Down';\ntype TransitionTwoStripesDirection = 'Horizontal' | 'Vertical';\ntype BlurUniformMode = 'Fill' | 'Block';\ntype ModifierTrimMode = 'Simultaneous' | 'Individual';\ntype ModifierRepeaterComposite = 'Below' | 'Above';\ntype ModifierOffsetJoin = 'Bevel' | 'Miter' | 'Round';\ntype ModifierZigzagPointType = 'Corner' | 'Smooth';\ntype EffectDisplacementMapHorizontalChannel = 'Red' | 'Green' | 'Blue' | 'Alpha' | 'Luminance' | 'Hue' | 'Lightness' | 'Saturation' | 'Full' | 'Half' | 'Off';\ntype EffectDisplacementMapMapBehavior = 'Center' | 'Stretch' | 'Tile';\ntype EffectDisplacementMapVerticalChannel = 'Red' | 'Green' | 'Blue' | 'Alpha' | 'Luminance' | 'Hue' | 'Lightness' | 'Saturation' | 'Full' | 'Half' | 'Off';\ntype EffectInvertChannel = 'RGB' | 'Red' | 'Green' | 'Blue' | 'HLS' | 'Hue' | 'Lightness' | 'Saturation' | 'YIQ' | 'Luma' | 'InPhaseChroma' | 'QuadratureChroma' | 'Alpha';\ntype EffectRadialWipeDirection = 'Clockwise' | 'Counterclockwise' | 'Both';\ntype EffectShiftChannelsTakeAlphaFrom = 'Alpha' | 'Red' | 'Green' | 'Blue' | 'Luminance' | 'Hue' | 'Lightness' | 'Saturation' | 'FullOn' | 'FullOff';\ntype EffectShiftChannelsTakeBlueFrom = 'Alpha' | 'Red' | 'Green' | 'Blue' | 'Luminance' | 'Hue' | 'Lightness' | 'Saturation' | 'FullOn' | 'FullOff';\ntype EffectShiftChannelsTakeGreenFrom = 'Alpha' | 'Red' | 'Green' | 'Blue' | 'Luminance' | 'Hue' | 'Lightness' | 'Saturation' | 'FullOn' | 'FullOff';\ntype EffectShiftChannelsTakeRedFrom = 'Alpha' | 'Red' | 'Green' | 'Blue' | 'Luminance' | 'Hue' | 'Lightness' | 'Saturation' | 'FullOn' | 'FullOff';\ntype EffectStrokePaintStyle = 'OnOriginalImage' | 'OnTransparent';\ntype EffectWaveWarpWaveType = 'Sine' | 'Square' | 'Triangle' | 'Sawtooth';\ntype FillPixelStreamOrientation = 'Up' | 'Down' | 'Left' | 'Right' | 'UpMirrored' | 'DownMirrored' | 'LeftMirrored' | 'RightMirrored';\ntype ShapeVectorPathFillRule = 'EvenOdd' | 'NonZero';\ntype ShapeCompoundFillRule = 'EvenOdd' | 'NonZero';\ntype ShapeCompoundMode = 'Merge' | 'Add' | 'Subtract' | 'Intersect' | 'Exclude';\ntype MaskMode = 'Add' | 'Subtract' | 'Intersect' | 'Lighten' | 'Darken' | 'Difference' | 'None';\ntype TextAnimatorSelectorBasedOn = 'Characters' | 'CharactersExcludingSpaces' | 'Words' | 'Lines';\ntype TextAnimatorSelectorShape = 'Square' | 'RampUp' | 'RampDown' | 'Triangle' | 'Round' | 'Smooth';\ntype TextAnimatorSelectorUnits = 'Percentage' | 'Index';\ninterface EnginePluginContext {\n engine: CreativeEngine;\n}\n\n// ---- types referenced only by extended members ----\nenum CompressionFormat_2 {\n None = 0,\n Zstd = 1\n}\nenum CompressionLevel {\n Fastest = 0,\n Default = 1,\n Best = 2\n}\n",
13
13
  "docs/api/signatures.d.ts": "// ============================================================================\n// codesign extension: engine.design — the ONLY API `edit` code uses.\n// engine.block/scene/variable/editor/asset/event are refused by the edit\n// gate, which names the engine.design equivalent; the upstream classes after\n// this section are reference only. Scene-wide state (variables,\n// spotColors, scene.*) lives on the scene block.\n//\n// Length: design-unit number or '3mm'/'0.1in'/'32pt'/'40px'; reads answer\n// numbers. '50%' also sets '<leaf>Mode' to 'Percent'. letterSpacing is a FACTOR, never a length. lineHeight: write { visual: n }\n// (CSS-style x fontSize, converted per font); a bare number is the ENGINE\n// scale and renders looser. paragraphSpacing: write { px: n } or { em: n }.\n// Text glyph color is per-character: fill.solid.color on a text block is\n// REJECTED — write setProps(id, { text: { color } }) instead.\n// ============================================================================\n// Branded attachment ids — nominal guidance (runtime dispatch enforces the\n// category): a FillId/EffectId/... is where the matching attachment props\n// tree applies, never BlockProps.\n// Durable identity: every id parameter also accepts the block's UUID string\n// (read it via getProps(id, ['uuid']) or a tree read) — the identity that\n// persists in the scene file and crosses edits/revisions. An unknown uuid\n// throws \"not in this revision\"; a stale numeric handle can't be caught.\ntype BlockRef = DesignBlockId | string /* uuid */;\ntype Length = number | `${number}${'px' | 'pt' | 'mm' | 'in'}`;\n// One node of the document read as a tree; feed a (subset of a) node tree\n// back to setProps to patch every node by uuid.\ninterface PropsNode { uuid: string; name?: string; type: string; props: BlockProps; children: PropsNode[] }\n// Tracks by leaf; at = seconds of the (host) block or '25%'; null removes.\ntype Keyframes = { [leaf: string]: { at: number | string; value: unknown; easing?: string | object }[] | null };\ntype FillId = DesignBlockId & { readonly __kind?: 'fill' };\ntype EffectId = DesignBlockId & { readonly __kind?: 'effect' };\ntype BlurId = DesignBlockId & { readonly __kind?: 'blur' };\ntype ShapeId = DesignBlockId & { readonly __kind?: 'shape' };\ntype AnimationId = DesignBlockId & { readonly __kind?: 'animation' };\ninterface DesignApi {\n /** EVERY member returns a Promise — always: await engine.design.x(...)\n * (a floating rejection fails the edit at commit). */\n /** THE constructor: one block or a whole subtree, same spec shape at\n * every level. Looks up any font: { family, weight }, applies props,\n * attaches to the parent and loads fonts/images. Rolls the\n * WHOLE subtree back on failure. Name the nodes you will touch again:\n * the name lands on the block and findByName resolves it later.\n * Text without a height sizes to its text; a fixed height below its\n * lines throws (setProps too).\n * A NEW document: create({ type: 'scene', props: { scene: { mode?:\n * 'Video', layout?, designUnit? }, stack?: { spacing? }, variables?,\n * spotColors? }, children: [pages] }) replaces the current scene; a\n * page whose parent is the scene goes into its stack (gap 48 px). */\n create(spec: BuildSpec, opts?: { parent?: BlockRef; index?: number /* 0 = back */ }): Promise<DesignBlockId>;\n /** Partial deep-merge write. Brand-dispatched: pass a FILL/EFFECT/BLUR/\n * SHAPE/ANIMATION block id and the matching attachment props tree\n * (effect/*, fill/*, … paths as nested keys) applies instead.\n * Given a PropsNode TREE (a node with uuid+props or children) it\n * patches every node by uuid — read the tree, transform it in JS,\n * write it back. Patch-only: an absent block/prop is untouched, never\n * deleted; uuids resolve for the whole tree before anything applies. */\n setProps(id: BlockRef, props: BlockProps | PropsNode): Promise<void>;\n /** Read leaves or whole subtrees — getProps(id, ['position', 'stroke']) —\n * or omit select for EVERY applicable prop of this block, valued.\n * In a list, a selector this block lacks answers undefined (a\n * page's opacity); alone, it throws and says why. { children: true,\n * props?: [...] } reads the\n * whole SUBTREE as one uuid-keyed PropsNode tree — filter it with\n * plain JS (a selector a block kind lacks is skipped for that block).\n * The snapshot never enters your reply unless you print it. */\n getProps(id: BlockRef, select?: string[] | { children: true; props?: string[] }): Promise<BlockProps>;\n /** Editor settings, same dialect; SettingsProps is in signatures.d.ts. */\n setSettings(props: SettingsProps): Promise<void>;\n getSettings(select?: string[]): Promise<SettingsProps>;\n // text.path's circle spec centres the glyph run and sets the D×D frame\n // (align: 'bottom' = upright underside). getProps(id, ['type']) names a\n // block; attachment ids never circulate.\n /** Editing scopes (what the browser-editor user may change). Saved with\n * the design: the lock an editor opened for filling in a template obeys.\n * THIS session ignores locks — every write still succeeds here; an\n * editor obeys them where its own global scopes defer. A slot\n * needs its own scope (image: fill/change, text: text/edit) plus\n * editor/select, or it cannot be clicked. { recursive: true } writes the\n * block and every descendant: lock a page with every scope false, then\n * open the slots. */\n getScopes(id: BlockRef): Promise<Record<Scope, boolean>>;\n setScopes(id: BlockRef, scopes: Partial<Record<Scope, boolean>>, opts?: { recursive?: boolean }): Promise<void>;\n getCapabilities(idOrType: BlockRef | DesignBlockType): Promise<readonly string[]>;\n // Attachment values are the unions below (replaced blocks are destroyed):\n // await setProps(id, { fill: { type: 'color', color: { value } } })\n // await setProps(id, { fill: { enabled: false } }) // no type ⇒ host leaves\n // Gradient fills round-trip stops; image fills round-trip sourceSet —\n // getProps(id, ['fill']) → tweak → setProps is lossless.\n // await setProps(id, { shape: { type: 'rect' } }) · { blur: { type: 'uniform' } }\n // await setProps(id, { effects: [{ type: 'displacement_map', source: 'map' /* BlockRef */ }] })\n // await setProps(id, { animations: { in: { type: 'slide', … } } }) // null detaches\n // TEXT is all props too, applied in canonical order (font → string →\n // styles → ranges) whatever the key order:\n // await setProps(id, { text: { string, font: { typeface }, weight, case,\n // listStyle, path, pathOffset, pathFlipped,\n // ranges: [{ from, to, color?, weight?, style?, size?, case?, scriptStyle?,\n // decoration?, kerning? }] } })\n // A string write WITHOUT other text styling auto-preserves existing\n // ranges; with styling, ranges reset (pass ranges to keep or ranges: []\n // to wipe); font/size/lineHeight writes auto-reshape. Read the per-run\n // truth via getProps(id, ['text.ranges']); paragraphs (read-only) carry\n // listStyle + listLevel.\n // TIMELINE: page→track→clips; a later track draws above. A track plays\n // its clips back-to-back until a timeOffset is written. A transition\n // joins a clip to the next one on its track.\n // CAPTIONS: page→captionTrack→caption, caption.* as text.*; style+layout TRACK-WIDE,\n // caption.ranges per caption (one track per page). Background box = the whole frame + padding.\n adjustCropToFillFrame(id: BlockRef, minScaleRatio: number): Promise<number>;\n // Multi-block layout verbs:\n /** Axis-keyed ('Center' is never ambiguous); one call may do both axes. */\n align(ids: BlockRef[], alignment: { horizontal?: 'Left' | 'Center' | 'Right'; vertical?: 'Top' | 'Center' | 'Bottom' }): Promise<void>;\n distribute(ids: BlockRef[], axis: 'horizontal' | 'vertical'): Promise<void>;\n isAlignable(ids: BlockRef[]): Promise<boolean>;\n isDistributable(ids: BlockRef[]): Promise<boolean>;\n bringForward(id: BlockRef): Promise<void>;\n sendBackward(id: BlockRef): Promise<void>;\n order(id: BlockRef, to: 'front' | 'back' | { above: BlockRef } | { below: BlockRef }): Promise<void>;\n /** Scales the block and its children; the anchor (default 0, 0) is a 0..1\n * fraction of the block's own frame. To upscale a whole design at the\n * same aspect (1080p → 4K), call scale(page, f) on the page before any\n * resize: it resizes the page too. */\n scale(id: BlockRef, factor: number, opts?: { anchorX?: number; anchorY?: number }): Promise<void>;\n resizeContentAware(ids: BlockRef[], size: { width: number; height: number }): Promise<void>;\n /** Measured layout frame (post-layout px, resources loaded) — the\n * numbers you position by. Unpadded: backgroundColor padding is outside.\n * Rotated: x/y = pivot corner (the unrotated origin).\n * textLines: visible line count; ink: { from, to } adds glyph ink boxes. Text only. */\n measure(id: BlockRef, opts?: { ink?: { from?: number; to?: number } }): Promise<{ x: number; y: number; width: number; height: number; textLines?: number; ink?: Array<{ x: number; y: number; width: number; height: number; baselineY: number }> }>;\n /** Await pending font/image loads for these subtrees (create does this itself). */\n loadResources(ids: BlockRef[]): Promise<void>;\n isGroupable(ids: BlockRef[]): Promise<boolean>;\n /** Auto layout: read the auto-layout skill first. Tries each size on a copy; lists what breaks. */\n checkSizes(page: BlockRef, sizes: Array<{ width: number; height: number }>): Promise<Array<{ size: string; problems: string[] }>>;\n /** Instances follow their main component. */\n createComponent(id: BlockRef): Promise<void>;\n createInstance(component: BlockRef, parent: BlockRef): Promise<DesignBlockId>;\n setInstanceProperty(instance: BlockRef, name: string, value: string): Promise<void>;\n // Tree verbs. Child order is paint order: first = back, last = front.\n appendChild(parent: BlockRef, child: BlockRef): Promise<void>;\n insertChild(parent: BlockRef, child: BlockRef, index: number): Promise<void>;\n getParent(id: BlockRef): Promise<DesignBlockId | null>;\n getChildren(id: BlockRef): Promise<DesignBlockId[]>;\n /** 'page' answers in document order. */\n findByType(type: DesignBlockType): Promise<DesignBlockId[]>;\n /** Blocks carrying this name. create writes a spec node's name onto the\n * block, so this is how a LATER edit re-finds what an earlier made. */\n findByName(name: string): Promise<DesignBlockId[]>;\n group(ids: BlockRef[]): Promise<DesignBlockId>;\n ungroup(id: BlockRef): Promise<void>;\n duplicate(id: BlockRef): Promise<DesignBlockId>;\n destroy(id: BlockRef): Promise<void>;\n // Media and CoDesign services — what CE.SDK does not answer itself:\n /** A font and its metrics, by family (create's lookup) or uri; warms the\n * cache text.lineHeight: { visual } reads. */\n font(spec: { family?: string; uri?: string; weight?: FontWeight; style?: FontStyle }): Promise<{ typeface?: Typeface; uri: string; contentArea: number; metrics: { ascender: number; descender: number; lineGap: number; unitsPerEm: number; capHeight: number; xHeight: number; underlineOffset: number; underlineSize: number } }>;\n /** Words of an asset_generate transcript (its transcriptUri) starting in [from, to) source seconds. */\n readTranscript(uri: string, range?: { from?: number; to?: number }): Promise<{ words: Array<{ text: string; start: number; end: number }> }>;\n /** An audio block's beats in PAGE seconds; bpm picks half/double tempo;\n * bpm/fit null = no steady beat (cut on accents/onsets). */\n readBeats(id: BlockRef, opts?: { bpm?: number }): Promise<{ start: number; duration: number; bpm: number | null; requestedBpm: number | null; fit: { onsets: number; onGrid: number; meanErrMs: number } | null; beats: number[]; accents: number[]; onsets: Array<{ t: number; strength: number }> }>;\n}\n// Also in edit scope: a text block by its copy, NBSP/thin spaces folded and\n// ends trimmed, else exact. A miss lists the design's copy.\ndeclare function findText(copy: string): Promise<DesignBlockId>; // rejects unless one matches\ndeclare function findAllText(copy: string): Promise<DesignBlockId[]>; // [] for none\ninterface BuildSpec {\n type: DesignBlockType;\n /** Written onto the block; findByName(name) resolves it, in this edit\n * and in every later one. */\n name?: string;\n /** Everything the block IS, attachments and the text subtree included;\n * text.font: { family, weight } is looked up (create and setProps). */\n props?: BlockProps;\n children?: BuildSpec[];\n}\n// Capability matrix (measured against the engine; type-determined —\n// no need to call supports* for blocks you created):\n// capability audio caption captionTrack cutout graphic group page text track\n// animation ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓\n// backgroundColor · ✓ · · · · · ✓ ·\n// blendMode · ✓ · · ✓ ✓ ✓ ✓ ·\n// blur · · · · ✓ ✓ ✓ · ·\n// contentFillMode ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓\n// crop · · · · ✓ · · · ·\n// dropShadow · ✓ · · ✓ · ✓ ✓ ·\n// duration ✓ ✓ ✓ · ✓ ✓ ✓ ✓ ✓\n// effects · · · · ✓ · ✓ · ·\n// fill · ✓ · · ✓ · ✓ ✓ ·\n// masks · ✓ · · ✓ ✓ · ✓ ·\n// opacity · ✓ · · ✓ ✓ · ✓ ·\n// placeholderBehavior· ✓ · · · · · ✓ ·\n// placeholderControls· · · ✓ ✓ · ✓ · ·\n// playbackControl ✓ · · · · · ✓ · ·\n// playbackTime ✓ · · · · · ✓ · ·\n// shape · · · · ✓ · · · ·\n// stroke · ✓ · · ✓ · ✓ ✓ ·\n// textAnimators · ✓ · · · · · ✓ ·\n// timeOffset ✓ ✓ ✓ · ✓ ✓ · ✓ ✓\n// trim ✓ · · · · · · · ·\n\ninterface BlockProps {\n activeValueSet?: string | null /* SCENE: the set text, bound leaves and exports show; null = the defaults */;\n alwaysOnBottom?: boolean;\n alwaysOnTop?: boolean;\n animations?: { in?: Animation | null; loop?: Animation | null; out?: Animation | null };\n audio?: { fileURI?: string; totalDuration?: number };\n background?: Color /* page only; paints under its children */;\n backgroundColor?: {\n color?: Color;\n cornerRadius?: Length | 'pill' /* fully rounded */;\n enabled?: boolean;\n paddingBottom?: Length;\n paddingLeft?: Length;\n paddingRight?: Length;\n paddingTop?: Length;\n };\n bindings?: { [leaf: string]: string | null };\n blend?: {\n mode?: 'PassThrough' | 'Normal' | 'Darken' | 'Multiply' | 'ColorBurn' | 'LinearBurn' | 'DarkenColor' | 'Lighten' | 'Screen' | 'ColorDodge' | 'LinearDodge' | 'LightenColor' | 'Overlay' | 'SoftLight' | 'HardLight' | 'VividLight' | 'LinearLight' | 'PinLight' | 'HardMix' | 'Difference' | 'Exclusion' | 'Subtract' | 'Divide' | 'Hue' | 'Saturation' | 'Color' | 'Luminosity';\n };\n blur?: Blur | null;\n camera?: {\n pixelRatio?: number;\n resolution?: { height?: number; width?: number };\n zoomLevel?: number;\n };\n caption?: {\n animators?: TextAnimator[] /* in signatures.d.ts; [] clears */;\n automaticFontSizeEnabled?: boolean;\n clipLinesOutsideOfFrame?: boolean;\n color?: Color;\n font?: { family: string; weight?: FontWeight } | { typeface: Typeface; uri?: string };\n fontSize?: string /* '48px' */;\n horizontalAlignment?: 'Left' | 'Right' | 'Center' | 'Justify' | 'Auto';\n letterSpacing?: number;\n lineHeight?: number | { visual: number };\n maxAutomaticFontSize?: number;\n minAutomaticFontSize?: number;\n paragraphSpacing?: number | { px: number } | { em: number };\n pathFlipped?: boolean;\n pathOffset?: number;\n ranges?: { from: number; to: number; color?: Color; weight?: FontWeight; style?: string; size?: string /* px or pt string */; case?: TextCase; scriptStyle?: ScriptStyle; baselineShift?: number | string; typeface?: Typeface; decoration?: TextDecorationConfig; kerning?: number }[];\n style?: string;\n subscriptFontScale?: number;\n subscriptVerticalShift?: number;\n superscriptFontScale?: number;\n superscriptVerticalShift?: number;\n text?: string;\n useContextualAlternates?: boolean;\n useContextualLigatures?: boolean;\n useDiscretionaryLigatures?: boolean;\n useKerning?: boolean;\n useLigatures?: boolean;\n verticalAlignment?: 'Top' | 'Bottom' | 'Center';\n weight?: string;\n };\n captionTrack?: { automaticallyManageBlockOffsets?: boolean };\n clipped?: boolean;\n contentFill?: {\n horizontalAlignment?: 'Left' | 'Center' | 'Right';\n mode?: 'Crop' | 'Cover' | 'Contain' /* image default Cover; a logo: Contain */;\n verticalAlignment?: 'Top' | 'Center' | 'Bottom';\n };\n crop?: null | {\n aspectRatioLocked?: boolean;\n rotation?: number;\n scaleRatio?: number;\n scaleX?: number;\n scaleY?: number;\n translationX?: number;\n translationY?: number;\n };\n cutout?: {\n offset?: number;\n path?: string;\n smoothing?: number;\n type?: 'Solid' | 'Dashed' /* spotColors ink with this cutout */;\n };\n dropShadow?: {\n blurRadius?: { x?: Length; y?: Length };\n clip?: boolean;\n color?: Color;\n enabled?: boolean;\n offset?: { x?: Length; y?: Length };\n };\n effects?: Effect[];\n exclusionArea?: {\n constrains?: boolean;\n punchOut?: boolean /* exclusionArea is never exported; punchOut cuts a hole */;\n };\n fill?: Fill | null;\n flip?: { horizontal?: boolean; vertical?: boolean };\n globalBoundingBox?: { height?: number; width?: number; x?: number; y?: number };\n height?: Length | `${number}%`;\n heightMode?: 'Absolute' | 'Percent' | 'Auto';\n highlightEnabled?: boolean;\n includedInExport?: boolean;\n keyframes?: Keyframes | null;\n kind?: string;\n lastFrame?: { height?: number; width?: number; x?: number; y?: number };\n markers?: { name: string; time: number; duration?: number }[];\n masks?: Mask[];\n matte?: { source: BlockRef; mode?: 'Alpha' | 'AlphaInverted' | 'Luma' | 'LumaInverted' } | null;\n metadata?: { [key: string]: string | null } /* block tags; null deletes */;\n motionBlur?: {\n enabled?: boolean /* graphic, text, caption */;\n samples?: number /* SCENE only: 1–64 */;\n shutterAngle?: number /* SCENE only: 0–720° */;\n shutterPhase?: number /* SCENE only: −360–360° */;\n };\n movement?: { constraint?: number };\n name?: string;\n opacity?: number;\n page?: {\n guides?: {\n gridColor?: Color;\n gridEnabled?: boolean;\n gridSnapEnabled?: boolean;\n gridSpacingX?: number;\n gridSpacingY?: number;\n source?: 'Document' | 'Custom';\n };\n margin?: { bottom?: Length; left?: Length; right?: Length; top?: Length };\n marginEnabled?: boolean /* bleed: page.margin, outside the trim size */;\n marginScale?: number;\n pageSliceAxis?: 'Horizontal' | 'Vertical';\n safetyEnabled?: boolean /* safetyInset: text-free band, not exported */;\n safetyInset?: { bottom?: Length; left?: Length; right?: Length; top?: Length };\n titleTemplate?: string;\n titleTemplateWithPageSlices?: string;\n };\n placeholder?: { enabled?: boolean };\n placeholderBehavior?: { enabled?: boolean };\n placeholderControls?: { showButton?: boolean; showOverlay?: boolean };\n playback?: {\n coverTime?: number;\n coverTimeEnabled?: boolean;\n duration?: number /* s */;\n fadeIn?: { duration?: number; easing?: AnimationEasing };\n fadeOut?: { duration?: number; easing?: AnimationEasing };\n looping?: boolean;\n muted?: boolean;\n playing?: boolean;\n soloPlaybackEnabled?: boolean;\n speed?: number /* 0.25–3; duration = trimLength / speed */;\n time?: number /* on a page, the playhead: a still export renders this frame */;\n timeOffset?: number /* s from the parent's start; writing one stops its track's auto-arrange */;\n trimLength?: number /* s of the source */;\n trimOffset?: number /* s of the source */;\n volume?: number /* 0–1 */;\n };\n position?: {\n x?: Length | `${number}%`;\n xMode?: 'Absolute' | 'Percent' | 'Auto';\n y?: Length | `${number}%`;\n yMode?: 'Absolute' | 'Percent' | 'Auto';\n };\n rotation?: number;\n scene?: {\n angleUnit?: 'Radian' | 'Degree';\n aspectRatioLock?: boolean;\n colorConversionMode?: 'Managed' | 'Legacy';\n designUnit?: 'Pixel' | 'Millimeter' | 'Inch';\n dpi?: number /* print: 300, designUnit 'Millimeter' */;\n extendedPanningArea?: boolean;\n fontSizeUnit?: 'Pixel' | 'Point';\n frameRate?: number;\n layout?: 'Free' | 'VerticalStack' | 'HorizontalStack' | 'DepthStack';\n mode?: 'Design' | 'Video' /* optional: timelines play in any mode */;\n pageDimensions?: { height?: number; width?: number };\n pageFormatId?: string;\n pixelScaleFactor?: number;\n };\n selected?: boolean;\n selectionEnabled?: boolean;\n shape?: Shape | null;\n spotColors?: { [ink: string]: { rgb?: { r: number; g: number; b: number }; cmyk?: { c: number; m: number; y: number; k: number }; cutout?: 'Solid' | 'Dashed' } | null } /* SCENE only: print inks, swatch-book names */;\n stack?: { spacing?: number; spacingInScreenspace?: boolean };\n stroke?: {\n cap?: 'Butt' | 'Round' | 'Square';\n color?: Color;\n cornerGeometry?: 'Bevel' | 'Miter' | 'Round';\n dashArray?: number[];\n dashEndCap?: 'Butt' | 'Round' | 'Square';\n dashOffset?: number;\n dashStartCap?: 'Butt' | 'Round' | 'Square';\n enabled?: boolean;\n endCap?: 'Butt' | 'Round' | 'Square';\n fill?: Fill | null /* paints the stroke instead of stroke.color: 'color', 'gradient/linear|radial|conical' or 'stripe'; graphic and page blocks; null = stroke.color again */;\n miterLimit?: number;\n overprint?: boolean /* no knockout of inks below (fill.overprint too) */;\n position?: 'Center' | 'Inner' | 'Outer';\n startCap?: 'Butt' | 'Round' | 'Square';\n style?: 'Dashed' | 'DashedRound' | 'Dotted' | 'LongDashed' | 'LongDashedRound' | 'Solid';\n width?: Length;\n };\n subtitles?: string /* captionTrack, WRITE-only: SRT/VTT uri replaces its captions */;\n text?: {\n animators?: TextAnimator[] /* in signatures.d.ts; [] clears */;\n automaticFontSizeEnabled?: boolean;\n baselineShift?: number | string /* + up; per range: ranges[i] */;\n case?: TextCase /* 'Uppercase' lifts tracking < 0.05 to 0.1 */;\n clipLinesOutsideOfFrame?: boolean;\n color?: Color;\n decoration?: TextDecorationConfig;\n externalReference?: string;\n font?: { family: string; weight?: FontWeight; style?: string } /* create only: a lookup */ | { typeface: Typeface; uri?: string } /* 400 unless a weight is written */;\n fontSize?: string /* needs a unit: '64px' | '24pt'; reads answer one too — parseFloat() before math */;\n hasClippedLines?: boolean;\n horizontalAlignment?: 'Left' | 'Right' | 'Center' | 'Justify' | 'Auto';\n letterSpacing?: number;\n lineHeight?: number /* engine scale */ | { visual: number } /* CSS-style */;\n lineHeightVisual?: number /* READ-ONLY: lineHeight in CSS terms */;\n listStyle?: ListStyle /* whole block; nesting via paragraphs: [{ index, listLevel }] */;\n maxAutomaticFontSize?: number;\n minAutomaticFontSize?: number;\n paragraphs?: { index: number; from?: number; listStyle?: ListStyle; listLevel?: number; horizontalAlignment?: 'Left' | 'Right' | 'Center' | 'Justify' | 'Auto'; lineHeight?: number | { visual: number } }[];\n paragraphSpacing?: number /* engine scale */ | { px: number } | { em: number };\n path?: string /* SVG path baseline */ | { shape: 'circle'; diameter: number; align?: 'top' | 'bottom' | number } | null;\n pathExternalRef?: string;\n pathFlipped?: boolean /* true = underside, reversed direction */;\n pathOffset?: number /* 0..1 start along the path */;\n ranges?: { from: number; to: number; color?: Color; weight?: FontWeight; style?: string; size?: string /* px or pt string */; case?: TextCase; scriptStyle?: ScriptStyle; baselineShift?: number | string; typeface?: Typeface; decoration?: TextDecorationConfig; kerning?: number }[];\n style?: string;\n subscriptFontScale?: number;\n subscriptVerticalShift?: number;\n superscriptFontScale?: number;\n superscriptVerticalShift?: number;\n string?: string;\n typeface?: string;\n useContextualAlternates?: boolean;\n useContextualLigatures?: boolean;\n useDiscretionaryLigatures?: boolean;\n useKerning?: boolean;\n useLigatures?: boolean;\n verticalAlignment?: 'Top' | 'Bottom' | 'Center';\n weight?: string;\n };\n track?: { automaticallyManageBlockOffsets?: boolean };\n transform?: {\n anchor?: { x?: Length; y?: Length };\n autoOrient?: boolean;\n hasAnchor?: boolean /* read-only */;\n scale?: { x?: number; y?: number };\n skew?: number;\n skewAxis?: number;\n };\n transformLocked?: boolean;\n transformParent?: BlockRef | null;\n transition?: Transition | null;\n type?: string;\n uuid?: string;\n valueSets?: { [set: string]: { values?: { [variable: string]: string | { color: Color } | { number: number } | { image: string } | { font: { family: string } } | null }; rename?: string } | null } /* SCENE: named alternative values; variables holds the defaults */;\n variables?: { [name: string]: string | { color: Color } | { number: number } | { image: string } | { font: { family: string } } | { rename: string } | null };\n visible?: boolean;\n width?: Length | `${number}%`;\n widthMode?: 'Absolute' | 'Percent' | 'Auto';\n}\n// Attachments. The type field picks the arm, and the arm names every prop\n// that type carries — nothing else applies. Assigning one whose type MATCHES\n// what is already attached edits it in place; a different type replaces it.\n// Each shorthand is also valid as '//ly.img.ubq/<slot>/<name>'.\n// Their angles (stripe fill, star, subshapes, modifiers, effects, the venetian_blinds and wave_warp direction included) are radians.\ntype Fill = { enabled?: boolean; overprint?: boolean; keyframes?: Keyframes } & (\n | { type: 'color'; color?: { value?: Color } }\n | { type: 'gradient/linear'; stops?: GradientColorStop[]; gradient?: { linear?: { endPointX?: number; endPointY?: number; startPointX?: number; startPointY?: number }; }; }\n | { type: 'gradient/radial'; stops?: GradientColorStop[]; gradient?: { radial?: { centerPointX?: number; centerPointY?: number; focalX?: number; focalY?: number; radius?: number }; }; }\n | { type: 'gradient/conical'; stops?: GradientColorStop[]; gradient?: { conical?: { centerPointX?: number; centerPointY?: number }; }; }\n | { type: 'image'; uri?: string /* shorthand for image.imageFileURI */; sourceSet?: Source[]; placeholderBehavior?: { enabled?: boolean } /* a graphic's replace-me switch: on its fill, never on the block */; image?: { externalReference?: string; imageFileURI?: string; previewFileURI?: string }; }\n | { type: 'video'; uri?: string /* shorthand for video.fileURI */; playback?: { trimOffset?: number; trimLength?: number; volume?: number } /* as block playback */; placeholderBehavior?: { enabled?: boolean } /* a graphic's replace-me switch: on its fill, never on the block */; video?: { fileURI?: string; totalDuration?: number }; }\n | { type: 'pixelStream'; pixelStream?: { orientation?: 'Up' | 'Down' | 'Left' | 'Right' | 'UpMirrored' | 'DownMirrored' | 'LeftMirrored' | 'RightMirrored' } }\n | { type: 'stripe'; stripe?: { angle?: number; color?: Color; gap?: number; width?: number } }\n);\ntype Shape = { modifiers?: Modifier[] /* applied in order; [] clears */; keyframes?: Keyframes } & (\n | { type: 'rect'; rect?: { cornerRadiusBL?: number; cornerRadiusBR?: number; cornerRadiusTL?: number; cornerRadiusTR?: number } }\n | { type: 'line' }\n | { type: 'ellipse' }\n | { type: 'polygon'; polygon?: { cornerRadius?: number /* design units */; sides?: number } }\n | { type: 'star'; star?: { cornerRadius?: number /* design units */; innerDiameter?: number /* innerRadius / outerRadius */; innerRadius?: number /* fraction of the shape's frame, as outerRadius; default 0.5 */; innerRoundness?: number; outerRadius?: number /* fraction of the shape's frame, per axis: 1 (default) puts a tip on its edge; never pixels */; outerRoundness?: number; points?: number; rotation?: number } }\n | { type: 'vector_path'; vector_path?: { cornerRadius?: number; fillRule?: 'EvenOdd' | 'NonZero'; height?: number; holes?: string[] /* cut-outs, wound for you */; path?: string; width?: number /* width/height: the path's frame, not the block size */ } }\n | { type: 'compound'; subshapes?: Subshape[] /* combined in order by compound.mode; [] clears */; compound?: { fillRule?: 'EvenOdd' | 'NonZero'; height?: number; mode?: 'Merge' | 'Add' | 'Subtract' | 'Intersect' | 'Exclude'; width?: number; }; }\n);\n// Subshape and modifier angles are radians; units: api#shapes.md.\ntype Subshape = Shape & { height?: number; rotation?: number; skew?: number; skewAxis?: number; width?: number; anchor?: { x?: number; y?: number }; position?: { x?: number; y?: number }; scale?: { x?: number; y?: number } };\ntype Modifier = { keyframes?: Keyframes } & (\n | { type: 'trim'; trim?: { end?: number; mode?: 'Simultaneous' | 'Individual'; offset?: number; start?: number } }\n | { type: 'repeater'; repeater?: { anchorX?: number; anchorY?: number; composite?: 'Below' | 'Above'; copies?: number; endOpacity?: number; offset?: number; positionX?: number; positionY?: number; rotation?: number; scaleX?: number; scaleY?: number; startOpacity?: number } }\n | { type: 'round_corners'; round_corners?: { radius?: number } }\n | { type: 'offset'; offset?: { amount?: number; join?: 'Bevel' | 'Miter' | 'Round'; miterLimit?: number } }\n | { type: 'zigzag'; zigzag?: { pointType?: 'Corner' | 'Smooth'; ridges?: number; size?: number } }\n | { type: 'pucker_bloat'; pucker_bloat?: { amount?: number } }\n | { type: 'twist'; twist?: { angle?: number; centerX?: number; centerY?: number } }\n);\ntype Blur = { enabled?: boolean; keyframes?: Keyframes } & (\n | { type: 'uniform'; uniform?: { intensity?: number; mode?: 'Fill' | 'Block' } }\n | { type: 'linear'; linear?: { blurRadius?: number; x1?: number; x2?: number; y1?: number; y2?: number } }\n | { type: 'mirrored'; mirrored?: { blurRadius?: number; gradientSize?: number; size?: number; x1?: number; x2?: number; y1?: number; y2?: number } }\n | { type: 'radial'; radial?: { blurRadius?: number; gradientRadius?: number; radius?: number; x?: number; y?: number } }\n);\n// Effect (the effects: [...] arms) is below the upstream marker, for its size.\ntype Mask = { shape: Shape | Shape['type']; expansion?: number; feather?: number; inverted?: boolean; mode?: 'Add' | 'Subtract' | 'Intersect' | 'Lighten' | 'Darken' | 'Difference' | 'None'; opacity?: number; keyframes?: Keyframes };\ntype Animation = { duration?: number /* s; a loop's: one cycle */; easing?: AnimationEasing /* ignored by pop spin_loop fade_loop blur_loop pulsating_loop breathing_loop jump_loop squeeze_loop sway_loop typewriter_text block_swipe_text */; writingStyle?: 'Block' | 'Line' | 'Character' | 'Word' /* text only: slide pan fade blur grow zoom pop wipe baseline spin block_swipe_text */; overlap?: number /* 0–1, text units */ } & (\n | { type: 'slide'; slide?: { direction?: number /* radians: 0 = right, π/2 down, π left, 3π/2 up */; fade?: boolean } }\n | { type: 'pan'; pan?: { direction?: number /* radians, as slide */; distance?: number; fade?: boolean } }\n | { type: 'fade' }\n | { type: 'blur'; blur?: { fade?: boolean; intensity?: number } }\n | { type: 'grow'; grow?: { direction?: 'Horizontal' | 'Vertical' | 'All' | 'TopLeft' | 'TopRight' | 'BottomLeft' | 'BottomRight'; scaleFactor?: number } }\n | { type: 'zoom'; zoom?: { fade?: boolean } }\n | { type: 'pop' }\n | { type: 'wipe'; wipe?: { direction?: 'Up' | 'Right' | 'Down' | 'Left' } }\n | { type: 'baseline'; baseline?: { direction?: 'Up' | 'Right' | 'Down' | 'Left' } }\n | { type: 'crop_zoom'; crop_zoom?: { fade?: boolean; scale?: number } }\n | { type: 'spin'; spin?: { direction?: 'Clockwise' | 'CounterClockwise'; fade?: boolean; intensity?: number } }\n | { type: 'spin_loop'; spin_loop?: { direction?: 'Clockwise' | 'CounterClockwise' } }\n | { type: 'fade_loop' }\n | { type: 'blur_loop'; blur_loop?: { intensity?: number } }\n | { type: 'pulsating_loop'; pulsating_loop?: { intensity?: number } }\n | { type: 'breathing_loop'; breathing_loop?: { intensity?: number } }\n | { type: 'jump_loop'; jump_loop?: { direction?: 'Up' | 'Right' | 'Down' | 'Left'; intensity?: number } }\n | { type: 'squeeze_loop' }\n | { type: 'sway_loop'; sway_loop?: { intensity?: number } }\n | { type: 'scale_loop' }\n | { type: 'typewriter_text'; typewriter_text?: { writingStyle?: 'Character' | 'Word' } }\n | { type: 'block_swipe_text'; block_swipe_text?: { blockColor?: Color; direction?: 'Up' | 'Right' | 'Down' | 'Left'; useTextColor?: boolean } }\n | { type: 'spread_text'; spread_text?: { fade?: boolean; intensity?: number } }\n | { type: 'merge_text'; merge_text?: { direction?: 'Right' | 'Left'; intensity?: number } }\n | { type: 'ken_burns'; ken_burns?: { direction?: 'Up' | 'Right' | 'Down' | 'Left'; fade?: boolean; travelDistanceRatio?: number; zoomIntensity?: number } }\n);\ntype Transition = { overlap?: boolean; duration?: number /* s, default 1.2: overlap with the next clip */; easing?: AnimationEasing /* default EaseInOutQuint */ } & (\n | { type: 'cross-fade'; 'cross-fade'?: { morph?: boolean }; }\n | { type: 'cross-blur'; 'cross-blur'?: { morph?: boolean; sigma?: number }; }\n | { type: 'cross-spin'; 'cross-spin'?: { direction?: 'Clockwise' | 'CounterClockwise'; intensity?: number }; }\n | { type: 'cross-zoom'; 'cross-zoom'?: { morph?: boolean; zoom?: number }; }\n | { type: 'cross-warp'; 'cross-warp'?: { morph?: boolean; zoom?: number }; }\n | { type: 'push'; push?: { direction?: 'Left' | 'Right' | 'Up' | 'Down'; morph?: boolean } }\n | { type: 'slide'; slide?: { direction?: 'Left' | 'Right' | 'Up' | 'Down'; morph?: boolean } }\n | { type: 'stack'; stack?: { direction?: 'Left' | 'Right' | 'Up' | 'Down'; morph?: boolean } }\n | { type: 'splice'; splice?: { bandCount?: number; direction?: 'Left' | 'Right' | 'Up' | 'Down'; morph?: boolean } }\n | { type: 'diagonal-splice'; 'diagonal-splice'?: { direction?: 'RaisedRamp' | 'LoweredRamp'; morph?: boolean }; }\n | { type: 'fade'; fade?: { color?: Color; morph?: boolean } }\n | { type: 'fade-to-white'; 'fade-to-white'?: { morph?: boolean }; }\n | { type: 'fade-to-black'; 'fade-to-black'?: { morph?: boolean }; }\n | { type: 'color-wipe'; 'color-wipe'?: { color?: Color; direction?: 'Left' | 'Right' | 'Up' | 'Down'; morph?: boolean }; }\n | { type: 'line-wipe'; 'line-wipe'?: { morph?: boolean }; }\n | { type: 'wipe'; wipe?: { direction?: 'Left' | 'Right' | 'Up' | 'Down'; morph?: boolean } }\n | { type: 'clock-wipe' }\n | { type: 'chop'; chop?: { corner?: 'TopLeft' | 'TopRight' | 'BottomLeft' | 'BottomRight'; direction?: 'Clockwise' | 'CounterClockwise'; morph?: boolean } }\n | { type: 'gradient-fade'; 'gradient-fade'?: { color?: Color; direction?: 'Left' | 'Right' | 'Up' | 'Down'; morph?: boolean }; }\n | { type: 'two-stripes'; 'two-stripes'?: { direction?: 'Horizontal' | 'Vertical'; morph?: boolean }; }\n);\n// ---- vocabulary referenced above (hoisted from the upstream core) ----\ninterface CMYKColor {\n c: number;\n m: number;\n y: number;\n k: number;\n tint?: number /* 0..1, default 1 */;\n}\ninterface CMYKColor {\n c: number;\n m: number;\n y: number;\n k: number;\n tint?: number /* 0..1, default 1 */;\n}\ninterface Font {\n uri: string;\n subFamily?: string;\n weight?: FontWeight;\n style?: FontStyle;\n}\ninterface GradientColorStop {\n color: Color;\n stop: number;\n}\ninterface RGBAColor {\n r: number;\n g: number;\n b: number;\n a: number;\n}\ninterface RGBAColor$1 {\n r: number;\n g: number;\n b: number;\n a: number;\n}\ninterface Source {\n uri: string;\n width: number;\n height: number;\n}\ninterface SpotColor {\n name: string /* a spotColors ink */;\n tint?: number /* 0..1, default 1 */;\n externalReference?: string /* default '' */;\n}\ninterface SpotColor {\n name: string /* a spotColors ink */;\n tint?: number /* 0..1, default 1 */;\n externalReference?: string /* default '' */;\n}\ninterface TextDecorationConfig {\n lines: TextDecorationLine[];\n style?: TextDecorationStyle;\n underlineColor?: Color;\n underlineThickness?: number;\n underlineOffset?: number;\n skipInk?: boolean;\n}\ninterface Typeface {\n name: string;\n fonts: Font[];\n}\ntype AnimationEasing = 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut' | 'EaseInQuart' | 'EaseOutQuart' | 'EaseInOutQuart' | 'EaseInQuint' | 'EaseOutQuint' | 'EaseInOutQuint' | 'EaseInBack' | 'EaseOutBack' | 'EaseInOutBack' | 'EaseInSpring' | 'EaseOutSpring' | 'EaseInOutSpring';\ntype AnimationEasing$1 = 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut' | 'EaseInQuart' | 'EaseOutQuart' | 'EaseInOutQuart' | 'EaseInQuint' | 'EaseOutQuint' | 'EaseInOutQuint' | 'EaseInBack' | 'EaseOutBack' | 'EaseInOutBack' | 'EaseInSpring' | 'EaseOutSpring' | 'EaseInOutSpring';\ntype Color = RGBAColor | CMYKColor | SpotColor;\ntype Color$1 = RGBAColor$1 | CMYKColor$1 | SpotColor$1;\ntype DesignBlockId = number;\ntype DesignBlockType = 'scene' | 'stack' | 'camera' | 'page' | 'graphic' | 'audio' | 'text' | 'group' | 'cutout' | 'track' | 'caption' | 'captionTrack' | 'exclusionArea' | 'pageSlice'; // each also valid as '//ly.img.ubq/<name>'\ntype FontStyle = 'normal' | 'italic';\ntype FontWeight = 'thin' | 'extraLight' | 'light' | 'normal' | 'medium' | 'semiBold' | 'bold' | 'extraBold' | 'heavy';\ntype ListStyle = 'None' | 'Unordered' | 'Ordered';\ntype Scope = string;\ntype Scope$1 = 'text/edit' | 'text/character' | 'fill/change' | 'fill/changeType' | 'stroke/change' | 'shape/change' | 'layer/move' | 'layer/resize' | 'layer/rotate' | 'layer/flip' | 'layer/crop' | 'layer/opacity' | 'layer/blendMode' | 'layer/visibility' | 'layer/clipping' | 'appearance/adjustments' | 'appearance/filter' | 'appearance/effect' | 'appearance/blur' | 'appearance/shadow' | 'appearance/animation' | 'lifecycle/destroy' | 'lifecycle/duplicate' | 'editor/add' | 'editor/select';\ntype ScriptStyle = 'Normal' | 'Superscript' | 'Subscript';\ntype TextCase = 'Normal' | 'Uppercase' | 'Lowercase' | 'Titlecase';\ntype TextDecorationLine = 'None' | 'Underline' | 'Strikethrough' | 'Overline';\ntype TextDecorationStyle = 'Solid' | 'Double' | 'Dotted' | 'Dashed' | 'Wavy';\n\n// ============================================================================\n// Upstream CE.SDK surface (flattened) follows — REFERENCE ONLY: edit code\n// never calls it; engine.design above covers it. Exports are the export tool.\n// ============================================================================\n// engine.design's setSettings/getSettings (kept here, outside the inline\n// section, for its size): editor settings in the props dialect.\ninterface SettingsProps {\n archival?: { bundleOnlyUsedFontVariants?: boolean };\n basePath?: string;\n blockAnimations?: { enabled?: boolean };\n borderOutlineColor?: Color;\n camera?: {\n clamping?: { overshootMode?: 'Center' | 'Reverse' };\n };\n clampThumbnailTextureSizes?: boolean;\n clearColor?: Color;\n clip?: {\n defaultDurationValue?: number;\n defaultTransitionOverlapEnabled?: boolean;\n initialDurationMode?: 'default' | 'followParent';\n };\n colorMaskingSettings?: { maskColor?: Color };\n colorPicker?: { colorMode?: string };\n controlGizmo?: {\n blockScaleDownLimit?: number;\n moveHandleVisibility?: 'auto' | 'always' | 'never';\n resizeHandlesVisibility?: 'auto' | 'always' | 'never';\n rotateHandlesVisibility?: 'auto' | 'always' | 'never';\n scaleHandlesVisibility?: 'auto' | 'always' | 'never';\n showCropHandles?: boolean;\n showCropScaleHandles?: boolean;\n };\n cropOverlayColor?: Color;\n defaultEmojiFontFileUri?: string;\n defaultFontFileUri?: string;\n doubleClickSelectionMode?: 'Direct' | 'Hierarchical';\n doubleClickToCropEnabled?: boolean;\n dragToSwapFills?: { enabled?: boolean; longPressDurationMs?: number };\n errorStateColor?: Color;\n exportPendingTimeoutSeconds?: number;\n fallbackCMYKProfileUri?: string;\n fallbackFontUri?: string;\n forceSystemEmojis?: boolean;\n grid?: { color?: Color; enabled?: boolean; snapEnabled?: boolean; spacingX?: number; spacingY?: number };\n handleFillColor?: Color;\n highlightColor?: Color;\n license?: string;\n listIndentPerLevel?: number /* em per level */;\n maxConcurrentRequestsPerHost?: number;\n maxImageSize?: number;\n maxPreviewResolution?: number;\n mouse?: { enableScroll?: boolean; enableZoom?: boolean };\n page?: {\n allowCropInteraction?: boolean;\n allowMoveInteraction?: boolean;\n allowResizeInteraction?: boolean;\n allowRotateInteraction?: boolean;\n allowShapeChange?: boolean;\n dimOutOfPageAreas?: boolean;\n exclusionAreaFillColor?: Color;\n exclusionAreaFrameColor?: Color;\n flipDimensionsOn90DegreeCropRotation?: boolean;\n highlightDropTarget?: boolean;\n highlightWhenCropping?: boolean;\n imageFillCoversBleed?: boolean;\n innerBorderColor?: Color;\n marginFillColor?: Color;\n marginFrameColor?: Color;\n marqueeSelectOnBodyDrag?: boolean;\n moveChildrenWhenCroppingFill?: boolean;\n outerBorderColor?: Color;\n pageSliceGuideColor?: Color;\n reparentBlocksToSceneWhenOutOfPage?: boolean;\n restrictPageSelectionToBorderAndTitle?: boolean;\n restrictResizeInteractionToFixedAspectRatio?: boolean;\n safetyFillColor?: Color;\n safetyFrameColor?: Color;\n safetyRevealDuringTransform?: boolean;\n selectWhenNoBlocksSelected?: boolean;\n title?: {\n appendPageName?: boolean;\n canEdit?: boolean;\n color?: Color;\n fontFileUri?: string;\n separator?: string;\n show?: boolean;\n showOnPageSlices?: boolean;\n showOnSinglePage?: boolean;\n showPageTitleTemplate?: boolean;\n };\n };\n pageHighlightColor?: Color;\n placeholderControls?: { showButton?: boolean; showOverlay?: boolean };\n placeholderHighlightColor?: Color;\n playback?: { showAllBlocks?: boolean };\n positionSnappingThreshold?: number;\n progressColor?: Color;\n resource?: { deferLoading?: boolean };\n rotationSnappingGuideColor?: Color;\n rotationSnappingThreshold?: number;\n showBuildVersion?: boolean;\n snappingGuideColor?: Color;\n tabStopInterval?: number;\n textVariableHighlightColor?: Color;\n timeline?: { trackVisibility?: string };\n touch?: {\n dragStartCanSelect?: boolean;\n pinchAction?: 'None' | 'Zoom' | 'Scale' | 'Auto' | 'Dynamic';\n rotateAction?: 'None' | 'Rotate';\n singlePointPanning?: boolean;\n };\n upload?: { supportedMimeTypes?: string };\n useSystemFontFallback?: boolean;\n web?: { fetchCredentials?: string };\n}\n// engine.design's effects: [...] (kept here, outside the inline section, for its\n// size): one arm per effect type, its options under a key named after it.\ntype Effect = { enabled?: boolean; keyframes?: Keyframes } & (\n | { type: 'adjustments'; adjustments?: { blacks?: number; brightness?: number; clarity?: number; contrast?: number; exposure?: number; gamma?: number; highlights?: number; saturation?: number; shadows?: number; sharpness?: number; temperature?: number; whites?: number } }\n | { type: 'bulge'; bulge?: { centerX?: number; centerY?: number; height?: number; horizontalRadius?: number; verticalRadius?: number } }\n | { type: 'corner_pin'; corner_pin?: { lowerLeftX?: number; lowerLeftY?: number; lowerRightX?: number; lowerRightY?: number; upperLeftX?: number; upperLeftY?: number; upperRightX?: number; upperRightY?: number } }\n | { type: 'cross_cut'; cross_cut?: { offset?: number; slices?: number; speedV?: number; time?: number } }\n | { type: 'displacement_map'; displacement_map?: { horizontalChannel?: 'Red' | 'Green' | 'Blue' | 'Alpha' | 'Luminance' | 'Hue' | 'Lightness' | 'Saturation' | 'Full' | 'Half' | 'Off'; mapBehavior?: 'Center' | 'Stretch' | 'Tile'; maxHorizontal?: number; maxVertical?: number; verticalChannel?: 'Red' | 'Green' | 'Blue' | 'Alpha' | 'Luminance' | 'Hue' | 'Lightness' | 'Saturation' | 'Full' | 'Half' | 'Off'; wrapPixels?: boolean } }\n | { type: 'dot_pattern'; dot_pattern?: { blur?: number; dots?: number; size?: number } }\n | { type: 'duotone_filter'; duotone_filter?: { darkColor?: Color; intensity?: number; lightColor?: Color } }\n | { type: 'extrude_blur'; extrude_blur?: { amount?: number } }\n | { type: 'fill'; fill?: { color?: Color; opacity?: number } }\n | { type: 'glow'; glow?: { amount?: number; darkness?: number; size?: number } }\n | { type: 'green_screen'; green_screen?: { colorMatch?: number; fromColor?: Color; smoothness?: number; spill?: number } }\n | { type: 'half_tone'; half_tone?: { angle?: number; scale?: number } }\n | { type: 'invert'; invert?: { channel?: 'RGB' | 'Red' | 'Green' | 'Blue' | 'HLS' | 'Hue' | 'Lightness' | 'Saturation' | 'YIQ' | 'Luma' | 'InPhaseChroma' | 'QuadratureChroma' | 'Alpha' } }\n | { type: 'levels'; levels?: { alphaGamma?: number; alphaInBlack?: number; alphaInWhite?: number; alphaOutBlack?: number; alphaOutWhite?: number; blueGamma?: number; blueInBlack?: number; blueInWhite?: number; blueOutBlack?: number; blueOutWhite?: number; clipToOutBlack?: boolean; clipToOutWhite?: boolean; greenGamma?: number; greenInBlack?: number; greenInWhite?: number; greenOutBlack?: number; greenOutWhite?: number; redGamma?: number; redInBlack?: number; redInWhite?: number; redOutBlack?: number; redOutWhite?: number; rgbGamma?: number; rgbInBlack?: number; rgbInWhite?: number; rgbOutBlack?: number; rgbOutWhite?: number } }\n | { type: 'linear_wipe'; linear_wipe?: { angle?: number; completion?: number; feather?: number } }\n | { type: 'linocut'; linocut?: { scale?: number } }\n | { type: 'liquid'; liquid?: { amount?: number; scale?: number; time?: number } }\n | { type: 'lut_filter'; lut_filter?: { filterId?: string; horizontalTileCount?: number; intensity?: number; lutFileURI?: string; verticalTileCount?: number } }\n | { type: 'mirror'; mirror?: { side?: number } }\n | { type: 'outliner'; outliner?: { amount?: number; passthrough?: number } }\n | { type: 'pixelize'; pixelize?: { horizontalPixelSize?: number; verticalPixelSize?: number } }\n | { type: 'posterize'; posterize?: { levels?: number } }\n | { type: 'radial_pixel'; radial_pixel?: { radius?: number; segments?: number } }\n | { type: 'radial_wipe'; radial_wipe?: { centerX?: number; centerY?: number; completion?: number; direction?: 'Clockwise' | 'Counterclockwise' | 'Both'; feather?: number; startAngle?: number } }\n | { type: 'recolor'; recolor?: { brightnessMatch?: number; colorMatch?: number; fromColor?: Color; smoothness?: number; toColor?: Color } }\n | { type: 'sharpie' }\n | { type: 'shift_channels'; shift_channels?: { takeAlphaFrom?: 'Alpha' | 'Red' | 'Green' | 'Blue' | 'Luminance' | 'Hue' | 'Lightness' | 'Saturation' | 'FullOn' | 'FullOff'; takeBlueFrom?: 'Alpha' | 'Red' | 'Green' | 'Blue' | 'Luminance' | 'Hue' | 'Lightness' | 'Saturation' | 'FullOn' | 'FullOff'; takeGreenFrom?: 'Alpha' | 'Red' | 'Green' | 'Blue' | 'Luminance' | 'Hue' | 'Lightness' | 'Saturation' | 'FullOn' | 'FullOff'; takeRedFrom?: 'Alpha' | 'Red' | 'Green' | 'Blue' | 'Luminance' | 'Hue' | 'Lightness' | 'Saturation' | 'FullOn' | 'FullOff' } }\n | { type: 'shifter'; shifter?: { amount?: number; angle?: number } }\n | { type: 'stroke'; stroke?: { allMasks?: boolean; brushSize?: number; color?: Color; end?: number; hardness?: number; maskIndex?: number; opacity?: number; paintStyle?: 'OnOriginalImage' | 'OnTransparent'; spacing?: number; start?: number } }\n | { type: 'threshold'; threshold?: { level?: number } }\n | { type: 'tilt_shift'; tilt_shift?: { amount?: number; position?: number } }\n | { type: 'tint'; tint?: { amount?: number; mapBlackTo?: Color; mapWhiteTo?: Color } }\n | { type: 'tritone'; tritone?: { amount?: number; highlights?: Color; midtones?: Color; shadows?: Color } }\n | { type: 'tv_glitch'; tv_glitch?: { distortion?: number; distortion2?: number; rollSpeed?: number; speed?: number } }\n | { type: 'venetian_blinds'; venetian_blinds?: { completion?: number; direction?: number; feather?: number; width?: number } }\n | { type: 'vignette'; vignette?: { darkness?: number; offset?: number } }\n | { type: 'wave_warp'; wave_warp?: { direction?: number; height?: number; phase?: number; waveType?: 'Sine' | 'Square' | 'Triangle' | 'Sawtooth'; width?: number } }\n);\n// engine.design's text.animators[i] / caption.animators[i] (kept here, outside\n// the inline section, for its size): a range selector over the glyphs and what\n// it does to them. Writing opacity/fillColor/strokeColor sets its *Enabled.\n// selectorStart/End/Offset: 0..1 of the text, or unit indices (end exclusive) with selectorUnits 'Index'; rotation: radians; skew/skewAxis: radians; lengths: design units, +y down; strokeWidth: needs the text stroke.enabled\ninterface TextAnimator {\n anchorX?: number | string; anchorY?: number | string; blurX?: number | string; blurY?: number | string;\n fillColor?: Color; fillColorEnabled?: boolean; opacity?: number; opacityEnabled?: boolean;\n positionX?: number | string; positionY?: number | string; rotation?: number; scaleX?: number; scaleY?: number;\n selectorAmount?: number; selectorBasedOn?: 'Characters' | 'CharactersExcludingSpaces' | 'Words' | 'Lines';\n selectorEaseHigh?: number; selectorEaseLow?: number; selectorEnabled?: boolean; selectorEnd?: number;\n selectorOffset?: number; selectorRandomize?: boolean; selectorSeed?: number;\n selectorShape?: 'Square' | 'RampUp' | 'RampDown' | 'Triangle' | 'Round' | 'Smooth';\n selectorSmoothness?: number; selectorStart?: number; selectorUnits?: 'Percentage' | 'Index'; skew?: number;\n skewAxis?: number; strokeColor?: Color; strokeColorEnabled?: boolean; strokeWidth?: number | string;\n tracking?: number | string; keyframes?: { [leaf: string]: unknown };\n}\n// Scalar get/set wrappers (setOpacity, setStrokeWidth, setPositionX, …),\n// is*/supports*/has* predicates, and editor-UI machinery are in\n// signatures-extended.d.ts — prefer engine.design.setProps/getProps/\n// getCapabilities and the capability matrix above; search the sibling\n// file signatures-extended.d.ts when you need the old names.\n\n// CE.SDK CreativeEngine — flattened API signatures. GENERATED by\n// scripts/lib/api-signatures.ts from the @cesdk/node index.d.ts; do not\n// edit. JSDoc is stripped, deprecated overloads with a surviving\n// namesake are dropped, and type aliases are flattened to their literal\n// unions so every string vocabulary is one lookup. Recipes live in\n// the api skill's recipes.md; this file is the exact call surface.\ninterface FrameInfo {\n frameCount: number;\n presentCount: number;\n busy: boolean;\n width: number;\n height: number;\n pixelRatio: number;\n format: 'rgba8-unpremul';\n origin: 'top-left';\n colorSpace: 'srgb' | 'extended-srgb' | 'display-p3';\n readable: boolean;\n}\ninterface FrameSurface {\n requestFrame(width: number, height: number, pixelRatio?: number): void;\n getFrameInfo(): FrameInfo;\n readFrame(target: Uint8Array): boolean;\n sendMouseMove(x: number, y: number, timestamp?: number): void;\n sendMouseButton(x: number, y: number, button: MouseButton, down: boolean, modifiers?: InputModifiers, timestamp?: number): void;\n mouseWheel(deltaX: number, deltaY: number, x?: number, y?: number, modifiers?: InputModifiers): boolean;\n sendKey(key: string, characters?: string, modifiers?: InputModifiers, timestamp?: number): void;\n}\ninterface InputModifiers {\n shift?: boolean;\n command?: boolean;\n alt?: boolean;\n}\nenum MouseButton {\n Left = 0,\n Right = 1,\n Middle = 2\n}\ntype FrameHandle = object;\ninterface EngineCanvas {\n attach?(surface: FrameSurface): void;\n beforeUpdate(surface: FrameSurface): void;\n afterUpdate(info: FrameInfo, surface: FrameSurface): void;\n requestFrame(tick: () => void, busy: boolean): FrameHandle;\n detach?(): void;\n}\ntype LogLevel = 'Info' | 'Warning' | 'Error';\n/** @deprecated Specifying log levels via `LogLevel.Info` has been deprecated. Please use the desired LogLevel string directly. */\nconst LogLevel: {\n readonly Info: 'Info';\n readonly Warning: 'Warning';\n readonly Error: 'Error';\n};\ntype Logger = (message: string, level?: LogLevel) => void;\ntype DesignBlockTypeShorthand = 'scene' | 'stack' | 'camera' | 'page' | 'graphic' | 'audio' | 'text' | 'group' | 'cutout' | 'track' | 'caption' | 'captionTrack' | 'exclusionArea' | 'pageSlice';\ntype DesignBlockTypeLonghand = `//ly.img.ubq/${DesignBlockTypeShorthand}`;\ntype ShapeTypeShorthand = 'rect' | 'line' | 'ellipse' | 'polygon' | 'star' | 'vector_path' | 'compound';\ntype ShapeTypeLonghand = `//ly.img.ubq/shape/${ShapeTypeShorthand}`;\ntype ShapeType = 'rect' | 'line' | 'ellipse' | 'polygon' | 'star' | 'vector_path' | 'compound'; // each also valid as '//ly.img.ubq/shape/<name>'\ntype FillTypeShorthand = 'color' | 'gradient/linear' | 'gradient/radial' | 'gradient/conical' | 'image' | 'video' | 'pixelStream' | 'stripe';\ntype FillTypeLonghand = `//ly.img.ubq/fill/${FillTypeShorthand}`;\ntype FillType = 'color' | 'gradient/linear' | 'gradient/radial' | 'gradient/conical' | 'image' | 'video' | 'pixelStream' | 'stripe'; // each also valid as '//ly.img.ubq/fill/<name>'\ntype EffectTypeShorthand = 'adjustments' | 'bulge' | 'corner_pin' | 'cross_cut' | 'displacement_map' | 'dot_pattern' | 'duotone_filter' | 'extrude_blur' | 'fill' | 'glow' | 'green_screen' | 'half_tone' | 'invert' | 'levels' | 'linear_wipe' | 'linocut' | 'liquid' | 'lut_filter' | 'mirror' | 'outliner' | 'pixelize' | 'posterize' | 'radial_pixel' | 'radial_wipe' | 'recolor' | 'sharpie' | 'shift_channels' | 'shifter' | 'stroke' | 'threshold' | 'tilt_shift' | 'tint' | 'tritone' | 'tv_glitch' | 'venetian_blinds' | 'vignette' | 'wave_warp';\ntype EffectTypeLonghand = `//ly.img.ubq/effect/${EffectTypeShorthand}`;\ntype EffectType = 'adjustments' | 'bulge' | 'corner_pin' | 'cross_cut' | 'displacement_map' | 'dot_pattern' | 'duotone_filter' | 'extrude_blur' | 'fill' | 'glow' | 'green_screen' | 'half_tone' | 'invert' | 'levels' | 'linear_wipe' | 'linocut' | 'liquid' | 'lut_filter' | 'mirror' | 'outliner' | 'pixelize' | 'posterize' | 'radial_pixel' | 'radial_wipe' | 'recolor' | 'sharpie' | 'shift_channels' | 'shifter' | 'stroke' | 'threshold' | 'tilt_shift' | 'tint' | 'tritone' | 'tv_glitch' | 'venetian_blinds' | 'vignette' | 'wave_warp'; // each also valid as '//ly.img.ubq/effect/<name>'\ntype ModifierTypeShorthand = 'trim' | 'repeater' | 'round_corners' | 'offset' | 'zigzag' | 'pucker_bloat' | 'twist';\ntype ModifierTypeLonghand = `//ly.img.ubq/modifier/${ModifierTypeShorthand}`;\ntype ModifierType = 'trim' | 'repeater' | 'round_corners' | 'offset' | 'zigzag' | 'pucker_bloat' | 'twist'; // each also valid as '//ly.img.ubq/modifier/<name>'\ntype BlurTypeShorthand = 'uniform' | 'linear' | 'mirrored' | 'radial';\ntype BlurTypeLonghand = `//ly.img.ubq/blur/${BlurTypeShorthand}`;\ntype BlurType = 'uniform' | 'linear' | 'mirrored' | 'radial'; // each also valid as '//ly.img.ubq/blur/<name>'\ntype AnimationTypeShorthand = 'slide' | 'pan' | 'fade' | 'blur' | 'grow' | 'zoom' | 'pop' | 'wipe' | 'baseline' | 'crop_zoom' | 'spin' | 'spin_loop' | 'fade_loop' | 'blur_loop' | 'pulsating_loop' | 'breathing_loop' | 'jump_loop' | 'squeeze_loop' | 'sway_loop' | 'scale_loop' | 'typewriter_text' | 'block_swipe_text' | 'spread_text' | 'merge_text' | 'ken_burns';\ntype AnimationTypeLonghand = `//ly.img.ubq/animation/${AnimationTypeShorthand}`;\ntype AnimationType = 'slide' | 'pan' | 'fade' | 'blur' | 'grow' | 'zoom' | 'pop' | 'wipe' | 'baseline' | 'crop_zoom' | 'spin' | 'spin_loop' | 'fade_loop' | 'blur_loop' | 'pulsating_loop' | 'breathing_loop' | 'jump_loop' | 'squeeze_loop' | 'sway_loop' | 'scale_loop' | 'typewriter_text' | 'block_swipe_text' | 'spread_text' | 'merge_text' | 'ken_burns'; // each also valid as '//ly.img.ubq/animation/<name>'\ntype TransitionTypeShorthand = 'none' | 'cross-fade' | 'cross-blur' | 'cross-spin' | 'cross-zoom' | 'cross-warp' | 'push' | 'slide' | 'stack' | 'splice' | 'diagonal-splice' | 'fade' | 'fade-to-white' | 'fade-to-black' | 'color-wipe' | 'line-wipe' | 'wipe' | 'clock-wipe' | 'chop' | 'gradient-fade' | 'two-stripes';\ntype TransitionTypeLonghand = `//ly.img.ubq/transition/${TransitionTypeShorthand}`;\ntype ObjectTypeLonghand = DesignBlockTypeLonghand | ShapeTypeLonghand | FillTypeLonghand | EffectTypeLonghand | ModifierTypeLonghand | BlurTypeLonghand | AnimationTypeLonghand | TransitionTypeLonghand | '//ly.img.ubq/text_animator' | '//ly.img.ubq/mask';\ntype ObjectType = ObjectTypeShorthand | ObjectTypeLonghand;\ntype HistoryId = number;\ntype SubscriptionId = number;\ntype Device = 'auto' | 'cpu' | 'gpu';\ntype EngineSelection = 'auto' | 'native' | 'wasm';\ninterface Configuration {\n baseURL: string;\n license?: string;\n userId?: string;\n core: {\n baseURL: string;\n };\n logger: Logger;\n featureFlags?: {\n [flag: string]: boolean | string;\n };\n /** @deprecated This config key is not used anymore and will be removed. */\n presets: {\n typefaces?: {\n [id: string]: TypefaceDefinition;\n };\n };\n forceWebGL1?: boolean;\n audioOutput?: 'auto' | 'none';\n role?: RoleString;\n device?: Device;\n engine?: EngineSelection;\n}\ninterface ExportArea {\n x: number;\n y: number;\n width: number;\n height: number;\n}\ninterface ExportOptions {\n mimeType?: 'application/pdf' | 'application/octet-stream' | ImageMimeType;\n pngCompressionLevel?: number;\n jpegQuality?: number;\n webpQuality?: number;\n targetWidth?: number;\n targetHeight?: number;\n exportPdfWithHighCompatibility?: boolean;\n /** @deprecated Set `outputColorSpace` to `'CMYK'` instead, which writes the same file. */\n exportPdfWithDeviceCMYK?: boolean;\n outputColorSpace?: 'RGB' | 'CMYK';\n outputProfileMode?: 'Off' | 'Convert' | 'Assign';\n embedProfiles?: boolean;\n preserveBlack?: boolean;\n exportPdfWithUnderlayer?: boolean;\n underlayerSpotColorName?: string;\n underlayerOffset?: number;\n underlayerRenderRatio?: number;\n underlayerMaxError?: number;\n underlayerMinFeatureWidth?: number;\n allowTextOverhang?: boolean;\n exportArea?: ExportArea;\n exportPdfWithCropMarks?: boolean;\n exportPdfWithFoldMarks?: boolean;\n exportPdfWithRegistrationMarks?: boolean;\n exportPdfPageSlices?: boolean;\n printMarkOffset?: number;\n cropMarkLength?: number;\n printMarkWidth?: number;\n pdfImageQuality?: number;\n pdfChunkSize?: number;\n onProgress?: (exportedPages: number, totalPages: number) => void;\n abortSignal?: AbortSignal;\n}\ntype VideoBitrateMode = 'System' | 'Auto';\ninterface VideoExportOptions {\n coverTimeOffset?: number | null;\n mimeType?: string;\n onProgress?: (numberOfRenderedFrames: number, numberOfEncodedFrames: number, totalNumberOfFrames: number) => void;\n abortSignal?: AbortSignal;\n timeOffset?: number;\n duration?: number;\n h264Profile?: number;\n h264Level?: number;\n videoBitrate?: number | VideoBitrateMode;\n audioBitrate?: number;\n audioCodec?: AudioCodec;\n framerate?: number;\n /** @deprecated Ignored. The export uses the target size when `targetWidth` or `targetHeight` is above 0. */\n useTargetSize?: boolean;\n targetWidth?: number;\n targetHeight?: number;\n allowTextOverhang?: boolean;\n videoCodec?: VideoCodec;\n exportAlpha?: boolean;\n /** @deprecated Use `videoCodec`. `true` selects `VideoCodec.HEVC`. */\n enableHEVC?: boolean;\n}\ninterface AudioExportOptions {\n mimeType?: AudioMimeType;\n timeOffset?: number;\n duration?: number;\n sampleRate?: number;\n numberOfChannels?: number;\n skipEncoding?: boolean;\n audioCodec?: AudioCodec;\n onProgress?: (rendered: number, encoded: number, total: number) => void;\n abortSignal?: AbortSignal;\n}\ninterface ProfileSlot {\n role: 'Default' | 'Output';\n space: 'RGB' | 'CMYK' | 'Gray';\n}\ntype XYWH = [\n x: number,\n y: number,\n w: number,\n h: number\n];\ntype RGBA = [\n r: number,\n g: number,\n b: number,\n a: number\n];\ntype CMYK = [\n c: number,\n m: number,\n y: number,\n k: number\n];\ninterface Buffer$1 {\n handle: string;\n buffer: Uint8Array;\n}\ninterface TransientResource {\n URL: string;\n size: number;\n}\ninterface BlockStateEngineError extends Error {\n code: string;\n message: string;\n category: string;\n hint: string;\n args: Record<string, boolean | number | string>;\n docsUrl: string | null;\n silent: boolean;\n}\ninterface BlockStateError {\n type: 'Error';\n error: 'AudioDecoding' | 'ImageDecoding' | 'FileFetch' | 'Unknown' | 'VideoDecoding' | 'SoftProof';\n engineError?: BlockStateEngineError;\n}\ninterface BlockStatePending {\n type: 'Pending';\n progress: number;\n}\ninterface BlockStateReady {\n type: 'Ready';\n}\ntype BlockState = BlockStateError | BlockStatePending | BlockStateReady;\ntype TextFontUsageStatus = 'resolved' | 'substituted' | 'unresolved';\ninterface TextFontUsageRun {\n from: number;\n to: number;\n requestedFontFileUri: string;\n actualFontFileUri?: string;\n status: TextFontUsageStatus;\n effectiveFontSize: number;\n requested?: FontRequest;\n}\ninterface TextFontUsage {\n state: BlockState;\n text: string;\n runs: TextFontUsageRun[];\n}\ntype CutoutType = 'Solid' | 'Dashed';\ninterface CharacterInkBox {\n x: number;\n y: number;\n width: number;\n height: number;\n baselineY: number;\n}\ninterface TextOvershoot {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\ninterface TextLayoutDiagnostics {\n overshoot: TextOvershoot;\n totalLineCount: number;\n visibleLineCount: number;\n clippedLineCount: number;\n requiredHeight: number;\n fontScale: number;\n}\ninterface TextRenderDiagnostics {\n fontUsage: TextFontUsage;\n missingGlyphRanges: Range[];\n layout?: TextLayoutDiagnostics;\n}\ninterface FileSupportUse {\n kind: 'image' | 'audio' | 'video';\n status: 'supported' | 'unsupported' | 'unchecked' | 'pending';\n reason: '' | 'formatUnsupported' | 'kindUnavailable' | 'featureDisabled' | 'licenseRestricted' | 'codecUnsupported' | 'codecUnchecked' | 'codecPending';\n}\ninterface FileSupport {\n mimeType: string;\n extensions: string[];\n inspection: 'format' | 'metadata';\n uses: FileSupportUse[];\n}\ninterface Range {\n from: number;\n to: number;\n}\ninterface Insets {\n top: number;\n right: number;\n bottom: number;\n left: number;\n}\ninterface FontRequest {\n family: string;\n subFamily?: string;\n weight?: FontWeight;\n style?: FontStyle;\n postScriptName?: string;\n assetSourceId?: string;\n assetId?: string;\n}\ninterface FontResolverResult {\n typeface: Typeface;\n font: Font;\n}\ntype TypefaceResolver = (request: FontRequest) => FontResolverResult | undefined | Promise<FontResolverResult | undefined>;\ninterface VariationAxis {\n tag: string;\n minValue: number;\n defaultValue: number;\n maxValue: number;\n}\ninterface FontInfo {\n family: string;\n legacyFamily: string;\n subFamily: string;\n postScriptName: string;\n weight: number;\n fontWeight: FontWeight;\n style: FontStyle;\n isVariable: boolean;\n variationAxes: VariationAxis[];\n openTypeFeatures: string[];\n}\ninterface OpenTypeFeature {\n tag: string;\n value: number;\n}\ninterface VariationAxisValue {\n tag: string;\n value: number;\n}\ntype Locale = string;\ntype Groups = string[];\ntype SortingOrder = 'None' | 'Ascending' | 'Descending';\ntype AssetMetaData = {\n mimeType?: string;\n blockType?: string;\n fillType?: string;\n shapeType?: string;\n kind?: string;\n uri?: string;\n thumbUri?: string;\n previewUri?: string;\n sourceSet?: Source[];\n filename?: string;\n vectorPath?: string;\n width?: number;\n height?: number;\n duration?: string;\n effectType?: string;\n blurType?: string;\n looping?: boolean;\n} & Record<string, unknown>;\ninterface AssetRGBColor {\n colorSpace: 'sRGB';\n r: number;\n g: number;\n b: number;\n}\ninterface AssetCMYKColor {\n colorSpace: 'CMYK';\n c: number;\n m: number;\n y: number;\n k: number;\n}\ninterface AssetSpotColor {\n colorSpace: 'SpotColor';\n name: string;\n externalReference: string;\n representation: AssetRGBColor | AssetCMYKColor;\n}\ntype AssetColor = AssetRGBColor | AssetCMYKColor | AssetSpotColor;\ninterface AssetFixedAspectRatio {\n type: 'FixedAspectRatio';\n width: number;\n height: number;\n}\ninterface AssetFreeAspectRatio {\n type: 'FreeAspectRatio';\n}\ninterface AssetContentAspectRatio {\n type: 'ContentAspectRatio';\n}\ninterface AssetFixedSize {\n type: 'FixedSize';\n width: number;\n height: number;\n designUnit: DesignUnit;\n}\ntype AssetTransformPreset = AssetFixedAspectRatio | AssetFreeAspectRatio | AssetContentAspectRatio | AssetFixedSize;\ninterface AssetPayload {\n color?: AssetColor;\n sourceSet?: Source[];\n typeface?: Typeface;\n transformPreset?: AssetTransformPreset;\n properties?: AssetProperty[];\n stylePreset?: AssetStylePreset;\n}\ninterface Asset {\n id: string;\n groups?: Groups;\n meta?: AssetMetaData;\n payload?: AssetPayload;\n}\ninterface AssetsQuery {\n query?: string;\n page?: number;\n perPage?: number;\n groups?: Groups;\n tags?: string | string[];\n locale?: Locale;\n excludeGroups?: Groups;\n sortKey?: string;\n sortingOrder?: SortingOrder | string;\n sortActiveFirst?: boolean;\n filter?: AssetFilter[];\n facets?: AssetFacetPath[];\n}\ntype AssetQueryData = Omit<AssetsQuery, 'sortingOrder'> & {\n page: number;\n perPage: number;\n sortingOrder?: SortingOrder;\n};\ntype AssetPropertyPath = 'label' | 'tags' | 'id' | 'groups' | `meta.${string}`;\ntype AssetPropertyFilter = {\n property: AssetPropertyPath;\n} & ({\n contains: string;\n equals?: never;\n} | {\n equals: string;\n contains?: never;\n});\ntype AssetFilter = AssetPropertyFilter | {\n and: AssetFilter[];\n or?: never;\n not?: never;\n property?: never;\n} | {\n or: AssetFilter[];\n and?: never;\n not?: never;\n property?: never;\n} | {\n not: AssetFilter;\n and?: never;\n or?: never;\n property?: never;\n};\ntype AssetFacetPath = 'tags' | 'groups' | `meta.${string}`;\ninterface AssetFacetValue {\n value: string;\n count?: number;\n}\ninterface AssetsQueryResult<T extends AssetResult = AssetResult> {\n assets: T[];\n currentPage: number;\n total: number;\n nextPage?: number;\n facets?: {\n [path: string]: AssetFacetValue[];\n };\n}\ninterface AssetSourceLicense {\n name: string;\n url?: string;\n}\ninterface AssetSourceCredits {\n name: string;\n url?: string;\n}\ninterface SceneMarker {\n name: string;\n time: number;\n duration: number;\n}\ninterface AudioTrackInfo {\n audioCodec: string;\n channels: number;\n sampleRate: number;\n audioDuration: number;\n numAudioPackets: number;\n numAudioFrames: number;\n trackName: string;\n trackIndex: number;\n language: string;\n}\nconst VideoCodec: {\n readonly H264: 0;\n readonly HEVC: 1;\n readonly VP8: 2;\n readonly VP9: 3;\n readonly AV1: 4;\n readonly Auto: 5;\n};\ntype VideoCodec = (typeof VideoCodec)[keyof typeof VideoCodec];\nconst AudioCodec: {\n readonly Auto: 0;\n readonly AAC: 1;\n readonly Opus: 2;\n readonly Vorbis: 3;\n};\ntype AudioCodec = (typeof AudioCodec)[keyof typeof AudioCodec];\nconst MimeType: {\n readonly Png: 'image/png';\n readonly Jpeg: 'image/jpeg';\n readonly WebP: 'image/webp';\n readonly Tga: 'image/x-tga';\n readonly Svg: 'image/svg+xml';\n readonly Wav: 'audio/wav';\n readonly Mp4Audio: 'audio/mp4';\n readonly WebMAudio: 'audio/webm';\n readonly Mp4: 'video/mp4';\n readonly WebM: 'video/webm';\n readonly QuickTime: 'video/quicktime';\n readonly Binary: 'application/octet-stream';\n readonly Pdf: 'application/pdf';\n readonly Zip: 'application/zip';\n};\ntype MimeType = (typeof MimeType)[keyof typeof MimeType];\ntype ImageMimeType = Extract<MimeType, 'image/png' | 'image/jpeg' | 'image/webp' | 'image/x-tga' | 'image/svg+xml'>;\ntype AudioMimeType = Extract<MimeType, 'audio/wav' | 'audio/mp4' | 'audio/webm'>;\ntype DesignUnit = 'Pixel' | 'Millimeter' | 'Inch';\ntype PositionMode = 'Absolute' | 'Percent' | 'Auto';\ntype SizeMode = 'Absolute' | 'Percent' | 'Auto';\ntype BlendMode = 'PassThrough' | 'Normal' | 'Darken' | 'Multiply' | 'ColorBurn' | 'LinearBurn' | 'DarkenColor' | 'Lighten' | 'Screen' | 'ColorDodge' | 'LinearDodge' | 'LightenColor' | 'Overlay' | 'SoftLight' | 'HardLight' | 'VividLight' | 'LinearLight' | 'PinLight' | 'HardMix' | 'Difference' | 'Exclusion' | 'Subtract' | 'Divide' | 'Hue' | 'Saturation' | 'Color' | 'Luminosity';\ntype StrokeStyle = 'Solid' | 'Dashed' | 'DashedRound' | 'Dotted' | 'LongDashed' | 'LongDashedRound';\ntype StrokePosition = 'Center' | 'Inner' | 'Outer';\ntype StrokeCornerGeometry = 'Round' | 'Miter' | 'Bevel';\ntype StrokeCap = 'Butt' | 'Round' | 'Square';\ntype MatteMode = 'Alpha' | 'AlphaInverted' | 'Luma' | 'LumaInverted';\ninterface BlockMatte {\n source: DesignBlockId;\n mode: MatteMode;\n}\ntype TrackMode = 'Absolute' | 'Relative';\ninterface PathVertex {\n point: Vec2;\n inTangent: Vec2;\n outTangent: Vec2;\n}\n/** @deprecated Use {@link PathVertex}. */\ntype KeyframeValue = {\n type: 'Float';\n value: number;\n} | {\n type: 'Vec2';\n value: Vec2;\n} | {\n type: 'Color';\n value: Color;\n} | {\n type: 'Path';\n value: {\n vertices: PathVertex[];\n closed: boolean;\n };\n} | {\n type: 'List';\n value: number[];\n} | {\n type: 'Discrete';\n value: boolean | number | string;\n};\ntype KeyframeEasing<Easing extends string = string> = {\n type: 'Preset';\n preset: Easing;\n} | {\n type: 'Bezier';\n out: Vec2;\n in: Vec2;\n} | {\n type: 'Hold';\n};\ninterface Keyframe<Easing extends string = string> {\n time: number;\n value: KeyframeValue;\n easing?: KeyframeEasing<Easing>;\n spatialOut?: Vec2;\n spatialIn?: Vec2;\n}\ntype TextHorizontalAlignment = 'Left' | 'Right' | 'Center' | 'Justify' | 'Auto';\ntype TextVerticalAlignment = 'Top' | 'Center' | 'Bottom';\ntype PropertyType = 'Bool' | 'Int' | 'Float' | 'Double' | 'String' | 'Enum' | 'Color' | 'Struct' | 'SourceSet' | 'Vec2';\ntype BlockEventType = 'Created' | 'Updated' | 'Destroyed';\ninterface BlockEvent {\n block: DesignBlockId;\n type: BlockEventType;\n}\ntype SceneLayout = string;\ninterface AssetStringProperty {\n property: string;\n type: 'String';\n value: string;\n defaultValue: string;\n}\ninterface AssetNumberProperty {\n property: string;\n type: 'Int' | 'Float' | 'Double';\n value: number;\n defaultValue: number;\n min: number;\n max: number;\n step: number;\n}\ninterface AssetBooleanProperty {\n property: string;\n type: 'Boolean';\n value: boolean;\n defaultValue: boolean;\n}\ninterface AssetEnumProperty {\n property: string;\n type: 'Enum';\n value: string;\n defaultValue: string;\n options: string[];\n}\ninterface AssetColorProperty {\n property: string;\n type: 'Color';\n value: Color;\n defaultValue: Color;\n}\ntype AssetProperty = AssetBooleanProperty | AssetColorProperty | AssetEnumProperty | AssetNumberProperty | AssetStringProperty;\ninterface AssetResult extends Asset {\n locale?: Locale;\n label?: string;\n tags?: string[];\n active?: boolean;\n credits?: {\n name: string;\n url?: string;\n };\n license?: {\n name: string;\n url?: string;\n };\n utm?: {\n source?: string;\n medium?: string;\n };\n}\ninterface CompleteAssetResult extends AssetResult {\n context: {\n sourceId: string;\n };\n active: boolean;\n}\ninterface AssetDefinition extends Asset {\n label?: Record<Locale, string>;\n tags?: Record<Locale, string[]>;\n}\ninterface AssetSource {\n id: string;\n findAssets(queryData: AssetQueryData): Promise<AssetsQueryResult | undefined>;\n fetchAsset?: (id: string, params?: {\n locale?: string;\n }) => Promise<AssetResult | null>;\n getGroups?: () => Promise<string[]>;\n credits?: {\n name: string;\n url?: string;\n };\n license?: {\n name: string;\n url?: string;\n };\n /** @deprecated Will be removed in v1.11 */\n canManageAssets?: boolean;\n applyAsset?: (asset: CompleteAssetResult) => Promise<DesignBlockId | undefined>;\n applyAssetToBlock?: (asset: CompleteAssetResult, block: DesignBlockId) => Promise<void>;\n applyAssetProperty?: (asset: CompleteAssetResult, property: AssetProperty) => Promise<void>;\n addAsset?: (asset: AssetDefinition) => void;\n removeAsset?: (assetId: string) => void;\n getSupportedMimeTypes?: () => string[] | undefined;\n}\ninterface RGBColor {\n r: number;\n g: number;\n b: number;\n}\ntype ColorSpace = 'sRGB' | 'CMYK' | 'SpotColor';\ninterface Vec2 {\n x: number;\n y: number;\n}\ninterface TrackingMetadata {\n [key: string]: string | number | boolean;\n}\ntype EditMode = 'Transform' | 'Crop' | 'Text' | 'TextLink' | 'Playback' | 'AdjustmentsCutout' | 'AdjustmentsVectorEdit' | string;\ntype DesignUnit = 'Pixel' | 'Millimeter' | 'Inch';\ntype TextFontSizeUnit = DesignUnit | 'Point';\ntype RoleString = 'Creator' | 'Adopter' | 'Viewer' | 'Presenter';\ntype CutoutOperation = 'Union' | 'Difference' | 'Intersection' | 'XOR';\ntype VariableType = 'String' | 'Color' | 'Number' | 'Image' | 'Typeface';\ntype ValueSetId = string;\ntype VariableTarget = 'Default' | {\n valueSet: ValueSetId;\n};\ninterface VariableOptions {\n target?: VariableTarget | null;\n}\ntype BooleanOperation = 'Union' | 'Difference' | 'Intersection' | 'XOR';\ninterface DominantColor {\n r: number;\n g: number;\n b: number;\n weight: number;\n}\ninterface DominantColorsOptions {\n count?: number;\n ignoreWhite?: boolean;\n abortSignal?: AbortSignal;\n}\ninterface SplitOptions {\n attachToParent?: boolean;\n createParentTrackIfNeeded?: boolean;\n selectNewBlock?: boolean;\n}\ninterface MovePageSliceOptions {\n convertSourceToPage?: boolean;\n}\ninterface TextFontSizeOptions {\n unit?: TextFontSizeUnit;\n from?: number;\n to?: number;\n}\ninterface AnimationEntry {\n type: AnimationTypeShorthand | AnimationTypeLonghand;\n duration?: number;\n delay?: number;\n easing?: string;\n}\ninterface AnimationOptions {\n in?: AnimationEntry;\n loop?: AnimationEntry;\n out?: AnimationEntry;\n}\ninterface DropShadowOptions {\n color?: Color;\n offset?: {\n x?: number;\n y?: number;\n };\n blur?: {\n x?: number;\n y?: number;\n };\n}\ninterface AddImageOptions {\n sizeMode?: SizeMode;\n positionMode?: PositionMode;\n x?: number;\n y?: number;\n cornerRadius?: number;\n size?: number | {\n width: number;\n height: number;\n };\n timeline?: {\n timeOffset?: number;\n duration?: number;\n };\n shadow?: DropShadowOptions;\n animation?: AnimationOptions;\n}\ninterface AddVideoOptions extends AddImageOptions {\n trimOffset?: number;\n loop?: boolean;\n muted?: boolean;\n}\ninterface AudioFromVideoOptions {\n keepTrimSettings?: boolean;\n muteOriginalVideo?: boolean;\n}\ninterface AssetPlacement {\n parent?: DesignBlockId;\n center?: {\n x: number;\n y: number;\n };\n}\ninterface DefaultApplyAssetOptions {\n placement?: AssetPlacement;\n abortSignal?: AbortSignal;\n}\ninterface ApplyAssetOptions {\n clipType?: 'clip' | 'overlay';\n placement?: AssetPlacement;\n abortSignal?: AbortSignal;\n [key: string]: unknown;\n}\ntype SettingType = 'Bool' | 'Int' | 'Float' | 'Double' | 'String' | 'Color' | 'Enum';\ntype SettingsBool = string;\ntype SettingsInt = string;\ntype SettingsFloat = string;\ntype SettingsDouble = string;\ntype SettingsString = string;\ntype SettingsColor = string;\ntype OptionalPrefix<T extends string> = T | `ubq://${T}`;\ntype SyncURIResolver = (uri: string, defaultResolver: (uri: string) => string) => string;\ntype AsyncURIResolver = (uri: string, defaultResolver: (uri: string) => string) => Promise<string> | string;\ntype HistoryUpdate = 'Updated' | 'Activated';\ntype HorizontalContentFillAlignment = 'Left' | 'Center' | 'Right';\ntype VerticalContentFillAlignment = 'Top' | 'Center' | 'Bottom';\ninterface TypefaceDefinition {\n /** @deprecated The meta field is not used anymore */\n meta?: {\n default?: boolean;\n library?: string;\n categories?: string[];\n };\n family: string;\n fonts: Array<{\n fontURL: string;\n weight: FontWeight;\n style: FontStyle;\n }>;\n}\ntype PersistedCallback = (url: string, persistedUrl: unknown, error: string | undefined) => void;\ninterface IBlockAPI {\n create(type: string): DesignBlockId;\n createFill(type: string): DesignBlockId;\n createShape(type: string): DesignBlockId;\n createEffect(type: string): DesignBlockId;\n createMask(): DesignBlockId;\n createBlur(type: string): DesignBlockId;\n createAnimation(type: string): DesignBlockId;\n duplicate(block: DesignBlockId, attachToParent?: boolean): DesignBlockId;\n destroy(block: DesignBlockId): void;\n isValid(block: DesignBlockId): boolean;\n findAll(): DesignBlockId[];\n findAllPlaceholders(): DesignBlockId[];\n findByName(name: string): DesignBlockId[];\n findByType(type: string): DesignBlockId[];\n findByKind(kind: string): DesignBlockId[];\n findAllSelected(): DesignBlockId[];\n getParent(block: DesignBlockId): DesignBlockId | null;\n setTransformParent(block: DesignBlockId, parent: DesignBlockId | null): void;\n getTransformParent(block: DesignBlockId): DesignBlockId | null;\n getOwningPageSlice(block: DesignBlockId): DesignBlockId | null;\n getPageSlices(page: DesignBlockId): DesignBlockId[];\n hasTransformAnchor(block: DesignBlockId): boolean;\n getChildren(block: DesignBlockId): DesignBlockId[];\n insertChild(parent: DesignBlockId, child: DesignBlockId, index: number): void;\n appendChild(parent: DesignBlockId, child: DesignBlockId): void;\n getType(block: DesignBlockId): string;\n getKind(block: DesignBlockId): string;\n setKind(block: DesignBlockId, kind: string): void;\n getName(block: DesignBlockId): string;\n setName(block: DesignBlockId, name: string): void;\n getUUID(block: DesignBlockId): string;\n getBool(block: DesignBlockId, property: string): boolean;\n setBool(block: DesignBlockId, property: string, value: boolean): void;\n getInt(block: DesignBlockId, property: string): number;\n setInt(block: DesignBlockId, property: string, value: number): void;\n getFloat(block: DesignBlockId, property: string): number;\n setFloat(block: DesignBlockId, property: string, value: number): void;\n getDouble(block: DesignBlockId, property: string): number;\n setDouble(block: DesignBlockId, property: string, value: number): void;\n getVec2(block: DesignBlockId, property: string): Vec2;\n setVec2(block: DesignBlockId, property: string, value: Vec2): void;\n getString(block: DesignBlockId, property: string): string;\n setString(block: DesignBlockId, property: string, value: string): void;\n getColor(block: DesignBlockId, property: string): Color;\n setColor(block: DesignBlockId, property: string, value: Color): void;\n setVariableBinding(block: DesignBlockId, property: string, key: string): void;\n getVariableBinding(block: DesignBlockId, property: string): string | null;\n removeVariableBinding(block: DesignBlockId, property: string): void;\n findAllVariableBindings(block: DesignBlockId): string[];\n getEnum(block: DesignBlockId, property: string): string;\n setEnum(block: DesignBlockId, property: string, value: string): void;\n getPositionX(block: DesignBlockId): number;\n setPositionX(block: DesignBlockId, value: number): void;\n getPositionY(block: DesignBlockId): number;\n setPositionY(block: DesignBlockId, value: number): void;\n getPositionXMode(block: DesignBlockId): string;\n setPositionXMode(block: DesignBlockId, mode: string): void;\n getPositionYMode(block: DesignBlockId): string;\n setPositionYMode(block: DesignBlockId, mode: string): void;\n getWidth(block: DesignBlockId): number;\n setWidth(block: DesignBlockId, value: number): void;\n getWidthMode(block: DesignBlockId): string;\n setWidthMode(block: DesignBlockId, mode: string): void;\n getHeight(block: DesignBlockId): number;\n setHeight(block: DesignBlockId, value: number): void;\n getHeightMode(block: DesignBlockId): string;\n setHeightMode(block: DesignBlockId, mode: string): void;\n getRotation(block: DesignBlockId): number;\n setRotation(block: DesignBlockId, value: number): void;\n getGlobalBoundingBoxX(block: DesignBlockId): number;\n getGlobalBoundingBoxY(block: DesignBlockId): number;\n getGlobalBoundingBoxWidth(block: DesignBlockId): number;\n getGlobalBoundingBoxHeight(block: DesignBlockId): number;\n getScreenSpaceBoundingBoxXYWH(blocks: DesignBlockId[]): XYWH | readonly [\n number,\n number,\n number,\n number\n ];\n supportsFill(block: DesignBlockId): boolean;\n getFill(block: DesignBlockId): DesignBlockId;\n setFill(block: DesignBlockId, fill: DesignBlockId): void;\n getStrokeFill(block: DesignBlockId): DesignBlockId | null;\n setStrokeFill(block: DesignBlockId, fill: DesignBlockId | null): void;\n isFillEnabled(block: DesignBlockId): boolean;\n setFillEnabled(block: DesignBlockId, enabled: boolean): void;\n getFillSolidColor(block: DesignBlockId): Color | readonly [\n number,\n number,\n number,\n number\n ];\n setFillSolidColor(block: DesignBlockId, r: number, g: number, b: number, a?: number): void;\n getGradientColorStops(block: DesignBlockId, property: string): GradientColorStop[];\n setGradientColorStops(block: DesignBlockId, property: string, stops: GradientColorStop[]): void;\n supportsStroke(block: DesignBlockId): boolean;\n isStrokeEnabled(block: DesignBlockId): boolean;\n setStrokeEnabled(block: DesignBlockId, enabled: boolean): void;\n getStrokeColor(block: DesignBlockId): Color;\n setStrokeColor(block: DesignBlockId, color: Color): void;\n getStrokeWidth(block: DesignBlockId): number;\n setStrokeWidth(block: DesignBlockId, width: number): void;\n setStrokeStartCap(block: DesignBlockId, cap: StrokeCap): void;\n getStrokeStartCap(block: DesignBlockId): StrokeCap;\n setStrokeEndCap(block: DesignBlockId, cap: StrokeCap): void;\n getStrokeEndCap(block: DesignBlockId): StrokeCap;\n setStrokeDashStartCap(block: DesignBlockId, cap: StrokeCap): void;\n getStrokeDashStartCap(block: DesignBlockId): StrokeCap;\n setStrokeDashEndCap(block: DesignBlockId, cap: StrokeCap): void;\n getStrokeDashEndCap(block: DesignBlockId): StrokeCap;\n setStrokeDashArray(block: DesignBlockId, dashArray: number[]): void;\n getStrokeDashArray(block: DesignBlockId): number[];\n setStrokeDashOffset(block: DesignBlockId, dashOffset: number): void;\n getStrokeDashOffset(block: DesignBlockId): number;\n isLineOrigin(block: DesignBlockId): boolean;\n supportsEffects(block: DesignBlockId): boolean;\n getEffects(block: DesignBlockId): DesignBlockId[];\n appendEffect(block: DesignBlockId, effect: DesignBlockId): void;\n insertEffect(block: DesignBlockId, effect: DesignBlockId, index: number): void;\n removeEffect(block: DesignBlockId, index: number): void;\n isEffectEnabled(effect: DesignBlockId): boolean;\n setEffectEnabled(effect: DesignBlockId, enabled: boolean): void;\n setEffectSource(effect: DesignBlockId, source: DesignBlockId | null): void;\n getEffectSource(effect: DesignBlockId): DesignBlockId | null;\n supportsMasks(block: DesignBlockId): boolean;\n getMasks(block: DesignBlockId): DesignBlockId[];\n appendMask(block: DesignBlockId, mask: DesignBlockId): void;\n insertMask(block: DesignBlockId, mask: DesignBlockId, index: number): void;\n removeMask(block: DesignBlockId, index: number): void;\n createTextAnimator(): DesignBlockId;\n supportsTextAnimators(block: DesignBlockId): boolean;\n getTextAnimators(block: DesignBlockId): DesignBlockId[];\n appendTextAnimator(block: DesignBlockId, animator: DesignBlockId): void;\n insertTextAnimator(block: DesignBlockId, animator: DesignBlockId, index: number): void;\n removeTextAnimator(block: DesignBlockId, index: number): void;\n createModifier(type: string): DesignBlockId;\n supportsModifiers(block: DesignBlockId): boolean;\n getModifiers(block: DesignBlockId): DesignBlockId[];\n appendModifier(block: DesignBlockId, modifier: DesignBlockId): void;\n insertModifier(block: DesignBlockId, modifier: DesignBlockId, index: number): void;\n removeModifier(block: DesignBlockId, index: number): void;\n supportsBlur(block: DesignBlockId): boolean;\n getBlur(block: DesignBlockId): DesignBlockId;\n setBlur(block: DesignBlockId, blur: DesignBlockId): void;\n isBlurEnabled(block: DesignBlockId): boolean;\n setBlurEnabled(block: DesignBlockId, enabled: boolean): void;\n supportsDropShadow(block: DesignBlockId): boolean;\n isDropShadowEnabled(block: DesignBlockId): boolean;\n setDropShadowEnabled(block: DesignBlockId, enabled: boolean): void;\n getDropShadowColor(block: DesignBlockId): Color;\n setDropShadowColor(block: DesignBlockId, color: Color): void;\n supportsBlendMode(block: DesignBlockId): boolean;\n getBlendMode(block: DesignBlockId): string;\n setBlendMode(block: DesignBlockId, mode: string): void;\n supportsOpacity(block: DesignBlockId): boolean;\n getOpacity(block: DesignBlockId): number;\n setOpacity(block: DesignBlockId, opacity: number): void;\n isVisible(block: DesignBlockId): boolean;\n setVisible(block: DesignBlockId, visible: boolean): void;\n isClipped(block: DesignBlockId): boolean;\n setClipped(block: DesignBlockId, clipped: boolean): void;\n getMatte(block: DesignBlockId): BlockMatte | null;\n setMatte(block: DesignBlockId, source: DesignBlockId | null, mode?: MatteMode): void;\n setKeyframes(block: DesignBlockId, property: string, keyframes: Keyframe[], mode?: TrackMode): void;\n getKeyframes(block: DesignBlockId, property: string): Keyframe[];\n getKeyframeMode(block: DesignBlockId, property: string): TrackMode;\n getAnimatedValue(block: DesignBlockId, property: string, time: number): KeyframeValue;\n removeKeyframes(block: DesignBlockId, property: string): void;\n getAnimatedProperties(block: DesignBlockId): string[];\n isPropertyAnimatable(block: DesignBlockId, property: string): boolean;\n setSelected(block: DesignBlockId, selected: boolean): void;\n isSelected(block: DesignBlockId): boolean;\n select(block: DesignBlockId): void;\n hasMetadata(block: DesignBlockId, key: string): boolean;\n getMetadata(block: DesignBlockId, key: string): string;\n setMetadata(block: DesignBlockId, key: string, value: string): void;\n removeMetadata(block: DesignBlockId, key: string): void;\n findAllMetadata(block: DesignBlockId): string[];\n replaceText(block: DesignBlockId, text: string, from?: number, to?: number): void;\n removeText(block: DesignBlockId, from?: number, to?: number): void;\n getTextAsHTML(block: DesignBlockId, from?: number, to?: number): string;\n replaceTextWithHTML(block: DesignBlockId, html: string, from?: number, to?: number): void;\n getTextFontSizes(block: DesignBlockId, options?: TextFontSizeOptions): number[];\n getTextFontSizes(block: DesignBlockId, from?: number, to?: number): number[];\n getTextRuns(block: DesignBlockId, options?: TextFontSizeOptions): ReadonlyArray<{\n fontSize: number;\n }>;\n getTextRuns(block: DesignBlockId, from?: number, to?: number): ReadonlyArray<{\n fontSize: number;\n }>;\n setTextFontSize(block: DesignBlockId, size: number): void;\n getTextColors(block: DesignBlockId): Color[];\n setTextColor(block: DesignBlockId, color: Color): void;\n getTextBackgroundColors(block: DesignBlockId): Color[];\n setTextBackgroundColor(block: DesignBlockId, color: Color): void;\n getTypefaces(block: DesignBlockId, from?: number, to?: number): Typeface[];\n setFontRequest(block: DesignBlockId, request: FontRequest, from?: number, to?: number): void;\n getFontRequests(block: DesignBlockId, from?: number, to?: number): FontRequest[];\n setTypeface(block: DesignBlockId, typeface: Typeface): void;\n getTypeface(block: DesignBlockId): Typeface;\n setFont(block: DesignBlockId, fontUri: string, typeface: Typeface): void;\n getTextRenderDiagnostics(block: DesignBlockId): TextRenderDiagnostics;\n setTextKerning(block: DesignBlockId, kerning: number, from?: number, to?: number): void;\n getTextKernings(block: DesignBlockId, from?: number, to?: number): number[];\n setTextOpenTypeFeatures(block: DesignBlockId, features: OpenTypeFeature[], from?: number, to?: number): void;\n getTextOpenTypeFeatures(block: DesignBlockId, from?: number, to?: number): OpenTypeFeature[][];\n setTextVariationAxes(block: DesignBlockId, axes: VariationAxisValue[], from?: number, to?: number): void;\n getTextVariationAxes(block: DesignBlockId, from?: number, to?: number): VariationAxisValue[][];\n setTextBaselineShift(block: DesignBlockId, baselineShift: number, from?: number, to?: number): void;\n getTextBaselineShifts(block: DesignBlockId, from?: number, to?: number): number[];\n getTextCharacterInkBoxes(block: DesignBlockId, from?: number, to?: number): CharacterInkBox[];\n setContentFillHorizontalAlignment(block: DesignBlockId, alignment: HorizontalContentFillAlignment): void;\n getContentFillHorizontalAlignment(block: DesignBlockId): HorizontalContentFillAlignment;\n setContentFillVerticalAlignment(block: DesignBlockId, alignment: VerticalContentFillAlignment): void;\n getContentFillVerticalAlignment(block: DesignBlockId): VerticalContentFillAlignment;\n getSourceSet(block: DesignBlockId, property: string): Source[];\n setSourceSet(block: DesignBlockId, property: string, sources: Source[]): void;\n addImageFileURIToSourceSet(block: DesignBlockId, property: string, uri: string): Promise<void>;\n addVideoFileURIToSourceSet(block: DesignBlockId, property: string, uri: string): Promise<void>;\n supportsDuration(block: DesignBlockId): boolean;\n getDuration(block: DesignBlockId): number;\n setDuration(block: DesignBlockId, duration: number): void;\n supportsTimeOffset(block: DesignBlockId): boolean;\n getTimeOffset(block: DesignBlockId): number;\n setTimeOffset(block: DesignBlockId, offset: number): void;\n loadFromString(content: string): Promise<DesignBlockId[]>;\n loadFromURL(url: string): Promise<DesignBlockId[]>;\n saveToString(blocks: DesignBlockId[]): Promise<string>;\n saveToArchive(blocks: DesignBlockId[]): Promise<Uint8Array | Blob>;\n onStateChanged(ids: DesignBlockId[], callback: (ids: DesignBlockId[]) => void): () => void;\n onSelectionChanged(callback: () => void): () => void;\n onClicked(callback: (id: DesignBlockId) => void): () => void;\n}\ninterface SharedCompressionOptions {\n format?: number;\n level?: number;\n}\ninterface ISceneAPI {\n setCMYKProfile(uri: string, options?: {\n abortSignal?: AbortSignal;\n }): Promise<void>;\n setCMYKProfileFromData(data: Uint8Array): void;\n getCMYKProfileInfo(): {\n contentHash: string;\n name: string;\n uri: string;\n };\n removeCMYKProfile(): void;\n setDocumentColorProfile(slot: ProfileSlot, uri: string, options?: {\n abortSignal?: AbortSignal;\n }): Promise<void>;\n setDocumentColorProfileFromData(slot: ProfileSlot, data: Uint8Array): void;\n getDocumentColorProfileInfo(slot: ProfileSlot): {\n contentHash: string;\n name: string;\n uri: string;\n };\n removeDocumentColorProfile(slot: ProfileSlot): void;\n getColorRenderingIntent(): number;\n setColorRenderingIntent(intent: number): void;\n isBlackPointCompensationEnabled(): boolean;\n setBlackPointCompensationEnabled(enabled: boolean): void;\n create(): DesignBlockId;\n createFromImage(uri: string, dpi?: number, pixelScaleFactor?: number): Promise<DesignBlockId>;\n createFromVideo(uri: string): Promise<DesignBlockId>;\n loadFromString(content: string): Promise<DesignBlockId>;\n loadFromURL(url: string): Promise<DesignBlockId>;\n saveToString(options?: {\n allowedResourceSchemes?: string[];\n onDisallowedResourceScheme?: (url: string, dataHash: string) => Promise<string>;\n compression?: SharedCompressionOptions;\n }): Promise<string>;\n saveToArchive(options?: {\n compression?: SharedCompressionOptions;\n }): Promise<Uint8Array | Blob>;\n applyTemplateFromString(content: string): Promise<void>;\n applyTemplateFromURL(url: string): Promise<void>;\n getPages(scene?: DesignBlockId): DesignBlockId[];\n getCurrentPage(scene?: DesignBlockId): DesignBlockId | null;\n setCurrentPages(pages: DesignBlockId[]): void;\n getCurrentPages(): DesignBlockId[];\n getLayout(scene?: DesignBlockId): SceneLayout;\n setLayout(layout: SceneLayout, scene?: DesignBlockId): void;\n getDesignUnit(scene?: DesignBlockId): string;\n setDesignUnit(unit: string, scene?: DesignBlockId): void;\n getFontSizeUnit(scene?: DesignBlockId): string;\n setFontSizeUnit(unit: string, scene?: DesignBlockId): void;\n getAngleUnit(scene?: DesignBlockId): string;\n setAngleUnit(unit: string, scene?: DesignBlockId): void;\n addMarker(name: string, time: number, duration?: number): void;\n getMarkers(): SceneMarker[];\n removeMarker(index: number): void;\n get(): DesignBlockId | null;\n}\ninterface IEditorAPI {\n getActiveLicense(): string;\n getEngineVersion(): string;\n unlockWithLicense(license: string): void;\n findAllSettings(): string[];\n getSettingType(key: string): string;\n getSettingBool(key: string): boolean;\n setSettingBool(key: string, value: boolean): void;\n getSettingInt(key: string): number;\n setSettingInt(key: string, value: number): void;\n getSettingFloat(key: string): number;\n setSettingFloat(key: string, value: number): void;\n getSettingDouble(key: string): number;\n setSettingDouble(key: string, value: number): void;\n getSettingString(key: string): string;\n setSettingString(key: string, value: string): void;\n getSettingColor(key: string): Color;\n setSettingColor(key: string, value: Color): void;\n getSettingEnum(key: string): string;\n setSettingEnum(key: string, value: string): void;\n getSettingEnumOptions(key: string): string[];\n getEditMode(): string;\n setEditMode(mode: string): void;\n getRole(): string;\n setRole(role: string): void;\n createHistory(): HistoryId;\n destroyHistory(history: HistoryId): void;\n getActiveHistory(): HistoryId;\n setActiveHistory(history: HistoryId): void;\n undo(): void;\n redo(): void;\n canUndo(): boolean;\n canRedo(): boolean;\n addUndoStep(): void;\n removeUndoStep(): void;\n convertColorToColorSpace(color: Color, colorSpace: string): Color;\n loadColorProfiles(options?: {\n abortSignal?: AbortSignal;\n }): Promise<void>;\n loadCMYKProfile(options?: {\n abortSignal?: AbortSignal;\n }): Promise<void>;\n supportsP3?(): boolean;\n findAllSpotColors(): string[];\n getSpotColorRGBA(name: string): RGBAColor | readonly [\n number,\n number,\n number,\n number\n ];\n getSpotColorCMYK(name: string): CMYKColor | readonly [\n number,\n number,\n number,\n number\n ];\n setSpotColorRGB(name: string, r: number, g: number, b: number): void;\n setSpotColorCMYK(name: string, c: number, m: number, y: number, k: number): void;\n removeSpotColor(name: string): void;\n setSoftProofEnabled(enabled: boolean): void;\n isSoftProofEnabled(): boolean;\n setSoftProofColorSpace(colorSpace: 'RGB' | 'CMYK'): void;\n getSoftProofColorSpace(): 'RGB' | 'CMYK';\n setSafeAreaInsets(insets: Insets): void;\n getSafeAreaInsets(): Insets;\n setTypefaceResolver(resolver?: TypefaceResolver | null): void;\n setURIResolver(resolver?: SyncURIResolver | null): void;\n setURIResolverAsync(resolver?: AsyncURIResolver | null): void;\n getAbsoluteURI(relativeUri: string): string | Promise<string>;\n defaultURIResolver(relativePath: string): string;\n getFileFormats(): FileSupport[];\n checkFileSupport(uri: string): Promise<FileSupport>;\n getMimeType(uri: string): Promise<string>;\n relocateResource(currentUri: string, newUri: string): void;\n findAllMediaURIs(): string[];\n createBuffer(): string;\n destroyBuffer(uri: string): void;\n setBufferData(uri: string, offset: number, data: Uint8Array): void;\n getBufferData(uri: string, offset: number, length: number): Uint8Array;\n setBufferLength(uri: string, length: number): void;\n getBufferLength(uri: string): number;\n findAllTransientResources(): TransientResource[];\n getResourceData(uri: string, chunkSize: number, onData: (result: Uint8Array) => boolean): void;\n onHistoryUpdatedWithKind(callback: (kind: HistoryUpdate) => void): () => void;\n onSettingsChanged(callback: () => void): () => void;\n}\ninterface IAssetAPI {\n addSource(source: AssetSource): void;\n addLocalSource(id: string, supportedMimeTypes?: string[]): void;\n addLocalAssetSourceFromJSONString(contentJSON: string, basePath?: string): Promise<string>;\n addLocalAssetSourceFromJSONURI(contentURI: string): Promise<string>;\n removeSource(id: string): void;\n findAllSources(): string[];\n findAssets(sourceId: string, query: AssetsQuery): Promise<AssetsQueryResult<CompleteAssetResult>>;\n getGroups(sourceId: string): Promise<string[]>;\n getLicense(sourceId: string): AssetSourceLicense | null | undefined;\n getCredits(sourceId: string): AssetSourceCredits | null | undefined;\n getSupportedMimeTypes(sourceId: string): string[];\n addAssetToSource(sourceId: string, asset: AssetDefinition): void;\n removeAssetFromSource(sourceId: string, assetId: string): void;\n assetSourceContentsChanged(sourceId: string): void;\n}\ninterface IEventAPI {\n subscribe(blocks: DesignBlockId[], callback: (events: BlockEvent[]) => void): () => void;\n}\ninterface IVariableAPI {\n setString(key: string, value: string, options?: VariableOptions | null): void;\n getString(key: string, options?: VariableOptions | null): string;\n findAll(): string[];\n remove(key: string, options?: VariableOptions | null): void;\n createValueSet(name: string): ValueSetId;\n destroyValueSet(set: ValueSetId): void;\n setValueSetName(set: ValueSetId, name: string): void;\n getValueSetName(set: ValueSetId): string;\n findAllValueSets(): ValueSetId[];\n findValueSetByName(name: string): ValueSetId | null;\n setActiveValueSet(set: ValueSetId | null): void;\n getActiveValueSet(): ValueSetId | null;\n rename(from: string, to: string): void;\n setColor(key: string, value: Color, options?: VariableOptions | null): void;\n getColor(key: string, options?: VariableOptions | null): Color;\n setNumber(key: string, value: number, options?: VariableOptions | null): void;\n getNumber(key: string, options?: VariableOptions | null): number;\n setImage(key: string, uri: string, options?: VariableOptions | null): void;\n getImage(key: string, options?: VariableOptions | null): string;\n setTypeface(key: string, typeface: Typeface, options?: VariableOptions | null): void;\n getTypeface(key: string, options?: VariableOptions | null): Typeface;\n getType(key: string, options?: VariableOptions | null): VariableType;\n findAllOfType(type: VariableType): string[];\n}\ninterface ICreativeEngine {\n readonly version: string;\n readonly block: IBlockAPI;\n readonly scene: ISceneAPI;\n readonly editor: IEditorAPI;\n readonly asset: IAssetAPI;\n readonly event: IEventAPI;\n readonly variable: IVariableAPI;\n dispose(): void;\n}\ninterface EngineBindingHandle {\n findAllVariables(): string[];\n setVariableString(key: string, value: string, options?: VariableOptions | null): void;\n getVariableString(key: string, options?: VariableOptions | null): string;\n removeVariable(key: string, options?: VariableOptions | null): void;\n createValueSet(name: string): ValueSetId;\n destroyValueSet(set: ValueSetId): void;\n setValueSetName(set: ValueSetId, name: string): void;\n getValueSetName(set: ValueSetId): string;\n findAllValueSets(): ValueSetId[];\n findValueSetByName(name: string): ValueSetId | null;\n setActiveValueSet(set: ValueSetId | null): void;\n getActiveValueSet(): ValueSetId | null;\n renameVariable(from: string, to: string): void;\n setVariableColor(key: string, value: Color, options?: VariableOptions | null): void;\n getVariableColor(key: string, options?: VariableOptions | null): Color;\n setVariableNumber(key: string, value: number, options?: VariableOptions | null): void;\n getVariableNumber(key: string, options?: VariableOptions | null): number;\n setVariableImage(key: string, uri: string, options?: VariableOptions | null): void;\n getVariableImage(key: string, options?: VariableOptions | null): string;\n setVariableTypeface(key: string, typeface: Typeface, options?: VariableOptions | null): void;\n getVariableTypeface(key: string, options?: VariableOptions | null): Typeface;\n getVariableType(key: string, options?: VariableOptions | null): VariableType;\n findAllVariablesOfType(type: VariableType): string[];\n}\nclass VariableAPI implements IVariableAPI {\n #private;\n constructor(engine: EngineBindingHandle);\n findAll(): string[];\n remove(key: string, options?: VariableOptions | null): void;\n createValueSet(name: string): ValueSetId;\n destroyValueSet(set: ValueSetId): void;\n setValueSetName(set: ValueSetId, name: string): void;\n getValueSetName(set: ValueSetId): string;\n findAllValueSets(): ValueSetId[];\n findValueSetByName(name: string): ValueSetId | null;\n setActiveValueSet(set: ValueSetId | null): void;\n getActiveValueSet(): ValueSetId | null;\n rename(from: string, to: string): void;\n setNumber(key: string, value: number, options?: VariableOptions | null): void;\n getNumber(key: string, options?: VariableOptions | null): number;\n setImage(key: string, uri: string, options?: VariableOptions | null): void;\n getImage(key: string, options?: VariableOptions | null): string;\n findAllOfType(type: VariableType): string[];\n}\ntype DefaultAssetSourceId = 'ly.img.sticker' | 'ly.img.vectorpath' | 'ly.img.colors.defaultPalette' | 'ly.img.filter.lut' | 'ly.img.filter.duotone' | 'ly.img.effect' | 'ly.img.blur' | 'ly.img.typeface' | 'ly.img.page.presets' | 'ly.img.page.presets.video' | 'ly.img.crop.presets' | 'ly.img.text' | 'ly.img.captionPresets';\n/** @deprecated Mirrors `@cesdk/engine`'s deprecated demo asset shape; migrate to v4 sources via `addLocalAssetSourceFromJSONURI` directly. */\ntype DemoAssetSourceId = 'ly.img.template' | 'ly.img.video.template' | 'ly.img.textComponents' | 'ly.img.image' | 'ly.img.video' | 'ly.img.audio' | 'ly.img.image.upload' | 'ly.img.video.upload' | 'ly.img.audio.upload';\ntype LoadSceneOptions = {\n overrideEditorConfig?: boolean;\n waitForResources?: boolean;\n onProgress?: (percent: number) => void;\n abortSignal?: AbortSignal;\n};\ntype AbortOptions = {\n abortSignal?: AbortSignal;\n};\ninterface FontMetrics {\n ascender: number;\n descender: number;\n unitsPerEm: number;\n lineGap: number;\n capHeight: number;\n xHeight: number;\n underlineOffset: number;\n underlineSize: number;\n strikeoutOffset: number;\n strikeoutSize: number;\n}\nenum ColorRenderingIntent {\n Perceptual = 0,\n RelativeColorimetric = 1,\n Saturation = 2,\n AbsoluteColorimetric = 3\n}\ntype ProfileRole = 'Default' | 'Output';\ntype ProfileColorSpace = 'RGB' | 'CMYK' | 'Gray';\ntype SoftProofColorSpace = Exclude<ProfileColorSpace, 'Gray'>;\ninterface ProfileSlot$1 {\n role: ProfileRole;\n space: ProfileColorSpace;\n}\ninterface DocumentColorProfileInfo {\n contentHash: string;\n name: string;\n uri: string;\n}\ninterface CMYKProfileInfo {\n contentHash: string;\n name: string;\n uri: string;\n}\ntype ImportedImageColorSpace = 'DeviceGray' | 'DeviceRGB' | 'DeviceCMYK' | 'ICCBased';\ntype ImportedImageMaskKind = 'Stencil' | 'Soft';\ninterface ImportedImageMaskInput {\n jpegBytes?: Uint8Array;\n bitPackedBytes?: Uint8Array;\n width: number;\n height: number;\n decode?: number[];\n interpolate?: boolean;\n kind?: ImportedImageMaskKind;\n matte?: number[];\n}\ninterface ImportedImageMaskInfo {\n width: number;\n height: number;\n decode: number[];\n interpolate: boolean;\n matte: number[];\n kind: ImportedImageMaskKind;\n}\ninterface ImportedImageDefinitionInput {\n colorSpace: ImportedImageColorSpace;\n declaredColorSpace?: ImportedImageColorSpace;\n iccProfile?: Uint8Array;\n decode?: number[];\n colorTransform?: number;\n renderingIntent?: ColorRenderingIntent;\n importerRecord?: string;\n importerRecordFormat?: string;\n colorKeyMask?: number[];\n mask?: ImportedImageMaskInput;\n}\ninterface ImportedImageDefinitionInfo {\n colorSpace: ImportedImageColorSpace;\n declaredColorSpace: ImportedImageColorSpace;\n profileContentHash: string;\n decode: number[];\n colorTransform?: number;\n renderingIntent?: ColorRenderingIntent;\n importerRecord: string;\n importerRecordFormat: string;\n colorKeyMask?: number[];\n mask?: ImportedImageMaskInfo;\n}\ninterface TextRunInfo {\n from: number;\n to: number;\n text: string;\n color: Color;\n fontWeight: FontWeight;\n fontStyle: FontStyle;\n fontSize: number;\n textCase: TextCase;\n typeface: Typeface;\n resolvedFontFileUri: string;\n textDecoration: TextDecorationConfig;\n scriptStyle: ScriptStyle;\n kerning: number;\n}\ninterface ThumbnailFrame {\n data: ReturnType<Uint8ClampedArrayConstructor['of']>;\n width: number;\n height: number;\n colorSpace: 'srgb';\n}\ntype MovementConstraintRule = {\n overshoot: number;\n} | {\n overshoot: number;\n block: number;\n} | {\n overshoot: number;\n blockType: string;\n};\ntype MovementConstraintScope = {\n block: number;\n} | {\n blockType: string;\n};\ntype BoolPropertyName = 'alwaysOnBottom' | 'alwaysOnTop' | 'clipped' | 'flip/horizontal' | 'flip/vertical' | 'highlightEnabled' | 'includedInExport' | 'placeholder/enabled' | 'playback/playing' | 'playback/soloPlaybackEnabled' | 'scene/aspectRatioLock' | 'scene/extendedPanningArea' | 'selected' | 'selectionEnabled' | 'transformLocked' | 'visible' | 'blur/enabled' | 'dropShadow/clip' | 'dropShadow/enabled' | 'fill/enabled' | 'fill/overprint' | 'layout/wrap' | 'page/guides/gridEnabled' | 'page/guides/gridSnapEnabled' | 'page/marginEnabled' | 'page/safetyEnabled' | 'placeholderControls/showButton' | 'placeholderControls/showOverlay' | 'playback/coverTimeEnabled' | 'playback/looping' | 'playback/muted' | 'stroke/enabled' | 'stroke/overprint' | 'motionBlur/enabled' | 'transform/autoOrient' | 'layoutChild/ignoreLayout' | 'layoutChild/visibility/hidden' | 'backgroundColor/enabled' | 'placeholderBehavior/enabled' | 'text/automaticFontSizeEnabled' | 'text/clipLinesOutsideOfFrame' | 'text/hasClippedLines' | 'text/pathFlipped' | 'text/useContextualAlternates' | 'text/useContextualLigatures' | 'text/useDiscretionaryLigatures' | 'text/useKerning' | 'text/useLigatures' | 'exclusionArea/constrains' | 'exclusionArea/punchOut' | 'track/automaticallyManageBlockOffsets' | 'caption/automaticFontSizeEnabled' | 'caption/clipLinesOutsideOfFrame' | 'caption/hasClippedLines' | 'caption/pathFlipped' | 'caption/useContextualAlternates' | 'caption/useContextualLigatures' | 'caption/useDiscretionaryLigatures' | 'caption/useKerning' | 'caption/useLigatures' | 'captionTrack/automaticallyManageBlockOffsets' | 'animation/slide/fade' | 'animation/pan/fade' | 'animation/blur/fade' | 'animation/zoom/fade' | 'animation/crop_zoom/fade' | 'animation/spin/fade' | 'animation/block_swipe_text/useTextColor' | 'animation/spread_text/fade' | 'animation/ken_burns/fade' | 'transition/none/morph' | 'transition/overlap' | 'transition/cross-fade/morph' | 'transition/cross-blur/morph' | 'transition/cross-zoom/morph' | 'transition/cross-warp/morph' | 'transition/push/morph' | 'transition/slide/morph' | 'transition/stack/morph' | 'transition/splice/morph' | 'transition/diagonal-splice/morph' | 'transition/fade/morph' | 'transition/fade-to-white/morph' | 'transition/fade-to-black/morph' | 'transition/color-wipe/morph' | 'transition/line-wipe/morph' | 'transition/wipe/morph' | 'transition/chop/morph' | 'transition/gradient-fade/morph' | 'transition/two-stripes/morph' | 'effect/enabled' | 'effect/displacement_map/wrapPixels' | 'effect/levels/clipToOutBlack' | 'effect/levels/clipToOutWhite' | 'effect/stroke/allMasks' | 'mask/inverted' | 'text_animator/fillColorEnabled' | 'text_animator/opacityEnabled' | 'text_animator/selectorEnabled' | 'text_animator/selectorRandomize' | 'text_animator/strokeColorEnabled' | (string & {});\ntype EnumPropertyName = 'blend/mode' | 'contentFill/horizontalAlignment' | 'contentFill/mode' | 'contentFill/verticalAlignment' | 'height/mode' | 'position/x/mode' | 'position/y/mode' | 'scene/angleUnit' | 'scene/colorConversionMode' | 'scene/designUnit' | 'scene/fontSizeUnit' | 'scene/layout' | 'scene/mode' | 'width/mode' | 'layout/align/counter' | 'layout/align/primary' | 'layout/mode' | 'layout/scaleContent' | 'page/guides/source' | 'page/pageSliceAxis' | 'stroke/cap' | 'stroke/cornerGeometry' | 'stroke/dashEndCap' | 'stroke/dashStartCap' | 'stroke/endCap' | 'stroke/position' | 'stroke/startCap' | 'stroke/style' | 'layoutChild/heightSizing' | 'layoutChild/horizontalConstraint' | 'layoutChild/verticalConstraint' | 'layoutChild/widthSizing' | 'playback/fadeIn/easing' | 'playback/fadeOut/easing' | 'text/horizontalAlignment' | 'text/verticalAlignment' | 'cutout/type' | 'caption/horizontalAlignment' | 'caption/verticalAlignment' | 'animationEasing' | 'textAnimationWritingStyle' | 'animation/grow/direction' | 'animation/wipe/direction' | 'animation/baseline/direction' | 'animation/spin/direction' | 'animation/spin_loop/direction' | 'animation/jump_loop/direction' | 'animation/typewriter_text/writingStyle' | 'animation/block_swipe_text/direction' | 'animation/merge_text/direction' | 'animation/ken_burns/direction' | 'transition/cross-spin/direction' | 'transition/push/direction' | 'transition/slide/direction' | 'transition/stack/direction' | 'transition/splice/direction' | 'transition/diagonal-splice/direction' | 'transition/color-wipe/direction' | 'transition/wipe/direction' | 'transition/chop/corner' | 'transition/chop/direction' | 'transition/gradient-fade/direction' | 'transition/two-stripes/direction' | 'blur/uniform/mode' | 'modifier/trim/mode' | 'modifier/repeater/composite' | 'modifier/offset/join' | 'modifier/zigzag/pointType' | 'effect/displacement_map/horizontalChannel' | 'effect/displacement_map/mapBehavior' | 'effect/displacement_map/verticalChannel' | 'effect/invert/channel' | 'effect/radial_wipe/direction' | 'effect/shift_channels/takeAlphaFrom' | 'effect/shift_channels/takeBlueFrom' | 'effect/shift_channels/takeGreenFrom' | 'effect/shift_channels/takeRedFrom' | 'effect/stroke/paintStyle' | 'effect/wave_warp/waveType' | 'fill/pixelStream/orientation' | 'shape/vector_path/fillRule' | 'shape/compound/fillRule' | 'shape/compound/mode' | 'mask/mode' | 'text_animator/selectorBasedOn' | 'text_animator/selectorShape' | 'text_animator/selectorUnits' | (string & {});\ntype FloatPropertyName = 'globalBoundingBox/height' | 'globalBoundingBox/width' | 'globalBoundingBox/x' | 'globalBoundingBox/y' | 'height' | 'lastFrame/height' | 'lastFrame/width' | 'lastFrame/x' | 'lastFrame/y' | 'motionBlur/shutterAngle' | 'motionBlur/shutterPhase' | 'movement/constraint' | 'position/x' | 'position/y' | 'rotation' | 'scene/dpi' | 'scene/frameRate' | 'scene/pageDimensions/height' | 'scene/pageDimensions/width' | 'scene/pixelScaleFactor' | 'width' | 'camera/pixelRatio' | 'camera/resolution/height' | 'camera/resolution/width' | 'camera/zoomLevel' | 'dropShadow/blurRadius/x' | 'dropShadow/blurRadius/y' | 'dropShadow/offset/x' | 'dropShadow/offset/y' | 'layout/gap' | 'layout/gap/counterAxis' | 'layout/padding/bottom' | 'layout/padding/left' | 'layout/padding/right' | 'layout/padding/top' | 'page/guides/gridSpacingX' | 'page/guides/gridSpacingY' | 'page/margin/bottom' | 'page/margin/left' | 'page/margin/right' | 'page/margin/top' | 'page/marginScale' | 'page/safetyInset/bottom' | 'page/safetyInset/left' | 'page/safetyInset/right' | 'page/safetyInset/top' | 'playback/speed' | 'playback/volume' | 'stroke/dashOffset' | 'stroke/miterLimit' | 'stroke/width' | 'opacity' | 'transform/anchor/x' | 'transform/anchor/y' | 'transform/scale/x' | 'transform/scale/y' | 'transform/skew' | 'transform/skewAxis' | 'layoutChild/maxHeight' | 'layoutChild/maxWidth' | 'layoutChild/minHeight' | 'layoutChild/minWidth' | 'layoutChild/visibility/maxAspectRatio' | 'layoutChild/visibility/maxParentAspectRatio' | 'layoutChild/visibility/maxParentHeight' | 'layoutChild/visibility/maxParentWidth' | 'layoutChild/visibility/minAspectRatio' | 'layoutChild/visibility/minParentAspectRatio' | 'layoutChild/visibility/minParentHeight' | 'layoutChild/visibility/minParentWidth' | 'backgroundColor/cornerRadius' | 'backgroundColor/paddingBottom' | 'backgroundColor/paddingLeft' | 'backgroundColor/paddingRight' | 'backgroundColor/paddingTop' | 'text/backgroundCornerRadius' | 'text/backgroundPadding/bottom' | 'text/backgroundPadding/left' | 'text/backgroundPadding/right' | 'text/backgroundPadding/top' | 'text/fontSize' | 'text/letterSpacing' | 'text/lineHeight' | 'text/maxAutomaticFontSize' | 'text/minAutomaticFontSize' | 'text/paragraphSpacing' | 'text/pathOffset' | 'text/subscriptFontScale' | 'text/subscriptVerticalShift' | 'text/superscriptFontScale' | 'text/superscriptVerticalShift' | 'cutout/offset' | 'cutout/smoothing' | 'caption/backgroundCornerRadius' | 'caption/backgroundPadding/bottom' | 'caption/backgroundPadding/left' | 'caption/backgroundPadding/right' | 'caption/backgroundPadding/top' | 'caption/fontSize' | 'caption/letterSpacing' | 'caption/lineHeight' | 'caption/maxAutomaticFontSize' | 'caption/minAutomaticFontSize' | 'caption/paragraphSpacing' | 'caption/pathOffset' | 'caption/subscriptFontScale' | 'caption/subscriptVerticalShift' | 'caption/superscriptFontScale' | 'caption/superscriptVerticalShift' | 'animation/slide/direction' | 'textAnimationOverlap' | 'animation/pan/direction' | 'animation/pan/distance' | 'animation/blur/intensity' | 'animation/grow/scaleFactor' | 'animation/crop_zoom/scale' | 'animation/spin/intensity' | 'animation/blur_loop/intensity' | 'animation/pulsating_loop/intensity' | 'animation/breathing_loop/intensity' | 'animation/jump_loop/intensity' | 'animation/sway_loop/intensity' | 'animation/spread_text/intensity' | 'animation/merge_text/intensity' | 'animation/ken_burns/travelDistanceRatio' | 'animation/ken_burns/zoomIntensity' | 'transition/cross-blur/sigma' | 'transition/cross-spin/intensity' | 'transition/cross-zoom/zoom' | 'transition/cross-warp/zoom' | 'blur/uniform/intensity' | 'blur/linear/blurRadius' | 'blur/linear/x1' | 'blur/linear/x2' | 'blur/linear/y1' | 'blur/linear/y2' | 'blur/mirrored/blurRadius' | 'blur/mirrored/gradientSize' | 'blur/mirrored/size' | 'blur/mirrored/x1' | 'blur/mirrored/x2' | 'blur/mirrored/y1' | 'blur/mirrored/y2' | 'blur/radial/blurRadius' | 'blur/radial/gradientRadius' | 'blur/radial/radius' | 'blur/radial/x' | 'blur/radial/y' | 'modifier/trim/end' | 'modifier/trim/offset' | 'modifier/trim/start' | 'modifier/repeater/anchorX' | 'modifier/repeater/anchorY' | 'modifier/repeater/copies' | 'modifier/repeater/endOpacity' | 'modifier/repeater/offset' | 'modifier/repeater/positionX' | 'modifier/repeater/positionY' | 'modifier/repeater/rotation' | 'modifier/repeater/scaleX' | 'modifier/repeater/scaleY' | 'modifier/repeater/startOpacity' | 'modifier/round_corners/radius' | 'modifier/offset/amount' | 'modifier/offset/miterLimit' | 'modifier/zigzag/ridges' | 'modifier/zigzag/size' | 'modifier/pucker_bloat/amount' | 'modifier/twist/angle' | 'modifier/twist/centerX' | 'modifier/twist/centerY' | 'effect/adjustments/blacks' | 'effect/adjustments/brightness' | 'effect/adjustments/clarity' | 'effect/adjustments/contrast' | 'effect/adjustments/exposure' | 'effect/adjustments/gamma' | 'effect/adjustments/highlights' | 'effect/adjustments/saturation' | 'effect/adjustments/shadows' | 'effect/adjustments/sharpness' | 'effect/adjustments/temperature' | 'effect/adjustments/whites' | 'effect/bulge/centerX' | 'effect/bulge/centerY' | 'effect/bulge/height' | 'effect/bulge/horizontalRadius' | 'effect/bulge/verticalRadius' | 'effect/corner_pin/lowerLeftX' | 'effect/corner_pin/lowerLeftY' | 'effect/corner_pin/lowerRightX' | 'effect/corner_pin/lowerRightY' | 'effect/corner_pin/upperLeftX' | 'effect/corner_pin/upperLeftY' | 'effect/corner_pin/upperRightX' | 'effect/corner_pin/upperRightY' | 'effect/cross_cut/offset' | 'effect/cross_cut/slices' | 'effect/cross_cut/speedV' | 'effect/cross_cut/time' | 'effect/displacement_map/maxHorizontal' | 'effect/displacement_map/maxVertical' | 'effect/dot_pattern/blur' | 'effect/dot_pattern/dots' | 'effect/dot_pattern/size' | 'effect/duotone_filter/intensity' | 'effect/extrude_blur/amount' | 'effect/fill/opacity' | 'effect/glow/amount' | 'effect/glow/darkness' | 'effect/glow/size' | 'effect/green_screen/colorMatch' | 'effect/green_screen/smoothness' | 'effect/green_screen/spill' | 'effect/half_tone/angle' | 'effect/half_tone/scale' | 'effect/levels/alphaGamma' | 'effect/levels/alphaInBlack' | 'effect/levels/alphaInWhite' | 'effect/levels/alphaOutBlack' | 'effect/levels/alphaOutWhite' | 'effect/levels/blueGamma' | 'effect/levels/blueInBlack' | 'effect/levels/blueInWhite' | 'effect/levels/blueOutBlack' | 'effect/levels/blueOutWhite' | 'effect/levels/greenGamma' | 'effect/levels/greenInBlack' | 'effect/levels/greenInWhite' | 'effect/levels/greenOutBlack' | 'effect/levels/greenOutWhite' | 'effect/levels/redGamma' | 'effect/levels/redInBlack' | 'effect/levels/redInWhite' | 'effect/levels/redOutBlack' | 'effect/levels/redOutWhite' | 'effect/levels/rgbGamma' | 'effect/levels/rgbInBlack' | 'effect/levels/rgbInWhite' | 'effect/levels/rgbOutBlack' | 'effect/levels/rgbOutWhite' | 'effect/linear_wipe/angle' | 'effect/linear_wipe/completion' | 'effect/linear_wipe/feather' | 'effect/linocut/scale' | 'effect/liquid/amount' | 'effect/liquid/scale' | 'effect/liquid/time' | 'effect/lut_filter/intensity' | 'effect/outliner/amount' | 'effect/outliner/passthrough' | 'effect/posterize/levels' | 'effect/radial_pixel/radius' | 'effect/radial_pixel/segments' | 'effect/radial_wipe/centerX' | 'effect/radial_wipe/centerY' | 'effect/radial_wipe/completion' | 'effect/radial_wipe/feather' | 'effect/radial_wipe/startAngle' | 'effect/recolor/brightnessMatch' | 'effect/recolor/colorMatch' | 'effect/recolor/smoothness' | 'effect/shifter/amount' | 'effect/shifter/angle' | 'effect/stroke/brushSize' | 'effect/stroke/end' | 'effect/stroke/hardness' | 'effect/stroke/opacity' | 'effect/stroke/spacing' | 'effect/stroke/start' | 'effect/threshold/level' | 'effect/tilt_shift/amount' | 'effect/tilt_shift/position' | 'effect/tint/amount' | 'effect/tritone/amount' | 'effect/tv_glitch/distortion' | 'effect/tv_glitch/distortion2' | 'effect/tv_glitch/rollSpeed' | 'effect/tv_glitch/speed' | 'effect/venetian_blinds/completion' | 'effect/venetian_blinds/direction' | 'effect/venetian_blinds/feather' | 'effect/venetian_blinds/width' | 'effect/vignette/darkness' | 'effect/vignette/offset' | 'effect/wave_warp/direction' | 'effect/wave_warp/height' | 'effect/wave_warp/phase' | 'effect/wave_warp/width' | 'fill/gradient/linear/endPointX' | 'fill/gradient/linear/endPointY' | 'fill/gradient/linear/startPointX' | 'fill/gradient/linear/startPointY' | 'fill/gradient/radial/centerPointX' | 'fill/gradient/radial/centerPointY' | 'fill/gradient/radial/focalX' | 'fill/gradient/radial/focalY' | 'fill/gradient/radial/radius' | 'fill/gradient/conical/centerPointX' | 'fill/gradient/conical/centerPointY' | 'fill/stripe/angle' | 'fill/stripe/gap' | 'fill/stripe/width' | 'shape/anchor/x' | 'shape/anchor/y' | 'shape/height' | 'shape/position/x' | 'shape/position/y' | 'shape/rect/cornerRadiusBL' | 'shape/rect/cornerRadiusBR' | 'shape/rect/cornerRadiusTL' | 'shape/rect/cornerRadiusTR' | 'shape/rotation' | 'shape/scale/x' | 'shape/scale/y' | 'shape/skew' | 'shape/skewAxis' | 'shape/width' | 'shape/polygon/cornerRadius' | 'shape/star/cornerRadius' | 'shape/star/innerDiameter' | 'shape/star/innerRadius' | 'shape/star/innerRoundness' | 'shape/star/outerRadius' | 'shape/star/outerRoundness' | 'shape/star/rotation' | 'shape/vector_path/cornerRadius' | 'shape/vector_path/height' | 'shape/vector_path/width' | 'shape/compound/height' | 'shape/compound/width' | 'mask/expansion' | 'mask/feather' | 'mask/opacity' | 'text_animator/anchorX' | 'text_animator/anchorY' | 'text_animator/blurX' | 'text_animator/blurY' | 'text_animator/opacity' | 'text_animator/positionX' | 'text_animator/positionY' | 'text_animator/rotation' | 'text_animator/scaleX' | 'text_animator/scaleY' | 'text_animator/selectorAmount' | 'text_animator/selectorEaseHigh' | 'text_animator/selectorEaseLow' | 'text_animator/selectorEnd' | 'text_animator/selectorOffset' | 'text_animator/selectorSmoothness' | 'text_animator/selectorStart' | 'text_animator/skew' | 'text_animator/skewAxis' | 'text_animator/strokeWidth' | 'text_animator/tracking' | (string & {});\ntype IntPropertyName = 'motionBlur/samples' | 'layoutChild/gridColumn' | 'layoutChild/gridColumnSpan' | 'layoutChild/gridRow' | 'layoutChild/gridRowSpan' | 'layoutChild/visibility/hideOrder' | 'transition/splice/bandCount' | 'effect/lut_filter/horizontalTileCount' | 'effect/lut_filter/verticalTileCount' | 'effect/mirror/side' | 'effect/pixelize/horizontalPixelSize' | 'effect/pixelize/verticalPixelSize' | 'effect/stroke/maskIndex' | 'shape/polygon/sides' | 'shape/star/points' | 'text_animator/selectorSeed' | (string & {});\ntype StringPropertyName = 'name' | 'scene/pageFormatId' | 'type' | 'uuid' | 'layout/grid/columns' | 'layout/grid/rows' | 'page/titleTemplate' | 'page/titleTemplateWithPageSlices' | 'audio/fileURI' | 'text/externalReference' | 'text/fontFileUri' | 'text/pathExternalRef' | 'text/text' | 'text/typeface' | 'cutout/path' | 'caption/externalReference' | 'caption/fontFileUri' | 'caption/pathExternalRef' | 'caption/text' | 'caption/typeface' | 'effect/lut_filter/filterId' | 'effect/lut_filter/lutFileURI' | 'fill/image/externalReference' | 'fill/image/imageFileURI' | 'fill/image/previewFileURI' | 'fill/video/fileURI' | 'shape/vector_path/path' | (string & {});\ntype DoublePropertyName = 'playback/time' | 'playback/coverTime' | 'playback/duration' | 'playback/timeOffset' | 'audio/totalDuration' | 'playback/fadeIn/duration' | 'playback/fadeOut/duration' | 'playback/trimLength' | 'playback/trimOffset' | 'fill/video/totalDuration' | (string & {});\ntype Vec2PropertyName = 'position' | 'shape/position' | (string & {});\ntype ColorPropertyName = 'dropShadow/color' | 'fill/solid/color' | 'page/guides/gridColor' | 'stroke/color' | 'backgroundColor/color' | 'animation/block_swipe_text/blockColor' | 'transition/fade/color' | 'transition/color-wipe/color' | 'transition/gradient-fade/color' | 'effect/duotone_filter/darkColor' | 'effect/duotone_filter/lightColor' | 'effect/fill/color' | 'effect/green_screen/fromColor' | 'effect/recolor/fromColor' | 'effect/recolor/toColor' | 'effect/stroke/color' | 'effect/tint/mapBlackTo' | 'effect/tint/mapWhiteTo' | 'effect/tritone/highlights' | 'effect/tritone/midtones' | 'effect/tritone/shadows' | 'fill/color/value' | 'fill/stripe/color' | 'text_animator/fillColor' | 'text_animator/strokeColor' | (string & {});\ntype SourceSetPropertyName = 'fill/image/sourceSet' | (string & {});\ntype BlendMode$1 = 'PassThrough' | 'Normal' | 'Darken' | 'Multiply' | 'ColorBurn' | 'LinearBurn' | 'DarkenColor' | 'Lighten' | 'Screen' | 'ColorDodge' | 'LinearDodge' | 'LightenColor' | 'Overlay' | 'SoftLight' | 'HardLight' | 'VividLight' | 'LinearLight' | 'PinLight' | 'HardMix' | 'Difference' | 'Exclusion' | 'Subtract' | 'Divide' | 'Hue' | 'Saturation' | 'Color' | 'Luminosity';\ntype HorizontalContentFillAlignment$1 = 'Left' | 'Center' | 'Right';\ntype ContentFillMode = 'Crop' | 'Cover' | 'Contain';\ntype VerticalContentFillAlignment$1 = 'Top' | 'Center' | 'Bottom';\ntype HeightMode = 'Absolute' | 'Percent' | 'Auto';\ntype PositionXMode = 'Absolute' | 'Percent' | 'Auto';\ntype PositionYMode = 'Absolute' | 'Percent' | 'Auto';\ntype SceneAngleUnit = 'Radian' | 'Degree';\ntype DesignUnit$1 = 'Pixel' | 'Millimeter' | 'Inch';\ntype FontSizeUnit = 'Pixel' | 'Point';\ntype SceneLayout$1 = 'Free' | 'VerticalStack' | 'HorizontalStack' | 'DepthStack';\ntype WidthMode = 'Absolute' | 'Percent' | 'Auto';\ntype StrokeCap$1 = 'Butt' | 'Round' | 'Square';\ntype StrokeCornerGeometry$1 = 'Bevel' | 'Miter' | 'Round';\ntype StrokePosition$1 = 'Center' | 'Inner' | 'Outer';\ntype StrokeStyle$1 = 'Dashed' | 'DashedRound' | 'Dotted' | 'LongDashed' | 'LongDashedRound' | 'Solid';\ntype TextHorizontalAlignment$1 = 'Left' | 'Right' | 'Center' | 'Justify' | 'Auto';\ntype TextVerticalAlignment$1 = 'Top' | 'Bottom' | 'Center';\ntype CutoutType$1 = 'Solid' | 'Dashed';\ntype SettingStringPropertyName = 'basePath' | 'defaultEmojiFontFileUri' | 'defaultFontFileUri' | 'upload/supportedMimeTypes' | 'license' | 'web/fetchCredentials' | 'page/title/separator' | 'page/title/fontFileUri' | 'fallbackFontUri' | 'fallbackCMYKProfileUri' | (string & {});\ntype SettingColorPropertyName = 'clearColor' | 'handleFillColor' | 'highlightColor' | 'pageHighlightColor' | 'placeholderHighlightColor' | 'snappingGuideColor' | 'rotationSnappingGuideColor' | 'cropOverlayColor' | 'textVariableHighlightColor' | 'borderOutlineColor' | 'progressColor' | 'errorStateColor' | 'grid/color' | 'page/title/color' | 'page/marginFillColor' | 'page/marginFrameColor' | 'page/safetyFillColor' | 'page/safetyFrameColor' | 'page/exclusionAreaFillColor' | 'page/exclusionAreaFrameColor' | 'page/pageSliceGuideColor' | 'page/innerBorderColor' | 'page/outerBorderColor' | 'colorMaskingSettings/maskColor' | (string & {});\ntype SettingFloatPropertyName = 'positionSnappingThreshold' | 'rotationSnappingThreshold' | 'grid/spacingX' | 'grid/spacingY' | 'dragToSwapFills/longPressDurationMs' | 'controlGizmo/blockScaleDownLimit' | 'exportPendingTimeoutSeconds' | 'listIndentPerLevel' | 'tabStopInterval' | (string & {});\ntype SettingBoolPropertyName = 'doubleClickToCropEnabled' | 'showBuildVersion' | 'placeholderControls/showButton' | 'placeholderControls/showOverlay' | 'blockAnimations/enabled' | 'playback/showAllBlocks' | 'clip/defaultTransitionOverlapEnabled' | 'grid/enabled' | 'grid/snapEnabled' | 'archival/bundleOnlyUsedFontVariants' | 'resource/deferLoading' | 'touch/dragStartCanSelect' | 'touch/singlePointPanning' | 'mouse/enableZoom' | 'mouse/enableScroll' | 'dragToSwapFills/enabled' | 'controlGizmo/showCropHandles' | 'controlGizmo/showMoveHandles' | 'controlGizmo/dynamicMoveHandleVisibility' | 'controlGizmo/showResizeHandles' | 'controlGizmo/showScaleHandles' | 'controlGizmo/showRotateHandles' | 'controlGizmo/showCropScaleHandles' | 'page/title/show' | 'page/title/showPageTitleTemplate' | 'page/title/appendPageName' | 'page/title/showOnSinglePage' | 'page/title/canEdit' | 'page/title/showOnPageSlices' | 'page/safetyRevealDuringTransform' | 'page/dimOutOfPageAreas' | 'page/allowCropInteraction' | 'page/allowResizeInteraction' | 'page/restrictResizeInteractionToFixedAspectRatio' | 'page/allowRotateInteraction' | 'page/allowMoveInteraction' | 'page/marqueeSelectOnBodyDrag' | 'page/restrictPageSelectionToBorderAndTitle' | 'page/moveChildrenWhenCroppingFill' | 'page/imageFillCoversBleed' | 'page/selectWhenNoBlocksSelected' | 'page/highlightWhenCropping' | 'page/allowShapeChange' | 'page/highlightDropTarget' | 'page/reparentBlocksToSceneWhenOutOfPage' | 'page/flipDimensionsOn90DegreeCropRotation' | 'clampThumbnailTextureSizes' | 'useSystemFontFallback' | 'forceSystemEmojis' | (string & {});\ntype SettingIntPropertyName = 'maxImageSize' | 'maxPreviewResolution' | 'maxConcurrentRequestsPerHost' | (string & {});\ntype ClipInitialDurationMode = 'default' | 'followParent';\ntype TouchPinchAction = 'None' | 'Zoom' | 'Scale' | 'Auto' | 'Dynamic';\ntype TouchRotateAction = 'None' | 'Rotate';\ntype CameraClampingOvershootMode = 'Center' | 'Reverse';\ntype ControlGizmoMoveHandleVisibility = 'auto' | 'always' | 'never';\ntype ControlGizmoResizeHandlesVisibility = 'auto' | 'always' | 'never';\ntype ControlGizmoScaleHandlesVisibility = 'auto' | 'always' | 'never';\ntype ControlGizmoRotateHandlesVisibility = 'auto' | 'always' | 'never';\ntype DoubleClickSelectionMode = 'Direct' | 'Hierarchical';\ntype ColorPickerColorMode = 'RGB' | 'CMYK' | 'Any';\ntype TimelineTrackVisibility = 'all' | 'active';\ntype SettingEnumType = {\n 'clip/initialDurationMode': ClipInitialDurationMode;\n 'touch/pinchAction': TouchPinchAction;\n 'touch/rotateAction': TouchRotateAction;\n 'camera/clamping/overshootMode': CameraClampingOvershootMode;\n 'controlGizmo/moveHandleVisibility': ControlGizmoMoveHandleVisibility;\n 'controlGizmo/resizeHandlesVisibility': ControlGizmoResizeHandlesVisibility;\n 'controlGizmo/scaleHandlesVisibility': ControlGizmoScaleHandlesVisibility;\n 'controlGizmo/rotateHandlesVisibility': ControlGizmoRotateHandlesVisibility;\n doubleClickSelectionMode: DoubleClickSelectionMode;\n 'colorPicker/colorMode': ColorPickerColorMode;\n 'timeline/trackVisibility': TimelineTrackVisibility;\n};\ninterface RGBColor$1 {\n r: number;\n g: number;\n b: number;\n}\ninterface Settings {\n 'clip/defaultTransitionOverlapEnabled': boolean;\n 'clip/defaultDurationValue': number;\n 'clip/initialDurationMode': 'default' | 'followParent';\n 'controlGizmo/showCropHandles': boolean;\n 'controlGizmo/showCropScaleHandles': boolean;\n /** @deprecated Use `controlGizmo/moveHandleVisibility`. `false` hides the move handle. */\n 'controlGizmo/showMoveHandles': boolean;\n /** @deprecated Use `controlGizmo/moveHandleVisibility`. `false` shows the move handle at any block size. */\n 'controlGizmo/dynamicMoveHandleVisibility': boolean;\n /** @deprecated Use `controlGizmo/resizeHandlesVisibility`. `false` hides the edge (resize) handles. */\n 'controlGizmo/showResizeHandles': boolean;\n /** @deprecated Use `controlGizmo/rotateHandlesVisibility`. `false` hides the rotation handle. */\n 'controlGizmo/showRotateHandles': boolean;\n /** @deprecated Use `controlGizmo/scaleHandlesVisibility`. `false` hides the corner (scale) handles. */\n 'controlGizmo/showScaleHandles': boolean;\n doubleClickToCropEnabled: boolean;\n 'dragToSwapFills/enabled': boolean;\n 'features/singlePageModeEnabled': boolean;\n 'features/fileSystemUsageEnabled': boolean;\n 'features/pageCarouselEnabled': boolean;\n 'features/transformEditsRetainCoverMode': boolean;\n 'features/clampTextBlockWidthToPageDimensionsDuringEditing': boolean;\n 'features/equalDistanceSnappingEnabled': boolean;\n 'features/transformLockedClickThroughEnabled': boolean;\n 'features/previewMotionBlurEnabled': boolean;\n 'features/fontLineGapEnabled': boolean;\n 'features/historyEnabled': boolean;\n 'mouse/enableScroll': boolean;\n 'mouse/enableZoom': boolean;\n 'page/allowCropInteraction': boolean;\n 'page/allowMoveInteraction': boolean;\n 'page/marqueeSelectOnBodyDrag': boolean;\n 'page/restrictPageSelectionToBorderAndTitle': boolean;\n 'page/allowResizeInteraction': boolean;\n 'page/allowRotateInteraction': boolean;\n 'page/allowShapeChange': boolean;\n 'page/dimOutOfPageAreas': boolean;\n 'page/restrictResizeInteractionToFixedAspectRatio': boolean;\n 'page/moveChildrenWhenCroppingFill': boolean;\n 'page/imageFillCoversBleed': boolean;\n 'page/title/appendPageName': boolean;\n 'page/title/canEdit': boolean;\n 'page/title/show': boolean;\n 'page/title/showOnSinglePage': boolean;\n 'page/title/showOnPageSlices': boolean;\n 'page/title/showPageTitleTemplate': boolean;\n 'page/safetyRevealDuringTransform': boolean;\n 'placeholderControls/showButton': boolean;\n 'placeholderControls/showOverlay': boolean;\n 'blockAnimations/enabled': boolean;\n 'playback/showAllBlocks': boolean;\n 'grid/enabled': boolean;\n 'grid/snapEnabled': boolean;\n showBuildVersion: boolean;\n 'touch/dragStartCanSelect': boolean;\n 'touch/singlePointPanning': boolean;\n useSystemFontFallback: boolean;\n forceSystemEmojis: boolean;\n 'page/selectWhenNoBlocksSelected': boolean;\n 'page/highlightWhenCropping': boolean;\n 'page/highlightDropTarget': boolean;\n 'page/reparentBlocksToSceneWhenOutOfPage': boolean;\n clampThumbnailTextureSizes: boolean;\n /** @deprecated Use `cesdk.features.configure({ 'ly.img.dock': { hideLabels: true } })` in CE.SDK instead. */\n 'dock/hideLabels': boolean;\n basePath: string;\n defaultEmojiFontFileUri: string;\n defaultFontFileUri: string;\n license: string;\n 'page/title/fontFileUri': string;\n 'page/title/separator': string;\n fallbackFontUri: string;\n fallbackCMYKProfileUri: string;\n 'upload/supportedMimeTypes': string;\n 'web/fetchCredentials': 'omit' | 'same-origin' | 'include';\n 'controlGizmo/blockScaleDownLimit': number;\n listIndentPerLevel: number;\n tabStopInterval: number;\n positionSnappingThreshold: number;\n rotationSnappingThreshold: number;\n 'grid/spacingX': number;\n 'grid/spacingY': number;\n 'dragToSwapFills/longPressDurationMs': number;\n exportPendingTimeoutSeconds: number;\n maxImageSize: number;\n maxPreviewResolution: number;\n maxConcurrentRequestsPerHost: number;\n borderOutlineColor: Color$1;\n clearColor: Color$1;\n 'colorMaskingSettings/maskColor': Color$1;\n cropOverlayColor: Color$1;\n errorStateColor: Color$1;\n highlightColor: Color$1;\n 'page/exclusionAreaFillColor': Color$1;\n 'page/exclusionAreaFrameColor': Color$1;\n 'page/pageSliceGuideColor': Color$1;\n 'page/innerBorderColor': Color$1;\n 'page/marginFillColor': Color$1;\n 'page/marginFrameColor': Color$1;\n 'page/outerBorderColor': Color$1;\n 'page/safetyFillColor': Color$1;\n 'page/safetyFrameColor': Color$1;\n 'page/title/color': Color$1;\n pageHighlightColor: Color$1;\n placeholderHighlightColor: Color$1;\n progressColor: Color$1;\n rotationSnappingGuideColor: Color$1;\n ruleOfThirdsLineColor: Color$1;\n snappingGuideColor: Color$1;\n textVariableHighlightColor: Color$1;\n handleFillColor: Color$1;\n 'grid/color': Color$1;\n 'controlGizmo/moveHandleVisibility': 'auto' | 'always' | 'never';\n 'controlGizmo/resizeHandlesVisibility': 'auto' | 'always' | 'never';\n 'controlGizmo/scaleHandlesVisibility': 'auto' | 'always' | 'never';\n 'controlGizmo/rotateHandlesVisibility': 'auto' | 'always' | 'never';\n doubleClickSelectionMode: 'Direct' | 'Hierarchical';\n 'touch/pinchAction': 'None' | 'Zoom' | 'Scale' | 'Auto' | 'Dynamic';\n 'touch/rotateAction': 'None' | 'Rotate';\n 'camera/clamping/overshootMode': 'Center' | 'Reverse';\n /** @deprecated Use `cesdk.features.configure({ 'ly.img.dock': { iconSize: 'normal' } })` in CE.SDK instead. */\n 'dock/iconSize': 'normal' | 'large';\n /** @deprecated Set `colorMode` on each color picker of `cesdk.features` in CE.SDK instead, such as `cesdk.features.configure({ 'ly.img.fill': { options: { color: { options: { picker: { colorMode: 'CMYK' } } } } } })`. The pickers are `color › picker` of `ly.img.fill`, `ly.img.stroke` and `ly.img.shadow`, and `color › picker` and `background › picker` of `ly.img.text`. */\n 'colorPicker/colorMode': 'RGB' | 'CMYK' | 'Any';\n /** @deprecated Use `cesdk.features.configure({ 'ly.img.video.timeline': { trackVisibility: 'active' } })` in CE.SDK instead. */\n 'timeline/trackVisibility': 'all' | 'active';\n /** @deprecated Use `cesdk.features.configure({ 'ly.img.transitions': { controlVisibility: 'always' } })` in CE.SDK instead. */\n 'timeline/transitionControlVisibility': 'hover' | 'always';\n renderMode: 'Preview' | 'Export' | 'Thumbnail';\n alwaysHighlightPlaceholders: boolean;\n 'colorMaskingSettings/secondPass': boolean;\n 'debug/enforceScopesInAPIs': boolean;\n 'debug/showCameraDebugVisualization': boolean;\n 'debug/showHandlesInteractionArea': boolean;\n 'debug/useDebugMipmaps': boolean;\n 'debug/rasterExportMaxTileSide': number;\n 'debug/rasterExportMaxOptimizedJpegPixels': number;\n 'debug/showDebugUI': boolean;\n 'debug/hookInputSystem': boolean;\n 'features/effectsEnabled': boolean;\n 'features/highQualityMipmaps': boolean;\n 'features/implicitUpdatesEnabled': boolean;\n 'features/templatingEnabled': boolean;\n 'features/videosEnabled': boolean;\n 'features/videoCaptionsEnabled': boolean;\n 'features/forceLowQualityVideoPreview': boolean;\n 'features/matchThumbnailSourceToFill': boolean;\n 'features/p3WorkingColorSpace': boolean;\n 'features/colorManagedEffectsEnabled': boolean;\n 'features/sRGBExportForSRGBImagesEnabled': boolean;\n 'features/removeForegroundTracksOnSceneLoad': boolean;\n 'features/videoTranscodingEnabled': boolean;\n 'features/textEditModeTransformHandlesEnabled': boolean;\n 'features/videoStreamingEnabled': boolean;\n 'features/downloadCacheEnabled': boolean;\n 'features/enforceAudioBeforeVideoBlocks': boolean;\n 'features/viewportCullingEnabled': boolean;\n 'features/automaticSourceSetsEnabled': boolean;\n 'features/enableAutomaticEnumerations': boolean;\n renderTextCursorAndSelectionInEngine: boolean;\n}\ntype SettingKey = keyof Settings;\ntype SettingValueType<K extends SettingKey> = Settings[K];\ntype EngineCapability = 'aacEncode' | 'opusEncode' | 'h264Encode' | 'hevcEncode' | 'vp9Encode' | 'av1Encode' | 'h264Decode' | 'hevcDecode' | 'vp9Decode' | 'av1Decode' | 'tempFileStorage' | 'concurrentFileRead' | 'vp8Encode' | 'vp8Decode' | 'opusDecode' | 'vorbisEncode' | 'vorbisDecode' | 'aacDecode' | 'mp3Decode';\ntype EngineCapabilityState = 'unchecked' | 'pending' | 'supported' | 'unsupported';\ntype AnimationTypeShorthand$1 = 'slide' | 'pan' | 'fade' | 'blur' | 'grow' | 'zoom' | 'pop' | 'wipe' | 'baseline' | 'crop_zoom' | 'spin' | 'spin_loop' | 'fade_loop' | 'blur_loop' | 'pulsating_loop' | 'breathing_loop' | 'jump_loop' | 'squeeze_loop' | 'sway_loop' | 'scale_loop' | 'typewriter_text' | 'block_swipe_text' | 'spread_text' | 'merge_text' | 'ken_burns';\ntype AnimationTypeLonghand$1 = `//ly.img.ubq/animation/${AnimationTypeShorthand$1}`;\ntype AssetStylePresetAnimationProperties = {\n [K in Extract<BoolPropertyName, `animation/${string}`>]?: boolean;\n} & {\n [K in Extract<EnumPropertyName, `animation/${string}`>]?: string;\n} & {\n [K in Extract<FloatPropertyName, `animation/${string}`>]?: number;\n} & {\n [K in Extract<ColorPropertyName, `animation/${string}`>]?: RGBColor$1 | RGBAColor$1;\n} & {\n 'playback/duration'?: number;\n animationEasing?: string;\n textWritingStyle?: string;\n textWritingOverlap?: number;\n} & {\n [path: string]: AssetStylePresetPropertyValue;\n};\ninterface AssetStylePresetAnimation {\n type: AnimationTypeLonghand$1;\n properties?: AssetStylePresetAnimationProperties;\n}\ntype AssetStylePresetPropertyValue = boolean | number | string | RGBColor$1 | RGBAColor$1 | null;\ntype AssetStylePresetProperties = {\n [K in BoolPropertyName as string extends K ? never : K]?: boolean;\n} & {\n [K in IntPropertyName as string extends K ? never : K]?: number;\n} & {\n [K in FloatPropertyName as string extends K ? never : K]?: number;\n} & {\n [K in DoublePropertyName as string extends K ? never : K]?: number;\n} & {\n [K in StringPropertyName as string extends K ? never : K]?: string;\n} & {\n [K in EnumPropertyName as string extends K ? never : K]?: string;\n} & {\n [K in ColorPropertyName as string extends K ? never : K]?: RGBColor$1 | RGBAColor$1;\n} & {\n 'text/path'?: string | null;\n} & {\n [path: string]: AssetStylePresetPropertyValue;\n};\ntype AssetStylePresetScalableProperty = 'stroke/width' | 'dropShadow/offset/x' | 'dropShadow/offset/y' | 'dropShadow/blurRadius/x' | 'dropShadow/blurRadius/y' | 'backgroundColor/cornerRadius';\ntype AssetStylePresetKeptProperty = 'text' | 'typeface' | 'fontSize' | 'path' | 'case' | 'text/path' | 'text/case' | BoolPropertyName | IntPropertyName | FloatPropertyName | DoublePropertyName | StringPropertyName | EnumPropertyName | ColorPropertyName;\ninterface AssetStylePreset {\n blockType?: '//ly.img.ubq/text' | '//ly.img.ubq/caption';\n mode?: 'replace' | 'merge';\n keepExisting?: AssetStylePresetKeptProperty[];\n typeface?: {\n family: string;\n weight?: FontWeight;\n style?: FontStyle;\n };\n fontSize?: {\n scale: number;\n resizeExistingOnApply?: boolean;\n };\n scaleWithFontSize?: Array<{\n property: AssetStylePresetScalableProperty;\n ratio: number;\n }>;\n properties?: AssetStylePresetProperties;\n inAnimation?: AssetStylePresetAnimation;\n outAnimation?: AssetStylePresetAnimation;\n loopAnimation?: AssetStylePresetAnimation;\n}\ninterface UBQActions {\n actionsRegister(id: string, trampoline: (jsonArgs: string) => string | Promise<string>, rawFn: (...args: unknown[]) => unknown): void;\n actionsGetLocal(id: string): ((...args: unknown[]) => unknown) | undefined;\n actionsUnregister(id: string): boolean;\n actionsHas(id: string): boolean;\n actionsRun(id: string, jsonArgs: string, resolve: (jsonResult: string) => void, reject: (error: string) => void): void;\n actionsHold(id: string): number | undefined;\n actionsRunHeld(handle: number, jsonArgs: string, resolve: (jsonResult: string) => void, reject: (error: string) => void): void;\n actionsRegisterHeld(id: string, handle: number): boolean;\n actionsRelease(handle: number): void;\n actionsList(matcher: string | null): Array<{\n id: string;\n enabled: boolean;\n argSchema: string | null;\n }>;\n}\ninterface EngineActionInfo {\n id: string;\n enabled: boolean;\n argSchema: string | null;\n}\ninterface AssetDropPayload {\n sourceId: string;\n assetId: string;\n target: DesignBlockId | null;\n page: DesignBlockId | null;\n pageX: number;\n pageY: number;\n}\ninterface EngineActionsRegistry {\n 'asset.drop': (payload: AssetDropPayload) => void | Promise<void>;\n 'video.decode.checkSupport': () => Promise<boolean>;\n 'video.encode.checkSupport': () => Promise<boolean>;\n}\ntype EngineCustomActionFunction = (...args: any[]) => unknown;\nclass EngineActions<Registry extends object = EngineActionsRegistry> {\n #private;\n constructor(ubq: UBQActions);\n register<K extends keyof Registry & string>(id: K, fn: Registry[K] extends (...args: any[]) => any ? Registry[K] : EngineCustomActionFunction): void;\n register(id: string, fn: EngineCustomActionFunction): void;\n get<K extends keyof Registry & string>(id: K): Registry[K] | undefined;\n get(id: string): EngineCustomActionFunction | undefined;\n run<K extends keyof Registry & string>(id: K, ...args: Registry[K] extends (...args: infer A) => any ? A : unknown[]): Promise<Registry[K] extends (...args: any[]) => infer R ? Awaited<R> : unknown>;\n run<R = unknown>(id: string, ...args: unknown[]): Promise<R>;\n has(id: string): boolean;\n unregister(id: string): boolean;\n list(options?: {\n matcher?: string;\n }): EngineActionInfo[];\n dispose(): void;\n}\ninterface AsyncOperation<T> {\n promise: Promise<T>;\n operation: number;\n}\ninterface NativeColorInternal {\n colorSpace: number;\n components: {\n x: number;\n y: number;\n z: number;\n w: number;\n };\n spotColorName: string;\n tint: number;\n externalReference: string;\n}\nnamespace NativeColorInternal {\n enum ColorSpace {\n sRGB = 0,\n CMYK = 1,\n SpotColor = 2\n }\n function toColor(color: NativeColorInternal): Color;\n function fromColor(color: Color): NativeColorInternal;\n}\ntype KeyframeEasing$1 = KeyframeEasing<AnimationEasing>;\ntype Keyframe$1 = Keyframe<AnimationEasing>;\nclass BlockAPI implements IBlockAPI {\n #private;\n constructor(engine: NativeEngine);\n isValid(block: DesignBlockId): boolean;\n findAll(): DesignBlockId[];\n findAllUnused(): DesignBlockId[];\n findAllInExclusionAreas(): DesignBlockId[];\n findByKind(kind: string): DesignBlockId[];\n getOwningPageSlice(block: DesignBlockId): DesignBlockId | null;\n getPageSlices(page: DesignBlockId): DesignBlockId[];\n movePageSliceIntoPage(pageOrPageSlice: DesignBlockId, page: DesignBlockId, index: number, options?: MovePageSliceOptions): DesignBlockId;\n movePageSliceOutOfPage(pageSlice: DesignBlockId, index: number, options?: MovePageSliceOptions): DesignBlockId;\n getScreenSpaceBoundingBoxXYWH(blocks: DesignBlockId[]): XYWH;\n isLineOrigin(block: DesignBlockId): boolean;\n removeModifier(block: DesignBlockId, index: number): void;\n isEffectEnabled(effect: DesignBlockId): boolean;\n convertToComponent(block: DesignBlockId): void;\n isComponent(block: DesignBlockId): boolean;\n createInstance(component: DesignBlockId): DesignBlockId;\n isInstance(block: DesignBlockId): boolean;\n getMainComponent(instance: DesignBlockId): DesignBlockId;\n detachInstance(instance: DesignBlockId): void;\n resetInstance(instance: DesignBlockId): void;\n combineAsVariants(components: DesignBlockId[]): DesignBlockId;\n setVariantProperty(component: DesignBlockId, name: string, value: string): void;\n getVariantProperty(component: DesignBlockId, name: string): string;\n findAllVariantProperties(component: DesignBlockId): string[];\n setInstanceVariant(instance: DesignBlockId, name: string, value: string): void;\n addComponentProperty(component: DesignBlockId, name: string, target: DesignBlockId, property: string): void;\n findAllComponentProperties(component: DesignBlockId): string[];\n setComponentProperty(instance: DesignBlockId, name: string, value: string): void;\n getComponentProperty(instance: DesignBlockId, name: string): string;\n removeSubshape(block: DesignBlockId, index: number): void;\n isCropAspectRatioLocked(block: DesignBlockId): boolean;\n getAnimatedValue(block: DesignBlockId, property: string, time: number): KeyframeValue;\n enterGroup(group: DesignBlockId): void;\n exitGroup(block: DesignBlockId): void;\n combine(blocks: DesignBlockId[], operation: BooleanOperation): DesignBlockId;\n createFromSVG(svg: string): DesignBlockId;\n isCombinable(blocks: DesignBlockId[]): boolean;\n setAudioFadeIn(block: DesignBlockId, duration: number, easing?: AnimationEasing): void;\n setAudioFadeOut(block: DesignBlockId, duration: number, easing?: AnimationEasing): void;\n isForceMuted(block: DesignBlockId): boolean;\n isVisibleAtCurrentPlaybackTime(block: DesignBlockId): boolean;\n isPlaceholderControlsOverlayEnabled(block: DesignBlockId): boolean;\n isPlaceholderControlsButtonEnabled(block: DesignBlockId): boolean;\n removeText(block: DesignBlockId, from?: number, to?: number): void;\n getTextAsHTML(block: DesignBlockId, from?: number, to?: number): string;\n replaceTextWithHTML(block: DesignBlockId, html: string, from?: number, to?: number): void;\n setTextFontWeightAndStyle(block: DesignBlockId, weight: FontWeight, style: FontStyle, from?: number, to?: number): void;\n getTextBackgroundColors(block: DesignBlockId, from?: number, to?: number): Color[];\n setTextBackgroundColor(block: DesignBlockId, color: Color, from?: number, to?: number): void;\n getTextScriptStyles(block: DesignBlockId, from?: number, to?: number): ScriptStyle[];\n setTextScriptStyle(block: DesignBlockId, scriptStyle: ScriptStyle, from?: number, to?: number): void;\n setFontRequest(block: DesignBlockId, request: FontRequest, from?: number, to?: number): void;\n getFontRequests(block: DesignBlockId, from?: number, to?: number): FontRequest[];\n setTextOpenTypeFeatures(block: DesignBlockId, features: OpenTypeFeature[], from?: number, to?: number): void;\n getTextOpenTypeFeatures(block: DesignBlockId, from?: number, to?: number): OpenTypeFeature[][];\n setTextVariationAxes(block: DesignBlockId, axes: VariationAxisValue[], from?: number, to?: number): void;\n getTextVariationAxes(block: DesignBlockId, from?: number, to?: number): VariationAxisValue[][];\n canToggleBoldFont(block: DesignBlockId, from?: number, to?: number): boolean;\n canToggleItalicFont(block: DesignBlockId, from?: number, to?: number): boolean;\n getTextCursorRange(): Range;\n setTextCursorRange(range: Range): void;\n getTextRenderDiagnostics(block: DesignBlockId): TextRenderDiagnostics;\n getTextVisibleLineGlobalBoundingBoxXYWH(block: DesignBlockId, lineIndex: number): XYWH;\n getTextEffectiveHorizontalAlignment(block: DesignBlockId): 'Left' | 'Right' | 'Center' | 'Justify';\n getTextDecorations(block: DesignBlockId, from?: number, to?: number): TextDecorationConfig[];\n addVideoFileURIToSourceSet(block: DesignBlockId, property: SourceSetPropertyName, uri: string, options?: AbortOptions): Promise<void>;\n getVideoWidth(block: DesignBlockId): number;\n getVideoHeight(block: DesignBlockId): number;\n split(block: DesignBlockId, atTime: number, options?: SplitOptions): DesignBlockId;\n setPageDurationSource(page: DesignBlockId, block: DesignBlockId): void;\n removePageDurationSource(page: DesignBlockId): void;\n isPageDurationSource(block: DesignBlockId): boolean;\n getPropertyType(property: string): PropertyType;\n isPropertyReadable(property: string): boolean;\n isPropertyWritable(property: string): boolean;\n getEnumValues<T = string>(enumProperty: string): T[];\n getState(block: DesignBlockId): BlockState;\n exportPreview(block: DesignBlockId): Promise<Blob>;\n exportToBuffer(block: DesignBlockId, mimeType: string, options?: ExportOptions): Promise<Uint8Array>;\n exportToStream(block: DesignBlockId, writable: WritableStream<Uint8Array>, options?: ExportOptions): Promise<void>;\n exportVideoToBuffer(block: DesignBlockId, mimeType: string, options?: VideoExportOptions, progressCallback?: (rendered: number, encoded: number, total: number) => void): Promise<Uint8Array>;\n exportAudioToBuffer(block: DesignBlockId, mimeType: string, options?: AudioExportOptions): Promise<Uint8Array>;\n applyAnimation(block: DesignBlockId, animation?: AnimationOptions): void;\n applyDropShadow(block: DesignBlockId, options?: DropShadowOptions): void;\n addImage(url: string, options?: AddImageOptions): Promise<DesignBlockId>;\n addVideo(url: string, width: number, height: number, options?: AddVideoOptions): Promise<DesignBlockId>;\n onStateChanged: (ids: DesignBlockId[], callback: (ids: DesignBlockId[]) => void) => (() => void);\n onSelectionChanged: (callback: () => void) => (() => void);\n onClicked: (callback: (id: DesignBlockId) => void) => (() => void);\n createCutoutFromBlocks(ids: DesignBlockId[], vectorizeDistanceThreshold?: number, simplifyDistanceThreshold?: number, useExistingShapeInformation?: boolean): DesignBlockId;\n createCutoutFromOperation(ids: DesignBlockId[], op: CutoutOperation): DesignBlockId;\n createCutoutFromPath(pathData: string): DesignBlockId;\n unstable_isAVResourceLoaded(id: DesignBlockId): boolean;\n unstable_setImportedImageDefinition(id: DesignBlockId, definition: ImportedImageDefinitionInput): void;\n unstable_getImportedImageDefinition(id: DesignBlockId): ImportedImageDefinitionInfo;\n setState(id: DesignBlockId, state: BlockState): void;\n canRevertToOriginalRatio(id: DesignBlockId): boolean;\n getDominantColors(handle: DesignBlockId, options?: DominantColorsOptions): Promise<DominantColor[]>;\n getBackgroundTrack(): DesignBlockId | null;\n moveToBackgroundTrack(block: DesignBlockId): void;\n generateVideoThumbnailSequence(id: DesignBlockId, thumbnailHeight: number, timeBegin: number, timeEnd: number, numberOfFrames: number, onFrame: (frameIndex: number, result: ThumbnailFrame | Error) => void): () => void;\n generateThumbnailAtTimeOffset(height: number, time: number): Promise<Blob>;\n setNativePixelBuffer(id: DesignBlockId, buffer: unknown): void;\n}\nclass SceneAPI implements ISceneAPI {\n #private;\n constructor(engine: NativeEngine);\n setDocumentColorProfile(slot: ProfileSlot$1, uri: string, options?: AbortOptions): Promise<void>;\n setDocumentColorProfileFromData(slot: ProfileSlot$1, data: Uint8Array): void;\n getDocumentColorProfileInfo(slot: ProfileSlot$1): DocumentColorProfileInfo;\n removeDocumentColorProfile(slot: ProfileSlot$1): void;\n /** @deprecated Use `setDocumentColorProfile` with Default/CMYK. */\n setCMYKProfile(uri: string, options?: AbortOptions): Promise<void>;\n /** @deprecated Use `setDocumentColorProfileFromData` with Default/CMYK. */\n setCMYKProfileFromData(data: Uint8Array): void;\n /** @deprecated Use `getDocumentColorProfileInfo` with Default/CMYK. */\n getCMYKProfileInfo(): CMYKProfileInfo;\n /** @deprecated Use `removeDocumentColorProfile` with Default/CMYK. */\n removeCMYKProfile(): void;\n getColorRenderingIntent(): ColorRenderingIntent;\n setColorRenderingIntent(intent: ColorRenderingIntent): void;\n isBlackPointCompensationEnabled(): boolean;\n setBlackPointCompensationEnabled(enabled: boolean): void;\n get(): DesignBlockId | null;\n load(source: string | URL, options?: LoadSceneOptions): Promise<DesignBlockId>;\n load(source: string | URL, overrideEditorConfig?: boolean, waitForResources?: boolean): Promise<DesignBlockId>;\n createFromImage(url: string, dpi?: number, pixelScaleFactor?: number, sceneLayout?: SceneLayout, spacing?: number, spacingInScreenSpace?: boolean, options?: AbortOptions): Promise<DesignBlockId>;\n createFromVideo(url: string, options?: AbortOptions): Promise<DesignBlockId>;\n applyTemplateFromString(content: string): Promise<void>;\n applyTemplateFromURL(url: string, options?: AbortOptions): Promise<void>;\n setDesignUnit(designUnit: DesignUnit$1): void;\n getDesignUnit(): DesignUnit$1;\n setFontSizeUnit(unit: FontSizeUnit): void;\n getFontSizeUnit(): FontSizeUnit;\n setAngleUnit(unit: SceneAngleUnit): void;\n getAngleUnit(): SceneAngleUnit;\n getLayout(): SceneLayout$1;\n setLayout(layout: SceneLayout): void;\n addMarker(name: string, time: number, duration?: number): void;\n getMarkers(): SceneMarker[];\n removeMarker(index: number): void;\n getPages(): DesignBlockId[];\n addPage(scene?: DesignBlockId): DesignBlockId;\n getCurrentPage(): DesignBlockId | null;\n setCurrentPages(pages: DesignBlockId[]): void;\n getCurrentPages(): DesignBlockId[];\n findNearestToViewPortCenterByType(type: DesignBlockType): DesignBlockId[];\n findNearestToViewPortCenterByKind(kind: string): DesignBlockId[];\n unstable_enableCameraPositionClamping(blocks: DesignBlockId[], paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number, scaledPaddingLeft?: number, scaledPaddingTop?: number, scaledPaddingRight?: number, scaledPaddingBottom?: number): void;\n unstable_disableCameraPositionClamping(blockOrScene?: number | null): void;\n unstable_isCameraPositionClampingEnabled(blockOrScene?: number | null): boolean;\n onZoomLevelChanged: (callback: () => void) => (() => void);\n onActiveChanged: (callback: () => void) => (() => void);\n}\nclass EditorAPI implements IEditorAPI {\n #private;\n constructor(engine: NativeEngine);\n getActiveLicense(): string;\n getEngineVersion(): string;\n unlockWithLicense(license: string): void;\n getCapabilityState(capability: EngineCapability): EngineCapabilityState;\n checkCapabilities(): Promise<void>;\n getSettingBool(keypath: SettingsBool): boolean;\n getSettingBool(keypath: SettingBoolPropertyName): boolean;\n setSettingBool(keypath: SettingsBool, value: boolean): void;\n getSettingInt(keypath: SettingsInt): number;\n getSettingInt(keypath: SettingIntPropertyName): number;\n setSettingInt(keypath: SettingsInt, value: number): void;\n setSettingInt(keypath: SettingIntPropertyName, value: number): void;\n getSettingFloat(keypath: SettingsFloat): number;\n getSettingFloat(keypath: SettingFloatPropertyName): number;\n setSettingFloat(keypath: SettingsFloat, value: number): void;\n setSettingFloat(keypath: SettingFloatPropertyName, value: number): void;\n getSettingDouble(keypath: OptionalPrefix<SettingsDouble>): number;\n setSettingDouble(keypath: OptionalPrefix<SettingsDouble>, value: number): void;\n getSettingString(keypath: SettingsString): string;\n getSettingString(keypath: SettingStringPropertyName): string;\n setSettingString(keypath: SettingsString, value: string): void;\n setSettingString(keypath: SettingStringPropertyName, value: string): void;\n getSettingColor(keypath: SettingsColor): Color;\n getSettingColor(keypath: SettingColorPropertyName): Color;\n setSettingColor(keypath: SettingsColor, value: Color): void;\n setSettingColor(keypath: SettingColorPropertyName, value: Color): void;\n getSettingEnum<T extends keyof SettingEnumType>(keypath: T): SettingEnumType[T];\n getSettingEnum(keypath: string): string;\n setSettingEnum<T extends keyof SettingEnumType>(keypath: T, value: SettingEnumType[T]): void;\n setSettingEnum(keypath: string, value: string): void;\n findAllSettings(): string[];\n getSettingType(keypath: string): SettingType;\n getSettingEnumOptions<T extends keyof SettingEnumType>(keypath: T): SettingEnumType[T][];\n getSettingEnumOptions(keypath: string): string[];\n getSetting<K extends SettingKey>(keypath: OptionalPrefix<K>): SettingValueType<K>;\n setSetting<K extends SettingKey>(keypath: OptionalPrefix<K>, value: SettingValueType<K>): void;\n getFontMetrics(fontFileUri: string, options?: AbortOptions): Promise<FontMetrics>;\n getFontInfo(fontFileUri: string, options?: AbortOptions): Promise<FontInfo>;\n setMovementConstraint(rules: MovementConstraintRule | MovementConstraintRule[]): void;\n removeMovementConstraint(scopes?: MovementConstraintScope | MovementConstraintScope[]): void;\n setSafeAreaInsets(insets: {\n left?: number;\n top?: number;\n right?: number;\n bottom?: number;\n }): void;\n getSafeAreaInsets(): {\n left: number;\n top: number;\n right: number;\n bottom: number;\n };\n getUsedMemory(): number;\n getAvailableMemory(): number;\n releaseMemory(): void;\n convertColorToColorSpace(color: Color, colorSpace: 'sRGB'): RGBAColor;\n convertColorToColorSpace(color: Color, colorSpace: 'CMYK'): CMYKColor;\n convertColorToColorSpace(color: Color, colorSpace: ColorSpace): never;\n loadColorProfiles(options?: AbortOptions): Promise<void>;\n /** @deprecated Use `loadColorProfiles` instead. */\n loadCMYKProfile(options?: AbortOptions): Promise<void>;\n getAbsoluteURI(relativeUri: string): Promise<string>;\n getFileFormats(): FileSupport[];\n checkFileSupport(uri: string, options?: AbortOptions): Promise<FileSupport>;\n getMimeType(uri: string, options?: AbortOptions): Promise<string>;\n defaultURIResolver(relativePath: string): string;\n setTypefaceResolver(resolver?: TypefaceResolver | null): void;\n setURIResolver(resolver?: SyncURIResolver | null): void;\n setURIResolverAsync(resolver?: AsyncURIResolver | null): void;\n getURIResolver(): SyncURIResolver | null;\n getURIResolverAsync(): AsyncURIResolver | null;\n cloneBuffers(scene?: DesignBlockId | null): Buffer$1[];\n restoreBuffers(buffers: Buffer$1[]): void;\n getTrackingMetadata(): TrackingMetadata;\n setTrackingMetadata(metadata: TrackingMetadata): void;\n relocateResource(currentUri: string, newUri: string): void;\n findAllMediaURIs(): string[];\n findAllTransientResources(): TransientResource[];\n getResourceData(uri: string, chunkSize: number, onData: (result: Uint8Array) => boolean): void;\n getMaxExportSize(): number;\n unstable_isInteractionHappening(): boolean;\n getTextCursorPositionInScreenSpaceX(): number;\n getTextCursorPositionInScreenSpaceY(): number;\n getSpotColorForCutoutType(type: CutoutType): string;\n setSpotColorForCutoutType(type: CutoutType, color: string): void;\n addVectorNode(): void;\n deleteVectorNode(): void;\n deleteSelectedVectorControlPoints(): void;\n getSelectedVectorNodeMirrorMode(): number;\n setSelectedVectorNodeMirrorMode(mode: number): void;\n getVectorEditAddMode(): boolean;\n setVectorEditAddMode(active: boolean): void;\n getVectorEditBendMode(): boolean;\n setVectorEditBendMode(active: boolean): void;\n getVectorEditDeleteMode(): boolean;\n setVectorEditDeleteMode(active: boolean): void;\n toggleSelectedVectorNodeSmooth(): void;\n findAllSpotColors(): string[];\n getSpotColorRGBA(name: string): RGBA;\n getSpotColorCMYK(name: string): CMYK;\n setSpotColorRGB(name: string, r: number, g: number, b: number): void;\n setSpotColorCMYK(name: string, c: number, m: number, y: number, k: number): void;\n removeSpotColor(name: string): void;\n setSoftProofEnabled(enabled: boolean): void;\n isSoftProofEnabled(): boolean;\n setSoftProofColorSpace(colorSpace: SoftProofColorSpace): void;\n getSoftProofColorSpace(): SoftProofColorSpace;\n getRole(): RoleString;\n setRole(role: RoleString): void;\n startTracking(license: string, userId: string, deviceId?: string): void;\n trackEvent(name: string, data?: string): void;\n overrideTrackingEndpoint(endpoint: string): void;\n beginExportTransaction(type: string, format: string, producer: string, block: DesignBlockId): string;\n endExportTransaction(transactionId: string, bytes?: number, duration?: number): void;\n cancelExportTransaction(transactionId: string): void;\n removeUndoStep(): void;\n onStateChanged: (callback: () => void) => (() => void);\n onSettingsChanged: (callback: () => void) => (() => void);\n onHistoryUpdatedWithKind: (callback: (kind: HistoryUpdate) => void) => (() => void);\n onRoleChanged: (callback: (role: RoleString) => void) => (() => void);\n createBuffer(): string;\n destroyBuffer(uri: string): void;\n setBufferData(uri: string, offset: number, data: Uint8Array): void;\n getBufferData(uri: string, offset: number, length: number): Uint8Array;\n getBufferLength(uri: string): number;\n setBufferLength(uri: string, length: number): void;\n}\nclass EventAPI implements IEventAPI {\n #private;\n constructor(engine: NativeEngine);\n subscribe: (blocks: DesignBlockId[], callback: (events: BlockEvent[]) => void) => (() => void);\n}\nclass AssetAPI implements IAssetAPI {\n #private;\n constructor(engine: NativeEngine);\n addSource(source: AssetSource): void;\n addLocalSource(id: string, supportedMimeTypes?: string[], applyAsset?: (asset: CompleteAssetResult) => Promise<DesignBlockId | undefined>, applyAssetToBlock?: (asset: CompleteAssetResult, block: DesignBlockId) => Promise<void>): void;\n addLocalAssetSourceFromJSONString(contentJSON: string, basePath?: string, options?: {\n matcher?: string[];\n }): Promise<string>;\n addLocalAssetSourceFromJSONURI(contentURI: string, options?: {\n matcher?: string[];\n abortSignal?: AbortSignal;\n }): Promise<string>;\n removeSource(id: string): void;\n findAllSources(): string[];\n findAssets(sourceId: string, query: AssetsQuery): Promise<AssetsQueryResult<CompleteAssetResult>>;\n fetchAsset(sourceId: string, assetId: string, params?: Pick<AssetQueryData, 'locale'>): Promise<CompleteAssetResult | null>;\n getSupportedMimeTypes(sourceId: string): string[];\n addAssetToSource(sourceId: string, asset: AssetDefinition): void;\n removeAssetFromSource(sourceId: string, assetId: string): void;\n onAssetSourceAdded: (callback: (sourceID: string) => void) => (() => void);\n onAssetSourceRemoved: (callback: (sourceID: string) => void) => (() => void);\n onAssetSourceUpdated: (callback: (sourceID: string) => void) => (() => void);\n apply(sourceId: string, assetResult: AssetResult, options?: ApplyAssetOptions): Promise<DesignBlockId | undefined>;\n applyToBlock(sourceId: string, assetResult: AssetResult, block: DesignBlockId): Promise<void>;\n applyProperty(sourceId: string, asset: AssetResult, property: AssetProperty): Promise<void>;\n defaultApplyAsset(asset: AssetResult, options?: DefaultApplyAssetOptions): Promise<DesignBlockId | undefined>;\n defaultApplyAssetToBlock(asset: AssetResult, block: DesignBlockId): Promise<void>;\n /** @deprecated The underlying flag is deprecated. To control whether an upload button is rendered, use the `canAdd` option on an asset library entry instead. */\n canManageAssets(sourceId: string): boolean;\n dispose(): void;\n}\ninterface NativeEngine {\n update(): boolean;\n dispose(): void;\n requestFrame(width: number, height: number, pixelRatio?: number): void;\n getFrameInfo(): FrameInfo;\n readFrame(target: Uint8Array): boolean;\n sendMouseMove(x: number, y: number, timestamp?: number): void;\n sendMouseButton(x: number, y: number, button: number, down: boolean, modifiers?: InputModifiers, timestamp?: number): void;\n sendKey(key: string, characters?: string, modifiers?: InputModifiers, timestamp?: number): void;\n mouseWheel(deltaX: number, deltaY: number, x?: number, y?: number, modifiers?: InputModifiers): boolean;\n unlockWithLicense(license: string): void;\n activateLicense(license: string, userId?: string): Promise<void>;\n takeLicenseForOtherBuild(): string | null;\n overrideLicenseServerEndpoint?(endpoint: string): void;\n getActiveLicense(): string;\n getEngineVersion(): string;\n getCapabilityState(capability: string): string;\n checkCapabilities(): void;\n createScene(sceneLayout?: string): DesignBlockId;\n createSceneFromImage(uri: string, dpi?: number, pixelScaleFactor?: number): AsyncOperation<DesignBlockId>;\n createSceneFromVideo(uri: string): AsyncOperation<DesignBlockId>;\n loadScene(source: string, overrideEditorConfig?: boolean, waitForResources?: boolean, onProgress?: (percent: number) => void): AsyncOperation<DesignBlockId>;\n loadSceneFromString(content: string, overrideEditorConfig?: boolean, waitForResources?: boolean): AsyncOperation<DesignBlockId>;\n loadSceneFromURL(url: string, overrideEditorConfig?: boolean, waitForResources?: boolean): AsyncOperation<DesignBlockId>;\n loadSceneFromArchiveURL(url: string, overrideEditorConfig?: boolean, waitForResources?: boolean, onProgress?: (percent: number) => void): AsyncOperation<DesignBlockId>;\n saveSceneToString(scene: DesignBlockId, options?: {\n resourceSchemesAllowed?: string[];\n persistenceCallback?: (url: string, dataHash: string, persisted: PersistedCallback) => void | Promise<void>;\n compression?: {\n format?: number;\n level?: number;\n };\n }): AsyncOperation<string>;\n saveSceneToArchive(scene: DesignBlockId, options?: {\n compression?: {\n format?: number;\n level?: number;\n };\n }): AsyncOperation<Uint8Array>;\n applyTemplateFromString(content: string): Promise<void>;\n applyTemplateFromURL(url: string): AsyncOperation<void>;\n getPages(scene: DesignBlockId): DesignBlockId[];\n getCurrentPage(scene: DesignBlockId): DesignBlockId | null;\n setCurrentPages(pages: DesignBlockId[]): void;\n getCurrentPages(): DesignBlockId[];\n getSceneLayout(scene: DesignBlockId): string;\n setSceneLayout(scene: DesignBlockId, layout: string): void;\n addSceneMarker(scene: DesignBlockId, name: string, time: number, duration: number): void;\n getSceneMarkers(scene: DesignBlockId): SceneMarker[];\n removeSceneMarker(scene: DesignBlockId, index: number): void;\n getDesignUnit(scene: DesignBlockId): string;\n setDesignUnit(scene: DesignBlockId, unit: string): void;\n getFontSizeUnit(scene: DesignBlockId): string;\n setFontSizeUnit(scene: DesignBlockId, unit: string): void;\n getAngleUnit(scene: DesignBlockId): string;\n setAngleUnit(scene: DesignBlockId, unit: string): void;\n create(type: DesignBlockType): DesignBlockId;\n createFill(type: FillType): DesignBlockId;\n createShape(type: ShapeType): DesignBlockId;\n createEffect(type: EffectType): DesignBlockId;\n createBlur(type: BlurType): DesignBlockId;\n createMask(): DesignBlockId;\n createAnimation(type: AnimationType): DesignBlockId;\n duplicate(block: DesignBlockId, attachToParent?: boolean): DesignBlockId;\n destroy(block: DesignBlockId): void;\n isValid(block: DesignBlockId): boolean;\n findAll(): DesignBlockId[];\n findAllPlaceholders(): DesignBlockId[];\n findAllUnused(): DesignBlockId[];\n findAllInExclusionAreas(): DesignBlockId[];\n findByName(name: string): DesignBlockId[];\n findByType(type: ObjectType): DesignBlockId[];\n findByKind(kind: string): DesignBlockId[];\n findAllSelected(): DesignBlockId[];\n getParent(block: DesignBlockId): DesignBlockId;\n setTransformParent(block: DesignBlockId, parent: DesignBlockId | null): void;\n getTransformParent(block: DesignBlockId): DesignBlockId | null;\n getOwningPageSlice(block: DesignBlockId): DesignBlockId | null;\n getPageSlices(page: DesignBlockId): DesignBlockId[];\n hasTransformAnchor(block: DesignBlockId): boolean;\n hasParent(block: DesignBlockId): boolean;\n getChildren(block: DesignBlockId): DesignBlockId[];\n movePageSliceIntoPage(pageOrPageSlice: DesignBlockId, page: DesignBlockId, index: number, convertSourceToPage: boolean): DesignBlockId;\n movePageSliceOutOfPage(pageSlice: DesignBlockId, index: number, convertSourceToPage: boolean): DesignBlockId;\n insertChild(parent: DesignBlockId, child: DesignBlockId, index: number): void;\n appendChild(parent: DesignBlockId, child: DesignBlockId): void;\n getType(block: DesignBlockId): ObjectTypeLonghand;\n getKind(block: DesignBlockId): string;\n setKind(block: DesignBlockId, kind: string): void;\n getName(block: DesignBlockId): string;\n setName(block: DesignBlockId, name: string): void;\n getUUID(block: DesignBlockId): string;\n getBool(block: DesignBlockId, property: BoolPropertyName): boolean;\n setBool(block: DesignBlockId, property: BoolPropertyName, value: boolean): void;\n getInt(block: DesignBlockId, property: IntPropertyName): number;\n setInt(block: DesignBlockId, property: IntPropertyName, value: number): void;\n getFloat(block: DesignBlockId, property: FloatPropertyName): number;\n setFloat(block: DesignBlockId, property: FloatPropertyName, value: number): void;\n getDouble(block: DesignBlockId, property: DoublePropertyName): number;\n setDouble(block: DesignBlockId, property: DoublePropertyName, value: number): void;\n getVec2(block: DesignBlockId, property: Vec2PropertyName): Vec2;\n setVec2(block: DesignBlockId, property: Vec2PropertyName, value: Vec2): void;\n getString(block: DesignBlockId, property: StringPropertyName): string;\n setString(block: DesignBlockId, property: StringPropertyName, value: string): void;\n getColor(block: DesignBlockId, property: string): NativeColorInternal;\n setColor(block: DesignBlockId, property: string, value: NativeColorInternal): void;\n getEnum(block: DesignBlockId, property: string): string;\n setEnum(block: DesignBlockId, property: string, value: string): void;\n getPositionX(block: DesignBlockId): number;\n setPositionX(block: DesignBlockId, value: number): void;\n getPositionY(block: DesignBlockId): number;\n setPositionY(block: DesignBlockId, value: number): void;\n getPositionXMode(block: DesignBlockId): PositionXMode;\n setPositionXMode(block: DesignBlockId, mode: PositionXMode): void;\n getPositionYMode(block: DesignBlockId): PositionYMode;\n setPositionYMode(block: DesignBlockId, mode: PositionYMode): void;\n getWidth(block: DesignBlockId): number;\n setWidth(block: DesignBlockId, value: number, maintainCrop?: boolean): void;\n getWidthMode(block: DesignBlockId): WidthMode;\n setWidthMode(block: DesignBlockId, mode: WidthMode): void;\n getHeight(block: DesignBlockId): number;\n setHeight(block: DesignBlockId, value: number, maintainCrop?: boolean): void;\n getHeightMode(block: DesignBlockId): HeightMode;\n setHeightMode(block: DesignBlockId, mode: HeightMode): void;\n setSize(block: DesignBlockId, width: number, height: number, sizeMode: SizeMode | undefined, maintainCrop: boolean): void;\n getRotation(block: DesignBlockId): number;\n setRotation(block: DesignBlockId, value: number): void;\n getFlip(block: DesignBlockId): {\n horizontal: boolean;\n vertical: boolean;\n };\n setFlipHorizontal(block: DesignBlockId, flip: boolean): void;\n setFlipVertical(block: DesignBlockId, flip: boolean): void;\n scale(block: DesignBlockId, scale: number, anchorX?: number, anchorY?: number): void;\n fillParent(block: DesignBlockId): void;\n resizeContentAware(blocks: DesignBlockId[], width: number, height: number): void;\n getGlobalBoundingBoxX(block: DesignBlockId): number;\n getGlobalBoundingBoxY(block: DesignBlockId): number;\n getGlobalBoundingBoxWidth(block: DesignBlockId): number;\n getGlobalBoundingBoxHeight(block: DesignBlockId): number;\n getScreenSpaceBoundingBoxXYWH(blocks: DesignBlockId[]): XYWH;\n supportsFill(block: DesignBlockId): boolean;\n getFill(block: DesignBlockId): DesignBlockId;\n setFill(block: DesignBlockId, fill: DesignBlockId): void;\n getStrokeFill(block: DesignBlockId): DesignBlockId | null;\n setStrokeFill(block: DesignBlockId, fill: DesignBlockId | null): void;\n getFillEnabled(block: DesignBlockId): boolean;\n setFillEnabled(block: DesignBlockId, enabled: boolean): void;\n getFillSolidColor(block: DesignBlockId): RGBAColor;\n setFillSolidColor(block: DesignBlockId, color: {\n r: number;\n g: number;\n b: number;\n a: number;\n }): void;\n getGradientColorStops(block: DesignBlockId, property: string): Array<{\n color: NativeColorInternal;\n stop: number;\n }>;\n setGradientColorStops(block: DesignBlockId, property: string, stops: Array<{\n color: NativeColorInternal;\n stop: number;\n }>): void;\n supportsStroke(block: DesignBlockId): boolean;\n getStroke(block: DesignBlockId): DesignBlockId;\n setStroke(block: DesignBlockId, stroke: DesignBlockId): void;\n getStrokeEnabled(block: DesignBlockId): boolean;\n setStrokeEnabled(block: DesignBlockId, enabled: boolean): void;\n getStrokeColor(block: DesignBlockId): NativeColorInternal;\n setStrokeColor(block: DesignBlockId, color: NativeColorInternal): void;\n getStrokeWidth(block: DesignBlockId): number;\n setStrokeWidth(block: DesignBlockId, width: number): void;\n getStrokeStyle(block: DesignBlockId): StrokeStyle;\n setStrokeStyle(block: DesignBlockId, style: StrokeStyle): void;\n getStrokePosition(block: DesignBlockId): StrokePosition;\n setStrokePosition(block: DesignBlockId, position: StrokePosition): void;\n getStrokeCornerGeometry(block: DesignBlockId): StrokeCornerGeometry;\n setStrokeCornerGeometry(block: DesignBlockId, geometry: StrokeCornerGeometry): void;\n getStrokeStartCap(block: DesignBlockId): string;\n setStrokeStartCap(block: DesignBlockId, cap: string): void;\n getStrokeEndCap(block: DesignBlockId): string;\n setStrokeEndCap(block: DesignBlockId, cap: string): void;\n getStrokeDashStartCap(block: DesignBlockId): string;\n setStrokeDashStartCap(block: DesignBlockId, cap: string): void;\n getStrokeDashEndCap(block: DesignBlockId): string;\n setStrokeDashEndCap(block: DesignBlockId, cap: string): void;\n getStrokeDashArray(block: DesignBlockId): number[];\n setStrokeDashArray(block: DesignBlockId, dashArray: number[]): void;\n getStrokeDashOffset(block: DesignBlockId): number;\n setStrokeDashOffset(block: DesignBlockId, dashOffset: number): void;\n isLineOrigin(block: DesignBlockId): boolean;\n supportsEffects(block: DesignBlockId): boolean;\n getEffects(block: DesignBlockId): DesignBlockId[];\n appendEffect(block: DesignBlockId, effect: DesignBlockId): void;\n insertEffect(block: DesignBlockId, effect: DesignBlockId, index: number): void;\n removeEffect(block: DesignBlockId, index: number): void;\n isEffectEnabled(effect: DesignBlockId): boolean;\n setEffectEnabled(effect: DesignBlockId, enabled: boolean): void;\n setEffectSource(effect: DesignBlockId, source: DesignBlockId | null): void;\n getEffectSource(effect: DesignBlockId): DesignBlockId | null;\n supportsMasks(block: DesignBlockId): boolean;\n getMasks(block: DesignBlockId): DesignBlockId[];\n appendMask(block: DesignBlockId, mask: DesignBlockId): void;\n insertMask(block: DesignBlockId, mask: DesignBlockId, index: number): void;\n removeMask(block: DesignBlockId, index: number): void;\n createTextAnimator(): DesignBlockId;\n supportsTextAnimators(block: DesignBlockId): boolean;\n getTextAnimators(block: DesignBlockId): DesignBlockId[];\n appendTextAnimator(block: DesignBlockId, animator: DesignBlockId): void;\n insertTextAnimator(block: DesignBlockId, animator: DesignBlockId, index: number): void;\n removeTextAnimator(block: DesignBlockId, index: number): void;\n createModifier(type: ModifierType): DesignBlockId;\n supportsModifiers(block: DesignBlockId): boolean;\n getModifiers(block: DesignBlockId): DesignBlockId[];\n appendModifier(block: DesignBlockId, modifier: DesignBlockId): void;\n insertModifier(block: DesignBlockId, modifier: DesignBlockId, index: number): void;\n removeModifier(block: DesignBlockId, index: number): void;\n supportsBlur(block: DesignBlockId): boolean;\n getBlur(block: DesignBlockId): DesignBlockId;\n setBlur(block: DesignBlockId, blur: DesignBlockId): void;\n getBlurEnabled(block: DesignBlockId): boolean;\n setBlurEnabled(block: DesignBlockId, enabled: boolean): void;\n convertToComponent(block: DesignBlockId): void;\n isComponent(block: DesignBlockId): boolean;\n createInstance(component: DesignBlockId): DesignBlockId;\n isInstance(block: DesignBlockId): boolean;\n getMainComponent(instance: DesignBlockId): DesignBlockId;\n detachInstance(instance: DesignBlockId): void;\n resetInstance(instance: DesignBlockId): void;\n combineAsVariants(components: DesignBlockId[]): DesignBlockId;\n setVariantProperty(component: DesignBlockId, name: string, value: string): void;\n getVariantProperty(component: DesignBlockId, name: string): string;\n findAllVariantProperties(component: DesignBlockId): string[];\n setInstanceVariant(instance: DesignBlockId, name: string, value: string): void;\n addComponentProperty(component: DesignBlockId, name: string, target: DesignBlockId, property: string): void;\n findAllComponentProperties(component: DesignBlockId): string[];\n setComponentProperty(instance: DesignBlockId, name: string, value: string): void;\n getComponentProperty(instance: DesignBlockId, name: string): string;\n supportsShape(block: DesignBlockId): boolean;\n getShape(block: DesignBlockId): DesignBlockId;\n setShape(block: DesignBlockId, shape: DesignBlockId): void;\n getSubshapes(block: DesignBlockId): DesignBlockId[];\n insertSubshape(block: DesignBlockId, subshape: DesignBlockId, index: number): void;\n appendSubshape(block: DesignBlockId, subshape: DesignBlockId): void;\n removeSubshape(block: DesignBlockId, index: number): void;\n supportsAnimation(block: DesignBlockId): boolean;\n getInAnimation(block: DesignBlockId): DesignBlockId;\n setInAnimation(block: DesignBlockId, animation: DesignBlockId): void;\n getOutAnimation(block: DesignBlockId): DesignBlockId;\n setOutAnimation(block: DesignBlockId, animation: DesignBlockId): void;\n getLoopAnimation(block: DesignBlockId): DesignBlockId;\n setLoopAnimation(block: DesignBlockId, animation: DesignBlockId): void;\n createTransition(type: string): DesignBlockId;\n supportsTransition(block: DesignBlockId): boolean;\n getTransition(block: DesignBlockId): DesignBlockId;\n setTransition(block: DesignBlockId, transition: DesignBlockId): void;\n removeTransition(block: DesignBlockId): void;\n supportsContentFillMode(block: DesignBlockId): boolean;\n getContentFillMode(block: DesignBlockId): ContentFillMode;\n setContentFillMode(block: DesignBlockId, mode: ContentFillMode): void;\n supportsCrop(block: DesignBlockId): boolean;\n resetCrop(block: DesignBlockId): void;\n adjustCropToFillFrame(block: DesignBlockId, minScaleRatio: number): void;\n getCropRotation(block: DesignBlockId): number;\n setCropRotation(block: DesignBlockId, rotation: number): void;\n getCropScaleX(block: DesignBlockId): number;\n setCropScaleX(block: DesignBlockId, scale: number): void;\n getCropScaleY(block: DesignBlockId): number;\n setCropScaleY(block: DesignBlockId, scale: number): void;\n getCropScaleRatio(block: DesignBlockId): number;\n setCropScaleRatio(block: DesignBlockId, ratio: number): void;\n getCropTranslationX(block: DesignBlockId): number;\n setCropTranslationX(block: DesignBlockId, translation: number): void;\n getCropTranslationY(block: DesignBlockId): number;\n setCropTranslationY(block: DesignBlockId, translation: number): void;\n isCropAspectRatioLocked(block: DesignBlockId): boolean;\n setCropAspectRatioLocked(block: DesignBlockId, locked: boolean): void;\n flipCropHorizontal(block: DesignBlockId): void;\n flipCropVertical(block: DesignBlockId): void;\n supportsDropShadow(block: DesignBlockId): boolean;\n isDropShadowEnabled(block: DesignBlockId): boolean;\n setDropShadowEnabled(block: DesignBlockId, enabled: boolean): void;\n getDropShadowColor(block: DesignBlockId): NativeColorInternal;\n setDropShadowColor(block: DesignBlockId, color: NativeColorInternal): void;\n getDropShadowOffsetX(block: DesignBlockId): number;\n setDropShadowOffsetX(block: DesignBlockId, offset: number): void;\n getDropShadowOffsetY(block: DesignBlockId): number;\n setDropShadowOffsetY(block: DesignBlockId, offset: number): void;\n getDropShadowBlurRadiusX(block: DesignBlockId): number;\n setDropShadowBlurRadiusX(block: DesignBlockId, radius: number): void;\n getDropShadowBlurRadiusY(block: DesignBlockId): number;\n setDropShadowBlurRadiusY(block: DesignBlockId, radius: number): void;\n getDropShadowClip(block: DesignBlockId): boolean;\n setDropShadowClip(block: DesignBlockId, clip: boolean): void;\n supportsBlendMode(block: DesignBlockId): boolean;\n getBlendMode(block: DesignBlockId): BlendMode;\n setBlendMode(block: DesignBlockId, mode: BlendMode): void;\n supportsOpacity(block: DesignBlockId): boolean;\n getOpacity(block: DesignBlockId): number;\n setOpacity(block: DesignBlockId, opacity: number): void;\n getVisible(block: DesignBlockId): boolean;\n setVisible(block: DesignBlockId, visible: boolean): void;\n getClipped(block: DesignBlockId): boolean;\n setClipped(block: DesignBlockId, clipped: boolean): void;\n setKeyframes(block: DesignBlockId, property: string, keyframes: unknown[], mode: TrackMode): void;\n getKeyframes(block: DesignBlockId, property: string): unknown[];\n getKeyframeMode(block: DesignBlockId, property: string): TrackMode;\n getAnimatedValue(block: DesignBlockId, property: string, time: number): unknown;\n removeKeyframes(block: DesignBlockId, property: string): void;\n getAnimatedProperties(block: DesignBlockId): string[];\n isPropertyAnimatable(block: DesignBlockId, property: string): boolean;\n getMatte(block: DesignBlockId): BlockMatte | null;\n setMatte(block: DesignBlockId, source: DesignBlockId | null, mode: MatteMode): void;\n setSelected(block: DesignBlockId, selected: boolean): void;\n isSelected(block: DesignBlockId): boolean;\n select(block: DesignBlockId): void;\n bringToFront(block: DesignBlockId): void;\n sendToBack(block: DesignBlockId): void;\n bringForward(block: DesignBlockId): void;\n sendBackward(block: DesignBlockId): void;\n setAlwaysOnTop(block: DesignBlockId, enabled: boolean): void;\n setAlwaysOnBottom(block: DesignBlockId, enabled: boolean): void;\n isAlwaysOnTop(block: DesignBlockId): boolean;\n isAlwaysOnBottom(block: DesignBlockId): boolean;\n alignHorizontally(blocks: DesignBlockId[], alignment: TextHorizontalAlignment): void;\n alignVertically(blocks: DesignBlockId[], alignment: TextVerticalAlignment): void;\n isAlignable(blocks: DesignBlockId[]): boolean;\n distributeHorizontally(blocks: DesignBlockId[]): void;\n distributeVertically(blocks: DesignBlockId[]): void;\n isDistributable(blocks: DesignBlockId[]): boolean;\n group(blocks: DesignBlockId[]): DesignBlockId;\n ungroup(group: DesignBlockId): void;\n isGroupable(blocks: DesignBlockId[]): boolean;\n enterGroup(group: DesignBlockId): void;\n exitGroup(block: DesignBlockId): void;\n combine(blocks: DesignBlockId[], operation: BooleanOperation): DesignBlockId;\n createFromSVG(svg: string): DesignBlockId;\n isCombinable(blocks: DesignBlockId[]): boolean;\n supportsDuration(block: DesignBlockId): boolean;\n getDuration(block: DesignBlockId): number;\n setDuration(block: DesignBlockId, duration: number): void;\n supportsTimeOffset(block: DesignBlockId): boolean;\n getTimeOffset(block: DesignBlockId): number;\n setTimeOffset(block: DesignBlockId, offset: number): void;\n supportsTrim(block: DesignBlockId): boolean;\n getTrimOffset(block: DesignBlockId): number;\n setTrimOffset(block: DesignBlockId, offset: number): void;\n getTrimLength(block: DesignBlockId): number;\n setTrimLength(block: DesignBlockId, length: number): void;\n supportsPlaybackControl(block: DesignBlockId): boolean;\n supportsPlaybackTime(block: DesignBlockId): boolean;\n getPlaybackTime(block: DesignBlockId): number;\n setPlaybackTime(block: DesignBlockId, time: number): void;\n isPlaying(block: DesignBlockId): boolean;\n setPlaying(block: DesignBlockId, playing: boolean): void;\n isLooping(block: DesignBlockId): boolean;\n setLooping(block: DesignBlockId, looping: boolean): void;\n getPlaybackSpeed(block: DesignBlockId): number;\n setPlaybackSpeed(block: DesignBlockId, speed: number): void;\n isMuted(block: DesignBlockId): boolean;\n setMuted(block: DesignBlockId, muted: boolean): void;\n getVolume(block: DesignBlockId): number;\n setVolume(block: DesignBlockId, volume: number): void;\n setAudioFadeIn(block: DesignBlockId, duration: number, easing: AnimationEasing): void;\n setAudioFadeOut(block: DesignBlockId, duration: number, easing: AnimationEasing): void;\n isSoloPlaybackEnabled(block: DesignBlockId): boolean;\n setSoloPlaybackEnabled(block: DesignBlockId, enabled: boolean): void;\n isForceMuted(block: DesignBlockId): boolean;\n isVisibleAtCurrentPlaybackTime(block: DesignBlockId): boolean;\n isTransformLocked(block: DesignBlockId): boolean;\n setTransformLocked(block: DesignBlockId, locked: boolean): void;\n isHighlightingEnabled(block: DesignBlockId): boolean;\n setHighlightingEnabled(block: DesignBlockId, enabled: boolean): void;\n isSelectionEnabled(block: DesignBlockId): boolean;\n setSelectionEnabled(block: DesignBlockId, enabled: boolean): void;\n isIncludedInExport(block: DesignBlockId): boolean;\n setIncludedInExport(block: DesignBlockId, included: boolean): void;\n isPlaceholderEnabled(block: DesignBlockId): boolean;\n setPlaceholderEnabled(block: DesignBlockId, enabled: boolean): void;\n supportsPlaceholderBehavior(block: DesignBlockId): boolean;\n isPlaceholderBehaviorEnabled(block: DesignBlockId): boolean;\n setPlaceholderBehaviorEnabled(block: DesignBlockId, enabled: boolean): void;\n supportsPlaceholderControls(block: DesignBlockId): boolean;\n isPlaceholderControlsOverlayEnabled(block: DesignBlockId): boolean;\n setPlaceholderControlsOverlayEnabled(block: DesignBlockId, enabled: boolean): void;\n isPlaceholderControlsButtonEnabled(block: DesignBlockId): boolean;\n setPlaceholderControlsButtonEnabled(block: DesignBlockId, enabled: boolean): void;\n supportsBackgroundColor(block: DesignBlockId): boolean;\n isBackgroundColorEnabled(block: DesignBlockId): boolean;\n setBackgroundColorEnabled(block: DesignBlockId, enabled: boolean): void;\n hasMetadata(block: DesignBlockId, key: string): boolean;\n getMetadata(block: DesignBlockId, key: string): string;\n setMetadata(block: DesignBlockId, key: string, value: string): void;\n removeMetadata(block: DesignBlockId, key: string): void;\n findAllMetadata(block: DesignBlockId): string[];\n replaceText(block: DesignBlockId, text: string, from?: number, to?: number): void;\n removeText(block: DesignBlockId, from?: number, to?: number): void;\n getTextAsHTML(block: DesignBlockId, from?: number, to?: number): string;\n replaceTextWithHTML(block: DesignBlockId, html: string, from?: number, to?: number): void;\n getTextFontSizes(block: DesignBlockId, from?: number, to?: number): number[];\n setTextFontSize(block: DesignBlockId, size: number, from?: number, to?: number): void;\n getTextFontStyles(block: DesignBlockId, from?: number, to?: number): string[];\n setTextFontStyle(block: DesignBlockId, style: string, from?: number, to?: number): void;\n getTextFontWeights(block: DesignBlockId, from?: number, to?: number): string[];\n setTextFontWeight(block: DesignBlockId, weight: string, from?: number, to?: number): void;\n setTextFontWeightAndStyle(block: DesignBlockId, weight: string, style: string, from?: number, to?: number): void;\n getTextColors(block: DesignBlockId, from?: number, to?: number): NativeColorInternal[];\n setTextColor(block: DesignBlockId, color: NativeColorInternal, from?: number, to?: number): void;\n getTextBackgroundColors(block: DesignBlockId, from?: number, to?: number): NativeColorInternal[];\n setTextBackgroundColor(block: DesignBlockId, color: NativeColorInternal, from?: number, to?: number): void;\n getTextCases(block: DesignBlockId, from?: number, to?: number): string[];\n setTextCase(block: DesignBlockId, textCase: string, from?: number, to?: number): void;\n getTextScriptStyles(block: DesignBlockId, from?: number, to?: number): string[];\n setTextScriptStyle(block: DesignBlockId, scriptStyle: string, from?: number, to?: number): void;\n getTypefaces(block: DesignBlockId, from?: number, to?: number): Typeface[];\n setFontRequest(block: DesignBlockId, request: FontRequest, from: number, to: number): void;\n getFontRequests(block: DesignBlockId, from: number, to: number): FontRequest[];\n setTypeface(block: DesignBlockId, typeface: Typeface, from?: number, to?: number): void;\n getTypeface(block: DesignBlockId): Typeface;\n setFont(block: DesignBlockId, fontUri: string, typeface: Typeface): void;\n setTextKerning(block: DesignBlockId, kerning: number, from?: number, to?: number): void;\n getTextKernings(block: DesignBlockId, from?: number, to?: number): number[];\n setTextOpenTypeFeatures(block: DesignBlockId, features: OpenTypeFeature[], from?: number, to?: number): void;\n getTextOpenTypeFeatures(block: DesignBlockId, from?: number, to?: number): OpenTypeFeature[][];\n setTextVariationAxes(block: DesignBlockId, axes: VariationAxisValue[], from?: number, to?: number): void;\n getTextVariationAxes(block: DesignBlockId, from?: number, to?: number): VariationAxisValue[][];\n setTextBaselineShift(block: DesignBlockId, baselineShift: number, from?: number, to?: number): void;\n getTextBaselineShifts(block: DesignBlockId, from?: number, to?: number): number[];\n setContentFillHorizontalAlignment(block: DesignBlockId, alignment: string): void;\n getContentFillHorizontalAlignment(block: DesignBlockId): string;\n setContentFillVerticalAlignment(block: DesignBlockId, alignment: string): void;\n getContentFillVerticalAlignment(block: DesignBlockId): string;\n canToggleBoldFont(block: DesignBlockId, from?: number, to?: number): boolean;\n toggleBoldFont(block: DesignBlockId, from?: number, to?: number): void;\n canToggleItalicFont(block: DesignBlockId, from?: number, to?: number): boolean;\n toggleItalicFont(block: DesignBlockId, from?: number, to?: number): void;\n getTextCursorRange(): Range;\n setTextCursorRange(from: number, to: number): void;\n convertUTF16ToGraphemeRange(block: DesignBlockId, from: number, to: number): Range;\n convertGraphemeToUTF16Range(block: DesignBlockId, from: number, to: number): Range;\n getTextCursorPositionInScreenSpaceX(): number;\n getTextCursorPositionInScreenSpaceY(): number;\n getMaxExportSize(): number;\n unstable_isInteractionHappening(): boolean;\n getSpotColorForCutoutType(type: CutoutType): string;\n setSpotColorForCutoutType(type: CutoutType, color: string): void;\n addVectorNode(): void;\n deleteVectorNode(): void;\n deleteSelectedVectorControlPoints(): void;\n getSelectedVectorNodeMirrorMode(): number;\n setSelectedVectorNodeMirrorMode(mode: number): void;\n getVectorEditAddMode(): boolean;\n setVectorEditAddMode(active: boolean): void;\n getVectorEditBendMode(): boolean;\n setVectorEditBendMode(active: boolean): void;\n getVectorEditDeleteMode(): boolean;\n setVectorEditDeleteMode(active: boolean): void;\n hasSelectedVectorNode(): boolean;\n hasSelectedVectorControlPoint(): boolean;\n toggleSelectedVectorNodeSmooth(): void;\n getTextRenderDiagnostics(block: DesignBlockId): TextRenderDiagnostics;\n getTextVisibleLineCount(block: DesignBlockId): number;\n getTextVisibleLineContent(block: DesignBlockId, lineIndex: number): string;\n getTextVisibleLineGlobalBoundingBoxXYWH(block: DesignBlockId, lineIndex: number): XYWH;\n getTextCharacterInkBoxes(block: DesignBlockId, from?: number, to?: number): CharacterInkBox[];\n getTextEffectiveHorizontalAlignment(block: DesignBlockId): 'Left' | 'Right' | 'Center' | 'Justify';\n getTextHorizontalAlignment(block: DesignBlockId, paragraphIndex?: number): string | undefined;\n setTextHorizontalAlignment(block: DesignBlockId, alignment: string | undefined, paragraphIndex?: number): void;\n getTextDecorations(block: DesignBlockId, from?: number, to?: number): unknown[];\n setTextDecoration(block: DesignBlockId, config: unknown, from?: number, to?: number): void;\n toggleTextDecorationUnderline(block: DesignBlockId, from?: number, to?: number): void;\n toggleTextDecorationStrikethrough(block: DesignBlockId, from?: number, to?: number): void;\n toggleTextDecorationOverline(block: DesignBlockId, from?: number, to?: number): void;\n getTextListStyle(block: DesignBlockId, paragraphIndex: number): string;\n setTextListStyle(block: DesignBlockId, listStyle: string, paragraphIndex?: number, listLevel?: number): void;\n getTextListLevel(block: DesignBlockId, paragraphIndex: number): number;\n setTextListLevel(block: DesignBlockId, listLevel: number, paragraphIndex?: number): void;\n getTextParagraphIndices(block: DesignBlockId, from?: number, to?: number): number[];\n getTextLineHeight(block: DesignBlockId, paragraphIndex: number): number;\n setTextLineHeight(block: DesignBlockId, lineHeight: number | undefined, paragraphIndex?: number): void;\n setTextOnPath(block: DesignBlockId, svgPath: string | undefined): void;\n getTextOnPath(block: DesignBlockId): string | undefined;\n setTextOnPathOffset(block: DesignBlockId, offset: number): void;\n getTextOnPathOffset(block: DesignBlockId): number;\n setTextOnPathFlipped(block: DesignBlockId, flipped: boolean): void;\n getTextOnPathFlipped(block: DesignBlockId): boolean;\n getFontMetrics(fontFileUri: string): AsyncOperation<FontMetrics>;\n getFontInfo(fontFileUri: string): AsyncOperation<FontInfo>;\n setMovementConstraint(targets: (DesignBlockId | string)[], overshoot: number): void;\n getMovementConstraint(block: DesignBlockId): number;\n removeMovementConstraint(targets: (DesignBlockId | string)[]): void;\n getSourceSet(block: DesignBlockId, property: SourceSetPropertyName): Source[];\n setSourceSet(block: DesignBlockId, property: string, sources: Source[]): void;\n addImageFileURIToSourceSet(block: DesignBlockId, property: string, uri: string): AsyncOperation<void>;\n addVideoFileURIToSourceSet(block: DesignBlockId, property: string, uri: string): AsyncOperation<void>;\n getVideoWidth(block: DesignBlockId): number;\n getVideoHeight(block: DesignBlockId): number;\n getAudioTrackCountFromVideo(block: DesignBlockId): number;\n getAVResourceTotalDuration(block: DesignBlockId): number;\n split(block: DesignBlockId, time: number): DesignBlockId;\n getSceneLayout(scene: DesignBlockId): SceneLayout;\n setSceneLayout(scene: DesignBlockId, layout: SceneLayout): void;\n getDesignUnit(scene: DesignBlockId): string;\n setDesignUnit(scene: DesignBlockId, unit: string): void;\n getFontSizeUnit(scene: DesignBlockId): string;\n setFontSizeUnit(scene: DesignBlockId, unit: string): void;\n getLastFrameX(block: DesignBlockId): number;\n getLastFrameY(block: DesignBlockId): number;\n getLastFrameWidth(block: DesignBlockId): number;\n getLastFrameHeight(block: DesignBlockId): number;\n supportsPageDurationSource(page: DesignBlockId, block: DesignBlockId): boolean;\n setPageDurationSource(page: DesignBlockId, block: DesignBlockId): void;\n removePageDurationSource(page: DesignBlockId): void;\n isPageDurationSource(block: DesignBlockId): boolean;\n findAllScopes(): Scope[];\n getGlobalScope(key: string): string;\n setGlobalScope(key: string, value: string): void;\n isScopeEnabled(block: DesignBlockId, scope: Scope): boolean;\n setScopeEnabled(block: DesignBlockId, scope: Scope, enabled: boolean): void;\n isAllowedByScope(block: DesignBlockId, scope: Scope): boolean;\n findAllProperties(block: DesignBlockId): string[];\n getPropertyType(property: string): string;\n isPropertyReadable(property: string): boolean;\n isPropertyWritable(property: string): boolean;\n getEnumValues(property: string): string[];\n getRole(): RoleString;\n setRole(role: RoleString): void;\n startTracking(license: string, userId: string, deviceId: string): void;\n trackEvent(name: string, data: string): void;\n overrideTrackingEndpoint(endpoint: string): void;\n beginExportTransaction(type: string, format: string, producer: string, block: DesignBlockId): string;\n endExportTransaction(transactionId: string, bytes: number, duration: number): void;\n cancelExportTransaction(transactionId: string): void;\n getState(block: DesignBlockId): BlockState;\n setZoomLevel(sceneOrCamera: DesignBlockId, level: number): void;\n getZoomLevel(sceneOrCamera: DesignBlockId): number;\n zoomToBlock(block: DesignBlockId, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): Promise<void>;\n zoomToBlockWithAnimation(block: DesignBlockId, paddingLeft: number, paddingTop: number, paddingRight: number, paddingBottom: number, duration: number, easing: string, interruptible: boolean): Promise<void>;\n immediateZoomToBlock(block: DesignBlockId, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): void;\n enableZoomAutoFit(scene: DesignBlockId, axis: string, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): void;\n disableZoomAutoFit(scene: DesignBlockId): void;\n isZoomAutoFitEnabled(scene: DesignBlockId): boolean;\n findNearestToViewPortCenterByType(scene: DesignBlockId, type: string): DesignBlockId[];\n findNearestToViewPortCenterByKind(scene: DesignBlockId, kind: string): DesignBlockId[];\n unstable_enableCameraPositionClamping(blocks: DesignBlockId[], paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number, scaledPaddingLeft?: number, scaledPaddingTop?: number, scaledPaddingRight?: number, scaledPaddingBottom?: number): void;\n unstable_disableCameraPositionClamping(block: DesignBlockId): void;\n unstable_isCameraPositionClampingEnabled(block: DesignBlockId): boolean;\n unstable_enableCameraZoomClamping(blocks: DesignBlockId[], minZoomLimit?: number, maxZoomLimit?: number, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): void;\n unstable_disableCameraZoomClamping(block: DesignBlockId): void;\n unstable_isCameraZoomClampingEnabled(block: DesignBlockId): boolean;\n exportToBuffer(block: DesignBlockId, mimeType: string, options?: Record<string, unknown>, progressCallback?: (exportedPages: number, totalPages: number) => void): AsyncOperation<Uint8Array>;\n exportPreviewToBuffer(block: DesignBlockId): AsyncOperation<Uint8Array>;\n exportToStream(block: DesignBlockId, mimeType: string, options: Record<string, unknown>, chunkCallback: (chunk: Uint8Array) => boolean, progressCallback?: (done: number, total: number) => void, isReceiverReady?: () => boolean): AsyncOperation<void>;\n exportWithColorMaskToBuffer(block: DesignBlockId, mimeType: string, maskColorR: number, maskColorG: number, maskColorB: number, options: {\n targetWidth: number;\n targetHeight: number;\n useTargetSize: boolean;\n jpegQuality: number;\n webpQuality: number;\n pngCompressionLevel: number;\n exportPdfWithHighCompatibility: boolean;\n exportPdfWithUnderlayer: boolean;\n underlayerSpotColorName: string;\n underlayerOffset: number;\n underlayerRenderRatio: number;\n underlayerMaxError: number;\n underlayerMinFeatureWidth: number;\n allowTextOverhang: boolean;\n exportPdfWithCropMarks: boolean;\n exportPdfWithFoldMarks: boolean;\n exportPdfWithRegistrationMarks: boolean;\n exportPdfPageSlices: boolean;\n printMarkOffset: number;\n cropMarkLength: number;\n printMarkWidth: number;\n pdfImageQuality: number;\n pdfChunkSize: number;\n useExportArea: boolean;\n exportAreaX: number;\n exportAreaY: number;\n exportAreaWidth: number;\n exportAreaHeight: number;\n }): AsyncOperation<Uint8Array[]>;\n exportVideoToBuffer(block: DesignBlockId, timeOffset: number, duration: number, mimeType: string, progressCallback: (rendered: number, encoded: number, total: number) => void, resultCallback: (error: Error | null, data?: Uint8Array) => void, options: {\n h264Profile: number;\n h264Level: number;\n videoBitrate: number;\n audioBitrate: number;\n framerate?: number;\n useTargetSize: boolean;\n targetWidth: number;\n targetHeight: number;\n allowTextOverhang: boolean;\n audioCodec?: number;\n coverTimeOffset?: number | null;\n }): number;\n exportAudioToBuffer(block: DesignBlockId, timeOffset: number, duration: number, mimeType: string, progressCallback: (rendered: number, encoded: number, total: number) => void, resultCallback: (error: Error | null, data?: Uint8Array) => void, options: {\n sampleRate: number;\n numberOfChannels: number;\n skipEncoding?: boolean;\n audioCodec?: number;\n }): number;\n cancelAsyncOperation(operation: number): void;\n loadBlocksFromString(content: string): Promise<DesignBlockId[]>;\n loadBlocksFromURL(url: string): AsyncOperation<DesignBlockId[]>;\n loadBlocksFromArchiveURL(url: string): AsyncOperation<DesignBlockId[]>;\n saveBlocksToString(blocks: DesignBlockId[], allowedResourceSchemes?: string[], persistenceCallback?: (url: string, dataHash: string, persisted: PersistedCallback) => void | Promise<void>): AsyncOperation<string>;\n saveBlocksToArchive(blocks: DesignBlockId[]): AsyncOperation<Uint8Array>;\n forceLoadAVResource(block: DesignBlockId): AsyncOperation<void>;\n forceLoadResources(blocks: DesignBlockId[]): AsyncOperation<void>;\n createHistory(): HistoryId;\n destroyHistory(history: HistoryId): void;\n getActiveHistory(): HistoryId;\n setActiveHistory(history: HistoryId): void;\n undo(): void;\n redo(): void;\n canUndo(): boolean;\n canRedo(): boolean;\n addUndoStep(): void;\n removeUndoStep(): void;\n subscribe(blocks: DesignBlockId[], callback: (events: BlockEvent[]) => void): SubscriptionId;\n unsubscribe(subscription: SubscriptionId): void;\n subscribeToZoomLevel(callback: () => void): SubscriptionId;\n subscribeToActiveSceneChange(callback: () => void): SubscriptionId;\n subscribeToBlockState(blocks: DesignBlockId[], callback: (ids: DesignBlockId[]) => void): SubscriptionId;\n subscribeToEditorState(callback: () => void): SubscriptionId;\n subscribeToSettings(callback: () => void): SubscriptionId;\n subscribeToSelectionChange(callback: () => void): SubscriptionId;\n subscribeToBlockClicked(callback: (id: DesignBlockId) => void): SubscriptionId;\n subscribeToHistoryWithKind(callback: (kind: number) => void): SubscriptionId;\n subscribeToRoleChange(callback: (role: string) => void): SubscriptionId;\n subscribeToAssetSourceAdded(callback: (sourceId: string) => void): SubscriptionId;\n subscribeToAssetSourceRemoved(callback: (sourceId: string) => void): SubscriptionId;\n subscribeToAssetSourceUpdated(callback: (sourceId: string) => void): SubscriptionId;\n addAssetSource(source: {\n id: string;\n findAssets: (query: AssetQueryData, resultCb: (error: any, result?: AssetsQueryResult) => void) => void;\n fetchAsset?: (id: string, params: {\n locale?: string;\n } | undefined, resultCb: (error: any, result?: AssetResult | null) => void) => void;\n getGroups?: (resultCb: (error: any, result?: string[]) => void) => void;\n credits?: {\n name: string;\n url?: string;\n };\n license?: {\n name: string;\n url?: string;\n };\n getSupportedMimeTypes?: () => string[] | undefined;\n applyAsset?: (asset: CompleteAssetResult, resultCb: (error: any, result?: DesignBlockId) => void) => void;\n applyAssetToBlock?: (asset: CompleteAssetResult, block: DesignBlockId, resultCb: (error: any) => void) => void;\n applyAssetProperty?: (asset: CompleteAssetResult, property: AssetProperty, resultCb: (error: any) => void) => void;\n addAsset?: (asset: AssetDefinition) => void;\n removeAsset?: (assetId: string) => void;\n }): void;\n addLocalAssetSource(id: string, supportedMimeTypes: string[]): void;\n addLocalAssetSourceFromJSONString(contentJSON: string, basePath?: string, matcher?: string[]): string;\n addLocalAssetSourceFromJSONURI(contentURI: string, matcher?: string[]): AsyncOperation<string>;\n removeAssetSource(id: string): void;\n findAllAssetSources(): string[];\n findAssetSourceAssets(sourceId: string, query: AssetsQuery): Promise<AssetsQueryResult>;\n fetchAssetSourceAsset(sourceId: string, assetId: string, query: {\n locale: string;\n }): Promise<CompleteAssetResult | null>;\n getAssetSourceGroups(sourceId: string): string[];\n getAssetSourceLicense(sourceId: string): AssetSourceLicense | null;\n getAssetSourceCredits(sourceId: string): AssetSourceCredits | null;\n getAssetSourceSupportedMimeTypes(sourceId: string): string[];\n addAssetToSource(sourceId: string, asset: Asset): void;\n removeAssetFromSource(sourceId: string, assetId: string): void;\n assetSourceContentsChanged(sourceId: string): void;\n applyAssetSourceAsset(sourceId: string, asset: CompleteAssetResult, placement?: AssetPlacement): AsyncOperation<DesignBlockId | undefined>;\n applyAssetSourceAssetToBlock(sourceId: string, asset: CompleteAssetResult, block: DesignBlockId): Promise<void>;\n applyAssetSourceProperty(sourceId: string, asset: CompleteAssetResult, property: AssetProperty): Promise<void>;\n defaultApplyAsset(asset: CompleteAssetResult, placement?: AssetPlacement): AsyncOperation<DesignBlockId | undefined>;\n defaultApplyAssetToBlock(asset: CompleteAssetResult, block: DesignBlockId): Promise<void>;\n findAllVariables(): string[];\n removeVariable(key: string, options?: VariableOptions | null): void;\n createValueSet(name: string): ValueSetId;\n destroyValueSet(set: ValueSetId): void;\n setValueSetName(set: ValueSetId, name: string): void;\n getValueSetName(set: ValueSetId): string;\n findAllValueSets(): ValueSetId[];\n findValueSetByName(name: string): ValueSetId | null;\n setActiveValueSet(set: ValueSetId | null): void;\n getActiveValueSet(): ValueSetId | null;\n getVariableString(key: string, options?: VariableOptions | null): string;\n setVariableString(key: string, value: string, options?: VariableOptions | null): void;\n setVariableColor(key: string, value: NativeColorInternal, options?: VariableOptions | null): void;\n getVariableColor(key: string, options?: VariableOptions | null): NativeColorInternal;\n setVariableNumber(key: string, value: number, options?: VariableOptions | null): void;\n getVariableNumber(key: string, options?: VariableOptions | null): number;\n setVariableImage(key: string, uri: string, options?: VariableOptions | null): void;\n getVariableImage(key: string, options?: VariableOptions | null): string;\n setVariableTypeface(key: string, typeface: Typeface, options?: VariableOptions | null): void;\n renameVariable(from: string, to: string): void;\n getVariableTypeface(key: string, options?: VariableOptions | null): Typeface;\n getVariableType(key: string, options?: VariableOptions | null): VariableType;\n findAllVariablesOfType(type: VariableType): string[];\n setVariableBinding(block: DesignBlockId, property: string, key: string): void;\n getVariableBinding(block: DesignBlockId, property: string): string | null;\n removeVariableBinding(block: DesignBlockId, property: string): void;\n findAllVariableBindings(block: DesignBlockId): string[];\n referencesAnyVariables(block: DesignBlockId): boolean;\n getAudioInfoFromVideo(videoFillBlock: DesignBlockId): AudioTrackInfo[];\n createAudioFromVideo(videoFillBlock: DesignBlockId, trackIndex: number, options: AudioFromVideoOptions): DesignBlockId;\n createAudiosFromVideo(videoFillBlock: DesignBlockId, options: AudioFromVideoOptions): DesignBlockId[];\n createCaptionsFromURI(uri: string): AsyncOperation<DesignBlockId[]>;\n createCutoutFromBlocks(ids: DesignBlockId[], vectorizeDistanceThreshold: number, simplifyDistanceThreshold: number, useExistingShapeInformation: boolean): DesignBlockId;\n createCutoutFromOperation(ids: DesignBlockId[], op: CutoutOperation): DesignBlockId;\n createCutoutFromPath(path: string): DesignBlockId;\n unstable_isAVResourceLoaded(id: DesignBlockId): boolean;\n unstable_setImportedImageDefinition(id: DesignBlockId, definition: ImportedImageDefinitionInput): void;\n unstable_getImportedImageDefinition(id: DesignBlockId): ImportedImageDefinitionInfo;\n setState(id: DesignBlockId, state: BlockState): void;\n canRevertToOriginalRatio(id: DesignBlockId): boolean;\n getFillOverprint(id: DesignBlockId): boolean;\n setFillOverprint(id: DesignBlockId, overprint: boolean): void;\n getStrokeOverprint(id: DesignBlockId): boolean;\n setStrokeOverprint(id: DesignBlockId, overprint: boolean): void;\n getDominantColors(handle: DesignBlockId, options?: DominantColorsOptions): AsyncOperation<DominantColor[]>;\n getTextRuns(id: DesignBlockId, from: number, to: number): TextRunInfo[];\n generateVideoThumbnailSequence(id: DesignBlockId, thumbnailHeight: number, timeBegin: number, timeEnd: number, numberOfFrames: number, callback: (err: Error | null, frame: {\n frameIndex: number;\n width: number;\n height: number;\n data: Uint8Array;\n }) => void): number;\n cancelVideoThumbnailSequenceGeneration(handle: number): void;\n generateAudioThumbnailSequence(id: DesignBlockId, samplesPerChunk: number, timeBegin: number, timeEnd: number, numberOfSamples: number, numberOfChannels: number, callback: (err: Error | null, chunk: {\n chunkIndex: number;\n samples: number[];\n }) => void): number;\n cancelAudioThumbnailSequenceGeneration(handle: number): void;\n getEditMode(): EditMode;\n setEditMode(mode: string, baseMode?: string): void;\n getSettingBool(key: string): boolean;\n setSettingBool(key: string, value: boolean): void;\n getSettingInt(key: string): number;\n setSettingInt(key: string, value: number): void;\n getSettingFloat(key: string): number;\n getSettingDouble(key: string): number;\n setSettingFloat(key: string, value: number): void;\n setSettingDouble(key: string, value: number): void;\n getSettingString(key: string): string;\n setSettingString(key: string, value: string): void;\n getSettingColor(key: string): NativeColorInternal;\n setSettingColor(key: string, value: NativeColorInternal): void;\n getSettingEnum(key: string): string;\n setSettingEnum(key: string, value: string): void;\n findAllSettings(): string[];\n getSettingType(key: string): string;\n getSettingEnumOptions(key: string): string[];\n getCursorType(): string;\n getCursorRotation(): number;\n setSafeAreaInsets(left: number, top: number, right: number, bottom: number): void;\n getSafeAreaInsets(): Insets;\n getUsedMemory(): number;\n getAvailableMemory(): number;\n releaseMemory(): void;\n convertColorToColorSpace(color: NativeColorInternal, colorSpace: number): NativeColorInternal;\n loadColorProfiles(): AsyncOperation<void>;\n loadCMYKProfile(): AsyncOperation<void>;\n setDocumentColorProfile(slot: ProfileSlot$1, uri: string): AsyncOperation<void>;\n setDocumentColorProfileFromData(slot: ProfileSlot$1, data: Uint8Array): void;\n getDocumentColorProfileInfo(slot: ProfileSlot$1): DocumentColorProfileInfo;\n removeDocumentColorProfile(slot: ProfileSlot$1): void;\n setSoftProofEnabled(enabled: boolean): void;\n isSoftProofEnabled(): boolean;\n setSoftProofColorSpace(colorSpace: string): void;\n getSoftProofColorSpace(): SoftProofColorSpace;\n setCMYKProfile(uri: string): AsyncOperation<void>;\n setCMYKProfileFromData(data: Uint8Array): void;\n getCMYKProfileInfo(): CMYKProfileInfo;\n removeCMYKProfile(): void;\n getColorRenderingIntent(): ColorRenderingIntent;\n setColorRenderingIntent(intent: ColorRenderingIntent): void;\n isBlackPointCompensationEnabled(): boolean;\n setBlackPointCompensationEnabled(enabled: boolean): void;\n supportsP3(): boolean;\n getAbsoluteURI(relativeUri: string): Promise<string>;\n defaultURIResolver(relativePath: string): string;\n setTypefaceResolver(resolver: ((request: FontRequest, complete: (result: FontResolverResult | undefined) => void) => void) | null): void;\n setURIResolver(resolver: ((uri: string) => string) | null): void;\n setURIResolverAsync(resolver: ((uri: string, callback: (result: string | Error) => void) => void) | null): void;\n getFileFormats(): FileSupport[];\n checkFileSupport(uri: string): AsyncOperation<FileSupport>;\n getMimeType(uri: string): AsyncOperation<string>;\n relocateResource(currentUri: string, newUri: string): void;\n findAllMediaURIs(): string[];\n findAllTransientResources(): TransientResource[];\n getResourceData(uri: string, chunkSize: number, onData: (chunk: Uint8Array) => boolean): void;\n actionsRegister(id: string, trampoline: (jsonArgs: string) => string | Promise<string>, rawFn: (...args: unknown[]) => unknown): void;\n actionsGetLocal(id: string): ((...args: unknown[]) => unknown) | undefined;\n actionsUnregister(id: string): boolean;\n actionsHas(id: string): boolean;\n actionsRun(id: string, jsonArgs: string, resolve: (jsonResult: string) => void, reject: (error: string) => void): void;\n actionsHold(id: string): number | undefined;\n actionsRunHeld(handle: number, jsonArgs: string, resolve: (jsonResult: string) => void, reject: (error: string) => void): void;\n actionsRegisterHeld(id: string, handle: number): boolean;\n actionsRelease(handle: number): void;\n actionsList(matcher: string | null): Array<{\n id: string;\n enabled: boolean;\n argSchema: string | null;\n }>;\n findAllSpotColors(): string[];\n getSpotColorRGB(name: string): RGBAColor;\n getSpotColorCMYK(name: string): CMYKColor;\n setSpotColorRGB(name: string, r: number, g: number, b: number): void;\n setSpotColorCMYK(name: string, c: number, m: number, y: number, k: number): void;\n removeSpotColor(name: string): void;\n createBuffer(): string;\n destroyBuffer(uri: string): void;\n setBufferData(uri: string, offset: number, data: Uint8Array): void;\n getBufferData(uri: string, offset: number, length: number): Uint8Array;\n getBufferLength(uri: string): number;\n setBufferLength(uri: string, length: number): void;\n cloneBuffers(scene: DesignBlockId | null): Array<{\n uri: string;\n data: Uint8Array;\n }>;\n restoreBuffers(buffers: Array<{\n uri: string;\n data: Uint8Array;\n }>): void;\n getTrackingMetadata(): TrackingMetadata;\n setTrackingMetadata(metadata: TrackingMetadata): void;\n}\nclass CreativeEngine implements ICreativeEngine {\n #private;\n static readonly version: string;\n static [Symbol.hasInstance](value: unknown): boolean;\n asset: AssetAPI;\n block: BlockAPI;\n editor: EditorAPI;\n event: EventAPI;\n scene: SceneAPI;\n variable: VariableAPI;\n actions: EngineActions;\n readonly version: string;\n constructor(engine: NativeEngine);\n update(): boolean;\n getFrameInfo(): FrameInfo;\n attachCanvas(canvas: EngineCanvas): void;\n detachCanvas(): void;\n dispose(): void;\n static init(config?: Partial<Configuration>): Promise<CreativeEngine>;\n getBaseURL(): string;\n /** @deprecated This method uses legacy v4 asset source IDs and will be removed in a future version. Please migrate to v5 asset sources using engine.asset.addLocalAssetSourceFromJSONURI(). */\n addDefaultAssetSources({ baseURL, excludeAssetSourceIds }?: {\n baseURL?: string;\n excludeAssetSourceIds?: DefaultAssetSourceId[];\n }): Promise<void>;\n /** @deprecated This method uses legacy v3 demo asset source IDs and will be removed in a future version. Please migrate to v4 asset sources using engine.asset.addLocalAssetSourceFromJSONURI(). */\n addDemoAssetSources({ baseURL, excludeAssetSourceIds, sceneMode, withUploadAssetSources }?: {\n baseURL?: string;\n excludeAssetSourceIds?: DemoAssetSourceId[];\n sceneMode?: 'Design' | 'Video';\n withUploadAssetSources?: boolean;\n }): Promise<void>;\n}\ninterface CellRect {\n col: number;\n row: number;\n columns: number;\n rows: number;\n}\ninterface TerminalOutput {\n columns?: number;\n rows?: number;\n write(chunk: string | Uint8Array): boolean;\n on(event: string, listener: () => void): unknown;\n once(event: string, listener: () => void): unknown;\n off(event: string, listener: () => void): unknown;\n}\ninterface TerminalInput {\n on(event: 'data', listener: (data: Uint8Array | string) => void): unknown;\n off(event: 'data', listener: (data: Uint8Array | string) => void): unknown;\n pause(): unknown;\n isPaused?(): boolean;\n}\ninterface TerminalCanvasOptions {\n output?: TerminalOutput;\n input?: TerminalInput;\n maxFps?: number;\n compress?: boolean;\n compressLevel?: number;\n originRow?: number;\n viewport?: CellRect | (() => CellRect);\n originCol?: number;\n imageId?: number;\n pixelRatio?: number;\n size?: {\n width: number;\n height: number;\n };\n cellSize?: {\n width: number;\n height: number;\n };\n maxPixels?: number;\n fit?: (width: number, height: number) => void;\n forwardInput?: boolean;\n claimKeys?: readonly string[] | (() => Iterable<string>);\n onWheel?: (event: {\n dx: number;\n dy: number;\n x: number;\n y: number;\n width: number;\n height: number;\n modifiers: InputModifiers;\n }) => void;\n fullscreen?: boolean;\n}\nclass TerminalCanvas implements EngineCanvas {\n #private;\n get background(): {\n r: number;\n g: number;\n b: number;\n } | undefined;\n constructor(options?: TerminalCanvasOptions);\n attach(): void;\n detach(): void;\n beforeUpdate(surface: FrameSurface): void;\n afterUpdate(info: FrameInfo, surface: FrameSurface): void;\n requestFrame(tick: () => void, busy: boolean): FrameHandle;\n setViewport(rect: CellRect | (() => CellRect)): void;\n redraw(): void;\n get size(): {\n width: number;\n height: number;\n };\n}\nnamespace CreativeEngine {\n const _default: typeof CreativeEngine;\n export { _default as default };\n}\n",
14
14
  "docs/api/video.md": "<!-- requires:video -->\n# Video: any design can become a video\n\n<!-- requires:export -->\nScenes are not \"static\" or \"video\" at creation time — add time-based content\nto the scene you already have, then `export({ format: \"mp4\", blockId: page })` renders the page's\nauthored timeline. Do NOT rebuild a scene with `create({ type: 'scene' })` just to\nanimate it. `preview` seeks (`time`) and `export` renders the timeline in any\nscene mode.\n<!-- /requires:export -->\n<!-- unless:export -->\nScenes are not \"static\" or \"video\" at creation time — add time-based content\nto the scene you already have; the product renders the authored\ntimeline. Do NOT rebuild a scene with `create({ type: 'scene' })` just to\nanimate it. `preview` seeks (`time`) any page with a timeline, in any scene\nmode.\n<!-- /unless:export -->\n\n```js\n// Video mode: new blocks and groups last to the page's end and previews report {time, duration}.\nconst [scene] = await engine.design.findByType('scene');\nawait engine.design.setProps(scene, { scene: { mode: 'Video' } });\n\n// Page duration = length of the video.\nawait engine.design.setProps(page, { playback: { duration: 10 } }); // seconds\n\n// Timed visuals live on tracks, one track per layer (see \"Timeline: one track per layer\" below).\nconst track = await engine.design.create({ type: 'track' }, { parent: page });\nconst block = await engine.design.create(\n {\n type: 'graphic',\n props: { width: 1920, height: 1080 }\n },\n { parent: track } // the next clip of this layer goes on the same track\n);\nawait engine.design.setProps(block, {\n playback: { timeOffset: 1.0, duration: 5.0 } // enters at t=1s, visible 5s\n});\n\n<!-- requires:asset_add -->\n// Video fill — use the `uri` that `asset_add` returned.\n<!-- /requires:asset_add -->\n<!-- unless:asset_add -->\n// Video fill — use a video `uri` the design or the brief supplies.\n<!-- /unless:asset_add -->\nawait engine.design.setProps(block, {\n fill: { type: 'video', video: { fileURI: '<opaque handle>' } }\n});\nawait engine.design.setProps(block, { playback: { trimOffset: 2.0, trimLength: 5.0 } });\n\n// Animation timing and text styling are spec keys — no raw animation ids.\nawait engine.design.setProps(block, {\n animations: {\n in: { type: 'slide', duration: 0.8, easing: 'EaseOutBack' },\n loop: { type: 'breathing_loop', duration: 2 }\n }\n});\n// Every animation type and its options: the api skill's `Animation` type.\n\n// Audio block — plays during the page's timeline; fades are facade props.\nawait engine.design.create(\n {\n type: 'audio',\n props: {\n audio: { fileURI: '<opaque handle>' },\n playback: {\n timeOffset: 0,\n duration: 10,\n volume: 0.8,\n fadeIn: { duration: 0.5 },\n fadeOut: { duration: 1 }\n }\n }\n },\n { parent: page }\n);\n```\n\nSeveral audio blocks can sit on the page at once — a music bed plus a short\nsound effect per cut, each placed with its own `playback.timeOffset`.\n\n## Timeline: one track per layer\n\nA track holds a sequence of clips in one timeline row. A block placed\ndirectly on the page gets a row of its own, so a 30 s video built that way\nopens in the editor as 50+ rows, one per text and shape. Build the timeline\nthe way an editor would:\n\n- **One track per layer, created bottom first** — for example backgrounds,\n media, headline, subline, chip. Every beat's element for that layer goes\n on the same track, one after another. Only audio sits on the page itself.\n- **Tracks are layers.** A later track draws above an earlier one, for the\n whole video. Two things on screen at the same time sit on two tracks.\n- **Overlaps move up.** A clip that overlaps another on its track, beyond a\n transition, moves to a new track right above it at the end of the edit.\n- **A track is a layer, not an element.** Reuse it across beats: beat 2's\n third line and beat 3's third chip can share one track, because they are\n never on screen together. Aim for the number of layers a frame needs\n (typically 3–6), not one track per element.\n- **Things that enter together are one clip.** A list of lines or a row of\n chips that appears within one beat is a group on one track. Its children\n keep their own `timeOffset`s and in-animations for the stagger, so the\n group needs no track per item. In an auto layout flow, a frame holds\n them, untimed: its children carry the `timeOffset`s and in-animations\n (`{{skill:auto-layout}}`). A group takes no transition: transitions\n join two leaf clips (graphic, text, video) that follow each other on one\n track.\n- **Name clips by beat and layer** (`b3/bg`, `b3/headline`) so later edits\n find them with `findByName`.\n\n```js\n// Three beats, two layers: a background sequence and a headline sequence.\nconst bgs = await engine.design.create({ type: 'track' }, { parent: page }); // bottom\nconst words = await engine.design.create({ type: 'track' }, { parent: page }); // above\nfor (const [i, beat] of beats.entries()) {\n const bg = await engine.design.create(\n {\n type: 'graphic',\n name: `b${i}/bg`,\n props: {\n shape: { type: 'rect' },\n width: W,\n height: H,\n fill: { type: 'color', color: { value: beat.color } }\n }\n },\n { parent: bgs } // auto-arranged: back-to-back in creation order\n );\n await engine.design.setProps(bg, { playback: { duration: beat.length } });\n const line = await engine.design.create(\n {\n type: 'text',\n name: `b${i}/headline`,\n props: { text: { string: beat.line, font: { family: 'Inter', weight: 'bold' }, lineHeight: { visual: 1.1 } } }\n },\n { parent: words }\n );\n await engine.design.setProps(line, {\n playback: { timeOffset: beat.start + 0.2, duration: beat.length - 0.4 }\n });\n}\n```\n\nThe `edit` result reports it when the timeline has more rows than its\ntiming needs (\"N timeline rows (… blocks directly on the page, … tracks); by\ntheir timing the clips fit on M tracks\"). Move the blocks onto shared tracks\nin stacking order: each keeps its `timeOffset` and `duration`, and the frames\nstay the same.\n\n### Clips timed to one another: tag the sequence\n\nWhen clips are timed to the keyframes of one clip (captions,\na highlight and dividers that follow a strip's stops, the clip that ends that\nsequence), give every clip of the sequence the same `codesign/sync` metadata\nvalue, and the clip they follow `codesign/sync-lead: 'true'` too. When the user trims\nthe lead in an editor that reads the tags (the CoDesign app's), its motion\nruns faster or slower and the others inside its span compress or stretch with\nit, while those after it move up. A trim of any other member moves no other\nmember.\n\n```js\nfor (const id of [strip, highlight, ...captions, ...dividers, ending])\n await engine.design.setProps(id, { metadata: { 'codesign/sync': 'strip' } });\nawait engine.design.setProps(strip, { metadata: { 'codesign/sync-lead': 'true' } });\n```\n\n- One lead per sequence: a graphic or text whose keyframes carry the beats\n (keyframe times scale with the clip's length; entrance, exit and loop\n animations do not). Never a group, a video or an audio clip: trimming\n media cuts its content, so nothing follows it.\n- One value per sequence on a page. Clips that only share the page, not a\n timing (a headline or logo that stays for the whole video), stay untagged.\n- Tag the clips a track or the page holds, not a group's children: the group\n is the clip.\n\n## Sound: music, voiceover, sound effects\n\n<!-- requires:export -->\nAudio is part of the design, not an afterthought: it plays under the page's\ntimeline and ships inside the mp4 (or alone as `wav`/`m4a`, see Notes). A silent video is a complete deliverable\nwhen the brief chose it — say so, rather than leaving sound out by omission.\n<!-- /requires:export -->\n<!-- unless:export -->\nAudio is part of the design, not an afterthought: it plays under the page's\ntimeline and ships inside the rendered video. A silent video is a complete\ndeliverable when the brief chose it — say so, rather than leaving sound out by\nomission.\n<!-- /unless:export -->\n\n<!-- requires:asset_add -->\n- **Sources.** The user's own file → `asset_add` (mp3, wav, m4a, ogg, aac).\n<!-- /requires:asset_add -->\n<!-- unless:asset_add -->\n- **Sources.** The user's own audio, by a `uri` the design or the brief supplies.\n<!-- /unless:asset_add -->\n<!-- requires:asset_generate -->\n Otherwise `asset_generate`: music and sound effects are provider\n models (`capability: \"text2audio\", source: \"all\"`), a voiceover is\n `elevenlabs/eleven-v3-tts`, and `elevenlabs/scribe-v2` transcribes speech\n into a `transcriptUri` plus every timed sentence, or for a long recording an\n outline of where to look (its description says whether it also takes video\n and long recordings). Prompts and\n parameters per model are in\n `{{skill:models#audio.md}}`, including how to write brand names in a\n voiceover's text so they are said right. Each returns a `uri` and, when the\n file states it, a `duration` — size the page and the clips from it.\n<!-- /requires:asset_generate -->\n- **Timing.** Put a voiceover on the timeline where its sentence belongs and cut\n or animate to its words: inside `edit`,\n `engine.design.readTranscript(transcriptUri, { from, to })` gives each\n word's start and end in seconds of the source (captions and word-timed text\n use the same times).\n Music drives the cuts when there is no voice:\n `engine.design.readBeats(audio, { bpm })` maps its beats in page seconds\n (the `launch-video` skill shows how to cut to them).\n- **Levels.** One audio block per sound. Duck the\n music under a voiceover (0.3–0.5 while it speaks); a sound effect is a short\n block at the cut, 0.5–0.8 under the music. Give the bed a `fadeOut` that ends with the page\n (and a `fadeIn` unless it starts on a hit). A bed shorter than the page\n leaves a silent tail — pick a longer track, or end the page with the music.\n<!-- requires:export -->\n- **Checking it.** `preview` renders pictures, not sound: the audio is only\n heard in the exported mp4. Export once, after the judge gate passes, then confirm from the export result that\n `audioDuration` is present and about equals `duration` (no `audioDuration` means\n the mp4 has no audio track), and listen to it when your host can play it;\n otherwise tell the user which sounds sit where.\n<!-- /requires:export -->\n<!-- unless:export -->\n- **Checking it.** `preview` renders pictures, not sound: tell the user which\n sounds sit where, so they can check them in the rendered video.\n<!-- /unless:export -->\n\n## Transitions between clips\n\nA transition joins a clip to the NEXT clip on the same track (`push`, `wipe`,\n`cross-zoom`, …) and renders in the video. Only leaf clips on a track qualify —\na graphic, text or video block that is a track's child. Blocks placed on\nthe page directly, groups, pages and tracks do not. A layer's sequence of beats is\none track (see \"Timeline: one track per layer\"), so each layer gets its own\ntransitions.\n\n```js\n// clipA → the clip after it on the track; duration defaults to 1.2\nawait engine.design.setProps(clipA, {\n transition: { type: 'push', duration: 0.3, easing: 'EaseOutQuint', push: { direction: 'Up' } }\n});\n```\n\n- **Timing.** The transition runs during the overlap of the two clips. With\n auto-arrange on, a transition starts the next clip `duration` before\n the current one ends. With auto-arrange off, lengthen each clip by the transition duration yourself\n (`timeOffset` of the next clip = the cut time; this clip's duration runs\n past it by the transition length) — keep that overlap equal to the\n transition's duration, or the transition drifts off the cut.\n- **Verify transitions with `preview`.** A still at `time` inside a\n transition renders it as the mp4 does — preview its middle\n (`time` = cut + duration/2). A still that shows one clip whole there means\n the transition is not applied or not where you think: check the clip is a\n track child and the overlap equals the transition's duration.\n\n## Captions\n\nNative captions burn into the mp4 and stay editable in the editor:\npage → one `captionTrack` → one `caption` per phrase.\n\n```js\nconst track = await engine.design.create(\n { type: 'captionTrack' },\n { parent: page }\n);\nconst ids = [];\nfor (const p of phrases) // { text, start, end } from transcript word times\n ids.push(\n await engine.design.create(\n {\n type: 'caption',\n props: {\n caption: { text: p.text },\n playback: { timeOffset: p.start, duration: p.end - p.start }\n }\n },\n { parent: track }\n )\n );\n// style ONCE — every caption on the track takes it\nawait engine.design.setProps(ids[0], {\n caption: {\n font: { family: 'Inter', weight: 'bold' },\n fontSize: '56px',\n color: { r: 1, g: 1, b: 1, a: 1 },\n horizontalAlignment: 'Center'\n },\n position: { x: 90, y: 1500 },\n width: 900,\n height: 200\n});\n```\n\n- **Style and layout are track-wide.** Position, size, font, font size, colour,\n alignment, `backgroundColor` and stroke written on ANY caption apply to every\n caption on its track, and a new caption adopts them. Write them once; text,\n `playback` timing, opacity and animations are per caption.\n- **Highlight a word on one caption with `caption.ranges`**\n (`[{ from, to, color }]`, offsets into `caption.text`, the same shape\n as `text.ranges`): ranges stay on that caption. A karaoke line is one\n caption per spoken word, each carrying the full phrase with its active word\n coloured. Write the track style first: a later `caption.color` replaces\n every caption's ranges.\n- **One track per page.** A second track is a second, independent style.\n- **Phrases, not words.** Group transcript words into 2–6-word phrases that\n fit the frame; consecutive captions should not overlap in time.\n- **From a subtitle file:** `create({ type: 'captionTrack', props: { subtitles: uri } }, { parent: page })`\n parses an SRT or VTT the brief supplies into timed captions on the track\n (writing `subtitles` again replaces them); style one as above.\n- **Animate captions per caption** (`animations` on each id, set once the\n caption is on its track), e.g. a 0.2 s `fade` in; a word-by-word reveal is\n one caption per word. A caption renders no `writingStyle` and no\n typewriter_text, block_swipe_text, spread_text or merge_text\n (`{{skill:api#animation.md}}`).\n\n## Notes\n\n- **A new block lasts to its parent's end.** A text or graphic that `create` puts on a page (or a\n group) of a Video scene without a `playback.duration` lasts from its `timeOffset` to the end of\n the page or group it is in; one on a track, a video clip and audio are not stretched. Set `duration` for a shorter\n beat.\n- **Groups time their children.** A child's `timeOffset` inside a group counts from the group's\n start. A group on a page of a Video scene (`create`'s group node or `group(ids)`) lasts to the\n page's end; `create` also stretches its children that name no duration.\n A longer `playback.duration` on a group later lengthens those children too; a child\n whose duration you set, one with `keyframes`, and video or audio keep theirs.\n<!-- requires:import -->\n- **A Lottie animation** (`.json` or `.lottie`) imports as a Video design: one page of its size\n and length, its layers editable blocks with their keyframes, its markers the scene's. A layer\n CE.SDK cannot draw as blocks plays from a video fill, which `import` names in `warnings`: its\n colours, effects and speed stay as they are. A longer `playback.duration` on a block and its\n group stretches that block's keys.\n<!-- /requires:import -->\n<!-- requires:export -->\n- **Animating an existing still design?** The `animate` skill does it end to end:\n `{{skill:animate}}`.\n- Export: `export({ format: \"mp4\", blockId: page })`.\n Duration and resolution come from the page, or pass `width`/`height` for a\n file of another size: the video scales with its aspect kept, the design stays\n as it is. A size the encoder refuses gets an error naming one that fits. The\n frame rate is `fps`, else\n the scene's `scene.frameRate` (30 unless set; above 0, at most 240). The page's audio blocks are\n mixed into the mp4 (AAC; Opus where the engine has no AAC encoder). The mp4's embedded cover\n image is the frame at the page's playhead (`playback.time`).\n<!-- requires:video-limit -->\n- An mp4, wav or m4a export is at most {{max-video-seconds}} seconds long, and a video at most as much\n work as {{max-video-seconds}} seconds of 1080p at 30 fps (frames × pixels): a larger one is refused\n before it renders. Shorten the page, export it smaller with `width`/`height`, pass a lower `fps`,\n or split the video into pages and export each.\n<!-- /requires:video-limit -->\n- Audio only: `export({ format: \"wav\" | \"m4a\", blockId: page })`\n renders the page's audio mix (`wav` = 48 kHz stereo 16-bit PCM). Page only; for one\n clip alone, export while it is the only audio on the page. Every clip sounds\n over exactly its own window (within a few ms) — same timing as the mp4.\n<!-- /requires:export -->\n<!-- unless:export -->\n- Duration and resolution come from the page.\n<!-- /unless:export -->\n<!-- requires:diagnostics -->\n- Needs the native engine (the default). If the server fell back to WASM,\n video/audio tools refuse with the reason; `diagnostics` shows\n `status.config.videoAvailable`.\n<!-- /requires:diagnostics -->\n- Motion beyond timing — entrance/exit/loop animations, animated text, and\n custom moves with `keyframes` (seconds of the block's own duration):\n `{{skill:api#animation.md}}`; every type and its options are the api skill's\n `Animation` type.\n- **Motion blur** smears fast moves like a camera shutter:\n `setProps(block, { motionBlur: { enabled: true } })`, and on the scene\n `motionBlur: { samples, shutterAngle, shutterPhase }` (1–64, 0–720°,\n −360–360°). More samples cost export time. Preview stills and image\n exports are always sharp: check motion blur in the exported MP4.\n- **`transformParent: '<uuid or name>'`** makes a graphic or text follow\n another graphic's or text's position, rotation and scale (not its opacity\n or stacking). Its `position` then counts from the parent's top-left, so it\n moves on screen when linked; `null` unlinks. Scaling a group this way:\n `{{skill:api#animation.md}}`.\n- Markers: `setProps(scene, { markers: [{ name: 'drop', time: 8.2, duration? }] })`\n keeps named moments (seconds) in the design for later edits and the\n editor's timeline — e.g. the beats you cut to. The list is replaced\n wholesale; `getProps(scene, ['markers'])` reads it.\n- `preview` renders a STILL frame, not motion — pass `time` (seconds) to seek\n any page with a timeline, whatever the scene mode: verify a few salient\n moments (start, mid-beat, the middle of each transition, the end). Each\n timed preview returns `{time, duration}` JSON next to the image.\n<!-- requires:export -->\n Export for the real thing.\n- Resource loading during export is handled server-side — you do NOT need a\n `loadResources` barrier before `export`.\n Trim writes, an audio block's `playback.speed` and reading a clip's length\n (`getProps(clip, ['fill']).fill.video.totalDuration`, audio: `audio.totalDuration`)\n load the clip themselves.\n- On video, the fill's `trimLength` sets the block's `duration`, one way only.\n<!-- /requires:export -->\n<!-- /requires:video -->\n",
15
- "docs/auto-layout/SKILL.md": "---\nname: auto-layout\ndescription: >-\n Use when converting a flat CoDesign / CE.SDK design with absolute positions to auto layout, so\n that it resizes correctly; when asked to \"apply auto layout\", \"make this responsive\" or \"make this\n perfectly resizable\"; or when building a design, card, table, dashboard or list that must hold at several sizes.\n---\n\n# auto-layout\n\nAuto layout: prefer it to absolute positions. Children flow, wrap and resize with their container, so a design has no\noverlap at any format. A page and a frame (a page inside a page) take `layout` props, and each child sizes itself with\n`layoutChild` props. A child in a flow has no x or y.\n\nThe props, which `setProps`, `create` and `getProps` take like any other:\n\n<!-- generated: auto-layout props -->\n\n```ts\ninterface AutoLayoutProps {\n layout?: {\n align?: {\n counter?: 'Start' | 'Center' | 'End' | 'Stretch' | 'Baseline';\n primary?: 'Start' | 'Center' | 'End' | 'SpaceBetween' | 'SpaceAround' | 'SpaceEvenly';\n };\n gap?: number;\n gapCounterAxis?: number;\n grid?: { columns?: string; rows?: string };\n mode?: 'None' | 'Horizontal' | 'Vertical' | 'Grid';\n padding?: { bottom?: number; left?: number; right?: number; top?: number };\n scaleContent?: 'None' | 'ShorterSide';\n wrap?: boolean;\n };\n layoutChild?: {\n gridColumn?: number;\n gridColumnSpan?: number;\n gridRow?: number;\n gridRowSpan?: number;\n heightSizing?: 'Fixed' | 'Hug' | 'Fill';\n horizontalConstraint?: 'Start' | 'End' | 'Center' | 'Both' | 'Scale';\n ignoreLayout?: boolean;\n maxHeight?: number;\n maxWidth?: number;\n minHeight?: number;\n minWidth?: number;\n verticalConstraint?: 'Start' | 'End' | 'Center' | 'Both' | 'Scale';\n visibility?: {\n hidden?: boolean;\n hideOrder?: number;\n maxAspectRatio?: number;\n maxParentAspectRatio?: number;\n maxParentHeight?: number;\n maxParentWidth?: number;\n minAspectRatio?: number;\n minParentAspectRatio?: number;\n minParentHeight?: number;\n minParentWidth?: number;\n };\n widthSizing?: 'Fixed' | 'Hug' | 'Fill';\n };\n}\n```\n\n<!-- /generated: auto-layout props -->\n\n`layoutChild.visibility.hidden` is read-only: the engine sets it when a visibility rule hides the block.\n\n## A new design that holds several sizes\n\nBuild the whole page in one create call, with the page itself as the outer flow and its padding as the margins, and set\n`layout: { scaleContent: 'ShorterSide' }` on the page. Then a resize scales font sizes, padding, gaps, radii, strokes and\nfixed sizes with the shorter side of the page, and the flow rearranges the content for the new aspect.\n\n```ts\nawait engine.design.create({ type: 'page', name: 'Poster', props: { width: 1080, height: 1080,\n layout: { mode: 'Vertical', gap: 32, padding: { top: 80, right: 80, bottom: 80, left: 80 }, scaleContent: 'ShorterSide' } },\n children: [\n { type: 'text', name: 'Title', props: { text: { string: 'Title', fontSize: '72px' },\n layoutChild: { widthSizing: 'Fill', heightSizing: 'Hug' } } },\n { type: 'graphic', name: 'Photo', props: { layoutChild: { widthSizing: 'Fill', heightSizing: 'Fill', minHeight: 320 } } },\n { type: 'page', name: 'Row', props: { fill: { enabled: false }, layout: { mode: 'Horizontal', gap: 16,\n wrap: true }, layoutChild: { widthSizing: 'Fill', heightSizing: 'Hug' } }, children: [...] }] });\n```\n\n- Text in a flow: `widthSizing: 'Fill'` and `heightSizing: 'Hug'`. On an axis sized `Fill` or `Hug`, set no `width`\n or `widthMode` (no `height` or `heightMode`): a size written there makes the axis `Fixed`. Automatic font size does\n not work in a flow; with `scaleContent`, pick the font sizes for the size you build at. `getProps` answers the sizes\n you set, and leaves out the size of a `Fill` or `Hug` axis; `measure` answers where a block shows at the page's\n current size. On a page with `scaleContent` at another size, `measure` also answers `scale`: divide a measured\n value by it before you write it, or place the block by the flow instead.\n- A chip, tag or button is a frame with a fill, a corner radius and padding, sized `Hug` on both axes, around a text\n child sized `Hug`: it fits its label, so measure nothing. A colour is `{ r, g, b, a }` from 0 to 1 under\n `color.value`, never a hex string; padding is an object of four sides, never a number:\n\n ```ts\n { type: 'page', name: 'Chip', props: {\n fill: { type: 'color', color: { value: { r: 0.12, g: 0.16, b: 0.27, a: 1 } } },\n shape: { type: 'rect', rect: { cornerRadiusTL: 24, cornerRadiusTR: 24, cornerRadiusBL: 24, cornerRadiusBR: 24 } },\n layout: { mode: 'Horizontal', padding: { top: 12, right: 24, bottom: 12, left: 24 } },\n layoutChild: { widthSizing: 'Hug', heightSizing: 'Hug' } },\n children: [{ type: 'text', name: 'Chip label', props: { text: { string: 'New' },\n layoutChild: { widthSizing: 'Hug', heightSizing: 'Hug' } } }] }\n ```\n\n- A row with `wrap: true` breaks by the widths of its children, so give each child a width: `Fixed` with a `width`, or\n `Fill` with a `minWidth`. A child sized `Hug` around a text without its own sizing keeps the text's default width.\n For a row that becomes one column on a narrow page, rather than two items and one, set `minWidth` above half the\n narrow row's width less the gap.\n- A `Fill` child, or `align.primary: 'SpaceBetween'`, takes the leftover space, so a larger page shows no dead void.\n Give that space to a photo or to the gaps: a coloured band or card sized `Fill` grows into a large empty block on a\n taller page, so size it `Hug` around its content.\n- A grid: `layout: { mode: 'Grid', grid: { columns: '2fr 1fr', rows: 'auto' }, gap: 8, gapCounterAxis: 8 }`, and a\n child picks its cell with `layoutChild: { gridColumn: 2, gridColumnSpan: 2 }`.\n- A background leaves the flow with `layoutChild: { ignoreLayout: true, horizontalConstraint: 'Both',\n verticalConstraint: 'Both' }`. It then has the size of its parent at every page size, so never make a block larger\n than the page to cover other formats: the page clip does not hide it in every editor.\n- With `scaleContent`, the engine also shrinks the content of a page until its flows fit, so a square of a wide design\n keeps every block. That works only when each block keeps a size: never let a block take the leftover space down to\n nothing, and never hide content by giving it no room. Give a `Fill` block that carries content (a chart, a photo, a\n badge) a `minHeight` or `minWidth`, and do not build the same content twice for two aspects, unless a visibility rule\n shows only one of them.\n- A block can leave a format on purpose with `layoutChild: { visibility: { ... } }`: `minAspectRatio` /\n `maxAspectRatio` show it only for a range of page width / height (`maxAspectRatio: 0.9` is portrait only,\n `minAspectRatio: 1.1` is landscape only); `minParentWidth` / `maxParentWidth` / `minParentHeight` /\n `maxParentHeight` show it only for a range of sizes of its parent, and `minParentAspectRatio` /\n `maxParentAspectRatio` only for a range of width / height of its parent (for a frame that changes shape while the\n page stays); `hideOrder: 1, 2, ...` drops it when a flow does not fit, the smallest order first, before the content\n shrinks. Give `hideOrder` only to content the design can lose: fine print, a secondary line, a decoration. When two\n blocks are variants of one content, their ranges must meet with no gap, so every aspect ratio shows exactly one of\n them: a square must not lose the content. A block that a rule hides leaves the flow, and `checkSizes` lists it as\n `note: a rule hides ...` so you can check that nothing is missing.\n- Then call `engine.design.checkSizes(page, sizes)` once for all target sizes, one square among them, fix what it\n reports in the structure, and call it again until no size reports `lost` or `cut off`. Do not set the page size by\n hand to test a size (to restore a collapsed content scale, follow the step `checkSizes` names): to look at one, `duplicate` the page, set the copy to that size, `preview` the copy and destroy\n it.\n\n## Motion and video\n\n- Keyframes on `width`, `height`, `layout.gap`, `layout.gapCounterAxis` and `layout.padding.*` reflow the flow on\n every frame: the neighbours move with the animated size or spacing.\n- An entrance, exit or loop animation only draws a block differently: its slot and its neighbours stay where they are.\n- A frame takes no `playback.timeOffset` (the engine refuses it), and its `duration` does not hide it; it only sets\n how far the frame's own keyframes reach (5 s by default), so give a frame you key `playback: { duration }` of its\n page. Time its children instead, each with its own `timeOffset` and in-animation, for a row that enters in a\n stagger.\n- A child with a `timeOffset` or a `duration` keeps its slot while it is off screen. Blocks that take turns in one\n place, such as the slides of a carousel, go into one frame with `ignoreLayout: true` and both constraints `Both`.\n- A frame clips its children, so an in-animation that slides from outside the frame is cut at its edge. Set\n `clipped: false` on the frame when the motion should show.\n- A video, an image or a coloured graphic has no content size: `Hug` makes it 0 × 0. Size it `Fill` or `Fixed`.\n- Things that enter together in a flow go into a frame (see Rules).\n- Sizes and positions read back after a `preview` at a time show the layout at that time. Preview the settled end\n of the design last before you compare or measure.\n\n## Convert a design with absolute positions\n\nRebuild the structure of the current design with containers, so that every block keeps its place at any size. Change\nthe structure only: keep each color, font, image and text as it is.\n\n## Rules\n\n- A container is a frame: a page inside the page, made with `create({ type: 'page' }, { parent })`. Its `layout` props\n set the flow: `mode` (`Horizontal`, `Vertical`, `Grid` or `None`), `gap`, `gapCounterAxis`, `padding`, `align`, `wrap`\n and, for a grid, `grid.columns` and `grid.rows`. Only a page has `layout` props.\n- A design that must work at several sizes sets `layout: { scaleContent: 'ShorterSide' }` on its page. A resize then\n scales font sizes, padding, gaps, radii, strokes and fixed sizes with the shorter side, and the flow rearranges the\n content for the new aspect. Keep the font sizes of the source; the scale adapts them.\n- A child of a container has no position. Setting x or y on it returns an error, so move it by its order or its cell.\n- The `layoutChild` props of a child size it per axis: `widthSizing` and `heightSizing` are `Fill` for the free space,\n `Hug` for the content, or `Fixed` for its own size. `minWidth`, `maxWidth`, `minHeight`, `maxHeight`, `gridColumn`,\n `gridRow` and the spans are there too. A child has them only inside a frame, so set them after it has its parent.\n- In a flow, a frame is the cluster: it counts as one group for the judge's grouping check. Never group a flow's\n children: a group in a flow puts its members on one spot. A track stays outside the flow.\n- A frame clips its children by default. Turn clipping off when the source does not clip.\n\n## Steps\n\n1. **Read the design.** List each block with its frame. Sort the blocks by their position.\n2. **Find the groups.** Blocks that share an edge or a center and have equal gaps form one group. A row has one\n shared y range. A column has one shared x range. Equal rows and columns together form a grid.\n3. **Build from the inside.** Create a container for each group, then one for the groups, up to the page. Name each\n container after what it holds, such as `Header` or `Price row`.\n4. **Measure the layout values.** Take the gap from the distance between the children, and the padding from the\n distance to the parent. Do not round a value that repeats in the design.\n5. **Choose the sizing.**\n - Text that can grow: `widthSizing: 'Fill'`, `heightSizing: 'Hug'`.\n - A sidebar or an icon: `Fixed`.\n - The main column and an image that follows it: `Fill`.\n - A background that covers its parent: `ignoreLayout: true` with `horizontalConstraint` and `verticalConstraint`\n both `Both`.\n - A badge on a corner: `ignoreLayout: true` with the constraints of that corner, such as `End` and `Start`.\n6. **Compare.** At the original size, render the design and compare it with the source. A difference above 2 design\n units is a wrong gap or padding. Fix it before you continue.\n7. **Check the sizes.** Call `checkSizes` for the target sizes, and look at each on a copy of the page as above, for\n overlap, clipped text and a dead void. A defect means a wrong `Fill` or `Hug`, or a missing container. Fix the\n structure, never the single block.\n\n## No-goes\n\n- No `ignoreLayout` to get past a position error. Only a background, an overlay and blocks that take turns in one place (see Motion) leave the flow.\n- No container that holds one child and has no padding, background or size of its own.\n- No separate design per size. One structure holds all sizes.\n",
15
+ "docs/auto-layout/SKILL.md": "---\nname: auto-layout\ndescription: >-\n Use when converting a flat CoDesign / CE.SDK design with absolute positions to auto layout, so\n that it resizes correctly; when asked to \"apply auto layout\", \"make this responsive\" or \"make this\n perfectly resizable\"; or when building a design, card, table, dashboard or list that must hold at several sizes.\n---\n\n# auto-layout\n\nAuto layout: prefer it to absolute positions. Children flow, wrap and resize with their container, so a design has no\noverlap at any format. A page and a frame (a page inside a page) take `layout` props, and each child sizes itself with\n`layoutChild` props. A child in a flow has no x or y.\n\nThe props, which `setProps`, `create` and `getProps` take like any other:\n\n<!-- generated: auto-layout props -->\n\n```ts\ninterface AutoLayoutProps {\n layout?: {\n align?: {\n counter?: 'Start' | 'Center' | 'End' | 'Stretch' | 'Baseline';\n primary?: 'Start' | 'Center' | 'End' | 'SpaceBetween' | 'SpaceAround' | 'SpaceEvenly';\n };\n gap?: number;\n gapCounterAxis?: number;\n grid?: { columns?: string; rows?: string };\n mode?: 'None' | 'Horizontal' | 'Vertical' | 'Grid';\n padding?: { bottom?: number; left?: number; right?: number; top?: number };\n scaleContent?: 'None' | 'ShorterSide';\n wrap?: boolean;\n };\n layoutChild?: {\n gridColumn?: number;\n gridColumnSpan?: number;\n gridRow?: number;\n gridRowSpan?: number;\n heightSizing?: 'Fixed' | 'Hug' | 'Fill';\n horizontalConstraint?: 'Start' | 'End' | 'Center' | 'Both' | 'Scale';\n ignoreLayout?: boolean;\n maxHeight?: number;\n maxWidth?: number;\n minHeight?: number;\n minWidth?: number;\n verticalConstraint?: 'Start' | 'End' | 'Center' | 'Both' | 'Scale';\n visibility?: {\n hidden?: boolean;\n hideOrder?: number;\n maxAspectRatio?: number;\n maxParentAspectRatio?: number;\n maxParentHeight?: number;\n maxParentWidth?: number;\n minAspectRatio?: number;\n minParentAspectRatio?: number;\n minParentHeight?: number;\n minParentWidth?: number;\n };\n widthSizing?: 'Fixed' | 'Hug' | 'Fill';\n };\n}\n```\n\n<!-- /generated: auto-layout props -->\n\n`layoutChild.visibility.hidden` is read-only: the engine sets it when a visibility rule hides the block.\n\n## A new design that holds several sizes\n\nBuild the whole page in one create call, with the page itself as the outer flow and its padding as the margins, and set\n`layout: { scaleContent: 'ShorterSide' }` on the page. Then a resize scales font sizes, padding, gaps, radii, strokes and\nfixed sizes with the shorter side of the page, and the flow rearranges the content for the new aspect.\n\n```ts\nawait engine.design.create({ type: 'page', name: 'Poster', props: { width: 1080, height: 1080,\n layout: { mode: 'Vertical', gap: 32, padding: { top: 80, right: 80, bottom: 80, left: 80 }, scaleContent: 'ShorterSide' } },\n children: [\n { type: 'text', name: 'Title', props: { text: { string: 'Title', fontSize: '72px' },\n layoutChild: { widthSizing: 'Fill', heightSizing: 'Hug' } } },\n { type: 'graphic', name: 'Photo', props: { layoutChild: { widthSizing: 'Fill', heightSizing: 'Fill', minHeight: 320 } } },\n { type: 'page', name: 'Row', props: { fill: { enabled: false }, layout: { mode: 'Horizontal', gap: 16,\n wrap: true }, layoutChild: { widthSizing: 'Fill', heightSizing: 'Hug' } }, children: [...] }] });\n```\n\n- Text in a flow: `widthSizing: 'Fill'` and `heightSizing: 'Hug'`. On an axis sized `Fill` or `Hug`, set no `width`\n or `widthMode` (no `height` or `heightMode`): a size written there makes the axis `Fixed`. Automatic font size does\n not work in a flow; with `scaleContent`, pick the font sizes for the size you build at. `getProps` answers the sizes\n you set, and leaves out the size of a `Fill` or `Hug` axis; `measure` answers where a block shows at the page's\n current size. On a page with `scaleContent` at another size, `measure` also answers `scale`: divide a measured\n value by it before you write it, or place the block by the flow instead.\n- A chip, tag or button is a frame with a fill, a corner radius and padding, sized `Hug` on both axes, around a text\n child sized `Hug`: it fits its label, so measure nothing. A colour is `{ r, g, b, a }` from 0 to 1 under\n `color.value`, never a hex string; padding is an object of four sides, never a number:\n\n ```ts\n { type: 'page', name: 'Chip', props: {\n fill: { type: 'color', color: { value: { r: 0.12, g: 0.16, b: 0.27, a: 1 } } },\n shape: { type: 'rect', rect: { cornerRadiusTL: 24, cornerRadiusTR: 24, cornerRadiusBL: 24, cornerRadiusBR: 24 } },\n layout: { mode: 'Horizontal', padding: { top: 12, right: 24, bottom: 12, left: 24 } },\n layoutChild: { widthSizing: 'Hug', heightSizing: 'Hug' } },\n children: [{ type: 'text', name: 'Chip label', props: { text: { string: 'New' },\n layoutChild: { widthSizing: 'Hug', heightSizing: 'Hug' } } }] }\n ```\n\n- A row with `wrap: true` breaks by the widths of its children, so give each child a width: `Fixed` with a `width`, or\n `Fill` with a `minWidth`. A child sized `Hug` around a text without its own sizing keeps the text's default width.\n For a row that becomes one column on a narrow page, rather than two items and one, set `minWidth` above half the\n narrow row's width less the gap.\n- A `Fill` child, or `align.primary: 'SpaceBetween'`, takes the leftover space, so a larger page shows no dead void.\n Give that space to a photo or to the gaps: a coloured band or card sized `Fill` grows into a large empty block on a\n taller page, so size it `Hug` around its content.\n- A grid: `layout: { mode: 'Grid', grid: { columns: '2fr 1fr', rows: 'auto' }, gap: 8, gapCounterAxis: 8 }`, and a\n child picks its cell with `layoutChild: { gridColumn: 2, gridColumnSpan: 2 }`.\n- A background leaves the flow with `layoutChild: { ignoreLayout: true, horizontalConstraint: 'Both',\n verticalConstraint: 'Both' }`. It then has the size of its parent at every page size, so never make a block larger\n than the page to cover other formats: the page clip does not hide it in every editor.\n- With `scaleContent`, the engine also shrinks the content of a page until its flows fit, so a square of a wide design\n keeps every block. That works only when each block keeps a size: never let a block take the leftover space down to\n nothing, and never hide content by giving it no room. Give a `Fill` block that carries content (a chart, a photo, a\n badge) a `minHeight` or `minWidth`, and do not build the same content twice for two aspects, unless a visibility rule\n shows only one of them.\n- A block can leave a format on purpose with `layoutChild: { visibility: { ... } }`: `minAspectRatio` /\n `maxAspectRatio` show it only for a range of page width / height (`maxAspectRatio: 0.9` is portrait only,\n `minAspectRatio: 1.1` is landscape only); `minParentWidth` / `maxParentWidth` / `minParentHeight` /\n `maxParentHeight` show it only for a range of sizes of its parent, and `minParentAspectRatio` /\n `maxParentAspectRatio` only for a range of width / height of its parent (for a frame that changes shape while the\n page stays); `hideOrder: 1, 2, ...` drops it when a flow does not fit, the smallest order first, before the content\n shrinks. Give `hideOrder` only to content the design can lose: fine print, a secondary line, a decoration. When two\n blocks are variants of one content, their ranges must meet with no gap, so every aspect ratio shows exactly one of\n them: a square must not lose the content. A block that a rule hides leaves the flow, and `checkSizes` lists it as\n `note: a rule hides ...` so you can check that nothing is missing.\n- Then call `engine.design.checkSizes(page, sizes)` once for all target sizes, one square among them, fix what it\n reports in the structure, and call it again until no size reports `lost` or `cut off`. Do not set the page size by\n hand to test a size (to restore a collapsed content scale, follow the step `checkSizes` names): to look at one, `duplicate` the page, set the copy to that size, `preview` the copy and destroy\n it.\n\n## Motion and video\n\n- Keyframes on `width`, `height`, `layout.gap`, `layout.gapCounterAxis` and `layout.padding.*` reflow the flow on\n every frame: the neighbours move with the animated size or spacing.\n- An entrance, exit or loop animation only draws a block differently: its slot and its neighbours stay where they are.\n- A frame takes no `playback.timeOffset` (the engine refuses it), and its `duration` does not hide it; it only sets\n how far the frame's own keyframes reach (5 s by default), so give a frame you key `playback: { duration }` of its\n page. Time its children instead, each with its own `timeOffset` and in-animation, for a row that enters in a\n stagger.\n- A child with a `timeOffset` or a `duration` keeps its slot while it is off screen. Blocks that take turns in one\n place, such as the slides of a carousel, go into one frame with `ignoreLayout: true` and both constraints `Both`.\n- A frame clips its children, so an in-animation that slides from outside the frame is cut at its edge. Set\n `clipped: false` on the frame when the motion should show.\n- A video, an image or a coloured graphic has no content size: `Hug` makes it 0 × 0. Size it `Fill` or `Fixed`.\n- Things that enter together in a flow go into a frame (see Rules).\n- Sizes and positions read back after a `preview` at a time show the layout at that time. Preview the settled end\n of the design last before you compare or measure.\n\n## Convert a design with absolute positions\n\nRebuild the structure of the current design with containers, so that every block keeps its place at any size. Change\nthe structure only: keep each color, font, image and text as it is.\n\n## Rules\n\n- A container is a frame: a page inside the page, made with `create({ type: 'page' }, { parent })`. Its `layout` props\n set the flow: `mode` (`Horizontal`, `Vertical`, `Grid` or `None`), `gap`, `gapCounterAxis`, `padding`, `align`, `wrap`\n and, for a grid, `grid.columns` and `grid.rows`. Only a page has `layout` props.\n- A design that must work at several sizes sets `layout: { scaleContent: 'ShorterSide' }` on its page. A resize then\n scales font sizes, padding, gaps, radii, strokes and fixed sizes with the shorter side, and the flow rearranges the\n content for the new aspect. Keep the font sizes of the source; the scale adapts them.\n- A child of a container has no position. Setting x or y on it returns an error, so move it by its order or its cell.\n- The `layoutChild` props of a child size it per axis: `widthSizing` and `heightSizing` are `Fill` for the free space,\n `Hug` for the content, or `Fixed` for its own size. `minWidth`, `maxWidth`, `minHeight`, `maxHeight`, `gridColumn`,\n `gridRow` and the spans are there too. A child has them only inside a frame, so set them after it has its parent.\n- In a flow, a frame is the cluster: it counts as one group for the judge's grouping check. Never group a flow's\n children: a group in a flow puts its members on one spot. A track stays outside the flow.\n- A frame clips its children by default. Turn clipping off when the source does not clip.\n\n## Steps\n\n1. **Read the design.** List each block with its frame. Sort the blocks by their position.\n2. **Find the groups.** Blocks that share an edge or a center and have equal gaps form one group. A row has one\n shared y range. A column has one shared x range. Equal rows and columns together form a grid.\n3. **Build from the inside.** Create a container for each group, then one for the groups, up to the page. Name each\n container after what it holds, such as `Header` or `Price row`.\n4. **Measure the layout values.** Take the gap from the distance between the children, and the padding from the\n distance to the parent. Do not round a value that repeats in the design.\n5. **Choose the sizing.**\n - Text that can grow: `widthSizing: 'Fill'`, `heightSizing: 'Hug'`.\n - A sidebar or an icon: `Fixed`.\n - The main column and an image that follows it: `Fill`.\n - A background that covers its parent: `ignoreLayout: true` with `horizontalConstraint` and `verticalConstraint`\n both `Both`.\n - A badge on a corner: `ignoreLayout: true` with the constraints of that corner, such as `End` and `Start`.\n6. **Compare.** At the original size, render the design and compare it with the source. A difference above 2 design\n units is a wrong gap or padding. Fix it before you continue.\n7. **Check the sizes.** Call `checkSizes` for the target sizes, and look at each on a copy of the page as above, for\n overlap, clipped text and a dead void. A defect means a wrong `Fill` or `Hug`, or a missing container. Fix the\n structure, never the single block.\n\n## No-goes\n\n- No `ignoreLayout` to get past a position error. Only a background, an overlay and blocks that take turns in one place (see Motion) leave the flow.\n- Never put a block back into the flow (`ignoreLayout: false`) while its `horizontalConstraint` is `Center`: the engine\n crashes, and the saved design can crash it again at every load. Set `horizontalConstraint: 'Start'` first, then\n `ignoreLayout: false` and its sizing.\n- No container that holds one child and has no padding, background or size of its own.\n- No separate design per size. One structure holds all sizes.\n",
16
16
  "docs/brand/SKILL.md": "---\nname: brand\ndescription: >-\n Use when applying a brand kit / brand style to an existing CoDesign / CE.SDK design — a\n rules-governed restyle (recolor + refont + logo + treatment by role), not a free-form style\n change; when a restyled design reads off-brand (free-chosen colors, wrong accent, a second\n colour used as structure, a coloured button the brand forbids, a headline set in a weight the\n brand bans, a flat bordered card, or the wrong / recoloured / redrawn logo); when loading a\n brand's fonts, wordmark SVG, or signature device into a scene; or when turning an external brand\n (a guidelines PDF, a website / URL, a Figma file, or a raw asset dump) into a reusable brand kit.\n---\n\n# brand\n\nPoint this skill at the current design and a brand kit, and it re-skins the design to that brand\n<!-- requires:export -->\nunder the brand's **strict rules**. It operates on the **design in the current session**, and the\nrestyle is **exported as its own `.imgly` file**. Single home for the brand workflow: the\n<!-- /requires:export -->\n<!-- unless:export -->\nunder the brand's **strict rules**. It operates on the **design in the current session**.\nSingle home for the brand workflow: the\n<!-- /unless:export -->\n**role → token map**, the **restyle routine**, the **graded conformance pass**, and the brand\n**no-goes**.\n\n<!-- requires:export -->\n**Keep the source; restyle a copy.** A session holds one design and a restyle changes it in place,\nso take the source's `uri` first and `import` it — the restyle goes to the copy, and\nthe source stays as it was:\n\n```\nexport({ format: 'imgly' }) → SOURCE_URI (the un-branded original, kept)\n<!-- requires:open -->\nimport({ source: { uri: SOURCE_URI } }) → a copy of it is the session\n<!-- /requires:open -->\n<!-- unless:open -->\n<!-- requires:version -->\nimport({ source: { uri: SOURCE_URI } }) → a copy of it: a new design, with its own design and version\n<!-- /requires:version -->\n<!-- unless:version -->\nimport({ source: { uri: SOURCE_URI } }) → the source replaces the session; its save is a new file\n<!-- /unless:version -->\n<!-- /unless:open -->\nedit(…) restyle + conform\npreview() → diff against the source's render\nexport({ format: 'imgly' }) → the restyled edition, its own file\n```\n\nBoth editions then exist. Skipping the first two steps means the un-branded original is gone\nthe moment you restyle — and the source-parity diff the `judge` gate requires has nothing to\ncompare against.\n<!-- unless:open -->\n<!-- unless:version -->\n**Check the second save's returned `uri` is not `SOURCE_URI`** (re-saving a session\nrevises one file) — a restyle that landed back on the source replaced the un-branded original\ninstead of joining it.\n<!-- /unless:version -->\n<!-- /unless:open -->\n\n<!-- /requires:export -->\n<!-- unless:export -->\n**The source stays intact.** The product opens the restyle as its own session, so restyling the\ndesign in front of you does not touch the original. `preview` it before you change anything: that\nrender is the source the `judge` gate's parity diff compares against.\n\n<!-- /unless:export -->\nIt builds on things it does _not_ restate: design rules §6.1–§6.5 (the general typography / colour /\nhierarchy / composition / craft thresholds), the `api` skill's engine mechanics (the `text.font`\ndeclaration, fill specs, auto-reshape, `loadResources`, the content-area line-height\nconversion §6.1.3), and its two siblings. The brand kit's own `tokens.json` supplies the\n**values**; this skill supplies the **procedure**.\n\n**Scoring:** a restyle is judged with the `judge` skill — every applicable axis ≥ 8, no averaging,\nN/A = 10. The brand kit's `avoid` list + `do-dont/` gallery are an **additional** gate on top of\nthe axes: a single hard `avoid` violation (a second colour used as structure, a banned button, a\nredrawn logo, a free-chosen colour) fails the restyle even if the axes would pass — include an\n\"avoid-list\" row in the judge scorecard.\n\n## Reference files (load on demand)\n\nThis `SKILL.md` is the always-needed spine: inputs, core principle, role map, workflow, restyle\nroutine, conformance pass, the **brand conformance checklist**, no-goes. Two situational bodies live\nbeside it:\n\n- **`reference/brandkit-spec.md`** — the canonical brand-kit **schema** (what `tokens.json` must\n contain, required-core vs optional sections, how the skill degrades when a section is absent).\n Read it when validating a kit or unsure what a token means.\n- **`reference/authoring.md`** — the **intake** mode: turning an _external_ brand (a guidelines PDF,\n a website/URL, a Figma file, or a raw asset dump) into a canonical `<kit>/` before\n applying — extraction per source form, the not-invent discipline, the avoid-list hard-stop, the\n font-subset trap. Read it whenever the kit isn't already a valid canonical folder.\n- **`reference/asset-loading.md`** — the **asset mechanics** (resolving brand fonts to a fetchable\n<!-- requires:asset_add -->\n URI incl. the local-TTF → imported-`uri` bridge, the hex → 0-1 RGBA conversion, placing the\n<!-- /requires:asset_add -->\n<!-- unless:asset_add -->\n URI, the hex → 0-1 RGBA conversion, placing the\n<!-- /unless:asset_add -->\n wordmark SVG, recolouring monochrome icons, building the **kicker pill** on a text background,\n block-**opacity** vs colour-alpha, `text.color` vs colour-fill, the whole-block colour that\n flattens per-run colour). Unlike\n its two siblings this one is NOT situational — every restyle touches fonts, colours, or the\n logo, so it is required reading before the restyle routine; it lives beside the spine only to\n keep this entry document lean.\n\n## localize / resize vs brand — the three surgeries\n\nThe three sibling skills each change exactly one layer and hold the rest fixed:\n\n- **localize** — changes the **words** (+ the script's font); **snaps geometry** back to\n the reference. Any geometry move is drift.\n- **resize** — changes the **canvas**; **re-derives geometry** for the new aspect. Copy\n and style are held.\n- **brand** — changes the **style layer** (colour, type, logo, treatment) **by role**;\n **holds copy and composition**. Geometry moves only in the graded conformance pass, and only\n where a brand _rule_ requires it — never a free re-layout.\n\nNever confuse them: don't re-word or re-flow inside a brand pass (that's localize / resize), and\nif a brand genuinely needs a different _layout_ (not just a different skin), that is a **resize**,\nnot a brand restyle — cross-ref and stop, don't silently re-compose.\n\n## Inputs — what to restyle, into which brand, in which scheme\n\n<!-- requires:interactive -->\nResolve these by the intake contract — derive, ask once, echo, invent nothing:\n`{{skill:create#intake.md}}`. **R** = required, no default; **A** = ask if\nunderived; **D** = defaultable.\n<!-- /requires:interactive -->\n<!-- unless:interactive -->\nResolve these by the intake contract — derive, decide what is missing, echo, invent nothing:\n`{{skill:create#intake.md}}`. **R** = required, no default; **A** = has a default, resolved by the intake when underived; **D** = defaultable.\n<!-- /unless:interactive -->\n\n| Parameter | Kind | Chips / values | Default |\n| ------------- | ------- | ------------------------------------------------------------------------- | --------------------------------- |\n| brand kit | **R** | the kits you can find · `Provide a brand source` · Other | **none — never invented** |\n| colour scheme | A | the chosen kit's `colorSchemes.approved` · `Decide automatically` · Other | the neutral / `paper` scheme |\n| source design | derived | — | the design in the current session |\n\n<!-- requires:export -->\n**1. The source** — the design in the current session. **Export it as `.imgly` first** (`export({ format: 'imgly' })`)\nand keep its `uri`: a restyle preserves that design's geometry and copy — only the style layer\nchanges — and that file is both the un-branded original and your reference for the parity\ndiff.\n<!-- requires:open -->\nIf the user means a design saved earlier, its `uri` IS `SOURCE_URI`: `open` it to `preview` and\ncapture it, skip the first export, then `import` a copy to restyle.\n<!-- /requires:open -->\n<!-- unless:open -->\n<!-- requires:version -->\nIf the user means a design saved earlier, its `design` IS the source: `preview` it and capture it,\nskip the first export, then `import` a copy to restyle.\n<!-- /requires:version -->\n<!-- unless:version -->\nIf the user means a design saved earlier, load it with `import({ source: { uri: '<its uri>' } })`.\n<!-- /unless:version -->\n<!-- /unless:open -->\n<!-- /requires:export -->\n<!-- unless:export -->\n**1. The source** — the design in the current session. `preview` it before you change anything:\na restyle preserves that design's geometry and copy — only the style layer changes — and that\nrender is your reference for the parity diff.\n<!-- /unless:export -->\n\n**2. The brand kit** — a folder the user points you at (`<kit>/`), holding `tokens.json` (+\n`BRAND.md`, fonts, logos, icons, imagery, `do-dont/`). Parse `tokens.json` **first**; it is the\nmachine-readable law. Validate it against `reference/brandkit-spec.md`.\n<!-- requires:ly.img.workspace.styles -->\nA style the user names without handing it to you (_\"in our Acme style\"_) is saved in the\nworkspace: find it with `asset_search({ source: 'ly.img.workspace.styles', query: '<its name>' })`.\nThat answer carries the style's `STYLE.md` and `tokens.json`: they are its kit, so read nothing\nelse to apply it. When it says no style has exactly that name and others match, the kit it carries\nis a guess: ask which one is meant, or, with nobody to ask, say in your reply which one you used.\nAnother style's kit comes from a search by its id. The kits you can find are that source's assets.\n<!-- /requires:ly.img.workspace.styles -->\n<!-- requires:asset_add -->\nA saved style names its fonts, logos, icons and images in `tokens.json` by URI, not by a path in\nits folder: those files are already in the store, so use each URI as it is.\n<!-- /requires:asset_add -->\n\n<!-- requires:interactive -->\nIf no kit is named, **ask** — _**Which brand should this use?**_ — offering the kits you can find\nplus `Provide a brand source`. A brand is the user's own fact: there is no\ndefaulting to \"a sensible brand\", and no proceeding on an inferred one.\n<!-- /requires:interactive -->\n<!-- unless:interactive -->\nIf no kit is named, change nothing and say in your reply that the restyle needs a brand kit. A\nbrand is the user's own fact: there is no defaulting to \"a sensible brand\", and no proceeding on an\ninferred one.\n<!-- /unless:interactive -->\n\n<!-- requires:interactive -->\nIf what the user gives you is **not** a canonical kit yet — an external source (a guidelines PDF, a\nwebsite/URL, a Figma file, or a raw asset dump), or a folder with no valid `tokens.json` —\n**scaffold it into the canonical shape first** (extract → map → `tokens.json` + `BRAND.md` + assets\n→ validate), per **`reference/authoring.md`**, then apply against the new kit. Ask the user where\nthe kit folder should live; it is theirs to keep and reuse.\n<!-- /requires:interactive -->\n<!-- unless:interactive -->\nIf what the user gives you is **not** a canonical kit yet — an external source (a guidelines PDF, a\nwebsite/URL, a Figma file, or a raw asset dump), or a folder with no valid `tokens.json` —\n**scaffold it into the canonical shape first** (extract → map → `tokens.json` + `BRAND.md` + assets\n→ validate), per **`reference/authoring.md`**, then apply against the new kit. Put the kit folder\nbeside the source you were given, and say where it is; it is theirs to keep and reuse.\n<!-- /unless:interactive -->\n\n<!-- requires:interactive -->\n**If the required-core is incomplete, ask for the missing piece — don't stop, and don't guess.**\nNever fill a gap in a kit with a value of your own: not a colour, not a typeface, not a logo.\nName what is missing and ask for exactly that, e.g.\n\n> The Acme kit has no display font — `typography.display` is empty, and I won't pick one for your\n> brand.\n> **Which font should headlines use?** `Provide a font file` · `Name a Google font` ·\n> `Use the kit's body font` · Other\n<!-- /requires:interactive -->\n<!-- unless:interactive -->\n**If the required-core is incomplete, don't guess.** Never fill a gap in a kit with a value of\nyour own: not a colour, not a typeface, not a logo. Change nothing, and name in your reply exactly\nwhat is missing, e.g. \"The Acme kit has no display font — `typography.display` is empty, and I\nwon't pick one for your brand.\" \n<!-- /unless:interactive -->\n\n**3. The scheme** — one **approved** `colorScheme` from `tokens.colorSchemes.approved`, chosen\ndeliberately per `backgroundSelection` (default the neutral/`paper` scheme; use the full-bleed\nbrand-colour scheme only for a deliberate hero). If the kit offers more than one approved scheme\n<!-- requires:interactive -->\nand nothing in the request implies which, ask — _**Which colour scheme?**_ — with the kit's own\napproved schemes as chips plus `Decide automatically`. Reading the chips from `tokens.json` is not\ninvention; free-choosing a `(bg, text, accent)` triple is. **One scheme per piece** — never a\n`denied` combination.\n<!-- /requires:interactive -->\n<!-- unless:interactive -->\nand nothing in the request implies which, take the default and say so in the echo. Choosing among\nthe schemes in `tokens.json` is not invention; free-choosing a `(bg, text, accent)` triple is.\n**One scheme per piece** — never a `denied` combination.\n<!-- /unless:interactive -->\n\nThen echo what you resolved in one line (\"acme restyle, paper scheme (defaulted), 1 design\") and\nrun the Workflow. The restyling `edit` gets a `note` naming the brand and scheme (e.g. \"acme\nrestyle, paper scheme\").\n\n## Core principle — re-skin by role, then conform to the brand's law\n\nA brand kit is not a palette swap — it is a **role system**. Restyling is two layers:\n\n- **Layer 1 — Restyle (always).** Classify each source block by its **design role**, then set its\n colour + font + treatment from the **brand token for that role** (background → scheme background;\n headline → display family; the one focal moment → accent; eyebrow → kicker style; …). Geometry\n unchanged. This is deterministic once roles are mapped.\n- **Layer 2 — Graded conformance.** Enforce the brand's structural law where it does **not** fight\n the source composition: kill every hard `avoid` / `denied` violation (non-negotiable), then apply\n the applicable structural rules (proportion, safe-area margins, kicker-as-pill, card shadow,\n signature device, size thresholds). A rule that would require re-laying-out the piece is\n out-of-scope — flag it (→ resize), don't force it.\n\nThe brand's `avoid` list is the floor: **no restyle ships with a hard `avoid` violation**, even if\nevery axis scores ≥ 8.\n\n**Bound designs re-theme in one write.** Read `getProps(id, ['bindings'])` on the blocks first: a\nleaf bound to a scene variable (`'fill.color': 'accent'`, `'text.font': 'display'`) refuses a\ndirect write (`DESIGN.PROPERTY_BOUND`) — set the variable instead, and every block bound to it\nfollows: `setProps(scene, { variables: { accent: { color: TOKEN }, display: { font: { family } } } })`.\nWhen the brief asks for a design that switches between brands or schemes, build it that way: one\ncolour or font variable per role token, each role's blocks bound to it\n(`{{skill:templates}}`); the switch is then one `variables` write per scheme, or one value set per\nscheme that `activeValueSet` picks. A design with bindings but no `variables` was saved before\nvariables were kept: write every bound variable.\n\n## Role → token map\n\nClassify by measurable role (as in the localize skill's block classification), then map:\n\n| Source block role | Brand token (from `tokens.json`) |\n| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| full-bleed background | chosen `colorSchemes.approved[].background` |\n| headline / display / big number | `typography.display` family; text = scheme `text` (or `primary-foreground` on a colour field); **respect `headlineWeight`** — never exceed the brand's weight _at that size_ (a `typography.display.weightRule` may vary it by size) |\n| subline / lead / body | `typography.body` family; text = scheme `text` or `muted-foreground` |\n| the single focal moment (one accent) | scheme `accent` / `semanticColors.primary` — **one per piece**, but the `avoid` list wins (see the trap below): on a full-bleed brand-colour scheme the accent role often has **no valid target** — drop it, the field is the moment |\n| eyebrow / kicker | `elements.kicker` (pill shape + its text colour) — not a bare coloured label |\n| divider / rule | `elements.divider` (hairline) — never a coloured/second-colour stroke |\n| card / panel / tile | `shape` corner radius + `elevation` shadow — never a flat bordered box |\n| CTA | `elements.button` **only on interactive/mockup media**; on static media a CTA is text/URL |\n| logo / wordmark | `logo.variantsByBackground` picked by the chosen background — exact bundled SVG only; if the asset is `$meta.gaps`-flagged (trademark-locked / not fetched), skip or placeholder it, never invent/redraw |\n| monochrome icon | recolour its ink to the role colour (`reference/asset-loading.md`) |\n| photographic / product media | keep; grade per `imagery` if the brand specifies; never tint to a banned colour |\n\nWhere the source has no block for an optional brand element (device, kicker), the conformance pass\n_may_ add it if it fits; where the brand kit lacks an optional token, skip that rule (graceful\ndegradation — `reference/brandkit-spec.md`).\n\n**The scheme-accent trap — `avoid` overrides the scheme.** A `colorSchemes.approved` entry may list\nan `accent` the `avoid` list forbids in the context you're applying it (e.g. IMG.LY's `indigo-moment`\nlists a mint accent, but `avoid` bans mint text on an indigo field). When the scheme's accent and\nthe `avoid` list conflict, **the `avoid` list wins**: apply **no** accent and let the full-bleed\nfield be the moment. Do not add a mint (or any denied) accent just because the role map has an\n\"accent\" row — an empty accent role is correct here.\n\n**Non-hero archetypes.** The role map is written for a headline+subline hero, but many designs aren't\none — a quote card is eyebrow / quote-as-display / attribution-caption with no \"lead\". Map by the\n_nearest_ role (quote → `typography.display`; attribution → `typography.body`/caption) and ignore\nrows with no matching block; don't invent a subline to satisfy `typography.pairing`.\n\n## Workflow\n\n1. **Load & validate the brand kit.** Parse `tokens.json`; read `avoid` + skim `do-dont/`. Resolve\n<!-- requires:asset_add -->\n every needed font to a fetchable URI and `asset_add` the logo SVG(s) — **`reference/asset-loading.md`**;\n a file `tokens.json` names by URI already is one: use it as it is, no `asset_add`.\n<!-- /requires:asset_add -->\n<!-- unless:asset_add -->\n every needed font and the logo SVG(s) to fetchable URIs — **`reference/asset-loading.md`**.\n<!-- /unless:asset_add -->\n<!-- requires:export -->\n2. **Read the source, and export it.** The design resolved in Inputs is the reference — its geometry\n and copy are what the restyle preserves. `preview` it now and `export({ format: 'imgly' })` it:\n that render is the only source render the parity diff in step 7 will have, and that file is the\n un-branded original.\n<!-- requires:import -->\n Then `import({ source: { uri: SOURCE_URI } })` — restyle the copy, never the source.\n<!-- /requires:import -->\n<!-- /requires:export -->\n<!-- unless:export -->\n2. **Read the source.** The design resolved in Inputs is the reference — its geometry\n and copy are what the restyle preserves. `preview` it now, before any change: that render is\n the only source render the parity diff in step 7 will have.\n<!-- /unless:export -->\n3. **Capture source roles + style.** Walk the scene; classify blocks by role; read each block's\n current colour / font / geometry (see routine).\n4. **Pick one approved scheme** per piece (per `backgroundSelection`); pick the logo variant by the\n chosen background.\n5. **Layer 1 — Restyle.** For each block set the brand token for its role — recolour,\n refont (unique `typeface.name`), apply radius/shadow/accent, swap the logo. **Re-map the accent\n runs in the same write** — a font/size change auto-reshapes with ranges preserved, but the\n whole-block role colour flattens per-character colour, so the accent runs go back on as\n `text.ranges` in that same `setProps`. Geometry untouched.\n6. **Layer 2 — Graded conformance.** Fix every hard `avoid`/`denied` violation; apply the structural\n rules that fit the source (proportion ~ the brand's ratio, safe-area margins, kicker pill, card\n shadow, device placement, size thresholds). Flag any layout-level need as out-of-scope (→ resize).\n7. **Judge against the source** — a restyle is a **source-derived variant**: diff this render\n against the source render you captured in step 2. Copy, geometry, and composition must be the\n<!-- requires:import -->\n<!-- requires:open -->\n source's; only the style layer moved. (Lost that render? `export({ format: 'imgly' })` the\n restyle for its `uri`, `open` the source, `preview` it, then `open` the restyle's `uri` to\n return.) Then run the `judge` skill with the brand `avoid`/`do-dont`\n<!-- /requires:open -->\n<!-- unless:open -->\n<!-- requires:version -->\n source's; only the style layer moved. (Lost that render? `preview({ design: '<source design>' })`\n it, then carry on with the restyle by its own `design`.) Then run the `judge` skill with the\n brand `avoid`/`do-dont`\n<!-- /requires:version -->\n<!-- unless:version -->\n source's; only the style layer moved. (Lost that render? Save the restyle first —\n `export({ format: 'imgly' })` — then `import` the saved source, `preview` it, and `import` the\n restyle's `uri` back; its next save is a new file, so report that `uri`.) Then run the `judge`\n skill with the brand `avoid`/`do-dont`\n<!-- /unless:version -->\n<!-- /unless:open -->\n<!-- /requires:import -->\n<!-- unless:import -->\n source's; only the style layer moved. Then run the `judge` skill with the brand `avoid`/`do-dont`\n<!-- /unless:import -->\n added to the criteria; contrast ≥ 4.5:1 after every recolour. Fix anything < 8 or any hard\n violation.\n<!-- requires:export -->\n<!-- requires:drafts -->\n8. **`loadResources` → `preview` → `export`.** Preview the restyle — wrong face, lost colour, low\n contrast, and a banned tell only show in the render. Then `export({ format: 'imgly' })`: that\n file is the branded edition to hand over (the copy itself is saved as you edit it). Report\n both `uri`s — original and restyle.\n<!-- /requires:drafts -->\n<!-- unless:drafts -->\n8. **`loadResources` → `preview`.** Preview the restyle — wrong face, lost colour, low\n contrast, and a banned tell only show in the render. The restyle is kept as you edit it;\n `export({ format: 'imgly' })` returns its `uri`. Report both `uri`s — original and restyle.\n<!-- /unless:drafts -->\n<!-- /requires:export -->\n<!-- unless:export -->\n8. **`loadResources` → `preview`.** Preview the restyle — wrong face, lost colour, low\n contrast, and a banned tell only show in the render. The product keeps the restyle after every\n successful `edit`; there is nothing to save.\n<!-- /unless:export -->\n\nDry-run the conformance checklist (below) against each render before reporting done.\n\n## The restyle routine\n\n<!-- requires:export -->\nLayer-1 as a CoDesign `edit`, run on the copy of the source. It classifies, maps role →\n<!-- /requires:export -->\n<!-- unless:export -->\nLayer-1 as a CoDesign `edit`, run on the source. It classifies, maps role →\n<!-- /unless:export -->\ntoken, and recolours/refonts with the accent re-map guard. It is a **judgment-driven\nfirst pass** (the role classification and the focal-moment choice need your eye), not a blind\ntransform. Adapt the classification to the design; fill `SCHEME` and the font URIs from the kit\n(resolve fonts per `reference/asset-loading.md`).\n\n**Capture the source's roles + current style** (run on the source page):\n\n```js\nconst [page] = await engine.design.findByType('page');\nconst out = [];\nconst read = async (id) => {\n const p = await engine.design.getProps(id, [\n 'type',\n 'width',\n 'height',\n 'position',\n 'opacity'\n ]);\n const r = {\n id,\n type: p.type, // the SHORT name: 'text', 'graphic', 'page'\n x: Math.round(p.position.x),\n y: Math.round(p.position.y),\n w: Math.round(p.width),\n h: Math.round(p.height),\n opacity: p.opacity\n }; // a \"faint\" block is usually low opacity, NOT low colour-alpha\n if (p.type === 'text') {\n const t = (await engine.design.getProps(id, ['text'])).text;\n r.s = t.string.slice(0, 20);\n r.color = t.color; // run 0 = the base style; per-run truth is text.ranges\n // the read carries its unit ('32px', always pixels) and writes straight back\n r.fs = (await engine.design.getProps(id, ['text.fontSize'])).text.fontSize;\n }\n out.push(r);\n for (const c of await engine.design.getChildren(id)) await read(c);\n};\nfor (const c of await engine.design.getChildren(page)) await read(c);\nconst pg = await engine.design.getProps(page, ['width', 'height']);\nreturn {\n type: 'text',\n text: JSON.stringify({ pw: pg.width, ph: pg.height, b: out }, null, 1)\n};\n```\n\n**Apply brand tokens to the source** (first pass, then conform + preview):\n\n```js\n// hex '#RRGGBB' -> CE.SDK 0-1 RGBA. See reference/asset-loading.md.\nconst rgba = (hex, a = 1) => ({\n r: parseInt(hex.slice(1, 3), 16) / 255,\n g: parseInt(hex.slice(3, 5), 16) / 255,\n b: parseInt(hex.slice(5, 7), 16) / 255,\n a\n});\nconst tf = (name, uri) => ({\n name,\n fonts: [{ uri, subFamily: 'Regular', weight: 'normal', style: 'normal' }]\n});\n\n// --- from the kit: the chosen approved scheme + resolved font URIs (unique names!) ---\nconst SCHEME = { background: '#FBFBFC', text: '#2E2E2F', accent: '#471AFF' };\nconst DISPLAY = {\n uri: '<opaque handle>',\n name: 'GT Walsheim Pro Medium'\n}; // headlineWeight only\nconst BODY = { uri: '<opaque handle>', name: 'Inter' };\n// A font swap changes the content area, so re-convert any target line-height from the NEW\n// font's metrics — not a fixed factor (design rules §6.1.3). Call after the font write; the\n// lineHeight write reshapes on its own, ranges preserved.\nconst setLineHeight = async (id, targetLH) =>\n await engine.design.setProps(id, { text: { lineHeight: { visual: targetLH } } });\n\nconst [page] = await engine.design.findByType('page');\nawait engine.design.loadResources([page]);\n// classify from the capture (background = full-bleed graphic; headline = largest text;\n// lead/body = remaining text; eyebrow = small text above headline; logo/media = image fills).\n\n// text: ONE write — font + size + role colour + the re-mapped accent ranges. The font/size\n// write auto-reshapes with ranges preserved, so there is no capture → reshape → replay dance;\n// the runs are read only because the whole-block role colour flattens per-character colour.\nconst setTextRole = async (id, font, hex, px, accentHex) => {\n const runs = (await engine.design.getProps(id, ['text.ranges'])).text.ranges; // NOT text.color — that is run 0 only\n await engine.design.setProps(id, {\n text: {\n font: { typeface: tf(font.name, font.uri), uri: font.uri },\n ...(px ? { fontSize: px + 'px' } : {}), // the unit is required\n color: rgba(hex), // role colour = the base style\n // When RE-branding, re-map the accent runs to the new brand's accent — replaying\n // r.color verbatim would keep the OLD brand's colour. The old face's typeface/style\n // are NOT replayed: the new family may not ship them.\n ranges: runs.slice(1).map((r) => ({\n from: r.from,\n to: r.to,\n color: accentHex ? rgba(accentHex) : r.color,\n ...(r.weight ? { weight: r.weight } : {})\n }))\n }\n });\n};\n// graphic fill (background / accent shape)\nconst setFillRole = async (id, hex) => {\n await engine.design.setProps(id, {\n fill: { type: 'color', color: { value: rgba(hex) } }\n });\n};\n// e.g.: await setFillRole(bgId, SCHEME.background);\n// await setTextRole(headlineId, DISPLAY, SCHEME.text);\n// await setTextRole(leadId, BODY, SCHEME.text);\n// await setTextRole(accentWordId, DISPLAY, SCHEME.accent); // the ONE accent moment\n<!-- requires:asset_add -->\n// logo: asset_add the variant SVG for this background (a file named by URI: that URI as is), set as image fill (asset-loading.md).\n<!-- /requires:asset_add -->\n<!-- unless:asset_add -->\n// logo: the variant SVG for this background, by a fetchable uri, set as image fill (asset-loading.md).\n<!-- /unless:asset_add -->\n\nawait engine.design.loadResources([page]);\nreturn {\n type: 'text',\n text: 'restyled — now run the conformance pass and preview'\n};\n```\n\n## Graded conformance pass (Layer 2)\n\nAfter the restyle, walk the render against the kit and fix — hard `avoid`/`denied` first\n(non-negotiable), then structural rules where they fit the source:\n\n- **Hard `avoid` / `denied`** (always fix): a second/accent colour used as a stroke, underline,\n divider, label, or icon (accent is a fill pop only); the accent colour as a button fill when the\n kit bans it; a headline in a banned weight; a flat bordered card with no shadow; the logo redrawn,\n recoloured, or the wrong background variant; a free-chosen colour or a `denied` scheme; a\n background that matches a placed photo's dominant hue.\n- **Proportion** — roughly the kit's neutrals/text/accent ratio (e.g. 70/20/10). If it reads\n \"colourful\", there's too much accent and too little neutral.\n- **Safe-area margins** — content inside the kit's outer margin; logo in its clear zone; nothing\n crowds an edge, the media, or the logo. If it doesn't fit, shrink the headline — never the subline.\n- **Elements** — eyebrow → pill kicker; divider → hairline; CTA → text/URL on static media (only a\n real button on interactive/mockup media, in the kit's button style).\n- **Wordmark vs preserved copy** — if the source's _copy_ already carries a **foreign brand** in the\n signature slot (a handle/URL for a different brand, kept because copy is preserved), don't overwrite\n it and don't imply the foreign brand is yours. Place the brand wordmark in a **non-competing**\n safe-area corner as the publisher mark, treat the foreign handle as attribution, or omit the\n wordmark — never stack two brands as co-equal marks.\n- **Device** (optional) — if the kit has a signature device and the composition has room, place it\n per its placement grammar (one per piece, bleed off one edge, atmosphere behind content).\n- **Size thresholds** — drop the wordmark for the symbol / drop the kicker below the kit's minimums\n rather than shrinking them illegibly.\n\nA fix that would require re-laying-out the piece (not just re-skinning) is **out of scope** — record\nit and recommend a resize.\n\n## Before reporting done\n\nRun the **brand conformance checklist** below against each render — **with the source render beside\nit** — then close with a `judge` run (the `judge` skill; a restyle is a source-derived variant, so\nits source-parity diff is a mandatory gate step, and the kit's `avoid` list is an extra scorecard\nrow on top of the axes). Score honestly — a surviving hard `avoid` violation is a fail, say so.\n\n### Brand conformance checklist\n\nAny \"no\" on an applicable line drops the axis below 8 (or, for the `avoid` rows, fails the restyle\noutright).\n\n**Source parity — what a restyle must NOT change**\n\n- [ ] **Copy verbatim** — every string is the source's string; nothing re-worded, shortened, or\n dropped to fit the new face. (Re-wording is `localize`.)\n- [ ] **Geometry held** — every block sits at its source position and size; the only moves are ones a\n named brand rule demanded (safe-area margin, kicker pill, size threshold), and you can name\n which rule for each\n- [ ] **Element inventory complete** — every source cluster (text, image, chip, icon, decoration) has a\n counterpart; nothing dropped, nothing invented to satisfy a role row\n- [ ] **Role parity** — the block that was the background is still the background, the one accent\n moment is still that block, the divider is still a divider. Values changed; roles didn't\n- [ ] **Hierarchy preserved** — the same dominant element, the same reading order; relative weight and\n size order across blocks matches the source (§6.3)\n- [ ] **Group hierarchy intact** — the restyle didn't flatten or re-nest the source's groups\n- [ ] **No re-wrap fallout** — the font swap didn't change any block's line count into an overflow,\n a collision, or a pushed neighbour (diff line counts against the source, not just positions)\n\n**Brand conformance — what a restyle must change**\n\n- [ ] **Zero hard `avoid` / `denied` violations** — no accent as structure (stroke/underline/divider/\n label/icon), no banned button or headline weight, no flat bordered card, no free-chosen colour,\n no `denied` scheme combination\n- [ ] **Logo untampered** — exact bundled SVG, the variant matching the chosen background, scaled\n proportionally; never redrawn, recoloured, or stretched; `$meta.gaps`-flagged assets skipped,\n not invented\n- [ ] **One approved scheme**, applied whole; the accent role empty where the `avoid` list forbids it\n on this field (the scheme-accent trap)\n- [ ] **Every role mapped to its token** — display family on headlines, body family on body, kicker as\n a pill, divider as a hairline, card radius + elevation; rows with no matching block skipped, not\n forced\n- [ ] **Proportion** ≈ the kit's neutrals/text/accent ratio; the piece doesn't read \"colourful\"\n- [ ] **Safe-area margins + logo clear zone** respected; nothing crowds an edge, the media, or the mark\n- [ ] **No competing marks** — a foreign brand preserved in the copy is attribution, not a co-equal\n lockup with the kit's wordmark\n\n**Craft / baseline**\n\n- [ ] **Fonts actually swapped** — unique `typeface.name` per typeface; every weight you set is\n declared in `typeface.fonts` (a variable TTF serves them all, one entry per weight)\n- [ ] **Accent colours survived the recolour** — the whole-block role colour flattens per-run\n colour, so every accent run went back on as a `text.ranges` entry in the same write; no block\n left at the engine default\n- [ ] **Contrast ≥ 4.5:1** for every text block on its actual background, checked after recolour\n- [ ] **Zero tofu** — the brand font covers every glyph in the preserved copy, checked in `preview`\n- [ ] Native export dimensions (the page's own pixel size)\n\n## No-goes / red flags\n\n- **Free-chosen colour** — a colour not from an approved scheme / a ramp step. Pick a scheme; move\n along a ramp for variation; never invent a hue.\n- **Accent used as structure** — the brand's accent (e.g. a mint/green) as a stroke, tick, underline,\n divider, label, or icon. Accent is a rare fill pop, not a co-lead.\n- **Banned button / weight** — a coloured button the kit forbids, a drawn button on static media, or\n a headline in a weight the kit doesn't ship.\n- **Logo tampering** — recreating, redrawing, recolouring, or stretching the wordmark, or the wrong\n background variant (dot vanishes on a matching fill). Exact bundled SVG only; scale proportionally.\n- **Role colour flattened the accent** — a whole-block `text.color` write collapses every run to\n the role colour. Re-apply the accent runs as `text.ranges` in the same `setProps`.\n- **Font not actually swapped** — a new URI under a reused `typeface.name` silently no-ops. Unique\n names; and declare every weight you set (a variable TTF needs one `fonts[]` entry per weight).\n- **Tofu** — brand font lacks a glyph in the copy; only `preview` catches it.\n- **Contrast fail** — text < 4.5:1 after recolour (esp. on a colour field). Re-pick the role colour.\n- **Geometry drift** — moving/re-flowing blocks in a restyle. This is not resize; hold the source\n geometry (conformance moves only what a brand _rule_ demands).\n- **Copy drift** — re-wording, shortening, or dropping a line because the brand face runs longer.\n Copy is held; fix the type (size within its band, measure, leading), never the text. Rewriting is\n `localize`'s layer, not this one.\n- **Re-wrap fallout** — the swapped face has different advance widths, so an auto-height block can\n re-wrap to a new line count, grow, and collide with or push a neighbour **without any block being\n moved**. Geometry looks held and the layout still broke. Diff line counts against the source after\n the refont, not just positions.\n- **Role inversion** — every value came from the kit, but a role moved: a rule recoloured into a\n second lead, a caption promoted to the accent moment, the background and card swapped. Values\n change in a restyle; roles don't.\n- **Judged in isolation** — scoring the restyle's own PNG without the source beside it. A restyle is\n a source-derived variant; the source-parity diff is a mandatory gate step (`judge`), not a\n nice-to-have.\n\n## Cross-references\n\n- **`reference/brandkit-spec.md`** — the brand-kit schema contract (required-core vs optional;\n graceful degradation) — the _target shape_.\n- **`reference/authoring.md`** — the intake mode: ingesting an external brand (PDF / URL / Figma /\n asset dump) into that shape — _how to reach it_.\n<!-- requires:asset_add -->\n- **`reference/asset-loading.md`** — font-URI resolution (CDN + local-TTF → the returned `uri` bridge),\n<!-- /requires:asset_add -->\n<!-- unless:asset_add -->\n- **`reference/asset-loading.md`** — font-URI resolution,\n<!-- /unless:asset_add -->\n hex → RGBA, logo SVG placement, icon recolour, colour-fill mechanics.\n- design rules §6.1–§6.5 — the general typography / colour / hierarchy / composition / craft\n thresholds this skill applies through a brand's values; and the `api` skill's engine mechanics\n (the `text.font` declaration, fill specs, auto-reshape, `loadResources`, content-area\n line-height conversion §6.1.3, pixel font sizes).\n- **`judge`** — the acceptance gate; a restyle is judged as a **source-derived variant** (preview the\n source, diff the two renders), with the brand's `avoid` list added to the criteria as its own\n scorecard row.\n- **`localize`** — translate a design (snap geometry); **`resize`** — reformat a design\n (re-derive geometry). Brand is the third surgery (swap the style layer).\n",
17
17
  "docs/brand/reference/asset-loading.md": "# Brand-asset loading (CoDesign / CE.SDK)\n\nReference for the `brand` skill. Read this before the restyle routine — every restyle needs a\nfetchable font URI, a colour conversion, and (usually) the wordmark placed. Mechanics verified\nagainst this server.\n\n## 1. Fonts — resolve every brand font to a fetchable URI\n\n<!-- requires:asset_add -->\nA font write — `setProps(id, { text: { font: { typeface, uri } } })` — takes **one `uri`** that\nmust resolve to a **single, complete, static-or-variable TTF**, over a **fetchable source only** (an\n`https://` URL, or a `uri` from `asset_add` — local `file:` paths are rejected when the scene is\nsaved, and a `data:` URI is kept only by a host with an asset source that takes uploaded files). The\n`typeface` is `{ name, fonts:[{ uri, subFamily, weight, style }] }`.\n<!-- /requires:asset_add -->\n<!-- unless:asset_add -->\nA font write — `setProps(id, { text: { font: { typeface, uri } } })` — takes **one `uri`** that\nmust resolve to a **single, complete, static-or-variable TTF**, over a **fetchable source only** (an\n`https://` URL — local `file:` paths are rejected when the scene is saved, and a `data:` URI is\nkept only by a host with an asset source that takes uploaded files). The `typeface` is\n`{ name, fonts:[{ uri, subFamily, weight, style }] }`.\n<!-- /unless:asset_add -->\n\n<!-- requires:asset_add -->\n**A saved style's files are already in the store.** When `tokens.json` names a font, logo, icon\nor image by URI rather than by a path in the kit's folder, that URI is fetchable as it is: put it in\n`font.uri` and every `typeface.fonts[].uri`, or in the image fill, without bringing the file in again. The rest\nof this section is for a kit whose files are paths in its folder.\n<!-- /requires:asset_add -->\n\nTwo sources, in order of preference:\n\n**A. On a public CDN (OFL / Google-hosted families — Inter, Roboto, Montserrat, …):** use the\n`https://` URI directly, exactly as `{{skill:localize#reference/font-loading.md}}` does (jsDelivr\n`https://cdn.jsdelivr.net/gh/google/fonts@main/ofl/<dir>/<File>.ttf`), or look the family up by\nname (`text.font: { family }`). No bridge needed. Most brands' **body** font resolves\nthis way (the IMG.LY kit's Inter does).\n\n<!-- requires:asset_add -->\n**B. Proprietary / not-on-a-CDN (e.g. GT Walsheim):** pass the bundled font file straight to\n`asset_add` — it accepts `.ttf`, `.otf`, `.woff` and `.woff2` alongside images, and returns the\n`uri` to use:\n\n<!-- unless:asset_add.upload -->\n```js\n// asset_add({ source: { path: '<kit>/fonts/<Font>.ttf' } })\n// -> { uri: '<opaque handle>', kind: 'font', ... }\n```\n<!-- /unless:asset_add.upload -->\n<!-- requires:asset_add.upload -->\nThis server runs away from your machine and cannot read a path on it, so a kit file — a font, a\nlogo, an icon — comes in by upload: declare it, PUT its bytes, then use the `uri`.\n\n```js\n// asset_add({ source: { upload: { name: '<Font>.ttf', type: 'font/ttf', size, sha256 } } })\n// -> { uri: '<opaque handle>', url, headers, expiresAt }\n// PUT the file's exact bytes to `url` with exactly `headers`, before `expiresAt`.\n```\n<!-- /requires:asset_add.upload -->\n\nThen `setProps(id, { text: { font: { typeface: tf('<Brand Display Name>', uri), uri } } })` — the\nreturned `uri` goes in BOTH places: `font.uri` and every `typeface.fonts[].uri`. That handle is a sanctioned,\npersistable scheme, so the saved `design.imgly` stays loadable (the bytes are in the store). Never\nhand-copy files into the workspace store: `asset_add` content-addresses them for you, and a\n<!-- unless:asset_add.upload -->\nhand-placed file with the wrong hash is unreachable. On a hosted CoDesign server (no disk access,\nso no `{ path }` arm), host the proprietary font at an `https://` URL instead and use that.\n<!-- /unless:asset_add.upload -->\n<!-- requires:asset_add.upload -->\nhand-placed file with the wrong hash is unreachable.\n<!-- /requires:asset_add.upload -->\n<!-- /requires:asset_add -->\n<!-- unless:asset_add -->\n**B. Proprietary / not-on-a-CDN (e.g. GT Walsheim):** look the family up by name if one of this\ndeployment's typeface sources carries it; otherwise it needs an `https://` URL. A font file cannot be\nbrought in from here — if neither exists, ask for one rather than substituting a face.\n<!-- /unless:asset_add -->\n\n### Weights from a variable file\n\nA variable TTF gives **every weight you declare**: list each one as its own `typeface.fonts` entry,\nall pointing at the same file (`{ uri, subFamily: 'Bold', weight: 'bold', style: 'normal' }`), and\nthe engine draws that weight. A typeface that declares one entry has only that weight — asking for\nanother fails with \"Failed to find a font with the specified weight\". The IMG.LY kit ships **no Bold GT Walsheim on purpose** (`headlineWeight` = 500\nMedium); honour that — never fake a heavier weight.\n\n### Font-write gotchas (script-agnostic)\n\n- **Unique `typeface.name` per distinct face.** CE.SDK treats two typefaces with the same `name` as\n identical and skips the reload — a new URI under a reused name **silently no-ops** and the old\n font stays. Give the brand faces distinct names (`\"GT Walsheim Pro Medium\"`, `\"Inter\"`).\n- **A font, size or line-height write reshapes on its own, ranges preserved.** A whole-block\n `text.color` write flattens per-character colour, so read `text.ranges` first and re-map the\n accent runs in the same write (§2); `text.color` reads run 0 only.\n- **Await before you measure or capture:** `await engine.design.loadResources([page])`;\n `(await engine.design.measure(id)).width > 0` is the \"loaded + shaped\" signal (`width` is 0 in\n Auto mode).\n- **Always `preview`.** A missing-glyph tofu or a silent sans fallback only shows in the render.\n\n## 2. Colour — hex → CE.SDK 0-1 RGBA\n\nCE.SDK colours are **0-1 floats**, not 0-255 and not hex. Brand kits author hex, so bridge:\n\n```js\nconst rgba = (hex, a = 1) => ({\n r: parseInt(hex.slice(1, 3), 16) / 255,\n g: parseInt(hex.slice(3, 5), 16) / 255,\n b: parseInt(hex.slice(5, 7), 16) / 255,\n a\n});\n// '#471AFF' -> { r:0.278, g:0.102, b:1, a:1 }\n```\n\nTwo writes:\n\n- **Text:** `await engine.design.setProps(id, { text: { color: rgba('#2E2E2F') } })` (whole block) or\n `text: { ranges: [{ from, to, color }] }` for a character range (e.g. one accent word).\n- **Shape / background fill (graphic block):**\n\n ```js\n await engine.design.setProps(graphicId, {\n fill: { type: 'color', color: { value: rgba('#FBFBFC') } }\n });\n ```\n\n A flat page colour is `setProps(page, { background: color })`; anything richer is a full-bleed\n `graphic`, appended back-most.\n\n**Border at N% alpha** (kits express e.g. \"border = ink @ 16%\"): set the fill/stroke colour's `a`\nto the fraction (`rgba('#2E2E2F', 0.16)`).\n\n## 3. Logo — place the wordmark SVG\n\n<!-- requires:asset_add -->\nA logo `tokens.json` names by URI is placed by that URI as it is, without bringing the file in again.\n<!-- /requires:asset_add -->\n\n<!-- requires:asset_add -->\n`asset_add` **accepts SVG** (and png/webp/jpg/gif). Bring the exact bundled variant in<!-- requires:asset_add.upload --> by upload, as a font file (§1 B; `type: 'image/svg+xml'`)<!-- /requires:asset_add.upload -->, then set it as\n<!-- /requires:asset_add -->\n<!-- unless:asset_add -->\nThe logo needs a fetchable `uri` — an `https://` URL to the exact bundled variant. Set it as\n<!-- /unless:asset_add -->\nan image fill on a graphic block sized to the logo's aspect (IMG.LY wordmark = 142×30 ≈ 4.7:1):\n\n```js\n<!-- requires:asset_add -->\n// asset_add returns { uri:'<opaque handle>', ... } — embed uri, never httpUrl\n<!-- /requires:asset_add -->\n<!-- unless:asset_add -->\n// LOGO_URI: a fetchable uri for the exact bundled variant\n<!-- /unless:asset_add -->\nconst logo = await engine.design.create(\n {\n type: 'graphic',\n props: {\n width: 220,\n height: 46.5,\n shape: 'rect',\n contentFill: { mode: 'Contain' }, // keep aspect; never stretch a logo\n fill: { type: 'image', uri: LOGO_URI } // create awaits the load\n }\n },\n { parent: page }\n);\n```\n\n**Pick the variant by the chosen background** (`logo.variantsByBackground`): the ink/dark-letter\nvariant on light, the white variant on a light photo, the all-white/`-mono` variant on a brand-colour\nor dark fill (a variant whose dot is baked to the brand colour disappears on a matching fill). Use\nthe **exact bundled SVG** — never recolour, redraw, or recreate the wordmark or its dot; to suit a\ndifferent background pick a different file.\n\n## 4. Icons — recolour the monochrome set\n\nBrand icons usually ship as monochrome SVG with a single fixed ink hex (the IMG.LY set uses\n`#282F35` and `#2E2E2F`). Rebuild the icon from its paths in the design instead of placing the\nfile: read the SVG's text (it is small) and run this block inside an `edit`. Each `<path>` becomes a\n`vector_path` graphic in one group named `NAME` (its id is `icon`), with the ink — fill or stroke —\nset to `INK` and any white kept white, so it stays vector and sharp at every size. It refuses\nanything that is not a monochrome path icon (masks, clip paths, gradients, several inks,\ntransforms):\n<!-- requires:asset_add -->\nplace that file unchanged with `asset_add` and an image fill (§3).\n<!-- /requires:asset_add -->\n<!-- unless:asset_add -->\nuse it only in a colour variant the kit hosts at an `https://` URL (§3) — never redraw one.\n<!-- /unless:asset_add -->\nFor several icons in one edit, wrap each run of the block, first line included, in its own `{ … }`.\n\n<!-- prettier-ignore -->\n```js\n// icon.js — part of an edit; first line: const SVG = `<the icon file's text>`, INK = '#471AFF', NAME = 'icon/search', PARENT = <page or group id>, BOX = { x: 96, y: 96, size: 48 };\nconst src = SVG.replace(/<!--[\\s\\S]*?-->/g, '');\nconst attrs = (tag) => Object.fromEntries([...tag.matchAll(/([\\w:-]+)=\"([^\"]*)\"/g)].map((m) => [m[1], m[2]]));\nconst refuse = (why) => {\n throw new Error(`icon.js: ${why} — not a monochrome icon; place the file unchanged as an image fill (§3), never recolour it`);\n};\nconst root = attrs(/<svg\\b[^>]*>/.exec(src)?.[0] ?? refuse('no <svg> element'));\nconst [vx, vy, vw, vh] = (root.viewBox ?? `0 0 ${parseFloat(root.width)} ${parseFloat(root.height)}`).split(/[\\s,]+/).map(Number);\nif (vx || vy || !(vw > 0) || !(vh > 0)) refuse(`viewBox \"${root.viewBox}\"`);\nconst extra = /<(mask|clipPath|linearGradient|radialGradient|pattern|filter|image|text|use|rect|circle|ellipse|line|polyline|polygon)\\b/.exec(src);\nif (extra) refuse(`<${extra[1]}>`);\nfor (const g of src.match(/<g\\b[^>]*>/g) ?? []) if (Object.keys(attrs(g)).some((k) => k !== 'id')) refuse(`styled group ${g}`);\nconst paths = (src.match(/<path\\b[^>]*>/g) ?? []).map(attrs);\nif (!paths.length) refuse('no <path>');\nconst styled = paths.flatMap(Object.keys).find((k) => /^(transform|opacity|fill-opacity|stroke-opacity|style|stroke-dasharray)$/.test(k));\nif (styled) refuse(`path attribute ${styled}`);\nconst isWhite = (c) => /^(white|#fff|#ffffff)$/i.test(c);\nconst fillOf = (p) => p.fill ?? root.fill ?? 'black';\nconst strokeOf = (p) => p.stroke ?? root.stroke ?? 'none';\nconst inks = new Set(paths.flatMap((p) => [fillOf(p), strokeOf(p)]).filter((c) => c !== 'none' && !isWhite(c)).map((c) => c.toLowerCase()));\nif (inks.size > 1) refuse(`${inks.size} ink colours (${[...inks].join(', ')})`);\nconst rgba = (hex) => {\n const h = hex.length === 4 ? hex.slice(1).replace(/./g, '$&$&') : hex.slice(1);\n return { r: parseInt(h.slice(0, 2), 16) / 255, g: parseInt(h.slice(2, 4), 16) / 255, b: parseInt(h.slice(4, 6), 16) / 255, a: 1 };\n};\nconst paint = (c) => rgba(isWhite(c) ? '#FFFFFF' : INK);\nconst k = BOX.size / Math.max(vw, vh);\nconst JOIN = { miter: 'Miter', round: 'Round', bevel: 'Bevel' };\nconst icon = await engine.design.create(\n {\n type: 'group',\n name: NAME,\n children: paths.map((p) => ({\n type: 'graphic',\n props: {\n shape: { type: 'vector_path', vector_path: { path: p.d, width: vw, height: vh, fillRule: p['fill-rule'] === 'evenodd' ? 'EvenOdd' : 'NonZero' } },\n width: vw * k,\n height: vh * k,\n position: { x: BOX.x, y: BOX.y },\n fill: fillOf(p) === 'none' ? null : { type: 'color', color: { value: paint(fillOf(p)) } },\n ...(strokeOf(p) === 'none'\n ? {}\n : { stroke: { enabled: true, color: paint(strokeOf(p)), width: parseFloat(p['stroke-width'] ?? '1') * k, position: 'Center', cornerGeometry: JOIN[p['stroke-linejoin'] ?? 'miter'] } })\n }\n }))\n },\n { parent: PARENT }\n);\n```\n\nWatch the kit's exceptions: two-tone marks keep an intentional white knockout (the block recolours\nthe ink and leaves the white); full-colour logo icons must **not** be flattened (the block refuses them). Keep icons monochrome, one ink\nper context, on the 24px grid — never gradients/shadows, and don't mix in a third-party icon set.\n\n## 5. Kicker pill (eyebrow → pill badge)\n\nA brand's `elements.kicker` is usually a pill badge, not a bare label. Build it on the **eyebrow text\nblock itself** via its text background — no separate shape needed:\n\n```js\nconst rgba = (hex, a = 1) => ({\n r: parseInt(hex.slice(1, 3), 16) / 255,\n g: parseInt(hex.slice(3, 5), 16) / 255,\n b: parseInt(hex.slice(5, 7), 16) / 255,\n a\n});\n// pill must HUG the glyphs → Auto width/height, else the background spans\n// the block's old fixed width (a full-width bar, not a pill).\nawait engine.design.setProps(kickerId, {\n widthMode: 'Auto',\n heightMode: 'Auto',\n backgroundColor: {\n enabled: true,\n color: rgba('#FFFFFF', 0.12), // subtle fill or an outline\n cornerRadius: 999, // full pill\n paddingLeft: 16,\n paddingRight: 16,\n paddingTop: 8,\n paddingBottom: 8\n }\n});\n```\n\nText stays normal-case, ~`text-xs`, in the kit's kicker text colour (ink / muted / brand — never an\naccent-as-structure colour). For an outline pill, use a transparent fill + the stroke properties;\nkeep the fill subtle so it reads as a badge, not a button.\n\n## 6. Block opacity ≠ colour alpha\n\nA \"faint\" or ghost element (an oversized decorative quote, a watermark) is usually **block opacity**,\nnot a low colour-alpha. Its colour can read fully opaque while it still renders faint. Capture\n`(await engine.design.getProps(id, ['opacity'])).opacity` alongside the colour, and re-apply it\n(`setProps(id, { opacity })`) after recolouring, or the ghost comes back at full strength and\ncompetes with the headline.\n\n## 7. Order of operations (avoids the common failures)\n\n<!-- requires:asset_add -->\n1. Resolve fonts (CDN URI or workspace bridge) and `asset_add` the logo/icon SVGs **before** the edit.\n<!-- /requires:asset_add -->\n<!-- unless:asset_add -->\n1. Resolve fonts and the logo/icon SVGs to fetchable URIs **before** the edit.\n<!-- /unless:asset_add -->\n2. In the edit: recolour fills → one text write per block (font + size + colour + re-mapped accent\n ranges) → position → `await engine.design.loadResources([page])`.\n3. `preview` — verify the real face rendered (not a fallback), colour survived the reshape, contrast\n holds, the logo dot reads, and no tofu.\n",
18
18
  "docs/brand/reference/authoring.md": "# Authoring a kit — ingesting an external brand into the canonical shape\n\nReference for the `brand` skill. This is the **intake** step: when the kit the user pointed you at is\n**not** already a canonical `<kit>/` folder — it's a brand guidelines PDF, a website /\nURL, a Figma file, or a raw asset dump — **scaffold a canonical kit first**, then apply. The output\nis a validated `<kit>/` (`tokens.json` + `BRAND.md` + real assets + optional `do-dont/`)\nthat the rest of the skill can read. The **target shape** and every field's meaning live in\n`reference/brandkit-spec.md`; this file is **how you get there** from messy source material.\n\n## When to scaffold vs apply directly\n\n- the kit the user pointed you at is a `<kit>/` with a valid `tokens.json` (required-core complete)\n → apply directly (main workflow).\n- the kit the user pointed you at is anything else (a `.pdf`, an `http(s)://` URL, a Figma file/URL,\n a folder/zip of assets, loose prose + screenshots), **or** a `<kit>/` whose `tokens.json` is missing\n or fails the required-core → **scaffold first** (below), announce the new folder, then apply.\n\n## The two disciplines (read before extracting)\n\n1. **Exact over inferred.** Prefer machine-exact sources: CSS custom properties / design-system\n tokens, Figma variables, a stated hex / Pantone / CMYK. Fall back to sampling a swatch or an\n image only when nothing exact exists, and **say so** (a sampled colour is provisional).\n2. **Never invent — omit and flag.** Where the source is silent on an **optional** section (no dark\n theme, no print CMYK, no stated accent proportion, no signature device), **leave that section\n out** and record it under `$meta.gaps` (a list of \"not specified by the source — needs\n confirmation\"). Do not fabricate a value to fill the schema. The required-core must be real; an\n optional section absent-and-flagged is correct.\n\n **Hard-stop on the `avoid` list.** The `avoid` list is the highest-leverage and hardest-to-extract\n section (it's what a mis-generated piece does that this brand never does). Draft it from the\n source's explicit don'ts + the brand's own usage, then **stop and confirm the draft with the\n user** before finalizing the kit. Everything else is infer-and-flag; the `avoid` list is\n confirm-before-write. **Shape while unconfirmed:** keep the real `avoid` key **absent** (it must\n stay a flat `string[]` for validators — don't write a `{_status, draft}` object into it); hold the\n draft in **`$meta.avoidDraft`** (a `string[]`, each line tagged SOURCED vs INFERRED) plus a\n `$meta.gaps` entry \"avoid list drafted, needs confirmation\". On confirmation, move the lines into\n the flat `avoid` array.\n\n## Extraction by source form\n\n### A. Brand guidelines PDF (the classic brand book)\n\nRead the pages (the `Read` tool renders PDF). Pull, in priority order:\n\n- **Colour** — the palette page(s): named colours with **hex / Pantone / CMYK / RGB**. Build the\n ramps in `colorPrimitives`; map the \"primary / text / background / accent\" callouts to\n `semanticColors` roles. A colour shown only as an ink swatch with no value → sample + flag.\n- **Type** — families, weights, and especially the **heading weight rule** (`headlineWeight`) and any\n \"never use weight X for headings\" ban. Roles/sizes if a type-scale page exists.\n- **Logo** — the variants (mono / reversed / on-photo), **clear space**, **min size**, and the\n \"logo don'ts\" page → `logo.variantsByBackground` + `logo.avoid`.\n- **The do/don't spreads** — the richest source for the `avoid` list and `colorSchemes.denied`.\n- Voice / tone pages → `voice`.\n\n### B. Website / URL (best when the site is a design system)\n\n`WebFetch` the site (and its CSS if reachable). **Prefer the design system's published token\npackage / source repo over the rendered docs site** — the docs pages often truncate under fetch and\nbrand pages may 403, whereas the token source is exact and complete (e.g. Carbon's colours/themes/type\nlive in `@carbon/*/src` on GitHub, not the rendered `carbondesignsystem.com`). Pull:\n\n- **Colour** — CSS custom properties (`--color-*`, often authored in **OKLCH** or hex) are exact.\n The IMG.LY reference kit was derived exactly this way (`custom-colors.css` → `colorPrimitives`,\n `starwind.css` `:root`/`.dark` → `semanticColors.light`/`.dark`).\n- **Type** — `@font-face` / the fonts config → families + weights; the CSS heading rules →\n `headlineWeight` and the type scale.\n- **Logo / assets** — the SVG wordmark(s) and favicons served by the site.\n- **Voice** — real page copy → `voice.exemplars` + `voice.principles`; the site's own writing\n guidelines if published.\n- Caveat: a site usually ships **Latin-subset WOFF2**, not a full TTF — see Fonts below.\n\n### C. Figma file (via the Figma MCP)\n\nUse the Figma MCP (load the `figma-use` skill first). `get_variable_defs` / `get_design_context`\nreturn **exact** token values:\n\n- Colour/number/string **variables** → `colorPrimitives` + `semanticColors` (Figma modes map to\n light/dark); text styles → `typography.roles`; effect styles → `elevation`; corner radii →\n `shape`. Components named \"logo\", \"button\", \"badge/kicker\" → `logo` / `elements`.\n- Exact values, no sampling — the highest-fidelity source when available.\n\n### D. Raw asset folder / zip + loose prose / screenshots (heaviest inference)\n\nInventory the folder (`ls`/`Read`): fonts (`.ttf`/`.otf`/`.woff2`), logo files, any `colors`/\n`swatches`/`tokens` file, imagery. Parse any prose brand notes. Infer roles from filenames + how\nassets are used; sample colours from screenshots only as a last resort. This form produces the most\n`$meta.gaps` entries — flag generously and confirm.\n\n## Mapping to `tokens.json`\n\nFill in this order (definitions: `reference/brandkit-spec.md`):\n\n1. **Required-core first** — `colorPrimitives` (hex minimum), `semanticColors` role map,\n `typography.display`/`.body` + `headlineWeight`, `logo`, and the `avoid` list (drafted to\n `$meta.avoidDraft` until confirmed, per the hard-stop above). A required-core _field_ that can't be\n sourced means **stop** (say what's missing) — but a `logo`/`device` _asset_ that can't be fetched\n or is trademark-locked is **not** a blocker: record the real logo _rules_, put the missing asset in\n `$meta.gaps` with a placeholder path, and the kit is still **scaffold-complete** (see\n `brandkit-spec.md` → completeness levels). **`headlineWeight`** is a scalar for a fixed-weight\n brand, or `typography.display.weightRule` + a dominant `headlineWeight` for a size-responsive\n design system — don't lossily flatten a per-size rule into one number without recording the rule.\n2. **Optional sections the source supports** — `colorSchemes` (approved triples + denied combos +\n proportion), `elements`, `shape`, `elevation`, `device`, `safeArea`/`layout`/`spacing`/\n `composition`, `imagery`, `motion`, `voice`, `sizeThresholds`. Omit any the source doesn't state\n (→ `$meta.gaps`). **Product design systems** (Carbon, Material) ship _themes_ (light/dark), not\n marketing `(bg,text,accent)` triples: map each theme to an approved scheme from its\n `semanticColors`, and accept that there is **no** `proportion` or `denied` list to find — omit and\n flag, never invent a ratio.\n3. **`$meta`** — `name`, `source` (where it came from), `colorNote` (OKLCH-authoritative? sampled?),\n and `gaps` (the flagged omissions).\n\nThen write **`BRAND.md`** as the prose companion (identity, per-section usage rules, do/don't), and\ndrop the real assets into the subfolders.\n\n## Fonts — the subset trap\n\nA brand's site/PDF often only exposes a **Latin-subset WOFF2** (or an outlined logo), not a full\nTTF. `setFont` needs a complete static-or-variable TTF (`reference/asset-loading.md`). So:\n\n- **Prefer the full font from the foundry / Google Fonts** (OFL families resolve to a CDN URI\n directly). Get the real family, not the site's subset.\n- **Proprietary display faces** (a foundry-licensed brand font) may not be obtainable as a full TTF\n — bundle whatever the brand supplies, record it under `$meta.gaps` as \"display font needs full-TTF\n provisioning\", and flag that headlines may fall back until it's provided. Note the licensing (many\n brand fonts are internal-use-only — private-repo bundling, not redistribution).\n\n## do-dont/ (optional)\n\nIf the source's don'ts are concrete, render the target DO/DON'T pairs (a small HTML → PNG, in the\nbrand's real fonts/colours) so future applies can pattern-match. If time-boxed, create the folder\nwith a `README` listing the intended pairs and leave rendering for later. Never block the kit on it.\n\n## Validate, then apply\n\nRun the new `<kit>/` through `reference/brandkit-spec.md`. **Scaffold-complete** (the\ningestion goal): every required-core _field_ is real, `$meta.gaps` records every omission (flagged\nplaceholder assets are fine), the `avoid` draft is in `$meta.avoidDraft` awaiting confirmation.\n**Apply-complete** (needed before restyling): the `logo`/`device` assets exist and fonts resolve; a\ngaps-flagged missing/locked logo means the apply step skips or placeholders it rather than inventing\none. Announce the kit and its gaps, get the `avoid` list confirmed, then continue into the main apply\nworkflow.\n",
@@ -38,7 +38,7 @@ export const INLINE_ASSETS = {
38
38
  "docs/formats/yt-shorts.md": "# yt-shorts — YouTube Shorts\n\n- **Size:** 1080 × 1920 px\n- **Aspect:** 9:16 (tall)\n- **Medium:** screen (video)\n\n## Safe zones\n\nPlatform UI overlays the edges — keep primary content, captions and CTAs clear of:\n\n- **Top 288 px** — search, menu.\n- **Bottom 672 px** — title, channel, subscribe, sound.\n- **Right 192 px** — like / dislike / comment / share / remix column.\n- **Left 48 px.**\n\nThese are Google's published figures for vertical video on YouTube; treat them as minimums.\n\n## Notes\n\n- Same canvas as `ig-story` / `tiktok`, with the tallest top band of the three. A layout that has\n to work on all three keeps its text inside x 120–780, y 288–1248.\n",
39
39
  "docs/judge/SKILL.md": "---\nname: judge\ndescription: >-\n The quality gate and the rules every design is built to. Read it, with its\n design-rules.md, before the first `edit` of any design: the rules are what you\n build to, and the gate is the mandatory step before reporting a design done.\n Also when the user asks for a design review, score, audit, or QA, or when a design\n needs remediation after a failed review. The axes, the gate, the scorecard format\n and the remediation loop are defined in this skill's body — do not judge from\n memory of this description.\n---\n\n# judge — the build → judge → remediate loop\n\n**Before the first `edit` of a design, read `{{skill:judge#design-rules.md}}`** (in the same message as the `api` skill): the full rubric — typography, colour, hierarchy, composition, craft — with the numeric thresholds every axis below is scored against. Build to it; scoring a design against rules you read only afterwards means rebuilding it.\n\nYou are the design's QA judge. Judging is scored against what you SEE in `preview` renders of the **session's current state** — never against the code that produced it, and never from memory. `preview` always renders that current state, so there is nothing to re-ground: if you are unsure what the design looks like now, call `preview` again.\n\n## The 8 axes\n\nScore each axis 0–10 against the render. `baseline` is the execution floor; the other seven map to the sections of `design-rules.md`:\n\n| Axis | What it scores | Rubric |\n| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |\n| **baseline** | Nothing broken: no overflow, no blank/placeholder text, no tofu (□), no clipped ascenders/descenders, nothing off-canvas, no unintended overlap | §6.1.7, §6.4 |\n| **hierarchy** | One dominant element; unambiguous reading order; ≈3 (≤4) levels; rank carried by size > weight > color > spacing > position; structure expressed as a grouped block hierarchy (in an auto layout flow, frames) (nested where nested) | §6.3 |\n| **typography** | Families/weights, scale bands, leading (incl. the content-area conversion and diacritic/non-Latin rules), measure, rag, tracking, micro-typography, lists & paragraph structure, inline style ranges | §6.1 (checklist §6.1.11) |\n| **color** | Palette ≤ 3 + neutrals; exactly one consistent accent; contrast on the actual background | §6.2 |\n| **composition** | Margins 8–12% of the shortest dimension; shared grid; spacing ladder; balanced whitespace — no dead void; nothing off-canvas | §6.4 |\n| **craft** | Chips/pills/badges built per the chip system; intentional crops; clean decoration; consistent component geometry | §6.5 (checklist §6.5.2) |\n| **copy** | The words say something only this business/occasion could say: no nothing-tagline, transformation claim, uncheckable superlative, upbeat closer or abstract-noun padding; trade idiom and specifics left intact | §6.8 (Copy rules, below) |\n| **localization** | Localized variants only: correct per-language typography, no drift from the source layout, RTL mirrored, script-correct fonts; **source-parity** (appearance/weight/element/decoration match the source render — see below) | §6.6 + the `localize` skill |\n\n**Some axes cannot be judged from a single PNG.** Nine checks below are **instrumented** — they read a measured value, the scene graph, or a second render, not an eyeball — because the naked render either hides the defect or can't reveal the cause. Five of them (chip construction, curved type, list construction, inline emphasis, paragraph structure) catch **construction** defects that render pixel-identically to the correct build: scoring the image alone passes them every time.\n\n- **Leading (typography):** read `getProps(id, ['text.lineHeightVisual'])` and judge the **rendered** gap against §6.1.3, not the raw `text/lineHeight`. Required on every headline/display block and on every text block of a localized variant — the most common defect, and it survives a clean-looking PNG.\n- **Grouping (hierarchy):** walk `getChildren` from the page; each cluster (eyebrow+headline, label+value, icon+text) must be a group block, not loose siblings (§6.3); in an auto layout flow a frame is the cluster and counts as one, and a flow's children are never grouped. Ungrouped RTL icons also break on mirror.\n- **Chip construction (craft):** every text-only chip's field is the text block's own `backgroundColor/*`, not a sibling shape behind it; a text block centred on a same-size rect is the tell (§6.5.1).\n- **Curved type (craft):** every arced text is one block whose `(await engine.design.getProps(id, ['text.path'])).text.path` is non-null; single-glyph blocks at stepped rotations are the tell (§6.5.4, and §6.3).\n- **List construction (typography):** every list is one block whose `getProps(id, ['text.paragraphs'])` paragraphs each carry a `listStyle` ≠ `'None'`. Tells: a typed `\"• \"`/`\"1. \"`, a lone marker-glyph block, one block per item (§6.1.8; the last two fail §6.3 too).\n- **Inline emphasis (typography):** emphasis inside a line is a range on one block (`getProps(id, ['text.ranges'])` has more than one); two blocks on one baseline and face, differing only in colour or weight, are the tell (§6.1.9), unless one of the pieces has `text.string` keys and the pieces share one group (in an auto layout flow, one frame). Capitals typed into the string with no `case` range are frozen caps (§6.1.9).\n- **Paragraph structure (typography):** a string with `\\n\\n` and `text/paragraphSpacing == 0`, or N stacked one-paragraph blocks that read as one passage, fail §6.1.8.\n- **Copy (copy):** score the words, not their setting. Read every string from the walk below in render order, as one voice, and ask whether a competitor could paste the lines onto their own page unchanged (§6.8, bundled at the end). Bias hard toward leaving copy alone: specifics and trade idiom are not tells, and em dashes and curly quotes are correct typography (§6.1.7). **A thin brief does not license inventing:** generic but true passes this axis; a name, price, date, place or claim the brief did not give fails. On a source-derived edition, a re-worded string fails **baseline** (Copy parity below), not this axis.\n- **Source-parity (localization + composition + craft + typography):** a variant is judged against **its source**, not in isolation — see the next section. Applies to every design derived from another: a **localization**, a **resize**, and a **brand restyle**. For a localized variant, also confirm the source's **style ranges survived**: if the source block has multiple runs and the variant has one, the translation flattened the accent (`localize`), which fails **localization** even when the render looks clean.\n\n## The gate\n\n**Every applicable axis ≥ 8. No averaging. N/A = 10.** One axis at 7 fails the design. An axis is N/A only when it genuinely cannot apply (e.g. `localization` on a single-language design) — score it 10 and mark it N/A in the scorecard.\n\nThe caller may override the default: narrow the axes (\"judge typography and composition only\") or move the threshold (\"pass ≥ 9\"). Apply the override for that run; otherwise the full gate is the default.\n\n**This skill never asks.** Its two parameters — the axis set and the threshold — are both\ndefaultable, and it runs as the gate of the loop on every build, so a question here would interrupt\nevery design this server makes. Take the override if the caller gave one, otherwise take the full\ngate, and score. This is the stated exception to the intake contract (`{{skill:create#intake.md}}`), which every other skill follows.\n\n**A source-derived variant (localization, resize, or brand restyle) cannot pass on its standalone render.** The source-parity diff below is a **mandatory gate step**, not an \"if in doubt\" — a variant judged only against its own PNG has not been judged. If you did not `preview` the source and diff it, the gate is incomplete and the design is not done.\n\n## Source-derived variants — judge against the source, not just the render\n\nA **localization**, a **resize**, and a **brand restyle** are not standalone designs: each is derived from a source, and each changes exactly **one** layer — the words, the canvas, or the style — while carrying the rest faithfully. Judging one in isolation passes variants that are internally clean but **infidelity to the original** — the single largest class of derived defects (wrong leading after a font swap, a fill/effect/corner-radius/weight that silently changed, decoration that drifted, an element that vanished, a restyle that quietly re-flowed the layout, an icon the RTL flip disassembled). None of these show up scoring the variant's PNG alone; **all** of them show up the moment you put the variant next to the source.\n\n**So for every variant with a source, `preview` the source too and diff the two renders — always, before scoring.** First name **which layer the variant is allowed to change** (words / canvas / style); everything else is held, and every difference outside that layer is a defect until you can name it as a deliberate consequence. Then judge these against the source (they feed the axes noted):\n\n- **Element inventory** (localization + composition) — every content cluster on the source has a counterpart on the variant; nothing silently dropped or added. Missing elements read as \"too simplistic.\"\n- **Copy parity** (baseline; **brand** + resize) — the strings are the source's strings. A restyle and a reformat carry copy verbatim: no re-worded headline, no shortened subline, no dropped line \"to fit\" the new face or canvas. Re-wording is the `localize` layer; if the copy no longer fits, fix the type, not the text.\n- **Appearance parity** (craft + color) — fills, gradients, effect/blur stacks, opacity, corner radius, stroke, shadow, and any overlay match the source; none re-created by eye, none added/removed (a cover that \"became darker,\" a rounded corner gone square). **For a brand restyle this check inverts:** appearance is _supposed_ to change, so parity is on the **role assignment**, not the values — the block that was the background is still the background, the one accent moment is still that block, the divider is still a divider. A restyle that recoloured a rule into a second lead, or promoted a caption to the accent, broke role parity even though every value came from the kit.\n- **Weight parity** (typography) — every block renders at the source block's weight; the font swap did not land on the family's default regular cut. For a brand restyle, the target is the **brand's** weight for that role — but relative weight order across blocks still matches the source's hierarchy.\n- **Geometry / decoration drift** (localization for localize; composition for resize; craft + composition for brand) — for **localize**, every block sits on the source grid (position + size), baseline-relative where the face changed; decoration with an internal geometric relationship (a ring of stars, evenly-stepped dashes) holds that relationship. For **resize**, geometry is _re-derived_ (drift ≠ moved), so instead judge that the **system** and **identity** carried (§6.4/§6.3) and nothing was lost. For **brand**, geometry is held like a localization — a block moved for anything but a stated brand rule (safe-area margin, kicker pill, size threshold) is drift; a re-layout is a `resize`, not a restyle.\n- **Re-wrap fallout** (baseline; **brand** + localization) — a font swap changes the measure, so an auto-height block can re-wrap to a new line count, grow, and collide with or push its neighbour even though nothing was moved. Diff the **line counts** against the source, not just the positions.\n- **RTL selectivity** (localization) — icons/logos/marks/numerals/charts/photos are **not** mirrored; composed marks moved as groups, not disassembled.\n\nA variant that is clean on its own but diverges from the source on any of these fails the axis noted — **do not pass it on the strength of the standalone render.** When a divergence is a deliberate, correct adaptation (a headline re-wrapped for a longer language, a block re-flowed for a new aspect, a margin widened to the brand's safe area), that is not drift; name it and pass.\n\n**A brand restyle carries a second gate.** The kit's `avoid` list and `do-dont/` gallery sit **on top of** the axes: a single hard `avoid` violation fails the restyle even when every axis is ≥ 8. Add an **avoid-list** row to the scorecard and score it against the kit, not the rubric (the `brand` skill).\n\n<!-- requires:video -->\n## Videos — judge the timeline, not its first frame\n\nA page with a timeline (clips, animations, audio) is judged across its whole duration. A plain `preview` shows one frame; judged alone it passes a video whose middle is broken. `time` applies to every block in a call, so it is one `preview` call per moment — pick them from the timeline you built:\n\n- **Frames** — a representative set, about six moments: the first frame, a few beats once their entrance has settled (the busiest ones), the **middle of a transition** (cut + duration/2; every transition when there are few), and the last frame (`duration` − 0.1; the timed preview reports `duration`). Score all eight axes on every frame: a headline that collides mid-slide or a chip that leaves the canvas mid-animation fails `baseline` like it would on a still.\n- **Motion** (`baseline` + `craft`) — a transition midpoint shows both clips blended; one clip shown whole there means the transition is missing or off its cut. Every line of text stays on screen long enough to read: a short label at least 0.8 s after it settles, a sentence about 0.3 s per word. The last frame is a deliberate end card, not an empty tail.\n- **Audio** (instrumented — `preview` has no sound) — read the page's `audio` blocks in the scene-graph walk: each block's `playback` window lies inside the page's duration; a music bed spans the page and has a `fadeOut`; the music is ducked under a voiceover (0.3–0.5 while it speaks). A missing bed or voiceover the brief asked for, or a silent tail, fails `baseline`; unset fades or levels that fight each other fail `craft`. A silent video is a complete deliverable when the brief or its defaults chose it (no sign-in to generate music, the user said so) — name that in the brief line.\n<!-- requires:export -->\n- **The export** — judge frames with `preview`, not with trial exports: an mp4 export is slow, so export once, after the gate passes. Then check that one export from its result: `audioDuration` present and about equal to `duration` (absent means the mp4 has no audio track — a defect when the design has audio). Re-export only if that check finds a defect.\n<!-- /requires:export -->\n\nRecord the verdict on the frames you scored, as for any design.\n<!-- /requires:video -->\n\n## The loop\n\n<!-- requires:import -->\n1. **Preview** — `preview` every page that matters, in **one call**: `preview()` with `blockIds` omitted renders every page of the current design, so scoring the whole design costs no more than scoring page 1. Judging an old render is judging the wrong design. A render is invalidated by **content** changes: if nothing has changed the scene since a render you already have in this conversation (a diagnostic/read-only `edit`), that render is still current — reuse it instead of re-rendering. **Type too small to see in the page render is not judged until you zoom it:** legal copy, captions, disclaimers and any label under ~12 px on the canvas come back as a smudge at 0.25 MP, so `baseline` and `typography` on those blocks are being scored on nothing. The page render names them for you: a `preview` of a page ends with whatever it was too coarse to resolve — type under ~10 rendered px, strokes under one — and the exact call that shows them. Follow it — `preview({ blockIds: [<textId>] })` frames the block on its page, no coordinates needed — and judge how it is SET: clipped ascenders or descenders, tofu, a hairline that washes out at size, contrast against what is actually behind it, a collision the page view hid. The words themselves you already have from the scene-graph walk below; the zoom is for what the strings cannot tell you. **If the design is a localization, a resize, or a brand restyle, you need the SOURCE's render too** for the source-parity checks above. `preview` only ever renders the current session, so the source render has to come from the conversation: those three skills each `preview` the source and save it before starting the variant, precisely so the render is already in front of you here.\n<!-- requires:video -->\n **A page with a timeline needs one `preview` per moment** — see Videos above.\n<!-- /requires:video -->\n<!-- requires:open -->\nIf it is not, `open({ uri: '<source uri>' })` and `preview` it, then `open` the variant's `uri` (the one its `import` returned) to return to it — `import` would give you copies instead.\n<!-- /requires:open -->\n<!-- unless:open -->\n<!-- requires:version -->\nIf it is not, `preview({ design: '<source design>' })` it, then carry on with the variant by its own `design` and `version` — nothing needs saving or loading back.\n<!-- /requires:version -->\n<!-- unless:version -->\nIf it is not, save the variant first (`export({ format: 'imgly' })`) and keep its `uri`, load the saved source back (`import({ source: { uri: '<source uri>' } })`) and `preview` it, then `import` the variant's `uri` to return to it. The variant's next save is then a new file — report that `uri`, not the earlier one.\n<!-- /unless:version -->\n<!-- /unless:open -->\n<!-- /requires:import -->\n<!-- unless:import -->\n1. **Preview** — `preview` every page that matters, in **one call**: `preview()` with `blockIds` omitted renders every page of the current design, so scoring the whole design costs no more than scoring page 1. Judging an old render is judging the wrong design. A render is invalidated by **content** changes: if nothing has changed the scene since a render you already have in this conversation (a diagnostic/read-only `edit`), that render is still current — reuse it instead of re-rendering. **Type too small to see in the page render is not judged until you zoom it:** legal copy, captions, disclaimers and any label under ~12 px on the canvas come back as a smudge at 0.25 MP, so `baseline` and `typography` on those blocks are being scored on nothing. The page render names them for you: a `preview` of a page ends with whatever it was too coarse to resolve — type under ~10 rendered px, strokes under one — and the exact call that shows them. Follow it — `preview({ blockIds: [<textId>] })` frames the block on its page, no coordinates needed — and judge how it is SET: clipped ascenders or descenders, tofu, a hairline that washes out at size, contrast against what is actually behind it, a collision the page view hid. The words themselves you already have from the scene-graph walk below; the zoom is for what the strings cannot tell you. **If the design is a localization, a resize, or a brand restyle, you need the SOURCE's render too** for the source-parity checks above. `preview` only ever renders the current session, so the source render has to come from the conversation: preview the design **before** you change it — that render is the source. If it is not in front of you, skip the source-parity checks and say so in the brief line (step 3).\n<!-- requires:video -->\n **A page with a timeline needs one `preview` per moment** — see Videos above.\n<!-- /requires:video -->\n<!-- /unless:import -->\n2. **Judge** — score each applicable axis against the render. For `typography` and `craft`, dry-run the §6.1.11 and §6.5.2 checklists line by line (read them via `{{skill:judge#design-rules.md}}`); for `copy`, apply §6.8 (bundled at the end of this document) before scoring the words. Any \"no\" on an applicable checklist line caps that axis below 8. Run the **instrumented checks** where they apply — as the TAIL of a remediation `edit` when one is happening anyway, standalone only when nothing needs fixing: the leading read-back (text.lineHeightVisual vs band), the scene-graph reads for grouping, chip construction, curved type, list construction, inline emphasis, paragraph structure and copy, and — for source-derived variants — the source-parity diff. A clean-looking PNG is not sufficient for these nine. **All seven scene-graph reads share one walk** of `engine.design.getChildren` from the page — do them in a single pass, not seven. For each text block that walk reaches, one read of `await engine.design.getProps(id, ['text', 'text.ranges', 'text.paragraphs'])` (paragraphSpacing, the string, `path`, the style runs, the per-paragraph `listStyle`) answers six of the seven; grouping is answered by the walk itself.\n3. **Scorecard** — report the result in this shape (conversational markdown; no files):\n\n | Axis | Score | Violations | Fix |\n | ----------- | ----- | ---------------------------------------------------------------- | ---------------------------------------------------- |\n | typography | 6 | all-caps eyebrow untracked (§6.1.6); body leading unset (§6.1.3) | set letterSpacing 0.12; set converted lineHeight 1.5 |\n | composition | 8 | — | — |\n\n One row per applicable axis, N/A rows marked. Below the table: the verdict (`PASS` / `FAIL — remediating`) and, on failure, the remediation order (worst axis first).\n\n **Then one line for the brief.** Restate the brief this design was built from and name any place the design departs from it — a direction, palette, format or audience that is not what was asked for or agreed. The eight axes score execution only, so a design built beautifully in a direction nobody chose passes all of them; this line is the only thing that catches it. It does not gate (a deliberate, explained departure is fine) and it never becomes a question — `judge` does not ask. If the design was built with a parameter **defaulted rather than asked**, say which: that is the sentence the user needs in order to correct it in one word.\n\n4. **Remediate** — apply the fixes via `edit`. Remediation is surgical: fix the flagged blocks in place (`{{skill:api#recipes.md}}`, \"Fix in place\"); lean on setProps for remediation writes — font/size/line-height changes auto-reshape with every style range preserved (§6.1.3). Never rebuild the scene to fix a spacing violation. **Fold the instrumented checks INTO this edit** — run the scene-graph walk and read-backs at the END of the same `edit` that applies the fixes (return their results), never as a separate read-only edit: a standalone audit edit costs a full turn and measured runs spent 1–2 of them per session. The edit result's own `lint:` notice already covers the mechanical §6.1 checks — trust it instead of re-measuring those.\n5. **Re-judge from the edit's own render** — the remediation edit's result already ends with a render of the page it changed: that IS your re-preview for that page. Re-judge from it and call `preview` again only for pages the edit did not touch, or when the edit's result notes something too small to read (follow the zoom call it names) — the inline render is the same page render `preview` gives, note included. Re-rendering untouched pages puts near-identical copies of the same design into the conversation, which makes it harder, not easier, to see what moved. Repeat from step 2 until the gate passes.\n<!-- requires:scorecard -->\n<!-- requires:open -->\n6. **Record the verdict** — `scorecard({ verdict: 'pass' })`. The verdict covers the session's **current state**, which is exactly what the passing renders came from, so record it before you touch the scene again. If the loop is being cut short with an axis still below 8 (e.g. the user says ship anyway), record `verdict: 'fail'` — the failure belongs on record, not silently dropped. **The record is a claim about work done**: never record a verdict for renders you did not score. **Any later `edit`, `import` or `open` clears the verdict** and re-arms the gate — judge again, record again. A session resumed after a restart reads as unjudged; that is deliberate, and re-judging is the answer.\n<!-- /requires:open -->\n<!-- unless:open -->\n6. **Record the verdict** — `scorecard({ verdict: 'pass' })`. The verdict covers the session's **current state**, which is exactly what the passing renders came from, so record it before you touch the scene again. If the loop is being cut short with an axis still below 8 (e.g. the user says ship anyway), record `verdict: 'fail'` — the failure belongs on record, not silently dropped. **The record is a claim about work done**: never record a verdict for renders you did not score. **Any later `edit` or `import` clears the verdict** and re-arms the gate — judge again, record again. A session resumed after a restart reads as unjudged; that is deliberate, and re-judging is the answer.\n<!-- /unless:open -->\n<!-- /requires:scorecard -->\n<!-- unless:scorecard -->\n6. **State the verdict** — end the loop with the step 3 table and verdict in your reply. It covers the session's **current state**, which is exactly what the passing renders came from. If the loop is being cut short with an axis still below 8 (e.g. the user says ship anyway), say `FAIL` — the failure belongs on record, not silently dropped. Never claim scores for renders you did not look at. **Any later `edit` re-arms the gate** — judge again.\n<!-- /unless:scorecard -->\n<!-- requires:drafts -->\n7. **Report done** — there is nothing to save: every change is saved to the design as you make it. Report the design's `uri`.\n<!-- /requires:drafts -->\n<!-- unless:drafts -->\n<!-- requires:export -->\n7. **Report done** — there is nothing to save: the product keeps the design after every successful `edit`. `export({ format: 'imgly' })` returns its `uri` to report.\n<!-- /requires:export -->\n<!-- unless:export -->\n7. **Report done** — there is nothing to save: the product keeps the design after every successful `edit`.\n<!-- /unless:export -->\n<!-- /unless:drafts -->\n<!-- requires:scorecard -->\n<!-- requires:export -->\n The gate hangs on `export`: an `export` the current verdict does not cover comes back with an unjudged notice, which is the loop asking you to run again.\n<!-- /requires:export -->\n<!-- /requires:scorecard -->\n\n## Judging discipline\n\n- **Judge the render, not the intent.** A rule satisfied in code but broken on screen is broken.\n- **Imagery fits the subject.** An unrelated photo caps `craft` at 6: swap in the person's image, a generated one if this host makes images, else a solid palette-colour shape (never an empty frame); name the swap in the brief line.\n- **Be harsh on your own work.** The common failure is scoring 8 by charity. If you hesitated, it is a 7.\n- **Score honestly on partial remediation.** If a violation cannot be fixed without re-laying-out the design, say so and recommend the `resize` skill (a layout problem) or a rebuild — do not inflate the score.\n- **The brief wins where the rubric is silent**; the rubric wins on hard-threshold conflicts (§6 intro).\n",
40
40
  "docs/judge/copy-writing-rules.md": "Expands the **copy** axis. Every other section governs how the design looks; this one governs what it says. A page can pass all seven other axes and still be obviously machine-written, because nothing else in this rubric reads the words.\n\nThe rules below are adapted from Wikipedia's [\"Signs of AI writing\"](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing) (WikiProject AI Cleanup), narrowed to copy that lives inside a layout. Template copy is not an essay: a slide headline is six words, a menu item is three, a chart caption is one sentence explaining a number. The judgment is not \"does this paragraph flow\" but **\"would a person who actually runs this business write this line on this artifact.\"**\n\n#### The tells worth hunting\n\n- **The nothing tagline.** A line that could sit on any brand in any category. _\"We navigate the intersection of raw human emotion and digital precision to redefine the modern aesthetic\"_ describes no business. Replace it with what the business actually does.\n- **The transformation claim.** _turns X into Y_, _stops being X and becomes Y_, _from a bottleneck into a safety net_. State the change plainly and once. The same shape twice in one design is the confession.\n- **The superlative nobody can check.** _world-class_, _best-in-class_, _premier_, _unparalleled_, _the world's most-loved_. A real company writes the number instead — and when a number is already in the sentence, the superlative is doing nothing.\n- **The upbeat closer.** _the compounding is just getting started_, _exciting times ahead_, _a major step in the right direction_. Cut the sentence; the line before it already made the point.\n- **Manufactured depth.** Present-participle tails that add no fact (_…, reflecting the community's deep connection to the land_), abstract-noun openers that delay the point (_X has always run on a quiet contradiction_), and aphorism formulas (_X is the language of Y_).\n- **Rule-of-three padding.** Three abstract nouns where one concrete one would do: _disciplined growth, operational resilience, and durable long-term value_.\n- **Vocabulary that marks the text as generated.** _elevate, unlock, seamless, empower, effortless, bespoke, timeless, vibrant, tapestry, testament, redefine, leverage, holistic, curated_. Judge each in context — `curated wine pairing` on a restaurant menu is ordinary English; `curated experiences that elevate your journey` is not. The word is never the tell; the emptiness is.\n- **Filler body text.** Copy that fills a frame without saying anything. Delete the block and ask whether the page lost information. If it did not, the block needs a real sentence, not a shorter version of the same nothing.\n\n#### What is not a tell\n\nThe failure mode of a copy pass is damaging good writing. Leave copy alone when it is:\n\n- **Specific.** Numbers, dates, names, addresses, real figures. `ARR reached $48.2M, up 27% year over year` is not slop, whatever its cadence.\n- **Domain idiom.** `synergy targets` in a CV, `transformation programme` in consulting, `house-made` on a menu. Trade language is how those trades write.\n- **The voice the brief asked for.** A luxury stationery card is meant to sound formal; a pull quote is meant to sound quotable; a greeting card is warm and formulaic because that is the product.\n- **Deliberately generic placeholder copy**, where the design ships as a template for someone else's words.\n\n#### Typography is not a tell\n\nTwo rules from general anti-AI-writing guidance are written for web prose and are **wrong here**:\n\n- **Em and en dashes stay.** In a layout the em dash is typography: `Reception 7:00 PM — Dinner at 8:00` is correct setting, and so is a dash in a pull quote or a chart annotation. What can be a tell is **density** — three or more in one short block, or a dash in every second line of a deck. Flag the pattern, never the character.\n- **Curly quotes stay.** `“…”` and `’` are correct typography and §6.1.7 already requires them. Straight quotes are the defect, not the fix — except in a monospace or terminal design where the plain glyph is the point.\n\nLikewise, do not inject personality where the artifact does not want it. Adding opinions, first person or asides is right for a blog post and wrong for a wedding invitation, a lab report cover or a compliance footer, where neutral and plain **is** the correct human voice.\n\n#### Editing copy in an existing design\n\n- **Length is a layout constraint.** The text sits in a frame laid out around it. Keep a rewrite within ~10% of the original character count, preserve explicit line breaks and their positions, and preserve leading/trailing spaces — some strings are fragments of a sentence split across styled blocks. One string in, one string out: never merge or split blocks to make a rewrite fit.\n- **Localized editions move together.** A source-derived edition shares its blocks with the source (§6.6), so rewriting only the source language leaves the German saying what the English used to. Rewrite every language, or leave the string alone.\n- **Check the glyphs before you commit.** A saved archive carries **subsetted** fonts — only the glyphs the copy needed when it was built. A rewrite that introduces a new character has no glyph, and the engine falls back to another face silently rather than failing: the render comes back with mixed stroke weights inside one headline and looks almost right. Latin copy rarely trips this; a CJK subset can be ~150 glyphs, so nearly any rewrite does. Re-render and read the result, and prefer characters the design already uses.\n\n#### Pass\n\nEvery line names something true about this business, product or occasion that a competitor could not paste into their own page; no transformation claim, uncheckable superlative or upbeat closer; no abstract-noun opener or participle tail standing in for a fact; vocabulary chosen for the trade rather than for the register; every rewrite within its frame's length, its line breaks intact, its sibling languages carried, and its glyphs actually present in the packed fonts.\n",
41
- "docs/judge/design-rules.md": "# Design rules (the full rubric)\n\nThe enforceable design best practices this server's designs are built to and the `judge` skill scores against. Read it before the first `edit` of a design. Section numbers here are canonical: `§6.x` references in every skill resolve to this file.\n\n- **Web vs print** — where the two media diverge (line height, minimum sizes) the rules are split **Web** / **Print**; \"web\" values apply to screen-destined canvases (social posts, banners). An unqualified rule applies to both.\n- **N/A = 10** — a rule that cannot apply to a given design scores N/A, i.e. 10.\n- **Defaults fill silence** — where the brief gives an explicit value, use it; where it is silent, apply this file's defined **default** rather than leaving it unset or letting the engine default stand. Every numeric rule below that names a _default_ (line-height §6.1.3, type scale §6.1.2, measure §6.1.4, all-caps tracking §6.1.6, margins §6.4) is that fallback. A brief value that violates a hard threshold is clamped to it — except line-height, judged by the rendered gap after conversion, never by the raw number (§6.1.3).\n\n### 6.1 Typography\n\nExpands **Axis 3 — Typography** (\"≤3 font families, correct pairing, sizes in band, sane line-spacing and leading, no tofu\"). Every subsection below must hold for Axis 3 to score ≥ 8.\n\n#### 6.1.1 Font families & pairing\n\n- Use **≤3 font families** per design (≤2 preferred); no more than **4 weights** total. Every extra family/weight dilutes hierarchy and reads as inconsistency.\n- Pair by **contrast**, not similarity — e.g. a serif display against a sans body, or one superfamily used across roles. Never pair two families that are almost alike (two humanist sans, two geometric sans).\n- Give every family a defined fallback: an **embedded/outlined** font (print) — and verify glyph coverage for every character in the copy (web/canvas). System substitution silently changes metrics and breaks leading and measure.\n- **Pass:** ≤3 families, ≤4 weights, pairing is by intentional contrast/superfamily, every family verified to cover the copy (print: embedded/outlined).\n\n#### 6.1.2 Type scale & size bands\n\n- Derive all sizes from **one modular scale** (ratio 1.2–1.618; 1.25 is a safe default). No arbitrary one-off sizes.\n- Keep text in clear **bands** — Display/Headline, Subhead, Body, Caption, Fine print — each separated by **≥1 scale step** so the hierarchy is unambiguous (supports Axis 2).\n- Minimum legible sizes:\n - **Web** — body ≥ **16px**, caption ≥ **12px**, never below **11px**.\n - **Print** — body **9–12pt**, caption ≥ **7pt**, never below **5pt**.\n- **Pass:** every size snaps to one modular scale; body ≥ 16px (web) / ≥ 9pt (print); bands are ≥1 step apart and visually distinct.\n\n**Canvas guidance — sizes as % of page height:**\n\n| Role | % of page height | Example for 1080 px page |\n| ----------- | ---------------- | ------------------------ |\n| Headline | 3 – 5 % | 32 – 54 px |\n| Body | 1.5 – 2 % | 16 – 22 px |\n| Caption | 1.2 – 1.5 % | 13 – 16 px |\n| Min legible | — | 14 px |\n\n#### 6.1.3 Line height / leading — the headline rule\n\nLine spacing is the top driver of the \"inconsistent typography\" complaint. Three principles govern it: **explicitness** (every text block carries a deliberately set line-height — never an inherited default), the **inverse rule** (small text needs more line-height; large display needs less), and **consistency** (identical leading across same-band text within one design).\n\n- **Set line-height explicitly on every text block** — including single-line labels, captions, and all-caps titles, not just multi-line body copy. An unset line-height (the engine/CSS default) is a defect even when the block is one line: it silently tracks the font's default metrics, can't be verified against the bands below, and defeats both the consistency and all-caps rules. A one-line all-caps label still takes the tighter all-caps multiplier (**0.9–1.0**); the value is judged by band + intent, not by whether the text happens to wrap. Same-band single-line blocks (e.g. an attribution and a caption in the same face) share their leading just as body blocks do.\n\n> **Authoring in CoDesign / CE.SDK — write line-heights as `{ visual }`.** Every line-height figure in this section is a _visual_ CSS-style multiplier of the font size. The engine's raw `text/lineHeight` is a different scale (it multiplies the font's per-face content area), so a raw number renders looser than it reads. The facade converts for you — write the band value directly:\n>\n> ```js\n> await engine.design.setProps(block, {\n> text: { lineHeight: { visual: 1.2 } }\n> });\n> // read back in the same terms:\n> await engine.design.getProps(block, ['text.lineHeightVisual']); // → 1.2\n> ```\n>\n> The conversion loads the face's metrics itself. A `{ visual }` (or font/size) write reshapes and replays every per-character style range for you. If you ever reshape via the raw APIs instead: **⚠ re-setting the string wipes every per-character style range** — capture with `getProps(id, ['text.ranges'])` and replay (§6.1.9). The judge scores the _rendered_ gap (§6.1.6), and reads it back via `text.lineHeightVisual` — same numbers as the bands below.\n>\n> **⚠ An explicit line-height from the user's brief is a visual target too** — write it as `{ visual }` and judge the rendered gap, never the raw engine number. A prompt asking for all-caps line-height **1.15** is not \"too loose for the 0.9–1.0 band\" until the _rendered_ gap violates §6.1.6; when the prompt names a line-height, the default is to use it.\n\n- **Web (unitless multipliers):**\n - Body **1.4–1.6** (default **1.5**); long-form reading up to **1.65**.\n - Headlines **1.1–1.25** (default **1.1**); large display **≤1.1** (default **1.1**).\n - **All-caps display / headlines** take a **tighter** multiplier than mixed-case — **0.9–1.0** for multi-line — because caps fill only the cap-height band (~70% of the em) and use no descender space; a value that looks tight for mixed-case leaves a descender-sized void between all-caps lines. Judge by the **visual gap** (target ~0.15–0.25× cap height), not the number.\n - **WCAG:** body line-height ≥ **1.5**; paragraph spacing ≥ **2×** the font size.\n- **Print (leading as a unitless multiplier of point size):**\n - Body **1.2–1.45** (default **1.2**). Push toward the low end for dense or large-x-height faces, toward the high end for airy or small type.\n - Headlines **1.0–1.2** (default **1.05**); tight display setting may go slightly negative (**0.95–1.0**).\n - **All-caps titles: 0.9–1.0** (tighter than mixed-case display's 1.0–1.2) — same cap-height reason.\n- **Localized / non-Latin copy — the per-script rules live in the `localize` skill.** Per-script leading bands and diacritic rules — the capital-diacritic all-caps loosening, the marked-capital mixed-case nudge, the localized-display default, and the CJK / Arabic-Naskh / Vietnamese bands — live in the `localize` skill's `reference/` family files (`latin-expansion.md`, `arabic.md`, `cjk.md`, `vietnamese.md`, `cyrillic.md`). All values there are **visual multipliers** — apply this section's content-area conversion like every value here (§6.6).\n- **Tune leading to measure** — longer measure needs more leading; short measure needs less. Never set leading in isolation from line length (§6.1.4).\n- **Consistency** — every body block in one design shares the same leading; every same-band heading shares the same leading.\n- **Pass:** **every text block carries an explicit line-height (incl. single-line & all-caps labels)**; body line-height **1.4–1.6** (web) / **1.2–1.45** (print); headline leading tighter than body; **all-caps titles tighter still (0.9–1.0, web & print), no descender-void between lines**; leading uniform across same-band text; **localized / non-Latin leading set per the `localize` skill's family files**; WCAG body ≥ 1.5 (web).\n\n#### 6.1.4 Measure (line length)\n\n- Set body **measure to 45–75 characters** (~66 ideal for a single column; **40–50** per column in multi-column layouts). Too-long lines lose the return sweep; too-short lines fracture rhythm.\n- On wide canvases, constrain body width — don't let body text run the full canvas width.\n- **Pass:** body measure 45–75 chars (40–50 multi-column); no full-canvas-width body lines.\n\n#### 6.1.5 Alignment, rag, justification\n\n- Default body alignment: **left** (LTR) / **right** (RTL). Avoid centered or justified _running_ text.\n- Justify only with **hyphenation on** and rivers controlled (print); **never justify short measure**.\n- Keep a **soft rag** — no ladders (repeated hyphens/word-shapes down the edge), no line more than ~50% shorter than its neighbors.\n- **Set alignment and a growth anchor explicitly — build to survive a text-length change.** A block that _looks_ centred only because its current string happens to be that width is **not** centred: encode the intent. Give every text block an **explicit horizontal alignment** (`text/horizontalAlignment`), and set its width mode so it **grows from the correct edge** when the string changes length — a label centred under a number stays `Center`; a value aligned to a right margin is right-anchored; a column of labels shares one alignment. This is what makes a design **localizable**: when the German string is 30% longer it must grow symmetrically (or from the anchored edge), not drift right off a left-anchored Auto frame. A source that encodes position instead of intent forces the localizer to re-infer alignment from the render and get it wrong (the \"labels drifted right / SEAT not aligned with BLOCK\" defect originates **in the source**, not the localization). Applies equally to chips (§6.5.1: the field grows with the label).\n- **Pass:** body not centered/justified without cause; RTL layouts mirrored (ties to the RTL axis); rag is soft, no ladders; **every text block carries an explicit alignment and grows from the intended edge on a length change (localization-safe), not an incidental centering that breaks when the copy changes.**\n\n#### 6.1.6 Tracking / letter-spacing & case\n\n- **Don't letter-space lowercase body text.** Tighten large display slightly (**−1% to −3%**).\n- **Loosen all-caps and small-caps — always, and to a defined default.** Never leave all-caps at 0 tracking. **Default +10% (0.1em)** — `case: 'Uppercase'` sets 0.1 em on a block tracked below 0.05 em (raise it to the web floor yourself); acceptable band **+5% to +25% (0.05–0.25em)**, scaled by size and length — tighter (~+8%) for larger/longer strings, looser (up to +25%) for short airy display labels and wide-set wordmarks. On **web**, never below the WCAG floor of **0.12em** — so a web all-caps label defaults to **0.12em**, not 0.1em. This default applies even to one-line labels and even when the prompt is silent on tracking (per \"Defaults fill silence\" at the top of this file).\n- Avoid long strings of **all-caps** — reserve caps for short labels; they slow reading in body copy.\n- **Setting all-caps titles** — caps have no ascender/descender extension, so set them **optically**: pull line-height below the mixed-case display range (see §6.1.3), space to **cap height** rather than the em box, and prefer real small-caps to shrunk-and-tracked caps where the family offers them. Keep all-caps to a line or two of display — never a paragraph.\n- Use **real weights and real italics**, never faux-bold or faux-oblique when the family provides the true cut.\n- **Pass:** body untracked; all-caps loosened to the defined default (**+10%; web ≥0.12em**, band +5–25%) and short, **with line-height tightened per §6.1.3 (no inter-line void)**; no faux styling where a real weight/italic exists.\n\n#### 6.1.7 Micro-typography\n\n- Use **smart punctuation**: curly quotes (\" \" ' '), en dash (–) and em dash (—) correctly, real ellipsis (…). No straight quotes, no `--` for a dash.\n- **No double spaces.** Use **non-breaking spaces** to prevent bad breaks (number + unit, \"Fig. 4\", brand names).\n- **No widows or orphans**; no single-word last line; no hyphen on a paragraph's last line.\n- **No missing glyphs / tofu (□)** and **no clipped** ascenders/descenders — the direct expansion of Axis 3's \"no tofu.\" Verify the chosen font actually covers every character in the copy (critical for localized text).\n- **Pass:** smart punctuation throughout; zero tofu and zero clipping; no widows/orphans in headings or short blocks.\n\n#### 6.1.8 Lists & paragraph structure\n\n**Both rules here are construction rules, and construction is invisible in a PNG** — a hand-built list and a native one render almost identically. They are verified by **reading the scene graph**, like grouping (§6.3), chips (§6.5.1) and curved type (§6.5.4).\n\n- **A multi-line list item hangs — wrapped lines align to the text, not under the marker.** When a bulleted / numbered item wraps, the continuation line must indent to the **text start** (a hanging indent), never fall back under the bullet or number. Text wrapping under its own marker is the most common list defect and reads as broken structure.\n- **One text block holds the whole list — one paragraph per item.** Set the marker with the engine's list feature (`text: { listStyle }` whole-block, `text: { paragraphs: [{ index, listStyle, listLevel }] }` per paragraph). There are three hand-built fakes and all three are wrong: **(1)** a marker typed into the string (`\"• \"`) — no hanging indent; **(2)** a lone marker glyph block beside a left-aligned text frame — the marker is unbound and drifts off its text on any copy, font or locale change; **(3)** one text block per item — there is no list at all, just N loose ungrouped blocks that also fail §6.3. Only the native feature keeps the marker, the gap and the hanging indent bound to the item.\n- **Consistent marker, spacing, and alignment** across every item in a list; nested levels step the indent by one unit (`paragraphs[].listLevel`; `listIndentPerLevel` sets the step).\n- **Multi-paragraph copy is ONE text block with paragraph spacing** — `text/paragraphSpacing`, plus per-paragraph alignment and leading (`setProps(id, { text: { paragraphs: [{ index, horizontalAlignment, lineHeight }] } })`; read them back with `getProps(id, ['text.paragraphs'])`). Write it as `{ em: n }` (**0.4–0.8** is the usable band) or `{ px: n }`; a bare number is the engine's own scale and a pixel-shaped one silently runs the copy off the page. Not blank lines: an empty line is a full line box, so it scales with the font size instead of the spacing ladder (§6.4) and can't be tuned independently. And not N stacked blocks: those don't reflow together, drift apart on any length change, and arrive ungrouped.\n- **Pass:** multi-line items use a hanging indent (wrap aligns to the text, not the marker); every list is the native list feature on a single block, one paragraph per item — no typed markers, no lone marker blocks, no block-per-item; marker style, gap, and indent uniform per list; multi-paragraph copy is one block with real paragraph spacing rather than blank lines or stacked blocks.\n\n#### 6.1.9 Rich text — inline style ranges\n\nEmphasis **inside** a line — an accent-coloured word, a bold lead-in, an inline price, a struck-through old price, a superscript unit or mark — is a **style range on one text block**, never a second text block placed beside the first. Like §6.1.8, this is a construction rule: the two builds render near-identically and are told apart in the block tree.\n\n- **A range is the unit of emphasis.** Character styling is a `text.ranges` entry: `setProps(id, { text: { ranges: [{ from, to, color?, weight?, style?, size?, typeface?, case?, scriptStyle?, baselineShift?, decoration? }] } })`. Read them back with `getProps(id, ['text.ranges'])`.\n- **Superscript and subscript are `scriptStyle: 'Superscript' | 'Subscript'` on a range** — ®, ™, m², 1st, footnote marks, H₂O, a price's cents. Never fake one with a smaller `size` range plus a shift, or with a second block: those drift on every reflow and read as a typo. Tune the look per block with `text: { superscriptFontScale, superscriptVerticalShift }` (and the `subscript…` pair), fractions of the font size.\n- **Baseline shift is the optical nudge, not a superscript.** `baselineShift` on a range (`ranges: [{ from, to, baselineShift: '4px' }]`, design units or a length, + up) moves glyphs off the baseline at their own size, without changing the line height; `text: { baselineShift }` moves the whole text. Use it where the glyph is already the right size but sits wrong: a ® or ™ the font draws at cap height that should hang a little higher or lower, a fraction the font has no glyph for (3/16: a smaller `size` on both numbers, the numerator raised), a bullet, arrow or dingbat centred on the x-height, a currency sign aligned to the numerals. Keep it small — a few percent of the font size. A mark that should also be smaller is a `scriptStyle`, not a size and a shift; fractions are the one place both go on a range. It survives reflow and re-styling like any range.\n- **Splitting a headline into blocks to colour one word is the anti-pattern.** Nothing binds the pieces: the gap between them is hand-set, so it re-breaks on any copy, font or locale change; the phrase stops being one string (unsearchable, and the localizer receives fragments instead of a sentence); and it ships as loose siblings that fail grouping (§6.3). The tell in the scene graph is two or more text blocks sharing a baseline and a face, differing only in colour or weight. **The one exception is keyed text:** a `text.string` key whose string differs from the static one draws in the first run's style, so the accent's range does not render; there the accent is a separate text block, and the pieces share one group (in an auto layout flow, one frame).\n- **All-caps is `text: { case: 'Uppercase' }`, not capitals typed into the string.** The property re-cases at render time, so the string stays real words — translatable, searchable, and correct in scripts that have no case at all (where typed capitals are simply wrong and unrecoverable). Applies to whole blocks and ranges alike; tracking still follows §6.1.6.\n- **Restraint.** One accent per headline, drawn from the single accent colour (§6.2) — a second colour inside a line reads as a mistake, not emphasis. Don't stack emphasis (bold **and** colour **and** underline on the same span). Never fake a weight or an italic with a range when the family has the real cut (§6.1.6).\n- **Underline is not general emphasis** — reserve it for links and annotations, and keep `skipInk` on so descenders stay legible; prefer weight or colour for emphasis in display type. (Skip-ink only _shows_ at a small `underlineOffset`: push the rule far enough below the baseline and it clears the descenders anyway, so the setting is neither visible nor verifiable in the render. Judge it at the default offset.) Strikethrough is for superseded content (an old price), not decoration.\n- **Ranges do not survive a raw string write.** Any raw write to `text/text` — including the same-string reshape a font/size/line-height change requires — wipes every range. `setProps` handles this for you: a string-only write captures and replays existing ranges, and font/size/line-height writes reshape with the ranges preserved. A write that mixes `string` with new styling resets ranges — pass the `ranges` you want kept in the same call. `getTextColors(id)[0]` is run 0 only; re-applying it whole-block is itself the flattening bug. Offsets are indices into the string, so they replay verbatim after a **resize** but never after a **translation** (see the `localize` skill).\n- **Replay every run, not just the emphasised ones.** The wipe collapses the whole string to **run 0's** formatting, not to a neutral base. If run 0 was a bold lead-in, replaying only the accent span leaves the rest of the paragraph bold — and the spot-check that would catch it is the one nobody runs, because reading the _accent_ range back shows exactly what was asked for; it is the **unemphasised** text that changed. Either replay all captured runs, or reset the base style across `0..length` before re-applying the emphasis.\n- **Pass:** every inline emphasis is a range on a single text block — verified in the block tree, not the render (keyed `text.string` excepted: its accent may be a separate block in one group with the rest, in an auto layout flow one frame); no sibling text blocks that differ only in colour/weight on a shared baseline; all-caps carried as `text.case` rather than typed capitals; at most one accent per headline, using the design's single accent colour; no faux weight/italic; underline reserved for links/annotations; and any variant (resized, re-branded, localized) still carries its ranges.\n\n#### 6.1.10 Print-specific rules\n\n- Work in **points/picas** and set text to a **baseline grid** so leading stays consistent across columns and pages.\n- Honor the print minimum sizes (§6.1.2); target **≥300dpi**; **embed or outline** all fonts; keep text out of bleed and inside the safe margin (**~8%**, ties to Composition/Axis 5).\n- **Pass:** baseline-grid aligned; fonts embedded/outlined; sizes ≥ print minimums; text inside the safe area, clear of bleed.\n\n#### 6.1.11 Typography pass checklist\n\nExpands **Axis 3 (Typography) — must score ≥ 8.** Each line is a yes/no the judge skill runs against the rendered output, **except the lines marked _scene graph_ — those are read from the block tree, because the defect they catch is invisible in a render.** Any \"no\" on an applicable line drops Axis 3 below 8.\n\n**Both media**\n\n- [ ] ≤3 font families (`edit` warns), ≤4 weights, pairing by contrast/superfamily (§6.1.1)\n- [ ] Every family has a defined fallback / is embedded-outlined (§6.1.1)\n- [ ] All sizes come from one modular scale; bands ≥1 step apart (§6.1.2)\n- [ ] Line-height set explicitly on every text block, incl. single-line & all-caps labels (§6.1.3)\n- [ ] Headline leading tighter than body; leading uniform across same-band text (§6.1.3)\n- [ ] All-caps titles set by cap-height — line-height tightened, no descender-void between lines (§6.1.3, §6.1.6)\n- [ ] Localized / non-Latin text: leading bands + per-language conventions pass the `localize` skill's family files & checklist (§6.1.3 pointer, §6.6)\n- [ ] Body measure 45–75 chars (40–50 multi-column) (§6.1.4)\n- [ ] Body not centered/justified without cause; rag soft, no ladders (§6.1.5)\n- [ ] Every text block has explicit alignment + grows from the intended edge on a length change (localization-safe), not incidental centering (§6.1.5)\n- [ ] Multi-line list items hang (wrap aligns to text, not the marker); marker/gap/indent uniform (§6.1.8)\n- [ ] _(scene graph)_ Every list is the native list feature on ONE block, one paragraph per item — no typed \"• \", no lone marker blocks, no block-per-item (§6.1.8)\n- [ ] _(scene graph)_ Multi-paragraph copy is one block with `text/paragraphSpacing` — not blank lines, not stacked blocks (§6.1.8)\n- [ ] _(scene graph)_ Inline emphasis is a style range on one block — no sibling blocks differing only in colour/weight on a shared baseline, unless one of the pieces has `text.string` keys and the pieces share one group (in an auto layout flow, one frame) (§6.1.9)\n- [ ] _(scene graph)_ All-caps carried as `text.case`, not capitals typed into the string (§6.1.9, §6.1.6)\n- [ ] ≤1 accent per headline, from the single accent colour; no stacked emphasis; underline only for links/annotations (§6.1.9)\n- [ ] Body untracked; all-caps loosened to default (+10%; web ≥0.12em, band +5–25%) and short; no faux bold/italic (§6.1.6)\n- [ ] Smart punctuation and no double spaces (`edit` warns); non-breaking spaces where needed (§6.1.7)\n- [ ] No widows (`edit` warns) or orphans; zero tofu; no clipped ascenders/descenders (§6.1.7)\n\n**Web**\n\n- [ ] Body ≥16px, caption ≥12px, never <11px (§6.1.2)\n- [ ] Body line-height 1.4–1.6; WCAG body ≥1.5, paragraph spacing ≥2× size (§6.1.3)\n- [ ] All-caps display line-height 0.9–1.0 (tighter than mixed-case display) (§6.1.3)\n\n**Print**\n\n- [ ] Body 9–12pt, caption ≥7pt, never <5pt (§6.1.2)\n- [ ] Body leading 1.2–1.45; headlines 1.0–1.2; all-caps titles 0.9–1.0 (§6.1.3)\n- [ ] Baseline-grid aligned; fonts embedded/outlined; ≥300dpi; text inside ~8% safe margin (§6.1.10)\n\n### 6.2 Color\n\nExpands **Axis 4 — Color** (palette respected, exactly one consistent accent, strong contrast everywhere, esp. text on photos/dark backgrounds).\n\n#### Color hierarchy (text on dark backgrounds)\n\n| Role | RGB |\n| --------------------------- | ------------------ |\n| Primary text (headline) | (1.0, 1.0, 1.0) |\n| Accent text (subtitle) | brand color |\n| Secondary text (tagline) | (0.75, 0.75, 0.80) |\n| Tertiary text (description) | (0.5, 0.5, 0.55) |\n\n**Pass:** ≤ 3 colors + neutrals; exactly one consistent accent; all text meets a contrast ratio of at least **4.5:1** on its actual background (fill, photo, or field — not the page).\n\n### 6.3 Hierarchy\n\nExpands **Axis 2 — Hierarchy**: one element dominates, the reading order is unambiguous, and the eye lands where it should first.\n\n- **One primary element.** Exactly one thing is the hero — the largest, heaviest, highest-contrast element on the page. Everything else is visibly subordinate. Two elements competing at the same visual weight is the most common hierarchy failure: neither wins and the eye stalls.\n- **Rank with the hierarchy chain — `size > weight > color > spacing > position`.** Establish rank primarily by **size**, then **weight**, then **color/contrast**, then the **space around** an element, and only last by position. Don't lean on position alone — a block isn't dominant just because it sits at the top; size/weight/contrast must carry it.\n- **Reading order is deliberate.** The scale steps map to the intended path: hero → supporting → detail. A reader should never hunt for where to start or what comes next. Keep the levels few — ≈3 (primary / secondary / tertiary); more than ~4 competing sizes reads as noise.\n- **Group related, separate unrelated (proximity).** Tight spacing binds a set (eyebrow + headline, label + value); wider spacing sets groups apart (§6.4's ladder). Proximity — not boxes or rules — is the first grouping tool.\n- **Colour serves rank, not decoration.** The single accent (§6.2) marks the one thing it should pull the eye to; spending it on secondary elements flattens the hierarchy.\n- **Express the structure as a block hierarchy.** Proximity is the visual grouping tool; the **block tree** is its structural counterpart. Every logical cluster (eyebrow + headline; label + value; a detail cell; a CTA bar and its text) must be an actual **group block**, and clusters that nest must nest as **groups-of-groups** — no orphan block that belongs to a cluster left as a loose sibling. **In an auto layout flow the cluster is a frame** (a page inside the page), which counts as one cluster here; never group a flow's children, since a group in a flow puts its members on one spot. A page built as one flat list of ungrouped blocks has no expressed hierarchy even when it looks ranked. (Mechanics: `{{skill:api#recipes.md}}`, \"Group blocks\".)\n- **Pass:** exactly one dominant element; no two elements competing at the same level; reading order unambiguous (hero → supporting → detail); rank carried by size/weight/colour/spacing, not position alone; ≈3 (≤4) distinct levels; related items grouped tighter than unrelated ones; the accent reinforces the primary; **and the reading structure is expressed as grouped block clusters (in an auto layout flow, frames), nested where they nest — a flat page of ungrouped siblings fails.**\n\n### 6.4 Composition & grid\n\nExpands **Axis 5 — Composition**: proper margins, a shared grid, a consistent spacing scale, balanced whitespace, and nothing off-canvas or overlapping. Composition is **relative to the canvas** — every number below scales with the page, so it holds across formats.\n\n- **One margin line / shared grid.** Left-aligned elements share one X; centered elements are **mathematically centered** (`pageX + (pageW − blockW)/2`); right-aligned share one right edge. Pick an alignment per element and hold it — a block that's \"almost\" on the margin reads as a mistake.\n- **Page margins = 8–12% of the _shortest_ page dimension.** Key the outer margin to the shortest side so it stays proportional on any aspect (≈86–130px on a 1080-wide canvas). Content lives inside this frame; nothing crosses it except a deliberate full-bleed background.\n- **One spacing scale.** Base unit ≈0.5–1% of page height; use multiples — 1× / 2× / 3× / 4× / 6× — never arbitrary gaps. More space above a heading than below it; tighter within a group than between groups. The spacing ladder (proportion of page height):\n\n | Relationship | Spacing |\n | --------------------------- | ------- |\n | Accent / decoration → title | 0.5–1× |\n | Title → subtitle | 1–2× |\n | Subtitle → body | 2–3× |\n | Between body paragraphs | 1.5–2× |\n | Between content groups | 4–6× |\n\n- **Content inside a container is spaced relative to the _container_, not the page.** The margins and ladder above are **page**-relative; a card, panel, circle, or badge sitting on the page is a **sub-canvas** with its own inner frame. Give every container an **inner padding keyed to its _own_ shortest dimension** (≈6–10% of the container's short side — a chart inside a 400px card is inset from the card's edge, not the page's), and apply the spacing ladder **relative to the container** a group lives in. Nested content spaced by page-relative numbers, or by eye, crowds the container edge (\"text/chart doesn't respect the card's padding,\" \"elements too close to the edges\"). Content must never touch a container's inner edge.\n- **A logo is shown whole, at its own aspect, in the variant that reads on its background.** An image fill defaults to `Cover`, which fills the frame and crops what does not fit: right for a photo, wrong for a mark. Give a logo (and any mark, icon or wordmark image) a frame at its own aspect, from the `width` and `height` its asset carries, or `contentFill: { mode: 'Contain' }`. Scale it uniformly; never stretch, crop or redraw it. When the brand has light and dark versions, pick the one that contrasts with the field behind it (the light one on a dark or brand-colour field). If it has only one and that one does not read, change the field behind the logo, not the logo.\n- **Lock up a mark and its wordmark as one unit.** A logo mark + wordmark, an avatar + name, an icon + label is a **lockup**: fixed relative spacing and alignment between the two, grouped (in an auto layout flow, framed), positioned as a unit. Its internal gap is set by the pair (roughly the wordmark's cap-height), not the page ladder — too tight reads as collision (\"logo text too close to the mark,\" \"name crossing the avatar\"), too loose as two unrelated elements.\n- **Balanced whitespace — no lopsided dead void.** Whitespace is intentional and distributed; the content should occupy or balance the whole canvas. A large empty band on one side — a top-clustered layout that letterboxes the bottom of a tall canvas — fails composition even when every element is individually fine. Balance the content group within the frame; don't top-anchor and leave a void.\n- **Nothing off-canvas or overlapping.** Every element sits fully within the page (bar intentional edge-bleed decoration); no unintended overlap, no clipping at the edges.\n- **Background back-most.** The full-bleed background / photo is the first child (behind everything); structural rules, then accents, then text paint on top — build back-to-front.\n- **Pass:** margins 8–12% of the shortest dimension; every element on the shared grid / one alignment; one consistent spacing scale following the ladder; **content inside every container inset by the container's own inner padding (never touching its edge), ladder applied container-relative; mark+wordmark / avatar+name lockups grouped at a fixed intra-pair gap**; whitespace balanced with no lopsided dead void; nothing off-canvas, clipped, or overlapping; background back-most.\n\n#### Background\n\n<!-- requires:asset_add -->\n- Card / poster with theme → use a generated or imported background image; place back-most via `await engine.design.create(…, { parent: page, index: 0 })` (`{{skill:api#recipes.md}}`, \"Z-order\"). If text contrast suffers, add a semi-transparent overlay.\n<!-- /requires:asset_add -->\n<!-- unless:asset_add -->\n<!-- requires:asset_generate -->\n- Card / poster with theme → use a generated background image or one the design already has; place back-most via `await engine.design.create(…, { parent: page, index: 0 })` (`{{skill:api#recipes.md}}`, \"Z-order\"). If text contrast suffers, add a semi-transparent overlay.\n<!-- /requires:asset_generate -->\n<!-- unless:asset_generate -->\n- Card / poster with theme → use a background image the design or the brief supplies, else a themed colour field or gradient; place back-most via `await engine.design.create(…, { parent: page, index: 0 })` (`{{skill:api#recipes.md}}`, \"Z-order\"). If text contrast suffers, add a semi-transparent overlay.\n<!-- /unless:asset_generate -->\n<!-- /unless:asset_add -->\n- Card without theme → solid color or subtle gradient.\n- Document / form / data → solid color or white.\n\n#### Decorative elements\n\n- Low opacity (15 – 30 %) for background decoration.\n- Echo the existing color system — never introduce new colors for decoration alone.\n- Less is more — one accent bar > three.\n- **Place decoration with an internal geometric relationship parametrically, not by transcribed coordinates.** A ring of stars around a circle, evenly-stepped dashes, dots on an arc, elements mirrored about an axis — anything whose _parts relate to each other_ — is generated from the relationship (`cx + r·cos θ`, a fixed angular/linear step, a reflection), **not** placed as N loose blocks at hand-computed x/y. Absolute-coordinate decoration is what \"drifts\": any re-composition, re-snap, or localization has to reproduce N independent numbers and gets some wrong, so the _relationship_ visibly breaks (stars land in a straight line instead of on the arc; dashes space unevenly). Build the relationship once; then a resize scales `r` and a localization leaves it untouched. Group the generated set so it moves and mirrors as a unit (§6.3, §6.6).\n\n### 6.5 Craft & finish\n\nExpands **Axis 6 — Craft** (no overflow/overlap/blank text, legible chart labels with correct proportions, intentional crops, clean decorative elements). Most of this axis is still to be written on the §6.1 pattern; the written topics are accent components (§6.5.1) and curved type (§6.5.4).\n\n**Two of this section's rules are construction rules, and construction is invisible in a PNG.** A rect-behind-text chip and a native text background render pixel-identically; so do one curved text block and a row of hand-rotated letters. Both are therefore verified by **reading the scene graph**, exactly as grouping is (§6.3) — see the instrumented checks in the `judge` skill. A render-only pass will score them 10 while they are wrong.\n\n#### 6.5.1 Accent components — pills, badges, buttons, tags\n\nA **chip** — a pill/eyebrow, badge, tag, or button — is a short label sitting on its own filled, rounded field. How it's _built_ is a craft concern: a well-made chip binds the field to the label so they never drift.\n\n- **Build it as a text block with a native text background — not a rectangle behind floating text** — rationale: a separate backing shape forces you to hand-measure the label width and re-center it inside the box, and the two fall out of sync on any copy/font/localization change (label creeps off-center, box mis-fits, re-fit math must be redone per variant). Binding the field to the text keeps them locked and reflows correctly when the label changes. _(CoDesign: `setProps(text, { backgroundColor: { enabled: true, color, paddingLeft, paddingRight, paddingTop, paddingBottom, cornerRadius } })` on the text block itself.)_ A separate container block is legitimate **only** for a chip carrying **non-text** content — an icon + text, an image, multiple elements.\n- **Radius matches the chip's intent** — key the corner radius to the field's padded height `h`: **pill / capsule = `h/2`** (true stadium ends — eyebrows, status, filter chips); **badge / tag / button (soft rectangle) = ~0.1–0.25×h** (≈6–12px on a standard control); **`0` = a square tag**. Pick capsule _or_ clearly-soft-rect — never an ambiguous near-capsule that reads as a mistake.\n- **Padding — horizontal roomier than vertical, symmetric per axis** — left = right, top = bottom (unless deliberately asymmetric); horizontal padding **~1.5–2.5× the vertical**; against the label size, horizontal **~0.8–1.5× the font size**, vertical **~0.4–0.7×**. The label must never touch the field edge. Compensate trailing **letter-spacing** on all-caps labels (§6.1.6) — tracking adds space after the last glyph, so trim right padding a hair to keep the label optically centered.\n- **The label is still a label** — it obeys the type rules like any other text: all-caps tracking (§6.1.6), explicit line-height (§6.1.3), and the type-scale minimums (§6.1.2) — a chip never licenses sub-minimum text. Keep it **short (≤3 words)**; a chip is not a text container.\n- **Align by the field edge, not the text.** A chip aligns to the margin line, the grid, and to neighbouring elements (a headline edge, another chip) by its **background field's outer edge** — the padded box — never by its glyph run. The two differ by the padding, so aligning on the text leaves the visible chip off the line by exactly that padding. **The padding expands the field outward from the text frame**, and `engine.design.measure(id)` reports the **unpadded** extent (measured: 17px frame inside a 35px padded field) — so landing a chip's field edge on the margin means positioning the frame at `margin + paddingLeft`, and a true capsule is `cornerRadius: 'pill'`, not `frameHeight / 2`. **Measure the field's real edge** — the outer edge of the padded box (the glyph extent ± its padding), not the label's glyph run alone; and beware that engine glyph metrics can misreport (especially for RTL/Arabic), silently drifting the chip off-margin.\n- **RTL** — the whole chip mirrors to the opposite margin (§6.6), its field edge on that margin.\n- **Color & contrast** — the field uses the design's single accent or a neutral, **never a new color** (§6.2); check the label's contrast **on the fill**, not against the page (§6.2).\n- **Consistency across the design** — all chips share one system: one radius family (all capsules _or_ all the same soft-rect radius — don't mix), one padding scale, one label treatment. One-off chip geometry reads as a defect.\n- **Pass:** every text-only chip is a text block with a native text background (no separate backing rectangle); radius matches intent (pill = h/2; tag/button ~0.1–0.25×h, no ambiguous near-capsule); padding symmetric per axis, horizontal ~1.5–2.5× vertical, label clear of the field edge with trailing tracking compensated; label follows §6.1.2/§6.1.3/§6.1.6 and stays ≤3 words; the chip is aligned to the margin line / grid / neighbouring elements by its **background field edge** (not its text), measured from the field's real rendered edge, and mirrored to the opposite margin in RTL; single-accent (or neutral) fill with the label contrast-checked on the fill; all chips in the design share one radius/padding/label system.\n\n#### 6.5.2 Craft pass checklist\n\nExpands **Axis 6 (Craft) — must score ≥ 8.** Each line is a yes/no the judge skill runs against the rendered output, **except the two lines marked _scene graph_ — those are read from the block tree, because the defect they catch is invisible in a render.** Any \"no\" on an applicable line drops Axis 6 below 8. _(Craft is otherwise still being written; this checklist currently covers §6.5.1 — accent components, §6.5.3 — text fitted to a container, and §6.5.4 — curved type. Construction is medium-agnostic, so there is no Web/Print split.)_\n\n**Both media**\n\n- [ ] _(scene graph)_ Text-only chips (pills/badges/buttons/tags) built as a text block with a native text background — no separate rectangle behind floating text (§6.5.1)\n- [ ] _(scene graph)_ Curved/circular type is ONE text block on a path — not a run of per-letter text blocks rotated into an arc (§6.5.4)\n- [ ] Radius matches intent: pill/capsule = half the padded height; tag/button = small fixed radius (~0.1–0.25×h); no ambiguous near-capsule (§6.5.1)\n- [ ] Padding symmetric per axis, horizontal ~1.5–2.5× vertical, label never touching the field edge; trailing all-caps tracking compensated (§6.5.1, §6.1.6)\n- [ ] Chip label follows label typography — all-caps tracking (§6.1.6), explicit line-height (§6.1.3), ≥ type-scale minimum (§6.1.2) — and stays ≤3 words (§6.5.1)\n- [ ] Chip aligned to margin / grid / neighbouring elements by its background **field edge**, not its text — measured from the field's real rendered edge (§6.5.1, §6.4); whole chip mirrored to the opposite margin in RTL (§6.5.1, §6.6)\n- [ ] Single-accent (or neutral) fill, no new color; label contrast checked on the fill, not the page (§6.5.1, §6.2)\n- [ ] All chips in the design share one radius family, one padding scale, one label treatment (§6.5.1)\n- [ ] Text inside a shape/container fitted within its band to sit fully inside the padded box — no overshoot, no edge-crowding (§6.5.3)\n- [ ] Short labels/numbers in a badge/circle/pill optically centered by cap height, not the frame (§6.5.3)\n- [ ] Image/photo crops: full coverage (no gap in the frame), uniform scale (no stretch), subject inside the window (§6.5.3, resize crop invariants)\n\n#### 6.5.3 Text fitted to a shape or container\n\nA text block and the shape it visually sits in (a circle, pill, card, panel, badge) are two independent blocks with independent sizes. Nothing binds them unless you bind them — so a size picked by eye, or a copy/locale change, breaks the relationship: the type overshoots the circle, or crowds the frame edge.\n\n- **Fit the type to the container — don't set it by eye.** Shrink the block within its **type-scale band** until its **measured** frame fits inside the container's inner box (§6.4 inner padding), with the minimum inset clear on every side. In CoDesign this is a measure-and-shrink loop (`engine.design.measure(id)` vs the container's padded box, step the font size down; or auto/fit-to-frame sizing where available) — the same shape as `localize`'s overflow guard, generalized to any text-in-container. Never let the glyph run cross the container edge; a pricing number must sit **fully inside** its circle.\n- **Center optically, not geometrically — by cap height, not the em box.** Centering a text block by its **frame** centers the em box, which includes ascender headroom and descender depth the glyphs don't use. For a short all-caps or numeric label — exactly what goes in a badge or circle — the inked area then sits **above** the true center and reads as \"hanging low.\" Center by the **cap-height band**: offset the block down by roughly half the (ascender-gap − descender) so the ink, not the box, is centered (derive the offset from `design.font({ uri }).metrics`; §6.1.6 sets all-caps optically for the same reason). Check the render — optical centering is judged by the visible gap above vs below the glyphs.\n- **Pass:** text inside a shape/container is fitted within its band to sit fully inside the container's padded box (no overshoot, no edge-crowding); short labels/numbers in a badge/circle/pill are **optically** centered by cap height (inked area centered, not the frame), verified in the render.\n\n#### 6.5.4 Curved type — text on a path\n\nCircular or arced type — \"EST. 2026\" around a seal, a badge arc, a ribbon, a rosette, type following a curve — is a **native text feature**, not a layout to assemble by hand. Like §6.5.1, this is a construction rule: the two builds can look nearly identical in a render and are told apart by reading the block tree.\n\n- **One text block on a path — never one block per letter.** Set the baseline on the text block itself and let the engine lay the glyphs along it. Hand-placing a text block per character and rotating each into an arc is the anti-pattern: there is no real baseline, so letter spacing is uneven and optically wrong at the arc's ends; the \"text\" is no longer text (uneditable, unsearchable, untranslatable); it re-breaks completely on any copy, font, or locale change; and it ships as N loose blocks that also fail hierarchy's grouping rule (§6.3). _(CoDesign/CE.SDK: `setProps(id, { text: { path, pathOffset, pathFlipped } })` — `pathOffset` for the start position along the curve, `pathFlipped` for the underside; `path: null` clears it.)_\n- **Single contour (one `M`), and the recipe is `text.path` in the `api` skill** — measure the flat glyph-run width with Auto modes before computing `pathOffset`.\n\n### 6.6 Localization & RTL\n\nExpands the localization axis. The base typographic couplings live above: font coverage and no-tofu (§6.1.7), mirrored alignment (§6.1.5), and the content-area line-height conversion (§6.1.3). Everything language-specific — per-script leading bands and diacritic rules (the `localize` skill's `reference/` family files: `latin-expansion.md`, `arabic.md`, `cjk.md`, `vietnamese.md`, `cyrillic.md`), the snap-to-reference workflow, per-language conventions, RTL mirroring, and non-Latin font loading — lives in the `localize` skill.\n\n- **RTL mirroring is selective and operates on groups — keep a do-not-mirror inventory.** Mirroring flips the **reading order** and directional decoration; it is **not** a blanket flip of every block. **Never mirror:** icons, logos, brand/glyph marks, numerals and number strings, charts, photographs, and any pictogram whose handedness carries meaning. **Mirror on the group, not its parts:** a composed icon, a lockup, or a badge moves as one unit — flip the group's position and leave its internal layout intact (or exempt it). Loose sibling parts flipped per-block disassemble the mark (the \"mail icon broke on RTL,\" \"elements moved right / off-center in frames\" defect). Content inside a frame is re-anchored with its frame, never flipped independently. Full inventory + mechanics: `{{skill:localize#reference/arabic.md}}`.\n\n### 6.7 Font pairing by context\n\nSet fonts by family (`text.font: { family, weight }`); the lookup, brand fonts and font files are `{{skill:api#recipes.md}}`, \"Fonts\".\n\n| Context | Style | Pairing |\n| ------------------- | ----------------------------- | ---------------------------------------------- |\n| Wedding invitation | Elegant serif + script accent | Playfair Display + Great Vibes + Source Sans 3 |\n| Restaurant menu | Serif heading + sans body | Cormorant Garamond + Inter |\n| Tech / startup | Clean modern sans | Inter (single family, weight variation) |\n| News / editorial | Traditional, authoritative | EB Garamond + Source Sans 3 |\n| Luxury brand | High-contrast serif | Cormorant Garamond + Montserrat |\n| Children's brand | Rounded, playful | Caveat + Open Sans |\n| E-commerce | Readable, trustworthy | Montserrat + Open Sans |\n| Portfolio / agency | Bold, creative | Playfair Display + Inter |\n| Academic / research | Classic, formal | EB Garamond + Source Sans 3 |\n\n<!-- requires:ly.img.gfonts -->\nEvery family above resolves via the `ly.img.gfonts` lookup. For contexts not listed: apply the contrast principle (serif heading + sans body, or a single family with weight variation). Never use more than 3 families.\n<!-- /requires:ly.img.gfonts -->\n<!-- unless:ly.img.gfonts -->\nThe families above are Google Fonts — use one only if a declared font source carries it, else the closest family that is available. For contexts not listed: apply the contrast principle (serif heading + sans body, or a single family with weight variation). Never use more than 3 families.\n<!-- /unless:ly.img.gfonts -->\n\n## Layout\n\nBuild structure with auto layout, not absolute positions. A container is a frame (a page inside the page) with `layout`\nprops, such as `layout: { mode: 'Vertical', gap: 16 }`. Size each child with `layoutChild` props: `Fill` takes the free\nspace, `Hug` follows the content, and `Fixed` keeps a size.\nText in a flow wraps by itself, so nothing overlaps at another size. Use `layoutChild.ignoreLayout` only for a badge or a background. For several sizes, set `layout: { scaleContent: 'ShorterSide' }` on the page so type and spacing follow the page, and check them with one `engine.design.checkSizes` call. How to build it: `{{skill:auto-layout}}`.\n",
41
+ "docs/judge/design-rules.md": "# Design rules (the full rubric)\n\nThe enforceable design best practices this server's designs are built to and the `judge` skill scores against. Read it before the first `edit` of a design. Section numbers here are canonical: `§6.x` references in every skill resolve to this file.\n\n- **Web vs print** — where the two media diverge (line height, minimum sizes) the rules are split **Web** / **Print**; \"web\" values apply to screen-destined canvases (social posts, banners). An unqualified rule applies to both.\n- **N/A = 10** — a rule that cannot apply to a given design scores N/A, i.e. 10.\n- **Defaults fill silence** — where the brief gives an explicit value, use it; where it is silent, apply this file's defined **default** rather than leaving it unset or letting the engine default stand. Every numeric rule below that names a _default_ (line-height §6.1.3, type scale §6.1.2, measure §6.1.4, all-caps tracking §6.1.6, margins §6.4) is that fallback. A brief value that violates a hard threshold is clamped to it — except line-height, judged by the rendered gap after conversion, never by the raw number (§6.1.3).\n\n### 6.1 Typography\n\nExpands **Axis 3 — Typography** (\"≤3 font families, correct pairing, sizes in band, sane line-spacing and leading, no tofu\"). Every subsection below must hold for Axis 3 to score ≥ 8.\n\n#### 6.1.1 Font families & pairing\n\n- Use **≤3 font families** per design (≤2 preferred); no more than **4 weights** total. Every extra family/weight dilutes hierarchy and reads as inconsistency.\n- Pair by **contrast**, not similarity — e.g. a serif display against a sans body, or one superfamily used across roles. Never pair two families that are almost alike (two humanist sans, two geometric sans).\n- Give every family a defined fallback: an **embedded/outlined** font (print) — and verify glyph coverage for every character in the copy (web/canvas). System substitution silently changes metrics and breaks leading and measure.\n- **Pass:** ≤3 families, ≤4 weights, pairing is by intentional contrast/superfamily, every family verified to cover the copy (print: embedded/outlined).\n\n#### 6.1.2 Type scale & size bands\n\n- Derive all sizes from **one modular scale** (ratio 1.2–1.618; 1.25 is a safe default). No arbitrary one-off sizes.\n- Keep text in clear **bands** — Display/Headline, Subhead, Body, Caption, Fine print — each separated by **≥1 scale step** so the hierarchy is unambiguous (supports Axis 2).\n- Minimum legible sizes:\n - **Web** — body ≥ **16px**, caption ≥ **12px**, never below **11px**.\n - **Print** — body **9–12pt**, caption ≥ **7pt**, never below **5pt**.\n- **Pass:** every size snaps to one modular scale; body ≥ 16px (web) / ≥ 9pt (print); bands are ≥1 step apart and visually distinct.\n\n**Canvas guidance — sizes as % of page height:**\n\n| Role | % of page height | Example for 1080 px page |\n| ----------- | ---------------- | ------------------------ |\n| Headline | 3 – 5 % | 32 – 54 px |\n| Body | 1.5 – 2 % | 16 – 22 px |\n| Caption | 1.2 – 1.5 % | 13 – 16 px |\n| Min legible | — | 14 px |\n\n#### 6.1.3 Line height / leading — the headline rule\n\nLine spacing is the top driver of the \"inconsistent typography\" complaint. Three principles govern it: **explicitness** (every text block carries a deliberately set line-height — never an inherited default), the **inverse rule** (small text needs more line-height; large display needs less), and **consistency** (identical leading across same-band text within one design).\n\n- **Set line-height explicitly on every text block** — including single-line labels, captions, and all-caps titles, not just multi-line body copy. An unset line-height (the engine/CSS default) is a defect even when the block is one line: it silently tracks the font's default metrics, can't be verified against the bands below, and defeats both the consistency and all-caps rules. A one-line all-caps label still takes the tighter all-caps multiplier (**0.9–1.0**); the value is judged by band + intent, not by whether the text happens to wrap. Same-band single-line blocks (e.g. an attribution and a caption in the same face) share their leading just as body blocks do.\n\n> **Authoring in CoDesign / CE.SDK — write line-heights as `{ visual }`.** Every line-height figure in this section is a _visual_ CSS-style multiplier of the font size. The engine's raw `text/lineHeight` is a different scale (it multiplies the font's per-face content area), so a raw number renders looser than it reads. The facade converts for you — write the band value directly:\n>\n> ```js\n> await engine.design.setProps(block, {\n> text: { lineHeight: { visual: 1.2 } }\n> });\n> // read back in the same terms:\n> await engine.design.getProps(block, ['text.lineHeightVisual']); // → 1.2\n> ```\n>\n> The conversion loads the face's metrics itself. A `{ visual }` (or font/size) write reshapes and replays every per-character style range for you. If you ever reshape via the raw APIs instead: **⚠ re-setting the string wipes every per-character style range** — capture with `getProps(id, ['text.ranges'])` and replay (§6.1.9). The judge scores the _rendered_ gap (§6.1.6), and reads it back via `text.lineHeightVisual` — same numbers as the bands below.\n>\n> **⚠ An explicit line-height from the user's brief is a visual target too** — write it as `{ visual }` and judge the rendered gap, never the raw engine number. A prompt asking for all-caps line-height **1.15** is not \"too loose for the 0.9–1.0 band\" until the _rendered_ gap violates §6.1.6; when the prompt names a line-height, the default is to use it.\n\n- **Web (unitless multipliers):**\n - Body **1.4–1.6** (default **1.5**); long-form reading up to **1.65**.\n - Headlines **1.1–1.25** (default **1.1**); large display **≤1.1** (default **1.1**).\n - **All-caps display / headlines** take a **tighter** multiplier than mixed-case — **0.9–1.0** for multi-line — because caps fill only the cap-height band (~70% of the em) and use no descender space; a value that looks tight for mixed-case leaves a descender-sized void between all-caps lines. Judge by the **visual gap** (target ~0.15–0.25× cap height), not the number.\n - **WCAG:** body line-height ≥ **1.5**; paragraph spacing ≥ **2×** the font size.\n- **Print (leading as a unitless multiplier of point size):**\n - Body **1.2–1.45** (default **1.2**). Push toward the low end for dense or large-x-height faces, toward the high end for airy or small type.\n - Headlines **1.0–1.2** (default **1.05**); tight display setting may go slightly negative (**0.95–1.0**).\n - **All-caps titles: 0.9–1.0** (tighter than mixed-case display's 1.0–1.2) — same cap-height reason.\n- **Localized / non-Latin copy — the per-script rules live in the `localize` skill.** Per-script leading bands and diacritic rules — the capital-diacritic all-caps loosening, the marked-capital mixed-case nudge, the localized-display default, and the CJK / Arabic-Naskh / Vietnamese bands — live in the `localize` skill's `reference/` family files (`latin-expansion.md`, `arabic.md`, `cjk.md`, `vietnamese.md`, `cyrillic.md`). All values there are **visual multipliers** — apply this section's content-area conversion like every value here (§6.6).\n- **Tune leading to measure** — longer measure needs more leading; short measure needs less. Never set leading in isolation from line length (§6.1.4).\n- **Consistency** — every body block in one design shares the same leading; every same-band heading shares the same leading.\n- **Pass:** **every text block carries an explicit line-height (incl. single-line & all-caps labels)**; body line-height **1.4–1.6** (web) / **1.2–1.45** (print); headline leading tighter than body; **all-caps titles tighter still (0.9–1.0, web & print), no descender-void between lines**; leading uniform across same-band text; **localized / non-Latin leading set per the `localize` skill's family files**; WCAG body ≥ 1.5 (web).\n\n#### 6.1.4 Measure (line length)\n\n- Set body **measure to 45–75 characters** (~66 ideal for a single column; **40–50** per column in multi-column layouts). Too-long lines lose the return sweep; too-short lines fracture rhythm.\n- On wide canvases, constrain body width — don't let body text run the full canvas width.\n- **Pass:** body measure 45–75 chars (40–50 multi-column); no full-canvas-width body lines.\n\n#### 6.1.5 Alignment, rag, justification\n\n- Default body alignment: **left** (LTR) / **right** (RTL). Avoid centered or justified _running_ text.\n- Justify only with **hyphenation on** and rivers controlled (print); **never justify short measure**.\n- Keep a **soft rag** — no ladders (repeated hyphens/word-shapes down the edge), no line more than ~50% shorter than its neighbors.\n- **Set alignment and a growth anchor explicitly — build to survive a text-length change.** A block that _looks_ centred only because its current string happens to be that width is **not** centred: encode the intent. Give every text block an **explicit horizontal alignment** (`text/horizontalAlignment`), and set its width mode so it **grows from the correct edge** when the string changes length — a label centred under a number stays `Center`; a value aligned to a right margin is right-anchored; a column of labels shares one alignment. This is what makes a design **localizable**: when the German string is 30% longer it must grow symmetrically (or from the anchored edge), not drift right off a left-anchored Auto frame. A source that encodes position instead of intent forces the localizer to re-infer alignment from the render and get it wrong (the \"labels drifted right / SEAT not aligned with BLOCK\" defect originates **in the source**, not the localization). Applies equally to chips (§6.5.1: the field grows with the label).\n- **Pass:** body not centered/justified without cause; RTL layouts mirrored (ties to the RTL axis); rag is soft, no ladders; **every text block carries an explicit alignment and grows from the intended edge on a length change (localization-safe), not an incidental centering that breaks when the copy changes.**\n\n#### 6.1.6 Tracking / letter-spacing & case\n\n- **Don't letter-space lowercase body text.** Tighten large display slightly (**−1% to −3%**).\n- **Loosen all-caps and small-caps — always, and to a defined default.** Never leave all-caps at 0 tracking. **Default +10% (0.1em)** — `case: 'Uppercase'` sets 0.1 em on a block tracked below 0.05 em (raise it to the web floor yourself); acceptable band **+5% to +25% (0.05–0.25em)**, scaled by size and length — tighter (~+8%) for larger/longer strings, looser (up to +25%) for short airy display labels and wide-set wordmarks. On **web**, never below the WCAG floor of **0.12em** — so a web all-caps label defaults to **0.12em**, not 0.1em. This default applies even to one-line labels and even when the prompt is silent on tracking (per \"Defaults fill silence\" at the top of this file).\n- Avoid long strings of **all-caps** — reserve caps for short labels; they slow reading in body copy.\n- **Setting all-caps titles** — caps have no ascender/descender extension, so set them **optically**: pull line-height below the mixed-case display range (see §6.1.3), space to **cap height** rather than the em box, and prefer real small-caps to shrunk-and-tracked caps where the family offers them. Keep all-caps to a line or two of display — never a paragraph.\n- Use **real weights and real italics**, never faux-bold or faux-oblique when the family provides the true cut.\n- **Pass:** body untracked; all-caps loosened to the defined default (**+10%; web ≥0.12em**, band +5–25%) and short, **with line-height tightened per §6.1.3 (no inter-line void)**; no faux styling where a real weight/italic exists.\n\n#### 6.1.7 Micro-typography\n\n- Use **smart punctuation**: curly quotes (\" \" ' '), en dash (–) and em dash (—) correctly, real ellipsis (…). No straight quotes, no `--` for a dash.\n- **No double spaces.** Use **non-breaking spaces** to prevent bad breaks (number + unit, \"Fig. 4\", brand names).\n- **No widows or orphans**; no single-word last line; no hyphen on a paragraph's last line.\n- **No missing glyphs / tofu (□)** and **no clipped** ascenders/descenders — the direct expansion of Axis 3's \"no tofu.\" Verify the chosen font actually covers every character in the copy (critical for localized text).\n- **Pass:** smart punctuation throughout; zero tofu and zero clipping; no widows/orphans in headings or short blocks.\n\n#### 6.1.8 Lists & paragraph structure\n\n**Both rules here are construction rules, and construction is invisible in a PNG** — a hand-built list and a native one render almost identically. They are verified by **reading the scene graph**, like grouping (§6.3), chips (§6.5.1) and curved type (§6.5.4).\n\n- **A multi-line list item hangs — wrapped lines align to the text, not under the marker.** When a bulleted / numbered item wraps, the continuation line must indent to the **text start** (a hanging indent), never fall back under the bullet or number. Text wrapping under its own marker is the most common list defect and reads as broken structure.\n- **One text block holds the whole list — one paragraph per item.** Set the marker with the engine's list feature (`text: { listStyle }` whole-block, `text: { paragraphs: [{ index, listStyle, listLevel }] }` per paragraph). There are three hand-built fakes and all three are wrong: **(1)** a marker typed into the string (`\"• \"`) — no hanging indent; **(2)** a lone marker glyph block beside a left-aligned text frame — the marker is unbound and drifts off its text on any copy, font or locale change; **(3)** one text block per item — there is no list at all, just N loose ungrouped blocks that also fail §6.3. Only the native feature keeps the marker, the gap and the hanging indent bound to the item.\n- **Consistent marker, spacing, and alignment** across every item in a list; nested levels step the indent by one unit (`paragraphs[].listLevel`; `listIndentPerLevel` sets the step).\n- **Multi-paragraph copy is ONE text block with paragraph spacing** — `text/paragraphSpacing`, plus per-paragraph alignment and leading (`setProps(id, { text: { paragraphs: [{ index, horizontalAlignment, lineHeight }] } })`; read them back with `getProps(id, ['text.paragraphs'])`). Write it as `{ em: n }` (**0.4–0.8** is the usable band) or `{ px: n }`; a bare number is the engine's own scale and a pixel-shaped one silently runs the copy off the page. Not blank lines: an empty line is a full line box, so it scales with the font size instead of the spacing ladder (§6.4) and can't be tuned independently. And not N stacked blocks: those don't reflow together, drift apart on any length change, and arrive ungrouped.\n- **Pass:** multi-line items use a hanging indent (wrap aligns to the text, not the marker); every list is the native list feature on a single block, one paragraph per item — no typed markers, no lone marker blocks, no block-per-item; marker style, gap, and indent uniform per list; multi-paragraph copy is one block with real paragraph spacing rather than blank lines or stacked blocks.\n\n#### 6.1.9 Rich text — inline style ranges\n\nEmphasis **inside** a line — an accent-coloured word, a bold lead-in, an inline price, a struck-through old price, a superscript unit or mark — is a **style range on one text block**, never a second text block placed beside the first. Like §6.1.8, this is a construction rule: the two builds render near-identically and are told apart in the block tree.\n\n- **A range is the unit of emphasis.** Character styling is a `text.ranges` entry: `setProps(id, { text: { ranges: [{ from, to, color?, weight?, style?, size?, typeface?, case?, scriptStyle?, baselineShift?, decoration? }] } })`. Read them back with `getProps(id, ['text.ranges'])`.\n- **Superscript and subscript are `scriptStyle: 'Superscript' | 'Subscript'` on a range** — ®, ™, m², 1st, footnote marks, H₂O, a price's cents. Never fake one with a smaller `size` range plus a shift, or with a second block: those drift on every reflow and read as a typo. Tune the look per block with `text: { superscriptFontScale, superscriptVerticalShift }` (and the `subscript…` pair), fractions of the font size.\n- **Baseline shift is the optical nudge, not a superscript.** `baselineShift` on a range (`ranges: [{ from, to, baselineShift: '4px' }]`, design units or a length, + up) moves glyphs off the baseline at their own size, without changing the line height; `text: { baselineShift }` moves the whole text. Use it where the glyph is already the right size but sits wrong: a ® or ™ the font draws at cap height that should hang a little higher or lower, a fraction the font has no glyph for (3/16: a smaller `size` on both numbers, the numerator raised), a bullet, arrow or dingbat centred on the x-height, a currency sign aligned to the numerals. Keep it small — a few percent of the font size. A mark that should also be smaller is a `scriptStyle`, not a size and a shift; fractions are the one place both go on a range. It survives reflow and re-styling like any range.\n- **Splitting a headline into blocks to colour one word is the anti-pattern.** Nothing binds the pieces: the gap between them is hand-set, so it re-breaks on any copy, font or locale change; the phrase stops being one string (unsearchable, and the localizer receives fragments instead of a sentence); and it ships as loose siblings that fail grouping (§6.3). The tell in the scene graph is two or more text blocks sharing a baseline and a face, differing only in colour or weight. **The one exception is keyed text:** a `text.string` key whose string differs from the static one draws in the first run's style, so the accent's range does not render; there the accent is a separate text block, and the pieces share one group (in an auto layout flow, one frame).\n- **All-caps is `text: { case: 'Uppercase' }`, not capitals typed into the string.** The property re-cases at render time, so the string stays real words — translatable, searchable, and correct in scripts that have no case at all (where typed capitals are simply wrong and unrecoverable). Applies to whole blocks and ranges alike; tracking still follows §6.1.6.\n- **Restraint.** One accent per headline, drawn from the single accent colour (§6.2) — a second colour inside a line reads as a mistake, not emphasis. Don't stack emphasis (bold **and** colour **and** underline on the same span). Never fake a weight or an italic with a range when the family has the real cut (§6.1.6).\n- **Underline is not general emphasis** — reserve it for links and annotations, and keep `skipInk` on so descenders stay legible; prefer weight or colour for emphasis in display type. (Skip-ink only _shows_ at a small `underlineOffset`: push the rule far enough below the baseline and it clears the descenders anyway, so the setting is neither visible nor verifiable in the render. Judge it at the default offset.) Strikethrough is for superseded content (an old price), not decoration.\n- **Ranges do not survive a raw string write.** Any raw write to `text/text` — including the same-string reshape a font/size/line-height change requires — wipes every range. `setProps` handles this for you: a string-only write captures and replays existing ranges, and font/size/line-height writes reshape with the ranges preserved. A write that mixes `string` with new styling resets ranges — pass the `ranges` you want kept in the same call. `getTextColors(id)[0]` is run 0 only; re-applying it whole-block is itself the flattening bug. Offsets are indices into the string, so they replay verbatim after a **resize** but never after a **translation** (see the `localize` skill).\n- **Replay every run, not just the emphasised ones.** The wipe collapses the whole string to **run 0's** formatting, not to a neutral base. If run 0 was a bold lead-in, replaying only the accent span leaves the rest of the paragraph bold — and the spot-check that would catch it is the one nobody runs, because reading the _accent_ range back shows exactly what was asked for; it is the **unemphasised** text that changed. Either replay all captured runs, or reset the base style across `0..length` before re-applying the emphasis.\n- **Pass:** every inline emphasis is a range on a single text block — verified in the block tree, not the render (keyed `text.string` excepted: its accent may be a separate block in one group with the rest, in an auto layout flow one frame); no sibling text blocks that differ only in colour/weight on a shared baseline; all-caps carried as `text.case` rather than typed capitals; at most one accent per headline, using the design's single accent colour; no faux weight/italic; underline reserved for links/annotations; and any variant (resized, re-branded, localized) still carries its ranges.\n\n#### 6.1.10 Print-specific rules\n\n- Work in **points/picas** and set text to a **baseline grid** so leading stays consistent across columns and pages.\n- Honor the print minimum sizes (§6.1.2); target **≥300dpi**; **embed or outline** all fonts; keep text out of bleed and inside the safe margin (**~8%**, ties to Composition/Axis 5).\n- **Pass:** baseline-grid aligned; fonts embedded/outlined; sizes ≥ print minimums; text inside the safe area, clear of bleed.\n\n#### 6.1.11 Typography pass checklist\n\nExpands **Axis 3 (Typography) — must score ≥ 8.** Each line is a yes/no the judge skill runs against the rendered output, **except the lines marked _scene graph_ — those are read from the block tree, because the defect they catch is invisible in a render.** Any \"no\" on an applicable line drops Axis 3 below 8.\n\n**Both media**\n\n- [ ] ≤3 font families (`edit` warns), ≤4 weights, pairing by contrast/superfamily (§6.1.1)\n- [ ] Every family has a defined fallback / is embedded-outlined (§6.1.1)\n- [ ] All sizes come from one modular scale; bands ≥1 step apart (§6.1.2)\n- [ ] Line-height set explicitly on every text block, incl. single-line & all-caps labels (§6.1.3)\n- [ ] Headline leading tighter than body; leading uniform across same-band text (§6.1.3)\n- [ ] All-caps titles set by cap-height — line-height tightened, no descender-void between lines (§6.1.3, §6.1.6)\n- [ ] Localized / non-Latin text: leading bands + per-language conventions pass the `localize` skill's family files & checklist (§6.1.3 pointer, §6.6)\n- [ ] Body measure 45–75 chars (40–50 multi-column) (§6.1.4)\n- [ ] Body not centered/justified without cause; rag soft, no ladders (§6.1.5)\n- [ ] Every text block has explicit alignment + grows from the intended edge on a length change (localization-safe), not incidental centering (§6.1.5)\n- [ ] Multi-line list items hang (wrap aligns to text, not the marker); marker/gap/indent uniform (§6.1.8)\n- [ ] _(scene graph)_ Every list is the native list feature on ONE block, one paragraph per item — no typed \"• \", no lone marker blocks, no block-per-item (§6.1.8)\n- [ ] _(scene graph)_ Multi-paragraph copy is one block with `text/paragraphSpacing` — not blank lines, not stacked blocks (§6.1.8)\n- [ ] _(scene graph)_ Inline emphasis is a style range on one block — no sibling blocks differing only in colour/weight on a shared baseline, unless one of the pieces has `text.string` keys and the pieces share one group (in an auto layout flow, one frame) (§6.1.9)\n- [ ] _(scene graph)_ All-caps carried as `text.case`, not capitals typed into the string (§6.1.9, §6.1.6)\n- [ ] ≤1 accent per headline, from the single accent colour; no stacked emphasis; underline only for links/annotations (§6.1.9)\n- [ ] Body untracked; all-caps loosened to default (+10%; web ≥0.12em, band +5–25%) and short; no faux bold/italic (§6.1.6)\n- [ ] Smart punctuation and no double spaces (`edit` warns); non-breaking spaces where needed (§6.1.7)\n- [ ] No widows (`edit` warns) or orphans; zero tofu; no clipped ascenders/descenders (§6.1.7)\n\n**Web**\n\n- [ ] Body ≥16px, caption ≥12px, never <11px (§6.1.2)\n- [ ] Body line-height 1.4–1.6; WCAG body ≥1.5, paragraph spacing ≥2× size (§6.1.3)\n- [ ] All-caps display line-height 0.9–1.0 (tighter than mixed-case display) (§6.1.3)\n\n**Print**\n\n- [ ] Body 9–12pt, caption ≥7pt, never <5pt (§6.1.2)\n- [ ] Body leading 1.2–1.45; headlines 1.0–1.2; all-caps titles 0.9–1.0 (§6.1.3)\n- [ ] Baseline-grid aligned; fonts embedded/outlined; ≥300dpi; text inside ~8% safe margin (§6.1.10)\n\n### 6.2 Color\n\nExpands **Axis 4 — Color** (palette respected, exactly one consistent accent, strong contrast everywhere, esp. text on photos/dark backgrounds).\n\n#### Color hierarchy (text on dark backgrounds)\n\n| Role | RGB |\n| --------------------------- | ------------------ |\n| Primary text (headline) | (1.0, 1.0, 1.0) |\n| Accent text (subtitle) | brand color |\n| Secondary text (tagline) | (0.75, 0.75, 0.80) |\n| Tertiary text (description) | (0.5, 0.5, 0.55) |\n\n**Pass:** ≤ 3 colors + neutrals; exactly one consistent accent; all text meets a contrast ratio of at least **4.5:1** on its actual background (fill, photo, or field — not the page).\n\n### 6.3 Hierarchy\n\nExpands **Axis 2 — Hierarchy**: one element dominates, the reading order is unambiguous, and the eye lands where it should first.\n\n- **One primary element.** Exactly one thing is the hero — the largest, heaviest, highest-contrast element on the page. Everything else is visibly subordinate. Two elements competing at the same visual weight is the most common hierarchy failure: neither wins and the eye stalls.\n- **Rank with the hierarchy chain — `size > weight > color > spacing > position`.** Establish rank primarily by **size**, then **weight**, then **color/contrast**, then the **space around** an element, and only last by position. Don't lean on position alone — a block isn't dominant just because it sits at the top; size/weight/contrast must carry it.\n- **Reading order is deliberate.** The scale steps map to the intended path: hero → supporting → detail. A reader should never hunt for where to start or what comes next. Keep the levels few — ≈3 (primary / secondary / tertiary); more than ~4 competing sizes reads as noise.\n- **Group related, separate unrelated (proximity).** Tight spacing binds a set (eyebrow + headline, label + value); wider spacing sets groups apart (§6.4's ladder). Proximity — not boxes or rules — is the first grouping tool.\n- **Colour serves rank, not decoration.** The single accent (§6.2) marks the one thing it should pull the eye to; spending it on secondary elements flattens the hierarchy.\n- **Express the structure as a block hierarchy.** Proximity is the visual grouping tool; the **block tree** is its structural counterpart. Every logical cluster (eyebrow + headline; label + value; a detail cell; a CTA bar and its text) must be an actual **group block**, and clusters that nest must nest as **groups-of-groups** — no orphan block that belongs to a cluster left as a loose sibling. **In an auto layout flow the cluster is a frame** (a page inside the page), which counts as one cluster here; never group a flow's children, since a group in a flow puts its members on one spot. A page built as one flat list of ungrouped blocks has no expressed hierarchy even when it looks ranked. (Mechanics: `{{skill:api#recipes.md}}`, \"Group blocks\".)\n- **Pass:** exactly one dominant element; no two elements competing at the same level; reading order unambiguous (hero → supporting → detail); rank carried by size/weight/colour/spacing, not position alone; ≈3 (≤4) distinct levels; related items grouped tighter than unrelated ones; the accent reinforces the primary; **and the reading structure is expressed as grouped block clusters (in an auto layout flow, frames), nested where they nest — a flat page of ungrouped siblings fails.**\n\n### 6.4 Composition & grid\n\nExpands **Axis 5 — Composition**: proper margins, a shared grid, a consistent spacing scale, balanced whitespace, and nothing off-canvas or overlapping. Composition is **relative to the canvas** — every number below scales with the page, so it holds across formats.\n\n- **One margin line / shared grid.** Left-aligned elements share one X; centered elements are **mathematically centered** (`pageX + (pageW − blockW)/2`); right-aligned share one right edge. Pick an alignment per element and hold it — a block that's \"almost\" on the margin reads as a mistake.\n- **Page margins = 8–12% of the _shortest_ page dimension.** Key the outer margin to the shortest side so it stays proportional on any aspect (≈86–130px on a 1080-wide canvas). Content lives inside this frame; nothing crosses it except a deliberate full-bleed background.\n- **One spacing scale.** Base unit ≈0.5–1% of page height; use multiples — 1× / 2× / 3× / 4× / 6× — never arbitrary gaps. More space above a heading than below it; tighter within a group than between groups. The spacing ladder (proportion of page height):\n\n | Relationship | Spacing |\n | --------------------------- | ------- |\n | Accent / decoration → title | 0.5–1× |\n | Title → subtitle | 1–2× |\n | Subtitle → body | 2–3× |\n | Between body paragraphs | 1.5–2× |\n | Between content groups | 4–6× |\n\n- **Content inside a container is spaced relative to the _container_, not the page.** The margins and ladder above are **page**-relative; a card, panel, circle, or badge sitting on the page is a **sub-canvas** with its own inner frame. Give every container an **inner padding keyed to its _own_ shortest dimension** (≈6–10% of the container's short side — a chart inside a 400px card is inset from the card's edge, not the page's), and apply the spacing ladder **relative to the container** a group lives in. Nested content spaced by page-relative numbers, or by eye, crowds the container edge (\"text/chart doesn't respect the card's padding,\" \"elements too close to the edges\"). Content must never touch a container's inner edge.\n- **A logo is shown whole, at its own aspect, in the variant that reads on its background.** An image fill defaults to `Cover`, which fills the frame and crops what does not fit: right for a photo, wrong for a mark. Give a logo (and any mark, icon or wordmark image) a frame at its own aspect, from the `width` and `height` its asset carries, or `contentFill: { mode: 'Contain' }`. Scale it uniformly; never stretch, crop or redraw it. When the brand has light and dark versions, pick the one that contrasts with the field behind it (the light one on a dark or brand-colour field). If it has only one and that one does not read, change the field behind the logo, not the logo.\n- **Lock up a mark and its wordmark as one unit.** A logo mark + wordmark, an avatar + name, an icon + label is a **lockup**: fixed relative spacing and alignment between the two, grouped (in an auto layout flow, framed), positioned as a unit. Its internal gap is set by the pair (roughly the wordmark's cap-height), not the page ladder — too tight reads as collision (\"logo text too close to the mark,\" \"name crossing the avatar\"), too loose as two unrelated elements.\n- **Balanced whitespace — no lopsided dead void.** Whitespace is intentional and distributed; the content should occupy or balance the whole canvas. A large empty band on one side — a top-clustered layout that letterboxes the bottom of a tall canvas — fails composition even when every element is individually fine. Balance the content group within the frame; don't top-anchor and leave a void.\n- **Nothing off-canvas or overlapping.** Every element sits fully within the page (bar intentional edge-bleed decoration); no unintended overlap, no clipping at the edges.\n- **Background back-most.** The full-bleed background / photo is the first child (behind everything); structural rules, then accents, then text paint on top — build back-to-front.\n- **Pass:** margins 8–12% of the shortest dimension; every element on the shared grid / one alignment; one consistent spacing scale following the ladder; **content inside every container inset by the container's own inner padding (never touching its edge), ladder applied container-relative; mark+wordmark / avatar+name lockups grouped at a fixed intra-pair gap**; whitespace balanced with no lopsided dead void; nothing off-canvas, clipped, or overlapping; background back-most.\n\n#### Background\n\n<!-- requires:asset_add -->\n- Card / poster with theme → use a generated or imported background image; place back-most via `await engine.design.create(…, { parent: page, index: 0 })` (`{{skill:api#recipes.md}}`, \"Z-order\"). If text contrast suffers, add a semi-transparent overlay.\n<!-- /requires:asset_add -->\n<!-- unless:asset_add -->\n<!-- requires:asset_generate -->\n- Card / poster with theme → use a generated background image or one the design already has; place back-most via `await engine.design.create(…, { parent: page, index: 0 })` (`{{skill:api#recipes.md}}`, \"Z-order\"). If text contrast suffers, add a semi-transparent overlay.\n<!-- /requires:asset_generate -->\n<!-- unless:asset_generate -->\n- Card / poster with theme → use a background image the design or the brief supplies, else a themed colour field or gradient; place back-most via `await engine.design.create(…, { parent: page, index: 0 })` (`{{skill:api#recipes.md}}`, \"Z-order\"). If text contrast suffers, add a semi-transparent overlay.\n<!-- /unless:asset_generate -->\n<!-- /unless:asset_add -->\n- Card without theme → solid color or subtle gradient.\n- Document / form / data → solid color or white.\n\n#### Decorative elements\n\n- Low opacity (15 – 30 %) for background decoration.\n- Echo the existing color system — never introduce new colors for decoration alone.\n- Less is more — one accent bar > three.\n- **Place decoration with an internal geometric relationship parametrically, not by transcribed coordinates.** A ring of stars around a circle, evenly-stepped dashes, dots on an arc, elements mirrored about an axis — anything whose _parts relate to each other_ — is generated from the relationship (`cx + r·cos θ`, a fixed angular/linear step, a reflection), **not** placed as N loose blocks at hand-computed x/y. Absolute-coordinate decoration is what \"drifts\": any re-composition, re-snap, or localization has to reproduce N independent numbers and gets some wrong, so the _relationship_ visibly breaks (stars land in a straight line instead of on the arc; dashes space unevenly). Build the relationship once; then a resize scales `r` and a localization leaves it untouched. Group the generated set so it moves and mirrors as a unit (§6.3, §6.6).\n\n### 6.5 Craft & finish\n\nExpands **Axis 6 — Craft** (no overflow/overlap/blank text, legible chart labels with correct proportions, intentional crops, clean decorative elements). Most of this axis is still to be written on the §6.1 pattern; the written topics are accent components (§6.5.1) and curved type (§6.5.4).\n\n**Two of this section's rules are construction rules, and construction is invisible in a PNG.** A rect-behind-text chip and a native text background render pixel-identically; so do one curved text block and a row of hand-rotated letters. Both are therefore verified by **reading the scene graph**, exactly as grouping is (§6.3) — see the instrumented checks in the `judge` skill. A render-only pass will score them 10 while they are wrong.\n\n#### 6.5.1 Accent components — pills, badges, buttons, tags\n\nA **chip** — a pill/eyebrow, badge, tag, or button — is a short label sitting on its own filled, rounded field. How it's _built_ is a craft concern: a well-made chip binds the field to the label so they never drift.\n\n- **Build it as a text block with a native text background — not a rectangle behind floating text** — rationale: a separate backing shape forces you to hand-measure the label width and re-center it inside the box, and the two fall out of sync on any copy/font/localization change (label creeps off-center, box mis-fits, re-fit math must be redone per variant). Binding the field to the text keeps them locked and reflows correctly when the label changes. _(CoDesign: `setProps(text, { backgroundColor: { enabled: true, color, paddingLeft, paddingRight, paddingTop, paddingBottom, cornerRadius } })` on the text block itself.)_ A separate container block is legitimate **only** for a chip carrying **non-text** content — an icon + text, an image, multiple elements.\n- **Radius matches the chip's intent** — key the corner radius to the field's padded height `h`: **pill / capsule = `h/2`** (true stadium ends — eyebrows, status, filter chips); **badge / tag / button (soft rectangle) = ~0.1–0.25×h** (≈6–12px on a standard control); **`0` = a square tag**. Pick capsule _or_ clearly-soft-rect — never an ambiguous near-capsule that reads as a mistake.\n- **Padding — horizontal roomier than vertical, symmetric per axis** — left = right, top = bottom (unless deliberately asymmetric); horizontal padding **~1.5–2.5× the vertical**; against the label size, horizontal **~0.8–1.5× the font size**, vertical **~0.4–0.7×**. The label must never touch the field edge. Compensate trailing **letter-spacing** on all-caps labels (§6.1.6) — tracking adds space after the last glyph, so trim right padding a hair to keep the label optically centered.\n- **The label is still a label** — it obeys the type rules like any other text: all-caps tracking (§6.1.6), explicit line-height (§6.1.3), and the type-scale minimums (§6.1.2) — a chip never licenses sub-minimum text. Keep it **short (≤3 words)**; a chip is not a text container.\n- **Align by the field edge, not the text.** A chip aligns to the margin line, the grid, and to neighbouring elements (a headline edge, another chip) by its **background field's outer edge** — the padded box — never by its glyph run. The two differ by the padding, so aligning on the text leaves the visible chip off the line by exactly that padding. **The padding expands the field outward from the text frame**, and `engine.design.measure(id)` reports the **unpadded** extent (measured: 17px frame inside a 35px padded field) — so landing a chip's field edge on the margin means positioning the frame at `margin + paddingLeft`, and a true capsule is `cornerRadius: 'pill'`, not `frameHeight / 2`. **Measure the field's real edge** — the outer edge of the padded box (the glyph extent ± its padding), not the label's glyph run alone; and beware that engine glyph metrics can misreport (especially for RTL/Arabic), silently drifting the chip off-margin.\n- **RTL** — the whole chip mirrors to the opposite margin (§6.6), its field edge on that margin.\n- **Color & contrast** — the field uses the design's single accent or a neutral, **never a new color** (§6.2); check the label's contrast **on the fill**, not against the page (§6.2).\n- **Consistency across the design** — all chips share one system: one radius family (all capsules _or_ all the same soft-rect radius — don't mix), one padding scale, one label treatment. One-off chip geometry reads as a defect.\n- **Pass:** every text-only chip is a text block with a native text background (no separate backing rectangle); radius matches intent (pill = h/2; tag/button ~0.1–0.25×h, no ambiguous near-capsule); padding symmetric per axis, horizontal ~1.5–2.5× vertical, label clear of the field edge with trailing tracking compensated; label follows §6.1.2/§6.1.3/§6.1.6 and stays ≤3 words; the chip is aligned to the margin line / grid / neighbouring elements by its **background field edge** (not its text), measured from the field's real rendered edge, and mirrored to the opposite margin in RTL; single-accent (or neutral) fill with the label contrast-checked on the fill; all chips in the design share one radius/padding/label system.\n\n#### 6.5.2 Craft pass checklist\n\nExpands **Axis 6 (Craft) — must score ≥ 8.** Each line is a yes/no the judge skill runs against the rendered output, **except the two lines marked _scene graph_ — those are read from the block tree, because the defect they catch is invisible in a render.** Any \"no\" on an applicable line drops Axis 6 below 8. _(Craft is otherwise still being written; this checklist currently covers §6.5.1 — accent components, §6.5.3 — text fitted to a container, and §6.5.4 — curved type. Construction is medium-agnostic, so there is no Web/Print split.)_\n\n**Both media**\n\n- [ ] _(scene graph)_ Text-only chips (pills/badges/buttons/tags) built as a text block with a native text background — no separate rectangle behind floating text (§6.5.1)\n- [ ] _(scene graph)_ Curved/circular type is ONE text block on a path — not a run of per-letter text blocks rotated into an arc (§6.5.4)\n- [ ] Radius matches intent: pill/capsule = half the padded height; tag/button = small fixed radius (~0.1–0.25×h); no ambiguous near-capsule (§6.5.1)\n- [ ] Padding symmetric per axis, horizontal ~1.5–2.5× vertical, label never touching the field edge; trailing all-caps tracking compensated (§6.5.1, §6.1.6)\n- [ ] Chip label follows label typography — all-caps tracking (§6.1.6), explicit line-height (§6.1.3), ≥ type-scale minimum (§6.1.2) — and stays ≤3 words (§6.5.1)\n- [ ] Chip aligned to margin / grid / neighbouring elements by its background **field edge**, not its text — measured from the field's real rendered edge (§6.5.1, §6.4); whole chip mirrored to the opposite margin in RTL (§6.5.1, §6.6)\n- [ ] Single-accent (or neutral) fill, no new color; label contrast checked on the fill, not the page (§6.5.1, §6.2)\n- [ ] All chips in the design share one radius family, one padding scale, one label treatment (§6.5.1)\n- [ ] Text inside a shape/container fitted within its band to sit fully inside the padded box — no overshoot, no edge-crowding (§6.5.3)\n- [ ] Short labels/numbers in a badge/circle/pill optically centered by cap height, not the frame (§6.5.3)\n- [ ] Image/photo crops: full coverage (no gap in the frame), uniform scale (no stretch), subject inside the window (§6.5.3, resize crop invariants)\n\n#### 6.5.3 Text fitted to a shape or container\n\nA text block and the shape it visually sits in (a circle, pill, card, panel, badge) are two independent blocks with independent sizes. Nothing binds them unless you bind them — so a size picked by eye, or a copy/locale change, breaks the relationship: the type overshoots the circle, or crowds the frame edge.\n\n- **Fit the type to the container — don't set it by eye.** Shrink the block within its **type-scale band** until its **measured** frame fits inside the container's inner box (§6.4 inner padding), with the minimum inset clear on every side. In CoDesign this is a measure-and-shrink loop (`engine.design.measure(id)` vs the container's padded box, step the font size down; or auto/fit-to-frame sizing where available) — the same shape as `localize`'s overflow guard, generalized to any text-in-container. Never let the glyph run cross the container edge; a pricing number must sit **fully inside** its circle.\n- **Center optically, not geometrically — by cap height, not the em box.** Centering a text block by its **frame** centers the em box, which includes ascender headroom and descender depth the glyphs don't use. For a short all-caps or numeric label — exactly what goes in a badge or circle — the inked area then sits **above** the true center and reads as \"hanging low.\" Center by the **cap-height band**: offset the block down by roughly half the (ascender-gap − descender) so the ink, not the box, is centered (derive the offset from `design.font({ uri }).metrics`; §6.1.6 sets all-caps optically for the same reason). Check the render — optical centering is judged by the visible gap above vs below the glyphs.\n- **Pass:** text inside a shape/container is fitted within its band to sit fully inside the container's padded box (no overshoot, no edge-crowding); short labels/numbers in a badge/circle/pill are **optically** centered by cap height (inked area centered, not the frame), verified in the render.\n\n#### 6.5.4 Curved type — text on a path\n\nCircular or arced type — \"EST. 2026\" around a seal, a badge arc, a ribbon, a rosette, type following a curve — is a **native text feature**, not a layout to assemble by hand. Like §6.5.1, this is a construction rule: the two builds can look nearly identical in a render and are told apart by reading the block tree.\n\n- **One text block on a path — never one block per letter.** Set the baseline on the text block itself and let the engine lay the glyphs along it. Hand-placing a text block per character and rotating each into an arc is the anti-pattern: there is no real baseline, so letter spacing is uneven and optically wrong at the arc's ends; the \"text\" is no longer text (uneditable, unsearchable, untranslatable); it re-breaks completely on any copy, font, or locale change; and it ships as N loose blocks that also fail hierarchy's grouping rule (§6.3). _(CoDesign/CE.SDK: `setProps(id, { text: { path, pathOffset, pathFlipped } })` — `pathOffset` for the start position along the curve, `pathFlipped` for the underside; `path: null` clears it.)_\n- **Single contour (one `M`), and the recipe is `text.path` in the `api` skill** — measure the flat glyph-run width with Auto modes before computing `pathOffset`.\n\n### 6.6 Localization & RTL\n\nExpands the localization axis. The base typographic couplings live above: font coverage and no-tofu (§6.1.7), mirrored alignment (§6.1.5), and the content-area line-height conversion (§6.1.3). Everything language-specific — per-script leading bands and diacritic rules (the `localize` skill's `reference/` family files: `latin-expansion.md`, `arabic.md`, `cjk.md`, `vietnamese.md`, `cyrillic.md`), the snap-to-reference workflow, per-language conventions, RTL mirroring, and non-Latin font loading — lives in the `localize` skill.\n\n- **RTL mirroring is selective and operates on groups — keep a do-not-mirror inventory.** Mirroring flips the **reading order** and directional decoration; it is **not** a blanket flip of every block. **Never mirror:** icons, logos, brand/glyph marks, numerals and number strings, charts, photographs, and any pictogram whose handedness carries meaning. **Mirror on the group, not its parts:** a composed icon, a lockup, or a badge moves as one unit — flip the group's position and leave its internal layout intact (or exempt it). Loose sibling parts flipped per-block disassemble the mark (the \"mail icon broke on RTL,\" \"elements moved right / off-center in frames\" defect). Content inside a frame is re-anchored with its frame, never flipped independently. Full inventory + mechanics: `{{skill:localize#reference/arabic.md}}`.\n\n### 6.7 Font pairing by context\n\nSet fonts by family (`text.font: { family, weight }`); the lookup, brand fonts and font files are `{{skill:api#recipes.md}}`, \"Fonts\".\n\n| Context | Style | Pairing |\n| ------------------- | ----------------------------- | ---------------------------------------------- |\n| Wedding invitation | Elegant serif + script accent | Playfair Display + Great Vibes + Source Sans 3 |\n| Restaurant menu | Serif heading + sans body | Cormorant Garamond + Inter |\n| Tech / startup | Clean modern sans | Inter (single family, weight variation) |\n| News / editorial | Traditional, authoritative | EB Garamond + Source Sans 3 |\n| Luxury brand | High-contrast serif | Cormorant Garamond + Montserrat |\n| Children's brand | Rounded, playful | Caveat + Open Sans |\n| E-commerce | Readable, trustworthy | Montserrat + Open Sans |\n| Portfolio / agency | Bold, creative | Playfair Display + Inter |\n| Academic / research | Classic, formal | EB Garamond + Source Sans 3 |\n\n<!-- requires:ly.img.gfonts -->\nEvery family above resolves via the `ly.img.gfonts` lookup. For contexts not listed: apply the contrast principle (serif heading + sans body, or a single family with weight variation). Never use more than 3 families.\n<!-- /requires:ly.img.gfonts -->\n<!-- unless:ly.img.gfonts -->\nThe families above are Google Fonts — use one only if a declared font source carries it, else the closest family that is available. For contexts not listed: apply the contrast principle (serif heading + sans body, or a single family with weight variation). Never use more than 3 families.\n<!-- /unless:ly.img.gfonts -->\n\n## Layout\n\nBuild structure with auto layout, not absolute positions. A container is a frame (a page inside the page) with `layout`\nprops, such as `layout: { mode: 'Vertical', gap: 16 }`. Size each child with `layoutChild` props: `Fill` takes the free\nspace, `Hug` follows the content, and `Fixed` keeps a size.\nText in a flow wraps by itself, so nothing overlaps at another size. Use `layoutChild.ignoreLayout` only for a badge or a background. To put a block back into the flow, set its `horizontalConstraint` to `Start` before `ignoreLayout: false`: back from `Center`, the engine crashes. For several sizes, set `layout: { scaleContent: 'ShorterSide' }` on the page so type and spacing follow the page, and check them with one `engine.design.checkSizes` call. How to build it: `{{skill:auto-layout}}`.\n",
42
42
  "docs/launch-video/SKILL.md": "---\nname: launch-video\ndescription: >-\n Use when turning a project — a repo, an app, a product, a website — into a short launch or\n promo video (15–25 s, mp4): \"make a launch video\", \"brag about this\", \"make a promo for what we\n built\", \"turn this into a video\". Reads the project itself for the story, then builds, animates,\n scores and exports the video with CoDesign.\nrequires: video, export, asset_add\n---\n\n# launch-video\n\nTurn the project in front of you into a 15–25 second launch video: find the story in the project,\nstoryboard it on a beat grid, score it, build it as one animated CoDesign page cut to the music,\nverify it frame by frame, and export an `mp4` plus a poster and share copy.\n\nBuilds on, without restating: the design loop, the video recipe\n(`{{skill:api#video.md}}` — timing, tracks, transitions, video fills, audio), the intake\ncontract (`{{skill:create#intake.md}}`), the `brand` skill (a project's colours, fonts and logo),\nthe `formats` skill and the `judge` gate.\n<!-- requires:asset_generate -->\nGenerating music, sound and voice: the `models` skill.\n<!-- /requires:asset_generate -->\nInspired by the MIT-licensed `/brag` skill (github.com/latent-spaces/brag); this one builds on\nCoDesign instead of HTML.\n\nIf `export format=mp4` refuses because this engine cannot encode video, stop and tell the user\nthe reason it gives — do not ship stills instead.\n\n## Input\n\nThe project is the current working directory unless the user names another. Options, from flags or\nplain language:\n\n| Option | Values | Default |\n| ----------- | ----------------------------------------------------------------- | -------------------------------------- |\n| `tone` | a preset below, or freeform (\"fake Series A launch\", \"museum\") | inferred from the project |\n| `format` | `landscape` 1920×1080 · `vertical` 1080×1920 · `square` 1080×1080 | `landscape` |\n| `duration` | seconds, 15–25 | fitted to the storyboard |\n| `title` | the product name to show | from the project |\n| `music` | a path to an audio file the user owns, `generate`, or `none` | `generate` when signed in, else `none` |\n| `voiceover` | `on` / `off` | `off` |\n| `out` | output folder | `./launch-video/` |\n\n<!-- requires:asset_generate -->\n<!-- requires:login -->\nGenerating sound needs a signed-in account (`login`); without one, use the user's file or ship\nsilent — a silent video is a complete deliverable.\n<!-- /requires:login -->\n<!-- unless:login -->\nWhen generation is refused, use the user's file or ship silent — a silent video is a complete\ndeliverable.\n<!-- /unless:login -->\n<!-- /requires:asset_generate -->\n<!-- unless:asset_generate -->\nThis server cannot generate sound: `music` is the user's file or `none`. A silent video is a\ncomplete deliverable.\n<!-- /unless:asset_generate -->\nIf `out` already holds a previous run, use `out-YYYYMMDD-HHMMSS/` instead of overwriting.\n\n## 1 — Inspect the project\n\nRead the project, not a pitch about it: `README`, package or app metadata, the landing page or docs\ncopy, the changelog, and any logo, icon, screenshot or brand file in the repo. Answer, in your own\nnotes:\n\n1. What is it, in one plain sentence a stranger would repeat?\n2. Who is it for?\n3. What does it do that is surprising or specific — the one thing to lead with?\n4. Two or three highlights, each in the project's **own words** (a real feature, number or claim).\n5. What can be **shown**: real UI, output, screenshots, a logo, a key visual?\n6. Brand: colours, fonts, logo (use the `brand` skill's lookup when the repo carries a kit).\n7. Tone that fits — or the one the user asked for.\n8. The call to action: product name plus how to get it — the real install step and the URL.\n\nIf 1, 3 or 8 cannot be answered from the project, ask once, per the intake contract.\n\n## 2 — Plan the storyboard\n\nStory before motion — read `{{skill:launch-video#reference/story.md}}` first. Decide the one\nline, the viewer's problem, the structure (outcome first, before/after, story spine or hook →\nreveal → proof) and the **proof moment** — the beat where the claim becomes undeniable on screen.\n\nThen pick the tempo — 100–128 BPM suits most launches, so a beat is 0.47–0.6 s — and write\n`<out>/plan.md`: the one line, the structure, the proof moment, the BPM, then a beat table — start,\nend, what is on screen, the exact words, the motion, the transition out. Run the story checks at\nthe end of `story.md` on it; a beat that only says a claim instead of showing it is rewritten or\ncut.\n\n### Make it catchy\n\n- **Hook in the first second.** Open on full-bleed kinetic type or a smash-cut montage of results —\n never a logo on a blank screen, never a slow fade up.\n- **Cut on the grid.** Every cut lands on a beat: 0.5, 1 or 2 bars' worth, at the track's BPM.\n Shots are 0.4–2 s long; vary them — a run of short cuts, then one longer hold.\n- **One big line per beat.** No explanatory captions or HUD chrome. One line, set big — it fills\n the frame; product UI on screen is the exception, simplified so it reads at a glance.\n- **Fill the frame.** Alternate dark beats with full-bleed accent-colour beats so every cut reads.\n- **Move between beats.** A transition on every cut (`{{skill:api#video.md}}`, \"Transitions\n between clips\"), matched to the tone below; the biggest move on the musical accents.\n- **Keep the camera alive.** A slow drift on every shot — `ken_burns` or `crop_zoom` on images; a\n clip-long `zoom` in-animation (its `animation/zoom/fade` off, `Linear` easing) settles type from\n large to rest.\n- **Show, never list.** No run of slogans on colour fields: each beat shows the product doing\n something — its UI or output in action, the input visible before the result.\n\nEvery beat also stays:\n\n- **Readable.** A short label stays at least 0.8 s after it settles; a sentence ~0.3 s per word.\n Keep the pace in motion and cuts, never in flashing text.\n- **Specific.** It must be about this project; \"streamline your workflow\" and other generic SaaS\n lines are banned — use the project's own copy.\n- **Funny only if the project is.** Humour comes from the project, not from trying.\n\nEnd on the call to action and hold it: the product name, the real install step — for a Claude Code\nplugin that is the plugin commands, not a raw `npx` line — and the URL. For CoDesign itself:\n\n```\nclaude plugin marketplace add imgly/codesign\nclaude plugin install codesign@imgly-codesign\ncodesign.co\n```\n\nShow the user the angle and the beat table and wait for a go before building, unless they asked you\nto just make it.\n\n## 3 — Score\n\nSound comes before the build, because the cuts are timed to it. Per\n`{{skill:launch-video#reference/sound.md}}`:\n\n1. Music — generate a track at the planned BPM and length, or `asset_add` the user's file.\n2. Start the video in one `edit`: the page as step 4 describes it (size, `Video` mode, duration)\n with only the music bed on it, ending with `readBeats` at the planned BPM. Save its\n result as `<out>/build/beats.json` — the beat grid and the accents.\n3. Snap the beat table to it: every cut, transition and loop pulse on a beat time; accents get the\n big moves. Update `plan.md` with the snapped times.\n4. A short whoosh or hit per transition; a voiceover and word-timed captions only when\n `voiceover=on`.\n\n## 4 — Build\n\nOne page is the whole video — the one step 3 started with the music: size it per `format`,\nset the scene's `scene: { mode: 'Video' }`, and set the page's `playback.duration` to the storyboard total. Plan the tracks before the first build `edit`: list\nthe layers the storyboard uses (backgrounds, media, headline, subline, chip, …), bottom first, and\nwrite that track plan into `plan.md`. Each layer is ONE track that holds every beat's clip for that\nlayer, one after another; nothing but audio goes on the page directly (`{{skill:api#video.md}}`,\n\"Timeline: one track per layer\"). Tracks also make transitions possible, since only track clips take\nthem. Reuse each track across beats, and make items that enter together in one beat (a list, a row\nof chips) one group clip. Name every block by beat and layer (`b3/bg`, `b3/line`) so later edits\nfind them. When an `edit` result says the clips \"fit on M tracks\", merge them onto that many tracks\nbefore going on.\n\nAnimate entrances, exits and loops on top of the transitions. Type, options, duration, easing and\ntext writing style are all facade keys:\n\n```js\nawait engine.design.setProps(title, {\n animations: {\n in: {\n type: 'slide',\n duration: 0.6,\n easing: 'EaseOutBack',\n writingStyle: 'Block',\n slide: { direction: 4.71 }\n },\n out: { type: 'fade', duration: 0.3, writingStyle: 'Block' }\n }\n});\nawait engine.design.setProps(line, {\n animations: {\n in: { type: 'fade', writingStyle: 'Word', overlap: 0.3, duration: 0.8 }\n }\n});\n```\n\n- Types: entrances and exits `slide` `fade` `blur` `grow` `zoom` `pop` `wipe` `pan` `spin` `baseline`\n `crop_zoom`; text `typewriter_text` `block_swipe_text` `spread_text` `merge_text`; loops\n `*_loop`; images `ken_burns`. Reference: `{{skill:api#animation.md}}`.\n- Word- or letter-wise text reveals: `writingStyle` (`Line` `Word` `Character` `Block`) plus\n `overlap` (0–1) — see `{{skill:api#animation.md}}`. Text blocks only: a group or media clip\n leaves both out. A text that travels as one, like the title above, takes `Block`.\n- Keep entrances 0.3–0.8 s; a beat's exit must finish before its duration ends.\n- Real visuals first: `asset_add` screenshots and the logo. Stock or generated imagery only fills\n what the project cannot show.\n- Audio: the music bed spans the page with a 1 s `fadeOut`; each sound effect is its own audio block\n at its cut (the video recipe).\n\nSave the code of every `edit` you run to `<out>/build/NN-<step>.js`, in order — with the plan and\n`beats.json`, that is what makes the video reproducible.\n\n## 5 — Verify, export, deliver\n\n- `preview` the page with `time` at the middle of every beat. Run the judge loop on those frames:\n every line readable at its hold time, nothing clipped at the canvas edge, the hierarchy clear at\n a glance. Fix in place and re-check.\n- `preview` the middle of every transition too: the still shows it as the mp4 will. One clip whole\n there means the transition is missing or off its cut — fix it before exporting.\n- `export({ format: \"mp4\", blockId: page })` → `<out>/launch.mp4`.\n- Poster: pick the strongest frame from the previews, export it as `png` → `<out>/poster.png`.\n- `export({ format: \"imgly\" })` → `<out>/design.imgly`, the editable source.\n- Write `<out>/share-copy.txt`: a one-line post, a two-sentence post, and alt text.\n- Report: the `mp4` path, its length, and one sentence per beat.\n\n## 6 — Editions\n\nThe exported design is the master. Derive every other edition from it rather than rebuilding:\nthe `resize` skill for `vertical` and `square` cuts (re-check that each beat's line still fills the\nnew frame and clears the edges), the `localize` skill for other languages (captions and the\nvoiceover re-generated in that language, the cut times kept). Export each to\n`<out>/launch-<format>-<lang>.mp4`.\n\n## Tones\n\nPresets set pacing, type personality and transitions; the user's own direction always refines them.\n\n| Tone | Energy | Motion | Transitions |\n| ----------- | ------------------------ | --------------------------------------------------------- | ---------------------------------- |\n| `default` | playful, clean, postable | `pop`, `slide`, quick cuts | `push`, `slide`, `wipe` |\n| `polished` | serious, elegant | `fade`, slow `slide`, `ken_burns`, long holds | `cross-fade`, `cross-blur` |\n| `yc-parody` | deadpan startup energy | big claims, `typewriter_text`, hard cuts | none — hard cuts |\n| `chaotic` | fast, loud, over the top | `zoom`, `spin`, `jump_loop`, short holds (still readable) | `cross-zoom`, `cross-spin`, `chop` |\n| `deadpan` | calm, dry, understated | `fade` only, centred text, silence | `fade-to-black` |\n| `cinematic` | trailer-scale drama | dark palette, `blur` in, slow `grow`, `spread_text` | `fade-to-black`, `cross-warp` |\n| `app-store` | smooth feature cards | device-frame screenshots, `slide` cards, clean sans | `stack`, `slide` |\n",
43
43
  "docs/launch-video/reference/sound.md": "# Sound — music, beat map, effects, voice\n\nReference for the `launch-video` skill: score the video before building it, then cut to the music.\n<!-- requires:asset_generate -->\nGeneration runs through `asset_generate`; how to find a model, read its input schema and pass its\ninputs is in the `models` skill.\n<!-- /requires:asset_generate -->\n<!-- unless:asset_generate -->\nThis server cannot generate audio: score with the user's own files, or ship silent.\n<!-- /unless:asset_generate -->\nPlacing audio in the design is the video recipe (`{{skill:api#video.md}}`).\n\n## Music\n\n<!-- requires:asset_generate -->\n1. Find a music model: `asset_generate({ capability: 'text2audio', source: 'all' })`, then read the\n one you pick with `asset_generate({ model, schema: true })`. Prefer one that takes a length (an\n ElevenLabs music model takes a length and a composition plan).\n2. Ask for exactly what the edit needs — instrumental, the genre, **the BPM**, 4/4, **the length in\n seconds**, a hit on the first downbeat and a clean ending on the last one:\n\n ```js\n await asset_generate({\n model, // from the catalog\n prompt:\n 'Instrumental electronic pop, 120 BPM, 4/4, 20 seconds. Punchy drum hit on the first ' +\n 'downbeat, driving four-on-the-floor, lift at 12 s, clean button ending at 20 s.',\n params: {} // the length / composition-plan fields the schema names\n });\n ```\n\n3. A refusal such as `model_not_supported` costs nothing — take the next music model. A model that\n picks its own length is fine: the audio block's `playback.duration` cuts it to the page.\n4. `asset_add` the user's own file instead when they gave one.\n<!-- /requires:asset_generate -->\n<!-- unless:asset_generate -->\n`asset_add` the user's own track. Its tempo is what it is — the beat map below finds it.\n<!-- /unless:asset_generate -->\n\n## Beat map\n\nThe engine analyses the track itself — no program to install. Put the music on the video page as\nits own audio block first (`playback.timeOffset` where it starts), then run this as the tail of\nthat `edit`, or alone in a read-only `edit` (`render: false`), with the block id and the BPM you\nasked for. Save the returned JSON as `<out>/build/beats.json`.\n\n```js\n// beats.js — the tail of the edit that placed the music, or ONE read-only edit\nconst beats = await engine.design.readBeats(music, { bpm: 120 }); // the BPM you asked for\nreturn { type: 'text', text: JSON.stringify(beats) };\n```\n\n`beats.json` holds `bpm`, `beats` (the grid), `fit`, `accents` (the loudest hits) and `onsets`\n(every hit, `strength` 0–1) — every time in page seconds, from `start` (the block's `timeOffset`)\nfor `duration`. Checked against a click track (tempo within 1 %, beats within one 23 ms analysis\nframe) and a syncopated groove whose loud hits repeat every 1.5 beats (the beat, not the 2:3 alias).\n\n- **Pass the tempo you asked for** as `bpm`. `readBeats` settles related tempos itself — a grid at\n 2/3 or 3/4 of the beat carries less of the attack and loses — and uses `bpm` only to choose\n between halving and doubling, which fit equally well. `bpm` may still differ from the request by a\n few tenths — that is the track's real tempo; use it.\n- **Check `fit`**: `meanErrMs` is how far the hits on the grid sit from it, `onGrid` of `onsets` how\n many sit on it — a click keeps them all, a busy track with off-beat hits about a third. Above\n ~25 ms the lock is loose: listen before cutting to it. `bpm: null` means no rhythm was found (an\n ambient pad): cut on your own grid at the requested BPM.\n- **Snap every planned time to the grid**: each cut, each transition's start, each loop pulse moves\n to the nearest `beats` entry. A bar is four beats — cut on bars for the long holds, on single\n beats for the fast runs.\n- **Accents get the big moves**: the smash cut, the full-bleed colour flip, the biggest transition,\n the call to action's entrance.\n- Keep the cut on the beat and the transition around it: a transition of length `d` into a cut at\n `t` overlaps the two clips from `t` to `t + d`.\n\n## Sound effects\n\nOne whoosh or hit per transition carries the cuts. Generate one or two and reuse them — a\nsound-effects model takes its description in `text` and a `duration_seconds` (0.5–1 s for a\nwhoosh). Place each as its own audio block: a whoosh starting ~0.15 s before its cut so the swell\nlands on it, a hit starting exactly on the accent. Volume 0.5–0.8 under the music.\n\n## Voiceover and captions (optional)\n\nOnly with `voiceover=on`. Write the script to the beat table's timing (~2.5 words per second), then:\n\n1. **Voice** — a text-to-speech model; the voice is an enum in its schema. Its result's `duration`\n says how long the line runs — fit the beat to it, not the other way around. Spell brand names\n the way they are spoken in the voice's text, never in the captions<!-- requires:asset_generate --> (`{{skill:models#audio.md}}`)<!-- /requires:asset_generate -->.\n2. **Word timings** — a speech-to-text model on that file stores every word with `start`/`end`\n seconds in its `transcriptUri`; read them inside `edit` with\n `engine.design.readTranscript(transcriptUri)`. Group words into caption lines of 2–4 words by those timings; each line is a text clip\n on a captions track at its first word's `start`.\n3. **Mix** — duck the music under the voice (`volume` 0.3–0.5 while it speaks).\n\n## Mix-down\n\nMusic spans the page with `fadeOut: { duration: 1 }` so the video never ends on a cut-off note;\nnothing new starts in the last second. Listen to the export, not the parts — check that every\neffect sits on its cut.\n",
44
44
  "docs/launch-video/reference/story.md": "# Story — what makes a launch video convincing\n\nMotion makes a video catchy; the story makes it convincing. A reel of slogans on colour fields\n(\"Fast. Flexible. Powerful.\") is the most common failure: every line is a claim, nothing on screen\nproves it, and nobody is in it. Plan the story before the beats.\n\n## Rules\n\n1. **One idea, one line.** A 15–30 s video sells one promise. Write it as a line a stranger would\n repeat — the iPod was \"1,000 songs in your pocket\", not a spec list. Every beat serves it.\n2. **The viewer is the hero; the product is the guide.** Start from the viewer's problem or\n desire, not the company's pride. Brand-as-hero reads as an ad nobody asked for.\n3. **Show one continuous flow, not feature cards.** Input → key action → result, with the cause\n visible before the effect. An output that appears without its input looks faked.\n4. **Stage a proof moment.** One beat where the claim becomes undeniable on screen — Apple pulled\n the MacBook Air out of an office envelope instead of saying \"thin\". Design the whole video\n around it; it is the beat people remember.\n5. **The product is on screen.** Its real UI, output or an honest recreation of it — never a\n diagram of what it does. Abstract motion proves nothing.\n6. **Before and after.** Contrast makes value obvious at a glance: the old way (slow, painful,\n sped up) against the new one.\n7. **Compress time honestly.** Cut the waiting, keep every state change that matters.\n8. **Concrete words, no jargon.** \"AI-powered\", \"seamless\", \"next-gen\", \"layers, not pixels\" mean\n nothing until something on screen shows them. Prefer verbs the viewer does: \"change\", \"drag\",\n \"translate\".\n9. **Readable with sound off.** Every claim is also on screen as text — most social video plays\n muted.\n10. **End with a direction.** Product name, the real install step, the URL — held.\n\n## Structures that fit 15–30 s\n\n| Structure | Beats (≈ 24 s) |\n| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Outcome first** | the finished result as the hook 0–3 · reveal how it was made 3–6 · the flow, input to editable result 6–16 · it scales / changes 16–20 · line + CTA 20–24 |\n| **Before / after** | the pain, sped up 0–4 · the turn (one prompt, one key) 4–6 · the product doing it 6–16 · proof / payoff 16–20 · CTA 20–24 |\n| **Story spine** | \"Every day…\" 0–4 · \"One day…\" 4–6 · \"Because of that…\" ×2 6–18 · \"Until finally…\" + line 18–21 · CTA 21–24 |\n| **Hook → reveal → proof** | a pattern interrupt 0–2 · the product named 2–5 · 2–3 proofs, each a shown action 5–18 · punchline 18–21 · CTA 21–24 |\n\nPick one and write its name in `plan.md`.\n\n## Hooks for the first second\n\n- **The result first**, then \"how?\" — the finished thing, then rewind to its cause.\n- **The product at 0 s** — its UI mid-action, no intro.\n- **Name the pain** — \"Your launch video takes two weeks.\"\n- **A prompt being typed** — the input on screen from frame one.\n- **Something that should not be possible** — a pattern interrupt that makes the viewer ask.\n\nNever a logo on an empty screen, never a slow fade up.\n\n## Recreating product UI honestly\n\nWhen the product's UI is on screen but not captured, rebuild it as design: the real layout, real\nlabels, real colours, simplified — not an invented interface. Animate it as the real thing\nbehaves: a cursor that moves to a control before it changes, a panel that updates after the\nclick, a terminal whose prompt types before its output prints.\n\n## Check the plan before building\n\n- Can you say the video's one line in one breath?\n- Where is the proof moment, and would someone describe it to a friend?\n- Is every claim shown, or only said? Delete or replace every beat that only says.\n- Is the input visible before each output?\n- Would the video still make sense for this project only — or could any product use it?\n",