@allyhub/sdk 0.11.0 → 0.13.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 (158) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/node_modules/@allyhub/audio/dist/plan.d.ts +3 -0
  3. package/dist/node_modules/@allyhub/audio/dist/render.js +1 -1
  4. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  5. package/dist/node_modules/@allyhub/chart/dist/chart-file.d.ts +2 -0
  6. package/dist/node_modules/@allyhub/chart/dist/chart-file.js +1 -1
  7. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +3 -2
  8. package/dist/node_modules/@allyhub/chart/dist/chart.d.ts +5 -12
  9. package/dist/node_modules/@allyhub/chart/dist/chart.js +2 -1
  10. package/dist/node_modules/@allyhub/chart/dist/color.d.ts +37 -0
  11. package/dist/node_modules/@allyhub/chart/dist/color.js +2 -0
  12. package/dist/node_modules/@allyhub/chart/dist/index.d.ts +1 -0
  13. package/dist/node_modules/@allyhub/chart/dist/index.js +1 -1
  14. package/dist/node_modules/@allyhub/chart/dist/svg.js +1 -1
  15. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  16. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  17. package/dist/node_modules/@allyhub/formats/dist/data/deck-code.d.ts +130 -0
  18. package/dist/node_modules/@allyhub/formats/dist/data/deck-code.js +1 -1
  19. package/dist/node_modules/@allyhub/formats/dist/data/gen.d.ts +3 -1
  20. package/dist/node_modules/@allyhub/formats/dist/data/gen.js +1 -1
  21. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +512 -166
  22. package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
  23. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +2523 -136
  24. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  25. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +931 -87
  26. package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
  27. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  28. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  29. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  30. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  31. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  32. package/dist/node_modules/@allyhub/ooxml/dist/color.d.ts +11 -0
  33. package/dist/node_modules/@allyhub/ooxml/dist/color.js +1 -1
  34. package/dist/node_modules/@allyhub/ooxml/dist/ext.d.ts +43 -0
  35. package/dist/node_modules/@allyhub/ooxml/dist/ext.js +1 -1
  36. package/dist/node_modules/@allyhub/ooxml/dist/index.d.ts +2 -1
  37. package/dist/node_modules/@allyhub/ooxml/dist/index.js +1 -1
  38. package/dist/node_modules/@allyhub/ooxml/dist/transform.d.ts +13 -0
  39. package/dist/node_modules/@allyhub/ooxml/dist/transform.js +2 -0
  40. package/dist/node_modules/@allyhub/ooxml/package.json +5 -1
  41. package/dist/node_modules/@allyhub/piece/dist/gen.d.ts +4 -4
  42. package/dist/node_modules/@allyhub/piece/dist/media.d.ts +2 -2
  43. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  44. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +49 -5
  45. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  46. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +56 -0
  47. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  48. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +72 -9
  49. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  50. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +35 -20
  51. package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
  52. package/dist/node_modules/@allyhub/protocol/dist/errors.d.ts +7 -0
  53. package/dist/node_modules/@allyhub/protocol/dist/errors.js +2 -0
  54. package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +328 -0
  55. package/dist/node_modules/@allyhub/protocol/dist/events.js +2 -0
  56. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +28 -2
  57. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  58. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +2 -0
  59. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  60. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +6 -6
  61. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +2 -2
  62. package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
  63. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +69 -6
  64. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  65. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +9 -9
  66. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  67. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  68. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  69. package/dist/node_modules/@allyhub/sheet/dist/annotations.d.ts +14 -0
  70. package/dist/node_modules/@allyhub/sheet/dist/annotations.js +2 -0
  71. package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
  72. package/dist/node_modules/@allyhub/sheet/dist/api/index.d.ts +1 -1
  73. package/dist/node_modules/@allyhub/sheet/dist/api/index.js +1 -1
  74. package/dist/node_modules/@allyhub/sheet/dist/api/rules.d.ts +24 -0
  75. package/dist/node_modules/@allyhub/sheet/dist/api/rules.js +1 -1
  76. package/dist/node_modules/@allyhub/sheet/dist/api/styles.d.ts +12 -0
  77. package/dist/node_modules/@allyhub/sheet/dist/api/styles.js +1 -1
  78. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.d.ts +3 -1
  79. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
  80. package/dist/node_modules/@allyhub/sheet/dist/arrange.d.ts +28 -1
  81. package/dist/node_modules/@allyhub/sheet/dist/arrange.js +1 -1
  82. package/dist/node_modules/@allyhub/sheet/dist/data-tools.d.ts +42 -0
  83. package/dist/node_modules/@allyhub/sheet/dist/data-tools.js +2 -0
  84. package/dist/node_modules/@allyhub/sheet/dist/edit.d.ts +43 -2
  85. package/dist/node_modules/@allyhub/sheet/dist/edit.js +1 -1
  86. package/dist/node_modules/@allyhub/sheet/dist/fill.d.ts +10 -0
  87. package/dist/node_modules/@allyhub/sheet/dist/fill.js +1 -1
  88. package/dist/node_modules/@allyhub/sheet/dist/filter.js +1 -1
  89. package/dist/node_modules/@allyhub/sheet/dist/formula/rewrite.d.ts +14 -0
  90. package/dist/node_modules/@allyhub/sheet/dist/formula/rewrite.js +1 -1
  91. package/dist/node_modules/@allyhub/sheet/dist/html.js +10 -10
  92. package/dist/node_modules/@allyhub/sheet/dist/index.d.ts +6 -1
  93. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  94. package/dist/node_modules/@allyhub/sheet/dist/outline.d.ts +30 -0
  95. package/dist/node_modules/@allyhub/sheet/dist/outline.js +2 -0
  96. package/dist/node_modules/@allyhub/sheet/dist/rich.d.ts +29 -0
  97. package/dist/node_modules/@allyhub/sheet/dist/rich.js +2 -0
  98. package/dist/node_modules/@allyhub/sheet/dist/rules.js +1 -1
  99. package/dist/node_modules/@allyhub/sheet/dist/table-style.d.ts +6 -0
  100. package/dist/node_modules/@allyhub/sheet/dist/table-style.js +1 -1
  101. package/dist/node_modules/@allyhub/sheet/dist/table-styles.js +1 -1
  102. package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +5 -1
  103. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  104. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  105. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  106. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.d.ts +17 -1
  107. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
  108. package/dist/node_modules/@allyhub/sheet/dist/xlsx/runs.d.ts +56 -0
  109. package/dist/node_modules/@allyhub/sheet/dist/xlsx/runs.js +2 -0
  110. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.d.ts +6 -0
  111. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
  112. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  113. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  114. package/dist/node_modules/@allyhub/slides-core/dist/animation.d.ts +117 -21
  115. package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
  116. package/dist/node_modules/@allyhub/slides-core/dist/api.d.ts +181 -30
  117. package/dist/node_modules/@allyhub/slides-core/dist/api.js +3 -3
  118. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  119. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.d.ts +28 -2
  120. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
  121. package/dist/node_modules/@allyhub/slides-core/dist/check.js +1 -1
  122. package/dist/node_modules/@allyhub/slides-core/dist/enums.d.ts +222 -4
  123. package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
  124. package/dist/node_modules/@allyhub/slides-core/dist/file.d.ts +6 -0
  125. package/dist/node_modules/@allyhub/slides-core/dist/file.js +3 -3
  126. package/dist/node_modules/@allyhub/slides-core/dist/generated/table-styles.d.ts +3 -0
  127. package/dist/node_modules/@allyhub/slides-core/dist/generated/table-styles.js +2 -0
  128. package/dist/node_modules/@allyhub/slides-core/dist/index.d.ts +3 -0
  129. package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
  130. package/dist/node_modules/@allyhub/slides-core/dist/merge.js +1 -1
  131. package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +98 -10
  132. package/dist/node_modules/@allyhub/slides-core/dist/numbering.d.ts +6 -0
  133. package/dist/node_modules/@allyhub/slides-core/dist/numbering.js +2 -0
  134. package/dist/node_modules/@allyhub/slides-core/dist/office.d.ts +53 -0
  135. package/dist/node_modules/@allyhub/slides-core/dist/office.js +1 -1
  136. package/dist/node_modules/@allyhub/slides-core/dist/patterns.d.ts +8 -0
  137. package/dist/node_modules/@allyhub/slides-core/dist/patterns.js +2 -0
  138. package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +36 -6
  139. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  140. package/dist/node_modules/@allyhub/slides-core/dist/script.d.ts +11 -0
  141. package/dist/node_modules/@allyhub/slides-core/dist/script.js +2 -2
  142. package/dist/node_modules/@allyhub/slides-core/dist/sdk.d.ts +1 -1
  143. package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +1 -1
  144. package/dist/node_modules/@allyhub/slides-core/dist/table-style.d.ts +48 -0
  145. package/dist/node_modules/@allyhub/slides-core/dist/table-style.js +2 -0
  146. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  147. package/dist/node_modules/@allyhub/video-core/dist/mix-plan.js +1 -1
  148. package/dist/node_modules/@allyhub/video-core/dist/timeline.d.ts +4 -0
  149. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  150. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  151. package/docs/defaults.md +78 -4
  152. package/docs/image.md +1 -1
  153. package/docs/pictures.md +1 -1
  154. package/docs/project.md +1 -1
  155. package/docs/sheets.md +19 -9
  156. package/docs/slides.md +30 -16
  157. package/docs/speech.md +1 -1
  158. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{Animations as l,Background as h,Cell as d,ColorFormat as p,Column as c,FillFormat as m,Font as y,FreeformBuilder as _,GeneratedSlide as w,Generator as f,GroupShape as u,Hyperlink as g,LineFormat as b,ListLevel as S,ShadowFormat as A,GradientStop as P,Paragraph as E,Placeholders as O,Presentation as L,Row as C,Run as x,Shape as R,ShapeCollection as M,SlideLayout as T,SlideLayouts as k,SlideMaster as H,SlideMasters as v,Table as I,TextFrame as G,TextStyles as F}from"./api.js";import{CategoryChartData as B,Chart as D,XyChartData as N,XySeriesData as j,ChartAxis as W,ChartFormat as z,ChartLegend as X,MajorGridlines as Z,TickLabels as U,ChartPlot as Y,ChartPoint as V,ChartSeries as K,DataLabels as q}from"./chart-api.js";import{MSO_ANCHOR as J,MSO_ARROWHEAD as Q,MSO_ARROWHEAD_SIZE as $,MSO_AUTO_SIZE as ee,MSO_CONNECTOR as te,MSO_FILL as ae,MSO_LINE as oe,MSO_SHAPE as se,MSO_SHAPE_TYPE as re,MSO_THEME_COLOR as ie,PP_ALIGN as ne,PP_PLACEHOLDER as le,THEME_FONT as he,XL_CHART_TYPE as de,XL_LABEL_POSITION as pe,XL_LEGEND_POSITION as ce}from"./enums.js";import{publicNames as s}from"./strict.js";const a={Presentation:{theme:"The theme's colours (dk1…folHlink) and fonts (major, minor), over the project's look.",components:"components.add(name, { props, layers }): a shape drawn by code, by the layer contract.",generators:"generators.add(name, (g) => { g.data(path); g.slides.add_slide(layout, id) … }): slides made from data, placed in the slides file as one block."},SlideMasters:{add:"add(name): a master, with Office's text styles and no placeholders yet."},_Cell:{borders:"Its edges: { left, right, top, bottom }, each { color, width } (a:lnL…)."},LineFormat:{begin_arrow:"What the end of the line where it starts has (MSO_ARROWHEAD): PowerPoint's Begin Arrow type (a:headEnd).",end_arrow:"What the end of the line where it ends has (MSO_ARROWHEAD): PowerPoint's End Arrow type (a:tailEnd).",begin_arrow_width:"How wide the arrowhead where the line starts is (MSO_ARROWHEAD_SIZE): PowerPoint's Begin Arrow size (a:headEnd@w).",begin_arrow_length:"How long the arrowhead where the line starts is (MSO_ARROWHEAD_SIZE): PowerPoint's Begin Arrow size (a:headEnd@len).",end_arrow_width:"How wide the arrowhead where the line ends is (MSO_ARROWHEAD_SIZE): PowerPoint's End Arrow size (a:tailEnd@w).",end_arrow_length:"How long the arrowhead where the line ends is (MSO_ARROWHEAD_SIZE): PowerPoint's End Arrow size (a:tailEnd@len)."},FillFormat:{transparency:"How much of the fill shows through, a share: PowerPoint's Transparency (a:alpha).",gradient_stops:"Its stops: each read as python-pptx's (color, position), and set whole as [{ at, color, transparency }], `at` and `transparency` shares, a colour as the slides file writes one (accent1, accent1 lighter 40%, #RRGGBB) or a Color; python-pptx's stops can only be read and changed in place."},_GradientStop:{transparency:"How much of its colour shows through, a share (a:alpha)."},ShadowFormat:{blur_radius:"How far the shadow blurs, a Length (a:outerShdw blurRad).",distance:"How far it falls from the shape, a Length (dist).",angle:"The way it falls, degrees clockwise from the right (dir).",transparency:"How much shows through it, a share (a:alpha).",color:"Its colour, a ColorFormat."},Shape:{flip_h:"Mirrored left to right (a:xfrm flipH), as the slides file's flip_h; its text reads as it is.",flip_v:"Mirrored top to bottom (a:xfrm flipV), as the slides file's flip_v."},FreeformBuilder:{add_curve_segment:"add_curve_segment(x1, y1, x2, y2, x, y): a cubic Bézier segment by its two control points (a:cubicBezTo)."},Font:{strike:"A line through it (@strike).",baseline:"Raised or lowered, a share of its size: superscript 0.3, subscript -0.25 (@baseline).",highlight:"The colour behind it, #RRGGBB as RGBColor gives one (a:highlight).",spacing:"Space added between letters, a Length, negative to tighten (PowerPoint's Character Spacing, a:rPr spc)."},SlideMaster:{text_styles:"Its text styles (p:txStyles): title_style, body_style, other_style, nine ListLevels each, Office's to start with."},SlideLayouts:{add:"add(name): a layout on this master."},SlideLayout:{display_master_shapes:"Whether its master's shapes are drawn on its slides, true unless set: PowerPoint's Hide Background Graphics (@showMasterSp)."},placeholders:{add:"add(PP_PLACEHOLDER.X, left?, top?, width?, height?, { name }): a placeholder on a master or a layout; a layout's without a frame takes its master's of its base type."},SlideShapes:{add_component:"add_component(name, left, top, width, height, props): a component of the presentation in a frame.",get:"get(name): a shape by its name."},TextFrame:{list_style:"Its list style (a:lstStyle): nine ListLevels, level 0 first, what its paragraphs take where they set nothing."},ListLevel:{"*":"A level of a list style: alignment, line_spacing, space_before, space_after, font, bullet (a character, or null for none), bullet_font, numbered (a:buAutoNum: arabicPeriod, alphaLcPeriod…), margin_left, indent."},text_styles:{"*":"title_style, body_style, other_style: a master's text styles, nine ListLevels each."},Animations:{"*":"A generated slide's Animation Pane: add(shape, effect, { start, direction, duration, delay, paragraph, path }), in order."},Slide:{animations:"Its Animation Pane, which python-pptx has no API for.",transition:"How it comes on from the slide before: { type, direction, duration }, which python-pptx has no API for."},Generator:{"*":"What a generator's function is given: data(path), and slides.add_slide(layout, id)."}},me={Presentation:{slides:"A deck's slides are in the slides file it names, their words in its script; slides from data are a generator's.",save:"A deck is not saved by its code: allyhub render writes its files."}},ye={Presentation:L.prototype,SlideMasters:v.prototype,SlideMaster:H.prototype,SlideLayouts:k.prototype,SlideLayout:T.prototype,Slide:w.prototype,placeholders:O.prototype,SlideShapes:M.prototype,Shape:R.prototype,TextFrame:G.prototype,_Paragraph:E.prototype,_Run:x.prototype,_Hyperlink:g.prototype,Font:y.prototype,ColorFormat:p.prototype,FillFormat:m.prototype,LineFormat:b.prototype,ShadowFormat:A.prototype,_GradientStop:P.prototype,FreeformBuilder:_.prototype,GroupShape:u.prototype,Table:I.prototype,CategoryChartData:B.prototype,XyChartData:N.prototype,XySeriesData:j.prototype,Chart:D.prototype,Plot:Y.prototype,Series:K.prototype,Point:V.prototype,DataLabels:q.prototype,Legend:X.prototype,Axis:W.prototype,TickLabels:U.prototype,MajorGridlines:Z.prototype,ChartFormat:z.prototype,_Cell:d.prototype,_Column:c.prototype,_Row:C.prototype,_Background:h.prototype},_e={Animations:l.prototype,ListLevel:S.prototype,text_styles:F.prototype,Generator:f.prototype},we=()=>{const e={};for(const[t,r]of Object.entries(ye)){const i=a[t]??{},n=me[t]??{};e[t]=s(r).filter(o=>!Object.hasOwn(i,o)&&!Object.hasOwn(n,o))}return e};export const CAPABILITIES={reference:{library:"python-pptx",version:"1.0.2",docs:"https://python-pptx.readthedocs.io/"},holds:we(),enums:Object.fromEntries(Object.entries({MSO_THEME_COLOR:ie,PP_ALIGN:ne,MSO_ANCHOR:J,MSO_AUTO_SIZE:ee,PP_PLACEHOLDER:le,MSO_SHAPE:se,MSO_CONNECTOR:te,MSO_SHAPE_TYPE:re,MSO_FILL:ae,MSO_LINE:oe,XL_CHART_TYPE:de,XL_LABEL_POSITION:pe,XL_LEGEND_POSITION:ce,MSO_ARROWHEAD:Q,MSO_ARROWHEAD_SIZE:$,THEME_FONT:he}).map(([e,t])=>[e,Object.keys(t)])),units:["Emu","Inches","Pt","Cm","Mm","Centipoints","RGBColor"],differs:["The entry is export default presentation({ slides: ./deck.yaml, script: ./deck.{locale}.yaml, size, theme }, (prs) => { … }), not Presentation(path): a deck is made by its code, never opened from a template. Its masters and layouts are made with the additions below; its slides are in the slides file it names.","A name python-pptx has that is not held throws where it is used, naming what the class holds; python-pptx's x[i] is held where it indexes (slide_masters[0], slide_layouts[0], placeholders[idx], shapes[0]), and len(x) is x.length.","A Length (what Inches(1) and Pt(12) give, and what a length reads, shape.width) is a Number of EMU with python-pptx's emu, inches, cm, mm, pt, centipoints and twips. Arithmetic on Lengths gives a plain number, as python's int does; two Lengths of one value are ===, and one is compared with a plain number by its .emu.",`An enumeration's members are PresentationML's values (MSO_THEME_COLOR.ACCENT_1 is "accent1", PP_ALIGN.CENTER "ctr"), not integers; TEXT_1 and BACKGROUND_1 are dk1 and lt1, a master's standard colour map. MSO_SHAPE_TYPE.COMPONENT is a component's. PP_PARAGRAPH_ALIGNMENT and MSO_LINE_DASH_STYLE are PP_ALIGN and MSO_LINE by python-pptx's other names.`,`A colour's rgb is "#RRGGBB": RGBColor(r, g, b), new RGBColor(r, g, b) and RGBColor.from_string("RRGGBB") make one.`,"A colour's brightness is a theme colour's: python-pptx also gives an RGB colour one, which is refused here (set rgb to the colour it makes).","line_spacing is a number of lines, or a Length of Pt(1) and over for a fixed height (python-pptx tells them apart by type).","add_picture() takes both width and height: a picture's own size is not read while a deck's code runs.","add_connector() takes MSO_CONNECTOR's STRAIGHT, ELBOW and CURVE, and also a connector's preset by name where python-pptx has none (straightConnector1, bentConnector2 to 5, curvedConnector2 to 5); a connector's adjustments (an elbow's middle) are its shape.adjustments.","begin_connect() and end_connect() take a site of the shape's own geometry, as PowerPoint numbers them (a rectangle's 0 top, 1 left, 2 bottom, 3 right; an ellipse has 8), where python-pptx places an end on those four of its box whatever its shape; a site the shape has not throws. A glued end follows its shape where the slides file or a person moves it, as PowerPoint's does.","add_movie(movie_file, left, top, width, height, { poster_frame_time }) takes a video file, its poster a moment of it in seconds, not poster_frame_image.","A shape's name is its kind and a number (textbox-1, shape-2), and a placeholder's its type's (title, body, subtitle): the slides file and the script name shapes by name.","fit_text() sets the frame to shrink its text when it is drawn (MSO_AUTO_SIZE.TEXT_TO_FIT_SHAPE) from max_size: it reads no font file.","Font.underline is a single underline or none.","Font.size refuses a size under Pt(1): a bare number is EMU, so size = 12 (python-pptx takes it) draws nothing.","A chart holds column, bar, line, area, pie, doughnut and XY scatter types; it has no 3D, no bubble, no radar and no second axis. A chart in the slides file can read its numbers from a project file: data, categories and series name it and its columns.","A Point holds format.fill alone, and its fill is its category's colour, one for every series of the chart (the slides file's category_colors), shown where the chart varies by categories; python-pptx's point is its own series'.","A table has no style, where python-pptx's starts with Medium Style 2: its look is its cells' (fill, borders, text), and first_row and the like say what its rows are and paint nothing. add_table returns its shape, whose .table is the table.","A group is its shapes: they are listed with the shapes the group is among, drawn as they are, and a group holds no group; its box is theirs, so left and top move them and width and height only read.","A presentation is 16:9 (12192000 × 6858000) and its theme Office 2013–2022's over the project's look; python-pptx's template is 4:3 with Office 2007's.","prs.slide_layouts and prs.slide_master are the first master's, as python-pptx's; a generator's add_slide also takes a layout of any master by name."],adds:{...a,...Object.fromEntries(Object.entries(_e).map(([e,t])=>[e,{...a[e]??{},names:s(t).join(", ")}]))}};
2
+ import{Animations as l,GlowFormat as h,ReflectionFormat as d,SoftEdgeFormat as p,Background as c,Cell as m,ColorFormat as _,Column as y,FillFormat as f,Font as u,FreeformBuilder as w,GeneratedSlide as g,Generator as S,GroupShape as b,Hyperlink as P,LineFormat as A,ListLevel as O,ShadowFormat as E,GradientStop as L,Paragraph as T,Placeholders as x,Presentation as C,Row as M,Run as R,Shape as I,ShapeCollection as v,SlideLayout as k,SlideLayouts as N,SlideMaster as F,SlideMasters as D,Table as H,TextFrame as G,TextStyles as B}from"./api.js";import{CategoryChartData as W,Chart as z,XyChartData as j,XySeriesData as X,AxisTitle as U,ChartAxis as Y,ChartFormat as Z,ChartLegend as V,MajorGridlines as J,TickLabels as K,ChartPlot as q,ChartPoint as Q,ChartSeries as $,DataLabels as ee}from"./chart-api.js";import{MSO_ANCHOR as te,MSO_ARROWHEAD as ae,MSO_ARROWHEAD_SIZE as se,MSO_AUTO_SIZE as oe,MSO_CONNECTOR as re,MSO_FILL as ie,MSO_LINE as ne,MSO_LINE_CAP as le,MSO_LINE_COMPOUND as he,MSO_LINE_JOIN as de,MSO_PATTERN_TYPE as pe,MSO_SHAPE as ce,MSO_SHAPE_TYPE as me,MSO_TEXT_CAPS as _e,MSO_TEXT_ORIENTATION as ye,MSO_TEXT_STRIKE as fe,MSO_THEME_COLOR as ue,MSO_UNDERLINE as we,PP_ALIGN as ge,PP_PLACEHOLDER as Se,THEME_FONT as be,XL_CHART_TYPE as Pe,XL_LABEL_POSITION as Ae,XL_LEGEND_POSITION as Oe}from"./enums.js";import{publicNames as o}from"./strict.js";const a={Presentation:{theme:"The theme's colours (dk1…folHlink) and fonts (major, minor), over the project's look.",components:"components.add(name, { props, layers }): a shape drawn by code, by the layer contract.",generators:"generators.add(name, (g) => { g.data(path); g.slides.add_slide(layout, id) … }): slides made from data, placed in the slides file as one block."},SlideMasters:{add:"add(name): a master, with Office's text styles and no placeholders yet."},Table:{style:"Its style, one of PowerPoint's 74 built-in table styles, by its English name as the gallery shows it (Medium Style 2 - Accent 1, Light Style 1, No Style, Table Grid); set by name or id ({5C22544A-…}), null for none (a:tableStyleId)."},_Cell:{borders:"Its edges: { left, right, top, bottom }, each { color, width } (a:lnL…)."},LineFormat:{cap_type:"How its ends and dashes end (MSO_LINE_CAP): PowerPoint's Cap type (a:ln@cap), flat unless set.",join_type:"How its corners meet (MSO_LINE_JOIN): PowerPoint's Join type (a:round, a:bevel, a:miter), a miter unless set.",compound_type:"One line, two or three (MSO_LINE_COMPOUND): PowerPoint's Compound type (a:ln@cmpd), single unless set.",begin_arrow:"What the end of the line where it starts has (MSO_ARROWHEAD): PowerPoint's Begin Arrow type (a:headEnd).",end_arrow:"What the end of the line where it ends has (MSO_ARROWHEAD): PowerPoint's End Arrow type (a:tailEnd).",begin_arrow_width:"How wide the arrowhead where the line starts is (MSO_ARROWHEAD_SIZE): PowerPoint's Begin Arrow size (a:headEnd@w).",begin_arrow_length:"How long the arrowhead where the line starts is (MSO_ARROWHEAD_SIZE): PowerPoint's Begin Arrow size (a:headEnd@len).",end_arrow_width:"How wide the arrowhead where the line ends is (MSO_ARROWHEAD_SIZE): PowerPoint's End Arrow size (a:tailEnd@w).",end_arrow_length:"How long the arrowhead where the line ends is (MSO_ARROWHEAD_SIZE): PowerPoint's End Arrow size (a:tailEnd@len)."},ColorFormat:{transforms:"DrawingML's transforms of the colour in order, [{ name, value }]: tint, shade, lumMod, lumOff, lum, satMod, satOff, sat, hueMod, hueOff, hue, alpha, alphaMod, alphaOff, each value a share (0.75 is 75%), degrees for hue and hueOff; set, they take a brightness's place."},FillFormat:{gradient_path:`A gradient's kind: "linear" along gradient_angle, or out from its focus, "circle", "rect" or "shape" (a:path), PowerPoint's Radial, Rectangular and Path; its first stop is at the focus.`,gradient_focus:"A path gradient's focus (a:fillToRect): { left, top, right, bottom }, the share in from each side, the middle unless set; PowerPoint's Direction (From Center is 0.5 each, From Top Left Corner { left: 0, top: 0, right: 1, bottom: 1 }).",picture:"picture(image_file, { tile, transparency }): a picture filling the shape, PowerPoint's Picture or Texture Fill (a:blipFill), a path from the deck's module's folder, stretched over the shape, or tiled: { scale_x, scale_y } shares of its own size, { offset_x, offset_y } Lengths from where align (TILE_ALIGNMENT, top left unless set) puts its first tile.",transparency:"How much of the fill shows through, a share: PowerPoint's Transparency (a:alpha).",gradient_stops:"Its stops: each read as python-pptx's (color, position), and set whole as [{ at, color, transparency }], `at` and `transparency` shares, a colour as the slides file writes one (accent1, accent1 lighter 40%, #RRGGBB) or a Color; python-pptx's stops can only be read and changed in place."},_GradientStop:{transparency:"How much of its colour shows through, a share (a:alpha)."},ShadowFormat:{blur_radius:"How far the shadow blurs, a Length (a:outerShdw blurRad).",distance:"How far it falls from the shape, a Length (dist).",angle:"The way it falls, degrees clockwise from the right (dir).",transparency:"How much shows through it, a share (a:alpha).",color:"Its colour, a ColorFormat.",visible:"Whether it is drawn, Office's ShadowFormat.Visible: true gives it the defaults' shadow until changed, false none."},Shape:{inner_shadow:"A shadow inside it (a:innerShdw), PowerPoint's Inner shadows: a ShadowFormat with visible, blur_radius, distance, angle, transparency and color; INNER_SHADOW_DEFAULTS until changed.",glow:"Its glow (a:glow), Office's GlowFormat: visible, radius (a Length; 0 takes it away), transparency, color; GLOW_DEFAULTS until changed.",soft_edge:"Its soft edges (a:softEdge), Office's SoftEdgeFormat: radius, how far in its edges fade (0 takes them away).",reflection:"Its reflection (a:reflection), Office's ReflectionFormat: visible, transparency where it starts, size (the share of the shape it shows), offset (how far below, a Length), blur; REFLECTION_DEFAULTS until changed.",flip_h:"Mirrored left to right (a:xfrm flipH), as the slides file's flip_h; its text reads as it is.",flip_v:"Mirrored top to bottom (a:xfrm flipV), as the slides file's flip_v."},FreeformBuilder:{add_curve_segment:"add_curve_segment(x1, y1, x2, y2, x, y): a cubic Bézier segment by its two control points (a:cubicBezTo)."},Font:{strike:"A line through it (@strike): true, or MSO_TEXT_STRIKE.DOUBLE (dblStrike), PowerPoint's Double Strikethrough.",caps:"Its letters as capitals (@cap, MSO_TEXT_CAPS): ALL, SMALL, or NONE over a level that has them; PowerPoint's All Caps and Small Caps.",baseline:"Raised or lowered, a share of its size: superscript 0.3, subscript -0.25 (@baseline).",highlight:"The colour behind it, #RRGGBB as RGBColor gives one (a:highlight).",spacing:"Space added between letters, a Length, negative to tighten (PowerPoint's Character Spacing, a:rPr spc)."},SlideMaster:{color_map:"Its colour map (p:clrMap): what tx1, bg1, tx2, bg2, the accents and the links are of the theme's twelve colours; Office's is { bg1: lt1, tx1: dk1, bg2: lt2, tx2: dk2 }, a dark master's the other way round.",text_styles:"Its text styles (p:txStyles): title_style, body_style, other_style, nine ListLevels each, Office's to start with."},SlideLayouts:{add:"add(name): a layout on this master."},SlideLayout:{color_map:"Its own colour map over its master's (p:clrMapOvr), or undefined for its master's.",display_master_shapes:"Whether its master's shapes are drawn on its slides, true unless set: PowerPoint's Hide Background Graphics (@showMasterSp)."},placeholders:{add:`add(PP_PLACEHOLDER.X, left?, top?, width?, height?, { name, orient }): a placeholder on a master or a layout; a layout's without a frame takes its master's of its base type; orient: "vert" makes it a vertical placeholder (p:ph@orient), its text turned by text_frame.orientation.`},SlideShapes:{add_audio:"add_audio(audio_file, left, top, width?, height?, { playback }): a sound, PowerPoint's Insert Audio, drawn as its icon (half an inch unless given); its shape_type is MSO_SHAPE_TYPE.MEDIA, as python-pptx reads one.",add_component:"add_component(name, left, top, width, height, props): a component of the presentation in a frame.",get:"get(name): a shape by its name."},TextFrame:{orientation:"Which way its text runs (a:bodyPr@vert, MSO_TEXT_ORIENTATION): HORIZONTAL, DOWNWARD (turned 90°), UPWARD (270°), VERTICAL_FAR_EAST (CJK upright, other letters turned), VERTICAL (stacked), VERTICAL_RIGHT_TO_LEFT, MONGOLIAN; PowerPoint's Text Direction.",list_style:"Its list style (a:lstStyle): nine ListLevels, level 0 first, what its paragraphs take where they set nothing."},ListLevel:{"*":"A level of a list style: alignment, line_spacing, space_before, space_after, font, bullet (a character, or null for none), bullet_font, bullet_color (a:buClr: a colour, or null for its text's), bullet_size (a:buSzPct: a share of its text's size), numbered (a:buAutoNum: any of ECMA-376's 41 schemes, arabicPeriod, alphaLcParenR, circleNumDbPlain, ea1ChsPeriod…), start_at (the number it starts at), margin_left, indent."},text_styles:{"*":"title_style, body_style, other_style: a master's text styles, nine ListLevels each."},Animations:{"*":"A generated slide's Animation Pane: add(shape, effect, { start, direction, amount, duration, delay, paragraph, path, animate_text, text_delay, repeat, rewind }), in order."},Slide:{animations:"Its Animation Pane, which python-pptx has no API for.",transition:"How it comes on from the slide before: { type, direction, through_black, duration }, PowerPoint's fade, push, wipe, split, reveal, cut, cover, uncover, zoom and morph, which python-pptx has no API for."},Series:{chart_type:"What the series is drawn as (XL_CHART_TYPE): a combination chart's column, line or area type other than the chart's, as Excel's Series.ChartType and PowerPoint's Change Chart Type ▸ Combo; the chart's own unless set.",on_secondary_axis:"On the chart's second value axis, at the right (Excel's Series.AxisGroup xlSecondary, Combo's Secondary Axis): columns, lines and areas only."},Chart:{secondary_value_axis:"Its second value axis, at the right (a c:valAx at axPos r), for its series on_secondary_axis: an Axis, its scale, gridlines, format and title its own."},Generator:{"*":"What a generator's function is given: data(path), and slides.add_slide(layout, id)."}},Ee={Presentation:{slides:"A deck's slides are in the slides file it names, their words in its script; slides from data are a generator's.",save:"A deck is not saved by its code: allyhub render writes its files."}},Le={Presentation:C.prototype,SlideMasters:D.prototype,SlideMaster:F.prototype,SlideLayouts:N.prototype,SlideLayout:k.prototype,Slide:g.prototype,placeholders:x.prototype,SlideShapes:v.prototype,Shape:I.prototype,TextFrame:G.prototype,_Paragraph:T.prototype,_Run:R.prototype,_Hyperlink:P.prototype,Font:u.prototype,ColorFormat:_.prototype,FillFormat:f.prototype,LineFormat:A.prototype,ShadowFormat:E.prototype,_GradientStop:L.prototype,FreeformBuilder:w.prototype,GroupShape:b.prototype,Table:H.prototype,CategoryChartData:W.prototype,XyChartData:j.prototype,XySeriesData:X.prototype,Chart:z.prototype,Plot:q.prototype,Series:$.prototype,Point:Q.prototype,DataLabels:ee.prototype,Legend:V.prototype,Axis:Y.prototype,AxisTitle:U.prototype,TickLabels:K.prototype,MajorGridlines:J.prototype,ChartFormat:Z.prototype,_Cell:m.prototype,_Column:y.prototype,_Row:M.prototype,_Background:c.prototype},Te={Animations:l.prototype,GlowFormat:h.prototype,SoftEdgeFormat:p.prototype,ReflectionFormat:d.prototype,ListLevel:O.prototype,text_styles:B.prototype,Generator:S.prototype},xe=()=>{const e={};for(const[t,r]of Object.entries(Le)){const i=a[t]??{},n=Ee[t]??{};e[t]=o(r).filter(s=>!Object.hasOwn(i,s)&&!Object.hasOwn(n,s))}return e};export const CAPABILITIES={reference:{library:"python-pptx",version:"1.0.2",docs:"https://python-pptx.readthedocs.io/"},holds:xe(),enums:Object.fromEntries(Object.entries({MSO_THEME_COLOR:ue,PP_ALIGN:ge,MSO_ANCHOR:te,MSO_AUTO_SIZE:oe,PP_PLACEHOLDER:Se,MSO_SHAPE:ce,MSO_CONNECTOR:re,MSO_SHAPE_TYPE:me,MSO_FILL:ie,MSO_LINE:ne,MSO_LINE_CAP:le,MSO_LINE_JOIN:de,MSO_LINE_COMPOUND:he,MSO_PATTERN_TYPE:pe,XL_CHART_TYPE:Pe,XL_LABEL_POSITION:Ae,XL_LEGEND_POSITION:Oe,MSO_ARROWHEAD:ae,MSO_ARROWHEAD_SIZE:se,MSO_UNDERLINE:we,MSO_TEXT_STRIKE:fe,MSO_TEXT_CAPS:_e,MSO_TEXT_ORIENTATION:ye,THEME_FONT:be}).map(([e,t])=>[e,Object.keys(t)])),units:["Emu","Inches","Pt","Cm","Mm","Centipoints","RGBColor"],differs:["The entry is export default presentation({ slides: ./deck.yaml, script: ./deck.{locale}.yaml, size, theme }, (prs) => { … }), not Presentation(path): a deck is made by its code, never opened from a template. Its masters and layouts are made with the additions below; its slides are in the slides file it names.","A name python-pptx has that is not held throws where it is used, naming what the class holds; python-pptx's x[i] is held where it indexes (slide_masters[0], slide_layouts[0], placeholders[idx], shapes[0]), and len(x) is x.length.","A Length (what Inches(1) and Pt(12) give, and what a length reads, shape.width) is a Number of EMU with python-pptx's emu, inches, cm, mm, pt, centipoints and twips. Arithmetic on Lengths gives a plain number, as python's int does; two Lengths of one value are ===, and one is compared with a plain number by its .emu.",`An enumeration's members are PresentationML's values (MSO_THEME_COLOR.ACCENT_1 is "accent1", PP_ALIGN.CENTER "ctr"), not integers; TEXT_1 and BACKGROUND_1 are tx1 and bg1, which the master's colour map (SlideMaster.color_map) makes dk1 and lt1 (Office's) or, on a dark master, lt1 and dk1. MSO_SHAPE_TYPE.COMPONENT is a component's. PP_PARAGRAPH_ALIGNMENT and MSO_LINE_DASH_STYLE are PP_ALIGN and MSO_LINE by python-pptx's other names; MSO_LINE also holds DrawingML's DOT, SYSTEM_DASH_DOT and SYSTEM_DASH_DOT_DOT, which python-pptx has no name for. A line's transparency is its colour's alpha (line.color.transforms).`,`A colour's rgb is "#RRGGBB": RGBColor(r, g, b), new RGBColor(r, g, b) and RGBColor.from_string("RRGGBB") make one.`,"A colour's brightness is a theme colour's: python-pptx also gives an RGB colour one, which is refused here (set rgb to the colour it makes).","line_spacing is a number of lines, or a Length of Pt(1) and over for a fixed height (python-pptx tells them apart by type). space_before and space_after are a Length too, or a number of lines at the paragraph's size (a:spcPct, PowerPoint's Before and After in lines), which python-pptx does not read.","add_picture() takes both width and height: a picture's own size is not read while a deck's code runs.","add_connector() takes MSO_CONNECTOR's STRAIGHT, ELBOW and CURVE, and also a connector's preset by name where python-pptx has none (straightConnector1, bentConnector2 to 5, curvedConnector2 to 5); a connector's adjustments (an elbow's middle) are its shape.adjustments.","begin_connect() and end_connect() take a site of the shape's own geometry, as PowerPoint numbers them (a rectangle's 0 top, 1 left, 2 bottom, 3 right; an ellipse has 8), where python-pptx places an end on those four of its box whatever its shape; a site the shape has not throws. A glued end follows its shape where the slides file or a person moves it, as PowerPoint's does.",`add_movie(movie_file, left, top, width, height, { poster_frame_time, playback }) takes a video file, its poster a moment of it in seconds, not poster_frame_image, and how it plays, PowerPoint's Playback, which python-pptx has no API for: { start: "auto" | "on-click", trim: { start, end } in seconds, loop, volume (a share, 0 mutes), fullscreen, hide }.`,"A shape's name is its kind and a number (textbox-1, shape-2), and a placeholder's its type's (title, body, subtitle): the slides file and the script name shapes by name.","fit_text() sets the frame to shrink its text when it is drawn (MSO_AUTO_SIZE.TEXT_TO_FIT_SHAPE) from max_size: it reads no font file.","Font.size refuses a size under Pt(1): a bare number is EMU, so size = 12 (python-pptx takes it) draws nothing.","A chart holds column, bar, line, area, pie, doughnut and XY scatter types, and combinations of columns, lines and areas, some on a second value axis (Series.chart_type, on_secondary_axis), which python-pptx reads as several plots and cannot make; it has no 3D, no bubble and no radar. A combination chart's plots share its gap width, overlap and data labels. Setting an axis's has_title gives it the words Axis Title, PowerPoint's new title's. A chart in the slides file can read its numbers from a project file: data, categories and series name it and its columns.","A Point holds format.fill alone, and its fill is its category's colour, one for every series of the chart (the slides file's category_colors), shown where the chart varies by categories; python-pptx's point is its own series'.","A table starts with python-pptx's Medium Style 2 - Accent 1, first_row and horz_banding on; its style is drawn under its cells' own fill, borders and text, as PowerPoint draws one. add_table returns its shape, whose .table is the table.","A group is its shapes: they are listed with the shapes the group is among, drawn as they are; a group's shapes.add_group_shape() makes a group in it (its shapes' group outer/inner in the slides file); its box is theirs, so left and top move them and width and height only read.","A presentation is 16:9 (12192000 × 6858000) and its theme Office 2013–2022's over the project's look; python-pptx's template is 4:3 with Office 2007's.","prs.slide_layouts and prs.slide_master are the first master's, as python-pptx's; a generator's add_slide also takes a layout of any master by name."],adds:{...a,...Object.fromEntries(Object.entries(Te).map(([e,t])=>[e,{...a[e]??{},names:o(t).join(", ")}]))}};
@@ -1,4 +1,4 @@
1
- import type { ChartLegendPosition, ChartType } from "@allyhub/formats";
1
+ import { type ChartLegendPosition, type ChartType } from "@allyhub/formats";
2
2
  import { ColorFormat, FillFormat } from "./api.js";
3
3
  import type { ChartAxisDef, ChartDef, ChartLabelPosition, ChartLabelsDef, ChartSeriesDef } from "@allyhub/chart";
4
4
  import type { Color } from "./model.js";
@@ -93,6 +93,12 @@ export declare class ChartSeries {
93
93
  };
94
94
  get smooth(): boolean;
95
95
  set smooth(v: boolean);
96
+ /** What it is drawn as: the chart's type, or a combination chart's column, line or area of its own. */
97
+ get chart_type(): ChartType;
98
+ set chart_type(v: ChartType);
99
+ /** On the chart's second value axis, at the right. */
100
+ get on_secondary_axis(): boolean;
101
+ set on_secondary_axis(v: boolean);
96
102
  /** Its fill (`format.fill`), and its line's width (`format.line.width`); a line's or an area's colour is the fill's. */
97
103
  get format(): {
98
104
  fill: FillFormat;
@@ -122,8 +128,10 @@ export declare class DataLabels {
122
128
  /** A chart's plot (python-pptx's `BarPlot`, `LinePlot`…). */
123
129
  export declare class ChartPlot {
124
130
  private readonly def;
125
- constructor(def: ChartDef);
131
+ private readonly members;
132
+ constructor(def: ChartDef, members: readonly number[]);
126
133
  get categories(): readonly string[];
134
+ /** Its series: a combination chart's plot holds those drawn as one kind on one axis. */
127
135
  get series(): ChartSeries[];
128
136
  get has_data_labels(): boolean;
129
137
  set has_data_labels(v: boolean);
@@ -165,6 +173,16 @@ export declare class ChartFormat {
165
173
  constructor(line: ChartLine);
166
174
  get line(): ChartLine;
167
175
  }
176
+ /** An axis's title (python-pptx's `AxisTitle`): its words, which it gets once asked for. */
177
+ export declare class AxisTitle {
178
+ private readonly def;
179
+ constructor(def: ChartAxisDef);
180
+ get has_text_frame(): boolean;
181
+ set has_text_frame(v: boolean);
182
+ get text_frame(): {
183
+ text: string;
184
+ };
185
+ }
168
186
  /** A chart's axis (python-pptx's `ValueAxis`, `CategoryAxis`). */
169
187
  export declare class ChartAxis {
170
188
  private readonly def;
@@ -181,6 +199,11 @@ export declare class ChartAxis {
181
199
  set visible(v: boolean);
182
200
  get reverse_order(): boolean;
183
201
  set reverse_order(v: boolean);
202
+ /** Whether it has a title; set true, it reads "Axis Title" until its words are set, as PowerPoint's new one. */
203
+ get has_title(): boolean;
204
+ set has_title(v: boolean);
205
+ /** Its title (python-pptx's `AxisTitle`): `axis_title.text_frame.text`. */
206
+ get axis_title(): AxisTitle;
184
207
  /** Its tick labels' format (`tick_labels.number_format`). */
185
208
  get tick_labels(): TickLabels;
186
209
  /** Its gridlines' colour (`major_gridlines.format.line.color`). */
@@ -209,10 +232,13 @@ export declare class Chart {
209
232
  };
210
233
  /** Its text's size and colour. */
211
234
  get font(): ChartFont;
235
+ /** Its plots: one, or a combination chart's, one per kind and axis (areas, then columns, then lines, the second axis's after). */
212
236
  get plots(): ChartPlot[];
213
237
  get series(): ChartSeries[];
214
238
  get value_axis(): ChartAxis;
215
239
  get category_axis(): ChartAxis;
240
+ /** Its second value axis, at the right: a combination chart's, for its series on_secondary_axis. */
241
+ get secondary_value_axis(): ChartAxis;
216
242
  /** Other numbers, in its look. */
217
243
  replace_data(chart_data: CategoryChartData): void;
218
244
  }
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{ColorFormat as l,FillFormat as f}from"./api.js";import{accentOf as d,isRound as u}from"@allyhub/chart";import{strict as r}from"./strict.js";import{Pt as o,length as h}from"./units.js";export class CategoryChartData{number_format;names=[];list=[];constructor(e={}){return this.number_format=e.number_format??"General",r(this,"CategoryChartData")}get categories(){return this.names}set categories(e){this.names=e.map(String)}add_category(e){this.names.push(String(e))}add_series(e,t=[],i){this.list.push({name:e,values:t.map(n=>n??null),...i===void 0?{}:{number_format:i}})}_series(){return this.list.map(e=>({...e,values:[...e.values],number_format:e.number_format??this.number_format}))}}export class XySeriesData{points=[];name;constructor(e){return this.name=e,r(this,"XySeriesData")}add_data_point(e,t){this.points.push({x:e,y:t})}}export class XyChartData{number_format;list=[];constructor(e={}){return this.number_format=e.number_format??"General",r(this,"XyChartData")}add_series(e){const t=new XySeriesData(e);return this.list.push(t),t}get categories(){return[]}_series(){return this.list.map(e=>({name:e.name,values:e.points.map(t=>t.y),x:e.points.map(t=>t.x),number_format:this.number_format}))}}const _=s=>s===void 0?void 0:s/o(1);export class ChartFont{read;write;constructor(e,t){return this.read=e,this.write=t,r(this,"ChartFont")}get size(){const e=this.read().size;return e===void 0?void 0:h(o(e))}set size(e){const t=this.read(),i=_(e);this.write({...t.color===void 0?{}:{color:t.color},...i===void 0?{}:{size:i}})}get color(){return new l(()=>this.read().color,e=>{const{size:t}=this.read();this.write({...t===void 0?{}:{size:t},...e===void 0?{}:{color:e}})})}}export class ChartLine{read;write;constructor(e,t){return this.read=e,this.write=t,r(this,"ChartLine")}get color(){return new l(this.read,this.write)}}export class ChartPoint{chart;at;constructor(e,t){return this.chart=e,this.at=t,r(this,"Point")}get format(){const{chart:e,at:t}=this;return r({fill:new f(()=>e.category_colors?.[t]??d(t),i=>{if(i===null)return;const n=[...e.category_colors??[]];for(let a=n.length;a<t;a++)n[a]=d(a);n[t]=i,e.category_colors=n},d(t))},"ChartFormat")}}export class ChartSeries{def;at;chart;constructor(e,t,i){return this.def=e,this.at=t,this.chart=i,r(this,"ChartSeries")}get points(){return this.chart.categories.map((e,t)=>new ChartPoint(this.chart,t))}get name(){return this.def.name}get values(){return this.def.values}get marker(){const e=this.def;return r({get size(){return e.marker_size},set size(t){t===void 0?delete e.marker_size:e.marker_size=t}},"Marker")}get smooth(){return this.def.smooth===!0}set smooth(e){this.def.smooth=e}get format(){const e=this.def;return r({line:r({get width(){return e.line_width===void 0?void 0:h(o(e.line_width))},set width(t){t===void 0?delete e.line_width:e.line_width=t/o(1)}},"LineFormat"),fill:new f(()=>this.def.color??d(this.at),t=>{t!==null&&(this.def.color=t)})},"ChartFormat")}}export class DataLabels{def;constructor(e){return this.def=e,r(this,"DataLabels")}get show_value(){return this.def.show_value??!1}set show_value(e){this.def.show_value=e}get show_percentage(){return this.def.show_percentage??!1}set show_percentage(e){this.def.show_percentage=e}get show_category_name(){return this.def.show_category_name??!1}set show_category_name(e){this.def.show_category_name=e}get show_series_name(){return this.def.show_series_name??!1}set show_series_name(e){this.def.show_series_name=e}get number_format(){return this.def.number_format??"General"}set number_format(e){this.def.number_format=e}get position(){return this.def.position}set position(e){e===void 0?delete this.def.position:this.def.position=e}get font(){return new ChartFont(()=>({...this.def.size===void 0?{}:{size:this.def.size},...this.def.color===void 0?{}:{color:this.def.color}}),e=>{delete this.def.size,delete this.def.color,Object.assign(this.def,e)})}}export class ChartPlot{def;constructor(e){return this.def=e,r(this,"ChartPlot")}get categories(){return this.def.categories}get series(){return this.def.series.map((e,t)=>new ChartSeries(e,t,this.def))}get has_data_labels(){return this.def.labels!==void 0}set has_data_labels(e){e?this.def.labels??={show_value:!0}:delete this.def.labels}get data_labels(){return this.def.labels??={show_value:!0},new DataLabels(this.def.labels)}get gap_width(){return this.def.gap_width??150}set gap_width(e){this.def.gap_width=e}get overlap(){return this.def.overlap??0}set overlap(e){this.def.overlap=e}get vary_by_categories(){return this.def.vary_by_categories??u(this.def.type)}set vary_by_categories(e){this.def.vary_by_categories=e}}export class ChartLegend{def;constructor(e){return this.def=e,r(this,"ChartLegend")}get position(){return this.def.legend??"right"}set position(e){this.def.legend=e}get include_in_layout(){return this.def.legend_overlay!==!0}set include_in_layout(e){e?delete this.def.legend_overlay:this.def.legend_overlay=!0}}export class TickLabels{def;constructor(e){return this.def=e,r(this,"TickLabels")}get number_format(){return this.def.number_format??"General"}set number_format(e){this.def.number_format=e}}export class MajorGridlines{line;constructor(e){return this.line=e,r(this,"MajorGridlines")}get format(){return new ChartFormat(this.line)}}export class ChartFormat{held;constructor(e){return this.held=e,r(this,"ChartFormat")}get line(){return this.held}}export class ChartAxis{def;constructor(e){return this.def=e,r(this,"ChartAxis")}get minimum_scale(){return this.def.minimum_scale}set minimum_scale(e){e===void 0?delete this.def.minimum_scale:this.def.minimum_scale=e}get maximum_scale(){return this.def.maximum_scale}set maximum_scale(e){e===void 0?delete this.def.maximum_scale:this.def.maximum_scale=e}get major_unit(){return this.def.major_unit}set major_unit(e){e===void 0?delete this.def.major_unit:this.def.major_unit=e}get has_major_gridlines(){return this.def.has_major_gridlines??!0}set has_major_gridlines(e){this.def.has_major_gridlines=e}get visible(){return this.def.visible??!0}set visible(e){this.def.visible=e}get reverse_order(){return this.def.reverse_order??!1}set reverse_order(e){this.def.reverse_order=e}get tick_labels(){return new TickLabels(this.def)}get major_gridlines(){return new MajorGridlines(new ChartLine(()=>this.def.gridline_color,e=>{e===void 0?delete this.def.gridline_color:this.def.gridline_color=e}))}get format(){return new ChartFormat(new ChartLine(()=>this.def.line_color,e=>{e===void 0?delete this.def.line_color:this.def.line_color=e}))}}export class Chart{def;constructor(e){return this.def=e,r(this,"Chart")}get chart_type(){return this.def.type}get has_legend(){return this.def.legend!==void 0}set has_legend(e){e?this.def.legend??="right":delete this.def.legend}get legend(){return new ChartLegend(this.def)}get has_title(){return this.def.title!==void 0}set has_title(e){e?this.def.title??="":delete this.def.title}get chart_title(){const e=this.def;return r({font:r({get size(){return e.title_size===void 0?void 0:h(o(e.title_size))},set size(t){t===void 0?delete e.title_size:e.title_size=t/o(1)}},"Font"),text_frame:r({get text(){return e.title??""},set text(t){e.title=t}},"TextFrame")},"ChartTitle")}get font(){return new ChartFont(()=>({...this.def.font_size===void 0?{}:{size:this.def.font_size},...this.def.font_color===void 0?{}:{color:this.def.font_color}}),e=>{delete this.def.font_size,delete this.def.font_color,e.size!==void 0&&(this.def.font_size=e.size),e.color!==void 0&&(this.def.font_color=e.color)})}get plots(){return[new ChartPlot(this.def)]}get series(){return this.def.series.map((e,t)=>new ChartSeries(e,t,this.def))}get value_axis(){return this.def.value_axis??={},new ChartAxis(this.def.value_axis)}get category_axis(){return this.def.category_axis??={},new ChartAxis(this.def.category_axis)}replace_data(e){const t=this.def.series;this.def.categories=[...e.categories],this.def.series=e._series().map((i,n)=>{const a=t[n]?.color;return a===void 0?i:{...i,color:a}})}}
2
+ import{CHART_COMBINED_TYPES as _}from"@allyhub/formats";import{ColorFormat as u,FillFormat as c,refuse as h}from"./api.js";import{accentOf as d,groupsOf as m,isCombinable as l,isRound as g}from"@allyhub/chart";import{strict as s}from"./strict.js";import{Pt as o,length as f}from"./units.js";export class CategoryChartData{number_format;names=[];list=[];constructor(e={}){return this.number_format=e.number_format??"General",s(this,"CategoryChartData")}get categories(){return this.names}set categories(e){this.names=e.map(String)}add_category(e){this.names.push(String(e))}add_series(e,t=[],i){this.list.push({name:e,values:t.map(n=>n??null),...i===void 0?{}:{number_format:i}})}_series(){return this.list.map(e=>({...e,values:[...e.values],number_format:e.number_format??this.number_format}))}}export class XySeriesData{points=[];name;constructor(e){return this.name=e,s(this,"XySeriesData")}add_data_point(e,t){this.points.push({x:e,y:t})}}export class XyChartData{number_format;list=[];constructor(e={}){return this.number_format=e.number_format??"General",s(this,"XyChartData")}add_series(e){const t=new XySeriesData(e);return this.list.push(t),t}get categories(){return[]}_series(){return this.list.map(e=>({name:e.name,values:e.points.map(t=>t.y),x:e.points.map(t=>t.x),number_format:this.number_format}))}}const p=r=>r===void 0?void 0:r/o(1);export class ChartFont{read;write;constructor(e,t){return this.read=e,this.write=t,s(this,"ChartFont")}get size(){const e=this.read().size;return e===void 0?void 0:f(o(e))}set size(e){const t=this.read(),i=p(e);this.write({...t.color===void 0?{}:{color:t.color},...i===void 0?{}:{size:i}})}get color(){return new u(()=>this.read().color,e=>{const{size:t}=this.read();this.write({...t===void 0?{}:{size:t},...e===void 0?{}:{color:e}})})}}export class ChartLine{read;write;constructor(e,t){return this.read=e,this.write=t,s(this,"ChartLine")}get color(){return new u(this.read,this.write)}}export class ChartPoint{chart;at;constructor(e,t){return this.chart=e,this.at=t,s(this,"Point")}get format(){const{chart:e,at:t}=this;return s({fill:new c(()=>e.category_colors?.[t]??d(t),i=>{if(i===null)return;const n=[...e.category_colors??[]];for(let a=n.length;a<t;a++)n[a]=d(a);n[t]=i,e.category_colors=n},d(t))},"ChartFormat")}}export class ChartSeries{def;at;chart;constructor(e,t,i){return this.def=e,this.at=t,this.chart=i,s(this,"ChartSeries")}get points(){return this.chart.categories.map((e,t)=>new ChartPoint(this.chart,t))}get name(){return this.def.name}get values(){return this.def.values}get marker(){const e=this.def;return s({get size(){return e.marker_size},set size(t){t===void 0?delete e.marker_size:e.marker_size=t}},"Marker")}get smooth(){return this.def.smooth===!0}set smooth(e){this.def.smooth=e}get chart_type(){const e=this.def.type;return e!==void 0&&l(this.chart.type)?e:this.chart.type}set chart_type(e){_.includes(e)||h(`chart_type: a series is drawn as a column, a line or an area of its own, not ${e}.`),l(this.chart.type)||h(`chart_type: a ${this.chart.type} chart combines with no other kind; only columns, lines and areas do.`),e===this.chart.type?delete this.def.type:this.def.type=e}get on_secondary_axis(){return this.def.secondary===!0}set on_secondary_axis(e){e&&!l(this.chart.type)&&h(`on_secondary_axis: a ${this.chart.type} chart has no second axis; only columns, lines and areas do.`),e?this.def.secondary=!0:delete this.def.secondary}get format(){const e=this.def;return s({line:s({get width(){return e.line_width===void 0?void 0:f(o(e.line_width))},set width(t){t===void 0?delete e.line_width:e.line_width=t/o(1)}},"LineFormat"),fill:new c(()=>this.def.color??d(this.at),t=>{t!==null&&(this.def.color=t)})},"ChartFormat")}}export class DataLabels{def;constructor(e){return this.def=e,s(this,"DataLabels")}get show_value(){return this.def.show_value??!1}set show_value(e){this.def.show_value=e}get show_percentage(){return this.def.show_percentage??!1}set show_percentage(e){this.def.show_percentage=e}get show_category_name(){return this.def.show_category_name??!1}set show_category_name(e){this.def.show_category_name=e}get show_series_name(){return this.def.show_series_name??!1}set show_series_name(e){this.def.show_series_name=e}get number_format(){return this.def.number_format??"General"}set number_format(e){this.def.number_format=e}get position(){return this.def.position}set position(e){e===void 0?delete this.def.position:this.def.position=e}get font(){return new ChartFont(()=>({...this.def.size===void 0?{}:{size:this.def.size},...this.def.color===void 0?{}:{color:this.def.color}}),e=>{delete this.def.size,delete this.def.color,Object.assign(this.def,e)})}}export class ChartPlot{def;members;constructor(e,t){return this.def=e,this.members=t,s(this,"ChartPlot")}get categories(){return this.def.categories}get series(){return this.members.flatMap(e=>{const t=this.def.series[e];return t?[new ChartSeries(t,e,this.def)]:[]})}get has_data_labels(){return this.def.labels!==void 0}set has_data_labels(e){e?this.def.labels??={show_value:!0}:delete this.def.labels}get data_labels(){return this.def.labels??={show_value:!0},new DataLabels(this.def.labels)}get gap_width(){return this.def.gap_width??150}set gap_width(e){this.def.gap_width=e}get overlap(){return this.def.overlap??0}set overlap(e){this.def.overlap=e}get vary_by_categories(){return this.def.vary_by_categories??g(this.def.type)}set vary_by_categories(e){this.def.vary_by_categories=e}}export class ChartLegend{def;constructor(e){return this.def=e,s(this,"ChartLegend")}get position(){return this.def.legend??"right"}set position(e){this.def.legend=e}get include_in_layout(){return this.def.legend_overlay!==!0}set include_in_layout(e){e?delete this.def.legend_overlay:this.def.legend_overlay=!0}}export class TickLabels{def;constructor(e){return this.def=e,s(this,"TickLabels")}get number_format(){return this.def.number_format??"General"}set number_format(e){this.def.number_format=e}}export class MajorGridlines{line;constructor(e){return this.line=e,s(this,"MajorGridlines")}get format(){return new ChartFormat(this.line)}}export class ChartFormat{held;constructor(e){return this.held=e,s(this,"ChartFormat")}get line(){return this.held}}export class AxisTitle{def;constructor(e){return this.def=e,s(this,"AxisTitle")}get has_text_frame(){return this.def.title!==void 0}set has_text_frame(e){e?this.def.title??="":delete this.def.title}get text_frame(){const e=this.def;return e.title??="",s({get text(){return e.title??""},set text(t){e.title=t}},"TextFrame")}}export class ChartAxis{def;constructor(e){return this.def=e,s(this,"ChartAxis")}get minimum_scale(){return this.def.minimum_scale}set minimum_scale(e){e===void 0?delete this.def.minimum_scale:this.def.minimum_scale=e}get maximum_scale(){return this.def.maximum_scale}set maximum_scale(e){e===void 0?delete this.def.maximum_scale:this.def.maximum_scale=e}get major_unit(){return this.def.major_unit}set major_unit(e){e===void 0?delete this.def.major_unit:this.def.major_unit=e}get has_major_gridlines(){return this.def.has_major_gridlines??!0}set has_major_gridlines(e){this.def.has_major_gridlines=e}get visible(){return this.def.visible??!0}set visible(e){this.def.visible=e}get reverse_order(){return this.def.reverse_order??!1}set reverse_order(e){this.def.reverse_order=e}get has_title(){return this.def.title!==void 0}set has_title(e){e?this.def.title??="Axis Title":delete this.def.title}get axis_title(){return new AxisTitle(this.def)}get tick_labels(){return new TickLabels(this.def)}get major_gridlines(){return new MajorGridlines(new ChartLine(()=>this.def.gridline_color,e=>{e===void 0?delete this.def.gridline_color:this.def.gridline_color=e}))}get format(){return new ChartFormat(new ChartLine(()=>this.def.line_color,e=>{e===void 0?delete this.def.line_color:this.def.line_color=e}))}}export class Chart{def;constructor(e){return this.def=e,s(this,"Chart")}get chart_type(){return this.def.type}get has_legend(){return this.def.legend!==void 0}set has_legend(e){e?this.def.legend??="right":delete this.def.legend}get legend(){return new ChartLegend(this.def)}get has_title(){return this.def.title!==void 0}set has_title(e){e?this.def.title??="":delete this.def.title}get chart_title(){const e=this.def;return s({font:s({get size(){return e.title_size===void 0?void 0:f(o(e.title_size))},set size(t){t===void 0?delete e.title_size:e.title_size=t/o(1)}},"Font"),text_frame:s({get text(){return e.title??""},set text(t){e.title=t}},"TextFrame")},"ChartTitle")}get font(){return new ChartFont(()=>({...this.def.font_size===void 0?{}:{size:this.def.font_size},...this.def.font_color===void 0?{}:{color:this.def.font_color}}),e=>{delete this.def.font_size,delete this.def.font_color,e.size!==void 0&&(this.def.font_size=e.size),e.color!==void 0&&(this.def.font_color=e.color)})}get plots(){return m(this.def).map(e=>new ChartPlot(this.def,e.series))}get series(){return this.def.series.map((e,t)=>new ChartSeries(e,t,this.def))}get value_axis(){return this.def.value_axis??={},new ChartAxis(this.def.value_axis)}get category_axis(){return this.def.category_axis??={},new ChartAxis(this.def.category_axis)}get secondary_value_axis(){return this.def.secondary_axis??={},new ChartAxis(this.def.secondary_axis)}replace_data(e){const t=this.def.series;this.def.categories=[...e.categories],this.def.series=e._series().map((i,n)=>{const a=t[n]?.color;return a===void 0?i:{...i,color:a}})}}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export function checkDeck(h,c){const s=[];for(const a of h.slides){const d=new Set;for(const e of a.shapes){if(e.level==="slide"){if(d.has(e.name)){const m=e.sources.frame.path?.replace(/\.frame$/u,"");s.push({slide:a.id,shape:e.name,...m===void 0?{}:{path:m},message:`Slide ${a.id} has two shapes named ${e.name}${e.sources.frame.from==="code"?` (its generator ${a.file.generate??""} makes them)`:""}.`})}d.add(e.name)}const i=e.media;if(!i)continue;const o=e.kind==="movie"?"video":"image",n=c.mediaKind(i.path),t={slide:a.id,shape:e.name,...e.sources.media?.path===void 0?{}:{path:e.sources.media.path}};n===void 0?s.push({...t,message:`${i.path} (shape ${e.name} of slide ${a.id}) is not in the project.`}):n!==o&&s.push({...t,message:`${i.path} (shape ${e.name} of slide ${a.id}) is ${n==="image"?"an image":`a ${n}`}, not ${o==="image"?"an image":"a video"}.`})}}return s}
2
+ export function checkDeck(f,o){const s=[];for(const i of f.slides){const m=new Set;for(const e of i.shapes){if(e.level==="slide"){if(m.has(e.name)){const a=e.sources.frame.path?.replace(/\.frame$/u,"");s.push({slide:i.id,shape:e.name,...a===void 0?{}:{path:a},message:`Slide ${i.id} has two shapes named ${e.name}${e.sources.frame.from==="code"?` (its generator ${i.file.generate??""} makes them)`:""}.`})}m.add(e.name)}const n=e.picture_fill;if(n){const a=o.mediaKind(n.path);a!=="image"&&s.push({slide:i.id,shape:e.name,message:a===void 0?`${n.path} (the picture filling shape ${e.name} of slide ${i.id}) is not in the project.`:`${n.path} (the picture filling shape ${e.name} of slide ${i.id}) is a ${a}, not an image.`})}const d=e.media;if(!d)continue;const h=e.kind==="movie"?"video":e.kind==="audio"?"audio":"image",t=o.mediaKind(d.path),p={slide:i.id,shape:e.name,...e.sources.media?.path===void 0?{}:{path:e.sources.media.path}};t===void 0?s.push({...p,message:`${d.path} (shape ${e.name} of slide ${i.id}) is not in the project.`}):t!==h&&s.push({...p,message:`${d.path} (shape ${e.name} of slide ${i.id}) is ${t==="image"?"an image":`a ${t}`}, not ${h==="image"?"an image":"a video"}.`})}}return s}
@@ -11,10 +11,64 @@ export declare const MSO_THEME_COLOR: {
11
11
  readonly ACCENT_6: "accent6";
12
12
  readonly HYPERLINK: "hlink";
13
13
  readonly FOLLOWED_HYPERLINK: "folHlink";
14
- readonly TEXT_1: "dk1";
15
- readonly BACKGROUND_1: "lt1";
16
- readonly TEXT_2: "dk2";
17
- readonly BACKGROUND_2: "lt2";
14
+ readonly TEXT_1: "tx1";
15
+ readonly BACKGROUND_1: "bg1";
16
+ readonly TEXT_2: "tx2";
17
+ readonly BACKGROUND_2: "bg2";
18
+ };
19
+ /** A run's underline (`font.underline`), python-pptx's MSO_TEXT_UNDERLINE_TYPE: PowerPoint's Underline Style. */
20
+ export declare const MSO_UNDERLINE: {
21
+ readonly NONE: "none";
22
+ readonly SINGLE_LINE: "sng";
23
+ readonly DOUBLE_LINE: "dbl";
24
+ readonly HEAVY_LINE: "heavy";
25
+ readonly DOTTED_LINE: "dotted";
26
+ readonly DOTTED_HEAVY_LINE: "dottedHeavy";
27
+ readonly DASH_LINE: "dash";
28
+ readonly DASH_HEAVY_LINE: "dashHeavy";
29
+ readonly DASH_LONG_LINE: "dashLong";
30
+ readonly DASH_LONG_HEAVY_LINE: "dashLongHeavy";
31
+ readonly DOT_DASH_LINE: "dotDash";
32
+ readonly DOT_DASH_HEAVY_LINE: "dotDashHeavy";
33
+ readonly DOT_DOT_DASH_LINE: "dotDotDash";
34
+ readonly DOT_DOT_DASH_HEAVY_LINE: "dotDotDashHeavy";
35
+ readonly WAVY_LINE: "wavy";
36
+ readonly WAVY_HEAVY_LINE: "wavyHeavy";
37
+ readonly WAVY_DOUBLE_LINE: "wavyDbl";
38
+ readonly WORDS: "words";
39
+ };
40
+ /** python-pptx's MSO_TEXT_UNDERLINE_TYPE, MSO_UNDERLINE by its other name. */
41
+ export declare const MSO_TEXT_UNDERLINE_TYPE: {
42
+ readonly NONE: "none";
43
+ readonly SINGLE_LINE: "sng";
44
+ readonly DOUBLE_LINE: "dbl";
45
+ readonly HEAVY_LINE: "heavy";
46
+ readonly DOTTED_LINE: "dotted";
47
+ readonly DOTTED_HEAVY_LINE: "dottedHeavy";
48
+ readonly DASH_LINE: "dash";
49
+ readonly DASH_HEAVY_LINE: "dashHeavy";
50
+ readonly DASH_LONG_LINE: "dashLong";
51
+ readonly DASH_LONG_HEAVY_LINE: "dashLongHeavy";
52
+ readonly DOT_DASH_LINE: "dotDash";
53
+ readonly DOT_DASH_HEAVY_LINE: "dotDashHeavy";
54
+ readonly DOT_DOT_DASH_LINE: "dotDotDash";
55
+ readonly DOT_DOT_DASH_HEAVY_LINE: "dotDotDashHeavy";
56
+ readonly WAVY_LINE: "wavy";
57
+ readonly WAVY_HEAVY_LINE: "wavyHeavy";
58
+ readonly WAVY_DOUBLE_LINE: "wavyDbl";
59
+ readonly WORDS: "words";
60
+ };
61
+ /** A line through a run (`font.strike`): Office's MsoTextStrike, which python-pptx has no name for. */
62
+ export declare const MSO_TEXT_STRIKE: {
63
+ readonly NONE: "noStrike";
64
+ readonly SINGLE: "sngStrike";
65
+ readonly DOUBLE: "dblStrike";
66
+ };
67
+ /** A run's capitals (`font.caps`): Office's MsoTextCaps, which python-pptx has no name for. */
68
+ export declare const MSO_TEXT_CAPS: {
69
+ readonly NONE: "none";
70
+ readonly SMALL: "small";
71
+ readonly ALL: "all";
18
72
  };
19
73
  export declare const PP_ALIGN: {
20
74
  readonly LEFT: "l";
@@ -36,6 +90,16 @@ export declare const MSO_ANCHOR: {
36
90
  readonly BOTTOM: "b";
37
91
  };
38
92
  export type Anchor = (typeof MSO_ANCHOR)[keyof typeof MSO_ANCHOR];
93
+ /** Which way a text frame's text runs (`text_frame.orientation`, `a:bodyPr/@vert`): Office's MsoTextOrientation, which python-pptx has no name for, with DrawingML's stacked right to left and Mongolian. */
94
+ export declare const MSO_TEXT_ORIENTATION: {
95
+ readonly HORIZONTAL: "horz";
96
+ readonly DOWNWARD: "vert";
97
+ readonly UPWARD: "vert270";
98
+ readonly VERTICAL_FAR_EAST: "eaVert";
99
+ readonly VERTICAL: "wordArtVert";
100
+ readonly VERTICAL_RIGHT_TO_LEFT: "wordArtVertRtl";
101
+ readonly MONGOLIAN: "mongolianVert";
102
+ };
39
103
  /** How a text frame fits its text (`a:normAutofit`, `a:spAutoFit`, none). */
40
104
  export declare const MSO_AUTO_SIZE: {
41
105
  readonly NONE: "none";
@@ -258,6 +322,29 @@ export declare const MSO_LINE: {
258
322
  readonly DASH_DOT_DOT: "lgDashDotDot";
259
323
  readonly LONG_DASH: "lgDash";
260
324
  readonly LONG_DASH_DOT: "lgDashDot";
325
+ readonly DOT: "dot";
326
+ readonly SYSTEM_DASH_DOT: "sysDashDot";
327
+ readonly SYSTEM_DASH_DOT_DOT: "sysDashDotDot";
328
+ };
329
+ /** How a line's ends and dashes end (`line.cap_type`): PowerPoint's Cap type; python-pptx has no such enumeration. */
330
+ export declare const MSO_LINE_CAP: {
331
+ readonly FLAT: "flat";
332
+ readonly ROUND: "rnd";
333
+ readonly SQUARE: "sq";
334
+ };
335
+ /** How a line's corners meet (`line.join_type`): PowerPoint's Join type; python-pptx has no such enumeration. */
336
+ export declare const MSO_LINE_JOIN: {
337
+ readonly ROUND: "round";
338
+ readonly BEVEL: "bevel";
339
+ readonly MITER: "miter";
340
+ };
341
+ /** A line drawn as one, two or three (`line.compound_type`): PowerPoint's Compound type; python-pptx has no such enumeration. */
342
+ export declare const MSO_LINE_COMPOUND: {
343
+ readonly SINGLE: "sng";
344
+ readonly DOUBLE: "dbl";
345
+ readonly THICK_THIN: "thickThin";
346
+ readonly THIN_THICK: "thinThick";
347
+ readonly TRIPLE: "tri";
261
348
  };
262
349
  /** python-pptx's MSO_LINE_DASH_STYLE, MSO_LINE by its other name. */
263
350
  export declare const MSO_LINE_DASH_STYLE: {
@@ -269,6 +356,9 @@ export declare const MSO_LINE_DASH_STYLE: {
269
356
  readonly DASH_DOT_DOT: "lgDashDotDot";
270
357
  readonly LONG_DASH: "lgDash";
271
358
  readonly LONG_DASH_DOT: "lgDashDot";
359
+ readonly DOT: "dot";
360
+ readonly SYSTEM_DASH_DOT: "sysDashDot";
361
+ readonly SYSTEM_DASH_DOT_DOT: "sysDashDotDot";
272
362
  };
273
363
  /** What a line's end has (`line.begin_arrow`, `line.end_arrow`): PowerPoint's arrow types; python-pptx has no such enumeration. */
274
364
  export declare const MSO_ARROWHEAD: {
@@ -343,6 +433,134 @@ export declare const MSO_FILL: {
343
433
  readonly SOLID: "solid";
344
434
  readonly BACKGROUND: "background";
345
435
  readonly GRADIENT: "gradient";
436
+ readonly PATTERNED: "patterned";
437
+ readonly PICTURE: "picture";
438
+ };
439
+ /** A pattern fill's preset (`fill.pattern`), python-pptx's MSO_PATTERN_TYPE. */
440
+ export declare const MSO_PATTERN_TYPE: {
441
+ readonly CROSS: "cross";
442
+ readonly DARK_DOWNWARD_DIAGONAL: "dkDnDiag";
443
+ readonly DARK_HORIZONTAL: "dkHorz";
444
+ readonly DARK_UPWARD_DIAGONAL: "dkUpDiag";
445
+ readonly DARK_VERTICAL: "dkVert";
446
+ readonly DASHED_DOWNWARD_DIAGONAL: "dashDnDiag";
447
+ readonly DASHED_HORIZONTAL: "dashHorz";
448
+ readonly DASHED_UPWARD_DIAGONAL: "dashUpDiag";
449
+ readonly DASHED_VERTICAL: "dashVert";
450
+ readonly DIAGONAL_BRICK: "diagBrick";
451
+ readonly DIAGONAL_CROSS: "diagCross";
452
+ readonly DIVOT: "divot";
453
+ readonly DOTTED_DIAMOND: "dotDmnd";
454
+ readonly DOTTED_GRID: "dotGrid";
455
+ readonly DOWNWARD_DIAGONAL: "dnDiag";
456
+ readonly HORIZONTAL: "horz";
457
+ readonly HORIZONTAL_BRICK: "horzBrick";
458
+ readonly LARGE_CHECKER_BOARD: "lgCheck";
459
+ readonly LARGE_CONFETTI: "lgConfetti";
460
+ readonly LARGE_GRID: "lgGrid";
461
+ readonly LIGHT_DOWNWARD_DIAGONAL: "ltDnDiag";
462
+ readonly LIGHT_HORIZONTAL: "ltHorz";
463
+ readonly LIGHT_UPWARD_DIAGONAL: "ltUpDiag";
464
+ readonly LIGHT_VERTICAL: "ltVert";
465
+ readonly NARROW_HORIZONTAL: "narHorz";
466
+ readonly NARROW_VERTICAL: "narVert";
467
+ readonly OUTLINED_DIAMOND: "openDmnd";
468
+ readonly PERCENT_5: "pct5";
469
+ readonly PERCENT_10: "pct10";
470
+ readonly PERCENT_20: "pct20";
471
+ readonly PERCENT_25: "pct25";
472
+ readonly PERCENT_30: "pct30";
473
+ readonly PERCENT_40: "pct40";
474
+ readonly PERCENT_50: "pct50";
475
+ readonly PERCENT_60: "pct60";
476
+ readonly PERCENT_70: "pct70";
477
+ readonly PERCENT_75: "pct75";
478
+ readonly PERCENT_80: "pct80";
479
+ readonly PERCENT_90: "pct90";
480
+ readonly PLAID: "plaid";
481
+ readonly SHINGLE: "shingle";
482
+ readonly SMALL_CHECKER_BOARD: "smCheck";
483
+ readonly SMALL_CONFETTI: "smConfetti";
484
+ readonly SMALL_GRID: "smGrid";
485
+ readonly SOLID_DIAMOND: "solidDmnd";
486
+ readonly SPHERE: "sphere";
487
+ readonly TRELLIS: "trellis";
488
+ readonly UPWARD_DIAGONAL: "upDiag";
489
+ readonly VERTICAL: "vert";
490
+ readonly WAVE: "wave";
491
+ readonly WEAVE: "weave";
492
+ readonly WIDE_DOWNWARD_DIAGONAL: "wdDnDiag";
493
+ readonly WIDE_UPWARD_DIAGONAL: "wdUpDiag";
494
+ readonly ZIG_ZAG: "zigZag";
495
+ };
496
+ /** python-pptx's MSO_PATTERN, MSO_PATTERN_TYPE by its other name. */
497
+ export declare const MSO_PATTERN: {
498
+ readonly CROSS: "cross";
499
+ readonly DARK_DOWNWARD_DIAGONAL: "dkDnDiag";
500
+ readonly DARK_HORIZONTAL: "dkHorz";
501
+ readonly DARK_UPWARD_DIAGONAL: "dkUpDiag";
502
+ readonly DARK_VERTICAL: "dkVert";
503
+ readonly DASHED_DOWNWARD_DIAGONAL: "dashDnDiag";
504
+ readonly DASHED_HORIZONTAL: "dashHorz";
505
+ readonly DASHED_UPWARD_DIAGONAL: "dashUpDiag";
506
+ readonly DASHED_VERTICAL: "dashVert";
507
+ readonly DIAGONAL_BRICK: "diagBrick";
508
+ readonly DIAGONAL_CROSS: "diagCross";
509
+ readonly DIVOT: "divot";
510
+ readonly DOTTED_DIAMOND: "dotDmnd";
511
+ readonly DOTTED_GRID: "dotGrid";
512
+ readonly DOWNWARD_DIAGONAL: "dnDiag";
513
+ readonly HORIZONTAL: "horz";
514
+ readonly HORIZONTAL_BRICK: "horzBrick";
515
+ readonly LARGE_CHECKER_BOARD: "lgCheck";
516
+ readonly LARGE_CONFETTI: "lgConfetti";
517
+ readonly LARGE_GRID: "lgGrid";
518
+ readonly LIGHT_DOWNWARD_DIAGONAL: "ltDnDiag";
519
+ readonly LIGHT_HORIZONTAL: "ltHorz";
520
+ readonly LIGHT_UPWARD_DIAGONAL: "ltUpDiag";
521
+ readonly LIGHT_VERTICAL: "ltVert";
522
+ readonly NARROW_HORIZONTAL: "narHorz";
523
+ readonly NARROW_VERTICAL: "narVert";
524
+ readonly OUTLINED_DIAMOND: "openDmnd";
525
+ readonly PERCENT_5: "pct5";
526
+ readonly PERCENT_10: "pct10";
527
+ readonly PERCENT_20: "pct20";
528
+ readonly PERCENT_25: "pct25";
529
+ readonly PERCENT_30: "pct30";
530
+ readonly PERCENT_40: "pct40";
531
+ readonly PERCENT_50: "pct50";
532
+ readonly PERCENT_60: "pct60";
533
+ readonly PERCENT_70: "pct70";
534
+ readonly PERCENT_75: "pct75";
535
+ readonly PERCENT_80: "pct80";
536
+ readonly PERCENT_90: "pct90";
537
+ readonly PLAID: "plaid";
538
+ readonly SHINGLE: "shingle";
539
+ readonly SMALL_CHECKER_BOARD: "smCheck";
540
+ readonly SMALL_CONFETTI: "smConfetti";
541
+ readonly SMALL_GRID: "smGrid";
542
+ readonly SOLID_DIAMOND: "solidDmnd";
543
+ readonly SPHERE: "sphere";
544
+ readonly TRELLIS: "trellis";
545
+ readonly UPWARD_DIAGONAL: "upDiag";
546
+ readonly VERTICAL: "vert";
547
+ readonly WAVE: "wave";
548
+ readonly WEAVE: "weave";
549
+ readonly WIDE_DOWNWARD_DIAGONAL: "wdDnDiag";
550
+ readonly WIDE_UPWARD_DIAGONAL: "wdUpDiag";
551
+ readonly ZIG_ZAG: "zigZag";
552
+ };
553
+ /** Where a tiled picture's first tile stands (`fill.picture(…, { tile: { align } })`): PowerPoint's Alignment; python-pptx has no such enumeration. */
554
+ export declare const TILE_ALIGNMENT: {
555
+ readonly TOP_LEFT: "tl";
556
+ readonly TOP: "t";
557
+ readonly TOP_RIGHT: "tr";
558
+ readonly LEFT: "l";
559
+ readonly CENTER: "ctr";
560
+ readonly RIGHT: "r";
561
+ readonly BOTTOM_LEFT: "bl";
562
+ readonly BOTTOM: "b";
563
+ readonly BOTTOM_RIGHT: "br";
346
564
  };
347
565
  export type FillType = (typeof MSO_FILL)[keyof typeof MSO_FILL];
348
566
  /** The theme's fonts as a run names them (`+mj-lt`, `+mn-lt`). */
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{strictEnum as _}from"./strict.js";export const MSO_THEME_COLOR=_("MSO_THEME_COLOR",{DARK_1:"dk1",LIGHT_1:"lt1",DARK_2:"dk2",LIGHT_2:"lt2",ACCENT_1:"accent1",ACCENT_2:"accent2",ACCENT_3:"accent3",ACCENT_4:"accent4",ACCENT_5:"accent5",ACCENT_6:"accent6",HYPERLINK:"hlink",FOLLOWED_HYPERLINK:"folHlink",TEXT_1:"dk1",BACKGROUND_1:"lt1",TEXT_2:"dk2",BACKGROUND_2:"lt2"}),PP_ALIGN=_("PP_ALIGN",{LEFT:"l",CENTER:"ctr",RIGHT:"r",JUSTIFY:"just"}),PP_PARAGRAPH_ALIGNMENT=PP_ALIGN,MSO_ANCHOR=_("MSO_ANCHOR",{TOP:"t",MIDDLE:"ctr",BOTTOM:"b"}),MSO_AUTO_SIZE=_("MSO_AUTO_SIZE",{NONE:"none",SHAPE_TO_FIT_TEXT:"shape",TEXT_TO_FIT_SHAPE:"text"}),PP_PLACEHOLDER=_("PP_PLACEHOLDER",{TITLE:"title",CENTER_TITLE:"ctrTitle",SUBTITLE:"subTitle",BODY:"body",PICTURE:"pic",MEDIA_CLIP:"media",OBJECT:"obj",DATE:"dt",FOOTER:"ftr",SLIDE_NUMBER:"sldNum"}),MSO_SHAPE=_("MSO_SHAPE",{ACTION_BUTTON_BACK_OR_PREVIOUS:"actionButtonBackPrevious",ACTION_BUTTON_BEGINNING:"actionButtonBeginning",ACTION_BUTTON_CUSTOM:"actionButtonBlank",ACTION_BUTTON_DOCUMENT:"actionButtonDocument",ACTION_BUTTON_END:"actionButtonEnd",ACTION_BUTTON_FORWARD_OR_NEXT:"actionButtonForwardNext",ACTION_BUTTON_HELP:"actionButtonHelp",ACTION_BUTTON_HOME:"actionButtonHome",ACTION_BUTTON_INFORMATION:"actionButtonInformation",ACTION_BUTTON_MOVIE:"actionButtonMovie",ACTION_BUTTON_RETURN:"actionButtonReturn",ACTION_BUTTON_SOUND:"actionButtonSound",ARC:"arc",BALLOON:"wedgeRoundRectCallout",BENT_ARROW:"bentArrow",BENT_UP_ARROW:"bentUpArrow",BEVEL:"bevel",BLOCK_ARC:"blockArc",CAN:"can",CHART_PLUS:"chartPlus",CHART_STAR:"chartStar",CHART_X:"chartX",CHEVRON:"chevron",CHORD:"chord",CIRCULAR_ARROW:"circularArrow",CLOUD:"cloud",CLOUD_CALLOUT:"cloudCallout",CORNER:"corner",CORNER_TABS:"cornerTabs",CROSS:"plus",CUBE:"cube",CURVED_DOWN_ARROW:"curvedDownArrow",CURVED_DOWN_RIBBON:"ellipseRibbon",CURVED_LEFT_ARROW:"curvedLeftArrow",CURVED_RIGHT_ARROW:"curvedRightArrow",CURVED_UP_ARROW:"curvedUpArrow",CURVED_UP_RIBBON:"ellipseRibbon2",DECAGON:"decagon",DIAGONAL_STRIPE:"diagStripe",DIAMOND:"diamond",DODECAGON:"dodecagon",DONUT:"donut",DOUBLE_BRACE:"bracePair",DOUBLE_BRACKET:"bracketPair",DOUBLE_WAVE:"doubleWave",DOWN_ARROW:"downArrow",DOWN_ARROW_CALLOUT:"downArrowCallout",DOWN_RIBBON:"ribbon",EXPLOSION1:"irregularSeal1",EXPLOSION2:"irregularSeal2",FLOWCHART_ALTERNATE_PROCESS:"flowChartAlternateProcess",FLOWCHART_CARD:"flowChartPunchedCard",FLOWCHART_COLLATE:"flowChartCollate",FLOWCHART_CONNECTOR:"flowChartConnector",FLOWCHART_DATA:"flowChartInputOutput",FLOWCHART_DECISION:"flowChartDecision",FLOWCHART_DELAY:"flowChartDelay",FLOWCHART_DIRECT_ACCESS_STORAGE:"flowChartMagneticDrum",FLOWCHART_DISPLAY:"flowChartDisplay",FLOWCHART_DOCUMENT:"flowChartDocument",FLOWCHART_EXTRACT:"flowChartExtract",FLOWCHART_INTERNAL_STORAGE:"flowChartInternalStorage",FLOWCHART_MAGNETIC_DISK:"flowChartMagneticDisk",FLOWCHART_MANUAL_INPUT:"flowChartManualInput",FLOWCHART_MANUAL_OPERATION:"flowChartManualOperation",FLOWCHART_MERGE:"flowChartMerge",FLOWCHART_MULTIDOCUMENT:"flowChartMultidocument",FLOWCHART_OFFLINE_STORAGE:"flowChartOfflineStorage",FLOWCHART_OFFPAGE_CONNECTOR:"flowChartOffpageConnector",FLOWCHART_OR:"flowChartOr",FLOWCHART_PREDEFINED_PROCESS:"flowChartPredefinedProcess",FLOWCHART_PREPARATION:"flowChartPreparation",FLOWCHART_PROCESS:"flowChartProcess",FLOWCHART_PUNCHED_TAPE:"flowChartPunchedTape",FLOWCHART_SEQUENTIAL_ACCESS_STORAGE:"flowChartMagneticTape",FLOWCHART_SORT:"flowChartSort",FLOWCHART_STORED_DATA:"flowChartOnlineStorage",FLOWCHART_SUMMING_JUNCTION:"flowChartSummingJunction",FLOWCHART_TERMINATOR:"flowChartTerminator",FOLDED_CORNER:"foldedCorner",FRAME:"frame",FUNNEL:"funnel",GEAR_6:"gear6",GEAR_9:"gear9",HALF_FRAME:"halfFrame",HEART:"heart",HEPTAGON:"heptagon",HEXAGON:"hexagon",HORIZONTAL_SCROLL:"horizontalScroll",ISOSCELES_TRIANGLE:"triangle",LEFT_ARROW:"leftArrow",LEFT_ARROW_CALLOUT:"leftArrowCallout",LEFT_BRACE:"leftBrace",LEFT_BRACKET:"leftBracket",LEFT_CIRCULAR_ARROW:"leftCircularArrow",LEFT_RIGHT_ARROW:"leftRightArrow",LEFT_RIGHT_ARROW_CALLOUT:"leftRightArrowCallout",LEFT_RIGHT_CIRCULAR_ARROW:"leftRightCircularArrow",LEFT_RIGHT_RIBBON:"leftRightRibbon",LEFT_RIGHT_UP_ARROW:"leftRightUpArrow",LEFT_UP_ARROW:"leftUpArrow",LIGHTNING_BOLT:"lightningBolt",LINE_CALLOUT_1:"borderCallout1",LINE_CALLOUT_1_ACCENT_BAR:"accentCallout1",LINE_CALLOUT_1_BORDER_AND_ACCENT_BAR:"accentBorderCallout1",LINE_CALLOUT_1_NO_BORDER:"callout1",LINE_CALLOUT_2:"borderCallout2",LINE_CALLOUT_2_ACCENT_BAR:"accentCallout2",LINE_CALLOUT_2_BORDER_AND_ACCENT_BAR:"accentBorderCallout2",LINE_CALLOUT_2_NO_BORDER:"callout2",LINE_CALLOUT_3:"borderCallout3",LINE_CALLOUT_3_ACCENT_BAR:"accentCallout3",LINE_CALLOUT_3_BORDER_AND_ACCENT_BAR:"accentBorderCallout3",LINE_CALLOUT_3_NO_BORDER:"callout3",LINE_CALLOUT_4:"borderCallout3",LINE_CALLOUT_4_ACCENT_BAR:"accentCallout3",LINE_CALLOUT_4_BORDER_AND_ACCENT_BAR:"accentBorderCallout3",LINE_CALLOUT_4_NO_BORDER:"callout3",LINE_INVERSE:"lineInv",MATH_DIVIDE:"mathDivide",MATH_EQUAL:"mathEqual",MATH_MINUS:"mathMinus",MATH_MULTIPLY:"mathMultiply",MATH_NOT_EQUAL:"mathNotEqual",MATH_PLUS:"mathPlus",MOON:"moon",NON_ISOSCELES_TRAPEZOID:"nonIsoscelesTrapezoid",NOTCHED_RIGHT_ARROW:"notchedRightArrow",NO_SYMBOL:"noSmoking",OCTAGON:"octagon",OVAL:"ellipse",OVAL_CALLOUT:"wedgeEllipseCallout",PARALLELOGRAM:"parallelogram",PENTAGON:"homePlate",PIE:"pie",PIE_WEDGE:"pieWedge",PLAQUE:"plaque",PLAQUE_TABS:"plaqueTabs",QUAD_ARROW:"quadArrow",QUAD_ARROW_CALLOUT:"quadArrowCallout",RECTANGLE:"rect",RECTANGULAR_CALLOUT:"wedgeRectCallout",REGULAR_PENTAGON:"pentagon",RIGHT_ARROW:"rightArrow",RIGHT_ARROW_CALLOUT:"rightArrowCallout",RIGHT_BRACE:"rightBrace",RIGHT_BRACKET:"rightBracket",RIGHT_TRIANGLE:"rtTriangle",ROUNDED_RECTANGLE:"roundRect",ROUNDED_RECTANGULAR_CALLOUT:"wedgeRoundRectCallout",ROUND_1_RECTANGLE:"round1Rect",ROUND_2_DIAG_RECTANGLE:"round2DiagRect",ROUND_2_SAME_RECTANGLE:"round2SameRect",SMILEY_FACE:"smileyFace",SNIP_1_RECTANGLE:"snip1Rect",SNIP_2_DIAG_RECTANGLE:"snip2DiagRect",SNIP_2_SAME_RECTANGLE:"snip2SameRect",SNIP_ROUND_RECTANGLE:"snipRoundRect",SQUARE_TABS:"squareTabs",STAR_10_POINT:"star10",STAR_12_POINT:"star12",STAR_16_POINT:"star16",STAR_24_POINT:"star24",STAR_32_POINT:"star32",STAR_4_POINT:"star4",STAR_5_POINT:"star5",STAR_6_POINT:"star6",STAR_7_POINT:"star7",STAR_8_POINT:"star8",STRIPED_RIGHT_ARROW:"stripedRightArrow",SUN:"sun",SWOOSH_ARROW:"swooshArrow",TEAR:"teardrop",TRAPEZOID:"trapezoid",UP_ARROW:"upArrow",UP_ARROW_CALLOUT:"upArrowCallout",UP_DOWN_ARROW:"upDownArrow",UP_DOWN_ARROW_CALLOUT:"upDownArrowCallout",UP_RIBBON:"ribbon2",U_TURN_ARROW:"uturnArrow",VERTICAL_SCROLL:"verticalScroll",WAVE:"wave"}),MSO_CONNECTOR=_("MSO_CONNECTOR",{STRAIGHT:"line",ELBOW:"bentConnector3",CURVE:"curvedConnector3"}),MSO_LINE=_("MSO_LINE",{SOLID:"solid",SQUARE_DOT:"sysDash",ROUND_DOT:"sysDot",DASH:"dash",DASH_DOT:"dashDot",DASH_DOT_DOT:"lgDashDotDot",LONG_DASH:"lgDash",LONG_DASH_DOT:"lgDashDot"}),MSO_LINE_DASH_STYLE=MSO_LINE,MSO_ARROWHEAD=_("MSO_ARROWHEAD",{NONE:"none",TRIANGLE:"triangle",OPEN:"arrow",STEALTH:"stealth",DIAMOND:"diamond",OVAL:"oval"}),MSO_ARROWHEAD_SIZE=_("MSO_ARROWHEAD_SIZE",{SMALL:"sm",MEDIUM:"med",LARGE:"lg"}),MSO_SHAPE_TYPE=_("MSO_SHAPE_TYPE",{AUTO_SHAPE:"autoshape",FREEFORM:"freeform",GROUP:"group",LINE:"line",TABLE:"table",CHART:"chart",MEDIA:"movie",PICTURE:"picture",PLACEHOLDER:"placeholder",TEXT_BOX:"textbox",COMPONENT:"component"}),XL_CHART_TYPE=_("XL_CHART_TYPE",{COLUMN_CLUSTERED:"column-clustered",COLUMN_STACKED:"column-stacked",COLUMN_STACKED_100:"column-stacked-100",BAR_CLUSTERED:"bar-clustered",BAR_STACKED:"bar-stacked",BAR_STACKED_100:"bar-stacked-100",LINE:"line",LINE_MARKERS:"line-markers",AREA:"area",AREA_STACKED:"area-stacked",AREA_STACKED_100:"area-stacked-100",PIE:"pie",DOUGHNUT:"doughnut",XY_SCATTER:"scatter",XY_SCATTER_LINES:"scatter-lines",XY_SCATTER_SMOOTH:"scatter-smooth"}),XL_LEGEND_POSITION=_("XL_LEGEND_POSITION",{BOTTOM:"bottom",TOP:"top",LEFT:"left",RIGHT:"right"}),XL_LABEL_POSITION=_("XL_LABEL_POSITION",{ABOVE:"t",BELOW:"b",BEST_FIT:"bestFit",CENTER:"ctr",INSIDE_BASE:"inBase",INSIDE_END:"inEnd",LEFT:"l",OUTSIDE_END:"outEnd",RIGHT:"r"}),MSO_FILL=_("MSO_FILL",{SOLID:"solid",BACKGROUND:"background",GRADIENT:"gradient"}),THEME_FONT=_("THEME_FONT",{MAJOR:"+mj-lt",MINOR:"+mn-lt"});
2
+ import{strictEnum as _}from"./strict.js";export const MSO_THEME_COLOR=_("MSO_THEME_COLOR",{DARK_1:"dk1",LIGHT_1:"lt1",DARK_2:"dk2",LIGHT_2:"lt2",ACCENT_1:"accent1",ACCENT_2:"accent2",ACCENT_3:"accent3",ACCENT_4:"accent4",ACCENT_5:"accent5",ACCENT_6:"accent6",HYPERLINK:"hlink",FOLLOWED_HYPERLINK:"folHlink",TEXT_1:"tx1",BACKGROUND_1:"bg1",TEXT_2:"tx2",BACKGROUND_2:"bg2"}),MSO_UNDERLINE=_("MSO_UNDERLINE",{NONE:"none",SINGLE_LINE:"sng",DOUBLE_LINE:"dbl",HEAVY_LINE:"heavy",DOTTED_LINE:"dotted",DOTTED_HEAVY_LINE:"dottedHeavy",DASH_LINE:"dash",DASH_HEAVY_LINE:"dashHeavy",DASH_LONG_LINE:"dashLong",DASH_LONG_HEAVY_LINE:"dashLongHeavy",DOT_DASH_LINE:"dotDash",DOT_DASH_HEAVY_LINE:"dotDashHeavy",DOT_DOT_DASH_LINE:"dotDotDash",DOT_DOT_DASH_HEAVY_LINE:"dotDotDashHeavy",WAVY_LINE:"wavy",WAVY_HEAVY_LINE:"wavyHeavy",WAVY_DOUBLE_LINE:"wavyDbl",WORDS:"words"}),MSO_TEXT_UNDERLINE_TYPE=MSO_UNDERLINE,MSO_TEXT_STRIKE=_("MSO_TEXT_STRIKE",{NONE:"noStrike",SINGLE:"sngStrike",DOUBLE:"dblStrike"}),MSO_TEXT_CAPS=_("MSO_TEXT_CAPS",{NONE:"none",SMALL:"small",ALL:"all"}),PP_ALIGN=_("PP_ALIGN",{LEFT:"l",CENTER:"ctr",RIGHT:"r",JUSTIFY:"just"}),PP_PARAGRAPH_ALIGNMENT=PP_ALIGN,MSO_ANCHOR=_("MSO_ANCHOR",{TOP:"t",MIDDLE:"ctr",BOTTOM:"b"}),MSO_TEXT_ORIENTATION=_("MSO_TEXT_ORIENTATION",{HORIZONTAL:"horz",DOWNWARD:"vert",UPWARD:"vert270",VERTICAL_FAR_EAST:"eaVert",VERTICAL:"wordArtVert",VERTICAL_RIGHT_TO_LEFT:"wordArtVertRtl",MONGOLIAN:"mongolianVert"}),MSO_AUTO_SIZE=_("MSO_AUTO_SIZE",{NONE:"none",SHAPE_TO_FIT_TEXT:"shape",TEXT_TO_FIT_SHAPE:"text"}),PP_PLACEHOLDER=_("PP_PLACEHOLDER",{TITLE:"title",CENTER_TITLE:"ctrTitle",SUBTITLE:"subTitle",BODY:"body",PICTURE:"pic",MEDIA_CLIP:"media",OBJECT:"obj",DATE:"dt",FOOTER:"ftr",SLIDE_NUMBER:"sldNum"}),MSO_SHAPE=_("MSO_SHAPE",{ACTION_BUTTON_BACK_OR_PREVIOUS:"actionButtonBackPrevious",ACTION_BUTTON_BEGINNING:"actionButtonBeginning",ACTION_BUTTON_CUSTOM:"actionButtonBlank",ACTION_BUTTON_DOCUMENT:"actionButtonDocument",ACTION_BUTTON_END:"actionButtonEnd",ACTION_BUTTON_FORWARD_OR_NEXT:"actionButtonForwardNext",ACTION_BUTTON_HELP:"actionButtonHelp",ACTION_BUTTON_HOME:"actionButtonHome",ACTION_BUTTON_INFORMATION:"actionButtonInformation",ACTION_BUTTON_MOVIE:"actionButtonMovie",ACTION_BUTTON_RETURN:"actionButtonReturn",ACTION_BUTTON_SOUND:"actionButtonSound",ARC:"arc",BALLOON:"wedgeRoundRectCallout",BENT_ARROW:"bentArrow",BENT_UP_ARROW:"bentUpArrow",BEVEL:"bevel",BLOCK_ARC:"blockArc",CAN:"can",CHART_PLUS:"chartPlus",CHART_STAR:"chartStar",CHART_X:"chartX",CHEVRON:"chevron",CHORD:"chord",CIRCULAR_ARROW:"circularArrow",CLOUD:"cloud",CLOUD_CALLOUT:"cloudCallout",CORNER:"corner",CORNER_TABS:"cornerTabs",CROSS:"plus",CUBE:"cube",CURVED_DOWN_ARROW:"curvedDownArrow",CURVED_DOWN_RIBBON:"ellipseRibbon",CURVED_LEFT_ARROW:"curvedLeftArrow",CURVED_RIGHT_ARROW:"curvedRightArrow",CURVED_UP_ARROW:"curvedUpArrow",CURVED_UP_RIBBON:"ellipseRibbon2",DECAGON:"decagon",DIAGONAL_STRIPE:"diagStripe",DIAMOND:"diamond",DODECAGON:"dodecagon",DONUT:"donut",DOUBLE_BRACE:"bracePair",DOUBLE_BRACKET:"bracketPair",DOUBLE_WAVE:"doubleWave",DOWN_ARROW:"downArrow",DOWN_ARROW_CALLOUT:"downArrowCallout",DOWN_RIBBON:"ribbon",EXPLOSION1:"irregularSeal1",EXPLOSION2:"irregularSeal2",FLOWCHART_ALTERNATE_PROCESS:"flowChartAlternateProcess",FLOWCHART_CARD:"flowChartPunchedCard",FLOWCHART_COLLATE:"flowChartCollate",FLOWCHART_CONNECTOR:"flowChartConnector",FLOWCHART_DATA:"flowChartInputOutput",FLOWCHART_DECISION:"flowChartDecision",FLOWCHART_DELAY:"flowChartDelay",FLOWCHART_DIRECT_ACCESS_STORAGE:"flowChartMagneticDrum",FLOWCHART_DISPLAY:"flowChartDisplay",FLOWCHART_DOCUMENT:"flowChartDocument",FLOWCHART_EXTRACT:"flowChartExtract",FLOWCHART_INTERNAL_STORAGE:"flowChartInternalStorage",FLOWCHART_MAGNETIC_DISK:"flowChartMagneticDisk",FLOWCHART_MANUAL_INPUT:"flowChartManualInput",FLOWCHART_MANUAL_OPERATION:"flowChartManualOperation",FLOWCHART_MERGE:"flowChartMerge",FLOWCHART_MULTIDOCUMENT:"flowChartMultidocument",FLOWCHART_OFFLINE_STORAGE:"flowChartOfflineStorage",FLOWCHART_OFFPAGE_CONNECTOR:"flowChartOffpageConnector",FLOWCHART_OR:"flowChartOr",FLOWCHART_PREDEFINED_PROCESS:"flowChartPredefinedProcess",FLOWCHART_PREPARATION:"flowChartPreparation",FLOWCHART_PROCESS:"flowChartProcess",FLOWCHART_PUNCHED_TAPE:"flowChartPunchedTape",FLOWCHART_SEQUENTIAL_ACCESS_STORAGE:"flowChartMagneticTape",FLOWCHART_SORT:"flowChartSort",FLOWCHART_STORED_DATA:"flowChartOnlineStorage",FLOWCHART_SUMMING_JUNCTION:"flowChartSummingJunction",FLOWCHART_TERMINATOR:"flowChartTerminator",FOLDED_CORNER:"foldedCorner",FRAME:"frame",FUNNEL:"funnel",GEAR_6:"gear6",GEAR_9:"gear9",HALF_FRAME:"halfFrame",HEART:"heart",HEPTAGON:"heptagon",HEXAGON:"hexagon",HORIZONTAL_SCROLL:"horizontalScroll",ISOSCELES_TRIANGLE:"triangle",LEFT_ARROW:"leftArrow",LEFT_ARROW_CALLOUT:"leftArrowCallout",LEFT_BRACE:"leftBrace",LEFT_BRACKET:"leftBracket",LEFT_CIRCULAR_ARROW:"leftCircularArrow",LEFT_RIGHT_ARROW:"leftRightArrow",LEFT_RIGHT_ARROW_CALLOUT:"leftRightArrowCallout",LEFT_RIGHT_CIRCULAR_ARROW:"leftRightCircularArrow",LEFT_RIGHT_RIBBON:"leftRightRibbon",LEFT_RIGHT_UP_ARROW:"leftRightUpArrow",LEFT_UP_ARROW:"leftUpArrow",LIGHTNING_BOLT:"lightningBolt",LINE_CALLOUT_1:"borderCallout1",LINE_CALLOUT_1_ACCENT_BAR:"accentCallout1",LINE_CALLOUT_1_BORDER_AND_ACCENT_BAR:"accentBorderCallout1",LINE_CALLOUT_1_NO_BORDER:"callout1",LINE_CALLOUT_2:"borderCallout2",LINE_CALLOUT_2_ACCENT_BAR:"accentCallout2",LINE_CALLOUT_2_BORDER_AND_ACCENT_BAR:"accentBorderCallout2",LINE_CALLOUT_2_NO_BORDER:"callout2",LINE_CALLOUT_3:"borderCallout3",LINE_CALLOUT_3_ACCENT_BAR:"accentCallout3",LINE_CALLOUT_3_BORDER_AND_ACCENT_BAR:"accentBorderCallout3",LINE_CALLOUT_3_NO_BORDER:"callout3",LINE_CALLOUT_4:"borderCallout3",LINE_CALLOUT_4_ACCENT_BAR:"accentCallout3",LINE_CALLOUT_4_BORDER_AND_ACCENT_BAR:"accentBorderCallout3",LINE_CALLOUT_4_NO_BORDER:"callout3",LINE_INVERSE:"lineInv",MATH_DIVIDE:"mathDivide",MATH_EQUAL:"mathEqual",MATH_MINUS:"mathMinus",MATH_MULTIPLY:"mathMultiply",MATH_NOT_EQUAL:"mathNotEqual",MATH_PLUS:"mathPlus",MOON:"moon",NON_ISOSCELES_TRAPEZOID:"nonIsoscelesTrapezoid",NOTCHED_RIGHT_ARROW:"notchedRightArrow",NO_SYMBOL:"noSmoking",OCTAGON:"octagon",OVAL:"ellipse",OVAL_CALLOUT:"wedgeEllipseCallout",PARALLELOGRAM:"parallelogram",PENTAGON:"homePlate",PIE:"pie",PIE_WEDGE:"pieWedge",PLAQUE:"plaque",PLAQUE_TABS:"plaqueTabs",QUAD_ARROW:"quadArrow",QUAD_ARROW_CALLOUT:"quadArrowCallout",RECTANGLE:"rect",RECTANGULAR_CALLOUT:"wedgeRectCallout",REGULAR_PENTAGON:"pentagon",RIGHT_ARROW:"rightArrow",RIGHT_ARROW_CALLOUT:"rightArrowCallout",RIGHT_BRACE:"rightBrace",RIGHT_BRACKET:"rightBracket",RIGHT_TRIANGLE:"rtTriangle",ROUNDED_RECTANGLE:"roundRect",ROUNDED_RECTANGULAR_CALLOUT:"wedgeRoundRectCallout",ROUND_1_RECTANGLE:"round1Rect",ROUND_2_DIAG_RECTANGLE:"round2DiagRect",ROUND_2_SAME_RECTANGLE:"round2SameRect",SMILEY_FACE:"smileyFace",SNIP_1_RECTANGLE:"snip1Rect",SNIP_2_DIAG_RECTANGLE:"snip2DiagRect",SNIP_2_SAME_RECTANGLE:"snip2SameRect",SNIP_ROUND_RECTANGLE:"snipRoundRect",SQUARE_TABS:"squareTabs",STAR_10_POINT:"star10",STAR_12_POINT:"star12",STAR_16_POINT:"star16",STAR_24_POINT:"star24",STAR_32_POINT:"star32",STAR_4_POINT:"star4",STAR_5_POINT:"star5",STAR_6_POINT:"star6",STAR_7_POINT:"star7",STAR_8_POINT:"star8",STRIPED_RIGHT_ARROW:"stripedRightArrow",SUN:"sun",SWOOSH_ARROW:"swooshArrow",TEAR:"teardrop",TRAPEZOID:"trapezoid",UP_ARROW:"upArrow",UP_ARROW_CALLOUT:"upArrowCallout",UP_DOWN_ARROW:"upDownArrow",UP_DOWN_ARROW_CALLOUT:"upDownArrowCallout",UP_RIBBON:"ribbon2",U_TURN_ARROW:"uturnArrow",VERTICAL_SCROLL:"verticalScroll",WAVE:"wave"}),MSO_CONNECTOR=_("MSO_CONNECTOR",{STRAIGHT:"line",ELBOW:"bentConnector3",CURVE:"curvedConnector3"}),MSO_LINE=_("MSO_LINE",{SOLID:"solid",SQUARE_DOT:"sysDash",ROUND_DOT:"sysDot",DASH:"dash",DASH_DOT:"dashDot",DASH_DOT_DOT:"lgDashDotDot",LONG_DASH:"lgDash",LONG_DASH_DOT:"lgDashDot",DOT:"dot",SYSTEM_DASH_DOT:"sysDashDot",SYSTEM_DASH_DOT_DOT:"sysDashDotDot"}),MSO_LINE_CAP=_("MSO_LINE_CAP",{FLAT:"flat",ROUND:"rnd",SQUARE:"sq"}),MSO_LINE_JOIN=_("MSO_LINE_JOIN",{ROUND:"round",BEVEL:"bevel",MITER:"miter"}),MSO_LINE_COMPOUND=_("MSO_LINE_COMPOUND",{SINGLE:"sng",DOUBLE:"dbl",THICK_THIN:"thickThin",THIN_THICK:"thinThick",TRIPLE:"tri"}),MSO_LINE_DASH_STYLE=MSO_LINE,MSO_ARROWHEAD=_("MSO_ARROWHEAD",{NONE:"none",TRIANGLE:"triangle",OPEN:"arrow",STEALTH:"stealth",DIAMOND:"diamond",OVAL:"oval"}),MSO_ARROWHEAD_SIZE=_("MSO_ARROWHEAD_SIZE",{SMALL:"sm",MEDIUM:"med",LARGE:"lg"}),MSO_SHAPE_TYPE=_("MSO_SHAPE_TYPE",{AUTO_SHAPE:"autoshape",FREEFORM:"freeform",GROUP:"group",LINE:"line",TABLE:"table",CHART:"chart",MEDIA:"movie",PICTURE:"picture",PLACEHOLDER:"placeholder",TEXT_BOX:"textbox",COMPONENT:"component"}),XL_CHART_TYPE=_("XL_CHART_TYPE",{COLUMN_CLUSTERED:"column-clustered",COLUMN_STACKED:"column-stacked",COLUMN_STACKED_100:"column-stacked-100",BAR_CLUSTERED:"bar-clustered",BAR_STACKED:"bar-stacked",BAR_STACKED_100:"bar-stacked-100",LINE:"line",LINE_MARKERS:"line-markers",AREA:"area",AREA_STACKED:"area-stacked",AREA_STACKED_100:"area-stacked-100",PIE:"pie",DOUGHNUT:"doughnut",XY_SCATTER:"scatter",XY_SCATTER_LINES:"scatter-lines",XY_SCATTER_SMOOTH:"scatter-smooth"}),XL_LEGEND_POSITION=_("XL_LEGEND_POSITION",{BOTTOM:"bottom",TOP:"top",LEFT:"left",RIGHT:"right"}),XL_LABEL_POSITION=_("XL_LABEL_POSITION",{ABOVE:"t",BELOW:"b",BEST_FIT:"bestFit",CENTER:"ctr",INSIDE_BASE:"inBase",INSIDE_END:"inEnd",LEFT:"l",OUTSIDE_END:"outEnd",RIGHT:"r"}),MSO_FILL=_("MSO_FILL",{SOLID:"solid",BACKGROUND:"background",GRADIENT:"gradient",PATTERNED:"patterned",PICTURE:"picture"}),MSO_PATTERN_TYPE=_("MSO_PATTERN_TYPE",{CROSS:"cross",DARK_DOWNWARD_DIAGONAL:"dkDnDiag",DARK_HORIZONTAL:"dkHorz",DARK_UPWARD_DIAGONAL:"dkUpDiag",DARK_VERTICAL:"dkVert",DASHED_DOWNWARD_DIAGONAL:"dashDnDiag",DASHED_HORIZONTAL:"dashHorz",DASHED_UPWARD_DIAGONAL:"dashUpDiag",DASHED_VERTICAL:"dashVert",DIAGONAL_BRICK:"diagBrick",DIAGONAL_CROSS:"diagCross",DIVOT:"divot",DOTTED_DIAMOND:"dotDmnd",DOTTED_GRID:"dotGrid",DOWNWARD_DIAGONAL:"dnDiag",HORIZONTAL:"horz",HORIZONTAL_BRICK:"horzBrick",LARGE_CHECKER_BOARD:"lgCheck",LARGE_CONFETTI:"lgConfetti",LARGE_GRID:"lgGrid",LIGHT_DOWNWARD_DIAGONAL:"ltDnDiag",LIGHT_HORIZONTAL:"ltHorz",LIGHT_UPWARD_DIAGONAL:"ltUpDiag",LIGHT_VERTICAL:"ltVert",NARROW_HORIZONTAL:"narHorz",NARROW_VERTICAL:"narVert",OUTLINED_DIAMOND:"openDmnd",PERCENT_5:"pct5",PERCENT_10:"pct10",PERCENT_20:"pct20",PERCENT_25:"pct25",PERCENT_30:"pct30",PERCENT_40:"pct40",PERCENT_50:"pct50",PERCENT_60:"pct60",PERCENT_70:"pct70",PERCENT_75:"pct75",PERCENT_80:"pct80",PERCENT_90:"pct90",PLAID:"plaid",SHINGLE:"shingle",SMALL_CHECKER_BOARD:"smCheck",SMALL_CONFETTI:"smConfetti",SMALL_GRID:"smGrid",SOLID_DIAMOND:"solidDmnd",SPHERE:"sphere",TRELLIS:"trellis",UPWARD_DIAGONAL:"upDiag",VERTICAL:"vert",WAVE:"wave",WEAVE:"weave",WIDE_DOWNWARD_DIAGONAL:"wdDnDiag",WIDE_UPWARD_DIAGONAL:"wdUpDiag",ZIG_ZAG:"zigZag"}),MSO_PATTERN=MSO_PATTERN_TYPE,TILE_ALIGNMENT=_("TILE_ALIGNMENT",{TOP_LEFT:"tl",TOP:"t",TOP_RIGHT:"tr",LEFT:"l",CENTER:"ctr",RIGHT:"r",BOTTOM_LEFT:"bl",BOTTOM:"b",BOTTOM_RIGHT:"br"}),THEME_FONT=_("THEME_FONT",{MAJOR:"+mj-lt",MINOR:"+mn-lt"});
@@ -109,6 +109,12 @@ export type SlidesEdit =
109
109
  op: "background";
110
110
  slide: string;
111
111
  background?: BackgroundFile;
112
+ }
113
+ /** A section starting here, by its name; none takes it away. */
114
+ | {
115
+ op: "section";
116
+ slide: string;
117
+ section?: string;
112
118
  };
113
119
  /** A slides file's text after an edit. */
114
120
  export declare function editSlidesFile(text: string | undefined, edit: SlidesEdit): string;
@@ -1,4 +1,4 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readDataFile as N}from"@allyhub/formats";import{isCollection as $,isMap as b,isSeq as j,LineCounter as I,parseDocument as x}from"yaml";import{commonPairs as M,sameValue as O}from"./values.js";export function readSlidesFile(t){const e=new I,s=x(t,{lineCounter:e}),o=f=>{const g=f===""?[]:f.split(".");for(let p=g.length;p>=0;p--){const S=s.getIn(g.slice(0,p).map(y=>/^\d+$/u.test(y)?Number(y):y),!0)?.range?.[0];if(S!==void 0)return e.linePos(S).line}};if(s.errors.length>0)return{problems:s.errors.map(f=>({path:"",line:e.linePos(f.pos[0]).line,message:`not YAML: ${f.message.split(`
3
- `)[0]??""}`})),lineOf:o};const l=s.toJS()??{},r=N("slides",l);if(r.ok)return{file:r.value,readable:{file:r.value,lineOf:o},problems:[],lineOf:o};const n=[],h=(f,g)=>{const p=o(f);n.push({path:f,...p===void 0?{}:{line:p},message:g})},a=(f,g)=>{h(f,T(g,P(l,f)))},i=typeof l=="object"&&l!==null&&"slides"in l?l.slides:void 0,d=Array.isArray(i)?i:[],u=N("slides",{...l,...Array.isArray(i)?{slides:[]}:{}});if(!u.ok)for(const f of u.problems)a(f.path,f.message);const c=[],k=[],m=new Set;return d.forEach((f,g)=>{const p=N("slides",{slides:[f]});if(!p.ok)for(const y of p.problems)a(y.path.replace(/^slides\.0(?=\.|$)/u,`slides.${String(g)}`),y.message);const v=typeof f=="object"&&f!==null&&"id"in f?f.id:void 0;if(typeof v=="string"){if(m.has(v)){h(`slides.${String(g)}.id`,`Two slides are "${v}".`);return}m.add(v)}const[S]=p.ok?p.value.slides:[];S&&(c.push(S),k.push(g))}),{readable:{file:{slides:c},lineOf:f=>o(f.replace(/^slides\.(\d+)/u,(g,p)=>`slides.${String(k[Number(p)]??p)}`))},problems:n,lineOf:o}}function P(t,e){let s=t;for(const o of e===""?[]:e.split(".")){if(typeof s!="object"||s===null)return;s=s[o]}return s}const T=(t,e)=>typeof e=="string"||typeof e=="number"||typeof e=="boolean"?`${t.replace(/\.$/u,"")} (it is ${JSON.stringify(e)}).`:t,w=`slides: []
4
- `;function C(t){let e=t.get("slides",!0);if(j(e)||(b(t.contents)?t.set("slides",t.createNode([])):t.contents=t.createNode({slides:[]}),e=t.get("slides",!0)),!j(e))throw new Error("The slides file has no slides list.");return e}const A=(t,e)=>t.findIndex(s=>b(s)&&s.get("id")===e),E=["frame","text","fill","line","z","crop","connect"];export function editSlidesFile(t,e){const s=x(t===void 0||t.trim()===""?w:t);if(s.errors.length>0)throw new Error("The slides file is not YAML: it is mended by hand first.");return editSlidesDocument(s,e)?s.toString():t??w}export function editSlidesDocument(t,e){const s=C(t),o=a=>{if(a===null)return 0;const i=a===void 0?-1:A(s.items,a);return i<0?s.items.length:i+1};if(e.op==="add")return A(s.items,e.slide.id)>=0||(s.items.splice(o(e.after),0,t.createNode(e.slide)),s.flow===!0&&(s.flow=!1)),!0;const l=A(s.items,e.slide),r=s.items[l];if(l<0||!b(r))return!1;const n=a=>{let i=r.get("shapes",!0);return!b(i)&&a&&(r.set("shapes",t.createNode({})),i=r.get("shapes",!0)),b(i)?i:void 0},h=a=>{const i=n(!1);if(i){for(const d of a){const u=i.get(d,!0);b(u)&&u.items.length===0&&i.delete(d)}i.items.length===0&&r.delete("shapes")}};switch(e.op){case"move":{if(e.after===e.slide)break;s.items.splice(l,1),s.items.splice(o(e.after),0,r);break}case"duplicate":{const a=r.clone();a.set("id",e.id),s.items.splice(l+1,0,a);break}case"remove":s.items.splice(l,1);break;case"layout":r.set("layout",e.layout);break;case"hidden":e.hidden===!1||Array.isArray(e.hidden)&&e.hidden.length===0?r.delete("hidden"):r.set("hidden",t.createNode(e.hidden));break;case"shape":{const a=n(!0);if(!a)break;let i=a.get(e.shape,!0);if(b(i)||(a.set(e.shape,t.createNode({})),i=a.get(e.shape,!0)),!b(i))break;for(const[d,u]of Object.entries(e.set)){const c=d.split(".");if(u===void 0){i.deleteIn(c);const k=c.length>1?i.getIn(c.slice(0,-1),!0):void 0;b(k)&&k.items.length===0&&i.deleteIn(c.slice(0,-1))}else{const k=i.getIn(c,!0),m=t.createNode(u);$(k)&&$(m)&&k.flow===!0&&(m.flow=!0),i.setIn(c,m)}}h([e.shape]);break}case"unplace":{n(!1)?.delete(e.shape),h([]);break}case"show":{if(!e.shown){n(!1)?.delete(e.shape),h([]);break}const a=n(!0);a&&!a.has(e.shape)&&a.set(e.shape,t.createNode({}));break}case"background":e.background===void 0?r.delete("background"):r.set("background",t.createNode(e.background));break;case"animations":e.animations.length===0?r.delete("animations"):r.set("animations",t.createNode(e.animations));break;case"transition":e.transition===void 0?r.delete("transition"):r.set("transition",t.createNode(e.transition));break;case"advance":e.after===void 0?r.delete("advance_after"):r.set("advance_after",e.after);break;case"reset":{const a=n(!1);if(!a)break;const i=[];for(const d of a.items){const u=String(b(d.key)?"":d.key.value??d.key);if(e.shape!==void 0&&u!==e.shape)continue;const c=d.value;if(!(!b(c)||["textbox","picture","movie","geometry","component"].some(m=>c.has(m))||!E.some(m=>c.has(m)))){for(const m of E)c.delete(m);i.push(u)}}h(i);break}}return!0}export function freeName(t,e){const s=new Set(t),o=e.replace(/[^A-Za-z0-9_-]+/gu,"-").replace(/^-+|-+$/gu,"")||"slide";if(!s.has(o))return o;for(let l=2;;l++){const r=`${o}-${String(l)}`;if(!s.has(r))return r}}const D=new Set(["text","props","crop"]);function _(t){const e=new Map;for(const[s,o]of Object.entries(t??{}))if(D.has(s)&&typeof o=="object"&&!Array.isArray(o))for(const[l,r]of Object.entries(o))e.set(`${s}.${l}`,r);else e.set(s,o);return e}const F=(t,e)=>new Set(M(t,e).map(([s])=>t[s]??""));function L(t,e){const s=[],o=e.id;e.layout!==void 0&&e.layout!==t.layout&&s.push({op:"layout",slide:o,layout:e.layout}),O(t.hidden,e.hidden)||s.push({op:"hidden",slide:o,hidden:e.hidden??!1}),O(t.animations??[],e.animations??[])||s.push({op:"animations",slide:o,animations:e.animations??[]}),O(t.transition,e.transition)||s.push({op:"transition",slide:o,...e.transition?{transition:e.transition}:{}}),t.advance_after!==e.advance_after&&s.push({op:"advance",slide:o,...e.advance_after===void 0?{}:{after:e.advance_after}}),O(t.background,e.background)||s.push({op:"background",slide:o,...e.background?{background:e.background}:{}});const l=t.shapes??{},r=e.shapes??{};for(const n of Object.keys(l))n in r||s.push({op:"unplace",slide:o,shape:n});for(const[n,h]of Object.entries(r)){const a=_(l[n]),i=_(h),d={};for(const c of new Set([...a.keys(),...i.keys()]))O(a.get(c),i.get(c))||(d[c]=i.get(c));Object.keys(d).length>0&&s.push({op:"shape",slide:o,shape:n,set:d});const u=l[n];Object.keys(h).length===0&&(u===void 0||Object.keys(u).length>0)&&s.push({op:"show",slide:o,shape:n,shown:!0})}return s}export function slidesEdits(t,e){const s=[],o=new Map(t.slides.map(n=>[n.id,n])),l=new Set(e.slides.map(n=>n.id));for(const n of t.slides)l.has(n.id)||s.push({op:"remove",slide:n.id});const r=F(t.slides.map(n=>n.id).filter(n=>l.has(n)),e.slides.map(n=>n.id).filter(n=>o.has(n)));return e.slides.forEach((n,h)=>{const a=h===0?null:e.slides[h-1]?.id??null,i=o.get(n.id);if(!i||i.generate!==n.generate){i&&s.push({op:"remove",slide:n.id}),s.push({op:"add",slide:n,after:a});return}r.has(n.id)||s.push({op:"move",slide:n.id,after:a}),s.push(...L(i,n))}),s}
2
+ import{readDataFile as N}from"@allyhub/formats";import{isCollection as $,isMap as b,isSeq as j,LineCounter as M,parseDocument as x}from"yaml";import{commonPairs as P,sameValue as O}from"./values.js";export function readSlidesFile(t){const e=new M,s=x(t,{lineCounter:e}),o=c=>{const g=c===""?[]:c.split(".");for(let p=g.length;p>=0;p--){const S=s.getIn(g.slice(0,p).map(y=>/^\d+$/u.test(y)?Number(y):y),!0)?.range?.[0];if(S!==void 0)return e.linePos(S).line}};if(s.errors.length>0)return{problems:s.errors.map(c=>({path:"",line:e.linePos(c.pos[0]).line,message:`not YAML: ${c.message.split(`
3
+ `)[0]??""}`})),lineOf:o};const l=s.toJS()??{},r=N("slides",l);if(r.ok)return{file:r.value,readable:{file:r.value,lineOf:o},problems:[],lineOf:o};const n=[],h=(c,g)=>{const p=o(c);n.push({path:c,...p===void 0?{}:{line:p},message:g})},a=(c,g)=>{h(c,w(g,T(l,c)))},i=typeof l=="object"&&l!==null&&"slides"in l?l.slides:void 0,d=Array.isArray(i)?i:[],u=N("slides",{...l,...Array.isArray(i)?{slides:[]}:{}});if(!u.ok)for(const c of u.problems)a(c.path,c.message);const f=[],k=[],m=new Set;return d.forEach((c,g)=>{const p=N("slides",{slides:[c]});if(!p.ok)for(const y of p.problems)a(y.path.replace(/^slides\.0(?=\.|$)/u,`slides.${String(g)}`),y.message);const v=typeof c=="object"&&c!==null&&"id"in c?c.id:void 0;if(typeof v=="string"){if(m.has(v)){h(`slides.${String(g)}.id`,`Two slides are "${v}".`);return}m.add(v)}const[S]=p.ok?p.value.slides:[];S&&(f.push(S),k.push(g))}),{readable:{file:{slides:f},lineOf:c=>o(c.replace(/^slides\.(\d+)/u,(g,p)=>`slides.${String(k[Number(p)]??p)}`))},problems:n,lineOf:o}}function T(t,e){let s=t;for(const o of e===""?[]:e.split(".")){if(typeof s!="object"||s===null)return;s=s[o]}return s}const w=(t,e)=>typeof e=="string"||typeof e=="number"||typeof e=="boolean"?`${t.replace(/\.$/u,"")} (it is ${JSON.stringify(e)}).`:t,E=`slides: []
4
+ `;function C(t){let e=t.get("slides",!0);if(j(e)||(b(t.contents)?t.set("slides",t.createNode([])):t.contents=t.createNode({slides:[]}),e=t.get("slides",!0)),!j(e))throw new Error("The slides file has no slides list.");return e}const A=(t,e)=>t.findIndex(s=>b(s)&&s.get("id")===e),_=["frame","text","fill","line","z","crop","connect"];export function editSlidesFile(t,e){const s=x(t===void 0||t.trim()===""?E:t);if(s.errors.length>0)throw new Error("The slides file is not YAML: it is mended by hand first.");return editSlidesDocument(s,e)?s.toString():t??E}export function editSlidesDocument(t,e){const s=C(t),o=a=>{if(a===null)return 0;const i=a===void 0?-1:A(s.items,a);return i<0?s.items.length:i+1};if(e.op==="add")return A(s.items,e.slide.id)>=0||(s.items.splice(o(e.after),0,t.createNode(e.slide)),s.flow===!0&&(s.flow=!1)),!0;const l=A(s.items,e.slide),r=s.items[l];if(l<0||!b(r))return!1;const n=a=>{let i=r.get("shapes",!0);return!b(i)&&a&&(r.set("shapes",t.createNode({})),i=r.get("shapes",!0)),b(i)?i:void 0},h=a=>{const i=n(!1);if(i){for(const d of a){const u=i.get(d,!0);b(u)&&u.items.length===0&&i.delete(d)}i.items.length===0&&r.delete("shapes")}};switch(e.op){case"move":{if(e.after===e.slide)break;s.items.splice(l,1),s.items.splice(o(e.after),0,r);break}case"duplicate":{const a=r.clone();a.set("id",e.id),a.delete("section"),s.items.splice(l+1,0,a);break}case"remove":s.items.splice(l,1);break;case"layout":r.set("layout",e.layout);break;case"hidden":e.hidden===!1||Array.isArray(e.hidden)&&e.hidden.length===0?r.delete("hidden"):r.set("hidden",t.createNode(e.hidden));break;case"shape":{const a=n(!0);if(!a)break;let i=a.get(e.shape,!0);if(b(i)||(a.set(e.shape,t.createNode({})),i=a.get(e.shape,!0)),!b(i))break;for(const[d,u]of Object.entries(e.set)){const f=d.split(".");if(u===void 0){i.deleteIn(f);const k=f.length>1?i.getIn(f.slice(0,-1),!0):void 0;b(k)&&k.items.length===0&&i.deleteIn(f.slice(0,-1))}else{const k=i.getIn(f,!0),m=t.createNode(u);$(k)&&$(m)&&k.flow===!0&&(m.flow=!0),i.setIn(f,m)}}h([e.shape]);break}case"unplace":{n(!1)?.delete(e.shape),h([]);break}case"show":{if(!e.shown){n(!1)?.delete(e.shape),h([]);break}const a=n(!0);a&&!a.has(e.shape)&&a.set(e.shape,t.createNode({}));break}case"background":e.background===void 0?r.delete("background"):r.set("background",t.createNode(e.background));break;case"animations":e.animations.length===0?r.delete("animations"):r.set("animations",t.createNode(e.animations));break;case"transition":e.transition===void 0?r.delete("transition"):r.set("transition",t.createNode(e.transition));break;case"advance":e.after===void 0?r.delete("advance_after"):r.set("advance_after",e.after);break;case"section":e.section===void 0?r.delete("section"):r.set("section",e.section);break;case"reset":{const a=n(!1);if(!a)break;const i=[];for(const d of a.items){const u=String(b(d.key)?"":d.key.value??d.key);if(e.shape!==void 0&&u!==e.shape)continue;const f=d.value;if(!(!b(f)||["textbox","picture","movie","audio","geometry","component"].some(m=>f.has(m))||!_.some(m=>f.has(m)))){for(const m of _)f.delete(m);i.push(u)}}h(i);break}}return!0}export function freeName(t,e){const s=new Set(t),o=e.replace(/[^A-Za-z0-9_-]+/gu,"-").replace(/^-+|-+$/gu,"")||"slide";if(!s.has(o))return o;for(let l=2;;l++){const r=`${o}-${String(l)}`;if(!s.has(r))return r}}const D=new Set(["text","props","crop"]);function I(t){const e=new Map;for(const[s,o]of Object.entries(t??{}))if(D.has(s)&&typeof o=="object"&&!Array.isArray(o))for(const[l,r]of Object.entries(o))e.set(`${s}.${l}`,r);else e.set(s,o);return e}const F=(t,e)=>new Set(P(t,e).map(([s])=>t[s]??""));function L(t,e){const s=[],o=e.id;e.layout!==void 0&&e.layout!==t.layout&&s.push({op:"layout",slide:o,layout:e.layout}),O(t.hidden,e.hidden)||s.push({op:"hidden",slide:o,hidden:e.hidden??!1}),O(t.animations??[],e.animations??[])||s.push({op:"animations",slide:o,animations:e.animations??[]}),O(t.transition,e.transition)||s.push({op:"transition",slide:o,...e.transition?{transition:e.transition}:{}}),t.advance_after!==e.advance_after&&s.push({op:"advance",slide:o,...e.advance_after===void 0?{}:{after:e.advance_after}}),t.section!==e.section&&s.push({op:"section",slide:o,...e.section===void 0?{}:{section:e.section}}),O(t.background,e.background)||s.push({op:"background",slide:o,...e.background?{background:e.background}:{}});const l=t.shapes??{},r=e.shapes??{};for(const n of Object.keys(l))n in r||s.push({op:"unplace",slide:o,shape:n});for(const[n,h]of Object.entries(r)){const a=I(l[n]),i=I(h),d={};for(const f of new Set([...a.keys(),...i.keys()]))O(a.get(f),i.get(f))||(d[f]=i.get(f));Object.keys(d).length>0&&s.push({op:"shape",slide:o,shape:n,set:d});const u=l[n];Object.keys(h).length===0&&(u===void 0||Object.keys(u).length>0)&&s.push({op:"show",slide:o,shape:n,shown:!0})}return s}export function slidesEdits(t,e){const s=[],o=new Map(t.slides.map(n=>[n.id,n])),l=new Set(e.slides.map(n=>n.id));for(const n of t.slides)l.has(n.id)||s.push({op:"remove",slide:n.id});const r=F(t.slides.map(n=>n.id).filter(n=>l.has(n)),e.slides.map(n=>n.id).filter(n=>o.has(n)));return e.slides.forEach((n,h)=>{const a=h===0?null:e.slides[h-1]?.id??null,i=o.get(n.id);if(!i||i.generate!==n.generate){i&&s.push({op:"remove",slide:n.id}),s.push({op:"add",slide:n,after:a});return}r.has(n.id)||s.push({op:"move",slide:n.id,after:a}),s.push(...L(i,n))}),s}
@@ -0,0 +1,3 @@
1
+ import type { TableStyleDef } from "../table-style.js";
2
+ export declare const TABLE_STYLES: readonly TableStyleDef[];
3
+ //# sourceMappingURL=table-styles.d.ts.map