@studiometa/js-toolkit 2.4.3 → 2.4.4-alpha.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 (49) hide show
  1. package/decorators/index.cjs +1 -1
  2. package/decorators/withBreakpointManager.cjs +2 -3
  3. package/decorators/withBreakpointManager.js +1 -2
  4. package/decorators/withBreakpointObserver.cjs +2 -2
  5. package/decorators/withBreakpointObserver.js +1 -1
  6. package/decorators/withDrag.cjs +1 -1
  7. package/decorators/withExtraConfig.cjs +1 -1
  8. package/decorators/withFreezedOptions.cjs +9 -7
  9. package/decorators/withFreezedOptions.js +8 -6
  10. package/decorators/withIntersectionObserver.cjs +2 -1
  11. package/decorators/withIntersectionObserver.js +1 -0
  12. package/decorators/withMountWhenInView.cjs +1 -1
  13. package/decorators/withResponsiveOptions.cjs +2 -2
  14. package/decorators/withResponsiveOptions.js +1 -1
  15. package/decorators/withScrolledInView.cjs +13 -7
  16. package/decorators/withScrolledInView.js +12 -6
  17. package/decorators/withVue2.cjs +4 -4
  18. package/decorators/withVue2.js +3 -3
  19. package/index.cjs +1 -1
  20. package/package.json +1 -1
  21. package/Base/index.d.ts +0 -349
  22. package/Base/managers/AbstractManager.d.ts +0 -44
  23. package/Base/managers/ChildrenManager.d.ts +0 -41
  24. package/Base/managers/EventsManager.d.ts +0 -112
  25. package/Base/managers/OptionsManager.d.ts +0 -87
  26. package/Base/managers/RefsManager.d.ts +0 -32
  27. package/Base/managers/ResponsiveOptionsManager.d.ts +0 -26
  28. package/Base/managers/ServicesManager.d.ts +0 -109
  29. package/Base/utils.d.ts +0 -40
  30. package/decorators/index.d.ts +0 -10
  31. package/decorators/withBreakpointManager.d.ts +0 -10
  32. package/decorators/withBreakpointObserver.d.ts +0 -17
  33. package/decorators/withDrag.d.ts +0 -30
  34. package/decorators/withExtraConfig.d.ts +0 -18
  35. package/decorators/withFreezedOptions.d.ts +0 -14
  36. package/decorators/withIntersectionObserver.d.ts +0 -23
  37. package/decorators/withMountWhenInView.d.ts +0 -33
  38. package/decorators/withResponsiveOptions.d.ts +0 -8
  39. package/decorators/withScrolledInView.d.ts +0 -40
  40. package/decorators/withVue2.d.ts +0 -7
  41. package/helpers/createApp.d.ts +0 -14
  42. package/helpers/getDirectChildren.d.ts +0 -31
  43. package/helpers/getInstanceFromElement.d.ts +0 -14
  44. package/helpers/importOnInteraction.d.ts +0 -23
  45. package/helpers/importWhenIdle.d.ts +0 -21
  46. package/helpers/importWhenVisible.d.ts +0 -23
  47. package/helpers/index.d.ts +0 -6
  48. package/helpers/utils.d.ts +0 -10
  49. package/index.d.ts +0 -5
package/Base/index.d.ts DELETED
@@ -1,349 +0,0 @@
1
- /**
2
- * @typedef {typeof Base} BaseConstructor
3
- * @typedef {(Base) => Promise<BaseConstructor | { default: BaseConstructor }>} BaseAsyncConstructor
4
- * @typedef {{ [name:string]: any }} BaseOptions
5
- * @typedef {{ [name:string]: HTMLElement | HTMLElement[] }} BaseRefs
6
- * @typedef {{ [nameOrSelector:string]: Base[] | Promise<Base>[] }} BaseChildren
7
- * @typedef {{ [nameOrSelector:string]: BaseConstructor | BaseAsyncConstructor }} BaseConfigComponents
8
- * @typedef {import('./managers/OptionsManager').OptionsSchema} BaseConfigOptions
9
- * @typedef {import('./managers/ServicesManager.js').ServiceName} ServiceName
10
- */
11
- /**
12
- * @typedef {Object} BaseConfig
13
- * @property {string} name
14
- * @property {boolean} [debug]
15
- * @property {boolean} [log]
16
- * @property {string[]} [refs]
17
- * @property {string[]} [emits]
18
- * @property {BaseConfigComponents} [components]
19
- * @property {BaseConfigOptions} [options]
20
- */
21
- /**
22
- * @typedef {{
23
- * $el?: HTMLElement,
24
- * $options?: BaseOptions,
25
- * $refs?: BaseRefs,
26
- * $children?: { [name:string]: Base | Promise<Base> },
27
- * }} BaseTypeParameter
28
- */
29
- /**
30
- * @typedef {Object} Managers
31
- * @property {typeof ChildrenManager} ChildrenManager
32
- * @property {typeof EventsManager} EventsManager
33
- * @property {typeof OptionsManager} OptionsManager
34
- * @property {typeof RefsManager} RefsManager
35
- * @property {typeof ServicesManager} ServicesManager
36
- */
37
- /**
38
- * Base class.
39
- * @template {BaseTypeParameter} [BaseInterface={ $el: HTMLElement, $options: BaseOptions, $refs: BaseRefs, $children: { [name:string]: Base | Promise<Base> } }]
40
- */
41
- export default class Base<BaseInterface extends BaseTypeParameter = {
42
- $el: HTMLElement;
43
- $options: BaseOptions;
44
- $refs: BaseRefs;
45
- $children: {
46
- [name: string]: Base<any> | Promise<Base<any>>;
47
- };
48
- }> extends EventTarget {
49
- /**
50
- * This is a Base instance.
51
- * @type {boolean}
52
- * @readonly
53
- */
54
- static readonly $isBase: boolean;
55
- /**
56
- * @type {BaseConfig}
57
- */
58
- static config: BaseConfig;
59
- /**
60
- * Factory method to generate multiple instance of the class.
61
- *
62
- * @param {string} nameOrSelector The selector on which to mount each instance.
63
- * @returns {Array<Base>} A list of the created instance.
64
- */
65
- static $factory(nameOrSelector: string): Array<Base>;
66
- /**
67
- * Class constructor where all the magic takes place.
68
- *
69
- * @param {HTMLElement} element The component's root element dd.
70
- */
71
- constructor(element: HTMLElement);
72
- /**
73
- * The instance parent.
74
- * @type {Base}
75
- */
76
- $parent: Base;
77
- /**
78
- * The instance id.
79
- * @type {string}
80
- */
81
- $id: string;
82
- /**
83
- * The root element.
84
- * @type {BaseInterface['$el'] & HTMLElement & { __base__?: WeakMap<BaseConstructor, Base | 'terminated'> }}
85
- */
86
- $el: BaseInterface['$el'] & HTMLElement & {
87
- __base__?: WeakMap<BaseConstructor, Base | 'terminated'>;
88
- };
89
- /**
90
- * The state of the component.
91
- * @type {boolean}
92
- */
93
- $isMounted: boolean;
94
- /**
95
- * Store the event handlers.
96
- *
97
- * @private
98
- * @type {Map<string, Set<EventListenerOrEventListenerObject>>}
99
- */
100
- private __eventHandlers;
101
- /**
102
- * Get the root instance of the app.
103
- * @returns {Base}
104
- */
105
- get $root(): Base<{
106
- $el: HTMLElement;
107
- $options: BaseOptions;
108
- $refs: BaseRefs;
109
- $children: {
110
- [name: string]: Base<any> | Promise<Base<any>>;
111
- };
112
- }>;
113
- /**
114
- * Merge configuration with the parents' configurations.
115
- *
116
- * @returns {BaseConfig}
117
- * @private
118
- */
119
- private get __config();
120
- /**
121
- * @type {ServicesManager}
122
- * @private
123
- */
124
- private __services;
125
- /**
126
- * @type {ServicesManager}
127
- */
128
- get $services(): ServicesManager;
129
- /**
130
- * @type {RefsManager & { [key in keyof BaseInterface['$refs']]: BaseInterface['$refs'][key] } & BaseRefs}
131
- * @private
132
- */
133
- private __refs;
134
- /**
135
- * @returns {RefsManager & { [key in keyof BaseInterface['$refs']]: BaseInterface['$refs'][key] } & BaseRefs}
136
- */
137
- get $refs(): RefsManager & (BaseInterface["$refs"] extends infer T ? { [key in keyof T]: BaseInterface["$refs"][key]; } : never) & BaseRefs;
138
- /**
139
- * @type {OptionsManager & { [key in keyof BaseInterface['$options']]: BaseInterface['$options'][key] } & BaseOptions}
140
- * @private
141
- */
142
- private __options;
143
- /**
144
- * @returns {OptionsManager & { [key in keyof BaseInterface['$options']]: BaseInterface['$options'][key] } & BaseOptions}
145
- */
146
- get $options(): OptionsManager & (BaseInterface["$options"] extends infer T_1 ? { [key_1 in keyof T_1]: BaseInterface["$options"][key_1]; } : never) & BaseOptions;
147
- /**
148
- * @type {ChildrenManager & { [key in keyof BaseInterface['$children']]: Array<BaseInterface['$children'][key]> } & BaseChildren}
149
- * @private
150
- */
151
- private __children;
152
- /**
153
- * @returns {ChildrenManager & { [key in keyof BaseInterface['$children']]: Array<BaseInterface['$children'][key]> } & BaseChildren}
154
- */
155
- get $children(): ChildrenManager & (BaseInterface["$children"] extends infer T_2 ? { [key_2 in keyof T_2]: BaseInterface["$children"][key_2][]; } : never) & BaseChildren;
156
- /**
157
- * @type {EventsManager}
158
- * @private
159
- */
160
- private __events;
161
- /**
162
- * Small helper to log stuff.
163
- *
164
- * @returns {(...args: any) => void}
165
- */
166
- get $log(): (...args: any) => void;
167
- /**
168
- * Small helper to debug information.
169
- *
170
- * @private
171
- * @returns {(...args:any) => void}
172
- */
173
- private get __debug();
174
- /**
175
- * Get manager constructors.
176
- *
177
- * @returns {Managers}
178
- */
179
- get __managers(): Managers;
180
- /**
181
- * Call an instance method and emit corresponding events.
182
- *
183
- * @private
184
- * @param {string} method
185
- * @param {any[]} args
186
- * @returns {any}
187
- */
188
- private __callMethod;
189
- /**
190
- * Test if the given event has been bound to the instance.
191
- *
192
- * @private
193
- * @param {string} event The event's name.
194
- * @returns {boolean} Wether the given event has been bound or not.
195
- */
196
- private __hasEvent;
197
- /**
198
- * Trigger the `mounted` callback.
199
- * @returns {this}
200
- */
201
- $mount(): this;
202
- /**
203
- * Update the instance children.
204
- * @returns {this}
205
- */
206
- $update(): this;
207
- /**
208
- * Trigger the `destroyed` callback.
209
- * @returns {this}
210
- */
211
- $destroy(): this;
212
- /**
213
- * Terminate a child instance when it is not needed anymore.
214
- * @returns {void}
215
- */
216
- $terminate(): void;
217
- /**
218
- * Add an emitted event.
219
- *
220
- * @private
221
- * @param {string} event The event name.
222
- * @returns {void}
223
- */
224
- private __addEmits;
225
- /**
226
- * Remove an emitted event.
227
- *
228
- * @private
229
- * @param {string} event The event name.
230
- * @returns {void}
231
- */
232
- private __removeEmits;
233
- /**
234
- * Get the instance constructor.
235
- *
236
- * @private
237
- * @returns {BaseConstructor}
238
- */
239
- private get __ctor();
240
- /**
241
- * Bind a listener function to an event.
242
- *
243
- * @param {string} event
244
- * Name of the event.
245
- * @param {EventListenerOrEventListenerObject} listener
246
- * Function to be called.
247
- * @param {boolean|AddEventListenerOptions} [options]
248
- * Options for the `removeEventListener` method.
249
- * @returns {() => void}
250
- * A function to unbind the listener.
251
- */
252
- $on(event: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): () => void;
253
- /**
254
- * Unbind a listener function from an event.
255
- *
256
- * @param {string} event
257
- * Name of the event.
258
- * @param {EventListenerOrEventListenerObject} listener
259
- * Function to be removed.
260
- * @param {boolean|EventListenerOptions} [options]
261
- * Options for the `removeEventListener` method.
262
- * @returns {void}
263
- */
264
- $off(event: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
265
- /**
266
- * Emits an event.
267
- *
268
- * @param {string} event
269
- * Name of the event.
270
- * @param {any[]} args The arguments to apply to the functions bound to this event.
271
- * @returns {void}
272
- */
273
- $emit(event: string, ...args: any[]): void;
274
- }
275
- export type BaseConstructor = typeof Base;
276
- export type BaseAsyncConstructor = (Base: any) => Promise<BaseConstructor | {
277
- default: BaseConstructor;
278
- }>;
279
- export type BaseOptions = {
280
- [name: string]: any;
281
- };
282
- export type BaseRefs = {
283
- [name: string]: HTMLElement | HTMLElement[];
284
- };
285
- export type BaseChildren = {
286
- [nameOrSelector: string]: Base<{
287
- $el: HTMLElement;
288
- $options: BaseOptions;
289
- $refs: BaseRefs;
290
- $children: {
291
- [name: string]: Base<any> | Promise<Base<any>>;
292
- };
293
- }>[] | Promise<Base<{
294
- $el: HTMLElement;
295
- $options: BaseOptions;
296
- $refs: BaseRefs;
297
- $children: {
298
- [name: string]: Base<any> | Promise<Base<any>>;
299
- };
300
- }>>[];
301
- };
302
- export type BaseConfigComponents = {
303
- [nameOrSelector: string]: typeof Base | BaseAsyncConstructor;
304
- };
305
- export type BaseConfigOptions = import('./managers/OptionsManager').OptionsSchema;
306
- export type ServiceName = import('./managers/ServicesManager.js').ServiceName;
307
- export type BaseConfig = {
308
- name: string;
309
- debug?: boolean;
310
- log?: boolean;
311
- refs?: string[];
312
- emits?: string[];
313
- components?: BaseConfigComponents;
314
- options?: BaseConfigOptions;
315
- };
316
- export type BaseTypeParameter = {
317
- $el?: HTMLElement;
318
- $options?: BaseOptions;
319
- $refs?: BaseRefs;
320
- $children?: {
321
- [name: string]: Base<{
322
- $el: HTMLElement;
323
- $options: BaseOptions;
324
- $refs: BaseRefs;
325
- $children: {
326
- [name: string]: Base<any> | Promise<Base<any>>;
327
- };
328
- }> | Promise<Base<{
329
- $el: HTMLElement;
330
- $options: BaseOptions;
331
- $refs: BaseRefs;
332
- $children: {
333
- [name: string]: Base<any> | Promise<Base<any>>;
334
- };
335
- }>>;
336
- };
337
- };
338
- export type Managers = {
339
- ChildrenManager: typeof ChildrenManager;
340
- EventsManager: typeof EventsManager;
341
- OptionsManager: typeof OptionsManager;
342
- RefsManager: typeof RefsManager;
343
- ServicesManager: typeof ServicesManager;
344
- };
345
- import ServicesManager from "./managers/ServicesManager.js";
346
- import RefsManager from "./managers/RefsManager.js";
347
- import OptionsManager from "./managers/OptionsManager.js";
348
- import ChildrenManager from "./managers/ChildrenManager.js";
349
- import EventsManager from "./managers/EventsManager.js";
@@ -1,44 +0,0 @@
1
- /**
2
- * @typedef {import('../index.js').default} Base
3
- * @typedef {import('../index.js').BaseConfig} BaseConfig
4
- * @typedef {import('./EventsManager.js').default} EventsManager
5
- */
6
- /**
7
- * AbstractManager class.
8
- */
9
- export default class AbstractManager {
10
- /**
11
- * Class constructor.
12
- *
13
- * @param {Base} base
14
- */
15
- constructor(base: Base);
16
- /**
17
- * @type {Base}
18
- */
19
- __base: Base;
20
- /**
21
- * Get the base instance root element.
22
- * @returns {HTMLElement}
23
- */
24
- get __element(): HTMLElement;
25
- /**
26
- * Get the base instance config.
27
- * @returns {BaseConfig}
28
- */
29
- get __config(): import("../index.js").BaseConfig;
30
- /**
31
- * Get the events manager.
32
- * @returns {EventsManager}
33
- */
34
- get __eventsManager(): import("./EventsManager.js").default;
35
- /**
36
- * Prevent a list of properties from being enumerable and writable.
37
- * @param {string[]} properties
38
- * @returns {void}
39
- */
40
- __hideProperties(properties: string[]): void;
41
- }
42
- export type Base = import('../index.js').default;
43
- export type BaseConfig = import('../index.js').BaseConfig;
44
- export type EventsManager = import('./EventsManager.js').default;
@@ -1,41 +0,0 @@
1
- /**
2
- * Children manager.
3
- */
4
- export default class ChildrenManager extends AbstractManager {
5
- /**
6
- * Store async component promises to avoid calling them multiple times and
7
- * waiting for them when they are already resolved.
8
- *
9
- * @type {WeakMap<BaseAsyncConstructor, { promise: ReturnType<BaseAsyncConstructor>, status: 'pending'|'resolved', ctor?: BaseConstructor }>}
10
- */
11
- __asyncComponentPromises: WeakMap<BaseAsyncConstructor, {
12
- promise: ReturnType<BaseAsyncConstructor>;
13
- status: 'pending' | 'resolved';
14
- ctor?: BaseConstructor;
15
- }>;
16
- /**
17
- * @returns {string[]}
18
- */
19
- get registeredNames(): string[];
20
- /**
21
- * Register instances of all children components.
22
- */
23
- registerAll(): void;
24
- /**
25
- * Mount all child component instances.
26
- */
27
- mountAll(): void;
28
- /**
29
- * Update all child component instances.
30
- */
31
- updateAll(): void;
32
- /**
33
- * Destroy all child component instances.
34
- */
35
- destroyAll(): void;
36
- }
37
- export type Base = import('../index.js').default;
38
- export type BaseConstructor = import('../index.js').BaseConstructor;
39
- export type BaseAsyncConstructor = import('../index.js').BaseAsyncConstructor;
40
- export type BaseConfigComponents = import('../index.js').BaseConfigComponents;
41
- import AbstractManager from "./AbstractManager.js";
@@ -1,112 +0,0 @@
1
- /**
2
- * Normalize the given name to PascalCase, such as:
3
- *
4
- * ```
5
- * sentence case => SentenceCase
6
- * lowercase => Lowercase
7
- * UPPERCASE => Uppercase
8
- * kebab-case => KebabCase
9
- * snake_case => SnakeCase
10
- * camelCase => CamelCase
11
- * PascalCase => PascalCase
12
- * .class-selector => ClassSelector
13
- * .bem__selector => BemSelector
14
- * __id-selector => IdSelector
15
- * .complex[class^ ="__"] => ComplexClass
16
- * ```
17
- *
18
- * @param {string} name
19
- * @returns {string}
20
- */
21
- export function normalizeName(name: string): string;
22
- /**
23
- * Normalize the event names from PascalCase to kebab-case.
24
- *
25
- * @param {string} name
26
- * @returns {string}
27
- */
28
- export function normalizeEventName(name: string): string;
29
- /**
30
- * Event management class.
31
- * @todo Prevent binding of `onChildOrRefEvent` to the root element
32
- * @todo Use event delegation?
33
- */
34
- export default class EventsManager extends AbstractManager {
35
- /**
36
- * @type {WeakMap}
37
- */
38
- __methodsCache: WeakMap<any, any>;
39
- /**
40
- * Event listener object for the root element.
41
- *
42
- * @type {EventListenerObject}
43
- */
44
- __rootElementHandler: EventListenerObject;
45
- /**
46
- * Event listener object for the refs.
47
- *
48
- * @type {EventListenerObject}
49
- */
50
- __refsHandler: EventListenerObject;
51
- /**
52
- * Event listener object for the children.
53
- *
54
- * @type {EventListenerObject}
55
- */
56
- __childrenHandler: EventListenerObject;
57
- /**
58
- * Bind event methods to the given ref elements.
59
- *
60
- * @param {string} name
61
- * The name of the ref.
62
- * @param {HTMLElement[]} elements
63
- * The elements of the ref.
64
- * @returns {void}
65
- */
66
- bindRef(name: string, elements: HTMLElement[]): void;
67
- /**
68
- * Bind event methods to the given ref elements.
69
- *
70
- * @param {string} name
71
- * The name of the ref.
72
- * @param {HTMLElement[]} elements
73
- * The elements of the ref.
74
- * @returns {void}
75
- */
76
- unbindRef(name: string, elements: HTMLElement[]): void;
77
- /**
78
- * Bind event methods to the given child instance.
79
- *
80
- * @param {string} name
81
- * The name of the ref.
82
- * @param {Base} instance
83
- * A base instance.
84
- * @returns {void}
85
- */
86
- bindChild(name: string, instance: Base): void;
87
- /**
88
- * Unbind event methods to the given child instance.
89
- *
90
- * @param {string} name
91
- * The name of the ref.
92
- * @param {Base} instance
93
- * A base instance.
94
- * @returns {void}
95
- */
96
- unbindChild(name: string, instance: Base): void;
97
- /**
98
- * Bind event methods on the root element.
99
- *
100
- * @returns {void}
101
- */
102
- bindRootElement(): void;
103
- /**
104
- * Unbind event method from the root element.
105
- *
106
- * @returns {void}
107
- */
108
- unbindRootElement(): void;
109
- }
110
- export type Base = import('../index.js').default;
111
- export type ChildrenManager = import('./ChildrenManager.js').default;
112
- import AbstractManager from "./AbstractManager.js";
@@ -1,87 +0,0 @@
1
- /**
2
- * Get a property name.
3
- *
4
- * @param {string} name
5
- * @param {string} [prefix]
6
- * @returns {string}
7
- * @protected
8
- */
9
- export function __getPropertyName(name: string, prefix?: string): string;
10
- /**
11
- * Class options to manage options as data attributes on an HTML element.
12
- *
13
- * @todo Use `MutationObserver` to update values? Might be more performant.
14
- */
15
- export default class OptionsManager extends AbstractManager {
16
- /**
17
- * An object to store Array and Object values for reference.
18
- * @type {Object}
19
- * @private
20
- */
21
- private __values;
22
- /**
23
- * Default value for the name property.
24
- * @type {string}
25
- */
26
- name: string;
27
- /**
28
- * Default value for the debug property.
29
- * @type {boolean}
30
- */
31
- debug: boolean;
32
- /**
33
- * Default value for the log property.
34
- * @type {boolean}
35
- */
36
- log: boolean;
37
- /**
38
- * Get an option value.
39
- *
40
- * @param {string} name The option name.
41
- * @param {OptionObject} config The option config.
42
- * @returns {any}
43
- */
44
- get(name: string, config: OptionObject): any;
45
- /**
46
- * Set an option value.
47
- *
48
- * @param {string} name The option name.
49
- * @param {any} value The new value for this option.
50
- * @param {OptionObject} config The option config.
51
- */
52
- set(name: string, value: any, config: OptionObject): void;
53
- }
54
- export type DeepmergeOptions = import('deepmerge').Options;
55
- export type Base = import('../index.js').default;
56
- export type BaseConfig = import('../index.js').BaseConfig;
57
- export type OptionType = StringConstructor | NumberConstructor | BooleanConstructor | ArrayConstructor | ObjectConstructor;
58
- export type ArrayOption = {
59
- type: ArrayConstructor;
60
- default?: () => any[];
61
- merge?: boolean;
62
- };
63
- export type ObjectOption = {
64
- type: ObjectConstructor;
65
- default?: () => any;
66
- merge?: boolean;
67
- };
68
- export type StringOption = {
69
- type: StringConstructor;
70
- default?: string;
71
- };
72
- export type NumberOption = {
73
- type: NumberConstructor;
74
- default?: number;
75
- };
76
- export type BooleanOption = {
77
- type: BooleanConstructor;
78
- default?: boolean;
79
- };
80
- export type OptionObject = ArrayOption | ObjectOption | StringOption | NumberOption | BooleanOption;
81
- export type OptionsSchema = {
82
- [name: string]: OptionObject | OptionType;
83
- };
84
- export type OptionsInterface = {
85
- [optionName: string]: any;
86
- };
87
- import AbstractManager from "./AbstractManager.js";
@@ -1,32 +0,0 @@
1
- /**
2
- * Normalize the name of ref.
3
- *
4
- * @param {string} name The original name.
5
- * @returns {string} The normalized name.
6
- */
7
- export function normalizeRefName(name: string): string;
8
- /**
9
- * Refs Manager
10
- *
11
- * @todo Use `MutationObserver` to automatically update refs?
12
- */
13
- export default class RefsManager extends AbstractManager {
14
- /**
15
- * Get refs configuration.
16
- * @returns {string[]}
17
- */
18
- get __refs(): string[];
19
- /**
20
- * Register all refs.
21
- *
22
- * @returns {void}
23
- */
24
- registerAll(): void;
25
- /**
26
- * Unregister all refs.
27
- *
28
- * @returns {void}
29
- */
30
- unregisterAll(): void;
31
- }
32
- import AbstractManager from "./AbstractManager.js";
@@ -1,26 +0,0 @@
1
- /**
2
- * Class options to manage options as data attributes on an HTML element.
3
- */
4
- export default class ResponsiveOptionsManager extends OptionsManager {
5
- /**
6
- * Get an option value.
7
- *
8
- * @param {string} name The option name.
9
- * @param {ResponsiveOptionObject} config The option configuration.
10
- * @returns {any}
11
- */
12
- get(name: string, config: ResponsiveOptionObject): any;
13
- /**
14
- * Set an option value.
15
- *
16
- * @param {string} name The option name.
17
- * @param {any} value The new value.
18
- * @param {ResponsiveOptionObject} config The option configuration.
19
- */
20
- set(name: string, value: any, config: ResponsiveOptionObject): void;
21
- }
22
- export type OptionObject = import('./OptionsManager.js').OptionObject;
23
- export type ResponsiveOptionObject = OptionObject & {
24
- responsive?: boolean;
25
- };
26
- import OptionsManager from "./OptionsManager.js";