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
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared property builders: RunProps → w:rPr and paragraph formatting → w:pPr
|
|
3
|
+
* child maps, used by both the body emitters (run.ts / paragraph.ts) and the
|
|
4
|
+
* styles-part emitter so direct formatting and style definitions can never
|
|
5
|
+
* drift apart. All children are routed through the ordering tables.
|
|
6
|
+
*/
|
|
7
|
+
import { createWmlElement } from '../../primitives/dom-helpers.js';
|
|
8
|
+
import { W } from '../../primitives/namespaces.js';
|
|
9
|
+
import { appendInOrder, PPR_ORDER, RPR_ORDER } from '../ordering.js';
|
|
10
|
+
const ALIGNMENT_TO_JC = {
|
|
11
|
+
left: 'left',
|
|
12
|
+
center: 'center',
|
|
13
|
+
right: 'right',
|
|
14
|
+
justify: 'both',
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Build the ordered rPr children for a RunProps value. Returns null when no
|
|
18
|
+
* property is set so callers can omit the rPr container entirely.
|
|
19
|
+
*
|
|
20
|
+
* Complex-script twins (bCs/iCs/szCs) and the full rFonts script coverage
|
|
21
|
+
* (ascii + hAnsi + cs) are always emitted alongside their base properties so
|
|
22
|
+
* all script ranges agree.
|
|
23
|
+
*
|
|
24
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.3.2.28
|
|
25
|
+
*/
|
|
26
|
+
export function buildRunPropsElement(doc, props, opts) {
|
|
27
|
+
const children = new Map();
|
|
28
|
+
if (props.font !== undefined) {
|
|
29
|
+
children.set(W.rFonts, createWmlElement(doc, W.rFonts, {
|
|
30
|
+
'w:ascii': props.font,
|
|
31
|
+
'w:hAnsi': props.font,
|
|
32
|
+
'w:cs': props.font,
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
if (props.bold !== undefined) {
|
|
36
|
+
children.set(W.b, createWmlElement(doc, W.b, props.bold ? undefined : { 'w:val': '0' }));
|
|
37
|
+
children.set(W.bCs, createWmlElement(doc, W.bCs, props.bold ? undefined : { 'w:val': '0' }));
|
|
38
|
+
}
|
|
39
|
+
if (props.italic !== undefined) {
|
|
40
|
+
children.set(W.i, createWmlElement(doc, W.i, props.italic ? undefined : { 'w:val': '0' }));
|
|
41
|
+
children.set(W.iCs, createWmlElement(doc, W.iCs, props.italic ? undefined : { 'w:val': '0' }));
|
|
42
|
+
}
|
|
43
|
+
if (props.caps !== undefined) {
|
|
44
|
+
children.set(W.caps, createWmlElement(doc, W.caps, props.caps ? undefined : { 'w:val': '0' }));
|
|
45
|
+
}
|
|
46
|
+
if (props.smallCaps !== undefined) {
|
|
47
|
+
children.set(W.smallCaps, createWmlElement(doc, W.smallCaps, props.smallCaps ? undefined : { 'w:val': '0' }));
|
|
48
|
+
}
|
|
49
|
+
if (props.colorHex !== undefined || props.themeColor !== undefined) {
|
|
50
|
+
const attrs = {};
|
|
51
|
+
if (props.colorHex !== undefined)
|
|
52
|
+
attrs['w:val'] = props.colorHex;
|
|
53
|
+
if (props.themeColor !== undefined) {
|
|
54
|
+
attrs['w:themeColor'] = props.themeColor;
|
|
55
|
+
const fallback = opts?.themeColorValues?.get(props.themeColor);
|
|
56
|
+
if (fallback !== undefined && attrs['w:val'] === undefined)
|
|
57
|
+
attrs['w:val'] = fallback;
|
|
58
|
+
}
|
|
59
|
+
if (props.themeTint !== undefined)
|
|
60
|
+
attrs['w:themeTint'] = props.themeTint;
|
|
61
|
+
if (props.themeShade !== undefined)
|
|
62
|
+
attrs['w:themeShade'] = props.themeShade;
|
|
63
|
+
children.set(W.color, createWmlElement(doc, W.color, attrs));
|
|
64
|
+
}
|
|
65
|
+
if (props.sizePt !== undefined) {
|
|
66
|
+
const halfPoints = String(Math.round(props.sizePt * 2));
|
|
67
|
+
children.set(W.sz, createWmlElement(doc, W.sz, { 'w:val': halfPoints }));
|
|
68
|
+
children.set(W.szCs, createWmlElement(doc, W.szCs, { 'w:val': halfPoints }));
|
|
69
|
+
}
|
|
70
|
+
if (props.highlight !== undefined) {
|
|
71
|
+
children.set(W.highlight, createWmlElement(doc, W.highlight, { 'w:val': props.highlight }));
|
|
72
|
+
}
|
|
73
|
+
if (props.underline !== undefined) {
|
|
74
|
+
children.set(W.u, createWmlElement(doc, W.u, { 'w:val': props.underline }));
|
|
75
|
+
}
|
|
76
|
+
if (children.size === 0)
|
|
77
|
+
return null;
|
|
78
|
+
const rPr = createWmlElement(doc, W.rPr);
|
|
79
|
+
appendInOrder(rPr, children, RPR_ORDER);
|
|
80
|
+
return rPr;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Build the ordered pPr children for a paragraph-formatting subset. Returns
|
|
84
|
+
* null when nothing is set. The optional extras hook lets phase-specific
|
|
85
|
+
* callers add already-built children (e.g. a section break sectPr) that
|
|
86
|
+
* still go through the same ordering discipline.
|
|
87
|
+
*
|
|
88
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.3.1.26
|
|
89
|
+
*/
|
|
90
|
+
export function buildParagraphPropsElement(doc, props, extras) {
|
|
91
|
+
const children = new Map();
|
|
92
|
+
if (props.styleId !== undefined) {
|
|
93
|
+
children.set(W.pStyle, createWmlElement(doc, W.pStyle, { 'w:val': props.styleId }));
|
|
94
|
+
}
|
|
95
|
+
if (props.keepNext) {
|
|
96
|
+
children.set(W.keepNext, createWmlElement(doc, W.keepNext));
|
|
97
|
+
}
|
|
98
|
+
if (props.keepLines) {
|
|
99
|
+
children.set(W.keepLines, createWmlElement(doc, W.keepLines));
|
|
100
|
+
}
|
|
101
|
+
if (props.pageBreakBefore) {
|
|
102
|
+
children.set(W.pageBreakBefore, createWmlElement(doc, W.pageBreakBefore));
|
|
103
|
+
}
|
|
104
|
+
if (props.tabs && props.tabs.length > 0) {
|
|
105
|
+
const tabs = createWmlElement(doc, W.tabs);
|
|
106
|
+
for (const stop of props.tabs) {
|
|
107
|
+
const attrs = { 'w:val': stop.align, 'w:pos': String(stop.posTwips) };
|
|
108
|
+
if (stop.leader && stop.leader !== 'none')
|
|
109
|
+
attrs['w:leader'] = stop.leader;
|
|
110
|
+
tabs.appendChild(createWmlElement(doc, W.tab, attrs));
|
|
111
|
+
}
|
|
112
|
+
children.set(W.tabs, tabs);
|
|
113
|
+
}
|
|
114
|
+
if (props.spacing) {
|
|
115
|
+
const attrs = {};
|
|
116
|
+
if (props.spacing.beforeTwips !== undefined)
|
|
117
|
+
attrs['w:before'] = String(props.spacing.beforeTwips);
|
|
118
|
+
if (props.spacing.afterTwips !== undefined)
|
|
119
|
+
attrs['w:after'] = String(props.spacing.afterTwips);
|
|
120
|
+
if (props.spacing.lineTwips !== undefined) {
|
|
121
|
+
attrs['w:line'] = String(props.spacing.lineTwips);
|
|
122
|
+
attrs['w:lineRule'] = props.spacing.lineRule ?? 'auto';
|
|
123
|
+
}
|
|
124
|
+
if (Object.keys(attrs).length > 0)
|
|
125
|
+
children.set(W.spacing, createWmlElement(doc, W.spacing, attrs));
|
|
126
|
+
}
|
|
127
|
+
if (props.indent) {
|
|
128
|
+
const attrs = {};
|
|
129
|
+
if (props.indent.leftTwips !== undefined)
|
|
130
|
+
attrs['w:left'] = String(props.indent.leftTwips);
|
|
131
|
+
if (props.indent.rightTwips !== undefined)
|
|
132
|
+
attrs['w:right'] = String(props.indent.rightTwips);
|
|
133
|
+
if (props.indent.firstLineTwips !== undefined)
|
|
134
|
+
attrs['w:firstLine'] = String(props.indent.firstLineTwips);
|
|
135
|
+
if (props.indent.hangingTwips !== undefined)
|
|
136
|
+
attrs['w:hanging'] = String(props.indent.hangingTwips);
|
|
137
|
+
if (Object.keys(attrs).length > 0)
|
|
138
|
+
children.set(W.ind, createWmlElement(doc, W.ind, attrs));
|
|
139
|
+
}
|
|
140
|
+
if (props.alignment !== undefined) {
|
|
141
|
+
children.set(W.jc, createWmlElement(doc, W.jc, { 'w:val': ALIGNMENT_TO_JC[props.alignment] }));
|
|
142
|
+
}
|
|
143
|
+
if (extras) {
|
|
144
|
+
for (const [name, value] of extras)
|
|
145
|
+
children.set(name, value);
|
|
146
|
+
}
|
|
147
|
+
if (children.size === 0)
|
|
148
|
+
return null;
|
|
149
|
+
const pPr = createWmlElement(doc, W.pPr);
|
|
150
|
+
appendInOrder(pPr, children, PPR_ORDER);
|
|
151
|
+
return pPr;
|
|
152
|
+
}
|
|
153
|
+
/** Paragraph-formatting subset of a StyleSpec, normalized for the builder. */
|
|
154
|
+
export function styleParagraphProps(style) {
|
|
155
|
+
return { ...style.paragraph };
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../src/generation/emit/properties.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,CAAC,EAAE,MAAM,gCAAgC,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AASrE,MAAM,eAAe,GAA6D;IAChF,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,MAAM;CAChB,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAClC,GAAa,EACb,KAAe,EACf,IAAiE;IAEjE,MAAM,QAAQ,GAAG,IAAI,GAAG,EAA+B,CAAC;IAExD,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC7B,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;YACrD,SAAS,EAAE,KAAK,CAAC,IAAI;YACrB,SAAS,EAAE,KAAK,CAAC,IAAI;YACrB,MAAM,EAAE,KAAK,CAAC,IAAI;SACnB,CAAC,CAAC,CAAC;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AQ,CAAC,IAAI,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,MAAM,GAAG,GAAG,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;IACzC,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IACxC,OAAO,GAAG,CAAC;AACb,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,mBAAmB,CAAC,KAAgB;IAClD,OAAO,EAAE,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline-run emitter.
|
|
3
|
+
*
|
|
4
|
+
* Shipped: text runs with full RunProps formatting, tab and break runs, and
|
|
5
|
+
* complete five-part complex fields. A FieldSpec compiles to
|
|
6
|
+
* begin → instruction text → separate → cached result → end so reading
|
|
7
|
+
* applications always display a value without recomputation prompts — the
|
|
8
|
+
* required `cachedResult` makes the no-recovery-dialog property
|
|
9
|
+
* unrepresentable-by-omission. `w:dirty` is never set (it triggers
|
|
10
|
+
* update-fields prompts in some readers).
|
|
11
|
+
*/
|
|
12
|
+
import type { InlineSpec } from '../types.js';
|
|
13
|
+
import type { BlockEmitContext } from './emit-context.js';
|
|
14
|
+
/** Build the w:r element(s) for one inline spec node. */
|
|
15
|
+
export declare function buildInlineRuns(doc: Document, inline: InlineSpec, ctx?: BlockEmitContext): Element[];
|
|
16
|
+
//# sourceMappingURL=run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/generation/emit/run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAa,UAAU,EAAY,MAAM,aAAa,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAqC1D,yDAAyD;AACzD,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,gBAAgB,GAAG,OAAO,EAAE,CAsBpG"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline-run emitter.
|
|
3
|
+
*
|
|
4
|
+
* Shipped: text runs with full RunProps formatting, tab and break runs, and
|
|
5
|
+
* complete five-part complex fields. A FieldSpec compiles to
|
|
6
|
+
* begin → instruction text → separate → cached result → end so reading
|
|
7
|
+
* applications always display a value without recomputation prompts — the
|
|
8
|
+
* required `cachedResult` makes the no-recovery-dialog property
|
|
9
|
+
* unrepresentable-by-omission. `w:dirty` is never set (it triggers
|
|
10
|
+
* update-fields prompts in some readers).
|
|
11
|
+
*/
|
|
12
|
+
import { createWmlElement, createWmlTextElement } from '../../primitives/dom-helpers.js';
|
|
13
|
+
import { W } from '../../primitives/namespaces.js';
|
|
14
|
+
import { GenerationInternalError } from '../errors.js';
|
|
15
|
+
import { buildRunPropsElement } from './properties.js';
|
|
16
|
+
/** Instruction text per field, with the canonical surrounding spaces. */
|
|
17
|
+
const FIELD_INSTRUCTION_TEXT = {
|
|
18
|
+
PAGE: ' PAGE ',
|
|
19
|
+
NUMPAGES: ' NUMPAGES ',
|
|
20
|
+
};
|
|
21
|
+
function makeRun(doc, props, ctx, ...children) {
|
|
22
|
+
const run = createWmlElement(doc, W.r);
|
|
23
|
+
const rPr = buildRunPropsElement(doc, props, { themeColorValues: ctx?.themeColorValues });
|
|
24
|
+
if (rPr)
|
|
25
|
+
run.appendChild(rPr);
|
|
26
|
+
for (const child of children)
|
|
27
|
+
run.appendChild(child);
|
|
28
|
+
return run;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Five sibling runs per field: fldChar begin, preserved-space instruction
|
|
32
|
+
* text, fldChar separate, the cached result, fldChar end.
|
|
33
|
+
*
|
|
34
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.16.18
|
|
35
|
+
*/
|
|
36
|
+
function buildFieldRuns(doc, field, ctx) {
|
|
37
|
+
const instr = createWmlElement(doc, W.instrText);
|
|
38
|
+
instr.setAttribute('xml:space', 'preserve');
|
|
39
|
+
instr.appendChild(doc.createTextNode(FIELD_INSTRUCTION_TEXT[field.field]));
|
|
40
|
+
return [
|
|
41
|
+
makeRun(doc, field, ctx, createWmlElement(doc, W.fldChar, { 'w:fldCharType': 'begin' })),
|
|
42
|
+
makeRun(doc, field, ctx, instr),
|
|
43
|
+
makeRun(doc, field, ctx, createWmlElement(doc, W.fldChar, { 'w:fldCharType': 'separate' })),
|
|
44
|
+
makeRun(doc, field, ctx, createWmlTextElement(doc, field.cachedResult)),
|
|
45
|
+
makeRun(doc, field, ctx, createWmlElement(doc, W.fldChar, { 'w:fldCharType': 'end' })),
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
/** Build the w:r element(s) for one inline spec node. */
|
|
49
|
+
export function buildInlineRuns(doc, inline, ctx) {
|
|
50
|
+
switch (inline.kind) {
|
|
51
|
+
case 'text': {
|
|
52
|
+
const run = createWmlElement(doc, W.r);
|
|
53
|
+
const rPr = buildRunPropsElement(doc, inline, { themeColorValues: ctx?.themeColorValues });
|
|
54
|
+
if (rPr)
|
|
55
|
+
run.appendChild(rPr);
|
|
56
|
+
run.appendChild(createWmlTextElement(doc, inline.text));
|
|
57
|
+
return [run];
|
|
58
|
+
}
|
|
59
|
+
case 'field':
|
|
60
|
+
return buildFieldRuns(doc, inline, ctx);
|
|
61
|
+
case 'tab':
|
|
62
|
+
return [makeRun(doc, {}, ctx, createWmlElement(doc, W.tab))];
|
|
63
|
+
case 'break': {
|
|
64
|
+
const attrs = inline.breakType === 'page' ? { 'w:type': 'page' } : undefined;
|
|
65
|
+
return [makeRun(doc, {}, ctx, createWmlElement(doc, W.br, attrs))];
|
|
66
|
+
}
|
|
67
|
+
default:
|
|
68
|
+
throw new GenerationInternalError(`Inline kind '${inline.kind}' reached the run emitter without a shipped emitter`);
|
|
69
|
+
}
|
|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xD,OAAO,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;QACD,KAAK,OAAO;YACV,OAAO,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;QAC1C,KAAK,KAAK;YACR,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC/D,KAAK,OAAO,CAAC,CAAC,CAAC;YACb,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YAC7E,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QACrE,CAAC;QACD;YACE,MAAM,IAAI,uBAAuB,CAC/B,gBAAiB,MAA2B,CAAC,IAAI,qDAAqD,CACvG,CAAC;IACN,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section-properties emitter.
|
|
3
|
+
*
|
|
4
|
+
* Shipped: page size/margins, page numbering, section break type, title-page
|
|
5
|
+
* switch, and header/footer references. The reference rIds come from the
|
|
6
|
+
* header/footer part allocation pass (emit/header-footer-part.ts), which runs
|
|
7
|
+
* before the document part so the sectPr can bind them.
|
|
8
|
+
*/
|
|
9
|
+
import type { SectionSpec } from '../types.js';
|
|
10
|
+
/** Header/footer part references for one section, allocated by the parts pass. */
|
|
11
|
+
export type SectionHeaderFooterRefs = {
|
|
12
|
+
headers: Partial<Record<'default' | 'first' | 'even', string>>;
|
|
13
|
+
footers: Partial<Record<'default' | 'first' | 'even', string>>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Build the w:sectPr element for a section.
|
|
17
|
+
*
|
|
18
|
+
* Width/height are always emitted explicitly (never reader defaults); a
|
|
19
|
+
* landscape request swaps the dimensions and sets w:orient. Header/footer
|
|
20
|
+
* references lead the child sequence; w:titlePg is implied whenever a
|
|
21
|
+
* first-page header or footer is present.
|
|
22
|
+
*
|
|
23
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.6.13
|
|
24
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.6.12
|
|
25
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.10.6
|
|
26
|
+
*/
|
|
27
|
+
export declare function buildSectPr(doc: Document, section: SectionSpec, refs?: SectionHeaderFooterRefs): Element;
|
|
28
|
+
export declare function titlePgImplied(section: SectionSpec): boolean;
|
|
29
|
+
//# sourceMappingURL=section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../../src/generation/emit/section.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAgB/C,kFAAkF;AAClF,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,OAAO,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/D,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,OAAO,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAChE,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,uBAAuB,GAAG,OAAO,CA4BxG;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAE5D"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Section-properties emitter.
|
|
3
|
+
*
|
|
4
|
+
* Shipped: page size/margins, page numbering, section break type, title-page
|
|
5
|
+
* switch, and header/footer references. The reference rIds come from the
|
|
6
|
+
* header/footer part allocation pass (emit/header-footer-part.ts), which runs
|
|
7
|
+
* before the document part so the sectPr can bind them.
|
|
8
|
+
*/
|
|
9
|
+
import { createWmlElement } from '../../primitives/dom-helpers.js';
|
|
10
|
+
import { OOXML, W } from '../../primitives/namespaces.js';
|
|
11
|
+
import { appendInOrder, SECTPR_ORDER } from '../ordering.js';
|
|
12
|
+
/** US Letter, in twentieths of a point. */
|
|
13
|
+
const DEFAULT_PAGE = { w: 12240, h: 15840 };
|
|
14
|
+
/** One-inch page margins, half-inch header/footer offsets, no gutter. */
|
|
15
|
+
const DEFAULT_MARGINS = {
|
|
16
|
+
top: 1440,
|
|
17
|
+
right: 1440,
|
|
18
|
+
bottom: 1440,
|
|
19
|
+
left: 1440,
|
|
20
|
+
header: 720,
|
|
21
|
+
footer: 720,
|
|
22
|
+
gutter: 0,
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Build the w:sectPr element for a section.
|
|
26
|
+
*
|
|
27
|
+
* Width/height are always emitted explicitly (never reader defaults); a
|
|
28
|
+
* landscape request swaps the dimensions and sets w:orient. Header/footer
|
|
29
|
+
* references lead the child sequence; w:titlePg is implied whenever a
|
|
30
|
+
* first-page header or footer is present.
|
|
31
|
+
*
|
|
32
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.6.13
|
|
33
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.6.12
|
|
34
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.10.6
|
|
35
|
+
*/
|
|
36
|
+
export function buildSectPr(doc, section, refs) {
|
|
37
|
+
const sectPr = createWmlElement(doc, W.sectPr);
|
|
38
|
+
const props = new Map();
|
|
39
|
+
if (refs) {
|
|
40
|
+
const headerRefs = buildReferences(doc, W.headerReference, refs.headers);
|
|
41
|
+
const footerRefs = buildReferences(doc, W.footerReference, refs.footers);
|
|
42
|
+
if (headerRefs.length > 0)
|
|
43
|
+
props.set(W.headerReference, headerRefs);
|
|
44
|
+
if (footerRefs.length > 0)
|
|
45
|
+
props.set(W.footerReference, footerRefs);
|
|
46
|
+
}
|
|
47
|
+
if (section.breakType !== undefined) {
|
|
48
|
+
props.set(W.type, createWmlElement(doc, W.type, { 'w:val': section.breakType }));
|
|
49
|
+
}
|
|
50
|
+
props.set(W.pgSz, buildPgSz(doc, section));
|
|
51
|
+
props.set(W.pgMar, buildPgMar(doc, section));
|
|
52
|
+
if (section.pageNumbering) {
|
|
53
|
+
const attrs = {};
|
|
54
|
+
if (section.pageNumbering.start !== undefined)
|
|
55
|
+
attrs['w:start'] = String(section.pageNumbering.start);
|
|
56
|
+
if (section.pageNumbering.format !== undefined)
|
|
57
|
+
attrs['w:fmt'] = section.pageNumbering.format;
|
|
58
|
+
props.set(W.pgNumType, createWmlElement(doc, W.pgNumType, attrs));
|
|
59
|
+
}
|
|
60
|
+
if (titlePgImplied(section)) {
|
|
61
|
+
props.set(W.titlePg, createWmlElement(doc, W.titlePg));
|
|
62
|
+
}
|
|
63
|
+
appendInOrder(sectPr, props, SECTPR_ORDER);
|
|
64
|
+
return sectPr;
|
|
65
|
+
}
|
|
66
|
+
export function titlePgImplied(section) {
|
|
67
|
+
return Boolean(section.titlePg || section.headers?.first || section.footers?.first);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* One reference element per declared header/footer slot, in a fixed
|
|
71
|
+
* first/default/even emission order so output is deterministic.
|
|
72
|
+
*
|
|
73
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.10.5
|
|
74
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.10.2
|
|
75
|
+
*/
|
|
76
|
+
function buildReferences(doc, localName, slots) {
|
|
77
|
+
const out = [];
|
|
78
|
+
for (const type of ['first', 'default', 'even']) {
|
|
79
|
+
const rId = slots[type];
|
|
80
|
+
if (!rId)
|
|
81
|
+
continue;
|
|
82
|
+
const el = createWmlElement(doc, localName, { 'w:type': type });
|
|
83
|
+
el.setAttributeNS(OOXML.R_NS, 'r:id', rId);
|
|
84
|
+
out.push(el);
|
|
85
|
+
}
|
|
86
|
+
return out;
|
|
87
|
+
}
|
|
88
|
+
function buildPgSz(doc, section) {
|
|
89
|
+
const requested = section.page?.sizeTwips ?? DEFAULT_PAGE;
|
|
90
|
+
const landscape = section.page?.orientation === 'landscape';
|
|
91
|
+
const w = landscape ? Math.max(requested.w, requested.h) : requested.w;
|
|
92
|
+
const h = landscape ? Math.min(requested.w, requested.h) : requested.h;
|
|
93
|
+
const attrs = { 'w:w': String(w), 'w:h': String(h) };
|
|
94
|
+
if (landscape)
|
|
95
|
+
attrs['w:orient'] = 'landscape';
|
|
96
|
+
return createWmlElement(doc, W.pgSz, attrs);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The full attribute set (top/right/bottom/left/header/footer/gutter) is
|
|
100
|
+
* always emitted because readers diverge in their defaults when attributes
|
|
101
|
+
* are omitted.
|
|
102
|
+
*
|
|
103
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.6.11
|
|
104
|
+
*/
|
|
105
|
+
function buildPgMar(doc, section) {
|
|
106
|
+
const margins = { ...DEFAULT_MARGINS, ...section.page?.marginsTwips };
|
|
107
|
+
return createWmlElement(doc, W.pgMar, {
|
|
108
|
+
'w:top': String(margins.top),
|
|
109
|
+
'w:right': String(margins.right),
|
|
110
|
+
'w:bottom': String(margins.bottom),
|
|
111
|
+
'w:left': String(margins.left),
|
|
112
|
+
'w:header': String(margins.header),
|
|
113
|
+
'w:footer': String(margins.footer),
|
|
114
|
+
'w:gutter': String(margins.gutter),
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section.js","sourceRoot":"","sources":["../../../src/generation/emit/section.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAA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AE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7E,IAAI,SAAS;QAAE,KAAK,CAAC,UAAU,CAAC,GAAG,WAAW,CAAC;IAC/C,OAAO,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,GAAa,EAAE,OAAoB;IACrD,MAAM,OAAO,GAAG,EAAE,GAAG,eAAe,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC;IACtE,OAAO,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,EAAE;QACpC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;QAC5B,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QAChC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;QAClC,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;QAC9B,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;QAClC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;QAClC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;KACnC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* word/settings.xml emitter.
|
|
3
|
+
*
|
|
4
|
+
* Only emitted when the document actually needs a setting: `w:evenAndOddHeaders`
|
|
5
|
+
* for any section declaring an even-page header or footer, or
|
|
6
|
+
* `w:clrSchemeMapping` when theme-relative authoring or a custom theme is used.
|
|
7
|
+
*
|
|
8
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.10.1
|
|
9
|
+
*/
|
|
10
|
+
import type { CompileContext } from '../context.js';
|
|
11
|
+
import type { DocumentSpec } from '../types.js';
|
|
12
|
+
export declare function emitSettingsPartIfNeeded(spec: DocumentSpec, ctx: CompileContext): void;
|
|
13
|
+
//# sourceMappingURL=settings-part.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-part.d.ts","sourceRoot":"","sources":["../../../src/generation/emit/settings-part.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAa,YAAY,EAA6B,MAAM,aAAa,CAAC;AAKtF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CA6BtF"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* word/settings.xml emitter.
|
|
3
|
+
*
|
|
4
|
+
* Only emitted when the document actually needs a setting: `w:evenAndOddHeaders`
|
|
5
|
+
* for any section declaring an even-page header or footer, or
|
|
6
|
+
* `w:clrSchemeMapping` when theme-relative authoring or a custom theme is used.
|
|
7
|
+
*
|
|
8
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.10.1
|
|
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
|
+
const SETTINGS_CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml';
|
|
14
|
+
const SETTINGS_REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings';
|
|
15
|
+
export function emitSettingsPartIfNeeded(spec, ctx) {
|
|
16
|
+
const needsEvenOdd = spec.sections.some((s) => s.headers?.even || s.footers?.even);
|
|
17
|
+
const needsColorSchemeMapping = spec.theme !== undefined || usesThemeRelativeAuthoring(spec);
|
|
18
|
+
if (!needsEvenOdd && !needsColorSchemeMapping)
|
|
19
|
+
return;
|
|
20
|
+
ctx.registerPart('word/settings.xml', SETTINGS_CONTENT_TYPE, SETTINGS_REL_TYPE);
|
|
21
|
+
const doc = parseXml(`<w:settings xmlns:w="${OOXML.W_NS}"/>`);
|
|
22
|
+
if (needsEvenOdd) {
|
|
23
|
+
doc.documentElement.appendChild(createWmlElement(doc, W.evenAndOddHeaders));
|
|
24
|
+
}
|
|
25
|
+
if (needsColorSchemeMapping) {
|
|
26
|
+
doc.documentElement.appendChild(createWmlElement(doc, W.clrSchemeMapping, {
|
|
27
|
+
'w:bg1': 'light1',
|
|
28
|
+
'w:t1': 'dark1',
|
|
29
|
+
'w:bg2': 'light2',
|
|
30
|
+
'w:t2': 'dark2',
|
|
31
|
+
'w:accent1': 'accent1',
|
|
32
|
+
'w:accent2': 'accent2',
|
|
33
|
+
'w:accent3': 'accent3',
|
|
34
|
+
'w:accent4': 'accent4',
|
|
35
|
+
'w:accent5': 'accent5',
|
|
36
|
+
'w:accent6': 'accent6',
|
|
37
|
+
'w:hyperlink': 'hyperlink',
|
|
38
|
+
'w:followedHyperlink': 'followedHyperlink',
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
ctx.setFileContent('word/settings.xml', XML_DECL + serializeXml(doc));
|
|
42
|
+
}
|
|
43
|
+
function usesThemeRelativeAuthoring(spec) {
|
|
44
|
+
if (spec.styles?.some((style) => style.run?.themeColor !== undefined))
|
|
45
|
+
return true;
|
|
46
|
+
if (spec.numbering?.some((numbering) => numbering.levels.some((level) => level.runProps?.themeColor !== undefined)))
|
|
47
|
+
return true;
|
|
48
|
+
return spec.sections.some((section) => {
|
|
49
|
+
const blocks = [
|
|
50
|
+
...section.blocks,
|
|
51
|
+
...Object.values(section.headers ?? {}).flatMap((story) => story?.blocks ?? []),
|
|
52
|
+
...Object.values(section.footers ?? {}).flatMap((story) => story?.blocks ?? []),
|
|
53
|
+
];
|
|
54
|
+
return blocks.some(blockUsesThemeRelativeAuthoring);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function blockUsesThemeRelativeAuthoring(block) {
|
|
58
|
+
if (block.kind === 'paragraph')
|
|
59
|
+
return block.runs.some(inlineUsesThemeRelativeAuthoring);
|
|
60
|
+
return block.rows.some((row) => row.cells.some(cellUsesThemeRelativeAuthoring));
|
|
61
|
+
}
|
|
62
|
+
function inlineUsesThemeRelativeAuthoring(inline) {
|
|
63
|
+
return (inline.kind === 'text' || inline.kind === 'field') && inline.themeColor !== undefined;
|
|
64
|
+
}
|
|
65
|
+
function cellUsesThemeRelativeAuthoring(cell) {
|
|
66
|
+
return cell.themeFill !== undefined || cell.blocks.some(blockUsesThemeRelativeAuthoring);
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=settings-part.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-part.js","sourceRoot":"","sources":["../../../src/generation/emit/settings-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;AAI3E,MAAM,qBAAqB,GAAG,6EAA6E,CAAC;AAC5G,MAAM,iBAAiB,GAAG,8EAA8E,CAAC;AAEzG,MAAM,UAAU,wBAAwB,CAAC,IAAkB,EAAE,GAAmB;IAC9E,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACnF,MAAM,uBAAuB,GAAG,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,0BAA0B,CAAC,IAAI,CAAC,CAAC;IAC7F,IAAI,CAAC,YAAY,IAAI,CAAC,uBAAuB;QAAE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|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* word/styles.xml emitter.
|
|
3
|
+
*
|
|
4
|
+
* Always emitted: document defaults, the Normal paragraph style, and every
|
|
5
|
+
* declared StyleSpec. Style pPr/rPr go through the same shared property
|
|
6
|
+
* builders as direct formatting (emit/properties.ts), so a style definition
|
|
7
|
+
* and an inline run can never disagree on how a property serializes.
|
|
8
|
+
*
|
|
9
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.7.4.18
|
|
10
|
+
*/
|
|
11
|
+
import type { CompileContext } from '../context.js';
|
|
12
|
+
import type { DocumentSpec } from '../types.js';
|
|
13
|
+
export declare const STYLES_CONTENT_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml";
|
|
14
|
+
export declare const STYLES_REL_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles";
|
|
15
|
+
export declare function emitStylesPart(spec: DocumentSpec, ctx: CompileContext): void;
|
|
16
|
+
//# sourceMappingURL=styles-part.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles-part.d.ts","sourceRoot":"","sources":["../../../src/generation/emit/styles-part.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAA6B,MAAM,aAAa,CAAC;AAI3E,eAAO,MAAM,mBAAmB,8EAA8E,CAAC;AAC/G,eAAO,MAAM,eAAe,+EAA+E,CAAC;AAQ5G,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CAc5E"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* word/styles.xml emitter.
|
|
3
|
+
*
|
|
4
|
+
* Always emitted: document defaults, the Normal paragraph style, and every
|
|
5
|
+
* declared StyleSpec. Style pPr/rPr go through the same shared property
|
|
6
|
+
* builders as direct formatting (emit/properties.ts), so a style definition
|
|
7
|
+
* and an inline run can never disagree on how a property serializes.
|
|
8
|
+
*
|
|
9
|
+
* @conformance ECMA-376 edition 5, Part 1 § 17.7.4.18
|
|
10
|
+
*/
|
|
11
|
+
import { createWmlElement } from '../../primitives/dom-helpers.js';
|
|
12
|
+
import { OOXML, W } from '../../primitives/namespaces.js';
|
|
13
|
+
import { parseXml, serializeXml, XML_DECL } from '../../primitives/xml.js';
|
|
14
|
+
import { resolveThemeColorValues } from '../theme-colors.js';
|
|
15
|
+
import { buildParagraphPropsElement, buildRunPropsElement, styleParagraphProps } from './properties.js';
|
|
16
|
+
export const STYLES_CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml';
|
|
17
|
+
export const STYLES_REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles';
|
|
18
|
+
const STYLES_SKELETON = `<w:styles xmlns:w="${OOXML.W_NS}"/>`;
|
|
19
|
+
/** Default run properties for docDefaults: Calibri 11pt, matching Word's baseline. */
|
|
20
|
+
const DEFAULT_FONT = 'Calibri';
|
|
21
|
+
const DEFAULT_SIZE_HALF_POINTS = '22';
|
|
22
|
+
export function emitStylesPart(spec, ctx) {
|
|
23
|
+
ctx.registerPart('word/styles.xml', STYLES_CONTENT_TYPE, STYLES_REL_TYPE);
|
|
24
|
+
const doc = parseXml(STYLES_SKELETON);
|
|
25
|
+
const root = doc.documentElement;
|
|
26
|
+
const themeColorValues = resolveThemeColorValues(spec.theme);
|
|
27
|
+
root.appendChild(buildDocDefaults(doc));
|
|
28
|
+
root.appendChild(buildNormalStyle(doc));
|
|
29
|
+
for (const style of spec.styles ?? []) {
|
|
30
|
+
root.appendChild(buildStyle(doc, style, themeColorValues));
|
|
31
|
+
}
|
|
32
|
+
ctx.setFileContent('word/styles.xml', XML_DECL + serializeXml(doc));
|
|
33
|
+
}
|
|
34
|
+
/** @conformance ECMA-376 edition 5, Part 1 § 17.7.5.1 */
|
|
35
|
+
function buildDocDefaults(doc) {
|
|
36
|
+
const docDefaults = createWmlElement(doc, W.docDefaults);
|
|
37
|
+
const rPrDefault = createWmlElement(doc, W.rPrDefault);
|
|
38
|
+
const rPr = createWmlElement(doc, W.rPr);
|
|
39
|
+
rPr.appendChild(createWmlElement(doc, W.rFonts, {
|
|
40
|
+
'w:ascii': DEFAULT_FONT,
|
|
41
|
+
'w:hAnsi': DEFAULT_FONT,
|
|
42
|
+
'w:cs': DEFAULT_FONT,
|
|
43
|
+
}));
|
|
44
|
+
rPr.appendChild(createWmlElement(doc, W.sz, { 'w:val': DEFAULT_SIZE_HALF_POINTS }));
|
|
45
|
+
rPr.appendChild(createWmlElement(doc, W.szCs, { 'w:val': DEFAULT_SIZE_HALF_POINTS }));
|
|
46
|
+
rPrDefault.appendChild(rPr);
|
|
47
|
+
docDefaults.appendChild(rPrDefault);
|
|
48
|
+
const pPrDefault = createWmlElement(doc, W.pPrDefault);
|
|
49
|
+
docDefaults.appendChild(pPrDefault);
|
|
50
|
+
return docDefaults;
|
|
51
|
+
}
|
|
52
|
+
function buildNormalStyle(doc) {
|
|
53
|
+
const style = createWmlElement(doc, W.style, { 'w:type': 'paragraph', 'w:styleId': 'Normal', 'w:default': '1' });
|
|
54
|
+
style.appendChild(createWmlElement(doc, W.name, { 'w:val': 'Normal' }));
|
|
55
|
+
style.appendChild(createWmlElement(doc, W.qFormat));
|
|
56
|
+
return style;
|
|
57
|
+
}
|
|
58
|
+
/** @conformance ECMA-376 edition 5, Part 1 § 17.7.4.17 */
|
|
59
|
+
function buildStyle(doc, spec, themeColorValues) {
|
|
60
|
+
const style = createWmlElement(doc, W.style, { 'w:type': spec.type, 'w:styleId': spec.styleId });
|
|
61
|
+
style.appendChild(createWmlElement(doc, W.name, { 'w:val': spec.name }));
|
|
62
|
+
if (spec.basedOn !== undefined) {
|
|
63
|
+
style.appendChild(createWmlElement(doc, W.basedOn, { 'w:val': spec.basedOn }));
|
|
64
|
+
}
|
|
65
|
+
if (spec.next !== undefined) {
|
|
66
|
+
style.appendChild(createWmlElement(doc, W.next, { 'w:val': spec.next }));
|
|
67
|
+
}
|
|
68
|
+
style.appendChild(createWmlElement(doc, W.qFormat));
|
|
69
|
+
// CT_Style declares pPr before rPr.
|
|
70
|
+
if (spec.paragraph) {
|
|
71
|
+
const pPr = buildParagraphPropsElement(doc, styleParagraphProps(spec));
|
|
72
|
+
if (pPr)
|
|
73
|
+
style.appendChild(pPr);
|
|
74
|
+
}
|
|
75
|
+
if (spec.run) {
|
|
76
|
+
const rPr = buildRunPropsElement(doc, spec.run, { themeColorValues });
|
|
77
|
+
if (rPr)
|
|
78
|
+
style.appendChild(rPr);
|
|
79
|
+
}
|
|
80
|
+
return style;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=styles-part.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles-part.js","sourceRoot":"","sources":["../../../src/generation/emit/styles-part.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;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;AAG3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAExG,MAAM,CAAC,MAAM,mBAAmB,GAAG,2EAA2E,CAAC;AAC/G,MAAM,CAAC,MAAM,eAAe,GAAG,4EAA4E,CAAC;AAE5G,MAAM,eAAe,GAAG,sBAAsB,KAAK,CAAC,IAAI,KAAK,CAAC;AAE9D,sFAAsF;AACtF,MAAM,YAAY,GAAG,SAAS,CAAC;AAC/B,MAAM,wBAAwB,GAAG,IAAI,CAAC;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