22 * @license
33 * Copyright Google LLC All Rights Reserved.
44 *
5- * Use of this source code is governed by an MIT-style license that can be
6- * found in the LICENSE file at https://angular.dev/license
5+ * 이 소스 코드의 사용은 https://angular.dev/license의 LICENSE 파일에 기재된 MIT 스타일 라이센스에 의해 관리됩니다.
76 */
87import {
98 AnimateTimings ,
@@ -81,40 +80,39 @@ const SELF_TOKEN = ':self';
8180const SELF_TOKEN_REGEX = /* @__PURE__ */ new RegExp ( `s*${ SELF_TOKEN } s*,?` , 'g' ) ;
8281
8382/*
84- * [Validation ]
85- * The visitor code below will traverse the animation AST generated by the animation verb functions
86- * (the output is a tree of objects) and attempt to perform a series of validations on the data. The
87- * following corner-cases will be validated :
83+ * [유효성 검사 ]
84+ * 아래의 방문자 코드는 애니메이션 동사 함수에 의해 생성된 애니메이션 AST를 탐색하며
85+ * (출력은 객체의 트리입니다) 데이터에 대해 일련의 유효성 검사를 수행합니다.
86+ * 다음과 같은 가장자리 사례가 유효성이 검사를 받을 것입니다 :
8887 *
89- * 1. Overlap of animations
90- * Given that a CSS property cannot be animated in more than one place at the same time, it's
91- * important that this behavior is detected and validated. The way in which this occurs is that
92- * each time a style property is examined, a string-map containing the property will be updated with
93- * the start and end times for when the property is used within an animation step .
88+ * 1. 애니메이션의 오버랩
89+ * CSS 속성은 동시에 여러 장소에서 애니메이션할 수 없으므로,
90+ * 이 행동이 감지되고 유효성이 검사가 중요합니다. 이는 스타일 속성이 검사될 때마다
91+ * 해당 속성이 애니메이션 단계 내에서 사용될 때의 시작 및 종료 시간을 포함하는 문자열-지도에
92+ * 속성이 업데이트되는 방식으로 발생합니다 .
9493 *
95- * If there are two or more parallel animations that are currently running (these are invoked by the
96- * group()) on the same element then the validator will throw an error. Since the start/end timing
97- * values are collected for each property then if the current animation step is animating the same
98- * property and its timing values fall anywhere into the window of time that the property is
99- * currently being animated within then this is what causes an error.
94+ * 만약 현재 실행 중인 두 개 이상의 병렬 애니메이션이(이는 group()에 의해 호출됨)
95+ * 동일한 요소에서 실행되고 있다면, 유효성 검사기가 오류를 발생시킵니다. 현재 애니메이션 단게가
96+ * 같은 속성을 애니메이션하고 있고 그 타이밍 값이 현재 애니메이션 중인 시간 창에
97+ * 해당 속성의 타이밍 값이 포함된다면 오류를 발생시킵니다.
10098 *
101- * 2. Timing values
102- * The validator will validate to see if a timing value of `duration delay easing` or
103- * `durationNumber` is valid or not .
99+ * 2. 타이밍 값
100+ * 유효성 검사기는 `duration delay easing` 또는
101+ * `durationNumber`의 타이밍 값이 유효한지 확인합니다 .
104102 *
105- * (note that upon validation the code below will replace the timing data with an object containing
106- * {duration,delay,easing}.
103+ * (유효성 검사 시 다음 코드는 타이밍 데이터를 {duration,delay,easing}을 포함하는 객체로
104+ * 대체합니다.)
107105 *
108- * 3. Offset Validation
109- * Each of the style() calls are allowed to have an offset value when placed inside of keyframes() .
110- * Offsets within keyframes() are considered valid when :
106+ * 3. 오프셋 유효성 검사
107+ * style() 호출은 keyframes() 내에 있을 때 오프셋 값을 가질 수 있습니다 .
108+ * keyframes() 내의 오프셋은 다음과 같은 경우에 유효하다고 간주됩니다 :
111109 *
112- * - No offsets are used at all
113- * - Each style() entry contains an offset value
114- * - Each offset is between 0 and 1
115- * - Each offset is greater to or equal than the previous one
110+ * - 전혀 오프셋을 사용하지 않을 때
111+ * - 각 style() 항목이 오프셋 값을 포함할 때
112+ * - 각 오프셋이 0과 1 사이일 때
113+ * - 각 오프셋이 이전 오프셋보다 크거나 같을 때
116114 *
117- * Otherwise an error will be thrown .
115+ * 그렇지 않으면 오류가 발생합니다 .
118116 */
119117export function buildAnimationAst (
120118 driver : AnimationDriver ,
@@ -395,8 +393,8 @@ export class AnimationAstBuilderVisitor implements AnimationDslVisitor {
395393 }
396394 }
397395
398- // This is guaranteed to have a defined Map at this querySelector location making it
399- // safe to add the assertion here. It is set as a default empty map in prior methods .
396+ // 이 쿼리 선택자 위치에는 정의된 Map이 있음을 보장하며
397+ // 여기서 단언을 추가하는 것이 안전합니다. 이전 메소드에서 기본적으로 빈 맵으로 설정됩니다 .
400398 const collectedStyles = context . collectedStyles . get ( context . currentQuerySelector ! ) ! ;
401399 const collectedEntry = collectedStyles . get ( prop ) ;
402400 let updateCollectedStyle = true ;
@@ -418,9 +416,8 @@ export class AnimationAstBuilderVisitor implements AnimationDslVisitor {
418416 updateCollectedStyle = false ;
419417 }
420418
421- // we always choose the smaller start time value since we
422- // want to have a record of the entire animation window where
423- // the style property is being animated in between
419+ // 우리는 항상 더 작은 시작 시간 값을 선택합니다.
420+ // 왜냐하면 우리는 스타일 속성이 애니메이션되는 전체 애니메이션 창을 기록하고 싶기 때문입니다.
424421 startTime = collectedEntry . startTime ;
425422 }
426423
@@ -593,8 +590,8 @@ function normalizeSelector(selector: string): [string, boolean] {
593590 selector = selector . replace ( SELF_TOKEN_REGEX , '' ) ;
594591 }
595592
596- // Note: the :enter and :leave aren't normalized here since those
597- // selectors are filled in at runtime during timeline building
593+ // 참고: :enter 및 :leave는 여기에서 정규화되지 않으며,
594+ // 해당 선택자는 시간표 구축 시 런타임 동안 채워집니다.
598595 selector = selector
599596 . replace ( / @ \* / g, NG_TRIGGER_SELECTOR )
600597 . replace ( / @ \w + / g, ( match ) => NG_TRIGGER_SELECTOR + '-' + match . slice ( 1 ) )
0 commit comments