atom.io 0.15.3 → 0.15.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.
- package/data/dist/index.cjs +9 -0
- package/data/dist/index.cjs.map +1 -1
- package/data/dist/index.js +9 -0
- package/data/dist/index.js.map +1 -1
- package/data/src/join.ts +9 -0
- package/dist/{chunk-K22LR3V6.js → chunk-RLZQ6IIY.js} +11 -2
- package/dist/chunk-RLZQ6IIY.js.map +1 -0
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +89 -72
- package/dist/index.js +1 -1
- package/internal/dist/index.cjs +16 -16
- package/internal/dist/index.cjs.map +1 -1
- package/internal/dist/index.d.ts +18 -18
- package/internal/dist/index.js +17 -17
- package/internal/dist/index.js.map +1 -1
- package/internal/src/atom/create-regular-atom.ts +1 -1
- package/internal/src/mutable/tracker.ts +3 -3
- package/internal/src/operation.ts +1 -1
- package/internal/src/selector/create-read-write-selector.ts +1 -1
- package/internal/src/selector/create-readonly-selector.ts +1 -1
- package/internal/src/store/store.ts +4 -4
- package/internal/src/store/withdraw.ts +7 -9
- package/internal/src/subscribe/subscribe-to-timeline.ts +4 -4
- package/internal/src/timeline/add-atom-to-timeline.ts +7 -7
- package/internal/src/timeline/create-timeline.ts +29 -21
- package/internal/src/timeline/time-travel.ts +1 -1
- package/internal/src/transaction/apply-transaction.ts +2 -2
- package/internal/src/transaction/build-transaction.ts +1 -1
- package/internal/src/transaction/create-transaction.ts +1 -1
- package/introspection/dist/index.cjs +9 -9
- package/introspection/dist/index.cjs.map +1 -1
- package/introspection/dist/index.d.ts +2 -2
- package/introspection/dist/index.js +9 -9
- package/introspection/dist/index.js.map +1 -1
- package/introspection/src/attach-atom-index.ts +2 -2
- package/introspection/src/attach-introspection-states.ts +2 -2
- package/introspection/src/attach-selector-index.ts +2 -2
- package/introspection/src/attach-timeline-family.ts +6 -6
- package/introspection/src/attach-timeline-index.ts +6 -4
- package/introspection/src/attach-transaction-index.ts +1 -1
- package/package.json +8 -9
- package/react/dist/index.cjs.map +1 -1
- package/react/dist/index.d.ts +1 -1
- package/react/dist/index.js.map +1 -1
- package/react/src/store-hooks.ts +1 -1
- package/react-devtools/dist/index.cjs +7 -9
- package/react-devtools/dist/index.cjs.map +1 -1
- package/react-devtools/dist/index.d.ts +7 -262
- package/react-devtools/dist/index.js +7 -9
- package/react-devtools/dist/index.js.map +1 -1
- package/react-devtools/src/TimelineIndex.tsx +2 -2
- package/react-devtools/src/Updates.tsx +1 -1
- package/realtime-client/dist/index.cjs +1 -1
- package/realtime-client/dist/index.cjs.map +1 -1
- package/realtime-client/dist/index.d.ts +2 -2
- package/realtime-client/dist/index.js +1 -1
- package/realtime-client/dist/index.js.map +1 -1
- package/realtime-client/src/realtime-state.ts +3 -3
- package/realtime-react/dist/index.cjs +2 -4
- package/realtime-react/dist/index.cjs.map +1 -1
- package/realtime-react/dist/index.js +2 -4
- package/realtime-react/dist/index.js.map +1 -1
- package/realtime-react/src/realtime-context.tsx +2 -4
- package/src/index.ts +10 -0
- package/src/subscribe.ts +7 -11
- package/src/timeline.ts +18 -10
- package/src/validators.ts +74 -0
- package/dist/chunk-K22LR3V6.js.map +0 -1
- package/internal/src/set-state/copy-mutable-into-new-store.ts +0 -34
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import * as Internal from 'atom.io/internal';
|
|
1
2
|
import * as atom_io from 'atom.io';
|
|
2
|
-
import {
|
|
3
|
-
import { Json } from 'atom.io/json';
|
|
3
|
+
import { AtomToken, ReadonlySelectorToken, SelectorToken } from 'atom.io';
|
|
4
4
|
|
|
5
5
|
type ClassSignature = abstract new (...args: any) => any;
|
|
6
6
|
|
|
7
|
-
type RefinementStrategy = ClassSignature | Refinement
|
|
8
|
-
type Supported<Refine extends RefinementStrategy> = Refine extends Refinement
|
|
7
|
+
type RefinementStrategy = ClassSignature | Refinement<unknown, any>;
|
|
8
|
+
type Supported<Refine extends RefinementStrategy> = Refine extends Refinement<unknown, infer T> ? T : Refine extends ClassSignature ? InstanceType<Refine> : never;
|
|
9
9
|
type RefinementSupport = Record<string, RefinementStrategy>;
|
|
10
10
|
declare class Refinery<SupportedTypes extends RefinementSupport> {
|
|
11
11
|
supported: SupportedTypes;
|
|
@@ -18,267 +18,12 @@ declare class Refinery<SupportedTypes extends RefinementSupport> {
|
|
|
18
18
|
}[keyof SupportedTypes] | null;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
interface Refinement
|
|
21
|
+
interface Refinement<A, B extends A> {
|
|
22
22
|
(a: A): a is B;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
type PlainObject = Record<keyof any, unknown>;
|
|
26
26
|
|
|
27
|
-
type FamilyMetadata = {
|
|
28
|
-
key: string;
|
|
29
|
-
subKey: string;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
declare class Subject<T> {
|
|
33
|
-
Subscriber: (value: T) => void;
|
|
34
|
-
subscribers: Map<string, this[`Subscriber`]>;
|
|
35
|
-
subscribe(key: string, subscriber: this[`Subscriber`]): () => void;
|
|
36
|
-
private unsubscribe;
|
|
37
|
-
next(value: T): void;
|
|
38
|
-
}
|
|
39
|
-
declare class StatefulSubject<T> extends Subject<T> {
|
|
40
|
-
state: T;
|
|
41
|
-
constructor(initialState: T);
|
|
42
|
-
next(value: T): void;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
type Selector<T> = {
|
|
46
|
-
key: string;
|
|
47
|
-
type: `selector`;
|
|
48
|
-
family?: FamilyMetadata$1;
|
|
49
|
-
install: (store: Store) => void;
|
|
50
|
-
subject: Subject<{
|
|
51
|
-
newValue: T;
|
|
52
|
-
oldValue: T;
|
|
53
|
-
}>;
|
|
54
|
-
get: () => T;
|
|
55
|
-
set: (newValue: T | ((oldValue: T) => T)) => void;
|
|
56
|
-
};
|
|
57
|
-
type ReadonlySelector<T> = {
|
|
58
|
-
key: string;
|
|
59
|
-
type: `readonly_selector`;
|
|
60
|
-
family?: FamilyMetadata$1;
|
|
61
|
-
install: (store: Store) => void;
|
|
62
|
-
subject: Subject<{
|
|
63
|
-
newValue: T;
|
|
64
|
-
oldValue: T;
|
|
65
|
-
}>;
|
|
66
|
-
get: () => T;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
type Transaction<ƒ extends _n> = {
|
|
70
|
-
key: string;
|
|
71
|
-
type: `transaction`;
|
|
72
|
-
install: (store: Store) => void;
|
|
73
|
-
subject: Subject<TransactionUpdate<ƒ>>;
|
|
74
|
-
run: (...parameters: Parameters<ƒ>) => ReturnType<ƒ>;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
type TransactionMeta<ƒ extends _n> = {
|
|
78
|
-
phase: `applying` | `building`;
|
|
79
|
-
time: number;
|
|
80
|
-
update: TransactionUpdate<ƒ>;
|
|
81
|
-
transactors: TransactorsWithRun;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
type primitive = boolean | number | string | null;
|
|
85
|
-
|
|
86
|
-
type Serializable = primitive | Readonly<{
|
|
87
|
-
[key: string]: Serializable;
|
|
88
|
-
}> | ReadonlyArray<Serializable>;
|
|
89
|
-
type Object$1<Key extends string = string, Value extends Serializable = Serializable> = Record<Key, Value>;
|
|
90
|
-
|
|
91
|
-
type Refinement<Unrefined, Refined extends Unrefined> = (value: Unrefined) => value is Refined;
|
|
92
|
-
type Cardinality = `1:1` | `1:n` | `n:n`;
|
|
93
|
-
|
|
94
|
-
interface JunctionEntries<Content extends Object$1 | null> extends Object$1 {
|
|
95
|
-
readonly relations: [string, string[]][];
|
|
96
|
-
readonly contents: [string, Content][];
|
|
97
|
-
}
|
|
98
|
-
interface JunctionSchema<ASide extends string, BSide extends string> extends Object$1 {
|
|
99
|
-
readonly between: [a: ASide, b: BSide];
|
|
100
|
-
readonly cardinality: Cardinality;
|
|
101
|
-
}
|
|
102
|
-
type BaseExternalStoreConfiguration = {
|
|
103
|
-
addRelation: (a: string, b: string) => void;
|
|
104
|
-
deleteRelation: (a: string, b: string) => void;
|
|
105
|
-
replaceRelationsSafely: (a: string, bs: string[]) => void;
|
|
106
|
-
replaceRelationsUnsafely: (a: string, bs: string[]) => void;
|
|
107
|
-
getRelatedKeys: (key: string) => Set<string> | undefined;
|
|
108
|
-
has: (a: string, b?: string) => boolean;
|
|
109
|
-
};
|
|
110
|
-
type ExternalStoreWithContentConfiguration<Content extends Object$1> = {
|
|
111
|
-
getContent: (contentKey: string) => Content | undefined;
|
|
112
|
-
setContent: (contentKey: string, content: Content) => void;
|
|
113
|
-
deleteContent: (contentKey: string) => void;
|
|
114
|
-
};
|
|
115
|
-
type Empty<Obj extends object> = {
|
|
116
|
-
[Key in keyof Obj]?: undefined;
|
|
117
|
-
};
|
|
118
|
-
type ExternalStoreConfiguration<Content extends Object$1 | null> = Content extends Object$1 ? BaseExternalStoreConfiguration & ExternalStoreWithContentConfiguration<Content> : BaseExternalStoreConfiguration & Empty<ExternalStoreWithContentConfiguration<Object$1>>;
|
|
119
|
-
type JunctionAdvancedConfiguration<Content extends Object$1 | null> = {
|
|
120
|
-
externalStore?: ExternalStoreConfiguration<Content>;
|
|
121
|
-
isContent?: Refinement<unknown, Content>;
|
|
122
|
-
makeContentKey?: (a: string, b: string) => string;
|
|
123
|
-
};
|
|
124
|
-
type JunctionJSON<ASide extends string, BSide extends string, Content extends Object$1 | null> = JunctionEntries<Content> & JunctionSchema<ASide, BSide>;
|
|
125
|
-
declare class Junction<const ASide extends string, const BSide extends string, const Content extends Object$1 | null = null> {
|
|
126
|
-
readonly a: ASide;
|
|
127
|
-
readonly b: BSide;
|
|
128
|
-
readonly cardinality: Cardinality;
|
|
129
|
-
readonly relations: Map<string, Set<string>>;
|
|
130
|
-
readonly contents: Map<string, Content>;
|
|
131
|
-
isContent: Refinement<unknown, Content> | null;
|
|
132
|
-
makeContentKey: (a: string, b: string) => string;
|
|
133
|
-
getRelatedKeys(key: string): Set<string> | undefined;
|
|
134
|
-
protected addRelation(a: string, b: string): void;
|
|
135
|
-
protected deleteRelation(a: string, b: string): void;
|
|
136
|
-
protected replaceRelationsUnsafely(a: string, bs: string[]): void;
|
|
137
|
-
protected replaceRelationsSafely(a: string, bs: string[]): void;
|
|
138
|
-
protected getContentInternal(contentKey: string): Content | undefined;
|
|
139
|
-
protected setContent(contentKey: string, content: Content): void;
|
|
140
|
-
protected deleteContent(contentKey: string): void;
|
|
141
|
-
constructor(data: JunctionSchema<ASide, BSide> & Partial<JunctionEntries<Content>>, config?: JunctionAdvancedConfiguration<Content>);
|
|
142
|
-
toJSON(): JunctionJSON<ASide, BSide, Content>;
|
|
143
|
-
set(a: string, ...rest: Content extends null ? [b: string] : [b: string, content: Content]): this;
|
|
144
|
-
set(relation: {
|
|
145
|
-
[Key in ASide | BSide]: string;
|
|
146
|
-
}, ...rest: Content extends null ? [] | [b?: undefined] : [content: Content]): this;
|
|
147
|
-
delete(a: string, b?: string): this;
|
|
148
|
-
delete(relation: Record<ASide | BSide, string> | Record<ASide, string> | Record<BSide, string>, b?: undefined): this;
|
|
149
|
-
getRelatedKey(key: string): string | undefined;
|
|
150
|
-
replaceRelations(a: string, relations: Content extends null ? string[] : Record<string, Content>, config?: {
|
|
151
|
-
reckless: boolean;
|
|
152
|
-
}): this;
|
|
153
|
-
getContent(a: string, b: string): Content | undefined;
|
|
154
|
-
getRelationEntries(input: Record<ASide, string> | Record<BSide, string>): [string, Content][];
|
|
155
|
-
has(a: string, b?: string): boolean;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
interface Lineage {
|
|
159
|
-
parent: typeof this | null;
|
|
160
|
-
child: typeof this | null;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
interface Transceiver<Signal extends Json.Serializable> {
|
|
164
|
-
do: (update: Signal) => void;
|
|
165
|
-
undo: (update: Signal) => void;
|
|
166
|
-
subscribe: (key: string, fn: (update: Signal) => void) => () => void;
|
|
167
|
-
cacheUpdateNumber: number;
|
|
168
|
-
getUpdateNumber: (update: Signal) => number;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* @internal Give the tracker a transceiver state and a store, and it will
|
|
173
|
-
* subscribe to the transceiver's inner value. When the inner value changes,
|
|
174
|
-
* the tracker will update its own state to reflect the change.
|
|
175
|
-
*/
|
|
176
|
-
declare class Tracker<Mutable extends Transceiver<any>> {
|
|
177
|
-
private Update;
|
|
178
|
-
private initializeState;
|
|
179
|
-
private unsubscribeFromInnerValue;
|
|
180
|
-
private unsubscribeFromState;
|
|
181
|
-
private observeCore;
|
|
182
|
-
private updateCore;
|
|
183
|
-
mutableState: MutableAtomToken<Mutable, Json.Serializable>;
|
|
184
|
-
latestUpdateState: AtomToken<typeof this.Update | null>;
|
|
185
|
-
dispose: () => void;
|
|
186
|
-
constructor(mutableState: MutableAtomToken<Mutable, Json.Serializable>, store: Store);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
interface MutableAtom<T> extends Atom<T> {
|
|
190
|
-
mutable: true;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
type OperationProgress = {
|
|
194
|
-
open: false;
|
|
195
|
-
} | {
|
|
196
|
-
open: true;
|
|
197
|
-
done: Set<string>;
|
|
198
|
-
prev: Map<string, any>;
|
|
199
|
-
time: number;
|
|
200
|
-
token: StateToken<any>;
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
type TimelineAtomUpdate = StateUpdate<unknown> & {
|
|
204
|
-
key: string;
|
|
205
|
-
type: `atom_update`;
|
|
206
|
-
timestamp: number;
|
|
207
|
-
family?: FamilyMetadata$1;
|
|
208
|
-
};
|
|
209
|
-
type TimelineSelectorUpdate = {
|
|
210
|
-
key: string;
|
|
211
|
-
type: `selector_update`;
|
|
212
|
-
timestamp: number;
|
|
213
|
-
atomUpdates: Omit<TimelineAtomUpdate, `timestamp`>[];
|
|
214
|
-
};
|
|
215
|
-
type TimelineTransactionUpdate = TransactionUpdate<_n> & {
|
|
216
|
-
key: string;
|
|
217
|
-
type: `transaction_update`;
|
|
218
|
-
timestamp: number;
|
|
219
|
-
};
|
|
220
|
-
type Timeline = {
|
|
221
|
-
type: `timeline`;
|
|
222
|
-
key: string;
|
|
223
|
-
at: number;
|
|
224
|
-
shouldCapture?: (update: TimelineUpdate, timeline: Timeline) => boolean;
|
|
225
|
-
timeTraveling: `into_future` | `into_past` | null;
|
|
226
|
-
history: TimelineUpdate[];
|
|
227
|
-
selectorTime: number | null;
|
|
228
|
-
transactionKey: string | null;
|
|
229
|
-
install: (store: Store) => void;
|
|
230
|
-
subject: Subject<TimelineAtomUpdate | TimelineSelectorUpdate | TimelineTransactionUpdate | `redo` | `undo`>;
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
declare class Store implements Lineage {
|
|
234
|
-
parent: Store | null;
|
|
235
|
-
child: Store | null;
|
|
236
|
-
valueMap: Map<string, any>;
|
|
237
|
-
atoms: Map<string, Atom<any> | MutableAtom<any>>;
|
|
238
|
-
selectors: Map<string, Selector<any>>;
|
|
239
|
-
readonlySelectors: Map<string, ReadonlySelector<any>>;
|
|
240
|
-
trackers: Map<string, Tracker<Transceiver<any>>>;
|
|
241
|
-
families: Map<string, AtomFamily<any, any> | ReadonlySelectorFamily<any, any> | SelectorFamily<any, any>>;
|
|
242
|
-
timelines: Map<string, Timeline>;
|
|
243
|
-
transactions: Map<string, Transaction<_n>>;
|
|
244
|
-
atomsThatAreDefault: Set<string>;
|
|
245
|
-
timelineAtoms: Junction<"timelineKey", "atomKey", null>;
|
|
246
|
-
selectorAtoms: Junction<"selectorKey", "atomKey", null>;
|
|
247
|
-
selectorGraph: Junction<"upstreamSelectorKey", "downstreamSelectorKey", {
|
|
248
|
-
source: string;
|
|
249
|
-
}>;
|
|
250
|
-
subject: {
|
|
251
|
-
atomCreation: Subject<AtomToken<unknown>>;
|
|
252
|
-
selectorCreation: Subject<ReadonlySelectorToken<unknown> | SelectorToken<unknown>>;
|
|
253
|
-
transactionCreation: Subject<TransactionToken<_n>>;
|
|
254
|
-
timelineCreation: Subject<TimelineToken>;
|
|
255
|
-
transactionApplying: StatefulSubject<TransactionMeta<_n> | null>;
|
|
256
|
-
operationStatus: Subject<OperationProgress>;
|
|
257
|
-
};
|
|
258
|
-
operation: OperationProgress;
|
|
259
|
-
transactionMeta: TransactionMeta<_n> | null;
|
|
260
|
-
config: {
|
|
261
|
-
name: string;
|
|
262
|
-
};
|
|
263
|
-
loggers: AtomIOLogger[];
|
|
264
|
-
logger: Logger;
|
|
265
|
-
constructor(name: string, store?: Store | null);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
type Atom<T> = {
|
|
269
|
-
key: string;
|
|
270
|
-
type: `atom`;
|
|
271
|
-
mutable?: boolean;
|
|
272
|
-
family?: FamilyMetadata;
|
|
273
|
-
install: (store: Store) => void;
|
|
274
|
-
subject: Subject<{
|
|
275
|
-
newValue: T;
|
|
276
|
-
oldValue: T;
|
|
277
|
-
}>;
|
|
278
|
-
default: T | (() => T);
|
|
279
|
-
cleanup?: () => void;
|
|
280
|
-
};
|
|
281
|
-
|
|
282
27
|
type AtomTokenIndex = StateTokenIndex<AtomToken<unknown>>;
|
|
283
28
|
|
|
284
29
|
type FamilyNode<Token extends AtomToken<unknown> | ReadonlySelectorToken<unknown> | SelectorToken<unknown>> = {
|
|
@@ -320,8 +65,8 @@ declare const atomIndex: atom_io.ReadonlySelectorToken<AtomTokenIndex>;
|
|
|
320
65
|
declare const selectorIndex: atom_io.ReadonlySelectorToken<SelectorTokenIndex>;
|
|
321
66
|
declare const transactionIndex: atom_io.ReadonlySelectorToken<atom_io.TransactionToken<atom_io.ƒn>[]>;
|
|
322
67
|
declare const findTransactionLogState: atom_io.ReadonlySelectorFamily<atom_io.TransactionUpdate<atom_io.ƒn>[]>;
|
|
323
|
-
declare const timelineIndex: atom_io.ReadonlySelectorToken<atom_io.TimelineToken[]>;
|
|
324
|
-
declare const findTimelineState: atom_io.ReadonlySelectorFamily<Timeline
|
|
68
|
+
declare const timelineIndex: atom_io.ReadonlySelectorToken<atom_io.TimelineToken<any>[]>;
|
|
69
|
+
declare const findTimelineState: atom_io.ReadonlySelectorFamily<Internal.Timeline<any>>;
|
|
325
70
|
declare const devtoolsAreOpenState: atom_io.AtomToken<boolean>;
|
|
326
71
|
type DevtoolsView = `atoms` | `selectors` | `timelines` | `transactions`;
|
|
327
72
|
declare const devtoolsViewSelectionState: atom_io.AtomToken<DevtoolsView>;
|
|
@@ -688,7 +688,6 @@ var valueToText = (numericValue) => {
|
|
|
688
688
|
};
|
|
689
689
|
var NumberInput = ({
|
|
690
690
|
autoSize = false,
|
|
691
|
-
customCss,
|
|
692
691
|
decimalPlaces,
|
|
693
692
|
disabled = false,
|
|
694
693
|
label,
|
|
@@ -737,7 +736,7 @@ var NumberInput = ({
|
|
|
737
736
|
}
|
|
738
737
|
};
|
|
739
738
|
const displayValue = temporaryEntry != null ? temporaryEntry : valueToText(value ? refine(value) : value);
|
|
740
|
-
return /* @__PURE__ */ jsxs("span", {
|
|
739
|
+
return /* @__PURE__ */ jsxs("span", { children: [
|
|
741
740
|
label && /* @__PURE__ */ jsx("label", { htmlFor: id, children: label }),
|
|
742
741
|
autoSize ? /* @__PURE__ */ jsx(
|
|
743
742
|
ElasticInput,
|
|
@@ -775,10 +774,9 @@ var TextInput = ({
|
|
|
775
774
|
set,
|
|
776
775
|
label,
|
|
777
776
|
placeholder,
|
|
778
|
-
customCss,
|
|
779
777
|
autoSize = false
|
|
780
778
|
}) => {
|
|
781
|
-
return /* @__PURE__ */ jsxs("span", {
|
|
779
|
+
return /* @__PURE__ */ jsxs("span", { children: [
|
|
782
780
|
/* @__PURE__ */ jsx("label", { children: label }),
|
|
783
781
|
autoSize ? /* @__PURE__ */ jsx(
|
|
784
782
|
ElasticInput,
|
|
@@ -822,7 +820,7 @@ var JsonEditor_INTERNAL = ({
|
|
|
822
820
|
isReadonly = () => false,
|
|
823
821
|
isHidden = () => false,
|
|
824
822
|
className,
|
|
825
|
-
|
|
823
|
+
style,
|
|
826
824
|
Header: HeaderDisplay,
|
|
827
825
|
Components
|
|
828
826
|
}) => {
|
|
@@ -830,7 +828,7 @@ var JsonEditor_INTERNAL = ({
|
|
|
830
828
|
const refined = dataIsJson ? refineJsonType(data) : { type: `non-json`, data };
|
|
831
829
|
const SubEditor = dataIsJson ? SubEditors[refined.type] : NonJsonEditor;
|
|
832
830
|
const disabled = isReadonly(path);
|
|
833
|
-
return isHidden(path) ? null : /* @__PURE__ */ jsx(Components.ErrorBoundary, { children: /* @__PURE__ */ jsxs(Components.EditorWrapper, { className,
|
|
831
|
+
return isHidden(path) ? null : /* @__PURE__ */ jsx(Components.ErrorBoundary, { children: /* @__PURE__ */ jsxs(Components.EditorWrapper, { className, style, children: [
|
|
834
832
|
remove && /* @__PURE__ */ jsx(
|
|
835
833
|
Components.Button,
|
|
836
834
|
{
|
|
@@ -1615,7 +1613,7 @@ var DEFAULT_JSON_EDITOR_COMPONENTS = {
|
|
|
1615
1613
|
children
|
|
1616
1614
|
}
|
|
1617
1615
|
),
|
|
1618
|
-
EditorWrapper: ({ children,
|
|
1616
|
+
EditorWrapper: ({ children, className }) => /* @__PURE__ */ jsx("div", { className: `json_editor ` + className, children }),
|
|
1619
1617
|
EditorLayout: ({
|
|
1620
1618
|
DeleteButton,
|
|
1621
1619
|
Header,
|
|
@@ -1657,8 +1655,8 @@ var JsonEditor = ({
|
|
|
1657
1655
|
isHidden = () => false,
|
|
1658
1656
|
// isIllegal = () => false,
|
|
1659
1657
|
className,
|
|
1660
|
-
customCss,
|
|
1661
1658
|
Header,
|
|
1659
|
+
style,
|
|
1662
1660
|
Components: CustomComponents = {}
|
|
1663
1661
|
}) => {
|
|
1664
1662
|
const Components = __spreadValues(__spreadValues({}, DEFAULT_JSON_EDITOR_COMPONENTS), CustomComponents);
|
|
@@ -1675,8 +1673,8 @@ var JsonEditor = ({
|
|
|
1675
1673
|
isReadonly,
|
|
1676
1674
|
isHidden,
|
|
1677
1675
|
className,
|
|
1678
|
-
customCss,
|
|
1679
1676
|
Header,
|
|
1677
|
+
style,
|
|
1680
1678
|
Components
|
|
1681
1679
|
}
|
|
1682
1680
|
);
|