open-agreements 0.7.7 → 0.8.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.
- package/LICENSE +201 -21
- package/README.de.md +16 -29
- package/README.es.md +16 -29
- package/README.md +45 -54
- package/README.pt-br.md +16 -29
- package/README.template.md +19 -25
- package/README.zh.md +16 -29
- package/content/recipes/nvca-certificate-of-incorporation/fields/acquisition_exception_shares.json +36 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/adjustment_notice_days.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/common_shares_authorized.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/company_name.json +29 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/conversion_notice_days.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/dividend_formula_alt.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/dividend_rate_per_share.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/dividend_rate_percent.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/effective_date.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/number_of_classes.json +29 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/original_issue_price.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/par_value.json +36 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/preferred_director_seats.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/preferred_shares_authorized.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/preferred_shares_designated_portion.json +29 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/preferred_shares_outstanding_threshold.json +29 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/qualified_financing_notice_days.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/redemption_interest_rate.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/redemption_start_date.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/registered_agent_address.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/registered_agent_name.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/series_designation.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/signature_page_marker.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/specify_percentage.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/strategic_partnership_exception_shares.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/time_zone.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/fields/total_authorized_shares.json +22 -0
- package/content/recipes/nvca-certificate-of-incorporation/template-manifest.json +77 -0
- package/content/recipes/nvca-stock-purchase-agreement/fields/agreement_date_month_day.json +27 -0
- package/content/recipes/nvca-stock-purchase-agreement/fields/agreement_year_two_digits.json +27 -0
- package/content/recipes/nvca-stock-purchase-agreement/fields/company_name.json +25 -0
- package/content/recipes/nvca-stock-purchase-agreement/fields/investor_counsel.json +27 -0
- package/content/recipes/nvca-stock-purchase-agreement/fields/minimum_shares_initial_closing.json +39 -0
- package/content/recipes/nvca-stock-purchase-agreement/fields/optional_plural_suffix.json +27 -0
- package/content/recipes/nvca-stock-purchase-agreement/fields/par_value_per_share.json +28 -0
- package/content/recipes/nvca-stock-purchase-agreement/fields/purchase_price_per_share.json +28 -0
- package/content/recipes/nvca-stock-purchase-agreement/fields/series_designation.json +159 -0
- package/content/recipes/nvca-stock-purchase-agreement/metadata.yaml +1 -1
- package/content/recipes/nvca-stock-purchase-agreement/template-manifest.json +24 -0
- package/content/templates/bonterms-mutual-nda/template.docx +0 -0
- package/content/templates/openagreements-board-consent-safe/.template.generated.json +0 -1
- package/content/templates/openagreements-employee-ip-inventions-assignment/.template.generated.json +9 -5
- package/content/templates/openagreements-employee-ip-inventions-assignment/README.md +2 -0
- package/content/templates/openagreements-employee-ip-inventions-assignment/metadata.yaml +8 -9
- package/content/templates/openagreements-employee-ip-inventions-assignment/template.docx +0 -0
- package/content/templates/openagreements-employee-ip-inventions-assignment/template.md +3 -4
- package/content/templates/openagreements-employment-confidentiality-acknowledgement/metadata.yaml +0 -9
- package/content/templates/openagreements-employment-confidentiality-acknowledgement/template.docx +0 -0
- package/content/templates/openagreements-employment-confidentiality-acknowledgement/template.json +0 -1
- package/content/templates/openagreements-employment-offer-letter/.template.generated.json +9 -5
- package/content/templates/openagreements-employment-offer-letter/README.md +17 -5
- package/content/templates/openagreements-employment-offer-letter/metadata.yaml +8 -9
- package/content/templates/openagreements-employment-offer-letter/template.docx +0 -0
- package/content/templates/openagreements-employment-offer-letter/template.md +3 -4
- package/content/templates/openagreements-restrictive-covenant-florida/.template.generated.json +9 -5
- package/content/templates/openagreements-restrictive-covenant-florida/README.md +2 -2
- package/content/templates/openagreements-restrictive-covenant-florida/metadata.yaml +10 -12
- package/content/templates/openagreements-restrictive-covenant-florida/template.docx +0 -0
- package/content/templates/openagreements-restrictive-covenant-florida/template.md +3 -4
- package/content/templates/openagreements-restrictive-covenant-wyoming/.template.generated.json +9 -5
- package/content/templates/openagreements-restrictive-covenant-wyoming/metadata.yaml +10 -12
- package/content/templates/openagreements-restrictive-covenant-wyoming/template.docx +0 -0
- package/content/templates/openagreements-restrictive-covenant-wyoming/template.md +3 -4
- package/content/templates/openagreements-stockholder-consent-safe/.template.generated.json +0 -1
- package/dist/core/checklist/format-checklist-docx.d.ts.map +1 -1
- package/dist/core/checklist/format-checklist-docx.js +4 -1
- package/dist/core/checklist/format-checklist-docx.js.map +1 -1
- package/dist/core/engine.d.ts.map +1 -1
- package/dist/core/engine.js +2 -40
- package/dist/core/engine.js.map +1 -1
- package/dist/core/fill-pipeline.d.ts +0 -8
- package/dist/core/fill-pipeline.d.ts.map +1 -1
- package/dist/core/fill-pipeline.js +54 -30
- package/dist/core/fill-pipeline.js.map +1 -1
- package/dist/core/humanize-docx.d.ts.map +1 -1
- package/dist/core/humanize-docx.js +16 -6
- package/dist/core/humanize-docx.js.map +1 -1
- package/dist/core/recipe/bracket-normalizer.d.ts.map +1 -1
- package/dist/core/recipe/bracket-normalizer.js +3 -7
- package/dist/core/recipe/bracket-normalizer.js.map +1 -1
- package/dist/core/recipe/cleaner.js +5 -5
- package/dist/core/recipe/cleaner.js.map +1 -1
- package/dist/core/recipe/index.d.ts +1 -1
- package/dist/core/recipe/index.d.ts.map +1 -1
- package/dist/core/recipe/index.js +57 -4
- package/dist/core/recipe/index.js.map +1 -1
- package/dist/core/recipe/ooxml-parts.d.ts +11 -0
- package/dist/core/recipe/ooxml-parts.d.ts.map +1 -1
- package/dist/core/recipe/ooxml-parts.js +22 -0
- package/dist/core/recipe/ooxml-parts.js.map +1 -1
- package/dist/core/recipe/patcher.d.ts.map +1 -1
- package/dist/core/recipe/patcher.js +2 -5
- package/dist/core/recipe/patcher.js.map +1 -1
- package/dist/core/recipe/source-drift.d.ts +19 -0
- package/dist/core/recipe/source-drift.d.ts.map +1 -1
- package/dist/core/recipe/source-drift.js +32 -2
- package/dist/core/recipe/source-drift.js.map +1 -1
- package/dist/core/selector.d.ts.map +1 -1
- package/dist/core/selector.js +49 -4
- package/dist/core/selector.js.map +1 -1
- package/dist/core/selectors/index.d.ts +40 -0
- package/dist/core/selectors/index.d.ts.map +1 -0
- package/dist/core/selectors/index.js +64 -0
- package/dist/core/selectors/index.js.map +1 -0
- package/dist/core/selectors/loader.d.ts +16 -0
- package/dist/core/selectors/loader.d.ts.map +1 -0
- package/dist/core/selectors/loader.js +80 -0
- package/dist/core/selectors/loader.js.map +1 -0
- package/dist/core/selectors/manifest-schema.d.ts +123 -0
- package/dist/core/selectors/manifest-schema.d.ts.map +1 -0
- package/dist/core/selectors/manifest-schema.js +93 -0
- package/dist/core/selectors/manifest-schema.js.map +1 -0
- package/dist/core/selectors/patch.d.ts +24 -0
- package/dist/core/selectors/patch.d.ts.map +1 -0
- package/dist/core/selectors/patch.js +68 -0
- package/dist/core/selectors/patch.js.map +1 -0
- package/dist/core/selectors/postconditions.d.ts +24 -0
- package/dist/core/selectors/postconditions.d.ts.map +1 -0
- package/dist/core/selectors/postconditions.js +50 -0
- package/dist/core/selectors/postconditions.js.map +1 -0
- package/dist/core/selectors/resolve.d.ts +32 -0
- package/dist/core/selectors/resolve.d.ts.map +1 -0
- package/dist/core/selectors/resolve.js +36 -0
- package/dist/core/selectors/resolve.js.map +1 -0
- package/dist/core/unified-pipeline.d.ts +3 -1
- package/dist/core/unified-pipeline.d.ts.map +1 -1
- package/dist/core/unified-pipeline.js +19 -5
- package/dist/core/unified-pipeline.js.map +1 -1
- package/gemini-extension.json +1 -1
- package/node_modules/@usejunior/docx-core/LICENSE +202 -21
- package/node_modules/@usejunior/docx-core/NOTICE +2 -0
- package/node_modules/@usejunior/docx-core/README.md +2 -2
- package/node_modules/@usejunior/docx-core/dist/.tsbuildinfo +1 -1
- package/node_modules/@usejunior/docx-core/dist/atomizer.d.ts +55 -0
- package/node_modules/@usejunior/docx-core/dist/atomizer.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/atomizer.js +139 -14
- package/node_modules/@usejunior/docx-core/dist/atomizer.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/auxiliaryIdCollision.d.ts +99 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/auxiliaryIdCollision.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/auxiliaryIdCollision.js +415 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/auxiliaryIdCollision.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/documentReconstructor.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/documentReconstructor.js +403 -113
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/documentReconstructor.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/formattingFidelity.d.ts +99 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/formattingFidelity.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/formattingFidelity.js +449 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/formattingFidelity.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-bookmarks.d.ts +37 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-bookmarks.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-bookmarks.js +189 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-bookmarks.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-containers.d.ts +74 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-containers.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-containers.js +171 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-containers.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-deletion.d.ts +88 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-deletion.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-deletion.js +326 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-deletion.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-postprocess.d.ts +85 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-postprocess.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-postprocess.js +402 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-postprocess.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-presplit.d.ts +39 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-presplit.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-presplit.js +265 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-presplit.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-shared.d.ts +62 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-shared.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-shared.js +139 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-shared.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-wrappers.d.ts +198 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-wrappers.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-wrappers.js +475 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier-wrappers.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier.d.ts +6 -290
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier.js +23 -1828
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/pipeline.d.ts +36 -2
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/pipeline.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/pipeline.js +456 -224
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/pipeline.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptorAst.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptorAst.js +199 -173
- package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptorAst.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DotnetCli.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DotnetCli.js +7 -0
- package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DotnetCli.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/cli/compare-two.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/cli/compare-two.js +3 -1
- package/node_modules/@usejunior/docx-core/dist/cli/compare-two.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/cli/conformance-adapter.d.ts +3 -0
- package/node_modules/@usejunior/docx-core/dist/cli/conformance-adapter.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/cli/conformance-adapter.js +93 -0
- package/node_modules/@usejunior/docx-core/dist/cli/conformance-adapter.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/cli/index.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/cli/index.js +5 -1
- package/node_modules/@usejunior/docx-core/dist/cli/index.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/compare-types.d.ts +197 -0
- package/node_modules/@usejunior/docx-core/dist/compare-types.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/compare-types.js +2 -0
- package/node_modules/@usejunior/docx-core/dist/compare-types.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/core-types.d.ts +5 -1
- package/node_modules/@usejunior/docx-core/dist/core-types.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/core-types.js +5 -1
- package/node_modules/@usejunior/docx-core/dist/core-types.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/footnotes.d.ts +8 -3
- package/node_modules/@usejunior/docx-core/dist/footnotes.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/footnotes.js +8 -3
- package/node_modules/@usejunior/docx-core/dist/footnotes.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/generation/compile.d.ts +22 -0
- package/node_modules/@usejunior/docx-core/dist/generation/compile.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/compile.js +58 -0
- package/node_modules/@usejunior/docx-core/dist/generation/compile.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/context.d.ts +42 -0
- package/node_modules/@usejunior/docx-core/dist/generation/context.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/context.js +65 -0
- package/node_modules/@usejunior/docx-core/dist/generation/context.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/comments-part.d.ts +36 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/comments-part.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/comments-part.js +116 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/comments-part.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/document-part.d.ts +24 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/document-part.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/document-part.js +60 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/document-part.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/emit-context.d.ts +28 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/emit-context.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/emit-context.js +19 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/emit-context.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/font-table-part.d.ts +16 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/font-table-part.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/font-table-part.js +74 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/font-table-part.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/header-footer-part.d.ts +23 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/header-footer-part.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/header-footer-part.js +57 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/header-footer-part.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/numbering-part.d.ts +29 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/numbering-part.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/numbering-part.js +102 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/numbering-part.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/package-parts.d.ts +24 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/package-parts.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/package-parts.js +121 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/package-parts.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/paragraph.d.ts +24 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/paragraph.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/paragraph.js +63 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/paragraph.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/properties.d.ts +36 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/properties.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/properties.js +157 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/properties.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/run.d.ts +16 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/run.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/run.js +71 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/run.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/section.d.ts +29 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/section.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/section.js +117 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/section.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/settings-part.d.ts +13 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/settings-part.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/settings-part.js +68 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/settings-part.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/styles-part.d.ts +16 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/styles-part.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/styles-part.js +82 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/styles-part.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/table.d.ts +26 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/table.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/table.js +209 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/table.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/theme-part.d.ts +21 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/theme-part.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/theme-part.js +151 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/theme-part.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/web-settings-part.d.ts +12 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/web-settings-part.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/web-settings-part.js +19 -0
- package/node_modules/@usejunior/docx-core/dist/generation/emit/web-settings-part.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/errors.d.ts +22 -0
- package/node_modules/@usejunior/docx-core/dist/generation/errors.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/errors.js +29 -0
- package/node_modules/@usejunior/docx-core/dist/generation/errors.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/index.d.ts +13 -0
- package/node_modules/@usejunior/docx-core/dist/generation/index.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/index.js +12 -0
- package/node_modules/@usejunior/docx-core/dist/generation/index.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/ordering.d.ts +46 -0
- package/node_modules/@usejunior/docx-core/dist/generation/ordering.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/ordering.js +119 -0
- package/node_modules/@usejunior/docx-core/dist/generation/ordering.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/recipes.d.ts +87 -0
- package/node_modules/@usejunior/docx-core/dist/generation/recipes.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/recipes.js +232 -0
- package/node_modules/@usejunior/docx-core/dist/generation/recipes.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/structural-checks.d.ts +24 -0
- package/node_modules/@usejunior/docx-core/dist/generation/structural-checks.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/structural-checks.js +318 -0
- package/node_modules/@usejunior/docx-core/dist/generation/structural-checks.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/theme-colors.d.ts +4 -0
- package/node_modules/@usejunior/docx-core/dist/generation/theme-colors.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/theme-colors.js +18 -0
- package/node_modules/@usejunior/docx-core/dist/generation/theme-colors.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/types.d.ts +266 -0
- package/node_modules/@usejunior/docx-core/dist/generation/types.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/types.js +63 -0
- package/node_modules/@usejunior/docx-core/dist/generation/types.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/validate-spec.d.ts +27 -0
- package/node_modules/@usejunior/docx-core/dist/generation/validate-spec.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/generation/validate-spec.js +363 -0
- package/node_modules/@usejunior/docx-core/dist/generation/validate-spec.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/index.d.ts +9 -150
- package/node_modules/@usejunior/docx-core/dist/index.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/index.js +14 -0
- package/node_modules/@usejunior/docx-core/dist/index.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/integration/generation-probes.d.ts +15 -0
- package/node_modules/@usejunior/docx-core/dist/integration/generation-probes.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/integration/generation-probes.js +84 -0
- package/node_modules/@usejunior/docx-core/dist/integration/generation-probes.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/integration/libreoffice-oracle.d.ts +49 -0
- package/node_modules/@usejunior/docx-core/dist/integration/libreoffice-oracle.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/integration/libreoffice-oracle.js +290 -0
- package/node_modules/@usejunior/docx-core/dist/integration/libreoffice-oracle.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/integration/synthetic-docx-fixture.d.ts +134 -0
- package/node_modules/@usejunior/docx-core/dist/integration/synthetic-docx-fixture.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/integration/synthetic-docx-fixture.js +298 -0
- package/node_modules/@usejunior/docx-core/dist/integration/synthetic-docx-fixture.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/accept_changes.d.ts +4 -3
- package/node_modules/@usejunior/docx-core/dist/primitives/accept_changes.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/accept_changes.js +163 -77
- package/node_modules/@usejunior/docx-core/dist/primitives/accept_changes.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/comments.d.ts +12 -3
- package/node_modules/@usejunior/docx-core/dist/primitives/comments.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/comments.js +374 -97
- package/node_modules/@usejunior/docx-core/dist/primitives/comments.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/content_fingerprint.d.ts +29 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/content_fingerprint.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/content_fingerprint.js +63 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/content_fingerprint.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document.d.ts +94 -15
- package/node_modules/@usejunior/docx-core/dist/primitives/document.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/document.js +377 -234
- package/node_modules/@usejunior/docx-core/dist/primitives/document.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-comments.d.ts +18 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-comments.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-comments.js +160 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-comments.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-headings.d.ts +45 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-headings.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-headings.js +247 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-headings.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-styles.d.ts +11 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-styles.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-styles.js +104 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-styles.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-toon.d.ts +37 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-toon.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-toon.js +199 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-toon.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-types.d.ts +165 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-types.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-types.js +2 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view-types.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view.d.ts +50 -101
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view.js +287 -326
- package/node_modules/@usejunior/docx-core/dist/primitives/document_view.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/dom-helpers.d.ts +9 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/dom-helpers.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/dom-helpers.js +10 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/dom-helpers.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/footnotes.d.ts +4 -3
- package/node_modules/@usejunior/docx-core/dist/primitives/footnotes.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/footnotes.js +232 -44
- package/node_modules/@usejunior/docx-core/dist/primitives/footnotes.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/formatting_tags.d.ts +7 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/formatting_tags.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/formatting_tags.js +22 -11
- package/node_modules/@usejunior/docx-core/dist/primitives/formatting_tags.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/index.d.ts +12 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/index.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/index.js +11 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/index.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/layout.d.ts +4 -3
- package/node_modules/@usejunior/docx-core/dist/primitives/layout.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/layout.js +45 -3
- package/node_modules/@usejunior/docx-core/dist/primitives/layout.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/locator.d.ts +76 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/locator.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/locator.js +223 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/locator.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/merge_runs.d.ts +21 -3
- package/node_modules/@usejunior/docx-core/dist/primitives/merge_runs.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/merge_runs.js +32 -10
- package/node_modules/@usejunior/docx-core/dist/primitives/merge_runs.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/minimal_save.d.ts +38 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/minimal_save.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/minimal_save.js +323 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/minimal_save.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/namespaces.d.ts +53 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/namespaces.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/namespaces.js +59 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/namespaces.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/reject_changes.d.ts +6 -4
- package/node_modules/@usejunior/docx-core/dist/primitives/reject_changes.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/reject_changes.js +187 -91
- package/node_modules/@usejunior/docx-core/dist/primitives/reject_changes.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/revision-parts.d.ts +7 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/revision-parts.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/revision-parts.js +27 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/revision-parts.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/revision-vocabulary.d.ts +7 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/revision-vocabulary.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/revision-vocabulary.js +39 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/revision-vocabulary.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/schema-corpus-capture.d.ts +19 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/schema-corpus-capture.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/schema-corpus-capture.js +29 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/schema-corpus-capture.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/sectPrAudit.d.ts +19 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/sectPrAudit.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/sectPrAudit.js +165 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/sectPrAudit.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/semantic_tags.d.ts +7 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/semantic_tags.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/semantic_tags.js +23 -4
- package/node_modules/@usejunior/docx-core/dist/primitives/semantic_tags.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/serialize_html.d.ts +37 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/serialize_html.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/serialize_html.js +395 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/serialize_html.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/serialize_markdown.d.ts +16 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/serialize_markdown.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/serialize_markdown.js +300 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/serialize_markdown.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/serialize_plaintext.d.ts +15 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/serialize_plaintext.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/serialize_plaintext.js +154 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/serialize_plaintext.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/styles.d.ts +15 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/styles.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/styles.js +33 -22
- package/node_modules/@usejunior/docx-core/dist/primitives/styles.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/table_context.d.ts +19 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/table_context.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/table_context.js +189 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/table_context.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/tables.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/tables.js +13 -3
- package/node_modules/@usejunior/docx-core/dist/primitives/tables.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/text.d.ts +2 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/text.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/text.js +116 -12
- package/node_modules/@usejunior/docx-core/dist/primitives/text.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/track-changes-emitter.d.ts +148 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/track-changes-emitter.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/track-changes-emitter.js +291 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/track-changes-emitter.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/validate_ai_revisions.d.ts +35 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/validate_ai_revisions.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/validate_ai_revisions.js +323 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/validate_ai_revisions.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/xml-helpers.d.ts +29 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/xml-helpers.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/xml-helpers.js +35 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/xml-helpers.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/xml.d.ts +5 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/xml.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/xml.js +5 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/xml.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/zip.d.ts +1 -0
- package/node_modules/@usejunior/docx-core/dist/primitives/zip.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/primitives/zip.js +21 -3
- package/node_modules/@usejunior/docx-core/dist/primitives/zip.js.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/shared/field-structure.d.ts +14 -0
- package/node_modules/@usejunior/docx-core/dist/shared/field-structure.d.ts.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/shared/field-structure.js +166 -0
- package/node_modules/@usejunior/docx-core/dist/shared/field-structure.js.map +1 -0
- package/node_modules/@usejunior/docx-core/dist/shared/ooxml/namespaces.d.ts +4 -1
- package/node_modules/@usejunior/docx-core/dist/shared/ooxml/namespaces.d.ts.map +1 -1
- package/node_modules/@usejunior/docx-core/dist/shared/ooxml/namespaces.js +4 -1
- package/node_modules/@usejunior/docx-core/dist/shared/ooxml/namespaces.js.map +1 -1
- package/node_modules/@usejunior/docx-core/package.json +13 -9
- package/node_modules/@xmldom/xmldom/CHANGELOG.md +186 -70
- package/node_modules/@xmldom/xmldom/index.d.ts +144 -19
- package/node_modules/@xmldom/xmldom/lib/dom.js +705 -343
- package/node_modules/@xmldom/xmldom/lib/grammar.js +14 -0
- package/node_modules/@xmldom/xmldom/package.json +13 -10
- package/package.json +7 -7
- package/server.json +3 -3
- package/skills/{cloud-service-agreement → agreements/cloud-service-agreement}/SKILL.md +2 -2
- package/skills/{nda → agreements/cloud-service-agreement}/template-filling-execution.md +2 -2
- package/skills/{data-privacy-agreement → agreements/data-privacy-agreement}/SKILL.md +15 -4
- package/skills/{safe → agreements/data-privacy-agreement}/template-filling-execution.md +12 -6
- package/skills/{employment-contract → agreements/employment-contract}/SKILL.md +3 -3
- package/skills/{cloud-service-agreement → agreements/employment-contract}/template-filling-execution.md +12 -6
- package/skills/{nda → agreements/nda}/SKILL.md +2 -2
- package/skills/{open-agreements → agreements/nda}/template-filling-execution.md +12 -6
- package/skills/{open-agreements → agreements/open-agreements}/SKILL.md +13 -30
- package/skills/agreements/open-agreements/template-filling-execution.md +98 -0
- package/skills/{safe → agreements/safe}/SKILL.md +2 -2
- package/skills/agreements/safe/template-filling-execution.md +98 -0
- package/skills/{services-agreement → agreements/services-agreement}/SKILL.md +3 -3
- package/skills/agreements/services-agreement/template-filling-execution.md +98 -0
- package/skills/{venture-financing → agreements/venture-financing}/SKILL.md +3 -3
- package/skills/agreements/venture-financing/template-filling-execution.md +98 -0
- package/skills/{client-email → client-workflows/client-email}/SKILL.md +1 -1
- package/skills/{delaware-franchise-tax → client-workflows/delaware-franchise-tax}/SKILL.md +1 -1
- package/skills/{edit-docx-agreement → client-workflows/edit-docx-agreement}/SKILL.md +1 -1
- package/skills/{iso-27001-evidence-collection → compliance/iso-27001-evidence-collection}/SKILL.md +1 -1
- package/skills/{iso-27001-internal-audit → compliance/iso-27001-internal-audit}/SKILL.md +1 -1
- package/skills/{soc2-readiness → compliance/soc2-readiness}/SKILL.md +1 -1
- package/skills/{canonical-markdown-authoring → internal/canonical-markdown-authoring}/SKILL.md +2 -3
- package/skills/{recipe-quality-audit → internal/recipe-quality-audit}/SKILL.md +2 -1
- package/skills/{unit-test-philosophy → internal/unit-test-philosophy}/SKILL.md +2 -0
- package/skills/legal-explainers/data-privacy-law-explainer/CONTRIBUTING.md +7 -0
- package/skills/legal-explainers/data-privacy-law-explainer/LICENSE +269 -0
- package/skills/legal-explainers/data-privacy-law-explainer/NOTICE +7 -0
- package/skills/legal-explainers/data-privacy-law-explainer/SKILL.md +113 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/alabama.md +211 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/alaska.md +155 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/arizona.md +181 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/arkansas.md +219 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/california.md +107 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/colorado.md +87 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/connecticut.md +83 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/delaware.md +85 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/district-of-columbia.md +153 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/florida.md +234 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/georgia.md +149 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/hawaii.md +167 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/idaho.md +149 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/illinois.md +238 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/indiana.md +93 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/iowa.md +99 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/kansas.md +155 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/kentucky.md +87 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/louisiana.md +209 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/maine.md +163 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/maryland.md +85 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/massachusetts.md +260 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/michigan.md +175 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/minnesota.md +93 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/mississippi.md +132 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/missouri.md +179 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/montana.md +105 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/nebraska.md +83 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/nevada.md +212 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/new-hampshire.md +91 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/new-jersey.md +95 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/new-mexico.md +174 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/new-york.md +195 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/north-carolina.md +205 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/north-dakota.md +169 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/ohio.md +171 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/oklahoma.md +168 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/oregon.md +103 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/pennsylvania.md +99 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/rhode-island.md +93 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/south-carolina.md +175 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/south-dakota.md +176 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/tennessee.md +89 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/texas.md +89 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/utah.md +83 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/vermont.md +267 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/virginia.md +85 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/washington.md +247 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/west-virginia.md +141 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/wisconsin.md +156 -0
- package/skills/legal-explainers/data-privacy-law-explainer/content/wyoming.md +185 -0
- package/skills/legal-explainers/data-privacy-law-explainer/manifest.json +519 -0
- package/skills/legal-explainers/non-compete-contract-explainer/CONTRIBUTING.md +7 -0
- package/skills/legal-explainers/non-compete-contract-explainer/LICENSE +269 -0
- package/skills/legal-explainers/non-compete-contract-explainer/NOTICE +7 -0
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/SKILL.md +1 -1
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/alabama.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/alaska.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/american-samoa.md +6 -6
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/arizona.md +6 -4
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/arkansas.md +5 -5
- package/skills/legal-explainers/non-compete-contract-explainer/content/au.md +208 -0
- package/skills/legal-explainers/non-compete-contract-explainer/content/australian-capital-territory.md +220 -0
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/california.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/cnmi.md +4 -4
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/colorado.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/connecticut.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/delaware.md +7 -7
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/district-of-columbia.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/florida.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/georgia.md +7 -7
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/guam.md +4 -4
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/hawaii.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/idaho.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/illinois.md +5 -5
- package/skills/{non-compete-contract-explainer/content/india.md → legal-explainers/non-compete-contract-explainer/content/in.md} +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/indiana.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/iowa.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/kansas.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/kentucky.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/louisiana.md +9 -9
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/maine.md +6 -6
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/maryland.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/massachusetts.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/michigan.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/minnesota.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/mississippi.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/missouri.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/montana.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/nebraska.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/nevada.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/new-hampshire.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/new-jersey.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/new-mexico.md +5 -5
- package/skills/legal-explainers/non-compete-contract-explainer/content/new-south-wales.md +218 -0
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/new-york.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/north-carolina.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/north-dakota.md +5 -5
- package/skills/legal-explainers/non-compete-contract-explainer/content/northern-territory.md +214 -0
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/ohio.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/oklahoma.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/oregon.md +12 -12
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/pennsylvania.md +5 -5
- package/skills/{non-compete-contract-explainer/content/philippines.md → legal-explainers/non-compete-contract-explainer/content/ph.md} +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/puerto-rico.md +4 -4
- package/skills/legal-explainers/non-compete-contract-explainer/content/queensland.md +206 -0
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/rhode-island.md +5 -5
- package/skills/{non-compete-contract-explainer/content/singapore.md → legal-explainers/non-compete-contract-explainer/content/sg.md} +5 -5
- package/skills/legal-explainers/non-compete-contract-explainer/content/south-australia.md +236 -0
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/south-carolina.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/south-dakota.md +5 -5
- package/skills/legal-explainers/non-compete-contract-explainer/content/tasmania.md +224 -0
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/tennessee.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/texas.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/utah.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/vermont.md +29 -11
- package/skills/legal-explainers/non-compete-contract-explainer/content/victoria.md +218 -0
- package/skills/{non-compete-contract-explainer/content/us-virgin-islands.md → legal-explainers/non-compete-contract-explainer/content/virgin-islands.md} +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/virginia.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/washington.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/west-virginia.md +5 -5
- package/skills/legal-explainers/non-compete-contract-explainer/content/western-australia.md +224 -0
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/wisconsin.md +5 -5
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/content/wyoming.md +19 -15
- package/skills/{non-compete-contract-explainer → legal-explainers/non-compete-contract-explainer}/manifest.json +225 -76
- package/content/templates/bonterms-mutual-nda/signing.yaml +0 -35
- package/dist/core/signing-config.d.ts +0 -46
- package/dist/core/signing-config.d.ts.map +0 -1
- package/dist/core/signing-config.js +0 -67
- package/dist/core/signing-config.js.map +0 -1
- package/skills/services-agreement/template-filling-execution.md +0 -81
- package/skills/shared/template-filling-execution.md +0 -92
- /package/skills/{cloud-service-agreement → agreements/cloud-service-agreement}/CONNECTORS.md +0 -0
- /package/skills/{data-privacy-agreement → agreements/data-privacy-agreement}/CONNECTORS.md +0 -0
- /package/skills/{employment-contract → agreements/employment-contract}/CONNECTORS.md +0 -0
- /package/skills/{nda → agreements/nda}/CONNECTORS.md +0 -0
- /package/skills/{open-agreements → agreements/open-agreements}/CONNECTORS.md +0 -0
- /package/skills/{safe → agreements/safe}/CONNECTORS.md +0 -0
- /package/skills/{services-agreement → agreements/services-agreement}/CONNECTORS.md +0 -0
- /package/skills/{venture-financing → agreements/venture-financing}/CONNECTORS.md +0 -0
- /package/skills/{delaware-franchise-tax → client-workflows/delaware-franchise-tax}/CONNECTORS.md +0 -0
- /package/skills/{delaware-franchise-tax → client-workflows/delaware-franchise-tax}/reference/ecorp-portal-playwright-notes.md +0 -0
- /package/skills/{delaware-franchise-tax → client-workflows/delaware-franchise-tax}/reference/faq.md +0 -0
- /package/skills/{delaware-franchise-tax → client-workflows/delaware-franchise-tax}/reference/filing-instructions.md +0 -0
- /package/skills/{delaware-franchise-tax → client-workflows/delaware-franchise-tax}/reference/tax-calculation.md +0 -0
- /package/skills/{edit-docx-agreement → client-workflows/edit-docx-agreement}/CONNECTORS.md +0 -0
- /package/skills/{iso-27001-evidence-collection → compliance/iso-27001-evidence-collection}/CONNECTORS.md +0 -0
- /package/skills/{iso-27001-evidence-collection → compliance/iso-27001-evidence-collection}/rules/api-exports.md +0 -0
- /package/skills/{iso-27001-evidence-collection → compliance/iso-27001-evidence-collection}/rules/evidence-types.md +0 -0
- /package/skills/{iso-27001-evidence-collection → compliance/iso-27001-evidence-collection}/rules/screenshot-guide.md +0 -0
- /package/skills/{iso-27001-internal-audit → compliance/iso-27001-internal-audit}/CONNECTORS.md +0 -0
- /package/skills/{iso-27001-internal-audit → compliance/iso-27001-internal-audit}/rules/access-control.md +0 -0
- /package/skills/{iso-27001-internal-audit → compliance/iso-27001-internal-audit}/rules/business-continuity.md +0 -0
- /package/skills/{iso-27001-internal-audit → compliance/iso-27001-internal-audit}/rules/change-management.md +0 -0
- /package/skills/{iso-27001-internal-audit → compliance/iso-27001-internal-audit}/rules/encryption.md +0 -0
- /package/skills/{iso-27001-internal-audit → compliance/iso-27001-internal-audit}/rules/incident-response.md +0 -0
- /package/skills/{iso-27001-internal-audit → compliance/iso-27001-internal-audit}/rules/isms-management.md +0 -0
- /package/skills/{iso-27001-internal-audit → compliance/iso-27001-internal-audit}/rules/logging-monitoring.md +0 -0
- /package/skills/{iso-27001-internal-audit → compliance/iso-27001-internal-audit}/rules/people-controls.md +0 -0
- /package/skills/{iso-27001-internal-audit → compliance/iso-27001-internal-audit}/rules/supplier-management.md +0 -0
- /package/skills/{soc2-readiness → compliance/soc2-readiness}/CONNECTORS.md +0 -0
- /package/skills/{soc2-readiness → compliance/soc2-readiness}/rules/change-vendor-management.md +0 -0
- /package/skills/{soc2-readiness → compliance/soc2-readiness}/rules/communication-info.md +0 -0
- /package/skills/{soc2-readiness → compliance/soc2-readiness}/rules/control-activities.md +0 -0
- /package/skills/{soc2-readiness → compliance/soc2-readiness}/rules/control-environment.md +0 -0
- /package/skills/{soc2-readiness → compliance/soc2-readiness}/rules/logical-access.md +0 -0
- /package/skills/{soc2-readiness → compliance/soc2-readiness}/rules/monitoring-activities.md +0 -0
- /package/skills/{soc2-readiness → compliance/soc2-readiness}/rules/optional-categories.md +0 -0
- /package/skills/{soc2-readiness → compliance/soc2-readiness}/rules/privacy-criteria.md +0 -0
- /package/skills/{soc2-readiness → compliance/soc2-readiness}/rules/risk-assessment.md +0 -0
- /package/skills/{soc2-readiness → compliance/soc2-readiness}/rules/system-operations.md +0 -0
- /package/skills/{canonical-markdown-authoring → internal/canonical-markdown-authoring}/CONNECTORS.md +0 -0
- /package/skills/{unit-test-philosophy → internal/unit-test-philosophy}/references/allure-test-spec-writing-guide.md +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footnotes.d.ts","sourceRoot":"","sources":["../src/footnotes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"footnotes.d.ts","sourceRoot":"","sources":["../src/footnotes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,EAEjB,UAAU,EACX,MAAM,iBAAiB,CAAC;AAOzB;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,qBAAqB,GAAG,oBAAoB,GACpD,UAAU,EAAE,CAcd;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAKnD;AAMD;;;;;;;;;GASG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,yBAAyB,CAAkC;IACnE,OAAO,CAAC,wBAAwB,CAAkC;IAClE,OAAO,CAAC,mBAAmB,CAA0B;IACrD,OAAO,CAAC,kBAAkB,CAA0B;IAEpD;;;;OAIG;gBACS,YAAY,EAAE,UAAU;IAIpC;;OAEG;IACH,OAAO,CAAC,YAAY;IAwBpB;;OAEG;IACH,OAAO,CAAC,cAAc;IAmCtB;;;;;OAKG;IACH,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI3D;;;;;OAKG;IACH,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI1D;;;;;;;OAOG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAOnD;;;;;OAKG;IACH,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAI7C;;;;;OAKG;IACH,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAI5C;;OAEG;IACH,gBAAgB,IAAI,MAAM;IAI1B;;OAEG;IACH,eAAe,IAAI,MAAM;IAIzB;;;;OAIG;IACH,qBAAqB,IAAI,iBAAiB,EAAE;IAwB5C;;;;OAIG;IACH,oBAAoB,IAAI,iBAAiB,EAAE;CAuB5C;AAMD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,UAAU,EACzB,KAAK,EAAE,MAAM,GACZ,UAAU,GAAG,SAAS,CAYxB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,UAAU,EACxB,KAAK,EAAE,MAAM,GACZ,UAAU,GAAG,SAAS,CAYxB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,UAAU,GAAG,MAAM,CAiB/D"}
|
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Handles sequential footnote/endnote numbering by document order.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* `w:id` on `w:footnoteReference` is a reference identifier, NOT the display
|
|
7
|
+
* number. Display numbers are sequential based on document order.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* Document has 91 footnotes with XML IDs 2-92 (IDs 0, 1 are reserved):
|
|
11
11
|
* - Incorrect: Display as 2, 3, 4, ..., 92
|
|
12
12
|
* - Correct: Display as 1, 2, 3, ..., 91
|
|
13
|
+
*
|
|
14
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.11.14
|
|
13
15
|
*/
|
|
14
16
|
import { RESERVED_FOOTNOTE_IDS, } from './core-types.js';
|
|
15
17
|
import { childElements, getLeafText } from './primitives/index.js';
|
|
@@ -41,10 +43,13 @@ export function findReferencesInOrder(element, tagName) {
|
|
|
41
43
|
/**
|
|
42
44
|
* Check if a footnote/endnote ID is reserved.
|
|
43
45
|
*
|
|
44
|
-
* IDs 0 and 1 are reserved
|
|
46
|
+
* IDs 0 and 1 are treated as reserved, matching the special separator and
|
|
47
|
+
* continuation-separator footnote examples in ECMA-376 5th edition Part 1
|
|
48
|
+
* §17.11.9 / §17.11.10.
|
|
45
49
|
*
|
|
46
50
|
* @param xmlId - The XML ID to check
|
|
47
51
|
* @returns True if this is a reserved ID
|
|
52
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.11.14
|
|
48
53
|
*/
|
|
49
54
|
export function isReservedId(xmlId) {
|
|
50
55
|
return (xmlId === RESERVED_FOOTNOTE_IDS.SEPARATOR ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footnotes.js","sourceRoot":"","sources":["../src/footnotes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"footnotes.js","sourceRoot":"","sources":["../src/footnotes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,qBAAqB,GAEtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEnE,gFAAgF;AAChF,6BAA6B;AAC7B,gFAAgF;AAEhF;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAmB,EACnB,OAAqD;IAErD,MAAM,IAAI,GAAiB,EAAE,CAAC;IAE9B,SAAS,QAAQ,CAAC,IAAgB;QAChC,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO,EAAE,CAAC;YAC7B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;YACxC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IAED,QAAQ,CAAC,OAAO,CAAC,CAAC;IAClB,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;I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AAI,EAAE,CAAC;YACrC,IAAI,IAAI,EAAE,CAAC;gBACT,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC;QACH,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;YACxC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IAED,QAAQ,CAAC,WAAW,CAAC,CAAC;IACtB,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The generation compiler: DocumentSpec → validated spec → per-part emitters
|
|
3
|
+
* → ordered file record → zip buffer.
|
|
4
|
+
*
|
|
5
|
+
* Determinism contract: identical specs compile to byte-identical buffers.
|
|
6
|
+
* No emitter reads the clock or randomness; zip entry dates are pinned to a
|
|
7
|
+
* fixed epoch (document-facing dates come from spec.meta.createdIso).
|
|
8
|
+
*
|
|
9
|
+
* Ordering: header/footer parts are allocated first so their relationship
|
|
10
|
+
* ids exist when the document part binds section references; the standard
|
|
11
|
+
* ancillary parts (theme, fontTable, webSettings) register before the package
|
|
12
|
+
* plumbing, which runs last because [Content_Types].xml is assembled from the
|
|
13
|
+
* part registry.
|
|
14
|
+
*/
|
|
15
|
+
import type { DocumentSpec } from './types.js';
|
|
16
|
+
export type GenerateDocxOptions = {
|
|
17
|
+
/** Overrides spec.options.includeDraftingNotes when provided. */
|
|
18
|
+
includeDraftingNotes?: boolean;
|
|
19
|
+
};
|
|
20
|
+
/** Compile a DocumentSpec into a complete DOCX package. */
|
|
21
|
+
export declare function generateDocx(spec: DocumentSpec, opts?: GenerateDocxOptions): Promise<Buffer>;
|
|
22
|
+
//# sourceMappingURL=compile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/generation/compile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAiBH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C,MAAM,MAAM,mBAAmB,GAAG;IAChC,iEAAiE;IACjE,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,2DAA2D;AAC3D,wBAAsB,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAwBlG"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The generation compiler: DocumentSpec → validated spec → per-part emitters
|
|
3
|
+
* → ordered file record → zip buffer.
|
|
4
|
+
*
|
|
5
|
+
* Determinism contract: identical specs compile to byte-identical buffers.
|
|
6
|
+
* No emitter reads the clock or randomness; zip entry dates are pinned to a
|
|
7
|
+
* fixed epoch (document-facing dates come from spec.meta.createdIso).
|
|
8
|
+
*
|
|
9
|
+
* Ordering: header/footer parts are allocated first so their relationship
|
|
10
|
+
* ids exist when the document part binds section references; the standard
|
|
11
|
+
* ancillary parts (theme, fontTable, webSettings) register before the package
|
|
12
|
+
* plumbing, which runs last because [Content_Types].xml is assembled from the
|
|
13
|
+
* part registry.
|
|
14
|
+
*/
|
|
15
|
+
import { createZipBuffer } from '../primitives/zip.js';
|
|
16
|
+
import { maybeCaptureEmittedDocumentXml } from '../primitives/schema-corpus-capture.js';
|
|
17
|
+
import { CompileContext } from './context.js';
|
|
18
|
+
import { emitCommentsPartsIfNeeded } from './emit/comments-part.js';
|
|
19
|
+
import { DraftingNoteCollector } from './emit/emit-context.js';
|
|
20
|
+
import { emitDocumentPart } from './emit/document-part.js';
|
|
21
|
+
import { emitFontTablePart } from './emit/font-table-part.js';
|
|
22
|
+
import { emitHeaderFooterParts } from './emit/header-footer-part.js';
|
|
23
|
+
import { emitNumberingPartIfNeeded } from './emit/numbering-part.js';
|
|
24
|
+
import { emitPackageParts } from './emit/package-parts.js';
|
|
25
|
+
import { emitSettingsPartIfNeeded } from './emit/settings-part.js';
|
|
26
|
+
import { emitStylesPart } from './emit/styles-part.js';
|
|
27
|
+
import { emitThemePart } from './emit/theme-part.js';
|
|
28
|
+
import { emitWebSettingsPart } from './emit/web-settings-part.js';
|
|
29
|
+
import { resolveThemeColorValues } from './theme-colors.js';
|
|
30
|
+
import { validateSpec } from './validate-spec.js';
|
|
31
|
+
/** Fixed zip-entry timestamp (2006-01-01T00:00:00Z, the OOXML vintage). */
|
|
32
|
+
const ZIP_EPOCH = new Date(Date.UTC(2006, 0, 1));
|
|
33
|
+
/** Compile a DocumentSpec into a complete DOCX package. */
|
|
34
|
+
export async function generateDocx(spec, opts) {
|
|
35
|
+
validateSpec(spec);
|
|
36
|
+
const notesEnabled = opts?.includeDraftingNotes ?? spec.options?.includeDraftingNotes ?? true;
|
|
37
|
+
const ctx = new CompileContext();
|
|
38
|
+
const themeColorValues = resolveThemeColorValues(spec.theme);
|
|
39
|
+
const numberingIds = emitNumberingPartIfNeeded(spec, ctx);
|
|
40
|
+
const headerFooterRefs = emitHeaderFooterParts(spec, ctx, { numberingIds, themeColorValues });
|
|
41
|
+
const notes = notesEnabled ? new DraftingNoteCollector() : undefined;
|
|
42
|
+
const documentPartXml = emitDocumentPart(spec, headerFooterRefs, { numberingIds, notes, themeColorValues });
|
|
43
|
+
maybeCaptureEmittedDocumentXml(documentPartXml);
|
|
44
|
+
ctx.setFileContent('word/document.xml', documentPartXml);
|
|
45
|
+
if (notes)
|
|
46
|
+
emitCommentsPartsIfNeeded(spec, ctx, notes);
|
|
47
|
+
emitStylesPart(spec, ctx);
|
|
48
|
+
emitSettingsPartIfNeeded(spec, ctx);
|
|
49
|
+
// Standard ancillary parts every Word-authored package carries (issue #482):
|
|
50
|
+
// theme → fontTable → webSettings, ordered for stable rId allocation. Package
|
|
51
|
+
// plumbing must stay last — it assembles [Content_Types].xml from the registry.
|
|
52
|
+
emitThemePart(ctx, spec.theme);
|
|
53
|
+
emitFontTablePart(spec, ctx);
|
|
54
|
+
emitWebSettingsPart(ctx);
|
|
55
|
+
emitPackageParts(spec, ctx);
|
|
56
|
+
return createZipBuffer(ctx.toFileRecord(), { fileDate: ZIP_EPOCH });
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=compile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../src/generation/compile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,2EAA2E;AAC3E,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,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C7B,mBAAmB,CAAC,GAAG,CAAC,CAAC;IACzB,gBAAgB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAE5B,OAAO,eAAe,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compile-time state shared by the part emitters.
|
|
3
|
+
*
|
|
4
|
+
* The context owns the part registry (part name → content type + optional
|
|
5
|
+
* document-level relationship), the relationship-id allocator, and the
|
|
6
|
+
* ordered file map handed to the zip assembler. All allocation is
|
|
7
|
+
* deterministic: ids are sequential counters, never random, and no part of
|
|
8
|
+
* the compiler reads the clock.
|
|
9
|
+
*/
|
|
10
|
+
export type RegisteredPart = {
|
|
11
|
+
/** Zip path, e.g. 'word/header1.xml'. */
|
|
12
|
+
name: string;
|
|
13
|
+
/** Content type registered as an Override in [Content_Types].xml. */
|
|
14
|
+
contentType: string;
|
|
15
|
+
/** Relationship from word/document.xml, when the part is document-attached. */
|
|
16
|
+
documentRel?: {
|
|
17
|
+
type: string;
|
|
18
|
+
rId: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare class CompileContext {
|
|
22
|
+
private readonly partsByName;
|
|
23
|
+
private readonly fileContents;
|
|
24
|
+
private nextRid;
|
|
25
|
+
private nextHeaderIndex;
|
|
26
|
+
private nextFooterIndex;
|
|
27
|
+
/** Register a part that needs a content-type Override (content set separately). */
|
|
28
|
+
registerPart(name: string, contentType: string, documentRelType?: string): RegisteredPart;
|
|
29
|
+
allocateRid(): string;
|
|
30
|
+
allocateHeaderPartName(): string;
|
|
31
|
+
allocateFooterPartName(): string;
|
|
32
|
+
setFileContent(name: string, content: string): void;
|
|
33
|
+
registeredParts(): RegisteredPart[];
|
|
34
|
+
documentRelParts(): RegisteredPart[];
|
|
35
|
+
/**
|
|
36
|
+
* Assemble the final zip-file record. [Content_Types].xml is placed first —
|
|
37
|
+
* createZipBuffer preserves insertion order but does not enforce ordering
|
|
38
|
+
* itself, so the contract lives here.
|
|
39
|
+
*/
|
|
40
|
+
toFileRecord(): Record<string, string>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/generation/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,cAAc,GAAG;IAC3B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,WAAW,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7C,CAAC;AAEF,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqC;IACjE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA6B;IAC1D,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,eAAe,CAAK;IAE5B,mFAAmF;IACnF,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,cAAc;IAYzF,WAAW,IAAI,MAAM;IAIrB,sBAAsB,IAAI,MAAM;IAIhC,sBAAsB,IAAI,MAAM;IAIhC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAInD,eAAe,IAAI,cAAc,EAAE;IAInC,gBAAgB,IAAI,cAAc,EAAE;IAIpC;;;;OAIG;IACH,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAYvC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compile-time state shared by the part emitters.
|
|
3
|
+
*
|
|
4
|
+
* The context owns the part registry (part name → content type + optional
|
|
5
|
+
* document-level relationship), the relationship-id allocator, and the
|
|
6
|
+
* ordered file map handed to the zip assembler. All allocation is
|
|
7
|
+
* deterministic: ids are sequential counters, never random, and no part of
|
|
8
|
+
* the compiler reads the clock.
|
|
9
|
+
*/
|
|
10
|
+
export class CompileContext {
|
|
11
|
+
partsByName = new Map();
|
|
12
|
+
fileContents = new Map();
|
|
13
|
+
nextRid = 1;
|
|
14
|
+
nextHeaderIndex = 1;
|
|
15
|
+
nextFooterIndex = 1;
|
|
16
|
+
/** Register a part that needs a content-type Override (content set separately). */
|
|
17
|
+
registerPart(name, contentType, documentRelType) {
|
|
18
|
+
if (this.partsByName.has(name)) {
|
|
19
|
+
return this.partsByName.get(name);
|
|
20
|
+
}
|
|
21
|
+
const part = { name, contentType };
|
|
22
|
+
if (documentRelType) {
|
|
23
|
+
part.documentRel = { type: documentRelType, rId: this.allocateRid() };
|
|
24
|
+
}
|
|
25
|
+
this.partsByName.set(name, part);
|
|
26
|
+
return part;
|
|
27
|
+
}
|
|
28
|
+
allocateRid() {
|
|
29
|
+
return `rId${this.nextRid++}`;
|
|
30
|
+
}
|
|
31
|
+
allocateHeaderPartName() {
|
|
32
|
+
return `word/header${this.nextHeaderIndex++}.xml`;
|
|
33
|
+
}
|
|
34
|
+
allocateFooterPartName() {
|
|
35
|
+
return `word/footer${this.nextFooterIndex++}.xml`;
|
|
36
|
+
}
|
|
37
|
+
setFileContent(name, content) {
|
|
38
|
+
this.fileContents.set(name, content);
|
|
39
|
+
}
|
|
40
|
+
registeredParts() {
|
|
41
|
+
return Array.from(this.partsByName.values());
|
|
42
|
+
}
|
|
43
|
+
documentRelParts() {
|
|
44
|
+
return this.registeredParts().filter((p) => p.documentRel);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Assemble the final zip-file record. [Content_Types].xml is placed first —
|
|
48
|
+
* createZipBuffer preserves insertion order but does not enforce ordering
|
|
49
|
+
* itself, so the contract lives here.
|
|
50
|
+
*/
|
|
51
|
+
toFileRecord() {
|
|
52
|
+
const contentTypes = this.fileContents.get('[Content_Types].xml');
|
|
53
|
+
if (contentTypes === undefined) {
|
|
54
|
+
throw new Error('compile bug: [Content_Types].xml was never emitted');
|
|
55
|
+
}
|
|
56
|
+
const record = { '[Content_Types].xml': contentTypes };
|
|
57
|
+
for (const [name, content] of this.fileContents) {
|
|
58
|
+
if (name === '[Content_Types].xml')
|
|
59
|
+
continue;
|
|
60
|
+
record[name] = content;
|
|
61
|
+
}
|
|
62
|
+
return record;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/generation/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAWH,MAAM,OAAO,cAAc;IACR,WAAW,GAAG,IAAI,GAAG,EAA0B,CAAC;IAChD,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;IAClD,OAAO,GAAG,CAAC,CAAC;IACZ,eAAe,GAAG,CAAC,CAAC;IACpB,eAAe,GAAG,CAAC,CAAC;IAE5B,mFAAmF;IACnF,YAAY,CAAC,IAAY,EAAE,WAAmB,EAAE,eAAwB;QACtE,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC/B,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;QACrC,CAAC;QACD,MAAM,IAAI,GAAmB,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;QACnD,IAAI,eAAe,EAAE,CAAC;YACpB,IAAI,CAAC,WAAW,GAAG,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACxE,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI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xml plus the Word-extension
|
|
3
|
+
* ancillary parts word/commentsExtended.xml and word/people.xml.
|
|
4
|
+
*
|
|
5
|
+
* All three are always emitted together when notes are enabled. The
|
|
6
|
+
* ancillary pair is deliberately on by default: plain comments.xml loads in
|
|
7
|
+
* every reader we test, but Word 2013+ writes the trio and its own comment
|
|
8
|
+
* UI degrades (no resolve state, no people presence) without them. Content
|
|
9
|
+
* and relationship types match what Word itself writes — verified against
|
|
10
|
+
* the Open XML SDK's WordprocessingCommentsExPart/WordprocessingPeoplePart
|
|
11
|
+
* constants (the `application/vnd.ms-word.commentsExtended+xml` variant
|
|
12
|
+
* found in some third-party packages is NOT what Word emits). They also
|
|
13
|
+
* match the editing path in primitives/comments.ts, so a generated document
|
|
14
|
+
* is indistinguishable from an edited one to the comment APIs.
|
|
15
|
+
*
|
|
16
|
+
* Determinism: comment ids are allocated in document order by the
|
|
17
|
+
* DraftingNoteCollector; w14:paraId values derive from those ids; dates come
|
|
18
|
+
* only from DraftingNoteSpec.dateIso (falling back to meta.createdIso);
|
|
19
|
+
* authors fall back note.author → meta.author → 'safe-docx'. No clock, no
|
|
20
|
+
* randomness — identical specs produce byte-identical comment parts.
|
|
21
|
+
*
|
|
22
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.13.4.6
|
|
23
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.13.4.2
|
|
24
|
+
*/
|
|
25
|
+
import type { CompileContext } from '../context.js';
|
|
26
|
+
import type { DocumentSpec } from '../types.js';
|
|
27
|
+
import type { DraftingNoteCollector } from './emit-context.js';
|
|
28
|
+
export declare const COMMENTS_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml";
|
|
29
|
+
export declare const COMMENTS_REL_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
|
|
30
|
+
export declare const COMMENTS_EXTENDED_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml";
|
|
31
|
+
export declare const COMMENTS_EXTENDED_REL_TYPE = "http://schemas.microsoft.com/office/2011/relationships/commentsExtended";
|
|
32
|
+
export declare const PEOPLE_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.people+xml";
|
|
33
|
+
export declare const PEOPLE_REL_TYPE = "http://schemas.microsoft.com/office/2011/relationships/people";
|
|
34
|
+
/** Emit the comment trio from the notes collected during body emission. */
|
|
35
|
+
export declare function emitCommentsPartsIfNeeded(spec: DocumentSpec, ctx: CompileContext, collector: DraftingNoteCollector): void;
|
|
36
|
+
//# sourceMappingURL=comments-part.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comments-part.d.ts","sourceRoot":"","sources":["../../../src/generation/emit/comments-part.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,eAAO,MAAM,qBAAqB,gFAAgF,CAAC;AACnH,eAAO,MAAM,iBAAiB,iFAAiF,CAAC;AAChH,eAAO,MAAM,8BAA8B,wFAC4C,CAAC;AACxF,eAAO,MAAM,0BAA0B,4EAA4E,CAAC;AACpH,eAAO,MAAM,mBAAmB,8EAA8E,CAAC;AAC/G,eAAO,MAAM,eAAe,kEAAkE,CAAC;AAyB/F,2EAA2E;AAC3E,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,cAAc,EACnB,SAAS,EAAE,qBAAqB,GAC/B,IAAI,CAUN"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drafting-note comment parts: word/comments.xml plus the Word-extension
|
|
3
|
+
* ancillary parts word/commentsExtended.xml and word/people.xml.
|
|
4
|
+
*
|
|
5
|
+
* All three are always emitted together when notes are enabled. The
|
|
6
|
+
* ancillary pair is deliberately on by default: plain comments.xml loads in
|
|
7
|
+
* every reader we test, but Word 2013+ writes the trio and its own comment
|
|
8
|
+
* UI degrades (no resolve state, no people presence) without them. Content
|
|
9
|
+
* and relationship types match what Word itself writes — verified against
|
|
10
|
+
* the Open XML SDK's WordprocessingCommentsExPart/WordprocessingPeoplePart
|
|
11
|
+
* constants (the `application/vnd.ms-word.commentsExtended+xml` variant
|
|
12
|
+
* found in some third-party packages is NOT what Word emits). They also
|
|
13
|
+
* match the editing path in primitives/comments.ts, so a generated document
|
|
14
|
+
* is indistinguishable from an edited one to the comment APIs.
|
|
15
|
+
*
|
|
16
|
+
* Determinism: comment ids are allocated in document order by the
|
|
17
|
+
* DraftingNoteCollector; w14:paraId values derive from those ids; dates come
|
|
18
|
+
* only from DraftingNoteSpec.dateIso (falling back to meta.createdIso);
|
|
19
|
+
* authors fall back note.author → meta.author → 'safe-docx'. No clock, no
|
|
20
|
+
* randomness — identical specs produce byte-identical comment parts.
|
|
21
|
+
*
|
|
22
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.13.4.6
|
|
23
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.13.4.2
|
|
24
|
+
*/
|
|
25
|
+
import { createWmlElement, createWmlTextElement } from '../../primitives/dom-helpers.js';
|
|
26
|
+
import { OOXML, W } from '../../primitives/namespaces.js';
|
|
27
|
+
import { parseXml, serializeXml, XML_DECL } from '../../primitives/xml.js';
|
|
28
|
+
export const COMMENTS_CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml';
|
|
29
|
+
export const COMMENTS_REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments';
|
|
30
|
+
export const COMMENTS_EXTENDED_CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml';
|
|
31
|
+
export const COMMENTS_EXTENDED_REL_TYPE = 'http://schemas.microsoft.com/office/2011/relationships/commentsExtended';
|
|
32
|
+
export const PEOPLE_CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.wordprocessingml.people+xml';
|
|
33
|
+
export const PEOPLE_REL_TYPE = 'http://schemas.microsoft.com/office/2011/relationships/people';
|
|
34
|
+
const COMMENTS_SKELETON = `<w:comments xmlns:w="${OOXML.W_NS}" xmlns:w14="${OOXML.W14_NS}"/>`;
|
|
35
|
+
const DEFAULT_AUTHOR = 'safe-docx';
|
|
36
|
+
/** Deterministic w14:paraId for a comment id: zero-padded uppercase hex. */
|
|
37
|
+
function paraIdFor(id) {
|
|
38
|
+
return id.toString(16).toUpperCase().padStart(8, '0');
|
|
39
|
+
}
|
|
40
|
+
function authorFor(spec, note) {
|
|
41
|
+
return note.author ?? spec.meta?.author ?? DEFAULT_AUTHOR;
|
|
42
|
+
}
|
|
43
|
+
/** Up-to-three-letter initials from the author's words, deterministic. */
|
|
44
|
+
function initialsFor(author) {
|
|
45
|
+
const letters = author
|
|
46
|
+
.split(/\s+/)
|
|
47
|
+
.map((word) => word.replace(/[^\p{L}\p{N}]/gu, '').charAt(0))
|
|
48
|
+
.filter((c) => c.length > 0);
|
|
49
|
+
const initials = letters.slice(0, 3).join('').toUpperCase();
|
|
50
|
+
return initials.length > 0 ? initials : 'SD';
|
|
51
|
+
}
|
|
52
|
+
/** Emit the comment trio from the notes collected during body emission. */
|
|
53
|
+
export function emitCommentsPartsIfNeeded(spec, ctx, collector) {
|
|
54
|
+
if (collector.collected.length === 0)
|
|
55
|
+
return;
|
|
56
|
+
ctx.registerPart('word/comments.xml', COMMENTS_CONTENT_TYPE, COMMENTS_REL_TYPE);
|
|
57
|
+
ctx.registerPart('word/commentsExtended.xml', COMMENTS_EXTENDED_CONTENT_TYPE, COMMENTS_EXTENDED_REL_TYPE);
|
|
58
|
+
ctx.registerPart('word/people.xml', PEOPLE_CONTENT_TYPE, PEOPLE_REL_TYPE);
|
|
59
|
+
ctx.setFileContent('word/comments.xml', emitCommentsXml(spec, collector));
|
|
60
|
+
ctx.setFileContent('word/commentsExtended.xml', emitCommentsExtendedXml(collector));
|
|
61
|
+
ctx.setFileContent('word/people.xml', emitPeopleXml(spec, collector));
|
|
62
|
+
}
|
|
63
|
+
function emitCommentsXml(spec, collector) {
|
|
64
|
+
const doc = parseXml(COMMENTS_SKELETON);
|
|
65
|
+
const root = doc.documentElement;
|
|
66
|
+
for (const { id, note } of collector.collected) {
|
|
67
|
+
const attrs = {
|
|
68
|
+
'w:id': String(id),
|
|
69
|
+
'w:author': authorFor(spec, note),
|
|
70
|
+
'w:initials': initialsFor(authorFor(spec, note)),
|
|
71
|
+
};
|
|
72
|
+
const dateIso = note.dateIso ?? spec.meta?.createdIso;
|
|
73
|
+
if (dateIso !== undefined)
|
|
74
|
+
attrs['w:date'] = dateIso;
|
|
75
|
+
const comment = createWmlElement(doc, W.comment, attrs);
|
|
76
|
+
const p = createWmlElement(doc, W.p);
|
|
77
|
+
p.setAttributeNS(OOXML.W14_NS, 'w14:paraId', paraIdFor(id));
|
|
78
|
+
const run = createWmlElement(doc, W.r);
|
|
79
|
+
run.appendChild(createWmlTextElement(doc, note.text));
|
|
80
|
+
p.appendChild(run);
|
|
81
|
+
comment.appendChild(p);
|
|
82
|
+
root.appendChild(comment);
|
|
83
|
+
}
|
|
84
|
+
return XML_DECL + serializeXml(doc);
|
|
85
|
+
}
|
|
86
|
+
function emitCommentsExtendedXml(collector) {
|
|
87
|
+
const doc = parseXml(`<w15:commentsEx xmlns:w15="${OOXML.W15_NS}"/>`);
|
|
88
|
+
const root = doc.documentElement;
|
|
89
|
+
for (const { id } of collector.collected) {
|
|
90
|
+
const commentEx = doc.createElementNS(OOXML.W15_NS, 'w15:commentEx');
|
|
91
|
+
commentEx.setAttributeNS(OOXML.W15_NS, 'w15:paraId', paraIdFor(id));
|
|
92
|
+
commentEx.setAttributeNS(OOXML.W15_NS, 'w15:done', '0');
|
|
93
|
+
root.appendChild(commentEx);
|
|
94
|
+
}
|
|
95
|
+
return XML_DECL + serializeXml(doc);
|
|
96
|
+
}
|
|
97
|
+
function emitPeopleXml(spec, collector) {
|
|
98
|
+
const doc = parseXml(`<w15:people xmlns:w15="${OOXML.W15_NS}"/>`);
|
|
99
|
+
const root = doc.documentElement;
|
|
100
|
+
const seen = new Set();
|
|
101
|
+
for (const { note } of collector.collected) {
|
|
102
|
+
const author = authorFor(spec, note);
|
|
103
|
+
if (seen.has(author))
|
|
104
|
+
continue;
|
|
105
|
+
seen.add(author);
|
|
106
|
+
const person = doc.createElementNS(OOXML.W15_NS, 'w15:person');
|
|
107
|
+
person.setAttributeNS(OOXML.W15_NS, 'w15:author', author);
|
|
108
|
+
const presence = doc.createElementNS(OOXML.W15_NS, 'w15:presenceInfo');
|
|
109
|
+
presence.setAttributeNS(OOXML.W15_NS, 'w15:providerId', 'None');
|
|
110
|
+
presence.setAttributeNS(OOXML.W15_NS, 'w15:userId', author);
|
|
111
|
+
person.appendChild(presence);
|
|
112
|
+
root.appendChild(person);
|
|
113
|
+
}
|
|
114
|
+
return XML_DECL + serializeXml(doc);
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=comments-part.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comments-part.js","sourceRoot":"","sources":["../../../src/generation/emit/comments-part.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAK3E,MAAM,CAAC,MAAM,qBAAqB,GAAG,6EAA6E,CAAC;AACnH,MAAM,CAAC,MAAM,iBAAiB,GAAG,8EAA8E,CAAC;AAChH,MAAM,CAAC,MAAM,8BAA8B,GACzC,qFAAqF,CAAC;AACxF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.
|
|
3
|
+
*
|
|
4
|
+
* Builds the main document part from a namespace-declaring skeleton: the
|
|
5
|
+
* skeleton string carries every namespace the part uses on the root element,
|
|
6
|
+
* and all children are created through the namespace-safe DOM helpers.
|
|
7
|
+
* xmldom's serializer omits the XML declaration, so it is prepended here;
|
|
8
|
+
* the structural validator asserts every part starts with one.
|
|
9
|
+
*/
|
|
10
|
+
import type { DocumentSpec } from '../types.js';
|
|
11
|
+
import type { BlockEmitContext } from './emit-context.js';
|
|
12
|
+
import { type SectionHeaderFooterRefs } from './section.js';
|
|
13
|
+
/**
|
|
14
|
+
* Compile the body: each section's blocks in order. Every non-final section
|
|
15
|
+
* ends with a dedicated break paragraph whose pPr contains only that
|
|
16
|
+
* section's sectPr (what Word itself emits on Insert → Section Break; it
|
|
17
|
+
* also sidesteps the trailing-table case), and the final section's
|
|
18
|
+
* properties bind as the body's last child.
|
|
19
|
+
*
|
|
20
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.6.18
|
|
21
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.6.17
|
|
22
|
+
*/
|
|
23
|
+
export declare function emitDocumentPart(spec: DocumentSpec, refs?: SectionHeaderFooterRefs[], ctx?: BlockEmitContext): string;
|
|
24
|
+
//# sourceMappingURL=document-part.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-part.d.ts","sourceRoot":"","sources":["../../../src/generation/emit/document-part.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAe,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAOzE;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,uBAAuB,EAAE,EAAE,GAAG,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAgCrH"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* word/document.xml emitter.
|
|
3
|
+
*
|
|
4
|
+
* Builds the main document part from a namespace-declaring skeleton: the
|
|
5
|
+
* skeleton string carries every namespace the part uses on the root element,
|
|
6
|
+
* and all children are created through the namespace-safe DOM helpers.
|
|
7
|
+
* xmldom's serializer omits the XML declaration, so it is prepended here;
|
|
8
|
+
* the structural validator asserts every part starts with one.
|
|
9
|
+
*/
|
|
10
|
+
import { createWmlElement } from '../../primitives/dom-helpers.js';
|
|
11
|
+
import { OOXML, W } from '../../primitives/namespaces.js';
|
|
12
|
+
import { parseXml, serializeXml, XML_DECL } from '../../primitives/xml.js';
|
|
13
|
+
import { GenerationInternalError } from '../errors.js';
|
|
14
|
+
import { buildSectPr } from './section.js';
|
|
15
|
+
import { buildBlock } from './table.js';
|
|
16
|
+
const DOCUMENT_SKELETON = `<w:document xmlns:w="${OOXML.W_NS}" xmlns:r="${OOXML.R_NS}" xmlns:w14="${OOXML.W14_NS}">` +
|
|
17
|
+
`<w:body/></w:document>`;
|
|
18
|
+
/**
|
|
19
|
+
* Compile the body: each section's blocks in order. Every non-final section
|
|
20
|
+
* ends with a dedicated break paragraph whose pPr contains only that
|
|
21
|
+
* section's sectPr (what Word itself emits on Insert → Section Break; it
|
|
22
|
+
* also sidesteps the trailing-table case), and the final section's
|
|
23
|
+
* properties bind as the body's last child.
|
|
24
|
+
*
|
|
25
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.6.18
|
|
26
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.6.17
|
|
27
|
+
*/
|
|
28
|
+
export function emitDocumentPart(spec, refs, ctx) {
|
|
29
|
+
const doc = parseXml(DOCUMENT_SKELETON);
|
|
30
|
+
const body = doc.getElementsByTagName('w:body').item(0);
|
|
31
|
+
if (!body)
|
|
32
|
+
throw new GenerationInternalError('document skeleton lost its w:body');
|
|
33
|
+
spec.sections.forEach((section, index) => {
|
|
34
|
+
for (const block of section.blocks) {
|
|
35
|
+
body.appendChild(buildBlock(doc, block, ctx));
|
|
36
|
+
}
|
|
37
|
+
const sectPr = buildSectPr(doc, section, refs?.[index]);
|
|
38
|
+
const isFinal = index === spec.sections.length - 1;
|
|
39
|
+
if (isFinal) {
|
|
40
|
+
// The body must not end with a table (readers treat it as truncated);
|
|
41
|
+
// a final trailing table gets a closing empty paragraph before the
|
|
42
|
+
// body-level sectPr binds. Non-final sections already end with their
|
|
43
|
+
// dedicated break paragraph.
|
|
44
|
+
const lastBlock = section.blocks[section.blocks.length - 1];
|
|
45
|
+
if (lastBlock && lastBlock.kind === 'table') {
|
|
46
|
+
body.appendChild(createWmlElement(doc, W.p));
|
|
47
|
+
}
|
|
48
|
+
body.appendChild(sectPr);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
const breakParagraph = createWmlElement(doc, W.p);
|
|
52
|
+
const pPr = createWmlElement(doc, W.pPr);
|
|
53
|
+
pPr.appendChild(sectPr);
|
|
54
|
+
breakParagraph.appendChild(pPr);
|
|
55
|
+
body.appendChild(breakParagraph);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
return XML_DECL + serializeXml(doc);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=document-part.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-part.js","sourceRoot":"","sources":["../../../src/generation/emit/document-part.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAGvD,OAAO,EAAE,WAAW,EAAgC,MAAM,cAAc,C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B,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/C,CAAC;YACD,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,MAAM,cAAc,GAAG,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAClD,MAAM,GAAG,GAAG,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;YACzC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YACxB,cAAc,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YAChC,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QACnC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared state the block emitters thread through paragraph/table recursion.
|
|
3
|
+
*
|
|
4
|
+
* Bundling it in one object keeps emitter signatures stable as features
|
|
5
|
+
* land: numbering binds spec handles to numeric ids, and the drafting-note
|
|
6
|
+
* collector allocates comment ids in document order (absent in stories that
|
|
7
|
+
* cannot carry notes, e.g. headers/footers, and when notes are disabled).
|
|
8
|
+
*/
|
|
9
|
+
import type { DraftingNoteSpec, ThemeColorSlot } from '../types.js';
|
|
10
|
+
/** Spec-level numbering handle → numeric w:numId value. */
|
|
11
|
+
export type NumberingIdMap = ReadonlyMap<string, number>;
|
|
12
|
+
/** Allocates deterministic comment ids and records notes in document order. */
|
|
13
|
+
export declare class DraftingNoteCollector {
|
|
14
|
+
readonly collected: Array<{
|
|
15
|
+
id: number;
|
|
16
|
+
note: DraftingNoteSpec;
|
|
17
|
+
}>;
|
|
18
|
+
private nextId;
|
|
19
|
+
allocate(note: DraftingNoteSpec): number;
|
|
20
|
+
}
|
|
21
|
+
export type BlockEmitContext = {
|
|
22
|
+
numberingIds?: NumberingIdMap;
|
|
23
|
+
/** Present only where drafting notes may anchor (body story, notes enabled). */
|
|
24
|
+
notes?: DraftingNoteCollector;
|
|
25
|
+
/** Merged canonical/custom theme colors used as reader fallback values. */
|
|
26
|
+
themeColorValues?: ReadonlyMap<ThemeColorSlot, string>;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=emit-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emit-context.d.ts","sourceRoot":"","sources":["../../../src/generation/emit/emit-context.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEpE,2DAA2D;AAC3D,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEzD,+EAA+E;AAC/E,qBAAa,qBAAqB;IAChC,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,gBAAgB,CAAA;KAAE,CAAC,CAAM;IACvE,OAAO,CAAC,MAAM,CAAK;IAEnB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM;CAKzC;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,gFAAgF;IAChF,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,WAAW,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;CACxD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared state the block emitters thread through paragraph/table recursion.
|
|
3
|
+
*
|
|
4
|
+
* Bundling it in one object keeps emitter signatures stable as features
|
|
5
|
+
* land: numbering binds spec handles to numeric ids, and the drafting-note
|
|
6
|
+
* collector allocates comment ids in document order (absent in stories that
|
|
7
|
+
* cannot carry notes, e.g. headers/footers, and when notes are disabled).
|
|
8
|
+
*/
|
|
9
|
+
/** Allocates deterministic comment ids and records notes in document order. */
|
|
10
|
+
export class DraftingNoteCollector {
|
|
11
|
+
collected = [];
|
|
12
|
+
nextId = 1;
|
|
13
|
+
allocate(note) {
|
|
14
|
+
const id = this.nextId++;
|
|
15
|
+
this.collected.push({ id, note });
|
|
16
|
+
return id;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=emit-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emit-context.js","sourceRoot":"","sources":["../../../src/generation/emit/emit-context.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,+EAA+E;AAC/E,MAAM,OAAO,qBAAqB;IACvB,SAAS,GAAkD,EAAE,CAAC;IAC/D,MAAM,GAAG,CAAC,CAAC;IAEnB,QAAQ,CAAC,IAAsB;QAC7B,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACzB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QAClC,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* word/fontTable.xml emitter.
|
|
3
|
+
*
|
|
4
|
+
* Emitted on every package. Word-authored documents declare a font table; we
|
|
5
|
+
* enumerate the fonts the spec actually references (the Calibri default plus any
|
|
6
|
+
* font named on a style, run, or numbering level) rather than a fixed stub, so the
|
|
7
|
+
* metadata is faithful — a run set in Georgia produces a Georgia entry. panose1 is
|
|
8
|
+
* omitted because we cannot derive it for an arbitrary font name, and Word tolerates
|
|
9
|
+
* its absence. The walk is pure over the spec, so output stays deterministic.
|
|
10
|
+
*
|
|
11
|
+
* The root is the WordprocessingML `w:fonts` font-table element.
|
|
12
|
+
*/
|
|
13
|
+
import type { CompileContext } from '../context.js';
|
|
14
|
+
import type { DocumentSpec } from '../types.js';
|
|
15
|
+
export declare function emitFontTablePart(spec: DocumentSpec, ctx: CompileContext): void;
|
|
16
|
+
//# sourceMappingURL=font-table-part.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-table-part.d.ts","sourceRoot":"","sources":["../../../src/generation/emit/font-table-part.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAa,YAAY,EAAY,MAAM,aAAa,CAAC;AAUrE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CAa/E"}
|