@elaraai/e3-ui-components 1.0.83 → 1.0.84

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.
@@ -8,6 +8,10 @@ import { ReactiveDatasetCacheInterface } from './dataset-store.js';
8
8
  * args (the extra reducer parameters, after the implicit state). */
9
9
  export interface RecordMutateArgs {
10
10
  args: Uint8Array[];
11
+ /** The write's idempotency key: a retry with the same key after an
12
+ * unanswered call resolves to the first call's commit instead of writing
13
+ * twice. */
14
+ idempotencyKey?: string;
11
15
  }
12
16
  /**
13
17
  * Adapter for the workspace record endpoints. The default wraps
@@ -88,9 +92,29 @@ export declare class RecordRuntime extends TrackedChannelStore<RecordEntry> {
88
92
  private signature;
89
93
  /** Validate a mutation's declared arg types against the deployed signature. */
90
94
  private validate;
91
- /** Fetch a record's history once per channel (deduped); notify on settle. */
95
+ /**
96
+ * Fetch a record's history once per channel (deduped); notify on settle.
97
+ *
98
+ * @param again - Fetch once more after a fetch in flight, which may have
99
+ * read the chain before what the caller fetches it for
100
+ * @returns The fetch, settled once the history or its failure is in
101
+ */
92
102
  private fetchHistory;
93
- private launchMutation;
103
+ /**
104
+ * Run one mutation on the record's channel, and settle to the server's
105
+ * outcome.
106
+ *
107
+ * @remarks
108
+ * The channel shows the write as it shows every launch, latest-wins; the
109
+ * outcome returned is the server's own, whatever became of the channel. A
110
+ * commit refreshes the record's bytes and drops its history. A conflict
111
+ * fetches both again before the outcome settles, so an awaiting caller
112
+ * reads the state and the history its write lost to.
113
+ *
114
+ * @param idempotencyKey - The write's request id, when it has one
115
+ * @returns The outcome
116
+ */
117
+ private runMutation;
94
118
  /**
95
119
  * The low-level primitives backing handle methods, bound to THIS runtime.
96
120
  * Registered globally (extension registry) and included by the scoped
@@ -154,6 +178,13 @@ export interface InMemoryRecordDef {
154
178
  * Build an offline {@link RecordApi} from local implementations — the
155
179
  * showcase/snapshot harnesses' stand-in for a deployed record. Seeds each
156
180
  * record's current value into the dataset cache so `read()` works offline.
181
+ *
182
+ * @remarks
183
+ * A reducer that throws a patch's `ConflictError` — `applyFor` over a patch
184
+ * whose befores the state no longer holds — is the stale write the server
185
+ * reports as a `conflict` naming the key; any other throw is a failed program.
186
+ * A mutation carrying the key the last one carried returns that one's result
187
+ * without running again, as the server's idempotent retry does.
157
188
  */
158
189
  export declare function createInMemoryRecordApi(cache: ReactiveDatasetCacheInterface, workspace: string, defs: InMemoryRecordDef[]): RecordApi;
159
190
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"record-runtime.d.ts","sourceRoot":"","sources":["../../src/platform/record-runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAaH,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,WAAW,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,gBAAgB,EAAgB,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAA8C,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC3G,OAAO,EAIH,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EAE3B,MAAM,wBAAwB,CAAC;AAKhC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAmB,KAAK,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AASzF;qEACqE;AACrE,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,UAAU,EAAE,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACtB,8EAA8E;IAC9E,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IACtE,6EAA6E;IAC7E,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB,GAAG,OA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from '@elaraai/east';
2
+ import { StudioBuilderComponent } from '@elaraai/e3-ui/internal';
3
+ /** The renderer's payload, decoded. */
4
+ type StudioBuilderValue = ValueTypeOf<typeof StudioBuilderComponent.schema>;
5
+ /** Props of {@link EastChakraStudioBuilder}. */
6
+ export interface EastChakraStudioBuilderProps {
7
+ /** The payload, decoded. */
8
+ value: StudioBuilderValue;
9
+ /** The structural storage key. */
10
+ storageKey: string;
11
+ }
12
+ /**
13
+ * Renders the builder — see the module docs.
14
+ *
15
+ * @param props - The payload and its storage key
16
+ * @returns The builder
17
+ */
18
+ export declare const EastChakraStudioBuilder: import('react').NamedExoticComponent<EastChakraStudioBuilderProps>;
19
+ export {};
20
+ //# sourceMappingURL=builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/studio/builder.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AA+BH,OAAO,EACoG,KAAK,WAAW,EAC1H,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,sBAAsB,EACzB,MAAM,yBAAyB,CAAC;AA0BjC,uCAAuC;AACvC,KAAK,kBAAkB,GAAG,WAAW,CAAC,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC;AA0B5E,gDAAgD;AAChD,MAAM,WAAW,4BAA4B;IACzC,4BAA4B;IAC5B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,oEAwUlC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { ValueTypeOf } from '@elaraai/east';
2
+ import { StudioInspectorPayloadType } from '@elaraai/e3-ui/internal';
3
+ /** The inspector, as the builder draws it. */
4
+ type StudioInspectorValue = ValueTypeOf<typeof StudioInspectorPayloadType>;
5
+ /** Props of {@link StudioInspector}. */
6
+ export interface StudioInspectorProps {
7
+ /** The selected placement, and where a layout edit goes. */
8
+ value: StudioInspectorValue;
9
+ }
10
+ /**
11
+ * Renders the builder's inspector body — see the module docs.
12
+ *
13
+ * @param props - The selected placement, and where a layout edit goes
14
+ * @returns The inspector's body
15
+ */
16
+ export declare const StudioInspector: import('react').NamedExoticComponent<StudioInspectorProps>;
17
+ export {};
18
+ //# sourceMappingURL=inspector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspector.d.ts","sourceRoot":"","sources":["../../src/studio/inspector.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AA0BH,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAOrE,8CAA8C;AAC9C,KAAK,oBAAoB,GAAG,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAmB3E,wCAAwC;AACxC,MAAM,WAAW,oBAAoB;IACjC,4DAA4D;IAC5D,KAAK,EAAE,oBAAoB,CAAC;CAC/B;AA+CD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,4DAoK1B,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { ValueTypeOf } from '@elaraai/east';
2
+ import { StudioLibraryComponent } from '@elaraai/e3-ui/internal';
3
+ /** The renderer's payload, decoded. */
4
+ type StudioLibraryValue = ValueTypeOf<typeof StudioLibraryComponent.schema>;
5
+ /** Props of {@link EastChakraStudioLibrary}. */
6
+ export interface EastChakraStudioLibraryProps {
7
+ /** The payload, decoded. */
8
+ value: StudioLibraryValue;
9
+ /** The structural storage key. */
10
+ storageKey: string;
11
+ }
12
+ /**
13
+ * Renders the page library — see the module docs.
14
+ *
15
+ * @param props - The payload and its storage key
16
+ * @returns The page library
17
+ */
18
+ export declare const EastChakraStudioLibrary: import('react').NamedExoticComponent<EastChakraStudioLibraryProps>;
19
+ export {};
20
+ //# sourceMappingURL=library.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../src/studio/library.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AA6CH,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAkB,sBAAsB,EAAe,MAAM,yBAAyB,CAAC;AAa9F,uCAAuC;AACvC,KAAK,kBAAkB,GAAG,WAAW,CAAC,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAsB5E,gDAAgD;AAChD,MAAM,WAAW,4BAA4B;IACzC,4BAA4B;IAC5B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;CACtB;AAmDD;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,oEA+WlC,CAAC"}
@@ -0,0 +1,318 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * The Studio's message table.
4
+ *
5
+ * @remarks
6
+ * Numbers — `span`, `px`, the counts, a version's number — arrive already
7
+ * formatted for the locale; `np`, `nt` and `n` are the raw counts, for plurals.
8
+ */
9
+ export interface StudioMessages {
10
+ /** The builder toolbar's status: never published. */
11
+ statusDraft: () => string;
12
+ /** Published, its draft its live layout. */
13
+ statusLive: () => string;
14
+ /** Published, its draft changed since. */
15
+ statusLiveEdited: () => string;
16
+ /** A template is open. */
17
+ statusTemplate: () => string;
18
+ /** The builder toolbar's Publish. */
19
+ publish: () => string;
20
+ /** The builder with no page of the project open — its heading. */
21
+ noPageOpen: () => string;
22
+ /** Under it, what to do. */
23
+ noPageOpenHint: (p: {
24
+ project: string;
25
+ page: string;
26
+ }) => string;
27
+ /** The palette's pane — its tab and its rail's name. */
28
+ components: () => string;
29
+ /** One component, and any other count — the palette's noun. */
30
+ componentNoun: () => {
31
+ singular: string;
32
+ plural: string;
33
+ };
34
+ /** One page, and any other count — the palette's noun. */
35
+ pageNoun: () => {
36
+ singular: string;
37
+ plural: string;
38
+ };
39
+ /** A palette card's lock. */
40
+ logicFixed: () => string;
41
+ /** The palette's grouping and filter facet. */
42
+ category: () => string;
43
+ /** The palette's tags facet. */
44
+ tags: () => string;
45
+ /** The palette's collections facet. */
46
+ collections: () => string;
47
+ /** The inspector's pane — its tab and its rail's name. */
48
+ inspector: () => string;
49
+ /** The inspector's rail badge — the selected placement's span, `8/12`. */
50
+ spanBadge: (p: {
51
+ span: string;
52
+ }) => string;
53
+ /** A placement whose component the surface does not list — its heading. */
54
+ noComponent: (p: {
55
+ key: string;
56
+ }) => string;
57
+ /** Under it. */
58
+ noComponentHint: () => string;
59
+ /** A placement whose key two listed components share — its heading. */
60
+ twoComponents: (p: {
61
+ key: string;
62
+ }) => string;
63
+ /** Under it. */
64
+ twoComponentsHint: () => string;
65
+ /** A page whose live version is asked for before it is published — its heading. */
66
+ notPublished: (p: {
67
+ page: string;
68
+ }) => string;
69
+ /** Under it. */
70
+ notPublishedHint: () => string;
71
+ /** A page the record does not hold — its heading. */
72
+ noPage: (p: {
73
+ page: string;
74
+ }) => string;
75
+ /** Under it. */
76
+ noPageHint: (p: {
77
+ project: string;
78
+ }) => string;
79
+ /** Blank grid's card — what it places. */
80
+ blankSummary: () => string;
81
+ /** A page card's count of placements — `3 components`. */
82
+ placements: (p: {
83
+ n: number;
84
+ count: string;
85
+ }) => string;
86
+ /** A page card's action. */
87
+ openInBuilder: () => string;
88
+ /** The Pages row's dashed last card. */
89
+ newPageFromTemplate: () => string;
90
+ /** The inspector's selection block — its eyebrow. */
91
+ selectedComponent: () => string;
92
+ /** The placement's component's code changed since the page went live. */
93
+ logicChanged: () => string;
94
+ /** The Data block's eyebrow. */
95
+ data: () => string;
96
+ /** A component whose code reads no dataset. */
97
+ readsNothing: () => string;
98
+ /** The Configuration block's eyebrow. */
99
+ configuration: () => string;
100
+ /** Beside it, what the lock says. */
101
+ fixedByDeveloper: () => string;
102
+ /** A component with no description. */
103
+ noDescription: () => string;
104
+ /** The Layout block's eyebrow. */
105
+ layout: () => string;
106
+ /** The span stepper's label. */
107
+ columnSpan: () => string;
108
+ /** The span as the stepper shows it — `8 / 12`. */
109
+ spanOf: (p: {
110
+ span: string;
111
+ }) => string;
112
+ /** The stepper's minus button. */
113
+ decreaseSpan: () => string;
114
+ /** The stepper's plus button. */
115
+ increaseSpan: () => string;
116
+ /** The row field's label. */
117
+ row: () => string;
118
+ /** The height field's label. */
119
+ height: () => string;
120
+ /** A height that is its content's own. */
121
+ auto: () => string;
122
+ /** A height in px — `240 px`. */
123
+ px: (p: {
124
+ px: string;
125
+ }) => string;
126
+ /** The alignment's label. */
127
+ align: () => string;
128
+ /** At the row's top. */
129
+ alignTop: () => string;
130
+ /** Centred in the row. */
131
+ alignCenter: () => string;
132
+ /** As tall as the row. */
133
+ alignStretch: () => string;
134
+ /** The inspector's footer. */
135
+ published: () => string;
136
+ /** The inspector with nothing selected — its heading. */
137
+ nothingSelected: () => string;
138
+ /** Under it, what to do. */
139
+ nothingSelectedHint: () => string;
140
+ /** The page library's search, counting what it searches — `Search 4 pages and 4 templates…`. */
141
+ searchLibrary: (p: {
142
+ pages: string;
143
+ templates: string;
144
+ np: number;
145
+ nt: number;
146
+ }) => string;
147
+ /** The search field's name. */
148
+ searchLabel: () => string;
149
+ /** The search's clear button. */
150
+ clearSearch: () => string;
151
+ /** The Sort menu's trigger. */
152
+ sortByName: () => string;
153
+ /** Name, A to Z. */
154
+ nameAz: () => string;
155
+ /** Name, Z to A. */
156
+ nameZa: () => string;
157
+ /** The primary action — `New page in Ops console`. */
158
+ newPageIn: (p: {
159
+ project: string;
160
+ }) => string;
161
+ /** The primary action, folded, and the New page popover's head. */
162
+ newPage: () => string;
163
+ /** The pane's projects caption. */
164
+ projects: () => string;
165
+ /** The pane's pages caption, and the Pages section's head. */
166
+ pages: () => string;
167
+ /** The legend's live status. */
168
+ live: () => string;
169
+ /** The legend's draft status. */
170
+ draft: () => string;
171
+ /** The Templates section's head. */
172
+ templates: () => string;
173
+ /** Beside it. */
174
+ cloneToStart: () => string;
175
+ /** Beside the Pages head — `4 in Ops console`, or `1 of 4 in Ops console` while the search narrows. */
176
+ pagesIn: (p: {
177
+ shown: string;
178
+ total: string;
179
+ project: string;
180
+ narrowed: boolean;
181
+ }) => string;
182
+ /** The New page popover's name field. */
183
+ pageName: () => string;
184
+ /** Under it, while it is empty. */
185
+ pageNameMissing: () => string;
186
+ /** The New page popover's template field. */
187
+ template: () => string;
188
+ /** Blank grid — no template. */
189
+ blankGrid: () => string;
190
+ /** The New page popover's commit. */
191
+ createPage: () => string;
192
+ /** A popover's cancel. */
193
+ cancel: () => string;
194
+ /** A name the project holds already. */
195
+ nameTaken: (p: {
196
+ name: string;
197
+ }) => string;
198
+ /** The builder toolbar's Save as template, and its popover's head. */
199
+ saveAsTemplate: () => string;
200
+ /** Its popover's name field. */
201
+ templateName: () => string;
202
+ /** Under it, while it is empty. */
203
+ templateNameMissing: () => string;
204
+ /** Its popover's commit. */
205
+ saveTemplate: () => string;
206
+ /** The name it offers — `Overview template`. */
207
+ templateNameFor: (p: {
208
+ page: string;
209
+ }) => string;
210
+ /** Why it is disabled while a template is open. */
211
+ templateOpen: () => string;
212
+ /** The publish preview's bar — `● Preview`. */
213
+ preview: () => string;
214
+ /** The device strip's accessible name. */
215
+ devices: () => string;
216
+ /** The device the page is drawn for. */
217
+ device: (p: {
218
+ device: "desktop" | "tablet" | "mobile";
219
+ }) => string;
220
+ /** The Env pill's label, before the environment's name. */
221
+ env: () => string;
222
+ /** Back to the builder. */
223
+ exit: () => string;
224
+ /** The aside's head while there is something to publish. */
225
+ readyToPublish: () => string;
226
+ /** The aside's head while the page is live as it stands. */
227
+ upToDate: () => string;
228
+ /** The aside's head while a template is open. */
229
+ templateNotPublished: () => string;
230
+ /** A version — `v4`. */
231
+ version: (p: {
232
+ version: string;
233
+ }) => string;
234
+ /** After the live version in the aside's head — `v4 live`. */
235
+ liveVersion: () => string;
236
+ /** After a template's name in the aside's head. */
237
+ templateKind: () => string;
238
+ /** The change list's head — `3 changes since v3`. */
239
+ changesSince: (p: {
240
+ n: number;
241
+ count: string;
242
+ version: string;
243
+ }) => string;
244
+ /** The change list's head on a first publish — `3 changes · first version`. */
245
+ changesFirst: (p: {
246
+ n: number;
247
+ count: string;
248
+ }) => string;
249
+ /** The change list's head while nothing changed — `No changes since v4`. */
250
+ noChangesSince: (p: {
251
+ version: string;
252
+ }) => string;
253
+ /** A change's verb, before the placement's name — `Added`, `Resized`. */
254
+ changeVerb: (p: {
255
+ change: "added" | "removed" | "moved" | "resized" | "height" | "aligned" | "retitled";
256
+ }) => string;
257
+ /** The banner while every placed component's code is as it went live. */
258
+ logicUnchanged: () => string;
259
+ /** The banner naming the components whose code changed since the live version, by name, in the order they are placed. */
260
+ logicChangedIn: (p: {
261
+ version: string;
262
+ components: readonly string[];
263
+ }) => string;
264
+ /** The Audience row's label. */
265
+ audience: () => string;
266
+ /** The Rollout row's label. */
267
+ rollout: () => string;
268
+ /** The footer's Apply. */
269
+ saveAsDraft: () => string;
270
+ /** The footer's publish — `Publish v4 to Staging`; with no environment, `Publish v4`; for a template, `Publish`. */
271
+ publishTo: (p: {
272
+ version?: string | undefined;
273
+ env?: string | undefined;
274
+ }) => string;
275
+ }
276
+ /** The Studio's English messages — the default table. */
277
+ export declare const studioMessages: StudioMessages;
278
+ /**
279
+ * The message table in effect — {@link studioMessages} with every
280
+ * {@link StudioMessagesProvider} above overriding it.
281
+ *
282
+ * @returns The table
283
+ */
284
+ export declare function useStudioMessages(): StudioMessages;
285
+ /** Props of {@link StudioMessagesProvider}. */
286
+ export interface StudioMessagesProviderProps {
287
+ /** The messages to override — any subset; the rest come from the table above. */
288
+ messages: Partial<StudioMessages>;
289
+ /** The subtree the overrides apply to. */
290
+ children?: ReactNode;
291
+ }
292
+ /**
293
+ * Override the Studio's words for a subtree — a translation, or a house style.
294
+ * Providers nest: each overrides the table the one above it resolved.
295
+ *
296
+ * @remarks
297
+ * The overrides are read by identity: define them once (module scope, or a
298
+ * memo), as below.
299
+ *
300
+ * @param props - The overrides and the subtree
301
+ * @returns The provider
302
+ *
303
+ * @example
304
+ * ```tsx
305
+ * const GERMAN: Partial<StudioMessages> = {
306
+ * nothingSelected: () => "Nichts ausgewählt",
307
+ * columnSpan: () => "Spaltenbreite",
308
+ * };
309
+ *
310
+ * <I18nProvider locale="de-DE">
311
+ * <StudioMessagesProvider messages={GERMAN}>
312
+ * <EastChakraComponent value={builder} />
313
+ * </StudioMessagesProvider>
314
+ * </I18nProvider>
315
+ * ```
316
+ */
317
+ export declare function StudioMessagesProvider({ messages, children }: StudioMessagesProviderProps): import('react').FunctionComponentElement<import('react').ProviderProps<StudioMessages>>;
318
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/studio/messages.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAqD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1F;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC3B,qDAAqD;IACrD,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,4CAA4C;IAC5C,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,0CAA0C;IAC1C,gBAAgB,EAAE,MAAM,MAAM,CAAC;IAC/B,0BAA0B;IAC1B,cAAc,EAAE,MAAM,MAAM,CAAC;IAC7B,qCAAqC;IACrC,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB,kEAAkE;IAClE,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,4BAA4B;IAC5B,cAAc,EAAE,CAAC,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;IACjE,wDAAwD;IACxD,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,+DAA+D;IAC/D,aAAa,EAAE,MAAM;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1D,0DAA0D;IAC1D,QAAQ,EAAE,MA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CAAC;IACvB,+BAA+B;IAC/B,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB,0BAA0B;IAC1B,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,oHAAoH;IACpH,SAAS,EAAE,CAAC,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,KAAK,MAAM,CAAC;CACxF;AAED,yDAAyD;AACzD,eAAO,MAAM,cAAc,EAAE,cAoH5B,CAAC;AAIF;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,CAElD;AAED,+CAA+C;AAC/C,MAAM,WAAW,2BAA2B;IACxC,iFAAiF;IACjF,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAClC,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,2BAA2B,2FAIzF"}
@@ -0,0 +1,34 @@
1
+ import { ReactNode } from 'react';
2
+ /** Props of {@link NamePopover}. */
3
+ export interface NamePopoverProps {
4
+ /** Whether it is open. */
5
+ open: boolean;
6
+ /** Opens or closes it — its trigger, ×, Esc, a click outside, Cancel, or a write that was made. */
7
+ onOpenChange: (open: boolean) => void;
8
+ /** The button it hangs from, whatever opens it. */
9
+ trigger: ReactNode;
10
+ /** Its head — what it makes, and where. */
11
+ label: ReactNode;
12
+ /** The name field's placeholder, and its accessible name. */
13
+ placeholder: string;
14
+ /** The name it offers when it opens. */
15
+ initial: string;
16
+ /** The names the project holds — the new one must be none of them. */
17
+ taken: ReadonlySet<string>;
18
+ /** The hint while the name is empty. */
19
+ missing: string;
20
+ /** Its commit verb — the commit button's words. */
21
+ confirm: string;
22
+ /** Further fields, under the name. */
23
+ children?: ReactNode;
24
+ /** Makes the thing under the name — resolves to what refused it, or `undefined` once it is made. */
25
+ onConfirm: (name: string) => Promise<string | undefined>;
26
+ }
27
+ /**
28
+ * Renders the popover — see the module docs.
29
+ *
30
+ * @param props - What it names and what it does with the name
31
+ * @returns The trigger, and the popover while open
32
+ */
33
+ export declare function NamePopover({ open, onOpenChange, trigger, label, placeholder, initial, taken, missing, confirm, children, onConfirm, }: NamePopoverProps): import("react/jsx-runtime").JSX.Element;
34
+ //# sourceMappingURL=name-popover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"name-popover.d.ts","sourceRoot":"","sources":["../../src/studio/name-popover.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOxD,oCAAoC;AACpC,MAAM,WAAW,gBAAgB;IAC7B,0BAA0B;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,mGAAmG;IACnG,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,mDAAmD;IACnD,OAAO,EAAE,SAAS,CAAC;IACnB,2CAA2C;IAC3C,KAAK,EAAE,SAAS,CAAC;IACjB,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oGAAoG;IACpG,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC5D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EACxB,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,GACzG,EAAE,gBAAgB,2CAqElB"}
@@ -0,0 +1,13 @@
1
+ import { ValueTypeOf } from '@elaraai/east';
2
+ import { StudioKeyType } from '@elaraai/e3-ui/internal';
3
+ /** A page's key. */
4
+ export type StudioKey = ValueTypeOf<typeof StudioKeyType>;
5
+ /**
6
+ * The page open in the builder the key names, and a way to open another.
7
+ *
8
+ * @param key - The builder's open-page key
9
+ * @param first - The page it opens before any is written — its project's first
10
+ * @returns The open page, and the write that opens another
11
+ */
12
+ export declare function useOpenPage(key: string, first: StudioKey): [StudioKey, (next: StudioKey) => void];
13
+ //# sourceMappingURL=open-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open-page.d.ts","sourceRoot":"","sources":["../../src/studio/open-page.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,EAAoC,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD,oBAAoB;AACpB,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,aAAa,CAAC,CAAC;AAK1D;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC,CAQjG"}
@@ -0,0 +1,61 @@
1
+ import { ValueTypeOf } from '@elaraai/east';
2
+ import { StudioCellType, StudioComponentType, StudioPageComponent } from '@elaraai/e3-ui/internal';
3
+ /** The renderer's payload, decoded. */
4
+ type StudioPageValue = ValueTypeOf<typeof StudioPageComponent.schema>;
5
+ /** A listed component. */
6
+ type Component = ValueTypeOf<typeof StudioComponentType>;
7
+ /** One placement. */
8
+ type Cell = ValueTypeOf<typeof StudioCellType>;
9
+ /** Props of {@link StudioPlacement}. */
10
+ export interface StudioPlacementProps {
11
+ /** The key of the component it places. */
12
+ component: string;
13
+ /** The listed components under that key — one, when the surface lists it once. */
14
+ listed: readonly Component[];
15
+ /** Where its component's UI keeps its state. */
16
+ storageKey: string;
17
+ }
18
+ /**
19
+ * One placement's content: its component's own UI; a placeholder naming its
20
+ * component's key when the surface lists none under it; an error naming the
21
+ * key when two listed components share it.
22
+ *
23
+ * @param props - The component's key and the components listed under it
24
+ * @returns The content
25
+ */
26
+ export declare function StudioPlacement({ component: key, listed, storageKey }: StudioPlacementProps): import("react/jsx-runtime").JSX.Element;
27
+ /** Props of {@link StudioLayout}. */
28
+ export interface StudioLayoutProps {
29
+ /** The layout's placements, in order. */
30
+ cells: readonly Cell[];
31
+ /** The components the surface lists. */
32
+ components: readonly Component[];
33
+ /** Where its placements' UIs keep their state. */
34
+ storageKey: string;
35
+ }
36
+ /**
37
+ * A layout's placements on the snap grid, each its component's own UI — a
38
+ * frameless component bare, a placement the surface cannot draw its
39
+ * placeholder, in a tile. Under a narrow container the tiles stack in row
40
+ * order.
41
+ *
42
+ * @param props - The placements and the listed components
43
+ * @returns The grid
44
+ */
45
+ export declare function StudioLayout({ cells, components, storageKey }: StudioLayoutProps): import("react/jsx-runtime").JSX.Element;
46
+ /** Props of {@link EastChakraStudioPage}. */
47
+ export interface EastChakraStudioPageProps {
48
+ /** The payload, decoded. */
49
+ value: StudioPageValue;
50
+ /** The structural storage key. */
51
+ storageKey: string;
52
+ }
53
+ /**
54
+ * Renders one page — see the module docs.
55
+ *
56
+ * @param props - The payload and its storage key
57
+ * @returns The page
58
+ */
59
+ export declare const EastChakraStudioPage: import('react').NamedExoticComponent<EastChakraStudioPageProps>;
60
+ export {};
61
+ //# sourceMappingURL=page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../src/studio/page.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAoBH,OAAO,EAA2B,KAAK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';
2
+ import { PaletteCardType, PalettePageType, StudioComponentType } from '@elaraai/e3-ui/internal';
3
+ /** A listed component. */
4
+ type Component = ValueTypeOf<typeof StudioComponentType>;
5
+ /** A component's card, as East computed it. */
6
+ type PaletteCard = ValueTypeOf<typeof PaletteCardType>;
7
+ /** A page of the project, as East computed it. */
8
+ type PalettePage = ValueTypeOf<typeof PalettePageType>;
9
+ /** Props of {@link StudioPalette}. */
10
+ export interface StudioPaletteProps {
11
+ /** The components the palette offers — the listed, less the deprecated — in the surface's order. */
12
+ components: readonly Component[];
13
+ /** Each one's card: its meta line, and whether it is placed. */
14
+ cards: ReadonlyMap<string, PaletteCard>;
15
+ /** The project's pages, in key order. */
16
+ pages: readonly PalettePage[];
17
+ /** The open page's name in the project. */
18
+ open: string;
19
+ /** The ids of the palette's libraries — the components library's, which the canvas takes cards from, and the pages'. */
20
+ ids: {
21
+ components: string;
22
+ pages: string;
23
+ };
24
+ /** Selects the component's first placement on the page. */
25
+ onSelect: (component: string) => void;
26
+ /** Opens a page of the project. */
27
+ onOpen: (page: string) => void;
28
+ /** Where the pane and its libraries keep their state. */
29
+ storageKey: string;
30
+ }
31
+ /**
32
+ * Renders the builder's palette — see the module docs.
33
+ *
34
+ * @param props - The components and pages it lists, and what its clicks do
35
+ * @returns The palette's pane
36
+ */
37
+ export declare const StudioPalette: import('react').NamedExoticComponent<StudioPaletteProps>;
38
+ export {};
39
+ //# sourceMappingURL=palette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../src/studio/palette.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AA0BH,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAWhG,0BAA0B;AAC1B,KAAK,SAAS,GAAG,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACzD,+CAA+C;AAC/C,KAAK,WAAW,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC;AACvD,kDAAkD;AAClD,KAAK,WAAW,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC;AAEvD,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IAC/B,oGAAoG;IACpG,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;IACjC,gEAAgE;IAChE,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACxC,yCAAyC;IACzC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;IAC9B,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,wHAAwH;IACxH,GAAG,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,2DAA2D;IAC3D,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,mCAAmC;IACnC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,0DA+GxB,CAAC"}