### Development Commands Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/README.md Install dependencies and run documentation generation, tests, and attention tests using pnpm. ```bash pnpm install pnpm docs:generate pnpm test pnpm test:attention ``` -------------------------------- ### Install with pnpm Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/README.md Install the package using pnpm. ```bash pnpm add @artifact-kit/pptxgenjs-jsx ``` -------------------------------- ### HTML page with Babel Standalone for browser JSX Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/examples/browser-jsx.html Sets up a local HTML file that uses Babel Standalone to compile JSX in the browser. Includes CSS for layout and a script tag with type="text/babel" and data-presets="react" to enable JSX compilation. ```html Browser JSX to PPTX

Browser JSX to PPTX

This local HTML file uses Babel Standalone to compile JSX in the browser, then downloads a PPTX.

Ready
``` -------------------------------- ### Basic TSX Example with Deck, Slide, Text, RoundRect Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/quickstart.md Use this TSX example to create a presentation with a title slide containing a rounded rectangle and text. It imports the JSX runtime, validates the deck with validateDeck, and renders to a .pptx file. Coordinates are in inches and colors are hex without '#'. ```tsx /** @jsxImportSource @artifact-kit/pptxgenjs-jsx */ import { Deck, Slide, Text, RoundRect, validateDeck, renderPptx } from "@artifact-kit/pptxgenjs-jsx"; const deck = ( Hello PPTX ); const issues = validateDeck(deck); if (issues.some((issue) => issue.level === "error")) throw new Error(JSON.stringify(issues, null, 2)); await renderPptx(deck, { fileName: "example.pptx" }); ``` -------------------------------- ### No JSX Transform with pptxElement Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/quickstart.md Use this TypeScript example when you cannot use JSX. It uses pptxElement to create a deck with a slide containing a text box, then renders to a .pptx file. This avoids the JSX factory conflict with PptxGenJS's 'h' property. ```ts import { Deck, Slide, Text, pptxElement, renderPptx } from "@artifact-kit/pptxgenjs-jsx"; const deck = pptxElement(Deck, { title: "No JSX" }, pptxElement(Slide, { background: { color: "FFFFFF" } }, pptxElement(Text, { text: "Hello", x: 1, y: 1, w: 4, h: 0.5 }) ) ); await renderPptx(deck, { fileName: "no-jsx.pptx" }); ``` -------------------------------- ### Presentation Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Readable alias for Deck. Maps to `new PptxGenJS()`. ```APIDOC ## Component: Presentation ### Description Readable alias for Deck. Maps to `new PptxGenJS()`. ### Maps to `Deck alias` ### Props Interface `DeckProps` ### Usage Use as a readable alias for Deck. ``` -------------------------------- ### Basic JSX usage with Deck, Slide, Text, BarChart Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/README.md Create a deck with JSX, validate it, and render to PPTX. Requires the JSX import source pragma. Throws an error if validation issues are found. ```tsx /** @jsxImportSource @artifact-kit/pptxgenjs-jsx */ import { BarChart, Deck, RoundRect, Slide, Text, renderPptx, validateDeck } from "@artifact-kit/pptxgenjs-jsx"; const deck = ( Q1 Review ); const issues = validateDeck(deck); if (issues.some((issue) => issue.level === "error")) throw new Error(JSON.stringify(issues, null, 2)); await renderPptx(deck, { fileName: "q1-review.pptx" }); ``` -------------------------------- ### Notes Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Speaker notes. Maps to `slide.addNotes`. ```APIDOC ## Component: Notes ### Description Speaker notes. Maps to `slide.addNotes`. ### Maps to `slide.addNotes` ### Props Interface `NotesProps` ### Usage Use for speaker notes. ``` -------------------------------- ### TextRun Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Per-run formatting inside Text. Maps to `PptxGenJS.TextProps[] item`. ```APIDOC ## Component: TextRun ### Description Per-run formatting inside Text. Maps to `PptxGenJS.TextProps[] item`. ### Maps to `PptxGenJS.TextProps[] item` ### Props Interface `TextRunProps` ### Usage Use for per-run formatting inside Text. ``` -------------------------------- ### Slide Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Creates a slide. Maps to `pptx.addSlide`. ```APIDOC ## Component: Slide ### Description Creates a slide. Maps to `pptx.addSlide`. ### Maps to `pptx.addSlide` ### Props Interface `SlideProps` ### Usage Use to create a slide. ``` -------------------------------- ### Deck Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Root component that maps to `new PptxGenJS()`. Use as the root presentation component. ```APIDOC ## Component: Deck ### Description Root component that maps to `new PptxGenJS()`. Use as the root presentation component. ### Maps to `new PptxGenJS()` ### Props Interface `DeckProps` ### Usage Use as the root presentation component. ``` -------------------------------- ### Layout Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Defines an additional custom layout. Maps to `pptx.defineLayout`. ```APIDOC ## Component: Layout ### Description Defines an additional custom layout. Maps to `pptx.defineLayout`. ### Maps to `pptx.defineLayout` ### Props Interface `LayoutProps` ### Usage Use to define an additional custom layout. ``` -------------------------------- ### Browser IIFE with Babel Standalone for HTML-to-PPTX Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/README.md Minimal browser pattern for exporting HTML to PPTX using the IIFE build and Babel Standalone. Requires the HTML to have data-ak-measure markers and a #export-pptx button. Uses measureArtifacts, readSlideLayout, readPptBox, readFontPt, validateDeck, and renderPptx. ```html ``` -------------------------------- ### Cloud Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Cloud shape. Maps to `slide.addShape('cloud')`. ```APIDOC ## Component: Cloud ### Description Cloud shape. Maps to `slide.addShape('cloud')`. ### Maps to `slide.addShape('cloud')` ### Props Interface `ShapeOptionsProps` ### Usage Use for a cloud shape. ``` -------------------------------- ### Master Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Defines a reusable slide master. Maps to `pptx.defineSlideMaster`. ```APIDOC ## Component: Master ### Description Defines a reusable slide master. Maps to `pptx.defineSlideMaster`. ### Maps to `pptx.defineSlideMaster` ### Props Interface `MasterProps` ### Usage Use to define a reusable slide master. ``` -------------------------------- ### Placeholder Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Adds a placeholder inside Master. Maps to `SlideMasterProps.objects[].placeholder`. ```APIDOC ## Component: Placeholder ### Description Adds a placeholder inside Master. Maps to `SlideMasterProps.objects[].placeholder`. ### Maps to `SlideMasterProps.objects[].placeholder` ### Props Interface `PlaceholderProps` ### Usage Use to add a placeholder inside Master. ``` -------------------------------- ### Raw Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Escape hatch component that maps to a custom render callback. Use for newest or unsupported PptxGenJS APIs. ```APIDOC ## Raw ### Description Escape hatch component that maps to a custom render callback. Use for newest or unsupported PptxGenJS APIs. ### Props Interface `RawProps` ``` -------------------------------- ### Section Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Groups nested slides into a PowerPoint section. Maps to `pptx.addSection`. ```APIDOC ## Component: Section ### Description Groups nested slides into a PowerPoint section. Maps to `pptx.addSection`. ### Maps to `pptx.addSection` ### Props Interface `SectionProps` ### Usage Use to group nested slides into a PowerPoint section. ``` -------------------------------- ### Star5 Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Five-point star. Maps to `slide.addShape('star5')`. ```APIDOC ## Component: Star5 ### Description Five-point star. Maps to `slide.addShape('star5')`. ### Maps to `slide.addShape('star5')` ### Props Interface `StarProps` ### Usage Use for a five-point star. ``` -------------------------------- ### Image Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Media component that maps to slide.addImage. Use for images by path or data URI/base64. ```APIDOC ## Image ### Description Media component that maps to `slide.addImage`. Use for images by path or data URI/base64. ### Props Interface `ImageProps` ``` -------------------------------- ### Media Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Media component that maps to slide.addMedia. Use for audio, video, or online media. ```APIDOC ## Media ### Description Media component that maps to `slide.addMedia`. Use for audio, video, or online media. ### Props Interface `MediaProps` ``` -------------------------------- ### Line Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Line or arrow line. Maps to `slide.addShape('line')`. ```APIDOC ## Component: Line ### Description Line or arrow line. Maps to `slide.addShape('line')`. ### Maps to `slide.addShape('line')` ### Props Interface `LineProps` ### Usage Use for a line or arrow line. ``` -------------------------------- ### Star Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Default five-point star. Maps to `slide.addShape('star5')`. ```APIDOC ## Component: Star ### Description Default five-point star. Maps to `slide.addShape('star5')`. ### Maps to `slide.addShape('star5')` ### Props Interface `StarProps` ### Usage Use for a default five-point star. ``` -------------------------------- ### Table Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md The Table component maps to the slide.addTable method and is used to create a PowerPoint table. It accepts TableProps for configuration. ```APIDOC ## Table ### Description The Table component maps to `slide.addTable` and is used to create a PowerPoint table. It accepts `TableProps` for configuration. ### Component `Table` ### Props Interface `TableProps` ### Usage Use this component when you need to add a PowerPoint table to a slide. ``` -------------------------------- ### Plus Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Plus/cross shape. Maps to `slide.addShape('plus')`. ```APIDOC ## Component: Plus ### Description Plus/cross shape. Maps to `slide.addShape('plus')`. ### Maps to `slide.addShape('plus')` ### Props Interface `ShapeOptionsProps` ### Usage Use for a plus/cross shape. ``` -------------------------------- ### Star6 Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Six-point star. Maps to `slide.addShape('star6')`. ```APIDOC ## Component: Star6 ### Description Six-point star. Maps to `slide.addShape('star6')`. ### Maps to `slide.addShape('star6')` ### Props Interface `StarProps` ### Usage Use for a six-point star. ``` -------------------------------- ### Star10 Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Ten-point star. Maps to `slide.addShape('star10')`. ```APIDOC ## Component: Star10 ### Description Ten-point star. Maps to `slide.addShape('star10')`. ### Maps to `slide.addShape('star10')` ### Props Interface `StarProps` ### Usage Use for a ten-point star. ``` -------------------------------- ### Donut Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Donut shape. Maps to `slide.addShape('donut')`. ```APIDOC ## Component: Donut ### Description Donut shape. Maps to `slide.addShape('donut')`. ### Maps to `slide.addShape('donut')` ### Props Interface `ShapeOptionsProps` ### Usage Use for a donut shape. ``` -------------------------------- ### LineChart Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Chart component that maps to slide.addChart('line'). Use for line charts. ```APIDOC ## LineChart ### Description Chart component that maps to `slide.addChart('line')`. Use for line charts. ### Props Interface `LineChartProps` ``` -------------------------------- ### PieChart Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Chart component that maps to slide.addChart('pie'). Use for pie data charts. ```APIDOC ## PieChart ### Description Chart component that maps to `slide.addChart('pie')`. Use for pie data charts. ### Props Interface `PieChartProps` ``` -------------------------------- ### Bar3DChart Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Chart component that maps to slide.addChart('bar3D'). Use for 3D bar charts. ```APIDOC ## Bar3DChart ### Description Chart component that maps to `slide.addChart('bar3D')`. Use for 3D bar charts. ### Props Interface `Bar3DChartProps` ``` -------------------------------- ### Pentagon Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Pentagon shape. Maps to `slide.addShape('pentagon')`. ```APIDOC ## Component: Pentagon ### Description Pentagon shape. Maps to `slide.addShape('pentagon')`. ### Maps to `slide.addShape('pentagon')` ### Props Interface `PentagonProps` ### Usage Use for a pentagon shape. ``` -------------------------------- ### Diamond Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Diamond shape. Maps to `slide.addShape('diamond')`. ```APIDOC ## Component: Diamond ### Description Diamond shape. Maps to `slide.addShape('diamond')`. ### Maps to `slide.addShape('diamond')` ### Props Interface `DiamondProps` ### Usage Use for a diamond shape. ``` -------------------------------- ### TableToSlides Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md The TableToSlides component maps to pptx.tableToSlides and is used to convert an HTML table in the browser/runtime DOM. It accepts TableToSlidesProps for configuration. ```APIDOC ## TableToSlides ### Description The TableToSlides component maps to `pptx.tableToSlides` and is used to convert an HTML table in the browser/runtime DOM. It accepts `TableToSlidesProps` for configuration. ### Component `TableToSlides` ### Props Interface `TableToSlidesProps` ### Usage Use this component to convert an HTML table into slides. ``` -------------------------------- ### PieShape Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Pie-slice shape; not a data chart. Maps to `slide.addShape('pie')`. ```APIDOC ## Component: PieShape ### Description Pie-slice shape; not a data chart. Maps to `slide.addShape('pie')`. ### Maps to `slide.addShape('pie')` ### Props Interface `PieShapeProps` ### Usage Use for a pie-slice shape; not a data chart. ``` -------------------------------- ### Text Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Text box, rich text container, or text inside a shape. Maps to `slide.addText`. ```APIDOC ## Component: Text ### Description Text box, rich text container, or text inside a shape. Maps to `slide.addText`. ### Maps to `slide.addText` ### Props Interface `TextProps` ### Usage Use for text box, rich text container, or text inside a shape. ``` -------------------------------- ### Rect Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Plain rectangle. Maps to `slide.addShape('rect')`. ```APIDOC ## Component: Rect ### Description Plain rectangle. Maps to `slide.addShape('rect')`. ### Maps to `slide.addShape('rect')` ### Props Interface `RectProps` ### Usage Use for a plain rectangle. ``` -------------------------------- ### Star4 Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Four-point star. Maps to `slide.addShape('star4')`. ```APIDOC ## Component: Star4 ### Description Four-point star. Maps to `slide.addShape('star4')`. ### Maps to `slide.addShape('star4')` ### Props Interface `StarProps` ### Usage Use for a four-point star. ``` -------------------------------- ### DoughnutChart Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Chart component that maps to slide.addChart('doughnut'). Use for doughnut charts. ```APIDOC ## DoughnutChart ### Description Chart component that maps to `slide.addChart('doughnut')`. Use for doughnut charts. ### Props Interface `DoughnutChartProps` ``` -------------------------------- ### Star8 Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Eight-point star. Maps to `slide.addShape('star8')`. ```APIDOC ## Component: Star8 ### Description Eight-point star. Maps to `slide.addShape('star8')`. ### Maps to `slide.addShape('star8')` ### Props Interface `StarProps` ### Usage Use for an eight-point star. ``` -------------------------------- ### RadarChart Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Chart component that maps to slide.addChart('radar'). Use for radar charts. ```APIDOC ## RadarChart ### Description Chart component that maps to `slide.addChart('radar')`. Use for radar charts. ### Props Interface `RadarChartProps` ``` -------------------------------- ### BarChart Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Chart component that maps to slide.addChart('bar'). Use for bar or column charts. ```APIDOC ## BarChart ### Description Chart component that maps to `slide.addChart('bar')`. Use for bar or column charts. ### Props Interface `BarChartProps` ``` -------------------------------- ### MediaProps Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/common-props.md Properties for adding media (audio/video) to a slide. Requires either 'link' or 'path'. Extends PositionProps, DataOrPathProps, and ObjectNameProps. ```APIDOC ## MediaProps ### Description Add media (audio/video) to slide @requires either `link` or `path` ### Properties - **type** (MediaType) - Required - Media type - Use 'online' to embed a YouTube video (only supported in recent versions of PowerPoint) - **cover?** (string) - Optional - Cover image @since 3.9.0 @default "play button" image, gray background - **extn?** (string) - Optional - media file extension - use when the media file path does not already have an extension, ex: "/folder/SomeSong" @since 3.9.0 @default extension from file provided - **link?** (string) - Optional - video embed link - works with YouTube - other sites may not show correctly in PowerPoint @example 'https://www.youtube.com/embed/Dph6ynRVyUc' // embed a youtube video - **path?** (string) - Optional - full or local path @example 'https://freesounds/simpsons/bart.mp3' // embed mp3 audio clip from server @example '/sounds/simpsons_haha.mp3' // embed mp3 audio clip from local directory ``` -------------------------------- ### Triangle Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Triangle shape. Maps to `slide.addShape('triangle')`. ```APIDOC ## Component: Triangle ### Description Triangle shape. Maps to `slide.addShape('triangle')`. ### Maps to `slide.addShape('triangle')` ### Props Interface `TriangleProps` ### Usage Use for a triangle shape. ``` -------------------------------- ### ScatterChart Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Chart component that maps to slide.addChart('scatter'). Use for scatter charts. ```APIDOC ## ScatterChart ### Description Chart component that maps to `slide.addChart('scatter')`. Use for scatter charts. ### Props Interface `ScatterChartProps` ``` -------------------------------- ### WriteFileProps Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/all-upstream-props.md Options for writing a presentation to a file. Extends WriteBaseProps. ```APIDOC ## WriteFileProps ### Description Options for writing a presentation to a file. Extends WriteBaseProps. ### Properties - **fileName** (string) - Optional - Export file name @default 'Presentation.pptx' ``` -------------------------------- ### MediaProps Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/all-upstream-props.md Properties for adding media (audio/video) to slides. Requires either 'link' or 'path'. Extends PositionProps, DataOrPathProps, and ObjectNameProps. ```APIDOC ## MediaProps ### Description Properties for adding media (audio/video) to slides. Requires either 'link' or 'path'. Extends PositionProps, DataOrPathProps, and ObjectNameProps. ### Properties - **type** (MediaType) - Required - Media type - Use 'online' to embed a YouTube video (only supported in recent versions of PowerPoint) - **cover?** (string) - Optional - Cover image @since 3.9.0 @default "play button" image, gray background - **extn?** (string) - Optional - media file extension - use when the media file path does not already have an extension, ex: "/folder/SomeSong" @since 3.9.0 @default extension from file provided - **link?** (string) - Optional - video embed link - works with YouTube - other sites may not show correctly in PowerPoint @example 'https://www.youtube.com/embed/Dph6ynRVyUc' // embed a youtube video - **path?** (string) - Optional - full or local path @example 'https://freesounds/simpsons/bart.mp3' // embed mp3 audio clip from server @example '/sounds/simpsons_haha.mp3' // embed mp3 audio clip from local directory ``` -------------------------------- ### LeftRightArrow Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Bidirectional left/right arrow. Maps to `slide.addShape('leftRightArrow')`. ```APIDOC ## Component: LeftRightArrow ### Description Bidirectional left/right arrow. Maps to `slide.addShape('leftRightArrow')`. ### Maps to `slide.addShape('leftRightArrow')` ### Props Interface `ArrowProps` ### Usage Use for a bidirectional left/right arrow. ``` -------------------------------- ### BubbleChart Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Chart component that maps to slide.addChart('bubble'). Use for bubble charts; data can include sizes. ```APIDOC ## BubbleChart ### Description Chart component that maps to `slide.addChart('bubble')`. Use for bubble charts; data can include sizes. ### Props Interface `BubbleChartProps` ``` -------------------------------- ### UpDownArrow Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Bidirectional up/down arrow. Maps to `slide.addShape('upDownArrow')`. ```APIDOC ## Component: UpDownArrow ### Description Bidirectional up/down arrow. Maps to `slide.addShape('upDownArrow')`. ### Maps to `slide.addShape('upDownArrow')` ### Props Interface `ArrowProps` ### Usage Use for a bidirectional up/down arrow. ``` -------------------------------- ### WriteFileProps Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/common-props.md Properties for file write operations in PptxGenJS JSX. Extends WriteBaseProps. ```APIDOC ## WriteFileProps ### Description Properties for file write operations in PptxGenJS JSX. Extends WriteBaseProps. ### Properties - `fileName?` (string) - Optional - Export file name @default 'Presentation.pptx' ``` -------------------------------- ### LineBetween Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Line or arrow from endpoint A to endpoint B; best for SVG line/path endpoints and diagonal or vertical arrows. Maps to `slide.addShape('line')` with normalized x/y/w/h and flipH/flipV. ```APIDOC ## Component: LineBetween ### Description Line or arrow from endpoint A to endpoint B; best for SVG line/path endpoints and diagonal or vertical arrows. Maps to `slide.addShape('line')` with normalized x/y/w/h and flipH/flipV. ### Maps to `slide.addShape('line')` with normalized x/y/w/h and flipH/flipV ### Props Interface `LineBetweenProps` ### Usage Use for a line or arrow from endpoint A to endpoint B; best for SVG line/path endpoints and diagonal or vertical arrows. ``` -------------------------------- ### Chart Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Escape hatch component that maps to slide.addChart(type, data, options). Use for multi-chart or any raw chart type usage. ```APIDOC ## Chart ### Description Escape hatch component that maps to `slide.addChart(type, data, options)`. Use for multi-chart or any raw chart type usage. ### Props Interface `ChartProps` ``` -------------------------------- ### WriteProps Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/common-props.md Properties for write operations in PptxGenJS JSX. Extends WriteBaseProps. ```APIDOC ## WriteProps ### Description Properties for write operations in PptxGenJS JSX. Extends WriteBaseProps. ### Properties - `outputType?` (WRITE_OUTPUT_TYPE) - Optional - Output type - values: 'arraybuffer' \| 'base64' \| 'binarystring' \| 'blob' \| 'nodebuffer' \| 'uint8array' \| 'STREAM' @default 'blob' ``` -------------------------------- ### TableCellProps Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/common-props.md Properties for a table cell. Extends TextBaseProps. ```APIDOC ## TableCellProps ### Description Properties for a table cell. Extends TextBaseProps. ### Properties - **autoPageCharWeight?** (number) - Optional - Auto-paging character weight - adjusts how many characters are used before lines wrap - range: -1.0 to 1.0 @see https://gitbrent.github.io/PptxGenJS/docs/api-tables.html @default 0.0 @example 0.5 // lines are longer (increases the number of characters that can fit on a given line) - **autoPageLineWeight?** (number) - Optional - Auto-paging line weight - adjusts how many lines are used before slides wrap - range: -1.0 to 1.0 @see https://gitbrent.github.io/PptxGenJS/docs/api-tables.html @default 0.0 @example 0.5 // tables are taller (increases the number of lines that can fit on a given slide) - **border?** (BorderProps|[BorderProps,BorderProps,BorderProps,BorderProps]) - Optional - Cell border - **colspan?** (number) - Optional - Cell colspan - **fill?** (ShapeFillProps) - Optional - Fill color @example { color:'FF0000' } // hex color (red) @example { color:'0088CC', transparency:50 } // hex color, 50% transparent @example { color:pptx.SchemeColor.accent1 } // theme color Accent1 - **hyperlink?** (HyperlinkProps) - Optional - PptxGenJS upstream option. - **margin?** (Margin) - Optional - Cell margin (inches) @default 0 - **rowspan?** (number) - Optional - Cell rowspan ``` -------------------------------- ### Chevron Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Chevron shape. Maps to `slide.addShape('chevron')`. ```APIDOC ## Component: Chevron ### Description Chevron shape. Maps to `slide.addShape('chevron')`. ### Maps to `slide.addShape('chevron')` ### Props Interface `ShapeOptionsProps` ### Usage Use for a chevron shape. ``` -------------------------------- ### RightTriangle Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Right triangle. Maps to `slide.addShape('rtTriangle')`. ```APIDOC ## Component: RightTriangle ### Description Right triangle. Maps to `slide.addShape('rtTriangle')`. ### Maps to `slide.addShape('rtTriangle')` ### Props Interface `TriangleProps` ### Usage Use for a right triangle. ``` -------------------------------- ### TableRow Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md The TableRow component maps to PptxGenJS.TableRow and is used to declaratively define a row inside a Table. It accepts TableRowProps for configuration. ```APIDOC ## TableRow ### Description The TableRow component maps to `PptxGenJS.TableRow` and is used to declaratively define a row inside a Table. It accepts `TableRowProps` for configuration. ### Component `TableRow` ### Props Interface `TableRowProps` ### Usage Use this component to define a row within a Table component. ``` -------------------------------- ### UpArrow Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Up arrow block shape. Maps to `slide.addShape('upArrow')`. ```APIDOC ## Component: UpArrow ### Description Up arrow block shape. Maps to `slide.addShape('upArrow')`. ### Maps to `slide.addShape('upArrow')` ### Props Interface `ArrowProps` ### Usage Use for an up arrow block shape. ``` -------------------------------- ### CustomGeometry Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Editable custom path geometry, especially SVG path primitives converted to PowerPoint points. Maps to `slide.addShape('custGeom')`. ```APIDOC ## Component: CustomGeometry ### Description Editable custom path geometry, especially SVG path primitives converted to PowerPoint points. Maps to `slide.addShape('custGeom')`. ### Maps to `slide.addShape('custGeom')` ### Props Interface `CustomGeometryProps` ### Usage Use for editable custom path geometry, especially SVG path primitives converted to PowerPoint points. ``` -------------------------------- ### WriteProps Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/all-upstream-props.md Options for writing a presentation to a stream or buffer. Extends WriteBaseProps. ```APIDOC ## WriteProps ### Description Options for writing a presentation to a stream or buffer. Extends WriteBaseProps. ### Properties - **outputType** (WRITE_OUTPUT_TYPE) - Optional - Output type - values: 'arraybuffer' \| 'base64' \| 'binarystring' \| 'blob' \| 'nodebuffer' \| 'uint8array' \| 'STREAM' @default 'blob' ``` -------------------------------- ### AreaChart Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Chart component that maps to slide.addChart('area'). Use for area charts. ```APIDOC ## AreaChart ### Description Chart component that maps to `slide.addChart('area')`. Use for area charts. ### Props Interface `AreaChartProps` ``` -------------------------------- ### IChartMulti Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/chart-props.md Interface for multi-chart options. ```APIDOC ## Interface: IChartMulti ### Description Interface for multi-chart options. ### Properties - `type` (CHART_NAME) - Required - Chart type. - `data` (OptsChartData[]) - Required - Chart data series. - `options` (IChartOpts) - Required - Chart options. ``` -------------------------------- ### Wrapper Usage: Measure Helpers Before Building Deck Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/measure-contract.md Uses measure helpers before building the deck. Requires the @artifact-kit/pptxgenjs-jsx import source and calls await measureArtifacts() before read* calls. Do not read measured values at module parse time; put them inside a click handler or async render function. ```tsx /** @jsxImportSource @artifact-kit/pptxgenjs-jsx */ import { Deck, Slide, Text, Rect, measureArtifacts, readFontPt, readPptBox, readSlideLayout, renderPptx, } from "@artifact-kit/pptxgenjs-jsx"; await measureArtifacts(); const layout = readSlideLayout("attention"); const title = readPptBox("title"); const titleFont = readFontPt("title"); const deck = ( Attention 机制:结构与计算图 ); await renderPptx(deck, { fileName: "attention.pptx" }); ``` -------------------------------- ### Heart Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Heart shape. Maps to `slide.addShape('heart')`. ```APIDOC ## Component: Heart ### Description Heart shape. Maps to `slide.addShape('heart')`. ### Maps to `slide.addShape('heart')` ### Props Interface `ShapeOptionsProps` ### Usage Use for a heart shape. ``` -------------------------------- ### HyperlinkProps Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/common-props.md Defines hyperlink properties for shapes, allowing links to slides or URLs with optional tooltips. ```APIDOC ## HyperlinkProps ### Description Defines hyperlink properties for shapes, allowing links to slides or URLs with optional tooltips. ### Properties - **slide** (number) - Optional - Slide number to link to - **url** (string) - Optional - Url to link to - **tooltip** (string) - Optional - Hyperlink Tooltip ``` -------------------------------- ### IChartPropsChartPie Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/chart-props.md Configuration options for pie charts, including data effects and the angle of the first slice. ```APIDOC ## IChartPropsChartPie ### Description Configuration options for pie charts, including data effects and the angle of the first slice. ### Properties - `dataNoEffects?` (boolean) - Optional - PptxGenJS upstream option. - `firstSliceAng?` (number) - Optional - MS-PPT > Format chart > Format Data Series > Series Options > "Angle of first slice" - angle (degrees) - range: 0-359 @since v3.4.0 @default 0 ``` -------------------------------- ### IChartOpts Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/chart-props.md Comprehensive options for chart configuration, combining multiple chart prop interfaces and additional properties. ```APIDOC ## IChartOpts ### Description Comprehensive options for chart configuration, combining multiple chart prop interfaces and additional properties. ### Extends - IChartPropsAxisCat - IChartPropsAxisSer - IChartPropsAxisVal - IChartPropsBase - IChartPropsChartBar - IChartPropsChartDoughnut - IChartPropsChartLine - IChartPropsChartPie - IChartPropsChartRadar - IChartPropsDataLabel - IChartPropsDataTable - IChartPropsLegend - IChartPropsTitle - ObjectNameProps - OptsChartGridLine - PositionProps ### Properties - `altText?` (string) - Optional - Alt Text value ("How would you describe this object and its contents to someone who is blind?") - PowerPoint: [right-click on a chart] > "Edit Alt Text..." ``` -------------------------------- ### OptsChartGridLine Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/chart-props.md Interface for chart gridline options. ```APIDOC ## Interface: OptsChartGridLine ### Description Interface for chart gridline options. ### Properties - `cap?` (ChartLineCap) - Optional - Line cap type. Default: flat. - `color?` (HexColor) - Optional - Gridline color (hex). Example: 'FF3399'. - `size?` (number) - Optional - Gridline size (points). - `style?` ('solid'|'dash'|'dot'|'none') - Optional - Gridline style. ``` -------------------------------- ### DataOrPathProps Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/common-props.md Defines properties for specifying image data either via a URL/path or as a base64-encoded string. Either `data` or `path` is required. ```APIDOC ## DataOrPathProps ### Description Defines properties for specifying image data either via a URL/path or as a base64-encoded string. Either `data` or `path` is required. ### Properties - **path** (string) - Optional - URL or relative path. Example: 'https://onedrives.com/myimg.png' (URL) or '/home/gitbrent/images/myimg.png' (local path) - **data** (string) - Optional - base64-encoded string - Useful for avoiding potential path/server issues. Example: 'image/png;base64,iVtDafDrBF[...]=' (pre-encoded image in base-64) ``` -------------------------------- ### BackgroundProps Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/common-props.md Defines background properties for shapes or slides. Extends DataOrPathProps and ShapeFillProps. Includes deprecated properties for backward compatibility. ```APIDOC ## BackgroundProps ### Description Defines background properties for shapes or slides. Extends DataOrPathProps and ShapeFillProps. Includes deprecated properties for backward compatibility. ### Properties - **fill** (HexColor) - Optional - Color (hex format). Deprecated since v3.6.0 - use `ShapeFillProps` instead. - **src** (string) - Optional - source URL. Deprecated since v3.6.0 - use `DataOrPathProps` instead - remove in v4.0.0. ``` -------------------------------- ### IChartOpts Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/all-upstream-props.md Defines the comprehensive options for a chart. Extends multiple chart-related interfaces and includes properties for alt text and other chart configuration. ```APIDOC ## IChartOpts ### Description Defines the comprehensive options for a chart. Extends multiple chart-related interfaces and includes properties for alt text and other chart configuration. ### Properties - `altText?` (string) - Optional - Alt Text value ("How would you describe this object and its contents to someone who is blind?") - PowerPoint: [right-click on a chart] > "Edit Alt Text..." ``` -------------------------------- ### ShapeFillProps Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/reference/shape-props.md Interface for shape fill properties. Extends nothing. Provides color, transparency, and fill type. ```APIDOC ## ShapeFillProps ### Description Interface for shape fill properties. Extends nothing. Provides color, transparency, and fill type. ### Properties - `color?` (Color) - Optional - Fill color - HexColor or ThemeColor. Example: 'FF0000' // hex color (red) - `transparency?` (number) - Optional - Transparency (percent). Range: 0-100. Default: 0 - `type?` ('none'|'solid') - Optional - Fill type. Default: 'solid' - `alpha?` (number) - Optional - Transparency (percent). Deprecated v3.3.0 - use `transparency` ``` -------------------------------- ### RightArrow Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Right arrow block shape. Maps to `slide.addShape('rightArrow')`. ```APIDOC ## Component: RightArrow ### Description Right arrow block shape. Maps to `slide.addShape('rightArrow')`. ### Maps to `slide.addShape('rightArrow')` ### Props Interface `ArrowProps` ### Usage Use for a right arrow block shape. ``` -------------------------------- ### Hexagon Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Hexagon shape. Maps to `slide.addShape('hexagon')`. ```APIDOC ## Component: Hexagon ### Description Hexagon shape. Maps to `slide.addShape('hexagon')`. ### Maps to `slide.addShape('hexagon')` ### Props Interface `HexagonProps` ### Usage Use for a hexagon shape. ``` -------------------------------- ### Shape Source: https://github.com/artifact-kit/pptxgenjs-jsx/blob/main/docs/llm/component-selection.md Escape hatch component that maps to slide.addShape(shape, options). Use for any PptxGenJS shape not exposed as a dedicated component. ```APIDOC ## Shape ### Description Escape hatch component that maps to `slide.addShape(shape, options)`. Use for any PptxGenJS shape not exposed as a dedicated component. ### Props Interface `ShapeProps` ```