@vizejs/composable 0.345.0 → 0.350.2

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 (42) hide show
  1. package/dist/abort-signal.d.mts +96 -0
  2. package/dist/abort-signal.mjs +203 -0
  3. package/dist/async-resource.d.mts +97 -0
  4. package/dist/async-resource.mjs +99 -0
  5. package/dist/capability-Ptkjr_sD.d.mts +93 -0
  6. package/dist/capability.d.mts +2 -0
  7. package/dist/capability.mjs +37 -0
  8. package/dist/catalog-BQMC1CcY.d.mts +506 -0
  9. package/dist/catalog-CYHr82Jz.mjs +529 -0
  10. package/dist/catalog.d.mts +2 -0
  11. package/dist/catalog.mjs +2 -0
  12. package/dist/disposal-scope.d.mts +93 -0
  13. package/dist/disposal-scope.mjs +119 -0
  14. package/dist/event-listener.d.mts +85 -0
  15. package/dist/event-listener.mjs +55 -0
  16. package/dist/index.d.mts +19 -786
  17. package/dist/index.mjs +19 -751
  18. package/dist/locale.d.mts +65 -0
  19. package/dist/locale.mjs +72 -0
  20. package/dist/media-query.d.mts +56 -0
  21. package/dist/media-query.mjs +56 -0
  22. package/dist/retry-async.d.mts +91 -0
  23. package/dist/retry-async.mjs +136 -0
  24. package/dist/retry-delay.d.mts +73 -0
  25. package/dist/retry-delay.mjs +50 -0
  26. package/dist/scope.d.mts +18 -0
  27. package/dist/scope.mjs +23 -0
  28. package/dist/timeout-scheduler.d.mts +18 -0
  29. package/dist/timeout-scheduler.mjs +1 -0
  30. package/dist/use-counter.d.mts +91 -0
  31. package/dist/use-counter.mjs +67 -0
  32. package/dist/use-debounced.d.mts +87 -0
  33. package/dist/use-debounced.mjs +98 -0
  34. package/dist/use-history.d.mts +105 -0
  35. package/dist/use-history.mjs +137 -0
  36. package/dist/use-previous.d.mts +43 -0
  37. package/dist/use-previous.mjs +11 -0
  38. package/dist/use-throttled.d.mts +107 -0
  39. package/dist/use-throttled.mjs +124 -0
  40. package/dist/use-toggle.d.mts +45 -0
  41. package/dist/use-toggle.mjs +34 -0
  42. package/package.json +92 -2
@@ -0,0 +1,529 @@
1
+ //#region src/catalog-entries.ts
2
+ /** Canonical runtime target ordering used by the catalog. */
3
+ const allTargets = [
4
+ "web",
5
+ "server",
6
+ "worker",
7
+ "native",
8
+ "desktop",
9
+ "terminal"
10
+ ];
11
+ /** Aggregate entry policy, including intentionally isolated subpaths. */
12
+ const rootEntry = {
13
+ subpath: ".",
14
+ source: "src/index.ts",
15
+ gzipBudget: "sum-of-reexported-entry-budgets",
16
+ reexportedEntries: [
17
+ "./abort-signal",
18
+ "./async-resource",
19
+ "./capability",
20
+ "./catalog",
21
+ "./disposal-scope",
22
+ "./event-listener",
23
+ "./locale",
24
+ "./media-query",
25
+ "./retry-async",
26
+ "./retry-delay",
27
+ "./scope",
28
+ "./timeout-scheduler",
29
+ "./use-counter",
30
+ "./use-debounced",
31
+ "./use-history",
32
+ "./use-previous",
33
+ "./use-throttled",
34
+ "./use-toggle"
35
+ ],
36
+ isolatedEntries: ["./temporal"]
37
+ };
38
+ /** Independently importable entries in package export-map order. */
39
+ const entries = [
40
+ {
41
+ subpath: "./abort-signal",
42
+ source: "src/abort-signal.ts",
43
+ gzipBudgetBytes: 3 * 1024,
44
+ runtimeExports: [
45
+ "anyAbortSignal",
46
+ "timeoutAbortSignal",
47
+ "deadlineAbortSignal"
48
+ ],
49
+ utilities: [
50
+ "anyAbortSignal",
51
+ "timeoutAbortSignal",
52
+ "deadlineAbortSignal"
53
+ ]
54
+ },
55
+ {
56
+ subpath: "./async-resource",
57
+ source: "src/async-resource.ts",
58
+ gzipBudgetBytes: 2 * 1024,
59
+ runtimeExports: ["useAsyncResource"],
60
+ utilities: ["useAsyncResource"]
61
+ },
62
+ {
63
+ subpath: "./capability",
64
+ source: "src/capability.ts",
65
+ gzipBudgetBytes: 1024,
66
+ runtimeExports: [
67
+ "availableCapability",
68
+ "unavailableCapability",
69
+ "isCapabilityAvailable",
70
+ "isCapabilityUnavailable"
71
+ ],
72
+ utilities: [
73
+ "availableCapability",
74
+ "unavailableCapability",
75
+ "isCapabilityAvailable",
76
+ "isCapabilityUnavailable"
77
+ ]
78
+ },
79
+ {
80
+ subpath: "./catalog",
81
+ source: "src/catalog.ts",
82
+ gzipBudgetBytes: 4 * 1024,
83
+ runtimeExports: ["COMPOSABLE_CATALOG"],
84
+ utilities: []
85
+ },
86
+ {
87
+ subpath: "./disposal-scope",
88
+ source: "src/disposal-scope.ts",
89
+ gzipBudgetBytes: 2 * 1024,
90
+ runtimeExports: [
91
+ "DISPOSAL_ERROR_CODE",
92
+ "DisposalError",
93
+ "createDisposalScope"
94
+ ],
95
+ utilities: ["createDisposalScope"]
96
+ },
97
+ {
98
+ subpath: "./event-listener",
99
+ source: "src/event-listener.ts",
100
+ gzipBudgetBytes: 2 * 1024,
101
+ runtimeExports: ["useEventListener"],
102
+ utilities: ["useEventListener"]
103
+ },
104
+ {
105
+ subpath: "./locale",
106
+ source: "src/locale.ts",
107
+ gzipBudgetBytes: 2 * 1024,
108
+ runtimeExports: ["useLocale"],
109
+ utilities: ["useLocale"]
110
+ },
111
+ {
112
+ subpath: "./media-query",
113
+ source: "src/media-query.ts",
114
+ gzipBudgetBytes: 1024,
115
+ runtimeExports: ["useMediaQuery", "useReducedMotion"],
116
+ utilities: ["useMediaQuery", "useReducedMotion"]
117
+ },
118
+ {
119
+ subpath: "./retry-async",
120
+ source: "src/retry-async.ts",
121
+ gzipBudgetBytes: 5.5 * 1024,
122
+ runtimeExports: ["retryAsync"],
123
+ utilities: ["retryAsync"]
124
+ },
125
+ {
126
+ subpath: "./retry-delay",
127
+ source: "src/retry-delay.ts",
128
+ gzipBudgetBytes: 1.5 * 1024,
129
+ runtimeExports: ["calculateRetryDelay"],
130
+ utilities: ["calculateRetryDelay"]
131
+ },
132
+ {
133
+ subpath: "./scope",
134
+ source: "src/scope.ts",
135
+ gzipBudgetBytes: .5 * 1024,
136
+ runtimeExports: ["tryOnScopeDispose"],
137
+ utilities: ["tryOnScopeDispose"]
138
+ },
139
+ {
140
+ subpath: "./temporal",
141
+ source: "src/temporal.ts",
142
+ gzipBudgetBytes: 2 * 1024,
143
+ runtimeExports: [
144
+ "Temporal",
145
+ "TemporalIntl",
146
+ "useTemporalNow",
147
+ "useTemporalZonedDateTime"
148
+ ],
149
+ utilities: ["useTemporalNow", "useTemporalZonedDateTime"]
150
+ },
151
+ {
152
+ subpath: "./timeout-scheduler",
153
+ source: "src/timeout-scheduler.ts",
154
+ gzipBudgetBytes: .25 * 1024,
155
+ runtimeExports: [],
156
+ utilities: []
157
+ },
158
+ {
159
+ subpath: "./use-counter",
160
+ source: "src/use-counter.ts",
161
+ gzipBudgetBytes: 1.5 * 1024,
162
+ runtimeExports: ["useCounter"],
163
+ utilities: ["useCounter"]
164
+ },
165
+ {
166
+ subpath: "./use-debounced",
167
+ source: "src/use-debounced.ts",
168
+ gzipBudgetBytes: 2 * 1024,
169
+ runtimeExports: ["useDebounced"],
170
+ utilities: ["useDebounced"]
171
+ },
172
+ {
173
+ subpath: "./use-history",
174
+ source: "src/use-history.ts",
175
+ gzipBudgetBytes: 2.5 * 1024,
176
+ runtimeExports: ["useHistory"],
177
+ utilities: ["useHistory"]
178
+ },
179
+ {
180
+ subpath: "./use-previous",
181
+ source: "src/use-previous.ts",
182
+ gzipBudgetBytes: 1024,
183
+ runtimeExports: ["usePrevious"],
184
+ utilities: ["usePrevious"]
185
+ },
186
+ {
187
+ subpath: "./use-throttled",
188
+ source: "src/use-throttled.ts",
189
+ gzipBudgetBytes: 2.5 * 1024,
190
+ runtimeExports: ["useThrottled"],
191
+ utilities: ["useThrottled"]
192
+ },
193
+ {
194
+ subpath: "./use-toggle",
195
+ source: "src/use-toggle.ts",
196
+ gzipBudgetBytes: .5 * 1024,
197
+ runtimeExports: ["useToggle"],
198
+ utilities: ["useToggle"]
199
+ }
200
+ ];
201
+ //#endregion
202
+ //#region src/catalog-utilities.ts
203
+ const reactiveTargets = allTargets;
204
+ const browserTargets = ["web", "desktop"];
205
+ //#endregion
206
+ //#region src/catalog.ts
207
+ /**
208
+ * Complete, serializable catalog of the package's public runtime surface.
209
+ *
210
+ * This value is the source of truth for export-map conformance and compressed
211
+ * size gates. It intentionally contains data only: importing the module reads
212
+ * no host globals, creates no subscriptions, and starts no work. Utilities
213
+ * remain marked experimental while the package is pre-1.0. Source-copy
214
+ * installation is reported as unavailable until a deterministic installer
215
+ * with update provenance exists.
216
+ */
217
+ const COMPOSABLE_CATALOG = {
218
+ schemaVersion: 1,
219
+ catalogStability: "stable",
220
+ packageName: "@vizejs/composable",
221
+ targets: allTargets,
222
+ packageInstallation: {
223
+ status: "available",
224
+ specifier: "@vizejs/composable"
225
+ },
226
+ sourceInstallation: {
227
+ status: "unavailable",
228
+ reason: "A provenance-preserving source-copy installer is not implemented."
229
+ },
230
+ rootEntry,
231
+ entries,
232
+ utilities: [
233
+ {
234
+ name: "anyAbortSignal",
235
+ entry: "./abort-signal",
236
+ category: "async",
237
+ stability: "experimental",
238
+ targets: allTargets,
239
+ ssr: "safe",
240
+ hydration: "not-applicable",
241
+ cleanupOwners: ["returned-value"],
242
+ runtimeGlobals: ["AbortController", "AbortSignal"],
243
+ dependencies: []
244
+ },
245
+ {
246
+ name: "timeoutAbortSignal",
247
+ entry: "./abort-signal",
248
+ category: "timing",
249
+ stability: "experimental",
250
+ targets: allTargets,
251
+ ssr: "safe",
252
+ hydration: "not-applicable",
253
+ cleanupOwners: ["returned-value"],
254
+ runtimeGlobals: [
255
+ "AbortController",
256
+ "AbortSignal",
257
+ "DOMException",
258
+ "globalThis"
259
+ ],
260
+ dependencies: ["anyAbortSignal"]
261
+ },
262
+ {
263
+ name: "deadlineAbortSignal",
264
+ entry: "./abort-signal",
265
+ category: "timing",
266
+ stability: "experimental",
267
+ targets: allTargets,
268
+ ssr: "safe",
269
+ hydration: "not-applicable",
270
+ cleanupOwners: ["returned-value"],
271
+ runtimeGlobals: [],
272
+ dependencies: ["timeoutAbortSignal"]
273
+ },
274
+ {
275
+ name: "useAsyncResource",
276
+ entry: "./async-resource",
277
+ category: "async",
278
+ stability: "experimental",
279
+ targets: reactiveTargets,
280
+ ssr: "safe",
281
+ hydration: "stable",
282
+ cleanupOwners: ["caller", "reactive-scope"],
283
+ runtimeGlobals: ["AbortController", "DOMException"],
284
+ dependencies: ["tryOnScopeDispose"]
285
+ },
286
+ {
287
+ name: "availableCapability",
288
+ entry: "./capability",
289
+ category: "capability",
290
+ stability: "experimental",
291
+ targets: allTargets,
292
+ ssr: "safe",
293
+ hydration: "not-applicable",
294
+ cleanupOwners: ["none"],
295
+ runtimeGlobals: [],
296
+ dependencies: []
297
+ },
298
+ {
299
+ name: "unavailableCapability",
300
+ entry: "./capability",
301
+ category: "capability",
302
+ stability: "experimental",
303
+ targets: allTargets,
304
+ ssr: "safe",
305
+ hydration: "not-applicable",
306
+ cleanupOwners: ["none"],
307
+ runtimeGlobals: [],
308
+ dependencies: []
309
+ },
310
+ {
311
+ name: "isCapabilityAvailable",
312
+ entry: "./capability",
313
+ category: "capability",
314
+ stability: "experimental",
315
+ targets: allTargets,
316
+ ssr: "safe",
317
+ hydration: "not-applicable",
318
+ cleanupOwners: ["none"],
319
+ runtimeGlobals: [],
320
+ dependencies: []
321
+ },
322
+ {
323
+ name: "isCapabilityUnavailable",
324
+ entry: "./capability",
325
+ category: "capability",
326
+ stability: "experimental",
327
+ targets: allTargets,
328
+ ssr: "safe",
329
+ hydration: "not-applicable",
330
+ cleanupOwners: ["none"],
331
+ runtimeGlobals: [],
332
+ dependencies: []
333
+ },
334
+ {
335
+ name: "createDisposalScope",
336
+ entry: "./disposal-scope",
337
+ category: "lifecycle",
338
+ stability: "experimental",
339
+ targets: reactiveTargets,
340
+ ssr: "safe",
341
+ hydration: "not-applicable",
342
+ cleanupOwners: ["caller", "reactive-scope"],
343
+ runtimeGlobals: [],
344
+ dependencies: ["tryOnScopeDispose"]
345
+ },
346
+ {
347
+ name: "useEventListener",
348
+ entry: "./event-listener",
349
+ category: "events",
350
+ stability: "experimental",
351
+ targets: reactiveTargets,
352
+ ssr: "safe",
353
+ hydration: "stable",
354
+ cleanupOwners: ["caller", "reactive-scope"],
355
+ runtimeGlobals: [],
356
+ dependencies: ["tryOnScopeDispose"]
357
+ },
358
+ {
359
+ name: "useLocale",
360
+ entry: "./locale",
361
+ category: "i18n",
362
+ stability: "experimental",
363
+ targets: reactiveTargets,
364
+ ssr: "deterministic-fallback",
365
+ hydration: "caller-managed",
366
+ cleanupOwners: ["none"],
367
+ runtimeGlobals: ["Intl", "navigator"],
368
+ dependencies: []
369
+ },
370
+ {
371
+ name: "useMediaQuery",
372
+ entry: "./media-query",
373
+ category: "media",
374
+ stability: "experimental",
375
+ targets: browserTargets,
376
+ ssr: "deterministic-fallback",
377
+ hydration: "caller-managed",
378
+ cleanupOwners: ["reactive-scope"],
379
+ runtimeGlobals: ["window"],
380
+ dependencies: []
381
+ },
382
+ {
383
+ name: "useReducedMotion",
384
+ entry: "./media-query",
385
+ category: "media",
386
+ stability: "experimental",
387
+ targets: browserTargets,
388
+ ssr: "deterministic-fallback",
389
+ hydration: "caller-managed",
390
+ cleanupOwners: ["reactive-scope"],
391
+ runtimeGlobals: ["window"],
392
+ dependencies: ["useMediaQuery"]
393
+ },
394
+ {
395
+ name: "retryAsync",
396
+ entry: "./retry-async",
397
+ category: "async",
398
+ stability: "experimental",
399
+ targets: allTargets,
400
+ ssr: "safe",
401
+ hydration: "not-applicable",
402
+ cleanupOwners: ["returned-value"],
403
+ runtimeGlobals: ["AbortController"],
404
+ dependencies: ["timeoutAbortSignal", "calculateRetryDelay"]
405
+ },
406
+ {
407
+ name: "calculateRetryDelay",
408
+ entry: "./retry-delay",
409
+ category: "timing",
410
+ stability: "experimental",
411
+ targets: allTargets,
412
+ ssr: "safe",
413
+ hydration: "not-applicable",
414
+ cleanupOwners: ["none"],
415
+ runtimeGlobals: [],
416
+ dependencies: []
417
+ },
418
+ {
419
+ name: "tryOnScopeDispose",
420
+ entry: "./scope",
421
+ category: "lifecycle",
422
+ stability: "experimental",
423
+ targets: reactiveTargets,
424
+ ssr: "safe",
425
+ hydration: "not-applicable",
426
+ cleanupOwners: ["reactive-scope"],
427
+ runtimeGlobals: [],
428
+ dependencies: []
429
+ },
430
+ {
431
+ name: "useTemporalNow",
432
+ entry: "./temporal",
433
+ category: "timing",
434
+ stability: "experimental",
435
+ targets: reactiveTargets,
436
+ ssr: "deterministic-fallback",
437
+ hydration: "caller-managed",
438
+ cleanupOwners: ["reactive-scope"],
439
+ runtimeGlobals: ["globalThis", "window"],
440
+ dependencies: []
441
+ },
442
+ {
443
+ name: "useTemporalZonedDateTime",
444
+ entry: "./temporal",
445
+ category: "timing",
446
+ stability: "experimental",
447
+ targets: reactiveTargets,
448
+ ssr: "deterministic-fallback",
449
+ hydration: "caller-managed",
450
+ cleanupOwners: ["reactive-scope"],
451
+ runtimeGlobals: ["globalThis", "window"],
452
+ dependencies: ["useTemporalNow"]
453
+ },
454
+ {
455
+ name: "useCounter",
456
+ entry: "./use-counter",
457
+ category: "state",
458
+ stability: "experimental",
459
+ targets: reactiveTargets,
460
+ ssr: "safe",
461
+ hydration: "stable",
462
+ cleanupOwners: ["none"],
463
+ runtimeGlobals: [],
464
+ dependencies: []
465
+ },
466
+ {
467
+ name: "useDebounced",
468
+ entry: "./use-debounced",
469
+ category: "timing",
470
+ stability: "experimental",
471
+ targets: reactiveTargets,
472
+ ssr: "deterministic-fallback",
473
+ hydration: "stable",
474
+ cleanupOwners: ["caller", "reactive-scope"],
475
+ runtimeGlobals: ["globalThis", "window"],
476
+ dependencies: ["tryOnScopeDispose"]
477
+ },
478
+ {
479
+ name: "useHistory",
480
+ entry: "./use-history",
481
+ category: "state",
482
+ stability: "experimental",
483
+ targets: reactiveTargets,
484
+ ssr: "safe",
485
+ hydration: "stable",
486
+ cleanupOwners: ["reactive-scope"],
487
+ runtimeGlobals: [],
488
+ dependencies: ["tryOnScopeDispose"]
489
+ },
490
+ {
491
+ name: "usePrevious",
492
+ entry: "./use-previous",
493
+ category: "state",
494
+ stability: "experimental",
495
+ targets: reactiveTargets,
496
+ ssr: "safe",
497
+ hydration: "stable",
498
+ cleanupOwners: ["none"],
499
+ runtimeGlobals: [],
500
+ dependencies: []
501
+ },
502
+ {
503
+ name: "useThrottled",
504
+ entry: "./use-throttled",
505
+ category: "timing",
506
+ stability: "experimental",
507
+ targets: reactiveTargets,
508
+ ssr: "deterministic-fallback",
509
+ hydration: "stable",
510
+ cleanupOwners: ["caller", "reactive-scope"],
511
+ runtimeGlobals: ["globalThis", "window"],
512
+ dependencies: ["tryOnScopeDispose"]
513
+ },
514
+ {
515
+ name: "useToggle",
516
+ entry: "./use-toggle",
517
+ category: "state",
518
+ stability: "experimental",
519
+ targets: reactiveTargets,
520
+ ssr: "safe",
521
+ hydration: "stable",
522
+ cleanupOwners: ["none"],
523
+ runtimeGlobals: [],
524
+ dependencies: []
525
+ }
526
+ ]
527
+ };
528
+ //#endregion
529
+ export { COMPOSABLE_CATALOG as t };
@@ -0,0 +1,2 @@
1
+ import { a as ComposableEntryMetadata, c as ComposableRootEntryMetadata, d as ComposableUtilityMetadata, i as ComposableCleanupOwner, l as ComposableSsrBehavior, n as ComposableCatalog, o as ComposableHydrationBehavior, r as ComposableCategory, s as ComposableInstallationAvailability, t as COMPOSABLE_CATALOG, u as ComposableStability } from "./catalog-BQMC1CcY.mjs";
2
+ export { COMPOSABLE_CATALOG, type ComposableCatalog, type ComposableCategory, type ComposableCleanupOwner, type ComposableEntryMetadata, type ComposableHydrationBehavior, type ComposableInstallationAvailability, type ComposableRootEntryMetadata, type ComposableSsrBehavior, type ComposableStability, type ComposableUtilityMetadata };
@@ -0,0 +1,2 @@
1
+ import { t as COMPOSABLE_CATALOG } from "./catalog-CYHr82Jz.mjs";
2
+ export { COMPOSABLE_CATALOG };
@@ -0,0 +1,93 @@
1
+ //#region src/disposal-scope.d.ts
2
+ /** Stable error code reported when one or more owned cleanups fail. */
3
+ declare const DISPOSAL_ERROR_CODE: "VIZE_COMPOSE_DISPOSAL_FAILED";
4
+ /** Aggregate failure produced after every owned cleanup has been attempted. */
5
+ declare class DisposalError extends AggregateError {
6
+ /** Stable machine-readable error code. */
7
+ readonly code: "VIZE_COMPOSE_DISPOSAL_FAILED";
8
+ /**
9
+ * Create an aggregate disposal failure.
10
+ *
11
+ * Nested {@link DisposalError} instances are flattened by the scope before
12
+ * construction, so `errors` contains the original cleanup failures in
13
+ * execution order.
14
+ *
15
+ * @param errors Cleanup failures in deterministic execution order.
16
+ */
17
+ constructor(errors: readonly unknown[]);
18
+ }
19
+ /** Handle for removing one cleanup from its owner before disposal. */
20
+ interface CleanupRegistration {
21
+ /** Whether this registration is still retained by its owner. */
22
+ readonly active: boolean;
23
+ /**
24
+ * Release the cleanup without running it.
25
+ *
26
+ * @returns Whether an active registration was removed.
27
+ */
28
+ readonly unregister: () => boolean;
29
+ }
30
+ /** Options for {@link createDisposalScope}. */
31
+ interface CreateDisposalScopeOptions {
32
+ /**
33
+ * Dispose the owner with the active Vue reactive scope when one exists.
34
+ * Outside a reactive scope, ownership remains entirely with the caller.
35
+ *
36
+ * @default true
37
+ */
38
+ readonly scope?: boolean;
39
+ }
40
+ /** Explicit owner for a deterministic group of cleanup operations. */
41
+ interface DisposalScope {
42
+ /** Whether disposal has started or completed. */
43
+ readonly disposed: boolean;
44
+ /** Number of active cleanup registrations currently retained. */
45
+ readonly size: number;
46
+ /**
47
+ * Register one cleanup.
48
+ *
49
+ * Active registrations run in last-in, first-out order. After disposal,
50
+ * registration runs the cleanup immediately and returns an inactive handle;
51
+ * a late failure is wrapped in {@link DisposalError}.
52
+ *
53
+ * @param cleanup Synchronous, idempotent resource cleanup.
54
+ * @returns A handle that can release the cleanup without running it.
55
+ * @throws {DisposalError} A late cleanup failed after the owner was disposed.
56
+ */
57
+ readonly add: <Cleanup extends () => unknown>(cleanup: [ReturnType<Cleanup>] extends [never] ? Cleanup : ReturnType<Cleanup> extends PromiseLike<unknown> ? never : Cleanup) => CleanupRegistration;
58
+ /**
59
+ * Create a child whose lifetime cannot outlive this owner.
60
+ *
61
+ * Disposing the child early unregisters it from the parent. Disposing the
62
+ * parent disposes the child in normal LIFO order.
63
+ *
64
+ * @returns A new child disposal scope.
65
+ */
66
+ readonly child: () => DisposalScope;
67
+ /**
68
+ * Run every active cleanup in last-in, first-out order exactly once.
69
+ *
70
+ * Reentrant and late registrations run immediately. All cleanups are
71
+ * attempted even when some fail. Repeated calls after successful or failed
72
+ * disposal do nothing.
73
+ *
74
+ * @throws {DisposalError} One or more cleanup operations failed.
75
+ */
76
+ readonly dispose: () => void;
77
+ }
78
+ /**
79
+ * Create an explicit, deterministic cleanup owner.
80
+ *
81
+ * The owner is runtime-neutral and performs no browser-global access. By
82
+ * default it joins an active Vue reactive scope; when no scope exists, or
83
+ * `scope` is disabled, the caller must invoke `dispose()`. Cleanups are
84
+ * synchronous by contract so disposal completes before the owner releases
85
+ * its records.
86
+ *
87
+ * @param options Reactive-scope ownership behavior.
88
+ * @default options {}
89
+ * @returns A disposal owner with child-lifetime support.
90
+ */
91
+ declare function createDisposalScope(options?: CreateDisposalScopeOptions): DisposalScope;
92
+ //#endregion
93
+ export { CleanupRegistration, CreateDisposalScopeOptions, DISPOSAL_ERROR_CODE, DisposalError, DisposalScope, createDisposalScope };