rocx 0.3.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.
- rocx-0.3.0/.github/workflows/ci.yml +75 -0
- rocx-0.3.0/.github/workflows/docs.yml +50 -0
- rocx-0.3.0/.github/workflows/publish.yml +178 -0
- rocx-0.3.0/.gitignore +12 -0
- rocx-0.3.0/.pre-commit-config.yaml +10 -0
- rocx-0.3.0/.python-version +1 -0
- rocx-0.3.0/AGENTS.md +21 -0
- rocx-0.3.0/CHANGELOG.md +36 -0
- rocx-0.3.0/COMPATIBILITY.md +128 -0
- rocx-0.3.0/Cargo.lock +498 -0
- rocx-0.3.0/Cargo.toml +31 -0
- rocx-0.3.0/LICENSE +504 -0
- rocx-0.3.0/PKG-INFO +87 -0
- rocx-0.3.0/PYTHON_BINDINGS.md +84 -0
- rocx-0.3.0/README.md +71 -0
- rocx-0.3.0/assets/PYTHON-DOCX-LICENSE +20 -0
- rocx-0.3.0/assets/README.md +12 -0
- rocx-0.3.0/assets/default.docx +0 -0
- rocx-0.3.0/docs/ALTERNATE-CONTENT-DESIGN.md +149 -0
- rocx-0.3.0/docs/ARCHITECTURE.md +412 -0
- rocx-0.3.0/docs/CONTENT_CONTROLS.md +77 -0
- rocx-0.3.0/docs/DEFERRED-FIELDS.md +203 -0
- rocx-0.3.0/docs/DEPENDENCY-AUDIT.md +42 -0
- rocx-0.3.0/docs/DOCUMENTATION-AUDIT.md +51 -0
- rocx-0.3.0/docs/DOCUMENTATION.md +84 -0
- rocx-0.3.0/docs/EDITOR-PARITY.md +49 -0
- rocx-0.3.0/docs/ENGINE-AUDIT.md +68 -0
- rocx-0.3.0/docs/FIELDS.md +94 -0
- rocx-0.3.0/docs/FORMATTING.md +594 -0
- rocx-0.3.0/docs/MIGRATION.md +59 -0
- rocx-0.3.0/docs/MODULES.md +99 -0
- rocx-0.3.0/docs/NOTES.md +137 -0
- rocx-0.3.0/docs/NUMBERING.md +303 -0
- rocx-0.3.0/docs/OOXML.md +317 -0
- rocx-0.3.0/docs/PYTHON-SYNC-EVALUATION.md +74 -0
- rocx-0.3.0/docs/RANGES.md +99 -0
- rocx-0.3.0/docs/RELEASING.md +107 -0
- rocx-0.3.0/docs/REORGANIZATION.md +317 -0
- rocx-0.3.0/docs/REVISIONS.md +57 -0
- rocx-0.3.0/docs/STYLES.md +224 -0
- rocx-0.3.0/docs/TABLES.md +202 -0
- rocx-0.3.0/docs/VIEWER-COMPATIBILITY-CHECKLIST.md +132 -0
- rocx-0.3.0/docs/website/api/python.md +9 -0
- rocx-0.3.0/docs/website/branded-report.md +34 -0
- rocx-0.3.0/docs/website/branded_report_output.docx +0 -0
- rocx-0.3.0/docs/website/branded_report_template.docx +0 -0
- rocx-0.3.0/docs/website/catalog.md +10 -0
- rocx-0.3.0/docs/website/getting-started.md +93 -0
- rocx-0.3.0/docs/website/index.md +18 -0
- rocx-0.3.0/docs/website/recipes.md +82 -0
- rocx-0.3.0/examples/ALL_FEATURES.md +130 -0
- rocx-0.3.0/examples/all_features.py +490 -0
- rocx-0.3.0/examples/all_features.rs +31 -0
- rocx-0.3.0/examples/async_text.rs +19 -0
- rocx-0.3.0/examples/branded_report.py +38 -0
- rocx-0.3.0/examples/branded_report.rs +71 -0
- rocx-0.3.0/examples/branded_report_data.tsv +4 -0
- rocx-0.3.0/examples/branded_report_template.py +14 -0
- rocx-0.3.0/examples/conditional.rs +24 -0
- rocx-0.3.0/examples/feature_parity.rs +7 -0
- rocx-0.3.0/examples/fields.py +28 -0
- rocx-0.3.0/examples/fields.rs +63 -0
- rocx-0.3.0/examples/hyperlinks.py +19 -0
- rocx-0.3.0/examples/hyperlinks.rs +42 -0
- rocx-0.3.0/examples/image_dependencies.py +25 -0
- rocx-0.3.0/examples/image_dependencies.rs +36 -0
- rocx-0.3.0/examples/notes.py +22 -0
- rocx-0.3.0/examples/notes.rs +64 -0
- rocx-0.3.0/examples/plain.py +20 -0
- rocx-0.3.0/examples/plain.rs +22 -0
- rocx-0.3.0/examples/property_dependencies.py +20 -0
- rocx-0.3.0/examples/property_dependencies.rs +22 -0
- rocx-0.3.0/examples/ranges.py +20 -0
- rocx-0.3.0/examples/ranges.rs +36 -0
- rocx-0.3.0/examples/resolution_options.py +20 -0
- rocx-0.3.0/examples/resolution_options.rs +69 -0
- rocx-0.3.0/examples/showcase/coverage.json +63 -0
- rocx-0.3.0/examples/showcase/formatting.rs +414 -0
- rocx-0.3.0/examples/showcase/mod.rs +632 -0
- rocx-0.3.0/examples/showcase/stories.rs +821 -0
- rocx-0.3.0/examples/showcase/tables.rs +305 -0
- rocx-0.3.0/examples/support/mod.rs +232 -0
- rocx-0.3.0/examples/test_branded_report.py +56 -0
- rocx-0.3.0/examples/text_runs.rs +26 -0
- rocx-0.3.0/mkdocs.yml +57 -0
- rocx-0.3.0/pyproject.toml +53 -0
- rocx-0.3.0/python/rocx/__init__.py +7 -0
- rocx-0.3.0/python/rocx/declarative/__init__.py +120 -0
- rocx-0.3.0/python/rocx/declarative/base.py +21 -0
- rocx-0.3.0/python/rocx/declarative/chart.py +21 -0
- rocx-0.3.0/python/rocx/declarative/content_control.py +57 -0
- rocx-0.3.0/python/rocx/declarative/defaults.py +127 -0
- rocx-0.3.0/python/rocx/declarative/document.py +63 -0
- rocx-0.3.0/python/rocx/declarative/equation.py +15 -0
- rocx-0.3.0/python/rocx/declarative/field.py +66 -0
- rocx-0.3.0/python/rocx/declarative/formatting.py +66 -0
- rocx-0.3.0/python/rocx/declarative/hyperlink.py +37 -0
- rocx-0.3.0/python/rocx/declarative/image.py +59 -0
- rocx-0.3.0/python/rocx/declarative/notes.py +66 -0
- rocx-0.3.0/python/rocx/declarative/numbering.py +90 -0
- rocx-0.3.0/python/rocx/declarative/paragraph.py +194 -0
- rocx-0.3.0/python/rocx/declarative/range.py +67 -0
- rocx-0.3.0/python/rocx/declarative/section.py +141 -0
- rocx-0.3.0/python/rocx/declarative/shape.py +62 -0
- rocx-0.3.0/python/rocx/declarative/styles.py +260 -0
- rocx-0.3.0/python/rocx/declarative/table.py +223 -0
- rocx-0.3.0/python/rocx/diagnostics.py +10 -0
- rocx-0.3.0/python/rocx/editor.py +51 -0
- rocx-0.3.0/python/rocx/interop.py +10 -0
- rocx-0.3.0/python/rocx/io.py +47 -0
- rocx-0.3.0/python/rocx/options.py +24 -0
- rocx-0.3.0/python/rocx/resolution/__init__.py +275 -0
- rocx-0.3.0/python/rocx/resolution/snapshot.py +35 -0
- rocx-0.3.0/src/adapters/image.rs +240 -0
- rocx-0.3.0/src/adapters/io.rs +71 -0
- rocx-0.3.0/src/adapters/mod.rs +7 -0
- rocx-0.3.0/src/adapters/python/content.rs +431 -0
- rocx-0.3.0/src/adapters/python/document.rs +62 -0
- rocx-0.3.0/src/adapters/python/editor.rs +631 -0
- rocx-0.3.0/src/adapters/python/errors.rs +61 -0
- rocx-0.3.0/src/adapters/python/mod.rs +143 -0
- rocx-0.3.0/src/adapters/python/notes.rs +45 -0
- rocx-0.3.0/src/adapters/python/stories.rs +30 -0
- rocx-0.3.0/src/adapters/python/tables.rs +117 -0
- rocx-0.3.0/src/adapters/python/template.rs +40 -0
- rocx-0.3.0/src/adapters/python/values.rs +714 -0
- rocx-0.3.0/src/application.rs +113 -0
- rocx-0.3.0/src/authoring/chart.rs +35 -0
- rocx-0.3.0/src/authoring/components.rs +153 -0
- rocx-0.3.0/src/authoring/content_control.rs +75 -0
- rocx-0.3.0/src/authoring/field.rs +46 -0
- rocx-0.3.0/src/authoring/fraction.rs +42 -0
- rocx-0.3.0/src/authoring/hyperlink.rs +46 -0
- rocx-0.3.0/src/authoring/mod.rs +285 -0
- rocx-0.3.0/src/authoring/notes.rs +114 -0
- rocx-0.3.0/src/authoring/range.rs +74 -0
- rocx-0.3.0/src/authoring/shape.rs +30 -0
- rocx-0.3.0/src/authoring/table.rs +89 -0
- rocx-0.3.0/src/document/chart.rs +77 -0
- rocx-0.3.0/src/document/color.rs +50 -0
- rocx-0.3.0/src/document/content.rs +315 -0
- rocx-0.3.0/src/document/content_control.rs +266 -0
- rocx-0.3.0/src/document/diagnostic.rs +87 -0
- rocx-0.3.0/src/document/field.rs +156 -0
- rocx-0.3.0/src/document/hyperlink.rs +150 -0
- rocx-0.3.0/src/document/identity.rs +48 -0
- rocx-0.3.0/src/document/measure.rs +89 -0
- rocx-0.3.0/src/document/mod.rs +114 -0
- rocx-0.3.0/src/document/notes.rs +196 -0
- rocx-0.3.0/src/document/range.rs +240 -0
- rocx-0.3.0/src/document/resources.rs +48 -0
- rocx-0.3.0/src/document/revision.rs +114 -0
- rocx-0.3.0/src/document/shape.rs +185 -0
- rocx-0.3.0/src/document/table.rs +276 -0
- rocx-0.3.0/src/document/validation.rs +725 -0
- rocx-0.3.0/src/document/values.rs +1086 -0
- rocx-0.3.0/src/editor/header.rs +484 -0
- rocx-0.3.0/src/editor/insertion.rs +189 -0
- rocx-0.3.0/src/editor.rs +509 -0
- rocx-0.3.0/src/error.rs +139 -0
- rocx-0.3.0/src/lib.rs +147 -0
- rocx-0.3.0/src/ooxml/compatibility.rs +60 -0
- rocx-0.3.0/src/ooxml/defaults.rs +171 -0
- rocx-0.3.0/src/ooxml/drawing/charts.rs +92 -0
- rocx-0.3.0/src/ooxml/drawing/mod.rs +5 -0
- rocx-0.3.0/src/ooxml/drawing/pictures.rs +97 -0
- rocx-0.3.0/src/ooxml/drawing/placement.rs +82 -0
- rocx-0.3.0/src/ooxml/drawing/shapes.rs +165 -0
- rocx-0.3.0/src/ooxml/editor.rs +198 -0
- rocx-0.3.0/src/ooxml/mod.rs +296 -0
- rocx-0.3.0/src/ooxml/notes.rs +367 -0
- rocx-0.3.0/src/ooxml/profile.rs +8 -0
- rocx-0.3.0/src/ooxml/properties/custom.rs +146 -0
- rocx-0.3.0/src/ooxml/properties/extended.rs +88 -0
- rocx-0.3.0/src/ooxml/properties.rs +74 -0
- rocx-0.3.0/src/ooxml/ranges.rs +209 -0
- rocx-0.3.0/src/ooxml/resources.rs +60 -0
- rocx-0.3.0/src/ooxml/revisions.rs +100 -0
- rocx-0.3.0/src/ooxml/schema.rs +43 -0
- rocx-0.3.0/src/ooxml/story.rs +49 -0
- rocx-0.3.0/src/ooxml/style_catalog.rs +55 -0
- rocx-0.3.0/src/ooxml/values.rs +215 -0
- rocx-0.3.0/src/ooxml/wordprocessing/comments.rs +161 -0
- rocx-0.3.0/src/ooxml/wordprocessing/content_control.rs +117 -0
- rocx-0.3.0/src/ooxml/wordprocessing/fields.rs +53 -0
- rocx-0.3.0/src/ooxml/wordprocessing/format.rs +208 -0
- rocx-0.3.0/src/ooxml/wordprocessing/mod.rs +32 -0
- rocx-0.3.0/src/ooxml/wordprocessing/paragraph.rs +162 -0
- rocx-0.3.0/src/ooxml/wordprocessing/sections.rs +184 -0
- rocx-0.3.0/src/ooxml/wordprocessing/stories.rs +63 -0
- rocx-0.3.0/src/ooxml/wordprocessing/styles.rs +542 -0
- rocx-0.3.0/src/ooxml/wordprocessing/table.rs +235 -0
- rocx-0.3.0/src/ooxml/wordprocessing/text.rs +32 -0
- rocx-0.3.0/src/opc/mod.rs +698 -0
- rocx-0.3.0/src/opc/names.rs +342 -0
- rocx-0.3.0/src/resolution/components.rs +73 -0
- rocx-0.3.0/src/resolution/interpreter.rs +761 -0
- rocx-0.3.0/src/resolution/mod.rs +235 -0
- rocx-0.3.0/src/resolution/property.rs +240 -0
- rocx-0.3.0/src/template/content_control.rs +183 -0
- rocx-0.3.0/src/template/mod.rs +260 -0
- rocx-0.3.0/src/template/revisions.rs +261 -0
- rocx-0.3.0/src/xml/mod.rs +590 -0
- rocx-0.3.0/src/xml/name.rs +157 -0
- rocx-0.3.0/tests/README.md +113 -0
- rocx-0.3.0/tests/async_fields.rs +261 -0
- rocx-0.3.0/tests/authoring_builders.rs +628 -0
- rocx-0.3.0/tests/cell_layout.rs +66 -0
- rocx-0.3.0/tests/character_styles.rs +47 -0
- rocx-0.3.0/tests/column_charts.rs +45 -0
- rocx-0.3.0/tests/compilation.rs +90 -0
- rocx-0.3.0/tests/conditional_paragraph_formatting.rs +48 -0
- rocx-0.3.0/tests/conditional_script_formatting.rs +73 -0
- rocx-0.3.0/tests/deferred.rs +257 -0
- rocx-0.3.0/tests/document_defaults.rs +124 -0
- rocx-0.3.0/tests/docx.rs +208 -0
- rocx-0.3.0/tests/domain.rs +35 -0
- rocx-0.3.0/tests/features.rs +541 -0
- rocx-0.3.0/tests/fields.rs +112 -0
- rocx-0.3.0/tests/fixtures/README.md +17 -0
- rocx-0.3.0/tests/fixtures/generate_imported_editor.py +42 -0
- rocx-0.3.0/tests/fixtures/images/sample.bmp +0 -0
- rocx-0.3.0/tests/fixtures/images/sample.gif +0 -0
- rocx-0.3.0/tests/fixtures/images/sample.jpg +0 -0
- rocx-0.3.0/tests/fixtures/images/sample.png +0 -0
- rocx-0.3.0/tests/fixtures/images/sample.tiff +0 -0
- rocx-0.3.0/tests/fixtures/images/sample_zero_dpi.png +0 -0
- rocx-0.3.0/tests/fixtures/imported-editor.docx +0 -0
- rocx-0.3.0/tests/hyperlinks.rs +278 -0
- rocx-0.3.0/tests/imported_editor.rs +1013 -0
- rocx-0.3.0/tests/indexed_template_sections.rs +106 -0
- rocx-0.3.0/tests/inline_fractions.rs +60 -0
- rocx-0.3.0/tests/legal_numbering.rs +80 -0
- rocx-0.3.0/tests/line_height.rs +147 -0
- rocx-0.3.0/tests/linked_styles.rs +106 -0
- rocx-0.3.0/tests/notes.rs +163 -0
- rocx-0.3.0/tests/numbering_alignment.rs +87 -0
- rocx-0.3.0/tests/numbering_overrides.rs +77 -0
- rocx-0.3.0/tests/numbering_replacements.rs +152 -0
- rocx-0.3.0/tests/numbering_restart.rs +68 -0
- rocx-0.3.0/tests/numbering_suffix.rs +59 -0
- rocx-0.3.0/tests/preservation.rs +293 -0
- rocx-0.3.0/tests/python_bindings/api_contracts/NOTICE.md +8 -0
- rocx-0.3.0/tests/python_bindings/api_contracts/test_async.py +61 -0
- rocx-0.3.0/tests/python_bindings/api_contracts/test_condition.py +294 -0
- rocx-0.3.0/tests/python_bindings/api_contracts/test_declarative_basic.py +92 -0
- rocx-0.3.0/tests/python_bindings/api_contracts/test_declarative_styles.py +202 -0
- rocx-0.3.0/tests/python_bindings/api_contracts/test_declarative_table.py +690 -0
- rocx-0.3.0/tests/python_bindings/api_contracts/test_section_margins.py +120 -0
- rocx-0.3.0/tests/python_bindings/api_contracts/test_section_properties.py +148 -0
- rocx-0.3.0/tests/python_bindings/api_contracts/test_template_replacement.py +429 -0
- rocx-0.3.0/tests/python_bindings/test_all_features.py +299 -0
- rocx-0.3.0/tests/python_bindings/test_api.py +20 -0
- rocx-0.3.0/tests/python_bindings/test_block_content_control.py +79 -0
- rocx-0.3.0/tests/python_bindings/test_cell_layout.py +79 -0
- rocx-0.3.0/tests/python_bindings/test_character_styles.py +74 -0
- rocx-0.3.0/tests/python_bindings/test_column_charts.py +110 -0
- rocx-0.3.0/tests/python_bindings/test_conditional_paragraph_formatting.py +67 -0
- rocx-0.3.0/tests/python_bindings/test_conditional_script_formatting.py +62 -0
- rocx-0.3.0/tests/python_bindings/test_content_control_edits.py +75 -0
- rocx-0.3.0/tests/python_bindings/test_custom_properties.py +186 -0
- rocx-0.3.0/tests/python_bindings/test_deferred.py +232 -0
- rocx-0.3.0/tests/python_bindings/test_docs.py +84 -0
- rocx-0.3.0/tests/python_bindings/test_document_defaults.py +127 -0
- rocx-0.3.0/tests/python_bindings/test_document_grid.py +60 -0
- rocx-0.3.0/tests/python_bindings/test_drawing_shapes.py +130 -0
- rocx-0.3.0/tests/python_bindings/test_editor_xml_envelope.py +50 -0
- rocx-0.3.0/tests/python_bindings/test_extended_properties.py +75 -0
- rocx-0.3.0/tests/python_bindings/test_fields.py +194 -0
- rocx-0.3.0/tests/python_bindings/test_header_footer_distances.py +26 -0
- rocx-0.3.0/tests/python_bindings/test_hyperlinks.py +126 -0
- rocx-0.3.0/tests/python_bindings/test_image_transform_geometry.py +194 -0
- rocx-0.3.0/tests/python_bindings/test_imported_editor.py +316 -0
- rocx-0.3.0/tests/python_bindings/test_indexed_template_sections.py +36 -0
- rocx-0.3.0/tests/python_bindings/test_inline_content_control.py +105 -0
- rocx-0.3.0/tests/python_bindings/test_inline_fraction.py +88 -0
- rocx-0.3.0/tests/python_bindings/test_legal_numbering.py +35 -0
- rocx-0.3.0/tests/python_bindings/test_line_height.py +118 -0
- rocx-0.3.0/tests/python_bindings/test_line_numbering.py +103 -0
- rocx-0.3.0/tests/python_bindings/test_linked_styles.py +99 -0
- rocx-0.3.0/tests/python_bindings/test_mandatory_namespaces.py +82 -0
- rocx-0.3.0/tests/python_bindings/test_note_numbering.py +84 -0
- rocx-0.3.0/tests/python_bindings/test_notes.py +207 -0
- rocx-0.3.0/tests/python_bindings/test_numbering_alignment.py +74 -0
- rocx-0.3.0/tests/python_bindings/test_numbering_label_format.py +74 -0
- rocx-0.3.0/tests/python_bindings/test_numbering_level_style.py +35 -0
- rocx-0.3.0/tests/python_bindings/test_numbering_overrides.py +53 -0
- rocx-0.3.0/tests/python_bindings/test_numbering_replacements.py +77 -0
- rocx-0.3.0/tests/python_bindings/test_numbering_restart.py +51 -0
- rocx-0.3.0/tests/python_bindings/test_numbering_style_definition.py +70 -0
- rocx-0.3.0/tests/python_bindings/test_numbering_suffix.py +49 -0
- rocx-0.3.0/tests/python_bindings/test_page_borders.py +64 -0
- rocx-0.3.0/tests/python_bindings/test_page_layout_defaults.py +38 -0
- rocx-0.3.0/tests/python_bindings/test_paragraph_layout_flags.py +32 -0
- rocx-0.3.0/tests/python_bindings/test_r1.py +156 -0
- rocx-0.3.0/tests/python_bindings/test_ranges.py +136 -0
- rocx-0.3.0/tests/python_bindings/test_release.py +76 -0
- rocx-0.3.0/tests/python_bindings/test_relocated_drawing_ids.py +44 -0
- rocx-0.3.0/tests/python_bindings/test_resolution.py +222 -0
- rocx-0.3.0/tests/python_bindings/test_resolution_contract.py +196 -0
- rocx-0.3.0/tests/python_bindings/test_row_properties.py +80 -0
- rocx-0.3.0/tests/python_bindings/test_script_formatting.py +144 -0
- rocx-0.3.0/tests/python_bindings/test_section_direction.py +56 -0
- rocx-0.3.0/tests/python_bindings/test_section_gutter.py +74 -0
- rocx-0.3.0/tests/python_bindings/test_shape_text_format.py +105 -0
- rocx-0.3.0/tests/python_bindings/test_shared_numbering.py +87 -0
- rocx-0.3.0/tests/python_bindings/test_signed_templates.py +64 -0
- rocx-0.3.0/tests/python_bindings/test_standards.py +827 -0
- rocx-0.3.0/tests/python_bindings/test_style_references.py +95 -0
- rocx-0.3.0/tests/python_bindings/test_tab_stops.py +99 -0
- rocx-0.3.0/tests/python_bindings/test_table_alignment.py +65 -0
- rocx-0.3.0/tests/python_bindings/test_table_content_controls.py +40 -0
- rocx-0.3.0/tests/python_bindings/test_table_look.py +77 -0
- rocx-0.3.0/tests/python_bindings/test_template_unmatched_stories.py +23 -0
- rocx-0.3.0/tests/python_bindings/test_text_boxes.py +58 -0
- rocx-0.3.0/tests/python_bindings/test_text_revisions.py +176 -0
- rocx-0.3.0/tests/python_bindings/test_verification.py +32 -0
- rocx-0.3.0/tests/python_docx/verify.py +643 -0
- rocx-0.3.0/tests/python_docx.rs +1508 -0
- rocx-0.3.0/tests/r1.rs +280 -0
- rocx-0.3.0/tests/ranges.rs +368 -0
- rocx-0.3.0/tests/resolution.rs +305 -0
- rocx-0.3.0/tests/resolution_contract.rs +376 -0
- rocx-0.3.0/tests/row_properties.rs +75 -0
- rocx-0.3.0/tests/run_format_builders.rs +117 -0
- rocx-0.3.0/tests/script_formatting.rs +75 -0
- rocx-0.3.0/tests/section_direction.rs +51 -0
- rocx-0.3.0/tests/section_gutter.rs +61 -0
- rocx-0.3.0/tests/shape_text_format.rs +238 -0
- rocx-0.3.0/tests/showcase.rs +71 -0
- rocx-0.3.0/tests/style_references.rs +90 -0
- rocx-0.3.0/tests/support/cell_layout.rs +24 -0
- rocx-0.3.0/tests/support/character_styles.rs +44 -0
- rocx-0.3.0/tests/support/conditional_paragraph_formatting.rs +25 -0
- rocx-0.3.0/tests/support/conditional_script_formatting.rs +30 -0
- rocx-0.3.0/tests/support/document_defaults.rs +47 -0
- rocx-0.3.0/tests/support/features.rs +232 -0
- rocx-0.3.0/tests/support/fields.rs +56 -0
- rocx-0.3.0/tests/support/linked_styles.rs +45 -0
- rocx-0.3.0/tests/support/mod.rs +64 -0
- rocx-0.3.0/tests/support/notes.rs +97 -0
- rocx-0.3.0/tests/support/numbering_alignment.rs +45 -0
- rocx-0.3.0/tests/support/numbering_overrides.rs +29 -0
- rocx-0.3.0/tests/support/numbering_replacements.rs +62 -0
- rocx-0.3.0/tests/support/numbering_restart.rs +35 -0
- rocx-0.3.0/tests/support/numbering_suffix.rs +38 -0
- rocx-0.3.0/tests/support/ranges.rs +39 -0
- rocx-0.3.0/tests/support/row_properties.rs +29 -0
- rocx-0.3.0/tests/support/script_formatting.rs +54 -0
- rocx-0.3.0/tests/support/section_direction.rs +40 -0
- rocx-0.3.0/tests/support/section_gutter.rs +23 -0
- rocx-0.3.0/tests/support/tab_stops.rs +77 -0
- rocx-0.3.0/tests/support/table_alignment.rs +33 -0
- rocx-0.3.0/tests/support/table_look.rs +27 -0
- rocx-0.3.0/tests/tab_stops.rs +85 -0
- rocx-0.3.0/tests/table_alignment.rs +69 -0
- rocx-0.3.0/tests/table_look.rs +63 -0
- rocx-0.3.0/tests/template_unmatched_stories.rs +91 -0
- rocx-0.3.0/tests/templates.rs +538 -0
- rocx-0.3.0/tests/test_smoke_release_artifacts.py +48 -0
- rocx-0.3.0/tests/text_contracts.rs +108 -0
- rocx-0.3.0/tests/text_revisions.rs +57 -0
- rocx-0.3.0/tests/text_runs.rs +238 -0
- rocx-0.3.0/tools/build_docs.py +200 -0
- rocx-0.3.0/tools/check_examples.py +660 -0
- rocx-0.3.0/tools/check_release.py +89 -0
- rocx-0.3.0/tools/check_wheel.py +278 -0
- rocx-0.3.0/tools/generate_viewer_compatibility_fixture.py +34 -0
- rocx-0.3.0/tools/python_sync_evaluation.py +54 -0
- rocx-0.3.0/tools/smoke_release_artifacts.py +115 -0
- rocx-0.3.0/tools/validate_ooxml.py +448 -0
- rocx-0.3.0/uv.lock +915 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: Verification
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
rust:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
rust: ["1.88.0", stable]
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v7.0.1
|
|
19
|
+
- uses: dtolnay/rust-toolchain@master
|
|
20
|
+
with:
|
|
21
|
+
toolchain: ${{ matrix.rust }}
|
|
22
|
+
components: rustfmt, clippy
|
|
23
|
+
- uses: actions/setup-python@v7.1.0
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.12"
|
|
26
|
+
- uses: astral-sh/setup-uv@v10.4.0
|
|
27
|
+
- run: uv sync --locked --group test
|
|
28
|
+
- run: cargo fmt --check
|
|
29
|
+
- run: cargo test --locked --all-targets
|
|
30
|
+
- run: cargo test --locked --all-features --all-targets
|
|
31
|
+
- run: cargo test --locked --all-features --doc
|
|
32
|
+
- run: cargo clippy --locked --all-features --all-targets -- -D warnings
|
|
33
|
+
- run: cargo doc --locked --all-features --no-deps --document-private-items
|
|
34
|
+
env:
|
|
35
|
+
RUSTDOCFLAGS: -D warnings
|
|
36
|
+
|
|
37
|
+
python:
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
strategy:
|
|
40
|
+
matrix:
|
|
41
|
+
python: ["3.12", "3.13", "3.14"]
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v7.0.1
|
|
44
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
45
|
+
- uses: actions/setup-python@v7.1.0
|
|
46
|
+
with:
|
|
47
|
+
python-version: ${{ matrix.python }}
|
|
48
|
+
- uses: astral-sh/setup-uv@v10.4.0
|
|
49
|
+
- run: uv sync --locked --group test
|
|
50
|
+
- run: uv run --no-sync pytest
|
|
51
|
+
- run: uv run --no-sync python tools/check_wheel.py
|
|
52
|
+
|
|
53
|
+
standards:
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
env:
|
|
56
|
+
ROCX_SCHEMA_DIR: ${{ github.workspace }}/.validation-schemas
|
|
57
|
+
ROCX_REQUIRE_SCHEMAS: "1"
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@v7.0.1
|
|
60
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
61
|
+
- uses: actions/setup-python@v7.1.0
|
|
62
|
+
with:
|
|
63
|
+
python-version: "3.12"
|
|
64
|
+
- uses: astral-sh/setup-uv@v10.4.0
|
|
65
|
+
- run: uv sync --locked --group test
|
|
66
|
+
- uses: actions/cache@v6.1.0
|
|
67
|
+
id: schemas
|
|
68
|
+
with:
|
|
69
|
+
path: ${{ env.ROCX_SCHEMA_DIR }}
|
|
70
|
+
key: official-schemas-${{ hashFiles('tools/validate_ooxml.py') }}
|
|
71
|
+
- if: steps.schemas.outputs.cache-hit != 'true'
|
|
72
|
+
run: uv run --no-sync python tools/validate_ooxml.py --download-schemas
|
|
73
|
+
- run: uv run --no-sync pytest tests/python_bindings/test_standards.py
|
|
74
|
+
- run: cargo run --locked --example feature_parity -- "${{ runner.temp }}/features.docx"
|
|
75
|
+
- run: uv run --no-sync python tools/validate_ooxml.py "${{ runner.temp }}/features.docx"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: docs-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v7.0.1
|
|
21
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
22
|
+
- uses: actions/setup-python@v7.1.0
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.12"
|
|
25
|
+
- uses: astral-sh/setup-uv@v10.4.0
|
|
26
|
+
- run: uv sync --locked --group test --group docs
|
|
27
|
+
- run: uv run --no-sync pytest -q tests/python_bindings/test_docs.py
|
|
28
|
+
- run: uv run --no-sync python tools/build_docs.py
|
|
29
|
+
- uses: actions/upload-artifact@v7.0.2
|
|
30
|
+
with:
|
|
31
|
+
name: documentation-preview
|
|
32
|
+
path: target/docs-website
|
|
33
|
+
- uses: actions/upload-pages-artifact@v5.0.0
|
|
34
|
+
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
|
|
35
|
+
with:
|
|
36
|
+
path: target/docs-website
|
|
37
|
+
deploy:
|
|
38
|
+
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
|
|
39
|
+
needs: build
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
permissions:
|
|
42
|
+
pages: write
|
|
43
|
+
id-token: write
|
|
44
|
+
environment:
|
|
45
|
+
name: github-pages
|
|
46
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
47
|
+
steps:
|
|
48
|
+
- name: Deploy documentation
|
|
49
|
+
id: deployment
|
|
50
|
+
uses: actions/deploy-pages@v5.0.1
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: publish-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: false
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
validate:
|
|
17
|
+
name: Validate release
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
timeout-minutes: 45
|
|
20
|
+
env:
|
|
21
|
+
ROCX_SCHEMA_DIR: ${{ github.workspace }}/.validation-schemas
|
|
22
|
+
ROCX_REQUIRE_SCHEMAS: "1"
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v7.0.1
|
|
25
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
26
|
+
with:
|
|
27
|
+
components: rustfmt, clippy
|
|
28
|
+
- uses: actions/setup-python@v7.1.0
|
|
29
|
+
with:
|
|
30
|
+
python-version: "3.12"
|
|
31
|
+
- uses: astral-sh/setup-uv@v10.4.0
|
|
32
|
+
- name: Check tag and package versions
|
|
33
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
34
|
+
run: python tools/check_release.py
|
|
35
|
+
- run: uv sync --locked --group test
|
|
36
|
+
- run: cargo fmt --check
|
|
37
|
+
- run: cargo test --locked --all-features --all-targets
|
|
38
|
+
- run: cargo test --locked --all-features --doc
|
|
39
|
+
- run: cargo clippy --locked --all-features --all-targets -- -D warnings
|
|
40
|
+
- name: Verify the crate package
|
|
41
|
+
run: cargo publish --dry-run --locked
|
|
42
|
+
- name: Smoke-test packaged crate quickstart
|
|
43
|
+
run: |
|
|
44
|
+
cargo package --locked
|
|
45
|
+
python tools/smoke_release_artifacts.py --crate "target/package/rocx-$(python -c "import tomllib; print(tomllib.load(open('Cargo.toml', 'rb'))['package']['version'])").crate"
|
|
46
|
+
- uses: actions/cache@v6.1.0
|
|
47
|
+
id: schemas
|
|
48
|
+
with:
|
|
49
|
+
path: ${{ env.ROCX_SCHEMA_DIR }}
|
|
50
|
+
key: official-schemas-${{ hashFiles('tools/validate_ooxml.py') }}
|
|
51
|
+
- if: steps.schemas.outputs.cache-hit != 'true'
|
|
52
|
+
run: uv run --no-sync python tools/validate_ooxml.py --download-schemas
|
|
53
|
+
- run: uv run --no-sync pytest
|
|
54
|
+
- run: cargo run --locked --example feature_parity -- "${{ runner.temp }}/features.docx"
|
|
55
|
+
- run: uv run --no-sync python tools/validate_ooxml.py "${{ runner.temp }}/features.docx"
|
|
56
|
+
- run: uv run --no-sync python tools/check_wheel.py
|
|
57
|
+
- name: Check for unintended changes
|
|
58
|
+
run: git diff --exit-code
|
|
59
|
+
wheels:
|
|
60
|
+
name: Wheels (${{ matrix.label }})
|
|
61
|
+
needs: validate
|
|
62
|
+
runs-on: ${{ matrix.runner }}
|
|
63
|
+
timeout-minutes: 45
|
|
64
|
+
strategy:
|
|
65
|
+
fail-fast: false
|
|
66
|
+
matrix:
|
|
67
|
+
include:
|
|
68
|
+
- label: linux-x86_64
|
|
69
|
+
runner: ubuntu-latest
|
|
70
|
+
manylinux: "2_17"
|
|
71
|
+
args: --release --locked --out dist --compatibility pypi -i python3.12
|
|
72
|
+
- label: windows-x86_64
|
|
73
|
+
runner: windows-latest
|
|
74
|
+
args: --release --locked --out dist --compatibility pypi
|
|
75
|
+
- label: macos-universal2
|
|
76
|
+
runner: macos-latest
|
|
77
|
+
args: --release --locked --out dist --target universal2-apple-darwin --compatibility pypi
|
|
78
|
+
steps:
|
|
79
|
+
- uses: actions/checkout@v7.0.1
|
|
80
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
81
|
+
- uses: actions/setup-python@v7.1.0
|
|
82
|
+
with:
|
|
83
|
+
python-version: "3.12"
|
|
84
|
+
- name: Add macOS universal2 targets
|
|
85
|
+
if: runner.os == 'macOS'
|
|
86
|
+
run: rustup target add x86_64-apple-darwin aarch64-apple-darwin
|
|
87
|
+
- name: Build wheel
|
|
88
|
+
uses: PyO3/maturin-action@v1.51.0
|
|
89
|
+
with:
|
|
90
|
+
maturin-version: v1.16.0
|
|
91
|
+
manylinux: ${{ matrix.manylinux }}
|
|
92
|
+
args: ${{ matrix.args }}
|
|
93
|
+
- uses: astral-sh/setup-uv@v10.4.0
|
|
94
|
+
- name: Smoke-test the wheel
|
|
95
|
+
shell: bash
|
|
96
|
+
run: python tools/smoke_release_artifacts.py --wheel dist/*.whl
|
|
97
|
+
- uses: actions/upload-artifact@v7.0.2
|
|
98
|
+
with:
|
|
99
|
+
name: wheel-${{ matrix.label }}
|
|
100
|
+
path: dist/*.whl
|
|
101
|
+
if-no-files-found: error
|
|
102
|
+
|
|
103
|
+
sdist:
|
|
104
|
+
name: Source distribution
|
|
105
|
+
needs: validate
|
|
106
|
+
runs-on: ubuntu-latest
|
|
107
|
+
timeout-minutes: 15
|
|
108
|
+
steps:
|
|
109
|
+
- uses: actions/checkout@v7.0.1
|
|
110
|
+
- uses: actions/setup-python@v7.1.0
|
|
111
|
+
with:
|
|
112
|
+
python-version: "3.12"
|
|
113
|
+
- name: Build sdist
|
|
114
|
+
uses: PyO3/maturin-action@v1.51.0
|
|
115
|
+
with:
|
|
116
|
+
command: sdist
|
|
117
|
+
maturin-version: v1.16.0
|
|
118
|
+
args: --out dist
|
|
119
|
+
- uses: actions/upload-artifact@v7.0.2
|
|
120
|
+
with:
|
|
121
|
+
name: sdist
|
|
122
|
+
path: dist/*.tar.gz
|
|
123
|
+
if-no-files-found: error
|
|
124
|
+
|
|
125
|
+
publish-pypi:
|
|
126
|
+
name: Publish Python package
|
|
127
|
+
needs: [validate, wheels, sdist]
|
|
128
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
129
|
+
runs-on: ubuntu-latest
|
|
130
|
+
timeout-minutes: 15
|
|
131
|
+
environment:
|
|
132
|
+
name: pypi
|
|
133
|
+
url: https://pypi.org/project/rocx/
|
|
134
|
+
permissions:
|
|
135
|
+
contents: read
|
|
136
|
+
id-token: write
|
|
137
|
+
steps:
|
|
138
|
+
- uses: actions/download-artifact@v8.0.2
|
|
139
|
+
with:
|
|
140
|
+
pattern: wheel-*
|
|
141
|
+
path: dist
|
|
142
|
+
merge-multiple: true
|
|
143
|
+
- uses: actions/download-artifact@v8.0.2
|
|
144
|
+
with:
|
|
145
|
+
name: sdist
|
|
146
|
+
path: dist
|
|
147
|
+
- name: List distributions
|
|
148
|
+
run: ls -lh dist
|
|
149
|
+
- uses: pypa/gh-action-pypi-publish@v1.14.3
|
|
150
|
+
with:
|
|
151
|
+
packages-dir: dist
|
|
152
|
+
skip-existing: true
|
|
153
|
+
|
|
154
|
+
publish-crate:
|
|
155
|
+
name: Publish Rust crate
|
|
156
|
+
needs: [validate, wheels, sdist]
|
|
157
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
158
|
+
runs-on: ubuntu-latest
|
|
159
|
+
timeout-minutes: 15
|
|
160
|
+
environment:
|
|
161
|
+
name: crates-io
|
|
162
|
+
url: https://crates.io/crates/rocx
|
|
163
|
+
permissions:
|
|
164
|
+
contents: read
|
|
165
|
+
id-token: write
|
|
166
|
+
env:
|
|
167
|
+
CARGO_TOKEN_MISSING: ${{ secrets.CARGO_REGISTRY_TOKEN == '' }}
|
|
168
|
+
steps:
|
|
169
|
+
- uses: actions/checkout@v7.0.1
|
|
170
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
171
|
+
- name: Authenticate with crates.io
|
|
172
|
+
id: auth
|
|
173
|
+
if: env.CARGO_TOKEN_MISSING == 'true'
|
|
174
|
+
uses: rust-lang/crates-io-auth-action@v1.0.6
|
|
175
|
+
- name: Publish crate
|
|
176
|
+
run: cargo publish --locked
|
|
177
|
+
env:
|
|
178
|
+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN || steps.auth.outputs.token }}
|
rocx-0.3.0/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
rocx-0.3.0/AGENTS.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Before doing anything consult docs/PLAN.md . When anything you do or the engineer says changes the plan, change this file.
|
|
2
|
+
|
|
3
|
+
When you push a change that resolves a GitHub issue, close the issue after
|
|
4
|
+
the fix reaches the default branch. Link the fixing commit in the closure
|
|
5
|
+
comment if GitHub does not close the issue automatically.
|
|
6
|
+
|
|
7
|
+
Act as the repository maintainer. You may commit and push repository changes
|
|
8
|
+
and create and push release tags without asking for separate approval. Follow
|
|
9
|
+
the active release plan and runbook before pushing a release tag: the tag can
|
|
10
|
+
trigger automated publication. Keep unrelated work intact. This does not
|
|
11
|
+
authorize separate manual deployments or package publication.
|
|
12
|
+
|
|
13
|
+
Use `python-docx` to generate independent DOCX fixtures and to open and inspect
|
|
14
|
+
basic features of existing Word files and edited outputs. Use package-level
|
|
15
|
+
checks for relationships, opaque markup, and exact byte preservation;
|
|
16
|
+
python-docx inspection does not replace those checks or the rocx editor.
|
|
17
|
+
|
|
18
|
+
When adding functionality, update both `examples/all_features.rs` (and its support
|
|
19
|
+
modules) and `examples/all_features.py`, plus `examples/ALL_FEATURES.md` and the
|
|
20
|
+
parity/coverage checks. Keep visible examples clearly labeled. Run exact DOCX
|
|
21
|
+
byte-parity verification; normalized XML equality is not a substitute.
|
rocx-0.3.0/CHANGELOG.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Authoring
|
|
6
|
+
|
|
7
|
+
- Add workbook-free inline column charts with one literal data series and
|
|
8
|
+
stacked inline fractions with two literal text operands. Both are available
|
|
9
|
+
in Rust and Python body paragraphs, including body table cells.
|
|
10
|
+
- Set document company and manager, and string and boolean custom properties.
|
|
11
|
+
Template updates preserve unrelated properties and reject attempts to change
|
|
12
|
+
the type of an existing custom property.
|
|
13
|
+
|
|
14
|
+
### Existing documents
|
|
15
|
+
|
|
16
|
+
- Open Transitional DOCX files from Rust or Python. Inspect body paragraphs,
|
|
17
|
+
sections, direct tables, and default headers; preview supported paragraph
|
|
18
|
+
alignment patches, table insertions, and header image edits. Inline
|
|
19
|
+
inspection does not yet expose editable run or hyperlink boundaries.
|
|
20
|
+
- Add a runnable branded-report example in Rust and Python, with a downloadable
|
|
21
|
+
template and output.
|
|
22
|
+
|
|
23
|
+
### Template safety
|
|
24
|
+
|
|
25
|
+
- Reject templates declaring an OPC digital-signature origin. The writer does
|
|
26
|
+
not verify, remove, or recreate signatures.
|
|
27
|
+
- Reject unsupported mandatory namespaces during supported WordprocessingML
|
|
28
|
+
edits. `AlternateContent` is preserved without choosing a branch.
|
|
29
|
+
- Update ZIP and PyO3 to versions that address the advisories listed in the
|
|
30
|
+
[dependency audit](docs/DEPENDENCY-AUDIT.md). Rust 1.88 remains supported.
|
|
31
|
+
|
|
32
|
+
### Compatibility
|
|
33
|
+
|
|
34
|
+
The writer emits Transitional DOCX. It does not paginate, render pages, or
|
|
35
|
+
evaluate fields. See [the supported feature profile](COMPATIBILITY.md) and
|
|
36
|
+
[migration guidance](docs/MIGRATION.md) for the current boundaries.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Current support and conventions
|
|
2
|
+
|
|
3
|
+
Version 0.3 follows its own declarative domain model and documented behavior.
|
|
4
|
+
Constructor signatures and consumer-specific quirks are not compatibility
|
|
5
|
+
requirements.
|
|
6
|
+
See [migration](docs/MIGRATION.md), [module boundaries](docs/MODULES.md), and the
|
|
7
|
+
[OOXML specification/coverage map](docs/OOXML.md).
|
|
8
|
+
|
|
9
|
+
## Implemented surface
|
|
10
|
+
|
|
11
|
+
| Area | Current support |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| Declarations | Documents, sections, paragraphs, runs, tables, headers/footers; ready/lazy/async fields and synchronous conditions; deferred Rust metadata/format/property aggregates and immutable resolved-child reuse |
|
|
14
|
+
| Dependencies | Rust typed named properties and shared computations; Python per-field references and shared computations; typed graph cycles and cancellation handling |
|
|
15
|
+
| Text | Unicode, whitespace, explicit empty runs, tabs, line/page/column breaks |
|
|
16
|
+
| Hyperlinks | Rich external absolute URI/IRI links in body/table/header/footer paragraphs, with deferred targets/children/tooltip/history; text/image/tab/break children; owner-local external relationships, never fetched |
|
|
17
|
+
| Bookmarks/ranges | Typed paired bookmark/body-comment markers, overlap and cross-paragraph ranges in one story, internal bookmark links, imported name/ID reservation; see [range contract](docs/RANGES.md) |
|
|
18
|
+
| Notes | Footnote/endnote definitions and body references, rich block stories, type-distinguished special entries, imported ID/owner checks; no layout/number calculation; see [notes](docs/NOTES.md) |
|
|
19
|
+
| Formatting | Selected paragraph/run properties, RGB/theme/automatic run colors, underline styles, explicit false overrides; typed line heights and signed custom tab stops/leaders/clears on paragraphs/styles ([coverage](docs/FORMATTING.md)) |
|
|
20
|
+
| Styles | Document run/paragraph defaults, paragraph/character/table definitions and selected conditional table regions (including line heights/tabs/bidi and run script controls), direct character run references, forward base/next/opposite-kind linked references, reachable inheritance-cycle/kind checks and per-compilation catalog ([contract](docs/STYLES.md)) |
|
|
21
|
+
| Tables | Nested tables, fixed/autofit widths, spans/vertical merges, borders, shading and vertical alignment; exact/minimum row heights, repeated-header/cannot-split, inline alignment and explicit conditional table-look activation requests ([contract](docs/TABLES.md)) |
|
|
22
|
+
| Sections | Geometry, margins, page borders, header and footer distances, columns, page and line numbering, document grids, break type, title-page, vertical alignment, optional section page direction and right-side gutter request ([contract](docs/FORMATTING.md)) |
|
|
23
|
+
| Stories | Main body, default/first/even headers and footers; comment generation currently restricted to body context |
|
|
24
|
+
| Comments | Text conveniences or structured paragraph/table/image/link content on paired body ranges; author/date/initials metadata; no threaded comments |
|
|
25
|
+
| Images | PNG/JPEG/GIF/BMP/TIFF metadata and inline or anchored pictures, density-aware dimensions and accessibility fields; deferred data/transformation/alt text in both APIs; header inspection without pixel decoding |
|
|
26
|
+
| Shapes | Inline or floating DrawingML rectangles, ellipses and plain text boxes in body paragraphs, with checked dimensions and optional text styling; geometric shapes also support RGB fill and outline ([contract](docs/FORMATTING.md#floating-shapes-and-text-boxes)) |
|
|
27
|
+
| Charts | One workbook-free inline column series in body paragraphs, including body table cells ([contract](docs/FORMATTING.md#inline-column-charts)) |
|
|
28
|
+
| Equations | One stacked inline fraction with literal text operands in body paragraphs, including body table cells ([contract](docs/FORMATTING.md#inline-fractions)) |
|
|
29
|
+
| Numbering | Native definitions/levels/references, shared authored abstract IDs and authored numbering styles, concrete per-level start overrides and level replacements, optional legal-numbering, suffix, level-restart, label-alignment, label-formatting and level paragraph formatting and style links in Rust and Python; checked level references, no counter evaluation ([coverage](docs/NUMBERING.md)) |
|
|
30
|
+
| Fields | Simple/balanced complex paragraph-local fields, nested cached results, typed PAGE/NUMPAGES/REF/TOC and raw instructions; no evaluation or multi-paragraph TOC generation; see [fields](docs/FIELDS.md) |
|
|
31
|
+
| Revisions | Authored text-run insertions, deletions and paired moves with metadata; optional future-edit tracking; scoped accept/reject for selected imported text changes ([contract](docs/REVISIONS.md)) |
|
|
32
|
+
| Content controls | Inline, block, row and cell text controls with alias, tag, lock, optional ID and rich-text, plain-text and drop-down modes. Selected imported plain-text controls can be edited by tag ([contract](docs/CONTENT_CONTROLS.md)) |
|
|
33
|
+
| Metadata | Core properties, snapshot timestamp, company and manager, and named string and boolean custom properties ([contract](docs/OOXML.md#document-properties)) |
|
|
34
|
+
| Templates | Relationship-driven part discovery, namespace-safe rewriting, opaque payload retention, structural text replacement and insertion |
|
|
35
|
+
| Packaging | Typed names/targets/IDs, defaults/overrides, read budgets, internal relationship/reference graph checks and inspectable package plan |
|
|
36
|
+
|
|
37
|
+
Other revision contexts and content control types, additional drawing and chart
|
|
38
|
+
features, diagrams, broader equation support, and Word extensions are outside
|
|
39
|
+
the current support profile. Retaining imported data is not a claim of
|
|
40
|
+
typed support. Strict output is explicitly unsupported; the writer uses the
|
|
41
|
+
Transitional vocabulary. No Word layout or field-calculation engine is included.
|
|
42
|
+
|
|
43
|
+
Hyperlinks do not imply blue/underlined styling; format their display runs
|
|
44
|
+
explicitly. Nested hyperlinks are a deliberate authoring limitation, although
|
|
45
|
+
the Transitional `CT_Hyperlink` schema permits them. Targets retain percent
|
|
46
|
+
escapes, Unicode, queries and fragments verbatim. They must have an absolute
|
|
47
|
+
scheme, no whitespace/control/forbidden URI characters, and valid percent escapes;
|
|
48
|
+
this lexical check is not a full URL parser, scheme allowlist or safety check for
|
|
49
|
+
opening links. Callers must apply their own policy to untrusted targets. Relative
|
|
50
|
+
URI targets are unsupported; internal links require an explicit typed bookmark
|
|
51
|
+
target and do not create external relationships.
|
|
52
|
+
|
|
53
|
+
## Units and defaults
|
|
54
|
+
|
|
55
|
+
| Current authoring convenience | Unit |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| Run size, paragraph spacing/indents, image transformations | Points |
|
|
58
|
+
| Paragraph style left/right/first-line indent | Inches |
|
|
59
|
+
| Section page sizes/margins | EMU: 914400 per inch |
|
|
60
|
+
| Table widths and column spacing | Twips: 1440 per inch |
|
|
61
|
+
| Border size | Eighths of a point |
|
|
62
|
+
| Line spacing | Multiplier |
|
|
63
|
+
|
|
64
|
+
Checked `Points`, `Twips`, `Emu` and `HalfPoints` values provide physical
|
|
65
|
+
conversions; codecs validate numeric convenience values before encoding. Domain
|
|
66
|
+
units and application read limits are distinct from each element's schema bounds.
|
|
67
|
+
The blank template supplies default styles/themes/page settings, including an
|
|
68
|
+
8.5 × 11 inch page with 1.25 inch left/right margins. Its provenance and one
|
|
69
|
+
schema-required zoom correction are recorded in [assets](assets/README.md).
|
|
70
|
+
|
|
71
|
+
## Resolution, editing and output
|
|
72
|
+
|
|
73
|
+
Rust consumes declaration programs. Python leaves declarations unchanged and
|
|
74
|
+
returns immutable snapshots. Factories support fresh passes; bare futures/
|
|
75
|
+
coroutines are single-use. Rendering snapshots never re-executes producers.
|
|
76
|
+
Conditions are synchronous and guard field execution. Property references and
|
|
77
|
+
explicitly memoized computation handles have documented, distinct ownership and
|
|
78
|
+
cache semantics; see [bindings](PYTHON_BINDINGS.md) and migration examples.
|
|
79
|
+
|
|
80
|
+
Source part identity comes from OPC relationships rather than fixed filenames.
|
|
81
|
+
Output targets are relative to actual owners. Internal graph inconsistencies are
|
|
82
|
+
rejected; external targets are not fetched. DOCX/DOTX main-part inputs are accepted
|
|
83
|
+
for DOCX output; unsupported main-part profiles/types fail explicitly. Untouched
|
|
84
|
+
part payloads retain bytes, but edited XML and the ZIP container are reserialized.
|
|
85
|
+
Valid namespace identities and opaque prefix bindings are preserved.
|
|
86
|
+
|
|
87
|
+
Templates with a package-level OPC digital-signature origin relationship are
|
|
88
|
+
rejected before output, even with no explicit edits. rocx does not check
|
|
89
|
+
signature validity, strip signatures, or re-sign edited documents. Use an
|
|
90
|
+
unsigned copy when you need to edit a signed document.
|
|
91
|
+
|
|
92
|
+
When reading a part for WordprocessingML editing, rocx rejects unsupported or
|
|
93
|
+
unbound namespaces declared mandatory by `mc:MustUnderstand` on its root or
|
|
94
|
+
on ordinary WordprocessingML descendants.
|
|
95
|
+
Only the baseline Transitional WordprocessingML, Office relationships and XML
|
|
96
|
+
namespaces are recognized by this guard. It does not select `mc:AlternateContent`
|
|
97
|
+
branches, descend into foreign subtrees, or scan untouched opaque parts.
|
|
98
|
+
|
|
99
|
+
Text replacement can span runs and operate inside hyperlinks, but does not cross
|
|
100
|
+
structured inline boundaries or alter field/revision/control contents. Untouched
|
|
101
|
+
break attributes stay intact. Comment/bookmark markers remain at their original
|
|
102
|
+
positions; inserted text belongs to the first matched run. This does not promise
|
|
103
|
+
universal editing of every Word range structure. Known generated properties are
|
|
104
|
+
schema-ordered; unrelated imported children are not blanket-sorted.
|
|
105
|
+
|
|
106
|
+
See the [template-editing recipe](https://reindervosdewael.github.io/rocx/recipes/#edit-an-existing-document)
|
|
107
|
+
for a paired example that saves to a new file.
|
|
108
|
+
|
|
109
|
+
Compilation completes before path output is replaced using a sibling temporary
|
|
110
|
+
file. File reads/writes, clocks and language interoperability live outside the
|
|
111
|
+
pure domain/codecs. Python `to_docx()` is an optional python-docx convenience.
|
|
112
|
+
|
|
113
|
+
## Evidence and limits
|
|
114
|
+
|
|
115
|
+
For repeatable interactive reader checks, fixture provenance and the current
|
|
116
|
+
observation gaps, see the [viewer compatibility checklist](docs/VIEWER-COMPATIBILITY-CHECKLIST.md).
|
|
117
|
+
No desktop Word or LibreOffice layout compatibility is established by the
|
|
118
|
+
automated checks below.
|
|
119
|
+
|
|
120
|
+
Rust/Python expected-content readback checks are complemented by deliberate
|
|
121
|
+
mutations, namespace/relocation fixtures, domain-boundary compilation, structured
|
|
122
|
+
edit tests, and independent official Transitional XSD checks. The schema validator
|
|
123
|
+
also tests invalid order and missing relationships. These checks do not prove
|
|
124
|
+
visual equivalence across readers. [Testing instructions](tests/README.md) describe
|
|
125
|
+
the exact checks, optional schema cache setup, and wheel verification.
|
|
126
|
+
|
|
127
|
+
These establish the documented implemented surface and selected conformance
|
|
128
|
+
properties, not full OOXML, extension, or visual-layout equivalence across readers.
|