@discourse/types 2026.9.0-12832138 → 2026.9.0-c0ef3a11
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.
- package/external-types/discourse-i18n/index.d.ts +3 -2
- package/external-types/ember-compat__tracked-built-ins/index.d.ts +23 -12
- package/external-types/ember-modifier/index.d.ts +19 -17
- package/external-types/ember-qunit/index.d.ts +16 -7
- package/external-types/ember-truth-helpers/index.d.ts +33 -33
- package/external-types/ember__render-modifiers/index.d.ts +13 -7
- package/external-types/ember__string/index.d.ts +10 -10
- package/external-types/ember__test-helpers/index.d.ts +185 -155
- package/external-types/floating-ui__dom/index.d.ts +77 -69
- package/external-types/glimmer__component/index.d.ts +18 -10
- package/external-types/glimmer__syntax/index.d.ts +575 -129
- package/external-types/glint__template/index.d.ts +74 -66
- package/external-types/pretender/index.d.ts +2 -2
- package/external-types/rsvp/index.d.ts +4 -0
- package/external-types/sinon/index.d.ts +7 -3
- package/package.json +1 -1
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
declare module '@floating-ui/dom' {
|
|
2
|
-
import { AlignedPlacement } from
|
|
3
|
-
import { Alignment } from
|
|
4
|
-
import type { ArrowOptions as ArrowOptions_2 } from
|
|
5
|
-
import type { AutoPlacementOptions as AutoPlacementOptions_2 } from
|
|
6
|
-
import { Axis } from
|
|
7
|
-
import { ClientRectObject } from
|
|
8
|
-
import type { ComputePositionConfig as ComputePositionConfig_2 } from
|
|
9
|
-
import { ComputePositionReturn } from
|
|
10
|
-
import { Coords } from
|
|
11
|
-
import type { detectOverflow as detectOverflow_2 } from
|
|
12
|
-
import type { DetectOverflowOptions as DetectOverflowOptions_2 } from
|
|
13
|
-
import { Dimensions } from
|
|
14
|
-
import { ElementContext } from
|
|
15
|
-
import { ElementRects } from
|
|
16
|
-
import type { FlipOptions as FlipOptions_2 } from
|
|
17
|
-
import { getOverflowAncestors } from
|
|
18
|
-
import type { HideOptions as HideOptions_2 } from
|
|
19
|
-
import { InlineOptions } from
|
|
20
|
-
import { Length } from
|
|
21
|
-
import { LimitShiftOptions } from
|
|
22
|
-
import type { Middleware as Middleware_2 } from
|
|
23
|
-
import { MiddlewareData } from
|
|
24
|
-
import { MiddlewareReturn } from
|
|
25
|
-
import type { MiddlewareState as MiddlewareState_2 } from
|
|
26
|
-
import { Padding } from
|
|
27
|
-
import { Placement } from
|
|
28
|
-
import { Rect } from
|
|
29
|
-
import { RootBoundary } from
|
|
30
|
-
import type { ShiftOptions as ShiftOptions_2 } from
|
|
31
|
-
import { Side } from
|
|
32
|
-
import { SideObject } from
|
|
33
|
-
import type { SizeOptions as SizeOptions_2 } from
|
|
34
|
-
import { Strategy } from
|
|
2
|
+
import { AlignedPlacement } from '@floating-ui/core';
|
|
3
|
+
import { Alignment } from '@floating-ui/core';
|
|
4
|
+
import type { ArrowOptions as ArrowOptions_2 } from '@floating-ui/core';
|
|
5
|
+
import type { AutoPlacementOptions as AutoPlacementOptions_2 } from '@floating-ui/core';
|
|
6
|
+
import { Axis } from '@floating-ui/core';
|
|
7
|
+
import { ClientRectObject } from '@floating-ui/core';
|
|
8
|
+
import type { ComputePositionConfig as ComputePositionConfig_2 } from '@floating-ui/core';
|
|
9
|
+
import { ComputePositionReturn } from '@floating-ui/core';
|
|
10
|
+
import { Coords } from '@floating-ui/core';
|
|
11
|
+
import type { detectOverflow as detectOverflow_2 } from '@floating-ui/core';
|
|
12
|
+
import type { DetectOverflowOptions as DetectOverflowOptions_2 } from '@floating-ui/core';
|
|
13
|
+
import { Dimensions } from '@floating-ui/core';
|
|
14
|
+
import { ElementContext } from '@floating-ui/core';
|
|
15
|
+
import { ElementRects } from '@floating-ui/core';
|
|
16
|
+
import type { FlipOptions as FlipOptions_2 } from '@floating-ui/core';
|
|
17
|
+
import { getOverflowAncestors } from '@floating-ui/utils/dom';
|
|
18
|
+
import type { HideOptions as HideOptions_2 } from '@floating-ui/core';
|
|
19
|
+
import { InlineOptions } from '@floating-ui/core';
|
|
20
|
+
import { Length } from '@floating-ui/core';
|
|
21
|
+
import { LimitShiftOptions } from '@floating-ui/core';
|
|
22
|
+
import type { Middleware as Middleware_2 } from '@floating-ui/core';
|
|
23
|
+
import { MiddlewareData } from '@floating-ui/core';
|
|
24
|
+
import { MiddlewareReturn } from '@floating-ui/core';
|
|
25
|
+
import type { MiddlewareState as MiddlewareState_2 } from '@floating-ui/core';
|
|
26
|
+
import { Padding } from '@floating-ui/core';
|
|
27
|
+
import { Placement } from '@floating-ui/core';
|
|
28
|
+
import { Rect } from '@floating-ui/core';
|
|
29
|
+
import { RootBoundary } from '@floating-ui/core';
|
|
30
|
+
import type { ShiftOptions as ShiftOptions_2 } from '@floating-ui/core';
|
|
31
|
+
import { Side } from '@floating-ui/core';
|
|
32
|
+
import { SideObject } from '@floating-ui/core';
|
|
33
|
+
import type { SizeOptions as SizeOptions_2 } from '@floating-ui/core';
|
|
34
|
+
import { Strategy } from '@floating-ui/core';
|
|
35
35
|
|
|
36
36
|
export { AlignedPlacement }
|
|
37
37
|
|
|
@@ -42,9 +42,9 @@ declare module '@floating-ui/dom' {
|
|
|
42
42
|
* appears centered to the reference element.
|
|
43
43
|
* @see https://floating-ui.com/docs/arrow
|
|
44
44
|
*/
|
|
45
|
-
export
|
|
45
|
+
export const arrow: (options: ArrowOptions | Derivable<ArrowOptions>) => Middleware;
|
|
46
46
|
|
|
47
|
-
export
|
|
47
|
+
export type ArrowOptions = Prettify<Omit<ArrowOptions_2, 'element'> & {
|
|
48
48
|
element: Element;
|
|
49
49
|
}>;
|
|
50
50
|
|
|
@@ -54,9 +54,9 @@ declare module '@floating-ui/dom' {
|
|
|
54
54
|
* preferred placement. Alternative to `flip`.
|
|
55
55
|
* @see https://floating-ui.com/docs/autoPlacement
|
|
56
56
|
*/
|
|
57
|
-
export
|
|
57
|
+
export const autoPlacement: (options?: AutoPlacementOptions | Derivable<AutoPlacementOptions>) => Middleware;
|
|
58
58
|
|
|
59
|
-
export
|
|
59
|
+
export type AutoPlacementOptions = Prettify<Omit<AutoPlacementOptions_2, 'boundary'> & DetectOverflowOptions>;
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* Automatically updates the position of the floating element when necessary.
|
|
@@ -66,9 +66,9 @@ declare module '@floating-ui/dom' {
|
|
|
66
66
|
* removed from the DOM or hidden from the screen.
|
|
67
67
|
* @see https://floating-ui.com/docs/autoUpdate
|
|
68
68
|
*/
|
|
69
|
-
export
|
|
69
|
+
export function autoUpdate(reference: ReferenceElement, floating: FloatingElement | null, update: () => void, options?: AutoUpdateOptions): () => void;
|
|
70
70
|
|
|
71
|
-
export
|
|
71
|
+
export interface AutoUpdateOptions {
|
|
72
72
|
/**
|
|
73
73
|
* Whether to update the position when an overflow ancestor is scrolled.
|
|
74
74
|
* @default true
|
|
@@ -100,14 +100,16 @@ declare module '@floating-ui/dom' {
|
|
|
100
100
|
animationFrame?: boolean | undefined;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
export { Axis }
|
|
103
|
+
export { Axis }
|
|
104
|
+
|
|
105
|
+
type BivariantCallback<T extends (...args: any[]) => any> = {
|
|
104
106
|
bivariance(...args: Parameters<T>): ReturnType<T>;
|
|
105
107
|
}['bivariance'];
|
|
106
108
|
|
|
107
109
|
/**
|
|
108
110
|
* The clipping boundary area of the floating element.
|
|
109
111
|
*/
|
|
110
|
-
export
|
|
112
|
+
export type Boundary = 'clippingAncestors' | Element | Array<Element> | Rect;
|
|
111
113
|
|
|
112
114
|
export { ClientRectObject }
|
|
113
115
|
|
|
@@ -115,9 +117,9 @@ declare module '@floating-ui/dom' {
|
|
|
115
117
|
* Computes the `x` and `y` coordinates that will place the floating element
|
|
116
118
|
* next to a given reference element.
|
|
117
119
|
*/
|
|
118
|
-
export
|
|
120
|
+
export const computePosition: (reference: ReferenceElement, floating: FloatingElement, options?: Partial<ComputePositionConfig>) => Promise<ComputePositionReturn>;
|
|
119
121
|
|
|
120
|
-
export
|
|
122
|
+
export type ComputePositionConfig = Prettify<Omit<ComputePositionConfig_2, 'middleware' | 'platform'> & {
|
|
121
123
|
/**
|
|
122
124
|
* Array of middleware objects to modify the positioning or provide data for
|
|
123
125
|
* rendering.
|
|
@@ -133,7 +135,7 @@ declare module '@floating-ui/dom' {
|
|
|
133
135
|
|
|
134
136
|
export { Coords }
|
|
135
137
|
|
|
136
|
-
export
|
|
138
|
+
export type Derivable<T> = (state: MiddlewareState) => T;
|
|
137
139
|
|
|
138
140
|
/**
|
|
139
141
|
* Resolves with an object of overflow side offsets that determine how much the
|
|
@@ -143,9 +145,9 @@ declare module '@floating-ui/dom' {
|
|
|
143
145
|
* - 0 = lies flush with the boundary
|
|
144
146
|
* @see https://floating-ui.com/docs/detectOverflow
|
|
145
147
|
*/
|
|
146
|
-
export
|
|
148
|
+
export const detectOverflow: (state: MiddlewareState, options?: DetectOverflowOptions | Derivable<DetectOverflowOptions>) => Promise<SideObject>;
|
|
147
149
|
|
|
148
|
-
export
|
|
150
|
+
export type DetectOverflowOptions = Prettify<Omit<DetectOverflowOptions_2, 'boundary'> & {
|
|
149
151
|
boundary?: Boundary | undefined;
|
|
150
152
|
}>;
|
|
151
153
|
|
|
@@ -155,7 +157,7 @@ declare module '@floating-ui/dom' {
|
|
|
155
157
|
|
|
156
158
|
export { ElementRects }
|
|
157
159
|
|
|
158
|
-
export
|
|
160
|
+
export interface Elements {
|
|
159
161
|
reference: ReferenceElement;
|
|
160
162
|
floating: FloatingElement;
|
|
161
163
|
}
|
|
@@ -166,11 +168,11 @@ declare module '@floating-ui/dom' {
|
|
|
166
168
|
* clipping boundary. Alternative to `autoPlacement`.
|
|
167
169
|
* @see https://floating-ui.com/docs/flip
|
|
168
170
|
*/
|
|
169
|
-
export
|
|
171
|
+
export const flip: (options?: FlipOptions | Derivable<FlipOptions>) => Middleware;
|
|
170
172
|
|
|
171
|
-
export
|
|
173
|
+
export type FlipOptions = Prettify<Omit<FlipOptions_2, 'boundary'> & DetectOverflowOptions>;
|
|
172
174
|
|
|
173
|
-
export
|
|
175
|
+
export type FloatingElement = HTMLElement;
|
|
174
176
|
|
|
175
177
|
export { getOverflowAncestors }
|
|
176
178
|
|
|
@@ -179,16 +181,16 @@ declare module '@floating-ui/dom' {
|
|
|
179
181
|
* when it is not in the same clipping context as the reference element.
|
|
180
182
|
* @see https://floating-ui.com/docs/hide
|
|
181
183
|
*/
|
|
182
|
-
export
|
|
184
|
+
export const hide: (options?: HideOptions | Derivable<HideOptions>) => Middleware;
|
|
183
185
|
|
|
184
|
-
export
|
|
186
|
+
export type HideOptions = Prettify<Omit<HideOptions_2, 'boundary'> & DetectOverflowOptions>;
|
|
185
187
|
|
|
186
188
|
/**
|
|
187
189
|
* Provides improved positioning for inline reference elements that can span
|
|
188
190
|
* over multiple lines, such as hyperlinks or range selections.
|
|
189
191
|
* @see https://floating-ui.com/docs/inline
|
|
190
192
|
*/
|
|
191
|
-
export
|
|
193
|
+
export const inline: (options?: InlineOptions | Derivable<InlineOptions>) => Middleware;
|
|
192
194
|
|
|
193
195
|
export { InlineOptions }
|
|
194
196
|
|
|
@@ -197,31 +199,31 @@ declare module '@floating-ui/dom' {
|
|
|
197
199
|
/**
|
|
198
200
|
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
199
201
|
*/
|
|
200
|
-
export
|
|
202
|
+
export const limitShift: (options?: LimitShiftOptions | Derivable<LimitShiftOptions>) => {
|
|
201
203
|
options: any;
|
|
202
204
|
fn: (state: MiddlewareState) => Coords;
|
|
203
205
|
};
|
|
204
206
|
|
|
205
207
|
export { LimitShiftOptions }
|
|
206
208
|
|
|
207
|
-
export
|
|
209
|
+
export type Middleware = Prettify<Omit<Middleware_2, 'fn'> & {
|
|
208
210
|
fn(state: MiddlewareState): Promisable<MiddlewareReturn>;
|
|
209
211
|
}>;
|
|
210
212
|
|
|
211
213
|
/**
|
|
212
214
|
* @deprecated use `MiddlewareState` instead.
|
|
213
215
|
*/
|
|
214
|
-
export
|
|
216
|
+
export type MiddlewareArguments = MiddlewareState;
|
|
215
217
|
|
|
216
218
|
export { MiddlewareData }
|
|
217
219
|
|
|
218
220
|
export { MiddlewareReturn }
|
|
219
221
|
|
|
220
|
-
export
|
|
222
|
+
export type MiddlewareState = Prettify<Omit<MiddlewareState_2, 'elements'> & {
|
|
221
223
|
elements: Elements;
|
|
222
224
|
}>;
|
|
223
225
|
|
|
224
|
-
export
|
|
226
|
+
export interface NodeScroll {
|
|
225
227
|
scrollLeft: number;
|
|
226
228
|
scrollTop: number;
|
|
227
229
|
}
|
|
@@ -233,9 +235,11 @@ declare module '@floating-ui/dom' {
|
|
|
233
235
|
* object may be passed.
|
|
234
236
|
* @see https://floating-ui.com/docs/offset
|
|
235
237
|
*/
|
|
236
|
-
export
|
|
238
|
+
export const offset: (options?: OffsetOptions) => Middleware;
|
|
239
|
+
|
|
240
|
+
export type OffsetOptions = OffsetValue | Derivable<OffsetValue>;
|
|
237
241
|
|
|
238
|
-
|
|
242
|
+
type OffsetValue = number | {
|
|
239
243
|
/**
|
|
240
244
|
* The axis that runs along the side of the floating element. Represents
|
|
241
245
|
* the distance (gutter or margin) between the reference and floating
|
|
@@ -266,7 +270,7 @@ declare module '@floating-ui/dom' {
|
|
|
266
270
|
|
|
267
271
|
export { Placement }
|
|
268
272
|
|
|
269
|
-
export
|
|
273
|
+
export interface Platform {
|
|
270
274
|
getElementRects: (args: {
|
|
271
275
|
reference: ReferenceElement;
|
|
272
276
|
floating: FloatingElement;
|
|
@@ -297,13 +301,17 @@ declare module '@floating-ui/dom' {
|
|
|
297
301
|
detectOverflow?: typeof detectOverflow_2 | undefined;
|
|
298
302
|
}
|
|
299
303
|
|
|
300
|
-
export
|
|
304
|
+
export const platform: Platform;
|
|
305
|
+
|
|
306
|
+
type Prettify<T> = {
|
|
301
307
|
[K in keyof T]: T[K];
|
|
302
|
-
} & {};
|
|
308
|
+
} & {};
|
|
309
|
+
|
|
310
|
+
type Promisable<T> = T | Promise<T>;
|
|
303
311
|
|
|
304
312
|
export { Rect }
|
|
305
313
|
|
|
306
|
-
export
|
|
314
|
+
export type ReferenceElement = Element | VirtualElement;
|
|
307
315
|
|
|
308
316
|
export { RootBoundary }
|
|
309
317
|
|
|
@@ -312,9 +320,9 @@ declare module '@floating-ui/dom' {
|
|
|
312
320
|
* keep it in view when it will overflow the clipping boundary.
|
|
313
321
|
* @see https://floating-ui.com/docs/shift
|
|
314
322
|
*/
|
|
315
|
-
export
|
|
323
|
+
export const shift: (options?: ShiftOptions | Derivable<ShiftOptions>) => Middleware;
|
|
316
324
|
|
|
317
|
-
export
|
|
325
|
+
export type ShiftOptions = Prettify<Omit<ShiftOptions_2, 'boundary'> & DetectOverflowOptions>;
|
|
318
326
|
|
|
319
327
|
export { Side }
|
|
320
328
|
|
|
@@ -326,9 +334,9 @@ declare module '@floating-ui/dom' {
|
|
|
326
334
|
* width of the reference element.
|
|
327
335
|
* @see https://floating-ui.com/docs/size
|
|
328
336
|
*/
|
|
329
|
-
export
|
|
337
|
+
export const size: (options?: SizeOptions | Derivable<SizeOptions>) => Middleware;
|
|
330
338
|
|
|
331
|
-
export
|
|
339
|
+
export type SizeOptions = Prettify<Omit<SizeOptions_2, 'apply' | 'boundary'> & DetectOverflowOptions & {
|
|
332
340
|
/**
|
|
333
341
|
* Function that is called to perform style mutations to the floating element
|
|
334
342
|
* to change its size.
|
|
@@ -346,7 +354,7 @@ declare module '@floating-ui/dom' {
|
|
|
346
354
|
* Custom positioning reference element.
|
|
347
355
|
* @see https://floating-ui.com/docs/virtual-elements
|
|
348
356
|
*/
|
|
349
|
-
export
|
|
357
|
+
export interface VirtualElement {
|
|
350
358
|
getBoundingClientRect(): ClientRectObject;
|
|
351
359
|
getClientRects?: (() => Array<ClientRectObject> | DOMRectList) | undefined;
|
|
352
360
|
contextElement?: Element | undefined;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
declare module '@glimmer/component/-private/component' {
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export function setDestroying(component: GlimmerComponent<object>): void;
|
|
3
|
+
export function setDestroyed(component: GlimmerComponent<object>): void;
|
|
4
4
|
interface ArgsSetMap extends WeakMap<Args<unknown>, boolean> {
|
|
5
5
|
get<S>(key: Args<S>): boolean | undefined;
|
|
6
6
|
set<S>(key: Args<S>, value: boolean): this;
|
|
7
7
|
has<S>(key: Args<S>): boolean;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export let ARGS_SET: ArgsSetMap;
|
|
10
|
+
const Empty: unique symbol;
|
|
10
11
|
/**
|
|
11
12
|
* This provides us a way to have a "fallback" which represents an empty object,
|
|
12
13
|
* without the downsides of how TS treats `{}`. Specifically: this will
|
|
@@ -245,8 +246,8 @@ declare module '@glimmer/component/-private/component' {
|
|
|
245
246
|
|
|
246
247
|
}
|
|
247
248
|
declare module '@glimmer/component' {
|
|
248
|
-
import _GlimmerComponent, { type Args } from
|
|
249
|
-
import { type default as Owner } from
|
|
249
|
+
import _GlimmerComponent, { type Args } from '@glimmer/component/-private/component';
|
|
250
|
+
import { type default as Owner } from '@ember/owner';
|
|
250
251
|
/**
|
|
251
252
|
A component is a reusable UI element that consists of a `.hbs` template and an
|
|
252
253
|
optional JavaScript class that defines its behavior. For example, someone
|
|
@@ -638,8 +639,8 @@ declare module '@glimmer/component' {
|
|
|
638
639
|
|
|
639
640
|
}
|
|
640
641
|
declare module '@glimmer/component/-private/base-component-manager' {
|
|
641
|
-
import type { Arguments, ComponentManager, ComponentCapabilities } from
|
|
642
|
-
import { type default as BaseComponent } from
|
|
642
|
+
import type { Arguments, ComponentManager, ComponentCapabilities } from '@glimmer/interfaces';
|
|
643
|
+
import { type default as BaseComponent } from '@glimmer/component/-private/component';
|
|
643
644
|
export interface Constructor<T> {
|
|
644
645
|
new (owner: unknown, args: Record<string, unknown>): T;
|
|
645
646
|
}
|
|
@@ -653,9 +654,16 @@ declare module '@glimmer/component/-private/base-component-manager' {
|
|
|
653
654
|
|
|
654
655
|
}
|
|
655
656
|
declare module '@glimmer/component/-private/ember-component-manager' {
|
|
656
|
-
import BaseComponentManager from
|
|
657
|
-
import { type default as GlimmerComponent } from
|
|
658
|
-
import type { Arguments } from
|
|
657
|
+
import BaseComponentManager from '@glimmer/component/-private/base-component-manager';
|
|
658
|
+
import { type default as GlimmerComponent } from '@glimmer/component/-private/component';
|
|
659
|
+
import type { Arguments } from '@glimmer/interfaces';
|
|
660
|
+
/**
|
|
661
|
+
* This component manager runs in Ember.js environments and extends the base component manager to:
|
|
662
|
+
*
|
|
663
|
+
* 1. Properly destroy the component's associated `meta` data structure
|
|
664
|
+
* 2. Schedule destruction using Ember's runloop
|
|
665
|
+
*/
|
|
666
|
+
class EmberGlimmerComponentManager extends BaseComponentManager<GlimmerComponent> {
|
|
659
667
|
capabilities: any;
|
|
660
668
|
destroyComponent(component: GlimmerComponent): void;
|
|
661
669
|
}
|