@dialecte/scl 0.6.0 → 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.
Files changed (32) hide show
  1. package/dist/{hooks-CHS8tY1i.js → hooks-VMnZqbr-.js} +32372 -25113
  2. package/dist/v2019C1/config/dialecte.config.d.ts +28015 -20645
  3. package/dist/v2019C1/config/dialecte.config.d.ts.map +1 -1
  4. package/dist/v2019C1/definition/constants.generated.d.ts.map +1 -1
  5. package/dist/v2019C1/definition/definition.generated.d.ts +28015 -20645
  6. package/dist/v2019C1/definition/definition.generated.d.ts.map +1 -1
  7. package/dist/v2019C1/definition/types.generated.d.ts +1177 -100
  8. package/dist/v2019C1/definition/types.generated.d.ts.map +1 -1
  9. package/dist/v2019C1/extensions/lifecycle/constraints/classify-attribute.d.ts +4 -2
  10. package/dist/v2019C1/extensions/lifecycle/constraints/classify-attribute.d.ts.map +1 -1
  11. package/dist/v2019C1/extensions/lifecycle/constraints/find-constraint-violation.d.ts +19 -3
  12. package/dist/v2019C1/extensions/lifecycle/constraints/find-constraint-violation.d.ts.map +1 -1
  13. package/dist/v2019C1/extensions/lifecycle/constraints/find-constraint-violation.types.d.ts +6 -16
  14. package/dist/v2019C1/extensions/lifecycle/constraints/find-constraint-violation.types.d.ts.map +1 -1
  15. package/dist/v2019C1/extensions/lifecycle/constraints/index.d.ts +1 -1
  16. package/dist/v2019C1/extensions/lifecycle/constraints/index.d.ts.map +1 -1
  17. package/dist/v2019C1/extensions/lifecycle/constraints/resolve-placement-collision.d.ts +2 -2
  18. package/dist/v2019C1/extensions/lifecycle/constraints/resolve-placement-collision.d.ts.map +1 -1
  19. package/dist/v2019C1/extensions/lifecycle/constraints/resolve-unique-value.d.ts +13 -0
  20. package/dist/v2019C1/extensions/lifecycle/constraints/resolve-unique-value.d.ts.map +1 -1
  21. package/dist/v2019C1/extensions/lifecycle/engine/instance-tag.d.ts.map +1 -1
  22. package/dist/v2019C1/extensions/lifecycle/report/report.d.ts.map +1 -1
  23. package/dist/v2019C1/extensions/reference/constants/derived.d.ts +2 -2
  24. package/dist/v2019C1/extensions/reference/constants/derived.d.ts.map +1 -1
  25. package/dist/v2019C1/extensions/reference/query/resolve/resolve-reference-path.constants.d.ts +4 -1
  26. package/dist/v2019C1/extensions/reference/query/resolve/resolve-reference-path.constants.d.ts.map +1 -1
  27. package/dist/v2019C1/hooks/shared/ref-path-rebuild.d.ts +2 -1
  28. package/dist/v2019C1/hooks/shared/ref-path-rebuild.d.ts.map +1 -1
  29. package/dist/v2019C1/index.js +1 -1
  30. package/dist/v2019C1/test/assert-valid-scl-xml.d.ts.map +1 -1
  31. package/dist/v2019C1/test.js +55 -54
  32. package/package.json +3 -3
@@ -20,7 +20,9 @@ export declare function isEditableMode(mode: AttributeEditability): mode is (typ
20
20
  /**
21
21
  * The attributes of `tag` the UI may edit with no harmful side effect, each with its
22
22
  * edit mode. `rename` triggers a managed remap; `free` has no side effect. Identity
23
- * and reference attributes are omitted (nothing to show as editable).
23
+ * and reference attributes are omitted (nothing to show as editable). `attributes`: those
24
+ * the element's definition declares where it sits - its `xsi:type` included -, by default
25
+ * the tag's.
24
26
  */
25
- export declare function editableAttributes(tag: string): EditableAttribute[];
27
+ export declare function editableAttributes(tag: string, attributes?: readonly string[]): EditableAttribute[];
26
28
  //# sourceMappingURL=classify-attribute.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"classify-attribute.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/constraints/classify-attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAW,MAAM,gCAAgC,CAAA;AAUxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAEzF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,oBAAoB,CAOjF;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAC7B,IAAI,EAAE,oBAAoB,GACxB,IAAI,IAAI,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAEzC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAQnE"}
1
+ {"version":3,"file":"classify-attribute.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/constraints/classify-attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAW,MAAM,gCAAgC,CAAA;AAUxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAEzF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,oBAAoB,CAOjF;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAC7B,IAAI,EAAE,oBAAoB,GACxB,IAAI,IAAI,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAEzC;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CACjC,GAAG,EAAE,MAAM,EACX,UAAU,GAAE,SAAS,MAAM,EAE1B,GACC,iBAAiB,EAAE,CAQrB"}
@@ -1,12 +1,13 @@
1
- import { ConstraintViolation } from './find-constraint-violation.types';
1
+ import { ConstraintScope, ConstraintViolation } from './find-constraint-violation.types';
2
2
  import { Config, Scl } from '../../../config';
3
3
  import type * as Core from '@dialecte/core';
4
4
  /**
5
5
  * Detect whether placing a `childTag` element with the given `candidate` attribute
6
6
  * values under `parentRef` would violate a scoped-uniqueness constraint declared on
7
7
  * the parent (e.g. two children with the same `name` under one Bay). Schema-driven:
8
- * reads the parent's `constraints` and compares the candidate's key fields against
9
- * the existing children the constraint selects.
8
+ * reads the parent's `constraints` as declared where the parent sits (one tag may carry
9
+ * different rules under different parents) and compares the candidate's key fields
10
+ * against the existing children the constraint selects.
10
11
  *
11
12
  * Returns the first violation found, or `null` if the candidate is unique.
12
13
  * `excludeId` skips a specific existing child (e.g. the element itself when
@@ -18,4 +19,19 @@ export declare function findConstraintViolation(query: Core.Query<Config>, param
18
19
  candidate: Record<string, string | undefined>;
19
20
  excludeId?: string;
20
21
  }): Promise<ConstraintViolation | null>;
22
+ /**
23
+ * What a `childTag` placed under `parentRef` is compared with: the uniqueness constraints that
24
+ * select it, as declared where the parent sits, and the parent's children. Read once, then any
25
+ * number of candidates is checked in memory with {@link findViolationInScope}.
26
+ */
27
+ export declare function readConstraintScope(query: Core.Query<Config>, params: {
28
+ parentRef: Scl.Ref<Scl.ElementsOf>;
29
+ childTag: string;
30
+ }): Promise<ConstraintScope>;
31
+ /** The first constraint of `scope` the `candidate` breaks, or `null`. Pure. */
32
+ export declare function findViolationInScope(params: {
33
+ scope: ConstraintScope;
34
+ candidate: Record<string, string | undefined>;
35
+ excludeId?: string;
36
+ }): ConstraintViolation | null;
21
37
  //# sourceMappingURL=find-constraint-violation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"find-constraint-violation.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/constraints/find-constraint-violation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAoB,MAAM,mCAAmC,CAAA;AAC9F,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAC5C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EACzB,MAAM,EAAE;IACP,SAAS,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB,GACC,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CA+BrC"}
1
+ {"version":3,"file":"find-constraint-violation.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/constraints/find-constraint-violation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAC7F,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;;;;GAWG;AACH,wBAAsB,uBAAuB,CAC5C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EACzB,MAAM,EAAE;IACP,SAAS,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB,GACC,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAIrC;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACxC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EACzB,MAAM,EAAE;IAAE,SAAS,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC9D,OAAO,CAAC,eAAe,CAAC,CAgB1B;AAED,+EAA+E;AAC/E,wBAAgB,oBAAoB,CAAC,MAAM,EAAE;IAC5C,KAAK,EAAE,eAAe,CAAA;IACtB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,mBAAmB,GAAG,IAAI,CAiB7B"}
@@ -1,19 +1,4 @@
1
- /** A scoped-uniqueness constraint declared on a parent element (from the schema). */
2
- export type SchemaConstraint = {
3
- kind: string;
4
- name: string;
5
- selector?: {
6
- steps?: {
7
- kind: string;
8
- value?: string;
9
- }[];
10
- }[];
11
- fields?: {
12
- target?: {
13
- value?: string;
14
- };
15
- }[];
16
- };
1
+ import type * as Core from '@dialecte/core';
17
2
  /** A detected violation: the constraint broken and the existing child it collides with. */
18
3
  export type ConstraintViolation = {
19
4
  /** The violated constraint's name (e.g. `uniqueChildNameInBay`). */
@@ -23,4 +8,9 @@ export type ConstraintViolation = {
23
8
  /** The id of the existing sibling the candidate collides with. */
24
9
  offendingId: string;
25
10
  };
11
+ /** The uniqueness constraints a child is compared under, and the siblings it is compared with. */
12
+ export type ConstraintScope = {
13
+ constraints: readonly Core.IdentityConstraint[];
14
+ children: readonly Core.AnyTreeRecord[];
15
+ };
26
16
  //# sourceMappingURL=find-constraint-violation.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"find-constraint-violation.types.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/constraints/find-constraint-violation.types.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;KAAE,EAAE,CAAA;IAC3D,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,EAAE,CAAA;CAC1C,CAAA;AAED,2FAA2F;AAC3F,MAAM,MAAM,mBAAmB,GAAG;IACjC,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAA;IAClB,gEAAgE;IAChE,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,kEAAkE;IAClE,WAAW,EAAE,MAAM,CAAA;CACnB,CAAA"}
1
+ {"version":3,"file":"find-constraint-violation.types.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/constraints/find-constraint-violation.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C,2FAA2F;AAC3F,MAAM,MAAM,mBAAmB,GAAG;IACjC,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAA;IAClB,gEAAgE;IAChE,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,kEAAkE;IAClE,WAAW,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,kGAAkG;AAClG,MAAM,MAAM,eAAe,GAAG;IAC7B,WAAW,EAAE,SAAS,IAAI,CAAC,kBAAkB,EAAE,CAAA;IAC/C,QAAQ,EAAE,SAAS,IAAI,CAAC,aAAa,EAAE,CAAA;CACvC,CAAA"}
@@ -7,7 +7,7 @@ export { resolveUniqueValue } from './resolve-unique-value';
7
7
  export { resolvePlacementCollision } from './resolve-placement-collision';
8
8
  export { makeUnique } from './make-unique';
9
9
  export type { AttributeEditability, EditableAttribute } from './classify-attribute.types';
10
- export type { ConstraintViolation, SchemaConstraint } from './find-constraint-violation.types';
10
+ export type { ConstraintViolation } from './find-constraint-violation.types';
11
11
  export type { PlacementResolution } from './resolve-placement-collision.types';
12
12
  export type { MakeUniqueParams } from './make-unique.types';
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/constraints/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC5F,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAA;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,YAAY,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACzF,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AAC9F,YAAY,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAC9E,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/constraints/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC5F,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAA;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,YAAY,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACzF,YAAY,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAC5E,YAAY,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAC9E,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA"}
@@ -5,9 +5,9 @@ import type * as Core from '@dialecte/core';
5
5
  * Validate a just-placed element against its parent context and resolve a scoped-
6
6
  * uniqueness collision GENERICALLY over whichever key field is EDITABLE:
7
7
  *
8
- * 1. detect a violation from the parent (`findConstraintViolation`);
8
+ * 1. detect a violation from the parent (`findViolationInScope`, on the scope read once);
9
9
  * 2. if the violated key includes an editable field (`rename`/`free` per
10
- * `classifyAttribute`), bump it to the first free value (`resolveUniqueValue`)
10
+ * `classifyAttribute`), bump it to the first free value (`findUniqueValueInScope`)
11
11
  * and apply it — the after-updated hook then rebuilds any ref paths that
12
12
  * traverse it;
13
13
  * 3. if the violated key is entirely IDENTITY (e.g. an LNode lnClass/lnInst tuple),
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-placement-collision.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/constraints/resolve-placement-collision.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAC9E,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,yBAAyB,CAC9C,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAC5B,MAAM,EAAE;IACP,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IAC5B,SAAS,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAClC,GACC,OAAO,CAAC,mBAAmB,CAAC,CA2C9B"}
1
+ {"version":3,"file":"resolve-placement-collision.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/constraints/resolve-placement-collision.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAC9E,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,yBAAyB,CAC9C,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAC5B,MAAM,EAAE;IACP,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IAC5B,SAAS,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAClC,GACC,OAAO,CAAC,mBAAmB,CAAC,CAyC9B"}
@@ -1,3 +1,4 @@
1
+ import { ConstraintScope } from './find-constraint-violation.types';
1
2
  import { Config, Scl } from '../../../config';
2
3
  import type * as Core from '@dialecte/core';
3
4
  /**
@@ -19,4 +20,16 @@ export declare function resolveUniqueValue(query: Core.Query<Config>, params: {
19
20
  attr: string;
20
21
  excludeId?: string;
21
22
  }): Promise<string>;
23
+ /**
24
+ * {@link resolveUniqueValue} on a scope already read: the scope does not change between
25
+ * attempts, so the values are tried in memory. Pure, apart from the error when none is free.
26
+ */
27
+ export declare function findUniqueValueInScope(params: {
28
+ scope: ConstraintScope;
29
+ parentRef: Scl.Ref<Scl.ElementsOf>;
30
+ childTag: string;
31
+ candidate: Record<string, string | undefined>;
32
+ attr: string;
33
+ excludeId?: string;
34
+ }): string;
22
35
  //# sourceMappingURL=resolve-unique-value.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-unique-value.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/constraints/resolve-unique-value.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAI3C;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CACvC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EACzB,MAAM,EAAE;IACP,SAAS,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB,GACC,OAAO,CAAC,MAAM,CAAC,CAyBjB"}
1
+ {"version":3,"file":"resolve-unique-value.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/constraints/resolve-unique-value.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAA;AACxE,OAAO,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAI3C;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CACvC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EACzB,MAAM,EAAE;IACP,SAAS,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB,GACC,OAAO,CAAC,MAAM,CAAC,CAIjB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE;IAC9C,KAAK,EAAE,eAAe,CAAA;IACtB,SAAS,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,MAAM,CAiBT"}
@@ -1 +1 @@
1
- {"version":3,"file":"instance-tag.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/engine/instance-tag.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAkBnD,kGAAkG;AAClG,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,gFAAgF;AAChF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAErE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,WAAW,SAAS,aAAa,EAAE,MAAM,EAAE;IACzE,IAAI,EAAE,WAAW,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;CACrB,GAAG,WAAW,CAed"}
1
+ {"version":3,"file":"instance-tag.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/engine/instance-tag.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAWnD,kGAAkG;AAClG,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,gFAAgF;AAChF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAErE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,WAAW,SAAS,aAAa,EAAE,MAAM,EAAE;IACzE,IAAI,EAAE,WAAW,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;CACrB,GAAG,WAAW,CAiBd"}
@@ -1 +1 @@
1
- {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/report/report.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAA;AAC1F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAA;AAClF,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;;;GAUG;AACH,wBAAsB,MAAM,CAC3B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EACzB,MAAM,EAAE,qBAAqB,GAC3B,OAAO,CAAC,UAAU,CAAC,CAmDrB"}
1
+ {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/lifecycle/report/report.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAA;AAC1F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAA;AAClF,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;;;GAUG;AACH,wBAAsB,MAAM,CAC3B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EACzB,MAAM,EAAE,qBAAqB,GAC3B,OAAO,CAAC,UAAU,CAAC,CA2DrB"}
@@ -45,8 +45,8 @@ export declare const MAPPED_NAME_REFS: ReadonlyMap<string, {
45
45
  export declare const MAPPED_DATA_DEFAULT_ATTRIBUTES: ReadonlyMap<string, readonly string[]>;
46
46
  /**
47
47
  * The schema patterns of each mapped-name attribute (`mappedDoName` / `mappedDaName`), per
48
- * ref tag, each anchored to the whole value. A value must match all of them; a data path that
49
- * does not cannot be stored. Read from the definition.
48
+ * ref tag, one per level of its datatype, each anchored to the whole value. A value must match
49
+ * all of them; a data path that does not cannot be stored. Read from the definition.
50
50
  */
51
51
  export declare const MAPPED_NAME_PATTERNS: ReadonlyMap<string, readonly RegExp[]>;
52
52
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"derived.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/reference/constants/derived.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE3D;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,qFAAwD,CAAA;AAE3F;;;GAGG;AACH,eAAO,MAAM,sBAAsB,sFAMzB,CAAA;AAEV;;;;;GAKG;AACH,eAAO,MAAM,eAAe,qGAAoE,CAAA;AAEhG;;;GAGG;AACH,eAAO,MAAM,YAAY,+CAA2C,CAAA;AAEpE;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAQhF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAC/C,CAAA;AAEnC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAcvE,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAMpD,CAAA;AAID,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAKzE,CAAA;AAED,0FAA0F;AAC1F,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,YAAY,EAAE,SAAS,cAAc,EAAE,CACvC,CAAA;AAEtD,+EAA+E;AAC/E,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAA+C,CAAA;AAEnG;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,MAAM,CAGtD,CAAA"}
1
+ {"version":3,"file":"derived.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/reference/constants/derived.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAG3D;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,qFAAwD,CAAA;AAE3F;;;GAGG;AACH,eAAO,MAAM,sBAAsB,sFAMzB,CAAA;AAEV;;;;;GAKG;AACH,eAAO,MAAM,eAAe,qGAAoE,CAAA;AAEhG;;;GAGG;AACH,eAAO,MAAM,YAAY,+CAA2C,CAAA;AAEpE;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAQhF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAC/C,CAAA;AAEnC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAMvE,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAMpD,CAAA;AAID,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAKzE,CAAA;AAED,0FAA0F;AAC1F,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,YAAY,EAAE,SAAS,cAAc,EAAE,CACvC,CAAA;AAEtD,+EAA+E;AAC/E,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAA+C,CAAA;AAEnG;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,MAAM,CAGtD,CAAA"}
@@ -1,4 +1,7 @@
1
- /** The logical node classes the schema knows: they spell the class out of a segment. */
1
+ /**
2
+ * The logical node classes the schema knows: they spell the class out of a segment. Read from the
3
+ * union of enumerations of its datatype (the extension member is a pattern).
4
+ */
2
5
  export declare const LN_CLASS_VALUES: ReadonlySet<string>;
3
6
  /**
4
7
  * The IED logical nodes, found by their class then prefix and instance. An LNode is not among
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-reference-path.constants.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/reference/query/resolve/resolve-reference-path.constants.ts"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAE/C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAGrD,CAAA"}
1
+ {"version":3,"file":"resolve-reference-path.constants.d.ts","sourceRoot":"","sources":["../../../../../../src/v2019C1/extensions/reference/query/resolve/resolve-reference-path.constants.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAE/C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAGrD,CAAA"}
@@ -7,7 +7,8 @@ import type * as Core from '@dialecte/core';
7
7
  *
8
8
  * Skips `unsupported` paths (e.g. `VariableApplyTo` XPaths), which must not be
9
9
  * regenerated as plain name-paths, and mapped-name refs (`DOS`/`SDS`/`DAS`), which
10
- * are reconciled separately.
10
+ * are reconciled separately. Every rebuilt path lands in one update of the record:
11
+ * an update per pair would each start from the same attributes and only the last would stay.
11
12
  */
12
13
  export declare function reconcileReferrerRefPaths(params: {
13
14
  oldRecord: Scl.RawRecord<Scl.ElementsOf>;
@@ -1 +1 @@
1
- {"version":3,"file":"ref-path-rebuild.d.ts","sourceRoot":"","sources":["../../../../src/v2019C1/hooks/shared/ref-path-rebuild.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;GAQG;AACH,wBAAsB,yBAAyB,CAAC,MAAM,EAAE;IACvD,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACxC,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACxC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;CACzB,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAe3B"}
1
+ {"version":3,"file":"ref-path-rebuild.d.ts","sourceRoot":"","sources":["../../../../src/v2019C1/hooks/shared/ref-path-rebuild.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,KAAK,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAE3C;;;;;;;;;GASG;AACH,wBAAsB,yBAAyB,CAAC,MAAM,EAAE;IACvD,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACxC,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IACxC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;CACzB,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAgB3B"}
@@ -1,4 +1,4 @@
1
- import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, Q as g, R as _, S as v, T as y, U as b, V as x, W as S, X as C, Y as w, Z as T, _ as E, a as D, b as O, c as k, d as A, f as j, g as M, h as N, i as P, j as F, k as I, l as L, m as R, n as z, o as B, p as V, q as H, r as U, s as W, t as G, u as K, v as q, x as J, y as Y, z as X } from "../hooks-CHS8tY1i.js";
1
+ import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, Q as g, R as _, S as v, T as y, U as b, V as x, W as S, X as C, Y as w, Z as T, _ as E, a as D, b as O, c as k, d as A, f as j, g as M, h as N, i as P, j as F, k as I, l as L, m as R, n as z, o as B, p as V, q as H, r as U, s as W, t as G, u as K, v as q, x as J, y as Y, z as X } from "../hooks-VMnZqbr-.js";
2
2
  import { Project as Z } from "@dialecte/core";
3
3
  //#region src/v2019C1/extensions/lifecycle/validate/template-uuid-check.info.ts
4
4
  var Q = {
@@ -1 +1 @@
1
- {"version":3,"file":"assert-valid-scl-xml.d.ts","sourceRoot":"","sources":["../../../src/v2019C1/test/assert-valid-scl-xml.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,iBAAiB,sGAAiB,CAAA;AAC/C,eAAO,MAAM,uBAAuB,+EAA0B,CAAA"}
1
+ {"version":3,"file":"assert-valid-scl-xml.d.ts","sourceRoot":"","sources":["../../../src/v2019C1/test/assert-valid-scl-xml.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,iBAAiB,sGAAiB,CAAA;AAC/C,eAAO,MAAM,uBAAuB,+EAA0B,CAAA"}
@@ -1,37 +1,37 @@
1
- import { $ as e, C as t, D as n, J as r, Q as i, X as a, n as o, r as s, t as c, w as l } from "../hooks-CHS8tY1i.js";
2
- import { CUSTOM_RECORD_ID_ATTRIBUTE as u, CUSTOM_RECORD_ID_ATTRIBUTE_NAME as d, XMLNS_XSI_NAMESPACE as f } from "@dialecte/core/helpers";
3
- import { XMLNS_DEV_NAMESPACE as p, createTestProject as m, createTestRecordFactory as h, createTestRunner as g, createXmlAssertions as _, createXmlSchemaAssertions as v } from "@dialecte/core/test";
1
+ import { $ as e, C as t, D as n, J as r, Q as i, X as a, et as o, n as s, r as c, t as l, w as u } from "../hooks-VMnZqbr-.js";
2
+ import { CUSTOM_RECORD_ID_ATTRIBUTE as d, CUSTOM_RECORD_ID_ATTRIBUTE_NAME as f, XMLNS_XSI_NAMESPACE as p } from "@dialecte/core/helpers";
3
+ import { XMLNS_DEV_NAMESPACE as m, createTestProject as h, createTestRecordFactory as g, createTestRunner as _, createXmlAssertions as v, createXmlSchemaAssertions as y } from "@dialecte/core/test";
4
4
  //#region src/v2019C1/test/assert-coherent-scl-references.ts
5
- var y = Object.values(i).map((e) => e.uri);
6
- function b(e) {
7
- let { xml: t } = e, n = [...new DOMParser().parseFromString(t, "application/xml").querySelectorAll("*")].filter(O), r = k(n);
8
- return n.flatMap((e) => T({
5
+ var b = Object.values(i).map((e) => e.uri);
6
+ function x(e) {
7
+ let { xml: t } = e, n = [...new DOMParser().parseFromString(t, "application/xml").querySelectorAll("*")].filter(k), r = A(n);
8
+ return n.flatMap((e) => E({
9
9
  element: e,
10
10
  elementsByUuid: r
11
11
  }));
12
12
  }
13
- function x(e) {
14
- let { xml: t, label: n = "test XML" } = e, r = C({
13
+ function S(e) {
14
+ let { xml: t, label: n = "test XML" } = e, r = w({
15
15
  xml: t,
16
16
  label: n
17
17
  });
18
18
  if (r) throw Error(r);
19
19
  }
20
- function S(e) {
21
- let { testCases: t } = e, n = Object.entries(t).flatMap(([e, t]) => t.allowIncoherentReferences ? [] : [C({
20
+ function C(e) {
21
+ let { testCases: t } = e, n = Object.entries(t).flatMap(([e, t]) => t.allowIncoherentReferences ? [] : [w({
22
22
  xml: t.sourceXml,
23
23
  label: `${e} › sourceXml`
24
- }), t.targetXml ? C({
24
+ }), t.targetXml ? w({
25
25
  xml: t.targetXml,
26
26
  label: `${e} › targetXml`
27
27
  }) : void 0].filter((e) => e !== void 0));
28
28
  if (n.length > 0) throw Error(n.join("\n"));
29
29
  }
30
- function C(e) {
31
- let { xml: t, label: n } = e, r = b({ xml: t });
32
- if (r.length !== 0) return `${n}: incoherent references:\n ${r.map(w).join("\n ")}`;
33
- }
34
30
  function w(e) {
31
+ let { xml: t, label: n } = e, r = x({ xml: t });
32
+ if (r.length !== 0) return `${n}: incoherent references:\n ${r.map(T).join("\n ")}`;
33
+ }
34
+ function T(e) {
35
35
  let t = `<${e.referenceTagName}>`;
36
36
  switch (e.kind) {
37
37
  case "path": return `[path] ${t} ${e.pathAttribute}="${e.written}" is not the path of the element ${e.uuidAttribute}="${e.uuid}" points at, which is "${e.expected}"`;
@@ -40,15 +40,15 @@ function w(e) {
40
40
  case "empty": return `[empty] ${t} ${e.uuidAttribute} is empty`;
41
41
  }
42
42
  }
43
- function T(e) {
43
+ function E(e) {
44
44
  let { element: t, elementsByUuid: n } = e, i = r[t.localName];
45
- return i ? i.flatMap((e) => E({
45
+ return i ? i.flatMap((e) => D({
46
46
  element: t,
47
47
  pair: e,
48
48
  elementsByUuid: n
49
49
  })) : [];
50
50
  }
51
- function E(e) {
51
+ function D(e) {
52
52
  let { element: t, pair: n, elementsByUuid: r } = e, i = t.getAttribute(n.attribute.uuid);
53
53
  if (i === null) return [];
54
54
  let a = n.attribute.uuid, o = t.localName;
@@ -64,24 +64,24 @@ function E(e) {
64
64
  uuidAttribute: a,
65
65
  uuid: i
66
66
  }];
67
- let c = n.target, u = s.find((e) => c.includes(e.localName));
68
- if (!u) return [{
67
+ let c = n.target, l = s.find((e) => c.includes(e.localName));
68
+ if (!l) return [{
69
69
  kind: "wrong-target",
70
70
  referenceTagName: o,
71
71
  uuidAttribute: a,
72
72
  uuid: i,
73
73
  targetTagName: s[0].localName
74
74
  }];
75
- if (!D({
75
+ if (!O({
76
76
  pair: n,
77
- target: u
77
+ target: l
78
78
  })) return [];
79
79
  let d = t.getAttribute(n.attribute.path);
80
80
  if (d === null) return [];
81
- let f = A(u), p = l({
82
- record: M(u),
83
- ancestry: f.map((e, t) => M(e, `ancestor-${t}`)),
84
- specNamings: j(f)
81
+ let f = j(l), p = u({
82
+ record: N(l),
83
+ ancestry: f.map((e, t) => N(e, `ancestor-${t}`)),
84
+ specNamings: M(f)
85
85
  });
86
86
  return !p || p.path === d ? [] : [{
87
87
  kind: "path",
@@ -93,14 +93,14 @@ function E(e) {
93
93
  expected: p.path
94
94
  }];
95
95
  }
96
- function D(e) {
96
+ function O(e) {
97
97
  let { pair: r, target: i } = e;
98
98
  return r.resolution === t.direct ? n[i.localName]?.type === "name" : !1;
99
99
  }
100
- function O(e) {
101
- return e.namespaceURI !== null && y.includes(e.namespaceURI);
102
- }
103
100
  function k(e) {
101
+ return e.namespaceURI !== null && b.includes(e.namespaceURI);
102
+ }
103
+ function A(e) {
104
104
  let t = /* @__PURE__ */ new Map();
105
105
  for (let n of e) {
106
106
  let e = n.getAttribute("uuid");
@@ -110,20 +110,20 @@ function k(e) {
110
110
  }
111
111
  return t;
112
112
  }
113
- function A(e) {
113
+ function j(e) {
114
114
  let t = [], n = e.parentElement;
115
115
  for (; n;) t.unshift(n), n = n.parentElement;
116
116
  return t;
117
117
  }
118
- function j(e) {
118
+ function M(e) {
119
119
  let t = /* @__PURE__ */ new Map();
120
120
  return e.forEach((e, n) => {
121
121
  if (e.localName !== "LNode") return;
122
122
  let r = [...e.getElementsByTagNameNS("*", "LNodeSpecNaming")].find((t) => t.parentElement?.parentElement === e);
123
- r && t.set(`ancestor-${n}`, M(r));
123
+ r && t.set(`ancestor-${n}`, N(r));
124
124
  }), t;
125
125
  }
126
- function M(e, t = "") {
126
+ function N(e, t = "") {
127
127
  return {
128
128
  id: t,
129
129
  tagName: e.localName,
@@ -142,43 +142,44 @@ function M(e, t = "") {
142
142
  }
143
143
  //#endregion
144
144
  //#region src/v2019C1/test/assert-valid-scl-xml.ts
145
- var { assertValidXml: N, assertValidXmlTestCases: P } = v({
145
+ var { assertValidXml: P, assertValidXmlTestCases: F } = y({
146
146
  definition: e,
147
+ types: o,
147
148
  namespaces: i,
148
149
  schemaName: "SCL"
149
- }), F = N, I = P, L = {
150
- ...o(),
151
- ...c
152
- }, R = `xmlns="${a.namespaces.default.uri}"`, z = `xmlns:${a.namespaces.v2019C1.prefix}="${a.namespaces.v2019C1.uri}"`, B = `${R} ${z} ${p} ${f}`, V = { base: s }, H = g({
150
+ }), I = P, L = F, R = {
151
+ ...s(),
152
+ ...l
153
+ }, z = `xmlns="${a.namespaces.default.uri}"`, B = `xmlns:${a.namespaces.v2019C1.prefix}="${a.namespaces.v2019C1.uri}"`, V = `${z} ${B} ${m} ${p}`, H = { base: c }, U = _({
153
154
  dialecteConfig: a,
154
- extensions: V,
155
- hooks: L
156
- }), U = {
157
- ...H,
155
+ extensions: H,
156
+ hooks: R
157
+ }), W = {
158
+ ...U,
158
159
  withExport(e) {
159
- I({ testCases: e.testCases }), S({ testCases: e.testCases }), H.withExport(e);
160
+ L({ testCases: e.testCases }), C({ testCases: e.testCases }), U.withExport(e);
160
161
  },
161
162
  withoutExport(e) {
162
- I({ testCases: e.testCases }), S({ testCases: e.testCases }), H.withoutExport(e);
163
+ L({ testCases: e.testCases }), C({ testCases: e.testCases }), U.withoutExport(e);
163
164
  }
164
165
  };
165
- async function W(e) {
166
+ async function G(e) {
166
167
  let { sourceXml: t, targetXml: n, dev: r, allowIncoherentReferences: i } = e;
167
- return F(t, "sourceXml", { requireComplete: !1 }), n && F(n, "targetXml", { requireComplete: !1 }), i || (x({
168
+ return I(t, "sourceXml", { requireComplete: !1 }), n && I(n, "targetXml", { requireComplete: !1 }), i || (S({
168
169
  xml: t,
169
170
  label: "sourceXml"
170
- }), n && x({
171
+ }), n && S({
171
172
  xml: n,
172
173
  label: "targetXml"
173
- })), m({
174
+ })), h({
174
175
  sourceXml: t,
175
176
  targetXml: n,
176
177
  dialecteConfig: a,
177
- extensions: V,
178
- hooks: L,
178
+ extensions: H,
179
+ hooks: R,
179
180
  dev: r
180
181
  });
181
182
  }
182
- var G = h(a), { assertExpectedElementQueries: K, assertUnexpectedElementQueries: q } = _({ namespaces: a.namespaces });
183
+ var K = g(a), { assertExpectedElementQueries: q, assertUnexpectedElementQueries: J } = v({ namespaces: a.namespaces });
183
184
  //#endregion
184
- export { B as ALL_XMLNS_NAMESPACES, u as CUSTOM_RECORD_ID_ATTRIBUTE, d as CUSTOM_RECORD_ID_ATTRIBUTE_NAME, z as XMLNS_SCL_6_100_NAMESPACE, R as XMLNS_SCL_NAMESPACE, x as assertCoherentSclReferences, K as assertExpectedElementQueries, q as assertUnexpectedElementQueries, F as assertValidSclXml, W as createSclTestProject, G as createSclTestRecord, U as runSclTestCases };
185
+ export { V as ALL_XMLNS_NAMESPACES, d as CUSTOM_RECORD_ID_ATTRIBUTE, f as CUSTOM_RECORD_ID_ATTRIBUTE_NAME, B as XMLNS_SCL_6_100_NAMESPACE, z as XMLNS_SCL_NAMESPACE, S as assertCoherentSclReferences, q as assertExpectedElementQueries, J as assertUnexpectedElementQueries, I as assertValidSclXml, G as createSclTestProject, K as createSclTestRecord, W as runSclTestCases };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dialecte/scl",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "Dialecte - SCL (Substation Configuration Language) sdk",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -56,10 +56,10 @@
56
56
  "prepare": "husky"
57
57
  },
58
58
  "dependencies": {
59
- "@dialecte/core": "0.5.4"
59
+ "@dialecte/core": "0.6.1"
60
60
  },
61
61
  "devDependencies": {
62
- "@dialecte/cli": "0.0.3",
62
+ "@dialecte/cli": "0.1.0",
63
63
  "@tsconfig/node24": "^24.0.4",
64
64
  "@types/node": "^24.12.4",
65
65
  "@typescript/native": "npm:typescript@^7.0.2",