@ocelescope/core 0.10.2 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +2 -2
  2. package/dist/{ActivityPicker-BfA34hBU.js → ActivityPicker-CtFSu1YR.js} +8 -6
  3. package/dist/{AreaChart-q6rVcUIp.js → AreaChart-BSwN1fMp.js} +4 -5
  4. package/dist/{AttributePicker-Dd8eKA_3.js → AttributePicker-Cq7luTEi.js} +4 -5
  5. package/dist/{BarChart-BLZS87ex.js → BarChart-CyMePf1z.js} +4 -5
  6. package/dist/{E2ORelationPicker-CcDSJWc0.js → E2ORelationPicker-C8EmrbFx.js} +4 -5
  7. package/dist/{EventAttributePicker-Ch0rYS1h.js → EventAttributePicker-BgEdydek.js} +4 -5
  8. package/dist/{EventPicker-DbqFMMr2.js → EventPicker-D5uNOTw1.js} +4 -5
  9. package/dist/{HistogramChart-GgiQdlsk.js → HistogramChart-CJwvvDUu.js} +3 -4
  10. package/dist/{LineChart-Cq935Tk2.js → LineChart-Cbxnm338.js} +4 -5
  11. package/dist/{O2ORelationPicker-_XU1FfIX.js → O2ORelationPicker-CryAxxUo.js} +4 -5
  12. package/dist/{ObjectAttributePicker-Dpt3IfC5.js → ObjectAttributePicker-D_I3LQsY.js} +4 -5
  13. package/dist/{ObjectPicker-Bd68wl9p.js → ObjectPicker-D-ksQveT.js} +4 -5
  14. package/dist/{ObjectTypePicker-CXCMky34.js → ObjectTypePicker-Bw8Fsktx.js} +9 -6
  15. package/dist/{OcelChart-BnXjHb_r.js → OcelChart-DJNM5peW.js} +3 -4
  16. package/dist/{OptionPicker-D9rUIwbY.js → OptionPicker-DQ-WYFQZ.js} +7 -14
  17. package/dist/{PieChart-DZFHaTXD.js → PieChart-BmMoI0TY.js} +4 -5
  18. package/dist/{ScatterChart-DJfJmABJ.js → ScatterChart-CASPRlZU.js} +4 -5
  19. package/dist/{SqlChart-Bf7D5o5P.js → SqlChart-cxKpWkyh.js} +8 -9
  20. package/dist/{SunburstChart-CMNYlKon.js → SunburstChart-Ddx9EaL-.js} +3 -4
  21. package/dist/{attributeOptions-D4slIoZx.js → attributeOptions-COiWnKUS.js} +1 -2
  22. package/dist/{cartesian-Dt7weMqK.js → cartesian-CtdS2iZb.js} +2 -3
  23. package/dist/index.d.ts +6 -84
  24. package/dist/index.js +75 -92
  25. package/dist/{relationOptions-DTtIOIr1.js → relationOptions-hEEsEQrx.js} +1 -2
  26. package/dist/{rolldown-runtime-D7D4PA-g.js → rolldown-runtime-D8jQpDG7.js} +1 -2
  27. package/dist/{series-W1jsVape.js → series-Bx0HVnSy.js} +2 -3
  28. package/dist/style.css +34 -14
  29. package/dist/{useChart-jzzXgs0j.js → useChart-BK4pjGal.js} +3 -6
  30. package/dist/{useCurrentOCEL-BeBa7K0g.js → useCurrentOCEL-BUH5XGje.js} +2 -4
  31. package/dist/{useOcelId-DIu_aGLH.js → useOcelId-BEC6_yRa.js} +2 -3
  32. package/dist/{useOcelQuery-D1QM-Zgv.js → useOcelQuery-6vtgZNzz.js} +2 -3
  33. package/dist/{useSearch-Ad3AtTVj.js → useSearch-CdXjjv-a.js} +1 -2
  34. package/package.json +24 -24
package/dist/index.d.ts CHANGED
@@ -5,7 +5,6 @@ import { ComponentProps, ComponentType, JSX, SVGProps } from "react";
5
5
  import { Dropzone, FileWithPath } from "@mantine/dropzone";
6
6
  import { ViewerConfig, ViewerProps } from "@r4pm/components";
7
7
  import { GetStaticPaths, GetStaticProps, NextApiRequest, NextApiResponse } from "next";
8
- //#region src/components/AttributeTable.d.ts
9
8
  type OcelVersion$1 = "original" | "filtered";
10
9
  declare const AttributesTable: React.FC<{
11
10
  ocelId: string;
@@ -15,22 +14,21 @@ declare const AttributesTable: React.FC<{
15
14
  hideRange?: boolean;
16
15
  hideValues?: boolean;
17
16
  ocelVersion?: OcelVersion$1;
17
+ viewId?: string;
18
18
  alwaysExpandable?: boolean;
19
19
  visibleAttributes?: string[];
20
20
  height?: string | number;
21
21
  className?: string;
22
22
  style?: React.CSSProperties;
23
23
  }>;
24
- //#endregion
25
- //#region src/components/BarList/BarList.d.ts
26
24
  export declare const BarList: React.FC<{
27
25
  data: Record<string, number>;
28
26
  labelHeader: string;
29
27
  valueHeader?: string;
30
28
  maxVisibleItems?: number;
29
+ className?: string;
30
+ style?: React.CSSProperties;
31
31
  }>;
32
- //#endregion
33
- //#region src/components/charts/types.d.ts
34
32
  /** One row of a tidy result: a value per column. */
35
33
  type Row = Record<string, unknown>;
36
34
  /** A tidy table: its rows, and the type its source reported per column. */
@@ -104,16 +102,12 @@ interface Series {
104
102
  * zero. Plotly decides the axis from what it is given. */
105
103
  values: Array<number | string>;
106
104
  }
107
- //#endregion
108
- //#region src/components/charts/BarChart.d.ts
109
105
  interface BarChartProps extends CartesianChartProps {
110
106
  /** Stack the traces instead of standing them side by side. */
111
107
  stacked?: boolean;
112
108
  /** Bars along the x axis, which long category names need. */
113
109
  horizontal?: boolean;
114
110
  }
115
- //#endregion
116
- //#region src/components/charts/HistogramChart.d.ts
117
111
  interface HistogramChartProps extends Omit<ChartProps, "series"> {
118
112
  /** Column holding each bin's upper edge; `x` holds its lower one. A row
119
113
  * without a lower edge counts everything below its upper one, and the
@@ -121,8 +115,6 @@ interface HistogramChartProps extends Omit<ChartProps, "series"> {
121
115
  * stretching the axis. */
122
116
  xEnd: string;
123
117
  }
124
- //#endregion
125
- //#region src/components/charts/LineChart.d.ts
126
118
  interface LineChartProps extends CartesianChartProps {
127
119
  /** Hold each value until the next one, instead of sloping between them.
128
120
  * What a thing was worth between two readings is what it last read. */
@@ -132,26 +124,16 @@ interface LineChartProps extends CartesianChartProps {
132
124
  * line colour, so the association stays visible without separate plots. */
133
125
  yAxes?: "shared" | "independent";
134
126
  }
135
- //#endregion
136
- //#region src/components/charts/PieChart.d.ts
137
127
  interface PieChartProps extends ChartProps {
138
128
  /** The hole in the middle, as a share of the radius. 0 for a full pie. */
139
129
  hole?: number;
140
130
  }
141
- //#endregion
142
- //#region src/components/charts/SunburstChart.d.ts
143
131
  interface SunburstChartProps extends ChartProps {
144
132
  /** The rings, innermost first. Defaults to the category, then the series. */
145
133
  path?: readonly string[];
146
134
  }
147
- //#endregion
148
- //#region src/components/charts/AreaChart.d.ts
149
135
  type AreaChartProps = CartesianChartProps;
150
- //#endregion
151
- //#region src/components/charts/ScatterChart.d.ts
152
136
  type ScatterChartProps = CartesianChartProps;
153
- //#endregion
154
- //#region src/components/charts/index.d.ts
155
137
  interface OcelChartProps extends ChartOptions, ViewerConfig {
156
138
  /** DuckDB SQL over the OCEL's stored tables: `events`, `objects`, `e2o`,
157
139
  * `o2o`, `object_changes`. One `SELECT`; the backend refuses anything else. */
@@ -173,8 +155,6 @@ export declare const PieChart: import("react").ComponentType<PieChartProps>;
173
155
  export declare const SunburstChart: import("react").ComponentType<SunburstChartProps>;
174
156
  export declare const SqlChart: import("react").ComponentType<SqlChartProps>;
175
157
  export declare const OcelChart: import("react").ComponentType<OcelChartProps>;
176
- //#endregion
177
- //#region src/components/Dropzone/Dropzone.d.ts
178
158
  export declare const FileDropzone: React.FC<{
179
159
  onUpload: (files: FileWithPath[]) => void;
180
160
  accept?: ComponentProps<typeof Dropzone>["accept"];
@@ -185,25 +165,17 @@ export declare const FileDropzone: React.FC<{
185
165
  description?: React.ReactNode;
186
166
  };
187
167
  }>;
188
- //#endregion
189
- //#region src/components/Dropzone/FullScreenUpload.d.ts
190
168
  export declare const FullScreenUpload: React.FC<{
191
169
  onSuccess?: () => void;
192
170
  accept?: ComponentProps<typeof Dropzone.FullScreen>["accept"];
193
171
  label?: React.ReactNode;
194
172
  active?: boolean;
195
173
  }>;
196
- //#endregion
197
- //#region src/components/EventHandler.d.ts
198
174
  export declare const sseHandler: (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
199
- //#endregion
200
- //#region src/components/HelpModal/HelpModal.d.ts
201
175
  export declare const HelpModal: React.FC<{
202
176
  visible: boolean;
203
177
  onClose: () => void;
204
178
  }>;
205
- //#endregion
206
- //#region src/lib/config.d.ts
207
179
  type Author = {
208
180
  name: string;
209
181
  link?: string;
@@ -231,8 +203,6 @@ export type OcelescopeConfig = {
231
203
  };
232
204
  export declare const defineModule: (def: ModuleDefinition) => ModuleDefinition;
233
205
  export declare const defineModuleRoute: (def: ModuleRouteDefinition) => ModuleRouteDefinition;
234
- //#endregion
235
- //#region src/components/ModulePage.d.ts
236
206
  type ModulePageProps = {
237
207
  moduleName: string;
238
208
  routeName: string;
@@ -244,17 +214,9 @@ export declare const createModulesPage: (config: OcelescopeConfig) => {
244
214
  getInitialProps?(context: import("next").NextPageContext): ModulePageProps | Promise<ModulePageProps>;
245
215
  };
246
216
  };
247
- //#endregion
248
- //#region src/components/OcelescopeApp.d.ts
249
217
  export declare const OcelescopeApp: (config: OcelescopeConfig) => React.FC<any>;
250
- //#endregion
251
- //#region src/components/OcelescopeDocument.d.ts
252
218
  export declare const OcelescopeDocument: React.FC;
253
- //#endregion
254
- //#region src/components/OcelSelect/OcelSelect.d.ts
255
219
  export declare const OcelSelect: ({ value, ...props }: Omit<ComponentProps<typeof Select<string>>, "data">) => import("react").JSX.Element;
256
- //#endregion
257
- //#region src/components/Pickers/types.d.ts
258
220
  /** Picking one value, or none. */
259
221
  interface SingleSelection<T> {
260
222
  multiple?: false;
@@ -301,6 +263,8 @@ interface OcelSource {
301
263
  ocelId?: string;
302
264
  /** The unfiltered log, for choices that must not shift under a filter. */
303
265
  ocelVersion?: "filtered" | "original";
266
+ /** A view of the OCEL; takes precedence over `ocelVersion`. */
267
+ viewId?: string;
304
268
  }
305
269
  /** The props of a picker that reads its choices from an OCEL endpoint. */
306
270
  type OcelPickerProps<T> = OcelSource & PickerProps & Selection<T>;
@@ -322,29 +286,19 @@ type AttributeRef = {
322
286
  objectType: string;
323
287
  name: string;
324
288
  };
325
- //#endregion
326
- //#region src/components/Pickers/ActivityPicker.d.ts
327
289
  type ActivityPickerProps = OcelPickerProps<string>;
328
- //#endregion
329
- //#region src/components/Pickers/ObjectTypePicker.d.ts
330
290
  type ObjectTypePickerProps = OcelPickerProps<string> & {
331
291
  /** Offer only the object types that events of this activity relate to. */
332
292
  activity?: string;
333
293
  };
334
- //#endregion
335
- //#region src/components/Pickers/EventPicker.d.ts
336
294
  type EventPickerProps = OcelPickerProps<string> & {
337
295
  /** How many ids a search turns up. */
338
296
  limit?: number;
339
297
  };
340
- //#endregion
341
- //#region src/components/Pickers/ObjectPicker.d.ts
342
298
  type ObjectPickerProps = OcelPickerProps<string> & {
343
299
  /** How many ids a search turns up. */
344
300
  limit?: number;
345
301
  };
346
- //#endregion
347
- //#region src/components/Pickers/EventAttributePicker.d.ts
348
302
  type EventAttributePickerProps = OcelPickerProps<string> & {
349
303
  /** Offer only what events of this type carry. Without it, every attribute
350
304
  * any event in the log carries. */
@@ -352,8 +306,6 @@ type EventAttributePickerProps = OcelPickerProps<string> & {
352
306
  /** Offer only attributes of these value types, e.g. `["int", "float"]`. */
353
307
  valueTypes?: readonly ValueType[];
354
308
  };
355
- //#endregion
356
- //#region src/components/Pickers/ObjectAttributePicker.d.ts
357
309
  type ObjectAttributePickerProps = OcelPickerProps<string> & {
358
310
  /** Offer only what objects of this type carry. Without it, every attribute
359
311
  * any object in the log carries. */
@@ -361,8 +313,6 @@ type ObjectAttributePickerProps = OcelPickerProps<string> & {
361
313
  /** Offer only attributes of these value types, e.g. `["int", "float"]`. */
362
314
  valueTypes?: readonly ValueType[];
363
315
  };
364
- //#endregion
365
- //#region src/components/Pickers/AttributePicker.d.ts
366
316
  type AttributePickerProps = OcelPickerProps<AttributeRef> & {
367
317
  /** The activity whose attributes, and whose related objects'
368
318
  * attributes, are offered. */
@@ -375,22 +325,16 @@ type AttributePickerProps = OcelPickerProps<AttributeRef> & {
375
325
  /** Offer only attributes of these value types, e.g. `["int", "float"]`. */
376
326
  valueTypes?: readonly ValueType[];
377
327
  };
378
- //#endregion
379
- //#region src/components/Pickers/E2ORelationPicker.d.ts
380
328
  type E2ORelationPickerProps = OcelPickerProps<Relation> & {
381
329
  /** Offer only relations of events of this type. Without it, every event
382
330
  * type's, grouped by event type. */
383
331
  activity?: string;
384
332
  };
385
- //#endregion
386
- //#region src/components/Pickers/O2ORelationPicker.d.ts
387
333
  type O2ORelationPickerProps = OcelPickerProps<Relation> & {
388
334
  /** Offer only relations of objects of this type. Without it, every object
389
335
  * type's, grouped by object type. */
390
336
  objectType?: string;
391
337
  };
392
- //#endregion
393
- //#region src/components/Pickers/internal/options.d.ts
394
338
  /** A heading that options are shown together under. */
395
339
  interface PickerGroup {
396
340
  label: string;
@@ -430,8 +374,6 @@ type OptionPickerProps<T> = PickerProps & Selection<T> & {
430
374
  * of them a search turned up. Defaults to the number of options. */
431
375
  total?: number;
432
376
  };
433
- //#endregion
434
- //#region src/components/Pickers/index.d.ts
435
377
  export declare const OptionPicker: <T>(props: OptionPickerProps<T>) => JSX.Element;
436
378
  export declare const ActivityPicker: ComponentType<ActivityPickerProps>;
437
379
  export declare const ObjectTypePicker: ComponentType<ObjectTypePickerProps>;
@@ -442,8 +384,6 @@ export declare const ObjectAttributePicker: ComponentType<ObjectAttributePickerP
442
384
  export declare const AttributePicker: ComponentType<AttributePickerProps>;
443
385
  export declare const E2ORelationPicker: ComponentType<E2ORelationPickerProps>;
444
386
  export declare const O2ORelationPicker: ComponentType<O2ORelationPickerProps>;
445
- //#endregion
446
- //#region src/components/RelationTable.d.ts
447
387
  type RelationType = "o2o" | "e2o";
448
388
  type Direction = "source" | "target";
449
389
  type OcelVersion = "original" | "filtered";
@@ -456,6 +396,7 @@ declare const RelationTable: React.FC<{
456
396
  hideRange?: boolean;
457
397
  hideTotal?: boolean;
458
398
  ocelVersion?: OcelVersion;
399
+ viewId?: string;
459
400
  visibleRelations?: {
460
401
  source: string;
461
402
  target: string;
@@ -464,25 +405,17 @@ declare const RelationTable: React.FC<{
464
405
  className?: string;
465
406
  style?: React.CSSProperties;
466
407
  }>;
467
- //#endregion
468
- //#region src/components/UploadModal/UploadModal.d.ts
469
408
  export declare const UploadModal: React.FC<{
470
409
  visible: boolean;
471
410
  onClose: () => void;
472
411
  }>;
473
- //#endregion
474
- //#region src/components/UploadSection/UploadSection.d.ts
475
412
  export declare const UploadSection: React.FC<{
476
413
  onSuccess?: () => void;
477
414
  }>;
478
- //#endregion
479
- //#region src/hooks/useCurrentOCEL.d.ts
480
415
  export declare const useCurrentOcel: () => {
481
416
  id: string | null;
482
417
  setCurrentOcel: (id: string) => void;
483
418
  };
484
- //#endregion
485
- //#region src/hooks/useDownload.d.ts
486
419
  export declare const useDownloadFile: () => (path: string) => Promise<void>;
487
420
  export declare const useDownloadOCEL: () => {
488
421
  download: (ocelId: string, params?: import("@ocelescope/api-base").DownloadOCELParams | undefined) => void;
@@ -499,12 +432,8 @@ export declare const useDownloadResource: () => {
499
432
  export declare const useDownloadResourceAsPnml: () => {
500
433
  download: (resourceId: string) => void;
501
434
  };
502
- //#endregion
503
- //#region src/hooks/useInvalidate.d.ts
504
435
  type InvalidationRouteName = "ocels" | "resources" | "tasks" | "plugins" | "discoveryMethods";
505
436
  export declare const useInvalidate: () => (routeNames: InvalidationRouteName[]) => Promise<void>;
506
- //#endregion
507
- //#region src/hooks/useOcelQuery.d.ts
508
437
  interface OcelQueryOptions {
509
438
  /** DuckDB SQL over the OCEL's stored tables: `events`, `objects`, `e2o`,
510
439
  * `o2o`, `object_changes`. One `SELECT`; the backend refuses anything else. */
@@ -711,11 +640,7 @@ export declare const useOcelQuery: ({ sql, parameters, ocelVersion, enabled }: O
711
640
  [dataTagErrorSymbol]: unknown;
712
641
  };
713
642
  };
714
- //#endregion
715
- //#region src/lib/attributes.d.ts
716
643
  export declare const formatAttributeValue: (type: ValueType, value: string | number) => string | number;
717
- //#endregion
718
- //#region src/lib/env.d.ts
719
644
  export declare const env: {
720
645
  appVersion: string;
721
646
  projectPage: string;
@@ -729,8 +654,6 @@ export declare const env: {
729
654
  requestEnvironmentUrl: string;
730
655
  contactEmail: string;
731
656
  };
732
- //#endregion
733
- //#region src/lib/getModuleRoute.d.ts
734
657
  export declare const getModuleRoute: ({ moduleName, routeName, query }: {
735
658
  moduleName: string;
736
659
  routeName?: string;
@@ -741,5 +664,4 @@ export declare const getModuleRoute: ({ moduleName, routeName, query }: {
741
664
  } | undefined;
742
665
  pathname: string;
743
666
  };
744
- //#endregion
745
667
  export { type ActivityPickerProps, type AreaChartProps, type AttributePickerProps, type AttributeRef, AttributesTable, type BarChartProps, type CartesianChartProps, type ChartOptions, type ChartProps, type ChartType, type E2ORelationPickerProps, type EventAttributePickerProps, type EventPickerProps, type HistogramChartProps, type LineChartProps, type MultiSelection, type O2ORelationPickerProps, type ObjectAttributePickerProps, type ObjectPickerProps, type ObjectTypePickerProps, type OcelChartProps, type OcelPickerProps, type OcelQueryOptions, type OcelSource, type OptionPickerProps, type PickerGroup, type PickerOption, type PickerProps, type PieChartProps, type Relation, RelationTable, type Row, type ScatterChartProps, type Selection, type Series, type SingleSelection, type SqlChartProps, type SunburstChartProps };