ngx-kit 7.1.0 → 7.3.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 (73) hide show
  1. package/angle-selector/README.md +34 -34
  2. package/box-shadow/README.md +33 -33
  3. package/color-picker/README.md +52 -52
  4. package/{shared → core}/README.md +117 -117
  5. package/data-table/README.md +120 -120
  6. package/date-picker/README.md +74 -74
  7. package/dialog/README.md +122 -92
  8. package/drag-resize/README.md +53 -55
  9. package/fesm2022/ngx-kit-angle-selector.mjs +9 -26
  10. package/fesm2022/ngx-kit-angle-selector.mjs.map +1 -1
  11. package/fesm2022/ngx-kit-box-shadow.mjs +330 -356
  12. package/fesm2022/ngx-kit-box-shadow.mjs.map +1 -1
  13. package/fesm2022/ngx-kit-color-picker.mjs +132 -272
  14. package/fesm2022/ngx-kit-color-picker.mjs.map +1 -1
  15. package/fesm2022/{ngx-kit-shared.mjs → ngx-kit-core.mjs} +908 -277
  16. package/fesm2022/ngx-kit-core.mjs.map +1 -0
  17. package/fesm2022/ngx-kit-data-table.mjs +1 -1
  18. package/fesm2022/ngx-kit-data-table.mjs.map +1 -1
  19. package/fesm2022/ngx-kit-date-picker.mjs +34 -22
  20. package/fesm2022/ngx-kit-date-picker.mjs.map +1 -1
  21. package/fesm2022/ngx-kit-dialog.mjs +430 -331
  22. package/fesm2022/ngx-kit-dialog.mjs.map +1 -1
  23. package/fesm2022/ngx-kit-drag-resize.mjs +193 -140
  24. package/fesm2022/ngx-kit-drag-resize.mjs.map +1 -1
  25. package/fesm2022/ngx-kit-drawer-menu.mjs +3 -3
  26. package/fesm2022/ngx-kit-drawer-menu.mjs.map +1 -1
  27. package/fesm2022/ngx-kit-dropzone.mjs.map +1 -1
  28. package/fesm2022/ngx-kit-form-field.mjs +9 -3
  29. package/fesm2022/ngx-kit-form-field.mjs.map +1 -1
  30. package/fesm2022/ngx-kit-gallery.mjs +3 -3
  31. package/fesm2022/ngx-kit-gallery.mjs.map +1 -1
  32. package/fesm2022/ngx-kit-gradient-picker.mjs +20 -38
  33. package/fesm2022/ngx-kit-gradient-picker.mjs.map +1 -1
  34. package/fesm2022/ngx-kit-grid-layout.mjs +32 -30
  35. package/fesm2022/ngx-kit-grid-layout.mjs.map +1 -1
  36. package/fesm2022/ngx-kit-image-editor.mjs +3 -3
  37. package/fesm2022/ngx-kit-image-editor.mjs.map +1 -1
  38. package/fesm2022/ngx-kit-menu.mjs +1 -1
  39. package/fesm2022/ngx-kit-menu.mjs.map +1 -1
  40. package/fesm2022/ngx-kit-message.mjs +2 -2
  41. package/fesm2022/ngx-kit-message.mjs.map +1 -1
  42. package/fesm2022/ngx-kit-notify.mjs +1 -1
  43. package/fesm2022/ngx-kit-notify.mjs.map +1 -1
  44. package/fesm2022/ngx-kit-time-picker.mjs +1 -1
  45. package/fesm2022/ngx-kit-time-picker.mjs.map +1 -1
  46. package/fesm2022/ngx-kit-virtual-scroll.mjs +2 -2
  47. package/fesm2022/ngx-kit-virtual-scroll.mjs.map +1 -1
  48. package/gallery/README.md +71 -71
  49. package/gradient-picker/README.md +41 -41
  50. package/grid-layout/README.md +64 -64
  51. package/image-editor/README.md +44 -44
  52. package/menu/README.md +85 -85
  53. package/message/README.md +70 -70
  54. package/notify/README.md +56 -56
  55. package/package.json +5 -9
  56. package/time-picker/README.md +89 -89
  57. package/types/ngx-kit-angle-selector.d.ts +13 -16
  58. package/types/ngx-kit-box-shadow.d.ts +37 -95
  59. package/types/ngx-kit-color-picker.d.ts +61 -58
  60. package/types/{ngx-kit-shared.d.ts → ngx-kit-core.d.ts} +194 -34
  61. package/types/ngx-kit-data-table.d.ts +2 -2
  62. package/types/ngx-kit-date-picker.d.ts +15 -12
  63. package/types/ngx-kit-dialog.d.ts +208 -107
  64. package/types/ngx-kit-drag-resize.d.ts +74 -47
  65. package/types/ngx-kit-form-field.d.ts +26 -23
  66. package/types/ngx-kit-gradient-picker.d.ts +4 -7
  67. package/types/ngx-kit-menu.d.ts +1 -1
  68. package/types/ngx-kit-time-picker.d.ts +1 -1
  69. package/virtual-scroll/README.md +199 -199
  70. package/fesm2022/ngx-kit-shared.mjs.map +0 -1
  71. package/fesm2022/ngx-kit-webflow.mjs +0 -709
  72. package/fesm2022/ngx-kit-webflow.mjs.map +0 -1
  73. package/types/ngx-kit-webflow.d.ts +0 -286
@@ -1,199 +1,199 @@
1
- # @ngx-kit/virtual-scroll
2
-
3
- A zoneless, signal-based virtual scroll viewport for Angular. No `@angular/material`
4
- or `@angular/cdk` dependency, no `NgZone`, no `ngOnChanges`, no `@Input() itemSize`,
5
- no `@Input() orientation` — everything that can be derived from the real DOM is
6
- derived from the real DOM.
7
-
8
- ## Why this rewrite
9
-
10
- | Old design | This design |
11
- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
12
- | `NgZone` injected, `zone.run` everywhere | No `NgZone` at all — works natively under `provideZonelessChangeDetection()` |
13
- | `ngOnChanges` + `SimpleChanges` | `input()` signals + `computed()` / `effect()` |
14
- | `@Input() itemSize` (broke as soon as your item had margin/border/box-shadow) | Real item size is **measured** from `getBoundingClientRect()` deltas between actually rendered siblings, so margins/borders/shadows are always accounted for |
15
- | `@Input() orientation` | Axis is **auto-detected** from the real layout of your own item markup |
16
- | Custom `*ngxVirtualFor` structural directive | Plain native `@for` over a `visibleItems()` signal — you keep full control of `track`, `@empty`, etc. |
17
-
18
- ## Install & import
19
-
20
- ```ts
21
- import { NgxVirtualScrollViewport } from '@ngx-kit/virtual-scroll';
22
-
23
- @Component({
24
- standalone: true,
25
- imports: [NgxVirtualScrollViewport],
26
- ...
27
- })
28
- ```
29
-
30
- ## Basic usage — vertical list (auto-detected)
31
-
32
- ```html
33
- <ngx-virtual-scroll-viewport #vs="ngxVirtualScrollViewport" [items]="items" style="height: 400px">
34
- @for (item of vs.visibleItems(); track $index; let i = $index) {
35
- <div class="row">{{ vs.baseIndex() + i | number }} - {{ item.name }}</div>
36
- }
37
- </ngx-virtual-scroll-viewport>
38
- ```
39
-
40
- This is exactly the case that used to break: `.row` can have `margin`, `border`,
41
- `box-shadow`, `padding` — anything. The viewport measures the real distance between
42
- two consecutively rendered rows and uses that, not a number you have to keep in sync
43
- with your CSS.
44
-
45
- ```css
46
- .row {
47
- height: 48px;
48
- border: 1px rgb(166 166 166 / 51%) solid;
49
- box-shadow: 0px 0px 20px rgb(122 122 122 / 20%);
50
- border-radius: 5px;
51
- display: flex;
52
- align-items: center;
53
- margin: 10px;
54
- padding: 15px;
55
- }
56
- ```
57
-
58
- ## Horizontal lists & wrapping grids (auto-detected)
59
-
60
- The axis is inferred purely from how your own items lay out:
61
-
62
- - Items stack top-to-bottom (default block flow) → **vertical** list.
63
- - Items lay out left-to-right in a single line (e.g. `display: inline-flex` on the
64
- item, or a `flex-wrap: nowrap` row) → **horizontal** list.
65
- - Items lay out left-to-right and _wrap_ to a new line (e.g. cards with
66
- `display: flex; flex-wrap: wrap`) → treated as a **vertical** list of "lines",
67
- where each line holds N items. This is how mixed horizontal + vertical layouts
68
- (a card grid that scrolls vertically) are supported without a separate 2D data
69
- model — the cross axis (row width) lays out and scrolls natively, only the line
70
- axis is virtualized.
71
-
72
- You don't configure any of this — you only make sure your `.item` CSS actually lays
73
- out the way you want, and the viewport detects it.
74
-
75
- ## Mixed content (e.g. wide, virtualized table)
76
-
77
- Both axes of the scroll container are always natively scrollable
78
- (`overflow: auto` on both). Only the detected axis is virtualized; the cross axis
79
- (for example, a table wider than its container) scrolls with the browser's native
80
- scrollbar, so wide tables with virtualized rows work out of the box:
81
-
82
- ```html
83
- <div class="table-shell">
84
- <table><thead>...</thead></table>
85
- <!-- kept outside, sticky/fixed header -->
86
-
87
- <ngx-virtual-scroll-viewport #vs="ngxVirtualScrollViewport" [items]="rows" style="height: 480px">
88
- <table>
89
- <tbody>
90
- @for (row of vs.visibleItems(); track row.id; let i = $index) {
91
- <tr>
92
- <td>{{ vs.baseIndex() + i }}</td>
93
- ...
94
- </tr>
95
- }
96
- </tbody>
97
- </table>
98
- </ngx-virtual-scroll-viewport>
99
- </div>
100
- ```
101
-
102
- ## Very large data sets (1M+ rows)
103
-
104
- Browsers clamp any element's real CSS `height`/`width` to a hard maximum
105
- (~33.5M px in Chromium, far less in older WebKit/Gecko). Once a naive
106
- "spacer" element crosses that ceiling, the browser silently clamps it,
107
- `scrollHeight` stops growing, and everything past that point becomes
108
- unreachable — the classic "scroll gets stuck around ~500k rows" symptom.
109
-
110
- This viewport handles it automatically: the spacer's real DOM size is capped
111
- at `maxAxisSizePx` (6,000,000px by default — safely under every known
112
- browser limit), and the DOM scrollbar operates in a _compressed_ coordinate
113
- space via `scaleFactor()`. All range/index math is done against the real,
114
- uncompressed content size (`naturalTotalSize()`), so scrolling the
115
- (compressed) native scrollbar all the way to the end still lands you exactly
116
- on the last item, no matter how many millions of rows you have. The only
117
- user-visible trade-off for truly massive lists is that the scrollbar thumb's
118
- motion is no longer perfectly 1:1 with "one row per pixel" — an unavoidable
119
- consequence of representing an arbitrarily large data set inside a bounded
120
- native scrollbar, and the same trade-off every large-scale virtual scroll
121
- implementation makes.
122
-
123
- You don't need to configure anything for this — it only engages once
124
- `naturalTotalSize()` actually exceeds `maxAxisSizePx`, and is a no-op
125
- (`scaleFactor() === 1`) for the vast majority of real-world lists.
126
-
127
- ## API
128
-
129
- ### Inputs
130
-
131
- | Input | Type | Default | Notes |
132
- | --------------- | --------------------------- | ----------- | ---------------------------------------------------------------------------- |
133
- | `items` | `readonly T[]` | `[]` | Full data set |
134
- | `minBufferPx` | `number` | `150` | Buffer left before recomputing the range |
135
- | `maxBufferPx` | `number` | `300` | Extra px rendered outside the viewport |
136
- | `measureFn` | `NgxVirtualScrollMeasureFn` | `undefined` | Advanced override for the built-in layout probe |
137
- | `maxAxisSizePx` | `number` | `6_000_000` | Safe ceiling for the real DOM scroll size — see "Very large data sets" below |
138
-
139
- ### Outputs
140
-
141
- | Output | Type |
142
- | --------------------- | ----------------------------------------- |
143
- | `scrolledIndexChange` | `OutputEmitterRef<number>` |
144
- | `rangeChange` | `OutputEmitterRef<NgxVirtualScrollRange>` |
145
-
146
- ### Public signals (via `#vs="ngxVirtualScrollViewport"`)
147
-
148
- | Signal | Type | Meaning |
149
- | -------------------- | ---------------------------- | ------------------------------------------------------------------------------ |
150
- | `visibleItems()` | `readonly T[]` | Slice of `items()` to render right now |
151
- | `range()` | `{ start, end }` | Currently rendered line range |
152
- | `baseIndex()` | `number` | Absolute index of `visibleItems()[0]` |
153
- | `axis()` | `'vertical' \| 'horizontal'` | Auto-detected scroll axis |
154
- | `crossCount()` | `number` | Items per line (1 for a plain list) |
155
- | `lineSize()` | `number` | Measured px size of one line |
156
- | `isMeasured()` | `boolean` | Whether the initial layout probe has completed |
157
- | `isScrolling()` | `boolean` | True while an active scroll gesture is in progress |
158
- | `naturalTotalSize()` | `number` | Real, uncompressed total size along the scroll axis |
159
- | `totalSize()` | `number` | Size actually applied to the spacer (capped at `maxAxisSizePx`) |
160
- | `scaleFactor()` | `number` | `totalSize() / naturalTotalSize()`; `1` unless the data set is extremely large |
161
-
162
- ### Methods
163
-
164
- | Method | Description |
165
- | ------------------------------------- | ----------------------------------------------------------------------------------------- |
166
- | `scrollToIndex(index, behavior?)` | Scroll to a given item index |
167
- | `scrollToOffset(offsetPx, behavior?)` | Scroll to a given pixel offset |
168
- | `checkViewportSize()` | Force a re-measure (rarely needed — a `ResizeObserver` already handles container resizes) |
169
-
170
- ## Performance notes
171
-
172
- - Fully `ChangeDetectionStrategy.OnPush` and zoneless-compatible — no `NgZone`
173
- import anywhere; signal writes are what schedule change detection.
174
- - Scroll handling is `requestAnimationFrame`-throttled and the listener is
175
- registered with `{ passive: true }`.
176
- - The range is only recomputed once the scroll offset gets within
177
- `minBufferPx` of the current range's edge — not on every scroll event.
178
- - Layout is only ever **read** (`getBoundingClientRect`) inside an
179
- `afterRenderEffect({ read: ... })` block, so DOM measurement never
180
- interleaves with — and never forces — a layout/style write.
181
- - `will-change: transform` is only applied to the content wrapper while
182
- `isScrolling()` is true, and removed ~150ms after the last scroll event, to
183
- avoid holding a compositor layer alive for the component's entire lifetime.
184
- - `contain: strict` / `contain: layout style` isolate the viewport's layout
185
- and paint from the rest of the page.
186
-
187
- ## How auto-measurement works
188
-
189
- On first render, up to 24 items are rendered "in the open" (un-transformed) purely
190
- to be measured — see `measure-layout.ts`. Their real `getBoundingClientRect()`
191
- deltas are used to infer axis, items-per-line, and line size in one pass, all pure
192
- functions with no Angular dependency (so they are trivially unit-testable). Once
193
- measured, the real virtualized range replaces the probe range and rendering
194
- proceeds normally. If your rows can change size at runtime (e.g. responsive
195
- breakpoints), a `ResizeObserver` on the scroll container triggers `checkViewportSize()`
196
- automatically to re-fit the viewport dimension; if the _line size itself_ changes at
197
- runtime you can force a full re-measure by re-creating the component (e.g. keyed with
198
- `@if`/`*ngIf` + a changing key), which is the same limitation `cdk-virtual-scroll-viewport`
199
- has with its own `FixedSizeVirtualScrollStrategy`.
1
+ # @ngx-kit/virtual-scroll
2
+
3
+ A zoneless, signal-based virtual scroll viewport for Angular. No `@angular/material`
4
+ or `@angular/cdk` dependency, no `NgZone`, no `ngOnChanges`, no `@Input() itemSize`,
5
+ no `@Input() orientation` — everything that can be derived from the real DOM is
6
+ derived from the real DOM.
7
+
8
+ ## Why this rewrite
9
+
10
+ | Old design | This design |
11
+ | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
12
+ | `NgZone` injected, `zone.run` everywhere | No `NgZone` at all — works natively under `provideZonelessChangeDetection()` |
13
+ | `ngOnChanges` + `SimpleChanges` | `input()` signals + `computed()` / `effect()` |
14
+ | `@Input() itemSize` (broke as soon as your item had margin/border/box-shadow) | Real item size is **measured** from `getBoundingClientRect()` deltas between actually rendered siblings, so margins/borders/shadows are always accounted for |
15
+ | `@Input() orientation` | Axis is **auto-detected** from the real layout of your own item markup |
16
+ | Custom `*ngxVirtualFor` structural directive | Plain native `@for` over a `visibleItems()` signal — you keep full control of `track`, `@empty`, etc. |
17
+
18
+ ## Install & import
19
+
20
+ ```ts
21
+ import { NgxVirtualScrollViewport } from '@ngx-kit/virtual-scroll';
22
+
23
+ @Component({
24
+ standalone: true,
25
+ imports: [NgxVirtualScrollViewport],
26
+ ...
27
+ })
28
+ ```
29
+
30
+ ## Basic usage — vertical list (auto-detected)
31
+
32
+ ```html
33
+ <ngx-virtual-scroll-viewport #vs="ngxVirtualScrollViewport" [items]="items" style="height: 400px">
34
+ @for (item of vs.visibleItems(); track $index; let i = $index) {
35
+ <div class="row">{{ vs.baseIndex() + i | number }} - {{ item.name }}</div>
36
+ }
37
+ </ngx-virtual-scroll-viewport>
38
+ ```
39
+
40
+ This is exactly the case that used to break: `.row` can have `margin`, `border`,
41
+ `box-shadow`, `padding` — anything. The viewport measures the real distance between
42
+ two consecutively rendered rows and uses that, not a number you have to keep in sync
43
+ with your CSS.
44
+
45
+ ```css
46
+ .row {
47
+ height: 48px;
48
+ border: 1px rgb(166 166 166 / 51%) solid;
49
+ box-shadow: 0px 0px 20px rgb(122 122 122 / 20%);
50
+ border-radius: 5px;
51
+ display: flex;
52
+ align-items: center;
53
+ margin: 10px;
54
+ padding: 15px;
55
+ }
56
+ ```
57
+
58
+ ## Horizontal lists & wrapping grids (auto-detected)
59
+
60
+ The axis is inferred purely from how your own items lay out:
61
+
62
+ - Items stack top-to-bottom (default block flow) → **vertical** list.
63
+ - Items lay out left-to-right in a single line (e.g. `display: inline-flex` on the
64
+ item, or a `flex-wrap: nowrap` row) → **horizontal** list.
65
+ - Items lay out left-to-right and _wrap_ to a new line (e.g. cards with
66
+ `display: flex; flex-wrap: wrap`) → treated as a **vertical** list of "lines",
67
+ where each line holds N items. This is how mixed horizontal + vertical layouts
68
+ (a card grid that scrolls vertically) are supported without a separate 2D data
69
+ model — the cross axis (row width) lays out and scrolls natively, only the line
70
+ axis is virtualized.
71
+
72
+ You don't configure any of this — you only make sure your `.item` CSS actually lays
73
+ out the way you want, and the viewport detects it.
74
+
75
+ ## Mixed content (e.g. wide, virtualized table)
76
+
77
+ Both axes of the scroll container are always natively scrollable
78
+ (`overflow: auto` on both). Only the detected axis is virtualized; the cross axis
79
+ (for example, a table wider than its container) scrolls with the browser's native
80
+ scrollbar, so wide tables with virtualized rows work out of the box:
81
+
82
+ ```html
83
+ <div class="table-shell">
84
+ <table><thead>...</thead></table>
85
+ <!-- kept outside, sticky/fixed header -->
86
+
87
+ <ngx-virtual-scroll-viewport #vs="ngxVirtualScrollViewport" [items]="rows" style="height: 480px">
88
+ <table>
89
+ <tbody>
90
+ @for (row of vs.visibleItems(); track row.id; let i = $index) {
91
+ <tr>
92
+ <td>{{ vs.baseIndex() + i }}</td>
93
+ ...
94
+ </tr>
95
+ }
96
+ </tbody>
97
+ </table>
98
+ </ngx-virtual-scroll-viewport>
99
+ </div>
100
+ ```
101
+
102
+ ## Very large data sets (1M+ rows)
103
+
104
+ Browsers clamp any element's real CSS `height`/`width` to a hard maximum
105
+ (~33.5M px in Chromium, far less in older WebKit/Gecko). Once a naive
106
+ "spacer" element crosses that ceiling, the browser silently clamps it,
107
+ `scrollHeight` stops growing, and everything past that point becomes
108
+ unreachable — the classic "scroll gets stuck around ~500k rows" symptom.
109
+
110
+ This viewport handles it automatically: the spacer's real DOM size is capped
111
+ at `maxAxisSizePx` (6,000,000px by default — safely under every known
112
+ browser limit), and the DOM scrollbar operates in a _compressed_ coordinate
113
+ space via `scaleFactor()`. All range/index math is done against the real,
114
+ uncompressed content size (`naturalTotalSize()`), so scrolling the
115
+ (compressed) native scrollbar all the way to the end still lands you exactly
116
+ on the last item, no matter how many millions of rows you have. The only
117
+ user-visible trade-off for truly massive lists is that the scrollbar thumb's
118
+ motion is no longer perfectly 1:1 with "one row per pixel" — an unavoidable
119
+ consequence of representing an arbitrarily large data set inside a bounded
120
+ native scrollbar, and the same trade-off every large-scale virtual scroll
121
+ implementation makes.
122
+
123
+ You don't need to configure anything for this — it only engages once
124
+ `naturalTotalSize()` actually exceeds `maxAxisSizePx`, and is a no-op
125
+ (`scaleFactor() === 1`) for the vast majority of real-world lists.
126
+
127
+ ## API
128
+
129
+ ### Inputs
130
+
131
+ | Input | Type | Default | Notes |
132
+ | --------------- | --------------------------- | ----------- | ---------------------------------------------------------------------------- |
133
+ | `items` | `readonly T[]` | `[]` | Full data set |
134
+ | `minBufferPx` | `number` | `150` | Buffer left before recomputing the range |
135
+ | `maxBufferPx` | `number` | `300` | Extra px rendered outside the viewport |
136
+ | `measureFn` | `NgxVirtualScrollMeasureFn` | `undefined` | Advanced override for the built-in layout probe |
137
+ | `maxAxisSizePx` | `number` | `6_000_000` | Safe ceiling for the real DOM scroll size — see "Very large data sets" below |
138
+
139
+ ### Outputs
140
+
141
+ | Output | Type |
142
+ | --------------------- | ----------------------------------------- |
143
+ | `scrolledIndexChange` | `OutputEmitterRef<number>` |
144
+ | `rangeChange` | `OutputEmitterRef<NgxVirtualScrollRange>` |
145
+
146
+ ### Public signals (via `#vs="ngxVirtualScrollViewport"`)
147
+
148
+ | Signal | Type | Meaning |
149
+ | -------------------- | ---------------------------- | ------------------------------------------------------------------------------ |
150
+ | `visibleItems()` | `readonly T[]` | Slice of `items()` to render right now |
151
+ | `range()` | `{ start, end }` | Currently rendered line range |
152
+ | `baseIndex()` | `number` | Absolute index of `visibleItems()[0]` |
153
+ | `axis()` | `'vertical' \| 'horizontal'` | Auto-detected scroll axis |
154
+ | `crossCount()` | `number` | Items per line (1 for a plain list) |
155
+ | `lineSize()` | `number` | Measured px size of one line |
156
+ | `isMeasured()` | `boolean` | Whether the initial layout probe has completed |
157
+ | `isScrolling()` | `boolean` | True while an active scroll gesture is in progress |
158
+ | `naturalTotalSize()` | `number` | Real, uncompressed total size along the scroll axis |
159
+ | `totalSize()` | `number` | Size actually applied to the spacer (capped at `maxAxisSizePx`) |
160
+ | `scaleFactor()` | `number` | `totalSize() / naturalTotalSize()`; `1` unless the data set is extremely large |
161
+
162
+ ### Methods
163
+
164
+ | Method | Description |
165
+ | ------------------------------------- | ----------------------------------------------------------------------------------------- |
166
+ | `scrollToIndex(index, behavior?)` | Scroll to a given item index |
167
+ | `scrollToOffset(offsetPx, behavior?)` | Scroll to a given pixel offset |
168
+ | `checkViewportSize()` | Force a re-measure (rarely needed — a `ResizeObserver` already handles container resizes) |
169
+
170
+ ## Performance notes
171
+
172
+ - Fully `ChangeDetectionStrategy.OnPush` and zoneless-compatible — no `NgZone`
173
+ import anywhere; signal writes are what schedule change detection.
174
+ - Scroll handling is `requestAnimationFrame`-throttled and the listener is
175
+ registered with `{ passive: true }`.
176
+ - The range is only recomputed once the scroll offset gets within
177
+ `minBufferPx` of the current range's edge — not on every scroll event.
178
+ - Layout is only ever **read** (`getBoundingClientRect`) inside an
179
+ `afterRenderEffect({ read: ... })` block, so DOM measurement never
180
+ interleaves with — and never forces — a layout/style write.
181
+ - `will-change: transform` is only applied to the content wrapper while
182
+ `isScrolling()` is true, and removed ~150ms after the last scroll event, to
183
+ avoid holding a compositor layer alive for the component's entire lifetime.
184
+ - `contain: strict` / `contain: layout style` isolate the viewport's layout
185
+ and paint from the rest of the page.
186
+
187
+ ## How auto-measurement works
188
+
189
+ On first render, up to 24 items are rendered "in the open" (un-transformed) purely
190
+ to be measured — see `measure-layout.ts`. Their real `getBoundingClientRect()`
191
+ deltas are used to infer axis, items-per-line, and line size in one pass, all pure
192
+ functions with no Angular dependency (so they are trivially unit-testable). Once
193
+ measured, the real virtualized range replaces the probe range and rendering
194
+ proceeds normally. If your rows can change size at runtime (e.g. responsive
195
+ breakpoints), a `ResizeObserver` on the scroll container triggers `checkViewportSize()`
196
+ automatically to re-fit the viewport dimension; if the _line size itself_ changes at
197
+ runtime you can force a full re-measure by re-creating the component (e.g. keyed with
198
+ `@if`/`*ngIf` + a changing key), which is the same limitation `cdk-virtual-scroll-viewport`
199
+ has with its own `FixedSizeVirtualScrollStrategy`.
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-kit-shared.mjs","sources":["../../../projects/libs/shared/utils/get-offset-position.ts","../../../projects/libs/shared/utils/drag-session.ts","../../../projects/libs/shared/range-slider/range-slider.component.ts","../../../projects/libs/shared/range-slider/range-slider.component.html","../../../projects/libs/shared/saturation/saturation.component.ts","../../../projects/libs/shared/saturation/saturation.component.html","../../../projects/libs/shared/slider/slider.component.ts","../../../projects/libs/shared/slider/slider.component.html","../../../projects/libs/shared/utils/merge-config.ts","../../../projects/libs/shared/utils/window.ts","../../../projects/libs/shared/utils/string.ts","../../../projects/libs/shared/utils/confetti.ts","../../../projects/libs/shared/utils/sequential-guid.ts","../../../projects/libs/shared/utils/merge-deep.ts","../../../projects/libs/shared/services/browser.service.ts","../../../projects/libs/shared/services/direction.service.ts","../../../projects/libs/shared/overlay/overlay-ref.ts","../../../projects/libs/shared/overlay/overlay.service.ts","../../../projects/libs/shared/ngx-kit-shared.ts"],"sourcesContent":["export function getOffsetPosition(evt: MouseEvent | TouchEvent, parent: HTMLElement) {\n let position = {\n x: 0,\n y: 0,\n };\n\n if (evt instanceof MouseEvent) {\n position.x = evt.pageX;\n position.y = evt.pageY;\n } else if (evt.touches && evt.touches.length > 0) {\n position.x = evt.touches[0].pageX;\n position.y = evt.touches[0].pageY;\n }\n\n // Adjust for the parent's offset\n let parentRect = parent.getBoundingClientRect();\n position.x -= parentRect.left + window.scrollX;\n position.y -= parentRect.top + window.scrollY;\n\n return position;\n}\n","/**\n * تمام کامپوننت‌های قابل‌درگ کتابخانه (saturation، slider، range-slider،\n * box-shadow) قبلاً یک الگوی تکراری داشتن:\n *\n * @HostListener('document:mousemove', ['$event'])\n * @HostListener('document:touchmove', ['$event'])\n * onDrag(ev) { if (!this.isDragging) return; ... }\n *\n * مشکل: این listenerها برای کل عمر کامپوننت روی `document` باقی می‌مونن —\n * حتی وقتی اصلاً دراگی در حال انجام نیست. یعنی روی صفحه‌ای با چند تا\n * color-picker/slider، هر حرکت موس/انگشت روی کل صفحه (نه فقط روی خودِ\n * اسلایدر) باعث اجرای N تابع (به تعداد اینستنس‌ها) می‌شه که هرکدوم هم چرخه‌ی\n * زون انگیولار رو تریگر می‌کنن — یک مشکل واقعی پرفورمنس، مخصوصاً در صفحاتی\n * با چند نمونه هم‌زمان یا حرکت زیاد موس.\n *\n * این تابع جایگزین اون الگو می‌شه: listenerها فقط در طول یک دراگِ واقعی\n * (بین mousedown/touchstart تا mouseup/touchend) روی document اضافه می‌شن و\n * بلافاصله بعدش پاک می‌شن.\n *\n * یه فایده‌ی جانبیِ مهم دیگه هم داره: روی touchmove مقدار `{ passive: false }`\n * ست می‌شه و preventDefault صدا زده می‌شه، پس در حین درگ کردنِ thumb روی\n * موبایل، صفحه اسکرول نمی‌خوره (باگی که با @HostListener قبلی وجود داشت،\n * چون هیچ‌جا preventDefault روی touchmove صدا زده نمی‌شد).\n */\nexport interface DragSessionCallbacks {\n onMove: (ev: MouseEvent | TouchEvent) => void;\n onEnd?: (ev: MouseEvent | TouchEvent) => void;\n}\n\n/** با فراخوانی این تابع (مثلاً داخل dragStart) یک نشست‌ درگ شروع می‌شه. */\nexport function startDragSession({ onMove, onEnd }: DragSessionCallbacks): () => void {\n const handleMove = (ev: MouseEvent | TouchEvent) => {\n if (ev.type === 'touchmove') {\n // جلوگیری از اسکرول شدن صفحه هم‌زمان با درگ کردن روی موبایل/تاچ\n ev.preventDefault();\n }\n onMove(ev);\n };\n\n const handleEnd = (ev: MouseEvent | TouchEvent) => {\n stop();\n onEnd?.(ev);\n };\n\n const stop = (): void => {\n document.removeEventListener('mousemove', handleMove);\n document.removeEventListener('touchmove', handleMove);\n document.removeEventListener('mouseup', handleEnd);\n document.removeEventListener('touchend', handleEnd);\n document.removeEventListener('touchcancel', handleEnd);\n };\n\n document.addEventListener('mousemove', handleMove);\n document.addEventListener('touchmove', handleMove, { passive: false });\n document.addEventListener('mouseup', handleEnd);\n document.addEventListener('touchend', handleEnd);\n document.addEventListener('touchcancel', handleEnd);\n\n // تابع stop برگردونده می‌شه تا هم بشه دستی صداش زد (مثلاً در ngOnDestroy،\n // اگه کامپوننت درست وسط یه درگ نابود بشه) و هم به‌صورت خودکار روی\n // mouseup/touchend صدا زده می‌شه.\n return stop;\n}\n","import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n forwardRef,\n type OnInit,\n} from '@angular/core';\nimport { getOffsetPosition } from '../utils/get-offset-position';\nimport { startDragSession } from '../utils/drag-session';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\n\nexport interface IValue {\n id?: string;\n value: number;\n}\nexport class ValueModel {\n id!: string;\n value!: number;\n x?: number;\n thumb?: HTMLElement;\n color?: string;\n}\n\n@Component({\n selector: 'range-slider',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule],\n templateUrl: './range-slider.component.html',\n styleUrls: ['./range-slider.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RangeSliderComponent),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => RangeSliderComponent),\n multi: true,\n },\n ],\n})\nexport class RangeSliderComponent implements OnInit, OnDestroy, ControlValueAccessor, Validator {\n /**\n * The step value for the slider\n */\n @Input() step = 1;\n /**\n * The minimum value for the slider\n */\n @Input() min = 0;\n /**\n * The maximum value for the slider\n */\n @Input() max = 100;\n /**\n * The background color of the slider\n * - can use css like `background: linear-gradient(to right, red, blue);`\n * - or a solid color like `background: red;`\n */\n @Input() background?: string;\n /**\n * If true, the background will be transparent\n */\n @Input() isBgTransparent = false;\n /**\n * If true, clicking on the slider will add a new range at that position\n */\n @Input() addNewRangeOnClick = false;\n\n /**\n * The current value of the slider\n */\n @Output() change = new EventEmitter<IValue[]>();\n @Input() selectedIndex?: number;\n @Output() selectedIndexChange = new EventEmitter<number>();\n\n private isDragging = false;\n\n @ViewChild('slider', { static: true }) slider!: ElementRef<HTMLDivElement>;\n @ViewChild('thumb', { static: false }) thumb?: ElementRef<HTMLDivElement>;\n\n values: ValueModel[] = [];\n isDisabled = false;\n protected _onChange = (value: IValue[]) => {};\n protected _onTouched = () => {};\n protected _validatorOnChange = () => {};\n private sliderRect?: DOMRect;\n private thumbRect?: DOMRect;\n private stopDrag?: () => void;\n\n constructor(private changeDetectorRef: ChangeDetectorRef) {}\n ngOnInit(): void {}\n ngOnDestroy(): void {\n this.stopDrag?.();\n }\n\n private generateId(): string {\n let id = 'ngx-thumb-' + Math.random().toString(36).substring(2, 9);\n if (this.values.findIndex((x) => x.id == id) >= 0) {\n return this.generateId();\n }\n return id;\n }\n\n writeValue(items?: IValue[]): void {\n this.values = [];\n if (!items || !Array.isArray(items)) {\n items = [];\n }\n if (items.length === 0) {\n items.push({ id: this.generateId(), value: this.min });\n }\n for (let val of items) {\n if (typeof val.value !== 'number' || isNaN(val.value)) {\n throw new Error('RangeSliderComponent: value must be an array of numbers');\n }\n let newVal = +val.value;\n if (newVal < +this.min) newVal = +this.min;\n else if (newVal > +this.max) newVal = +this.max;\n this.values.push({\n ...val,\n id: val.id ?? this.generateId(),\n value: newVal,\n });\n }\n this.updateAllThumbPositions();\n }\n validate(control: AbstractControl): ValidationErrors | null {\n return null; // TODO: return errors if any;\n }\n registerOnValidatorChange?(fn: () => void): void {\n this._validatorOnChange = fn;\n }\n\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n setDisabledState?(disabled: boolean): void {\n this.isDisabled = disabled;\n }\n private updateRects() {\n this.sliderRect = this.slider.nativeElement.getBoundingClientRect();\n if (this.thumb) {\n this.thumbRect = this.thumb.nativeElement.getBoundingClientRect();\n }\n }\n @HostListener('window:resize')\n onResize() {\n this.writeValue(this.values);\n }\n dragStart(ev: MouseEvent | TouchEvent, index: number) {\n ev.stopPropagation();\n ev.preventDefault();\n this.isDragging = true;\n this.selectedIndex = index;\n this.updateRects();\n this.updateThumbPosition(ev);\n this.selectedIndexChange.emit(this.selectedIndex);\n\n this.stopDrag?.();\n this.stopDrag = startDragSession({\n onMove: (moveEv) => this.updateThumbPosition(moveEv),\n onEnd: () => {\n this.isDragging = false;\n this.stopDrag = undefined;\n this.changeDetectorRef.markForCheck();\n },\n });\n }\n\n addnewRangeOnSliderClick(event: MouseEvent | TouchEvent) {\n if (!this.addNewRangeOnClick) return;\n const position = getOffsetPosition(event, this.slider.nativeElement);\n const newValue = this.min + (position.x / this.sliderRect!.width) * (this.max - this.min);\n // must be add with order by position\n const indexByOrderValue = this.values.findIndex((item) => item.value > newValue);\n const insertIndex = indexByOrderValue >= 0 ? indexByOrderValue : this.values.length;\n this.values.splice(insertIndex, 0, {\n id: this.generateId(),\n value: newValue,\n });\n this.dragStart(event, insertIndex);\n // this.updateAllThumbPositions();\n // this.valueChanged();\n }\n\n private updateThumbPosition(ev: MouseEvent | TouchEvent) {\n if (!this.isDragging || this.selectedIndex == undefined) return;\n if (!this.sliderRect || !this.thumbRect) this.updateRects();\n let position = getOffsetPosition(ev, this.slider.nativeElement);\n let thumbRec = this.thumbRect!;\n position.x -= thumbRec.width / 2;\n let sliderRec = this.sliderRect!;\n const thumb = this.values[this.selectedIndex];\n if (position.x < 0) {\n thumb.x = 0;\n } else if (position.x > sliderRec.width - thumbRec.width) {\n thumb.x = sliderRec.width - thumbRec.width;\n } else {\n thumb.x = position.x;\n }\n this.setValueByPosition(thumb, thumbRec, sliderRec);\n this.changeDetectorRef.markForCheck();\n }\n\n updateAllThumbPositions() {\n // wait to add thumbs\n setTimeout(() => {\n this.updateRects();\n const sliderRec = this.sliderRect!;\n const thumbRec = this.thumbRect!;\n for (let item of this.values) {\n item.x =\n ((item.value - this.min) * (sliderRec.width - thumbRec.width)) / (this.max - this.min);\n }\n this.changeDetectorRef.detectChanges();\n });\n }\n setValueByPosition(thumb: ValueModel, thumbRec: DOMRect, sliderRec: DOMRect) {\n const percentage = (thumb.x ?? 0) / (sliderRec.width - thumbRec.width);\n let newValue = this.min + percentage * (this.max - this.min);\n const stepDecimalPlaces = (this.step.toString().split('.')[1] || '').length;\n newValue = parseFloat(\n (Math.round(newValue / this.step) * this.step).toFixed(stepDecimalPlaces),\n );\n let value = Math.min(Math.max(newValue, this.min), this.max);\n if (thumb.value !== value) {\n thumb.value = value;\n this.valueChanged();\n }\n }\n\n valueChanged() {\n const v = this.values; // this.values.map(({ x, thumb, ...rest }) => ({ ...rest }));\n this._onChange(v);\n this.change.emit(v);\n }\n}\n","<div class=\"slider-container\">\n <ng-content></ng-content>\n <div\n #slider\n class=\"slider\"\n [class.add-range-cursor]=\"addNewRangeOnClick\"\n [ngStyle]=\"{ '--ngx-slider-bg': background }\"\n [class.bg-transparent]=\"isBgTransparent\"\n (mousedown)=\"addnewRangeOnSliderClick($event)\"\n (touchstart)=\"addnewRangeOnSliderClick($event)\">\n @for (item of values; track $index; let i = $index) {\n <div\n class=\"thumb\"\n [class.is-active]=\"selectedIndex == i\"\n #thumb\n [style.left.px]=\"item.x\"\n [style.background]=\"item.color\"\n [title]=\"item.value\"\n (mousedown)=\"dragStart($event, i)\"\n (touchstart)=\"dragStart($event, i)\"></div>\n }\n </div>\n</div>\n\n<!-- {{ selectedIndex }}\n<pre dir=\"ltr\" style=\"text-align: left\">{{ values | json }}</pre> -->\n","import {\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n forwardRef,\n} from '@angular/core';\nimport { getOffsetPosition } from '../utils/get-offset-position';\nimport {\n NG_VALUE_ACCESSOR,\n ControlValueAccessor,\n FormControl,\n AbstractControl,\n ValidationErrors,\n} from '@angular/forms';\nimport { IPosition } from '../contracts/IPosition';\nimport { startDragSession } from '../utils/drag-session';\n\n@Component({\n selector: 'saturation',\n standalone: true,\n imports: [],\n templateUrl: './saturation.component.html',\n styleUrl: './saturation.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SaturationComponent),\n multi: true,\n },\n ],\n})\nexport class SaturationComponent implements ControlValueAccessor, OnDestroy {\n @Input() width?: number;\n @Input() height?: number;\n @Input() color = 'red';\n @Input() step = 1;\n @Input() min: IPosition = { x: 0, y: 0 };\n @Input() max = { x: 100, y: 100 };\n @Output() change = new EventEmitter<IPosition>();\n\n isDragging = false;\n @ViewChild('saturation', { static: true }) saturation!: ElementRef<HTMLDivElement>;\n @ViewChild('thumb', { static: true }) thumb!: ElementRef<HTMLDivElement>;\n x = 0;\n y = 0;\n myControl = new FormControl<IPosition | null>(null);\n isDisabled = false;\n protected _onChange = (value: any) => {};\n protected _onTouched = () => {};\n protected _validatorOnChange = () => {};\n\n private saturationRect?: DOMRect;\n private thumbRect?: DOMRect;\n private stopDrag?: () => void;\n\n constructor() {}\n\n ngOnDestroy(): void {\n // اگه کامپوننت درست وسط یه درگ نابود بشه (مثلاً پیکر بسته بشه)، باید\n // listenerهای document رو دستی پاک کنیم؛ برخلاف @HostListener که\n // انگیولار خودش موقع destroy پاکش می‌کرد، این‌جا چون addEventListener\n // دستیه، خودمون مسئول پاک‌سازی‌شیم.\n this.stopDrag?.();\n }\n\n private updateRects() {\n this.saturationRect = this.saturation.nativeElement.getBoundingClientRect();\n this.thumbRect = this.thumb.nativeElement.getBoundingClientRect();\n }\n\n writeValue(val?: IPosition | null): void {\n if (!val) val = { x: 0, y: 0 };\n let value: IPosition = val;\n this.myControl.setValue(value, { emitEvent: false });\n this.updateRects();\n const saturationRec = this.saturationRect!;\n const thumbRec = this.thumbRect!;\n this.x =\n ((value.x - this.min.x) * (saturationRec.width - thumbRec.width / 2)) /\n (this.max.x - this.min.x);\n this.y =\n ((value.y - this.min.y) * (saturationRec.height - thumbRec.height / 2)) /\n (this.max.y - this.min.y);\n if (val !== value) {\n this.valueChanged(value);\n }\n }\n validate(control: AbstractControl): ValidationErrors | null {\n return this.myControl.errors;\n }\n registerOnValidatorChange?(fn: () => void): void {\n this._validatorOnChange = fn;\n }\n\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n setDisabledState?(disabled: boolean): void {\n this.isDisabled = disabled;\n if (disabled) this.myControl.disable();\n else this.myControl.enable();\n }\n\n dragStart(ev: MouseEvent | TouchEvent) {\n ev.stopPropagation();\n ev.preventDefault();\n this.isDragging = true;\n this.updateRects();\n this.updatePosition(ev);\n this.stopDrag?.();\n this.stopDrag = startDragSession({\n onMove: (moveEv) => this.updatePosition(moveEv),\n onEnd: () => {\n this.isDragging = false;\n this.stopDrag = undefined;\n },\n });\n }\n\n @HostListener('window:resize')\n onResize() {\n this.writeValue(this.myControl.value);\n }\n\n private updatePosition(ev: MouseEvent | TouchEvent) {\n if (!this.isDragging) return;\n if (!this.saturationRect || !this.thumbRect) this.updateRects();\n let position = getOffsetPosition(ev, this.saturation.nativeElement);\n let thumbRec = this.thumbRect!;\n let saturationRec = this.saturationRect!;\n if (position.x < 0) {\n this.x = 0;\n } else if (position.x > saturationRec.width - (thumbRec.width / 2 - 3)) {\n this.x = saturationRec.width - (thumbRec.width / 2 - 3);\n } else {\n this.x = position.x;\n }\n // this.x = this.x - thumbRec.width / 2;\n\n if (position.y < 0) {\n this.y = 0;\n } else if (position.y > saturationRec.height - (thumbRec.height / 2 - 3)) {\n this.y = saturationRec.height - (thumbRec.height / 2 - 3);\n } else {\n this.y = position.y;\n }\n // this.y = this.y - thumbRec.height / 2;\n this.setValueByPosition(thumbRec, saturationRec);\n }\n\n setValueByPosition(thumbRec: DOMRect, saturationRec: DOMRect) {\n const percentageX = this.x / (saturationRec.width - thumbRec.width);\n let newValueX = this.min.x + percentageX * (this.max.x - this.min.x);\n newValueX = Math.round(newValueX / this.step) * this.step;\n let valueX = Math.min(Math.max(newValueX, this.min.x), this.max.x);\n //-----------------------------\n const percentageY = this.y / (saturationRec.height - thumbRec.height);\n let newValueY = this.min.y + percentageY * (this.max.y - this.min.y);\n newValueY = Math.round(newValueY / this.step) * this.step;\n let valueY = Math.min(Math.max(newValueY, this.min.y), this.max.y);\n const newValue = { x: valueX, y: valueY };\n if (\n !this.myControl.value ||\n this.myControl.value.x !== valueX ||\n this.myControl.value.y !== valueY\n ) {\n this.valueChanged(newValue);\n }\n }\n\n valueChanged(value: IPosition) {\n this.myControl.setValue(value, { emitEvent: false });\n this._onChange(value);\n this.change.emit(value);\n }\n}\n","<div\n class=\"saturation-container\"\n [style.width.px]=\"width\"\n [style.height.px]=\"height\"\n (mousedown)=\"dragStart($event)\"\n (touchstart)=\"dragStart($event)\">\n <div class=\"saturation\" #saturation>\n <div class=\"s-bg\" [style.background]=\"color\"></div>\n <div class=\"s-white\"></div>\n <div class=\"s-black\"></div>\n </div>\n <div class=\"thumb\" #thumb [style.left.px]=\"x\" [style.top.px]=\"y\"></div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n forwardRef,\n inject,\n type OnInit,\n} from '@angular/core';\nimport { getOffsetPosition } from '../utils/get-offset-position';\nimport { startDragSession } from '../utils/drag-session';\nimport {\n AbstractControl,\n ControlValueAccessor,\n FormControl,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n Validators,\n} from '@angular/forms';\n\n@Component({\n selector: 'slider',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './slider.component.html',\n styleUrls: ['./slider.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SliderComponent),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SliderComponent),\n multi: true,\n },\n ],\n})\nexport class SliderComponent implements OnInit, OnDestroy, ControlValueAccessor, Validator {\n @Input() step = 1;\n @Input() min = 0;\n @Input() max = 100;\n @Input() background?: string;\n @Input() isBgTransparent = false;\n @Output() change = new EventEmitter<number>();\n isDragging = false;\n @ViewChild('slider', { static: true }) slider!: ElementRef<HTMLDivElement>;\n @ViewChild('thumb', { static: true }) thumb!: ElementRef<HTMLDivElement>;\n x = 0;\n myControl = new FormControl<number | null>(null);\n isDisabled = false;\n protected _onChange = (value: any) => {};\n protected _onTouched = () => {};\n protected _validatorOnChange = () => {};\n private sliderRect?: DOMRect;\n private thumbRect?: DOMRect;\n private stopDrag?: () => void;\n private readonly cd = inject(ChangeDetectorRef);\n constructor() {}\n ngOnInit(): void {\n this.myControl.setValidators([Validators.min(this.min), Validators.max(this.max)]);\n }\n\n ngOnDestroy(): void {\n this.stopDrag?.();\n }\n\n private updateRects() {\n this.sliderRect = this.slider.nativeElement.getBoundingClientRect();\n this.thumbRect = this.thumb.nativeElement.getBoundingClientRect();\n }\n\n writeValue(val?: number | string | null): void {\n let value = 0;\n if (!val) value = 0;\n else if (+val < +this.min) value = +this.min;\n else if (+val > +this.max) value = +this.max;\n else value = +val;\n this.myControl.setValue(value, { emitEvent: false });\n this.updateRects();\n const sliderRec = this.sliderRect!;\n const thumbRec = this.thumbRect!;\n this.x = ((value - this.min) * (sliderRec.width - thumbRec.width)) / (this.max - this.min);\n if (val !== value) {\n this.valueChanged(value);\n }\n }\n validate(control: AbstractControl): ValidationErrors | null {\n return this.myControl.errors;\n }\n registerOnValidatorChange?(fn: () => void): void {\n this._validatorOnChange = fn;\n }\n\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n setDisabledState?(disabled: boolean): void {\n this.isDisabled = disabled;\n if (disabled) this.myControl.disable();\n else this.myControl.enable();\n }\n\n dragStart(ev: MouseEvent | TouchEvent) {\n ev.stopPropagation();\n ev.preventDefault();\n this.isDragging = true;\n this.updateRects();\n this.updatePosition(ev);\n this.stopDrag?.();\n this.stopDrag = startDragSession({\n onMove: (moveEv) => this.updatePosition(moveEv),\n onEnd: () => {\n this.isDragging = false;\n this.stopDrag = undefined;\n this.cd.markForCheck();\n },\n });\n }\n\n @HostListener('window:resize')\n onResize() {\n this.writeValue(this.myControl.value);\n }\n\n private updatePosition(ev: MouseEvent | TouchEvent) {\n if (!this.isDragging) return;\n if (!this.sliderRect || !this.thumbRect) this.updateRects();\n let position = getOffsetPosition(ev, this.slider.nativeElement);\n let thumbRec = this.thumbRect!;\n position.x -= thumbRec.width / 2;\n let sliderRec = this.sliderRect!;\n if (position.x < 0) {\n this.x = 0;\n } else if (position.x > sliderRec.width - thumbRec.width) {\n this.x = sliderRec.width - thumbRec.width;\n } else {\n this.x = position.x;\n }\n this.setValueByPosition(thumbRec, sliderRec);\n // OnPush + addEventListener دستی (به‌جای HostListener) یعنی خودمون باید\n // view رو dirty کنیم، وگرنه thumb حین درگ روی صفحه آپدیت نمی‌شه.\n this.cd.markForCheck();\n }\n\n setValueByPosition(thumbRec: DOMRect, sliderRec: DOMRect) {\n const percentage = this.x / (sliderRec.width - thumbRec.width);\n let newValue = this.min + percentage * (this.max - this.min);\n const stepDecimalPlaces = (this.step.toString().split('.')[1] || '').length;\n newValue = parseFloat(\n (Math.round(newValue / this.step) * this.step).toFixed(stepDecimalPlaces),\n );\n let value = Math.min(Math.max(newValue, this.min), this.max);\n if (this.myControl.value !== value) {\n this.valueChanged(value);\n }\n }\n\n valueChanged(value: number) {\n this.myControl.setValue(value, { emitEvent: false });\n this._onChange(value);\n this.change.emit(value);\n }\n}\n","<div class=\"slider-container\">\n <ng-content></ng-content>\n <div\n #slider\n class=\"slider\"\n (mousedown)=\"dragStart($event)\"\n (touchstart)=\"dragStart($event)\"\n [ngStyle]=\"{ '--ngx-slider-bg': background }\"\n [class.bg-transparent]=\"isBgTransparent\">\n <div class=\"thumb\" #thumb [style.left.px]=\"x\" [title]=\"myControl.value\"></div>\n </div>\n</div>\n","function isPlainObject(value: unknown): value is Record<string, any> {\n return (\n value !== null && typeof value === 'object' && Object.getPrototypeOf(value) === Object.prototype\n );\n}\n\nexport function mergeConfig<T>(base: T, override?: Partial<T>): T {\n if (override == null) {\n return structuredClone(base);\n }\n\n return merge(base, override) as T;\n}\n\nfunction merge(base: any, override: any): any {\n if (override === undefined) {\n return base;\n }\n\n if (base === undefined) {\n return override;\n }\n\n if (Array.isArray(base) && Array.isArray(override)) {\n return [...override];\n }\n\n if (isPlainObject(base) && isPlainObject(override)) {\n const result: Record<string, any> = {};\n\n const keys = new Set([...Object.keys(base), ...Object.keys(override)]);\n\n for (const key of keys) {\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n continue;\n }\n\n result[key] = merge(base[key], override[key]);\n }\n\n return result;\n }\n\n // Primitive / Function / Class / Date / RegExp ...\n return override;\n}\n","import { inject, InjectionToken } from '@angular/core';\n\nexport const WINDOW = new InjectionToken<Window | null>('WINDOW', {\n factory: () => (typeof window !== 'undefined' ? window : null),\n});\n","export function randomStrnig(extraLength = 4, useNumeric = false) {\n const len = Math.max(0, Math.floor(extraLength));\n if (len === 0) return '';\n\n let charset = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n if (useNumeric) {\n charset += '0123456789';\n }\n const cryptoObj =\n typeof globalThis !== 'undefined'\n ? (globalThis as unknown as { crypto?: Crypto }).crypto\n : undefined;\n const out: string[] = new Array(len);\n\n if (cryptoObj?.getRandomValues) {\n const bytes = new Uint8Array(len);\n cryptoObj.getRandomValues(bytes);\n for (let i = 0; i < len; i++) {\n out[i] = charset[bytes[i] % charset.length];\n }\n } else {\n for (let i = 0; i < len; i++) {\n out[i] = charset[Math.floor(Math.random() * charset.length)];\n }\n }\n\n return `${Date.now().toString(36)}-${out.join('')}`;\n}\n","export function makeConfetti(doc: Document, wrap: HTMLElement) {\n wrap.innerHTML = '';\n const colors = ['#3ee08f', '#43e0d8', '#8b7bff', '#ffc45c'];\n for (let i = 0; i < 24; i++) {\n const s = doc.createElement('span');\n s.style.left = Math.random() * 100 + '%';\n s.style.background = colors[i % colors.length];\n s.style.animationDelay = Math.random() * 0.4 + 's';\n s.style.animationDuration = 1.2 + Math.random() * 0.8 + 's';\n s.style.borderRadius = Math.random() > 0.5 ? '50%' : '2px';\n wrap.appendChild(s);\n }\n}\n","export function generateSequentialGuid(): string {\r\n // تولید 10 بایت تصادفی\r\n const randomBytes = new Uint8Array(10);\r\n crypto.getRandomValues(randomBytes);\r\n\r\n // زمان بر حسب میلی‌ثانیه از epoch (1970)\r\n const now = Date.now();\r\n\r\n // 6 بایت از زمان (به big-endian)\r\n const timeBytes = new Uint8Array(6);\r\n const timeBig = BigInt(now);\r\n for (let i = 0; i < 6; i++) {\r\n timeBytes[5 - i] = Number((timeBig >> BigInt(i * 8)) & 0xffn);\r\n }\r\n\r\n // ترکیب: 10 بایت تصادفی + 6 بایت زمان\r\n const allBytes = new Uint8Array(16);\r\n allBytes.set(randomBytes, 0);\r\n allBytes.set(timeBytes, 10);\r\n\r\n // تبدیل به فرمت استاندارد GUID\r\n const hex = Array.from(allBytes)\r\n .map((b) => b.toString(16).padStart(2, '0'))\r\n .join('');\r\n\r\n // اضافه کردن خط تیره‌ها در مکان‌های استاندارد UUID\r\n return `${hex.substring(0, 8)}-${hex.substring(8, 12)}-${hex.substring(12, 16)}-${hex.substring(\r\n 16,\r\n 20,\r\n )}-${hex.substring(20)}`;\r\n}\r\n","/**\r\n * Performs a deep merge of objects and returns new object. Does not modify\r\n * objects (immutable) and merges arrays via concatenation.\r\n *\r\n * @param {...object} objects - Objects to merge\r\n * @returns {object} New object with merged key/values\r\n */\r\nexport function mergeDeep(...objects: any[]) {\r\n const isObject = (obj: any) => obj && typeof obj === 'object';\r\n\r\n return objects.reduce((prev, obj) => {\r\n Object.keys(obj).forEach((key) => {\r\n const pVal = prev[key];\r\n const oVal = obj[key];\r\n\r\n if (Array.isArray(pVal) && Array.isArray(oVal)) {\r\n prev[key] = pVal.concat(...oVal);\r\n } else if (isObject(pVal) && isObject(oVal)) {\r\n prev[key] = mergeDeep(pVal, oVal);\r\n } else {\r\n prev[key] = oVal;\r\n }\r\n });\r\n\r\n return prev;\r\n }, {});\r\n}\r\n","import { isPlatformBrowser } from '@angular/common';\nimport { Inject, Injectable, PLATFORM_ID } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BrowserService {\n constructor(@Inject(PLATFORM_ID) private platformId: object) {}\n\n get isBrowser(): boolean {\n return isPlatformBrowser(this.platformId);\n }\n\n get prefersDarkMode(): boolean {\n if (!this.isBrowser) return false;\n return window.matchMedia('(prefers-color-scheme: dark)').matches;\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { computed, DestroyRef, inject, Injectable, signal } from '@angular/core';\n\nexport type Direction = 'ltr' | 'rtl';\n\n/**\n * جهت واقعیِ سند را تشخیص می‌دهد: اول dir روی <body>، بعد dir روی <html>،\n * و در نهایت مقدار محاسبه‌شده‌ی CSS (getComputedStyle) به‌عنوان fallback\n * (برای وقتی جهت با استایل/کلاس تنظیم شده، نه attribute مستقیم).\n */\nfunction resolveDirection(doc: Document): Direction {\n const bodyDir = doc.body?.dir;\n if (bodyDir === 'rtl' || bodyDir === 'ltr') return bodyDir;\n\n const htmlDir = doc.documentElement.dir;\n if (htmlDir === 'rtl' || htmlDir === 'ltr') return htmlDir;\n\n return getComputedStyle(doc.documentElement).direction === 'rtl' ? 'rtl' : 'ltr';\n}\n\n/**\n * جهت صفحه را به‌صورت خودکار و زنده تشخیص می‌دهد — بدون این‌که کاربرِ این\n * سرویس مجبور باشد چیزی به آن بدهد. هر تغییری در attribute های dir/class\n * روی <html> یا <body> (چه از طریق Angular، چه با یک تم‌سوییچر خارج از\n * Angular) بلافاصله signal را آپدیت می‌کند.\n *\n * نکته: effect() اینجا جواب نمی‌دهد چون هیچ‌کدام از این مقادیر (attribute\n * روی DOM) یک Signal نیستند؛ effect فقط به تغییر Signalها reactive است، نه\n * به تغییرات دلخواه DOM. برای گوش‌دادن به تغییرات DOM باید از MutationObserver\n * استفاده کرد و مقدار را دستی داخل یک Signal نوشت (که دقیقاً کاری است که\n * این سرویس انجام می‌دهد).\n */\n@Injectable({ providedIn: 'root' })\nexport class DirectionService {\n private readonly doc = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n\n private readonly _direction = signal<Direction>(resolveDirection(this.doc));\n\n /** جهت جاری، به‌صورت Signal فقط-خواندنی. */\n readonly direction = this._direction.asReadonly();\n readonly isRtl = computed(() => this._direction() === 'rtl');\n\n constructor() {\n const observer = new MutationObserver(() => {\n const next = resolveDirection(this.doc);\n if (next !== this._direction()) {\n this._direction.set(next);\n }\n });\n\n const options: MutationObserverInit = { attributes: true, attributeFilter: ['dir', 'class'] };\n observer.observe(this.doc.documentElement, options);\n if (this.doc.body) observer.observe(this.doc.body, options);\n\n this.destroyRef.onDestroy(() => observer.disconnect());\n }\n}\n","import { ComponentRef, TemplateRef } from '@angular/core';\n\nexport class OverlayRef<T> {\n constructor(\n private readonly dialogEl: HTMLDialogElement,\n private readonly teardownFn: () => void,\n public readonly componentRef?: ComponentRef<T>,\n public readonly templateRef?: TemplateRef<T>,\n ) {}\n\n close(): void {\n this.teardownFn();\n }\n\n get nativeElement(): HTMLElement {\n return this.dialogEl;\n }\n}\n","import { Injectable, OnDestroy, inject } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { OverlayOptions, TemplateOptions } from './overlay-options';\nimport { OverlayRef } from './overlay-ref';\nimport { PlacementConfig } from './placement-config';\nimport { OverlayInstance } from './overlay-instance';\nimport { DirectionService } from '../services/direction.service';\nexport const FOCUSABLE_SELECTOR =\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])';\nexport const DIALOG_OVERLAY_CLASSNAME = 'ngx-ui-overlay';\n\n@Injectable({ providedIn: 'root' })\nexport class OverlayService implements OnDestroy {\n private readonly overlayStacks: OverlayInstance[] = [];\n\n private listenersAttached = false;\n private resizeRafPending = false;\n\n private readonly doc = inject(DOCUMENT);\n private readonly abortController = new AbortController();\n private readonly directionService = inject(DirectionService);\n\n ngOnDestroy(): void {\n this.closeAll();\n this.abortController.abort();\n }\n\n open<T>(options: OverlayOptions<T>): OverlayRef<T> {\n const {\n anchor,\n point,\n component,\n viewContainerRef,\n configure,\n onClosed,\n placement,\n alignment,\n margin,\n } = options;\n\n if (!viewContainerRef) {\n throw new Error('ViewContainerRef is required to render overlay content.');\n }\n\n this.attachGlobalListeners();\n\n const element = this.createDialogElement();\n const componentRef = viewContainerRef.createComponent(component);\n\n if (componentRef.location.nativeElement) {\n element.appendChild(componentRef.location.nativeElement);\n }\n\n const instance: OverlayInstance = {\n element,\n anchor,\n point,\n placementConfig: this.resolvePlacementConfig(placement, alignment, margin),\n componentRef,\n onClosed,\n rafId: null,\n focusTimeoutId: null,\n cleanup: () => {},\n };\n instance.cleanup = () => this.destroyInstance(instance);\n\n this.overlayStacks.push(instance);\n element.showModal();\n\n const ref = new OverlayRef(element, instance.cleanup, componentRef);\n configure?.(componentRef.instance, ref);\n\n this.scheduleInitialLayout(instance);\n\n return ref;\n }\n\n openTemplate(options: TemplateOptions): OverlayRef<any> {\n const { anchor, point, template, appRef, configure, onClosed, placement, alignment, margin } =\n options;\n\n this.attachGlobalListeners();\n\n const element = this.createDialogElement();\n const view = template.createEmbeddedView({});\n appRef.attachView(view);\n element.append(...view.rootNodes);\n\n const instance: OverlayInstance = {\n element,\n anchor,\n point,\n placementConfig: this.resolvePlacementConfig(placement, alignment, margin),\n embeddedView: view,\n appRef,\n onClosed,\n rafId: null,\n focusTimeoutId: null,\n cleanup: () => {},\n };\n instance.cleanup = () => this.destroyInstance(instance);\n\n this.overlayStacks.push(instance);\n element.showModal();\n\n const ref = new OverlayRef(element, instance.cleanup, undefined, template);\n configure?.(instance, ref);\n\n this.scheduleInitialLayout(instance);\n\n return ref;\n }\n\n closeAll(): void {\n // اسنپ‌شات می‌گیریم چون cleanup حین اجرا آرایه‌ی اصلی رو تغییر می‌ده\n [...this.overlayStacks].forEach((instance) => instance.cleanup());\n }\n\n // ---------------------------------------------------------------------\n // lifecycle\n // ---------------------------------------------------------------------\n\n private resolvePlacementConfig(\n placement?: PlacementConfig['placement'],\n alignment?: PlacementConfig['alignment'],\n margin?: number,\n ): PlacementConfig {\n return {\n placement: placement ?? 'auto',\n alignment: alignment ?? 'start',\n margin: margin ?? 8,\n };\n }\n\n private createDialogElement(): HTMLDialogElement {\n const element = this.doc.createElement('dialog');\n element.className = DIALOG_OVERLAY_CLASSNAME;\n const style = element.style;\n style.position = 'absolute';\n style.outline = 'none';\n style.padding = '0';\n style.margin = '0';\n style.border = 'none';\n style.background = 'transparent';\n style.maxWidth = '100vw';\n style.maxHeight = '100vh';\n style.overflow = 'visible';\n style.visibility = 'hidden';\n\n this.doc.body.appendChild(element);\n return element;\n }\n\n private scheduleInitialLayout(instance: OverlayInstance): void {\n instance.rafId = requestAnimationFrame(() => {\n instance.rafId = null;\n this.positionDialog(instance);\n });\n\n instance.focusTimeoutId = setTimeout(() => {\n instance.focusTimeoutId = null;\n const focusable = instance.element.querySelector<HTMLElement>(FOCUSABLE_SELECTOR);\n focusable?.focus();\n }, 0);\n }\n\n private destroyInstance(instance: OverlayInstance): void {\n const index = this.overlayStacks.indexOf(instance);\n if (index === -1) return; // جلوگیری از پاک‌سازی دوباره\n\n this.overlayStacks.splice(index, 1);\n\n // لغو کارهای زمان‌بندی‌شده‌ای که هنوز اجرا نشدن (نشتی حافظه در نسخه‌ی قبلی)\n if (instance.rafId !== null) cancelAnimationFrame(instance.rafId);\n if (instance.focusTimeoutId !== null) clearTimeout(instance.focusTimeoutId);\n\n if (instance.componentRef) {\n instance.componentRef.location.nativeElement?.remove();\n instance.componentRef.destroy();\n }\n\n if (instance.embeddedView && instance.appRef) {\n instance.appRef.detachView(instance.embeddedView);\n instance.embeddedView.destroy();\n }\n\n // قبل از remove()، دیالوگ رو با متد استاندارد close() می‌بندیم؛ این کار دو\n // فایده داره که با remove() ساده به دست نمی‌اومدن:\n // ۱) فوکوس به‌صورت خودکار به همون المنتی که قبل از باز شدن دیالوگ فوکوس\n // داشت برمی‌گرده (رفتار استاندارد close() روی <dialog>) — با remove()\n // ساده این اتفاق نمی‌افته و فوکوس معمولاً روی body گم می‌شه.\n // ۲) رویداد 'close' استاندارد شلیک می‌شه، برای کدی که ممکنه به اون گوش بده.\n // در try/catch گذاشتیمش چون در محیط تست (jsdom) این متدها mock هستن و ممکنه\n // رفتار متفاوتی داشته باشن.\n try {\n if (instance.element.open) instance.element.close();\n } catch {\n /* noop */\n }\n\n instance.element.remove();\n instance.onClosed?.();\n }\n\n // ---------------------------------------------------------------------\n // global listeners (فقط یک‌بار در کل عمر سرویس attach می‌شن)\n // ---------------------------------------------------------------------\n\n private attachGlobalListeners(): void {\n if (this.listenersAttached) return;\n this.listenersAttached = true;\n\n const { signal } = this.abortController;\n\n this.doc.addEventListener('keydown', this.onGlobalKeyDown, { signal });\n window.addEventListener('resize', this.onGlobalResize, { signal, passive: true });\n this.doc.addEventListener('click', this.onGlobalPointerEvent, { signal });\n this.doc.addEventListener('contextmenu', this.onGlobalPointerEvent, { signal });\n }\n\n private readonly onGlobalKeyDown = (e: KeyboardEvent): void => {\n if (e.key !== 'Escape') return;\n this.getLastDialog()?.cleanup();\n };\n\n private readonly onGlobalResize = (): void => {\n // چند رویداد resize پشت‌سرهم فقط یک reposition واقعی اجرا می‌کنن\n if (this.resizeRafPending) return;\n this.resizeRafPending = true;\n requestAnimationFrame(() => {\n this.resizeRafPending = false;\n this.repositionAll();\n });\n };\n\n private readonly onGlobalPointerEvent = (e: MouseEvent): void => {\n this.handleClickOnBackdrop(e);\n };\n\n private handleClickOnBackdrop(event: MouseEvent): void {\n const lastDialog = this.getLastDialog();\n if (!lastDialog || !lastDialog.element.open) return;\n // کلیک باید دقیقاً روی خودِ دیالوگ (بک‌دراپ) باشه، نه محتوای داخلش\n if (event.target !== lastDialog.element) return;\n\n // اگه فرم داخل دیالوگه، با کلیک بیرون بسته نشه\n if (lastDialog.element.querySelector('form')) return;\n\n const rect = lastDialog.element.getBoundingClientRect();\n const clickWasInsideDialog =\n rect.top <= event.clientY &&\n event.clientY <= rect.bottom &&\n rect.left <= event.clientX &&\n event.clientX <= rect.right;\n\n const anchRect = lastDialog.anchor.getBoundingClientRect();\n const clickWasInsideAnchor =\n anchRect.top <= event.clientY &&\n event.clientY <= anchRect.bottom &&\n anchRect.left <= event.clientX &&\n event.clientX <= anchRect.right;\n\n if (!clickWasInsideDialog) {\n if (event.type == 'contextmenu' && lastDialog.point && clickWasInsideAnchor) {\n event.preventDefault();\n lastDialog.point = {\n x: event.clientX,\n y: event.clientY,\n };\n this.positionDialog(lastDialog);\n } else {\n lastDialog.cleanup();\n }\n }\n }\n\n private getLastDialog(): OverlayInstance | undefined {\n return this.overlayStacks[this.overlayStacks.length - 1];\n }\n\n // ---------------------------------------------------------------------\n // positioning\n // ---------------------------------------------------------------------\n\n private repositionAll(): void {\n this.overlayStacks.forEach((instance) => {\n if (instance.element.isConnected) {\n this.positionDialog(instance);\n }\n });\n }\n\n private positionDialog(instance: OverlayInstance): void {\n const { anchor, element: dialog, placementConfig, point } = instance;\n const { placement, alignment, margin } = placementConfig;\n\n if (!dialog.isConnected) return;\n\n let anchorRect: DOMRect;\n if (point) {\n anchorRect = new DOMRect(point.x, point.y, 0, 0);\n } else {\n anchorRect = anchor.getBoundingClientRect();\n }\n const dialogRect = dialog.getBoundingClientRect();\n\n const vw = Math.min(document.body.clientWidth, window.innerWidth);\n const vh = Math.min(document.body.clientHeight, window.innerHeight);\n const isRTL = this.directionService.isRtl();\n\n let top = 0;\n let left: number | 'auto' = 'auto';\n let right: number | 'auto' = 'auto';\n\n const spaceBelow = vh - anchorRect.bottom;\n const spaceAbove = anchorRect.top;\n let verticalPos: 'above' | 'bottom' = 'above';\n\n if (\n placement === 'bottom' ||\n (placement === 'auto' && spaceBelow >= dialogRect.height + margin)\n ) {\n top = anchorRect.bottom + margin;\n verticalPos = 'above';\n if (top + dialogRect.height > vh - margin) {\n top = vh - dialogRect.height - margin;\n verticalPos = 'bottom';\n }\n } else {\n top = anchorRect.top - dialogRect.height - margin;\n verticalPos = 'bottom';\n if (top > spaceAbove) {\n top = anchorRect.top + anchorRect.height + margin;\n verticalPos = 'above';\n }\n }\n\n if (alignment === 'center') {\n left = anchorRect.left + anchorRect.width / 2 - dialogRect.width / 2;\n } else if (alignment === 'start') {\n if (isRTL) {\n right = vw - anchorRect.right;\n } else {\n left = anchorRect.left;\n }\n } else if (alignment === 'end') {\n // انتهای دیالوگ باید با انتهای anchor یکی باشه؛ با استفاده از پراپرتی\n // CSS «right» (به‌جای کم‌کردن دستیِ عرض از «left») این کار درست و مستقل\n // از این‌که عرض دیالوگ چقدره انجام می‌شه (قبلاً این خط باگ داشت و دیالوگ\n // رو بعد از anchor می‌ذاشت، نه هم‌تراز با لبه‌ی انتهاییِ آن).\n if (isRTL) {\n left = anchorRect.left;\n } else {\n right = vw - anchorRect.right;\n }\n }\n if (left !== 'auto') {\n left = Math.min(Math.max(left, margin), vw - dialogRect.width - margin);\n }\n if (right !== 'auto') {\n right = Math.min(Math.max(right, margin), vw - dialogRect.width - margin);\n }\n\n if (top < 0) {\n top = 0;\n }\n\n dialog.className = `${DIALOG_OVERLAY_CLASSNAME} tips-${verticalPos}`;\n dialog.style.top = `${top + window.scrollY}px`;\n dialog.style.left = left !== 'auto' ? `${left + window.scrollX}px` : 'auto';\n dialog.style.right = right !== 'auto' ? `${right + window.scrollX}px` : 'auto';\n dialog.style.transformOrigin = verticalPos == 'above' ? 'left top' : 'left bottom';\n // dialog.style.transform = 'none';\n dialog.style.visibility = 'visible';\n dialog.style.animation = 'menu-enter 120ms cubic-bezier(0, 0, 0.2, 1)';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAAM,SAAU,iBAAiB,CAAC,GAA4B,EAAE,MAAmB,EAAA;AACjF,IAAA,IAAI,QAAQ,GAAG;AACb,QAAA,CAAC,EAAE,CAAC;AACJ,QAAA,CAAC,EAAE,CAA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