mnfst-types 0.1.13 → 0.1.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnfst-types",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Generate TypeScript types for a Manifest project from manifest.json and sample data",
5
5
  "type": "module",
6
6
  "bin": {
@@ -194,13 +194,13 @@ export interface ManifestAppwriteBucketOps {
194
194
  $remove(fileId: string): Promise<void>;
195
195
  $delete(fileId: string | string[]): Promise<unknown>;
196
196
  $duplicate(fileId: string, options?: { newName?: string; newFileId?: string }): Promise<ManifestFile>;
197
- $filesFor(parentId: string, fieldName?: string): ManifestFile[];
197
+ $filesFor(tableName: string, entryId: string, fileIdsColumn?: string): Promise<ManifestFile[]>;
198
198
  $first(limit?: number): Promise<ManifestCursorPage<ManifestFile>>;
199
199
  $next(cursor: string, limit?: number): Promise<ManifestCursorPage<ManifestFile>>;
200
200
  $prev(cursor: string, limit?: number): Promise<ManifestCursorPage<ManifestFile>>;
201
201
  $page(page: number, limit?: number): Promise<ManifestOffsetPage<ManifestFile>>;
202
- $unlinkFrom(parentId: string, fileId: string): Promise<void>;
203
- $removeFrom(parentId: string, fileId: string): Promise<void>;
202
+ $unlinkFrom(tableName: string, entryId: string, file: string | { $id: string }, fileIdsColumn?: string): Promise<void>;
203
+ $removeFrom(tableName: string, entryId: string, file: string | { $id: string }, fileIdsColumn?: string): Promise<ManifestFile[] | null>;
204
204
  }
205
205
 
206
206
  /**
@@ -387,6 +387,33 @@ export interface ManifestPresence {
387
387
  /** `$date(id?)` from the datepicker plugin — the picker API for the nearest (or given) instance. */
388
388
  export type ManifestDate = (id?: string) => Record<string, unknown>;
389
389
 
390
+ /** `x-chart` config object (standalone; annotate config objects with it). */
391
+ export interface ManifestChartConfig {
392
+ type?: 'line' | 'area' | 'bar' | 'combo' | 'scatter' | 'candlestick' | 'ohlc' | 'pie' | 'donut' | 'gauge' | 'heatmap' | 'gantt' | 'map' | (string & {});
393
+ labels?: unknown[];
394
+ series?: Array<{ name?: string; data?: unknown[]; color?: string; type?: string }>;
395
+ data?: unknown;
396
+ height?: number;
397
+ stacked?: boolean;
398
+ legend?: boolean;
399
+ axis?: boolean;
400
+ grid?: boolean;
401
+ tooltip?: boolean;
402
+ dataLabels?: boolean;
403
+ curve?: 'monotone' | 'linear' | 'step' | 'step-after' | 'step-before' | 'natural' | (string & {});
404
+ ticks?: Array<number | { at: number; label?: string }>;
405
+ tickAnchor?: 'start' | 'end';
406
+ /** Line/area/combo: `false` drops per-point dots; hover columns show every series at that label. Map: marker list. */
407
+ points?: boolean | Array<Record<string, unknown>>;
408
+ /** Cartesian (incl. candlestick): widens the y-axis to include it. Gauge: range start. Gantt: axis start (number or date). */
409
+ min?: number | string | Date;
410
+ /** Cartesian (incl. candlestick): widens the y-axis to include it. Gauge: range end. Gantt: axis end (number or date). */
411
+ max?: number | string | Date;
412
+ /** Intl.NumberFormat options for tooltip and data-label values; axis ticks add compact notation. */
413
+ format?: Intl.NumberFormatOptions;
414
+ [key: string]: unknown;
415
+ }
416
+
390
417
  /** `$chart(id?)` from the charts plugin — the chart API for the nearest (or given) instance. */
391
418
  export type ManifestChart = (id?: string) => Record<string, unknown>;
392
419
 
@@ -701,7 +728,7 @@ export type ManifestDirective =
701
728
  | 'x-icon' | 'x-svg' | 'x-markdown' | 'x-code' | 'x-code-group'
702
729
  | 'x-toast' | 'x-tooltip' | 'x-carousel' | 'x-virtual' | 'x-computed' | 'x-defer'
703
730
  | 'x-chart' | 'x-date' | 'x-color' | 'x-colorpicker' | 'x-combobox'
704
- | 'x-export' | 'x-import' | 'x-pay' | 'x-files' | 'x-data-files'
731
+ | 'x-export' | 'x-import' | 'x-pay'
705
732
  | 'x-edit' | 'x-rich-text' | 'x-submit';
706
733
 
707
734
  /** Detail of the `submit:sent` / `submit:error` events an `x-submit` form dispatches. */