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,11 @@
|
|
|
1
|
+
import type { DocumentStyles, DocumentViewNode, FormattingFingerprint } from './document_view-types.js';
|
|
2
|
+
export type { DocumentStyleInfo, DocumentStyles, FormattingFingerprint } from './document_view-types.js';
|
|
3
|
+
export declare function fingerprintKey(fp: FormattingFingerprint): string;
|
|
4
|
+
/**
|
|
5
|
+
* v0.3: Compact style fingerprint token.
|
|
6
|
+
* Concatenates style name, list level, alignment, and indentation for token-efficient LLM context.
|
|
7
|
+
* Example: "Normal:L-1:LEFT:I0:H0"
|
|
8
|
+
*/
|
|
9
|
+
export declare function computeFingerprintToken(fp: FormattingFingerprint, styleId?: string): string;
|
|
10
|
+
export declare function discoverStyles(nodes: DocumentViewNode[]): DocumentStyles;
|
|
11
|
+
//# sourceMappingURL=document_view-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document_view-styles.d.ts","sourceRoot":"","sources":["../../src/primitives/document_view-styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqB,cAAc,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAE3H,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAIzG,wBAAgB,cAAc,CAAC,EAAE,EAAE,qBAAqB,GAAG,MAAM,CAGhE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAO3F;AA6CD,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,cAAc,CAsCxE"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { LabelType } from './list_labels.js';
|
|
2
|
+
const STYLE_EXAMPLE_TEXT_PREVIEW_LENGTH = 50;
|
|
3
|
+
export function fingerprintKey(fp) {
|
|
4
|
+
// Stable JSON-ish key used for Map lookups.
|
|
5
|
+
return `${fp.list_level}|${fp.left_indent_pt.toFixed(1)}|${fp.first_line_indent_pt.toFixed(1)}|${fp.style_name}|${fp.alignment}`;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* v0.3: Compact style fingerprint token.
|
|
9
|
+
* Concatenates style name, list level, alignment, and indentation for token-efficient LLM context.
|
|
10
|
+
* Example: "Normal:L-1:LEFT:I0:H0"
|
|
11
|
+
*/
|
|
12
|
+
export function computeFingerprintToken(fp, styleId) {
|
|
13
|
+
const name = styleId || fp.style_name || 'body';
|
|
14
|
+
const level = `L${fp.list_level}`;
|
|
15
|
+
const align = fp.alignment;
|
|
16
|
+
const indent = `I${Math.round(fp.left_indent_pt)}`;
|
|
17
|
+
const hanging = `H${Math.round(fp.first_line_indent_pt)}`;
|
|
18
|
+
return `${name}:${level}:${align}:${indent}:${hanging}`;
|
|
19
|
+
}
|
|
20
|
+
function inferSemanticName(params) {
|
|
21
|
+
const { fp, nodes } = params;
|
|
22
|
+
// Find first label_type if present.
|
|
23
|
+
let labelType = null;
|
|
24
|
+
for (const n of nodes) {
|
|
25
|
+
if (n.list_metadata.label_type) {
|
|
26
|
+
labelType = n.list_metadata.label_type;
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const listLevel = fp.list_level;
|
|
31
|
+
if (listLevel >= 0) {
|
|
32
|
+
if (listLevel === 0) {
|
|
33
|
+
if (labelType === LabelType.ARTICLE)
|
|
34
|
+
return { base_id: 'article', display_name: 'Article Heading' };
|
|
35
|
+
if (labelType === LabelType.SECTION)
|
|
36
|
+
return { base_id: 'section', display_name: 'Section Heading' };
|
|
37
|
+
if (labelType === LabelType.ROMAN)
|
|
38
|
+
return { base_id: 'roman_section', display_name: 'Roman Numeral Section' };
|
|
39
|
+
return { base_id: 'top_level', display_name: 'Top-Level List Item' };
|
|
40
|
+
}
|
|
41
|
+
if (listLevel === 1) {
|
|
42
|
+
if (labelType === LabelType.LETTER)
|
|
43
|
+
return { base_id: 'subsection', display_name: 'Subsection (a)/(A)' };
|
|
44
|
+
if (labelType === LabelType.NUMBER)
|
|
45
|
+
return { base_id: 'subsection_number', display_name: 'Numbered Subsection' };
|
|
46
|
+
if (labelType === LabelType.ROMAN)
|
|
47
|
+
return { base_id: 'subsection_roman', display_name: 'Roman Subsection' };
|
|
48
|
+
return { base_id: 'level_1', display_name: `Level ${listLevel} List Item` };
|
|
49
|
+
}
|
|
50
|
+
if (labelType === LabelType.ROMAN)
|
|
51
|
+
return { base_id: `level_${listLevel}_roman`, display_name: `Level ${listLevel} Roman` };
|
|
52
|
+
if (labelType === LabelType.LETTER)
|
|
53
|
+
return { base_id: `level_${listLevel}_letter`, display_name: `Level ${listLevel} Letter` };
|
|
54
|
+
return { base_id: `level_${listLevel}`, display_name: `Level ${listLevel} List Item` };
|
|
55
|
+
}
|
|
56
|
+
// Non-list.
|
|
57
|
+
const styleName = fp.style_name.toLowerCase().replace(/\s+/g, '_');
|
|
58
|
+
if (fp.left_indent_pt > 0)
|
|
59
|
+
return { base_id: 'indent_block', display_name: 'Indented Block' };
|
|
60
|
+
if (styleName.includes('heading') || styleName.includes('title'))
|
|
61
|
+
return { base_id: 'heading', display_name: 'Heading' };
|
|
62
|
+
if (styleName.includes('quote') || styleName.includes('block'))
|
|
63
|
+
return { base_id: 'block_quote', display_name: 'Block Quote' };
|
|
64
|
+
return { base_id: 'body', display_name: 'Body Text' };
|
|
65
|
+
}
|
|
66
|
+
export function discoverStyles(nodes) {
|
|
67
|
+
const groups = new Map();
|
|
68
|
+
for (const n of nodes) {
|
|
69
|
+
const key = fingerprintKey(n.style_fingerprint);
|
|
70
|
+
const g = groups.get(key);
|
|
71
|
+
if (g)
|
|
72
|
+
g.nodes.push(n);
|
|
73
|
+
else
|
|
74
|
+
groups.set(key, { fp: n.style_fingerprint, nodes: [n] });
|
|
75
|
+
}
|
|
76
|
+
const used = {};
|
|
77
|
+
const styles = new Map();
|
|
78
|
+
const fpToStyle = new Map();
|
|
79
|
+
for (const [fpKey, g] of groups.entries()) {
|
|
80
|
+
const { base_id, display_name } = inferSemanticName({ fp: g.fp, nodes: g.nodes });
|
|
81
|
+
let styleId = base_id;
|
|
82
|
+
if (used[base_id] !== undefined) {
|
|
83
|
+
used[base_id] += 1;
|
|
84
|
+
styleId = `${base_id}_${used[base_id]}`;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
used[base_id] = 0;
|
|
88
|
+
}
|
|
89
|
+
const median = g.nodes[Math.floor(g.nodes.length / 2)];
|
|
90
|
+
const info = {
|
|
91
|
+
style_id: styleId,
|
|
92
|
+
display_name,
|
|
93
|
+
fingerprint: g.fp,
|
|
94
|
+
example_node_id: median.id,
|
|
95
|
+
example_text: median.clean_text.slice(0, STYLE_EXAMPLE_TEXT_PREVIEW_LENGTH),
|
|
96
|
+
count: g.nodes.length,
|
|
97
|
+
dominant_alignment: g.fp.alignment,
|
|
98
|
+
};
|
|
99
|
+
styles.set(styleId, info);
|
|
100
|
+
fpToStyle.set(fpKey, styleId);
|
|
101
|
+
}
|
|
102
|
+
return { styles, fingerprint_to_style: fpToStyle };
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=document_view-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document_view-styles.js","sourceRoot":"","sources":["../../src/primitives/document_view-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK7C,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAE7C,MAAM,UAAU,cAAc,CAAC,EAAyB;IACtD,4CAA4C;IAC5C,OAAO,GAAG,EAAE,CAAC,UAAU,IAAI,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,oBAAoB,CAAC,OAAO,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 +1,37 @@
|
|
|
1
|
+
import type { DocumentViewNode, ToonCommentMarkerMap } from './document_view-types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Format a single toon data line for one DocumentViewNode.
|
|
4
|
+
* Handles table-context-aware style (th/td) and header stripping.
|
|
5
|
+
*/
|
|
6
|
+
export declare function formatToonDataLine(n: DocumentViewNode, options?: {
|
|
7
|
+
compact?: boolean;
|
|
8
|
+
commentMarkers?: ToonCommentMarkerMap;
|
|
9
|
+
}): string;
|
|
10
|
+
/**
|
|
11
|
+
* Collect table marker info (dimensions) from nodes for #TABLE markers.
|
|
12
|
+
* Column headers are NOT included in the marker — they appear once in the th() rows.
|
|
13
|
+
*/
|
|
14
|
+
export declare function collectTableMarkerInfo(nodes: readonly Pick<DocumentViewNode, 'table_context'>[]): Map<number, {
|
|
15
|
+
id: string;
|
|
16
|
+
totalRows: number;
|
|
17
|
+
totalCols: number;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Format a #TABLE marker line from collected table info.
|
|
21
|
+
* Headers are omitted — they appear exactly once in the th(0,N) data rows.
|
|
22
|
+
*/
|
|
23
|
+
export declare function formatTableMarker(info: {
|
|
24
|
+
id: string;
|
|
25
|
+
totalRows: number;
|
|
26
|
+
totalCols: number;
|
|
27
|
+
}): string;
|
|
28
|
+
export declare function formatToonCommentLines(node: Pick<DocumentViewNode, 'id' | 'comments'>): string[];
|
|
29
|
+
export declare function formatToonCommentEndnoteLines(node: Pick<DocumentViewNode, 'id' | 'comments'>): string[];
|
|
30
|
+
export declare function formatToonCommentsEndnotesBlock(nodes: readonly Pick<DocumentViewNode, 'id' | 'comments'>[]): string[];
|
|
31
|
+
export declare function renderToon(nodes: DocumentViewNode[], options?: {
|
|
32
|
+
compact?: boolean;
|
|
33
|
+
}): string;
|
|
34
|
+
export declare function renderToonWithCommentEndnotes(nodes: DocumentViewNode[], options?: {
|
|
35
|
+
compact?: boolean;
|
|
36
|
+
}): string;
|
|
37
|
+
//# sourceMappingURL=document_view-toon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document_view-toon.d.ts","sourceRoot":"","sources":["../../src/primitives/document_view-toon.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAuB,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAyB5G;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,CAAC,EAAE,gBAAgB,EACnB,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,cAAc,CAAC,EAAE,oBAAoB,CAAA;CAAE,GACrE,MAAM,CAkDR;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,SAAS,IAAI,CAAC,gBAAgB,EAAE,eAAe,CAAC,EAAE,GACxD,GAAG,CAAC,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAcnE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEpG;AAgCD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,GAAG,UAAU,CAAC,GAAG,MAAM,EAAE,CAEhG;AAoBD,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,GAAG,UAAU,CAAC,GAAG,MAAM,EAAE,CAEvG;AAED,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,SAAS,IAAI,CAAC,gBAAgB,EAAE,IAAI,GAAG,UAAU,CAAC,EAAE,GAC1D,MAAM,EAAE,CAKV;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,gBAAgB,EAAE,EAAE,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,MAAM,CAqCjG;AAED,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,gBAAgB,EAAE,EACzB,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAClC,MAAM,CA+BR"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { collectInlineCommentMarkers, countVisibleTextCharacters, injectToonCommentMarkers } from './document_view-comments.js';
|
|
2
|
+
import { computeFingerprintToken } from './document_view-styles.js';
|
|
3
|
+
function headerStripFromText(params) {
|
|
4
|
+
// Mirrors Python TOONRenderer header stripping.
|
|
5
|
+
const { header } = params;
|
|
6
|
+
let { text } = params;
|
|
7
|
+
if (!header)
|
|
8
|
+
return text;
|
|
9
|
+
const headerNorm = header.trim().toLowerCase();
|
|
10
|
+
const textLower = text.toLowerCase();
|
|
11
|
+
for (const punct of [':', '.', '-', ';', '']) {
|
|
12
|
+
const testPrefix = `${headerNorm}${punct}`;
|
|
13
|
+
if (textLower.startsWith(testPrefix)) {
|
|
14
|
+
text = text.slice(testPrefix.length).trimStart();
|
|
15
|
+
return text;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
if (text.startsWith(header)) {
|
|
19
|
+
text = text.slice(header.length).replace(/^[.:\-;]+/, '').trimStart();
|
|
20
|
+
}
|
|
21
|
+
return text;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Format a single toon data line for one DocumentViewNode.
|
|
25
|
+
* Handles table-context-aware style (th/td) and header stripping.
|
|
26
|
+
*/
|
|
27
|
+
export function formatToonDataLine(n, options) {
|
|
28
|
+
let text = n.tagged_text;
|
|
29
|
+
let header = n.header;
|
|
30
|
+
let strippedPrefixVisibleLength = 0;
|
|
31
|
+
if (header) {
|
|
32
|
+
const strippedText = headerStripFromText({ header, text });
|
|
33
|
+
strippedPrefixVisibleLength = Math.max(0, countVisibleTextCharacters(text) - countVisibleTextCharacters(strippedText));
|
|
34
|
+
text = strippedText;
|
|
35
|
+
}
|
|
36
|
+
if (header && !text) {
|
|
37
|
+
text = header;
|
|
38
|
+
header = '';
|
|
39
|
+
strippedPrefixVisibleLength = 0;
|
|
40
|
+
}
|
|
41
|
+
const commentMarkers = options?.commentMarkers?.get(n.id);
|
|
42
|
+
if (commentMarkers && commentMarkers.length > 0) {
|
|
43
|
+
// Comment marker offsets are computed against the FULL paragraph visible text (raw
|
|
44
|
+
// run/char counting in `getComments()`). To translate to `tagged_text` positions we
|
|
45
|
+
// subtract:
|
|
46
|
+
// 1. `visible_offset_correction` — chars stripped at build time when extracting the
|
|
47
|
+
// manual list label and trimming following whitespace.
|
|
48
|
+
// 2. `strippedPrefixVisibleLength` — chars stripped at format time by the run-in-header
|
|
49
|
+
// extraction above.
|
|
50
|
+
const totalCorrection = (n.visible_offset_correction ?? 0) + strippedPrefixVisibleLength;
|
|
51
|
+
text = injectToonCommentMarkers(text, commentMarkers.map(({ offset, marker }) => ({
|
|
52
|
+
offset: Math.max(0, offset - totalCorrection),
|
|
53
|
+
marker,
|
|
54
|
+
})));
|
|
55
|
+
}
|
|
56
|
+
const tc = n.table_context;
|
|
57
|
+
let style;
|
|
58
|
+
if (tc) {
|
|
59
|
+
style = tc.is_header_row
|
|
60
|
+
? `th(${tc.row_index},${tc.col_index})`
|
|
61
|
+
: `td(${tc.row_index},${tc.col_index})`;
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
style = options?.compact
|
|
65
|
+
? computeFingerprintToken(n.style_fingerprint, n.style)
|
|
66
|
+
: n.style;
|
|
67
|
+
}
|
|
68
|
+
return `${n.id} | ${n.list_label} | ${header} | ${style} | ${text}`;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Collect table marker info (dimensions) from nodes for #TABLE markers.
|
|
72
|
+
* Column headers are NOT included in the marker — they appear once in the th() rows.
|
|
73
|
+
*/
|
|
74
|
+
export function collectTableMarkerInfo(nodes) {
|
|
75
|
+
const info = new Map();
|
|
76
|
+
for (const n of nodes) {
|
|
77
|
+
const tc = n.table_context;
|
|
78
|
+
if (!tc)
|
|
79
|
+
continue;
|
|
80
|
+
if (!info.has(tc.table_index)) {
|
|
81
|
+
info.set(tc.table_index, {
|
|
82
|
+
id: tc.table_id,
|
|
83
|
+
totalRows: tc.total_rows,
|
|
84
|
+
totalCols: tc.total_cols,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return info;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Format a #TABLE marker line from collected table info.
|
|
92
|
+
* Headers are omitted — they appear exactly once in the th(0,N) data rows.
|
|
93
|
+
*/
|
|
94
|
+
export function formatTableMarker(info) {
|
|
95
|
+
return `#TABLE ${info.id} | ${info.totalRows} rows × ${info.totalCols} cols`;
|
|
96
|
+
}
|
|
97
|
+
function escapeToonCommentField(value) {
|
|
98
|
+
return value
|
|
99
|
+
.replaceAll('\r\n', '\\n')
|
|
100
|
+
.replaceAll('\r', '\\r')
|
|
101
|
+
.replaceAll('\n', '\\n')
|
|
102
|
+
.replaceAll('|', '\\|');
|
|
103
|
+
}
|
|
104
|
+
function formatCommentDate(date) {
|
|
105
|
+
return date ?? '-';
|
|
106
|
+
}
|
|
107
|
+
function collectToonCommentLines(comment, paragraphId, parentId) {
|
|
108
|
+
const author = escapeToonCommentField(comment.author || '-');
|
|
109
|
+
const date = formatCommentDate(comment.date);
|
|
110
|
+
const text = escapeToonCommentField(comment.text);
|
|
111
|
+
const line = parentId == null
|
|
112
|
+
? `#COMMENT ${paragraphId} c${comment.id} ${author} ${date} | ${text}`
|
|
113
|
+
: `#REPLY c${comment.id} -> c${parentId} ${author} ${date} | ${text}`;
|
|
114
|
+
return [
|
|
115
|
+
line,
|
|
116
|
+
...comment.replies.flatMap((reply) => collectToonCommentLines(reply, paragraphId, comment.id)),
|
|
117
|
+
];
|
|
118
|
+
}
|
|
119
|
+
export function formatToonCommentLines(node) {
|
|
120
|
+
return node.comments?.flatMap((comment) => collectToonCommentLines(comment, node.id)) ?? [];
|
|
121
|
+
}
|
|
122
|
+
function collectToonCommentEndnoteLines(comment, paragraphId, parentId) {
|
|
123
|
+
const author = escapeToonCommentField(comment.author || '-');
|
|
124
|
+
const date = formatCommentDate(comment.date);
|
|
125
|
+
const text = escapeToonCommentField(comment.text);
|
|
126
|
+
const line = parentId == null
|
|
127
|
+
? `c${comment.id} @ ${paragraphId} ${author} ${date} | ${text}`
|
|
128
|
+
: `c${comment.id} -> c${parentId} ${author} ${date} | ${text}`;
|
|
129
|
+
return [
|
|
130
|
+
line,
|
|
131
|
+
...comment.replies.flatMap((reply) => collectToonCommentEndnoteLines(reply, paragraphId, comment.id)),
|
|
132
|
+
];
|
|
133
|
+
}
|
|
134
|
+
export function formatToonCommentEndnoteLines(node) {
|
|
135
|
+
return node.comments?.flatMap((comment) => collectToonCommentEndnoteLines(comment, node.id)) ?? [];
|
|
136
|
+
}
|
|
137
|
+
export function formatToonCommentsEndnotesBlock(nodes) {
|
|
138
|
+
const commentLines = nodes.flatMap((node) => formatToonCommentEndnoteLines(node));
|
|
139
|
+
return commentLines.length > 0
|
|
140
|
+
? ['#COMMENTS', ...commentLines]
|
|
141
|
+
: [];
|
|
142
|
+
}
|
|
143
|
+
export function renderToon(nodes, options = {}) {
|
|
144
|
+
const lines = ['#SCHEMA id | list_label | header | style | text'];
|
|
145
|
+
const commentMarkers = collectInlineCommentMarkers(nodes);
|
|
146
|
+
const lineOptions = { ...options, commentMarkers };
|
|
147
|
+
// Pre-scan: collect table marker info for #TABLE lines
|
|
148
|
+
const tableInfo = collectTableMarkerInfo(nodes);
|
|
149
|
+
let currentTableIndex = null;
|
|
150
|
+
for (const n of nodes) {
|
|
151
|
+
const tc = n.table_context;
|
|
152
|
+
const nodeTableIndex = tc ? tc.table_index : null;
|
|
153
|
+
// Close previous table if we left it or moved to a different table
|
|
154
|
+
if (currentTableIndex !== null && nodeTableIndex !== currentTableIndex) {
|
|
155
|
+
lines.push('#END_TABLE');
|
|
156
|
+
currentTableIndex = null;
|
|
157
|
+
}
|
|
158
|
+
// Open new table if entering one
|
|
159
|
+
if (nodeTableIndex !== null && currentTableIndex === null) {
|
|
160
|
+
const info = tableInfo.get(nodeTableIndex);
|
|
161
|
+
if (info)
|
|
162
|
+
lines.push(formatTableMarker(info));
|
|
163
|
+
currentTableIndex = nodeTableIndex;
|
|
164
|
+
}
|
|
165
|
+
lines.push(formatToonDataLine(n, lineOptions));
|
|
166
|
+
lines.push(...formatToonCommentLines(n));
|
|
167
|
+
}
|
|
168
|
+
// Close any open table at end
|
|
169
|
+
if (currentTableIndex !== null) {
|
|
170
|
+
lines.push('#END_TABLE');
|
|
171
|
+
}
|
|
172
|
+
return lines.join('\n');
|
|
173
|
+
}
|
|
174
|
+
export function renderToonWithCommentEndnotes(nodes, options = {}) {
|
|
175
|
+
const lines = ['#SCHEMA id | list_label | header | style | text'];
|
|
176
|
+
const tableInfo = collectTableMarkerInfo(nodes);
|
|
177
|
+
let currentTableIndex = null;
|
|
178
|
+
for (const n of nodes) {
|
|
179
|
+
const tc = n.table_context;
|
|
180
|
+
const nodeTableIndex = tc ? tc.table_index : null;
|
|
181
|
+
if (currentTableIndex !== null && nodeTableIndex !== currentTableIndex) {
|
|
182
|
+
lines.push('#END_TABLE');
|
|
183
|
+
currentTableIndex = null;
|
|
184
|
+
}
|
|
185
|
+
if (nodeTableIndex !== null && currentTableIndex === null) {
|
|
186
|
+
const info = tableInfo.get(nodeTableIndex);
|
|
187
|
+
if (info)
|
|
188
|
+
lines.push(formatTableMarker(info));
|
|
189
|
+
currentTableIndex = nodeTableIndex;
|
|
190
|
+
}
|
|
191
|
+
lines.push(formatToonDataLine(n, options));
|
|
192
|
+
}
|
|
193
|
+
if (currentTableIndex !== null) {
|
|
194
|
+
lines.push('#END_TABLE');
|
|
195
|
+
}
|
|
196
|
+
lines.push(...formatToonCommentsEndnotesBlock(nodes));
|
|
197
|
+
return lines.join('\n');
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=document_view-toon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document_view-toon.js","sourceRoot":"","sources":["../../src/primitives/document_view-toon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAChI,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGpE,SAAS,mBAAmB,CAAC,MAAwC;IACnE,gDAAgD;IAChD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC1B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IACtB,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC/C,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAErC,KAAK,MAAM,KAAK,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAU,EAAE,CAAC;QACtD,MAAM,UAAU,GAAG,GAAG,UAAU,GAAG,KAAK,EAAE,CAAC;QAC3C,IAAI,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACrC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,CAAC;YACjD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5B,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC;IACxE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED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,YAAY,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,GAAG,+BAA+B,CAAC,KAAK,CAAC,CAAC,CAAC;IAEtD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { LabelType } from './list_labels.js';
|
|
2
|
+
import type { ParagraphAlignment, RunFormatting } from './styles.js';
|
|
3
|
+
export type HeaderFormatting = {
|
|
4
|
+
bold: boolean;
|
|
5
|
+
italic: boolean;
|
|
6
|
+
underline: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type HeadingSource = 'word_style' | 'run_in_header' | 'title_with_period' | 'title_with_colon' | 'title_caps_centered' | 'title_bare';
|
|
9
|
+
export type HeuristicHeadingSource = Exclude<HeadingSource, 'word_style'>;
|
|
10
|
+
export type HeadingValue = {
|
|
11
|
+
/**
|
|
12
|
+
* Heading label text. Semantics depend on `source`:
|
|
13
|
+
* - `word_style`: the full paragraph text (the entire paragraph IS the heading).
|
|
14
|
+
* - All heuristic sources (`run_in_header`, `title_with_period`, `title_with_colon`,
|
|
15
|
+
* `title_caps_centered`, `title_bare`): only the extracted heading prefix.
|
|
16
|
+
* For example, on `"Indemnification. The Company shall …"` the value is
|
|
17
|
+
* `"Indemnification"`, not the whole paragraph.
|
|
18
|
+
*/
|
|
19
|
+
text: string;
|
|
20
|
+
source: HeadingSource;
|
|
21
|
+
level: number | null;
|
|
22
|
+
};
|
|
23
|
+
export type FormattingFingerprint = {
|
|
24
|
+
list_level: number;
|
|
25
|
+
left_indent_pt: number;
|
|
26
|
+
first_line_indent_pt: number;
|
|
27
|
+
style_name: string;
|
|
28
|
+
alignment: ParagraphAlignment;
|
|
29
|
+
};
|
|
30
|
+
export type DocumentStyleInfo = {
|
|
31
|
+
style_id: string;
|
|
32
|
+
display_name: string;
|
|
33
|
+
fingerprint: FormattingFingerprint;
|
|
34
|
+
example_node_id: string;
|
|
35
|
+
example_text: string;
|
|
36
|
+
count: number;
|
|
37
|
+
dominant_alignment: ParagraphAlignment;
|
|
38
|
+
};
|
|
39
|
+
export type DocumentStyles = {
|
|
40
|
+
styles: Map<string, DocumentStyleInfo>;
|
|
41
|
+
fingerprint_to_style: Map<string, string>;
|
|
42
|
+
};
|
|
43
|
+
export type DocumentViewCommentRange = {
|
|
44
|
+
startParagraphId: string;
|
|
45
|
+
endParagraphId: string;
|
|
46
|
+
startRunIndex?: number;
|
|
47
|
+
startCharOffset?: number;
|
|
48
|
+
endRunIndex?: number;
|
|
49
|
+
endCharOffset?: number;
|
|
50
|
+
};
|
|
51
|
+
export type DocumentViewComment = {
|
|
52
|
+
id: number;
|
|
53
|
+
author: string;
|
|
54
|
+
date: string | null;
|
|
55
|
+
initials: string;
|
|
56
|
+
text: string;
|
|
57
|
+
replies: DocumentViewComment[];
|
|
58
|
+
range?: DocumentViewCommentRange;
|
|
59
|
+
};
|
|
60
|
+
export type ToonCommentMarker = {
|
|
61
|
+
offset: number;
|
|
62
|
+
marker: string;
|
|
63
|
+
};
|
|
64
|
+
export type ToonCommentMarkerMap = Map<string, ToonCommentMarker[]>;
|
|
65
|
+
/** A single token produced by {@link tokenizeToonInline}. */
|
|
66
|
+
export type ToonInlineToken = {
|
|
67
|
+
kind: 'tag';
|
|
68
|
+
value: string;
|
|
69
|
+
} | {
|
|
70
|
+
kind: 'text';
|
|
71
|
+
value: string;
|
|
72
|
+
};
|
|
73
|
+
export type ListMetadata = {
|
|
74
|
+
list_level: number;
|
|
75
|
+
label_type: LabelType | null;
|
|
76
|
+
label_string: string;
|
|
77
|
+
header_text: string | null;
|
|
78
|
+
header_style: HeuristicHeadingSource | null;
|
|
79
|
+
header_formatting: HeaderFormatting | null;
|
|
80
|
+
is_auto_numbered: boolean;
|
|
81
|
+
};
|
|
82
|
+
export type TableContext = {
|
|
83
|
+
table_id: string;
|
|
84
|
+
table_index: number;
|
|
85
|
+
row_index: number;
|
|
86
|
+
col_index: number;
|
|
87
|
+
col_header: string;
|
|
88
|
+
total_rows: number;
|
|
89
|
+
total_cols: number;
|
|
90
|
+
is_header_row: boolean;
|
|
91
|
+
para_in_cell: number;
|
|
92
|
+
cell_para_count: number;
|
|
93
|
+
};
|
|
94
|
+
export type DocumentViewNode = {
|
|
95
|
+
id: string;
|
|
96
|
+
list_label: string;
|
|
97
|
+
header: string;
|
|
98
|
+
style: string;
|
|
99
|
+
text: string;
|
|
100
|
+
clean_text: string;
|
|
101
|
+
/**
|
|
102
|
+
* Raw visible paragraph text (field codes stripped) BEFORE CR/LF removal,
|
|
103
|
+
* trimming, and manual-list-label stripping — i.e. exactly `getParagraphText(p)`.
|
|
104
|
+
* This is the coordinate system that `replaceParagraphTextRange` /
|
|
105
|
+
* `DocxDocument.replaceTextAtRange` operate in. Selector patterns are authored
|
|
106
|
+
* against `clean_text`; {@link buildCleanToRawOffsetMap} uses `raw_text` +
|
|
107
|
+
* `clean_text` to translate a matched clean-text span back to raw offsets so
|
|
108
|
+
* mutation lands on the right characters.
|
|
109
|
+
*
|
|
110
|
+
* Optional only so legacy test fixtures that hand-build nodes stay valid; the
|
|
111
|
+
* real builder (`buildNodesForDocumentView`) always populates it.
|
|
112
|
+
*/
|
|
113
|
+
raw_text?: string;
|
|
114
|
+
tagged_text: string;
|
|
115
|
+
list_metadata: ListMetadata;
|
|
116
|
+
style_fingerprint: FormattingFingerprint;
|
|
117
|
+
paragraph_style_id: string | null;
|
|
118
|
+
paragraph_style_name: string;
|
|
119
|
+
paragraph_alignment: ParagraphAlignment;
|
|
120
|
+
paragraph_indents_pt: {
|
|
121
|
+
left: number;
|
|
122
|
+
first_line: number;
|
|
123
|
+
};
|
|
124
|
+
numbering: {
|
|
125
|
+
num_id: string | null;
|
|
126
|
+
ilvl: number | null;
|
|
127
|
+
is_auto_numbered: boolean;
|
|
128
|
+
};
|
|
129
|
+
heading?: HeadingValue;
|
|
130
|
+
/**
|
|
131
|
+
* Footnote references this paragraph visibly anchors, in document order, each
|
|
132
|
+
* with the display number assigned by the view's numbering authority (the
|
|
133
|
+
* sequential scan of `document.xml` references, reserved separator IDs
|
|
134
|
+
* skipped). References inside field code (between `w:fldChar` begin and
|
|
135
|
+
* separate) are hidden text and excluded. This is the single derivation of
|
|
136
|
+
* "which footnotes does this paragraph reference" — consumers render from it
|
|
137
|
+
* instead of re-walking the paragraph DOM. Omitted when empty, matching the
|
|
138
|
+
* `heading` convention.
|
|
139
|
+
* @see #393
|
|
140
|
+
*/
|
|
141
|
+
footnote_refs?: Array<{
|
|
142
|
+
id: number;
|
|
143
|
+
display: number;
|
|
144
|
+
}>;
|
|
145
|
+
header_formatting: HeaderFormatting | null;
|
|
146
|
+
body_run_formatting: RunFormatting | null;
|
|
147
|
+
table_context?: TableContext;
|
|
148
|
+
comments?: DocumentViewComment[];
|
|
149
|
+
/**
|
|
150
|
+
* Number of visible characters stripped from the head of the raw paragraph text when
|
|
151
|
+
* extracting a manual list label (and trimming the trailing whitespace). Used by the
|
|
152
|
+
* inline-comment-marker injector to translate run/offset positions (which are computed
|
|
153
|
+
* against the FULL paragraph visible text by `getComments()`) into positions within
|
|
154
|
+
* `tagged_text` (which has the label stripped).
|
|
155
|
+
*
|
|
156
|
+
* Auto-numbered list paragraphs do NOT have their text stripped — their label lives in
|
|
157
|
+
* the `list_label` field separately — so this stays 0 for them. Run-in header stripping
|
|
158
|
+
* is handled separately at format time and is not included here.
|
|
159
|
+
*/
|
|
160
|
+
visible_offset_correction?: number;
|
|
161
|
+
};
|
|
162
|
+
export type BuildDocumentViewOptions = {
|
|
163
|
+
include_semantic_tags?: boolean;
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=document_view-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document_view-types.d.ts","sourceRoot":"","sources":["../../src/primitives/document_view-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KA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