@studiometa/js-toolkit 2.4.4-alpha.1 → 2.4.4-alpha.4

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 (76) hide show
  1. package/Base/index.cjs +2 -2
  2. package/Base/index.d.ts +78 -218
  3. package/Base/index.js +1 -1
  4. package/Base/managers/AbstractManager.d.ts +2 -2
  5. package/Base/managers/ChildrenManager.cjs +2 -4
  6. package/Base/managers/ChildrenManager.d.ts +2 -10
  7. package/Base/managers/ChildrenManager.js +1 -3
  8. package/Base/managers/EventsManager.cjs +3 -3
  9. package/Base/managers/EventsManager.d.ts +9 -15
  10. package/Base/managers/EventsManager.js +2 -2
  11. package/Base/managers/OptionsManager.d.ts +1 -1
  12. package/Base/managers/ServicesManager.d.ts +1 -1
  13. package/Base/types.cjs +18 -0
  14. package/Base/types.d.ts +43 -0
  15. package/Base/types.js +0 -0
  16. package/Base/utils.cjs +1 -1
  17. package/Base/utils.d.ts +5 -21
  18. package/decorators/index.cjs +2 -0
  19. package/decorators/index.d.ts +1 -0
  20. package/decorators/index.js +4 -2
  21. package/decorators/withBreakpointManager.cjs +3 -2
  22. package/decorators/withBreakpointManager.d.ts +2 -84
  23. package/decorators/withBreakpointManager.js +3 -2
  24. package/decorators/withBreakpointObserver.cjs +6 -4
  25. package/decorators/withBreakpointObserver.d.ts +76 -49
  26. package/decorators/withBreakpointObserver.js +6 -4
  27. package/decorators/withDrag.cjs +5 -4
  28. package/decorators/withDrag.d.ts +63 -49
  29. package/decorators/withDrag.js +5 -4
  30. package/decorators/withExtraConfig.cjs +4 -3
  31. package/decorators/withExtraConfig.d.ts +63 -48
  32. package/decorators/withExtraConfig.js +4 -3
  33. package/decorators/withFreezedOptions.cjs +3 -2
  34. package/decorators/withFreezedOptions.d.ts +71 -47
  35. package/decorators/withFreezedOptions.js +3 -2
  36. package/decorators/withIntersectionObserver.cjs +6 -4
  37. package/decorators/withIntersectionObserver.d.ts +67 -48
  38. package/decorators/withIntersectionObserver.js +6 -4
  39. package/decorators/withMountWhenInView.cjs +10 -5
  40. package/decorators/withMountWhenInView.d.ts +76 -49
  41. package/decorators/withMountWhenInView.js +10 -5
  42. package/decorators/withResponsiveOptions.cjs +3 -2
  43. package/decorators/withResponsiveOptions.d.ts +68 -48
  44. package/decorators/withResponsiveOptions.js +3 -2
  45. package/decorators/withScrolledInView.cjs +5 -4
  46. package/decorators/withScrolledInView.d.ts +219 -79
  47. package/decorators/withScrolledInView.js +5 -4
  48. package/decorators/withType.cjs +28 -0
  49. package/decorators/withType.d.ts +5 -0
  50. package/decorators/withType.js +6 -0
  51. package/decorators/withVue2.cjs +7 -4
  52. package/decorators/withVue2.d.ts +64 -48
  53. package/decorators/withVue2.js +7 -4
  54. package/helpers/createApp.cjs +1 -1
  55. package/helpers/createApp.d.ts +2 -10
  56. package/helpers/getDirectChildren.cjs +5 -5
  57. package/helpers/getDirectChildren.d.ts +3 -13
  58. package/helpers/getDirectChildren.js +4 -4
  59. package/helpers/getInstanceFromElement.cjs +3 -4
  60. package/helpers/getInstanceFromElement.d.ts +2 -11
  61. package/helpers/getInstanceFromElement.js +2 -3
  62. package/helpers/importOnInteraction.cjs +1 -1
  63. package/helpers/importOnInteraction.d.ts +5 -10
  64. package/helpers/importWhenIdle.cjs +3 -5
  65. package/helpers/importWhenIdle.d.ts +7 -10
  66. package/helpers/importWhenIdle.js +2 -4
  67. package/helpers/importWhenVisible.cjs +1 -1
  68. package/helpers/importWhenVisible.d.ts +2 -7
  69. package/helpers/index.cjs +1 -1
  70. package/helpers/index.d.ts +6 -6
  71. package/helpers/utils.cjs +1 -1
  72. package/helpers/utils.d.ts +1 -1
  73. package/index.cjs +2 -8
  74. package/index.d.ts +2 -1
  75. package/index.js +2 -2
  76. package/package.json +1 -1
@@ -56,9 +56,8 @@ function updateProps(props, dampFactor, dampPrecision, axis = "x") {
56
56
  );
57
57
  }
58
58
  function withScrolledInView(BaseClass, options = {}) {
59
- var _a;
60
59
  const WithMountWhenInView = (0, import_withMountWhenInView.default)(BaseClass, options);
61
- return _a = class extends WithMountWhenInView {
60
+ class WithScrolledInView extends WithMountWhenInView {
62
61
  constructor(element) {
63
62
  super(element);
64
63
  __publicField(this, "__props", {
@@ -201,9 +200,11 @@ function withScrolledInView(BaseClass, options = {}) {
201
200
  (this.__props.dampedCurrent.y - yStart) / (yEnd - yStart)
202
201
  );
203
202
  }
204
- }, __publicField(_a, "config", {
203
+ }
204
+ __publicField(WithScrolledInView, "config", {
205
205
  name: `${BaseClass.config.name}WithMountWhenInView`,
206
206
  emits: ["scrolledInView"]
207
- }), _a;
207
+ });
208
+ return WithScrolledInView;
208
209
  }
209
210
  if (module.exports.default) module.exports = module.exports.default;
@@ -1,4 +1,5 @@
1
- import type { BaseTypeParameter, BaseConstructor, BaseConfig } from '../Base/index.js';
1
+ import type { Base, BaseTypeParameter, BaseConstructor, BaseConfig } from '../Base/index.js';
2
+ import type { RafServiceProps, ScrollServiceProps, ResizeServiceProps } from '../services/index.js';
2
3
  declare type ScrollInViewProps = {
3
4
  start: {
4
5
  x: number;
@@ -31,8 +32,8 @@ declare type withScrolledInViewOptions = IntersectionObserverInit & {
31
32
  /**
32
33
  * Add scrolled in view capabilities to a component.
33
34
  */
34
- export default function withScrolledInView<T extends BaseTypeParameter = BaseTypeParameter>(BaseClass: BaseConstructor, options?: withScrolledInViewOptions): {
35
- new <U extends BaseTypeParameter = BaseTypeParameter>(element: any): {
35
+ export default function withScrolledInView<S extends BaseConstructor<Base>, T extends BaseTypeParameter = BaseTypeParameter>(BaseClass: S, options?: withScrolledInViewOptions): {
36
+ new (...args: any[]): {
36
37
  __props: ScrollInViewProps;
37
38
  /**
38
39
  * Factor used for the `dampedProgress` props.
@@ -44,139 +45,194 @@ export default function withScrolledInView<T extends BaseTypeParameter = BaseTyp
44
45
  dampPrecision: number;
45
46
  /**
46
47
  * Mounted hook.
47
- *
48
- * @returns {void}
49
48
  */
50
49
  mounted(): void;
51
50
  /**
52
51
  * Resized hook.
53
- *
54
- * @param {import('../services/resize').ResizeServiceProps} props
55
- * @returns {void}
56
52
  */
57
- resized(props: any): void;
53
+ resized(props: ResizeServiceProps): void;
58
54
  /**
59
55
  * Scrolled hook.
60
- *
61
- * @param {import('../services/scroll').ScrollServiceProps} props
62
- * @returns {void}
63
56
  */
64
- scrolled(props: any): void;
57
+ scrolled(props: ScrollServiceProps): void;
65
58
  /**
66
59
  * Ticked hook.
67
- *
68
- * @param {import('../services/raf').RafServiceProps} props
69
- * @returns {void}
70
60
  */
71
- ticked(props: any): void;
61
+ ticked(props: RafServiceProps): void;
72
62
  /**
73
63
  * Destroyed hook.
74
- *
75
- * @returns {void}
76
64
  */
77
65
  destroyed(): void;
78
66
  /**
79
67
  * Set the decorator props.
80
- *
81
- * @returns {void}
82
68
  */
83
69
  __setProps(): void;
84
70
  __isVisible: boolean;
85
71
  __observer: IntersectionObserver;
86
- $mount(): any;
87
- $parent: import("../Base/index.js").default<{
88
- $el: HTMLElement;
89
- $options: import("../Base/index.js").BaseOptions;
90
- $refs: import("../Base/index.js").BaseRefs;
91
- $children: {
92
- [name: string]: import("../Base/index.js").default<any> | Promise<import("../Base/index.js").default<any>>;
93
- };
94
- }>;
72
+ $mount: (() => any) & (() => any);
73
+ $parent: Base<BaseTypeParameter>;
95
74
  $id: string;
96
- $el: ({
75
+ $el: HTMLElement & {
76
+ __base__?: WeakMap<BaseConstructor<Base<BaseTypeParameter>>, Base<BaseTypeParameter> | "terminated">;
77
+ } & (T & {
97
78
  $options: {
98
79
  intersectionObserver: IntersectionObserverInit;
99
80
  };
100
- } & T & U)["$el"] & HTMLElement & {
101
- __base__?: WeakMap<typeof import("../Base/index.js").default, import("../Base/index.js").default<{
102
- $el: HTMLElement;
103
- $options: import("../Base/index.js").BaseOptions;
104
- $refs: import("../Base/index.js").BaseRefs;
105
- $children: {
106
- [name: string]: import("../Base/index.js").default<any> | Promise<import("../Base/index.js").default<any>>;
107
- };
108
- }> | "terminated">;
109
- };
81
+ })["$el"];
110
82
  $isMounted: boolean;
111
83
  __eventHandlers: Map<string, Set<EventListenerOrEventListenerObject>>;
112
- readonly $root: import("../Base/index.js").default<{
113
- $el: HTMLElement;
114
- $options: import("../Base/index.js").BaseOptions;
115
- $refs: import("../Base/index.js").BaseRefs;
116
- $children: {
117
- [name: string]: import("../Base/index.js").default<any> | Promise<import("../Base/index.js").default<any>>;
118
- };
119
- }>;
84
+ readonly $root: Base<BaseTypeParameter>;
120
85
  readonly __config: BaseConfig;
121
86
  __services: import("../Base/managers/ServicesManager.js").default;
122
87
  readonly $services: import("../Base/managers/ServicesManager.js").default;
123
- __refs: import("../Base/managers/RefsManager.js").default & ({
88
+ __refs: import("../Base/managers/RefsManager.js").default & import("../Base/index.js").BaseRefs & (T & {
124
89
  $options: {
125
90
  intersectionObserver: IntersectionObserverInit;
126
91
  };
127
- } & T & U)["$refs"] & import("../Base/index.js").BaseRefs;
128
- readonly $refs: import("../Base/managers/RefsManager.js").default & ({
92
+ })["$refs"];
93
+ readonly $refs: import("../Base/managers/RefsManager.js").default & import("../Base/index.js").BaseRefs & (T & {
129
94
  $options: {
130
95
  intersectionObserver: IntersectionObserverInit;
131
96
  };
132
- } & T & U)["$refs"] & import("../Base/index.js").BaseRefs;
133
- __options: import("../Base/managers/OptionsManager.js").default & ({
97
+ })["$refs"];
98
+ __options: import("../Base/managers/OptionsManager.js").default & import("../Base/index.js").BaseOptions & (T & {
134
99
  $options: {
135
100
  intersectionObserver: IntersectionObserverInit;
136
101
  };
137
- } & T & U)["$options"] & import("../Base/index.js").BaseOptions;
138
- readonly $options: import("../Base/managers/OptionsManager.js").default & ({
102
+ })["$options"];
103
+ readonly $options: import("../Base/managers/OptionsManager.js").default & import("../Base/index.js").BaseOptions & (T & {
139
104
  $options: {
140
105
  intersectionObserver: IntersectionObserverInit;
141
106
  };
142
- } & T & U)["$options"] & import("../Base/index.js").BaseOptions; /**
107
+ })["$options"];
108
+ __children: import("../Base/managers/ChildrenManager.js").default & import("../Base/index.js").BaseChildren & (T & {
109
+ $options: {
110
+ intersectionObserver: IntersectionObserverInit;
111
+ };
112
+ })["$children"];
113
+ readonly $children: import("../Base/managers/ChildrenManager.js").default & import("../Base/index.js").BaseChildren & (T & {
114
+ $options: {
115
+ intersectionObserver: IntersectionObserverInit;
116
+ };
117
+ })["$children"];
118
+ __events: import("../Base/managers/EventsManager.js").default;
119
+ readonly $log: (...args: unknown[]) => void;
120
+ readonly __debug: (...args: unknown[]) => void;
121
+ readonly __managers: import("../Base/index.js").Managers;
122
+ __callMethod(method: string, ...args: unknown[]): unknown;
123
+ __hasEvent(event: string): boolean;
124
+ $update(): any;
125
+ $destroy(): any;
126
+ $terminate(): void;
127
+ __addEmits(event: string): void;
128
+ __removeEmits(event: string): void;
129
+ readonly __ctor: BaseConstructor<Base<BaseTypeParameter>>;
130
+ $on(event: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): () => void;
131
+ $off: ((event: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions) => void) & ((event: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions) => void);
132
+ $emit: ((event: string, ...args: unknown[]) => void) & ((event: string, ...args: unknown[]) => void);
133
+ addEventListener(type: string, callback: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
134
+ dispatchEvent(event: Event): boolean;
135
+ removeEventListener(type: string, callback: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
136
+ };
137
+ prototype: Base<BaseTypeParameter>;
138
+ } & Pick<typeof Base, "prototype" | "$isBase" | "config" | "$factory"> & Pick<{
139
+ new (element: HTMLElement): {
140
+ __props: ScrollInViewProps;
141
+ /**
142
+ * Factor used for the `dampedProgress` props.
143
+ */
144
+ dampFactor: number;
145
+ /**
146
+ * Precision for the `dampedProgress` props.
147
+ */
148
+ dampPrecision: number;
149
+ /**
150
+ * Mounted hook.
151
+ */
152
+ mounted(): void;
153
+ /**
154
+ * Resized hook.
155
+ */
156
+ resized(props: ResizeServiceProps): void;
157
+ /**
158
+ * Scrolled hook.
159
+ */
160
+ scrolled(props: ScrollServiceProps): void;
161
+ /**
162
+ * Ticked hook.
163
+ */
164
+ ticked(props: RafServiceProps): void;
165
+ /**
166
+ * Destroyed hook.
167
+ */
168
+ destroyed(): void;
169
+ /**
143
170
  * Set the decorator props.
144
- *
145
- * @returns {void}
146
171
  */
147
- __children: import("../Base/managers/ChildrenManager.js").default & (({
172
+ __setProps(): void;
173
+ __isVisible: boolean;
174
+ __observer: IntersectionObserver;
175
+ $mount: (() => any) & (() => any);
176
+ $parent: Base<BaseTypeParameter>;
177
+ $id: string;
178
+ $el: HTMLElement & {
179
+ __base__?: WeakMap<BaseConstructor<Base<BaseTypeParameter>>, Base<BaseTypeParameter> | "terminated">;
180
+ } & (T & {
148
181
  $options: {
149
182
  intersectionObserver: IntersectionObserverInit;
150
183
  };
151
- } & T & U)["$children"] extends infer T_1 ? { [key in keyof T_1]: ({
184
+ })["$el"];
185
+ $isMounted: boolean;
186
+ __eventHandlers: Map<string, Set<EventListenerOrEventListenerObject>>;
187
+ readonly $root: Base<BaseTypeParameter>;
188
+ readonly __config: BaseConfig;
189
+ __services: import("../Base/managers/ServicesManager.js").default;
190
+ readonly $services: import("../Base/managers/ServicesManager.js").default;
191
+ __refs: import("../Base/managers/RefsManager.js").default & import("../Base/index.js").BaseRefs & (T & {
152
192
  $options: {
153
193
  intersectionObserver: IntersectionObserverInit;
154
194
  };
155
- } & T & U)["$children"][key][]; } : never) & import("../Base/index.js").BaseChildren;
156
- readonly $children: import("../Base/managers/ChildrenManager.js").default & (({
195
+ })["$refs"];
196
+ readonly $refs: import("../Base/managers/RefsManager.js").default & import("../Base/index.js").BaseRefs & (T & {
157
197
  $options: {
158
198
  intersectionObserver: IntersectionObserverInit;
159
199
  };
160
- } & T & U)["$children"] extends infer T_2 ? { [key_1 in keyof T_2]: ({
200
+ })["$refs"];
201
+ __options: import("../Base/managers/OptionsManager.js").default & import("../Base/index.js").BaseOptions & (T & {
161
202
  $options: {
162
203
  intersectionObserver: IntersectionObserverInit;
163
204
  };
164
- } & T & U)["$children"][key_1][]; } : never) & import("../Base/index.js").BaseChildren;
205
+ })["$options"];
206
+ readonly $options: import("../Base/managers/OptionsManager.js").default & import("../Base/index.js").BaseOptions & (T & {
207
+ $options: {
208
+ intersectionObserver: IntersectionObserverInit;
209
+ };
210
+ })["$options"];
211
+ __children: import("../Base/managers/ChildrenManager.js").default & import("../Base/index.js").BaseChildren & (T & {
212
+ $options: {
213
+ intersectionObserver: IntersectionObserverInit;
214
+ };
215
+ })["$children"];
216
+ readonly $children: import("../Base/managers/ChildrenManager.js").default & import("../Base/index.js").BaseChildren & (T & {
217
+ $options: {
218
+ intersectionObserver: IntersectionObserverInit;
219
+ };
220
+ })["$children"];
165
221
  __events: import("../Base/managers/EventsManager.js").default;
166
- readonly $log: (...args: any) => void;
167
- readonly __debug: (...args: any) => void;
222
+ readonly $log: (...args: unknown[]) => void;
223
+ readonly __debug: (...args: unknown[]) => void;
168
224
  readonly __managers: import("../Base/index.js").Managers;
169
- __callMethod(method: string, ...args: any[]): any;
225
+ __callMethod(method: string, ...args: unknown[]): unknown;
170
226
  __hasEvent(event: string): boolean;
171
227
  $update(): any;
172
228
  $destroy(): any;
173
229
  $terminate(): void;
174
230
  __addEmits(event: string): void;
175
231
  __removeEmits(event: string): void;
176
- readonly __ctor: typeof import("../Base/index.js").default;
232
+ readonly __ctor: BaseConstructor<Base<BaseTypeParameter>>;
177
233
  $on(event: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): () => void;
178
- $off(event: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
179
- $emit(event: string, ...args: any[]): void;
234
+ $off: ((event: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions) => void) & ((event: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions) => void);
235
+ $emit: ((event: string, ...args: unknown[]) => void) & ((event: string, ...args: unknown[]) => void);
180
236
  addEventListener(type: string, callback: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
181
237
  dispatchEvent(event: Event): boolean;
182
238
  removeEventListener(type: string, callback: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
@@ -185,14 +241,98 @@ export default function withScrolledInView<T extends BaseTypeParameter = BaseTyp
185
241
  * Config.
186
242
  */
187
243
  config: BaseConfig;
188
- readonly $isBase: boolean;
189
- $factory(nameOrSelector: string): import("../Base/index.js").default<{
190
- $el: HTMLElement;
191
- $options: import("../Base/index.js").BaseOptions;
192
- $refs: import("../Base/index.js").BaseRefs;
193
- $children: {
194
- [name: string]: import("../Base/index.js").default<any> | Promise<import("../Base/index.js").default<any>>;
244
+ readonly $isBase: true & ({
245
+ new (element: HTMLElement): {
246
+ __isVisible: boolean;
247
+ __observer: IntersectionObserver;
248
+ $mount(): any;
249
+ $parent: Base<BaseTypeParameter>;
250
+ $id: string;
251
+ $el: HTMLElement & {
252
+ __base__?: WeakMap<BaseConstructor<Base<BaseTypeParameter>>, Base<BaseTypeParameter> | "terminated">;
253
+ };
254
+ $isMounted: boolean;
255
+ __eventHandlers: Map<string, Set<EventListenerOrEventListenerObject>>;
256
+ readonly $root: Base<BaseTypeParameter>;
257
+ readonly __config: BaseConfig;
258
+ __services: import("../Base/managers/ServicesManager.js").default;
259
+ readonly $services: import("../Base/managers/ServicesManager.js").default;
260
+ __refs: import("../Base/managers/RefsManager.js").default & import("../Base/index.js").BaseRefs;
261
+ readonly $refs: import("../Base/managers/RefsManager.js").default & import("../Base/index.js").BaseRefs;
262
+ __options: import("../Base/managers/OptionsManager.js").default & import("../Base/index.js").BaseOptions;
263
+ readonly $options: import("../Base/managers/OptionsManager.js").default & import("../Base/index.js").BaseOptions;
264
+ __children: import("../Base/managers/ChildrenManager.js").default & import("../Base/index.js").BaseChildren;
265
+ readonly $children: import("../Base/managers/ChildrenManager.js").default & import("../Base/index.js").BaseChildren;
266
+ __events: import("../Base/managers/EventsManager.js").default;
267
+ readonly $log: (...args: unknown[]) => void;
268
+ readonly __debug: (...args: unknown[]) => void;
269
+ readonly __managers: import("../Base/index.js").Managers;
270
+ __callMethod(method: string, ...args: unknown[]): unknown;
271
+ __hasEvent(event: string): boolean;
272
+ $update(): any;
273
+ $destroy(): any;
274
+ $terminate(): void;
275
+ __addEmits(event: string): void;
276
+ __removeEmits(event: string): void;
277
+ readonly __ctor: BaseConstructor<Base<BaseTypeParameter>>;
278
+ $on(event: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): () => void;
279
+ $off(event: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
280
+ $emit(event: string, ...args: unknown[]): void;
281
+ addEventListener(type: string, callback: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
282
+ dispatchEvent(event: Event): boolean;
283
+ removeEventListener(type: string, callback: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
284
+ };
285
+ config: BaseConfig;
286
+ readonly $isBase: true;
287
+ $factory: typeof Base.$factory;
288
+ } & S)["$isBase"];
289
+ $factory: typeof Base.$factory & ({
290
+ new (element: HTMLElement): {
291
+ __isVisible: boolean;
292
+ __observer: IntersectionObserver;
293
+ $mount(): any;
294
+ $parent: Base<BaseTypeParameter>;
295
+ $id: string;
296
+ $el: HTMLElement & {
297
+ __base__?: WeakMap<BaseConstructor<Base<BaseTypeParameter>>, Base<BaseTypeParameter> | "terminated">;
298
+ };
299
+ $isMounted: boolean;
300
+ __eventHandlers: Map<string, Set<EventListenerOrEventListenerObject>>;
301
+ readonly $root: Base<BaseTypeParameter>;
302
+ readonly __config: BaseConfig;
303
+ __services: import("../Base/managers/ServicesManager.js").default;
304
+ readonly $services: import("../Base/managers/ServicesManager.js").default;
305
+ __refs: import("../Base/managers/RefsManager.js").default & import("../Base/index.js").BaseRefs;
306
+ readonly $refs: import("../Base/managers/RefsManager.js").default & import("../Base/index.js").BaseRefs;
307
+ __options: import("../Base/managers/OptionsManager.js").default & import("../Base/index.js").BaseOptions;
308
+ readonly $options: import("../Base/managers/OptionsManager.js").default & import("../Base/index.js").BaseOptions;
309
+ __children: import("../Base/managers/ChildrenManager.js").default & import("../Base/index.js").BaseChildren;
310
+ readonly $children: import("../Base/managers/ChildrenManager.js").default & import("../Base/index.js").BaseChildren;
311
+ __events: import("../Base/managers/EventsManager.js").default;
312
+ readonly $log: (...args: unknown[]) => void;
313
+ readonly __debug: (...args: unknown[]) => void;
314
+ readonly __managers: import("../Base/index.js").Managers;
315
+ __callMethod(method: string, ...args: unknown[]): unknown;
316
+ __hasEvent(event: string): boolean;
317
+ $update(): any;
318
+ $destroy(): any;
319
+ $terminate(): void;
320
+ __addEmits(event: string): void;
321
+ __removeEmits(event: string): void;
322
+ readonly __ctor: BaseConstructor<Base<BaseTypeParameter>>;
323
+ $on(event: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): () => void;
324
+ $off(event: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
325
+ $emit(event: string, ...args: unknown[]): void;
326
+ addEventListener(type: string, callback: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
327
+ dispatchEvent(event: Event): boolean;
328
+ removeEventListener(type: string, callback: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
195
329
  };
196
- }>[];
330
+ config: BaseConfig;
331
+ readonly $isBase: true;
332
+ $factory: typeof Base.$factory;
333
+ } & S)["$factory"];
334
+ } & S, "prototype" | "$isBase" | "config" | "$factory" | keyof S> & S & {
335
+ new (...args: any[]): Base<T>;
336
+ prototype: Base<BaseTypeParameter>;
197
337
  };
198
338
  export {};
@@ -27,9 +27,8 @@ function updateProps(props, dampFactor, dampPrecision, axis = "x") {
27
27
  );
28
28
  }
29
29
  function withScrolledInView(BaseClass, options = {}) {
30
- var _a;
31
30
  const WithMountWhenInView = withMountWhenInView(BaseClass, options);
32
- return _a = class extends WithMountWhenInView {
31
+ class WithScrolledInView extends WithMountWhenInView {
33
32
  constructor(element) {
34
33
  super(element);
35
34
  __publicField(this, "__props", {
@@ -172,10 +171,12 @@ function withScrolledInView(BaseClass, options = {}) {
172
171
  (this.__props.dampedCurrent.y - yStart) / (yEnd - yStart)
173
172
  );
174
173
  }
175
- }, __publicField(_a, "config", {
174
+ }
175
+ __publicField(WithScrolledInView, "config", {
176
176
  name: `${BaseClass.config.name}WithMountWhenInView`,
177
177
  emits: ["scrolledInView"]
178
- }), _a;
178
+ });
179
+ return WithScrolledInView;
179
180
  }
180
181
  export {
181
182
  withScrolledInView as default
@@ -0,0 +1,28 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // packages/js-toolkit/decorators/withType.ts
20
+ var withType_exports = {};
21
+ __export(withType_exports, {
22
+ default: () => withType
23
+ });
24
+ module.exports = __toCommonJS(withType_exports);
25
+ function withType(BaseClass) {
26
+ return BaseClass;
27
+ }
28
+ if (module.exports.default) module.exports = module.exports.default;
@@ -0,0 +1,5 @@
1
+ import type { Base, BaseTypeParameter, BaseConstructor } from '../Base/index.js';
2
+ export default function withType<T extends BaseConstructor<Base>, U extends BaseTypeParameter = BaseTypeParameter>(BaseClass: T): T & {
3
+ new (...args: any[]): Base<U>;
4
+ prototype: Base<BaseTypeParameter>;
5
+ } & Pick<typeof Base, "prototype" | "$isBase" | "config" | "$factory">;
@@ -0,0 +1,6 @@
1
+ function withType(BaseClass) {
2
+ return BaseClass;
3
+ }
4
+ export {
5
+ withType as default
6
+ };
@@ -29,8 +29,8 @@ __export(withVue2_exports, {
29
29
  module.exports = __toCommonJS(withVue2_exports);
30
30
  var import_utils = require("../utils/index.cjs");
31
31
  function withVue2(BaseClass, VueCtor) {
32
- var _a, _b, _c;
33
- return _c = class extends BaseClass {
32
+ var _a, _b;
33
+ class WithVue2 extends BaseClass {
34
34
  constructor(element) {
35
35
  var _a2;
36
36
  super(element);
@@ -59,10 +59,13 @@ function withVue2(BaseClass, VueCtor) {
59
59
  this.$vue.$destroy();
60
60
  });
61
61
  }
62
- }, __publicField(_c, "config", {
62
+ }
63
+ __publicField(WithVue2, "config", {
63
64
  ...BaseClass.config,
64
65
  name: `${BaseClass.config.name}WithVue`,
65
66
  refs: [...(_b = (_a = BaseClass.config) == null ? void 0 : _a.refs) != null ? _b : [], "vue"]
66
- }), __publicField(_c, "vueConfig"), _c;
67
+ });
68
+ __publicField(WithVue2, "vueConfig");
69
+ return WithVue2;
67
70
  }
68
71
  if (module.exports.default) module.exports = module.exports.default;