import type { GraftInfoRel8ns_V1 } from './graft-info-types.mjs'; export const GRAFT_INFO_ATOM = 'graftinfo'; export const GRAFT_INFO_REL8N_NAME = GRAFT_INFO_ATOM; /** @see {@link GraftInfoRel8ns_V1} */ export const GRAFT_LCA_REL8N_NAME = 'latestcommonaddr'; /** @see {@link GraftInfoRel8ns_V1} */ export const GRAFT_BASE_REL8N_NAME = 'base'; /** @see {@link GraftInfoRel8ns_V1} */ export const GRAFT_ORPHAN_REL8N_NAME = 'orphan'; /** @see {@link GraftInfoRel8ns_V1} */ export const GRAFT_DNAAPPLIED_REL8N_NAME = 'dnaapplied'; // #region MergeTextStrategy export const MERGE_TEXT_STRATEGY_LCS = 'longest-common-subsequence'; export type MergeTextStrategy = | typeof MERGE_TEXT_STRATEGY_LCS ; export const MergeTextStrategy = { /** * Longest common subsequence algorithm. */ lcs: MERGE_TEXT_STRATEGY_LCS, } satisfies { [key: string]: MergeTextStrategy }; export const MERGE_TEXT_STRATEGY_VALID_VALUES = Object.values(MergeTextStrategy); export function isValidMergeTextStrategy(strategy: string): strategy is MergeTextStrategy { return MERGE_TEXT_STRATEGY_VALID_VALUES.includes(strategy as MergeTextStrategy); } // #endregion MergeTextStrategy