@anglr/common 11.2.0-beta.20220228151413 → 11.2.0-beta.20220228163820

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 (69) hide show
  1. package/changelog.md +27 -0
  2. package/es2015/floating-ui/src/index.js +2 -0
  3. package/es2015/floating-ui/src/index.js.map +1 -0
  4. package/es2015/floating-ui/src/services/floatingUiDomPosition.service.js +111 -0
  5. package/es2015/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -0
  6. package/es2015/floating-ui/src/services/index.js +2 -0
  7. package/es2015/floating-ui/src/services/index.js.map +1 -0
  8. package/es2015/src/index.js +1 -1
  9. package/es2015/src/index.js.map +1 -1
  10. package/es2015/src/services/position/index.js +4 -0
  11. package/es2015/src/services/position/index.js.map +1 -0
  12. package/es2015/src/services/position/position.interface.js +2 -0
  13. package/es2015/src/services/position/position.interface.js.map +1 -0
  14. package/es2015/src/services/position/position.types.js +85 -0
  15. package/es2015/src/services/position/position.types.js.map +1 -0
  16. package/es2015/src/services/position/position.utils.js +12 -0
  17. package/es2015/src/services/position/position.utils.js.map +1 -0
  18. package/es2015/src/types/tokens.js +2 -2
  19. package/es2015/src/types/tokens.js.map +1 -1
  20. package/es2020/floating-ui/src/index.js +2 -0
  21. package/es2020/floating-ui/src/index.js.map +1 -0
  22. package/es2020/floating-ui/src/services/floatingUiDomPosition.service.js +108 -0
  23. package/es2020/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -0
  24. package/es2020/floating-ui/src/services/index.js +2 -0
  25. package/es2020/floating-ui/src/services/index.js.map +1 -0
  26. package/es2020/src/index.js +1 -1
  27. package/es2020/src/index.js.map +1 -1
  28. package/es2020/src/services/position/index.js +4 -0
  29. package/es2020/src/services/position/index.js.map +1 -0
  30. package/es2020/src/services/position/position.interface.js +2 -0
  31. package/es2020/src/services/position/position.interface.js.map +1 -0
  32. package/es2020/src/services/position/position.types.js +85 -0
  33. package/es2020/src/services/position/position.types.js.map +1 -0
  34. package/es2020/src/services/position/position.utils.js +12 -0
  35. package/es2020/src/services/position/position.utils.js.map +1 -0
  36. package/es2020/src/types/tokens.js +2 -2
  37. package/es2020/src/types/tokens.js.map +1 -1
  38. package/floating-ui/package.json +9 -0
  39. package/floating-ui/src/index.d.ts +2 -0
  40. package/{src/services/alignment → floating-ui/src}/index.d.ts.map +1 -1
  41. package/floating-ui/src/services/floatingUiDomPosition.service.d.ts +17 -0
  42. package/floating-ui/src/services/floatingUiDomPosition.service.d.ts.map +1 -0
  43. package/floating-ui/src/services/index.d.ts +2 -0
  44. package/floating-ui/src/services/index.d.ts.map +1 -0
  45. package/package.json +9 -3
  46. package/src/index.d.ts +1 -1
  47. package/src/index.d.ts.map +1 -1
  48. package/src/services/position/index.d.ts +4 -0
  49. package/src/services/position/index.d.ts.map +1 -0
  50. package/src/services/position/position.interface.d.ts +81 -0
  51. package/src/services/position/position.interface.d.ts.map +1 -0
  52. package/src/services/position/position.types.d.ts +83 -0
  53. package/src/services/position/position.types.d.ts.map +1 -0
  54. package/src/services/position/position.utils.d.ts +7 -0
  55. package/src/services/position/position.utils.d.ts.map +1 -0
  56. package/src/types/tokens.d.ts +3 -3
  57. package/src/types/tokens.d.ts.map +1 -1
  58. package/version.bak +1 -1
  59. package/es2015/src/services/alignment/alignment.interface.js +0 -2
  60. package/es2015/src/services/alignment/alignment.interface.js.map +0 -1
  61. package/es2015/src/services/alignment/index.js +0 -2
  62. package/es2015/src/services/alignment/index.js.map +0 -1
  63. package/es2020/src/services/alignment/alignment.interface.js +0 -2
  64. package/es2020/src/services/alignment/alignment.interface.js.map +0 -1
  65. package/es2020/src/services/alignment/index.js +0 -2
  66. package/es2020/src/services/alignment/index.js.map +0 -1
  67. package/src/services/alignment/alignment.interface.d.ts +0 -6
  68. package/src/services/alignment/alignment.interface.d.ts.map +0 -1
  69. package/src/services/alignment/index.d.ts +0 -2
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Available positions for placement of target element against its source
3
+ */
4
+ export var PositionPlacement;
5
+ (function (PositionPlacement) {
6
+ /**
7
+ * Target is placed on the top (above) of source element in the middle of its width
8
+ */
9
+ PositionPlacement[PositionPlacement["Top"] = 0] = "Top";
10
+ /**
11
+ * Target is placed on the top (above) of source element at the start (left) of its width
12
+ */
13
+ PositionPlacement[PositionPlacement["TopStart"] = 1] = "TopStart";
14
+ /**
15
+ * Target is placed on the top (above) of source element at the end (right) of its width
16
+ */
17
+ PositionPlacement[PositionPlacement["TopEnd"] = 2] = "TopEnd";
18
+ /**
19
+ * Target is placed on the left (before) of source element in the middle of its height
20
+ */
21
+ PositionPlacement[PositionPlacement["Left"] = 3] = "Left";
22
+ /**
23
+ * Target is placed on the left (before) of source element at the start (top) of its height
24
+ */
25
+ PositionPlacement[PositionPlacement["LeftStart"] = 4] = "LeftStart";
26
+ /**
27
+ * Target is placed on the left (before) of source element at the end (bottom) of its height
28
+ */
29
+ PositionPlacement[PositionPlacement["LeftEnd"] = 5] = "LeftEnd";
30
+ /**
31
+ * Target is placed on the right (after) of source element in the middle of its height
32
+ */
33
+ PositionPlacement[PositionPlacement["Right"] = 6] = "Right";
34
+ /**
35
+ * Target is placed on the right (after) of source element at the start (top) of its height
36
+ */
37
+ PositionPlacement[PositionPlacement["RightStart"] = 7] = "RightStart";
38
+ /**
39
+ * Target is placed on the right (after) of source element at the end (bottom) of its height
40
+ */
41
+ PositionPlacement[PositionPlacement["RightEnd"] = 8] = "RightEnd";
42
+ /**
43
+ * Target is placed on the bottom (below) of source element in the middle of its width
44
+ */
45
+ PositionPlacement[PositionPlacement["Bottom"] = 9] = "Bottom";
46
+ /**
47
+ * Target is placed on the bottom (below) of source element at the start (left) of its width
48
+ */
49
+ PositionPlacement[PositionPlacement["BottomStart"] = 10] = "BottomStart";
50
+ /**
51
+ * Target is placed on the bottom (below) of source element at the end (right) of its width
52
+ */
53
+ PositionPlacement[PositionPlacement["BottomEnd"] = 11] = "BottomEnd";
54
+ })(PositionPlacement || (PositionPlacement = {}));
55
+ /**
56
+ * Applied offset to position of target in cross axis relative to placement
57
+ */
58
+ export var PositionOffset;
59
+ (function (PositionOffset) {
60
+ /**
61
+ * No offset applied
62
+ */
63
+ PositionOffset[PositionOffset["None"] = 0] = "None";
64
+ /**
65
+ * Offset is calculated at the point where mouse enters source element
66
+ */
67
+ PositionOffset[PositionOffset["MouseEnter"] = 1] = "MouseEnter";
68
+ /**
69
+ * Positive offset equal to half of size of target
70
+ */
71
+ PositionOffset[PositionOffset["Half"] = 2] = "Half";
72
+ /**
73
+ * Negative offset equal to half of size of target
74
+ */
75
+ PositionOffset[PositionOffset["NegativeHalf"] = 3] = "NegativeHalf";
76
+ /**
77
+ * Positive offset equal to full size of target
78
+ */
79
+ PositionOffset[PositionOffset["Full"] = 4] = "Full";
80
+ /**
81
+ * Negative offset equal to full size of target
82
+ */
83
+ PositionOffset[PositionOffset["NegativeFull"] = 5] = "NegativeFull";
84
+ })(PositionOffset || (PositionOffset = {}));
85
+ //# sourceMappingURL=position.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position.types.js","sourceRoot":"","sources":["../../../../src/services/position/position.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,iBA6DX;AA7DD,WAAY,iBAAiB;IAEzB;;OAEG;IACH,uDAAG,CAAA;IAEH;;OAEG;IACH,iEAAQ,CAAA;IAER;;OAEG;IACH,6DAAM,CAAA;IAEN;;OAEG;IACH,yDAAI,CAAA;IAEJ;;OAEG;IACH,mEAAS,CAAA;IAET;;OAEG;IACH,+DAAO,CAAA;IAEP;;OAEG;IACH,2DAAK,CAAA;IAEL;;OAEG;IACH,qEAAU,CAAA;IAEV;;OAEG;IACH,iEAAQ,CAAA;IAER;;OAEG;IACH,6DAAM,CAAA;IAEN;;OAEG;IACH,wEAAW,CAAA;IAEX;;OAEG;IACH,oEAAS,CAAA;AACb,CAAC,EA7DW,iBAAiB,KAAjB,iBAAiB,QA6D5B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cA+BX;AA/BD,WAAY,cAAc;IAEtB;;OAEG;IACH,mDAAI,CAAA;IAEJ;;OAEG;IACH,+DAAU,CAAA;IAEV;;OAEG;IACH,mDAAI,CAAA;IAEJ;;OAEG;IACH,mEAAY,CAAA;IAEZ;;OAEG;IACH,mDAAI,CAAA;IAEJ;;OAEG;IACH,mEAAY,CAAA;AAChB,CAAC,EA/BW,cAAc,KAAd,cAAc,QA+BzB","sourcesContent":["/**\n * Available positions for placement of target element against its source\n */\nexport enum PositionPlacement\n{\n /**\n * Target is placed on the top (above) of source element in the middle of its width\n */\n Top,\n\n /**\n * Target is placed on the top (above) of source element at the start (left) of its width\n */\n TopStart,\n\n /**\n * Target is placed on the top (above) of source element at the end (right) of its width\n */\n TopEnd,\n\n /**\n * Target is placed on the left (before) of source element in the middle of its height\n */\n Left,\n\n /**\n * Target is placed on the left (before) of source element at the start (top) of its height\n */\n LeftStart,\n\n /**\n * Target is placed on the left (before) of source element at the end (bottom) of its height\n */\n LeftEnd,\n\n /**\n * Target is placed on the right (after) of source element in the middle of its height\n */\n Right,\n\n /**\n * Target is placed on the right (after) of source element at the start (top) of its height\n */\n RightStart,\n\n /**\n * Target is placed on the right (after) of source element at the end (bottom) of its height\n */\n RightEnd,\n\n /**\n * Target is placed on the bottom (below) of source element in the middle of its width\n */\n Bottom,\n\n /**\n * Target is placed on the bottom (below) of source element at the start (left) of its width\n */\n BottomStart,\n\n /**\n * Target is placed on the bottom (below) of source element at the end (right) of its width\n */\n BottomEnd\n}\n\n/**\n * Applied offset to position of target in cross axis relative to placement\n */\nexport enum PositionOffset\n{\n /**\n * No offset applied\n */\n None,\n\n /**\n * Offset is calculated at the point where mouse enters source element\n */\n MouseEnter,\n\n /**\n * Positive offset equal to half of size of target\n */\n Half,\n\n /**\n * Negative offset equal to half of size of target\n */\n NegativeHalf,\n\n /**\n * Positive offset equal to full size of target\n */\n Full,\n\n /**\n * Negative offset equal to full size of target\n */\n NegativeFull\n}"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Applies `PositionResult` to target element
3
+ * @param result - Result of positioning process to be applied
4
+ */
5
+ export function applyPositionResult(result) {
6
+ Object.assign(result.target.style, {
7
+ top: '0',
8
+ left: '0',
9
+ transform: `translate(${result.x}px, ${result.y}px)`,
10
+ });
11
+ }
12
+ //# sourceMappingURL=position.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position.utils.js","sourceRoot":"","sources":["../../../../src/services/position/position.utils.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAmC;IAEnE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EACnB;QACI,GAAG,EAAE,GAAG;QACR,IAAI,EAAE,GAAG;QACT,SAAS,EAAE,aAAa,MAAM,CAAC,CAAC,OAAO,MAAM,CAAC,CAAC,KAAK;KACvD,CAAC,CAAC;AACrB,CAAC","sourcesContent":["import {PositionResult} from './position.interface';\n\n/**\n * Applies `PositionResult` to target element\n * @param result - Result of positioning process to be applied\n */\nexport function applyPositionResult(result: PositionResult<HTMLElement>): void\n{\n Object.assign(result.target.style,\n {\n top: '0',\n left: '0',\n transform: `translate(${result.x}px, ${result.y}px)`,\n });\n}\n"]}
@@ -32,9 +32,9 @@ export const PERMANENT_STORAGE = new InjectionToken('PERMANENT_STORAGE');
32
32
  */
33
33
  export const TEMPORARY_STORAGE = new InjectionToken('TEMPORARY_STORAGE', { providedIn: 'root', factory: () => new MemoryTemporaryStorageService() });
34
34
  /**
35
- * Token used for injecting service that is used for absolute alignment (AKA positioning) of one element to another
35
+ * Token used for injecting service that is used for positioning of one element against another
36
36
  */
37
- export const ALIGNMENT = new InjectionToken('ALIGNMENT');
37
+ export const POSITION = new InjectionToken('POSITION');
38
38
  /**
39
39
  * Token used for injecting notifications service implementation
40
40
  */
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/types/tokens.ts"],"names":[],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S,GAA8B,IAAI,cAAc,CAAY,WAAW,CAAC,CAAC;AAE/F;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAkC,IAAI,cAAc,CAAgB,eAAe,CAAC,CAAC;AAE/G;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAA2B,IAAI,cAAc,CAAS,qBAAqB,CAAC,CAAC;AAE7G;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAsC,IAAI,gBAAgB,CAAkB,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import {InjectionToken, Type} from '@angular/core';\nimport {HttpContextToken} from '@angular/common/http';\n\nimport {StringLocalization, NoStringLocalizationService} from '../services/stringLocalization';\nimport {PermanentStorage} from '../services/permanentStorage';\nimport {Logger, DummyLoggerService} from '../services/logger';\nimport {TemporaryStorage, MemoryTemporaryStorageService} from '../services/temporaryStorage';\nimport {Notifications} from '../services/notifications';\nimport {Alignment} from '../services/alignment';\n\n/**\n * Base url when using HTTP (example: http://localhost:8888/)\n */\nexport const HTTP_REQUEST_BASE_URL: InjectionToken<string> = new InjectionToken<string>('HTTP_REQUEST_BASE_URL');\n\n/**\n * Token is used to transfer http request cookie header\n */\nexport const HTTP_REQUEST_COOKIE_HEADER: InjectionToken<string> = new InjectionToken<string>('HTTP_REQUEST_COOKIE_HEADER');\n\n/**\n * Token is used to transfer http request authentication header\n */\nexport const HTTP_REQUEST_AUTH_HEADER: InjectionToken<string> = new InjectionToken<string>('HTTP_REQUEST_AUTH_HEADER');\n\n/**\n * Token used for injecting Logger implementation\n */\nexport const LOGGER: InjectionToken<Logger> = new InjectionToken<Logger>('LOGGER', {providedIn: 'root', factory: () => new DummyLoggerService()});\n\n/**\n * Token used for injecting StringLocalization service implementation\n */\nexport const STRING_LOCALIZATION: InjectionToken<StringLocalization> = new InjectionToken<StringLocalization>('STRING_LOCALIZATION', {providedIn: 'root', factory: () => new NoStringLocalizationService()});\n\n/**\n * Token used for injecting permanent storage\n */\nexport const PERMANENT_STORAGE: InjectionToken<PermanentStorage> = new InjectionToken<PermanentStorage>('PERMANENT_STORAGE');\n\n/**\n * Token used for injecting temporary storage\n */\nexport const TEMPORARY_STORAGE: InjectionToken<TemporaryStorage> = new InjectionToken<TemporaryStorage>('TEMPORARY_STORAGE', {providedIn: 'root', factory: () => new MemoryTemporaryStorageService()});\n\n/**\n * Token used for injecting service that is used for absolute alignment (AKA positioning) of one element to another\n */\nexport const ALIGNMENT: InjectionToken<Alignment> = new InjectionToken<Alignment>('ALIGNMENT');\n\n/**\n * Token used for injecting notifications service implementation\n */\nexport const NOTIFICATIONS: InjectionToken<Notifications> = new InjectionToken<Notifications>('NOTIFICATIONS');\n\n/**\n * Token used for injecting notifications scope name\n */\nexport const NOTIFICATIONS_SCOPE: InjectionToken<string> = new InjectionToken<string>('NOTIFICATIONS_SCOPE');\n\n/**\n * Http context token storing array of ignored interceptors types\n */\nexport const IGNORED_INTERCEPTORS: HttpContextToken<Type<unknown>[]> = new HttpContextToken<Type<unknown>[]>(() => []);\n"]}
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/types/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAO,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAqB,2BAA2B,EAAC,MAAM,gCAAgC,CAAC;AAE/F,OAAO,EAAS,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAmB,6BAA6B,EAAC,MAAM,8BAA8B,CAAC;AAI7F;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA2B,IAAI,cAAc,CAAS,uBAAuB,CAAC,CAAC;AAEjH;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAA2B,IAAI,cAAc,CAAS,4BAA4B,CAAC,CAAC;AAE3H;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAA2B,IAAI,cAAc,CAAS,0BAA0B,CAAC,CAAC;AAEvH;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAA2B,IAAI,cAAc,CAAS,QAAQ,EAAE,EAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,kBAAkB,EAAE,EAAC,CAAC,CAAC;AAElJ;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAuC,IAAI,cAAc,CAAqB,qBAAqB,EAAE,EAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,2BAA2B,EAAE,EAAC,CAAC,CAAC;AAE7M;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAqC,IAAI,cAAc,CAAmB,mBAAmB,CAAC,CAAC;AAE7H;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAqC,IAAI,cAAc,CAAmB,mBAAmB,EAAE,EAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,6BAA6B,EAAE,EAAC,CAAC,CAAC;AAEvM;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAA6B,IAAI,cAAc,CAAW,UAAU,CAAC,CAAC;AAE3F;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAkC,IAAI,cAAc,CAAgB,eAAe,CAAC,CAAC;AAE/G;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAA2B,IAAI,cAAc,CAAS,qBAAqB,CAAC,CAAC;AAE7G;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAsC,IAAI,gBAAgB,CAAkB,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import {InjectionToken, Type} from '@angular/core';\nimport {HttpContextToken} from '@angular/common/http';\n\nimport {StringLocalization, NoStringLocalizationService} from '../services/stringLocalization';\nimport {PermanentStorage} from '../services/permanentStorage';\nimport {Logger, DummyLoggerService} from '../services/logger';\nimport {TemporaryStorage, MemoryTemporaryStorageService} from '../services/temporaryStorage';\nimport {Notifications} from '../services/notifications';\nimport {Position} from '../services/position';\n\n/**\n * Base url when using HTTP (example: http://localhost:8888/)\n */\nexport const HTTP_REQUEST_BASE_URL: InjectionToken<string> = new InjectionToken<string>('HTTP_REQUEST_BASE_URL');\n\n/**\n * Token is used to transfer http request cookie header\n */\nexport const HTTP_REQUEST_COOKIE_HEADER: InjectionToken<string> = new InjectionToken<string>('HTTP_REQUEST_COOKIE_HEADER');\n\n/**\n * Token is used to transfer http request authentication header\n */\nexport const HTTP_REQUEST_AUTH_HEADER: InjectionToken<string> = new InjectionToken<string>('HTTP_REQUEST_AUTH_HEADER');\n\n/**\n * Token used for injecting Logger implementation\n */\nexport const LOGGER: InjectionToken<Logger> = new InjectionToken<Logger>('LOGGER', {providedIn: 'root', factory: () => new DummyLoggerService()});\n\n/**\n * Token used for injecting StringLocalization service implementation\n */\nexport const STRING_LOCALIZATION: InjectionToken<StringLocalization> = new InjectionToken<StringLocalization>('STRING_LOCALIZATION', {providedIn: 'root', factory: () => new NoStringLocalizationService()});\n\n/**\n * Token used for injecting permanent storage\n */\nexport const PERMANENT_STORAGE: InjectionToken<PermanentStorage> = new InjectionToken<PermanentStorage>('PERMANENT_STORAGE');\n\n/**\n * Token used for injecting temporary storage\n */\nexport const TEMPORARY_STORAGE: InjectionToken<TemporaryStorage> = new InjectionToken<TemporaryStorage>('TEMPORARY_STORAGE', {providedIn: 'root', factory: () => new MemoryTemporaryStorageService()});\n\n/**\n * Token used for injecting service that is used for positioning of one element against another\n */\nexport const POSITION: InjectionToken<Position> = new InjectionToken<Position>('POSITION');\n\n/**\n * Token used for injecting notifications service implementation\n */\nexport const NOTIFICATIONS: InjectionToken<Notifications> = new InjectionToken<Notifications>('NOTIFICATIONS');\n\n/**\n * Token used for injecting notifications scope name\n */\nexport const NOTIFICATIONS_SCOPE: InjectionToken<string> = new InjectionToken<string>('NOTIFICATIONS_SCOPE');\n\n/**\n * Http context token storing array of ignored interceptors types\n */\nexport const IGNORED_INTERCEPTORS: HttpContextToken<Type<unknown>[]> = new HttpContextToken<Type<unknown>[]>(() => []);\n"]}
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@anglr/common-floating-ui",
3
+ "sideEffects": false,
4
+ "module": "../es2015/floating-ui/src/index.js",
5
+ "es2015": "../es2015/floating-ui/src/index.js",
6
+ "es2020": "../es2020/floating-ui/src/index.js",
7
+ "esm2020": "../es2020/floating-ui/src/index.js",
8
+ "typings": "./src/index.d.ts"
9
+ }
@@ -0,0 +1,2 @@
1
+ export * from './services';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { Position, PositionResult, PositionOptions } from '@anglr/common';
2
+ import { Placement } from '@floating-ui/dom';
3
+ /**
4
+ * Service that is used for positioning two elements against each other, using floating-ui dom implementation
5
+ */
6
+ export declare class FloatingUiDomPosition implements Position {
7
+ /**
8
+ * @inheritdoc
9
+ */
10
+ placeElement(target: Element, source: Element, options?: Partial<PositionOptions>): Promise<PositionResult>;
11
+ /**
12
+ * Gets floating ui placement from position placement
13
+ * @param options - Options containing position placement
14
+ */
15
+ protected _getPlacement(options: PositionOptions): Placement;
16
+ }
17
+ //# sourceMappingURL=floatingUiDomPosition.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"floatingUiDomPosition.service.d.ts","sourceRoot":"","sources":["floatingUiDomPosition.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAoC,MAAM,eAAe,CAAC;AAE3G,OAAO,EAAkB,SAAS,EAAa,MAAM,kBAAkB,CAAC;AAaxE;;GAEG;AACH,qBAAa,qBAAsB,YAAW,QAAQ;IAIlD;;OAEG;IACU,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IA4CxH;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS;CAuD/D"}
@@ -0,0 +1,2 @@
1
+ export * from './floatingUiDomPosition.service';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@anglr/common",
3
- "version": "11.2.0-beta.20220228151413",
3
+ "version": "11.2.0-beta.20220228163820",
4
4
  "description": "Angular module for common angular stuff",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "scripts": {
8
8
  "build": "ngc --declaration --declarationDir . --declarationMap && ngc -t es2015 --outDir es2015",
9
- "dts:rollup": "npm run api -- api-extractor.json && npm run api -- date-fns/api-extractor.json && npm run api -- forms/api-extractor.json && npm run api -- hotkeys/api-extractor.json && npm run api -- material/api-extractor.json && npm run api -- moment/api-extractor.json && npm run api -- numeral/api-extractor.json && npm run api -- positions/api-extractor.json && npm run api -- router/api-extractor.json && npm run api -- store/api-extractor.json && npm run api -- structured-log/api-extractor.json",
9
+ "dts:rollup": "npm run api -- api-extractor.json && npm run api -- date-fns/api-extractor.json && npm run api -- floating-ui/api-extractor.json && npm run api -- forms/api-extractor.json && npm run api -- hotkeys/api-extractor.json && npm run api -- material/api-extractor.json && npm run api -- moment/api-extractor.json && npm run api -- numeral/api-extractor.json && npm run api -- positions/api-extractor.json && npm run api -- router/api-extractor.json && npm run api -- store/api-extractor.json && npm run api -- structured-log/api-extractor.json",
10
10
  "api": "api-extractor run --local --verbose -c",
11
11
  "clean": "rimraf */temp temp es2015 es2020 **/tsdoc-metadata.json src/**/*.d.ts src/**/*.d.ts.map */src/**/*.d.ts */src/**/*.d.ts.map ./*.d.ts ./*.d.ts.map */*.d.ts",
12
12
  "clean:deps": "rimraf package-lock.json node_modules",
@@ -24,7 +24,7 @@
24
24
  "doc": "path-exists docs && npm run doc:generate || echo \"No docs generated!\"",
25
25
  "predoc:generate": "cd docs && git pull && cd ..",
26
26
  "postdoc:generate": "npm run doc:save",
27
- "doc:generate": "npm run doc:generate:common && npm run doc:generate:forms && npm run doc:generate:router && npm run doc:generate:numeral && npm run doc:generate:hotkeys && npm run doc:generate:store && npm run doc:generate:moment && npm run doc:generate:date-fns && npm run doc:generate:structured-log && npm run doc:generate:positions && npm run doc:generate:material",
27
+ "doc:generate": "npm run doc:generate:common && npm run doc:generate:forms && npm run doc:generate:router && npm run doc:generate:numeral && npm run doc:generate:hotkeys && npm run doc:generate:store && npm run doc:generate:moment && npm run doc:generate:date-fns && npm run doc:generate:floating-ui && npm run doc:generate:structured-log && npm run doc:generate:positions && npm run doc:generate:material",
28
28
  "doc:save": "cd docs && git add . && git commit -m \"INT: updated API docs ng-common\" && git push && cd ..",
29
29
  "doc:generate:common": "rimraf docs/content/api/ng-common && npm run doc:json:common && npm run doc:md:common && npm run doc:api:common",
30
30
  "doc:json:common": "api-extractor run --local --verbose -c api-extractor.json",
@@ -58,6 +58,10 @@
58
58
  "doc:json:date-fns": "api-extractor run --local --verbose -c date-fns/api-extractor.json",
59
59
  "doc:md:date-fns": "api-documenter markdown -i date-fns/temp -o docs/content/api/ng-common-date-fns",
60
60
  "doc:api:date-fns": "copyfiles -u 2 date-fns/temp/common-date-fns.api.md docs/content/api/ng-common-date-fns && rimraf date-fns/temp",
61
+ "doc:generate:floating-ui": "rimraf docs/content/api/ng-common-floating-ui && npm run doc:json:floating-ui && npm run doc:md:floating-ui && npm run doc:api:floating-ui",
62
+ "doc:json:floating-ui": "api-extractor run --local --verbose -c floating-ui/api-extractor.json",
63
+ "doc:md:floating-ui": "api-documenter markdown -i floating-ui/temp -o docs/content/api/ng-common-floating-ui",
64
+ "doc:api:floating-ui": "copyfiles -u 2 floating-ui/temp/common-floating-ui.api.md docs/content/api/ng-common-floating-ui && rimraf floating-ui/temp",
61
65
  "doc:generate:structured-log": "rimraf docs/content/api/ng-common-structured-log && npm run doc:json:structured-log && npm run doc:md:structured-log && npm run doc:api:structured-log",
62
66
  "doc:json:structured-log": "api-extractor run --local --verbose -c structured-log/api-extractor.json",
63
67
  "doc:md:structured-log": "api-documenter markdown -i structured-log/temp -o docs/content/api/ng-common-structured-log",
@@ -108,6 +112,7 @@
108
112
  "moment": "^2.29.1",
109
113
  "date-fns": "^2.27.0",
110
114
  "positions": "^1.6.2",
115
+ "@floating-ui/dom": "^0.3.1",
111
116
  "tslib": "^2.3.1"
112
117
  },
113
118
  "devDependencies": {
@@ -128,6 +133,7 @@
128
133
  "moment": "^2.29.1",
129
134
  "date-fns": "^2.27.0",
130
135
  "positions": "^1.6.2",
136
+ "@floating-ui/dom": "^0.3.1",
131
137
  "@types/node": "^14.14.31",
132
138
  "@types/numeral": "^2.0.2",
133
139
  "@types/store": "^2.0.2",
package/src/index.d.ts CHANGED
@@ -32,5 +32,5 @@ export { NgComponentOutletEx } from './directives/ngComponentOutletEx/ngComponen
32
32
  export { APP_STABLE, extractAppStableResolve, runWhenModuleStable } from './utils';
33
33
  export { PROGRESS_INTERCEPTOR_PROVIDER, ProgressInterceptor } from './modules/progressIndicator/interceptors/progressInterceptor';
34
34
  export { DEFAULT_NOTIFICATIONS, DefaultNotificationsService, Notification, NotificationSeverity, Notifications, NotificationsOptions, NotificationsProvider, NotificationsScopeProvider, NotificationsScopeProviderFactory } from './services/notifications';
35
- export * from './services/alignment';
35
+ export * from './services/position';
36
36
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,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AAE,0BAA0B,EAAE,iCAAiC,EAAC,MAAM,0BAA0B,CAAC;AAC3P,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './position.interface';
2
+ export * from './position.types';
3
+ export * from './position.utils';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { PositionOffset, PositionPlacement } from './position.types';
2
+ /**
3
+ * Options for autoupdate specific functionality
4
+ */
5
+ export interface AutoUpdateOptions {
6
+ /**
7
+ * Indication whether update position when ancestor scroll changes
8
+ */
9
+ ancestorScroll: boolean;
10
+ /**
11
+ * Indication whether update position when ancestor size changes
12
+ */
13
+ ancestorResize: boolean;
14
+ /**
15
+ * Indication whether update position when target element changes size
16
+ */
17
+ elementResize: boolean;
18
+ }
19
+ /**
20
+ * Options that are passed to position service
21
+ */
22
+ export interface PositionOptions {
23
+ /**
24
+ * Placement of target element against source element
25
+ */
26
+ placement: PositionPlacement;
27
+ /**
28
+ * Offset which allows moving target element along the cross axis of placement
29
+ */
30
+ offset: PositionOffset;
31
+ /**
32
+ * Indication whether perform flip in case of collision (with view boundaries)
33
+ */
34
+ flip: boolean;
35
+ /**
36
+ * Indication whether set up 'auto updating' of position
37
+ */
38
+ autoUpdate: boolean | AutoUpdateOptions;
39
+ /**
40
+ * Function that is called when auto updated is called for processing result
41
+ */
42
+ autoUpdateProcessor?: (result: PositionResult) => void;
43
+ /**
44
+ * Mouse event that occured when positioning was called
45
+ */
46
+ mouseEvent?: MouseEvent;
47
+ }
48
+ /**
49
+ * Result of positioning process, storing new coordinates
50
+ */
51
+ export interface PositionResult<TElement extends Element = any> {
52
+ /**
53
+ * Target element to be positioned
54
+ */
55
+ target: TElement;
56
+ /**
57
+ * X coordinate of position of target
58
+ */
59
+ x: number;
60
+ /**
61
+ * Y coordinate of position of target
62
+ */
63
+ y: number;
64
+ /**
65
+ * Disposes instance of engine used for positioning
66
+ */
67
+ dispose(): void;
68
+ }
69
+ /**
70
+ * Service that is used for positioning two elements against each other
71
+ */
72
+ export interface Position {
73
+ /**
74
+ * Places target element relatively to source element according options and returns result storing information about new position
75
+ * @param target - Target element to be placed
76
+ * @param source - Source element to be placed against
77
+ * @param options - Optional options with informations about new position
78
+ */
79
+ placeElement(target: Element, source: Element, options?: Partial<PositionOptions>): Promise<PositionResult>;
80
+ }
81
+ //# sourceMappingURL=position.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position.interface.d.ts","sourceRoot":"","sources":["position.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAE9B;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAI5B;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAC;IAE7B;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,UAAU,EAAE,OAAO,GAAC,iBAAiB,CAAC;IAEtC;;OAEG;IACH,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAEvD;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC,QAAQ,SAAS,OAAO,GAAG,GAAG;IAE1D;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC;IAEjB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IAIrB;;;;;OAKG;IACH,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CAC/G"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Available positions for placement of target element against its source
3
+ */
4
+ export declare enum PositionPlacement {
5
+ /**
6
+ * Target is placed on the top (above) of source element in the middle of its width
7
+ */
8
+ Top = 0,
9
+ /**
10
+ * Target is placed on the top (above) of source element at the start (left) of its width
11
+ */
12
+ TopStart = 1,
13
+ /**
14
+ * Target is placed on the top (above) of source element at the end (right) of its width
15
+ */
16
+ TopEnd = 2,
17
+ /**
18
+ * Target is placed on the left (before) of source element in the middle of its height
19
+ */
20
+ Left = 3,
21
+ /**
22
+ * Target is placed on the left (before) of source element at the start (top) of its height
23
+ */
24
+ LeftStart = 4,
25
+ /**
26
+ * Target is placed on the left (before) of source element at the end (bottom) of its height
27
+ */
28
+ LeftEnd = 5,
29
+ /**
30
+ * Target is placed on the right (after) of source element in the middle of its height
31
+ */
32
+ Right = 6,
33
+ /**
34
+ * Target is placed on the right (after) of source element at the start (top) of its height
35
+ */
36
+ RightStart = 7,
37
+ /**
38
+ * Target is placed on the right (after) of source element at the end (bottom) of its height
39
+ */
40
+ RightEnd = 8,
41
+ /**
42
+ * Target is placed on the bottom (below) of source element in the middle of its width
43
+ */
44
+ Bottom = 9,
45
+ /**
46
+ * Target is placed on the bottom (below) of source element at the start (left) of its width
47
+ */
48
+ BottomStart = 10,
49
+ /**
50
+ * Target is placed on the bottom (below) of source element at the end (right) of its width
51
+ */
52
+ BottomEnd = 11
53
+ }
54
+ /**
55
+ * Applied offset to position of target in cross axis relative to placement
56
+ */
57
+ export declare enum PositionOffset {
58
+ /**
59
+ * No offset applied
60
+ */
61
+ None = 0,
62
+ /**
63
+ * Offset is calculated at the point where mouse enters source element
64
+ */
65
+ MouseEnter = 1,
66
+ /**
67
+ * Positive offset equal to half of size of target
68
+ */
69
+ Half = 2,
70
+ /**
71
+ * Negative offset equal to half of size of target
72
+ */
73
+ NegativeHalf = 3,
74
+ /**
75
+ * Positive offset equal to full size of target
76
+ */
77
+ Full = 4,
78
+ /**
79
+ * Negative offset equal to full size of target
80
+ */
81
+ NegativeFull = 5
82
+ }
83
+ //# sourceMappingURL=position.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position.types.d.ts","sourceRoot":"","sources":["position.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,iBAAiB;IAEzB;;OAEG;IACH,GAAG,IAAA;IAEH;;OAEG;IACH,QAAQ,IAAA;IAER;;OAEG;IACH,MAAM,IAAA;IAEN;;OAEG;IACH,IAAI,IAAA;IAEJ;;OAEG;IACH,SAAS,IAAA;IAET;;OAEG;IACH,OAAO,IAAA;IAEP;;OAEG;IACH,KAAK,IAAA;IAEL;;OAEG;IACH,UAAU,IAAA;IAEV;;OAEG;IACH,QAAQ,IAAA;IAER;;OAEG;IACH,MAAM,IAAA;IAEN;;OAEG;IACH,WAAW,KAAA;IAEX;;OAEG;IACH,SAAS,KAAA;CACZ;AAED;;GAEG;AACH,oBAAY,cAAc;IAEtB;;OAEG;IACH,IAAI,IAAA;IAEJ;;OAEG;IACH,UAAU,IAAA;IAEV;;OAEG;IACH,IAAI,IAAA;IAEJ;;OAEG;IACH,YAAY,IAAA;IAEZ;;OAEG;IACH,IAAI,IAAA;IAEJ;;OAEG;IACH,YAAY,IAAA;CACf"}
@@ -0,0 +1,7 @@
1
+ import { PositionResult } from './position.interface';
2
+ /**
3
+ * Applies `PositionResult` to target element
4
+ * @param result - Result of positioning process to be applied
5
+ */
6
+ export declare function applyPositionResult(result: PositionResult<HTMLElement>): void;
7
+ //# sourceMappingURL=position.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position.utils.d.ts","sourceRoot":"","sources":["position.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEpD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAQ7E"}
@@ -5,7 +5,7 @@ import { PermanentStorage } from '../services/permanentStorage';
5
5
  import { Logger } from '../services/logger';
6
6
  import { TemporaryStorage } from '../services/temporaryStorage';
7
7
  import { Notifications } from '../services/notifications';
8
- import { Alignment } from '../services/alignment';
8
+ import { Position } from '../services/position';
9
9
  /**
10
10
  * Base url when using HTTP (example: http://localhost:8888/)
11
11
  */
@@ -35,9 +35,9 @@ export declare const PERMANENT_STORAGE: InjectionToken<PermanentStorage>;
35
35
  */
36
36
  export declare const TEMPORARY_STORAGE: InjectionToken<TemporaryStorage>;
37
37
  /**
38
- * Token used for injecting service that is used for absolute alignment (AKA positioning) of one element to another
38
+ * Token used for injecting service that is used for positioning of one element against another
39
39
  */
40
- export declare const ALIGNMENT: InjectionToken<Alignment>;
40
+ export declare const POSITION: InjectionToken<Position>;
41
41
  /**
42
42
  * Token used for injecting notifications service implementation
43
43
  */
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAC,kBAAkB,EAA8B,MAAM,gCAAgC,CAAC;AAC/F,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,MAAM,EAAqB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAC,gBAAgB,EAAgC,MAAM,8BA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
- export {};
2
- //# sourceMappingURL=alignment.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alignment.interface.js","sourceRoot":"","sources":["../../../../src/services/alignment/alignment.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Allows absolute alignment (AKA positioning) of one element to another\n */\nexport interface Alignment\n{\n}"]}
@@ -1,2 +0,0 @@
1
- export * from './alignment.interface';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/alignment/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './alignment.interface';"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=alignment.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alignment.interface.js","sourceRoot":"","sources":["../../../../src/services/alignment/alignment.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Allows absolute alignment (AKA positioning) of one element to another\n */\nexport interface Alignment\n{\n}"]}
@@ -1,2 +0,0 @@
1
- export * from './alignment.interface';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/alignment/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './alignment.interface';"]}
@@ -1,6 +0,0 @@
1
- /**
2
- * Allows absolute alignment (AKA positioning) of one element to another
3
- */
4
- export interface Alignment {
5
- }
6
- //# sourceMappingURL=alignment.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alignment.interface.d.ts","sourceRoot":"","sources":["alignment.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;CAEzB"}
@@ -1,2 +0,0 @@
1
- export * from './alignment.interface';
2
- //# sourceMappingURL=index.d.ts.map