<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp
    xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
    xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
    xsi:type="TaskPaneApp">

  <!--
    GENERATED FILE - do not edit.
    Produced by scripts/manifest.mjs from manifest.template.xml
    for the "production" environment (https://texconverter.com).
    Edit the template or config/environments.json and re-run `npm run manifest`.
  -->

  <!--
    Must be a real GUID: Office validates this field, and Word will reject a
    manifest whose Id isn't a well-formed GUID (8-4-4-4-12 hex).

    Substituted per environment from config/environments.json's `addinId`, so
    a developer can sideload the dev build without it colliding with an
    installed production copy. Each one must stay STABLE within its channel,
    because it is also the key Office uses to identify an already-registered
    sideloaded add-in, and the registry value name scripts/install.mjs writes
    under Office's Wef Developer key.

    Changing one makes Word treat the add-in as a brand new, separate one.
  -->
  <Id>6b25bff9-a5a6-4803-b559-a9257ba1c5b2</Id>

  <!--
    MUST be >= 1.0.0.0. Office rejects a manifest whose <Version> starts with
    a 0 — "Manifest Version Too Low: the manifest has unsupported version
    number less than 1.0" — and the rejection is total and silent: the add-in
    simply never appears in Word, with no error anywhere in the UI, even
    though the registry sideload entry, the HTTPS certificate and the local
    server are all correct. This said 0.6.0 (mirroring package.json), which
    is why the add-in had never once loaded.

    This is deliberately NOT tied to package.json's version. package.json
    tracks the product (0.6.0-alpha, pre-1.0 on purpose); this field is the
    version Office itself uses to detect an updated add-in, and its floor is
    1.0.0.0. Bump it whenever a released manifest changes; it does not need
    to match the product version and, while the product is pre-1.0, cannot.

    Also bump it whenever the icon ART changes, even though the icon URLs do
    not. Word caches the ribbon and Add-ins icons per <Id> + <Version> (in
    %LOCALAPPDATA%\Microsoft\Office\16.0\Wef) and never re-downloads them
    for a version it has already seen; 1.0.0.0 kept showing the old "L2W"
    button after the TeXConverter logo replaced it.
  -->
  <Version>1.0.2.0</Version>
  <ProviderName>TeXConverter</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="TeXConverter" />
  <Description DefaultValue="Convert LaTeX math, physics, and chemistry notation into native, fully editable Word equations." />
  <IconUrl DefaultValue="https://texconverter.com/assets/icon-32.png" />
  <HighResolutionIconUrl DefaultValue="https://texconverter.com/assets/icon-80.png" />
  <SupportUrl DefaultValue="https://texconverter.com/docs/user-guide.html" />

  <AppDomains>
    <AppDomain>https://texconverter.com</AppDomain>
  </AppDomains>

  <Hosts>
    <Host Name="Document" />
  </Hosts>

  <DefaultSettings>
    <SourceLocation DefaultValue="https://texconverter.com/taskpane.html" />
  </DefaultSettings>

  <Permissions>ReadWriteDocument</Permissions>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <Host xsi:type="Document">
        <!--
          No <Runtimes> block on purpose.

          A <Runtime lifetime="long"> declaration asks Office for a *shared*
          runtime, but Office only honours that when the add-in also declares
          <Requirements><Sets><Set Name="SharedRuntime" MinVersion="1.1"/>
          here in VersionOverrides. Declared alone, as it was, it is simply
          ignored — so it bought nothing while implying a capability the
          add-in doesn't have.

          Adding the requirement set instead would have been the other way to
          resolve it, but it raises the minimum host version (SharedRuntime
          1.1 needs Office 2019 / Microsoft 365; it excludes Office 2016) and
          TeXConverter uses no shared-runtime feature: no ribbon-state APIs, no
          custom functions, no code running outside the task pane. Dropping it
          keeps the widest host compatibility and costs nothing. Revisit this
          if ribbon buttons ever need to enable/disable themselves based on
          document state.
        -->
        <DesktopFormFactor>
          <GetStarted>
            <Title resid="GetStarted.Title" />
            <Description resid="GetStarted.Description" />
            <LearnMoreUrl resid="GetStarted.LearnMoreUrl" />
          </GetStarted>
          <FunctionFile resid="Commands.Url" />
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <OfficeTab id="TabHome">
              <Group id="LaTeX2Word.Group">
                <Label resid="CommandsGroup.Label" />
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16" />
                  <bt:Image size="32" resid="Icon.32x32" />
                  <bt:Image size="80" resid="Icon.80x80" />
                </Icon>
                <Control xsi:type="Button" id="LaTeX2Word.TaskpaneButton">
                  <Label resid="CommandsButton.Label" />
                  <Supertip>
                    <Title resid="CommandsButton.Label" />
                    <Description resid="CommandsButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16" />
                    <bt:Image size="32" resid="Icon.32x32" />
                    <bt:Image size="80" resid="Icon.80x80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>ButtonId1</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>
              </Group>
              <!-- Equation numbers (word/src/numbering.ts): Renumber runs without the pane (frontend/src/commands.ts); Number opens the pane, where an equation is numbered and referred to. -->
              <Group id="LaTeX2Word.Numbers">
                <Label resid="NumbersGroup.Label" />
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16" />
                  <bt:Image size="32" resid="Icon.32x32" />
                  <bt:Image size="80" resid="Icon.80x80" />
                </Icon>
                <Control xsi:type="Button" id="LaTeX2Word.NumberButton">
                  <Label resid="NumberButton.Label" />
                  <Supertip>
                    <Title resid="NumberButton.Label" />
                    <Description resid="NumberButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16" />
                    <bt:Image size="32" resid="Icon.32x32" />
                    <bt:Image size="80" resid="Icon.80x80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>ButtonId1</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>
                <Control xsi:type="Button" id="LaTeX2Word.RenumberButton">
                  <Label resid="RenumberButton.Label" />
                  <Supertip>
                    <Title resid="RenumberButton.Label" />
                    <Description resid="RenumberButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16" />
                    <bt:Image size="32" resid="Icon.32x32" />
                    <bt:Image size="80" resid="Icon.80x80" />
                  </Icon>
                  <Action xsi:type="ExecuteFunction">
                    <FunctionName>renumberEquations</FunctionName>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16" DefaultValue="https://texconverter.com/assets/icon-16.png" />
        <bt:Image id="Icon.32x32" DefaultValue="https://texconverter.com/assets/icon-32.png" />
        <bt:Image id="Icon.80x80" DefaultValue="https://texconverter.com/assets/icon-80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Taskpane.Url" DefaultValue="https://texconverter.com/taskpane.html" />
        <bt:Url id="Commands.Url" DefaultValue="https://texconverter.com/commands.html" />
        <bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://texconverter.com/docs/user-guide.html" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="GetStarted.Title" DefaultValue="Get started with TeXConverter" />
        <bt:String id="CommandsGroup.Label" DefaultValue="TeXConverter" />
        <bt:String id="CommandsButton.Label" DefaultValue="TeXConverter" />
        <bt:String id="NumbersGroup.Label" DefaultValue="Equation numbers" />
        <bt:String id="NumberButton.Label" DefaultValue="Number" />
        <bt:String id="RenumberButton.Label" DefaultValue="Renumber" />
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="GetStarted.Description" DefaultValue="TeXConverter converts LaTeX into native, editable Word equations. Click the ribbon button to open the task pane." />
        <bt:String id="CommandsButton.Tooltip" DefaultValue="Open TeXConverter to convert LaTeX into a native Word equation." />
        <bt:String id="NumberButton.Tooltip" DefaultValue="Open TeXConverter to number an equation, (1), (2)... at the right margin, or to refer to one." />
        <bt:String id="RenumberButton.Tooltip" DefaultValue="Number the document's equations 1, 2, 3... in order, and bring every reference up to date." />
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
