athena-python-pptx 0.5.0__tar.gz → 0.6.0__tar.gz

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 (86) hide show
  1. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/CLAUDE.md +9 -0
  2. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/PKG-INFO +1 -1
  3. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/docs/API_PARITY_EXCEPTIONS.md +19 -5
  4. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/__init__.py +1 -1
  5. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/commands.py +10 -2
  6. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/__init__.py +1 -1
  7. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pyproject.toml +1 -1
  8. athena_python_pptx-0.6.0/uv.lock +1215 -0
  9. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/.gitignore +0 -0
  10. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/API_PARITY_REPORT.md +0 -0
  11. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/CHANGELOG.md +0 -0
  12. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/DEV-GUIDE.md +0 -0
  13. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/PARITY_QUESTIONS.md +0 -0
  14. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/PUBLISHING.md +0 -0
  15. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/README.md +0 -0
  16. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/docs/athena-api.json +0 -0
  17. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/docs/athena-api.md +0 -0
  18. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/_athena_extension.py +0 -0
  19. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/_ptc.py +0 -0
  20. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/_references.py +0 -0
  21. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/action.py +0 -0
  22. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/batching.py +0 -0
  23. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/__init__.py +0 -0
  24. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/axis.py +0 -0
  25. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/category.py +0 -0
  26. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/chart.py +0 -0
  27. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/data.py +0 -0
  28. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/datalabel.py +0 -0
  29. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/legend.py +0 -0
  30. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/marker.py +0 -0
  31. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/plot.py +0 -0
  32. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/point.py +0 -0
  33. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/series.py +0 -0
  34. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/chart/xlsx.py +0 -0
  35. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/client.py +0 -0
  36. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/decorators.py +0 -0
  37. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/dml/__init__.py +0 -0
  38. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/dml/chtfmt.py +0 -0
  39. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/dml/color.py +0 -0
  40. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/dml/effect.py +0 -0
  41. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/dml/fill.py +0 -0
  42. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/dml/line.py +0 -0
  43. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/docgen.py +0 -0
  44. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/enum/__init__.py +0 -0
  45. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/enum/action.py +0 -0
  46. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/enum/chart.py +0 -0
  47. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/enum/dml.py +0 -0
  48. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/enum/lang.py +0 -0
  49. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/enum/shapes.py +0 -0
  50. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/enum/text.py +0 -0
  51. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/errors.py +0 -0
  52. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/exc.py +0 -0
  53. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/media.py +0 -0
  54. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/package.py +0 -0
  55. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/__init__.py +0 -0
  56. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/_base.py +0 -0
  57. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/chart.py +0 -0
  58. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/coreprops.py +0 -0
  59. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/embeddedpackage.py +0 -0
  60. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/image.py +0 -0
  61. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/media.py +0 -0
  62. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/presentation.py +0 -0
  63. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/parts/slide.py +0 -0
  64. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/presentation.py +0 -0
  65. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/autoshape.py +0 -0
  66. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/base.py +0 -0
  67. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/connector.py +0 -0
  68. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/freeform.py +0 -0
  69. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/graphfrm.py +0 -0
  70. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/group.py +0 -0
  71. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/picture.py +0 -0
  72. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/placeholder.py +0 -0
  73. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shapes/shapetree.py +0 -0
  74. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/shared.py +0 -0
  75. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/slide.py +0 -0
  76. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/slides.py +0 -0
  77. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/spec.py +0 -0
  78. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/table.py +0 -0
  79. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/text/__init__.py +0 -0
  80. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/text/fonts.py +0 -0
  81. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/text/layout.py +0 -0
  82. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/text/text.py +0 -0
  83. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/types.py +0 -0
  84. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/typing.py +0 -0
  85. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/units.py +0 -0
  86. {athena_python_pptx-0.5.0 → athena_python_pptx-0.6.0}/pptx/util.py +0 -0
@@ -69,6 +69,15 @@ local XML / OPC parts:
69
69
 
70
70
  `Font.language_id` IS now implemented (returns `MSO_LANGUAGE_ID` enum, accepts enum or int LCID) — added in v0.1.68.
71
71
 
72
+ ### Slide-index conventions
73
+
74
+ Slide indexing has TWO bases — never conflate them:
75
+
76
+ - **0-based** — this SDK (python-pptx parity): `prs.slides[0]`, `slide.slide_index`, and every `slide_index=` parameter are 0-based.
77
+ - **1-based** — the Athena citation/anchor system: `SlideAnchor.slideIndex` / `ShapeAnchor.slideIndex` (in `pptx/_references.py`), the citation methods, and anything displayed as "Slide N" are the 1-based display position.
78
+
79
+ The PPTX Studio server applier converts at the SDK→anchor boundary (`+1`). `slideId` (== the SDK's `slide.slide_id`) is the stable, base-agnostic identity — prefer it when available.
80
+
72
81
  ### If you need a deviation
73
82
 
74
83
  If there is a genuine technical reason why a deviation from python-pptx is necessary (e.g., the SDK is a REST client and cannot replicate XML-level behavior):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: athena-python-pptx
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Summary: Drop-in replacement for python-pptx that connects to PPTX Studio for real-time collaboration
5
5
  Project-URL: Homepage, https://github.com/pptx-studio/python-sdk
6
6
  Project-URL: Documentation, https://docs.pptx-studio.com/sdk/python
@@ -1368,8 +1368,8 @@ A citation record is:
1368
1368
  ```jsonc
1369
1369
  {
1370
1370
  "id": "citation_<uuid12>",
1371
- "destinationAnchor": { "type": "slide", "slideId": "...", "slideIndex": 0 },
1372
- // or { "type": "shape", "slideId": "...", "slideIndex": 0, "shapeIds": ["..."] }
1371
+ "destinationAnchor": { "type": "slide", "slideId": "...", "slideIndex": 1 },
1372
+ // or { "type": "shape", "slideId": "...", "slideIndex": 1, "shapeIds": ["..."] }
1373
1373
  "citation_string": "<source Spaces URL>",
1374
1374
  "displayValue": "Q4 Sales", // optional
1375
1375
  "active": true,
@@ -1399,17 +1399,31 @@ cid = slide.add_citation(
1399
1399
  )
1400
1400
  ```
1401
1401
 
1402
- ### `Shape.cite(source, *, anchor=None, display_value=None) -> str`
1402
+ ### `Shape.add_citation(source, *, anchor=None, display_value=None) -> str`
1403
1403
 
1404
1404
  Shape-scoped citation — emits `AddShapeCitation` carrying this shape's id, so
1405
1405
  the server writes a `shape` destination anchor with `shapeIds`. Returns the
1406
- created citation id.
1406
+ created citation id. (Mirrors `Slide.add_citation` / `Cell.add_citation` — the
1407
+ citation verb is `add_citation` on every citable object.)
1407
1408
 
1408
1409
  ```python
1409
1410
  shape = slide.shapes.add_textbox(Inches(1), Inches(1), Inches(4), Inches(1))
1410
- cid = shape.cite(AssetReference(id="asset_doc_xyz"))
1411
+ cid = shape.add_citation(AssetReference(id="asset_doc_xyz"))
1411
1412
  ```
1412
1413
 
1414
+ **Slide-index base shift (citations).** The SDK/command wire `slide_index`
1415
+ (`prs.slides[i]`, `slide.slide_index`) is **0-based** — python-pptx array
1416
+ parity. But the `destinationAnchor.slideIndex` the server writes into the
1417
+ citation record is **1-based** — the "Slide N" display position per the
1418
+ athena-references contract. The server applies the `+1` at the SDK→anchor
1419
+ boundary, so the stored anchor's `slideIndex` is always one greater than the
1420
+ SDK index of the cited slide.
1421
+
1422
+ > ⚠️ If the **cited source** is itself a slide/shape (you pass a
1423
+ > `SlideAnchor` / `ShapeAnchor` as `anchor=`), that anchor's `slide_index` is
1424
+ > the **1-based** display position per the athena-references contract — do
1425
+ > **not** pass the SDK's 0-based `slide.slide_index` into it (add 1).
1426
+
1413
1427
  ### `Slide.remove_citation(citation_id, *, soft=True)` / `Presentation.remove_citation(citation_id, *, soft=True)`
1414
1428
 
1415
1429
  Remove a citation from the deck by id. Citations are deck-scoped, so both
@@ -133,7 +133,7 @@ def flush_all() -> None:
133
133
  _active_buffers[:] = alive
134
134
 
135
135
 
136
- __version__ = "0.5.0"
136
+ __version__ = "0.6.0"
137
137
 
138
138
  __all__ = [
139
139
  # Main entry point
@@ -788,7 +788,11 @@ class AddSlideCitation(Command):
788
788
  ``docs/API_PARITY_EXCEPTIONS.md`` for the deviation rationale.
789
789
 
790
790
  Args:
791
- slide_index: Zero-based index of the cited slide.
791
+ slide_index: Zero-based index of the cited slide. This stays 0-based on
792
+ the wire (python-pptx array parity); the studio server applier
793
+ resolves the stable ``slideId`` from it and stores the resulting
794
+ ``destinationAnchor.slideIndex`` as 1-based (display "Slide N") — do
795
+ not read this wire value as a 1-based position.
792
796
  source_ref: Source ``AssetReference`` JSON (``referenced='asset'`` +
793
797
  ``id``); the asset the slide is sourced from.
794
798
  source_anchor: Optional ``Anchor`` JSON within the source (e.g. a
@@ -834,7 +838,11 @@ class AddShapeCitation(Command):
834
838
  ``docs/API_PARITY_EXCEPTIONS.md`` for the deviation rationale.
835
839
 
836
840
  Args:
837
- slide_index: Zero-based index of the slide the shapes live on.
841
+ slide_index: Zero-based index of the slide the shapes live on. This
842
+ stays 0-based on the wire (python-pptx array parity); the studio
843
+ server applier resolves the stable ``slideId`` from it and stores
844
+ the resulting ``destinationAnchor.slideIndex`` as 1-based (display
845
+ "Slide N") — do not read this wire value as a 1-based position.
838
846
  shape_ids: Non-empty list of shape ids on that slide to cite.
839
847
  source_ref: Source ``AssetReference`` JSON.
840
848
  source_anchor: Optional ``Anchor`` JSON within the source.
@@ -5954,7 +5954,7 @@ class Shape:
5954
5954
  if isinstance(by_id, dict):
5955
5955
  by_id.pop(self._shape_id, None)
5956
5956
 
5957
- def cite(
5957
+ def add_citation(
5958
5958
  self,
5959
5959
  source: "AssetReference",
5960
5960
  *,
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "athena-python-pptx"
7
- version = "0.5.0"
7
+ version = "0.6.0"
8
8
  description = "Drop-in replacement for python-pptx that connects to PPTX Studio for real-time collaboration"
9
9
  readme = "README.md"
10
10
  license = "MIT"