@vscode/markdown-editor 0.0.2-62 → 0.0.2-63

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 (52) hide show
  1. package/dist/index.d.ts +6 -6
  2. package/dist/index.js +1 -1
  3. package/dist/web-editors.d.ts +1 -1
  4. package/package.json +3 -7
  5. package/dist/_observables/assert.d.ts +0 -2
  6. package/dist/_observables/deps.d.ts +0 -28
  7. package/dist/_observables/disposables.d.ts +0 -19
  8. package/dist/_observables/equals.d.ts +0 -32
  9. package/dist/_observables/index.d.ts +0 -2
  10. package/dist/_observables/observableInternal/base.d.ts +0 -172
  11. package/dist/_observables/observableInternal/changeTracker.d.ts +0 -44
  12. package/dist/_observables/observableInternal/commonFacade/cancellation.d.ts +0 -24
  13. package/dist/_observables/observableInternal/commonFacade/deps.d.ts +0 -24
  14. package/dist/_observables/observableInternal/debugLocation.d.ts +0 -21
  15. package/dist/_observables/observableInternal/debugName.d.ts +0 -33
  16. package/dist/_observables/observableInternal/experimental/deferUnobserve.d.ts +0 -16
  17. package/dist/_observables/observableInternal/experimental/reducer.d.ts +0 -37
  18. package/dist/_observables/observableInternal/experimental/utils.d.ts +0 -15
  19. package/dist/_observables/observableInternal/index.d.ts +0 -25
  20. package/dist/_observables/observableInternal/logging/consoleObservableLogger.d.ts +0 -40
  21. package/dist/_observables/observableInternal/logging/debugGetDependencyGraph.d.ts +0 -4
  22. package/dist/_observables/observableInternal/logging/debugger/debuggerRpc.d.ts +0 -4
  23. package/dist/_observables/observableInternal/logging/debugger/devToolsLogger.d.ts +0 -43
  24. package/dist/_observables/observableInternal/logging/debugger/rpc.d.ts +0 -41
  25. package/dist/_observables/observableInternal/logging/debugger/utils.d.ts +0 -13
  26. package/dist/_observables/observableInternal/logging/logging.d.ts +0 -30
  27. package/dist/_observables/observableInternal/map.d.ts +0 -18
  28. package/dist/_observables/observableInternal/observables/baseObservable.d.ts +0 -58
  29. package/dist/_observables/observableInternal/observables/constObservable.d.ts +0 -5
  30. package/dist/_observables/observableInternal/observables/derived.d.ts +0 -46
  31. package/dist/_observables/observableInternal/observables/derivedImpl.d.ts +0 -83
  32. package/dist/_observables/observableInternal/observables/lazyObservableValue.d.ts +0 -27
  33. package/dist/_observables/observableInternal/observables/observableFromEvent.d.ts +0 -37
  34. package/dist/_observables/observableInternal/observables/observableSignal.d.ts +0 -11
  35. package/dist/_observables/observableInternal/observables/observableSignalFromEvent.d.ts +0 -5
  36. package/dist/_observables/observableInternal/observables/observableValue.d.ts +0 -37
  37. package/dist/_observables/observableInternal/observables/observableValueOpts.d.ts +0 -8
  38. package/dist/_observables/observableInternal/reactions/createEffect.d.ts +0 -64
  39. package/dist/_observables/observableInternal/reactions/createEffectImpl.d.ts +0 -53
  40. package/dist/_observables/observableInternal/set.d.ts +0 -17
  41. package/dist/_observables/observableInternal/transaction.d.ts +0 -27
  42. package/dist/_observables/observableInternal/utils/promise.d.ts +0 -75
  43. package/dist/_observables/observableInternal/utils/runOnChange.d.ts +0 -7
  44. package/dist/_observables/observableInternal/utils/utils.d.ts +0 -43
  45. package/dist/_observables/observableInternal/utils/utilsCancellation.d.ts +0 -10
  46. package/dist/_observables/observableInternal/utils/valueWithChangeEvent.d.ts +0 -10
  47. package/dist/_observables/utils.d.ts +0 -15
  48. package/dist/observables.d.ts +0 -4
  49. package/dist/observables.js +0 -441
  50. package/dist/observables.js.map +0 -1
  51. package/dist/runOnChange-e7FtCqOQ.js +0 -1542
  52. package/dist/runOnChange-e7FtCqOQ.js.map +0 -1
@@ -1,75 +0,0 @@
1
- import { IObservable } from '../base';
2
- export declare class ObservableLazy<T> {
3
- private readonly _computeValue;
4
- private readonly _value;
5
- /**
6
- * The cached value.
7
- * Does not force a computation of the value.
8
- */
9
- get cachedValue(): IObservable<T | undefined>;
10
- constructor(_computeValue: () => T);
11
- /**
12
- * Returns the cached value.
13
- * Computes the value if the value has not been cached yet.
14
- */
15
- getValue(): T;
16
- }
17
- /**
18
- * A promise whose state is observable.
19
- */
20
- export declare class ObservablePromise<T> {
21
- static fromFn<T>(fn: () => Promise<T>): ObservablePromise<T>;
22
- private readonly _value;
23
- /**
24
- * The promise that this object wraps.
25
- */
26
- readonly promise: Promise<T>;
27
- /**
28
- * The current state of the promise.
29
- * Is `undefined` if the promise didn't resolve yet.
30
- */
31
- readonly promiseResult: IObservable<PromiseResult<T> | undefined>;
32
- constructor(promise: Promise<T>);
33
- readonly resolvedValue: import("..").IObservableWithChange<T | undefined, void>;
34
- }
35
- export declare class PromiseResult<T> {
36
- /**
37
- * The value of the resolved promise.
38
- * Undefined if the promise rejected.
39
- */
40
- readonly data: T | undefined;
41
- /**
42
- * The error in case of a rejected promise.
43
- * Undefined if the promise resolved.
44
- */
45
- readonly error: unknown | undefined;
46
- constructor(
47
- /**
48
- * The value of the resolved promise.
49
- * Undefined if the promise rejected.
50
- */
51
- data: T | undefined,
52
- /**
53
- * The error in case of a rejected promise.
54
- * Undefined if the promise resolved.
55
- */
56
- error: unknown | undefined);
57
- /**
58
- * Returns the value if the promise resolved, otherwise throws the error.
59
- */
60
- getDataOrThrow(): T;
61
- }
62
- /**
63
- * A lazy promise whose state is observable.
64
- */
65
- export declare class ObservableLazyPromise<T> {
66
- private readonly _computePromise;
67
- private readonly _lazyValue;
68
- /**
69
- * Does not enforce evaluation of the promise compute function.
70
- * Is undefined if the promise has not been computed yet.
71
- */
72
- readonly cachedPromiseResult: import("..").IObservableWithChange<PromiseResult<T> | undefined, void>;
73
- constructor(_computePromise: () => Promise<T>);
74
- getPromise(): Promise<T>;
75
- }
@@ -1,7 +0,0 @@
1
- import { IObservableWithChange } from '../base';
2
- import { CancellationToken } from '../commonFacade/cancellation';
3
- import { DisposableStore, IDisposable } from '../commonFacade/deps';
4
- export type RemoveUndefined<T> = T extends undefined ? never : T;
5
- export declare function runOnChange<T, TChange>(observable: IObservableWithChange<T, TChange>, cb: (value: T, previousValue: T, deltas: RemoveUndefined<TChange>[]) => void): IDisposable;
6
- export declare function runOnChangeWithStore<T, TChange>(observable: IObservableWithChange<T, TChange>, cb: (value: T, previousValue: T, deltas: RemoveUndefined<TChange>[], store: DisposableStore) => void): IDisposable;
7
- export declare function runOnChangeWithCancellationToken<T, TChange>(observable: IObservableWithChange<T, TChange>, cb: (value: T, previousValue: T, deltas: RemoveUndefined<TChange>[], token: CancellationToken) => Promise<void>): IDisposable;
@@ -1,43 +0,0 @@
1
- import { IObservable, IObservableWithChange, IObserver, IReader, ITransaction } from '../base';
2
- import { DebugOwner } from '../debugName';
3
- import { DisposableStore, Event, IDisposable } from '../commonFacade/deps';
4
- export declare function observableFromPromise<T>(promise: Promise<T>): IObservable<{
5
- value?: T;
6
- }>;
7
- export declare function signalFromObservable<T>(owner: DebugOwner | undefined, observable: IObservable<T>): IObservable<void>;
8
- /**
9
- * @deprecated Use `debouncedObservable` instead.
10
- */
11
- export declare function debouncedObservableDeprecated<T>(observable: IObservable<T>, debounceMs: number, disposableStore: DisposableStore): IObservable<T | undefined>;
12
- /**
13
- * Creates an observable that debounces the input observable.
14
- */
15
- export declare function debouncedObservable<T>(observable: IObservable<T>, debounceMs: number): IObservable<T>;
16
- export declare function wasEventTriggeredRecently(event: Event<any>, timeoutMs: number, disposableStore: DisposableStore): IObservable<boolean>;
17
- /**
18
- * This makes sure the observable is being observed and keeps its cache alive.
19
- */
20
- export declare function keepObserved<T>(observable: IObservable<T>): IDisposable;
21
- /**
22
- * This converts the given observable into an autorun.
23
- */
24
- export declare function recomputeInitiallyAndOnChange<T>(observable: IObservable<T>, handleValue?: (value: T) => void): IDisposable;
25
- export declare class KeepAliveObserver implements IObserver {
26
- private readonly _forceRecompute;
27
- private readonly _handleValue;
28
- private _counter;
29
- constructor(_forceRecompute: boolean, _handleValue: ((value: any) => void) | undefined);
30
- beginUpdate<T>(observable: IObservable<T>): void;
31
- endUpdate<T>(observable: IObservable<T>): void;
32
- handlePossibleChange<T>(observable: IObservable<T>): void;
33
- handleChange<T, TChange>(observable: IObservableWithChange<T, TChange>, change: TChange): void;
34
- }
35
- export declare function derivedObservableWithCache<T>(owner: DebugOwner, computeFn: (reader: IReader, lastValue: T | undefined) => T): IObservable<T>;
36
- export declare function derivedObservableWithWritableCache<T>(owner: object, computeFn: (reader: IReader, lastValue: T | undefined) => T): IObservable<T> & {
37
- clearCache(transaction: ITransaction): void;
38
- setCache(newValue: T | undefined, tx: ITransaction | undefined): void;
39
- };
40
- /**
41
- * When the items array changes, referential equal items are not mapped again.
42
- */
43
- export declare function mapObservableArrayCached<TIn, TOut, TKey = TIn>(owner: DebugOwner, items: IObservable<readonly TIn[]>, map: (input: TIn, store: DisposableStore) => TOut, keySelector?: (input: TIn) => TKey): IObservable<readonly TOut[]>;
@@ -1,10 +0,0 @@
1
- import { IReader, IObservable } from '../base';
2
- import { CancellationToken } from '../commonFacade/cancellation';
3
- /**
4
- * Resolves the promise when the observables state matches the predicate.
5
- */
6
- export declare function waitForState<T>(observable: IObservable<T | null | undefined>): Promise<T>;
7
- export declare function waitForState<T, TState extends T>(observable: IObservable<T>, predicate: (state: T) => state is TState, isError?: (state: T) => boolean | unknown | undefined, cancellationToken?: CancellationToken): Promise<TState>;
8
- export declare function waitForState<T>(observable: IObservable<T>, predicate: (state: T) => boolean, isError?: (state: T) => boolean | unknown | undefined, cancellationToken?: CancellationToken): Promise<T>;
9
- export declare function derivedWithCancellationToken<T>(computeFn: (reader: IReader, cancellationToken: CancellationToken) => T): IObservable<T>;
10
- export declare function derivedWithCancellationToken<T>(owner: object, computeFn: (reader: IReader, cancellationToken: CancellationToken) => T): IObservable<T>;
@@ -1,10 +0,0 @@
1
- import { IObservable } from '../base';
2
- import { Event, IValueWithChangeEvent } from '../commonFacade/deps';
3
- import { DebugOwner } from '../debugName';
4
- export declare class ValueWithChangeEventFromObservable<T> implements IValueWithChangeEvent<T> {
5
- readonly observable: IObservable<T>;
6
- constructor(observable: IObservable<T>);
7
- get onDidChange(): Event<void>;
8
- get value(): T;
9
- }
10
- export declare function observableFromValueWithChangeEvent<T>(owner: DebugOwner, value: IValueWithChangeEvent<T>): IObservable<T>;
@@ -1,15 +0,0 @@
1
- import { IDisposable } from "./disposables";
2
- import { IObservableWithChange } from "./observableInternal/index";
3
- type ObservableResult<T> = T extends IObservableWithChange<infer U, any> ? U : never;
4
- type ObservableArrayToChangesData<T extends Record<string, IObservableWithChange<any, any>>> = {
5
- [Key in keyof T]: {
6
- value: ObservableResult<T[Key]>;
7
- changes: T[Key]['TChange'][];
8
- /**
9
- * The value of the observable before the changes. `undefined` if
10
- */
11
- previous: ObservableResult<T[Key]> | undefined;
12
- };
13
- };
14
- export declare function autorunWithChanges<T extends Record<string, IObservableWithChange<any, any>>>(owner: object, observables: T, handler: (data: ObservableArrayToChangesData<T>) => void): IDisposable;
15
- export {};
@@ -1,4 +0,0 @@
1
-
2
- export * from "./_observables/index";
3
-
4
- export { }
@@ -1,441 +0,0 @@
1
- import { B as w, T as F, g as C, D as u, s as c, O as T, a as v, o as V, d as _, t as g, b as k, c as S, C as y, e as z, f, h as D, i as W, j as N, k as P, l as R, m as q } from "./runOnChange-e7FtCqOQ.js";
2
- import { n as re, p as ne, q as ie, r as de, u as oe, v as ue, w as he, x as le, y as fe, z as be, A as ce, E as ge, F as ve, G as _e, H as pe, I as me, J as Ce, K as ye, L as Oe, M as we, N as Ve, P as Se, Q as De, R as Ue, S as Ee, U as Fe, V as Te, W as ke, X as ze, Y as We, Z as Ne, _ as Pe } from "./runOnChange-e7FtCqOQ.js";
3
- class L extends w {
4
- get debugName() {
5
- return this._debugNameData.getDebugName(this) ?? "LazyObservableValue";
6
- }
7
- constructor(e, t, s, r) {
8
- super(r), this._debugNameData = e, this._equalityComparator = s, this._isUpToDate = !0, this._deltas = [], this._updateCounter = 0, this._value = t;
9
- }
10
- get() {
11
- return this._update(), this._value;
12
- }
13
- _update() {
14
- if (!this._isUpToDate)
15
- if (this._isUpToDate = !0, this._deltas.length > 0) {
16
- for (const e of this._deltas) {
17
- C()?.handleObservableUpdated(this, { change: e, didChange: !0, oldValue: "(unknown)", newValue: this._value, hadValue: !0 });
18
- for (const t of this._observers)
19
- t.handleChange(this, e);
20
- }
21
- this._deltas.length = 0;
22
- } else {
23
- C()?.handleObservableUpdated(this, { change: void 0, didChange: !0, oldValue: "(unknown)", newValue: this._value, hadValue: !0 });
24
- for (const e of this._observers)
25
- e.handleChange(this, void 0);
26
- }
27
- }
28
- _beginUpdate() {
29
- if (this._updateCounter++, this._updateCounter === 1)
30
- for (const e of this._observers)
31
- e.beginUpdate(this);
32
- }
33
- _endUpdate() {
34
- if (this._updateCounter--, this._updateCounter === 0) {
35
- this._update();
36
- const e = [...this._observers];
37
- for (const t of e)
38
- t.endUpdate(this);
39
- }
40
- }
41
- addObserver(e) {
42
- const t = !this._observers.has(e) && this._updateCounter > 0;
43
- super.addObserver(e), t && e.beginUpdate(this);
44
- }
45
- removeObserver(e) {
46
- const t = this._observers.has(e) && this._updateCounter > 0;
47
- super.removeObserver(e), t && e.endUpdate(this);
48
- }
49
- set(e, t, s) {
50
- if (s === void 0 && this._equalityComparator(this._value, e))
51
- return;
52
- let r;
53
- t || (t = r = new F(() => {
54
- }, () => `Setting ${this.debugName}`));
55
- try {
56
- if (this._isUpToDate = !1, this._setValue(e), s !== void 0 && this._deltas.push(s), t.updateObserver({
57
- beginUpdate: () => this._beginUpdate(),
58
- endUpdate: () => this._endUpdate(),
59
- handleChange: (n, i) => {
60
- },
61
- handlePossibleChange: (n) => {
62
- }
63
- }, this), this._updateCounter > 1)
64
- for (const n of this._observers)
65
- n.handlePossibleChange(this);
66
- } finally {
67
- r && r.finish();
68
- }
69
- }
70
- toString() {
71
- return `${this.debugName}: ${this._value}`;
72
- }
73
- _setValue(e) {
74
- this._value = e;
75
- }
76
- }
77
- function U(a, e, t = v.ofCaller()) {
78
- return a.lazy ? new L(new u(a.owner, a.debugName, void 0), e, a.equalsFn ?? c, t) : new T(new u(a.owner, a.debugName, void 0), e, a.equalsFn ?? c, t);
79
- }
80
- class H {
81
- /**
82
- * The cached value.
83
- * Does not force a computation of the value.
84
- */
85
- get cachedValue() {
86
- return this._value;
87
- }
88
- constructor(e) {
89
- this._computeValue = e, this._value = V(this, void 0);
90
- }
91
- /**
92
- * Returns the cached value.
93
- * Computes the value if the value has not been cached yet.
94
- */
95
- getValue() {
96
- let e = this._value.get();
97
- return e || (e = this._computeValue(), this._value.set(e, void 0)), e;
98
- }
99
- }
100
- class p {
101
- static fromFn(e) {
102
- return new p(e());
103
- }
104
- constructor(e) {
105
- this._value = V(this, void 0), this.promiseResult = this._value, this.resolvedValue = _(this, (t) => {
106
- const s = this.promiseResult.read(t);
107
- if (s)
108
- return s.getDataOrThrow();
109
- }), this.promise = e.then((t) => (g((s) => {
110
- this._value.set(new O(t, void 0), s);
111
- }), t), (t) => {
112
- throw g((s) => {
113
- this._value.set(new O(void 0, t), s);
114
- }), t;
115
- });
116
- }
117
- }
118
- class O {
119
- constructor(e, t) {
120
- this.data = e, this.error = t;
121
- }
122
- /**
123
- * Returns the value if the promise resolved, otherwise throws the error.
124
- */
125
- getDataOrThrow() {
126
- if (this.error)
127
- throw this.error;
128
- return this.data;
129
- }
130
- }
131
- class x {
132
- constructor(e) {
133
- this._computePromise = e, this._lazyValue = new H(() => new p(this._computePromise())), this.cachedPromiseResult = _(this, (t) => this._lazyValue.cachedValue.read(t)?.promiseResult.read(t));
134
- }
135
- getPromise() {
136
- return this._lazyValue.getValue().promise;
137
- }
138
- }
139
- function K(a, e, t, s) {
140
- return e || (e = (r) => r != null), new Promise((r, n) => {
141
- let i = !0, d = !1;
142
- const b = a.map((o) => ({
143
- isFinished: e(o),
144
- error: t ? t(o) : !1,
145
- state: o
146
- })), h = S((o) => {
147
- const { isFinished: E, error: l, state: m } = b.read(o);
148
- (E || l) && (i ? d = !0 : h.dispose(), l ? n(l === !0 ? m : l) : r(m));
149
- });
150
- if (s) {
151
- const o = s.onCancellationRequested(() => {
152
- h.dispose(), o.dispose(), n(new y());
153
- });
154
- if (s.isCancellationRequested) {
155
- h.dispose(), o.dispose(), n(new y());
156
- return;
157
- }
158
- }
159
- i = !1, d && h.dispose();
160
- });
161
- }
162
- function G(a, e) {
163
- let t, s;
164
- e === void 0 ? (t = a, s = void 0) : (s = a, t = e);
165
- let r;
166
- return new k(new u(s, void 0, t), (n) => (r && r.dispose(), r = new z(), t(n, r.token)), void 0, () => r?.dispose(), c, v.ofCaller());
167
- }
168
- function J(a) {
169
- return {
170
- createChangeSummary: (e) => ({
171
- changes: []
172
- }),
173
- handleChange(e, t) {
174
- for (const s in a)
175
- e.didChange(a[s]) && t.changes.push({ key: s, change: e.change });
176
- return !0;
177
- },
178
- beforeUpdate(e, t) {
179
- for (const s in a) {
180
- if (s === "changes")
181
- throw new f('property name "changes" is reserved for change tracking');
182
- t[s] = a[s].read(e);
183
- }
184
- }
185
- };
186
- }
187
- function Q(a) {
188
- let e;
189
- return {
190
- createChangeSummary: (t) => ({
191
- changes: []
192
- }),
193
- handleChange(t, s) {
194
- e || (e = a());
195
- for (const r in e)
196
- t.didChange(e[r]) && s.changes.push({ key: r, change: t.change });
197
- return !0;
198
- },
199
- beforeUpdate(t, s) {
200
- e || (e = a());
201
- for (const r in e) {
202
- if (r === "changes")
203
- throw new f('property name "changes" is reserved for change tracking');
204
- s[r] = e[r].read(t);
205
- }
206
- }
207
- };
208
- }
209
- function I(a, e, t = v.ofCaller()) {
210
- return new A(typeof a == "string" ? a : new u(a, void 0, void 0), e, t);
211
- }
212
- class A extends w {
213
- constructor(e, t, s) {
214
- super(s), this.event = t, this.handleEvent = () => {
215
- g((r) => {
216
- for (const n of this._observers)
217
- r.updateObserver(n, this), n.handleChange(this, void 0);
218
- }, () => this.debugName);
219
- }, this.debugName = typeof e == "string" ? e : e.getDebugName(this) ?? "Observable Signal From Event";
220
- }
221
- onFirstObserverAdded() {
222
- this.subscription = this.event(this.handleEvent);
223
- }
224
- onLastObserverRemoved() {
225
- this.subscription.dispose(), this.subscription = void 0;
226
- }
227
- get() {
228
- }
229
- }
230
- function B(a) {
231
- return (e) => {
232
- let t = !0;
233
- return S((s) => {
234
- a.read(s), t ? t = !1 : e();
235
- });
236
- };
237
- }
238
- class M {
239
- constructor(e) {
240
- this.observable = e;
241
- }
242
- get onDidChange() {
243
- return B(this.observable);
244
- }
245
- get value() {
246
- return this.observable.get();
247
- }
248
- }
249
- function X(a, e) {
250
- return e instanceof M ? e.observable : D(a, e.onDidChange, () => e.value);
251
- }
252
- function Y(a, e) {
253
- if (e.length === 0)
254
- throw new f();
255
- let t = !1, s;
256
- const r = D(a, (n) => {
257
- const i = new N();
258
- for (const d of e)
259
- i.add(P({ debugName: () => R(r, new u(a, void 0, void 0)) + ".updateLastChangedValue" }, (b) => {
260
- t = !0, s = d.read(b), n();
261
- }));
262
- return i.add({
263
- dispose() {
264
- t = !1, s = void 0;
265
- }
266
- }), i;
267
- }, () => t ? s : e[e.length - 1].get());
268
- return r;
269
- }
270
- function Z(a, e) {
271
- return W(a, (t, s) => s ?? e(t));
272
- }
273
- function j(a, e, t) {
274
- let s, r, n = !1;
275
- const i = I("deferUnobserve", (d) => {
276
- if (n)
277
- throw new f("deferUnobserve: Cannot add observer after disposal");
278
- return r !== void 0 && (clearTimeout(r), r = void 0), s || (s = q(e)), {
279
- dispose() {
280
- r = setTimeout(() => {
281
- r = void 0, s?.dispose(), s = void 0;
282
- }, t);
283
- }
284
- };
285
- });
286
- return a.add({
287
- dispose() {
288
- r !== void 0 && (clearTimeout(r), r = void 0), s?.dispose(), s = void 0, n = !0;
289
- }
290
- }), _((d) => (i.read(d), e.read(d)));
291
- }
292
- class ee {
293
- constructor() {
294
- this._data = /* @__PURE__ */ new Set(), this._obs = U({ equalsFn: () => !1 }, this), this.observable = this._obs;
295
- }
296
- get size() {
297
- return this._data.size;
298
- }
299
- has(e) {
300
- return this._data.has(e);
301
- }
302
- add(e, t) {
303
- return this._data.has(e) || (this._data.add(e), this._obs.set(this, t)), this;
304
- }
305
- delete(e, t) {
306
- const s = this._data.delete(e);
307
- return s && this._obs.set(this, t), s;
308
- }
309
- clear(e) {
310
- this._data.size > 0 && (this._data.clear(), this._obs.set(this, e));
311
- }
312
- forEach(e, t) {
313
- this._data.forEach((s, r, n) => {
314
- e.call(t, s, r, this);
315
- });
316
- }
317
- *entries() {
318
- for (const e of this._data)
319
- yield [e, e];
320
- }
321
- *keys() {
322
- yield* this._data.keys();
323
- }
324
- *values() {
325
- yield* this._data.values();
326
- }
327
- [Symbol.iterator]() {
328
- return this.values();
329
- }
330
- get [Symbol.toStringTag]() {
331
- return "ObservableSet";
332
- }
333
- }
334
- class te {
335
- constructor() {
336
- this._data = /* @__PURE__ */ new Map(), this._obs = U({ equalsFn: () => !1 }, this), this.observable = this._obs;
337
- }
338
- get size() {
339
- return this._data.size;
340
- }
341
- has(e) {
342
- return this._data.has(e);
343
- }
344
- get(e) {
345
- return this._data.get(e);
346
- }
347
- set(e, t, s) {
348
- const r = this._data.has(e), n = this._data.get(e);
349
- return (!r || n !== t) && (this._data.set(e, t), this._obs.set(this, s)), this;
350
- }
351
- delete(e, t) {
352
- const s = this._data.delete(e);
353
- return s && this._obs.set(this, t), s;
354
- }
355
- clear(e) {
356
- this._data.size > 0 && (this._data.clear(), this._obs.set(this, e));
357
- }
358
- forEach(e, t) {
359
- this._data.forEach((s, r, n) => {
360
- e.call(t, s, r, this);
361
- });
362
- }
363
- *entries() {
364
- yield* this._data.entries();
365
- }
366
- *keys() {
367
- yield* this._data.keys();
368
- }
369
- *values() {
370
- yield* this._data.values();
371
- }
372
- [Symbol.iterator]() {
373
- return this.entries();
374
- }
375
- get [Symbol.toStringTag]() {
376
- return "ObservableMap";
377
- }
378
- }
379
- export {
380
- v as DebugLocation,
381
- re as Disposable,
382
- N as DisposableStore,
383
- H as ObservableLazy,
384
- x as ObservableLazyPromise,
385
- te as ObservableMap,
386
- p as ObservablePromise,
387
- ee as ObservableSet,
388
- O as PromiseResult,
389
- F as TransactionImpl,
390
- M as ValueWithChangeEventFromObservable,
391
- ne as asyncTransaction,
392
- ie as autorun,
393
- de as autorunDelta,
394
- oe as autorunHandleChanges,
395
- ue as autorunIterableDelta,
396
- he as autorunOpts,
397
- le as autorunSelfDisposable,
398
- fe as autorunWithStore,
399
- be as autorunWithStoreHandleChanges,
400
- ce as constObservable,
401
- S as createEffect,
402
- P as createEffectOpts,
403
- ge as debouncedObservable,
404
- ve as debouncedObservableDeprecated,
405
- j as deferUnobserve,
406
- _ as derived,
407
- Z as derivedConstOnceDefined,
408
- _e as derivedDisposable,
409
- pe as derivedHandleChanges,
410
- W as derivedObservableWithCache,
411
- me as derivedObservableWithWritableCache,
412
- Ce as derivedOpts,
413
- G as derivedWithCancellationToken,
414
- ye as derivedWithSetter,
415
- Oe as derivedWithStore,
416
- we as disposableObservableValue,
417
- Ve as globalTransaction,
418
- q as keepObserved,
419
- Y as latestChangedValue,
420
- Se as mapObservableArrayCached,
421
- D as observableFromEvent,
422
- De as observableFromEventOpts,
423
- Ue as observableFromPromise,
424
- X as observableFromValueWithChangeEvent,
425
- Ee as observableSignal,
426
- I as observableSignalFromEvent,
427
- V as observableValue,
428
- U as observableValueOpts,
429
- Fe as recomputeInitiallyAndOnChange,
430
- J as recordChanges,
431
- Q as recordChangesLazy,
432
- Te as runOnChange,
433
- ke as runOnChangeWithCancellationToken,
434
- ze as runOnChangeWithStore,
435
- We as signalFromObservable,
436
- Ne as subtransaction,
437
- g as transaction,
438
- K as waitForState,
439
- Pe as wasEventTriggeredRecently
440
- };
441
- //# sourceMappingURL=observables.js.map