@molecule/app-ui-angular 1.5.1 → 1.10.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 (128) hide show
  1. package/README.md +780 -362
  2. package/dist/components/checkbox.component.d.ts +5 -1
  3. package/dist/components/checkbox.component.d.ts.map +1 -1
  4. package/dist/components/checkbox.component.js +14 -3
  5. package/dist/components/checkbox.component.js.map +1 -1
  6. package/dist/components/confirm-button.component.d.ts +1 -5
  7. package/dist/components/confirm-button.component.d.ts.map +1 -1
  8. package/dist/components/confirm-button.component.js +15 -11
  9. package/dist/components/confirm-button.component.js.map +1 -1
  10. package/dist/components/confirm-dialog.component.d.ts +1 -5
  11. package/dist/components/confirm-dialog.component.d.ts.map +1 -1
  12. package/dist/components/confirm-dialog.component.js +5 -3
  13. package/dist/components/confirm-dialog.component.js.map +1 -1
  14. package/dist/components/dropdown.component.d.ts +3 -11
  15. package/dist/components/dropdown.component.d.ts.map +1 -1
  16. package/dist/components/dropdown.component.js +54 -97
  17. package/dist/components/dropdown.component.js.map +1 -1
  18. package/dist/components/file-field.component.d.ts +42 -0
  19. package/dist/components/file-field.component.d.ts.map +1 -0
  20. package/dist/components/file-field.component.js +121 -0
  21. package/dist/components/file-field.component.js.map +1 -0
  22. package/dist/components/floating-input.component.d.ts +21 -3
  23. package/dist/components/floating-input.component.d.ts.map +1 -1
  24. package/dist/components/floating-input.component.js +34 -4
  25. package/dist/components/floating-input.component.js.map +1 -1
  26. package/dist/components/form.component.d.ts.map +1 -1
  27. package/dist/components/form.component.js +11 -6
  28. package/dist/components/form.component.js.map +1 -1
  29. package/dist/components/index.d.ts +1 -0
  30. package/dist/components/index.d.ts.map +1 -1
  31. package/dist/components/index.js +1 -0
  32. package/dist/components/index.js.map +1 -1
  33. package/dist/components/input.component.d.ts +18 -2
  34. package/dist/components/input.component.d.ts.map +1 -1
  35. package/dist/components/input.component.js +37 -11
  36. package/dist/components/input.component.js.map +1 -1
  37. package/dist/components/language-picker.component.d.ts +9 -1
  38. package/dist/components/language-picker.component.d.ts.map +1 -1
  39. package/dist/components/language-picker.component.js +15 -8
  40. package/dist/components/language-picker.component.js.map +1 -1
  41. package/dist/components/load-error-banner.component.d.ts +21 -3
  42. package/dist/components/load-error-banner.component.d.ts.map +1 -1
  43. package/dist/components/load-error-banner.component.js +33 -5
  44. package/dist/components/load-error-banner.component.js.map +1 -1
  45. package/dist/components/modal.component.d.ts +27 -48
  46. package/dist/components/modal.component.d.ts.map +1 -1
  47. package/dist/components/modal.component.js +85 -184
  48. package/dist/components/modal.component.js.map +1 -1
  49. package/dist/components/molecule/input.component.d.ts +7 -0
  50. package/dist/components/molecule/input.component.d.ts.map +1 -1
  51. package/dist/components/molecule/input.component.js +13 -5
  52. package/dist/components/molecule/input.component.js.map +1 -1
  53. package/dist/components/molecule/select.component.d.ts +7 -0
  54. package/dist/components/molecule/select.component.d.ts.map +1 -1
  55. package/dist/components/molecule/select.component.js +13 -5
  56. package/dist/components/molecule/select.component.js.map +1 -1
  57. package/dist/components/page-header.component.d.ts.map +1 -1
  58. package/dist/components/page-header.component.js +22 -21
  59. package/dist/components/page-header.component.js.map +1 -1
  60. package/dist/components/prompt-dialog.component.d.ts +6 -30
  61. package/dist/components/prompt-dialog.component.d.ts.map +1 -1
  62. package/dist/components/prompt-dialog.component.js +25 -56
  63. package/dist/components/prompt-dialog.component.js.map +1 -1
  64. package/dist/components/responsive-app-shell.component.d.ts +16 -34
  65. package/dist/components/responsive-app-shell.component.d.ts.map +1 -1
  66. package/dist/components/responsive-app-shell.component.js +58 -141
  67. package/dist/components/responsive-app-shell.component.js.map +1 -1
  68. package/dist/components/select.component.d.ts +9 -1
  69. package/dist/components/select.component.d.ts.map +1 -1
  70. package/dist/components/select.component.js +16 -7
  71. package/dist/components/select.component.js.map +1 -1
  72. package/dist/components/sidebar-user-card.component.d.ts +5 -1
  73. package/dist/components/sidebar-user-card.component.d.ts.map +1 -1
  74. package/dist/components/sidebar-user-card.component.js +11 -7
  75. package/dist/components/sidebar-user-card.component.js.map +1 -1
  76. package/dist/components/switch.component.d.ts +3 -1
  77. package/dist/components/switch.component.d.ts.map +1 -1
  78. package/dist/components/switch.component.js +9 -2
  79. package/dist/components/switch.component.js.map +1 -1
  80. package/dist/components/textarea.component.d.ts +15 -9
  81. package/dist/components/textarea.component.d.ts.map +1 -1
  82. package/dist/components/textarea.component.js +33 -19
  83. package/dist/components/textarea.component.js.map +1 -1
  84. package/dist/components/theme-toggle.component.d.ts +14 -1
  85. package/dist/components/theme-toggle.component.d.ts.map +1 -1
  86. package/dist/components/theme-toggle.component.js +27 -6
  87. package/dist/components/theme-toggle.component.js.map +1 -1
  88. package/dist/components/toast.component.d.ts +13 -18
  89. package/dist/components/toast.component.d.ts.map +1 -1
  90. package/dist/components/toast.component.js +47 -63
  91. package/dist/components/toast.component.js.map +1 -1
  92. package/dist/components/tooltip.component.d.ts +17 -2
  93. package/dist/components/tooltip.component.d.ts.map +1 -1
  94. package/dist/components/tooltip.component.js +52 -92
  95. package/dist/components/tooltip.component.js.map +1 -1
  96. package/dist/components/user-menu-popover.component.d.ts +16 -8
  97. package/dist/components/user-menu-popover.component.d.ts.map +1 -1
  98. package/dist/components/user-menu-popover.component.js +40 -48
  99. package/dist/components/user-menu-popover.component.js.map +1 -1
  100. package/dist/index.d.ts +8 -0
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +8 -0
  103. package/dist/index.js.map +1 -1
  104. package/dist/utilities/element-props.d.ts +1 -1
  105. package/dist/utilities/element-props.d.ts.map +1 -1
  106. package/dist/utilities/element-props.js +3 -13
  107. package/dist/utilities/element-props.js.map +1 -1
  108. package/dist/utilities/element.d.ts +10 -0
  109. package/dist/utilities/element.d.ts.map +1 -1
  110. package/dist/utilities/element.js +13 -0
  111. package/dist/utilities/element.js.map +1 -1
  112. package/dist/utilities/style.d.ts +6 -16
  113. package/dist/utilities/style.d.ts.map +1 -1
  114. package/dist/utilities/style.js +38 -117
  115. package/dist/utilities/style.js.map +1 -1
  116. package/dist/web-drag.directive.d.ts +25 -0
  117. package/dist/web-drag.directive.d.ts.map +1 -0
  118. package/dist/web-drag.directive.js +43 -0
  119. package/dist/web-drag.directive.js.map +1 -0
  120. package/dist/web-hover.directive.d.ts +24 -0
  121. package/dist/web-hover.directive.d.ts.map +1 -0
  122. package/dist/web-hover.directive.js +42 -0
  123. package/dist/web-hover.directive.js.map +1 -0
  124. package/dist/web-wheel-zoom.directive.d.ts +18 -0
  125. package/dist/web-wheel-zoom.directive.d.ts.map +1 -0
  126. package/dist/web-wheel-zoom.directive.js +28 -0
  127. package/dist/web-wheel-zoom.directive.js.map +1 -0
  128. package/package.json +13 -5
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * @module
11
11
  */
12
- import { styleText } from './style.js';
12
+ import { reactStyleText } from './style.js';
13
13
  import { cn } from './utilities.js';
14
14
  /**
15
15
  * Attribute names whose `false` is a real value rather than an absence, so
@@ -24,16 +24,6 @@ const TEXT_BOOLEAN = /^(aria-|data-)|^(contentEditable|draggable|spellCheck)$/;
24
24
  * @returns True for an `on` + uppercase key.
25
25
  */
26
26
  const isListener = (key) => /^on[A-Z]/.test(key);
27
- /**
28
- * Serializes a React style object for the `style` attribute, ignoring a value
29
- * that is not an object (React only accepts an object there).
30
- *
31
- * @param style - The prop value.
32
- * @returns The attribute text, or undefined when there is nothing to write.
33
- */
34
- const styleAttribute = (style) => typeof style === 'object' && style !== null
35
- ? (styleText(style) ?? undefined)
36
- : undefined;
37
27
  /**
38
28
  * Writes a React element-prop record onto one Angular element, re-applying
39
29
  * only what changed since the previous {@link ElementPropsWriter.write}.
@@ -44,7 +34,7 @@ const styleAttribute = (style) => typeof style === 'object' && style !== null
44
34
  * suffix → capture phase, `onDoubleClick` → `dblclick`); a non-function
45
35
  * value removes the listener, and so does dropping the key.
46
36
  * - `className` and `class` compose into one `class` attribute with `cn`.
47
- * - An object `style` is serialized with `styleText`.
37
+ * - An object `style` is serialized with `reactStyleText`.
48
38
  * - Every other key becomes an attribute: `null`/`undefined` removes it,
49
39
  * `false` removes it (except text booleans, which write `"false"`), and
50
40
  * `true` writes `""` (text booleans write `"true"`). Any other value is
@@ -96,7 +86,7 @@ export class ElementPropsWriter {
96
86
  if (key === 'className' || key === 'class')
97
87
  continue;
98
88
  if (key === 'style') {
99
- next.set('style', styleAttribute(value));
89
+ next.set('style', reactStyleText(value, ' '));
100
90
  continue;
101
91
  }
102
92
  next.set(key, value);
@@ -1 +1 @@
1
- {"version":3,"file":"element-props.js","sourceRoot":"","sources":["../../src/utilities/element-props.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AAEnC;;;GAGG;AACH,MAAM,YAAY,GAAG,yDAAyD,CAAA;AAE9E;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,CAAC,GAAW,EAAW,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAEjE;;;;;;GAMG;AACH,MAAM,cAAc,GAAG,CAAC,KAAc,EAAsB,EAAE,CAC5D,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;IACzC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAgC,CAAC,IAAI,SAAS,CAAC;IAC5D,CAAC,CAAC,SAAS,CAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,kBAAkB;IACZ,QAAQ,CAAW;IACnB,OAAO,CAAS;IACzB,OAAO,GAAG,IAAI,GAAG,EAAmB,CAAA;IAC3B,SAAS,GAAG,IAAI,GAAG,EAAsB,CAAA;IAE1D;;;;;OAKG;IACH,YAAY,QAAmB,EAAE,OAAgB;QAC/C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;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AS,CAAC,KAAK,EAAE,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAE,CAAA;IAC1B,CAAC;IAED;;;;OAIG;IACK,cAAc,CAAC,GAAW;QAChC,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QACtC,IAAI,CAAC,MAAM;YAAE,OAAM;QACnB,MAAM,EAAE,CAAA;QACR,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAC5B,CAAC;CACF"}
@@ -11,6 +11,7 @@
11
11
  * @module
12
12
  */
13
13
  import { type ElementRef, type Signal } from '@angular/core';
14
+ import type { ElementHandle, OverlayTarget } from '@molecule/app-ui';
14
15
  /**
15
16
  * A component that gives callers its ref element.
16
17
  *
@@ -31,4 +32,13 @@ export interface HasElement<E extends Element> {
31
32
  * @returns A read-only signal holding the host element.
32
33
  */
33
34
  export declare const hostElement: <E extends Element>(host: ElementRef<E>) => Signal<E | null>;
35
+ /**
36
+ * A target that reads an element each time an overlay asks for it, such as a Modal's
37
+ * `initialFocus` naming a control in the dialog's content. A class field can build it, since the
38
+ * arrow keeps `this`: `readonly emailTarget = elementTarget(() => this.email?.nativeElement)`.
39
+ *
40
+ * @param read - Returns the element, or `null` or `undefined` while it is not rendered.
41
+ * @returns The target, whose `current` is the element or `null`.
42
+ */
43
+ export declare const elementTarget: (read: () => ElementHandle | null | undefined) => OverlayTarget;
34
44
  //# sourceMappingURL=element.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../src/utilities/element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,MAAM,EAAU,MAAM,eAAe,CAAA;AAEpE;;;;;GAKG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,OAAO;IAC3C,2DAA2D;IAC3D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;CACnC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,OAAO,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,KAAG,MAAM,CAAC,CAAC,GAAG,IAAI,CAC3C,CAAA"}
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../src/utilities/element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,MAAM,EAAU,MAAM,eAAe,CAAA;AAEpE,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEpE;;;;;GAKG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,OAAO;IAC3C,2DAA2D;IAC3D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;CACnC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,OAAO,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,KAAG,MAAM,CAAC,CAAC,GAAG,IAAI,CAC3C,CAAA;AAEzC;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,SAAS,KAAG,aAI3E,CAAA"}
@@ -21,4 +21,17 @@ import { signal } from '@angular/core';
21
21
  * @returns A read-only signal holding the host element.
22
22
  */
23
23
  export const hostElement = (host) => signal(host.nativeElement).asReadonly();
24
+ /**
25
+ * A target that reads an element each time an overlay asks for it, such as a Modal's
26
+ * `initialFocus` naming a control in the dialog's content. A class field can build it, since the
27
+ * arrow keeps `this`: `readonly emailTarget = elementTarget(() => this.email?.nativeElement)`.
28
+ *
29
+ * @param read - Returns the element, or `null` or `undefined` while it is not rendered.
30
+ * @returns The target, whose `current` is the element or `null`.
31
+ */
32
+ export const elementTarget = (read) => ({
33
+ get current() {
34
+ return read() ?? null;
35
+ },
36
+ });
24
37
  //# sourceMappingURL=element.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"element.js","sourceRoot":"","sources":["../../src/utilities/element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAgC,MAAM,EAAE,MAAM,eAAe,CAAA;AAapE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAoB,IAAmB,EAAoB,EAAE,CACtF,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,UAAU,EAAE,CAAA"}
1
+ {"version":3,"file":"element.js","sourceRoot":"","sources":["../../src/utilities/element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAgC,MAAM,EAAE,MAAM,eAAe,CAAA;AAepE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAoB,IAAmB,EAAoB,EAAE,CACtF,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,UAAU,EAAE,CAAA;AAEzC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAA4C,EAAiB,EAAE,CAAC,CAAC;IAC7F,IAAI,OAAO;QACT,OAAO,IAAI,EAAE,IAAI,IAAI,CAAA;IACvB,CAAC;CACF,CAAC,CAAA"}
@@ -1,25 +1,15 @@
1
1
  /**
2
- * React-style inline style serialization for Angular host bindings.
2
+ * React-style inline styles for Angular bindings.
3
3
  *
4
4
  * @module
5
5
  */
6
+ export { toCssPropertyName as kebab, reactStyleText, toStyleProps, } from '@molecule/app-inline-style-dom';
6
7
  /**
7
- * Converts a camelCase CSS property name to kebab-case.
8
+ * Serializes a React-shaped style object for Angular's `[style]` binding.
9
+ * Resolves overlapping properties that Angular would apply out of order.
8
10
  *
9
- * @param key - The camelCase property name.
10
- * @returns The kebab-case CSS property name.
11
- */
12
- export declare const kebab: (key: string) => string;
13
- /**
14
- * Serializes a React-style style object the way React writes it to the DOM:
15
- * camelCase keys become kebab-case, numbers gain `px` unless the property is
16
- * unitless, and declaration order follows object key order (the conformance
17
- * normalizer sorts declarations anyway). A shorthand and a longhand it covers
18
- * that Angular's sorted style binding would apply out of order come back
19
- * resolved, as the CSSOM applies them in object order.
20
- *
21
- * @param style - The style object (or undefined).
22
- * @returns The `style` attribute text, or null when there is nothing to set.
11
+ * @param style - The style object, or an absent value.
12
+ * @returns CSS declaration text, or null when there are no declarations.
23
13
  */
24
14
  export declare function styleText(style: Record<string, unknown> | undefined | null): string | null;
25
15
  //# sourceMappingURL=style.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../src/utilities/style.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAuDH;;;;;GAKG;AACH,eAAO,MAAM,KAAK,GAAI,KAAK,MAAM,KAAG,MAC8C,CAAA;AAiElF;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAW1F"}
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../src/utilities/style.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EACL,iBAAiB,IAAI,KAAK,EAC1B,cAAc,EACd,YAAY,GACb,MAAM,gCAAgC,CAAA;AA6DvC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAG1F"}
@@ -1,152 +1,73 @@
1
1
  /**
2
- * React-style inline style serialization for Angular host bindings.
2
+ * React-style inline styles for Angular bindings.
3
3
  *
4
4
  * @module
5
5
  */
6
- /**
7
- * CSS properties that take a raw number in React (no `px` suffix).
8
- * Mirrors React's `isUnitlessNumber` list.
9
- */
10
- const UNITLESS = new Set([
11
- 'animationIterationCount',
12
- 'aspectRatio',
13
- 'borderImageOutset',
14
- 'borderImageSlice',
15
- 'borderImageWidth',
16
- 'boxFlex',
17
- 'boxFlexGroup',
18
- 'boxOrdinalGroup',
19
- 'columnCount',
20
- 'columns',
21
- 'flex',
22
- 'flexGrow',
23
- 'flexPositive',
24
- 'flexShrink',
25
- 'flexNegative',
26
- 'flexOrder',
27
- 'gridArea',
28
- 'gridRow',
29
- 'gridRowEnd',
30
- 'gridRowSpan',
31
- 'gridRowStart',
32
- 'gridColumn',
33
- 'gridColumnEnd',
34
- 'gridColumnSpan',
35
- 'gridColumnStart',
36
- 'fontWeight',
37
- 'lineClamp',
38
- 'lineHeight',
39
- 'opacity',
40
- 'order',
41
- 'orphans',
42
- 'scale',
43
- 'tabSize',
44
- 'widows',
45
- 'zIndex',
46
- 'zoom',
47
- 'MozAnimationIterationCount',
48
- 'MozBoxFlex',
49
- 'MozLineClamp',
50
- 'msGridRow',
51
- 'msGridRowSpan',
52
- 'msGridColumn',
53
- 'msGridColumnSpan',
54
- 'WebkitAnimationIterationCount',
55
- 'WebkitBoxFlex',
56
- 'WebkitLineClamp',
57
- ]);
58
- /**
59
- * Converts a camelCase CSS property name to kebab-case.
60
- *
61
- * @param key - The camelCase property name.
62
- * @returns The kebab-case CSS property name.
63
- */
64
- export const kebab = (key) => key.startsWith('--') ? key : key.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
65
- /** The longhands each property name sets, read from the CSSOM once per name. */
66
- const longhandCache = new Map();
67
- /** One scratch declaration block per document, reused by every call. */
6
+ import { bindInlineStyle, reactStyleText, toStyleProps } from '@molecule/app-inline-style-dom';
7
+ export { toCssPropertyName as kebab, reactStyleText, toStyleProps, } from '@molecule/app-inline-style-dom';
8
+ /** Scratch elements and their cached CSS shorthand expansions, per document. */
68
9
  const probes = new WeakMap();
69
10
  /**
70
- * The longhand properties a declaration sets: itself for a longhand, every one it expands to for
71
- * a shorthand (`gap` → `row-gap`, `column-gap`).
11
+ * The declaration names after applying a property to an empty CSSOM style.
72
12
  *
73
- * @param probe - A scratch declaration block.
74
- * @param name - The kebab-case property name.
75
- * @param value - Its value (a name the CSSOM rejects with it is read again with the next value).
76
- * @returns The longhand names.
13
+ * @param probe - The scratch element and its cache.
14
+ * @param name - The CSS property name.
15
+ * @param value - The declaration's value.
16
+ * @returns The names the declaration sets.
77
17
  */
78
- const longhandsOf = (probe, name, value) => {
79
- const known = longhandCache.get(name);
18
+ function longhandsOf(probe, name, value) {
19
+ const known = probe.longhands.get(name);
80
20
  if (known)
81
21
  return known;
82
- probe.cssText = '';
83
- probe.setProperty(name, value);
84
- const names = Array.from({ length: probe.length }, (_, i) => probe.item(i));
22
+ const { style } = probe.node;
23
+ style.cssText = '';
24
+ bindInlineStyle(probe.node, { [name]: value });
25
+ const names = Array.from({ length: style.length }, (_, index) => style.item(index));
85
26
  if (names.length)
86
- longhandCache.set(name, names);
27
+ probe.longhands.set(name, names);
87
28
  return names.length ? names : [name];
88
- };
29
+ }
89
30
  /**
90
- * The declarations as the DOM resolves them in this order, when a shorthand and a longhand it
91
- * covers both appear and their names sort the other way round: Angular's `[style]` binding keeps
92
- * its declarations sorted by property name, so `gap: 9px; column-gap: 3px` would reach the
93
- * element as `column-gap` then `gap`, and `gap` would erase the column gap a browser (and React,
94
- * which writes in object order) keeps. Resolved through the CSSOM, the text holds each longhand
95
- * once and any order applies it the same way. Null when nothing overlaps, or with no DOM.
31
+ * Angular sorts `[style]` declarations by name. Resolve shorthands and longhands that
32
+ * the sort would reorder, so Angular applies them with the precedence of the original object.
96
33
  *
97
- * @param parts - `[name, value]` pairs in object order.
98
- * @returns The resolved declaration text, or null.
34
+ * @param props - CSS property names and values, in object order.
35
+ * @returns The resolved CSS text when the sort would reorder an overlap.
99
36
  */
100
- const resolvedOverlaps = (parts) => {
37
+ function resolveStyleOrder(props) {
38
+ const parts = Object.entries(props);
101
39
  if (parts.length < 2 || typeof document === 'undefined')
102
- return null;
40
+ return undefined;
103
41
  let probe = probes.get(document);
104
42
  if (!probe) {
105
- probe = document.createElement('div').style;
43
+ probe = { node: document.createElement('div'), longhands: new Map() };
106
44
  probes.set(document, probe);
107
45
  }
108
46
  const seen = new Map();
109
- let inverted = false;
110
47
  for (const [name, value] of parts) {
111
48
  if (name.startsWith('--'))
112
49
  continue;
113
50
  for (const longhand of longhandsOf(probe, name, value)) {
114
51
  const earlier = seen.get(longhand);
115
- if (earlier !== undefined && earlier !== name && earlier > name)
116
- inverted = true;
52
+ if (earlier !== undefined && earlier > name) {
53
+ probe.node.style.cssText = '';
54
+ bindInlineStyle(probe.node, props);
55
+ return probe.node.style.cssText.replace(/;\s*$/, '') || undefined;
56
+ }
117
57
  seen.set(longhand, name);
118
58
  }
119
59
  }
120
- if (!inverted)
121
- return null;
122
- probe.cssText = '';
123
- for (const [name, value] of parts)
124
- probe.setProperty(name, value);
125
- return probe.cssText.replace(/;\s*$/, '') || null;
126
- };
60
+ return undefined;
61
+ }
127
62
  /**
128
- * Serializes a React-style style object the way React writes it to the DOM:
129
- * camelCase keys become kebab-case, numbers gain `px` unless the property is
130
- * unitless, and declaration order follows object key order (the conformance
131
- * normalizer sorts declarations anyway). A shorthand and a longhand it covers
132
- * that Angular's sorted style binding would apply out of order come back
133
- * resolved, as the CSSOM applies them in object order.
63
+ * Serializes a React-shaped style object for Angular's `[style]` binding.
64
+ * Resolves overlapping properties that Angular would apply out of order.
134
65
  *
135
- * @param style - The style object (or undefined).
136
- * @returns The `style` attribute text, or null when there is nothing to set.
66
+ * @param style - The style object, or an absent value.
67
+ * @returns CSS declaration text, or null when there are no declarations.
137
68
  */
138
69
  export function styleText(style) {
139
- if (!style)
140
- return null;
141
- const parts = [];
142
- for (const [key, value] of Object.entries(style)) {
143
- if (value === null || value === undefined || value === false)
144
- continue;
145
- const text = typeof value === 'number' ? (UNITLESS.has(key) ? String(value) : `${value}px`) : String(value);
146
- parts.push([kebab(key), text]);
147
- }
148
- if (!parts.length)
149
- return null;
150
- return resolvedOverlaps(parts) ?? parts.map(([name, text]) => `${name}: ${text}`).join('; ');
70
+ const props = toStyleProps(style);
71
+ return (props && resolveStyleOrder(props)) ?? reactStyleText(style, ' ') ?? null;
151
72
  }
152
73
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sourceRoot":"","sources":["../../src/utilities/style.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC;IACvB,yBAAyB;IACzB,aAAa;IACb,mBAAmB;IACnB,kBAAkB;IAClB,kBAAkB;IAClB,SAAS;IACT,cAAc;IACd,iBAAiB;IACjB,aAAa;IACb,SAAS;IACT,MAAM;IACN,UAAU;IACV,cAAc;IACd,YAAY;IACZ,cAAc;IACd,WAAW;IACX,UAAU;IACV,SAAS;IACT,YAAY;IACZ,aAAa;IACb,cAAc;IACd,YAAY;IACZ,eAAe;IACf,gBAAgB;IAChB,iBAAiB;IACjB,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,SAAS;IACT,OAAO;IACP,SAAS;IACT,OAAO;IACP,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,4BAA4B;IAC5B,YAAY;IACZ,cAAc;IACd,WAAW;IACX,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,+BAA+B;IAC/B,eAAe;IACf,iBAAiB;CAClB,CAAC,CAAA;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAW,EAAU,EAAE,CAC3C,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAElF,gFAAgF;AAChF,MAAM,aAAa,GAAG,IAAI,GAAG,EAA6B,CAAA;AA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AM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;YAClC,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,GAAG,IAAI,EAAE,CAAC;gBAC5C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAA;gBAC7B,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;gBAClC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,SAAS,CAAA;YACnE,CAAC;YACD,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;QAC1B,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,KAAiD;IACzE,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAA;IACjC,OAAO,CAAC,KAAK,IAAI,iBAAiB,CAAC,KAAK,CAAC,CAAC,IAAI,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,IAAI,CAAA;AAClF,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { type OnDestroy } from '@angular/core';
2
+ import type { ElementDrag } from '@molecule/app-ui';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Binds an HTML or SVG element to the web kits' shared drag gesture. Import
6
+ * `WebDragDirective` into a standalone component and bind `[molDrag]="handlers"`.
7
+ * Pass undefined to disable the gesture.
8
+ */
9
+ export declare class WebDragDirective implements OnDestroy {
10
+ private readonly host;
11
+ private readonly gesture;
12
+ /** The current handlers for this host. */
13
+ set molDrag(drag: ElementDrag | undefined);
14
+ /**
15
+ * Offers a primary pointer press to this directive's element.
16
+ *
17
+ * @param event - The native bubbling pointer event.
18
+ */
19
+ onPointerDown(event: PointerEvent): void;
20
+ /** Cancels the gesture when Angular destroys its host. */
21
+ ngOnDestroy(): void;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<WebDragDirective, never>;
23
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WebDragDirective, "[molDrag]", never, { "molDrag": { "alias": "molDrag"; "required": false; }; }, {}, never, never, true, never>;
24
+ }
25
+ //# sourceMappingURL=web-drag.directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-drag.directive.d.ts","sourceRoot":"","sources":["../src/web-drag.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,eAAe,CAAA;AAGpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;;AAEnD;;;;GAIG;AACH,qBAKa,gBAAiB,YAAW,SAAS;IAChD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAyE;IAC9F,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAE1C,0CAA0C;IAC1C,IACI,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,EAExC;IAED;;;;OAIG;IACH,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAIxC,0DAA0D;IAC1D,WAAW,IAAI,IAAI;yCApBR,gBAAgB;2CAAhB,gBAAgB;CAuB5B"}
@@ -0,0 +1,43 @@
1
+ import { Directive, ElementRef, inject, Input } from '@angular/core';
2
+ import { createWebDrag } from '@molecule/app-pointer-events-dom';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Binds an HTML or SVG element to the web kits' shared drag gesture. Import
6
+ * `WebDragDirective` into a standalone component and bind `[molDrag]="handlers"`.
7
+ * Pass undefined to disable the gesture.
8
+ */
9
+ export class WebDragDirective {
10
+ host = inject(ElementRef).nativeElement;
11
+ gesture = createWebDrag();
12
+ /** The current handlers for this host. */
13
+ set molDrag(drag) {
14
+ this.gesture.update(drag);
15
+ }
16
+ /**
17
+ * Offers a primary pointer press to this directive's element.
18
+ *
19
+ * @param event - The native bubbling pointer event.
20
+ */
21
+ onPointerDown(event) {
22
+ this.gesture.start(this.host, event);
23
+ }
24
+ /** Cancels the gesture when Angular destroys its host. */
25
+ ngOnDestroy() {
26
+ this.gesture.cancel();
27
+ }
28
+ static ɵfac = function WebDragDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || WebDragDirective)(); };
29
+ static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: WebDragDirective, selectors: [["", "molDrag", ""]], hostBindings: function WebDragDirective_HostBindings(rf, ctx) { if (rf & 1) {
30
+ i0.ɵɵlistener("pointerdown", function WebDragDirective_pointerdown_HostBindingHandler($event) { return ctx.onPointerDown($event); });
31
+ } }, inputs: { molDrag: "molDrag" } });
32
+ }
33
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WebDragDirective, [{
34
+ type: Directive,
35
+ args: [{
36
+ selector: '[molDrag]',
37
+ standalone: true,
38
+ host: { '(pointerdown)': 'onPointerDown($event)' },
39
+ }]
40
+ }], null, { molDrag: [{
41
+ type: Input
42
+ }] }); })();
43
+ //# sourceMappingURL=web-drag.directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-drag.directive.js","sourceRoot":"","sources":["../src/web-drag.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAA;AAEpF,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;;AAGhE;;;;GAIG;AAMH,MAAM,OAAO,gBAAgB;IACV,IAAI,GAAG,MAAM,CAAuC,UAAU,CAAC,CAAC,aAAa,CAAA;IAC7E,OAAO,GAAG,aAAa,EAAE,CAAA;IAE1C,0CAA0C;IAC1C,IACI,OAAO,CAAC,IAA6B;QACvC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;IAED;;;;OAIG;IACH,aAAa,CAAC,KAAmB;QAC/B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;IACtC,CAAC;IAED,0DAA0D;IAC1D,WAAW;QACT,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAA;IACvB,CAAC;0GAtBU,gBAAgB;6DAAhB,gBAAgB;YAAhB,uGAAA,yBAAqB,IAAL;;;iFAAhB,gBAAgB;cAL5B,SAAS;eAAC;gBACT,QAAQ,EAAE,WAAW;gBACrB,UAAU,EAAE,IAAI;gBAChB,IAAI,EAAE,EAAE,eAAe,EAAE,uBAAuB,EAAE;aACnD;;kBAME,KAAK"}
@@ -0,0 +1,24 @@
1
+ import { EventEmitter, type OnDestroy } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Handles shared mouse and pen hover. Import `WebHoverDirective` into a
5
+ * standalone component, add `molHover` to the host and listen for
6
+ * `(molHoverEnter)` and `(molHoverLeave)`. Bind `[molHover]="false"`
7
+ * to disable hover.
8
+ */
9
+ export declare class WebHoverDirective implements OnDestroy {
10
+ /** Emits when a mouse or pen enters the host. */
11
+ readonly molHoverEnter: EventEmitter<MouseEvent>;
12
+ /** Emits when the hovering mouse or pen leaves the host. */
13
+ readonly molHoverLeave: EventEmitter<MouseEvent>;
14
+ private readonly binding;
15
+ private readonly handlers;
16
+ /** Enables the gesture on this host. */
17
+ set molHover(enabled: boolean);
18
+ /** Removes the hover listeners when Angular destroys the host. */
19
+ ngOnDestroy(): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<WebHoverDirective, never>;
21
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WebHoverDirective, "[molHover]", never, { "molHover": { "alias": "molHover"; "required": false; }; }, { "molHoverEnter": "molHoverEnter"; "molHoverLeave": "molHoverLeave"; }, never, never, true, never>;
22
+ static ngAcceptInputType_molHover: unknown;
23
+ }
24
+ //# sourceMappingURL=web-hover.directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-hover.directive.d.ts","sourceRoot":"","sources":["../src/web-hover.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAGZ,KAAK,SAAS,EACf,MAAM,eAAe,CAAA;;AAItB;;;;;GAKG;AACH,qBAKa,iBAAkB,YAAW,SAAS;IACjD,iDAAiD;IACjD,QAAQ,CAAC,aAAa,2BAAiC;IAEvD,4DAA4D;IAC5D,QAAQ,CAAC,aAAa,2BAAiC;IAEvD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAEvB;IAED,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAGxB;IAED,wCAAwC;IACxC,IACI,QAAQ,CAAC,OAAO,EAAE,OAAO,EAE5B;IAED,kEAAkE;IAClE,WAAW,IAAI,IAAI;yCAvBR,iBAAiB;2CAAjB,iBAAiB;uCA2B24yR,OAAQ;CADh7yR"}
@@ -0,0 +1,42 @@
1
+ import { booleanAttribute, Directive, ElementRef, EventEmitter, inject, Input, } from '@angular/core';
2
+ import { bindWebHover } from '@molecule/app-pointer-events-dom';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Handles shared mouse and pen hover. Import `WebHoverDirective` into a
6
+ * standalone component, add `molHover` to the host and listen for
7
+ * `(molHoverEnter)` and `(molHoverLeave)`. Bind `[molHover]="false"`
8
+ * to disable hover.
9
+ */
10
+ export class WebHoverDirective {
11
+ /** Emits when a mouse or pen enters the host. */
12
+ molHoverEnter = new EventEmitter();
13
+ /** Emits when the hovering mouse or pen leaves the host. */
14
+ molHoverLeave = new EventEmitter();
15
+ binding = bindWebHover(inject(ElementRef).nativeElement);
16
+ handlers = {
17
+ onEnter: (event) => this.molHoverEnter.emit(event),
18
+ onLeave: (event) => this.molHoverLeave.emit(event),
19
+ };
20
+ /** Enables the gesture on this host. */
21
+ set molHover(enabled) {
22
+ this.binding.update(enabled ? this.handlers : undefined);
23
+ }
24
+ /** Removes the hover listeners when Angular destroys the host. */
25
+ ngOnDestroy() {
26
+ this.binding.destroy();
27
+ }
28
+ static ɵfac = function WebHoverDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || WebHoverDirective)(); };
29
+ static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: WebHoverDirective, selectors: [["", "molHover", ""]], inputs: { molHover: [2, "molHover", "molHover", booleanAttribute] }, outputs: { molHoverEnter: "molHoverEnter", molHoverLeave: "molHoverLeave" } });
30
+ }
31
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WebHoverDirective, [{
32
+ type: Directive,
33
+ args: [{
34
+ selector: '[molHover]',
35
+ standalone: true,
36
+ outputs: ['molHoverEnter', 'molHoverLeave'],
37
+ }]
38
+ }], null, { molHover: [{
39
+ type: Input,
40
+ args: [{ transform: booleanAttribute }]
41
+ }] }); })();
42
+ //# sourceMappingURL=web-hover.directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-hover.directive.js","sourceRoot":"","sources":["../src/web-hover.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,MAAM,EACN,KAAK,GAEN,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;;AAE/D;;;;;GAKG;AAMH,MAAM,OAAO,iBAAiB;IAC5B,iDAAiD;IACxC,aAAa,GAAG,IAAI,YAAY,EAAc,CAAA;IAEvD,4DAA4D;IACnD,aAAa,GAAG,IAAI,YAAY,EAAc,CAAA;IAEtC,OAAO,GAAG,YAAY,CACrC,MAAM,CAAuC,UAAU,CAAC,CAAC,aAAa,CACvE,CAAA;IAEgB,QAAQ,GAAG;QAC1B,OAAO,EAAE,CAAC,KAAiB,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;QAC9D,OAAO,EAAE,CAAC,KAAiB,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;KAC/D,CAAA;IAED,wCAAwC;IACxC,IACI,QAAQ,CAAC,OAAgB;QAC3B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IAC1D,CAAC;IAED,kEAAkE;IAClE,WAAW;QACT,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAA;IACxB,CAAC;2GAzBU,iBAAiB;6DAAjB,iBAAiB,qFAiBR,gBAAgB;;iFAjBzB,iBAAiB;cAL7B,SAAS;eAAC;gBACT,QAAQ,EAAE,YAAY;gBACtB,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC;aAC5C;;kBAkBE,KAAK;mBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE"}
@@ -0,0 +1,18 @@
1
+ import { type OnDestroy } from '@angular/core';
2
+ import { type WebWheelZoomHandler } from '@molecule/app-pointer-events-dom';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Handles shared Ctrl-wheel zoom steps. Import `WebWheelZoomDirective`
6
+ * into a standalone component and bind `[molWheelZoom]="onStep"`.
7
+ * Pass undefined to leave the wheel to the browser.
8
+ */
9
+ export declare class WebWheelZoomDirective implements OnDestroy {
10
+ private readonly binding;
11
+ /** Sets the callback that receives each handled zoom step. */
12
+ set molWheelZoom(onStep: WebWheelZoomHandler | undefined);
13
+ /** Removes the wheel listener when Angular destroys the host. */
14
+ ngOnDestroy(): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<WebWheelZoomDirective, never>;
16
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WebWheelZoomDirective, "[molWheelZoom]", never, { "molWheelZoom": { "alias": "molWheelZoom"; "required": false; }; }, {}, never, never, true, never>;
17
+ }
18
+ //# sourceMappingURL=web-wheel-zoom.directive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-wheel-zoom.directive.d.ts","sourceRoot":"","sources":["../src/web-wheel-zoom.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,eAAe,CAAA;AAEpF,OAAO,EAAoB,KAAK,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;;AAE7F;;;;GAIG;AACH,qBACa,qBAAsB,YAAW,SAAS;IACrD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAEvB;IAED,8DAA8D;IAC9D,IACI,YAAY,CAAC,MAAM,EAAE,mBAAmB,GAAG,SAAS,EAEvD;IAED,iEAAiE;IACjE,WAAW,IAAI,IAAI;yCAZR,qBAAqB;2CAArB,qBAAqB;CAejC"}
@@ -0,0 +1,28 @@
1
+ import { Directive, ElementRef, inject, Input } from '@angular/core';
2
+ import { bindWebWheelZoom } from '@molecule/app-pointer-events-dom';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Handles shared Ctrl-wheel zoom steps. Import `WebWheelZoomDirective`
6
+ * into a standalone component and bind `[molWheelZoom]="onStep"`.
7
+ * Pass undefined to leave the wheel to the browser.
8
+ */
9
+ export class WebWheelZoomDirective {
10
+ binding = bindWebWheelZoom(inject(ElementRef).nativeElement);
11
+ /** Sets the callback that receives each handled zoom step. */
12
+ set molWheelZoom(onStep) {
13
+ this.binding.update(onStep);
14
+ }
15
+ /** Removes the wheel listener when Angular destroys the host. */
16
+ ngOnDestroy() {
17
+ this.binding.destroy();
18
+ }
19
+ static ɵfac = function WebWheelZoomDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || WebWheelZoomDirective)(); };
20
+ static ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: WebWheelZoomDirective, selectors: [["", "molWheelZoom", ""]], inputs: { molWheelZoom: "molWheelZoom" } });
21
+ }
22
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WebWheelZoomDirective, [{
23
+ type: Directive,
24
+ args: [{ selector: '[molWheelZoom]', standalone: true }]
25
+ }], null, { molWheelZoom: [{
26
+ type: Input
27
+ }] }); })();
28
+ //# sourceMappingURL=web-wheel-zoom.directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-wheel-zoom.directive.js","sourceRoot":"","sources":["../src/web-wheel-zoom.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAA;AAEpF,OAAO,EAAE,gBAAgB,EAA4B,MAAM,kCAAkC,CAAA;;AAE7F;;;;GAIG;AAEH,MAAM,OAAO,qBAAqB;IACf,OAAO,GAAG,gBAAgB,CACzC,MAAM,CAAuC,UAAU,CAAC,CAAC,aAAa,CACvE,CAAA;IAED,8DAA8D;IAC9D,IACI,YAAY,CAAC,MAAuC;QACtD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC;IAED,iEAAiE;IACjE,WAAW;QACT,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAA;IACxB,CAAC;+GAdU,qBAAqB;6DAArB,qBAAqB;;iFAArB,qBAAqB;cADjC,SAAS;eAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAE;;kBAOxD,KAAK"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-ui-angular",
3
- "version": "1.5.1",
3
+ "version": "1.10.0",
4
4
  "description": "Angular UI components for molecule.dev",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -37,14 +37,20 @@
37
37
  "engines": {
38
38
  "node": ">=20"
39
39
  },
40
+ "dependencies": {
41
+ "@molecule/app-inline-style-dom": "1.2.0",
42
+ "@molecule/app-overlay-dom": "1.1.0",
43
+ "@molecule/app-pointer-events-dom": "1.1.0"
44
+ },
40
45
  "peerDependencies": {
41
46
  "@angular/common": "^22.0.0",
42
47
  "@angular/core": "^22.0.0",
43
48
  "@angular/platform-browser": "^22.0.0",
44
- "@molecule/app-angular": "^3.13.0",
49
+ "@molecule/app-angular": "^3.16.1",
50
+ "@molecule/app-filesystem": "^1.1.0",
45
51
  "@molecule/app-i18n": "^1.0.1",
46
52
  "@molecule/app-icons": "^1.0.1",
47
- "@molecule/app-ui": "^1.5.0"
53
+ "@molecule/app-ui": "^1.12.0"
48
54
  },
49
55
  "devDependencies": {
50
56
  "@angular/common": "22.2.3",
@@ -52,9 +58,11 @@
52
58
  "@angular/compiler-cli": "22.2.3",
53
59
  "@angular/core": "22.2.3",
54
60
  "@angular/platform-browser": "22.2.3",
55
- "@molecule/app-angular": "3.13.0",
61
+ "@angular/platform-server": "22.2.3",
62
+ "@molecule/app-angular": "3.16.1",
63
+ "@molecule/app-filesystem": "1.1.0",
56
64
  "@molecule/app-framework-conformance": "0.0.0",
57
- "@molecule/app-i18n": "1.2.2",
65
+ "@molecule/app-i18n": "1.3.0",
58
66
  "@molecule/app-icons": "1.0.4",
59
67
  "@testing-library/dom": "10.4.2",
60
68
  "@types/node": "26.6.5",